Skip to content

Commit

Permalink
docs: synchronizing help from snyk/user-docs (#5212)
Browse files Browse the repository at this point in the history
Co-authored-by: Avishagp <[email protected]>
  • Loading branch information
github-actions[bot] and Avishagp authored May 27, 2024
1 parent 844f1b2 commit f0c18be
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 11 deletions.
8 changes: 8 additions & 0 deletions help/cli-commands/code-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,11 @@ Use to display the human-readable test output using stdout and, at the same time
Report only vulnerabilities at the specified level or higher.

**Note**: The Snyk Code configuration issues do not use the `critical` severity level.

### `--include-ignores`

Include ignored vulnerabilities in the results.

**Note**: This option is available if you are an Enterprise customer and in the Consistent Ignores Closed Beta.

Issues will appear in a separate section of the test results.
2 changes: 1 addition & 1 deletion help/cli-commands/iac-capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Description

The `snyk iac capture` command generates a mapping artifact that contains the minimum amount of information needed to generate, from Terraform state files, resource mappings from code to Cloud, such as resource IDs and names, and sends the mapping artifact to Snyk.
The `snyk iac capture` command generates a mapping artifact that contains the minimum amount of information needed to generate resource mappings from code to Cloud from Terraform state files, such as resource IDs and names, and sends the mapping artifact to Snyk.

Snyk uses this information to link Cloud issues to their originating IaC files. The links can be viewed in the Snyk Web UI.

Expand Down
22 changes: 22 additions & 0 deletions help/cli-commands/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ For Gradle "multi project" configurations, monitor a specific sub-project.

For "multi project" configurations, monitor all sub-projects.

Both a build.gradle file and a settings.gradle file, or equivalent files, based on the package manager, must exist in the current directory.

### `--configuration-matching=<CONFIGURATION_REGEX>`

Resolve dependencies using only configuration(s) that match the specified Java regular expression.
Expand Down Expand Up @@ -295,6 +297,26 @@ Example: `snyk monitor --file=my-project.sln --project-name-prefix=my-group/`

This is useful when you have multiple projects with the same name in other `.sln` files.

## Options for .NET projects

### `--dotnet-runtime-resolution`

**Note:** This option in in Early Access and may change until it is released.

Required. You must use this option when you test .NET projects using [Runtime Resolution Scanning](https://docs.snyk.io/getting-started/supported-languages-and-frameworks/.net/improved-.net-scanning)

Example: `snyk test --dotnet-runtime-resolution`

### `--dotnet-target-framework`

**Note:** This option in in Early Access and may change until it is released.

Optional. You may use this option if your solution contains multiple `<TargetFramework>` directives. If you do not specify the option `--dotnet-target-framework`, all supported Target Frameworks will be scanned.

The Target Framework specified with this option should be defined following the standard [naming convention](https://learn.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks)

Example: `snyk test --dotnet-runtime-resolution --dotnet-target-framework=net6.0`

## Options for npm projects

**Note**: You can use the following options with npm projects:
Expand Down
10 changes: 5 additions & 5 deletions help/cli-commands/sbom.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The `snyk sbom` feature requires an internet connection.

## Usage

`$ snyk sbom --format=<cyclonedx1.4+json|cyclonedx1.4+xml|cyclonedx1.5+json|cyclonedx1.5+xml|spdx2.3+json> [--file=<FILE>] [--unmanaged] [--org=<ORG_ID>] [--dev] [--all-projects] [--name=<NAME>] [--version=<VERSION>] [--exclude=<NAME>[,<NAME>...]] [--detection-depth=<DEPTH>] [--prune-repeated-subdependencies|-p] [--maven-aggregate-project] [--scan-unmanaged] [--scan-all-unmanaged] [--sub-project=<NAME>] [--gradle-sub-project=<NAME>] [--all-sub-projects] [--configuration-matching=<CONFIGURATION_REGEX>] [--configuration-attributes=<ATTRIBUTE>[,<ATTRIBUTE>]] [--init-script=<FILE>] [--json-file-output=<OUTPUT_FILE_PATH>] [<TARGET_DIRECTORY>]`
`$ snyk sbom --format=<cyclonedx1.4+json|cyclonedx1.4+xml|cyclonedx1.5+json|cyclonedx1.5+xml|spdx2.3+json> [--org=<ORG_ID>] [--file=<FILE>] [--unmanaged] [--dev] [--all-projects] [--name=<NAME>] [--version=<VERSION>] [--exclude=<NAME>[,<NAME>...]] [--detection-depth=<DEPTH>] [--prune-repeated-subdependencies|-p] [--maven-aggregate-project] [--scan-unmanaged] [--scan-all-unmanaged] [--sub-project=<NAME>] [--gradle-sub-project=<NAME>] [--all-sub-projects] [--configuration-matching=<CONFIGURATION_REGEX>] [--configuration-attributes=<ATTRIBUTE>[,<ATTRIBUTE>]] [--init-script=<FILE>] [--json-file-output=<OUTPUT_FILE_PATH>] [<TARGET_DIRECTORY>]`

## Description

Expand Down Expand Up @@ -120,14 +120,14 @@ Default: 4

Prune dependency trees, removing duplicate sub-dependencies.

### `[<TARGET_DIRECTORY>]`

Optional. Instruct the CLI to autodetect a package manager manifest file to use within the specified directory. If `--file` is set, this option will be ignored.

### `[--json-file-output]`

Optional. Save the SBOM output as a JSON data structure directly to the specified file. This requires the SBOM `--format` to include `+json`.

### `[<TARGET_DIRECTORY>]`

Optional. Instruct the CLI to autodetect a package manager manifest file to use within the specified directory. If `--file` is set, this option will be ignored.

## Options for Maven projects

### `--maven-aggregate-project`
Expand Down
32 changes: 27 additions & 5 deletions help/cli-commands/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,17 @@ Auto-detect Maven, JAR, WAR, and AAR files recursively from the current folder.&

## Options for Gradle projects

**Note:** If you see the invalid string length error, refer to I[nvalid string length error when scanning projects](https://docs.snyk.io/snyk-cli/scan-and-maintain-projects-using-the-cli/invalid-string-length-error-when-scanning-projects)
**Note:** If you see the invalid string length error, refer to [Invalid string length error when scanning projects](https://docs.snyk.io/snyk-cli/scan-and-maintain-projects-using-the-cli/invalid-string-length-error-when-scanning-projects)

### `--sub-project=<NAME>`, `--gradle-sub-project=<NAME>`

For Gradle multi project configurations, test a specific sub-project.

### `--all-sub-projects`

For multi project configurations, test all sub-projects.
For multi project configurations, test all sub-projects. \
\
Both a build.gradle file and a settings.gradle file, or equivalent files, based on the package manager, must exist in the current directory.&#x20;

### `--all-projects`

Expand Down Expand Up @@ -326,6 +328,26 @@ Example: `snyk monitor --file=my-project.sln --project-name-prefix=my-group/`

This is useful when you have multiple projects with the same name in other `.sln` files.

## Options for .NET projects

### `--dotnet-runtime-resolution`

**Note:** This option in in Early Access and may change until it is released.

Required. You must use this option when you test .NET projects using [Runtime Resolution Scanning](https://docs.snyk.io/getting-started/supported-languages-and-frameworks/.net/improved-.net-scanning)

Example: `snyk test --dotnet-runtime-resolution`

### `--dotnet-target-framework`

**Note:** This option in in Early Access and may change until it is released.

Optional. You may use this option if your solution contains multiple `<TargetFramework>` directives. If you do not specify the option `--dotnet-target-framework`, all supported Target Frameworks will be scanned.

The Target Framework specified with this option should be defined following the standard [naming convention](https://learn.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks)

Example: `snyk test --dotnet-runtime-resolution --dotnet-target-framework=net6.0`

## Options for npm projects

**Note**: You can use the following options with npm projects:
Expand Down Expand Up @@ -392,7 +414,7 @@ Snyk uses Python in order to scan and find your dependencies. If you are using m

Default: `python` This executes your default python version. Run `python -V` to find out what your default version is.

Example: `snyk test--command=python3`
Example: `snyk test --command=python3`

### `--skip-unresolved=true|false`

Expand All @@ -418,7 +440,7 @@ For complete information about the command see [`--package-manager=<PACKAGE_MANA

## Options for Go projects

Currently the following options are not supported:
The following options are not supported:

`--fail-on=<all|upgradable|patchable>`

Expand Down Expand Up @@ -458,7 +480,7 @@ To see how confident Snyk is about the identified dependency and its version, us

### `-- [<CONTEXT-SPECIFIC_OPTIONS>]`

Use a double dash (`--`) after the complete Snyk command to pass additional options (arguments, flags) that follow directly to the build tool, for example Gradle or Maven.
Use a double dash (`--`) after the complete Snyk command to pass additional options (arguments, flags) that follow directly to the build tool, for example, Gradle or Maven.

The format is `snyk <command> -- [<context-specific_options>]`

Expand Down

0 comments on commit f0c18be

Please sign in to comment.