New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add Rekor SBOM attestation scanning #2893
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Scan SBOM attestation in Rekor | ||
|
||
!!! warning "EXPERIMENTAL" | ||
This feature might change without preserving backwards compatibility. | ||
|
||
Trivy can retrieve SBOM attestation of the specified container image in the [Rekor][rekor] instance and scan it for vulnerabilities. | ||
|
||
## Prerequisites | ||
1. SBOM attestation stored in Rekor | ||
- See [the "Keyless signing" section][sbom-attest] if you want to upload your SBOM attestation to Rekor. | ||
|
||
|
||
## Scanning | ||
You need to pass `--sbom-sources rekor` so that Trivy will look for SBOM attestation in Rekor. | ||
|
||
!!! note | ||
`--sbom-sources` can be used only with `trivy image` at the moment. | ||
|
||
```bash | ||
$ trivy image --sbom-sources rekor otms61/alpine:3.7.3 [~/src/github.com/aquasecurity/trivy] | ||
2022-09-15T22:16:09.791+0300 INFO Vulnerability scanning is enabled | ||
2022-09-15T22:16:09.791+0300 INFO Secret scanning is enabled | ||
2022-09-15T22:16:09.791+0300 INFO If your scanning is slow, please try '--security-checks vuln' to disable secret scanning | ||
2022-09-15T22:16:09.791+0300 INFO Please see also https://aquasecurity.github.io/trivy/dev/docs/secret/scanning/#recommendation for faster secret detection | ||
2022-09-15T22:16:15.183+0300 INFO Detected OS: alpine | ||
2022-09-15T22:16:15.183+0300 INFO Detecting Alpine vulnerabilities... | ||
2022-09-15T22:16:15.219+0300 INFO Number of language-specific files: 0 | ||
2022-09-15T22:16:15.235+0300 WARN This OS version is no longer supported by the distribution: alpine 3.7.3 | ||
2022-09-15T22:16:15.235+0300 WARN The vulnerability detection may be insufficient because security updates are not provided | ||
|
||
otms61/alpine:3.7.3 (alpine 3.7.3) | ||
================================== | ||
Total: 2 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 2) | ||
|
||
┌────────────┬────────────────┬──────────┬───────────────────┬───────────────┬──────────────────────────────────────────────────────────┐ | ||
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │ | ||
├────────────┼────────────────┼──────────┼───────────────────┼───────────────┼──────────────────────────────────────────────────────────┤ | ||
│ musl │ CVE-2019-14697 │ CRITICAL │ 1.1.18-r3 │ 1.1.18-r4 │ musl libc through 1.1.23 has an x87 floating-point stack │ | ||
│ │ │ │ │ │ adjustment im ...... │ | ||
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2019-14697 │ | ||
├────────────┤ │ │ │ │ │ | ||
│ musl-utils │ │ │ │ │ │ | ||
│ │ │ │ │ │ │ | ||
│ │ │ │ │ │ │ | ||
└────────────┴────────────────┴──────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────┘ | ||
|
||
``` | ||
|
||
If you have your own Rekor instance, you can specify the URL via `--rekor-url`. | ||
|
||
```bash | ||
$ trivy image --sbom-sources rekor --rekor-url https://my-rekor.dev otms61/alpine:3.7.3 | ||
``` | ||
|
||
[rekor]: https://github.com/sigstore/rekor | ||
[sbom-attest]: sbom.md#keyless-signing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following sentence is not in the log, so it seems to be executed in trivy when there is a bug.
Detected SBOM format: cyclonedx-json
Found SBOM (cyclonedx) attestation in Rekor