Skip to content

Commit 9dc8a2b

Browse files
itayskknqyf263
andauthored
docs: non-packaged and sbom clarifications (#6975)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
1 parent b58d42d commit 9dc8a2b

File tree

3 files changed

+28
-14
lines changed

3 files changed

+28
-14
lines changed

docs/docs/coverage/language/golang.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ such as `go mod download`, `go mod tidy`, etc.
6666
Trivy traverses `$GOPATH/pkg/mod` and collects those extra information.
6767

6868
### Go binaries
69-
Trivy scans binaries built by Go.
69+
Trivy scans binaries built by Go, which include [module information](https://tip.golang.org/doc/go1.18#go-version).
7070
If there is a Go binary in your container image, Trivy automatically finds and scans it.
7171

7272
Also, you can scan your local binaries.

docs/docs/scanner/vulnerability.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Vulnerability Scanning
2-
Trivy detects known vulnerabilities according to the versions of installed packages.
2+
Trivy detects known vulnerabilities in software components that it finds in the scan target.
33

4-
The following packages are supported.
4+
The following are supported:
55

66
- [OS packages](#os-packages)
77
- [Language-specific packages](#language-specific-packages)
8-
- [Kubernetes components (control plane, node and addons)](#kubernetes)
9-
10-
Trivy also detects known vulnerabilities in Kubernetes components using KBOM (Kubernetes bill of Material) scanning. To learn more, see the [documentation for Kubernetes scanning](../target/kubernetes.md#KBOM).
8+
- [Non-packaged software](#non-packaged-software)
9+
- [Kubernetes components](#kubernetes)
1110

1211
## OS Packages
1312
Trivy is capable of automatically detecting installed OS packages when scanning container images, VM images and running hosts.
@@ -138,9 +137,18 @@ See [here](../coverage/language/index.md#supported-languages) for the supported
138137

139138
[^1]: Intentional delay between vulnerability disclosure and registration in the DB
140139

140+
## Non-packaged software
141+
142+
If you have software that is not managed by a package manager, Trivy can still detect vulnerabilities in it in some cases:
143+
144+
- [Using SBOM from Sigstore Rekor](../supply-chain/attestation/rekor/#non-packaged-binaries)
145+
- [Go Binaries with embedded module information](../coverage/language/golang/#go-binaries)
146+
- [Rust Binaries with embedded information](../coverage/language/rust/#binaries)
147+
- [SBOM embedded in container images](../supply-chain/container-image/#sbom-embedded-in-container-images)
148+
141149
## Kubernetes
142150

143-
Trivy can detect vulnerabilities in Kubernetes clusters and components.
151+
Trivy can detect vulnerabilities in Kubernetes clusters and components by scanning a Kubernetes Cluster, or a KBOM (Kubernetes bill of Material). To learn more, see the [documentation for Kubernetes scanning](../target/kubernetes.md).
144152

145153
### Data Sources
146154

docs/docs/supply-chain/sbom.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -731,17 +731,20 @@ $ cat result.spdx.json | jq .
731731
</details>
732732

733733
## Scanning
734-
Trivy can take SBOM documents as input for scanning.
734+
735+
### SBOM as Target
736+
Trivy can take SBOM documents as input for scanning, e.g `trivy sbom ./sbom.spdx`.
735737
See [here](../target/sbom.md) for more details.
736738

737-
Also, Trivy searches for SBOM files in container images.
739+
### SBOM Detection inside Targets
740+
Trivy searches for SBOM files in container images with the following extensions:
741+
- `.spdx`
742+
- `.spdx.json`
743+
- `.cdx`
744+
- `.cdx.json`
738745

739-
```bash
740-
$ trivy image bitnami/elasticsearch:8.7.1
741-
```
746+
In addition, Trivy automatically detects SBOM files in [Bitnami images](https://github.com/bitnami/containers), [see here](../coverage/os/bitnami.md) for more details.
742747

743-
For example, [Bitnami images](https://github.com/bitnami/containers) contain SBOM files in `/opt/bitnami` directory.
744-
Trivy automatically detects the SBOM files and uses them for scanning.
745748
It is enabled in the following targets.
746749

747750
| Target | Enabled |
@@ -755,6 +758,9 @@ It is enabled in the following targets.
755758
| AWS | |
756759
| SBOM | |
757760

761+
### SBOM Discovery for Container Images
762+
763+
When scanning container images, Trivy can discover SBOM for those images. [See here](../target/container_image.md) for more details.
758764

759765
[spdx]: https://spdx.dev/wp-content/uploads/sites/41/2020/08/SPDX-specification-2-2.pdf
760766

0 commit comments

Comments
 (0)