Skip to content

Commit 0d2cc74

Browse files
committed
adds documentation about unauthenticated scanning
1 parent db49340 commit 0d2cc74

File tree

9 files changed

+209
-72
lines changed

9 files changed

+209
-72
lines changed

src/pages/how-to-guides/scanning/scan-dependencies.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,26 @@ The output shows each affected library with its vulnerabilities, the contextual
100100

101101
**Verify it worked:** Navigate to your repository in DevGuard. You'll see detected vulnerabilities listed with severity scores, affected components, and fix recommendations. Learn more about [vulnerability types](/explanations/core-concepts/vulnerability-types) and the [vulnerability lifecycle](/explanations/vulnerability-management/vulnerability-lifecycle).
102102

103+
## Scan Without Authentication
104+
105+
You can run the scanner without a token or asset name to get vulnerability results without saving them to DevGuard. This is useful for a quick local scan or for trying out the scanner.
106+
107+
```bash copy
108+
docker run -v "$(PWD):/dev/app" ghcr.io/l3montree-dev/devguard/scanner:main-latest \
109+
devguard-scanner sca \
110+
--path /dev/app/
111+
```
112+
113+
When no `--token` and `--assetName` are provided, the scanner will print a warning and return the vulnerability results without persisting them:
114+
115+
```
116+
Warning: You are scanning without saving the results. Provide --token and --assetName to save results to DevGuard.
117+
```
118+
119+
<Callout type="info">
120+
Unauthenticated scans check your dependencies against the vulnerability database and show results in the terminal, but findings are not tracked in DevGuard and will not appear in your repository's vulnerability dashboard.
121+
</Callout>
122+
103123
## CI/CD Integration
104124

105125
For automated dependency scanning in CI/CD pipelines, DevGuard provides ready-to-use integrations:

src/pages/how-to-guides/scanning/upload-sbom.mdx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,47 @@ docker run -v "$(PWD):/dev/app" ghcr.io/l3montree-dev/devguard/scanner:main-late
4949

5050
**Verify it worked:** Navigate to your repository in DevGuard. You'll see detected vulnerabilities listed with affected components and fix recommendations.
5151

52+
## Scan Without Authentication
53+
54+
You can upload an SBOM and scan it without a token or asset name to get vulnerability results without saving them to DevGuard.
55+
56+
```bash copy
57+
docker run -v "$(PWD):/dev/app" ghcr.io/l3montree-dev/devguard/scanner:main-latest \
58+
devguard-scanner sbom /dev/app/sbom.json
59+
```
60+
61+
When no `--token` and `--assetName` are provided, the scanner will print a warning and return results without persisting them:
62+
63+
```
64+
Warning: You are scanning without saving the results. Provide --token and --assetName to save results to DevGuard.
65+
```
66+
67+
<Callout type="info">
68+
Unauthenticated scans check your SBOM against the vulnerability database and show results in the terminal, but findings are not tracked in DevGuard and will not appear in your repository's vulnerability dashboard.
69+
</Callout>
70+
71+
## Merge and Scan Multiple SBOMs
72+
73+
Use `merge-sboms` to combine multiple CycloneDX SBOMs and pipe the result directly into the `sbom` command for scanning. Pass `-` as the file argument to read from stdin:
74+
75+
```bash copy
76+
devguard-scanner merge-sboms config.json | devguard-scanner sbom -
77+
```
78+
79+
The merge config file specifies the target purl and the list of SBOM files to merge:
80+
81+
```json
82+
{ "purl": "pkg:foo/[email protected]", "sboms": ["a.json", "b.json"] }
83+
```
84+
85+
To save the merged scan results to DevGuard, add authentication flags:
86+
87+
```bash copy
88+
devguard-scanner merge-sboms config.json | devguard-scanner sbom - \
89+
--assetName="myorg/projects/myproject/assets/myrepo" \
90+
--token="YOUR_TOKEN"
91+
```
92+
5293
## CI/CD Integration
5394
For automated SBOM uploads in CI/CD pipelines, DevGuard provides ready-to-use integrations:
5495
- **GitHub Actions**: See [Scan with GitHub Actions](./scan-with-github-actions) for setup instructions

src/pages/reference/scanner/container-scanning.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,24 @@ devguard-scanner container-scanning [flags]
2929
### Options
3030

3131
```shell
32-
--apiUrl string The url of the API to send the scan request to (default "https://api.devguard.org")
33-
--artifactName string The name of the artifact which was scanned. If not specified, it will default to the empty artifact name ''.
34-
--assetName string The id of the asset which is scanned
35-
--defaultRef string The default git reference to use. This can be a branch, tag, or commit hash. If not specified, it will check, if the current directory is a git repo. If it isn't, --ref will be used.
36-
--failOnCVSS string The risk level to fail the scan on. Can be 'low', 'medium', 'high' or 'critical'. Defaults to 'critical'. (default "critical")
37-
--failOnRisk string The risk level to fail the scan on. Can be 'low', 'medium', 'high' or 'critical'. Defaults to 'critical'. (default "critical")
38-
-h, --help help for container-scanning
39-
--ignoreExternalReferences If an attestation does contain a external reference to an sbom or vex, this will be ignored. Useful when scanning your own image from the registry where your own attestations are attached.
40-
--ignoreUpstreamAttestations Ignores attestations from the scanned container image - if they exists
41-
--image string OCI image reference to scan (e.g. ghcr.io/org/image:tag). If empty, --path or the first argument may be used to provide a tar or local files.
42-
--isTag If the current git reference is a tag. If not specified, it will check if the current directory is a git repo. If it isn't, it will be set to false.
43-
--origin string Origin of the SBOM (how it was generated). Examples: 'source-scanning', 'container-scanning', 'base-image'. Default: 'container-scanning'. (default "DEFAULT")
44-
--path string Path to a tar file or directory containing the container image to scan. If empty, --image must be provided or an argument.
45-
--ref string The git reference to use. This can be a branch, tag, or commit hash. If not specified, it will first check for a git repository in the current directory. If not found, it will just use main.
46-
--timeout int Set the timeout for scanner operations in seconds (default 300)
47-
--token string The personal access token to authenticate the request
48-
--webUI string The url of the web UI to show the scan results in. Defaults to 'https://app.devguard.org'. (default "https://app.devguard.org")
32+
--apiUrl string The url of the API to send the scan request to (default "https://api.devguard.org")
33+
--artifactName string The name of the artifact which was scanned. If not specified, it will default to the empty artifact name ''.
34+
--assetName string The id of the asset which is scanned
35+
--defaultRef string The default git reference to use. This can be a branch, tag, or commit hash. If not specified, it will check, if the current directory is a git repo. If it isn't, --ref will be used.
36+
--failOnCVSS string The risk level to fail the scan on. Can be 'low', 'medium', 'high' or 'critical'. Defaults to 'critical'. (default "critical")
37+
--failOnRisk string The risk level to fail the scan on. Can be 'low', 'medium', 'high' or 'critical'. Defaults to 'critical'. (default "critical")
38+
-h, --help help for container-scanning
39+
--ignoreExternalReferences If an attestation does contain a external reference to an sbom or vex, this will be ignored. Useful when scanning your own image from the registry where your own attestations are attached.
40+
--ignoreUpstreamAttestations Ignores attestations from the scanned container image - if they exists
41+
--image string OCI image reference to scan (e.g. ghcr.io/org/image:tag). If empty, --path or the first argument may be used to provide a tar or local files.
42+
--isTag If the current git reference is a tag. If not specified, it will check if the current directory is a git repo. If it isn't, it will be set to false.
43+
--keepOriginalSbomRootComponent Use this flag if you get software from a supplier and you want to identify vulnerabilities in the root component itself, not only in the dependencies
44+
--origin string Origin of the SBOM (how it was generated). Examples: 'source-scanning', 'container-scanning', 'base-image'. Default: 'container-scanning'. (default "DEFAULT")
45+
--path string Path to a tar file or directory containing the container image to scan. If empty, --image must be provided or an argument.
46+
--ref string The git reference to use. This can be a branch, tag, or commit hash. If not specified, it will first check for a git repository in the current directory. If not found, it will just use main.
47+
--timeout int Set the timeout for scanner operations in seconds (default 300)
48+
--token string The personal access token to authenticate the request
49+
--webUI string The url of the web UI to show the scan results in. Defaults to 'https://app.devguard.org'. (default "https://app.devguard.org")
4950
```
5051
5152
### Options inherited from parent commands
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## devguard-scanner
2+
3+
Secure your Software Supply Chain
4+
5+
### Synopsis
6+
7+
Secure your Software Supply Chain
8+
9+
DevGuard Scanner is a small CLI to help generate, sign and upload SBOMs, SARIF
10+
reports and attestations to a DevGuard backend. Use commands like 'sca', 'sarif',
11+
and 'attest' to interact with the platform. Configuration can be provided via a
12+
./.devguard config file or environment variables (prefix DEVGUARD_).
13+
14+
### Examples
15+
16+
```shell
17+
# Run Software Composition Analysis on a container image
18+
devguard-scanner sca ghcr.io/org/image:tag
19+
20+
# Run SCA on a local project directory
21+
devguard-scanner sca ./path/to/project
22+
23+
# Create and upload an attestation
24+
devguard-scanner attest predicate.json ghcr.io/org/image:tag --predicateType https://cyclonedx.org/vex/1.0
25+
26+
# Upload a SARIF report
27+
devguard-scanner sarif results.sarif.json
28+
```
29+
30+
### Options
31+
32+
```shell
33+
-h, --help help for devguard-scanner
34+
-l, --logLevel string Set the log level. Options: debug, info, warn, error (default "info")
35+
-t, --toggle Help message for toggle
36+
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## inspect
2+
3+
Inspect PURL for matching CVEs and vulnerabilities
4+
5+
### Synopsis
6+
7+
Inspects a Package URL (PURL) against the vulnerability database and displays
8+
detailed information about matching CVEs, affected components, and relationships.
9+
10+
Shows both raw matches and deduplicated results (after alias resolution).
11+
12+
Examples:
13+
devguard-cli vulndb inspect "pkg:npm/[email protected]"
14+
devguard-cli vulndb inspect "pkg:deb/debian/[email protected]"
15+
devguard-cli vulndb inspect "pkg:pypi/[email protected]"
16+
17+
```shell
18+
devguard-scanner inspect <purl> [flags]
19+
```
20+
21+
### Options
22+
23+
```shell
24+
--apiUrl string The url of the API to send the request to (default "https://api.devguard.org")
25+
-h, --help help for inspect
26+
--outputPath string Path to save the inspection result as JSON file (optional)
27+
--timeout int Set the timeout for scanner operations in seconds (default 300)
28+
```
29+
30+
### Options inherited from parent commands
31+
32+
```shell
33+
-l, --logLevel string Set the log level. Options: debug, info, warn, error (default "info")
34+
```

src/pages/reference/scanner/kyverno2sarif.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
## kyverno2sarif
22

3-
Converts JSON output generated by the kyverno test command into SARIF format.
3+
Convert Kyverno test output to SARIF
44

5-
### How to use the command
5+
### Synopsis
66

7-
This is the basic command syntax to convert files:
7+
Converts JSON output generated by the kyverno test command into SARIF format.
88

99
```shell
1010
devguard-scanner kyverno2sarif [flags]
1111
```
1212

13-
The -i flag specifies the input file to be converted. By default, the resulting SARIF output is printed to the console.
14-
To save the SARIF output to a file instead, use the -o flag to specify the output file path and name.
13+
### Examples
1514

1615
```shell
1716
# Convert Kyverno output to SARIF
@@ -25,7 +24,7 @@ To save the SARIF output to a file instead, use the -o flag to specify the outpu
2524

2625
```shell
2726
-h, --help help for kyverno2sarif
28-
-i, --input string Input file containing Kyverno test output (json)
27+
-i, --input string Input file containing Kyverno test output (must be json format)
2928
-o, --output string Output SARIF file (default: stdout)
3029
```
3130

src/pages/reference/scanner/sbom.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,23 @@ Scan a CycloneDX SBOM for vulnerabilities
66

77
Scan a CycloneDX Software Bill of Materials (SBOM) and upload it to DevGuard for vulnerability analysis.
88

9-
Only CycloneDX-formatted SBOMs are supported. The command signs the request using the configured token and returns scan results.
9+
Only CycloneDX-formatted SBOMs are supported. Pass a file path, '-' to read from stdin, or omit the argument to read from stdin.
1010

1111
```shell
12-
devguard-scanner sbom <sbom.json> [flags]
12+
devguard-scanner sbom [sbom.json|-] [flags]
1313
```
1414

1515
### Examples
1616

1717
```shell
18-
# Scan a CycloneDX SBOM
18+
# Scan a CycloneDX SBOM from a file
1919
devguard-scanner sbom my-bom.json
2020

21+
# Scan from stdin (pipe from merge-sboms)
22+
devguard-scanner merge-sboms config.json | devguard-scanner sbom -
23+
2124
# Scan with custom asset name
22-
devguard-scanner sbom my-bom.json --assetName my-app
25+
devguard-scanner sbom my-bom.json --assetName my-app --token YOUR_TOKEN
2326

2427
# Fail on high risk vulnerabilities
2528
devguard-scanner sbom my-bom.json --failOnRisk high
@@ -28,20 +31,21 @@ devguard-scanner sbom <sbom.json> [flags]
2831
### Options
2932

3033
```shell
31-
--apiUrl string The url of the API to send the scan request to (default "https://api.devguard.org")
32-
--artifactName string The name of the artifact which was scanned. If not specified, it will default to the empty artifact name ''.
33-
--assetName string The id of the asset which is scanned
34-
--defaultRef string The default git reference to use. This can be a branch, tag, or commit hash. If not specified, it will check, if the current directory is a git repo. If it isn't, --ref will be used.
35-
--failOnCVSS string The risk level to fail the scan on. Can be 'low', 'medium', 'high' or 'critical'. Defaults to 'critical'. (default "critical")
36-
--failOnRisk string The risk level to fail the scan on. Can be 'low', 'medium', 'high' or 'critical'. Defaults to 'critical'. (default "critical")
37-
-h, --help help for sbom
38-
--ignoreExternalReferences If an attestation does contain a external reference to an sbom or vex, this will be ignored. Useful when scanning your own image from the registry where your own attestations are attached.
39-
--isTag If the current git reference is a tag. If not specified, it will check if the current directory is a git repo. If it isn't, it will be set to false.
40-
--origin string Origin of the SBOM (how it was generated). Examples: 'source-scanning', 'container-scanning', 'base-image'. Default: 'container-scanning'. (default "DEFAULT")
41-
--ref string The git reference to use. This can be a branch, tag, or commit hash. If not specified, it will first check for a git repository in the current directory. If not found, it will just use main.
42-
--timeout int Set the timeout for scanner operations in seconds (default 300)
43-
--token string The personal access token to authenticate the request
44-
--webUI string The url of the web UI to show the scan results in. Defaults to 'https://app.devguard.org'. (default "https://app.devguard.org")
34+
--apiUrl string The url of the API to send the scan request to (default "https://api.devguard.org")
35+
--artifactName string The name of the artifact which was scanned. If not specified, it will default to the empty artifact name ''.
36+
--assetName string The id of the asset which is scanned
37+
--defaultRef string The default git reference to use. This can be a branch, tag, or commit hash. If not specified, it will check, if the current directory is a git repo. If it isn't, --ref will be used.
38+
--failOnCVSS string The risk level to fail the scan on. Can be 'low', 'medium', 'high' or 'critical'. Defaults to 'critical'. (default "critical")
39+
--failOnRisk string The risk level to fail the scan on. Can be 'low', 'medium', 'high' or 'critical'. Defaults to 'critical'. (default "critical")
40+
-h, --help help for sbom
41+
--ignoreExternalReferences If an attestation does contain a external reference to an sbom or vex, this will be ignored. Useful when scanning your own image from the registry where your own attestations are attached.
42+
--isTag If the current git reference is a tag. If not specified, it will check if the current directory is a git repo. If it isn't, it will be set to false.
43+
--keepOriginalSbomRootComponent Use this flag if you get software from a supplier and you want to identify vulnerabilities in the root component itself, not only in the dependencies
44+
--origin string Origin of the SBOM (how it was generated). Examples: 'source-scanning', 'container-scanning', 'base-image'. Default: 'container-scanning'. (default "DEFAULT")
45+
--ref string The git reference to use. This can be a branch, tag, or commit hash. If not specified, it will first check for a git repository in the current directory. If not found, it will just use main.
46+
--timeout int Set the timeout for scanner operations in seconds (default 300)
47+
--token string The personal access token to authenticate the request
48+
--webUI string The url of the web UI to show the scan results in. Defaults to 'https://app.devguard.org'. (default "https://app.devguard.org")
4549
```
4650
4751
### Options inherited from parent commands

0 commit comments

Comments
 (0)