From 16432f9109f1573619beadc6df389a8b9c388405 Mon Sep 17 00:00:00 2001 From: Team CLI Bot Date: Mon, 7 Sep 2026 09:12:01 +0000 Subject: [PATCH] docs: synchronizing help from snyk/user-docs --- help/cli-commands/README.md | 10 +- help/cli-commands/code-test.md | 4 +- help/cli-commands/container-test.md | 2 +- help/cli-commands/cos-finding-list.md | 112 +++++++++++++++++++++++ help/cli-commands/cos-finding-show.md | 48 ++++++++++ help/cli-commands/cos-finding.md | 34 +++++++ help/cli-commands/cos-scan-cancel.md | 49 ++++++++++ help/cli-commands/cos-scan-list.md | 98 ++++++++++++++++++++ help/cli-commands/cos-scan-report.md | 73 +++++++++++++++ help/cli-commands/cos-scan-start.md | 105 +++++++++++++++++++++ help/cli-commands/cos-scan-status.md | 72 +++++++++++++++ help/cli-commands/cos-scan.md | 39 ++++++++ help/cli-commands/cos-target-add.md | 53 +++++++++++ help/cli-commands/cos-target-dump.md | 60 ++++++++++++ help/cli-commands/cos-target-list.md | 52 +++++++++++ help/cli-commands/cos-target-show.md | 62 +++++++++++++ help/cli-commands/cos-target-template.md | 97 ++++++++++++++++++++ help/cli-commands/cos-target.md | 38 ++++++++ help/cli-commands/cos.md | 42 +++++++++ help/cli-commands/iac-test.md | 4 +- help/cli-commands/ignore.md | 4 +- help/cli-commands/log4shell.md | 2 +- help/cli-commands/sbom-test.md | 2 +- help/cli-commands/test.md | 4 +- 24 files changed, 1053 insertions(+), 13 deletions(-) create mode 100644 help/cli-commands/cos-finding-list.md create mode 100644 help/cli-commands/cos-finding-show.md create mode 100644 help/cli-commands/cos-finding.md create mode 100644 help/cli-commands/cos-scan-cancel.md create mode 100644 help/cli-commands/cos-scan-list.md create mode 100644 help/cli-commands/cos-scan-report.md create mode 100644 help/cli-commands/cos-scan-start.md create mode 100644 help/cli-commands/cos-scan-status.md create mode 100644 help/cli-commands/cos-scan.md create mode 100644 help/cli-commands/cos-target-add.md create mode 100644 help/cli-commands/cos-target-dump.md create mode 100644 help/cli-commands/cos-target-list.md create mode 100644 help/cli-commands/cos-target-show.md create mode 100644 help/cli-commands/cos-target-template.md create mode 100644 help/cli-commands/cos-target.md create mode 100644 help/cli-commands/cos.md diff --git a/help/cli-commands/README.md b/help/cli-commands/README.md index f91d8ddd23..013db5f8e4 100644 --- a/help/cli-commands/README.md +++ b/help/cli-commands/README.md @@ -52,11 +52,11 @@ The `snyk code test` command finds security issues using Static Code Analysis. The `snyk secrets test` command scans text files in a repository for hardcoded secrets. -### [`snyk sbom`](sbom.md) +### [`snyk sbom`](../../snyk-api/reference/sbom.md) Generate or test an SBOM document in ecosystems supported by Snyk. -### [`snyk aibom`](aibom.md) +### [`snyk aibom`](../../snyk-api/reference/aibom.md) Generates an AIBOM for a local software project written in Python, Java, JavaScript, or Go, to understand what AI models, datasets, tools, and so on are used in that project. @@ -64,6 +64,12 @@ Generates an AIBOM for a local software project written in Python, Java, JavaScr Generates an AI-BOM and tests it against your tenant's policies, returning all resulting issues. +### [`snyk cos`](cos.md) + +These commands manage targets, run scans, and review findings for Snyk AI Pentesting, to find security vulnerabilities in your deployed applications. + +**Note:** The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. + ### [`snyk log4shell`](log4shell.md) Find Log4Shell vulnerability. diff --git a/help/cli-commands/code-test.md b/help/cli-commands/code-test.md index 145ec776a9..b767e59792 100644 --- a/help/cli-commands/code-test.md +++ b/help/cli-commands/code-test.md @@ -17,7 +17,7 @@ The `snyk code test` command tests source code for any known security issues (St Possible exit codes and their meaning: **0**: success (scan completed), no vulnerabilities found\ -**1**: action_needed (scan completed), vulnerabilities found\ +**1**: action\_needed (scan completed), vulnerabilities found\ **2**: failure, try to re-run the command. Use `-d` to output the debug logs.\ **3**: failure, no supported projects detected @@ -127,7 +127,7 @@ Example: `$ snyk code test --sarif` ### `--sarif-file-output=` -Save test output in SARIF format directly to the \ file, regardless of whether or not you use the `--sarif` option. +Save test output in SARIF format directly to the \ file, regardless of whether or not you use the `--sarif` option. Use to display the human-readable test output using stdout and, at the same time, save the SARIF format output to a file.\ \ diff --git a/help/cli-commands/container-test.md b/help/cli-commands/container-test.md index db45f5a2b0..bfc61f6469 100644 --- a/help/cli-commands/container-test.md +++ b/help/cli-commands/container-test.md @@ -17,7 +17,7 @@ The `snyk container test` command tests container images for any known vulnerabi Possible exit codes and their meaning: **0**: success (scan completed), no vulnerabilities found\ -**1**: action_needed (scan completed), vulnerabilities found\ +**1**: action\_needed (scan completed), vulnerabilities found\ **2**: failure, try to re-run command. Use `-d` to output the debug logs.\ **3**: failure, no supported projects detected diff --git a/help/cli-commands/cos-finding-list.md b/help/cli-commands/cos-finding-list.md new file mode 100644 index 0000000000..96901bbaeb --- /dev/null +++ b/help/cli-commands/cos-finding-list.md @@ -0,0 +1,112 @@ +--- +description: >- + The snyk cos finding list command that lists the findings for a target or + scan. +--- + +# COS finding list + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos finding list []` + +## Description + +The `snyk cos finding list` command lists the findings for a target or scan. + +Use the `--target-id`, `--scan-id`, `--severity`, or `--state` options to filter the results. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: findings retrieved\ +**3**: failure, target ID or scan ID not found + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--target-id=` + +Specify the target whose findings you want to list. + +Example: + +```bash +$ snyk cos finding list --target-id=92b10f07ec07c7b1b73305181398ccf5 +``` + +### `--scan-id=` + +Scope the findings to the occurrences in a single scan. + +Example: + +```bash +$ snyk cos finding list --scan-id=f3a8c2d1-4b5e-6f7a-8b9c-0d1e2f3a4b5c +``` + +### `--severity=` + +Filter the results by severity. + +Allowed values: `critical`, `high`, `medium`, `low` + +Example: + +```bash +$ snyk cos finding list --target-id=92b10f07ec07c7b1b73305181398ccf5 --severity=critical +``` + +### `--state=` + +Filter the results by lifecycle state. + +Allowed values: `open`, `fixed` + +Example: + +```bash +$ snyk cos finding list --target-id=92b10f07ec07c7b1b73305181398ccf5 --state=open +``` + +### `--limit=` + +Specify the maximum number of findings to return. Set to `0` to return all findings. + +Default: `0` + +Example: + +```bash +$ snyk cos finding list --target-id=92b10f07ec07c7b1b73305181398ccf5 --limit=20 +``` + +### `--output=`, `-o ` + +Specify the output format. + +Allowed values: `table`, `json`, `yaml`, `ids` + +Default: `table` + +Example: + +```bash +$ snyk cos finding list --target-id=92b10f07ec07c7b1b73305181398ccf5 --output=json +``` diff --git a/help/cli-commands/cos-finding-show.md b/help/cli-commands/cos-finding-show.md new file mode 100644 index 0000000000..4d188cf3cd --- /dev/null +++ b/help/cli-commands/cos-finding-show.md @@ -0,0 +1,48 @@ +--- +description: The snyk cos finding show command that shows the details of a finding. +--- + +# COS finding show + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos finding show []` + +## Description + +The `snyk cos finding show` command shows the details of a finding. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: finding retrieved\ +**3**: failure, finding ID not found + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--finding-id=` + +**Required**. Specify the finding whose details you want to show. + +Example: + +```bash +$ snyk cos finding show --finding-id=2394582049 +``` diff --git a/help/cli-commands/cos-finding.md b/help/cli-commands/cos-finding.md new file mode 100644 index 0000000000..b21693bd12 --- /dev/null +++ b/help/cli-commands/cos-finding.md @@ -0,0 +1,34 @@ +--- +description: The snyk cos finding commands for listing and inspecting findings. +--- + +# COS finding + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos finding [] []` + +## Description + +The `snyk cos finding` command lists and inspects the findings discovered during scans. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Commands + +- [`snyk cos finding list`](cos-finding-list.md), `snyk cos finding list --help`: list the findings for a target or scan +- [`snyk cos finding show`](cos-finding-show.md), `snyk cos finding show --help`: show the details of a finding + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. diff --git a/help/cli-commands/cos-scan-cancel.md b/help/cli-commands/cos-scan-cancel.md new file mode 100644 index 0000000000..cceec75570 --- /dev/null +++ b/help/cli-commands/cos-scan-cancel.md @@ -0,0 +1,49 @@ +--- +description: The snyk cos scan cancel command that cancels a running scan. +--- + +# COS scan cancel + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos scan cancel []` + +## Description + +The `snyk cos scan cancel` command cancels a running scan. Findings confirmed before canceling are not preserved. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: scan stopped\ +**2**: failure, no scan is currently running on this target\ +**3**: failure, target or scan ID not found + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--scan-id=` + +**Required**. Specify the scan to cancel. The `` must be a valid scan ID. + +Example: + +```bash +$ snyk cos scan cancel --scan-id=92b10f07ec07c7b1b73305181398ccf5 +``` diff --git a/help/cli-commands/cos-scan-list.md b/help/cli-commands/cos-scan-list.md new file mode 100644 index 0000000000..1d4234841a --- /dev/null +++ b/help/cli-commands/cos-scan-list.md @@ -0,0 +1,98 @@ +--- +description: The snyk cos scan list command that lists scans and their statuses. +--- + +# COS scan list + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos scan list []` + +## Description + +The `snyk cos scan list` command lists scans and their statuses. + +Use the `--target-id`, `--status`, or `--since` options to filter the results. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: scans retrieved\ +**3**: failure, target ID not found + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--target-id=` + +Filter the results for a single target. + +Example: + +```bash +$ snyk cos scan list --target-id=92b10f07ec07c7b1b73305181398ccf5 +``` + +### `--status=` + +Filter the results by scan status. + +Allowed values: `queued`, `running`, `completed`, `failed`, `canceled` + +Example: + +```bash +$ snyk cos scan list --status=completed +``` + +### `--since=` + +Return only the scans created within this window. Use the format ``, where unit is `m` (minutes), `h` (hours), or `d` (days), for example, `30m`, `24h`, or `7d`. + +Example: + +```bash +$ snyk cos scan list --since=24h +``` + +### `--limit=` + +Specify the maximum number of scans to return. Set to `0` to return all scans. + +Default: `0` + +Example: + +```bash +$ snyk cos scan list --limit=10 +``` + +### `--output=`, `-o ` + +Specify the output format. + +Allowed values: `table`, `json`, `yaml`, `ids` + +Default: `table` + +Example: + +```bash +$ snyk cos scan list --output=json +``` diff --git a/help/cli-commands/cos-scan-report.md b/help/cli-commands/cos-scan-report.md new file mode 100644 index 0000000000..81218956f5 --- /dev/null +++ b/help/cli-commands/cos-scan-report.md @@ -0,0 +1,73 @@ +--- +description: The snyk cos scan report command that returns the report for a completed scan. +--- + +# COS scan report + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos scan report []` + +## Description + +The `snyk cos scan report` command returns the report for a completed scan. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: report downloaded\ +**2**: failure, report generation failed\ +**3**: failure, scan ID not found + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--scan-id=` + +**Required**. Specify the scan whose report you want to return. + +Example: + +```bash +$ snyk cos scan report --scan-id=92b10f07ec07c7b1b73305181398ccf5 +``` + +### `--format=` + +Specify the report format. + +Allowed values: `json`, `pdf` + +Default: `json` + +Example: + +```bash +$ snyk cos scan report --scan-id=92b10f07ec07c7b1b73305181398ccf5 --format=pdf +``` + +### `--output-file=` + +Write the report to the specified file path. + +Example: + +```bash +$ snyk cos scan report --scan-id=92b10f07ec07c7b1b73305181398ccf5 --output-file=./report.json +``` diff --git a/help/cli-commands/cos-scan-start.md b/help/cli-commands/cos-scan-start.md new file mode 100644 index 0000000000..9eb1cb2bf9 --- /dev/null +++ b/help/cli-commands/cos-scan-start.md @@ -0,0 +1,105 @@ +--- +description: The snyk cos scan start command that starts a new scan on a target. +--- + +# COS scan start + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos scan start []` + +## Description + +The `snyk cos scan start` command starts a new scan on a target. By default, the command returns immediately after starting the scan. + +Use the `--wait` option to block until the scan finishes and print the report. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: scan started\ +**2**: failure, the target already has a running scan, the target is unreachable, or authentication failed\ +**3**: failure, target ID not found + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--target-id=` + +**Required**. Specify the target to scan. The `` must be a valid target ID. + +Example: + +```bash +$ snyk cos scan start --target-id=92b10f07ec07c7b1b73305181398ccf5 +``` + +### `--wait` + +Wait for the scan to complete and print the report. When set, the command blocks until the scan finishes or the `--timeout` value is reached. + +Example: + +```bash +$ snyk cos scan start --target-id=92b10f07ec07c7b1b73305181398ccf5 --wait +``` + +### `--timeout=` + +Specify the maximum time to wait when `--wait` is set. Use the format ``, where unit is `s` (seconds), `m` (minutes), or `h` (hours), for example, `30s`, `5m`, or `1h`. + +Default: `30m` + +Example: + +```bash +$ snyk cos scan start --target-id=92b10f07ec07c7b1b73305181398ccf5 --wait --timeout=60m +``` + +### `--interval=` + +Specify the polling interval when `--wait` is set. Use the format ``, where unit is `s` (seconds), `m` (minutes), or `h` (hours), for example, `30s`, `5m`, or `1h`. + +Default: `5s` + +Example: + +```bash +$ snyk cos scan start --target-id=92b10f07ec07c7b1b73305181398ccf5 --wait --interval=10s +``` + +### `--json` + +Print the report on the console as a JSON data structure. Requires `--wait`. + +Example: + +```bash +$ snyk cos scan start --target-id=92b10f07ec07c7b1b73305181398ccf5 --wait --json +``` + +### `--output-file=` + +Write the JSON report to the specified file path. Requires `--wait` and `--json`. + +Example: + +```bash +$ snyk cos scan start --target-id=92b10f07ec07c7b1b73305181398ccf5 --wait --json --output-file=./report.json +``` diff --git a/help/cli-commands/cos-scan-status.md b/help/cli-commands/cos-scan-status.md new file mode 100644 index 0000000000..36468d93be --- /dev/null +++ b/help/cli-commands/cos-scan-status.md @@ -0,0 +1,72 @@ +--- +description: The snyk cos scan status command that shows the current status of a scan. +--- + +# COS scan status + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos scan status []` + +## Description + +The `snyk cos scan status` command shows the current status of a scan. + +Use the `--watch` option to poll until the scan reaches a terminal state. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: status retrieved\ +**3**: failure, target ID not found or no scan exists for this target + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--scan-id=` + +**Required**. Specify the scan whose status you want to retrieve. The `` must be a valid scan ID. + +Example: + +```bash +$ snyk cos scan status --scan-id=92b10f07ec07c7b1b73305181398ccf5 +``` + +### `--watch` + +Poll until the scan reaches a terminal state. + +Allowed values: `queued`, `completed`, `failed`, `canceled` + +Example: + +```bash +$ snyk cos scan status --scan-id=92b10f07ec07c7b1b73305181398ccf5 --watch +``` + +### `--json` + +Print results on the console as a JSON data structure. + +Example: + +```bash +$ snyk cos scan status --scan-id=92b10f07ec07c7b1b73305181398ccf5 --json +``` diff --git a/help/cli-commands/cos-scan.md b/help/cli-commands/cos-scan.md new file mode 100644 index 0000000000..e3712a5c07 --- /dev/null +++ b/help/cli-commands/cos-scan.md @@ -0,0 +1,39 @@ +--- +description: The snyk cos scan commands for scanning applications for security issues. +--- + +# COS scan + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos scan [] []` + +## Description + +The `snyk cos scan` command scans your applications for security issues. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Commands + +- [`snyk cos scan start`](cos-scan-start.md), `snyk cos scan start --help`: start a new scan on a target +- [`snyk cos scan status`](cos-scan-status.md), `snyk cos scan status --help`: show the current status of a scan +- [`snyk cos scan report`](cos-scan-report.md), `snyk cos scan report --help`: return the report for a completed scan +- [`snyk cos scan list`](cos-scan-list.md), `snyk cos scan list --help`: list scans and their statuses +- [`snyk cos scan cancel`](cos-scan-cancel.md), `snyk cos scan cancel --help`: cancel a running scan + +Before you can run a scan, you must create a target. For more information, see [COS target](cos-target.md) + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. diff --git a/help/cli-commands/cos-target-add.md b/help/cli-commands/cos-target-add.md new file mode 100644 index 0000000000..40f4262c05 --- /dev/null +++ b/help/cli-commands/cos-target-add.md @@ -0,0 +1,53 @@ +--- +description: >- + The snyk cos target add command that creates a target from a configuration + file. +--- + +# COS target add + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos target add []` + +## Description + +The `snyk cos target add` command creates a target from a YAML configuration file. + +For a sample configuration file you can copy and adapt, see [COS target template](cos-target-template.md) + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: target created successfully\ +**2**: failure, primary URL unreachable\ +**3**: failure, configuration file not found + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--config=` + +**Required**. Specify the path to the target YAML configuration file. + +Example: + +```bash +$ snyk cos target add --config=acme.yaml +``` diff --git a/help/cli-commands/cos-target-dump.md b/help/cli-commands/cos-target-dump.md new file mode 100644 index 0000000000..da41271215 --- /dev/null +++ b/help/cli-commands/cos-target-dump.md @@ -0,0 +1,60 @@ +--- +description: The snyk cos target dump command that exports a target as YAML. +--- + +# COS target dump + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos target dump []` + +## Description + +The `snyk cos target dump` command exports a target as apply-compatible YAML. + +Use this command to capture the configuration of an existing target, then reuse the exported file with [`snyk cos target add`](cos-target-add.md) to recreate the target. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: configuration file created successfully\ +**3**: failure, target ID not found + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--target-id=` + +**Required**. Specify the ID of the target. + +Example: + +```bash +$ snyk cos target dump --target-id=92b10f07ec07c7b1b73305181398ccf5 +``` + +### `--output-file=` + +Write the YAML to the specified file. + +Example: + +```bash +$ snyk cos target dump --target-id=92b10f07ec07c7b1b73305181398ccf5 --output-file=output.yaml +``` diff --git a/help/cli-commands/cos-target-list.md b/help/cli-commands/cos-target-list.md new file mode 100644 index 0000000000..39ac572e32 --- /dev/null +++ b/help/cli-commands/cos-target-list.md @@ -0,0 +1,52 @@ +--- +description: The snyk cos target list command that lists all targets. +--- + +# COS target list + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos target list []` + +## Description + +The `snyk cos target list` command lists all targets. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: success, targets retrieved\ +**3**: failure, invalid arguments + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--output=`, `-o ` + +Specify the output format. + +Allowed values: `table`, `json`, `yaml`, `ids` + +Default: `table` + +Example: + +```bash +$ snyk cos target list --output=json +``` diff --git a/help/cli-commands/cos-target-show.md b/help/cli-commands/cos-target-show.md new file mode 100644 index 0000000000..2e0292ad6c --- /dev/null +++ b/help/cli-commands/cos-target-show.md @@ -0,0 +1,62 @@ +--- +description: The snyk cos target show command that shows the details of a target. +--- + +# COS target show + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos target show []` + +## Description + +The `snyk cos target show` command shows the details of a target. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Exit codes + +Possible exit codes and their meaning: + +**0**: success, target details retrieved\ +**3**: failure, target ID not found + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. + +## Options + +### `--target-id=` + +**Required**. Specify the ID of the target. + +Example: + +```bash +$ snyk cos target show --target-id=92b10f07ec07c7b1b73305181398ccf5 +``` + +### `--output=`, `-o ` + +Specify the output format. + +Allowed values: `table`, `json`, `yaml`, `ids` + +Default: `table` + +Example: + +```bash +$ snyk cos target show --target-id=92b10f07ec07c7b1b73305181398ccf5 --output=json +``` diff --git a/help/cli-commands/cos-target-template.md b/help/cli-commands/cos-target-template.md new file mode 100644 index 0000000000..bf47195db2 --- /dev/null +++ b/help/cli-commands/cos-target-template.md @@ -0,0 +1,97 @@ +--- +description: A sample target configuration file for the snyk cos target add command. +--- + +# COS target template + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Description + +Use this sample template file with the [`snyk cos target add`](cos-target-add.md) command. + +The configuration file has three sections: + +- `target`: the name of the application, its primary URL, and the hosts to include in or exclude from the scope. +- `authentication`: the login URL and one entry for each user role the scan should test. +- `settings`: the headers and cookies to inject into every request, and free-form guidance for the agent. + +{% hint style="warning" %} +The configuration file can contain credentials and other secrets. Mark every secret value with `sensitive: true` and store the file securely. +{% endhint %} + +## Example + +```yaml +# Target configuration +# ── Target ───────────────────────────────────────────────────────── +target: + name: 'Customer Portal' # Display name — required + url: 'https://app.acme.com' # Primary URL — required + additional_scope: # Optional — domains, subdomains. *.acme.io or **acme.io + - host: 'api.acme.com' + + reject: # Optional — domains, subdomains. *.acme.io or **acme.io + - 'admin.acme.io' + +# ── Authentication ────────────────────────────────────────────────── +authentication: + login_url: 'https://app.acme.com/login' # Optional — auto-detected if omitted + users: # Optional — one entry per role + - label: 'Standard user' + type: credentials_login # credentials_login | custom + credentials: + - key: username + value: 'testuser@acme.com' + - key: password + value: 'password' + sensitive: true + instructions: | # Optional — login hints for the agent + Accept the cookie banner on first visit. Select the EU region if prompted. + - label: 'Admin user' + type: credentials_login + credentials: + - key: username + value: 'admin@acme.com' + - key: password + value: 'password' + sensitive: true + - key: api_key + value: 'sk-acme-prod-abc123' + sensitive: true + - label: 'User with MFA' + type: credentials_login + credentials: + - key: username + value: 'user@acme.com' + - key: password + value: 'password' + sensitive: true + totp_secret: 'JBSWY3DPEHPK3PXP' + - label: 'SSO user' + type: custom + instructions: | + Navigate to /login, click "Sign in with SSO", enter the email in #sso-email, + click Continue, complete the IdP login, then accept the MFA push notification. + +# ── Other settings ────────────────────────────────────────────────── +settings: + headers: # Optional — injected into every request + - key: X-Bug-Bounty + value: 'snyk-evo-prod' + - key: X-Internal-Token + value: 'abc123' + sensitive: true + cookies: # Optional — injected as Cookie header + - key: consent + value: 'accepted' + - key: session_hint + value: 'eu-west' + context: | # Optional — free-form agent guidance + All data is EU-resident. Session tokens expire after 30 minutes. + Do not create real payment transactions — use amounts under €0.01 for test flows. +``` diff --git a/help/cli-commands/cos-target.md b/help/cli-commands/cos-target.md new file mode 100644 index 0000000000..f1e5405624 --- /dev/null +++ b/help/cli-commands/cos-target.md @@ -0,0 +1,38 @@ +--- +description: The snyk cos target commands for creating, inspecting, and exporting targets. +--- + +# COS target + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Usage + +`snyk cos target [] []` + +## Description + +The `snyk cos target` command creates, inspects, and exports targets. Targets represent the applications you want to scan. + +For a list of related commands see the [snyk cos](cos.md) help, `snyk cos --help`. + +## Commands + +- [`snyk cos target add`](cos-target-add.md), `snyk cos target add --help`: create a target from a configuration file +- [`snyk cos target list`](cos-target-list.md), `snyk cos target list --help`: list all targets +- [`snyk cos target show`](cos-target-show.md), `snyk cos target show --help`: show the details of a target +- [`snyk cos target dump`](cos-target-dump.md), `snyk cos target dump --help`: export a target as YAML + +For a sample configuration file to use with `snyk cos target add`, see [COS target template](cos-target-template.md) + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. diff --git a/help/cli-commands/cos.md b/help/cli-commands/cos.md new file mode 100644 index 0000000000..6d99bf5cee --- /dev/null +++ b/help/cli-commands/cos.md @@ -0,0 +1,42 @@ +--- +description: >- + The snyk cos commands for finding security vulnerabilities with Snyk + Continuous Offensive Security (COS). +--- + +# COS + +{% hint style="info" %} +**Release status** + +The `snyk cos` command set is in Closed Beta and is available only for Enterprise plans. If you want to set it up in your Group or Organization, contact your Snyk account team. +{% endhint %} + +## Prerequisites + +- A Snyk account with the Continuous Offensive Security (COS) entitlement. +- Authenticate to use the CLI. For more information, see [Authenticate to use the CLI](https://docs.snyk.io/developer-tools/snyk-cli/authenticate-to-use-the-cli). + +## Usage + +`snyk cos [] []` + +## Description + +The `snyk cos` command is a CLI client for Snyk AI Pentesting that finds security vulnerabilities in your deployed applications. + +Use the `snyk cos` subcommands to define the applications you want to test, run scans against them, and review the findings the scans produce. + +## Commands + +- [`snyk cos target`](cos-target.md), `snyk cos target --help`: manage your targets +- [`snyk cos scan`](cos-scan.md), `snyk cos scan --help`: scan your applications for security issues +- [`snyk cos finding`](cos-finding.md), `snyk cos finding --help`: manage your findings + +## Configure the Snyk CLI + +You can use environment variables to configure the Snyk CLI and set variables for connecting with the Snyk API. For more information see [Configure the Snyk CLI](https://docs.snyk.io/snyk-cli/configure-the-snyk-cli). + +## Debug + +Use the `-d` option to output the debug logs. diff --git a/help/cli-commands/iac-test.md b/help/cli-commands/iac-test.md index f2d732f0ef..bb8350bba9 100644 --- a/help/cli-commands/iac-test.md +++ b/help/cli-commands/iac-test.md @@ -21,7 +21,7 @@ For more information see [Snyk CLI for IaC](https://docs.snyk.io/snyk-cli/scan-a Possible exit codes and their meaning: **0**: success (scan completed), no vulnerabilities found\ -**1**: action_needed (scan completed), vulnerabilities found\ +**1**: action\_needed (scan completed), vulnerabilities found\ **2**: failure, try to re-run the command. Use `-d` to output the debug logs.\ **3**: failure, no supported projects detected @@ -89,7 +89,7 @@ Return results in SARIF format. ### `--sarif-file-output=` -Save test output in SARIF format directly to the \ file, regardless of whether or not you use the `--sarif` option. +Save test output in SARIF format directly to the \ file, regardless of whether or not you use the `--sarif` option. This is especially useful if you want to display the human-readable test output using stdout and at the same time save the SARIF format output to a file. diff --git a/help/cli-commands/ignore.md b/help/cli-commands/ignore.md index 04ae451e67..3422e3d248 100644 --- a/help/cli-commands/ignore.md +++ b/help/cli-commands/ignore.md @@ -150,7 +150,7 @@ $ snyk ignore --id='SNYK-JS-PATHPARSE-1077067' --expiry='2021-01-10' --path='nyc In this example, `snyk iac test` on Windows returned a Path containing single quotes and a File specification containing back slashes: Rule: [https://security.snyk.io/rules/cloud/SNYK-CC-TF-118](https://security.snyk.io/rules/cloud/SNYK-CC-TF-118)\ -Path: resource > aws_iam_role\[OrganizationAccountAccessRole] > assume_role_policy\['Statement']\[0]\ +Path: resource > aws\_iam\_role\[OrganizationAccountAccessRole] > assume\_role\_policy\['Statement']\[0]\ File: terraform\environment\com\iam.tf The corresponding `snyk ignore` command would be: @@ -164,7 +164,7 @@ $ snyk ignore --id=SNYK-CC-TF-118 --path="terraform\environment\com\iam.tf > res In this example, `snyk iac test` on Linux or Mac OS returned a Path containing single quotes and a File specification containing forward slashes: Rule: [https://security.snyk.io/rules/cloud/SNYK-CC-TF-118](https://security.snyk.io/rules/cloud/SNYK-CC-TF-118)\ -Path: resource > aws_iam_role\[OrganizationAccountAccessRole] > assume_role_policy\['Statement']\[0]\ +Path: resource > aws\_iam\_role\[OrganizationAccountAccessRole] > assume\_role\_policy\['Statement']\[0]\ File: terraform/environment/com/iam.tf The corresponding `snyk ignore` command would be: diff --git a/help/cli-commands/log4shell.md b/help/cli-commands/log4shell.md index 70d9b0c4af..dab563bf86 100644 --- a/help/cli-commands/log4shell.md +++ b/help/cli-commands/log4shell.md @@ -27,7 +27,7 @@ See the Maven options section of the [test command help](test.md); `snyk test -- Possible exit codes and their meaning: **0**: success (scan completed), Log4Shell not found\ -**1**: action_needed (scan completed), Log4Shell found\ +**1**: action\_needed (scan completed), Log4Shell found\ **2**: failure, try to re-run the command. Use `-d` to output the debug logs. ## Debug diff --git a/help/cli-commands/sbom-test.md b/help/cli-commands/sbom-test.md index 1cc03518f6..16f9a83373 100644 --- a/help/cli-commands/sbom-test.md +++ b/help/cli-commands/sbom-test.md @@ -19,7 +19,7 @@ The `snyk sbom test` command checks SBOM files for vulnerabilities in open-sourc Possible exit codes and their meaning: **0**: success (scan completed), no vulnerabilities found\ -**1**: action_needed (scan completed), vulnerabilities found\ +**1**: action\_needed (scan completed), vulnerabilities found\ **2**: failure, try to re-run the command ## Configure the Snyk CLI diff --git a/help/cli-commands/test.md b/help/cli-commands/test.md index 36ba9447f9..978e47a320 100644 --- a/help/cli-commands/test.md +++ b/help/cli-commands/test.md @@ -19,7 +19,7 @@ The `snyk test` command checks projects for open-source vulnerabilities and lice Possible exit codes and their meaning: **0**: success (scan completed), no vulnerabilities found\ -**1**: action_needed (scan completed), vulnerabilities found\ +**1**: action\_needed (scan completed), vulnerabilities found\ **2**: failure, try to re-run the command. Use `-d` to output the debug logs.\ **3**: failure, no supported projects detected @@ -214,7 +214,7 @@ Return results in SARIF format. ### `--sarif-file-output=` -Save test output in SARIF format directly to the \ file, regardless of whether or not you use the `--sarif` option. +Save test output in SARIF format directly to the \ file, regardless of whether or not you use the `--sarif` option. This is especially useful if you want to display the human-readable test output using stdout and at the same time save the SARIF format output to a file.