mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-06 04:41:18 -08:00
Compare commits
257 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27a3e55e8e | ||
|
|
d223732657 | ||
|
|
cbbd1ce1f0 | ||
|
|
24a0d92145 | ||
|
|
0c3e2f08b7 | ||
|
|
6c12f04286 | ||
|
|
c4134224a2 | ||
|
|
20ab7033b8 | ||
|
|
91841f59ba | ||
|
|
57ba05c766 | ||
|
|
fef3ed4358 | ||
|
|
ced54aced1 | ||
|
|
2798df916b | ||
|
|
af485b33fd | ||
|
|
008babfb8b | ||
|
|
00d9c4666f | ||
|
|
03b6787c44 | ||
|
|
e6d5889ed4 | ||
|
|
74dbd8a1fd | ||
|
|
393bfdc1ac | ||
|
|
76eb8a57b6 | ||
|
|
6c74ee11f0 | ||
|
|
6119878de1 | ||
|
|
a346587b8d | ||
|
|
7e613cc5f7 | ||
|
|
f05bc4be4f | ||
|
|
3be5e6b242 | ||
|
|
f6cd21c873 | ||
|
|
f7b975187d | ||
|
|
18d168769c | ||
|
|
eb60e9f3c0 | ||
|
|
5a92055e1c | ||
|
|
46afe65eed | ||
|
|
0bf2a11a2e | ||
|
|
23b5fece08 | ||
|
|
4f1d576e5a | ||
|
|
6ab2bdfa7c | ||
|
|
4217cffb5a | ||
|
|
1840584703 | ||
|
|
c5ae9f265f | ||
|
|
562723f0a7 | ||
|
|
3dd5b1e946 | ||
|
|
5c18475f37 | ||
|
|
0c08dde015 | ||
|
|
0ccbb4f7fd | ||
|
|
908a4914c7 | ||
|
|
5b4652d796 | ||
|
|
faf8d49c49 | ||
|
|
559c0f30b1 | ||
|
|
2baad46189 | ||
|
|
df2bff9f5e | ||
|
|
44656f2853 | ||
|
|
37af529947 | ||
|
|
eea3320d83 | ||
|
|
2e6662060e | ||
|
|
49680dc881 | ||
|
|
daae88287b | ||
|
|
81240cf080 | ||
|
|
bd0accd8a0 | ||
|
|
ecee79403e | ||
|
|
9ebc25d88b | ||
|
|
9a49a37737 | ||
|
|
ad1dc6327a | ||
|
|
7c68d4a7ec | ||
|
|
ed49609a73 | ||
|
|
19539722e0 | ||
|
|
c7516011b5 | ||
|
|
ccc6d7cb2c | ||
|
|
48cbf45534 | ||
|
|
a9c2c74c55 | ||
|
|
120ac68b5b | ||
|
|
41eaa78ae0 | ||
|
|
932f927555 | ||
|
|
db3133346a | ||
|
|
8c0b7d619c | ||
|
|
c61c664c30 | ||
|
|
a99944c1c2 | ||
|
|
9fc844ecfc | ||
|
|
c504f8be44 | ||
|
|
cdab67e7fa | ||
|
|
7acc5e8312 | ||
|
|
9628b1cbf3 | ||
|
|
4547e27666 | ||
|
|
0c8919e1e4 | ||
|
|
c04f234fa4 | ||
|
|
f811ed2d48 | ||
|
|
69ea5bf70e | ||
|
|
3715dcb3f4 | ||
|
|
07f7e9853b | ||
|
|
d4ca3cce21 | ||
|
|
49fdd584ba | ||
|
|
4401998ec1 | ||
|
|
9c211d005d | ||
|
|
422fa414e8 | ||
|
|
8e933860a3 | ||
|
|
9345a98ed1 | ||
|
|
5d8da70c62 | ||
|
|
1be9da7aae | ||
|
|
0e17d0befc | ||
|
|
d70fab2318 | ||
|
|
2fa264ac1e | ||
|
|
07ddf47905 | ||
|
|
9de360623a | ||
|
|
ef70d20766 | ||
|
|
ec5d8bec0d | ||
|
|
3114c87e60 | ||
|
|
6d79f55db9 | ||
|
|
9ace59106e | ||
|
|
d442176405 | ||
|
|
63cd41d20d | ||
|
|
cb16e23f14 | ||
|
|
a4e981b4ec | ||
|
|
6f03c79405 | ||
|
|
c74870500a | ||
|
|
4e1316c37f | ||
|
|
fc959fc57f | ||
|
|
f105279989 | ||
|
|
bc2b0ca6c3 | ||
|
|
9493c6f087 | ||
|
|
b0359de664 | ||
|
|
d3a34e409c | ||
|
|
798ef1b64a | ||
|
|
e8cf281471 | ||
|
|
f18b0db583 | ||
|
|
a79670156f | ||
|
|
b544e0dea7 | ||
|
|
067a0fcb9c | ||
|
|
e6d7705a51 | ||
|
|
c584dc1768 | ||
|
|
358d56b6b5 | ||
|
|
17f3ea9180 | ||
|
|
39ccbf7b58 | ||
|
|
6d3ae3bcf2 | ||
|
|
7d7a1ef54a | ||
|
|
fc7495017d | ||
|
|
b2a68bc06d | ||
|
|
e5c0c15b6e | ||
|
|
da37803d59 | ||
|
|
9744e6498d | ||
|
|
99eebc6703 | ||
|
|
d19c7d9f29 | ||
|
|
3c19761875 | ||
|
|
e1c2a8c804 | ||
|
|
8b8e0e83d1 | ||
|
|
f9efe44fd3 | ||
|
|
7271d682fb | ||
|
|
c3bc67c89a | ||
|
|
232ba823e1 | ||
|
|
11618c9408 | ||
|
|
07075696d1 | ||
|
|
fbe1c9eb1f | ||
|
|
20c2246a61 | ||
|
|
24a3e547d9 | ||
|
|
a7bd7bb65f | ||
|
|
4aa9ea0961 | ||
|
|
5d349d8147 | ||
|
|
a61531c1f7 | ||
|
|
78cc20937d | ||
|
|
93996041b2 | ||
|
|
3e2416d77c | ||
|
|
ce77bb46c3 | ||
|
|
c05caae43f | ||
|
|
aca11b95d0 | ||
|
|
4cecd17ea5 | ||
|
|
4bc8d29c15 | ||
|
|
88243a0ad6 | ||
|
|
3c7d988d71 | ||
|
|
fd0fd104f8 | ||
|
|
d0d543b881 | ||
|
|
b43a3e6237 | ||
|
|
aef7b148af | ||
|
|
5d76abadc9 | ||
|
|
fed446c515 | ||
|
|
df62927e58 | ||
|
|
1b9b9a84f7 | ||
|
|
3c16ca821b | ||
|
|
e5bee5cccd | ||
|
|
4b9f310b9c | ||
|
|
8e7fb7cc84 | ||
|
|
a9badeaba8 | ||
|
|
f8ebccc680 | ||
|
|
1c81948e03 | ||
|
|
497cc10d8e | ||
|
|
065f0afa54 | ||
|
|
e2603056dd | ||
|
|
0621402bf7 | ||
|
|
798fdbc013 | ||
|
|
34a89293d5 | ||
|
|
600819248d | ||
|
|
73734eab21 | ||
|
|
22463ababd | ||
|
|
790c8054ec | ||
|
|
86fec9c4a9 | ||
|
|
26bc91160b | ||
|
|
d699e8c101 | ||
|
|
1777878e83 | ||
|
|
9be08253a2 | ||
|
|
5d73b47dbc | ||
|
|
46e784c8a9 | ||
|
|
0f61a84712 | ||
|
|
8a1aa448a1 | ||
|
|
fbab9eea3a | ||
|
|
f84417bba0 | ||
|
|
85c681d443 | ||
|
|
46748ce6ea | ||
|
|
c6741bddff | ||
|
|
a21acc7e08 | ||
|
|
32a3a3311c | ||
|
|
cbb47dc7c4 | ||
|
|
e3d10d2512 | ||
|
|
e1770e046c | ||
|
|
337c0b70d5 | ||
|
|
5ccee14304 | ||
|
|
96db52c3f6 | ||
|
|
3e902a57a9 | ||
|
|
904f1cf24e | ||
|
|
7d48c5d5d4 | ||
|
|
dcc73e964a | ||
|
|
35c4262d0b | ||
|
|
0e01851e9e | ||
|
|
4d9b444499 | ||
|
|
c29197ab7d | ||
|
|
d7637adc6b | ||
|
|
ef39eeedf3 | ||
|
|
1ce8bb535a | ||
|
|
bc9513fc57 | ||
|
|
aecd2f0bf0 | ||
|
|
2cbf402b6a | ||
|
|
0099b20e31 | ||
|
|
a597a54fb6 | ||
|
|
b453fbec37 | ||
|
|
0e876d5aa0 | ||
|
|
a4f27d24a3 | ||
|
|
9e6411e9f5 | ||
|
|
ef6538a171 | ||
|
|
139f3e1e32 | ||
|
|
479cfdd40e | ||
|
|
9a279fa7bb | ||
|
|
d52b0b7bc0 | ||
|
|
9b531fa27b | ||
|
|
8ca1bfdd23 | ||
|
|
c20d466044 | ||
|
|
52cbe79759 | ||
|
|
4a5b915578 | ||
|
|
56cdc55f77 | ||
|
|
17d753676b | ||
|
|
2796abe1ed | ||
|
|
22a1573807 | ||
|
|
43586659a1 | ||
|
|
5081399659 | ||
|
|
e1a38128ab | ||
|
|
283eef6372 | ||
|
|
bbd7b98741 | ||
|
|
11c81bf2f6 | ||
|
|
2d8d63e61a | ||
|
|
a46839b1ce | ||
|
|
19715f5de8 |
19
.github/CODEOWNERS
vendored
19
.github/CODEOWNERS
vendored
@@ -1,24 +1,15 @@
|
||||
# Global
|
||||
* @knqyf263
|
||||
|
||||
# Docs
|
||||
/docs/** @knqyf263 @AnaisUrlichs @itaysk
|
||||
/mkdocs.yml @knqyf263 @AnaisUrlichs @itaysk
|
||||
/README.md @knqyf263 @AnaisUrlichs @itaysk
|
||||
# Misconfiguration scanning
|
||||
docs/docs/scanner/misconfiguration @knqyf263 @simar7
|
||||
docs/docs/target/aws.md @knqyf263 @simar7
|
||||
pkg/fanal/analyzer/config @knqyf263 @simar7
|
||||
pkg/cloud @knqyf263 @simar7
|
||||
|
||||
# Helm chart
|
||||
helm/trivy/ @chen-keinan
|
||||
|
||||
# Misconfiguration scanning
|
||||
examples/misconf/ @knqyf263
|
||||
docs/docs/misconfiguration @knqyf263
|
||||
docs/docs/cloud @knqyf263
|
||||
pkg/fanal/analyzer/config @knqyf263
|
||||
pkg/fanal/handler/misconf @knqyf263
|
||||
pkg/cloud @knqyf263
|
||||
pkg/flag/aws_flags.go @knqyf263
|
||||
pkg/flag/misconf_flags.go @knqyf263
|
||||
|
||||
# Kubernetes scanning
|
||||
pkg/k8s/ @josedonizetti @chen-keinan @knqyf263
|
||||
docs/docs/kubernetes/ @josedonizetti @chen-keinan @knqyf263
|
||||
|
||||
31
.github/DISCUSSION_TEMPLATE/adopters.yml
vendored
Normal file
31
.github/DISCUSSION_TEMPLATE/adopters.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
title: "<company name>"
|
||||
labels: ["adopters"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: info
|
||||
attributes:
|
||||
label: "[Optional] How do you use Trivy?"
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "[Optional] Which targets are you scanning with Trivy?"
|
||||
options:
|
||||
- label: "Container Image"
|
||||
- label: "Filesystem"
|
||||
- label: "Git Repository"
|
||||
- label: "Virtual Machine Image"
|
||||
- label: "Kubernetes"
|
||||
- label: "AWS"
|
||||
- label: "SBOM"
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "[Optional] What kind of issues are scanning with Trivy?"
|
||||
options:
|
||||
- label: "Software Bill of Materials (SBOM)"
|
||||
- label: "Known vulnerabilities (CVEs)"
|
||||
- label: "IaC issues and misconfigurations"
|
||||
- label: "Sensitive information and secrets"
|
||||
- label: "Software licenses"
|
||||
6
.github/DISCUSSION_TEMPLATE/bugs.yml
vendored
6
.github/DISCUSSION_TEMPLATE/bugs.yml
vendored
@@ -8,6 +8,8 @@ body:
|
||||
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.
|
||||
If you see any false positives or false negatives, please file a ticket [here](https://github.com/aquasecurity/trivy/discussions/new?category=false-detection).
|
||||
|
||||
**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/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
@@ -114,9 +116,9 @@ body:
|
||||
label: Checklist
|
||||
description: Have you tried the following?
|
||||
options:
|
||||
- label: Run `trivy --reset`
|
||||
- label: Run `trivy image --reset`
|
||||
- label: Read [the troubleshooting](https://aquasecurity.github.io/trivy/latest/docs/references/troubleshooting/)
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=adopters).
|
||||
@@ -6,6 +6,8 @@ body:
|
||||
Feel free to raise a bug report if something doesn't work as expected.
|
||||
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.
|
||||
|
||||
**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/).
|
||||
- type: input
|
||||
attributes:
|
||||
@@ -91,4 +93,4 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=adopters).
|
||||
4
.github/DISCUSSION_TEMPLATE/ideas.yml
vendored
4
.github/DISCUSSION_TEMPLATE/ideas.yml
vendored
@@ -7,6 +7,8 @@ body:
|
||||
Feel free to share your idea.
|
||||
Please ensure that you're not creating a duplicate ticket by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
|
||||
|
||||
**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/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
@@ -42,4 +44,4 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=adopters).
|
||||
|
||||
4
.github/DISCUSSION_TEMPLATE/q-a.yml
vendored
4
.github/DISCUSSION_TEMPLATE/q-a.yml
vendored
@@ -7,6 +7,8 @@ body:
|
||||
If you have any troubles/questions, feel free to ask.
|
||||
Please ensure that you're not asking a duplicate question by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
|
||||
|
||||
**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/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
@@ -79,4 +81,4 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=adopters.
|
||||
|
||||
53
.github/DISCUSSION_TEMPLATE/show-and-tell.yml
vendored
53
.github/DISCUSSION_TEMPLATE/show-and-tell.yml
vendored
@@ -1,53 +0,0 @@
|
||||
title: "<company name> "
|
||||
labels: ["adopters"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: links
|
||||
attributes:
|
||||
label: "Share Links"
|
||||
description: "If you would like to share a link to your project or company, please paste it below 🌐"
|
||||
value: |
|
||||
...
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: logo
|
||||
attributes:
|
||||
label: "Share Logo"
|
||||
description: "If you have a link to your logo, please provide it in the following text-box 🌐"
|
||||
value: |
|
||||
...
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Please select all the scan targets that you are using
|
||||
options:
|
||||
- label: Container Images
|
||||
- label: Filesystem
|
||||
- label: Git Repository
|
||||
- label: Virtual Machine Images
|
||||
- label: Kubernetes
|
||||
- label: AWS
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Which scanners are you using on those scan targets?
|
||||
options:
|
||||
- label: OS packages and software dependencies in use (SBOM)
|
||||
- label: Known vulnerabilities (CVEs)
|
||||
- label: IaC issues and misconfigurations
|
||||
- label: Sensitive information and secrets
|
||||
- label: Software licenses
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: info
|
||||
attributes:
|
||||
label: "Additional Information"
|
||||
description: "Please tell us more about your use case of Trivy -- anything that you would like to share 🎉"
|
||||
value: |
|
||||
...
|
||||
validations:
|
||||
required: false
|
||||
46
.github/workflows/auto-close-issue.yaml
vendored
Normal file
46
.github/workflows/auto-close-issue.yaml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Auto-close issues
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
close_issue:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Close issue if user does not have write or admin permissions
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
// Get the issue creator's username
|
||||
const issueCreator = context.payload.issue.user.login;
|
||||
|
||||
// Check the user's permissions for the repository
|
||||
const repoPermissions = await github.rest.repos.getCollaboratorPermissionLevel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
username: issueCreator
|
||||
});
|
||||
|
||||
const permission = repoPermissions.data.permission;
|
||||
|
||||
// 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/";
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.payload.issue.number,
|
||||
body: commentBody
|
||||
});
|
||||
|
||||
await github.rest.issues.update({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.payload.issue.number,
|
||||
state: 'closed',
|
||||
state_reason: 'not_planned'
|
||||
});
|
||||
|
||||
console.log(`Issue #${context.payload.issue.number} closed because ${issueCreator} does not have sufficient permissions.`);
|
||||
}
|
||||
30
.github/workflows/auto-update-labels.yaml
vendored
Normal file
30
.github/workflows/auto-update-labels.yaml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Auto-update labels
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'misc/triage/labels.yaml'
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Auto-update labels
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v4.1.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Install aqua tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
- name: update labels
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: mage label
|
||||
12
.github/workflows/bypass-cla.yaml
vendored
Normal file
12
.github/workflows/bypass-cla.yaml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# This workflow is used to bypass the required status checks in merge queue.
|
||||
# cf. https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks
|
||||
name: CLA
|
||||
on:
|
||||
merge_group:
|
||||
|
||||
jobs:
|
||||
cla:
|
||||
name: license/cla
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No test required"'
|
||||
31
.github/workflows/bypass-test.yaml
vendored
Normal file
31
.github/workflows/bypass-test.yaml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# This workflow is used to bypass the required status checks.
|
||||
# cf. https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks
|
||||
name: Test
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'LICENSE'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'LICENSE'
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- run: 'echo "No test required"'
|
||||
|
||||
integration:
|
||||
name: Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No test required"'
|
||||
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@v3.3.1
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: dist/
|
||||
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
||||
|
||||
31
.github/workflows/check-go-versions.yaml
vendored
Normal file
31
.github/workflows/check-go-versions.yaml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Check Go versions of dependencies
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'go.mod'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check-go-versions:
|
||||
name: Check Go versions of dependencies
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v4.1.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: stable
|
||||
|
||||
# This workflow is a workaround before the "old stable" version becomes Go 1.21.
|
||||
# To avoid updating dependencies that require Go 1.21, we use this workflow
|
||||
# Example of wrong update:
|
||||
# https://github.com/aquasecurity/trivy/discussions/5323#discussioncomment-7186321
|
||||
- name: Check that dependencies doesn't require Go 1.21
|
||||
run: |
|
||||
go mod tidy
|
||||
if grep -q "go 1.21" go.mod; then
|
||||
echo "One of new dependencies requires Go '1.21'. Use 'go get go@1.20' to fix this."
|
||||
exit 1
|
||||
fi
|
||||
2
.github/workflows/mkdocs-dev.yaml
vendored
2
.github/workflows/mkdocs-dev.yaml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
|
||||
2
.github/workflows/mkdocs-latest.yaml
vendored
2
.github/workflows/mkdocs-latest.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
|
||||
6
.github/workflows/publish-chart.yaml
vendored
6
.github/workflows/publish-chart.yaml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@v4.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Helm
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
id: lint
|
||||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76
|
||||
- name: Setup Kubernetes cluster (KIND)
|
||||
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00
|
||||
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140
|
||||
with:
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
image: ${{ env.KIND_IMAGE }}
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@v4.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install chart-releaser
|
||||
|
||||
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
@@ -19,12 +19,12 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Restore Trivy binaries from cache
|
||||
uses: actions/cache@v3.3.1
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: dist/
|
||||
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
sudo apt-get -y install rpm reprepro createrepo-c distro-info
|
||||
|
||||
- name: Checkout trivy-repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/trivy-repo
|
||||
path: trivy-repo
|
||||
|
||||
29
.github/workflows/reusable-release.yaml
vendored
29
.github/workflows/reusable-release.yaml
vendored
@@ -26,41 +26,50 @@ jobs:
|
||||
packages: write # For GHCR
|
||||
contents: read # Not required for public repositories, but for clarity
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v8
|
||||
with:
|
||||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
remove-android: 'true'
|
||||
remove-docker-images: 'true'
|
||||
remove-dotnet: 'true'
|
||||
remove-haskell: 'true'
|
||||
|
||||
- name: Cosign install
|
||||
uses: sigstore/cosign-installer@204a51a57a74d190b284a0ce69b44bc37201f343
|
||||
uses: sigstore/cosign-installer@4a861528be5e691840a69536975ada1d4c30349d
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Show available Docker Buildx platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: Login to docker.io registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to ghcr.io registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ env.GH_USER }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to ECR
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: public.ecr.aws
|
||||
username: ${{ secrets.ECR_ACCESS_KEY_ID }}
|
||||
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -70,7 +79,7 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Generate SBOM
|
||||
uses: CycloneDX/gh-gomod-generate-sbom@v1
|
||||
uses: CycloneDX/gh-gomod-generate-sbom@v2
|
||||
with:
|
||||
args: mod -licenses -json -output bom.json
|
||||
version: ^v1
|
||||
@@ -84,7 +93,7 @@ jobs:
|
||||
- name: GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v4
|
||||
with:
|
||||
version: v1.16.2
|
||||
version: v1.20.0
|
||||
args: release -f=${{ inputs.goreleaser_config}} ${{ inputs.goreleaser_options}}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
|
||||
@@ -112,7 +121,7 @@ jobs:
|
||||
public.ecr.aws/aquasecurity/trivy:canary
|
||||
|
||||
- name: Cache Trivy binaries
|
||||
uses: actions/cache@v3.3.1
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: dist/
|
||||
# use 'github.sha' to create a unique cache folder for each run.
|
||||
|
||||
2
.github/workflows/scan.yaml
vendored
2
.github/workflows/scan.yaml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
|
||||
- name: Run Trivy vulnerability scanner and create GitHub issues
|
||||
uses: knqyf263/trivy-issue-action@v0.0.5
|
||||
|
||||
3
.github/workflows/semantic-pr.yaml
vendored
3
.github/workflows/semantic-pr.yaml
vendored
@@ -73,6 +73,8 @@ jobs:
|
||||
c\+\+
|
||||
elixir
|
||||
dart
|
||||
swift
|
||||
bitnami
|
||||
|
||||
os
|
||||
lang
|
||||
@@ -93,6 +95,7 @@ jobs:
|
||||
cyclonedx
|
||||
spdx
|
||||
purl
|
||||
vex
|
||||
|
||||
helm
|
||||
report
|
||||
|
||||
7
.github/workflows/stale-issues.yaml
vendored
7
.github/workflows/stale-issues.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: "Stale issues"
|
||||
name: "Stale PR's"
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
@@ -10,11 +10,10 @@ jobs:
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue is stale because it has been labeled with inactivity.'
|
||||
stale-pr-message: 'This PR is stale because it has been labeled with inactivity.'
|
||||
exempt-issue-labels: 'lifecycle/frozen,lifecycle/active,priority/critical-urgent,priority/important-soon,priority/important-longterm,priority/backlog,priority/awaiting-more-evidence'
|
||||
exempt-pr-labels: 'lifecycle/active'
|
||||
stale-pr-label: 'lifecycle/stale'
|
||||
stale-issue-label: 'lifecycle/stale'
|
||||
days-before-stale: 60
|
||||
days-before-issue-stale: '-1'
|
||||
days-before-close: 20
|
||||
days-before-issue-close: '-1'
|
||||
|
||||
2
.github/workflows/test-docs.yaml
vendored
2
.github/workflows/test-docs.yaml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
|
||||
109
.github/workflows/test.yaml
vendored
109
.github/workflows/test.yaml
vendored
@@ -1,19 +1,12 @@
|
||||
name: Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'LICENSE'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'LICENSE'
|
||||
merge_group:
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
@@ -22,7 +15,7 @@ jobs:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4.1.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -39,15 +32,22 @@ jobs:
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v3.4.0
|
||||
id: lint
|
||||
uses: golangci/golangci-lint-action@v3.7.0
|
||||
with:
|
||||
version: v1.52
|
||||
args: --deadline=30m
|
||||
version: v1.54
|
||||
args: --deadline=30m --out-format=line-number
|
||||
skip-cache: true # https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052197778
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Check if linter failed
|
||||
run: |
|
||||
echo "Linter failed, running 'mage lint:fix' might help to correct some errors"
|
||||
exit 1
|
||||
if: ${{ failure() && steps.lint.conclusion == 'failure' }}
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.1
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
aqua_opts: ""
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.1
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
@@ -89,7 +89,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.1
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
@@ -109,7 +109,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -117,7 +117,7 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.1
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
@@ -126,34 +126,75 @@ jobs:
|
||||
run: |
|
||||
mage test:module
|
||||
|
||||
vm-test:
|
||||
name: VM Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v8
|
||||
with:
|
||||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
remove-android: 'true'
|
||||
remove-docker-images: 'true'
|
||||
remove-dotnet: 'true'
|
||||
remove-haskell: 'true'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Run vm integration tests
|
||||
run: |
|
||||
mage test:vm
|
||||
|
||||
build-test:
|
||||
name: Build Test
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
env:
|
||||
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Show available Docker Buildx platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v8
|
||||
with:
|
||||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
remove-android: 'true'
|
||||
remove-docker-images: 'true'
|
||||
remove-dotnet: 'true'
|
||||
remove-haskell: 'true'
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Determine GoReleaser ID
|
||||
id: goreleaser_id
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ matrix.operating-system }}" == "windows-latest" ]; then
|
||||
echo "id=--id build-windows" >> $GITHUB_OUTPUT
|
||||
elif [ "${{ matrix.operating-system }}" == "macos-latest" ]; then
|
||||
echo "id=--id build-macos --id build-bsd" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "id=--id build-linux" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v4
|
||||
with:
|
||||
version: v1.16.2
|
||||
args: release --skip-sign --snapshot --clean --skip-publish --timeout 90m
|
||||
env:
|
||||
GPG_FILE: "nogpg.key"
|
||||
version: v1.20.0
|
||||
args: build --snapshot --clean --timeout 90m ${{ steps.goreleaser_id.outputs.id }}
|
||||
|
||||
36
.github/workflows/vm-test.yaml
vendored
36
.github/workflows/vm-test.yaml
vendored
@@ -1,36 +0,0 @@
|
||||
name: VM Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'pkg/fanal/vm/**'
|
||||
- 'pkg/fanal/walker/vm.go'
|
||||
- 'pkg/fanal/artifact/vm/**'
|
||||
- 'integration/vm_test.go'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'pkg/fanal/vm/**'
|
||||
- 'pkg/fanal/walker/vm.go'
|
||||
- 'pkg/fanal/artifact/vm/**'
|
||||
- 'integration/vm_test.go'
|
||||
|
||||
jobs:
|
||||
vm-test:
|
||||
name: VM Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.1
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Run vm integration tests
|
||||
run: |
|
||||
mage test:vm
|
||||
@@ -17,14 +17,54 @@ linters-settings:
|
||||
min-occurrences: 3
|
||||
misspell:
|
||||
locale: US
|
||||
goimports:
|
||||
local-prefixes: github.com/aquasecurity
|
||||
ignore-words:
|
||||
- licence
|
||||
gosec:
|
||||
excludes:
|
||||
- G101
|
||||
- G114
|
||||
- G204
|
||||
- G402
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/aquasecurity/)
|
||||
- blank
|
||||
- dot
|
||||
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"
|
||||
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'
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
@@ -39,14 +79,18 @@ linters:
|
||||
- goconst
|
||||
- gocyclo
|
||||
- gofmt
|
||||
- goimports
|
||||
- misspell
|
||||
- bodyclose
|
||||
- gci
|
||||
- gomodguard
|
||||
- tenv
|
||||
- gocritic
|
||||
|
||||
run:
|
||||
go: 1.19
|
||||
go: '1.20'
|
||||
skip-files:
|
||||
- ".*._mock.go$"
|
||||
- ".*._test.go$"
|
||||
- ".*_mock.go$"
|
||||
- ".*_test.go$"
|
||||
- "integration/*"
|
||||
- "examples/*"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.18.0
|
||||
FROM alpine:3.18.4
|
||||
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.18.0
|
||||
FROM alpine:3.18.4
|
||||
RUN apk --no-cache add ca-certificates git
|
||||
|
||||
# binaries were created with GoReleaser
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
FROM golang:1.19
|
||||
FROM --platform=linux/amd64 golang:1.20
|
||||
|
||||
# Install protoc (cf. http://google.github.io/proto-lens/installing-protoc.html)
|
||||
# Set environment variable for protoc
|
||||
ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip
|
||||
RUN apt-get update && apt-get install -y unzip
|
||||
|
||||
# Install unzip for protoc installation and clean up cache
|
||||
RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Download and install protoc
|
||||
RUN curl --retry 5 -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/$PROTOC_ZIP \
|
||||
&& unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
|
||||
&& unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \
|
||||
&& unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \
|
||||
&& rm -f $PROTOC_ZIP
|
||||
|
||||
# Install Go tools
|
||||
RUN go install github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0
|
||||
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
|
||||
RUN go install github.com/magefile/mage@v1.14.0
|
||||
|
||||
10
README.md
10
README.md
@@ -31,6 +31,8 @@ Scanners (what Trivy can find there):
|
||||
- Sensitive information and secrets
|
||||
- Software licenses
|
||||
|
||||
Trivy supports most popular programming languages, operating systems, and platforms. For a complete list, see the [Scanning Coverage] page.
|
||||
|
||||
To learn more, go to the [Trivy homepage][homepage] for feature highlights, or to the [Documentation site][docs] for detailed information.
|
||||
|
||||
## Quick Start
|
||||
@@ -103,6 +105,13 @@ trivy k8s --report summary cluster
|
||||
|
||||
`tri` is pronounced like **tri**gger, `vy` is pronounced like en**vy**.
|
||||
|
||||
## 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).
|
||||
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>
|
||||
|
||||
## Community
|
||||
|
||||
Trivy is an [Aqua Security][aquasec] open source project.
|
||||
@@ -130,6 +139,7 @@ Please ensure to abide by our [Code of Conduct][code-of-conduct] during all inte
|
||||
|
||||
[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/
|
||||
|
||||
[alpine]: https://ariadne.space/2021/06/08/the-vulnerability-remediation-lifecycle-of-alpine-containers/
|
||||
[rego]: https://www.openpolicyagent.org/docs/latest/#rego
|
||||
|
||||
10
SECURITY.md
Normal file
10
SECURITY.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
This is an open source project that is provided as-is without warrenty or liability.
|
||||
As such no supportability commitment. The maintainers will do the best they can to address any report promptly and responsibly.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please use the "Private vulnerability reporting" feature in the GitHub repository (under the "Security" tab).
|
||||
@@ -5,6 +5,6 @@ registries:
|
||||
- type: standard
|
||||
ref: v3.157.0 # renovate: depName=aquaproj/aqua-registry
|
||||
packages:
|
||||
- name: tinygo-org/tinygo@v0.27.0
|
||||
- name: tinygo-org/tinygo@v0.29.0
|
||||
- name: WebAssembly/binaryen@version_112
|
||||
- name: magefile/mage@v1.14.0
|
||||
|
||||
@@ -14,8 +14,8 @@ done
|
||||
|
||||
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
echo "Adding deb package to $release"
|
||||
reprepro includedeb $release ../../dist/*Linux-64bit.deb
|
||||
reprepro includedeb $release ../../dist/*Linux-32bit.deb
|
||||
reprepro includedeb $release ../../dist/*Linux-64bit.deb
|
||||
reprepro includedeb $release ../../dist/*Linux-ARM64.deb
|
||||
done
|
||||
|
||||
|
||||
@@ -13,10 +13,6 @@ import (
|
||||
_ "modernc.org/sqlite" // sqlite driver for RPM DB and Java DB
|
||||
)
|
||||
|
||||
var (
|
||||
version = "dev"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := run(); err != nil {
|
||||
log.Fatal(err)
|
||||
@@ -35,7 +31,7 @@ func run() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
app := commands.NewApp(version)
|
||||
app := commands.NewApp()
|
||||
if err := app.Execute(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
"Severity": {
|
||||
"Label": "{{ $severity }}"
|
||||
},
|
||||
"Title": "Trivy found a misconfiguration in {{ $target }}: {{ .Title }}",
|
||||
"Title": "Trivy found a misconfiguration in {{ $target }}: {{ escapeString .Title }}",
|
||||
"Description": {{ escapeString $description | printf "%q" }},
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<h1>{{- escapeXML ( index . 0 ).Target }} - Trivy Report - {{ now }}</h1>
|
||||
<table>
|
||||
{{- range . }}
|
||||
<tr class="group-header"><th colspan="6">{{ escapeXML .Type }}</th></tr>
|
||||
<tr class="group-header"><th colspan="6">{{ .Type | toString | escapeXML }}</th></tr>
|
||||
{{- if (eq (len .Vulnerabilities) 0) }}
|
||||
<tr><th colspan="6">No Vulnerabilities found</th></tr>
|
||||
{{- else }}
|
||||
@@ -128,7 +128,7 @@
|
||||
<td>{{ escapeXML .ID }}</td>
|
||||
<td class="misconf-check">{{ escapeXML .Title }}</td>
|
||||
<td class="severity">{{ escapeXML .Severity }}</td>
|
||||
<td class="link" data-more-links="off" style="white-space:normal;"">
|
||||
<td class="link" data-more-links="off" style="white-space:normal;">
|
||||
{{ escapeXML .Message }}
|
||||
<br>
|
||||
<a href={{ escapeXML .PrimaryURL | printf "%q" }}>{{ escapeXML .PrimaryURL }}</a>
|
||||
|
||||
@@ -75,6 +75,7 @@ get_binaries() {
|
||||
linux/ppc64le) BINARIES="trivy" ;;
|
||||
linux/arm64) BINARIES="trivy" ;;
|
||||
linux/armv7) BINARIES="trivy" ;;
|
||||
linux/s390x) BINARIES="trivy" ;;
|
||||
openbsd/386) BINARIES="trivy" ;;
|
||||
openbsd/amd64) BINARIES="trivy" ;;
|
||||
openbsd/arm64) BINARIES="trivy" ;;
|
||||
@@ -115,7 +116,8 @@ adjust_os() {
|
||||
amd64) OS=64bit ;;
|
||||
arm) OS=ARM ;;
|
||||
arm64) OS=ARM64 ;;
|
||||
ppc64le) OS=PPC64LE ;;
|
||||
ppc64le) OS=Linux ;;
|
||||
s390x) OS=Linux ;;
|
||||
darwin) OS=macOS ;;
|
||||
dragonfly) OS=DragonFlyBSD ;;
|
||||
freebsd) OS=FreeBSD ;;
|
||||
@@ -133,7 +135,8 @@ adjust_arch() {
|
||||
arm) ARCH=ARM ;;
|
||||
armv7) ARCH=ARM ;;
|
||||
arm64) ARCH=ARM64 ;;
|
||||
ppc64le) OS=PPC64LE ;;
|
||||
ppc64le) ARCH=PPC64LE ;;
|
||||
s390x) ARCH=s390x ;;
|
||||
darwin) ARCH=macOS ;;
|
||||
dragonfly) ARCH=DragonFlyBSD ;;
|
||||
freebsd) ARCH=FreeBSD ;;
|
||||
@@ -222,6 +225,7 @@ uname_arch() {
|
||||
armv5*) arch="armv5" ;;
|
||||
armv6*) arch="armv6" ;;
|
||||
armv7*) arch="armv7" ;;
|
||||
s390*) arch="s390x" ;;
|
||||
esac
|
||||
echo ${arch}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Issues
|
||||
Thank you for taking interest in contributing to Trivy!
|
||||
|
||||
Trivy uses [GitHub Discussion](./discussion.md) for bug reports, feature requests, and questions.
|
||||
Trivy uses [GitHub Discussion](./discussion.md) for bug reports, feature requests, and questions.
|
||||
|
||||
!!! warning
|
||||
Issues created by non-maintainers will be immediately closed.
|
||||
@@ -27,7 +27,7 @@ $ ./trivy -h
|
||||
You must pass the linter checks:
|
||||
|
||||
```shell
|
||||
$ mage lint
|
||||
$ mage lint:run
|
||||
```
|
||||
|
||||
Additionally, you need to have run `go mod tidy`, so execute the following command as well:
|
||||
@@ -36,6 +36,11 @@ Additionally, you need to have run `go mod tidy`, so execute the following comma
|
||||
$ mage tidy
|
||||
```
|
||||
|
||||
To autofix linters use the following command:
|
||||
```shell
|
||||
$ mage lint:fix
|
||||
```
|
||||
|
||||
### Unit tests
|
||||
Your PR must pass all the unit tests. You can test it as below.
|
||||
|
||||
|
||||
@@ -139,4 +139,4 @@ $ trivy conf --skip-policy-update /path/to/conf
|
||||
[allowlist]: ../references/troubleshooting.md
|
||||
[oras]: https://oras.land/cli/
|
||||
|
||||
[^1]: This is only required to scan `jar` files. More information about `Java index db` [here](../scanner/vulnerability/language/java.md)
|
||||
[^1]: This is only required to scan `jar` files. More information about `Java index db` [here](../coverage/language/java.md)
|
||||
|
||||
@@ -12,16 +12,16 @@ export SP_DATA=$(az ad sp create-for-rbac --name TrivyTest --role AcrPull --scop
|
||||
# Usage
|
||||
```bash
|
||||
# must set TRIVY_USERNAME empty char
|
||||
export AZURE_CLIENT_ID$(echo $SP_DATA | jq -r .appId)
|
||||
export AZURE_CLIENT_SECRET$(echo $SP_DATA | jq -r .password)
|
||||
export AZURE_TENANT_ID$(echo $SP_DATA | jq -r .tenant)
|
||||
export AZURE_CLIENT_ID=$(echo $SP_DATA | jq -r '.appId')
|
||||
export AZURE_CLIENT_SECRET=$(echo $SP_DATA | jq -r '.password')
|
||||
export AZURE_TENANT_ID=$(echo $SP_DATA | jq -r '.tenant')
|
||||
```
|
||||
|
||||
# Testing
|
||||
You can test credentials in the following manner.
|
||||
|
||||
```bash
|
||||
docker run -it --rm -v /tmp:/tmp\
|
||||
-e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \
|
||||
-e AZURE_TENANT_ID=${AZURE_TENANT_ID} aquasec/trivy image your_special_project.azurecr.io/your_special_image:your_special_tag
|
||||
docker run -it --rm -v /tmp:/tmp \
|
||||
-e AZURE_CLIENT_ID -e AZURE_CLIENT_SECRET -e AZURE_TENANT_ID \
|
||||
aquasec/trivy image your_special_project.azurecr.io/your_special_image:your_special_tag
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
| License | |
|
||||
|
||||
The vulnerability database and the Java index database are needed only for vulnerability scanning.
|
||||
See [here](../scanner/vulnerability/index.md) for the detail.
|
||||
See [here](../scanner/vulnerability.md) for the detail.
|
||||
|
||||
## Vulnerability Database
|
||||
|
||||
@@ -64,6 +64,9 @@ Downloading the Java index DB from an external OCI registry can be done by using
|
||||
$ trivy image --java-db-repository registry.gitlab.com/gitlab-org/security-products/dependencies/trivy-java-db --download-java-db-only
|
||||
```
|
||||
|
||||
!!! Note
|
||||
In [Client/Server](../references/modes/client-server.md) mode, `Java index DB` is currently only used on the `client` side.
|
||||
|
||||
## Remove DBs
|
||||
The `--reset` flag removes all caches and databases.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Trivy provides various methods for filtering the results.
|
||||
|
||||
|
||||
## Hide Unfixed Vulnerabilities
|
||||
## By Status
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
@@ -11,53 +11,70 @@ Trivy provides various methods for filtering the results.
|
||||
| Secret | |
|
||||
| License | |
|
||||
|
||||
By default, `Trivy` also detects unpatched/unfixed vulnerabilities.
|
||||
This means you can't fix these vulnerabilities even if you update all packages.
|
||||
If you would like to ignore them, use the `--ignore-unfixed` option.
|
||||
Trivy supports the following vulnerability statuses:
|
||||
|
||||
- `unknown`
|
||||
- `not_affected`: this package is not affected by this vulnerability on this platform
|
||||
- `affected`: this package is affected by this vulnerability on this platform, but there is no patch released yet
|
||||
- `fixed`: this vulnerability is fixed on this platform
|
||||
- `under_investigation`: it is currently unknown whether or not this vulnerability affects this package on this platform, and it is under investigation
|
||||
- `will_not_fix`: this package is affected by this vulnerability on this platform, but there is currently no intention to fix it (this would primarily be for flaws that are of Low or Moderate impact that pose no significant risk to customers)
|
||||
- `fix_deferred`: this package is affected by this vulnerability on this platform, and may be fixed in the future
|
||||
- `end_of_life`: this package has been identified to contain the impacted component, but analysis to determine whether it is affected or not by this vulnerability was not performed
|
||||
|
||||
Note that vulnerabilities with the `unknown`, `not_affected` or `under_investigation` status are not detected.
|
||||
These are only defined for comprehensiveness, and you will not have the opportunity to specify these statuses.
|
||||
|
||||
Some statuses are supported in limited distributions.
|
||||
|
||||
| OS | Fixed | Affected | Under Investigation | Will Not Fix | Fix Deferred | End of Life |
|
||||
|:----------:|:-----:|:--------:|:-------------------:|:------------:|:------------:|:-----------:|
|
||||
| Debian | ✓ | ✓ | | | ✓ | ✓ |
|
||||
| RHEL | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| Other OSes | ✓ | ✓ | | | | |
|
||||
|
||||
|
||||
To ignore vulnerabilities with specific statuses, use the `--ignore-status <list_of_statuses>` option.
|
||||
|
||||
|
||||
```bash
|
||||
$ trivy image --ignore-unfixed ruby:2.4.0
|
||||
$ trivy image --ignore-status affected,fixed ruby:2.4.0
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```
|
||||
2019-05-16T12:49:52.656+0900 INFO Updating vulnerability database...
|
||||
2019-05-16T12:50:14.786+0900 INFO Detecting Debian vulnerabilities...
|
||||
|
||||
ruby:2.4.0 (debian 8.7)
|
||||
=======================
|
||||
Total: 4730 (UNKNOWN: 1, LOW: 145, MEDIUM: 3487, HIGH: 1014, CRITICAL: 83)
|
||||
Total: 527 (UNKNOWN: 0, LOW: 276, MEDIUM: 83, HIGH: 158, CRITICAL: 10)
|
||||
|
||||
+------------------------------+------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
|
||||
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
||||
+------------------------------+------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
|
||||
| apt | CVE-2019-3462 | CRITICAL | 1.0.9.8.3 | 1.0.9.8.5 | Incorrect sanitation of the |
|
||||
| | | | | | 302 redirect field in HTTP |
|
||||
| | | | | | transport method of... |
|
||||
+ +------------------+----------+ +----------------------------------+-----------------------------------------------------+
|
||||
| | CVE-2016-1252 | MEDIUM | | 1.0.9.8.4 | The apt package in Debian |
|
||||
| | | | | | jessie before 1.0.9.8.4, in |
|
||||
| | | | | | Debian unstable before... |
|
||||
+------------------------------+------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
|
||||
| bash | CVE-2019-9924 | HIGH | 4.3-11 | 4.3-11+deb8u2 | bash: BASH_CMD is writable in |
|
||||
| | | | | | restricted bash shells |
|
||||
+ +------------------+ + +----------------------------------+-----------------------------------------------------+
|
||||
| | CVE-2016-7543 | | | 4.3-11+deb8u1 | bash: Specially crafted |
|
||||
| | | | | | SHELLOPTS+PS4 variables allows |
|
||||
| | | | | | command substitution |
|
||||
+ +------------------+----------+ + +-----------------------------------------------------+
|
||||
| | CVE-2016-0634 | MEDIUM | | | bash: Arbitrary code execution |
|
||||
| | | | | | via malicious hostname |
|
||||
+ +------------------+----------+ +----------------------------------+-----------------------------------------------------+
|
||||
| | CVE-2016-9401 | LOW | | 4.3-11+deb8u2 | bash: popd controlled free |
|
||||
+------------------------------+------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
|
||||
┌─────────────────────────────┬──────────────────┬──────────┬──────────────┬────────────────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
|
||||
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
|
||||
├─────────────────────────────┼──────────────────┼──────────┼──────────────┼────────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
|
||||
│ binutils │ CVE-2014-9939 │ CRITICAL │ will_not_fix │ 2.25-5 │ │ binutils: buffer overflow in ihex.c │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2014-9939 │
|
||||
│ ├──────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
|
||||
│ │ CVE-2017-6969 │ │ │ │ │ binutils: Heap-based buffer over-read in readelf when │
|
||||
│ │ │ │ │ │ │ processing corrupt RL78 binaries │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2017-6969 │
|
||||
│ ├──────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
|
||||
...
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
!!! tip
|
||||
To skip all unfixed vulnerabilities, you can use the `--ignore-unfixed` flag .
|
||||
It is a shorthand of `--ignore-status affected,will_not_fix,fix_deferred,end_of_life`.
|
||||
It displays "fixed" vulnerabilities only.
|
||||
|
||||
```bash
|
||||
$ trivy image --ignore-unfixed ruby:2.4.0
|
||||
```
|
||||
|
||||
## By Severity
|
||||
|
||||
| Scanner | Supported |
|
||||
@@ -187,6 +204,10 @@ See https://avd.aquasec.com/misconfig/avd-aws-0081
|
||||
|
||||
## By Finding IDs
|
||||
|
||||
Trivy supports the [.trivyignore](#trivyignore) and [.trivyignore.yaml](#trivyignoreyaml) ignore files.
|
||||
|
||||
### .trivyignore
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
@@ -194,7 +215,6 @@ See https://avd.aquasec.com/misconfig/avd-aws-0081
|
||||
| Secret | ✓ |
|
||||
| License | |
|
||||
|
||||
Use `.trivyignore`.
|
||||
|
||||
```bash
|
||||
$ cat .trivyignore
|
||||
@@ -234,6 +254,92 @@ Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
|
||||
|
||||
</details>
|
||||
|
||||
### .trivyignore.yaml
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
When the extension of the specified ignore file is either `.yml` or `.yaml`, Trivy will load the file as YAML.
|
||||
For the `.trivyignore.yaml` file, you can set ignored IDs separately for `vulnerabilities`, `misconfigurations`, `secrets`, or `licenses`[^1].
|
||||
|
||||
Available fields:
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|------------|:--------:|---------------------|------------------------------------------------------------------------------------------------------------|
|
||||
| id | ✓ | string | The identifier of the vulnerability, misconfiguration, secret, or license[^1]. |
|
||||
| paths | | string array | The list of file paths to be ignored. If `paths` is not set, the ignore finding is applied to all files. |
|
||||
| expired_at | | date (`yyyy-mm-dd`) | The expiration date of the ignore finding. If `expired_at` is not set, the ignore finding is always valid. |
|
||||
| statement | | string | The reason for ignoring the finding. (This field is not used for filtering.) |
|
||||
|
||||
```bash
|
||||
$ cat .trivyignore.yaml
|
||||
vulnerabilities:
|
||||
- id: CVE-2022-40897
|
||||
paths:
|
||||
- "usr/local/lib/python3.9/site-packages/setuptools-58.1.0.dist-info/METADATA"
|
||||
statement: Accept the risk
|
||||
- id: CVE-2023-2650
|
||||
- id: CVE-2023-3446
|
||||
- id: CVE-2023-3817
|
||||
- id: CVE-2023-29491
|
||||
expired_at: 2023-09-01
|
||||
|
||||
misconfigurations:
|
||||
- id: AVD-DS-0001
|
||||
- id: AVD-DS-0002
|
||||
paths:
|
||||
- "docs/Dockerfile"
|
||||
statement: The image needs root privileges
|
||||
|
||||
secrets:
|
||||
- id: aws-access-key-id
|
||||
- id: aws-secret-access-key
|
||||
paths:
|
||||
- "foo/bar/aws.secret"
|
||||
|
||||
licenses:
|
||||
- id: GPL-3.0 # License name is used as ID
|
||||
paths:
|
||||
- "usr/share/gcc/python/libstdcxx/v6/__init__.py"
|
||||
```
|
||||
|
||||
Since this feature is experimental, you must explicitly specify the YAML file path using the `--ignorefile` flag.
|
||||
Once this functionality is stable, the YAML file will be loaded automatically.
|
||||
|
||||
```bash
|
||||
$ trivy image --ignorefile ./.trivyignore.yaml python:3.9.16-alpine3.16
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```bash
|
||||
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: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
|
||||
2023-08-31T11:10:29.170+0600 INFO Detecting python-pkg vulnerabilities...
|
||||
|
||||
python:3.9.16-alpine3.16 (alpine 3.16.5)
|
||||
========================================
|
||||
Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
|
||||
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
## By Vulnerability Target
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
@@ -408,3 +514,5 @@ resource "google_container_cluster" "one_off_test" {
|
||||
location = var.region
|
||||
}
|
||||
```
|
||||
|
||||
[^1]: license name is used as id for `.trivyignore.yaml` files
|
||||
|
||||
@@ -8,6 +8,7 @@ Trivy supports the following formats:
|
||||
- [SARIF](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning)
|
||||
- Template
|
||||
- SBOM
|
||||
- GitHub dependency snapshot
|
||||
|
||||
### Table (Default)
|
||||
|
||||
@@ -62,6 +63,8 @@ The following packages/languages are currently supported:
|
||||
- Modules: go.mod
|
||||
- PHP
|
||||
- Composer
|
||||
- Java
|
||||
- Maven: pom.xml
|
||||
|
||||
This tree is the reverse of the npm list command.
|
||||
However, if you want to resolve a vulnerability in a particular indirect dependency, the reversed tree is useful to know where that dependency comes from and identify which package you actually need to update.
|
||||
@@ -246,7 +249,7 @@ $ trivy image -f json -o results.json golang:1.12-alpine
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | ✓ |
|
||||
| License | |
|
||||
| License | ✓ |
|
||||
|
||||
[SARIF][sarif] can be generated with the `--format sarif` flag.
|
||||
|
||||
@@ -256,6 +259,20 @@ $ trivy image --format sarif -o report.sarif golang:1.12-alpine
|
||||
|
||||
This SARIF file can be uploaded to GitHub code scanning results, and there is a [Trivy GitHub Action][action] for automating this process.
|
||||
|
||||
### GitHub dependency snapshot
|
||||
Trivy supports the following packages.
|
||||
|
||||
- [OS packages][os_packages]
|
||||
- [Language-specific packages][language_packages]
|
||||
|
||||
[GitHub dependency snapshots][github-sbom] can be generated with the `--format github` flag.
|
||||
|
||||
```
|
||||
$ trivy image --format github -o report.gsbom alpine
|
||||
```
|
||||
|
||||
This snapshot file can be [submitted][github-sbom-submit] to your GitHub repository.
|
||||
|
||||
### Template
|
||||
|
||||
| Scanner | Supported |
|
||||
@@ -387,3 +404,8 @@ $ trivy convert --format table --severity CRITICAL result.json
|
||||
[asff]: ../../tutorials/integrations/aws-security-hub.md
|
||||
[sarif]: https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/managing-results-from-code-scanning
|
||||
[sprig]: http://masterminds.github.io/sprig/
|
||||
[github-sbom]: https://docs.github.com/en/rest/dependency-graph/dependency-submission?apiVersion=2022-11-28#about-dependency-submissions
|
||||
[github-sbom-submit]: https://docs.github.com/en/rest/dependency-graph/dependency-submission?apiVersion=2022-11-28#create-a-snapshot-of-dependencies-for-a-repository
|
||||
|
||||
[os_packages]: ../scanner/vulnerability.md#os-packages
|
||||
[language_packages]: ../scanner/vulnerability.md#language-specific-packages
|
||||
@@ -11,19 +11,34 @@ This section details ways to specify the files and directories that Trivy should
|
||||
| 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.
|
||||
You can skip files that you don't maintain using the `--skip-files` flag, or the equivalent Trivy YAML config option.
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
Using the Trivy YAML configuration:
|
||||
```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" .
|
||||
```
|
||||
|
||||
Will skip any file named `bar` in the subdirectories of testdata.
|
||||
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 |
|
||||
@@ -34,32 +49,48 @@ Will skip any file named `bar` in the subdirectories of testdata.
|
||||
| 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.
|
||||
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.
|
||||
|
||||
```bash
|
||||
$ trivy image --skip-dirs "./testdata/*" .
|
||||
```
|
||||
|
||||
Will skip all subdirectories of the testdata directory.
|
||||
This will skip all subdirectories of the testdata directory.
|
||||
|
||||
```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 the [globstar](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Pattern-Matching) pattern matching.
|
||||
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
|
||||
```
|
||||
|
||||
Will skip the file `foo` that happens to be nested under any parent(s).
|
||||
This will skip the file `foo` that happens to be nested under any parent(s).
|
||||
|
||||
## File patterns
|
||||
| Scanner | Supported |
|
||||
|
||||
33
docs/docs/coverage/iac/azure-arm.md
Normal file
33
docs/docs/coverage/iac/azure-arm.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Azure ARM Template
|
||||
Trivy supports the scanners listed in the table below.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :----------------: | :-------: |
|
||||
| [Misconfiguration] | ✓ |
|
||||
| [Secret] | ✓ |
|
||||
|
||||
It supports the following configurations:
|
||||
|
||||
| Format | Supported |
|
||||
| :----------: | :-------: |
|
||||
| ARM template | ✓ |
|
||||
| Bicep | ✓[^1] |
|
||||
|
||||
To scan Bicep codes, you need to convert them into ARM templates first.
|
||||
|
||||
```
|
||||
az bicep build -f main.bicep
|
||||
or
|
||||
bicep build main.bicep
|
||||
```
|
||||
|
||||
## Misconfiguration
|
||||
Trivy recursively searches directories and scans all found Azure ARM templates.
|
||||
|
||||
## Secret
|
||||
The secret scan is performed on plain text files, with no special treatment for Azure ARM templates.
|
||||
|
||||
[Misconfiguration]: ../../scanner/misconfiguration/index.md
|
||||
[Secret]: ../../scanner/secret.md
|
||||
|
||||
[^1]: Bicep is not natively supported. It needs to be converted into Azure ARM templates.
|
||||
24
docs/docs/coverage/iac/cloudformation.md
Normal file
24
docs/docs/coverage/iac/cloudformation.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# CloudFormation
|
||||
Trivy supports the scanners listed in the table below.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :----------------: | :-------: |
|
||||
| [Misconfiguration] | ✓ |
|
||||
| [Secret] | ✓ |
|
||||
|
||||
It supports the following formats.
|
||||
|
||||
| Format | Supported |
|
||||
| :----: | :-------: |
|
||||
| JSON | ✓ |
|
||||
| YAML | ✓ |
|
||||
|
||||
## Misconfiguration
|
||||
Trivy recursively searches directories and scans all found CloudFormation files.
|
||||
It evaluates properties, functions, and other elements within CloudFormation files to detect misconfigurations.
|
||||
|
||||
## Secret
|
||||
The secret scan is performed on plain text files, with no special treatment for CloudFormation.
|
||||
|
||||
[Misconfiguration]: ../../scanner/misconfiguration/index.md
|
||||
[Secret]: ../../scanner/secret.md
|
||||
24
docs/docs/coverage/iac/docker.md
Normal file
24
docs/docs/coverage/iac/docker.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Docker
|
||||
Trivy supports the scanners listed in the table below.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :----------------: | :-------: |
|
||||
| [Misconfiguration] | ✓ |
|
||||
| [Secret] | ✓ |
|
||||
|
||||
It supports the following configurations.
|
||||
|
||||
| Config | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| Dockerfile | ✓ |
|
||||
| Containerfile | ✓ |
|
||||
| Compose | - |
|
||||
|
||||
## Misconfiguration
|
||||
Trivy recursively searches directories and scans all found Docker files.
|
||||
|
||||
## Secret
|
||||
The secret scan is performed on plain text files, with no special treatment for Dockerfile.
|
||||
|
||||
[Misconfiguration]: ../../scanner/misconfiguration/index.md
|
||||
[Secret]: ../../scanner/secret.md
|
||||
60
docs/docs/coverage/iac/helm.md
Normal file
60
docs/docs/coverage/iac/helm.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Helm
|
||||
Trivy supports two types of Helm scanning, templates and packaged charts.
|
||||
The following scanners are supported.
|
||||
|
||||
| Format | [Misconfiguration] | [Secret] |
|
||||
| -------- | :----------------: | :------: |
|
||||
| Template | ✓ | ✓ |
|
||||
| Chart | ✓ | - |
|
||||
|
||||
## Misconfiguration
|
||||
Trivy recursively searches directories and scans all found Helm files.
|
||||
|
||||
It evaluates variables, functions, and other elements within Helm templates and resolve the chart to Kubernetes manifests then run the Kubernetes checks.
|
||||
See [here](../../scanner/misconfiguration/policy/builtin.md) for more details on the built-in policies.
|
||||
|
||||
### Value overrides
|
||||
There are a number of options for overriding values in Helm charts.
|
||||
When override values are passed to the Helm scanner, the values will be used during the Manifest rendering process and will become part of the scanned artifact.
|
||||
|
||||
#### Setting inline value overrides
|
||||
Overrides can be set inline on the command line
|
||||
|
||||
```bash
|
||||
trivy conf --helm-set securityContext.runAsUser=0 ./charts/mySql
|
||||
```
|
||||
|
||||
#### Setting value file overrides
|
||||
Overrides can be in a file that has the key=value set.
|
||||
|
||||
```yaml
|
||||
# Example override file (overrides.yaml)
|
||||
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
```
|
||||
|
||||
```bash
|
||||
trivy conf --helm-values overrides.yaml ./charts/mySql
|
||||
```
|
||||
|
||||
#### Setting value as explicit string
|
||||
the `--helm-set-string` is the same as `--helm-set` but explicitly retains the value as a string
|
||||
|
||||
```bash
|
||||
trivy config --helm-set-string name=false ./infrastructure/tf
|
||||
```
|
||||
|
||||
#### Setting specific values from files
|
||||
Specific override values can come from specific files
|
||||
|
||||
```bash
|
||||
trivy conf --helm-set-file environment=dev.values.yaml ./charts/mySql
|
||||
```
|
||||
|
||||
## Secret
|
||||
The secret scan is performed on plain text files, with no special treatment for Helm.
|
||||
Secret scanning is not conducted on the contents of packaged Charts, such as tar or tar.gz.
|
||||
|
||||
[Misconfiguration]: ../../scanner/misconfiguration/index.md
|
||||
[Secret]: ../../scanner/secret.md
|
||||
21
docs/docs/coverage/iac/index.md
Normal file
21
docs/docs/coverage/iac/index.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Infrastructure as Code
|
||||
|
||||
## Scanner
|
||||
Trivy scans Infrastructure as Code (IaC) files for
|
||||
|
||||
- [Misconfigurations][misconf]
|
||||
- [Secrets][secret]
|
||||
|
||||
## Supported configurations
|
||||
|
||||
| Config type | File patterns |
|
||||
| ----------------------------------- | ----------------------------- |
|
||||
| [Kubernetes](kubernetes.md) | *.yml, *.yaml, *.json |
|
||||
| [Docker](docker.md) | Dockerfile, Containerfile |
|
||||
| [Terraform](terraform.md) | *.tf, *.tf.json, *.tfvars, |
|
||||
| [CloudFormation](cloudformation.md) | *.yml, *.yaml, *.json |
|
||||
| [Azure ARM Template](azure-arm.md) | *.json |
|
||||
| [Helm](helm.md) | *.yaml, *.tpl, *.tar.gz, etc. |
|
||||
|
||||
[misconf]: ../../scanner/misconfiguration/index.md
|
||||
[secret]: ../../scanner/secret.md
|
||||
31
docs/docs/coverage/iac/kubernetes.md
Normal file
31
docs/docs/coverage/iac/kubernetes.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Kubernetes
|
||||
Trivy supports the scanners listed in the table below.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :----------------: | :-------: |
|
||||
| [Misconfiguration] | ✓ |
|
||||
| [Secret] | ✓ |
|
||||
|
||||
In addition to raw YAML and JSON, it supports the following templates:
|
||||
|
||||
| Template | Supported |
|
||||
| :-------------: | :-------: |
|
||||
| [Helm](helm.md) | ✓ |
|
||||
| Kustomize | ✓[^1] |
|
||||
|
||||
!!! note
|
||||
Trivy does not support Kustomize overlays, so it scans files defined in the base.
|
||||
Or, you can scan the output of `kustomize build`.
|
||||
|
||||
## Misconfiguration
|
||||
Trivy recursively searches directories and scans all found Kubernetes files.
|
||||
|
||||
## Secret
|
||||
The secret scan is performed on plain text files, with no special treatment for Kubernetes.
|
||||
This means that Base64 encoded secrets are not scanned, and only secrets written in plain text are detected.
|
||||
|
||||
|
||||
[Misconfiguration]: ../../scanner/misconfiguration/index.md
|
||||
[Secret]: ../../scanner/secret.md
|
||||
|
||||
[^1]: Kustomize is not natively supported.
|
||||
45
docs/docs/coverage/iac/terraform.md
Normal file
45
docs/docs/coverage/iac/terraform.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# Terraform
|
||||
Trivy supports the scanners listed in the table below.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :--------------: | :-------: |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | ✓ |
|
||||
|
||||
It supports the following formats:
|
||||
|
||||
| Format | Supported |
|
||||
| :-------: | :-------: |
|
||||
| JSON | ✓ |
|
||||
| HCL | ✓ |
|
||||
| Plan JSON | ✓ |
|
||||
|
||||
Trivy can scan the results of `terraform plan`.
|
||||
You can scan by passing the file generated as shown below to Trivy:
|
||||
|
||||
```
|
||||
$ terraform plan --out tfplan.binary
|
||||
$ terraform show -json tfplan.binary > tfplan.json
|
||||
```
|
||||
|
||||
## Misconfiguration
|
||||
Trivy recursively searches directories and scans all found Terraform files.
|
||||
It also evaluates variables, imports, and other elements within Terraform files to detect misconfigurations.
|
||||
|
||||
### Value Overrides
|
||||
You can provide `tf-vars` files to Trivy to override default values specified in the Terraform HCL code.
|
||||
|
||||
```bash
|
||||
trivy conf --tf-vars dev.terraform.tfvars ./infrastructure/tf
|
||||
```
|
||||
|
||||
### Exclude Downloaded Terraform Modules
|
||||
By default, downloaded modules are also scanned.
|
||||
If you don't want to scan modules downloaded into the `.terraform` directory, you can use the `--tf-exclude-downloaded-modules` flag.
|
||||
|
||||
```bash
|
||||
trivy conf --tf-exclude-downloaded-modules ./configs
|
||||
```
|
||||
|
||||
## Secret
|
||||
The secret scan is performed on plain text files, with no special treatment for Terraform.
|
||||
9
docs/docs/coverage/index.md
Normal file
9
docs/docs/coverage/index.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Scanning Coverage
|
||||
Trivy can detect security issues in many different platforms, languages and configuration files.
|
||||
This section gives a general overview of that coverage, and can help answer the frequently asked question "Does Trivy support X?".
|
||||
For more detailed information about the specific platforms and languages, check the relevant documentation.
|
||||
|
||||
- [OS Packages](os/index.md)
|
||||
- [Language-specific Packages](language/index.md)
|
||||
- [IaC files](iac/index.md)
|
||||
- [Kubernetes clusters](./kubernetes.md)
|
||||
22
docs/docs/coverage/kubernetes.md
Normal file
22
docs/docs/coverage/kubernetes.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Kubernetes
|
||||
|
||||
When scanning a Kubernetes cluster, Trivy differentiates between the following:
|
||||
|
||||
1. Cluster infrastructure (e.g api-server, kubelet, addons)
|
||||
1. Cluster configuration (e.g Roles, ClusterRoles).
|
||||
1. Application workloads (e.g nginx, postgresql).
|
||||
|
||||
Whenever Trivy scans either of these Kubernetes resources, the container image is scanned separately to the Kubernetes resource definition (the YAML manifest) that defines the resource.
|
||||
When scanning any of the above, the container image is scanned separately to the Kubernetes resource definition (the YAML manifest) that defines the resource.
|
||||
|
||||
Container image is scanned for:
|
||||
- Vulnerabilities
|
||||
- Misconfigurations
|
||||
- Exposed secrets
|
||||
|
||||
Kubernetes resource definition is scanned for:
|
||||
- Vulnerabilities - partially supported through [KBOM scanning](#KBOM)
|
||||
- Misconfigurations
|
||||
- Exposed secrets
|
||||
|
||||
To learn more, please see the [documentation for Kubernetes scanning](../target/kubernetes.md)
|
||||
23
docs/docs/coverage/language/c.md
Normal file
23
docs/docs/coverage/language/c.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# C/C++
|
||||
|
||||
Trivy supports [Conan][conan] C/C++ Package Manager.
|
||||
|
||||
The following scanners are supported.
|
||||
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
| --------------- | :---: | :-----------: | :-----: |
|
||||
| Conan | ✓ | ✓ | - |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
| --------------- | -------------- | :---------------------: | :--------------: | :----------------------------------: | :------: |
|
||||
| Conan | conan.lock[^1] | ✓ | Excluded | ✓ | ✓ |
|
||||
|
||||
## Conan
|
||||
In order to detect dependencies, Trivy searches for `conan.lock`[^1].
|
||||
|
||||
[conan]: https://docs.conan.io/1/index.html
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
[^1]: `conan.lock` is default name. To scan a custom filename use [file-patterns](../../configuration/skipping.md#file-patterns)
|
||||
26
docs/docs/coverage/language/dart.md
Normal file
26
docs/docs/coverage/language/dart.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Dart
|
||||
|
||||
Trivy supports [Dart][dart].
|
||||
|
||||
The following scanners are supported.
|
||||
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
|-------------------------| :---: | :-----------: |:-------:|
|
||||
| [Dart][dart-repository] | ✓ | ✓ | - |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|-------------------------|--------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
|
||||
| [Dart][dart-repository] | pubspec.lock | ✓ | Included | - | - |
|
||||
|
||||
## Dart
|
||||
In order to detect dependencies, Trivy searches for `pubspec.lock`.
|
||||
|
||||
Trivy marks indirect dependencies, but `pubspec.lock` file doesn't have options to separate root and dev transitive dependencies.
|
||||
So Trivy includes all dependencies in report.
|
||||
|
||||
[dart]: https://dart.dev/
|
||||
[dart-repository]: https://pub.dev/
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
47
docs/docs/coverage/language/dotnet.md
Normal file
47
docs/docs/coverage/language/dotnet.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# .NET
|
||||
|
||||
Trivy supports `.NET core` and `NuGet` package managers.
|
||||
|
||||
The following scanners are supported.
|
||||
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
|-----------|:----:|:-------------:|:-------:|
|
||||
| .Net Core | ✓ | ✓ | - |
|
||||
| NuGet | ✓ | ✓ | ✓ |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|:---------------:|--------------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
|
||||
| .Net Core | *.deps.json | ✓ | Excluded | - | ✓ |
|
||||
| NuGet | packages.config | ✓ | Excluded | - | - |
|
||||
| NuGet | packages.lock.json | ✓ | Included | ✓ | ✓ |
|
||||
|
||||
## *.deps.json
|
||||
Trivy parses `*.deps.json` files. Trivy currently excludes dev dependencies from the report.
|
||||
|
||||
## packages.config
|
||||
Trivy only finds dependency names and versions from `packages.config` files. To build dependency graph, it is better to use `packages.lock.json` files.
|
||||
|
||||
### license detection
|
||||
`packages.config` files don't have information about the licenses used.
|
||||
Trivy uses [*.nuspec][nuspec] files from [global packages folder][global-packages] to detect licenses.
|
||||
!!! note
|
||||
The `licenseUrl` field is [deprecated][license-url]. Trivy doesn't parse this field and only checks the [license] field (license `expression` type only).
|
||||
Currently only the default path and `NUGET_PACKAGES` environment variable are supported.
|
||||
|
||||
## packages.lock.json
|
||||
Don't forgot to [enable][enable-lock] lock files in your project.
|
||||
|
||||
!!! tip
|
||||
Please make sure your lock file is up-to-date after modifying dependencies.
|
||||
|
||||
### license detection
|
||||
Same as [packages.config](#license-detection)
|
||||
|
||||
[enable-lock]: https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#enabling-the-lock-file
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[nuspec]: https://learn.microsoft.com/en-us/nuget/reference/nuspec
|
||||
[global-packages]: https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders
|
||||
[license]: https://learn.microsoft.com/en-us/nuget/reference/nuspec#license
|
||||
[license-url]: https://learn.microsoft.com/en-us/nuget/reference/nuspec#licenseurl
|
||||
27
docs/docs/coverage/language/elixir.md
Normal file
27
docs/docs/coverage/language/elixir.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Elixir
|
||||
|
||||
Trivy supports [Hex][hex] repository for [Elixir][elixir].
|
||||
|
||||
The following scanners are supported.
|
||||
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
|-----------------| :---: | :-----------: |:-------:|
|
||||
| [hex][hex] | ✓ | ✓ | - |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|-----------------|--------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
|
||||
| [hex][hex] | mix.lock[^1] | ✓ | Excluded | - | ✓ |
|
||||
|
||||
## Hex
|
||||
In order to detect dependencies, Trivy searches for `mix.lock`[^1].
|
||||
|
||||
[Configure](https://hexdocs.pm/mix/Mix.Project.html#module-configuration) your project to use `mix.lock`[^1] file.
|
||||
|
||||
[elixir]: https://elixir-lang.org/
|
||||
[hex]: https://hex.pm/
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
[^1]: `mix.lock` is default name. To scan a custom filename use [file-patterns](../../configuration/skipping.md#file-patterns)
|
||||
@@ -2,12 +2,20 @@
|
||||
|
||||
## Features
|
||||
Trivy supports two types of Go scanning, Go Modules and binaries built by Go.
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Artifact | Offline[^1] | Dev dependencies | License | Dependency graph |
|
||||
|----------|:-----------:|:-----------------|:-------:|:----------------:|
|
||||
| Modules | ✅ | Include | ✅[^2] | ✅[^2] |
|
||||
| Binaries | ✅ | Exclude | - | - |
|
||||
The following scanners are supported.
|
||||
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
| -------- | :---: | :-----------: | :-----: |
|
||||
| Modules | ✓ | ✓ | ✓[^2] |
|
||||
| Binaries | ✓ | ✓ | - |
|
||||
|
||||
The table below provides an outline of the features Trivy offers.
|
||||
|
||||
| Artifact | Offline[^1] | Dev dependencies | [Dependency graph][dependency-graph] |
|
||||
|----------|:-----------:|:-----------------|:----------------------------------:|
|
||||
| Modules | ✅ | Include | ✅[^2] |
|
||||
| Binaries | ✅ | Exclude | - |
|
||||
|
||||
!!! note
|
||||
Trivy scans only dependencies of the Go project.
|
||||
@@ -18,7 +26,7 @@ The following table provides an outline of the features Trivy offers.
|
||||
Depending on Go versions, the required files are different.
|
||||
|
||||
| Version | Required files | Offline |
|
||||
|---------|:--------------:|:-------:|
|
||||
| ------- | :------------: | :-----: |
|
||||
| \>=1.17 | go.mod | ✅ |
|
||||
| <1.17 | go.mod, go.sum | ✅ |
|
||||
|
||||
@@ -63,5 +71,10 @@ Also, you can scan your local binaries.
|
||||
$ trivy fs ./your_binary
|
||||
```
|
||||
|
||||
!!! note
|
||||
It doesn't work with UPX-compressed binaries.
|
||||
|
||||
[^1]: It doesn't require the Internet access.
|
||||
[^2]: Need to download modules to local cache beforehand
|
||||
[^2]: Need to download modules to local cache beforehand
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
67
docs/docs/coverage/language/index.md
Normal file
67
docs/docs/coverage/language/index.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Programming Language
|
||||
|
||||
Trivy supports programming languages for
|
||||
|
||||
- [SBOM][sbom]
|
||||
- [Vulnerabilities][vuln]
|
||||
- [Licenses][license]
|
||||
|
||||
## Supported languages
|
||||
The files analyzed vary depending on the target.
|
||||
This is because Trivy primarily categorizes targets into two groups:
|
||||
|
||||
- Pre-build
|
||||
- Post-build
|
||||
|
||||
If the target is a pre-build project, like a code repository, Trivy will analyze files used for building, such as lock files.
|
||||
On the other hand, when the target is a post-build artifact, like a container image, Trivy will analyze installed package metadata like `.gemspec`, binary files, and so on.
|
||||
|
||||
| Language | File | Image[^5] | Rootfs[^6] | Filesystem[^7] | Repository[^8] |
|
||||
|----------------------|--------------------------------------------------------------------------------------------|:---------:|:----------:|:--------------:|:--------------:|
|
||||
| [Ruby](ruby.md) | Gemfile.lock | - | - | ✅ | ✅ |
|
||||
| | gemspec | ✅ | ✅ | - | - |
|
||||
| [Python](python.md) | Pipfile.lock | - | - | ✅ | ✅ |
|
||||
| | poetry.lock | - | - | ✅ | ✅ |
|
||||
| | requirements.txt | - | - | ✅ | ✅ |
|
||||
| | egg package[^1] | ✅ | ✅ | - | - |
|
||||
| | wheel package[^2] | ✅ | ✅ | - | - |
|
||||
| | conda package[^3] | ✅ | ✅ | - | - |
|
||||
| [PHP](php.md) | composer.lock | ✅ | ✅ | ✅ | ✅ |
|
||||
| [Node.js](nodejs.md) | package-lock.json | - | - | ✅ | ✅ |
|
||||
| | yarn.lock | - | - | ✅ | ✅ |
|
||||
| | pnpm-lock.yaml | - | - | ✅ | ✅ |
|
||||
| | package.json | ✅ | ✅ | - | - |
|
||||
| [.NET](dotnet.md) | packages.lock.json | ✅ | ✅ | ✅ | ✅ |
|
||||
| | packages.config | ✅ | ✅ | ✅ | ✅ |
|
||||
| | .deps.json | ✅ | ✅ | ✅ | ✅ |
|
||||
| [Java](java.md) | JAR/WAR/PAR/EAR[^4] | ✅ | ✅ | - | - |
|
||||
| | pom.xml | - | - | ✅ | ✅ |
|
||||
| | *gradle.lockfile | - | - | ✅ | ✅ |
|
||||
| [Go](golang.md) | Binaries built by Go | ✅ | ✅ | - | - |
|
||||
| | go.mod | - | - | ✅ | ✅ |
|
||||
| [Rust](rust.md) | Cargo.lock | ✅ | ✅ | ✅ | ✅ |
|
||||
| | Binaries built with [cargo-auditable](https://github.com/rust-secure-code/cargo-auditable) | ✅ | ✅ | - | - |
|
||||
| [C/C++](c.md) | conan.lock | - | - | ✅ | ✅ |
|
||||
| [Elixir](elixir.md) | mix.lock[^10] | - | - | ✅ | ✅ |
|
||||
| [Dart](dart.md) | pubspec.lock | - | - | ✅ | ✅ |
|
||||
| [Swift](swift.md) | Podfile.lock | - | - | ✅ | ✅ |
|
||||
| | Package.resolved | - | - | ✅ | ✅ |
|
||||
|
||||
The path of these files does not matter.
|
||||
|
||||
Example: [Dockerfile](https://github.com/aquasecurity/trivy-ci-test/blob/main/Dockerfile)
|
||||
|
||||
[sbom]: ../../supply-chain/sbom.md
|
||||
[vuln]: ../../scanner/vulnerability.md
|
||||
[license]: ../../scanner/license.md
|
||||
|
||||
[^1]: `*.egg-info`, `*.egg-info/PKG-INFO`, `*.egg` and `EGG-INFO/PKG-INFO`
|
||||
[^2]: `.dist-info/META-DATA`
|
||||
[^3]: `envs/*/conda-meta/*.json`
|
||||
[^4]: `*.jar`, `*.war`, `*.par` and `*.ear`
|
||||
[^5]: ✅ means "enabled" and `-` means "disabled" in the image scanning
|
||||
[^6]: ✅ means "enabled" and `-` means "disabled" in the rootfs scanning
|
||||
[^7]: ✅ means "enabled" and `-` means "disabled" in the filesystem scanning
|
||||
[^8]: ✅ means "enabled" and `-` means "disabled" in the git repository scanning
|
||||
[^9]: ✅ means that Trivy detects line numbers where each dependency is declared in the scanned file. Only supported in [json](../../configuration/reporting.md#json) and [sarif](../../configuration/reporting.md#sarif) formats. SARIF uses `startline == 1 and endline == 1` for unsupported file types
|
||||
[^10]: To scan a filename other than the default filename use [file-patterns](../../configuration/skipping.md#file-patterns)
|
||||
@@ -1,14 +1,21 @@
|
||||
# Java
|
||||
|
||||
Trivy supports three types of Java scanning: `JAR/WAR/PAR/EAR`, `pom.xml` and `*gradle.lockfile` files.
|
||||
|
||||
Each artifact supports the following scanners:
|
||||
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
| ---------------- | :---: | :-----------: | :-----: |
|
||||
| JAR/WAR/PAR/EAR | ✓ | ✓ | - |
|
||||
| pom.xml | ✓ | ✓ | ✓ |
|
||||
| *gradle.lockfile | ✓ | ✓ | - |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
|
||||
| Artifact | Internet access | Dev dependencies |
|
||||
|------------------|:---------------------:|:-----------------|
|
||||
| JAR/WAR/PAR/EAR | Trivy Java DB | Include |
|
||||
| pom.xml | Maven repository [^1] | Exclude |
|
||||
| *gradle.lockfile | - | Exclude |
|
||||
| Artifact | Internet access | Dev dependencies | [Dependency graph][dependency-graph] |
|
||||
|------------------|:---------------------:|:----------------:|:------------------------------------:|
|
||||
| JAR/WAR/PAR/EAR | Trivy Java DB | Include | - |
|
||||
| pom.xml | Maven repository [^1] | Exclude | ✓ |
|
||||
| *gradle.lockfile | - | Exclude | - |
|
||||
|
||||
These may be enabled or disabled depending on the target.
|
||||
See [here](./index.md) for the detail.
|
||||
@@ -18,7 +25,7 @@ To find information about your JAR[^2] file, Trivy parses `pom.properties` and `
|
||||
|
||||
If those files don't exist or don't contain enough information - Trivy will try to find this JAR[^2] file in [trivy-java-db](https://github.com/aquasecurity/trivy-java-db).
|
||||
The Java DB will be automatically downloaded/updated when any JAR[^2] file is found.
|
||||
It is stored in [the cache directory](../../../configuration/cache.md#cache-directory).
|
||||
It is stored in [the cache directory](../../configuration/cache.md#cache-directory).
|
||||
|
||||
!!! warning "EXPERIMENTAL"
|
||||
Finding JARs in `trivy-java-db` is an experimental function.
|
||||
@@ -39,7 +46,7 @@ If your machine doesn't have the necessary files - Trivy tries to find the infor
|
||||
|
||||
!!! Note
|
||||
Trivy only takes information about packages. We don't take a list of vulnerabilities for packages from the `maven repository`.
|
||||
Information about data sources for Java you can see [here](./index.md#data-sources).
|
||||
Information about data sources for Java you can see [here](../../scanner/vulnerability.md#data-sources_1).
|
||||
|
||||
You can disable connecting to the maven repository with the `--offline-scan` flag.
|
||||
The `--offline-scan` flag does not affect the Trivy database.
|
||||
@@ -59,4 +66,6 @@ It doesn't require the internet access.
|
||||
[^3]: `ArtifactID`, `GroupID` and `Version`
|
||||
[^4]: e.g. when parent pom.xml file has `../pom.xml` path
|
||||
[^5]: When you use dependency path in `relativePath` field in pom.xml file
|
||||
[^6]: `/Users/<username>/.m2/repository` (for Linux and Mac) and `C:/Users/<username>/.m2/repository` (for Windows) by default
|
||||
[^6]: `/Users/<username>/.m2/repository` (for Linux and Mac) and `C:/Users/<username>/.m2/repository` (for Windows) by default
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
@@ -1,18 +1,27 @@
|
||||
# Node.js
|
||||
|
||||
Trivy supports three types of Node.js package managers: `npm`, `Yarn` and `pnpm`.
|
||||
|
||||
The following scanners are supported.
|
||||
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
| -------- | :---: | :-----------: | :-----: |
|
||||
| npm | ✓ | ✓ | ✓ |
|
||||
| Yarn | ✓ | ✓ | ✓ |
|
||||
| pnpm | ✓ | ✓ | - |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | Dependency graph | Position | License |
|
||||
|:---------------:|-------------------|:-----------------------:|:----------------:|:----------------:|:--------:|:-------:|
|
||||
| npm | package-lock.json | ✅ | Excluded | ✅ | ✅ | ✅ |
|
||||
| Yarn | yarn.lock | ✅ | Excluded | ✅ | ✅ | - |
|
||||
| pnpm | pnpm-lock.yaml | ✅ | Excluded | ✅ | - | - |
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|:---------------:|-------------------|:-----------------------:|:-----------------:|:------------------------------------:|:--------:|
|
||||
| npm | package-lock.json | ✓ | [Excluded](#npm) | ✓ | ✓ |
|
||||
| Yarn | yarn.lock | ✓ | [Excluded](#yarn) | ✓ | ✓ |
|
||||
| pnpm | pnpm-lock.yaml | ✓ | Excluded | ✓ | - |
|
||||
|
||||
In addition, Trivy scans installed packages with `package.json`.
|
||||
|
||||
| File | Dependency graph | Position | License |
|
||||
|--------------|:----------------:|:--------:|:-------:|
|
||||
| ------------ | :--------------: | :------: | :-----: |
|
||||
| package.json | - | - | ✅ |
|
||||
|
||||
These may be enabled or disabled depending on the target.
|
||||
@@ -29,12 +38,17 @@ Trivy parses `package-lock.json`.
|
||||
To identify licenses, you need to download dependencies to `node_modules` beforehand.
|
||||
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.
|
||||
To exclude devDependencies, `package.json` also needs to be present next to `yarn.lock`.
|
||||
To exclude devDependencies, `package.json` also needs to be present next to `yarn.lock`.
|
||||
Trivy analyzes `.yarn` (Yarn 2+) or `node_modules` (Yarn Classic) folder next to the yarn.lock file to detect licenses.
|
||||
|
||||
By default, Trivy doesn't report development dependencies. Use the `--include-dev-deps` flag to include them.
|
||||
|
||||
### pnpm
|
||||
Trivy parses `pnpm-lock.yaml`, then finds production dependencies and builds a [tree] of dependencies with vulnerabilities.
|
||||
Trivy parses `pnpm-lock.yaml`, then finds production dependencies and builds a [tree][dependency-graph] of dependencies with vulnerabilities.
|
||||
|
||||
## Packages
|
||||
Trivy parses the manifest files of installed packages in container image scanning and so on.
|
||||
@@ -43,5 +57,4 @@ Trivy parses the manifest files of installed packages in container image scannin
|
||||
Trivy searches for `package.json` files under `node_modules` and identifies installed packages.
|
||||
It only extracts package names, versions and licenses for those packages.
|
||||
|
||||
|
||||
[tree]: ../../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
@@ -1,12 +1,19 @@
|
||||
# PHP
|
||||
|
||||
Trivy supports [Composer][composer], which is a tool for dependency management in PHP.
|
||||
|
||||
The following scanners are supported.
|
||||
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
| --------------- | :---: | :-----------: | :-----: |
|
||||
| Composer | ✓ | ✓ | ✓ |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
|
||||
| Package Manager | File | Transitive dependencies | Dev dependencies | Dependency graph | Position | License |
|
||||
|-----------------|---------------|:-----------------------:|:----------------:|:----------------:|:--------:|:-------:|
|
||||
| Composer | composer.lock | ✅ | Excluded | ✅ | ✅ | ✅ |
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|-----------------|---------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
|
||||
| Composer | composer.lock | ✓ | Excluded | ✓ | ✓ |
|
||||
|
||||
## Composer
|
||||
In order to detect dependencies, Trivy searches for `composer.lock`.
|
||||
@@ -15,4 +22,5 @@ Trivy also supports dependency trees; however, to display an accurate tree, it n
|
||||
Since this information is not included in `composer.lock`, Trivy parses `composer.json`, which should be located next to `composer.lock`.
|
||||
If you want to see the dependency tree, please ensure that `composer.json` is present.
|
||||
|
||||
[composer]: https://getcomposer.org/
|
||||
[composer]: https://getcomposer.org/
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
@@ -1,20 +1,37 @@
|
||||
# Python
|
||||
|
||||
Trivy supports three types of Python package managers: `pip`, `Pipenv` and `Poetry`.
|
||||
The following scanners are supported for package managers.
|
||||
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
| --------------- | :---: | :-----------: | :-----: |
|
||||
| pip | ✓ | ✓ | - |
|
||||
| Pipenv | ✓ | ✓ | - |
|
||||
| Poetry | ✓ | ✓ | - |
|
||||
|
||||
In addition, Trivy supports three formats of Python packages: `egg`, `wheel` and `conda`.
|
||||
The following scanners are supported for Python packages.
|
||||
|
||||
| Packaging | SBOM | Vulnerability | License |
|
||||
| --------- | :---: | :-----------: | :-----: |
|
||||
| Egg | ✓ | ✓ | ✓ |
|
||||
| Wheel | ✓ | ✓ | ✓ |
|
||||
| Conda | ✓ | - | - |
|
||||
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | Dependency graph | Position | License |
|
||||
|-----------------|------------------|:-----------------------:|:----------------:|:----------------:|:--------:|:-------:|
|
||||
| pip | requirements.txt | - | Include | - | - | - |
|
||||
| Pipenv | Pipfile.lock | ✅ | Include | - | ✅ | - |
|
||||
| Poetry | poetry.lock | ✅ | Exclude | ✅ | | - |
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|-----------------|------------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
|
||||
| pip | requirements.txt | - | Include | - | - |
|
||||
| Pipenv | Pipfile.lock | ✓ | Include | - | ✓ |
|
||||
| Poetry | poetry.lock | ✓ | Exclude | ✓ | |
|
||||
|
||||
In addition, Trivy supports two formats of Python packages: `egg` and `wheel`.
|
||||
|
||||
| Packaging | License |
|
||||
|-----------|:-------:|
|
||||
| Egg | ✅ |
|
||||
| Wheel | ✅ |
|
||||
| Packaging | Dependency graph |
|
||||
| --------- | :--------------: |
|
||||
| Egg | ✓ |
|
||||
| Wheel | ✓ |
|
||||
|
||||
These may be enabled or disabled depending on the target.
|
||||
See [here](./index.md) for the detail.
|
||||
@@ -73,3 +90,5 @@ Trivy looks for `*.egg-info`, `*.egg-info/PKG-INFO`, `*.egg` and `EGG-INFO/PKG-I
|
||||
|
||||
### Wheel
|
||||
Trivy looks for `.dist-info/META-DATA` to identify Python packages.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
30
docs/docs/coverage/language/ruby.md
Normal file
30
docs/docs/coverage/language/ruby.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Ruby
|
||||
|
||||
Trivy supports [Bundler][bundler] and [RubyGems][rubygems].
|
||||
The following scanners are supported for Cargo.
|
||||
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
|-----------------|:----:|:-------------:|:-------:|
|
||||
| Bundler | ✓ | ✓ | - |
|
||||
| RubyGems | ✓ | ✓ | ✓ |
|
||||
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|-----------------|--------------|:-----------------------:|:-----------------|:------------------------------------:|:--------:|
|
||||
| Bundler | Gemfile.lock | ✓ | Included | ✓ | ✓ |
|
||||
| RubyGems | .gemspec | - | Included | - | - |
|
||||
|
||||
|
||||
### Bundler
|
||||
Trivy searches for `Gemfile.lock` to detect dependencies.
|
||||
|
||||
|
||||
### RubyGems
|
||||
`.gemspec` files doesn't contains transitive dependencies. You need to scan each `.gemspec` file separately.
|
||||
|
||||
[bundler]: https://bundler.io
|
||||
[rubygems]: https://rubygems.org/
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
@@ -1,18 +1,29 @@
|
||||
# Rust
|
||||
|
||||
## Features
|
||||
Trivy supports [Cargo](https://doc.rust-lang.org/stable/cargo/), which is the Rust package manager.
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
The following scanners are supported for Cargo.
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | License | Dependency graph | Position |
|
||||
|-----------------|------------|:-----------------------:|:-----------------|:-------:|:----------------:|:--------:|
|
||||
| Cargo | Cargo.lock | ✅ | Excluded[^1] | - | ✅ | ✅ |
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
| --------------- | :---: | :-----------: | :-----: |
|
||||
| Cargo | ✓ | ✓ | - |
|
||||
|
||||
In addition, it supports binaries built with [cargo-auditable](https://github.com/rust-secure-code/cargo-auditable).
|
||||
|
||||
| Artifact | Transitive dependencies | Dev dependencies | License | Dependency graph | Position |
|
||||
|----------|:-----------------------:|:-----------------|:-------:|:----------------:|:--------:|
|
||||
| Binaries | ✅ | Excluded | - | - | - |
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
| -------- | :---: | :-----------: | :-----: |
|
||||
| Binaries | ✓ | ✓ | - |
|
||||
|
||||
## Features
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|-----------------|------------|:-----------------------:|:-----------------|:------------------------------------:|:--------:|
|
||||
| Cargo | Cargo.lock | ✓ | Excluded[^1] | ✓ | ✓ |
|
||||
|
||||
|
||||
| Artifact | Transitive dependencies | Dev dependencies | Dependency graph | Position |
|
||||
| -------- | :---------------------: | :--------------- | :--------------: | :------: |
|
||||
| Binaries | ✓ | Excluded | - | - |
|
||||
|
||||
|
||||
### Cargo
|
||||
@@ -28,4 +39,6 @@ Scan `Cargo.lock` and `Cargo.toml` together also removes developer dependencies.
|
||||
Trivy scans binaries built with [cargo-auditable](https://github.com/rust-secure-code/cargo-auditable).
|
||||
If such a binary exists, Trivy will identify it as being built with cargo-audit and scan it.
|
||||
|
||||
[^1]: When you scan Cargo.lock and Cargo.toml together.
|
||||
[^1]: When you scan Cargo.lock and Cargo.toml together.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
44
docs/docs/coverage/language/swift.md
Normal file
44
docs/docs/coverage/language/swift.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Swift
|
||||
|
||||
Trivy supports [CocoaPods][cocoapods] and [Swift][swift] package managers.
|
||||
|
||||
The following scanners are supported.
|
||||
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
|-----------------|:----:|:-------------:|:-------:|
|
||||
| Swift | ✓ | ✓ | - |
|
||||
| CocoaPods | ✓ | ✓ | - |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|:---------------:|------------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
|
||||
| Swift | Package.resolved | ✓ | Included | - | ✓ |
|
||||
| CocoaPods | Podfile.lock | ✓ | Included | ✓ | - |
|
||||
|
||||
These may be enabled or disabled depending on the target.
|
||||
See [here](./index.md) for the detail.
|
||||
|
||||
## Swift
|
||||
Trivy parses [Package.resolved][package-resolved] file to find dependencies.
|
||||
Don't forget to update (`swift package update` command) this file before scanning.
|
||||
|
||||
## CocoaPods
|
||||
CocoaPods uses package names in `PodFile.lock`, but [GitHub Advisory Database (GHSA)][ghsa] Trivy relies on uses Git URLs.
|
||||
We parse [the CocoaPods Specs][cocoapods-specs] to match package names and links.
|
||||
|
||||
!!! note "Limitation"
|
||||
Since [GHSA][ghsa] holds only Git URLs, such as github.com/apple/swift-nio,
|
||||
Trivy can't identify affected submodules, and detect all submodules maintained by the same URL.
|
||||
For example, [SwiftNIOHTTP1][niohttp1] and [SwiftNIOWebSocket][niowebsocket] both are maintained under `github.com/apple/swift-nio`,
|
||||
and Trivy detect CVE-2022-3215 for both of them, even though only [SwiftNIOHTTP1][niohttp1] is actually affected.
|
||||
|
||||
[cocoapods]: https://cocoapods.org/
|
||||
[cocoapods-specs]: https://github.com/CocoaPods/Specs
|
||||
[ghsa]: https://github.com/advisories?query=type%3Areviewed+ecosystem%3Aswift
|
||||
[swift]: https://www.swift.org/package-manager/
|
||||
[package-resolved]: https://github.com/apple/swift-package-manager/blob/4a42f2519e3f7b8a731c5ed89b47ed577df8f86c/Documentation/Usage.md#resolving-versions-packageresolved-file
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
[niohttp1]: https://cocoapods.org/pods/SwiftNIOHTTP1
|
||||
[niowebsocket]: https://cocoapods.org/pods/SwiftNIOWebSocket
|
||||
73
docs/docs/coverage/os/alma.md
Normal file
73
docs/docs/coverage/os/alma.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# AlmaLinux
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
|:------------------------------------:|:---------:|
|
||||
| Unfixed vulnerabilities | - |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
|
||||
|
||||
## Vulnerability
|
||||
AlmaLinux offers its own security advisories, and these are utilized when scanning AlmaLinux for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
### Fixed Version
|
||||
When looking at fixed versions, it's crucial to consider the patches supplied by AlmaLinux.
|
||||
For example, for CVE-2023-0464, the fixed version for AlmaLinux 9 is listed as `3.0.7-16.el9_2` in [their advisory][ALSA-2023:3722].
|
||||
Note that this is different from the upstream fixed version, which is `3.0.9`, `3.1.1`, and son on.
|
||||
Typically, only the upstream information gets listed on [NVD], so it's important not to get confused.
|
||||
|
||||
### Severity
|
||||
Trivy calculates the severity of an issue based on the severity provided by AlmaLinux.
|
||||
If the severity is not provided or defined yet by AlmaLinux, the severity from the NVD is taken into account.
|
||||
|
||||
Using CVE-2023-0464 as an example, while it is rated as "High" in NVD, AlmaLinux has marked as ["moderate"][ALSA-2023:3722].
|
||||
As a result, Trivy will display it as "Medium".
|
||||
|
||||
The table below is the mapping of AlmaLinux's severity to Trivy's severity levels.
|
||||
|
||||
| AlmaLinux | Trivy |
|
||||
| :-------: | :------: |
|
||||
| Low | Low |
|
||||
| Moderate | Medium |
|
||||
| Important | High |
|
||||
| Critical | Critical |
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for AlmaLinux.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | |
|
||||
| Will Not Fix | |
|
||||
| Fix Deferred | |
|
||||
| End of Life | |
|
||||
|
||||
|
||||
## License
|
||||
Trivy identifies licenses by examining the metadata of RPM packages.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
[errata]: https://errata.almalinux.org/
|
||||
|
||||
[ALSA-2023:3722]: https://errata.almalinux.org/9/ALSA-2023-3722.html
|
||||
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
59
docs/docs/coverage/os/alpine.md
Normal file
59
docs/docs/coverage/os/alpine.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# Alpine Linux
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
|:------------------------------------:|:---------:|
|
||||
| Unfixed vulnerabilities | - |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that have been installed through `apk`.
|
||||
|
||||
## Vulnerability
|
||||
Alpine Linux offers its own security advisories, and these are utilized when scanning Alpine for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
### Fixed Version
|
||||
When looking at fixed versions, it's crucial to consider the patches supplied by Alpine.
|
||||
For example, for CVE-2023-0464, the fixed version for Alpine Linux is listed as `3.1.0-r1` in [the secfixes][CVE-2023-0464].
|
||||
Note that this is different from the upstream fixed version, which is `3.1.1`.
|
||||
Typically, only the upstream information gets listed on [NVD], so it's important not to get confused.
|
||||
|
||||
### Severity
|
||||
For Alpine vulnerabilities, the severity is determined using the values set by NVD.
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for Alpine.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | |
|
||||
| Will Not Fix | |
|
||||
| Fix Deferred | |
|
||||
| End of Life | |
|
||||
|
||||
## License
|
||||
Trivy identifies licenses by examining the metadata of APK packages.
|
||||
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[secdb]: https://secdb.alpinelinux.org/
|
||||
|
||||
[CVE-2023-0464]: https://gitlab.alpinelinux.org/alpine/aports/-/blob/dad5b7380ab3be705951ce6fd2d7bba513d6a744/main/openssl/APKBUILD#L36-37
|
||||
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
72
docs/docs/coverage/os/amazon.md
Normal file
72
docs/docs/coverage/os/amazon.md
Normal file
@@ -0,0 +1,72 @@
|
||||
# Amazon Linux
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
|:------------------------------------:|:---------:|
|
||||
| Unfixed vulnerabilities | - |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
|
||||
|
||||
## Vulnerability
|
||||
Amazon Linux offers its own security advisories, and these are utilized when scanning Amazon Linux for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
### Fixed Version
|
||||
When looking at fixed versions, it's crucial to consider the patches supplied by Amazon.
|
||||
For example, for CVE-2023-0464, the fixed version for Amazon Linux 2023 is listed as `3.0.8-1.amzn2023.0.2` in [ALAS2023-2023-181].
|
||||
Note that this is different from the upstream fixed version, which is `3.0.9`, `3.1.1`, and so on.
|
||||
Typically, only the upstream information gets listed on [NVD], so it's important not to get confused.
|
||||
|
||||
### Severity
|
||||
Trivy determines vulnerability severity based on the severity metric provided by Amazon.
|
||||
For example, the security patch for [CVE-2023-0464] in Amazon Linux 2023 is provided as [ALAS2023-2023-181].
|
||||
Its severity is rated as "Medium".
|
||||
Thus, even though it's evaluated as "HIGH" in the NVD, Trivy displays it with a severity of "MEDIUM".
|
||||
|
||||
The table below is the mapping of Amazon's severity to Trivy's severity levels.
|
||||
|
||||
| Amazon | Trivy |
|
||||
| :-------: | :------: |
|
||||
| Low | Low |
|
||||
| Medium | Medium |
|
||||
| Important | High |
|
||||
| Critical | Critical |
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for Amazon Linux.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | |
|
||||
| Will Not Fix | |
|
||||
| Fix Deferred | |
|
||||
| End of Life | |
|
||||
|
||||
## License
|
||||
Trivy identifies licenses by examining the metadata of RPM packages.
|
||||
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[center]: https://alas.aws.amazon.com/
|
||||
|
||||
[CVE-2023-0464]: https://alas.aws.amazon.com/cve/html/CVE-2023-0464.html
|
||||
[ALAS2023-2023-181]: https://alas.aws.amazon.com/AL2023/ALAS-2023-181.html
|
||||
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
63
docs/docs/coverage/os/bitnami.md
Normal file
63
docs/docs/coverage/os/bitnami.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# Bitnami Images
|
||||
|
||||
!!! warning "EXPERIMENTAL"
|
||||
Scanning results may be inaccurate.
|
||||
|
||||
While it is not an OS, this page describes the details of the [container images provided by Bitnami](https://github.com/bitnami/containers).
|
||||
Bitnami images are based on [Debian](debian.md).
|
||||
Please see [the Debian page](debian.md) for OS packages.
|
||||
|
||||
Trivy supports the following scanners for Bitnami packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
| :----------------------------------: | :-------: |
|
||||
| Unfixed vulnerabilities | - |
|
||||
| [Dependency graph][dependency-graph] | - |
|
||||
|
||||
## SBOM
|
||||
Trivy analyzes the SBOM information contained within the container images provided by Bitnami.
|
||||
The SBOM files are located at `/opt/bitnami/<component>/.spdx-<component>.spdx`.
|
||||
|
||||
## Vulnerability
|
||||
Since Bitnami has its [own vulnerability database][vulndb], it uses these for vulnerability detection of applications and packages distributed by Bitnami.
|
||||
|
||||
!!! note
|
||||
Trivy does not support vulnerability detection of independently compiled binaries, so even if you scan container images like `nginx:1.15.2`, vulnerabilities in Nginx cannot be detected.
|
||||
This is because main applications like Nginx are [not installed by the package manager](https://github.com/nginxinc/docker-nginx/blob/321a13a966eeff945196ddd31a629dad2aa85eda/mainline/debian/Dockerfile).
|
||||
However, in the case of Bitnami images, since these SBOMs are stored within the image, scanning `bitnami/nginx:1.15.2` allows for the detection of vulnerabilities in Nginx.
|
||||
|
||||
### Fixed Version
|
||||
Trivy refers to the [Bitnami database][vulndb]. Please note that these may differ from the upstream fixed versions.
|
||||
|
||||
### Severity
|
||||
Similar to Fixed versions, it follows Bitnami's vulnerability database.
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for Bitnami packages.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | |
|
||||
| Will Not Fix | |
|
||||
| Fix Deferred | |
|
||||
| End of Life | |
|
||||
|
||||
|
||||
|
||||
## License
|
||||
If licenses are included in the SBOM distributed by Bitnami, they will be used for scanning.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
[vulndb]: https://github.com/bitnami/vulndb
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
66
docs/docs/coverage/os/cbl-mariner.md
Normal file
66
docs/docs/coverage/os/cbl-mariner.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# CBL-Mariner
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Version | SBOM | Vulnerability | License |
|
||||
| ---------------- | :---: | :-----------: | :-----: |
|
||||
| 1.0 | ✔ | ✔ | ✔ |
|
||||
| 1.0 (Distroless) | ✔ | ✔ | |
|
||||
| 2.0 | ✔ | ✔ | ✔ |
|
||||
| 2.0 (Distroless) | ✔ | ✔ | |
|
||||
|
||||
|
||||
The following table provides an outline of the targets Trivy supports.
|
||||
|
||||
| Version | Container image | Virtual machine | Arch |
|
||||
| ------- | :-------------: | :-------------: | :----------: |
|
||||
| 1.0 | ✔ | ✔ | amd64, arm64 |
|
||||
| 2.0 | ✔ | ✔ | amd64, arm64 |
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
|:------------------------------------:|:---------:|
|
||||
| Detect unfixed vulnerabilities | ✓ |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
|
||||
|
||||
## Vulnerability
|
||||
CBL-Mariner offers its own security advisories, and these are utilized when scanning CBL-Mariner for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
### Fixed Version
|
||||
Trivy takes fixed versions from [CBL-Mariner OVAL][oval].
|
||||
|
||||
### Severity
|
||||
Trivy calculates the severity of an issue based on the severity provided in [CBL-Mariner OVAL][oval].
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for CBL-Mariner.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | |
|
||||
| Will Not Fix | |
|
||||
| Fix Deferred | |
|
||||
| End of Life | |
|
||||
|
||||
|
||||
## License
|
||||
Trivy identifies licenses by examining the metadata of RPM packages.
|
||||
|
||||
!!! note
|
||||
License detection is not supported for CBL-Mariner Distroless.
|
||||
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[cbl-mariner]: https://github.com/microsoft/CBL-Mariner
|
||||
|
||||
[oval]: https://github.com/microsoft/CBL-MarinerVulnerabilityData/
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
38
docs/docs/coverage/os/centos.md
Normal file
38
docs/docs/coverage/os/centos.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# CentOS
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
| :-----------------------------------: | :-------: |
|
||||
| Unfixed vulnerabilities | ✓ |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Same as [RHEL](rhel.md#sbom).
|
||||
|
||||
## Vulnerability
|
||||
CentOS does not provide straightforward machine-readable security advisories.
|
||||
As a result, Trivy utilizes the security advisories from [Red Hat Enterprise Linux (RHEL)](rhel.md#vulnerability) for detecting vulnerabilities in CentOS.
|
||||
This approach might lead to situations where, even though Trivy displays a fixed version, CentOS might not have the patch available yet.
|
||||
Since patches released for RHEL often become available in CentOS after some time, it's usually just a matter of waiting.
|
||||
|
||||
!!! note
|
||||
The case for CentOS Stream, which is not supported by Trivy, is entirely different from CentOS.
|
||||
|
||||
As Trivy relies on Red Hat's advisories, please refer to [Red Hat](rhel.md) for details regarding vulnerability severity and status.
|
||||
|
||||
|
||||
## License
|
||||
Same as [RHEL](rhel.md#license).
|
||||
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
32
docs/docs/coverage/os/chainguard.md
Normal file
32
docs/docs/coverage/os/chainguard.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Chainguard
|
||||
Trivy supports the following 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
|
||||
Chainguard offers its own security advisories, and these are utilized when scanning Chainguard 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
|
||||
[secdb]: https://packages.cgr.dev/chainguard/security.json
|
||||
74
docs/docs/coverage/os/debian.md
Normal file
74
docs/docs/coverage/os/debian.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Debian
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
| :-----------------------------------: | :-------: |
|
||||
| Unfixed vulnerabilities | ✓ |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that have been installed through package managers such as `apt` and `dpkg`.
|
||||
While there are some exceptions, like Go binaries and JAR files, it's important to note that binaries that have been custom-built using `make` or tools installed via `curl` are generally not detected.
|
||||
|
||||
## Vulnerability
|
||||
Debian offers its own security advisories, and these are utilized when scanning Debian for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
### Fixed Version
|
||||
When looking at fixed versions, it's crucial to consider the patches supplied by Debian.
|
||||
For example, for CVE-2023-3269, the fixed version for Debian 12 (bookworm) is listed as `6.1.37-1` in [the Security Tracker][CVE-2023-3269].
|
||||
This patch is provided in [DSA-5448-1].
|
||||
Note that this is different from the upstream fixed version, which is `6.5`.
|
||||
Typically, only the upstream information gets listed on [NVD], so it's important not to get confused.
|
||||
|
||||
### Severity
|
||||
Trivy calculates the severity of an issue based on the 'Urgency' metric found in the Security Tracker.
|
||||
If 'Urgency' isn't provided by Debian, the severity from the NVD is taken into account.
|
||||
|
||||
Using CVE-2019-15052 as an example, while it is rated as "Critical" in NVD, Debian has marked its "Urgency" as ["Low"][CVE-2019-15052].
|
||||
As a result, Trivy will display it as "Low".
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for Debian.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | |
|
||||
| Will Not Fix | |
|
||||
| Fix Deferred | ✓ |
|
||||
| End of Life | ✓ |
|
||||
|
||||
## License
|
||||
To identify the license of a package, Trivy checks the copyright file located at `/usr/share/doc/*/copyright`.
|
||||
|
||||
However, this method has its limitations as the file isn't machine-readable, leading to situations where the license isn't detected.
|
||||
In such scenarios, the `--license-full` flag can be passed.
|
||||
It compares the contents of known licenses with the copyright file to discern the license in question.
|
||||
Please be aware that using this flag can increase memory usage, so it's disabled by default for efficiency.
|
||||
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
[debian-tracker]: https://security-tracker.debian.org/tracker/
|
||||
[debian-oval]: https://www.debian.org/security/oval/
|
||||
|
||||
[CVE-2023-3269]: https://security-tracker.debian.org/tracker/CVE-2023-3269
|
||||
[CVE-2019-15052]: https://security-tracker.debian.org/tracker/CVE-2019-15052
|
||||
[DSA-5448-1]: https://security-tracker.debian.org/tracker/DSA-5448-1
|
||||
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-3269
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
34
docs/docs/coverage/os/google-distroless.md
Normal file
34
docs/docs/coverage/os/google-distroless.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Google Distroless Images
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
| :----------------------------------: | :-------: |
|
||||
| Unfixed vulnerabilities | - |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages pre-installed in distroless images.
|
||||
|
||||
## Vulnerability
|
||||
Google Distroless is based on [Debian]; see there for details.
|
||||
|
||||
## License
|
||||
Google Distroless is based on [Debian]; see there for details.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
[metadata]: https://packages.vmware.com/photon/photon_cve_metadata/
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
|
||||
[Debian]: debian.md
|
||||
45
docs/docs/coverage/os/index.md
Normal file
45
docs/docs/coverage/os/index.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# OS
|
||||
|
||||
## Scanner
|
||||
Trivy supports operating systems for
|
||||
|
||||
- [SBOM][sbom]
|
||||
- [Vulnerabilities][vuln]
|
||||
- [Licenses][license]
|
||||
|
||||
## Supported OS
|
||||
|
||||
| OS | Supported Versions | Package Managers |
|
||||
|-----------------------------------------------|-------------------------------------|------------------|
|
||||
| [Alpine Linux](alpine.md) | 2.2 - 2.7, 3.0 - 3.18, edge | apk |
|
||||
| [Wolfi Linux](wolfi.md) | (n/a) | apk |
|
||||
| [Chainguard](chainguard.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 |
|
||||
| [Rocky Linux](rocky.md) | 8, 9 | dnf/yum/rpm |
|
||||
| [Oracle Linux](oracle.md) | 5, 6, 7, 8 | dnf/yum/rpm |
|
||||
| [CBL-Mariner](cbl-mariner.md) | 1.0, 2.0 | dnf/yum/rpm |
|
||||
| [Amazon Linux](amazon.md) | 1, 2, 2023 | dnf/yum/rpm |
|
||||
| [openSUSE Leap](suse.md) | 42, 15 | zypper/rpm |
|
||||
| [SUSE Enterprise Linux](suse.md) | 11, 12, 15 | zypper/rpm |
|
||||
| [Photon OS](photon.md) | 1.0, 2.0, 3.0, 4.0 | tndf/yum/rpm |
|
||||
| [Debian GNU/Linux](debian.md) | 7, 8, 9, 10, 11, 12 | apt/dpkg |
|
||||
| [Ubuntu](ubuntu.md) | All versions supported by Canonical | apt/dpkg |
|
||||
|
||||
## Supported container images
|
||||
|
||||
| Container image | Supported Versions | Package Managers |
|
||||
|-----------------------------------------------|-------------------------------------|------------------|
|
||||
| [Google Distroless](google-distroless.md)[^2] | Any | apt/dpkg |
|
||||
| [Bitnami](bitnami.md) | Any | - |
|
||||
|
||||
Each page gives more details.
|
||||
|
||||
[^1]: CentOS Stream is not supported
|
||||
[^2]: https://github.com/GoogleContainerTools/distroless
|
||||
|
||||
|
||||
[sbom]: ../../supply-chain/sbom.md
|
||||
[vuln]: ../../scanner/vulnerability.md
|
||||
[license]: ../../scanner/license.md
|
||||
70
docs/docs/coverage/os/oracle.md
Normal file
70
docs/docs/coverage/os/oracle.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Oracle Linux
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
| :-----------------------------------: | :-------: |
|
||||
| Unfixed vulnerabilities | - |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
|
||||
|
||||
## Vulnerability
|
||||
Oracle Linux offers its own security advisories, and these are utilized when scanning Oracle Linux for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
### Fixed Version
|
||||
Trivy takes fixed versions from [Oracle security advisories][alerts].
|
||||
|
||||
### Severity
|
||||
Trivy determines vulnerability severity based on the severity metric provided in [Oracle security advisories][alerts].
|
||||
For example, the security patch for [CVE-2023-0464][CVE-2023-0464] is provided as [ELSA-2023-2645][ELSA-2023-2645].
|
||||
Its severity is rated as "MODERATE".
|
||||
Thus, even though it's evaluated as "HIGH" in the NVD, Trivy displays it with a severity of "MEDIUM".
|
||||
|
||||
The table below is the mapping of Oracle's threat to Trivy's severity levels.
|
||||
|
||||
| Oracle | Trivy |
|
||||
| :-------: | :------: |
|
||||
| Low | Low |
|
||||
| Moderate | Medium |
|
||||
| Important | High |
|
||||
| Critical | Critical |
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for Oracle Linux.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | |
|
||||
| Will Not Fix | |
|
||||
| Fix Deferred | |
|
||||
| End of Life | |
|
||||
|
||||
## License
|
||||
Trivy identifies licenses by examining the metadata of RPM packages.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
[oval]: https://linux.oracle.com/security/oval/
|
||||
[alerts]: https://www.oracle.com/security-alerts/
|
||||
|
||||
[CVE-2023-0464]: https://linux.oracle.com/cve/CVE-2023-0464.html
|
||||
[ELSA-2023-2645]: https://linux.oracle.com/errata/ELSA-2023-2645.html
|
||||
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
54
docs/docs/coverage/os/photon.md
Normal file
54
docs/docs/coverage/os/photon.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Photon OS
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
|:------------------------------------:|:---------:|
|
||||
| Unfixed vulnerabilities | - |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that have been installed through package managers such as `tdnf` and `yum`.
|
||||
|
||||
## Vulnerability
|
||||
Photon OS offers its own security advisories, and these are utilized when scanning Photon OS for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
### Fixed Version
|
||||
Trivy takes fixed versions from [Photon CVE metadata][metadata].
|
||||
|
||||
### Severity
|
||||
Trivy determines the severity of vulnerabilities based on the CVSSv3 score provided by Photon OS.
|
||||
See [here](../../scanner/vulnerability.md#severity-selection) for the conversion table from CVSS score to severity.
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for Photon OS.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | |
|
||||
| Will Not Fix | |
|
||||
| Fix Deferred | |
|
||||
| End of Life | |
|
||||
|
||||
## License
|
||||
Trivy identifies licenses by examining the metadata of RPM packages.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
[metadata]: https://packages.vmware.com/photon/photon_cve_metadata/
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
84
docs/docs/coverage/os/rhel.md
Normal file
84
docs/docs/coverage/os/rhel.md
Normal file
@@ -0,0 +1,84 @@
|
||||
# Red Hat Enterprise Linux
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
| :----------------------------------: | :-------: |
|
||||
| Unfixed vulnerabilities | ✓ |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
|
||||
|
||||
## Vulnerability
|
||||
Red Hat offers its own security advisories, and these are utilized when scanning Red Hat Enterprise Linux (RHEL) for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
### Fixed Version
|
||||
When looking at fixed versions, it's crucial to consider the patches supplied by Red Hat.
|
||||
For example, for CVE-2023-0464, the fixed version for RHEL 9 is listed as `3.0.7-16.el9_2` in [their advisory][CVE-2023-0464].
|
||||
This patch is provided in [RHSA-2023:3722].
|
||||
Note that this is different from the upstream fixed version, which is `3.0.9`, `3.1.1`, and so on.
|
||||
Typically, only the upstream information gets listed on [NVD], so it's important not to get confused.
|
||||
|
||||
### Severity
|
||||
Trivy calculates the severity of a vulnerability based on the 'Impact' metric provided by Red Hat.
|
||||
If the impact is not provided or defined yet by Red Hat, the severity from the NVD is taken into account.
|
||||
|
||||
Using CVE-2023-0464 as an example, while it is rated as "HIGH" in NVD, Red Hat has marked its 'Impact' as ["Low"][CVE-2023-0464].
|
||||
As a result, Trivy will display it as "Low".
|
||||
|
||||
The table below is the mapping of Red Hat's impact to Trivy's severity levels.
|
||||
|
||||
| Red Hat | Trivy |
|
||||
| :-------: | :------: |
|
||||
| Low | Low |
|
||||
| Moderate | Medium |
|
||||
| Important | High |
|
||||
| Critical | Critical |
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for RHEL.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | ✓ |
|
||||
| Will Not Fix | ✓ |
|
||||
| Fix Deferred | ✓ |
|
||||
| End of Life | ✓ |
|
||||
|
||||
When a vulnerability status is listed as "End of Life", it means a vulnerability with the impact level assigned to this CVE is no longer covered by its current support lifecycle phase.
|
||||
The product has been identified to contain the impacted component, but analysis to determine whether it is affected or not by this vulnerability was not performed.
|
||||
Red Hat advises that the product should be assumed to be affected.
|
||||
Therefore, Trivy detects vulnerabilities with this status as "End of Life".
|
||||
|
||||
On the other hand, for those marked "Under Investigation," the impact is unclear as they are still being examined, so Trivy does not detect them. Once the investigation is completed, the status should be updated.
|
||||
|
||||
!!! abstract
|
||||
Vulnerabilities with a status of "End of Life", where the presence or absence of impact is unclear, are detected by Trivy. However, those with a status of "Under Investigation" are not detected.
|
||||
|
||||
## License
|
||||
Trivy identifies licenses by examining the metadata of RPM packages.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[oval]: https://www.redhat.com/security/data/oval/v2/
|
||||
[api]: https://www.redhat.com/security/data/metrics/
|
||||
|
||||
[CVE-2023-0464]: https://access.redhat.com/security/cve/cve-2023-0464
|
||||
[RHSA-2023:3722]: https://access.redhat.com/errata/RHSA-2023:3722
|
||||
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
70
docs/docs/coverage/os/rocky.md
Normal file
70
docs/docs/coverage/os/rocky.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Rocky Linux
|
||||
Trivy supports the following scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The table below outlines the features offered by Trivy.
|
||||
|
||||
| Feature | Supported |
|
||||
|:------------------------------------:|:---------:|
|
||||
| Unfixed vulnerabilities | - |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
|
||||
|
||||
## Vulnerability
|
||||
Rocky Linux offers its own security advisories, and these are utilized when scanning Rocky Linux for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
### Fixed Version
|
||||
Trivy takes fixed versions from [Rocky Linux Errata][errata], not NVD or somewhere else.
|
||||
See [here](../../scanner/vulnerability.md#data-source-selection) for more details.
|
||||
|
||||
!!! architectures
|
||||
There are cases when the vulnerability affects packages of not all architectures.
|
||||
For example, vulnerable packages for [CVE-2023-0361](https://errata.rockylinux.org/RLSA-2023:1141) are only `aarch64` packages.
|
||||
|
||||
Trivy only detects vulnerabilities for packages of your architecture.
|
||||
|
||||
### Severity
|
||||
Trivy calculates the severity of an issue based on the severity provided in [Rocky Linux Errata][errata].
|
||||
|
||||
The table below is the mapping of Rocky Linux's severity to Trivy's severity levels.
|
||||
|
||||
| Rocky Linux | Trivy |
|
||||
| :---------: | :------: |
|
||||
| Low | Low |
|
||||
| Moderate | Medium |
|
||||
| Important | High |
|
||||
| Critical | Critical |
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for Rocky Linux.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | |
|
||||
| Will Not Fix | |
|
||||
| Fix Deferred | |
|
||||
| End of Life | |
|
||||
|
||||
|
||||
## License
|
||||
Trivy identifies licenses by examining the metadata of RPM packages.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[updateinfo]: https://download.rockylinux.org/pub/rocky/
|
||||
[errata]: https://errata.rockylinux.org/
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
40
docs/docs/coverage/os/suse.md
Normal file
40
docs/docs/coverage/os/suse.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# SUSE
|
||||
Trivy supports the following distributions:
|
||||
|
||||
- openSUSE Leap
|
||||
- SUSE Enterprise Linux (SLE)
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
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
|
||||
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
|
||||
|
||||
## Vulnerability
|
||||
SUSE offers its [own security advisories][cvrf], and these are utilized when scanning openSUSE/SLE for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
## License
|
||||
Trivy identifies licenses by examining the metadata of RPM packages.
|
||||
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[cvrf]: http://ftp.suse.com/pub/projects/security/cvrf/
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
65
docs/docs/coverage/os/ubuntu.md
Normal file
65
docs/docs/coverage/os/ubuntu.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# Ubuntu
|
||||
Trivy supports these scanners for OS packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :-----------: | :-------: |
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
Please see [here](index.md#supported-os) for supported versions.
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Feature | Supported |
|
||||
|:------------------------------------:|:---------:|
|
||||
| Detect unfixed vulnerabilities | ✓ |
|
||||
| [Dependency graph][dependency-graph] | ✓ |
|
||||
|
||||
## SBOM
|
||||
Same as [Debian](debian.md#sbom).
|
||||
|
||||
## Vulnerability
|
||||
Ubuntu offers its own security advisories, and these are utilized when scanning Ubuntu for vulnerabilities.
|
||||
|
||||
### Data Source
|
||||
See [here](../../scanner/vulnerability.md#data-sources).
|
||||
|
||||
### Fixed Version
|
||||
When looking at fixed versions, it's crucial to consider the patches supplied by Ubuntu.
|
||||
As an illustration, for CVE-2023-3269, the fixed version for Ubuntu 23.04 (lunar) is listed as `6.2.0-26.26` in [the Security Tracker][CVE-2023-3269].
|
||||
It's essential to recognize that this differs from the upstream fixed version, which stands at `6.5`.
|
||||
Typically, only the upstream information gets listed on [NVD][CVE-2023-3269 NVD], so it's important not to get confused.
|
||||
|
||||
### Severity
|
||||
Trivy calculates the severity of an issue based on the 'Priority' metric found in the Security Tracker.
|
||||
If 'Priority' isn't provided by Ubuntu, the severity from the NVD is taken into account.
|
||||
|
||||
Using CVE-2019-15052 as an example, while it is rated as ["Critical" in NVD][CVE-2019-15052 NVD], Ubuntu has marked its "Priority" as ["Medium"][CVE-2019-15052].
|
||||
As a result, Trivy will display it as "Medium".
|
||||
|
||||
### Status
|
||||
Trivy supports the following [vulnerability statuses] for Ubuntu.
|
||||
|
||||
| Status | Supported |
|
||||
| :-----------------: | :-------: |
|
||||
| Fixed | ✓ |
|
||||
| Affected | ✓ |
|
||||
| Under Investigation | |
|
||||
| Will Not Fix | |
|
||||
| Fix Deferred | |
|
||||
| End of Life | |
|
||||
|
||||
## License
|
||||
Same as [Debian](debian.md#license).
|
||||
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[Ubuntu CVE Tracker]: https://ubuntu.com/security/cve
|
||||
|
||||
[CVE-2023-3269]: https://ubuntu.com/security/CVE-2023-3269
|
||||
[CVE-2019-15052]: https://ubuntu.com/security/CVE-2019-15052
|
||||
[CVE-2023-3269 NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-3269
|
||||
[CVE-2019-15052 NVD]: https://nvd.nist.gov/vuln/detail/CVE-2019-15052
|
||||
|
||||
[vulnerability statuses]: ../../configuration/filtering.md#by-status
|
||||
31
docs/docs/coverage/os/wolfi.md
Normal file
31
docs/docs/coverage/os/wolfi.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Wolfi Linux
|
||||
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
|
||||
Wolfi Linux offers its own security advisories, and these are utilized when scanning Wolfi 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
|
||||
[secdb]: https://packages.wolfi.dev/os/security.json
|
||||
@@ -51,7 +51,7 @@ trivy [global flags] command [flags] target
|
||||
* [trivy kubernetes](trivy_kubernetes.md) - [EXPERIMENTAL] Scan kubernetes cluster
|
||||
* [trivy module](trivy_module.md) - Manage modules
|
||||
* [trivy plugin](trivy_plugin.md) - Manage plugins
|
||||
* [trivy repository](trivy_repository.md) - Scan a remote repository
|
||||
* [trivy repository](trivy_repository.md) - Scan a repository
|
||||
* [trivy rootfs](trivy_rootfs.md) - Scan rootfs
|
||||
* [trivy sbom](trivy_sbom.md) - Scan SBOM for vulnerabilities
|
||||
* [trivy server](trivy_server.md) - Server mode
|
||||
|
||||
@@ -65,37 +65,40 @@ trivy aws [flags]
|
||||
### Options
|
||||
|
||||
```
|
||||
--account string The AWS account to scan. It's useful to specify this when reviewing cached results for multiple accounts.
|
||||
--arn string The AWS ARN to show results for. Useful to filter results once a scan is cached.
|
||||
--compliance string compliance report to generate (aws-cis-1.2, aws-cis-1.4)
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify paths to the Rego policy files directory, applying config files
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--endpoint string AWS Endpoint override
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for aws
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
|
||||
--max-cache-age duration The maximum age of the cloud cache. Cached data will be requeried from the cloud provider if it is older than this. (default 24h0m0s)
|
||||
-o, --output string output file name
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--region string AWS Region to scan
|
||||
--report string specify a report format for the output. (all,summary) (default "all")
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--service strings Only scan AWS Service(s) specified with this flag. Can specify multiple services using --service A --service B etc.
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
-t, --template string output template
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--update-cache Update the cache for the applicable cloud provider instead of using cached results.
|
||||
--account string The AWS account to scan. It's useful to specify this when reviewing cached results for multiple accounts.
|
||||
--arn string The AWS ARN to show results for. Useful to filter results once a scan is cached.
|
||||
--compliance string compliance report to generate (aws-cis-1.2,aws-cis-1.4)
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--endpoint string AWS Endpoint override
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for aws
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
|
||||
--max-cache-age duration The maximum age of the cloud cache. Cached data will be requeried from the cloud provider if it is older than this. (default 24h0m0s)
|
||||
-o, --output string output file name
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--region string AWS Region to scan
|
||||
--report string specify a report format for the output (all,summary) (default "all")
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--service strings Only scan AWS Service(s) specified with this flag. Can specify multiple services using --service A --service B etc.
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
--skip-service strings Skip selected AWS Service(s) specified with this flag. Can specify multiple services using --skip-service A --skip-service B etc.
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--update-cache Update the cache for the applicable cloud provider instead of using cached results.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -9,43 +9,45 @@ trivy config [flags] DIR
|
||||
### Options
|
||||
|
||||
```
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify paths to the Rego policy files directory, applying config files
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for config
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
-o, --output string output file name
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--reset-policy-bundle remove policy bundle
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
-t, --template string output template
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for config
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
-o, --output string output file name
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--reset-policy-bundle remove policy bundle
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -22,14 +22,14 @@ 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 (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 enabling the option will output all packages regardless of vulnerability
|
||||
-o, --output string output file name
|
||||
--report string specify a report format for the output. (all,summary) (default "all")
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--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])
|
||||
-t, --template string output template
|
||||
```
|
||||
|
||||
|
||||
@@ -19,68 +19,72 @@ trivy filesystem [flags] PATH
|
||||
### Options
|
||||
|
||||
```
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify paths to the Rego policy files directory, applying config files
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--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 enabling the option will output all packages regardless of vulnerability
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--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,config,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 string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-dev-deps include development dependencies in the report (supported: npm, yarn)
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--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 enabling the option will output all packages regardless of vulnerability
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--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,config,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])
|
||||
--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-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -34,75 +34,78 @@ trivy image [flags] IMAGE_NAME
|
||||
### Options
|
||||
|
||||
```
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate (docker-cis)
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify paths to the Rego policy files directory, applying config files
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-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 string comma-separated list of what security issues to detect on container image configurations (config,secret)
|
||||
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--input string input file path instead of image name
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--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 enabling the option will output all packages regardless of vulnerability
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--platform string set platform in the form os/arch if image is multi-platform capable
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--removed-pkgs detect vulnerabilities of removed packages (only for Alpine)
|
||||
--report string specify a format for the compliance report. (default "summary")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--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,config,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 string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate (docker-cis)
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-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 (config,secret)
|
||||
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--input string input file path instead of image name
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--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 enabling the option will output all packages regardless of vulnerability
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--platform string set platform in the form os/arch if image is multi-platform capable
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--removed-pkgs detect vulnerabilities of removed packages (only for Alpine)
|
||||
--report string specify a format for the compliance report. (all,summary) (default "summary")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--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,config,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])
|
||||
--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-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -31,25 +31,27 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate (k8s-nsa,k8s-cis, k8s-pss-baseline, k8s-pss-restricted)
|
||||
--components strings specify which components to scan (default [workload,infra])
|
||||
--compliance string compliance report to generate (k8s-nsa,k8s-cis,k8s-pss-baseline,k8s-pss-restricted)
|
||||
--components strings specify which components to scan (workload,infra) (default [workload,infra])
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify paths to the Rego policy files directory, applying config files
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--context string specify a context to scan
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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-nodes strings indicate the node labels that the node-collector job should exclude from scanning (example: kubernetes.io/arch:arm64,team:dev)
|
||||
--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, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
|
||||
-f, --format string format (table,json,cyclonedx) (default "table")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-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])
|
||||
@@ -64,29 +66,34 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--parallel int number (between 1-20) of goroutines enabled for parallel scanning (default 5)
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--report string specify a report format for the output (all,summary) (default "all")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners string comma-separated list of what security issues to detect (vuln,config,secret,license) (default "vuln,config,secret,rbac")
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
--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-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--tolerations strings specify node-collector job tolerations (example: key1=value1:NoExecute,key2=value2:NoSchedule)
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
## trivy repository
|
||||
|
||||
Scan a remote repository
|
||||
Scan a repository
|
||||
|
||||
```
|
||||
trivy repository [flags] REPO_URL
|
||||
trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
```
|
||||
|
||||
### Examples
|
||||
@@ -11,74 +11,80 @@ trivy repository [flags] REPO_URL
|
||||
```
|
||||
# Scan your remote git repository
|
||||
$ trivy repo https://github.com/knqyf263/trivy-ci-test
|
||||
# Scan your local git repository
|
||||
$ trivy repo /path/to/your/repository
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--branch string pass the branch name to be scanned
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--commit string pass the commit hash to be scanned
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify paths to the Rego policy files directory, applying config files
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--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 enabling the option will output all packages regardless of vulnerability
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--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,config,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 string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
--tag string pass the tag name to be scanned
|
||||
-t, --template string output template
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
--branch string pass the branch name to be scanned
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--commit string pass the commit hash to be scanned
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-dev-deps include development dependencies in the report (supported: npm, yarn)
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--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 enabling the option will output all packages regardless of vulnerability
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--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,config,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])
|
||||
--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-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
--tag string pass the tag name to be scanned
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -22,67 +22,70 @@ trivy rootfs [flags] ROOTDIR
|
||||
### Options
|
||||
|
||||
```
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify paths to the Rego policy files directory, applying config files
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--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 enabling the option will output all packages regardless of vulnerability
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--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,config,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 string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--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 enabling the option will output all packages regardless of vulnerability
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--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")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--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,config,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])
|
||||
--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-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -31,9 +31,10 @@ trivy sbom [flags] SBOM_PATH
|
||||
--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 (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
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
@@ -48,12 +49,11 @@ trivy sbom [flags] SBOM_PATH
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--reset remove all caches and database
|
||||
--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,config,secret,license) (default [vuln,secret])
|
||||
--server string server address in client mode
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
--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
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
|
||||
@@ -20,30 +20,27 @@ trivy server [flags]
|
||||
### Options
|
||||
|
||||
```
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--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
|
||||
-h, --help help for server
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--listen string listen address in server mode (default "localhost:4954")
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--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
|
||||
--reset remove all caches and database
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--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.
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--enable-modules strings [EXPERIMENTAL] module names to enable
|
||||
-h, --help help for server
|
||||
--listen string listen address in server mode (default "localhost:4954")
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--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
|
||||
--reset remove all caches and database
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--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.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -20,58 +20,61 @@ trivy vm [flags] VM_IMAGE
|
||||
### Options
|
||||
|
||||
```
|
||||
--aws-region string AWS region to scan
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-unfixed display only fixed vulnerabilities
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--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")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--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,config,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 string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
--aws-region string AWS region to scan
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--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")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--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-unfixed display only fixed vulnerabilities
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
|
||||
--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")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--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,config,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])
|
||||
--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
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -243,6 +243,7 @@ rego
|
||||
policy:
|
||||
- policy/repository
|
||||
- policy/custom
|
||||
- policy/some-policy.rego
|
||||
|
||||
# Same as '--config-data'
|
||||
# Default is empty
|
||||
@@ -291,6 +292,11 @@ misconfiguration:
|
||||
vars:
|
||||
- dev-terraform.tfvars
|
||||
- common-terraform.tfvars
|
||||
|
||||
# Same as '--tf-exclude-downloaded-modules'
|
||||
# Default is false
|
||||
terraform:
|
||||
exclude-downloaded-modules: false
|
||||
```
|
||||
|
||||
## Kubernetes Options
|
||||
|
||||
@@ -288,6 +288,48 @@ $ trivy server --listen localhost:8080 --token dummy
|
||||
$ trivy image --server http://localhost:8080 --token dummy alpine:3.10
|
||||
```
|
||||
|
||||
## Endpoints
|
||||
|
||||
### Health
|
||||
Checks whether the Trivy server is running. Authentication is not required.
|
||||
|
||||
Example request:
|
||||
```bash
|
||||
curl -s 0.0.0.0:8080/healthz
|
||||
ok
|
||||
```
|
||||
|
||||
Returns the `200 OK` status if the request was successful.
|
||||
### Version
|
||||
|
||||
Returns the version of the Trivy and all components (db, policy). Authentication is not required.
|
||||
|
||||
Example request:
|
||||
```bash
|
||||
curl -s 0.0.0.0:8080/version | jq
|
||||
{
|
||||
"Version": "dev",
|
||||
"VulnerabilityDB": {
|
||||
"Version": 2,
|
||||
"NextUpdate": "2023-07-25T14:15:29.876639806Z",
|
||||
"UpdatedAt": "2023-07-25T08:15:29.876640206Z",
|
||||
"DownloadedAt": "2023-07-25T09:36:25.599004Z"
|
||||
},
|
||||
"JavaDB": {
|
||||
"Version": 1,
|
||||
"NextUpdate": "2023-07-28T01:03:52.169192565Z",
|
||||
"UpdatedAt": "2023-07-25T01:03:52.169192765Z",
|
||||
"DownloadedAt": "2023-07-25T09:37:48.906152Z"
|
||||
},
|
||||
"PolicyBundle": {
|
||||
"Digest": "sha256:829832357626da2677955e3b427191212978ba20012b6eaa03229ca28569ae43",
|
||||
"DownloadedAt": "2023-07-23T11:40:33.122462Z"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Returns the `200 OK` status if the request was successful.
|
||||
|
||||
## Architecture
|
||||
|
||||

|
||||
|
||||
@@ -17,6 +17,8 @@ License are classified using the [Google License Classification][google-license-
|
||||
As those licenses may be in violation, it is recommended to check those unknown licenses as well.
|
||||
|
||||
By default, Trivy scans licenses for packages installed by `apk`, `apt-get`, `dnf`, `npm`, `pip`, `gem`, etc.
|
||||
Check out [the coverage document][coverage] for details.
|
||||
|
||||
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.
|
||||
|
||||
@@ -29,14 +31,14 @@ To configure the confidence level, you can use `--license-confidence-level`. Thi
|
||||
Currently, the standard license scanning doesn't support filesystem and repository scanning.
|
||||
|
||||
| License scanning | Image | Rootfs | Filesystem | Repository |
|
||||
|:---------------------:|:-----:|:------:|:----------:|:----------:|
|
||||
| :-------------------: | :---: | :----: | :--------: | :--------: |
|
||||
| Standard | ✅ | ✅ | - | - |
|
||||
| Full (--license-full) | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
License checking classifies the identified licenses and map the classification to severity.
|
||||
|
||||
| Classification | Severity |
|
||||
|----------------|----------|
|
||||
| -------------- | -------- |
|
||||
| Forbidden | CRITICAL |
|
||||
| Restricted | HIGH |
|
||||
| Reciprocal | MEDIUM |
|
||||
@@ -143,7 +145,7 @@ Trivy has number of configuration flags for use with license scanning;
|
||||
Trivy license scanning can ignore licenses that are identified to explicitly remove them from the results using the `--ignored-licenses` flag;
|
||||
|
||||
```shell
|
||||
$ trivy image --scanners license --ignored-licenses MPL-2.0,MIT --severity LOW grafana/grafana:latest
|
||||
$ trivy image --scanners license --ignored-licenses MPL-2.0,MIT --severity HIGH grafana/grafana:latest
|
||||
2022-07-13T18:15:28.605Z INFO License scanning is enabled
|
||||
|
||||
OS Packages (license)
|
||||
@@ -343,4 +345,5 @@ license:
|
||||
```
|
||||
|
||||
|
||||
[coverage]: ../coverage/index.md
|
||||
[google-license-classification]: https://opensource.google/documentation/reference/thirdparty/licenses
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Custom policies may require additional data in order to determine an answer.
|
||||
|
||||
For example, an allowed list of resources that can be created.
|
||||
Instead of hardcoding this information inside of your policy, Trivy allows passing paths to data files with the `--data` flag.
|
||||
Instead of hardcoding this information inside your policy, Trivy allows passing paths to data files with the `--data` flag.
|
||||
|
||||
Given the following yaml file:
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
## Overview
|
||||
You can write custom policies in [Rego][rego].
|
||||
Once you finish writing custom policies, you can pass the directory where those policies are stored with `--policy` option.
|
||||
Once you finish writing custom policies, you can pass the policy files or the directory where those policies are stored with `--policy` option.
|
||||
|
||||
``` bash
|
||||
trivy conf --policy /path/to/custom_policies --namespaces user /path/to/config_dir
|
||||
trivy conf --policy /path/to/policy.rego --policy /path/to/custom_policies --namespaces user /path/to/config_dir
|
||||
```
|
||||
|
||||
As for `--namespaces` option, the detail is described as below.
|
||||
@@ -14,7 +14,7 @@ As for `--namespaces` option, the detail is described as below.
|
||||
If a file name matches the following file patterns, Trivy will parse the file and pass it as input to your Rego policy.
|
||||
|
||||
| File format | File pattern |
|
||||
|---------------|-----------------------------------------------------------|
|
||||
| ------------- | --------------------------------------------------------- |
|
||||
| JSON | `*.json` |
|
||||
| YAML | `*.yaml` and `*.yml` |
|
||||
| Dockerfile | `Dockerfile`, `Dockerfile.*`, and `*.Dockerfile` |
|
||||
@@ -125,14 +125,14 @@ schema that will be used is based on the input document type. It is recommended
|
||||
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.input.selector.type | Any item(s) in [this list][source-types] | | :material-close: | :material-check: |
|
||||
| custom.recommended_actions | Any characters | | :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: |
|
||||
|
||||
|
||||
@@ -178,6 +178,7 @@ You can specify input format via the `custom.input` annotation.
|
||||
Even if a Dockerfile exists in the specified directory, it will not be passed to the policy as input.
|
||||
|
||||
Possible values for input types are:
|
||||
|
||||
- `dockerfile` (Dockerfile)
|
||||
- `kubernetes` (Kubernetes YAML/JSON)
|
||||
- `rbac` (Kubernetes RBAC YAML/JSON)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user