Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions help/cli-commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,24 @@ 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.

### [`snyk aibom test`](aibom-test.md)

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.
Expand Down
4 changes: 2 additions & 2 deletions help/cli-commands/code-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -127,7 +127,7 @@ Example: `$ snyk code test --sarif`

### `--sarif-file-output=<OUTPUT_FILE_PATH>`

Save test output in SARIF format directly to the \<OUTPUT_FILE_PATH> file, regardless of whether or not you use the `--sarif` option.
Save test output in SARIF format directly to the \<OUTPUT\_FILE\_PATH> 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.\
\
Expand Down
2 changes: 1 addition & 1 deletion help/cli-commands/container-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
112 changes: 112 additions & 0 deletions help/cli-commands/cos-finding-list.md
Original file line number Diff line number Diff line change
@@ -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 [<OPTIONS>]`

## 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=<TARGET_ID>`

Specify the target whose findings you want to list.

Example:

```bash
$ snyk cos finding list --target-id=92b10f07ec07c7b1b73305181398ccf5
```

### `--scan-id=<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=<SEVERITY>`

Filter the results by severity.

Allowed values: `critical`, `high`, `medium`, `low`

Example:

```bash
$ snyk cos finding list --target-id=92b10f07ec07c7b1b73305181398ccf5 --severity=critical
```

### `--state=<STATE>`

Filter the results by lifecycle state.

Allowed values: `open`, `fixed`

Example:

```bash
$ snyk cos finding list --target-id=92b10f07ec07c7b1b73305181398ccf5 --state=open
```

### `--limit=<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=<FORMAT>`, `-o <FORMAT>`

Specify the output format.

Allowed values: `table`, `json`, `yaml`, `ids`

Default: `table`

Example:

```bash
$ snyk cos finding list --target-id=92b10f07ec07c7b1b73305181398ccf5 --output=json
```
48 changes: 48 additions & 0 deletions help/cli-commands/cos-finding-show.md
Original file line number Diff line number Diff line change
@@ -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 [<OPTIONS>]`

## 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=<FINDING_ID>`

**Required**. Specify the finding whose details you want to show.

Example:

```bash
$ snyk cos finding show --finding-id=2394582049
```
34 changes: 34 additions & 0 deletions help/cli-commands/cos-finding.md
Original file line number Diff line number Diff line change
@@ -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 [<COMMAND>] [<OPTIONS>]`

## 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.
49 changes: 49 additions & 0 deletions help/cli-commands/cos-scan-cancel.md
Original file line number Diff line number Diff line change
@@ -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 [<OPTIONS>]`

## 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=<SCAN_ID>`

**Required**. Specify the scan to cancel. The `<SCAN_ID>` must be a valid scan ID.

Example:

```bash
$ snyk cos scan cancel --scan-id=92b10f07ec07c7b1b73305181398ccf5
```
98 changes: 98 additions & 0 deletions help/cli-commands/cos-scan-list.md
Original file line number Diff line number Diff line change
@@ -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 [<OPTIONS>]`

## 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=<TARGET_ID>`

Filter the results for a single target.

Example:

```bash
$ snyk cos scan list --target-id=92b10f07ec07c7b1b73305181398ccf5
```

### `--status=<STATE>`

Filter the results by scan status.

Allowed values: `queued`, `running`, `completed`, `failed`, `canceled`

Example:

```bash
$ snyk cos scan list --status=completed
```

### `--since=<DURATION>`

Return only the scans created within this window. Use the format `<VALUE><UNIT>`, 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=<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=<FORMAT>`, `-o <FORMAT>`

Specify the output format.

Allowed values: `table`, `json`, `yaml`, `ids`

Default: `table`

Example:

```bash
$ snyk cos scan list --output=json
```
Loading
Loading