Skip to content

feat: added no-secrets-masking respect option to allow raw output#2346

Merged
DmitryAnansky merged 9 commits intomainfrom
feat/respect-no-mask-secrets-option
Oct 8, 2025
Merged

feat: added no-secrets-masking respect option to allow raw output#2346
DmitryAnansky merged 9 commits intomainfrom
feat/respect-no-mask-secrets-option

Conversation

@DmitryAnansky
Copy link
Contributor

@DmitryAnansky DmitryAnansky commented Oct 6, 2025

What/Why/How?

Introduced new respect command cli and respect-core run() options no-secrets-masking and noSecretsMasking.

This new option disables masking of secrets in the output. By default, any sensitive information, such as values described with format: password, as well as tokens and authentication headers from x-security,are masked with ******** in both terminal logs and file outputs. When this flag is set to true, the raw (unmasked) data shows in all outputs.

So in practice, when noSecretsMasking is provided and is true:

  • Terminal output will not mask secrets with ********.
  • run function execution result will contain additional property, called secretValues with the list of secret strings, it will be the consumer's responsibility to mask them.
  • har-output will not mask secrets with ******** inside entries.
  • json-output will not mask secrets with ******** inside workflow and step data + will contain additional property, called secretValues with the list of secret strings, it will be the consumer's responsibility to mask them:
{
  "files": {
    "test.arazzo.yaml": {
      "totalRequests": 4,
      "executedWorkflows": [
       ...
      ],
      "totalTimeMs": 1269.643958,
      "globalTimeoutError": false,
      "secretValues": [
        "secret",
        "super-secret"
      ]
    }
  },
  "status": "success",
  "totalTime": 1271.05825
}

Reference

Closes: #2341

Testing

CLI example:

redocly respect test.arazzo.yaml --verbose --no-secrets-masking

Screenshots (optional)

Check yourself

  • Code changed? - Tested with Redoc/Realm/Reunite (internal)
  • All new/updated code is covered by tests
  • New package installed? - Tested in different environments (browser/node)
  • Documentation update considered

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

@changeset-bot
Copy link

changeset-bot bot commented Oct 6, 2025

🦋 Changeset detected

Latest commit: 210614d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/respect-core Minor
@redocly/cli Minor
@redocly/openapi-core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

Command Mean [s] Min [s] Max [s] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 1.445 ± 0.027 1.415 1.497 1.00 ± 0.03
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1.442 ± 0.031 1.412 1.504 1.00

@DmitryAnansky DmitryAnansky force-pushed the feat/respect-no-mask-secrets-option branch from 7bc7bb4 to 5188645 Compare October 6, 2025 17:19
@DmitryAnansky DmitryAnansky changed the title feat: added no-mask-secrets respect option to allow raw output feat: added secrets-reveal respect option to allow raw output Oct 7, 2025
@DmitryAnansky DmitryAnansky added the snapshot Create experimental release PR label Oct 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2025

📦 A new experimental 🧪 version v0.0.0-snapshot.1759850691 of Redocly CLI has been published for testing.

Install with NPM:

npm install @redocly/cli@0.0.0-snapshot.1759850691
# or
npm install @redocly/openapi-core@0.0.0-snapshot.1759850691
# or
npm install @redocly/respect-core@0.0.0-snapshot.1759850691

⚠️ Note: This is a development build and may contain unstable features.

@DmitryAnansky DmitryAnansky marked this pull request as ready for review October 7, 2025 15:44
@DmitryAnansky DmitryAnansky requested review from a team as code owners October 7, 2025 15:44
@DmitryAnansky DmitryAnansky changed the title feat: added secrets-reveal respect option to allow raw output feat: added no-secrets-masking respect option to allow raw output Oct 8, 2025
Co-authored-by: Jacek Łękawa <164185257+JLekawa@users.noreply.github.com>
@DmitryAnansky DmitryAnansky merged commit e72f2b5 into main Oct 8, 2025
38 checks passed
@DmitryAnansky DmitryAnansky deleted the feat/respect-no-mask-secrets-option branch October 8, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot Create experimental release PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce setting to Respect that will produce output with not masked secrets

4 participants