Skip to content

Commit 9add939

Browse files
committed
feat: added no-mask-secrets respect option to allow raw output
1 parent 12c6822 commit 9add939

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

docs/@v2/commands/respect.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Use this command to execute API tests described in an Arazzo description.
1111
## Usage
1212

1313
```sh
14-
npx @redocly/cli@latest respect <your-test-file | multiple files | files bash query> [-w | --workflow] [-s | --skip] [-v | --verbose] [-i | --input] [-S | --server] [-H | --har-output] [-J | --json-output] [--max-steps] [--max-fetch-timeout] [--execution-timeout] [--severity]
14+
npx @redocly/cli@latest respect <your-test-file | multiple files | files bash query> [-w | --workflow] [-s | --skip] [-v | --verbose] [-i | --input] [-S | --server] [-H | --har-output] [-J | --json-output] [--max-steps] [--max-fetch-timeout] [--execution-timeout] [--severity] [--no-mask-secrets]
1515
```
1616

1717
## Options
@@ -180,6 +180,18 @@ npx @redocly/cli@latest respect <your-test-file | multiple files | files bash qu
180180

181181
`REDOCLY_CLI_RESPECT_EXECUTION_TIMEOUT=1800000 npx @redocly/cli@latest respect test-file.yaml`
182182

183+
---
184+
185+
- --no-mask-secrets
186+
- boolean
187+
- Disables masking of secrets in the output. By default, any sensitive information, such as values described with `format: password`,
188+
as well as tokens and authentication headers from `x-security`, is masked with `********` in both terminal logs and file outputs. When this flag is set to `true`,
189+
the raw (unmasked) data will be shown in all outputs.
190+
191+
For example, the following command will disable sensitive output masking:
192+
193+
`npx @redocly/cli@latest respect test-file.yaml --no-mask-secrets`
194+
183195
{% /table %}
184196

185197
## Examples

packages/cli/src/commands/respect/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export type RespectArgv = {
3030
config?: string;
3131
'max-fetch-timeout': number;
3232
'execution-timeout': number;
33+
'no-mask-secrets': boolean;
3334
};
3435

3536
export async function handleRespect({

packages/cli/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,10 @@ yargs(hideBin(process.argv))
764764
default: 3_600_000,
765765
coerce: validatePositiveNumber('execution-timeout', false),
766766
},
767+
'no-mask-secrets': {
768+
describe: 'Do not mask secrets in the output.',
769+
type: 'boolean',
770+
},
767771
});
768772
},
769773
async (argv) => {

0 commit comments

Comments
 (0)