mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-09 22:30:46 -08:00
Compare commits
293 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69093d2c23 | ||
|
|
7e9a54cd6b | ||
|
|
78e3304bbe | ||
|
|
22f040f947 | ||
|
|
c2dde33c3f | ||
|
|
104bbc18ea | ||
|
|
c7b8cc392e | ||
|
|
906b037cff | ||
|
|
b15d9a60e6 | ||
|
|
4f1ab23869 | ||
|
|
5bae2626e0 | ||
|
|
4a7ebb70b4 | ||
|
|
3b2a3976ac | ||
|
|
1d420e669f | ||
|
|
5a0bf9ed31 | ||
|
|
7ca656d54b | ||
|
|
8939451174 | ||
|
|
60fef1b615 | ||
|
|
aaecc29e90 | ||
|
|
6c7cb7ad2d | ||
|
|
93e6680b1c | ||
|
|
07ef63b483 | ||
|
|
ee522300b7 | ||
|
|
cae79d637d | ||
|
|
bcf246ca85 | ||
|
|
0229eb70ab | ||
|
|
39f9ed128b | ||
|
|
fe127715e5 | ||
|
|
1dcf81666f | ||
|
|
c321fdfcdd | ||
|
|
69a5fa18ca | ||
|
|
be8c7b796d | ||
|
|
6aff7b0c4f | ||
|
|
35e88890c3 | ||
|
|
239f65a45c | ||
|
|
38f17c945e | ||
|
|
0b0e4061ef | ||
|
|
e97af9806a | ||
|
|
26437be083 | ||
|
|
9256804df8 | ||
|
|
6ebde88dbc | ||
|
|
a516775da6 | ||
|
|
c9ba460a9b | ||
|
|
2a21fd8cac | ||
|
|
3b1426a676 | ||
|
|
679153950c | ||
|
|
dd6a6e50a4 | ||
|
|
3bf4f44931 | ||
|
|
2ab8ae9291 | ||
|
|
8995838e8d | ||
|
|
a19e0aa1ba | ||
|
|
fa1077bbf5 | ||
|
|
e322f212a5 | ||
|
|
883c63bf29 | ||
|
|
3ab459e3b6 | ||
|
|
296eb3c814 | ||
|
|
5706603146 | ||
|
|
6e23ca96d1 | ||
|
|
6e6af010e8 | ||
|
|
bf4cd4f2d2 | ||
|
|
6562082e28 | ||
|
|
573f35c810 | ||
|
|
43350dd9b4 | ||
|
|
7a58ccbc7f | ||
|
|
471dcc3406 | ||
|
|
dd62d4e7d3 | ||
|
|
e10929a669 | ||
|
|
ee4f7dc6b4 | ||
|
|
3ce7d59bb1 | ||
|
|
312649c988 | ||
|
|
427a18ef06 | ||
|
|
a95cab0eab | ||
|
|
7abf5f0199 | ||
|
|
9fbfb04f8e | ||
|
|
3032defa8c | ||
|
|
8c9a92b28e | ||
|
|
0d3efa5dc1 | ||
|
|
6c6beeafbe | ||
|
|
2849abb24a | ||
|
|
4141013be9 | ||
|
|
b7cbbdc0ce | ||
|
|
93efe0789e | ||
|
|
8e25ca02c8 | ||
|
|
efd177b300 | ||
|
|
b7dfd64987 | ||
|
|
195880be60 | ||
|
|
9a5383e993 | ||
|
|
346a6b794d | ||
|
|
4a38d0121b | ||
|
|
e25de25262 | ||
|
|
4b84dabd15 | ||
|
|
9792611b36 | ||
|
|
13608eac24 | ||
|
|
a0dc3b688e | ||
|
|
9dcd06fda7 | ||
|
|
12cf218032 | ||
|
|
86138329cb | ||
|
|
a032ad696a | ||
|
|
36f8d0fd67 | ||
|
|
f1329c7ea1 | ||
|
|
c5e03f7d8f | ||
|
|
a8a7ddb127 | ||
|
|
bff0e9b034 | ||
|
|
cc4771158b | ||
|
|
b9b27fce42 | ||
|
|
bfa99d26fa | ||
|
|
890a360244 | ||
|
|
ad1c37984e | ||
|
|
dd28d4e238 | ||
|
|
1d42969518 | ||
|
|
7f41822d4f | ||
|
|
5b7704d1d0 | ||
|
|
1bf0117f77 | ||
|
|
346f5b3553 | ||
|
|
ad58cf4457 | ||
|
|
c76764ef5d | ||
|
|
dbb6f28871 | ||
|
|
548a340075 | ||
|
|
c80310d769 | ||
|
|
de7eb13938 | ||
|
|
f07030daf2 | ||
|
|
ba77dbe5f9 | ||
|
|
7bafdcaaf9 | ||
|
|
68b164ddf4 | ||
|
|
8e1019d82c | ||
|
|
400a79c2c6 | ||
|
|
fe400ea55f | ||
|
|
1f05b4545d | ||
|
|
6973da6f5e | ||
|
|
8b88238f07 | ||
|
|
e8c32dedaa | ||
|
|
9913465a53 | ||
|
|
0d9865f48f | ||
|
|
9bedd989a9 | ||
|
|
c22830766e | ||
|
|
126d6cd033 | ||
|
|
b57eccb09c | ||
|
|
8bf6caf98e | ||
|
|
8112cdf8d6 | ||
|
|
124e161669 | ||
|
|
7b96351c32 | ||
|
|
573502e2e8 | ||
|
|
c7814f1401 | ||
|
|
19e2c10e89 | ||
|
|
41512f846e | ||
|
|
0e5e909765 | ||
|
|
529957eac1 | ||
|
|
fe09410ed4 | ||
|
|
e5072f1eef | ||
|
|
a93056133b | ||
|
|
463b11731c | ||
|
|
2998dcdf07 | ||
|
|
a4009f62fd | ||
|
|
85cca8c07a | ||
|
|
9892d040bc | ||
|
|
8a89b2b759 | ||
|
|
57b08d62de | ||
|
|
453c66dd30 | ||
|
|
f670602091 | ||
|
|
dd54f80d3f | ||
|
|
ab1cf03a9d | ||
|
|
1f85b27773 | ||
|
|
da0b8760e5 | ||
|
|
d464807321 | ||
|
|
6b4cebe959 | ||
|
|
af1ea64f73 | ||
|
|
09cdae6639 | ||
|
|
3d3a3d6f19 | ||
|
|
036ab75434 | ||
|
|
bb3cca6018 | ||
|
|
a99498cdd9 | ||
|
|
a994453a7d | ||
|
|
4820eb70fc | ||
|
|
3840d90f85 | ||
|
|
49456ba841 | ||
|
|
b3521e87b2 | ||
|
|
50364b836f | ||
|
|
f987e41574 | ||
|
|
ecc01bb3fb | ||
|
|
e58dcfcf9f | ||
|
|
9c609c44a3 | ||
|
|
a3cd693a5e | ||
|
|
a1c4bd746f | ||
|
|
613fc71347 | ||
|
|
e9b3f0b79c | ||
|
|
10b812710b | ||
|
|
5ed6fc67f5 | ||
|
|
24d0e2bf2d | ||
|
|
72ea4b0632 | ||
|
|
9637286de4 | ||
|
|
a3a68c610f | ||
|
|
3e503a0cc2 | ||
|
|
8715e5d14a | ||
|
|
b675b06e89 | ||
|
|
f9c5043dee | ||
|
|
398620b471 | ||
|
|
02ebb4cb89 | ||
|
|
7b10defaa8 | ||
|
|
04c80a64af | ||
|
|
f7b3f87dd5 | ||
|
|
ffa30235f0 | ||
|
|
5695eb22df | ||
|
|
3eb0b03f7c | ||
|
|
3e13633615 | ||
|
|
10cd98cf55 | ||
|
|
9b74384842 | ||
|
|
39789fff43 | ||
|
|
bd5baaf930 | ||
|
|
1d5ab92c7c | ||
|
|
a58d6854dc | ||
|
|
73bd20d619 | ||
|
|
0031a38eb7 | ||
|
|
87f3751172 | ||
|
|
2e8e38a8c0 | ||
|
|
f258fd5a2a | ||
|
|
db9e57a34e | ||
|
|
da7bba970b | ||
|
|
0a3887ca03 | ||
|
|
846498dd23 | ||
|
|
d749b621c8 | ||
|
|
13fe2ee1c1 | ||
|
|
60491f8a7e | ||
|
|
b5062f3ae2 | ||
|
|
aec8885bc7 | ||
|
|
715575d731 | ||
|
|
509e03030c | ||
|
|
cc66d6d00f | ||
|
|
eafd810d7c | ||
|
|
f12054e669 | ||
|
|
4316bcbc5b | ||
|
|
2acd8e39c1 | ||
|
|
2d30dd7241 | ||
|
|
c00232720a | ||
|
|
6d84e0cc0d | ||
|
|
4f77e01b65 | ||
|
|
011012a8b4 | ||
|
|
ae283985c9 | ||
|
|
92697c7177 | ||
|
|
ca41a28641 | ||
|
|
243e5a3af9 | ||
|
|
0aa2607cd8 | ||
|
|
23dc3a6753 | ||
|
|
a0429f773b | ||
|
|
f352f6b663 | ||
|
|
f9a6a71927 | ||
|
|
670fbf2d81 | ||
|
|
bbc5a85444 | ||
|
|
70f3faa4b5 | ||
|
|
e8085bae3e | ||
|
|
4f111b9342 | ||
|
|
03db7fc1ba | ||
|
|
eedefdddba | ||
|
|
49c54b49c6 | ||
|
|
774e04d19d | ||
|
|
735335f08f | ||
|
|
9fd5cc5c00 | ||
|
|
b5859d3fb5 | ||
|
|
e6d0ba5cc9 | ||
|
|
a034d26443 | ||
|
|
7558df7c22 | ||
|
|
30c7cb1371 | ||
|
|
95f7a564e5 | ||
|
|
c4a4a5fa97 | ||
|
|
49f354085f | ||
|
|
dcf28a1001 | ||
|
|
e79e73d636 | ||
|
|
17827db6a9 | ||
|
|
f0b3a99bf2 | ||
|
|
e7507f0d34 | ||
|
|
2200f3846d | ||
|
|
d7ac286085 | ||
|
|
328db73838 | ||
|
|
f5e429179d | ||
|
|
f9fceb58bf | ||
|
|
4202c4ba0d | ||
|
|
156a2aa4c4 | ||
|
|
e8b31bf003 | ||
|
|
9bd6ed73e5 | ||
|
|
2c41ac83a9 | ||
|
|
11dbf54884 | ||
|
|
da17dc7278 | ||
|
|
90f1d8d78a | ||
|
|
51f2123c5c | ||
|
|
ffe24e18dc | ||
|
|
fd07074e80 | ||
|
|
5e68bdc9d0 | ||
|
|
9d9f80d979 | ||
|
|
73899610e8 | ||
|
|
1feb81cfff | ||
|
|
21b68e1818 | ||
|
|
71391a5850 | ||
|
|
07b2d7fbd7 | ||
|
|
775f954c3d |
6
.github/CODEOWNERS
vendored
6
.github/CODEOWNERS
vendored
@@ -15,8 +15,8 @@ pkg/cloud/ @simar7 @nikpivkin
|
||||
pkg/iac/ @simar7 @nikpivkin
|
||||
|
||||
# Helm chart
|
||||
helm/trivy/ @afdesk
|
||||
helm/trivy/ @afdesk @simar7
|
||||
|
||||
# Kubernetes scanning
|
||||
pkg/k8s/ @afdesk
|
||||
docs/docs/target/kubernetes.md @afdesk
|
||||
pkg/k8s/ @afdesk @simar7
|
||||
docs/docs/target/kubernetes.md @afdesk @simar7
|
||||
|
||||
4
.github/DISCUSSION_TEMPLATE/bugs.yml
vendored
4
.github/DISCUSSION_TEMPLATE/bugs.yml
vendored
@@ -10,7 +10,7 @@ body:
|
||||
|
||||
**Do not open a GitHub issue, please.** Maintainers triage discussions and then create issues.
|
||||
|
||||
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
|
||||
Please also check [our contribution guidelines](https://trivy.dev/latest/community/contribute/discussion/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
@@ -117,7 +117,7 @@ body:
|
||||
description: Have you tried the following?
|
||||
options:
|
||||
- label: Run `trivy clean --all`
|
||||
- label: Read [the troubleshooting](https://aquasecurity.github.io/trivy/latest/docs/references/troubleshooting/)
|
||||
- label: Read [the troubleshooting](https://trivy.dev/latest/docs/references/troubleshooting/)
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
|
||||
@@ -7,7 +7,7 @@ body:
|
||||
Feel free to create a docs report if something doesn't work as expected or is unclear in the documentation.
|
||||
Please ensure that you're not creating a duplicate report by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
|
||||
|
||||
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
|
||||
Please also check [our contribution guidelines](https://trivy.dev/latest/community/contribute/discussion/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
|
||||
@@ -8,7 +8,7 @@ body:
|
||||
|
||||
**Do not open a GitHub issue, please.** Maintainers triage discussions and then create issues.
|
||||
|
||||
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
|
||||
Please also check [our contribution guidelines](https://trivy.dev/latest/community/contribute/discussion/).
|
||||
- type: input
|
||||
attributes:
|
||||
label: IDs
|
||||
@@ -86,7 +86,7 @@ body:
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: Read [the documentation regarding wrong detection](https://aquasecurity.github.io/trivy/dev/community/contribute/discussion/#false-detection)
|
||||
- label: Read [the documentation regarding wrong detection](https://trivy.dev/dev/community/contribute/discussion/#false-detection)
|
||||
- label: Ran Trivy with `-f json` that shows data sources and confirmed that the security advisory in data sources was correct
|
||||
validations:
|
||||
required: true
|
||||
|
||||
2
.github/DISCUSSION_TEMPLATE/ideas.yml
vendored
2
.github/DISCUSSION_TEMPLATE/ideas.yml
vendored
@@ -9,7 +9,7 @@ body:
|
||||
|
||||
**Do not open a GitHub issue, please.** Maintainers triage discussions and then create issues.
|
||||
|
||||
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
|
||||
Please also check [our contribution guidelines](https://trivy.dev/latest/community/contribute/discussion/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
|
||||
2
.github/DISCUSSION_TEMPLATE/q-a.yml
vendored
2
.github/DISCUSSION_TEMPLATE/q-a.yml
vendored
@@ -9,7 +9,7 @@ body:
|
||||
|
||||
**Do not open a GitHub issue, please.** Maintainers triage discussions and then create issues.
|
||||
|
||||
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
|
||||
Please also check [our contribution guidelines](https://trivy.dev/latest/community/contribute/discussion/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Question
|
||||
|
||||
11
.github/ISSUE_TEMPLATE/maintainer.md
vendored
Normal file
11
.github/ISSUE_TEMPLATE/maintainer.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: Maintainer
|
||||
about: Create an issue by maintainers
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Are you a maintainer of the Trivy project?
|
||||
If not, please open [a discussion](https://github.com/aquasecurity/trivy/discussions); if you are, please review [the guideline](https://trivy.dev/latest/community/contribute/discussion/).
|
||||
4
.github/pull_request_template.md
vendored
4
.github/pull_request_template.md
vendored
@@ -10,8 +10,8 @@
|
||||
Remove this section if you don't have related PRs.
|
||||
|
||||
## Checklist
|
||||
- [ ] I've read the [guidelines for contributing](https://aquasecurity.github.io/trivy/latest/community/contribute/pr/) to this repository.
|
||||
- [ ] I've followed the [conventions](https://aquasecurity.github.io/trivy/latest/community/contribute/pr/#title) in the PR title.
|
||||
- [ ] I've read the [guidelines for contributing](https://trivy.dev/latest/community/contribute/pr/) to this repository.
|
||||
- [ ] I've followed the [conventions](https://trivy.dev/latest/community/contribute/pr/#title) in the PR title.
|
||||
- [ ] I've added tests that prove my fix is effective or that my feature works.
|
||||
- [ ] I've updated the [documentation](https://github.com/aquasecurity/trivy/blob/main/docs) with the relevant information (if needed).
|
||||
- [ ] I've added usage information (if the PR introduces new options)
|
||||
|
||||
2
.github/workflows/auto-close-issue.yaml
vendored
2
.github/workflows/auto-close-issue.yaml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
// If the user does not have write or admin permissions, leave a comment and close the issue
|
||||
if (permission !== 'write' && permission !== 'admin') {
|
||||
const commentBody = "Please see https://aquasecurity.github.io/trivy/latest/community/contribute/issue/";
|
||||
const commentBody = "Please see https://trivy.dev/latest/community/contribute/issue/";
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
|
||||
11
.github/workflows/auto-update-labels.yaml
vendored
11
.github/workflows/auto-update-labels.yaml
vendored
@@ -5,8 +5,6 @@ on:
|
||||
- 'misc/triage/labels.yaml'
|
||||
branches:
|
||||
- main
|
||||
env:
|
||||
GO_VERSION: '1.22'
|
||||
jobs:
|
||||
deploy:
|
||||
name: Auto-update labels
|
||||
@@ -18,14 +16,11 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
# cf. https://github.com/aquasecurity/trivy/pull/6711
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
|
||||
- name: Install aqua tools
|
||||
uses: aquaproj/aqua-installer@v3.0.1
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Install Go tools
|
||||
run: go install tool # GOBIN is added to the PATH by the setup-go action
|
||||
|
||||
- name: update labels
|
||||
env:
|
||||
|
||||
4
.github/workflows/backport.yaml
vendored
4
.github/workflows/backport.yaml
vendored
@@ -41,8 +41,10 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Extract branch name
|
||||
env:
|
||||
COMMENT_BODY: ${{ github.event.comment.body }}
|
||||
run: |
|
||||
BRANCH_NAME=$(echo ${{ github.event.comment.body }} | grep -oE '@aqua-bot backport\s+(\S+)' | awk '{print $3}')
|
||||
BRANCH_NAME=$(echo $COMMENT_BODY | grep -oE '@aqua-bot backport\s+(\S+)' | awk '{print $3}')
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Git user
|
||||
|
||||
20
.github/workflows/cache-test-images.yaml
vendored
20
.github/workflows/cache-test-images.yaml
vendored
@@ -18,10 +18,8 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v3.0.1
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Install Go tools
|
||||
run: go install tool # GOBIN is added to the PATH by the setup-go action
|
||||
|
||||
- name: Generate image list digest
|
||||
if: github.ref_name == 'main'
|
||||
@@ -29,7 +27,7 @@ jobs:
|
||||
run: |
|
||||
source integration/testimages.ini
|
||||
IMAGE_LIST=$(skopeo list-tags docker://$TEST_IMAGES)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags | sort' | sha256sum | cut -d' ' -f1)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags |= sort' | sha256sum | cut -d' ' -f1)
|
||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||
|
||||
## We need to work with test image cache only for main branch
|
||||
@@ -39,8 +37,6 @@ jobs:
|
||||
with:
|
||||
path: integration/testdata/fixtures/images
|
||||
key: cache-test-images-${{ steps.image-digest.outputs.digest }}
|
||||
restore-keys:
|
||||
cache-test-images-
|
||||
|
||||
- name: Download test images
|
||||
if: github.ref_name == 'main'
|
||||
@@ -59,10 +55,8 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v3.0.1
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Install Go tools
|
||||
run: go install tool # GOBIN is added to the PATH by the setup-go action
|
||||
|
||||
- name: Generate image list digest
|
||||
if: github.ref_name == 'main'
|
||||
@@ -70,7 +64,7 @@ jobs:
|
||||
run: |
|
||||
source integration/testimages.ini
|
||||
IMAGE_LIST=$(skopeo list-tags docker://$TEST_VM_IMAGES)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags | sort' | sha256sum | cut -d' ' -f1)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags |= sort' | sha256sum | cut -d' ' -f1)
|
||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||
|
||||
## We need to work with test VM image cache only for main branch
|
||||
@@ -80,8 +74,6 @@ jobs:
|
||||
with:
|
||||
path: integration/testdata/fixtures/vm-images
|
||||
key: cache-test-vm-images-${{ steps.image-digest.outputs.digest }}
|
||||
restore-keys:
|
||||
cache-test-vm-images-
|
||||
|
||||
- name: Download test VM images
|
||||
if: github.ref_name == 'main'
|
||||
|
||||
2
.github/workflows/canary.yaml
vendored
2
.github/workflows/canary.yaml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Restore Trivy binaries from cache
|
||||
uses: actions/cache@v4.0.2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: dist/
|
||||
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
||||
|
||||
36
.github/workflows/publish-chart.yaml
vendored
36
.github/workflows/publish-chart.yaml
vendored
@@ -13,9 +13,6 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- 'helm/trivy/**'
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
env:
|
||||
HELM_REP: helm-charts
|
||||
GH_OWNER: aquasecurity
|
||||
@@ -25,7 +22,6 @@ env:
|
||||
jobs:
|
||||
# `test-chart` job starts if a PR with Helm Chart is created, merged etc.
|
||||
test-chart:
|
||||
if: github.event_name != 'push'
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -33,7 +29,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814
|
||||
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112
|
||||
with:
|
||||
version: v3.14.4
|
||||
- name: Set up python
|
||||
@@ -43,9 +39,9 @@ jobs:
|
||||
check-latest: true
|
||||
- name: Setup Chart Linting
|
||||
id: lint
|
||||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992
|
||||
uses: helm/chart-testing-action@0d28d3144d3a25ea2cc349d6e59901c4ff469b3b
|
||||
- name: Setup Kubernetes cluster (KIND)
|
||||
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde
|
||||
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3
|
||||
with:
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
image: ${{ env.KIND_IMAGE }}
|
||||
@@ -56,32 +52,6 @@ jobs:
|
||||
sed -i -e '136s,false,'true',g' ./helm/trivy/values.yaml
|
||||
ct lint-and-install --validate-maintainers=false --charts helm/trivy
|
||||
|
||||
# `update-chart-version` job starts if a new tag is pushed
|
||||
update-chart-version:
|
||||
if: github.event_name == 'push'
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Git user
|
||||
run: |
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "GitHub Actions"
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v3.0.1
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
aqua_opts: ""
|
||||
|
||||
- name: Create a PR with Trivy version
|
||||
run: mage helm:updateVersion
|
||||
env:
|
||||
# Use ORG_REPO_TOKEN instead of GITHUB_TOKEN
|
||||
# This allows the created PR to trigger tests and other workflows
|
||||
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
|
||||
|
||||
# `publish-chart` job starts if a PR with a new Helm Chart is merged or manually
|
||||
publish-chart:
|
||||
|
||||
8
.github/workflows/release-please.yaml
vendored
8
.github/workflows/release-please.yaml
vendored
@@ -47,10 +47,12 @@ jobs:
|
||||
- name: Extract version and PR number from commit message
|
||||
id: extract_info
|
||||
shell: bash
|
||||
env:
|
||||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
||||
run: |
|
||||
echo "version=$( echo "${{ github.event.head_commit.message }}" | sed 's/^release: v\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' )" >> $GITHUB_OUTPUT
|
||||
echo "pr_number=$( echo "${{ github.event.head_commit.message }}" | sed 's/.*(\#\([0-9]\+\)).*$/\1/' )" >> $GITHUB_OUTPUT
|
||||
echo "release_branch=release/v$( echo "${{ github.event.head_commit.message }}" | sed 's/^release: v\([0-9]\+\.[0-9]\+\).*$/\1/' )" >> $GITHUB_OUTPUT
|
||||
echo "version=$( echo "$COMMIT_MESSAGE" | sed 's/^release: v\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' )" >> $GITHUB_OUTPUT
|
||||
echo "pr_number=$( echo "$COMMIT_MESSAGE" | sed 's/.*(\#\([0-9]\+\)).*$/\1/' )" >> $GITHUB_OUTPUT
|
||||
echo "release_branch=release/v$( echo "$COMMIT_MESSAGE" | sed 's/^release: v\([0-9]\+\.[0-9]\+\).*$/\1/' )" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Tag release
|
||||
if: ${{ steps.extract_info.outputs.version }}
|
||||
|
||||
21
.github/workflows/release-pr-check.yaml
vendored
Normal file
21
.github/workflows/release-pr-check.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Backport PR Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 'release/v*'
|
||||
|
||||
jobs:
|
||||
check-pr-author:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check PR author
|
||||
id: check_author
|
||||
env:
|
||||
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
||||
run: |
|
||||
if [ "$PR_AUTHOR" != "aqua-bot" ]; then
|
||||
echo "::error::This branch is intended for automated backporting by bot. Please refer to the documentation:"
|
||||
echo "::error::https://trivy.dev/latest/community/maintainer/backporting/"
|
||||
exit 1
|
||||
fi
|
||||
32
.github/workflows/release.yaml
vendored
32
.github/workflows/release.yaml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Restore Trivy binaries from cache
|
||||
uses: actions/cache@v4.0.2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: dist/
|
||||
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
||||
@@ -55,3 +55,33 @@ jobs:
|
||||
|
||||
- name: Create deb repository
|
||||
run: ci/deploy-deb.sh
|
||||
|
||||
# `update-chart-version` creates a new PR for updating the helm chart
|
||||
update-chart-version:
|
||||
needs: deploy-packages
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Git user
|
||||
run: |
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "GitHub Actions"
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Install Go tools
|
||||
run: go install tool # GOBIN is added to the PATH by the setup-go action
|
||||
|
||||
- name: Create a PR with Trivy version
|
||||
run: mage helm:updateVersion
|
||||
env:
|
||||
# Use ORG_REPO_TOKEN instead of GITHUB_TOKEN
|
||||
# This allows the created PR to trigger tests and other workflows
|
||||
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
|
||||
|
||||
7
.github/workflows/reusable-release.yaml
vendored
7
.github/workflows/reusable-release.yaml
vendored
@@ -14,7 +14,6 @@ on:
|
||||
|
||||
env:
|
||||
GH_USER: "aqua-bot"
|
||||
GO_VERSION: '1.22'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -28,7 +27,7 @@ jobs:
|
||||
contents: read # Not required for public repositories, but for clarity
|
||||
steps:
|
||||
- name: Cosign install
|
||||
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da
|
||||
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
@@ -68,7 +67,7 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version-file: go.mod
|
||||
cache: false # Disable cache to avoid free space issues during `Post Setup Go` step.
|
||||
|
||||
- name: Generate SBOM
|
||||
@@ -120,7 +119,7 @@ jobs:
|
||||
public.ecr.aws/aquasecurity/trivy:canary
|
||||
|
||||
- name: Cache Trivy binaries
|
||||
uses: actions/cache@v4.0.2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: dist/
|
||||
# use 'github.sha' to create a unique cache folder for each run.
|
||||
|
||||
86
.github/workflows/semantic-pr.yaml
vendored
86
.github/workflows/semantic-pr.yaml
vendored
@@ -1,22 +1,23 @@
|
||||
name: "Lint PR title"
|
||||
name: "Validate PR Title"
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- edited
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
main:
|
||||
validate:
|
||||
name: Validate PR title
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: amannn/action-semantic-pull-request@v5
|
||||
- name: Validate PR title
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
types: |
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
# Valid types
|
||||
VALID_TYPES: |
|
||||
feat
|
||||
fix
|
||||
docs
|
||||
@@ -29,13 +30,15 @@ jobs:
|
||||
chore
|
||||
revert
|
||||
release
|
||||
|
||||
scopes: |
|
||||
# Valid scopes categorized by area
|
||||
VALID_SCOPES: |
|
||||
# Scanners
|
||||
vuln
|
||||
misconf
|
||||
secret
|
||||
license
|
||||
|
||||
# Targets
|
||||
image
|
||||
fs
|
||||
repo
|
||||
@@ -46,6 +49,7 @@ jobs:
|
||||
vm
|
||||
plugin
|
||||
|
||||
# OS
|
||||
alpine
|
||||
wolfi
|
||||
chainguard
|
||||
@@ -59,9 +63,12 @@ jobs:
|
||||
amazon
|
||||
suse
|
||||
photon
|
||||
echo
|
||||
distroless
|
||||
windows
|
||||
minimos
|
||||
|
||||
# Languages
|
||||
ruby
|
||||
php
|
||||
python
|
||||
@@ -71,7 +78,7 @@ jobs:
|
||||
java
|
||||
go
|
||||
c
|
||||
c\+\+
|
||||
c++
|
||||
elixir
|
||||
dart
|
||||
swift
|
||||
@@ -79,29 +86,80 @@ jobs:
|
||||
conda
|
||||
julia
|
||||
|
||||
# Package types
|
||||
os
|
||||
lang
|
||||
|
||||
# IaC
|
||||
kubernetes
|
||||
dockerfile
|
||||
terraform
|
||||
cloudformation
|
||||
|
||||
# Container
|
||||
docker
|
||||
podman
|
||||
containerd
|
||||
oci
|
||||
|
||||
# SBOM
|
||||
sbom
|
||||
spdx
|
||||
cyclonedx
|
||||
|
||||
# Misc
|
||||
cli
|
||||
flag
|
||||
|
||||
cyclonedx
|
||||
spdx
|
||||
purl
|
||||
vex
|
||||
|
||||
helm
|
||||
report
|
||||
db
|
||||
parser
|
||||
deps
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
# Convert env vars to regex alternatives, excluding comments and empty lines
|
||||
TYPES_REGEX=$(echo "$VALID_TYPES" | grep -v '^$' | paste -sd '|')
|
||||
SCOPES_REGEX=$(echo "$VALID_SCOPES" | grep -v '^$' | grep -v '^#' | paste -sd '|')
|
||||
|
||||
# Basic format check (should match: type(scope): description or type: description)
|
||||
FORMAT_REGEX="^[a-z]+(\([a-z0-9+]+\))?!?: .+$"
|
||||
if ! echo "$PR_TITLE" | grep -qE "$FORMAT_REGEX"; then
|
||||
echo "Error: Invalid PR title format"
|
||||
echo "Expected format: <type>(<scope>): <description> or <type>: <description>"
|
||||
echo "Examples:"
|
||||
echo " feat(vuln): add new vulnerability detection"
|
||||
echo " fix: correct parsing logic"
|
||||
echo " docs(kubernetes): update installation guide"
|
||||
echo -e "\nCurrent title: $PR_TITLE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract type and scope for validation
|
||||
TYPE=$(echo "$PR_TITLE" | sed -E 's/^([a-z]+)(\([a-z0-9+]+\))?!?: .+$/\1/')
|
||||
SCOPE=$(echo "$PR_TITLE" | sed -E 's/^[a-z]+\(([a-z0-9+]+)\)!?: .+$/\1/; t; s/.*//')
|
||||
|
||||
# Validate type
|
||||
if ! echo "$VALID_TYPES" | grep -qx "$TYPE"; then
|
||||
echo "Error: Invalid type '${TYPE}'"
|
||||
echo -e "\nValid types:"
|
||||
echo "$VALID_TYPES" | grep -v '^$' | sed 's/^/- /'
|
||||
echo -e "\nCurrent title: $PR_TITLE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate scope if present
|
||||
if [ -n "$SCOPE" ]; then
|
||||
if ! echo "$VALID_SCOPES" | grep -v '^#' | grep -qx "$SCOPE"; then
|
||||
echo "Error: Invalid scope '${SCOPE}'"
|
||||
echo -e "\nValid scopes:"
|
||||
echo "$VALID_SCOPES" | grep -v '^$' | grep -v '^#' | sed 's/^/- /'
|
||||
echo -e "\nCurrent title: $PR_TITLE"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "PR title validation passed ✅"
|
||||
echo "Current title: $PR_TITLE"
|
||||
|
||||
38
.github/workflows/spdx-cron.yaml
vendored
Normal file
38
.github/workflows/spdx-cron.yaml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: SPDX licenses cron
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # every Sunday at 00:00
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Check if SPDX exceptions
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4.1.6
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Install Go tools
|
||||
run: go install tool # GOBIN is added to the PATH by the setup-go action
|
||||
|
||||
- name: Check if SPDX exceptions are up-to-date
|
||||
run: |
|
||||
mage spdx:updateLicenseExceptions
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Run 'mage spdx:updateLicenseExceptions' and push it"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Microsoft Teams Notification
|
||||
uses: Skitionek/notify-microsoft-teams@e7a2493ac87dad8aa7a62f079f295e54ff511d88
|
||||
if: failure()
|
||||
with:
|
||||
webhook_url: ${{ secrets.TRIVY_MSTEAMS_WEBHOOK }}
|
||||
needs: ${{ toJson(needs) }}
|
||||
job: ${{ toJson(job) }}
|
||||
steps: ${{ toJson(steps) }}
|
||||
59
.github/workflows/test.yaml
vendored
59
.github/workflows/test.yaml
vendored
@@ -11,8 +11,6 @@ on:
|
||||
merge_group:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
GO_VERSION: '1.22'
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
@@ -26,7 +24,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
|
||||
- name: go mod tidy
|
||||
@@ -40,10 +38,10 @@ jobs:
|
||||
|
||||
- name: Lint
|
||||
id: lint
|
||||
uses: golangci/golangci-lint-action@v6.1.1
|
||||
uses: golangci/golangci-lint-action@v7.0.0
|
||||
with:
|
||||
version: v1.61
|
||||
args: --verbose --out-format=line-number
|
||||
version: v2.1
|
||||
args: --verbose
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Check if linter failed
|
||||
@@ -53,10 +51,7 @@ jobs:
|
||||
if: ${{ failure() && steps.lint.conclusion == 'failure' }}
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v3.0.1
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
aqua_opts: ""
|
||||
run: go install tool # GOBIN is added to the PATH by the setup-go action
|
||||
|
||||
- name: Check if CLI references are up-to-date
|
||||
run: |
|
||||
@@ -80,20 +75,18 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v3.0.1
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Install Go tools
|
||||
run: go install tool # GOBIN is added to the PATH by the setup-go action
|
||||
|
||||
- name: Generate image list digest
|
||||
id: image-digest
|
||||
run: |
|
||||
source integration/testimages.ini
|
||||
IMAGE_LIST=$(skopeo list-tags docker://$TEST_IMAGES)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags | sort' | sha256sum | cut -d' ' -f1)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags |= sort' | sha256sum | cut -d' ' -f1)
|
||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore test images from cache
|
||||
@@ -101,8 +94,6 @@ jobs:
|
||||
with:
|
||||
path: integration/testdata/fixtures/images
|
||||
key: cache-test-images-${{ steps.image-digest.outputs.digest }}
|
||||
restore-keys:
|
||||
cache-test-images-
|
||||
|
||||
- name: Run integration tests
|
||||
run: mage test:integration
|
||||
@@ -117,13 +108,11 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v3.0.1
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Install Go tools
|
||||
run: go install tool # GOBIN is added to the PATH by the setup-go action
|
||||
|
||||
- name: Run k8s integration tests
|
||||
run: mage test:k8s
|
||||
@@ -138,20 +127,18 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v3.0.1
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
run: go install tool # GOBIN is added to the PATH by the setup-go action
|
||||
|
||||
- name: Generate image list digest
|
||||
id: image-digest
|
||||
run: |
|
||||
source integration/testimages.ini
|
||||
IMAGE_LIST=$(skopeo list-tags docker://$TEST_IMAGES)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags | sort' | sha256sum | cut -d' ' -f1)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags |= sort' | sha256sum | cut -d' ' -f1)
|
||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore test images from cache
|
||||
@@ -159,8 +146,6 @@ jobs:
|
||||
with:
|
||||
path: integration/testdata/fixtures/images
|
||||
key: cache-test-images-${{ steps.image-digest.outputs.digest }}
|
||||
restore-keys:
|
||||
cache-test-images-
|
||||
|
||||
- name: Run module integration tests
|
||||
shell: bash
|
||||
@@ -177,20 +162,18 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v3.0.1
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Install Go tools
|
||||
run: go install tool # GOBIN is added to the PATH by the setup-go action
|
||||
|
||||
- name: Generate image list digest
|
||||
id: image-digest
|
||||
run: |
|
||||
source integration/testimages.ini
|
||||
IMAGE_LIST=$(skopeo list-tags docker://$TEST_VM_IMAGES)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags | sort' | sha256sum | cut -d' ' -f1)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags |= sort' | sha256sum | cut -d' ' -f1)
|
||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore test VM images from cache
|
||||
@@ -198,8 +181,6 @@ jobs:
|
||||
with:
|
||||
path: integration/testdata/fixtures/vm-images
|
||||
key: cache-test-vm-images-${{ steps.image-digest.outputs.digest }}
|
||||
restore-keys:
|
||||
cache-test-vm-images-
|
||||
|
||||
- name: Run vm integration tests
|
||||
run: |
|
||||
@@ -220,7 +201,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
|
||||
- name: Determine GoReleaser ID
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -26,6 +26,7 @@ thumbs.db
|
||||
coverage.txt
|
||||
integration/testdata/fixtures/images
|
||||
integration/testdata/fixtures/vm-images
|
||||
internal/gittest/testdata/test-repo
|
||||
|
||||
# SBOMs generated during CI
|
||||
/bom.json
|
||||
|
||||
318
.golangci.yaml
318
.golangci.yaml
@@ -1,144 +1,216 @@
|
||||
linters-settings:
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
list-mode: lax
|
||||
deny:
|
||||
# Cannot use gomodguard, which examines go.mod, as "golang.org/x/exp/slices" is not a module and doesn't appear in go.mod.
|
||||
- pkg: "golang.org/x/exp/slices"
|
||||
desc: "Use 'slices' instead"
|
||||
- pkg: "golang.org/x/exp/maps"
|
||||
desc: "Use 'maps' or 'github.com/samber/lo' instead"
|
||||
dupl:
|
||||
threshold: 100
|
||||
errcheck:
|
||||
check-type-assertions: true
|
||||
check-blank: true
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/aquasecurity/)
|
||||
- blank
|
||||
- dot
|
||||
goconst:
|
||||
min-len: 3
|
||||
min-occurrences: 3
|
||||
gocritic:
|
||||
disabled-checks:
|
||||
- appendAssign
|
||||
- unnamedResult
|
||||
- whyNoLint
|
||||
- indexAlloc
|
||||
- octalLiteral
|
||||
- hugeParam
|
||||
- rangeValCopy
|
||||
- regexpSimplify
|
||||
- sloppyReassign
|
||||
- commentedOutCode
|
||||
enabled-tags:
|
||||
- diagnostic
|
||||
- style
|
||||
- performance
|
||||
- experimental
|
||||
- opinionated
|
||||
settings:
|
||||
ruleguard:
|
||||
failOn: all
|
||||
rules: '${configDir}/misc/lint/rules.go'
|
||||
gocyclo:
|
||||
min-complexity: 20
|
||||
gofmt:
|
||||
simplify: false
|
||||
rewrite-rules:
|
||||
- pattern: 'interface{}'
|
||||
replacement: 'any'
|
||||
gomodguard:
|
||||
blocked:
|
||||
modules:
|
||||
- github.com/hashicorp/go-version:
|
||||
recommendations:
|
||||
- github.com/aquasecurity/go-version
|
||||
reason: "`aquasecurity/go-version` is designed for our use-cases"
|
||||
- github.com/Masterminds/semver:
|
||||
recommendations:
|
||||
- github.com/aquasecurity/go-version
|
||||
reason: "`aquasecurity/go-version` is designed for our use-cases"
|
||||
gosec:
|
||||
excludes:
|
||||
- G101
|
||||
- G114
|
||||
- G115
|
||||
- G204
|
||||
- G304
|
||||
- G402
|
||||
govet:
|
||||
check-shadowing: false
|
||||
misspell:
|
||||
locale: US
|
||||
ignore-words:
|
||||
- behaviour
|
||||
- licence
|
||||
- optimise
|
||||
- simmilar
|
||||
revive:
|
||||
ignore-generated-header: true
|
||||
testifylint:
|
||||
enable-all: true
|
||||
issues:
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
settings:
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
list-mode: lax
|
||||
deny:
|
||||
# Cannot use gomodguard, which examines go.mod, as "golang.org/x/exp/slices" is not a module and doesn't appear in go.mod.
|
||||
- pkg: "golang.org/x/exp/slices"
|
||||
desc: "Use 'slices' instead"
|
||||
- pkg: "golang.org/x/exp/maps"
|
||||
desc: "Use 'maps' or 'github.com/samber/lo' instead"
|
||||
dupl:
|
||||
threshold: 100
|
||||
errcheck:
|
||||
check-type-assertions: true
|
||||
check-blank: true
|
||||
goconst:
|
||||
min-len: 3
|
||||
min-occurrences: 3
|
||||
gocritic:
|
||||
disabled-checks:
|
||||
- appendAssign
|
||||
- commentedOutCode
|
||||
- hugeParam
|
||||
- importShadow # FIXME
|
||||
- indexAlloc
|
||||
- rangeValCopy
|
||||
- regexpSimplify
|
||||
- sloppyReassign
|
||||
- unnamedResult
|
||||
- whyNoLint
|
||||
enabled-tags:
|
||||
- diagnostic
|
||||
- style
|
||||
- performance
|
||||
- experimental
|
||||
- opinionated
|
||||
settings:
|
||||
ruleguard:
|
||||
failOn: all
|
||||
rules: '${base-path}/misc/lint/rules.go'
|
||||
gocyclo:
|
||||
min-complexity: 20
|
||||
gomodguard:
|
||||
blocked:
|
||||
modules:
|
||||
- github.com/hashicorp/go-version:
|
||||
recommendations:
|
||||
- github.com/aquasecurity/go-version
|
||||
reason: "`aquasecurity/go-version` is designed for our use-cases"
|
||||
- github.com/Masterminds/semver:
|
||||
recommendations:
|
||||
- github.com/aquasecurity/go-version
|
||||
reason: "`aquasecurity/go-version` is designed for our use-cases"
|
||||
gosec:
|
||||
excludes:
|
||||
- G101
|
||||
- G114
|
||||
- G115
|
||||
- G204
|
||||
- G304
|
||||
- G402
|
||||
govet:
|
||||
disable:
|
||||
- shadow
|
||||
misspell:
|
||||
locale: US
|
||||
ignore-rules:
|
||||
- behaviour
|
||||
- licence
|
||||
- optimise
|
||||
- simmilar
|
||||
perfsprint:
|
||||
# Optimizes even if it requires an int or uint type cast.
|
||||
int-conversion: true
|
||||
# Optimizes into `err.Error()` even if it is only equivalent for non-nil errors.
|
||||
err-error: true
|
||||
# Optimizes `fmt.Errorf`.
|
||||
errorf: true
|
||||
# Optimizes `fmt.Sprintf` with only one argument.
|
||||
sprintf1: false
|
||||
# Optimizes into strings concatenation.
|
||||
strconcat: false
|
||||
revive:
|
||||
max-open-files: 2048
|
||||
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md
|
||||
rules:
|
||||
- name: bool-literal-in-expr
|
||||
- name: context-as-argument
|
||||
arguments:
|
||||
- allowTypesBefore: "*testing.T"
|
||||
- name: duplicated-imports
|
||||
- name: early-return
|
||||
arguments:
|
||||
- preserve-scope
|
||||
- name: if-return
|
||||
- name: increment-decrement
|
||||
- name: indent-error-flow
|
||||
arguments:
|
||||
- preserve-scope
|
||||
- name: range
|
||||
- name: range-val-address
|
||||
- name: superfluous-else
|
||||
arguments:
|
||||
- preserve-scope
|
||||
- name: time-equal
|
||||
- name: unnecessary-stmt
|
||||
- name: unused-parameter
|
||||
- name: use-any
|
||||
|
||||
staticcheck:
|
||||
checks:
|
||||
- all
|
||||
- -QF1008 # Omit embedded fields from selector expression
|
||||
- -S1007 # Simplify regular expression by using raw string literal
|
||||
- -S1011 # Use a single append to concatenate two slices
|
||||
- -S1023 # Omit redundant control flow
|
||||
- -SA1019 # Using a deprecated function, variable, constant or field
|
||||
- -SA1024 # A string cutset contains duplicate characters
|
||||
- -SA4004 # The loop exits unconditionally after one iteration
|
||||
- -SA4023 # Impossible comparison of interface value with untyped nil
|
||||
- -SA4032 # Comparing runtime.GOOS or runtime.GOARCH against impossible value
|
||||
- -SA5011 # Possible nil pointer dereference
|
||||
- -ST1003 # Poorly chosen identifier
|
||||
- -ST1012 # Poorly chosen name for error variable
|
||||
|
||||
testifylint:
|
||||
enable-all: true
|
||||
|
||||
default: none
|
||||
|
||||
enable:
|
||||
- bodyclose
|
||||
- depguard
|
||||
- gci
|
||||
- goconst
|
||||
- gocritic
|
||||
- gocyclo
|
||||
- gofmt
|
||||
- gomodguard
|
||||
- gosec
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
- perfsprint
|
||||
- revive
|
||||
- tenv
|
||||
- staticcheck
|
||||
- testifylint
|
||||
- typecheck
|
||||
- unconvert
|
||||
- unused
|
||||
- usestdlibvars
|
||||
- usetesting
|
||||
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- "pkg/iac/scanners/terraform/parser/funcs" # copies of Terraform functions
|
||||
rules:
|
||||
- path: ".*_test.go$"
|
||||
linters:
|
||||
- goconst
|
||||
- gosec
|
||||
- unused
|
||||
- path: ".*_test.go$"
|
||||
linters:
|
||||
- govet
|
||||
text: "copylocks:"
|
||||
- path: ".*_test.go$"
|
||||
linters:
|
||||
- gocritic
|
||||
text: "commentFormatting:"
|
||||
- path: ".*_test.go$"
|
||||
linters:
|
||||
- gocritic
|
||||
text: "exitAfterDefer:"
|
||||
- path: ".*_test.go$"
|
||||
linters:
|
||||
- gocritic
|
||||
text: "importShadow:"
|
||||
- linters:
|
||||
- goconst
|
||||
text: "string `each` has 3 occurrences, make it a constant" # FIXME
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
warn-unused: true
|
||||
|
||||
run:
|
||||
go: '1.22'
|
||||
go: '1.24'
|
||||
timeout: 30m
|
||||
|
||||
issues:
|
||||
exclude-files:
|
||||
- "mock_*.go$"
|
||||
- "examples/*"
|
||||
exclude-dirs:
|
||||
- "pkg/iac/scanners/terraform/parser/funcs" # copies of Terraform functions
|
||||
exclude-rules:
|
||||
- path: ".*_test.go$"
|
||||
linters:
|
||||
- goconst
|
||||
- gosec
|
||||
- unused
|
||||
- path: ".*_test.go$"
|
||||
linters:
|
||||
- govet
|
||||
text: "copylocks:"
|
||||
- path: ".*_test.go$"
|
||||
linters:
|
||||
- gocritic
|
||||
text: "commentFormatting:"
|
||||
- path: ".*_test.go$"
|
||||
linters:
|
||||
- gocritic
|
||||
text: "exitAfterDefer:"
|
||||
- path: ".*_test.go$"
|
||||
linters:
|
||||
- gocritic
|
||||
text: "importShadow:"
|
||||
exclude-use-default: false
|
||||
max-same-issues: 0
|
||||
formatters:
|
||||
enable:
|
||||
- gci
|
||||
- gofmt
|
||||
|
||||
exclusions:
|
||||
generated: lax
|
||||
|
||||
settings:
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/aquasecurity/)
|
||||
- blank
|
||||
- dot
|
||||
gofmt:
|
||||
simplify: false
|
||||
|
||||
version: "2"
|
||||
|
||||
@@ -1 +1 @@
|
||||
{".":"0.58.2"}
|
||||
{".":"0.63.0"}
|
||||
|
||||
@@ -540,6 +540,65 @@
|
||||
"status": "not_affected",
|
||||
"justification": "vulnerable_code_not_in_execute_path",
|
||||
"impact_statement": "Govulncheck determined that the vulnerable code isn't called"
|
||||
},
|
||||
{
|
||||
"vulnerability": {
|
||||
"@id": "https://pkg.go.dev/vuln/GO-2024-3321",
|
||||
"name": "GO-2024-3321",
|
||||
"description": "Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in golang.org/x/crypto",
|
||||
"aliases": [
|
||||
"CVE-2024-45337",
|
||||
"GHSA-v778-237x-gjrc"
|
||||
]
|
||||
},
|
||||
"products": [
|
||||
{
|
||||
"@id": "pkg:golang/github.com/aquasecurity/trivy",
|
||||
"identifiers": {
|
||||
"purl": "pkg:golang/github.com/aquasecurity/trivy"
|
||||
},
|
||||
"subcomponents": [
|
||||
{
|
||||
"@id": "pkg:golang/golang.org/x/crypto",
|
||||
"identifiers": {
|
||||
"purl": "pkg:golang/golang.org/x/crypto"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"status": "not_affected",
|
||||
"justification": "vulnerable_code_not_in_execute_path",
|
||||
"impact_statement": "Govulncheck determined that the vulnerable code isn't called"
|
||||
},
|
||||
{
|
||||
"vulnerability": {
|
||||
"@id": "https://pkg.go.dev/vuln/GO-2024-3333",
|
||||
"name": "GO-2024-3333",
|
||||
"description": "Non-linear parsing of case-insensitive content in golang.org/x/net/html",
|
||||
"aliases": [
|
||||
"CVE-2024-45338"
|
||||
]
|
||||
},
|
||||
"products": [
|
||||
{
|
||||
"@id": "pkg:golang/github.com/aquasecurity/trivy",
|
||||
"identifiers": {
|
||||
"purl": "pkg:golang/github.com/aquasecurity/trivy"
|
||||
},
|
||||
"subcomponents": [
|
||||
{
|
||||
"@id": "pkg:golang/golang.org/x/net",
|
||||
"identifiers": {
|
||||
"purl": "pkg:golang/golang.org/x/net"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"status": "not_affected",
|
||||
"justification": "vulnerable_code_not_in_execute_path",
|
||||
"impact_statement": "Govulncheck determined that the vulnerable code isn't called"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
214
CHANGELOG.md
214
CHANGELOG.md
@@ -1,27 +1,215 @@
|
||||
# Changelog
|
||||
|
||||
## [0.58.2](https://github.com/aquasecurity/trivy/compare/v0.58.1...v0.58.2) (2025-01-13)
|
||||
## [0.63.0](https://github.com/aquasecurity/trivy/compare/v0.62.0...v0.63.0) (2025-05-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Bottlerocket OS package analyzer ([#8653](https://github.com/aquasecurity/trivy/issues/8653)) ([07ef63b](https://github.com/aquasecurity/trivy/commit/07ef63b4830f9f3d791a07433287a99118d7590a))
|
||||
* add JSONC support for comments and trailing commas ([#8862](https://github.com/aquasecurity/trivy/issues/8862)) ([0b0e406](https://github.com/aquasecurity/trivy/commit/0b0e4061ef955efc0f94280d2d390f11ff6e2409))
|
||||
* **alpine:** add maintainer field extraction for APK packages ([#8930](https://github.com/aquasecurity/trivy/issues/8930)) ([104bbc1](https://github.com/aquasecurity/trivy/commit/104bbc18ea85caec17125296dc4fe2dea9c49826))
|
||||
* **cli:** Add available version checking ([#8553](https://github.com/aquasecurity/trivy/issues/8553)) ([5a0bf9e](https://github.com/aquasecurity/trivy/commit/5a0bf9ed31ad34248895e69231da602935e66785))
|
||||
* **echo:** Add Echo Support ([#8833](https://github.com/aquasecurity/trivy/issues/8833)) ([c7b8cc3](https://github.com/aquasecurity/trivy/commit/c7b8cc392eb28eb63e10561cf1ff7991e5e3c548))
|
||||
* **go:** support license scanning in both GOPATH and vendor ([#8843](https://github.com/aquasecurity/trivy/issues/8843)) ([26437be](https://github.com/aquasecurity/trivy/commit/26437be083960d17bee8b1b37b8a6780eff07981))
|
||||
* **k8s:** get components from namespaced resources ([#8918](https://github.com/aquasecurity/trivy/issues/8918)) ([4f1ab23](https://github.com/aquasecurity/trivy/commit/4f1ab238693919772a65450de9fb9fb2f873c0d6))
|
||||
* **license:** improve work text licenses with custom classification ([#8888](https://github.com/aquasecurity/trivy/issues/8888)) ([ee52230](https://github.com/aquasecurity/trivy/commit/ee522300b73a2afc72829fc2fa7ff419712fc89a))
|
||||
* **license:** improve work with custom classification of licenses from config file ([#8861](https://github.com/aquasecurity/trivy/issues/8861)) ([c321fdf](https://github.com/aquasecurity/trivy/commit/c321fdfcdd58f34d076fc730e2b63fdd13e426a9))
|
||||
* **license:** scan vendor directory for license for go.mod files ([#8689](https://github.com/aquasecurity/trivy/issues/8689)) ([dd6a6e5](https://github.com/aquasecurity/trivy/commit/dd6a6e50a44b7b543fd9dba634da599a76650acb))
|
||||
* **license:** Support compound licenses (licenses using SPDX operators) ([#8816](https://github.com/aquasecurity/trivy/issues/8816)) ([39f9ed1](https://github.com/aquasecurity/trivy/commit/39f9ed128b2c0fb599ad9092a3cf5675106bffdc))
|
||||
* **minimos:** Add support for MinimOS ([#8792](https://github.com/aquasecurity/trivy/issues/8792)) ([c2dde33](https://github.com/aquasecurity/trivy/commit/c2dde33c3f19d499258a7089d7658a9f90722acf))
|
||||
* **misconf:** add misconfiguration location to junit template ([#8793](https://github.com/aquasecurity/trivy/issues/8793)) ([a516775](https://github.com/aquasecurity/trivy/commit/a516775da6fda92a55a62418a081561127a1d5ca))
|
||||
* **misconf:** Add support for `Minimum Trivy Version` ([#8880](https://github.com/aquasecurity/trivy/issues/8880)) ([3b2a397](https://github.com/aquasecurity/trivy/commit/3b2a3976ac7e7785828655903b132e84ebd9d727))
|
||||
* **misconf:** export raw Terraform data to Rego ([#8741](https://github.com/aquasecurity/trivy/issues/8741)) ([aaecc29](https://github.com/aquasecurity/trivy/commit/aaecc29e909db4d5dac03caa0daf223035bfb877))
|
||||
* **nodejs:** add a bun.lock analyzer ([#8897](https://github.com/aquasecurity/trivy/issues/8897)) ([7ca656d](https://github.com/aquasecurity/trivy/commit/7ca656d54b99346253fc6ac6422eecaca169514e))
|
||||
* **nodejs:** add bun.lock parser ([#8851](https://github.com/aquasecurity/trivy/issues/8851)) ([1dcf816](https://github.com/aquasecurity/trivy/commit/1dcf81666f1c814600702b9ab603b4070da0b940))
|
||||
* terraform parser option to set current working directory ([#8909](https://github.com/aquasecurity/trivy/issues/8909)) ([8939451](https://github.com/aquasecurity/trivy/commit/893945117464bf6e090a55e3822f8299825f26d4))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* CVE-2025-21613 and CVE-2025-21614 : go-git: argument injection via the URL field [backport: release/v0.58] ([#8215](https://github.com/aquasecurity/trivy/issues/8215)) ([b733ecc](https://github.com/aquasecurity/trivy/commit/b733ecc7bc752d61837d08f2650bd480b645bb1d))
|
||||
* **misconf:** allow null values only for tf variables [backport: release/v0.58] ([#8238](https://github.com/aquasecurity/trivy/issues/8238)) ([f72d2bc](https://github.com/aquasecurity/trivy/commit/f72d2bce8d3418dbcb670434bc15bb857b421f98))
|
||||
* **suse:** SUSE - update OSType constants and references for compatility [backport: release/v0.58] ([#8237](https://github.com/aquasecurity/trivy/issues/8237)) ([2896367](https://github.com/aquasecurity/trivy/commit/289636758eccf990f36ea2be34f6db2c02cfab6b))
|
||||
* check post-analyzers for StaticPaths ([#8904](https://github.com/aquasecurity/trivy/issues/8904)) ([93e6680](https://github.com/aquasecurity/trivy/commit/93e6680b1c6bbb590157f521c667c0f611775143))
|
||||
* **cli:** disable `--skip-dir` and `--skip-files` flags for `sbom` command ([#8886](https://github.com/aquasecurity/trivy/issues/8886)) ([69a5fa1](https://github.com/aquasecurity/trivy/commit/69a5fa18ca86ff7e5206abacf98732d46c000c7a))
|
||||
* **cli:** don't use allow values for `--compliance` flag ([#8881](https://github.com/aquasecurity/trivy/issues/8881)) ([35e8889](https://github.com/aquasecurity/trivy/commit/35e88890c3c201b3eb11f95376172e57bf44df4b))
|
||||
* filter all files when processing files installed from package managers ([#8842](https://github.com/aquasecurity/trivy/issues/8842)) ([6ebde88](https://github.com/aquasecurity/trivy/commit/6ebde88dbcaf22f25932bad4844b3c9eaca90560))
|
||||
* **java:** exclude dev dependencies in gradle lockfile ([#8803](https://github.com/aquasecurity/trivy/issues/8803)) ([8995838](https://github.com/aquasecurity/trivy/commit/8995838e8d184ee9178d5b52d2d3fa9b4e403015))
|
||||
* julia parser panicing ([#8883](https://github.com/aquasecurity/trivy/issues/8883)) ([be8c7b7](https://github.com/aquasecurity/trivy/commit/be8c7b796dbe36d8dc3889e0bdea23336de9a1ab))
|
||||
* **julia:** add `Relationship` field support ([#8939](https://github.com/aquasecurity/trivy/issues/8939)) ([22f040f](https://github.com/aquasecurity/trivy/commit/22f040f94790060132c7b0a635f44c35d5a35fb6))
|
||||
* **k8s:** use in-memory cache backend during misconfig scanning ([#8873](https://github.com/aquasecurity/trivy/issues/8873)) ([fe12771](https://github.com/aquasecurity/trivy/commit/fe127715e505d753e0d878d52c5f280cdc326b76))
|
||||
* **misconf:** check if for-each is known when expanding dyn block ([#8808](https://github.com/aquasecurity/trivy/issues/8808)) ([5706603](https://github.com/aquasecurity/trivy/commit/570660314698472ab831a7e0d55044e0b1e9c6c0))
|
||||
* **misconf:** use argument value in WithIncludeDeprecatedChecks ([#8942](https://github.com/aquasecurity/trivy/issues/8942)) ([7e9a54c](https://github.com/aquasecurity/trivy/commit/7e9a54cd6bf4bc15e485c6233d140b389e432fe5))
|
||||
* more revive rules ([#8814](https://github.com/aquasecurity/trivy/issues/8814)) ([3ab459e](https://github.com/aquasecurity/trivy/commit/3ab459e3b674f319bf349d478917a531a69754c0))
|
||||
* octalLiteral from go-critic ([#8811](https://github.com/aquasecurity/trivy/issues/8811)) ([a19e0aa](https://github.com/aquasecurity/trivy/commit/a19e0aa1ba0350198c898fd57c9405fbf38fa432))
|
||||
* **redhat:** Also try to find buildinfo in root layer (layer 0) ([#8924](https://github.com/aquasecurity/trivy/issues/8924)) ([906b037](https://github.com/aquasecurity/trivy/commit/906b037cff97060267d20f8947f429e078419d66))
|
||||
* **redhat:** save contentSets for OS packages in fs/vm modes ([#8820](https://github.com/aquasecurity/trivy/issues/8820)) ([9256804](https://github.com/aquasecurity/trivy/commit/9256804df8577d8a746fb8b97c508c247ab82f8f))
|
||||
* **redhat:** trim invalid suffix from content_sets in manifest parsing ([#8818](https://github.com/aquasecurity/trivy/issues/8818)) ([fa1077b](https://github.com/aquasecurity/trivy/commit/fa1077bbf5863a519f6f180a600afe5e2d6180d8))
|
||||
* **server:** add missed Relationship field for `rpc` ([#8872](https://github.com/aquasecurity/trivy/issues/8872)) ([38f17c9](https://github.com/aquasecurity/trivy/commit/38f17c945e3ef7784607037c0457fb1e06a99959))
|
||||
* use-any from revive ([#8810](https://github.com/aquasecurity/trivy/issues/8810)) ([883c63b](https://github.com/aquasecurity/trivy/commit/883c63bf29568f0feab37e5d36ae1c417eef88f5))
|
||||
* **vex:** use `lo.IsNil` to check `VEX` from OCI artifact ([#8858](https://github.com/aquasecurity/trivy/issues/8858)) ([e97af98](https://github.com/aquasecurity/trivy/commit/e97af9806ab13e1ec8b792e0586b486c4982c170))
|
||||
* **wolfi:** support new APK database location ([#8937](https://github.com/aquasecurity/trivy/issues/8937)) ([b15d9a6](https://github.com/aquasecurity/trivy/commit/b15d9a60e6a3ed40811d5ca6387082266ae92ea7))
|
||||
|
||||
## [0.58.1](https://github.com/aquasecurity/trivy/compare/v0.58.0...v0.58.1) (2024-12-24)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **secret:** only match secrets of meaningful length, allow example strings to not be matched ([#8602](https://github.com/aquasecurity/trivy/issues/8602)) ([60fef1b](https://github.com/aquasecurity/trivy/commit/60fef1b615a765248c5870b814ba0c4345220c0e))
|
||||
|
||||
## [0.62.0](https://github.com/aquasecurity/trivy/compare/v0.61.0...v0.62.0) (2025-04-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **image:** save layers metadata into report ([#8394](https://github.com/aquasecurity/trivy/issues/8394)) ([a95cab0](https://github.com/aquasecurity/trivy/commit/a95cab0eab0fcaab57eb554e74e17da71bc4809f))
|
||||
* **misconf:** add option to pass Rego scanner to IaC scanner ([#8369](https://github.com/aquasecurity/trivy/issues/8369)) ([890a360](https://github.com/aquasecurity/trivy/commit/890a3602444ad2e5320044c9b8cc79ca883d17ec))
|
||||
* **misconf:** convert AWS managed policy to document ([#8757](https://github.com/aquasecurity/trivy/issues/8757)) ([7abf5f0](https://github.com/aquasecurity/trivy/commit/7abf5f0199ec65c40056d4f9addc3d27e373725a))
|
||||
* **misconf:** support auto_provisioning_defaults in google_container_cluster ([#8705](https://github.com/aquasecurity/trivy/issues/8705)) ([9792611](https://github.com/aquasecurity/trivy/commit/9792611b36271efbf79f635deebae7e51f497b70))
|
||||
* **nodejs:** add root and workspace for `yarn` packages ([#8535](https://github.com/aquasecurity/trivy/issues/8535)) ([bf4cd4f](https://github.com/aquasecurity/trivy/commit/bf4cd4f2d2dda0bb3a7018606db9a6c1e56e4f38))
|
||||
* **rust:** add root and workspace relationships/package for `cargo` lock files ([#8676](https://github.com/aquasecurity/trivy/issues/8676)) ([93efe07](https://github.com/aquasecurity/trivy/commit/93efe0789ed9d9a71e04e93d87be63032ad9cae7))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* handle `BLOW_UNKNOWN` error to download DBs [backport: release/v0.58] ([#8121](https://github.com/aquasecurity/trivy/issues/8121)) ([9a56e7c](https://github.com/aquasecurity/trivy/commit/9a56e7cd6964ffd4187a8e44a36d49b54587db56))
|
||||
* **java:** correctly overwrite version from depManagement if dependency uses `project.*` props [backport: release/v0.58] ([#8119](https://github.com/aquasecurity/trivy/issues/8119)) ([4278a09](https://github.com/aquasecurity/trivy/commit/4278a09f59590ee16494e0a1ad31fb374f2e243f))
|
||||
* **oracle:** add architectures support for advisories [backport: release/v0.58] ([#8125](https://github.com/aquasecurity/trivy/issues/8125)) ([89b341f](https://github.com/aquasecurity/trivy/commit/89b341f0c6dc7f24239f9a9e4809524ec289a864))
|
||||
* **python:** skip dev group's deps for poetry [backport: release/v0.58] ([#8158](https://github.com/aquasecurity/trivy/issues/8158)) ([8b93081](https://github.com/aquasecurity/trivy/commit/8b930816bc527166ced5d57754ad7fccb1cef832))
|
||||
* **redhat:** correct rewriting of recommendations for the same vulnerability [backport: release/v0.58] ([#8135](https://github.com/aquasecurity/trivy/issues/8135)) ([33818e1](https://github.com/aquasecurity/trivy/commit/33818e121f989fd12c15aa65affd2d01b867db61))
|
||||
* **sbom:** attach nested packages to Application [backport: release/v0.58] ([#8168](https://github.com/aquasecurity/trivy/issues/8168)) ([03160e4](https://github.com/aquasecurity/trivy/commit/03160e4fd1b0a6aef8c4f3d96529e68fed7e70ee))
|
||||
* **sbom:** fix wrong overwriting of applications obtained from different sbom files but having same app type [backport: release/v0.58] ([#8124](https://github.com/aquasecurity/trivy/issues/8124)) ([f842fe1](https://github.com/aquasecurity/trivy/commit/f842fe1675b434e72a8194628525c42fd3e155af))
|
||||
* **sbom:** use root package for `unknown` dependencies (if exists) [backport: release/v0.58] ([#8156](https://github.com/aquasecurity/trivy/issues/8156)) ([18cd1a5](https://github.com/aquasecurity/trivy/commit/18cd1a59cbb32d87371fe8ab24497f06855e0c80))
|
||||
* early-return, indent-error-flow and superfluous-else rules from revive ([#8796](https://github.com/aquasecurity/trivy/issues/8796)) ([43350dd](https://github.com/aquasecurity/trivy/commit/43350dd9b487b39d7d19bd0875274c90262dbed9))
|
||||
* **k8s:** correct compare artifact versions ([#8682](https://github.com/aquasecurity/trivy/issues/8682)) ([cc47711](https://github.com/aquasecurity/trivy/commit/cc4771158b72b88258057fa379deba9f39190994))
|
||||
* **k8s:** remove using `last-applied-configuration` ([#8791](https://github.com/aquasecurity/trivy/issues/8791)) ([7a58ccb](https://github.com/aquasecurity/trivy/commit/7a58ccbc7fffdfb1e5ccff9fd4cb6ca08c03a9ea))
|
||||
* **k8s:** skip passed misconfigs for the summary report ([#8684](https://github.com/aquasecurity/trivy/issues/8684)) ([bff0e9b](https://github.com/aquasecurity/trivy/commit/bff0e9b034f39d0d1ca02457558b1f89847009ac))
|
||||
* **misconf:** add missing variable as unknown ([#8683](https://github.com/aquasecurity/trivy/issues/8683)) ([9dcd06f](https://github.com/aquasecurity/trivy/commit/9dcd06fda717347eab1ac8ef0710687a3bfd8588))
|
||||
* **misconf:** check if metadata is not nil ([#8647](https://github.com/aquasecurity/trivy/issues/8647)) ([b7dfd64](https://github.com/aquasecurity/trivy/commit/b7dfd64987b94b4bdd8b7c5a68ba2b8f1a0a9198))
|
||||
* **misconf:** filter null nodes when parsing json manifest ([#8785](https://github.com/aquasecurity/trivy/issues/8785)) ([e10929a](https://github.com/aquasecurity/trivy/commit/e10929a669f43861bae80652bdfc9f39fad7225f))
|
||||
* **misconf:** perform operations on attribute safely ([#8774](https://github.com/aquasecurity/trivy/issues/8774)) ([3ce7d59](https://github.com/aquasecurity/trivy/commit/3ce7d59bb16553ab487762a5a660a046bcd63334))
|
||||
* **misconf:** populate context correctly for module instances ([#8656](https://github.com/aquasecurity/trivy/issues/8656)) ([efd177b](https://github.com/aquasecurity/trivy/commit/efd177b300950d82e381992e1dea39308cc39bc3))
|
||||
* **report:** clean buffer after flushing ([#8725](https://github.com/aquasecurity/trivy/issues/8725)) ([9a5383e](https://github.com/aquasecurity/trivy/commit/9a5383e993222d919d63f8d9934729cf4e291c06))
|
||||
* **secret:** ignore .dist-info directories during secret scanning ([#8646](https://github.com/aquasecurity/trivy/issues/8646)) ([a032ad6](https://github.com/aquasecurity/trivy/commit/a032ad696aa58850b9576d889128559149282ad3))
|
||||
* **server:** fix redis key when trying to delete blob ([#8649](https://github.com/aquasecurity/trivy/issues/8649)) ([36f8d0f](https://github.com/aquasecurity/trivy/commit/36f8d0fd6705bb0da5b43507128c772b153dafec))
|
||||
* **terraform:** `evaluateStep` to correctly set `EvalContext` for multiple instances of blocks ([#8555](https://github.com/aquasecurity/trivy/issues/8555)) ([e25de25](https://github.com/aquasecurity/trivy/commit/e25de25262fd1cd559879dee07bb2db2747eedd4))
|
||||
* **terraform:** hcl object expressions to return references ([#8271](https://github.com/aquasecurity/trivy/issues/8271)) ([0d3efa5](https://github.com/aquasecurity/trivy/commit/0d3efa5dc150dba437d975a2f8335de8786f94d6))
|
||||
* testifylint last issues ([#8768](https://github.com/aquasecurity/trivy/issues/8768)) ([ee4f7dc](https://github.com/aquasecurity/trivy/commit/ee4f7dc6b4be437666e91383406bba8443eec199))
|
||||
* unused-parameter rule from revive ([#8794](https://github.com/aquasecurity/trivy/issues/8794)) ([6562082](https://github.com/aquasecurity/trivy/commit/6562082e280a9df6199892927f2e3f7dc8f0c8ce))
|
||||
|
||||
## [0.61.0](https://github.com/aquasecurity/trivy/compare/v0.60.0...v0.61.0) (2025-03-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **fs:** optimize scanning performance by direct file access for known paths ([#8525](https://github.com/aquasecurity/trivy/issues/8525)) ([8bf6caf](https://github.com/aquasecurity/trivy/commit/8bf6caf98e2b1eff7bd16987f6791122d827747c))
|
||||
* **k8s:** add support for controllers ([#8614](https://github.com/aquasecurity/trivy/issues/8614)) ([1bf0117](https://github.com/aquasecurity/trivy/commit/1bf0117f776953bbfe67cf32e4231360010fdf33))
|
||||
* **misconf:** adapt aws_default_security_group ([#8538](https://github.com/aquasecurity/trivy/issues/8538)) ([b57eccb](https://github.com/aquasecurity/trivy/commit/b57eccb09c33df4ad0423fb148ddeaa292028401))
|
||||
* **misconf:** adapt aws_opensearch_domain ([#8550](https://github.com/aquasecurity/trivy/issues/8550)) ([9913465](https://github.com/aquasecurity/trivy/commit/9913465a535c29b377bd2f2563163ccf7cbcd6a4))
|
||||
* **misconf:** adapt AWS::DynamoDB::Table ([#8529](https://github.com/aquasecurity/trivy/issues/8529)) ([8112cdf](https://github.com/aquasecurity/trivy/commit/8112cdf8d638fa2bf57e5687e32f54b704c7e6b7))
|
||||
* **misconf:** adapt AWS::EC2::VPC ([#8534](https://github.com/aquasecurity/trivy/issues/8534)) ([0d9865f](https://github.com/aquasecurity/trivy/commit/0d9865f48f46e85595af40140faa5ff6f02b9a02))
|
||||
* **misconf:** Add support for aws_ami ([#8499](https://github.com/aquasecurity/trivy/issues/8499)) ([573502e](https://github.com/aquasecurity/trivy/commit/573502e2e83ff18020d5e7dcad498468a548733e))
|
||||
* replace TinyGo with standard Go for WebAssembly modules ([#8496](https://github.com/aquasecurity/trivy/issues/8496)) ([529957e](https://github.com/aquasecurity/trivy/commit/529957eac1fc790c57fa3d93524a901ce842a9f5))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **debian:** don't include empty licenses for `dpkgs` ([#8623](https://github.com/aquasecurity/trivy/issues/8623)) ([346f5b3](https://github.com/aquasecurity/trivy/commit/346f5b3553b9247f99f89d859d4f835e955d34e9))
|
||||
* **fs:** check postAnalyzers for StaticPaths ([#8543](https://github.com/aquasecurity/trivy/issues/8543)) ([c228307](https://github.com/aquasecurity/trivy/commit/c22830766e8cf1532f20198864757161eed6fda4))
|
||||
* **k8s:** show report for `--report all` ([#8613](https://github.com/aquasecurity/trivy/issues/8613)) ([dbb6f28](https://github.com/aquasecurity/trivy/commit/dbb6f288712240ef5dec59952e33b73e3a6d5b06))
|
||||
* **misconf:** add ephemeral block type to config schema ([#8513](https://github.com/aquasecurity/trivy/issues/8513)) ([41512f8](https://github.com/aquasecurity/trivy/commit/41512f846e75bae73984138ad7b3d03284a53f19))
|
||||
* **misconf:** Check values wholly prior to evalution ([#8604](https://github.com/aquasecurity/trivy/issues/8604)) ([ad58cf4](https://github.com/aquasecurity/trivy/commit/ad58cf4457ebef80ff0bc4c113d4ab4c86a9fe56))
|
||||
* **misconf:** do not skip loading documents from subdirectories ([#8526](https://github.com/aquasecurity/trivy/issues/8526)) ([de7eb13](https://github.com/aquasecurity/trivy/commit/de7eb13938f2709983a27ab3f59dbfac3fb74651))
|
||||
* **misconf:** do not use cty.NilVal for non-nil values ([#8567](https://github.com/aquasecurity/trivy/issues/8567)) ([400a79c](https://github.com/aquasecurity/trivy/commit/400a79c2c693e462ad2e1cfc21305ef13d2ec224))
|
||||
* **misconf:** identify the chart file exactly by name ([#8590](https://github.com/aquasecurity/trivy/issues/8590)) ([ba77dbe](https://github.com/aquasecurity/trivy/commit/ba77dbe5f952d67bbbbc0f43543d5f34135bc280))
|
||||
* **misconf:** Improve logging for unsupported checks ([#8634](https://github.com/aquasecurity/trivy/issues/8634)) ([5b7704d](https://github.com/aquasecurity/trivy/commit/5b7704d1d091a12822df060ee7a679135185f2ae))
|
||||
* **misconf:** set default values for AWS::EKS::Cluster.ResourcesVpcConfig ([#8548](https://github.com/aquasecurity/trivy/issues/8548)) ([1f05b45](https://github.com/aquasecurity/trivy/commit/1f05b4545d8f1de3ee703de66a7b3df2baaa07a7))
|
||||
* **misconf:** skip Azure CreateUiDefinition ([#8503](https://github.com/aquasecurity/trivy/issues/8503)) ([c7814f1](https://github.com/aquasecurity/trivy/commit/c7814f1401b0cc66a557292fe07da24d0ea7b5cc))
|
||||
* **spdx:** save text licenses into `otherLicenses` without normalize ([#8502](https://github.com/aquasecurity/trivy/issues/8502)) ([e5072f1](https://github.com/aquasecurity/trivy/commit/e5072f1eef8f3a78f4db48b4ac3f7c48aeec5e92))
|
||||
* use `--file-patterns` flag for all post analyzers ([#7365](https://github.com/aquasecurity/trivy/issues/7365)) ([8b88238](https://github.com/aquasecurity/trivy/commit/8b88238f07e389cc32e2478f84aceaf860e421ef))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **misconf:** parse input for Rego once ([#8483](https://github.com/aquasecurity/trivy/issues/8483)) ([0e5e909](https://github.com/aquasecurity/trivy/commit/0e5e9097650f60bc54f47a21ecc937a66e66e225))
|
||||
* **misconf:** retrieve check metadata from annotations once ([#8478](https://github.com/aquasecurity/trivy/issues/8478)) ([7b96351](https://github.com/aquasecurity/trivy/commit/7b96351c32d264d136978fe8fd9e113ada69bb2b))
|
||||
|
||||
## [0.60.0](https://github.com/aquasecurity/trivy/compare/v0.59.0...v0.60.0) (2025-03-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `--vuln-severity-source` flag ([#8269](https://github.com/aquasecurity/trivy/issues/8269)) ([d464807](https://github.com/aquasecurity/trivy/commit/d4648073211e8451d66e4c0399e9441250b60a76))
|
||||
* add report summary table ([#8177](https://github.com/aquasecurity/trivy/issues/8177)) ([dd54f80](https://github.com/aquasecurity/trivy/commit/dd54f80d3fda7821dba13553480e9893ba8b4cb3))
|
||||
* **cyclonedx:** Add initial support for loading external VEX files from SBOM references ([#8254](https://github.com/aquasecurity/trivy/issues/8254)) ([4820eb7](https://github.com/aquasecurity/trivy/commit/4820eb70fc926a35d759c373112dbbdca890fd46))
|
||||
* **go:** fix parsing main module version for go >= 1.24 ([#8433](https://github.com/aquasecurity/trivy/issues/8433)) ([e58dcfc](https://github.com/aquasecurity/trivy/commit/e58dcfcf9f102c12825d5343ebbcc12a2d6c05c5))
|
||||
* **misconf:** render causes for Terraform ([#8360](https://github.com/aquasecurity/trivy/issues/8360)) ([a99498c](https://github.com/aquasecurity/trivy/commit/a99498cdd9b7bdac000140af6654bfe30135242d))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **db:** fix case when 2 trivy-db were copied at the same time ([#8452](https://github.com/aquasecurity/trivy/issues/8452)) ([bb3cca6](https://github.com/aquasecurity/trivy/commit/bb3cca6018551e96fdd357563dc177215ca29bd4))
|
||||
* don't use `scope` for `trivy registry login` command ([#8393](https://github.com/aquasecurity/trivy/issues/8393)) ([8715e5d](https://github.com/aquasecurity/trivy/commit/8715e5d14a727667c2e62d6f7a4b5308a0323386))
|
||||
* **go:** merge nested flags into string for ldflags for Go binaries ([#8368](https://github.com/aquasecurity/trivy/issues/8368)) ([b675b06](https://github.com/aquasecurity/trivy/commit/b675b06e897aaf374e7b1262d4323060a8a62edb))
|
||||
* **image:** disable AVD-DS-0007 for history scanning ([#8366](https://github.com/aquasecurity/trivy/issues/8366)) ([a3cd693](https://github.com/aquasecurity/trivy/commit/a3cd693a5ea88def2f9057df6178b0c0e7a6bdb0))
|
||||
* **k8s:** add missed option `PkgRelationships` ([#8442](https://github.com/aquasecurity/trivy/issues/8442)) ([f987e41](https://github.com/aquasecurity/trivy/commit/f987e4157494434f6e4e4566fedfedda92167565))
|
||||
* **misconf:** do not log scanners when misconfig scanning is disabled ([#8345](https://github.com/aquasecurity/trivy/issues/8345)) ([5695eb2](https://github.com/aquasecurity/trivy/commit/5695eb22dfed672eafacb64a71da8e9bdfbaab87))
|
||||
* **misconf:** ecs include enhanced for container insights ([#8326](https://github.com/aquasecurity/trivy/issues/8326)) ([39789ff](https://github.com/aquasecurity/trivy/commit/39789fff438d11bc6eccd254b3b890beb68c240b))
|
||||
* **misconf:** fix incorrect k8s locations due to JSON to YAML conversion ([#8073](https://github.com/aquasecurity/trivy/issues/8073)) ([a994453](https://github.com/aquasecurity/trivy/commit/a994453a7d0f543fe30c4dc8adbc92ad0c21bcbc))
|
||||
* **os:** add mapping OS aliases ([#8466](https://github.com/aquasecurity/trivy/issues/8466)) ([6b4cebe](https://github.com/aquasecurity/trivy/commit/6b4cebe9592f3a06bd91aa58ba6d65869afebbee))
|
||||
* **python:** add `poetry` v2 support ([#8323](https://github.com/aquasecurity/trivy/issues/8323)) ([10cd98c](https://github.com/aquasecurity/trivy/commit/10cd98cf55263749cb2583063a2e9e9953c7371a))
|
||||
* **report:** remove html escaping for `shortDescription` and `fullDescription` fields for sarif reports ([#8344](https://github.com/aquasecurity/trivy/issues/8344)) ([3eb0b03](https://github.com/aquasecurity/trivy/commit/3eb0b03f7c9ee462daccfacb291b2c463d848ff5))
|
||||
* **sbom:** add SBOM file's filePath as Application FilePath if we can't detect its path ([#8346](https://github.com/aquasecurity/trivy/issues/8346)) ([ecc01bb](https://github.com/aquasecurity/trivy/commit/ecc01bb3fb876fd0cc503cb38efa23e4fb9484b4))
|
||||
* **sbom:** improve logic for binding direct dependency to parent component ([#8489](https://github.com/aquasecurity/trivy/issues/8489)) ([85cca8c](https://github.com/aquasecurity/trivy/commit/85cca8c07affee4ded5c232efb45b05dacf22242))
|
||||
* **sbom:** preserve OS packages from multiple SBOMs ([#8325](https://github.com/aquasecurity/trivy/issues/8325)) ([bd5baaf](https://github.com/aquasecurity/trivy/commit/bd5baaf93054d71223e0721c7547a0567dea3b02))
|
||||
* **server:** secrets inspectation for the config analyzer in client server mode ([#8418](https://github.com/aquasecurity/trivy/issues/8418)) ([a1c4bd7](https://github.com/aquasecurity/trivy/commit/a1c4bd746f5f901e2a8f09f48f58b973b9103165))
|
||||
* **spdx:** init `pkgFilePaths` map for all formats ([#8380](https://github.com/aquasecurity/trivy/issues/8380)) ([72ea4b0](https://github.com/aquasecurity/trivy/commit/72ea4b0632308bd6150aaf2f1549a3f10b60dc23))
|
||||
* **terraform:** apply parser options to submodule parsing ([#8377](https://github.com/aquasecurity/trivy/issues/8377)) ([398620b](https://github.com/aquasecurity/trivy/commit/398620b471c25e467018bc23df53a3a1c2aa661c))
|
||||
* update all documentation links ([#8045](https://github.com/aquasecurity/trivy/issues/8045)) ([49456ba](https://github.com/aquasecurity/trivy/commit/49456ba8410e0e4cc1756906ccea1fdd60006d2d))
|
||||
|
||||
## [0.59.0](https://github.com/aquasecurity/trivy/compare/v0.58.0...v0.59.0) (2025-01-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `--distro` flag to manually specify OS distribution for vulnerability scanning ([#8070](https://github.com/aquasecurity/trivy/issues/8070)) ([da17dc7](https://github.com/aquasecurity/trivy/commit/da17dc72782cd68b5d2c4314a67936343462b75e))
|
||||
* add a examples field to check metadata ([#8068](https://github.com/aquasecurity/trivy/issues/8068)) ([6d84e0c](https://github.com/aquasecurity/trivy/commit/6d84e0cc0d48ae5c490cad868bb4e5e76392241c))
|
||||
* add support for registry mirrors ([#8244](https://github.com/aquasecurity/trivy/issues/8244)) ([4316bcb](https://github.com/aquasecurity/trivy/commit/4316bcbc5b9038eed21214a826981c49696bb27f))
|
||||
* **fs:** use git commit hash as cache key for clean repositories ([#8278](https://github.com/aquasecurity/trivy/issues/8278)) ([b5062f3](https://github.com/aquasecurity/trivy/commit/b5062f3ae20044d1452bf293f210a24cd1d419b3))
|
||||
* **image:** prevent scanning oversized container images ([#8178](https://github.com/aquasecurity/trivy/issues/8178)) ([509e030](https://github.com/aquasecurity/trivy/commit/509e03030c36d17f9427ab50a4e99fb1846ba65a))
|
||||
* **image:** return error early if total size of layers exceeds limit ([#8294](https://github.com/aquasecurity/trivy/issues/8294)) ([73bd20d](https://github.com/aquasecurity/trivy/commit/73bd20d6199a777d1ed7eb560e0184d8f1b4b550))
|
||||
* **k8s:** improve artifact selections for specific namespaces ([#8248](https://github.com/aquasecurity/trivy/issues/8248)) ([db9e57a](https://github.com/aquasecurity/trivy/commit/db9e57a34e460ac6934ee21dffaa2322db9fd56b))
|
||||
* **misconf:** generate placeholders for random provider resources ([#8051](https://github.com/aquasecurity/trivy/issues/8051)) ([ffe24e1](https://github.com/aquasecurity/trivy/commit/ffe24e18dc3dca816ec9ce5ccf66d5d7b5ea70d6))
|
||||
* **misconf:** support for ignoring by inline comments for Dockerfile ([#8115](https://github.com/aquasecurity/trivy/issues/8115)) ([c002327](https://github.com/aquasecurity/trivy/commit/c00232720a89df659c6cd0b56d99304d5ffea1a7))
|
||||
* **misconf:** support for ignoring by inline comments for Helm ([#8138](https://github.com/aquasecurity/trivy/issues/8138)) ([a0429f7](https://github.com/aquasecurity/trivy/commit/a0429f773b4f696fc613d91f1600cd0da38fb2c8))
|
||||
* **nodejs:** respect peer dependencies for dependency tree ([#7989](https://github.com/aquasecurity/trivy/issues/7989)) ([7389961](https://github.com/aquasecurity/trivy/commit/73899610e8eece670d2e5ddc1478fcc0a2a5760d))
|
||||
* **python:** add support for poetry dev dependencies ([#8152](https://github.com/aquasecurity/trivy/issues/8152)) ([774e04d](https://github.com/aquasecurity/trivy/commit/774e04d19dc2067725ac2e18ca871872f74082ab))
|
||||
* **python:** add support for uv ([#8080](https://github.com/aquasecurity/trivy/issues/8080)) ([c4a4a5f](https://github.com/aquasecurity/trivy/commit/c4a4a5fa971d73ae924afcf2259631f15e96e520))
|
||||
* **python:** add support for uv dev and optional dependencies ([#8134](https://github.com/aquasecurity/trivy/issues/8134)) ([49c54b4](https://github.com/aquasecurity/trivy/commit/49c54b49c6563590dd82007d52e425a7a4e07ac0))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* CVE-2024-45337: Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass ([#8088](https://github.com/aquasecurity/trivy/issues/8088)) ([d7ac286](https://github.com/aquasecurity/trivy/commit/d7ac286085077c969734225a789e6cc056d5c5f5))
|
||||
* CVE-2025-21613 and CVE-2025-21614 : go-git: argument injection via the URL field ([#8207](https://github.com/aquasecurity/trivy/issues/8207)) ([670fbf2](https://github.com/aquasecurity/trivy/commit/670fbf2d81ea20ea691a86e4ed25a7454baf08e5))
|
||||
* de-duplicate same `dpkg` packages with different filePaths from different layers ([#8298](https://github.com/aquasecurity/trivy/issues/8298)) ([846498d](https://github.com/aquasecurity/trivy/commit/846498dd23a80531881f803147077eee19004a50))
|
||||
* enable err-error and errorf rules from perfsprint linter ([#7859](https://github.com/aquasecurity/trivy/issues/7859)) ([156a2aa](https://github.com/aquasecurity/trivy/commit/156a2aa4c49386828c0446f8978473c8da7a8754))
|
||||
* **flag:** skip hidden flags for `--generate-default-config` command ([#8046](https://github.com/aquasecurity/trivy/issues/8046)) ([5e68bdc](https://github.com/aquasecurity/trivy/commit/5e68bdc9d08f96d22451d7b5dd93e79ca576eeb7))
|
||||
* **fs:** fix cache key generation to use UUID ([#8275](https://github.com/aquasecurity/trivy/issues/8275)) ([eafd810](https://github.com/aquasecurity/trivy/commit/eafd810d7cb366215efbd0ab3b72c4651d31c6a6))
|
||||
* handle `BLOW_UNKNOWN` error to download DBs ([#8060](https://github.com/aquasecurity/trivy/issues/8060)) ([51f2123](https://github.com/aquasecurity/trivy/commit/51f2123c5ccc4f7a37d1068830b6670b4ccf9ac8))
|
||||
* improve conversion of image config to Dockerfile ([#8308](https://github.com/aquasecurity/trivy/issues/8308)) ([2e8e38a](https://github.com/aquasecurity/trivy/commit/2e8e38a8c094f3392893693ab15a605ab0d378f9))
|
||||
* **java:** correctly overwrite version from depManagement if dependency uses `project.*` props ([#8050](https://github.com/aquasecurity/trivy/issues/8050)) ([9d9f80d](https://github.com/aquasecurity/trivy/commit/9d9f80d9791f38a0b4c727152166ae4d237a83a9))
|
||||
* **license:** always trim leading and trailing spaces for licenses ([#8095](https://github.com/aquasecurity/trivy/issues/8095)) ([f5e4291](https://github.com/aquasecurity/trivy/commit/f5e429179df1637de96962ab9c19e4336056bb5d))
|
||||
* **misconf:** allow null values only for tf variables ([#8112](https://github.com/aquasecurity/trivy/issues/8112)) ([23dc3a6](https://github.com/aquasecurity/trivy/commit/23dc3a67535b7458728b2939514a96bd3de3aa81))
|
||||
* **misconf:** correctly handle all YAML tags in K8S templates ([#8259](https://github.com/aquasecurity/trivy/issues/8259)) ([f12054e](https://github.com/aquasecurity/trivy/commit/f12054e669f9df93c6322ba2755036dbccacaa83))
|
||||
* **misconf:** disable git terminal prompt on tf module load ([#8026](https://github.com/aquasecurity/trivy/issues/8026)) ([bbc5a85](https://github.com/aquasecurity/trivy/commit/bbc5a85444ec86b7bb26d6db27803d199431a8e6))
|
||||
* **misconf:** handle heredocs in dockerfile instructions ([#8284](https://github.com/aquasecurity/trivy/issues/8284)) ([0a3887c](https://github.com/aquasecurity/trivy/commit/0a3887ca0350d7dabf5db7e08aaf8152201fdf0d))
|
||||
* **misconf:** use log instead of fmt for logging ([#8033](https://github.com/aquasecurity/trivy/issues/8033)) ([07b2d7f](https://github.com/aquasecurity/trivy/commit/07b2d7fbd7f8ef5473c2438c560fffc8bdadf913))
|
||||
* **oracle:** add architectures support for advisories ([#4809](https://github.com/aquasecurity/trivy/issues/4809)) ([90f1d8d](https://github.com/aquasecurity/trivy/commit/90f1d8d78aa20b47fafab2c8ecb07247f075ef45))
|
||||
* **python:** skip dev group's deps for poetry ([#8106](https://github.com/aquasecurity/trivy/issues/8106)) ([a034d26](https://github.com/aquasecurity/trivy/commit/a034d26443704601c1fe330a5cc1f019f6974524))
|
||||
* **redhat:** check `usr/share/buildinfo/` dir to detect content sets ([#8222](https://github.com/aquasecurity/trivy/issues/8222)) ([f352f6b](https://github.com/aquasecurity/trivy/commit/f352f6b66355fe3636c9e4e9f3edd089c551a81c))
|
||||
* **redhat:** correct rewriting of recommendations for the same vulnerability ([#8063](https://github.com/aquasecurity/trivy/issues/8063)) ([4202c4b](https://github.com/aquasecurity/trivy/commit/4202c4ba0d8fcff4b89499fe03050ef4efd37330))
|
||||
* respect GITHUB_TOKEN to download artifacts from GHCR ([#7580](https://github.com/aquasecurity/trivy/issues/7580)) ([21b68e1](https://github.com/aquasecurity/trivy/commit/21b68e18188f91935ac1055a78ee97a7f35a110d))
|
||||
* **sbom:** attach nested packages to Application ([#8144](https://github.com/aquasecurity/trivy/issues/8144)) ([735335f](https://github.com/aquasecurity/trivy/commit/735335f08f84936f3928cbbc3eb71af3a3a4918d))
|
||||
* **sbom:** fix wrong overwriting of applications obtained from different sbom files but having same app type ([#8052](https://github.com/aquasecurity/trivy/issues/8052)) ([fd07074](https://github.com/aquasecurity/trivy/commit/fd07074e8033530eee2732193b00e59f27c73096))
|
||||
* **sbom:** scan results of SBOMs generated from container images are missing layers ([#7635](https://github.com/aquasecurity/trivy/issues/7635)) ([f9fceb5](https://github.com/aquasecurity/trivy/commit/f9fceb58bf64657dee92302df1ed97e597e474c9))
|
||||
* **sbom:** use root package for `unknown` dependencies (if exists) ([#8104](https://github.com/aquasecurity/trivy/issues/8104)) ([7558df7](https://github.com/aquasecurity/trivy/commit/7558df7c227c769235e5441fbdd3f9f7efb1ff84))
|
||||
* **spdx:** use the `hasExtractedLicensingInfos` field for licenses that are not listed in the SPDX ([#8077](https://github.com/aquasecurity/trivy/issues/8077)) ([aec8885](https://github.com/aquasecurity/trivy/commit/aec8885bc7f7e3c5a2a68214dca9aff28accd122))
|
||||
* **suse:** SUSE - update OSType constants and references for compatility ([#8236](https://github.com/aquasecurity/trivy/issues/8236)) ([ae28398](https://github.com/aquasecurity/trivy/commit/ae283985c926ca828b25b69ad0338008be31e5fe))
|
||||
* Updated twitter icon ([#7772](https://github.com/aquasecurity/trivy/issues/7772)) ([2c41ac8](https://github.com/aquasecurity/trivy/commit/2c41ac83a95e9347605d36f483171a60ffce0fa2))
|
||||
* wasm module test ([#8099](https://github.com/aquasecurity/trivy/issues/8099)) ([2200f38](https://github.com/aquasecurity/trivy/commit/2200f3846d675c64ab9302af43224d663a67c944))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* avoid heap allocation in applier findPackage ([#7883](https://github.com/aquasecurity/trivy/issues/7883)) ([9bd6ed7](https://github.com/aquasecurity/trivy/commit/9bd6ed73e5d49d52856c76124e84c268475c5456))
|
||||
|
||||
## [0.58.0](https://github.com/aquasecurity/trivy/compare/v0.57.0...v0.58.0) (2024-12-02)
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
See [Issues](https://aquasecurity.github.io/trivy/latest/community/contribute/issue/) and [Pull Requests](https://aquasecurity.github.io/trivy/latest/community/contribute/pr/)
|
||||
See [Issues](https://trivy.dev/latest/community/contribute/issue/) and [Pull Requests](https://trivy.dev/latest/community/contribute/pr/)
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.20.3
|
||||
FROM alpine:3.21.3
|
||||
RUN apk --no-cache add ca-certificates git
|
||||
COPY trivy /usr/local/bin/trivy
|
||||
COPY contrib/*.tpl contrib/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.20.0
|
||||
FROM alpine:3.21.3
|
||||
RUN apk --no-cache add ca-certificates git
|
||||
|
||||
# binaries were created with GoReleaser
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM --platform=linux/amd64 golang:1.22
|
||||
FROM --platform=linux/amd64 golang:1.24
|
||||
|
||||
# Set environment variable for protoc
|
||||
ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip
|
||||
|
||||
12
README.md
12
README.md
@@ -107,7 +107,7 @@ trivy k8s --report summary cluster
|
||||
## Want more? Check out Aqua
|
||||
|
||||
If you liked Trivy, you will love Aqua which builds on top of Trivy to provide even more enhanced capabilities for a complete security management offering.
|
||||
You can find a high level comparison table specific to Trivy users [here](https://github.com/aquasecurity/resources/blob/main/trivy-aqua.md).
|
||||
You can find a high level comparison table specific to Trivy users [here](https://trivy.dev/latest/commercial/compare/).
|
||||
In addition check out the <https://aquasec.com> website for more information about our products and services.
|
||||
If you'd like to contact Aqua or request a demo, please use this form: <https://www.aquasec.com/demo>
|
||||
|
||||
@@ -116,7 +116,6 @@ If you'd like to contact Aqua or request a demo, please use this form: <https://
|
||||
Trivy is an [Aqua Security][aquasec] open source project.
|
||||
Learn about our open source work and portfolio [here][oss].
|
||||
Contact us about any matter by opening a GitHub Discussion [here][discussions]
|
||||
Join our [Slack community][slack] to stay up to date with community efforts.
|
||||
|
||||
Please ensure to abide by our [Code of Conduct][code-of-conduct] during all interactions.
|
||||
|
||||
@@ -131,14 +130,13 @@ Please ensure to abide by our [Code of Conduct][code-of-conduct] during all inte
|
||||
[license]: https://github.com/aquasecurity/trivy/blob/main/LICENSE
|
||||
[license-img]: https://img.shields.io/badge/License-Apache%202.0-blue.svg
|
||||
[homepage]: https://trivy.dev
|
||||
[docs]: https://aquasecurity.github.io/trivy
|
||||
[docs]: https://trivy.dev/latest/docs/
|
||||
[pronunciation]: #how-to-pronounce-the-name-trivy
|
||||
[slack]: https://slack.aquasec.com
|
||||
[code-of-conduct]: https://github.com/aquasecurity/community/blob/main/CODE_OF_CONDUCT.md
|
||||
|
||||
[Installation]:https://aquasecurity.github.io/trivy/latest/getting-started/installation/
|
||||
[Ecosystem]: https://aquasecurity.github.io/trivy/latest/ecosystem/
|
||||
[Scanning Coverage]: https://aquasecurity.github.io/trivy/latest/docs/coverage/
|
||||
[Installation]:https://trivy.dev/latest/getting-started/installation/
|
||||
[Ecosystem]: https://trivy.dev/latest/ecosystem/
|
||||
[Scanning Coverage]: https://trivy.dev/latest/docs/coverage/
|
||||
|
||||
[alpine]: https://ariadne.space/2021/06/08/the-vulnerability-remediation-lifecycle-of-alpine-containers/
|
||||
[rego]: https://www.openpolicyagent.org/docs/latest/#rego
|
||||
|
||||
10
aqua.yaml
10
aqua.yaml
@@ -1,10 +0,0 @@
|
||||
---
|
||||
# aqua - Declarative CLI Version Manager
|
||||
# https://aquaproj.github.io/
|
||||
registries:
|
||||
- type: standard
|
||||
ref: v3.157.0 # renovate: depName=aquaproj/aqua-registry
|
||||
packages:
|
||||
- name: tinygo-org/tinygo@v0.31.1
|
||||
- name: WebAssembly/binaryen@version_112
|
||||
- name: magefile/mage@v1.14.0
|
||||
@@ -21,6 +21,12 @@ func main() {
|
||||
if errors.As(err, &exitError) {
|
||||
os.Exit(exitError.Code)
|
||||
}
|
||||
|
||||
var userErr *types.UserError
|
||||
if errors.As(err, &userErr) {
|
||||
log.Fatal("Error", log.Err(userErr))
|
||||
}
|
||||
|
||||
log.Fatal("Fatal error", log.Err(err))
|
||||
}
|
||||
}
|
||||
@@ -36,8 +42,5 @@ func run() error {
|
||||
}
|
||||
|
||||
app := commands.NewApp()
|
||||
if err := app.Execute(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return app.Execute()
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
{{- end }}
|
||||
</testsuite>
|
||||
|
||||
{{- $target := .Target }}
|
||||
{{- if .MisconfSummary }}
|
||||
<testsuite tests="{{ add .MisconfSummary.Successes .MisconfSummary.Failures }}" failures="{{ .MisconfSummary.Failures }}" name="{{ .Target }}" errors="0" time="">
|
||||
{{- else }}
|
||||
@@ -28,7 +29,23 @@
|
||||
{{ range .Misconfigurations }}
|
||||
<testcase classname="{{ .Type }}" name="[{{ .Severity }}] {{ .ID }}" time="">
|
||||
{{- if (eq .Status "FAIL") }}
|
||||
<failure message="{{ escapeXML .Title }}" type="description">{{ escapeXML .Description }}</failure>
|
||||
<failure message="{{ escapeXML .Title }}" type="description">

|
||||
{{- $target }}:
|
||||
{{- with .CauseMetadata }}
|
||||
{{- .StartLine }}
|
||||
{{- if lt .StartLine .EndLine }}:{{ .EndLine }}{{ end }}:

Occurrences:

|
||||
{{- range $i := .Occurrences -}}
|
||||
via {{ .Filename }}:
|
||||
{{- .Location.StartLine }}
|
||||
{{- if lt .Location.StartLine .Location.EndLine }}:{{ .Location.EndLine }}{{ end }} ({{ .Resource }})

|
||||
{{- end -}}
|
||||

Code:

|
||||
{{- range .Code.Lines }}
|
||||
{{- if .IsCause }}{{ escapeXML .Content }}
{{- end }}
|
||||
{{- end }}

|
||||
{{- end }}
|
||||
{{- escapeXML .Description }}
|
||||
</failure>
|
||||
{{- end }}
|
||||
</testcase>
|
||||
{{- end }}
|
||||
@@ -44,5 +61,15 @@
|
||||
</testsuite>
|
||||
{{- end }}
|
||||
|
||||
{{- if .Secrets }}
|
||||
{{- $secrets := len .Secrets }}
|
||||
<testsuite tests="{{ $secrets }}" failures="{{ $secrets }}" name="{{ .Target }}" time="0">{{ range .Secrets }}
|
||||
<testcase classname="{{ .RuleID }}" name="[{{ .Severity }}] {{ .Title }}">
|
||||
<failure message="{{ .Title }}" type="description">{{ escapeXML .Match }}</failure>
|
||||
</testcase>
|
||||
{{- end }}
|
||||
</testsuite>
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
</testsuites>
|
||||
|
||||
86
docs/commercial/compare.md
Normal file
86
docs/commercial/compare.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# Aqua Security is the home of Trivy
|
||||
|
||||
Trivy is proudly maintained by [Aqua Security](https://aquasec.com).
|
||||
If you liked Trivy, you will love Aqua which builds on top of Trivy to provide even more enhanced capabilities for a complete security management offering.
|
||||
In this page you can find a high level comparison between Trivy Open Source and Aqua's commercial product.
|
||||
If you'd like to learn more or request a demo, [click here to contact us](./contact.md).
|
||||
|
||||
## User experience
|
||||
|
||||
| Feature | Trivy OSS | Aqua |
|
||||
| --- | --- | --- |
|
||||
| Interface | CLI tool | CLI tool <br> Enterprise-grade web application <br> SaaS or on-prem |
|
||||
| Search & Discover | - | Easily search for security issues across all workloads and infrastructure in your organization <br> Visually discover risks across your organization |
|
||||
| User management | - | Multi account <br> Granular permissions (RBAC) <br> Single Sign On (SSO) |
|
||||
| Support | Some skills required for setup and integration <br> Best effort community support | Personal onboarding by Aqua Customer Success <br> SLA backed professional support |
|
||||
| Scalability & Availability | Single scan at a time | Centralized scanning service supports concurrent scans efficiently <br> Highly available production grade architecture |
|
||||
| Rate limiting | Assets hosted on public free infrastructure and could be rate limited | Assets hosted on Aqua infrastructure and does not have limitations |
|
||||
|
||||
## Vulnerability scanning
|
||||
|
||||
| Feature | Trivy OSS | Aqua |
|
||||
| --- | --- | --- |
|
||||
| Vulnerabilities sources | Based on open source vulnerability feeds | Based on open source and commercial vulnerability feeds |
|
||||
| New Vulnerabilities SLA | No SLA | Commercial level SLA |
|
||||
| Package managers | Find packages in lock files | Find packages in lock files or reconstructed lock files |
|
||||
| Vulnerability management | Manually ignore specific vulnerabilities by ID or property | Advanced vulnerability management solution <br> Vulnerability tracking and suppression <br> Incident lifecycle management |
|
||||
| Vulnerability prioritization | Manually triage by severity | Multiple prioritization tools: <br> Accessibility of the affected resources <br> Exploitability of the vulnerability <br> Open Source packages health and trustworthiness score <br> Affected image layers |
|
||||
| Reachability analysis | - | Analyze source code to eliminate vulnerabilities of unused dependencies |
|
||||
| Contextual vulnerabilities | - | Reduce irrelevant vulnerabilities based on environmental factors (e.g. Spring4Shell not relevant due to JDK version) |
|
||||
| Compiled binaries | Find embedded dependencies in Go and Rust binaries <br> Find SBOM by hash in public Sigstore | In addition, identify popular applications |
|
||||
|
||||
## Container scanning
|
||||
|
||||
| Feature | Trivy OSS | Aqua |
|
||||
| --- | --- | --- |
|
||||
| Windows containers | - | Support scanning windows containers |
|
||||
| Scan container registries | - | Connect to any container registries and automatically scan it |
|
||||
| Private registries | Standard registry authenticationCloud authentication with ECR, GCR, ACR | Supports registry specific authentication schemes |
|
||||
| Layer cache | Local cache directory | Scalable Cloud cache |
|
||||
|
||||
## Advanced scanning
|
||||
|
||||
| Feature | Trivy OSS | Aqua |
|
||||
| --- | --- | --- |
|
||||
| Malware scanning | - | Scan container images for malware |
|
||||
| Sandbox scanning | - | Use DTA (Dynamic threat analysis) to run and test container images' behavior to detect sophisticated threats |
|
||||
| SAST (code scanning) | - | Analyze source code for security issues and vulnerabilities |
|
||||
|
||||
## Policy and enforcement
|
||||
|
||||
| Feature | Trivy OSS | Aqua |
|
||||
| --- | --- | --- |
|
||||
| Kubernetes admission | - | Validating Kubernetes Admission based on automatic or user defined policy |
|
||||
| CI/CD policies | Can fail the entire build on any finding | Granular policies to fail builds based on custom criteria |
|
||||
| Container engine | - | Block incompliant images from running at container engine level |
|
||||
| Block vulnerable packages | - | vShield – monitor and block usage of vulnerable packages |
|
||||
|
||||
## Secrets scanning
|
||||
|
||||
| Feature | Trivy OSS | Aqua |
|
||||
| --- | --- | --- |
|
||||
| Detected patterns | Basic patterns | Advanced patterns |
|
||||
| Leaked secrets validation | - | Automatically checks if leaked secrets are valid and usable |
|
||||
|
||||
## IaC/CSPM scanning
|
||||
|
||||
| Feature | Trivy OSS | Aqua |
|
||||
| --- | --- | --- |
|
||||
| Infrastructure as Code (IaC) | Many popular languages as detailed [here](https://trivy.dev/latest/docs/scanner/misconfiguration/policy/builtin/) | In addition, Build Pipeline configuration scanning |
|
||||
| Checks customization | Create custom checks with Rego | Create custom checks in no-code interface <br> Customize existing checks with organizational preferences |
|
||||
| Cloud scanning | AWS (subset of services) | AWS, Azure, GCP, Alibaba Cloud, Oracle Cloud |
|
||||
| Compliance frameworks | CIS, NSA, vendor guides | More than 25 compliance programs |
|
||||
| Custom compliance | Create in YAML | Create in a web UI |
|
||||
| Remediation advice | Basic | AI powered specialized remediation guides |
|
||||
|
||||
## Kubernetes scanning
|
||||
|
||||
| Feature | Trivy OSS | Aqua |
|
||||
| --- | --- | --- |
|
||||
Scan initiation | CLI / Kubernetes Operator | Kubernetes Operator / Management web application |
|
||||
Results consumption | kubectl / CRD / Prometheus exporter | In addition, Advanced UI dashboards, Automatic notifications and incident management flows |
|
||||
Cluster discovery | Kubeconfig | Automatic discovery thorough cloud onboarding |
|
||||
Workload image scanning | Scanning in cluster, requires capacity planning | Scanning offloaded to Aqua service, little impact on scanned clusters |
|
||||
| Cluster scanning | CIS, NSA, PSS | More than 25 compliance programs |
|
||||
| Scope | Single cluster | Multi cluster, Cloud relationship |
|
||||
| Scalability | Reports limited by in-cluster etcd storage (size and number of reports) | Cloud-based storage (unlimited scalability) |
|
||||
17
docs/commercial/contact.md
Normal file
17
docs/commercial/contact.md
Normal file
@@ -0,0 +1,17 @@
|
||||
<style>
|
||||
.md-content .md-content__inner a, h1 {
|
||||
display:none;
|
||||
}
|
||||
input.hs-input, textarea.hs-input {
|
||||
border: silver solid 1px !important;
|
||||
font-size: 0.8em;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
|
||||
<script>
|
||||
hbspt.forms.create({
|
||||
portalId: "1665891",
|
||||
formId: "a1d0c098-3b3a-40d8-afb4-e04ddb697afe"
|
||||
});
|
||||
</script>
|
||||
@@ -80,7 +80,7 @@ The package name should be in the format `builtin.PROVIDER.SERVICE.ID`, e.g. `bu
|
||||
|
||||
## Generating an ID
|
||||
|
||||
Every check has a custom ID that is referenced throughout the metadata of the check to uniquely identify the check. If you plan to contribue your check back into the [trivy-checks](https://github.com/aquasecurity/trivy-checks) repository, it will require a valid ID.
|
||||
Every check has a custom ID that is referenced throughout the metadata of the check to uniquely identify the check. If you plan to contribute your check back into the [trivy-checks](https://github.com/aquasecurity/trivy-checks) repository, it will require a valid ID.
|
||||
|
||||
Running `make id` in the root of the trivy-checks repository will provide you with the next available _ID_ for your rule.
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ type AWS struct {
|
||||
|
||||
### Update Adapters
|
||||
|
||||
Now you'll need to update all of the [adapters](https://github.com/aquasecurity/trivy/tree/main/pkg/iac/adapters) which populate the struct of the provider that you have been using. Following the example above, if you want to add support for CodeBuild in Terraform, you'll need to update the Terraform AWS adatper as shown here: [`trivy/pkg/iac/adapters/terraform/aws/codebuild/adapt.go`](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/adapters/terraform/aws/codebuild/adapt.go).
|
||||
Now you'll need to update all of the [adapters](https://github.com/aquasecurity/trivy/tree/main/pkg/iac/adapters) which populate the struct of the provider that you have been using. Following the example above, if you want to add support for CodeBuild in Terraform, you'll need to update the Terraform AWS adapter as shown here: [`trivy/pkg/iac/adapters/terraform/aws/codebuild/adapt.go`](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/adapters/terraform/aws/codebuild/adapt.go).
|
||||
|
||||
Another example for updating the adapters is provided in the [following PR.](https://github.com/aquasecurity/defsec/pull/1000/files) Additionally, please refer to the respective Terraform documentation on the provider to which you are adding the service. For instance, the Terraform documentation for AWS CodeBuild is provided [here.](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/codebuild_project)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ There are 4 categories:
|
||||
If you find any false positives or false negatives, please make sure to report them under the "False Detection" category, not "Bugs".
|
||||
|
||||
## False detection
|
||||
Trivy depends on [multiple data sources](https://aquasecurity.github.io/trivy/latest/docs/scanner/vulnerability/#data-sources).
|
||||
Trivy depends on [multiple data sources](https://trivy.dev/latest/docs/scanner/vulnerability/#data-sources).
|
||||
Sometime these databases contain mistakes.
|
||||
|
||||
If Trivy can't detect any CVE-IDs or shows false positive result, at first please follow the next steps:
|
||||
|
||||
@@ -12,6 +12,11 @@ For detailed behavior, please refer to [the GitHub Actions configuration][workfl
|
||||
Commits with prefixes like `chore` or `build` are not considered releasable, and no release PR is created.
|
||||
To include such commits in a release, you need to either include commits with `feat` or `fix` prefixes or perform a manual release as described [below](#manual-release-pr-creation).
|
||||
|
||||
!!! tip
|
||||
It's a good idea to check if there are any outstanding vulnerability updates created by dependabot waiting for your review.
|
||||
They can be found in the "Security" tab of the repository.
|
||||
If there are any, please review and merge them before creating a release. This will help to ensure that the release includes the latest security patches.
|
||||
|
||||
## Flow
|
||||
The release flow consists of the following main steps:
|
||||
|
||||
@@ -74,10 +79,20 @@ Replace URLs with appropriate ones.
|
||||
|
||||
Example: https://github.com/aquasecurity/trivy/releases/tag/v0.52.0
|
||||
|
||||
### Merging the auto-generated Helm chart update PR
|
||||
Once the release PR is merged, there will be an auto-generated PR that bumps the Trivy version for the Trivy Helm Chart. An example can be seen [here](https://github.com/aquasecurity/trivy/pull/8638).
|
||||
|
||||
> [!NOTE]
|
||||
> It is possible that the release action takes a while to finish and the Helm chart action runs prior. In such a case the Helm chart action will fail as it will not be able to find the latest Trivy container image.
|
||||
> In such a case, it is advised to manually restart the Helm chart action, once the release action is finished.
|
||||
|
||||
If things look good, approve and merge this PR to further trigger the publishing of the Helm Chart.
|
||||
|
||||
|
||||
The release is now complete 🍻
|
||||
|
||||
The release is now complete.
|
||||
|
||||
[conventional-commits]: https://www.conventionalcommits.org/en/v1.0.0/
|
||||
[release-please]: https://github.com/googleapis/release-please
|
||||
[release-please]: https://github.com/googleapis/release-please
|
||||
[goreleaser]: https://goreleaser.com/
|
||||
[workflows]: https://github.com/aquasecurity/trivy/tree/main/.github/workflows
|
||||
[workflows]: https://github.com/aquasecurity/trivy/tree/main/.github/workflows
|
||||
|
||||
@@ -48,6 +48,6 @@ As mentioned in [the Core Principles](#detecting-unintended-states), detection o
|
||||
### User Interface
|
||||
Trivy primarily operates via CLI for displaying results, with a richer UI available in [the commercial version][aqua].
|
||||
|
||||
[trivy-aqua]: https://github.com/aquasecurity/resources/blob/main/trivy-aqua.md
|
||||
[trivy-aqua]: ../commercial/compare.md
|
||||
[tracee]: https://github.com/aquasecurity/tracee
|
||||
[aqua]: https://www.aquasec.com/
|
||||
@@ -10,7 +10,7 @@ External Resource | Feature | Details
|
||||
Vulnerability Database | Vulnerability scanning | [Trivy DB](../scanner/vulnerability.md)
|
||||
Java Vulnerability Database | Java vulnerability scanning | [Trivy Java DB](../coverage/language/java.md)
|
||||
Checks Bundle | Misconfigurations scanning | [Trivy Checks](../scanner/misconfiguration/check/builtin.md)
|
||||
VEX Hub | VEX Hub | [VEX Hub](../supply-chain/vex/repo/#vex-hub)
|
||||
VEX Hub | VEX Hub | [VEX Hub](../supply-chain/vex/repo.md)
|
||||
Maven Central / Remote Repositories | Java vulnerability scanning | [Java Scanner/Remote Repositories](../coverage/language/java.md#remote-repositories)
|
||||
|
||||
!!! note
|
||||
@@ -75,3 +75,8 @@ Trivy might attempt to connect (over HTTPS) to the following URLs:
|
||||
### Offline mode
|
||||
|
||||
There's no way to leverage Maven Central in a network-restricted environment, but you can prevent Trivy from trying to connect to it by using the `--offline-scan` flag.
|
||||
|
||||
## Check updates service
|
||||
|
||||
Trivy [checks for updates](../configuration/others.md#check-for-updates) and [collects usage telemetry](../advanced/telemetry.md) by connecting to the following domain: `https://check.trivy.dev`.
|
||||
Connectivity with this domain is entirely optional and is not necessary for the normal operation of Trivy.
|
||||
|
||||
@@ -113,4 +113,4 @@ Total: 20 (UNKNOWN: 0, LOW: 2, MEDIUM: 10, HIGH: 8, CRITICAL: 0)
|
||||
+--------------+------------------+----------+-------------------+---------------+---------------------------------------+
|
||||
```
|
||||
|
||||
</details>
|
||||
</details>
|
||||
@@ -12,7 +12,7 @@ They provide a way to extend the core feature set of Trivy, but without updating
|
||||
|
||||
- They can be added and removed from a Trivy installation without impacting the core Trivy tool.
|
||||
- They can be written in any programming language supporting WebAssembly.
|
||||
- It supports only [TinyGo][tinygo] at the moment.
|
||||
- It supports only Go at the moment.
|
||||
|
||||
You can write your own detection logic.
|
||||
|
||||
@@ -94,9 +94,9 @@ $ trivy module uninstall ghcr.io/aquasecurity/trivy-module-spring4shell
|
||||
```
|
||||
|
||||
## Building Modules
|
||||
It supports TinyGo only at the moment.
|
||||
It supports Go only at the moment.
|
||||
|
||||
### TinyGo
|
||||
### Go
|
||||
Trivy provides Go SDK including three interfaces.
|
||||
Your own module needs to implement either or both `Analyzer` and `PostScanner` in addition to `Module`.
|
||||
|
||||
@@ -113,7 +113,7 @@ type Analyzer interface {
|
||||
|
||||
type PostScanner interface {
|
||||
PostScanSpec() serialize.PostScanSpec
|
||||
PostScan(serialize.Results) (serialize.Results, error)
|
||||
PostScan(types.Results) (types.Results, error)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -142,6 +142,9 @@ const (
|
||||
name = "wordpress-module"
|
||||
)
|
||||
|
||||
// main is required for Go to compile the Wasm module
|
||||
func main() {}
|
||||
|
||||
type WordpressModule struct{
|
||||
// Cannot define fields as modules can't keep state.
|
||||
}
|
||||
@@ -203,7 +206,7 @@ func (WordpressModule) Analyze(filePath string) (*serialize.AnalysisResult, erro
|
||||
}
|
||||
|
||||
return &serialize.AnalysisResult{
|
||||
CustomResources: []serialize.CustomResource{
|
||||
CustomResources: []ftypes.CustomResource{
|
||||
{
|
||||
Type: typeWPVersion,
|
||||
FilePath: filePath,
|
||||
@@ -246,7 +249,7 @@ func (WordpressModule) PostScanSpec() serialize.PostScanSpec {
|
||||
}
|
||||
}
|
||||
|
||||
func (WordpressModule) PostScan(results serialize.Results) (serialize.Results, error) {
|
||||
func (WordpressModule) PostScan(results types.Results) (types.Results, error) {
|
||||
// e.g. results
|
||||
// [
|
||||
// {
|
||||
@@ -288,7 +291,7 @@ func (WordpressModule) PostScan(results serialize.Results) (serialize.Results, e
|
||||
|
||||
if vulnerable {
|
||||
// Add CVE-2020-36326
|
||||
results = append(results, serialize.Result{
|
||||
results = append(results, types.Result{
|
||||
Target: wpPath,
|
||||
Class: types.ClassLangPkg,
|
||||
Type: "wordpress",
|
||||
@@ -318,10 +321,10 @@ In the `Delete` action, `PostScan` needs to return results you want to delete.
|
||||
If `PostScan` returns an empty, Trivy will not delete anything.
|
||||
|
||||
#### Build
|
||||
Follow [the install guide][tinygo-installation] and install TinyGo.
|
||||
Follow [the install guide][go-installation] and install Go.
|
||||
|
||||
```bash
|
||||
$ tinygo build -o wordpress.wasm -scheduler=none -target=wasi --no-debug wordpress.go
|
||||
$ GOOS=wasip1 GOARCH=wasm go build -o wordpress.wasm -buildmode=c-shared wordpress.go
|
||||
```
|
||||
|
||||
Put the built binary to the module directory that is under the home directory by default.
|
||||
@@ -347,12 +350,11 @@ Digest: sha256:6416d0199d66ce52ced19f01d75454b22692ff3aa7737e45f7a189880840424f
|
||||
|
||||
[regexp]: https://github.com/google/re2/wiki/Syntax
|
||||
|
||||
[tinygo]: https://tinygo.org/
|
||||
[spring4shell]: https://blog.aquasec.com/zero-day-rce-vulnerability-spring4shell
|
||||
[wazero]: https://github.com/tetratelabs/wazero
|
||||
|
||||
[trivy-module-spring4shell]: https://github.com/aquasecurity/trivy/tree/main/examples/module/spring4shell
|
||||
[trivy-module-wordpress]: https://github.com/aquasecurity/trivy-module-wordpress
|
||||
|
||||
[tinygo-installation]: https://tinygo.org/getting-started/install/
|
||||
[go-installation]: https://go.dev/doc/install
|
||||
[oras]: https://oras.land/cli/
|
||||
@@ -14,7 +14,7 @@ To host these databases in your own infrastructure:
|
||||
|
||||
### Make a local copy
|
||||
|
||||
Use any container registry manipulation tool (e.g , [crane](https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md, [ORAS](https://oras.land), [regclient](https://github.com/regclient/regclient/tree/main)) to copy the images to your destination registry.
|
||||
Use any container registry manipulation tool (e.g , [crane](https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md), [ORAS](https://oras.land), [regclient](https://github.com/regclient/regclient/tree/main)) to copy the images to your destination registry.
|
||||
|
||||
!!! note
|
||||
You will need to keep the databases updated in order to maintain relevant scanning results over time.
|
||||
@@ -123,10 +123,10 @@ To make a copy of VEX Hub in a location that is accessible to Trivy.
|
||||
|
||||
To configure Trivy to use the local VEX Repository:
|
||||
|
||||
1. Locate your [Trivy VEX configuration file](../supply-chain/vex/repo/#configuration-file) by running `trivy vex repo init`. Make the following changes to the file.
|
||||
1. Locate your [Trivy VEX configuration file](../supply-chain/vex/repo.md#configuration-file) by running `trivy vex repo init`. Make the following changes to the file.
|
||||
1. Disable the default VEX Hub repo (`enabled: false`)
|
||||
1. Add your internal VEX Hub repository as a [custom repository](../supply-chain/vex/repo/#custom-repositories) with the URL pointing to your local server (e.g `url: https://server.local`).
|
||||
1. Add your internal VEX Hub repository as a [custom repository](../supply-chain/vex/repo.md#custom-repositories) with the URL pointing to your local server (e.g `url: https://server.local`).
|
||||
|
||||
### Authentication
|
||||
|
||||
If your server requires authentication, you can configure it as described in the [VEX Repository Authentication document](../supply-chain/vex/repo/#authentication).
|
||||
If your server requires authentication, you can configure it as described in the [VEX Repository Authentication document](../supply-chain/vex/repo.md#authentication).
|
||||
|
||||
33
docs/docs/advanced/telemetry.md
Normal file
33
docs/docs/advanced/telemetry.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Usage Telemetry
|
||||
|
||||
Trivy collect anonymous usage data in order to help us improve the product. This document explains what is collected and how you can control it.
|
||||
|
||||
## Data collected
|
||||
|
||||
The following information could be collected:
|
||||
|
||||
- Environmental information
|
||||
- Installation identifier
|
||||
- Trivy version
|
||||
- Operating system
|
||||
- Scan
|
||||
- Non-revealing scan options
|
||||
|
||||
## Privacy
|
||||
|
||||
No personal information, scan results, or sensitive data is specifically collected. We take the following measures to ensure that:
|
||||
|
||||
- Installation identifier: one-way hash of machine fingerprint, resulting in opaque string.
|
||||
- Scaner: any option that is user controlled is omitted (never collected). For example, file paths, image names, etc are never collected.
|
||||
|
||||
Trivy is an Aqua Security product and adheres to the company's privacy policy: <https://aquasec.com/privacy>.
|
||||
|
||||
## Disabling telemetry
|
||||
|
||||
You can disable telemetry altogether using the `--disable-telemetry` flag. Like other Trivy flags, this can be set on the command line, YAML configuration file, or environment variable. For more details see [here](../configuration/index.md).
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
trivy image --disable-metrics alpine
|
||||
```
|
||||
@@ -35,7 +35,6 @@ For the list of built-in compliance reports, please see the relevant section:
|
||||
|
||||
- [Docker compliance](../target/container_image.md#compliance)
|
||||
- [Kubernetes compliance](../target/kubernetes.md#compliance)
|
||||
- [AWS compliance](../target/aws.md#compliance)
|
||||
|
||||
## Contribute a Built-in Compliance Report
|
||||
|
||||
@@ -166,7 +165,7 @@ Example of how to define command data under [commands folder](https://github.com
|
||||
title: kubelet.conf file permissions
|
||||
nodeType: worker
|
||||
audit: stat -c %a $kubelet.kubeconfig
|
||||
platfroms:
|
||||
platforms:
|
||||
- k8s
|
||||
- aks
|
||||
```
|
||||
@@ -181,7 +180,7 @@ make command-id
|
||||
|
||||
#### Command Key
|
||||
|
||||
- Re-use an existing key or specifiy a new one (make sure key name has no spaces)
|
||||
- Re-use an existing key or specify a new one (make sure key name has no spaces)
|
||||
|
||||
Note: The key value should match the key name evaluated by the Rego check.
|
||||
|
||||
@@ -198,7 +197,7 @@ Specify the node type on which the command is supposed to run.
|
||||
|
||||
### Command Audit
|
||||
|
||||
Specify here the shell command to be used please make sure to add error supression (2>/dev/null)
|
||||
Specify here the shell command to be used please make sure to add error suppression (2>/dev/null)
|
||||
|
||||
### Command Platforms
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ Thus, we can use the information already present:
|
||||
```
|
||||
|
||||
- The `ID`, `name`, and `description` is taken directly from the AWS EKS CIS Benchmarks
|
||||
- The `check` and `severity` are taken from the existing complaince check in the `k8s-cis-1.23.yaml`
|
||||
- The `check` and `severity` are taken from the existing compliance check in the `k8s-cis-1.23.yaml`
|
||||
|
||||
|
||||
#### 2. Referencing a check manually that is not part of the Trivy default checks
|
||||
|
||||
@@ -51,9 +51,7 @@ It supports three types of backends for this cache:
|
||||
- TTL can be configured via `--cache-ttl`
|
||||
|
||||
### Local File System
|
||||
The local file system backend is the default choice for container and VM image scans.
|
||||
When scanning container images, it stores analysis results on a per-layer basis, using layer IDs as keys.
|
||||
This approach enables faster scans of the same container image or different images that share layers.
|
||||
The local file system backend is the default choice for container image, VM image and repository scans.
|
||||
|
||||
!!! note
|
||||
Internally, this backend uses [BoltDB][boltdb], which has an important limitation: only one process can access the cache at a time.
|
||||
@@ -63,7 +61,7 @@ This approach enables faster scans of the same container image or different imag
|
||||
### Memory
|
||||
The memory backend stores analysis results in memory, which means the cache is discarded when the process ends.
|
||||
This makes it useful in scenarios where caching is not required or desired.
|
||||
It serves as the default for repository, filesystem and SBOM scans and can also be employed for container image scans when caching is unnecessary.
|
||||
It serves as the default for filesystem and SBOM scans and can also be employed for container image scans when caching is unnecessary.
|
||||
|
||||
To use the memory backend for a container image scan, you can use the following command:
|
||||
|
||||
@@ -98,11 +96,11 @@ $ trivy server --cache-backend redis://localhost:6379 \
|
||||
--redis-key /path/to/key.pem
|
||||
```
|
||||
|
||||
[trivy-db]: ./db.md#vulnerability-database
|
||||
[trivy-java-db]: ./db.md#java-index-database
|
||||
[trivy-db]: ./db.md
|
||||
[trivy-java-db]: ./db.md
|
||||
[misconf-checks]: ../scanner/misconfiguration/check/builtin.md
|
||||
[boltdb]: https://github.com/etcd-io/bbolt
|
||||
[parallel-run]: https://aquasecurity.github.io/trivy/v0.52/docs/references/troubleshooting/#running-in-parallel-takes-same-time-as-series-run
|
||||
[parallel-run]: https://trivy.dev/{{ git.tag}}/docs/references/troubleshooting/#running-in-parallel-takes-same-time-as-series-run
|
||||
|
||||
[^1]: Downloaded when scanning for vulnerabilities
|
||||
[^2]: Downloaded when scanning `jar/war/par/ear` files
|
||||
|
||||
@@ -394,7 +394,7 @@ $ trivy image --ignorefile ./.trivyignore.yaml python:3.9.16-alpine3.16
|
||||
2023-08-31T11:10:27.155+0600 INFO Vulnerability scanning is enabled
|
||||
2023-08-31T11:10:27.155+0600 INFO Secret scanning is enabled
|
||||
2023-08-31T11:10:27.155+0600 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
|
||||
2023-08-31T11:10:27.155+0600 INFO Please see also https://aquasecurity.github.io/trivy/dev/docs/scanner/secret/#recommendation for faster secret detection
|
||||
2023-08-31T11:10:27.155+0600 INFO Please see also https://trivy.dev/dev/docs/scanner/secret/#recommendation for faster secret detection
|
||||
2023-08-31T11:10:29.164+0600 INFO Detected OS: alpine
|
||||
2023-08-31T11:10:29.164+0600 INFO Detecting Alpine vulnerabilities...
|
||||
2023-08-31T11:10:29.169+0600 INFO Number of language-specific files: 1
|
||||
|
||||
@@ -117,3 +117,57 @@ The following example will fail when a critical vulnerability is found or the OS
|
||||
```
|
||||
$ trivy image --exit-code 1 --exit-on-eol 1 --severity CRITICAL alpine:3.16.3
|
||||
```
|
||||
|
||||
## Mirror Registries
|
||||
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
Trivy supports mirrors for [remote container images](../target/container_image.md#container-registry) and [databases](./db.md).
|
||||
|
||||
To configure them, add a list of mirrors along with the host to the [trivy config file](../references/configuration/config-file.md#registry-options).
|
||||
|
||||
!!! note
|
||||
Use the `index.docker.io` host for images from `Docker Hub`, even if you don't use that prefix.
|
||||
|
||||
Example for `index.docker.io`:
|
||||
```yaml
|
||||
registry:
|
||||
mirrors:
|
||||
index.docker.io:
|
||||
- mirror.gcr.io
|
||||
```
|
||||
|
||||
### Registry check procedure
|
||||
Trivy uses the following registry order to get the image:
|
||||
|
||||
- mirrors in the same order as they are specified in the configuration file
|
||||
- source registry
|
||||
|
||||
In cases where we can't get the image from the mirror registry (e.g. when authentication fails, image doesn't exist, etc.) - Trivy will check other mirrors (or the source registry if all mirrors have already been checked).
|
||||
|
||||
Example:
|
||||
```yaml
|
||||
registry:
|
||||
mirrors:
|
||||
index.docker.io:
|
||||
- mirror.with.bad.auth // We don't have credentials for this registry
|
||||
- mirror.without.image // Registry doesn't have this image
|
||||
```
|
||||
|
||||
When we want to get the image `alpine` with the settings above. The logic will be as follows:
|
||||
|
||||
1. Try to get the image from `mirror.with.bad.auth/library/alpine`, but we get an error because there are no credentials for this registry.
|
||||
2. Try to get the image from `mirror.without.image/library/alpine`, but we get an error because this registry doesn't have this image (but most likely it will be an error about authorization).
|
||||
3. Get the image from `index.docker.io` (the original registry).
|
||||
|
||||
## Check for updates
|
||||
|
||||
Trivy periodically checks for updates and notices, and displays a message to the user with recommendations.
|
||||
Updates checking is non-blocking and has no impact on scanning time, performance, results, or any user experience aspect besides displaying the message.
|
||||
You can disable updates checking by specifying the `--skip-version-check` flag.
|
||||
|
||||
## Telemetry
|
||||
|
||||
Trivy collected usage data for product improvement. More details in the [Telemetry document](../advanced/telemetry.md).
|
||||
You can disable telemetry collection using the `--disable-telemetry` flag.
|
||||
|
||||
@@ -19,9 +19,152 @@ Trivy supports the following formats:
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
```bash
|
||||
$ trivy image -f table golang:1.22.11-alpine3.20
|
||||
```
|
||||
$ trivy image -f table golang:1.12-alpine
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```
|
||||
...
|
||||
|
||||
Report Summary
|
||||
|
||||
┌─────────────────────────────────────────────┬──────────┬─────────────────┬─────────┐
|
||||
│ Target │ Type │ Vulnerabilities │ Secrets │
|
||||
├─────────────────────────────────────────────┼──────────┼─────────────────┼─────────┤
|
||||
│ golang:1.22.11-alpine3.20 (alpine 3.20.5) │ alpine │ 6 │ - │
|
||||
├─────────────────────────────────────────────┼──────────┼─────────────────┼─────────┤
|
||||
│ usr/local/go/bin/go │ gobinary │ 1 │ - │
|
||||
├─────────────────────────────────────────────┼──────────┼─────────────────┼─────────┤
|
||||
...
|
||||
├─────────────────────────────────────────────┼──────────┼─────────────────┼─────────┤
|
||||
│ usr/local/go/pkg/tool/linux_amd64/vet │ gobinary │ 1 │ - │
|
||||
└─────────────────────────────────────────────┴──────────┴─────────────────┴─────────┘
|
||||
Legend:
|
||||
- '-': Not scanned
|
||||
- '0': Clean (no security findings detected)
|
||||
|
||||
|
||||
golang:1.22.11-alpine3.20 (alpine 3.20.5)
|
||||
|
||||
Total: 6 (UNKNOWN: 2, LOW: 0, MEDIUM: 2, HIGH: 2, CRITICAL: 0)
|
||||
|
||||
┌────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────┬─────────────────────────────────────────────────────────────┐
|
||||
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
|
||||
├────────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
|
||||
│ libcrypto3 │ CVE-2024-12797 │ HIGH │ fixed │ 3.3.2-r1 │ 3.3.3-r0 │ openssl: RFC7250 handshakes with unauthenticated servers │
|
||||
│ │ │ │ │ │ │ don't abort as expected │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-12797 │
|
||||
│ ├────────────────┼──────────┤ │ ├───────────────┼─────────────────────────────────────────────────────────────┤
|
||||
│ │ CVE-2024-13176 │ MEDIUM │ │ │ 3.3.2-r2 │ openssl: Timing side-channel in ECDSA signature computation │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-13176 │
|
||||
├────────────┼────────────────┼──────────┤ │ ├───────────────┼─────────────────────────────────────────────────────────────┤
|
||||
│ libssl3 │ CVE-2024-12797 │ HIGH │ │ │ 3.3.3-r0 │ openssl: RFC7250 handshakes with unauthenticated servers │
|
||||
│ │ │ │ │ │ │ don't abort as expected │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-12797 │
|
||||
│ ├────────────────┼──────────┤ │ ├───────────────┼─────────────────────────────────────────────────────────────┤
|
||||
│ │ CVE-2024-13176 │ MEDIUM │ │ │ 3.3.2-r2 │ openssl: Timing side-channel in ECDSA signature computation │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-13176 │
|
||||
├────────────┼────────────────┼──────────┤ ├───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
|
||||
│ musl │ CVE-2025-26519 │ UNKNOWN │ │ 1.2.5-r0 │ 1.2.5-r1 │ musl libc 0.9.13 through 1.2.5 before 1.2.6 has an │
|
||||
│ │ │ │ │ │ │ out-of-bounds write ...... │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-26519 │
|
||||
├────────────┤ │ │ │ │ │ │
|
||||
│ musl-utils │ │ │ │ │ │ │
|
||||
│ │ │ │ │ │ │ │
|
||||
│ │ │ │ │ │ │ │
|
||||
└────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────────┘
|
||||
|
||||
usr/local/go/bin/go (gobinary)
|
||||
|
||||
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 0, CRITICAL: 0)
|
||||
|
||||
┌─────────┬────────────────┬──────────┬────────┬───────────────────┬──────────────────────────────┬──────────────────────────────────────────────────────────────┐
|
||||
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
|
||||
├─────────┼────────────────┼──────────┼────────┼───────────────────┼──────────────────────────────┼──────────────────────────────────────────────────────────────┤
|
||||
│ stdlib │ CVE-2025-22866 │ MEDIUM │ fixed │ v1.22.11 │ 1.22.12, 1.23.6, 1.24.0-rc.3 │ crypto/internal/nistec: golang: Timing sidechannel for P-256 │
|
||||
│ │ │ │ │ │ │ on ppc64le in crypto/internal/nistec │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-22866 │
|
||||
└─────────┴────────────────┴──────────┴────────┴───────────────────┴──────────────────────────────┴──────────────────────────────────────────────────────────────┘
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
#### Table mode
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
Trivy supports the following modes for `table` format:
|
||||
|
||||
| Mode | Enabled by default |
|
||||
|:----------------------------:|:-----------------:|
|
||||
| [summary](#summary-table) | ✓[^1] |
|
||||
| [detailed](#detailed-tables) | ✓ |
|
||||
|
||||
You can use `--table-mode` flag to enable/disable table mode(s).
|
||||
|
||||
|
||||
##### Summary table
|
||||
Summary table contains general information about the scan performed.
|
||||
|
||||
Nuances of table contents:
|
||||
|
||||
- Table includes columns for enabled [scanners](../references/terminology.md#scanner) only. Use `--scanners` flag to enable/disable scanners.
|
||||
- Table includes separate lines for the same targets but different scanners.
|
||||
- `-` means that the scanner didn't scan this target.
|
||||
- `0` means that the scanner scanned this target, but found no security issues.
|
||||
|
||||
<details>
|
||||
<summary>Report Summary</summary>
|
||||
|
||||
```
|
||||
┌───────────────────────┬────────────┬─────────────────┬───────────────────┬─────────┬──────────┐
|
||||
│ Target │ Type │ Vulnerabilities │ Misconfigurations │ Secrets │ Licenses │
|
||||
├───────────────────────┼────────────┼─────────────────┼───────────────────┼─────────┼──────────┤
|
||||
│ test (alpine 3.20.3) │ alpine │ 2 │ - │ - │ - │
|
||||
├───────────────────────┼────────────┼─────────────────┼───────────────────┼─────────┼──────────┤
|
||||
│ Java │ jar │ 2 │ - │ - │ - │
|
||||
├───────────────────────┼────────────┼─────────────────┼───────────────────┼─────────┼──────────┤
|
||||
│ app/Dockerfile │ dockerfile │ - │ 2 │ - │ - │
|
||||
├───────────────────────┼────────────┼─────────────────┼───────────────────┼─────────┼──────────┤
|
||||
│ requirements.txt │ text │ 0 │ - │ - │ - │
|
||||
├───────────────────────┼────────────┼─────────────────┼───────────────────┼─────────┼──────────┤
|
||||
│ requirements.txt │ text │ - │ - │ 1 │ - │
|
||||
├───────────────────────┼────────────┼─────────────────┼───────────────────┼─────────┼──────────┤
|
||||
│ OS Packages │ - │ - │ - │ - │ 1 │
|
||||
├───────────────────────┼────────────┼─────────────────┼───────────────────┼─────────┼──────────┤
|
||||
│ Java │ - │ - │ - │ - │ 0 │
|
||||
└───────────────────────┴────────────┴─────────────────┴───────────────────┴─────────┴──────────┘
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
##### Detailed tables
|
||||
Detailed tables contain information about found security issues for each target with more detailed information (CVE-ID, severity, version, etc.).
|
||||
|
||||
<details>
|
||||
<summary>Detailed tables</summary>
|
||||
|
||||
```
|
||||
|
||||
usr/local/go/bin/go (gobinary)
|
||||
|
||||
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 0, CRITICAL: 0)
|
||||
|
||||
┌─────────┬────────────────┬──────────┬────────┬───────────────────┬──────────────────────────────┬──────────────────────────────────────────────────────────────┐
|
||||
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
|
||||
├─────────┼────────────────┼──────────┼────────┼───────────────────┼──────────────────────────────┼──────────────────────────────────────────────────────────────┤
|
||||
│ stdlib │ CVE-2025-22866 │ MEDIUM │ fixed │ v1.22.11 │ 1.22.12, 1.23.6, 1.24.0-rc.3 │ crypto/internal/nistec: golang: Timing sidechannel for P-256 │
|
||||
│ │ │ │ │ │ │ on ppc64le in crypto/internal/nistec │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-22866 │
|
||||
└─────────┴────────────────┴──────────┴────────┴───────────────────┴──────────────────────────────┴──────────────────────────────────────────────────────────────┘
|
||||
|
||||
```
|
||||
</details>
|
||||
|
||||
#### Show origins of vulnerable dependencies
|
||||
|
||||
@@ -58,6 +201,7 @@ The following languages are currently supported:
|
||||
| | [yarn.lock][yarn-lock] |
|
||||
| .NET | [packages.lock.json][dotnet-packages-lock] |
|
||||
| Python | [poetry.lock][poetry-lock] |
|
||||
| | [uv.lock][uv-lock] |
|
||||
| Ruby | [Gemfile.lock][gemfile-lock] |
|
||||
| Rust | [cargo-auditable binaries][cargo-binaries] |
|
||||
| Go | [go.mod][go-mod] |
|
||||
@@ -120,124 +264,183 @@ Then, you can try to update **axios@0.21.4** and **cra-append-sw@2.7.0** to reso
|
||||
| License | ✓ |
|
||||
|
||||
```
|
||||
$ trivy image -f json -o results.json golang:1.12-alpine
|
||||
$ trivy image -f json -o results.json alpine:latest
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```
|
||||
2019-05-16T01:46:31.777+0900 INFO Updating vulnerability database...
|
||||
2019-05-16T01:47:03.007+0900 INFO Detecting Alpine vulnerabilities...
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>JSON</summary>
|
||||
|
||||
```
|
||||
[
|
||||
{
|
||||
"Target": "php-app/composer.lock",
|
||||
"Vulnerabilities": null
|
||||
},
|
||||
{
|
||||
"Target": "node-app/package-lock.json",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-16487",
|
||||
"PkgName": "lodash",
|
||||
"InstalledVersion": "4.17.4",
|
||||
"FixedVersion": "\u003e=4.17.11",
|
||||
"Title": "lodash: Prototype pollution in utilities function",
|
||||
"Description": "A prototype pollution vulnerability was found in lodash \u003c4.17.11 where the functions merge, mergeWith, and defaultsDeep can be tricked into adding or modifying properties of Object.prototype.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16487",
|
||||
{
|
||||
"SchemaVersion": 2,
|
||||
"CreatedAt": "2024-12-26T21:58:15.943876+05:30",
|
||||
"ArtifactName": "alpine:latest",
|
||||
"ArtifactType": "container_image",
|
||||
"Metadata": {
|
||||
"OS": {
|
||||
"Family": "alpine",
|
||||
"Name": "3.20.3"
|
||||
},
|
||||
"ImageID": "sha256:511a44083d3a23416fadc62847c45d14c25cbace86e7a72b2b350436978a0450",
|
||||
"DiffIDs": [
|
||||
"sha256:651d9022c23486dfbd396c13db293af6845731cbd098a5f5606db4bc9f5573e8"
|
||||
],
|
||||
"RepoTags": [
|
||||
"alpine:latest"
|
||||
],
|
||||
"RepoDigests": [
|
||||
"alpine@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a"
|
||||
],
|
||||
"ImageConfig": {
|
||||
"architecture": "arm64",
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"history": [
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "ADD alpine-minirootfs-3.20.3-aarch64.tar.gz / # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "CMD [\"/bin/sh\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
}
|
||||
],
|
||||
"os": "linux",
|
||||
"rootfs": {
|
||||
"type": "layers",
|
||||
"diff_ids": [
|
||||
"sha256:651d9022c23486dfbd396c13db293af6845731cbd098a5f5606db4bc9f5573e8"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"Cmd": [
|
||||
"/bin/sh"
|
||||
],
|
||||
"Env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
],
|
||||
"WorkingDir": "/",
|
||||
"ArgsEscaped": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"Target": "trivy-ci-test (alpine 3.7.1)",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-16840",
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.61.0-r0",
|
||||
"FixedVersion": "7.61.1-r1",
|
||||
"Title": "curl: Use-after-free when closing \"easy\" handle in Curl_close()",
|
||||
"Description": "A heap use-after-free flaw was found in curl versions from 7.59.0 through 7.61.1 in the code related to closing an easy handle. ",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16840",
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-3822",
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.61.0-r0",
|
||||
"FixedVersion": "7.61.1-r2",
|
||||
"Title": "curl: NTLMv2 type-3 header stack buffer overflow",
|
||||
"Description": "libcurl versions from 7.36.0 to before 7.64.0 are vulnerable to a stack-based buffer overflow. ",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://curl.haxx.se/docs/CVE-2019-3822.html",
|
||||
"https://lists.apache.org/thread.html/8338a0f605bdbb3a6098bb76f666a95fc2b2f53f37fa1ecc89f1146f@%3Cdevnull.infra.apache.org%3E"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-16839",
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.61.0-r0",
|
||||
"FixedVersion": "7.61.1-r1",
|
||||
"Title": "curl: Integer overflow leading to heap-based buffer overflow in Curl_sasl_create_plain_message()",
|
||||
"Description": "Curl versions 7.33.0 through 7.61.1 are vulnerable to a buffer overrun in the SASL authentication code that may lead to denial of service.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://github.com/curl/curl/commit/f3a24d7916b9173c69a3e0ee790102993833d6c5",
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-19486",
|
||||
"PkgName": "git",
|
||||
"InstalledVersion": "2.15.2-r0",
|
||||
"FixedVersion": "2.15.3-r0",
|
||||
"Title": "git: Improper handling of PATH allows for commands to be executed from the current directory",
|
||||
"Description": "Git before 2.19.2 on Linux and UNIX executes commands from the current working directory (as if '.' were at the end of $PATH) in certain cases involving the run_command() API and run-command.c, because there was a dangerous change from execvp to execv during 2017.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://usn.ubuntu.com/3829-1/",
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-17456",
|
||||
"PkgName": "git",
|
||||
"InstalledVersion": "2.15.2-r0",
|
||||
"FixedVersion": "2.15.3-r0",
|
||||
"Title": "git: arbitrary code execution via .gitmodules",
|
||||
"Description": "Git before 2.14.5, 2.15.x before 2.15.3, 2.16.x before 2.16.5, 2.17.x before 2.17.2, 2.18.x before 2.18.1, and 2.19.x before 2.19.1 allows remote code execution during processing of a recursive \"git clone\" of a superproject if a .gitmodules file has a URL field beginning with a '-' character.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://www.securitytracker.com/id/1041811",
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Target": "python-app/Pipfile.lock",
|
||||
"Vulnerabilities": null
|
||||
},
|
||||
{
|
||||
"Target": "ruby-app/Gemfile.lock",
|
||||
"Vulnerabilities": null
|
||||
},
|
||||
{
|
||||
"Target": "rust-app/Cargo.lock",
|
||||
"Vulnerabilities": null
|
||||
}
|
||||
]
|
||||
"Results": [
|
||||
{
|
||||
"Target": "alpine:latest (alpine 3.20.3)",
|
||||
"Class": "os-pkgs",
|
||||
"Type": "alpine",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2024-9143",
|
||||
"PkgID": "libcrypto3@3.3.2-r0",
|
||||
"PkgName": "libcrypto3",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:apk/alpine/libcrypto3@3.3.2-r0?arch=aarch64\u0026distro=3.20.3",
|
||||
"UID": "f705555b49cd2259"
|
||||
},
|
||||
"InstalledVersion": "3.3.2-r0",
|
||||
"FixedVersion": "3.3.2-r1",
|
||||
"Status": "fixed",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:651d9022c23486dfbd396c13db293af6845731cbd098a5f5606db4bc9f5573e8"
|
||||
},
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2024-9143",
|
||||
"DataSource": {
|
||||
"ID": "alpine",
|
||||
"Name": "Alpine Secdb",
|
||||
"URL": "https://secdb.alpinelinux.org/"
|
||||
},
|
||||
"Title": "openssl: Low-level invalid GF(2^m) parameters lead to OOB memory access",
|
||||
"Description": "Issue summary: Use of the low-level GF(2^m) elliptic curve APIs with untrusted\nexplicit values for the field polynomial can lead to out-of-bounds memory reads\nor writes.\n\nImpact summary: Out of bound memory writes can lead to an application crash or\neven a possibility of a remote code execution, however, in all the protocols\ninvolving Elliptic Curve Cryptography that we're aware of, either only \"named\ncurves\" are supported, or, if explicit curve parameters are supported, they\nspecify an X9.62 encoding of binary (GF(2^m)) curves that can't represent\nproblematic input values. Thus the likelihood of existence of a vulnerable\napplication is low.\n\nIn particular, the X9.62 encoding is used for ECC keys in X.509 certificates,\nso problematic inputs cannot occur in the context of processing X.509\ncertificates. Any problematic use-cases would have to be using an \"exotic\"\ncurve encoding.\n\nThe affected APIs include: EC_GROUP_new_curve_GF2m(), EC_GROUP_new_from_params(),\nand various supporting BN_GF2m_*() functions.\n\nApplications working with \"exotic\" explicit binary (GF(2^m)) curve parameters,\nthat make it possible to represent invalid field polynomials with a zero\nconstant term, via the above or similar APIs, may terminate abruptly as a\nresult of reading or writing outside of array bounds. Remote code execution\ncannot easily be ruled out.\n\nThe FIPS modules in 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.",
|
||||
"Severity": "LOW",
|
||||
"CweIDs": [
|
||||
"CWE-787"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"amazon": 3,
|
||||
"redhat": 1,
|
||||
"ubuntu": 1
|
||||
},
|
||||
"CVSS": {
|
||||
"redhat": {
|
||||
"V3Vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L",
|
||||
"V3Score": 3.7
|
||||
}
|
||||
},
|
||||
"References": [
|
||||
"https://access.redhat.com/security/cve/CVE-2024-9143",
|
||||
"https://github.com/openssl/openssl/commit/72ae83ad214d2eef262461365a1975707f862712",
|
||||
"https://github.com/openssl/openssl/commit/bc7e04d7c8d509fb78fc0e285aa948fb0da04700",
|
||||
"https://github.com/openssl/openssl/commit/c0d3e4d32d2805f49bec30547f225bc4d092e1f4",
|
||||
"https://github.com/openssl/openssl/commit/fdf6723362ca51bd883295efe206cb5b1cfa5154",
|
||||
"https://github.openssl.org/openssl/extended-releases/commit/8efc0cbaa8ebba8e116f7b81a876a4123594d86a",
|
||||
"https://github.openssl.org/openssl/extended-releases/commit/9d576994cec2b7aa37a91740ea7e680810957e41",
|
||||
"https://nvd.nist.gov/vuln/detail/CVE-2024-9143",
|
||||
"https://openssl-library.org/news/secadv/20241016.txt",
|
||||
"https://www.cve.org/CVERecord?id=CVE-2024-9143"
|
||||
],
|
||||
"PublishedDate": "2024-10-16T17:15:18.13Z",
|
||||
"LastModifiedDate": "2024-11-08T16:35:21.58Z"
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2024-9143",
|
||||
"PkgID": "libssl3@3.3.2-r0",
|
||||
"PkgName": "libssl3",
|
||||
"PkgIdentifier": {
|
||||
"PURL": "pkg:apk/alpine/libssl3@3.3.2-r0?arch=aarch64\u0026distro=3.20.3",
|
||||
"UID": "c4a39ef718e71832"
|
||||
},
|
||||
"InstalledVersion": "3.3.2-r0",
|
||||
"FixedVersion": "3.3.2-r1",
|
||||
"Status": "fixed",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:651d9022c23486dfbd396c13db293af6845731cbd098a5f5606db4bc9f5573e8"
|
||||
},
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2024-9143",
|
||||
"DataSource": {
|
||||
"ID": "alpine",
|
||||
"Name": "Alpine Secdb",
|
||||
"URL": "https://secdb.alpinelinux.org/"
|
||||
},
|
||||
"Title": "openssl: Low-level invalid GF(2^m) parameters lead to OOB memory access",
|
||||
"Description": "Issue summary: Use of the low-level GF(2^m) elliptic curve APIs with untrusted\nexplicit values for the field polynomial can lead to out-of-bounds memory reads\nor writes.\n\nImpact summary: Out of bound memory writes can lead to an application crash or\neven a possibility of a remote code execution, however, in all the protocols\ninvolving Elliptic Curve Cryptography that we're aware of, either only \"named\ncurves\" are supported, or, if explicit curve parameters are supported, they\nspecify an X9.62 encoding of binary (GF(2^m)) curves that can't represent\nproblematic input values. Thus the likelihood of existence of a vulnerable\napplication is low.\n\nIn particular, the X9.62 encoding is used for ECC keys in X.509 certificates,\nso problematic inputs cannot occur in the context of processing X.509\ncertificates. Any problematic use-cases would have to be using an \"exotic\"\ncurve encoding.\n\nThe affected APIs include: EC_GROUP_new_curve_GF2m(), EC_GROUP_new_from_params(),\nand various supporting BN_GF2m_*() functions.\n\nApplications working with \"exotic\" explicit binary (GF(2^m)) curve parameters,\nthat make it possible to represent invalid field polynomials with a zero\nconstant term, via the above or similar APIs, may terminate abruptly as a\nresult of reading or writing outside of array bounds. Remote code execution\ncannot easily be ruled out.\n\nThe FIPS modules in 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.",
|
||||
"Severity": "LOW",
|
||||
"CweIDs": [
|
||||
"CWE-787"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"amazon": 3,
|
||||
"redhat": 1,
|
||||
"ubuntu": 1
|
||||
},
|
||||
"CVSS": {
|
||||
"redhat": {
|
||||
"V3Vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L",
|
||||
"V3Score": 3.7
|
||||
}
|
||||
},
|
||||
"References": [
|
||||
"https://access.redhat.com/security/cve/CVE-2024-9143",
|
||||
"https://github.com/openssl/openssl/commit/72ae83ad214d2eef262461365a1975707f862712",
|
||||
"https://github.com/openssl/openssl/commit/bc7e04d7c8d509fb78fc0e285aa948fb0da04700",
|
||||
"https://github.com/openssl/openssl/commit/c0d3e4d32d2805f49bec30547f225bc4d092e1f4",
|
||||
"https://github.com/openssl/openssl/commit/fdf6723362ca51bd883295efe206cb5b1cfa5154",
|
||||
"https://github.openssl.org/openssl/extended-releases/commit/8efc0cbaa8ebba8e116f7b81a876a4123594d86a",
|
||||
"https://github.openssl.org/openssl/extended-releases/commit/9d576994cec2b7aa37a91740ea7e680810957e41",
|
||||
"https://nvd.nist.gov/vuln/detail/CVE-2024-9143",
|
||||
"https://openssl-library.org/news/secadv/20241016.txt",
|
||||
"https://www.cve.org/CVERecord?id=CVE-2024-9143"
|
||||
],
|
||||
"PublishedDate": "2024-10-16T17:15:18.13Z",
|
||||
"LastModifiedDate": "2024-11-08T16:35:21.58Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -339,8 +542,8 @@ If Trivy is installed using rpm then default templates can be found at `/usr/loc
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | |
|
||||
| License | |
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
In the following example using the template `junit.tpl` XML can be generated.
|
||||
```
|
||||
@@ -414,7 +617,7 @@ $ trivy convert --format cyclonedx --output result.cdx result.json
|
||||
```
|
||||
|
||||
!!! note
|
||||
Please note that if you want to convert to a format that requires a list of packages,
|
||||
Please note that if you want to convert to a format that requires a list of packages,
|
||||
such as SBOM, you need to add the `--list-all-pkgs` flag when outputting in JSON.
|
||||
|
||||
[Filtering options](./filtering.md) such as `--severity` are also available with `convert`.
|
||||
@@ -449,6 +652,7 @@ $ trivy convert --format table --severity CRITICAL result.json
|
||||
[yarn-lock]: ../coverage/language/nodejs.md#yarn
|
||||
[dotnet-packages-lock]: ../coverage/language/dotnet.md#packageslockjson
|
||||
[poetry-lock]: ../coverage/language/python.md#poetry
|
||||
[uv-lock]: ../coverage/language/python.md#uv
|
||||
[gemfile-lock]: ../coverage/language/ruby.md#bundler
|
||||
[go-mod]: ../coverage/language/golang.md#go-module
|
||||
[composer-lock]: ../coverage/language/php.md#composerlock
|
||||
@@ -457,3 +661,5 @@ $ trivy convert --format table --severity CRITICAL result.json
|
||||
[sbt-lockfile]: ../coverage/language/java.md#sbt
|
||||
[pubspec-lock]: ../coverage/language/dart.md#dart
|
||||
[cargo-binaries]: ../coverage/language/rust.md#binaries
|
||||
|
||||
[^1]: To show summary table in `convert` mode - you need to enable the scanners used during JSON report generation.
|
||||
@@ -1,8 +1,22 @@
|
||||
# Skipping Files and Directories
|
||||
# Selecting files for scanning
|
||||
|
||||
This section details ways to specify the files and directories that Trivy should not scan.
|
||||
When scanning a target (image, code repository, etc), Trivy traverses all directories and files in that target and looks for known files to scan. For example, vulnerability scanner might look for `/lib/apk/db/installed` for Alpine APK scanning or `requirements.txt` file for Python pip scanning, and misconfiguration scanner might look for `Dockerfile` for Dockerfile scanning. This document explains how to control which files Trivy looks (including skipping files) for and how it should process them.
|
||||
|
||||
!!! note
|
||||
Selecting/skipping files is different from filtering/ignoring results, which is covered in the [Filtering document](./filtering.md)
|
||||
|
||||
## Skip Files and Directories
|
||||
|
||||
You can skip specific files and directories using the `--skip-files` and `--skip-dirs` flags.
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
trivy image --skip-files "/Gemfile.lock" --skip-dirs "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
|
||||
```
|
||||
|
||||
This feature is relevant for the following scanners:
|
||||
|
||||
## Skip Files
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
@@ -10,89 +24,58 @@ This section details ways to specify the files and directories that Trivy should
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
By default, Trivy traverses directories and searches for all necessary files for scanning.
|
||||
You can skip files that you don't maintain using the `--skip-files` flag, or the equivalent Trivy YAML config option.
|
||||
It's possible to specify glob patterns when referring to a file or directory. The glob expression follows the ["doublestar" library syntax](https://pkg.go.dev/github.com/bmatcuk/doublestar/v4@v4.8.1#readme-patterns).
|
||||
|
||||
Examples:
|
||||
|
||||
Using the `--skip-files` flag:
|
||||
```bash
|
||||
$ trivy image --skip-files "/Gemfile.lock" --skip-files "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0/Gemfile.lock" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
|
||||
# skip any file named `bar` in the subdirectories of testdata
|
||||
trivy image --skip-files "./testdata/*/bar" .
|
||||
```
|
||||
|
||||
Using the Trivy YAML configuration:
|
||||
```bash
|
||||
# skip any files with the extension `.tf` in subdirectories of foo at any depth
|
||||
trivy config --skip-files "./foo/**/*.tf" .
|
||||
```
|
||||
|
||||
```bash
|
||||
# skip all subdirectories of the testdata directory.
|
||||
trivy image --skip-dirs "./testdata/*" .
|
||||
```
|
||||
|
||||
```bash
|
||||
# skip subdirectories at any depth named `.terraform/`.
|
||||
# this will match `./foo/.terraform` or `./foo/bar/.terraform`, but not `./.terraform`
|
||||
trivy config --skip-dirs "**/.terraform" .
|
||||
```
|
||||
|
||||
Like any other flag, this is available as Trivy YAML configuration.
|
||||
|
||||
For example:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
skip-files:
|
||||
- foo
|
||||
- "testdata/*/bar"
|
||||
```
|
||||
|
||||
It's possible to specify globs as part of the value.
|
||||
|
||||
```bash
|
||||
$ trivy image --skip-files "./testdata/*/bar" .
|
||||
```
|
||||
|
||||
This will skip any file named `bar` in the subdirectories of testdata.
|
||||
|
||||
```bash
|
||||
$ trivy config --skip-files "./foo/**/*.tf" .
|
||||
```
|
||||
|
||||
This will skip any files with the extension `.tf` in subdirectories of foo at any depth.
|
||||
|
||||
## Skip Directories
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
By default, Trivy traverses directories and searches for all necessary files for scanning.
|
||||
You can skip directories that you don't maintain using the `--skip-dirs` flag, or the equivalent Trivy YAML config option.
|
||||
|
||||
Using the `--skip-dirs` flag:
|
||||
```bash
|
||||
$ trivy image --skip-dirs /var/lib/gems/2.5.0/gems/fluent-plugin-detect-exceptions-0.0.13 --skip-dirs "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
|
||||
```
|
||||
|
||||
Using the Trivy YAML configuration:
|
||||
```yaml
|
||||
image:
|
||||
skip-dirs:
|
||||
- foo/bar/
|
||||
- "**/.terraform"
|
||||
```
|
||||
|
||||
It's possible to specify globs as part of the value.
|
||||
## Customizing file handling
|
||||
|
||||
You can customize which files Trivy scans and how it interprets them with the `--file-patterns` flag.
|
||||
A file pattern configuration takes the following form: `<analyzer>:<path>`, such that files matching the `<path>` will be processed with the respective `<analyzer>`.
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
$ trivy image --skip-dirs "./testdata/*" .
|
||||
trivy fs --file-patterns "pip:.requirements-test.txt ."
|
||||
```
|
||||
|
||||
This will skip all subdirectories of the testdata directory.
|
||||
This feature is relevant for the following scanners:
|
||||
|
||||
```bash
|
||||
$ trivy config --skip-dirs "**/.terraform" .
|
||||
```
|
||||
|
||||
This will skip subdirectories at any depth named `.terraform/`. (Note: this will match `./foo/.terraform` or
|
||||
`./foo/bar/.terraform`, but not `./.terraform`.)
|
||||
|
||||
!!! tip
|
||||
Glob patterns work with any trivy subcommand (image, config, etc.) and can be specified to skip both directories (with `--skip-dirs`) and files (with `--skip-files`).
|
||||
|
||||
|
||||
### Advanced globbing
|
||||
Trivy also supports bash style [extended](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Pattern-Matching) glob pattern matching.
|
||||
|
||||
```bash
|
||||
$ trivy image --skip-files "**/foo" image:tag
|
||||
```
|
||||
|
||||
This will skip the file `foo` that happens to be nested under any parent(s).
|
||||
|
||||
## File patterns
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
@@ -100,20 +83,27 @@ This will skip the file `foo` that happens to be nested under any parent(s).
|
||||
| Secret | |
|
||||
| License | ✓[^1] |
|
||||
|
||||
When a directory is given as an input, Trivy will recursively look for and test all files based on file patterns.
|
||||
The default file patterns are [here](../scanner/misconfiguration/custom/index.md).
|
||||
The list of analyzers can be found [here](https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/pkg/fanal/analyzer/const.go).
|
||||
Note that this flag is not applicable for parsers that accepts files of different extensions, for example the Terraform file parser which handles .tf and .tf.json files.
|
||||
|
||||
In addition to the default file patterns, the `--file-patterns` option takes regexp patterns to look for your files.
|
||||
For example, it may be useful when your file name of Dockerfile doesn't match the default patterns.
|
||||
|
||||
This can be repeated for specifying multiple file patterns.
|
||||
The file path can use a [regular expression](https://pkg.go.dev/regexp/syntax). For example:
|
||||
|
||||
A file pattern contains the analyzer it is used for, and the pattern itself, joined by a semicolon. For example:
|
||||
```
|
||||
--file-patterns "dockerfile:.*.docker" --file-patterns "kubernetes:*.tpl" --file-patterns "pip:requirements-.*\.txt"
|
||||
```bash
|
||||
# interpret any file with .txt extension as a python pip requirements file
|
||||
trivy fs --file-patterns "pip:requirements-.*\.txt .
|
||||
```
|
||||
|
||||
The prefixes are listed [here](https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/pkg/fanal/analyzer/const.go)
|
||||
The flag can be repeated for specifying multiple file patterns. For example:
|
||||
|
||||
```bash
|
||||
# look for Dockerfile called production.docker and a python pip requirements file called requirements-test.txt
|
||||
trivy fs --scanners misconfig,vuln --file-patterns "dockerfile:.production.docker" --file-patterns "pip:.requirements-test.txt ."
|
||||
```
|
||||
|
||||
[^1]: Only work with the [license-full](../scanner/license.md) flag)
|
||||
[^1]: Only work with the [license-full](../scanner/license.md) flag
|
||||
|
||||
## Avoid full filesystem traversal
|
||||
|
||||
In specific scenarios Trivy can avoid traversing the entire filesystem, which makes scanning faster and more efficient.
|
||||
For more information see [here](../target/rootfs.md#performance-optimization)
|
||||
|
||||
@@ -82,8 +82,9 @@ It possibly produces false positives.
|
||||
See [the caveat](#stdlib-vulnerabilities) for details.
|
||||
|
||||
### License
|
||||
To identify licenses, you need to download modules to local cache beforehand, such as `go mod download`, `go mod tidy`, etc.
|
||||
Trivy traverses `$GOPATH/pkg/mod` and collects those extra information.
|
||||
To identify licenses, you need to download modules to local cache beforehand, such as `go mod download`, `go mod tidy`, `go mod vendor`, etc.
|
||||
If the `vendor` directory exists, Trivy uses this directory when scanning for license files.
|
||||
For other cases Trivy traverses `$GOPATH/pkg/mod`dir and collects those extra information.
|
||||
|
||||
### Dependency Graph
|
||||
Same as licenses, you need to download modules to local cache beforehand.
|
||||
@@ -100,7 +101,7 @@ $ trivy rootfs ./your_binary
|
||||
It doesn't work with UPX-compressed binaries.
|
||||
|
||||
### Main Module
|
||||
Go binaries installed using the `go install` command contains correct (semver) version for the main module and therefor are detected by Trivy.
|
||||
Go binaries installed using the `go install` command contains correct (semver) version for the main module and therefore are detected by Trivy.
|
||||
In other cases, Go uses the `(devel)` version[^2].
|
||||
In this case, Trivy will attempt to parse any `-ldflags` as it's a common practice to pass versions this way.
|
||||
If unsuccessful, the version will be empty[^3].
|
||||
|
||||
@@ -22,6 +22,7 @@ On the other hand, when the target is a post-build artifact, like a container im
|
||||
| | gemspec | ✅ | ✅ | - | - |
|
||||
| [Python](python.md) | Pipfile.lock | - | - | ✅ | ✅ |
|
||||
| | poetry.lock | - | - | ✅ | ✅ |
|
||||
| | uv.lock | - | - | ✅ | ✅ |
|
||||
| | requirements.txt | - | - | ✅ | ✅ |
|
||||
| | egg package[^1] | ✅ | ✅ | - | - |
|
||||
| | wheel package[^2] | ✅ | ✅ | - | - |
|
||||
@@ -30,6 +31,7 @@ On the other hand, when the target is a post-build artifact, like a container im
|
||||
| [Node.js](nodejs.md) | package-lock.json | - | - | ✅ | ✅ |
|
||||
| | yarn.lock | - | - | ✅ | ✅ |
|
||||
| | pnpm-lock.yaml | - | - | ✅ | ✅ |
|
||||
| | bun.lock | - | - | ✅ | ✅ |
|
||||
| | package.json | ✅ | ✅ | - | - |
|
||||
| [.NET](dotnet.md) | packages.lock.json | ✅ | ✅ | ✅ | ✅ |
|
||||
| | packages.config | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
@@ -12,12 +12,12 @@ Each artifact supports the following scanners:
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Artifact | Internet access | Dev dependencies | [Dependency graph][dependency-graph] | Position | [Detection Priority][detection-priority] |
|
||||
|------------------|:---------------------:|:----------------:|:------------------------------------:|:--------:|:----------------------------------------:|
|
||||
| JAR/WAR/PAR/EAR | Trivy Java DB | Include | - | - | Not needed |
|
||||
| pom.xml | Maven repository [^1] | Exclude | ✓ | ✓[^7] | - |
|
||||
| *gradle.lockfile | - | Exclude | ✓ | ✓ | Not needed |
|
||||
| *.sbt.lock | - | Exclude | - | ✓ | Not needed |
|
||||
| Artifact | Internet access | Dev dependencies | [Dependency graph][dependency-graph] | Position | [Detection Priority][detection-priority] |
|
||||
|------------------|:---------------------:|:----------------------:|:------------------------------------:|:--------:|:----------------------------------------:|
|
||||
| JAR/WAR/PAR/EAR | Trivy Java DB | Include | - | - | Not needed |
|
||||
| pom.xml | Maven repository [^1] | Exclude | ✓ | ✓[^7] | - |
|
||||
| *gradle.lockfile | - | [Exclude](#gradlelock) | ✓ | ✓ | Not needed |
|
||||
| *.sbt.lock | - | Exclude | - | ✓ | Not needed |
|
||||
|
||||
These may be enabled or disabled depending on the target.
|
||||
See [here](./index.md) for the detail.
|
||||
@@ -96,6 +96,9 @@ If you need to show them, use the `--include-dev-deps` flag.
|
||||
!!!note
|
||||
All necessary files are checked locally. Gradle file scanning doesn't require internet access.
|
||||
|
||||
By default, Trivy doesn't report development dependencies.
|
||||
Use the `--include-dev-deps` flag to include them in the results.
|
||||
|
||||
### Dependency-tree
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
@@ -105,7 +108,7 @@ But there is no reliable way to determine direct dependencies (even using other
|
||||
Therefore, we mark all dependencies as indirect to use logic to guess direct dependencies and build a dependency tree.
|
||||
|
||||
### Licenses
|
||||
Trity also can detect licenses for dependencies.
|
||||
Trivy also can detect licenses for dependencies.
|
||||
|
||||
Make sure that you have cache[^8] directory to find licenses from `*.pom` dependency files.
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ The following table provides an outline of the features Trivy offers.
|
||||
| npm | package-lock.json | ✓ | [Excluded](#npm) | ✓ | ✓ |
|
||||
| Yarn | yarn.lock | ✓ | [Excluded](#yarn) | ✓ | ✓ |
|
||||
| pnpm | pnpm-lock.yaml | ✓ | [Excluded](#lock-file-v9-version) | ✓ | - |
|
||||
| Bun | yarn.lock | ✓ | [Excluded](#yarn) | ✓ | ✓ |
|
||||
| Bun | bun.lock | ✓ | [Excluded](#bun) | ✓ | ✓ |
|
||||
|
||||
In addition, Trivy scans installed packages with `package.json`.
|
||||
|
||||
@@ -43,14 +43,26 @@ Trivy analyzes `node_modules` for licenses.
|
||||
By default, Trivy doesn't report development dependencies. Use the `--include-dev-deps` flag to include them.
|
||||
|
||||
### Yarn
|
||||
Trivy parses `yarn.lock`, which doesn't contain information about development dependencies.
|
||||
Trivy also uses `package.json` file to handle [aliases](https://classic.yarnpkg.com/lang/en/docs/cli/add/#toc-yarn-add-alias).
|
||||
Trivy parses `yarn.lock`.
|
||||
|
||||
To exclude devDependencies and allow aliases, `package.json` also needs to be present next to `yarn.lock`.
|
||||
Trivy also analyzes additional files to gather more information about the detected dependencies.
|
||||
|
||||
Trivy analyzes `.yarn` (Yarn 2+) or `node_modules` (Yarn Classic) folder next to the yarn.lock file to detect licenses.
|
||||
- package.json
|
||||
- node_modules/**
|
||||
|
||||
By default, Trivy doesn't report development dependencies. Use the `--include-dev-deps` flag to include them.
|
||||
#### Package relationships
|
||||
`yarn.lock` files don't contain information about package relationships, such as direct or indirect dependencies.
|
||||
To enrich this information, Trivy parses the `package.json` file located next to the `yarn.lock` file as well as workspace `package.json` files.
|
||||
|
||||
By default, Trivy doesn't report development dependencies.
|
||||
Use the `--include-dev-deps` flag to include them in the results.
|
||||
|
||||
#### Development dependencies
|
||||
`yarn.lock` files don't contain information about package groups, such as production and development dependencies.
|
||||
To identify dev dependencies and support [aliases][yarn-aliases], Trivy parses the `package.json` file located next to the `yarn.lock` file as well as workspace `package.json` files.
|
||||
|
||||
#### Licenses
|
||||
Trivy analyzes the `.yarn` directory (for Yarn 2+) or the `node_modules` directory (for Yarn Classic) located next to the `yarn.lock` file to detect licenses.
|
||||
|
||||
### pnpm
|
||||
Trivy parses `pnpm-lock.yaml`, then finds production dependencies and builds a [tree][dependency-graph] of dependencies with vulnerabilities.
|
||||
@@ -60,7 +72,13 @@ To identify licenses, you need to download dependencies to `node_modules` before
|
||||
Trivy supports `Dev` field for `pnpm-lock.yaml` v9 or later. Use the `--include-dev-deps` flag to include the developer's dependencies in the result.
|
||||
|
||||
### Bun
|
||||
Trivy supports scanning `yarn.lock` files generated by [Bun](https://bun.sh/docs/install/lockfile#how-do-i-inspect-bun-s-lockfile). You can use the command `bun install -y` to generate a Yarn-compatible `yarn.lock`.
|
||||
Trivy also supports scanning `bun.lock` file generated by [Bun](https://bun.sh/blog/bun-lock-text-lockfile).
|
||||
You can use Bun v1.2 which uses this file as default or use `bun install --save-text-lockfile` in Bun v1.1.39 to generate it.
|
||||
|
||||
For previous Bun versions you can use the command `bun install -y` to generate a Yarn-compatible `yarn.lock` and then scan it with Trivy.
|
||||
|
||||
#### Development dependencies
|
||||
`bun.lock` contains information about package groups, such as production and development dependencies. By default, Trivy doesn't report development dependencies. Use the `--include-dev-deps` flag to include them.
|
||||
|
||||
!!! note
|
||||
`bun.lockb` is not supported.
|
||||
@@ -74,5 +92,6 @@ It only extracts package names, versions and licenses for those packages.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[pnpm-lockfile-v6]: https://github.com/pnpm/spec/blob/fd3238639af86c09b7032cc942bab3438b497036/lockfile/6.0.md
|
||||
[yarn-aliases]: https://classic.yarnpkg.com/lang/en/docs/cli/add/#toc-yarn-add-alias
|
||||
|
||||
[^1]: [yarn.lock](#bun) must be generated
|
||||
|
||||
@@ -8,6 +8,7 @@ The following scanners are supported for package managers.
|
||||
| pip | ✓ | ✓ | ✓ |
|
||||
| Pipenv | ✓ | ✓ | - |
|
||||
| Poetry | ✓ | ✓ | - |
|
||||
| uv | ✓ | ✓ | - |
|
||||
|
||||
In addition, Trivy supports three formats of Python packages: `egg`, `wheel` and `conda`.
|
||||
The following scanners are supported for Python packages.
|
||||
@@ -25,7 +26,8 @@ The following table provides an outline of the features Trivy offers.
|
||||
|-----------------|------------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|:----------------------------------------:|
|
||||
| pip | requirements.txt | - | Include | - | ✓ | ✓ |
|
||||
| Pipenv | Pipfile.lock | ✓ | Include | - | ✓ | Not needed |
|
||||
| Poetry | poetry.lock | ✓ | Exclude | ✓ | - | Not needed |
|
||||
| Poetry | poetry.lock | ✓ | [Exclude](#poetry) | ✓ | - | Not needed |
|
||||
| uv | uv.lock | ✓ | [Exclude](#uv) | ✓ | - | Not needed | |
|
||||
|
||||
|
||||
| Packaging | Dependency graph |
|
||||
@@ -52,7 +54,8 @@ keyring >= 4.1.1 # Minimum version 4.1.1
|
||||
Mopidy-Dirble ~= 1.1 # Minimum version 1.1
|
||||
python-gitlab==2.0.* # Minimum version 2.0.0
|
||||
```
|
||||
Also, there is a way to convert unsupported version specifiers - use the `pip freeze` command.
|
||||
Also, there is a way to convert unsupported version specifiers - use either the `pip-compile` tool (which doesn't install the packages)
|
||||
or call `pip freeze` from the virtual environment where the requirements are already installed.
|
||||
|
||||
```bash
|
||||
$ cat requirements.txt
|
||||
@@ -79,7 +82,8 @@ wheel==0.42.0
|
||||
`requirements.txt` files usually contain only the direct dependencies and not contain the transitive dependencies.
|
||||
Therefore, Trivy scans only for the direct dependencies with `requirements.txt`.
|
||||
|
||||
To detect transitive dependencies as well, you need to generate `requirements.txt` with `pip freeze`.
|
||||
To detect transitive dependencies as well, you need to generate `requirements.txt` that contains them.
|
||||
Like described above, tou can do it with `pip freeze` or `pip-compile`.
|
||||
|
||||
```zsh
|
||||
$ cat requirements.txt # it will only find `requests@2.28.2`.
|
||||
@@ -126,6 +130,16 @@ To build the correct dependency graph, `pyproject.toml` also needs to be present
|
||||
|
||||
License detection is not supported for `Poetry`.
|
||||
|
||||
By default, Trivy doesn't report development dependencies. Use the `--include-dev-deps` flag to include them.
|
||||
|
||||
|
||||
### uv
|
||||
Trivy uses `uv.lock` to identify dependencies and find vulnerabilities.
|
||||
|
||||
License detection is not supported for `uv`.
|
||||
|
||||
By default, Trivy doesn't report development dependencies. Use the `--include-dev-deps` flag to include them.
|
||||
|
||||
## Packaging
|
||||
Trivy parses the manifest files of installed packages in container image scanning and so on.
|
||||
See [here](https://packaging.python.org/en/latest/discussions/package-formats/) for the detail.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Ruby
|
||||
|
||||
Trivy supports [Bundler][bundler] and [RubyGems][rubygems].
|
||||
The following scanners are supported for Cargo.
|
||||
The following scanners are supported for Bundler and RubyGems.
|
||||
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
|-----------------|:----:|:-------------:|:-------:|
|
||||
|
||||
15
docs/docs/coverage/os/bottlerocket.md
Normal file
15
docs/docs/coverage/os/bottlerocket.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Bottlerocket
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | - |
|
||||
| License | - |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that are listed in the [software inventory].
|
||||
|
||||
[software inventory]: https://bottlerocket.dev/en/os/1.37.x/concepts/variants/#software-inventory
|
||||
30
docs/docs/coverage/os/echo.md
Normal file
30
docs/docs/coverage/os/echo.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Echo
|
||||
Trivy supports these scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
|:------------------------------------:|:---------:|
|
||||
| Unfixed vulnerabilities | ✓ |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Same as [Debian](debian.md#sbom).
|
||||
|
||||
## Vulnerability
|
||||
Echo offers its own security advisories, and these are utilized when scanning Echo for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
## License
|
||||
Same as [Debian](debian.md#license).
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[advisory]: https://advisory.echohq.com/data.json
|
||||
@@ -11,9 +11,10 @@ Trivy supports operating systems for
|
||||
|
||||
| OS | Supported Versions | Package Managers |
|
||||
|---------------------------------------|-------------------------------------|------------------|
|
||||
| [Alpine Linux](alpine.md) | 2.2 - 2.7, 3.0 - 3.20, edge | apk |
|
||||
| [Alpine Linux](alpine.md) | 2.2 - 2.7, 3.0 - 3.21, edge | apk |
|
||||
| [Wolfi Linux](wolfi.md) | (n/a) | apk |
|
||||
| [Chainguard](chainguard.md) | (n/a) | apk |
|
||||
| [MinimOS](minimos.md) | (n/a) | apk |
|
||||
| [Red Hat Enterprise Linux](rhel.md) | 6, 7, 8 | dnf/yum/rpm |
|
||||
| [CentOS](centos.md)[^1] | 6, 7, 8 | dnf/yum/rpm |
|
||||
| [AlmaLinux](alma.md) | 8, 9 | dnf/yum/rpm |
|
||||
@@ -26,8 +27,10 @@ Trivy supports operating systems for
|
||||
| [SUSE Linux Enterprise](suse.md) | 11, 12, 15 | zypper/rpm |
|
||||
| [SUSE Linux Enterprise Micro](suse.md)| 5, 6 | zypper/rpm |
|
||||
| [Photon OS](photon.md) | 1.0, 2.0, 3.0, 4.0 | tndf/yum/rpm |
|
||||
| [Echo](echo.md) | (n/a) | apt/dpkg |
|
||||
| [Debian GNU/Linux](debian.md) | 7, 8, 9, 10, 11, 12 | apt/dpkg |
|
||||
| [Ubuntu](ubuntu.md) | All versions supported by Canonical | apt/dpkg |
|
||||
| [Bottlerocket](bottlerocket.md) | 1.7.0 and upper | bottlerocket |
|
||||
| [OSs with installed Conda](../others/conda.md) | - | conda |
|
||||
|
||||
## Supported container images
|
||||
|
||||
30
docs/docs/coverage/os/minimos.md
Normal file
30
docs/docs/coverage/os/minimos.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# MinimOS
|
||||
Trivy supports these scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
|:------------------------------------:|:---------:|
|
||||
| Detect unfixed vulnerabilities | - |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Same as [Alpine Linux](alpine.md#sbom).
|
||||
|
||||
## Vulnerability
|
||||
MinimOS offers its own security advisories, and these are utilized when scanning MinimOS for vulnerabilities.
|
||||
Everything else is the same as [Alpine Linux](alpine.md#vulnerability).
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
## License
|
||||
Same as [Alpine Linux](alpine.md#license).
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
@@ -22,6 +22,13 @@ Trivy detects packages that have been installed through package managers such as
|
||||
## Vulnerability
|
||||
Red Hat offers its own security advisories, and these are utilized when scanning Red Hat Enterprise Linux (RHEL) for vulnerabilities.
|
||||
|
||||
### Content manifests
|
||||
Red Hat’s security advisories use CPEs to identify product sets. For example, even packages installed in the same container image can have different CPEs.
|
||||
For this reason, Red Hat’s container images include stored content manifests, which we convert to CPEs, and perform vulnerability scanning.
|
||||
|
||||
Since this system ties each content manifest to its packages on a per-layer basis,
|
||||
if layers get merged (for instance, by using `docker run` or `docker export`) we can no longer determine the correct CPE, which may lead to false detection.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
@@ -82,3 +89,5 @@ Trivy identifies licenses by examining the metadata of RPM packages.
|
||||
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
|
||||
[content-set-default]: https://github.com/aquasecurity/trivy/blob/c80310d7690d8aeb7d3d77416c18c0c8b9aebe17/pkg/detector/ospkg/redhat/redhat.go#L25-L42
|
||||
|
||||
56
docs/docs/references/abbreviations.md
Normal file
56
docs/docs/references/abbreviations.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# Abbreviation List
|
||||
|
||||
This list compiles words that frequently appear in CLI flags or configuration files and are commonly abbreviated in industry and OSS communities.
|
||||
Trivy may use the abbreviation in place of the full spelling for flag names.
|
||||
It is also acceptable to add even shorter aliases if needed.
|
||||
|
||||
Words not included in this list should be spelled out in full when used in flags.
|
||||
|
||||
This list is intentionally limited to the most common and widely recognized abbreviations.
|
||||
Excessive use of abbreviations in CLI flags can hinder initial user understanding and create a steeper learning curve.
|
||||
|
||||
!!! note
|
||||
This list serves as a guideline rather than a strict requirement.
|
||||
Its purpose is to maintain consistency across the project when naming flags and configuration options.
|
||||
While we strive to follow these abbreviations, there may be exceptions where context or clarity demands a different approach.
|
||||
|
||||
## Scope
|
||||
This list focuses on abbreviations of single words commonly used in technical contexts. It does not include:
|
||||
|
||||
1. Acronyms formed from the initial letters of multiple words (e.g., OS for Operating System, HTTP for Hypertext Transfer Protocol)
|
||||
2. Domain-specific terminology that already has standardized short forms
|
||||
3. Brand names or product-specific abbreviations
|
||||
|
||||
The abbreviations listed here are primarily intended for CLI flags, configuration keys, and similar technical interfaces where brevity is valued while maintaining clarity.
|
||||
|
||||
## Example
|
||||
For a flag containing multiple words, only abbreviate words that appear in this list.
|
||||
For instance, in `--database-repository`, "database" is in the list so it should be abbreviated to "db", but "repository" is not in the list so it must be spelled out completely.
|
||||
The correct flag name would be `--db-repository`.
|
||||
It's acceptable to add a shorter alias like `--db-repo` if desired.
|
||||
|
||||
## List
|
||||
|
||||
| Full Name | Default Abbreviation | Examples |
|
||||
|-------------------|----------------------|-----------------------------------------------------------|
|
||||
| application | app | `--app-name`, `--app-mode` |
|
||||
| authentication | auth | `--auth-method`, `--auth-token` |
|
||||
| authorization | authz | `--authz-rule`, `--authz-policy` |
|
||||
| command | cmd | `--cmd-option`, `--cmd-args` |
|
||||
| configuration | config | `--config`, `--config-dir` |
|
||||
| database | db | `--db-repository`, `--db-user`, `--db-pass` |
|
||||
| development | dev | `--dev-dependencies`, `--dev-mode` |
|
||||
| directory | dir | `--dir-path`, `--output-dir` |
|
||||
| environment | env | `--env-file`, `--env-vars` |
|
||||
| information | info | `--info-level`, `--show-info` |
|
||||
| initialization | init | `--init-script`, `--init-config` |
|
||||
| library | lib | `--lib-path`, `--lib-dir` |
|
||||
| maximum | max | `--max-image-size`, `--max-depth` |
|
||||
| minimum | min | `--min-value`, `--min-severity` |
|
||||
| misconfiguration | misconfig | `--misconfig-scanners` |
|
||||
| package | pkg | `--pkg-types` |
|
||||
| production | prod | `--prod-env`, `--prod-deploy` |
|
||||
| specification | spec | `--spec-file`, `--spec-version` |
|
||||
| temporary | tmp | `--tmp-dir`, `--tmp-file` |
|
||||
| utility | util | `--util-script`, `--util-name` |
|
||||
| vulnerability | vuln | `--vuln-scan`, `--vuln-report` |
|
||||
@@ -21,7 +21,18 @@ trivy config [flags] DIR
|
||||
--enable-modules strings [EXPERIMENTAL] module names to enable
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
-f, --format string format
|
||||
Allowed values:
|
||||
- table
|
||||
- json
|
||||
- template
|
||||
- sarif
|
||||
- cyclonedx
|
||||
- spdx
|
||||
- spdx-json
|
||||
- github
|
||||
- cosign-vuln
|
||||
(default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -40,16 +51,26 @@ trivy config [flags] DIR
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--password-stdin password from stdin. Comma-separated passwords are not supported.
|
||||
--raw-config-scanners strings specify the types of scanners that will also scan raw configurations. For example, scanners will scan a non-adapted configuration into a shared state (allowed values: terraform)
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--report string specify a compliance report format for the output (all,summary) (default "all")
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--render-cause strings specify configuration types for which the rendered causes will be shown in the table report (allowed values: terraform)
|
||||
--report string specify a compliance report format for the output (allowed values: all,summary) (default "all")
|
||||
-s, --severity strings severities of security issues to be displayed
|
||||
Allowed values:
|
||||
- UNKNOWN
|
||||
- LOW
|
||||
- MEDIUM
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
(default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--table-mode strings [EXPERIMENTAL] tables that will be displayed in 'table' format (allowed values: summary,detailed) (default [summary,detailed])
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
|
||||
@@ -22,16 +22,36 @@ trivy convert [flags] RESULT_JSON
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
-f, --format string format
|
||||
Allowed values:
|
||||
- table
|
||||
- json
|
||||
- template
|
||||
- sarif
|
||||
- cyclonedx
|
||||
- spdx
|
||||
- spdx-json
|
||||
- github
|
||||
- cosign-vuln
|
||||
(default "table")
|
||||
-h, --help help for convert
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
|
||||
-o, --output string output file name
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--report string specify a report format for the output (all,summary) (default "all")
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--report string specify a report format for the output (allowed values: all,summary) (default "all")
|
||||
--scanners strings List of scanners included when generating the json report. Used only for rendering the summary table. (allowed values: vuln,misconfig,secret,license)
|
||||
-s, --severity strings severities of security issues to be displayed
|
||||
Allowed values:
|
||||
- UNKNOWN
|
||||
- LOW
|
||||
- MEDIUM
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
(default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--table-mode strings [EXPERIMENTAL] tables that will be displayed in 'table' format (allowed values: summary,detailed) (default [summary,detailed])
|
||||
-t, --template string output template
|
||||
```
|
||||
|
||||
|
||||
@@ -34,13 +34,26 @@ trivy filesystem [flags] PATH
|
||||
--detection-priority string specify the detection priority:
|
||||
- "precise": Prioritizes precise by minimizing false positives.
|
||||
- "comprehensive": Aims to detect more security findings at the cost of potential false positives.
|
||||
(precise,comprehensive) (default "precise")
|
||||
(allowed values: precise,comprehensive) (default "precise")
|
||||
--disable-telemetry disable sending anonymous usage data to Aqua
|
||||
--distro string [EXPERIMENTAL] specify a distribution, <family>/<version>
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--enable-modules strings [EXPERIMENTAL] module names to enable
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
-f, --format string format
|
||||
Allowed values:
|
||||
- table
|
||||
- json
|
||||
- template
|
||||
- sarif
|
||||
- cyclonedx
|
||||
- spdx
|
||||
- spdx-json
|
||||
- github
|
||||
- cosign-vuln
|
||||
(default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -49,12 +62,21 @@ trivy filesystem [flags] PATH
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for filesystem
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore
|
||||
Allowed values:
|
||||
- unknown
|
||||
- not_affected
|
||||
- affected
|
||||
- fixed
|
||||
- under_investigation
|
||||
- will_not_fix
|
||||
- fix_deferred
|
||||
- end_of_life
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-deprecated-checks include deprecated checks
|
||||
--include-dev-deps include development dependencies in the report (supported: npm, yarn)
|
||||
--include-dev-deps include development dependencies in the report (supported: npm, yarn, gradle)
|
||||
--include-non-failures include successes, available with '--scanners misconfig'
|
||||
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
|
||||
--license-confidence-level float specify license classifier's confidence level (default 0.9)
|
||||
@@ -69,27 +91,45 @@ trivy filesystem [flags] PATH
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--password-stdin password from stdin. Comma-separated passwords are not supported.
|
||||
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (os,library) (default [os,library])
|
||||
--pkg-relationships strings list of package relationships
|
||||
Allowed values:
|
||||
- unknown
|
||||
- root
|
||||
- workspace
|
||||
- direct
|
||||
- indirect
|
||||
(default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (allowed values: os,library) (default [os,library])
|
||||
--raw-config-scanners strings specify the types of scanners that will also scan raw configurations. For example, scanners will scan a non-adapted configuration into a shared state (allowed values: terraform)
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--report string specify a compliance report format for the output (all,summary) (default "all")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--render-cause strings specify configuration types for which the rendered causes will be shown in the table report (allowed values: terraform)
|
||||
--report string specify a compliance report format for the output (allowed values: all,summary) (default "all")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (allowed values: oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (allowed values: vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
-s, --severity strings severities of security issues to be displayed
|
||||
Allowed values:
|
||||
- UNKNOWN
|
||||
- LOW
|
||||
- MEDIUM
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
(default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-version-check suppress notices about version updates and Trivy announcements
|
||||
--skip-vex-repo-update [EXPERIMENTAL] Skip VEX Repository update
|
||||
--table-mode strings [EXPERIMENTAL] tables that will be displayed in 'table' format (allowed values: summary,detailed) (default [summary,detailed])
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
@@ -98,6 +138,39 @@ trivy filesystem [flags] PATH
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex strings [EXPERIMENTAL] VEX sources ("repo", "oci" or file path)
|
||||
--vuln-severity-source strings order of data sources for selecting vulnerability severity level
|
||||
Allowed values:
|
||||
- nvd
|
||||
- redhat
|
||||
- redhat-oval
|
||||
- debian
|
||||
- ubuntu
|
||||
- alpine
|
||||
- amazon
|
||||
- oracle-oval
|
||||
- suse-cvrf
|
||||
- photon
|
||||
- arch-linux
|
||||
- alma
|
||||
- rocky
|
||||
- cbl-mariner
|
||||
- azure
|
||||
- ruby-advisory-db
|
||||
- php-security-advisories
|
||||
- nodejs-security-wg
|
||||
- ghsa
|
||||
- glad
|
||||
- aqua
|
||||
- osv
|
||||
- k8s
|
||||
- wolfi
|
||||
- chainguard
|
||||
- bitnami
|
||||
- govulndb
|
||||
- echo
|
||||
- minimos
|
||||
- auto
|
||||
(default [auto])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -38,7 +38,7 @@ trivy image [flags] IMAGE_NAME
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--check-namespaces strings Rego namespaces
|
||||
--checks-bundle-repository string OCI registry URL to retrieve checks bundle from (default "mirror.gcr.io/aquasec/trivy-checks:1")
|
||||
--compliance string compliance report to generate (docker-cis-1.6.0)
|
||||
--compliance string compliance report to generate (built-in compliance's: docker-cis-1.6.0)
|
||||
--config-check strings specify the paths to the Rego check files or to the directories containing them, applying config files
|
||||
--config-data strings specify paths from which data for the Rego checks will be recursively loaded
|
||||
--config-file-schemas strings specify paths to JSON configuration file schemas to determine that a file matches some configuration and pass the schema to Rego checks for type checking
|
||||
@@ -48,7 +48,9 @@ trivy image [flags] IMAGE_NAME
|
||||
--detection-priority string specify the detection priority:
|
||||
- "precise": Prioritizes precise by minimizing false positives.
|
||||
- "comprehensive": Aims to detect more security findings at the cost of potential false positives.
|
||||
(precise,comprehensive) (default "precise")
|
||||
(allowed values: precise,comprehensive) (default "precise")
|
||||
--disable-telemetry disable sending anonymous usage data to Aqua
|
||||
--distro string [EXPERIMENTAL] specify a distribution, <family>/<version>
|
||||
--docker-host string unix domain socket path to use for docker scanning
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
@@ -56,7 +58,18 @@ trivy image [flags] IMAGE_NAME
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
-f, --format string format
|
||||
Allowed values:
|
||||
- table
|
||||
- json
|
||||
- template
|
||||
- sarif
|
||||
- cyclonedx
|
||||
- spdx
|
||||
- spdx-json
|
||||
- github
|
||||
- cosign-vuln
|
||||
(default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -65,12 +78,21 @@ trivy image [flags] IMAGE_NAME
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for image
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore
|
||||
Allowed values:
|
||||
- unknown
|
||||
- not_affected
|
||||
- affected
|
||||
- fixed
|
||||
- under_investigation
|
||||
- will_not_fix
|
||||
- fix_deferred
|
||||
- end_of_life
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--image-config-scanners strings comma-separated list of what security issues to detect on container image configurations (misconfig,secret)
|
||||
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
|
||||
--image-config-scanners strings comma-separated list of what security issues to detect on container image configurations (allowed values: misconfig,secret)
|
||||
--image-src strings image source(s) to use, in priority order (allowed values: docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
|
||||
--include-deprecated-checks include deprecated checks
|
||||
--include-non-failures include successes, available with '--scanners misconfig'
|
||||
--input string input file path instead of image name
|
||||
@@ -78,6 +100,7 @@ trivy image [flags] IMAGE_NAME
|
||||
--license-confidence-level float specify license classifier's confidence level (default 0.9)
|
||||
--license-full eagerly look for licenses in source code headers and license files
|
||||
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
|
||||
--max-image-size string [EXPERIMENTAL] maximum image size to process, specified in a human-readable format (e.g., '44kB', '17MB'); an error will be returned if the image exceeds this size
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
@@ -87,10 +110,18 @@ trivy image [flags] IMAGE_NAME
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--password-stdin password from stdin. Comma-separated passwords are not supported.
|
||||
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (os,library) (default [os,library])
|
||||
--pkg-relationships strings list of package relationships
|
||||
Allowed values:
|
||||
- unknown
|
||||
- root
|
||||
- workspace
|
||||
- direct
|
||||
- indirect
|
||||
(default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (allowed values: os,library) (default [os,library])
|
||||
--platform string set platform in the form os/arch if image is multi-platform capable
|
||||
--podman-host string unix podman socket path to use for podman scanning
|
||||
--raw-config-scanners strings specify the types of scanners that will also scan raw configurations. For example, scanners will scan a non-adapted configuration into a shared state (allowed values: terraform)
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
@@ -98,19 +129,29 @@ trivy image [flags] IMAGE_NAME
|
||||
--registry-token string registry token
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--removed-pkgs detect vulnerabilities of removed packages (only for Alpine)
|
||||
--report string specify a format for the compliance report. (all,summary) (default "summary")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--render-cause strings specify configuration types for which the rendered causes will be shown in the table report (allowed values: terraform)
|
||||
--report string specify a format for the compliance report. (allowed values: all,summary) (default "summary")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (allowed values: oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (allowed values: vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
-s, --severity strings severities of security issues to be displayed
|
||||
Allowed values:
|
||||
- UNKNOWN
|
||||
- LOW
|
||||
- MEDIUM
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
(default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-version-check suppress notices about version updates and Trivy announcements
|
||||
--skip-vex-repo-update [EXPERIMENTAL] Skip VEX Repository update
|
||||
--table-mode strings [EXPERIMENTAL] tables that will be displayed in 'table' format (allowed values: summary,detailed) (default [summary,detailed])
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--token string for authentication in client/server mode
|
||||
@@ -118,6 +159,39 @@ trivy image [flags] IMAGE_NAME
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex strings [EXPERIMENTAL] VEX sources ("repo", "oci" or file path)
|
||||
--vuln-severity-source strings order of data sources for selecting vulnerability severity level
|
||||
Allowed values:
|
||||
- nvd
|
||||
- redhat
|
||||
- redhat-oval
|
||||
- debian
|
||||
- ubuntu
|
||||
- alpine
|
||||
- amazon
|
||||
- oracle-oval
|
||||
- suse-cvrf
|
||||
- photon
|
||||
- arch-linux
|
||||
- alma
|
||||
- rocky
|
||||
- cbl-mariner
|
||||
- azure
|
||||
- ruby-advisory-db
|
||||
- php-security-advisories
|
||||
- nodejs-security-wg
|
||||
- ghsa
|
||||
- glad
|
||||
- aqua
|
||||
- osv
|
||||
- k8s
|
||||
- wolfi
|
||||
- chainguard
|
||||
- bitnami
|
||||
- govulndb
|
||||
- echo
|
||||
- minimos
|
||||
- auto
|
||||
(default [auto])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -34,7 +34,14 @@ trivy kubernetes [flags] [CONTEXT]
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--check-namespaces strings Rego namespaces
|
||||
--checks-bundle-repository string OCI registry URL to retrieve checks bundle from (default "mirror.gcr.io/aquasec/trivy-checks:1")
|
||||
--compliance string compliance report to generate (k8s-nsa-1.0,k8s-cis-1.23,eks-cis-1.4,rke2-cis-1.24,k8s-pss-baseline-0.1,k8s-pss-restricted-0.1)
|
||||
--compliance string compliance report to generate
|
||||
Built-in compliance's:
|
||||
- k8s-nsa-1.0
|
||||
- k8s-cis-1.23
|
||||
- eks-cis-1.4
|
||||
- rke2-cis-1.24
|
||||
- k8s-pss-baseline-0.1
|
||||
- k8s-pss-restricted-0.1
|
||||
--config-check strings specify the paths to the Rego check files or to the directories containing them, applying config files
|
||||
--config-data strings specify paths from which data for the Rego checks will be recursively loaded
|
||||
--config-file-schemas strings specify paths to JSON configuration file schemas to determine that a file matches some configuration and pass the schema to Rego checks for type checking
|
||||
@@ -43,8 +50,10 @@ trivy kubernetes [flags] [CONTEXT]
|
||||
--detection-priority string specify the detection priority:
|
||||
- "precise": Prioritizes precise by minimizing false positives.
|
||||
- "comprehensive": Aims to detect more security findings at the cost of potential false positives.
|
||||
(precise,comprehensive) (default "precise")
|
||||
(allowed values: precise,comprehensive) (default "precise")
|
||||
--disable-node-collector When the flag is activated, the node-collector job will not be executed, thus skipping misconfiguration findings on the node.
|
||||
--disable-telemetry disable sending anonymous usage data to Aqua
|
||||
--distro string [EXPERIMENTAL] specify a distribution, <family>/<version>
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--exclude-kinds strings indicate the kinds exclude from scanning (example: node)
|
||||
@@ -53,7 +62,7 @@ trivy kubernetes [flags] [CONTEXT]
|
||||
--exclude-owned exclude resources that have an owner reference
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,cyclonedx) (default "table")
|
||||
-f, --format string format (allowed values: table,json,cyclonedx) (default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -62,10 +71,19 @@ trivy kubernetes [flags] [CONTEXT]
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for kubernetes
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore
|
||||
Allowed values:
|
||||
- unknown
|
||||
- not_affected
|
||||
- affected
|
||||
- fixed
|
||||
- under_investigation
|
||||
- will_not_fix
|
||||
- fix_deferred
|
||||
- end_of_life
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
|
||||
--image-src strings image source(s) to use, in priority order (allowed values: docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
|
||||
--include-deprecated-checks include deprecated checks
|
||||
--include-kinds strings indicate the kinds included in scanning (example: node)
|
||||
--include-namespaces strings indicate the namespaces included in scanning (example: kube-system)
|
||||
@@ -84,20 +102,36 @@ trivy kubernetes [flags] [CONTEXT]
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--password-stdin password from stdin. Comma-separated passwords are not supported.
|
||||
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (os,library) (default [os,library])
|
||||
--pkg-relationships strings list of package relationships
|
||||
Allowed values:
|
||||
- unknown
|
||||
- root
|
||||
- workspace
|
||||
- direct
|
||||
- indirect
|
||||
(default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (allowed values: os,library) (default [os,library])
|
||||
--qps float specify the maximum QPS to the master from this client (default 5)
|
||||
--raw-config-scanners strings specify the types of scanners that will also scan raw configurations. For example, scanners will scan a non-adapted configuration into a shared state (allowed values: terraform)
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--report string specify a report format for the output (all,summary) (default "all")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,rbac) (default [vuln,misconfig,secret,rbac])
|
||||
--render-cause strings specify configuration types for which the rendered causes will be shown in the table report (allowed values: terraform)
|
||||
--report string specify a report format for the output (allowed values: all,summary) (default "all")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (allowed values: oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (allowed values: vuln,misconfig,secret,rbac) (default [vuln,misconfig,secret,rbac])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
-s, --severity strings severities of security issues to be displayed
|
||||
Allowed values:
|
||||
- UNKNOWN
|
||||
- LOW
|
||||
- MEDIUM
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
(default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-db-update skip updating vulnerability database
|
||||
@@ -105,6 +139,7 @@ trivy kubernetes [flags] [CONTEXT]
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-images skip the downloading and scanning of images (vulnerabilities and secrets) in the cluster resources
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-version-check suppress notices about version updates and Trivy announcements
|
||||
--skip-vex-repo-update [EXPERIMENTAL] Skip VEX Repository update
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
@@ -112,6 +147,39 @@ trivy kubernetes [flags] [CONTEXT]
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex strings [EXPERIMENTAL] VEX sources ("repo", "oci" or file path)
|
||||
--vuln-severity-source strings order of data sources for selecting vulnerability severity level
|
||||
Allowed values:
|
||||
- nvd
|
||||
- redhat
|
||||
- redhat-oval
|
||||
- debian
|
||||
- ubuntu
|
||||
- alpine
|
||||
- amazon
|
||||
- oracle-oval
|
||||
- suse-cvrf
|
||||
- photon
|
||||
- arch-linux
|
||||
- alma
|
||||
- rocky
|
||||
- cbl-mariner
|
||||
- azure
|
||||
- ruby-advisory-db
|
||||
- php-security-advisories
|
||||
- nodejs-security-wg
|
||||
- ghsa
|
||||
- glad
|
||||
- aqua
|
||||
- osv
|
||||
- k8s
|
||||
- wolfi
|
||||
- chainguard
|
||||
- bitnami
|
||||
- govulndb
|
||||
- echo
|
||||
- minimos
|
||||
- auto
|
||||
(default [auto])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -19,7 +19,7 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
|
||||
```
|
||||
--branch string pass the branch name to be scanned
|
||||
--cache-backend string [EXPERIMENTAL] cache backend (e.g. redis://localhost:6379) (default "memory")
|
||||
--cache-backend string [EXPERIMENTAL] cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--cf-params strings specify paths to override the CloudFormation parameters files
|
||||
--check-namespaces strings Rego namespaces
|
||||
@@ -34,13 +34,25 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--detection-priority string specify the detection priority:
|
||||
- "precise": Prioritizes precise by minimizing false positives.
|
||||
- "comprehensive": Aims to detect more security findings at the cost of potential false positives.
|
||||
(precise,comprehensive) (default "precise")
|
||||
(allowed values: precise,comprehensive) (default "precise")
|
||||
--disable-telemetry disable sending anonymous usage data to Aqua
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--enable-modules strings [EXPERIMENTAL] module names to enable
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
-f, --format string format
|
||||
Allowed values:
|
||||
- table
|
||||
- json
|
||||
- template
|
||||
- sarif
|
||||
- cyclonedx
|
||||
- spdx
|
||||
- spdx-json
|
||||
- github
|
||||
- cosign-vuln
|
||||
(default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -49,12 +61,21 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for repository
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore
|
||||
Allowed values:
|
||||
- unknown
|
||||
- not_affected
|
||||
- affected
|
||||
- fixed
|
||||
- under_investigation
|
||||
- will_not_fix
|
||||
- fix_deferred
|
||||
- end_of_life
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-deprecated-checks include deprecated checks
|
||||
--include-dev-deps include development dependencies in the report (supported: npm, yarn)
|
||||
--include-dev-deps include development dependencies in the report (supported: npm, yarn, gradle)
|
||||
--include-non-failures include successes, available with '--scanners misconfig'
|
||||
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
|
||||
--license-confidence-level float specify license classifier's confidence level (default 0.9)
|
||||
@@ -69,26 +90,44 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--password-stdin password from stdin. Comma-separated passwords are not supported.
|
||||
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (os,library) (default [os,library])
|
||||
--pkg-relationships strings list of package relationships
|
||||
Allowed values:
|
||||
- unknown
|
||||
- root
|
||||
- workspace
|
||||
- direct
|
||||
- indirect
|
||||
(default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (allowed values: os,library) (default [os,library])
|
||||
--raw-config-scanners strings specify the types of scanners that will also scan raw configurations. For example, scanners will scan a non-adapted configuration into a shared state (allowed values: terraform)
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--render-cause strings specify configuration types for which the rendered causes will be shown in the table report (allowed values: terraform)
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (allowed values: oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (allowed values: vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
-s, --severity strings severities of security issues to be displayed
|
||||
Allowed values:
|
||||
- UNKNOWN
|
||||
- LOW
|
||||
- MEDIUM
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
(default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-version-check suppress notices about version updates and Trivy announcements
|
||||
--skip-vex-repo-update [EXPERIMENTAL] Skip VEX Repository update
|
||||
--table-mode strings [EXPERIMENTAL] tables that will be displayed in 'table' format (allowed values: summary,detailed) (default [summary,detailed])
|
||||
--tag string pass the tag name to be scanned
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
@@ -98,6 +137,39 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex strings [EXPERIMENTAL] VEX sources ("repo", "oci" or file path)
|
||||
--vuln-severity-source strings order of data sources for selecting vulnerability severity level
|
||||
Allowed values:
|
||||
- nvd
|
||||
- redhat
|
||||
- redhat-oval
|
||||
- debian
|
||||
- ubuntu
|
||||
- alpine
|
||||
- amazon
|
||||
- oracle-oval
|
||||
- suse-cvrf
|
||||
- photon
|
||||
- arch-linux
|
||||
- alma
|
||||
- rocky
|
||||
- cbl-mariner
|
||||
- azure
|
||||
- ruby-advisory-db
|
||||
- php-security-advisories
|
||||
- nodejs-security-wg
|
||||
- ghsa
|
||||
- glad
|
||||
- aqua
|
||||
- osv
|
||||
- k8s
|
||||
- wolfi
|
||||
- chainguard
|
||||
- bitnami
|
||||
- govulndb
|
||||
- echo
|
||||
- minimos
|
||||
- auto
|
||||
(default [auto])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -36,14 +36,27 @@ trivy rootfs [flags] ROOTDIR
|
||||
--detection-priority string specify the detection priority:
|
||||
- "precise": Prioritizes precise by minimizing false positives.
|
||||
- "comprehensive": Aims to detect more security findings at the cost of potential false positives.
|
||||
(precise,comprehensive) (default "precise")
|
||||
(allowed values: precise,comprehensive) (default "precise")
|
||||
--disable-telemetry disable sending anonymous usage data to Aqua
|
||||
--distro string [EXPERIMENTAL] specify a distribution, <family>/<version>
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--enable-modules strings [EXPERIMENTAL] module names to enable
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
-f, --format string format
|
||||
Allowed values:
|
||||
- table
|
||||
- json
|
||||
- template
|
||||
- sarif
|
||||
- cyclonedx
|
||||
- spdx
|
||||
- spdx-json
|
||||
- github
|
||||
- cosign-vuln
|
||||
(default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -52,7 +65,16 @@ trivy rootfs [flags] ROOTDIR
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for rootfs
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore
|
||||
Allowed values:
|
||||
- unknown
|
||||
- not_affected
|
||||
- affected
|
||||
- fixed
|
||||
- under_investigation
|
||||
- will_not_fix
|
||||
- fix_deferred
|
||||
- end_of_life
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
@@ -71,26 +93,44 @@ trivy rootfs [flags] ROOTDIR
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--password-stdin password from stdin. Comma-separated passwords are not supported.
|
||||
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (os,library) (default [os,library])
|
||||
--pkg-relationships strings list of package relationships
|
||||
Allowed values:
|
||||
- unknown
|
||||
- root
|
||||
- workspace
|
||||
- direct
|
||||
- indirect
|
||||
(default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (allowed values: os,library) (default [os,library])
|
||||
--raw-config-scanners strings specify the types of scanners that will also scan raw configurations. For example, scanners will scan a non-adapted configuration into a shared state (allowed values: terraform)
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--render-cause strings specify configuration types for which the rendered causes will be shown in the table report (allowed values: terraform)
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (allowed values: oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (allowed values: vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
-s, --severity strings severities of security issues to be displayed
|
||||
Allowed values:
|
||||
- UNKNOWN
|
||||
- LOW
|
||||
- MEDIUM
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
(default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-version-check suppress notices about version updates and Trivy announcements
|
||||
--skip-vex-repo-update [EXPERIMENTAL] Skip VEX Repository update
|
||||
--table-mode strings [EXPERIMENTAL] tables that will be displayed in 'table' format (allowed values: summary,detailed) (default [summary,detailed])
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
@@ -99,6 +139,39 @@ trivy rootfs [flags] ROOTDIR
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex strings [EXPERIMENTAL] VEX sources ("repo", "oci" or file path)
|
||||
--vuln-severity-source strings order of data sources for selecting vulnerability severity level
|
||||
Allowed values:
|
||||
- nvd
|
||||
- redhat
|
||||
- redhat-oval
|
||||
- debian
|
||||
- ubuntu
|
||||
- alpine
|
||||
- amazon
|
||||
- oracle-oval
|
||||
- suse-cvrf
|
||||
- photon
|
||||
- arch-linux
|
||||
- alma
|
||||
- rocky
|
||||
- cbl-mariner
|
||||
- azure
|
||||
- ruby-advisory-db
|
||||
- php-security-advisories
|
||||
- nodejs-security-wg
|
||||
- ghsa
|
||||
- glad
|
||||
- aqua
|
||||
- osv
|
||||
- k8s
|
||||
- wolfi
|
||||
- chainguard
|
||||
- bitnami
|
||||
- govulndb
|
||||
- echo
|
||||
- minimos
|
||||
- auto
|
||||
(default [auto])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -20,58 +20,127 @@ trivy sbom [flags] SBOM_PATH
|
||||
### Options
|
||||
|
||||
```
|
||||
--cache-backend string [EXPERIMENTAL] cache backend (e.g. redis://localhost:6379) (default "memory")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--compliance string compliance report to generate
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository strings OCI repository(ies) to retrieve trivy-db in order of priority (default [mirror.gcr.io/aquasec/trivy-db:2,ghcr.io/aquasecurity/trivy-db:2])
|
||||
--detection-priority string specify the detection priority:
|
||||
- "precise": Prioritizes precise by minimizing false positives.
|
||||
- "comprehensive": Aims to detect more security findings at the cost of potential false positives.
|
||||
(precise,comprehensive) (default "precise")
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
-h, --help help for sbom
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
|
||||
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--password-stdin password from stdin. Comma-separated passwords are not supported.
|
||||
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (os,library) (default [os,library])
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,license) (default [vuln])
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-vex-repo-update [EXPERIMENTAL] Skip VEX Repository update
|
||||
-t, --template string output template
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex strings [EXPERIMENTAL] VEX sources ("repo", "oci" or file path)
|
||||
--cache-backend string [EXPERIMENTAL] cache backend (e.g. redis://localhost:6379) (default "memory")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--compliance string compliance report to generate
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository strings OCI repository(ies) to retrieve trivy-db in order of priority (default [mirror.gcr.io/aquasec/trivy-db:2,ghcr.io/aquasecurity/trivy-db:2])
|
||||
--detection-priority string specify the detection priority:
|
||||
- "precise": Prioritizes precise by minimizing false positives.
|
||||
- "comprehensive": Aims to detect more security findings at the cost of potential false positives.
|
||||
(allowed values: precise,comprehensive) (default "precise")
|
||||
--disable-telemetry disable sending anonymous usage data to Aqua
|
||||
--distro string [EXPERIMENTAL] specify a distribution, <family>/<version>
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format
|
||||
Allowed values:
|
||||
- table
|
||||
- json
|
||||
- template
|
||||
- sarif
|
||||
- cyclonedx
|
||||
- spdx
|
||||
- spdx-json
|
||||
- github
|
||||
- cosign-vuln
|
||||
(default "table")
|
||||
-h, --help help for sbom
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore
|
||||
Allowed values:
|
||||
- unknown
|
||||
- not_affected
|
||||
- affected
|
||||
- fixed
|
||||
- under_investigation
|
||||
- will_not_fix
|
||||
- fix_deferred
|
||||
- end_of_life
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--java-db-repository strings OCI repository(ies) to retrieve trivy-java-db in order of priority (default [mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1])
|
||||
--list-all-pkgs output all packages in the JSON report regardless of vulnerability
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--password-stdin password from stdin. Comma-separated passwords are not supported.
|
||||
--pkg-relationships strings list of package relationships
|
||||
Allowed values:
|
||||
- unknown
|
||||
- root
|
||||
- workspace
|
||||
- direct
|
||||
- indirect
|
||||
(default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (allowed values: os,library) (default [os,library])
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (allowed values: oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (allowed values: vuln,license) (default [vuln])
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed
|
||||
Allowed values:
|
||||
- UNKNOWN
|
||||
- LOW
|
||||
- MEDIUM
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
(default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-version-check suppress notices about version updates and Trivy announcements
|
||||
--skip-vex-repo-update [EXPERIMENTAL] Skip VEX Repository update
|
||||
--table-mode strings [EXPERIMENTAL] tables that will be displayed in 'table' format (allowed values: summary,detailed) (default [summary,detailed])
|
||||
-t, --template string output template
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex strings [EXPERIMENTAL] VEX sources ("repo", "oci" or file path)
|
||||
--vuln-severity-source strings order of data sources for selecting vulnerability severity level
|
||||
Allowed values:
|
||||
- nvd
|
||||
- redhat
|
||||
- redhat-oval
|
||||
- debian
|
||||
- ubuntu
|
||||
- alpine
|
||||
- amazon
|
||||
- oracle-oval
|
||||
- suse-cvrf
|
||||
- photon
|
||||
- arch-linux
|
||||
- alma
|
||||
- rocky
|
||||
- cbl-mariner
|
||||
- azure
|
||||
- ruby-advisory-db
|
||||
- php-security-advisories
|
||||
- nodejs-security-wg
|
||||
- ghsa
|
||||
- glad
|
||||
- aqua
|
||||
- osv
|
||||
- k8s
|
||||
- wolfi
|
||||
- chainguard
|
||||
- bitnami
|
||||
- govulndb
|
||||
- echo
|
||||
- minimos
|
||||
- auto
|
||||
(default [auto])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -32,14 +32,27 @@ trivy vm [flags] VM_IMAGE
|
||||
--detection-priority string specify the detection priority:
|
||||
- "precise": Prioritizes precise by minimizing false positives.
|
||||
- "comprehensive": Aims to detect more security findings at the cost of potential false positives.
|
||||
(precise,comprehensive) (default "precise")
|
||||
(allowed values: precise,comprehensive) (default "precise")
|
||||
--disable-telemetry disable sending anonymous usage data to Aqua
|
||||
--distro string [EXPERIMENTAL] specify a distribution, <family>/<version>
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--enable-modules strings [EXPERIMENTAL] module names to enable
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
-f, --format string format
|
||||
Allowed values:
|
||||
- table
|
||||
- json
|
||||
- template
|
||||
- sarif
|
||||
- cyclonedx
|
||||
- spdx
|
||||
- spdx-json
|
||||
- github
|
||||
- cosign-vuln
|
||||
(default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -48,7 +61,16 @@ trivy vm [flags] VM_IMAGE
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for vm
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore
|
||||
Allowed values:
|
||||
- unknown
|
||||
- not_affected
|
||||
- affected
|
||||
- fixed
|
||||
- under_investigation
|
||||
- will_not_fix
|
||||
- fix_deferred
|
||||
- end_of_life
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes, available with '--scanners misconfig'
|
||||
@@ -61,29 +83,80 @@ trivy vm [flags] VM_IMAGE
|
||||
-o, --output string output file name
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (os,library) (default [os,library])
|
||||
--pkg-relationships strings list of package relationships
|
||||
Allowed values:
|
||||
- unknown
|
||||
- root
|
||||
- workspace
|
||||
- direct
|
||||
- indirect
|
||||
(default [unknown,root,workspace,direct,indirect])
|
||||
--pkg-types strings list of package types (allowed values: os,library) (default [os,library])
|
||||
--raw-config-scanners strings specify the types of scanners that will also scan raw configurations. For example, scanners will scan a non-adapted configuration into a shared state (allowed values: terraform)
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--render-cause strings specify configuration types for which the rendered causes will be shown in the table report (allowed values: terraform)
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (allowed values: oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (allowed values: vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
-s, --severity strings severities of security issues to be displayed
|
||||
Allowed values:
|
||||
- UNKNOWN
|
||||
- LOW
|
||||
- MEDIUM
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
(default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-version-check suppress notices about version updates and Trivy announcements
|
||||
--skip-vex-repo-update [EXPERIMENTAL] Skip VEX Repository update
|
||||
--table-mode strings [EXPERIMENTAL] tables that will be displayed in 'table' format (allowed values: summary,detailed) (default [summary,detailed])
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--vex strings [EXPERIMENTAL] VEX sources ("repo", "oci" or file path)
|
||||
--vuln-severity-source strings order of data sources for selecting vulnerability severity level
|
||||
Allowed values:
|
||||
- nvd
|
||||
- redhat
|
||||
- redhat-oval
|
||||
- debian
|
||||
- ubuntu
|
||||
- alpine
|
||||
- amazon
|
||||
- oracle-oval
|
||||
- suse-cvrf
|
||||
- photon
|
||||
- arch-linux
|
||||
- alma
|
||||
- rocky
|
||||
- cbl-mariner
|
||||
- azure
|
||||
- ruby-advisory-db
|
||||
- php-security-advisories
|
||||
- nodejs-security-wg
|
||||
- ghsa
|
||||
- glad
|
||||
- aqua
|
||||
- osv
|
||||
- k8s
|
||||
- wolfi
|
||||
- chainguard
|
||||
- bitnami
|
||||
- govulndb
|
||||
- echo
|
||||
- minimos
|
||||
- auto
|
||||
(default [auto])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -137,6 +137,9 @@ image:
|
||||
# Same as '--input'
|
||||
input: ""
|
||||
|
||||
# Same as '--max-image-size'
|
||||
max-size: ""
|
||||
|
||||
# Same as '--platform'
|
||||
platform: ""
|
||||
|
||||
@@ -406,6 +409,12 @@ misconfiguration:
|
||||
# Same as '--include-non-failures'
|
||||
include-non-failures: false
|
||||
|
||||
# Same as '--raw-config-scanners'
|
||||
raw-config-scanners: []
|
||||
|
||||
# Same as '--render-cause'
|
||||
render-cause: []
|
||||
|
||||
# Same as '--misconfig-scanners'
|
||||
scanners:
|
||||
- azure-arm
|
||||
@@ -461,6 +470,8 @@ pkg:
|
||||
|
||||
```yaml
|
||||
registry:
|
||||
mirrors:
|
||||
|
||||
# Same as '--password'
|
||||
password: []
|
||||
|
||||
@@ -545,6 +556,11 @@ severity:
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
|
||||
# Same as '--table-mode'
|
||||
table-mode:
|
||||
- summary
|
||||
- detailed
|
||||
|
||||
# Same as '--template'
|
||||
template: ""
|
||||
|
||||
@@ -570,6 +586,12 @@ scan:
|
||||
# Same as '--detection-priority'
|
||||
detection-priority: "precise"
|
||||
|
||||
# Same as '--disable-telemetry'
|
||||
disable-telemetry: false
|
||||
|
||||
# Same as '--distro'
|
||||
distro: ""
|
||||
|
||||
# Same as '--file-patterns'
|
||||
file-patterns: []
|
||||
|
||||
@@ -596,6 +618,9 @@ scan:
|
||||
# Same as '--skip-files'
|
||||
skip-files: []
|
||||
|
||||
# Same as '--skip-version-check'
|
||||
skip-version-check: false
|
||||
|
||||
```
|
||||
## Secret options
|
||||
|
||||
@@ -615,6 +640,10 @@ vulnerability:
|
||||
# Same as '--ignore-unfixed'
|
||||
ignore-unfixed: false
|
||||
|
||||
# Same as '--vuln-severity-source'
|
||||
severity-source:
|
||||
- auto
|
||||
|
||||
# Same as '--skip-vex-repo-update'
|
||||
skip-vex-repo-update: false
|
||||
|
||||
|
||||
@@ -79,21 +79,25 @@ $ TRIVY_INSECURE=true trivy image [YOUR_IMAGE]
|
||||
```
|
||||
|
||||
### GitHub Rate limiting
|
||||
Trivy uses GitHub API for [VEX repositories](../supply-chain/vex/repo.md).
|
||||
|
||||
!!! error
|
||||
``` bash
|
||||
$ trivy image ...
|
||||
$ trivy image --vex repo ...
|
||||
...
|
||||
API rate limit exceeded for xxx.xxx.xxx.xxx.
|
||||
```
|
||||
|
||||
Specify GITHUB_TOKEN for authentication
|
||||
https://developer.github.com/v3/#rate-limiting
|
||||
Specify GITHUB_TOKEN for [authentication](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28)
|
||||
|
||||
```
|
||||
$ GITHUB_TOKEN=XXXXXXXXXX trivy alpine:3.10
|
||||
$ GITHUB_TOKEN=XXXXXXXXXX trivy image --vex repo [YOUR_IMAGE]
|
||||
```
|
||||
|
||||
!!! note
|
||||
`GITHUB_TOKEN` doesn't help with the rate limit for the vulnerability database and other assets.
|
||||
See https://github.com/aquasecurity/trivy/discussions/8009
|
||||
|
||||
### Unable to open JAR files
|
||||
|
||||
!!! error
|
||||
@@ -217,6 +221,11 @@ Please remove the token and try downloading the DB again.
|
||||
docker logout ghcr.io
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```shell
|
||||
unset GITHUB_TOKEN
|
||||
```
|
||||
|
||||
## Homebrew
|
||||
### Scope error
|
||||
@@ -268,5 +277,5 @@ $ trivy clean --all
|
||||
```
|
||||
|
||||
[air-gapped]: ../advanced/air-gap.md
|
||||
[network]: ../advanced/air-gap.md#network-requirements
|
||||
[network]: ../advanced/air-gap.md#connectivity-requirements
|
||||
[redis-cache]: ../configuration/cache.md#redis
|
||||
|
||||
@@ -23,7 +23,7 @@ To enable extended license scanning, you can use `--license-full`.
|
||||
In addition to package licenses, Trivy scans source code files, Markdown documents, text files and `LICENSE` documents to identify license usage within the image or filesystem.
|
||||
|
||||
By default, Trivy only classifies licenses that are matched with a confidence level of 0.9 or more by the classifier.
|
||||
To configure the confidence level, you can use `--license-confidence-level`. This enables us to classify licenses that might be matched with a lower confidence level by the classifer.
|
||||
To configure the confidence level, you can use `--license-confidence-level`. This enables us to classify licenses that might be matched with a lower confidence level by the classifier.
|
||||
|
||||
!!! note
|
||||
The full license scanning is expensive. It takes a while.
|
||||
@@ -342,6 +342,28 @@ license:
|
||||
permissive: []
|
||||
```
|
||||
|
||||
#### Text licenses
|
||||
By default, Trivy categorizes a license as UNKNOWN if it cannot determine the license name from the license text.
|
||||
|
||||
To define a category for a text license, you need to add license with the `text://` prefix to license classification.
|
||||
For example:
|
||||
```yaml
|
||||
license:
|
||||
forbidden:
|
||||
- "text://Text of Apache Software Foundation License"
|
||||
```
|
||||
|
||||
But a text license can by large. So for these cases Trivy supports using `regex` in license classification.
|
||||
For example:
|
||||
```yaml
|
||||
license:
|
||||
forbidden:
|
||||
- "text://.* Apache Software .*"
|
||||
```
|
||||
|
||||
!!! note
|
||||
`regex` is only used for text licenses and can't be used to configure license IDs.
|
||||
|
||||
[^1]: See the list of supported language files [here](../coverage/language/index.md).
|
||||
[^2]: Some lock files require additional files (e.g. files from the cache directory) to detect licenses. Check [coverage][coverage] for more information.
|
||||
|
||||
|
||||
259
docs/docs/scanner/misconfiguration/config/config.md
Normal file
259
docs/docs/scanner/misconfiguration/config/config.md
Normal file
@@ -0,0 +1,259 @@
|
||||
This page describes misconfiguration-specific configuration.
|
||||
|
||||
### Enabling a subset of misconfiguration scanners
|
||||
It's possible to only enable certain misconfiguration scanners if you prefer.
|
||||
You can do so by passing the `--misconfig-scanners` option.
|
||||
This flag takes a comma-separated list of configuration scanner types.
|
||||
|
||||
```bash
|
||||
trivy config --misconfig-scanners=terraform,dockerfile .
|
||||
```
|
||||
|
||||
Will only scan for misconfigurations that pertain to Terraform and Dockerfiles.
|
||||
|
||||
### Loading custom checks
|
||||
You can load check files or directories including your custom checks using the `--config-check` flag.
|
||||
This can be repeated for specifying multiple files or directories.
|
||||
|
||||
```bash
|
||||
trivy config --config-check custom-policy/policy --config-check combine/policy --config-check policy.rego --namespaces user myapp
|
||||
```
|
||||
|
||||
You can load checks bundle as OCI Image from a Container Registry using the `--checks-bundle-repository` flag.
|
||||
|
||||
```bash
|
||||
trivy config --checks-bundle-repository myregistry.local/mychecks --namespaces user myapp
|
||||
```
|
||||
|
||||
|
||||
### Passing custom data
|
||||
You can pass directories including your custom data through `--data` option.
|
||||
This can be repeated for specifying multiple directories.
|
||||
|
||||
```bash
|
||||
cd examples/misconf/custom-data
|
||||
trivy config --config-check ./my-check --data ./data --namespaces user ./configs
|
||||
```
|
||||
|
||||
For more details, see [Custom Data](./custom/data.md).
|
||||
|
||||
### Passing namespaces
|
||||
By default, Trivy evaluates checks defined in `builtin.*`.
|
||||
If you want to evaluate custom checks in other packages, you have to specify package prefixes through `--namespaces` option.
|
||||
This can be repeated for specifying multiple packages.
|
||||
|
||||
``` bash
|
||||
trivy config --config-check ./my-check --namespaces main --namespaces user ./configs
|
||||
```
|
||||
|
||||
### Private Terraform registries
|
||||
Trivy can download Terraform code from private registries.
|
||||
To pass credentials you must use the `TF_TOKEN_` environment variables.
|
||||
You cannot use a `.terraformrc` or `terraform.rc` file, these are not supported by trivy yet.
|
||||
|
||||
From the Terraform [docs](https://developer.hashicorp.com/terraform/cli/config/config-file#environment-variable-credentials):
|
||||
|
||||
> Environment variable names should have the prefix TF_TOKEN_ added to the domain name, with periods encoded as underscores.
|
||||
> For example, the value of a variable named `TF_TOKEN_app_terraform_io` will be used as a bearer authorization token when the CLI makes service requests to the hostname `app.terraform.io`.
|
||||
>
|
||||
> You must convert domain names containing non-ASCII characters to their punycode equivalent with an ACE prefix.
|
||||
> For example, token credentials for `例えば.com` must be set in a variable called `TF_TOKEN_xn--r8j3dr99h_com`.
|
||||
>
|
||||
> Hyphens are also valid within host names but usually invalid as variable names and may be encoded as double underscores.
|
||||
> For example, you can set a token for the domain name café.fr as TF_TOKEN_xn--caf-dma_fr or TF_TOKEN_xn____caf__dma_fr.
|
||||
|
||||
If multiple variables evaluate to the same hostname, Trivy will choose the environment variable name where the dashes have not been encoded as double underscores.
|
||||
|
||||
|
||||
### Filtering resources by inline comments
|
||||
|
||||
Trivy supports ignoring misconfigured resources by inline comments for Terraform, CloudFormation and Helm configuration files only.
|
||||
|
||||
In cases where Trivy can detect comments of a specific format immediately adjacent to resource definitions, it is possible to ignore findings from a single source of resource definition (in contrast to `.trivyignore`, which has a directory-wide scope on all of the files scanned). The format for these comments is `trivy:ignore:<rule>` immediately following the format-specific line-comment [token](https://developer.hashicorp.com/terraform/language/syntax/configuration#comments).
|
||||
|
||||
The ignore rule must contain one of the possible check IDs that can be found in its metadata: ID, short code or alias. The `id` from the metadata is not case-sensitive, so you can specify, for example, `AVD-AWS-0089` or `avd-aws-0089`.
|
||||
|
||||
For example, to ignore a misconfiguration ID `AVD-GCP-0051` in a Terraform HCL file:
|
||||
|
||||
```terraform
|
||||
#trivy:ignore:AVD-GCP-0051
|
||||
resource "google_container_cluster" "example" {
|
||||
name = var.cluster_name
|
||||
location = var.region
|
||||
}
|
||||
```
|
||||
|
||||
You can add multiple ignores on the same comment line:
|
||||
```terraform
|
||||
#trivy:ignore:AVD-GCP-0051 trivy:ignore:AVD-GCP-0053
|
||||
resource "google_container_cluster" "example" {
|
||||
name = var.cluster_name
|
||||
location = var.region
|
||||
}
|
||||
```
|
||||
|
||||
You can also specify a long ID, which is formed as follows: `<provider>-<service>-<short-code>`.
|
||||
|
||||
As an example, consider the following check metadata:
|
||||
|
||||
```yaml
|
||||
# custom:
|
||||
# id: AVD-AWS-0089
|
||||
# avd_id: AVD-AWS-0089
|
||||
# provider: aws
|
||||
# service: s3
|
||||
# severity: LOW
|
||||
# short_code: enable-logging
|
||||
```
|
||||
|
||||
Long ID would look like the following: `aws-s3-enable-logging`.
|
||||
|
||||
Example for CloudFromation:
|
||||
```yaml
|
||||
AWSTemplateFormatVersion: "2010-09-09"
|
||||
Resources:
|
||||
#trivy:ignore:*
|
||||
S3Bucket:
|
||||
Type: 'AWS::S3::Bucket'
|
||||
Properties:
|
||||
BucketName: test-bucket
|
||||
```
|
||||
|
||||
!!!note
|
||||
Ignore rules for Helm files should be placed before the YAML object, since only it contains the location data needed for ignoring.
|
||||
|
||||
Example for Helm:
|
||||
```yaml
|
||||
serviceAccountName: "testchart.serviceAccountName"
|
||||
containers:
|
||||
# trivy:ignore:KSV018
|
||||
- name: "testchart"
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 3000
|
||||
image: "your-repository/your-image:your-tag"
|
||||
imagePullPolicy: "Always"
|
||||
|
||||
|
||||
#### Expiration Date
|
||||
|
||||
You can specify the expiration date of the ignore rule in `yyyy-mm-dd` format. This is a useful feature when you want to make sure that an ignored issue is not forgotten and worth revisiting in the future. For example:
|
||||
```tf
|
||||
#trivy:ignore:aws-s3-enable-logging:exp:2024-03-10
|
||||
resource "aws_s3_bucket" "example" {
|
||||
bucket = "test"
|
||||
}
|
||||
```
|
||||
|
||||
The `aws-s3-enable-logging` check will be ignored until `2024-03-10` until the ignore rule expires.
|
||||
|
||||
#### Ignoring by attributes
|
||||
|
||||
You can ignore a resource by its attribute value. This is useful when using the `for-each` meta-argument. For example:
|
||||
|
||||
```tf
|
||||
locals {
|
||||
ports = ["3306", "5432"]
|
||||
}
|
||||
|
||||
#trivy:ignore:aws-ec2-no-public-ingress-sgr[from_port=3306]
|
||||
resource "aws_security_group_rule" "example" {
|
||||
for_each = toset(local.ports)
|
||||
type = "ingress"
|
||||
from_port = each.key
|
||||
to_port = each.key
|
||||
protocol = "TCP"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
security_group_id = aws_security_group.example.id
|
||||
source_security_group_id = aws_security_group.example.id
|
||||
}
|
||||
```
|
||||
|
||||
The `aws-ec2-no-public-ingress-sgr` check will be ignored only for the `aws_security_group_rule` resource with port number `5432`. It is important to note that the ignore rule should not enclose the attribute value in quotes, despite the fact that the port is represented as a string.
|
||||
|
||||
If you want to ignore multiple resources on different attributes, you can specify multiple ignore rules:
|
||||
|
||||
```tf
|
||||
#trivy:ignore:aws-ec2-no-public-ingress-sgr[from_port=3306]
|
||||
#trivy:ignore:aws-ec2-no-public-ingress-sgr[from_port=5432]
|
||||
```
|
||||
|
||||
You can also ignore a resource on multiple attributes in the same rule:
|
||||
```tf
|
||||
locals {
|
||||
rules = {
|
||||
first = {
|
||||
port = 1000
|
||||
type = "ingress"
|
||||
},
|
||||
second = {
|
||||
port = 1000
|
||||
type = "egress"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#trivy:ignore:aws-ec2-no-public-ingress-sgr[from_port=1000,type=egress]
|
||||
resource "aws_security_group_rule" "example" {
|
||||
for_each = { for k, v in local.rules : k => v }
|
||||
|
||||
type = each.value.type
|
||||
from_port = each.value.port
|
||||
to_port = each.value.port
|
||||
protocol = "TCP"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
security_group_id = aws_security_group.example.id
|
||||
source_security_group_id = aws_security_group.example.id
|
||||
}
|
||||
```
|
||||
|
||||
Checks can also be ignored by nested attributes:
|
||||
|
||||
```tf
|
||||
#trivy:ignore:*[logging_config.prefix=myprefix]
|
||||
resource "aws_cloudfront_distribution" "example" {
|
||||
logging_config {
|
||||
include_cookies = false
|
||||
bucket = "mylogs.s3.amazonaws.com"
|
||||
prefix = "myprefix"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Ignoring module issues
|
||||
|
||||
Issues in third-party modules cannot be ignored using the method described above, because you may not have access to modify the module source code. In such a situation you can add ignore rules above the module block, for example:
|
||||
|
||||
```tf
|
||||
#trivy:ignore:aws-s3-enable-logging
|
||||
module "s3_bucket" {
|
||||
source = "terraform-aws-modules/s3-bucket/aws"
|
||||
|
||||
bucket = "my-s3-bucket"
|
||||
}
|
||||
```
|
||||
|
||||
An example of ignoring checks for a specific bucket in a module:
|
||||
```tf
|
||||
locals {
|
||||
bucket = ["test1", "test2"]
|
||||
}
|
||||
|
||||
#trivy:ignore:*[bucket=test1]
|
||||
module "s3_bucket" {
|
||||
for_each = toset(local.bucket)
|
||||
source = "terraform-aws-modules/s3-bucket/aws"
|
||||
bucket = each.value
|
||||
}
|
||||
```
|
||||
|
||||
#### Support for Wildcards
|
||||
|
||||
You can use wildcards in the `ws` (workspace) and `ignore` sections of the ignore rules.
|
||||
|
||||
```tf
|
||||
# trivy:ignore:aws-s3-*:ws:dev-*
|
||||
```
|
||||
|
||||
This example ignores all checks starting with `aws-s3-` for workspaces matching the pattern `dev-*`.
|
||||
|
||||
@@ -121,17 +121,18 @@ Trivy supports extra fields in the `custom` section as described below.
|
||||
If you are creating checks for your Trivy misconfiguration scans, some fields are optional as referenced in the table below. The `schemas` field should be used to enable policy validation using a built-in schema. It is recommended to use this to ensure your checks are
|
||||
correct and do not reference incorrect properties/values.
|
||||
|
||||
| Field name | Allowed values | Default value | In table | In JSON |
|
||||
|----------------------------|-------------------------------------------------------------------|:----------------------------:|:----------------:|:----------------:|
|
||||
| title | Any characters | N/A | :material-check: | :material-check: |
|
||||
| description | Any characters | | :material-close: | :material-check: |
|
||||
| schemas.input | `schema["kubernetes"]`, `schema["dockerfile"]`, `schema["cloud"]` | (applied to all input types) | :material-close: | :material-close: |
|
||||
| custom.id | Any characters | N/A | :material-check: | :material-check: |
|
||||
| custom.severity | `LOW`, `MEDIUM`, `HIGH`, `CRITICAL` | UNKNOWN | :material-check: | :material-check: |
|
||||
| custom.recommended_actions | Any characters | | :material-close: | :material-check: |
|
||||
| custom.deprecated | `true`, `false` | `false` | :material-close: | :material-check: |
|
||||
| custom.input.selector.type | Any item(s) in [this list][source-types] | | :material-close: | :material-check: |
|
||||
| url | Any characters | | :material-close: | :material-check: |
|
||||
| Field name | Allowed values | Default value | In table | In JSON |
|
||||
|------------------------------|---------------------------------------------------------------------|:----------------------------:|:--------:|:-------:|
|
||||
| title | Any characters | N/A | ✅ | ✅ |
|
||||
| description | Any characters | | - | ✅ |
|
||||
| schemas.input | `schema["kubernetes"]`, `schema["dockerfile"]`, `schema["cloud"]` | (applied to all input types) | - | - |
|
||||
| custom.id | Any characters | N/A | ✅ | ✅ |
|
||||
| custom.severity | `LOW`, `MEDIUM`, `HIGH`, `CRITICAL` | UNKNOWN | ✅ | ✅ |
|
||||
| custom.recommended_actions | Any characters | | - | ✅ |
|
||||
| custom.deprecated | `true`, `false` | `false` | - | ✅ |
|
||||
| custom.input.selector.type | Any item(s) in [this list][source-types] | | - | ✅ |
|
||||
| custom.minimum_trivy_version | The minimum version of Trivy that's required to evaluate this check | | - | ✅ |
|
||||
| url | Any characters | | - | ✅ |
|
||||
|
||||
#### custom.avd_id and custom.id
|
||||
|
||||
@@ -149,7 +150,7 @@ Services are defined within a provider. For instance, RDS is a service and AWS i
|
||||
|
||||
#### custom.input
|
||||
|
||||
The `input` tells Trivy what inputs this check should be applied to. Cloud provider checks should always use the `selector` input, and should always use the `type` selector with `cloud`. Check targeting Kubernetes yaml can use `kubenetes`, RBAC can use `rbac`, and so on.
|
||||
The `input` tells Trivy what inputs this check should be applied to. Cloud provider checks should always use the `selector` input, and should always use the `type` selector with `cloud`. Check targeting Kubernetes yaml can use `kubernetes`, RBAC can use `rbac`, and so on.
|
||||
|
||||
#### Subtypes in the custom data
|
||||
|
||||
@@ -207,6 +208,7 @@ You can specify input format via the `custom.input` annotation.
|
||||
- `yaml` (Generic YAML)
|
||||
- `json` (Generic JSON)
|
||||
- `toml` (Generic TOML)
|
||||
- `terraform-raw` (Terraform configuration is not converted to common state as for the Cloud format, allowing for more flexible and direct checks on the original code)
|
||||
|
||||
When configuration languages such as Kubernetes are not identified, file formats such as JSON will be used as `type`.
|
||||
When a configuration language is identified, it will overwrite `type`.
|
||||
|
||||
@@ -1,11 +1,38 @@
|
||||
# Input Schema
|
||||
|
||||
## Overview
|
||||
Checks can be defined with custom schemas that allow inputs to be verified against them. Adding a policy schema
|
||||
|
||||
Schemas are declarative documents that define the structure, data types and constraints of inputs being scanned. Trivy provides certain schemas out of the box as seen in the explorer [here](https://aquasecurity.github.io/trivy-schemas/). You can also find the source code for the schemas [here](https://github.com/aquasecurity/trivy/tree/main/pkg/iac/rego/schemas).
|
||||
|
||||
It is not required to pass in schemas, in order to scan inputs by Trivy but are required if type-checking is needed.
|
||||
|
||||
Checks can be defined with custom schemas that allow inputs to be verified against them. Adding an input schema
|
||||
enables Trivy to show more detailed error messages when an invalid input is encountered.
|
||||
|
||||
In Trivy we have been able to define a schema for a [Dockerfile](https://github.com/aquasecurity/trivy/tree/main/pkg/iac/rego/schemas)
|
||||
Without input schemas, a policy would be as follows:
|
||||
## Unified Schema
|
||||
|
||||
One of the unique advantages of Trivy is to take a variety of inputs, such as IaC files (e.g. CloudFormation, Terraform etc.) and also live cloud scanning
|
||||
(e.g. [Trivy AWS plugin](https://github.com/aquasecurity/trivy-aws)) and normalize them into a standard structure, as defined by the schema.
|
||||
|
||||
An example of such an application would be scanning AWS resources. You can scan them prior to deployment via the Trivy misconfiguration scanner and also
|
||||
scan them after they've been deployed in the cloud with Trivy AWS scanning. Both scan methods should yield the same result as resources are gathered into
|
||||
a unified representation as defined by the [Cloud schema](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/cloud.json).
|
||||
|
||||
|
||||
## Supported Schemas
|
||||
Currently out of the box the following schemas are supported natively:
|
||||
|
||||
1. [Docker](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/dockerfile.json)
|
||||
2. [Kubernetes](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/kubernetes.json)
|
||||
3. [Cloud](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/cloud.json)
|
||||
4. [Terraform Raw Format](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/terraform-raw.json)
|
||||
|
||||
You can interactively view these schemas with the [Trivy Schema Explorer](https://aquasecurity.github.io/trivy-schemas/)
|
||||
|
||||
|
||||
## Example
|
||||
As mentioned earlier, amongst other built-in schemas, Trivy offers a built in-schema for scanning Dockerfiles. It is available [here](https://github.com/aquasecurity/trivy/tree/main/pkg/iac/rego/schemas)
|
||||
Without input schemas, a check would be as follows:
|
||||
|
||||
!!! example
|
||||
```
|
||||
@@ -17,10 +44,10 @@ Without input schemas, a policy would be as follows:
|
||||
}
|
||||
```
|
||||
|
||||
If this policy is run against offending Dockerfile(s), there will not be any issues as the policy will fail to evaluate.
|
||||
Although the policy's failure to evaluate is legitimate, this should not result in a positive result for the scan.
|
||||
If this check is run against an offending Dockerfile(s), there will not be any issues as the check will fail to evaluate.
|
||||
Although the check's failure to evaluate is legitimate, this should not result in a positive result for the scan.
|
||||
|
||||
For instance if we have a policy that checks for misconfigurations in a `Dockerfile`, we could define the
|
||||
For instance if we have a check that checks for misconfigurations in a `Dockerfile`, we could define the
|
||||
schema as such
|
||||
|
||||
!!! example
|
||||
@@ -38,26 +65,20 @@ schema as such
|
||||
Here `input: schema["dockerfile"]` points to a schema that expects a valid `Dockerfile` as input. An example of this
|
||||
can be found [here](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/dockerfile.json).
|
||||
|
||||
Now if this policy is evaluated against, a more descriptive error will be available to help fix the problem.
|
||||
Now if this check is evaluated against, a more descriptive error will be available to help fix the problem.
|
||||
|
||||
```bash
|
||||
1 error occurred: testpolicy.rego:8: rego_type_error: undefined ref: input.evil
|
||||
1 error occurred: testcheck.rego:8: rego_type_error: undefined ref: input.evil
|
||||
input.evil
|
||||
^
|
||||
have: "evil"
|
||||
want (one of): ["Stages"]
|
||||
```
|
||||
|
||||
Currently, out of the box the following schemas are supported natively:
|
||||
|
||||
1. [Docker](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/dockerfile.json)
|
||||
2. [Kubernetes](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/kubernetes.json)
|
||||
3. [Cloud](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/cloud.json)
|
||||
|
||||
|
||||
## Custom Checks with Custom Schemas
|
||||
|
||||
You can also bring a custom policy that defines one or more custom schema.
|
||||
You can also bring a custom check that defines one or more custom schema.
|
||||
|
||||
!!! example
|
||||
```
|
||||
@@ -77,16 +98,83 @@ The checks can be placed in a structure as follows
|
||||
!!! example
|
||||
```
|
||||
/Users/user/my-custom-checks
|
||||
├── my_policy.rego
|
||||
├── my_check.rego
|
||||
└── schemas
|
||||
└── fooschema.json
|
||||
└── barschema.json
|
||||
```
|
||||
|
||||
To use such a policy with Trivy, use the `--config-policy` flag that points to the policy file or to the directory where the schemas and checks are contained.
|
||||
To use such a check with Trivy, use the `--config-check` flag that points to the check file or to the directory where the schemas and checks are contained.
|
||||
|
||||
```bash
|
||||
$ trivy --config-policy=/Users/user/my-custom-checks <path/to/iac>
|
||||
$ trivy --config-check=/Users/user/my-custom-checks <path/to/iac>
|
||||
```
|
||||
|
||||
For more details on how to define schemas within Rego checks, please see the [OPA guide](https://www.openpolicyagent.org/docs/latest/policy-language/#schema-annotations) that describes it in more detail.
|
||||
For more details on how to define schemas within Rego checks, please see the [OPA guide](https://www.openpolicyagent.org/docs/latest/policy-language/#schema-annotations) that describes it in more detail.
|
||||
|
||||
### Scan arbitrary JSON and YAML configurations
|
||||
By default, scanning JSON and YAML configurations is disabled, since Trivy does not contain built-in checks for these configurations. To enable it, pass the `json` or `yaml` to `--misconfig-scanners`. Trivy will pass each file as is to the checks input.
|
||||
|
||||
|
||||
!!! example
|
||||
```bash
|
||||
$ cat iac/serverless.yaml
|
||||
service: serverless-rest-api-with-pynamodb
|
||||
|
||||
frameworkVersion: ">=2.24.0"
|
||||
|
||||
plugins:
|
||||
- serverless-python-requirements
|
||||
...
|
||||
|
||||
$ cat serverless.rego
|
||||
# METADATA
|
||||
# title: Serverless Framework service name not starting with "aws-"
|
||||
# description: Ensure that Serverless Framework service names start with "aws-"
|
||||
# schemas:
|
||||
# - input: schema["serverless-schema"]
|
||||
# custom:
|
||||
# id: SF001
|
||||
# severity: LOW
|
||||
package user.serverless001
|
||||
|
||||
deny[res] {
|
||||
not startswith(input.service, "aws-")
|
||||
res := result.new(
|
||||
sprintf("Service name %q is not allowed", [input.service]),
|
||||
input.service
|
||||
)
|
||||
}
|
||||
|
||||
$ trivy config --misconfig-scanners=json,yaml --config-check ./serverless.rego --check-namespaces user ./iac
|
||||
serverless.yaml (yaml)
|
||||
|
||||
Tests: 4 (SUCCESSES: 3, FAILURES: 1)
|
||||
Failures: 1 (UNKNOWN: 0, LOW: 1, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
|
||||
|
||||
LOW: Service name "serverless-rest-api-with-pynamodb" is not allowed
|
||||
═════════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||
Ensure that Serverless Framework service names start with "aws-"
|
||||
```
|
||||
|
||||
!!! note
|
||||
In the case above, the custom check specified has a metadata annotation for the input schema `input: schema["serverless-schema"]`. This allows Trivy to type check the input IaC files provided.
|
||||
|
||||
Optionally, you can also pass schemas using the `config-file-schemas` flag. Trivy will use these schemas for file filtering and type checking in Rego checks.
|
||||
|
||||
!!! example
|
||||
```bash
|
||||
$ trivy config --misconfig-scanners=json,yaml --config-check ./serverless.rego --check-namespaces user --config-file-schemas ./serverless-schema.json ./iac
|
||||
```
|
||||
|
||||
If the `--config-file-schemas` flag is specified Trivy ensures that each input IaC config file being scanned is type-checked against the schema. If the input file does not match any of the passed schemas, it will be ignored.
|
||||
|
||||
If the schema is specified in the check metadata and is in the directory specified in the `--config-check` argument, it will be automatically loaded as specified [here](./custom/schema.md#custom-checks-with-custom-schemas), and will only be used for type checking in Rego.
|
||||
|
||||
!!! note
|
||||
If a user specifies the `--config-file-schemas` flag, all input IaC config files are ensured that they pass type-checking. It is not required to pass an input schema in case type checking is not required. This is helpful for scenarios where you simply want to write a Rego check and pass in IaC input for it. Such a use case could include scanning for a new service which Trivy might not support just yet.
|
||||
|
||||
!!! tip
|
||||
It is also possible to specify multiple input schemas with `--config-file-schema` flag as it can accept a comma seperated list of file paths or a directory as input. In the case of multiple schemas being specified, all of them will be evaluated against all the input files.
|
||||
|
||||
|
||||
|
||||
@@ -407,7 +407,7 @@ If the schema is specified in the check metadata and is in the directory specifi
|
||||
If a user specifies the `--config-file-schemas` flag, all input IaC config files are ensured that they pass type-checking. It is not required to pass an input schema in case type checking is not required. This is helpful for scenarios where you simply want to write a Rego check and pass in IaC input for it. Such a use case could include scanning for a new service which Trivy might not support just yet.
|
||||
|
||||
!!! tip
|
||||
It is also possible to specify multiple input schemas with `--config-file-schema` flag as it can accept a comma seperated list of file paths or a directory as input. In the case of multiple schemas being specified, all of them will be evaluated against all the input files.
|
||||
It is also possible to specify multiple input schemas with `--config-file-schema` flag as it can accept a comma separated list of file paths or a directory as input. In the case of multiple schemas being specified, all of them will be evaluated against all the input files.
|
||||
|
||||
|
||||
### Passing custom data
|
||||
@@ -449,9 +449,9 @@ From the Terraform [docs](https://developer.hashicorp.com/terraform/cli/config/c
|
||||
If multiple variables evaluate to the same hostname, Trivy will choose the environment variable name where the dashes have not been encoded as double underscores.
|
||||
|
||||
|
||||
### Skipping resources by inline comments
|
||||
### Skipping detected misconfigurations by inline comments
|
||||
|
||||
Trivy supports ignoring misconfigured resources by inline comments for Terraform and CloudFormation configuration files only.
|
||||
Trivy supports ignoring detected misconfigurations by inline comments for Terraform, CloudFormation (YAML), Helm and Dockerfile configuration files only.
|
||||
|
||||
In cases where Trivy can detect comments of a specific format immediately adjacent to resource definitions, it is possible to ignore findings from a single source of resource definition (in contrast to `.trivyignore`, which has a directory-wide scope on all of the files scanned). The format for these comments is `trivy:ignore:<rule>` immediately following the format-specific line-comment [token](https://developer.hashicorp.com/terraform/language/syntax/configuration#comments).
|
||||
|
||||
@@ -503,6 +503,29 @@ Resources:
|
||||
BucketName: test-bucket
|
||||
```
|
||||
|
||||
!!!note
|
||||
Ignore rules for Helm files should be placed before the YAML object, since only it contains the location data needed for ignoring.
|
||||
|
||||
Example for Helm:
|
||||
```yaml
|
||||
serviceAccountName: "testchart.serviceAccountName"
|
||||
containers:
|
||||
# trivy:ignore:KSV018
|
||||
- name: "testchart"
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 3000
|
||||
image: "your-repository/your-image:your-tag"
|
||||
imagePullPolicy: "Always"
|
||||
```
|
||||
|
||||
Example for Dockerfile:
|
||||
```Dockerfile
|
||||
FROM scratch
|
||||
# trivy:ignore:AVD-DS-0022
|
||||
MAINTAINER moby@example.com
|
||||
```
|
||||
|
||||
#### Expiration Date
|
||||
|
||||
You can specify the expiration date of the ignore rule in `yyyy-mm-dd` format. This is a useful feature when you want to make sure that an ignored issue is not forgotten and worth revisiting in the future. For example:
|
||||
|
||||
@@ -25,7 +25,9 @@ See [here](../coverage/os/index.md#supported-os) for the supported OSes.
|
||||
| Alpine Linux | [secdb][alpine] |
|
||||
| Wolfi Linux | [secdb][wolfi] |
|
||||
| Chainguard | [secdb][chainguard] |
|
||||
| MinimOS | [secdb][minimos] |
|
||||
| Amazon Linux | [Amazon Linux Security Center][amazon] |
|
||||
| Echo | [Echo][echo] |
|
||||
| Debian | [Security Bug Tracker][debian-tracker] / [OVAL][debian-oval] |
|
||||
| Ubuntu | [Ubuntu CVE Tracker][ubuntu] |
|
||||
| RHEL/CentOS | [OVAL][rhel-oval] / [Security Data][rhel-api] |
|
||||
@@ -120,7 +122,6 @@ See [here](../coverage/language/index.md#supported-languages) for the supported
|
||||
| PHP | [PHP Security Advisories Database][php] | ✅ | - |
|
||||
| | [GitHub Advisory Database (Composer)][php-ghsa] | ✅ | - |
|
||||
| Python | [GitHub Advisory Database (pip)][python-ghsa] | ✅ | - |
|
||||
| | [Open Source Vulnerabilities (PyPI)][python-osv] | ✅ | - |
|
||||
| Ruby | [Ruby Advisory Database][ruby] | ✅ | - |
|
||||
| | [GitHub Advisory Database (RubyGems)][ruby-ghsa] | ✅ | - |
|
||||
| Node.js | [Ecosystem Security Working Group][nodejs] | ✅ | - |
|
||||
@@ -294,9 +295,10 @@ This feature allows you to focus on vulnerabilities in specific types of depende
|
||||
In Trivy, there are four types of package relationships:
|
||||
|
||||
1. `root`: The root package being scanned
|
||||
2. `direct`: Direct dependencies of the root package
|
||||
3. `indirect`: Transitive dependencies
|
||||
4. `unknown`: Packages whose relationship cannot be determined
|
||||
2. `workspace`: Workspaces of the root package (Currently only `pom.xml`, `yarn.lock` and `cargo.lock` files are supported)
|
||||
3. `direct`: Direct dependencies of the root/workspace package
|
||||
4. `indirect`: Transitive dependencies
|
||||
5. `unknown`: Packages whose relationship cannot be determined
|
||||
|
||||
The available relationships may vary depending on the ecosystem.
|
||||
To see which relationships are supported for a particular project, you can use the JSON output format and check the `Relationship` field:
|
||||
@@ -339,6 +341,36 @@ Regardless of the chosen mode, user review of detected vulnerabilities is crucia
|
||||
- `precise`: Review thoroughly, considering potential missed vulnerabilities.
|
||||
- `comprehensive`: Carefully investigate each reported vulnerability due to increased false positive possibility.
|
||||
|
||||
### Overriding OS version
|
||||
By default, Trivy automatically detects the OS during container image scanning and performs vulnerability detection based on that OS.
|
||||
However, in some cases, you may want to scan an image with a different OS version than the one detected.
|
||||
Also, you may want to specify the OS version when OS is not detected.
|
||||
For these cases, Trivy supports a `--distro` flag using the `<family>/<version>` format (e.g. `alpine/3.20`) to set the desired OS version.
|
||||
|
||||
### Severity selection
|
||||
By default, Trivy automatically detects severity (as described [here](#severity-selection)).
|
||||
But there are cases when you may want to use your own source priority. Trivy supports the `--vuln-severity-source` flag for this.
|
||||
|
||||
Fill in a list of required sources, and Trivy will check the sources in that order until it finds an existing severity.
|
||||
If no source has the severity - Trivy will use the `UNKNOWN` severity.
|
||||
|
||||
!!! note
|
||||
To use the default logic in combination with your sources - use the `auto` value.
|
||||
|
||||
Example logic for the following vendor severity levels when scanning an Alpine image:
|
||||
|
||||
```json
|
||||
"VendorSeverity": {
|
||||
"ghsa": 3,
|
||||
"nvd": 4,
|
||||
}
|
||||
```
|
||||
|
||||
- `--vuln-severity-source auto,nvd` - severity is `CRITICAL`, got from `auto`.
|
||||
- `--vuln-severity-source alpine,auto` - severity is `CRITICAL`, got from `auto`.
|
||||
- `--vuln-severity-source alpine,ghsa` - severity is `HIGH`, got from `ghsa`.
|
||||
- `--vuln-severity-source alpine,alma` - severity is `UNKNOWN`.
|
||||
|
||||
[^1]: https://github.com/GoogleContainerTools/distroless
|
||||
|
||||
[nvd-CVE-2023-0464]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
|
||||
@@ -348,7 +380,9 @@ Regardless of the chosen mode, user review of detected vulnerabilities is crucia
|
||||
[alpine]: https://secdb.alpinelinux.org/
|
||||
[wolfi]: https://packages.wolfi.dev/os/security.json
|
||||
[chainguard]: https://packages.cgr.dev/chainguard/security.json
|
||||
[minimos]: https://packages.mini.dev/advisories/secdb/security.json
|
||||
[amazon]: https://alas.aws.amazon.com/
|
||||
[echo]: https://advisory.echohq.com/data.json
|
||||
[debian-tracker]: https://security-tracker.debian.org/tracker/
|
||||
[debian-oval]: https://www.debian.org/security/oval/
|
||||
[ubuntu]: https://ubuntu.com/security/cve
|
||||
|
||||
@@ -22,7 +22,7 @@ $ trivy image --sbom-sources rekor otms61/alpine:3.7.3
|
||||
2022-09-16T17:37:13.258+0900 INFO Vulnerability scanning is enabled
|
||||
2022-09-16T17:37:13.258+0900 INFO Secret scanning is enabled
|
||||
2022-09-16T17:37:13.258+0900 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
|
||||
2022-09-16T17:37:13.258+0900 INFO Please see also https://aquasecurity.github.io/trivy/dev/docs/secret/scanning/#recommendation for faster secret detection
|
||||
2022-09-16T17:37:13.258+0900 INFO Please see also https://trivy.dev/dev/docs/secret/scanning/#recommendation for faster secret detection
|
||||
2022-09-16T17:37:14.827+0900 INFO Detected SBOM format: cyclonedx-json
|
||||
2022-09-16T17:37:14.901+0900 INFO Found SBOM (cyclonedx) attestation in Rekor
|
||||
2022-09-16T17:37:14.903+0900 INFO Detected OS: alpine
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -269,13 +269,13 @@ You can see [the appendix](#applying-vex-to-dependency-trees) for more details o
|
||||
Provide the VEX when scanning your target.
|
||||
|
||||
```bash
|
||||
$ trivy image debian:11 --vex debian11.openvex.json
|
||||
$ trivy image debian:11.6 --vex debian11.openvex.json
|
||||
...
|
||||
2023-04-26T17:56:05.358+0300 INFO Filtered out the detected vulnerability {"VEX format": "OpenVEX", "vulnerability-id": "CVE-2019-8457", "status": "not_affected", "justification": "vulnerable_code_not_in_execute_path"}
|
||||
|
||||
debian11.spdx.json (debian 11.6)
|
||||
================================
|
||||
Total: 80 (UNKNOWN: 0, LOW: 58, MEDIUM: 6, HIGH: 16, CRITICAL: 0)
|
||||
debian:11.6 (debian 11.6)
|
||||
|
||||
Total: 176 (UNKNOWN: 1, LOW: 82, MEDIUM: 46, HIGH: 41, CRITICAL: 5)
|
||||
```
|
||||
|
||||
CVE-2019-8457 is no longer shown as it is filtered out according to the given OpenVEX document.
|
||||
@@ -420,13 +420,13 @@ You can see [the appendix](#applying-vex-to-dependency-trees) for more details o
|
||||
Provide the CSAF document when scanning your target.
|
||||
|
||||
```bash
|
||||
$ trivy image debian:11 --vex debian11.vex.csaf
|
||||
$ trivy image debian:11.8 --vex debian11.vex.csaf
|
||||
...
|
||||
2024-01-02T10:28:26.704+0100 INFO Filtered out the detected vulnerability {"VEX format": "CSAF", "vulnerability-id": "CVE-2019-8457", "status": "not_affected"}
|
||||
|
||||
debian11.spdx.json (debian 11.6)
|
||||
================================
|
||||
Total: 80 (UNKNOWN: 0, LOW: 58, MEDIUM: 6, HIGH: 16, CRITICAL: 0)
|
||||
debian:11.8 (debian 11.8)
|
||||
|
||||
Total: 153 (UNKNOWN: 1, LOW: 82, MEDIUM: 33, HIGH: 32, CRITICAL: 5)
|
||||
```
|
||||
|
||||
CVE-2019-8457 is no longer shown as it is filtered out according to the given CSAF document.
|
||||
|
||||
@@ -8,11 +8,12 @@ By providing VEX during scanning, it is possible to filter vulnerabilities based
|
||||
|
||||
## VEX Usage Methods
|
||||
|
||||
Trivy currently supports two methods for utilizing VEX:
|
||||
Trivy currently supports four methods for utilizing VEX:
|
||||
|
||||
1. [VEX Repository](./repo.md)
|
||||
2. [Local VEX Files](./file.md)
|
||||
3. [VEX Attestation](./oci.md)
|
||||
4. [SBOM Reference](./sbom-ref.md)
|
||||
|
||||
### Enabling VEX
|
||||
To enable VEX, use the `--vex` option.
|
||||
@@ -21,6 +22,7 @@ You can specify the method to use:
|
||||
- To enable the VEX Repository: `--vex repo`
|
||||
- To use a local VEX file: `--vex /path/to/vex-document.json`
|
||||
- To enable VEX attestation discovery in OCI registry: `--vex oci`
|
||||
- To use remote VEX files referenced in SBOMs: `--vex sbom-ref`
|
||||
|
||||
```bash
|
||||
$ trivy image ghcr.io/aquasecurity/trivy:0.52.0 --vex repo
|
||||
|
||||
44
docs/docs/supply-chain/vex/sbom-ref.md
Normal file
44
docs/docs/supply-chain/vex/sbom-ref.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# VEX SBOM Reference
|
||||
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
## Using externally referenced VEX documents
|
||||
|
||||
Trivy can discover and download VEX documents referenced in the `externalReferences` of a scanned CycloneDX SBOM. This
|
||||
requires the references to be of type `exploitability-statement`.
|
||||
|
||||
To be picked up by Trivy, following top level content needs to be part of a CycloneDx SBOM to dynamically resolve a
|
||||
remotely hosted file VEX file at the location `https://vex.example.com`:
|
||||
|
||||
```
|
||||
"externalReferences": [
|
||||
{
|
||||
"type": "exploitability-statement",
|
||||
"url": "https://vex.example.com/vex"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
This can also be used to dynamically retrieve VEX files stored on GitHub with an `externalReference` such as:
|
||||
|
||||
```
|
||||
"externalReferences": [
|
||||
{
|
||||
"type": "exploitability-statement",
|
||||
"url": "https://raw.githubusercontent.com/aquasecurity/trivy/refs/heads/main/.vex/trivy.openvex.json"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
This is not enabled by default at the moment, but can be used when scanning a CycloneDx SBOM and explicitly specifying
|
||||
`--vex sbom-ref`.
|
||||
|
||||
```shell
|
||||
$ trivy sbom trivy.cdx.json --vex sbom-ref
|
||||
2025-01-19T13:29:31+01:00 INFO [vex] Retrieving external VEX document from host vex.example.com type="externalReference"
|
||||
2025-01-19T13:29:31+01:00 INFO Some vulnerabilities have been ignored/suppressed. Use the "--show-suppressed" flag to display them.
|
||||
```
|
||||
|
||||
All the referenced VEX files are retrieved via HTTP/HTTPS and used in the same way as if they were explicitly specified
|
||||
via a [file reference](./file.md).
|
||||
@@ -144,7 +144,7 @@ See https://avd.aquasec.com/misconfig/ds005
|
||||
|
||||
LOW: Add HEALTHCHECK instruction in your Dockerfile
|
||||
════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||
You shoud add HEALTHCHECK instruction in your docker container images to perform the health check on running containers.
|
||||
You should add HEALTHCHECK instruction in your docker container images to perform the health check on running containers.
|
||||
|
||||
See https://avd.aquasec.com/misconfig/ds026
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
@@ -154,7 +154,15 @@ See https://avd.aquasec.com/misconfig/ds026
|
||||
!!! tip
|
||||
You can see how each layer is created with `docker history`.
|
||||
|
||||
The [AVD-DS-0016](https://avd.aquasec.com/misconfig/dockerfile/general/avd-ds-0016/) check is disabled for this scan type, see [issue](https://github.com/aquasecurity/trivy/issues/7368) for details.
|
||||
#### Disabled checks
|
||||
|
||||
The following checks are disabled for this scan type due to known issues. See the linked issues for more details.
|
||||
|
||||
| Check ID | Reason | Issue |
|
||||
|----------|------------|--------|
|
||||
| [AVD-DS-0007](https://avd.aquasec.com/misconfig/dockerfile/general/avd-ds-0007/) | This check detects multiple `ENTRYPOINT` instructions in a stage, but since image history analysis does not identify stages, this check is not relevant for this scan type. | [#8364](https://github.com/aquasecurity/trivy/issues/8364) |
|
||||
| [AVD-DS-0016](https://avd.aquasec.com/misconfig/dockerfile/general/avd-ds-0016/) | This check detects multiple `CMD` instructions in a stage, but since image history analysis does not identify stages, this check is not relevant for this scan type. | [#7368](https://github.com/aquasecurity/trivy/issues/7368) |
|
||||
|
||||
|
||||
### Secrets
|
||||
Trivy detects secrets on the configuration of container images.
|
||||
@@ -403,9 +411,20 @@ Trivy supports the generation of Software Bill of Materials (SBOM) for container
|
||||
|
||||
### Generation
|
||||
Trivy can generate SBOM for container images.
|
||||
See [here](../supply-chain/sbom.md) for the detail.
|
||||
See [here](../supply-chain/sbom.md) for details.
|
||||
|
||||
### Discovery
|
||||
### Discover SBOM inside container images
|
||||
Trivy can search for Software Bill of Materials (SBOMs) within container image files and scan their components for vulnerabilities.
|
||||
|
||||
#### Third-party SBOM files
|
||||
SBOM specifications define key requirements for component documentation[^2].
|
||||
However, different tools and systems often have varying approaches to documenting component types and their relationships.
|
||||
|
||||
Due to these variations, Trivy cannot always accurately interpret SBOMs generated by other tools.
|
||||
For example, it may have difficulty determining the correct file paths to component information files (such as lock files or binaries).
|
||||
In such cases, Trivy uses the path to the scanned SBOM file itself to maintain traceability and ensure accurate dependency reporting.
|
||||
|
||||
### Discover SBOM referencing the container image
|
||||
Trivy can search for Software Bill of Materials (SBOMs) that reference container images.
|
||||
If an SBOM is found, the vulnerability scan is performed using the SBOM instead of the container image.
|
||||
By using the SBOM, you can perform a vulnerability scan more quickly, as it allows you to skip pulling the container image and analyzing its layers.
|
||||
@@ -463,6 +482,12 @@ trivy image --compliance docker-cis-1.6.0 [YOUR_IMAGE_NAME]
|
||||
## Authentication
|
||||
Please reference [this page](../advanced/private-registries/index.md).
|
||||
|
||||
## Scan Cache
|
||||
When scanning container images, it stores analysis results in the cache, using the image ID and the layer IDs as the key.
|
||||
This approach enables faster scans of the same container image or different images that share layers.
|
||||
|
||||
More details are available in the [cache documentation](../configuration/cache.md#scan-cache-backend).
|
||||
|
||||
## Options
|
||||
### Scan Image on a specific Architecture and OS
|
||||
By default, Trivy loads an image on a "linux/amd64" machine.
|
||||
@@ -485,7 +510,7 @@ $ trivy image --platform=linux/arm alpine:3.16.1
|
||||
2022-10-25T21:00:50.972+0300 INFO Vulnerability scanning is enabled
|
||||
2022-10-25T21:00:50.972+0300 INFO Secret scanning is enabled
|
||||
2022-10-25T21:00:50.972+0300 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
|
||||
2022-10-25T21:00:50.972+0300 INFO Please see also https://aquasecurity.github.io/trivy/dev/docs/secret/scanning/#recommendation for faster secret detection
|
||||
2022-10-25T21:00:50.972+0300 INFO Please see also https://trivy.dev/dev/docs/secret/scanning/#recommendation for faster secret detection
|
||||
2022-10-25T21:00:56.190+0300 INFO Detected OS: alpine
|
||||
2022-10-25T21:00:56.190+0300 INFO Detecting Alpine vulnerabilities...
|
||||
2022-10-25T21:00:56.191+0300 INFO Number of language-specific files: 0
|
||||
@@ -518,3 +543,31 @@ You can configure Podman daemon socket with `--podman-host`.
|
||||
```shell
|
||||
$ trivy image --podman-host /run/user/1000/podman/podman.sock YOUR_IMAGE
|
||||
```
|
||||
|
||||
### Prevent scanning oversized container images
|
||||
Use the `--max-image-size` flag to avoid scanning images that exceed a specified size. The size is specified in a human-readable format[^1] (e.g., `100MB`, `10GB`).
|
||||
|
||||
An error is returned in the following cases:
|
||||
|
||||
- if the compressed image size exceeds the limit,
|
||||
- if the accumulated size of the uncompressed layers exceeds the limit during their pulling.
|
||||
|
||||
The layers are pulled into a temporary folder during their pulling and are always cleaned up, even after a successful scan.
|
||||
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
|
||||
Example Usage:
|
||||
```bash
|
||||
# Limit uncompressed image size to 10GB
|
||||
$ trivy image --max-image-size=10GB myapp:latest
|
||||
```
|
||||
|
||||
Error Output:
|
||||
```bash
|
||||
Error: uncompressed image size (15GB) exceeds maximum allowed size (10GB)
|
||||
```
|
||||
|
||||
[^1]: Trivy uses decimal (SI) prefixes (based on 1000) for size.
|
||||
[^2]: SPDX uses `package` instead of `component`.
|
||||
|
||||
@@ -91,3 +91,13 @@ $ trivy fs --scanners license /path/to/project
|
||||
## SBOM generation
|
||||
Trivy can generate SBOM for local projects.
|
||||
See [here](../supply-chain/sbom.md) for the detail.
|
||||
|
||||
## Scan Cache
|
||||
When scanning local projects, it doesn't use the cache by default.
|
||||
However, when the local project is a git repository with clean status and the cache backend other than the memory one is enabled, it stores analysis results, using the latest commit hash as the key.
|
||||
|
||||
```shell
|
||||
$ trivy fs --cache-backend fs /path/to/git/repo
|
||||
```
|
||||
|
||||
More details are available in the [cache documentation](../configuration/cache.md#scan-cache-backend).
|
||||
|
||||
@@ -38,6 +38,10 @@ for example:
|
||||
trivy k8s --report summary
|
||||
```
|
||||
|
||||
!!! note "JSON result for multi-container pods"
|
||||
For multi-container pods, it may be challenging to associate results with specific images in the json summary report. Kubernetes treats a pod as a single object, so individual images within the pod aren’t distinguished.
|
||||
For detailed information, please use the `--report all` option.
|
||||
|
||||
By default Trivy will look for a [`kubeconfig` configuration file in the default location](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/), and use the default cluster that is specified.
|
||||
You can also specify a `kubeconfig` using the `--kubeconfig` flag:
|
||||
|
||||
@@ -45,10 +49,41 @@ You can also specify a `kubeconfig` using the `--kubeconfig` flag:
|
||||
trivy k8s --kubeconfig ~/.kube/config2
|
||||
```
|
||||
|
||||
By default, all cluster resource images will be downloaded and scanned.
|
||||
## Required roles
|
||||
To successfully scan a Kubernetes cluster, `trivy kubernetes` subcommand must be executed under a role or a cluster role that has some specific permissions.
|
||||
|
||||
The role must have `list` verb for all resources (`"*"`) inside the following API groups: core (`""`), `"apps"`, `"batch"`,`"networking.k8s.io"`, `"rbac.authorization.k8s.io"`:
|
||||
```yaml
|
||||
- apiGroups: [""]
|
||||
resources: ["*"]
|
||||
verbs: ["list"]
|
||||
- apiGroups: ["apps", "batch", "networking.k8s.io", "rbac.authorization.k8s.io"]
|
||||
resources: ["*"]
|
||||
verbs: ["list"]
|
||||
```
|
||||
If `node collector` is enabled (default: enabled), Trivy needs a cluster role with some additional permissions to run and track the jobs:
|
||||
```yaml
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes/proxy", "pods/log"]
|
||||
verbs: ["get"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["watch"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs", "cronjobs"]
|
||||
verbs: ["list", "get"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["create","delete", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces"]
|
||||
verbs: ["create"]
|
||||
```
|
||||
|
||||
### Skip-images
|
||||
|
||||
By default, all cluster resource images will be downloaded and scanned.
|
||||
|
||||
You can control whether Trivy will scan and download the cluster resource images. To disable this feature, add the --skip-images flag.
|
||||
|
||||
- `--skip-images` flag will prevent the downloading and scanning of images (including vulnerabilities and secrets) in the cluster resources.
|
||||
@@ -87,6 +122,9 @@ You can control which namespaces will be discovered using the `--include-namespa
|
||||
|
||||
By default, all namespaces will be included in cluster scanning.
|
||||
|
||||
!!! note "using `--exclude-namespaces`"
|
||||
Trivy requires a complete list of namespaces to exclude specific ones. Therefore, `--exclude-namespaces` option is only available for cluster roles now.
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
@@ -142,7 +180,7 @@ trivy k8s --report summary --disable-node-collector
|
||||
|
||||
The node-collector scan-job will run on every node. In case the node has been tainted, it is possible to add toleration to the scan job for it to be scheduled on the tainted node. for more details [see k8s docs](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)
|
||||
|
||||
- `--tolerations key1=value1:NoExecute,key2=value2:NoSchedule` this flag wil enable node-collector to be schedule on tainted Node
|
||||
- `--tolerations key1=value1:NoExecute,key2=value2:NoSchedule` this flag will enable node-collector to be schedule on tainted Node
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -109,6 +109,12 @@ $ trivy repo --scanners license (REPO_PATH | REPO_URL)
|
||||
Trivy can generate SBOM for code repositories.
|
||||
See [here](../supply-chain/sbom.md) for the detail.
|
||||
|
||||
## Scan Cache
|
||||
When scanning git repositories, it stores analysis results in the cache, using the latest commit hash as the key.
|
||||
Note that the cache is not used when the repository is dirty, otherwise Trivy will miss the files that are not committed.
|
||||
|
||||
More details are available in the [cache documentation](../configuration/cache.md#scan-cache-backend).
|
||||
|
||||
## References
|
||||
The following flags and environmental variables are available for remote git repositories.
|
||||
|
||||
|
||||
@@ -13,3 +13,19 @@ $ trivy rootfs /path/to/rootfs
|
||||
Rootfs scanning works differently from the Filesystem scanning.
|
||||
You should use `trivy fs` to scan your local projects in CI/CD.
|
||||
See [here](../scanner/vulnerability.md) for the differences.
|
||||
|
||||
!!! note
|
||||
Scanning vulnerabilities for `Red Hat` has a limitation, see the [Red Hat](../coverage/os/rhel.md#content-manifests) page for details.
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
By default, Trivy traverses all files from the specified root directory to find target files for scanning.
|
||||
However, when you only need to scan specific files with absolute paths, you can avoid this traversal, which makes scanning faster.
|
||||
For example, when scanning only OS packages, no full traversal is performed:
|
||||
|
||||
```bash
|
||||
$ trivy rootfs --pkg-types os --scanners vuln /
|
||||
```
|
||||
|
||||
When scanning language-specific packages or secrets, traversal is necessary because the location of these files is unknown.
|
||||
If you want to exclude specific directories from scanning for better performance, you can use the [--skip-dirs](../configuration/skipping.md) option.
|
||||
|
||||
@@ -150,6 +150,9 @@ See [here](../scanner/vulnerability.md) for the detail.
|
||||
$ trivy vm [YOUR_VM_IMAGE]
|
||||
```
|
||||
|
||||
!!! note
|
||||
Scanning `Red Hat` has a limitation, see the [Red Hat](../coverage/os/rhel.md#content-manifests) page for details.
|
||||
|
||||
### Misconfigurations
|
||||
It is supported, but it is not useful in most cases.
|
||||
As mentioned [here](../scanner/misconfiguration/index.md), Trivy mainly supports Infrastructure as Code (IaC) files for misconfigurations.
|
||||
@@ -182,6 +185,14 @@ $ trivy vm --scanners license [YOUR_VM_IMAGE]
|
||||
Trivy can generate SBOM for VM images.
|
||||
See [here](../supply-chain/sbom.md) for the detail.
|
||||
|
||||
## Scan Cache
|
||||
When scanning AMI or EBS snapshots, it stores analysis results in the cache, using the snapshot ID.
|
||||
Scanning the same snapshot several times skips analysis if the cache is already available.
|
||||
|
||||
When scanning local files, it doesn't use the cache by default.
|
||||
|
||||
More details are available in the [cache documentation](../configuration/cache.md#scan-cache-backend).
|
||||
|
||||
## Supported Architectures
|
||||
|
||||
### Virtual machine images
|
||||
|
||||
@@ -58,7 +58,7 @@ Web application that allows to load a Trivy report in json format and displays t
|
||||
|
||||
## Trivy pre-commit (Community)
|
||||
|
||||
A trivy pre-commit hook that runs a `trivy fs` in your git repo before commiting, preventing you from commiting secrets in the first place.
|
||||
A trivy pre-commit hook that runs a `trivy fs` in your git repo before committing, preventing you from committing secrets in the first place.
|
||||
|
||||
👉 Get it at: <https://github.com/mxab/pre-commit-trivy>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Check out the [Scanning coverage page](../docs/coverage/index.md).
|
||||
### Is there a paid version of Trivy?
|
||||
|
||||
If you liked Trivy, you will love Aqua which builds on top of Trivy to provide even more enhanced capabilities for a complete security management offering.
|
||||
You can find a high level comparison table specific to Trivy users [here](https://github.com/aquasecurity/resources/blob/main/trivy-aqua.md).
|
||||
You can find a high level comparison table specific to Trivy users [here](../commercial/compare.md).
|
||||
In addition check out the <https://aquasec.com> website for more information about our products and services.
|
||||
If you'd like to contact Aqua or request a demo, please use this form: <https://www.aquasec.com/demo>
|
||||
|
||||
|
||||
@@ -69,6 +69,6 @@ Now that you up and ready, here are some resources to help you deepen your knowl
|
||||
# Want more? Check out Aqua
|
||||
|
||||
If you liked Trivy, you will love Aqua which builds on top of Trivy to provide even more enhanced capabilities for a complete security management offering.
|
||||
You can find a high level comparison table specific to Trivy users [here](https://github.com/aquasecurity/resources/blob/main/trivy-aqua.md).
|
||||
You can find a high level comparison table specific to Trivy users [here](../commercial/compare.md).
|
||||
In addition, check out the <https://aquasec.com> website for more information about our products and services.
|
||||
If you'd like to contact Aqua or request a demo, please use this form: <https://www.aquasec.com/demo>
|
||||
|
||||
@@ -167,7 +167,7 @@ See their respective documentation for more information of how to install them a
|
||||
- [asdf](https://asdf-vm.com/guide/getting-started.html)
|
||||
- [mise](https://mise.jdx.dev/getting-started.html)
|
||||
|
||||
The plugin used by both tools is developped [here](https://github.com/zufardhiyaulhaq/asdf-trivy)
|
||||
The plugin used by both tools is developed [here](https://github.com/zufardhiyaulhaq/asdf-trivy)
|
||||
|
||||
|
||||
=== "asdf"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Custom Checks with Rego
|
||||
|
||||
Trivy can scan configuration files for common security issues (a.k.a IaC misconfiguration scanning). In addition to a comprehensive built in database of checks, you can add your own custom checks. Checks are written in [Rego](https://www.openpolicyagent.org/docs/latest/policy-language/) language and the full documentation for checks and customizing them is available [here](https://aquasecurity.github.io/trivy/latest/docs/scanner/misconfiguration/custom/).
|
||||
Trivy can scan configuration files for common security issues (a.k.a IaC misconfiguration scanning). In addition to a comprehensive built in database of checks, you can add your own custom checks. Checks are written in [Rego](https://www.openpolicyagent.org/docs/latest/policy-language/) language and the full documentation for checks and customizing them is available [here](https://trivy.dev/latest/docs/scanner/misconfiguration/custom/).
|
||||
|
||||
This tutorial will walk you through writing a custom check in Rego that checks for an issue in a Dockerfile.
|
||||
|
||||
@@ -38,7 +38,7 @@ Next, we need to specify metadata about the check. This is information that help
|
||||
|
||||
Important: The `METADATA` has to be defined on top of the file.
|
||||
|
||||
More information on the different fields in the metadata can be found in the [Trivy documentation.](https://aquasecurity.github.io/trivy/latest/docs/scanner/misconfiguration/custom/)
|
||||
More information on the different fields in the metadata can be found in the [Trivy documentation.](https://trivy.dev/latest/docs/scanner/misconfiguration/custom/)
|
||||
|
||||
## Package and imports
|
||||
|
||||
@@ -48,7 +48,7 @@ package custom.dockerfile.ID001
|
||||
import future.keywords.in
|
||||
```
|
||||
|
||||
Every rego check has a package name. In our case, we will call it `custom.dockerfile.ID001` to avoid confusion between custom checks and built-in checks. The group name `dockerfile` has no effect on the package name. Note that each package has to contain only one check. However, we can pass multiple checks into our Trivy scan.
|
||||
Every Rego check has a package name. In our case, we will call it `custom.dockerfile.ID001` to avoid confusion between custom checks and built-in checks. The group name `dockerfile` has no effect on the package name. Note that each package has to contain only one check. However, we can pass multiple checks into our Trivy scan.
|
||||
The first keyword of the package, in this case `custom`, will be reused in the `trivy` command as the `--namespace`.
|
||||
|
||||
## Allowed data
|
||||
@@ -86,7 +86,7 @@ Let's look at the check line by line:
|
||||
Note that Rego
|
||||
|
||||
* uses `AND` automatically to combine conditions in this check
|
||||
* automatically iterates through the array of commands in the Dockefile and allowed images
|
||||
* automatically iterates through the array of commands in the Dockerfile and allowed images
|
||||
|
||||
## Run the check in a Trivy misconfiguration scan
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ We have been consolidating all of our scanning-related efforts in one place, and
|
||||
|
||||
## Trivy Config Command
|
||||
|
||||
Terraform configuration scanning is available as part of the `trivy config` command. This command scans all configuration files for misconfiguration issues. You can find the details within [misconfiguration scans in the Trivy documentation.](https://aquasecurity.github.io/trivy/latest/docs/scanner/misconfiguration/)
|
||||
Terraform configuration scanning is available as part of the `trivy config` command. This command scans all configuration files for misconfiguration issues. You can find the details within [misconfiguration scans in the Trivy documentation.](https://trivy.dev/latest/docs/scanner/misconfiguration/)
|
||||
|
||||
Command structure:
|
||||
```
|
||||
@@ -23,7 +23,7 @@ The `trivy config` command can scan Terraform configuration, CloudFormation, Doc
|
||||
- If the configuration that has been defined does not follow best practices, the check will fail.
|
||||
|
||||
### Prerequisites
|
||||
Install Trivy on your local machines. The documentation provides several [different installation options.](https://aquasecurity.github.io/trivy/latest/getting-started/installation/)
|
||||
Install Trivy on your local machines. The documentation provides several [different installation options.](https://trivy.dev/latest/getting-started/installation/)
|
||||
This tutorial will use this example [Terraform tutorial](https://github.com/Cloud-Native-Security/trivy-demo/tree/main/bad_iac/terraform) for terraform misconfiguration scanning with Trivy.
|
||||
|
||||
Git clone the tutorial and cd into the directory:
|
||||
@@ -31,7 +31,7 @@ Git clone the tutorial and cd into the directory:
|
||||
git clone git@github.com:Cloud-Native-Security/trivy-demo.git
|
||||
cd bad_iac/terraform
|
||||
```
|
||||
In this case, the folder only containes Terraform configuration files. However, you could scan a directory that contains several different configurations e.g. Kubernetes YAML manifests, Dockerfile, and Terraform. Trivy will then detect the different configuration files and apply the right rules automatically.
|
||||
In this case, the folder only contains Terraform configuration files. However, you could scan a directory that contains several different configurations e.g. Kubernetes YAML manifests, Dockerfile, and Terraform. Trivy will then detect the different configuration files and apply the right rules automatically.
|
||||
|
||||
## Different types of `trivy config` scans
|
||||
|
||||
@@ -83,14 +83,14 @@ trivy config --severity CRITICAL, MEDIUM terraform-infra
|
||||
|
||||
### Passing tf.tfvars files into `trivy config` scans
|
||||
|
||||
You can pass terraform values to Trivy to override default values found in the Terraform HCL code. More information are provided [in the documentation.](https://aquasecurity.github.io/trivy/latest/docs/coverage/iac/terraform/#value-overrides)
|
||||
You can pass terraform values to Trivy to override default values found in the Terraform HCL code. More information are provided [in the documentation.](https://trivy.dev/latest/docs/coverage/iac/terraform/#value-overrides)
|
||||
|
||||
```
|
||||
trivy config --tf-vars terraform.tfvars ./
|
||||
```
|
||||
### Custom Checks
|
||||
|
||||
We have lots of examples in the [documentation](https://aquasecurity.github.io/trivy/latest/docs/scanner/misconfiguration/custom/) on how you can write and pass custom Rego checks into terraform misconfiguration scans.
|
||||
We have lots of examples in the [documentation](https://trivy.dev/latest/docs/scanner/misconfiguration/custom/) on how you can write and pass custom Rego checks into terraform misconfiguration scans.
|
||||
|
||||
## Secret and vulnerability scans
|
||||
|
||||
@@ -100,15 +100,15 @@ The `trivy config` command does not perform secrete and vulnerability checks out
|
||||
trivy fs --scanners secret,misconfig ./
|
||||
```
|
||||
|
||||
The `trivy config` command is a sub-command of the `trivy fs` command. You can learn more about this command in the [documentation.](https://aquasecurity.github.io/trivy/latest/docs/target/filesystem/)
|
||||
The `trivy config` command is a sub-command of the `trivy fs` command. You can learn more about this command in the [documentation.](https://trivy.dev/latest/docs/target/filesystem/)
|
||||
|
||||
## Scanning Terraform Plan files
|
||||
|
||||
Instead of scanning your different Terraform resources individually, you could also scan your Terraform Plan file before it is deployed for misconfiguration. This will give you insights into any misconfiguration of your resources as they would become deployed. [Here](https://aquasecurity.github.io/trivy/latest/docs/coverage/iac/terraform/#terraform) is the link to the documentation.
|
||||
Instead of scanning your different Terraform resources individually, you could also scan your Terraform Plan file before it is deployed for misconfiguration. This will give you insights into any misconfiguration of your resources as they would become deployed. [Here](https://trivy.dev/latest/docs/coverage/iac/terraform/#terraform) is the link to the documentation.
|
||||
|
||||
Note that you need to be able to create a terraform init and plan without any errors.
|
||||
|
||||
## Using Trivy in your CI/CD pipeline
|
||||
Similar to tfsec, Trivy can be used either on local developer machines or integrated into your CI/CD pipeline. There are several steps available for different pipelines, including GitHub Actions, Circle CI, GitLab, Travis and more in the tutorials section of the documentation: [https://aquasecurity.github.io/trivy/latest/tutorials/integrations/](https://aquasecurity.github.io/trivy/latest/tutorials/integrations/)
|
||||
Similar to tfsec, Trivy can be used either on local developer machines or integrated into your CI/CD pipeline. There are several steps available for different pipelines, including GitHub Actions, Circle CI, GitLab, Travis and more in the tutorials section of the documentation: [https://trivy.dev/latest/tutorials/integrations/](https://trivy.dev/latest/tutorials/integrations/)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ This module provides a more in-depth investigation of Spring4Shell detection.
|
||||
## Set up
|
||||
|
||||
```
|
||||
$ tinygo build -o spring4shell.wasm -scheduler=none -target=wasi --no-debug spring4shell.go
|
||||
$ GOOS=wasip1 GOARCH=wasm go build -o spring4shell.wasm -buildmode=c-shared spring4shell.go
|
||||
$ mkdir -p ~/.trivy/modules
|
||||
$ cp spring4shell.wasm ~/.trivy/modules
|
||||
```
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user