mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-08 22:00:46 -08:00
Compare commits
115 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
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
|
||||
|
||||
@@ -1,24 +1,6 @@
|
||||
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
|
||||
4
.github/DISCUSSION_TEMPLATE/bugs.yml
vendored
4
.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:
|
||||
@@ -119,4 +121,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).
|
||||
@@ -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.
|
||||
|
||||
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.`);
|
||||
}
|
||||
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.5.3
|
||||
uses: actions/checkout@v3.6.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.5.3
|
||||
uses: actions/checkout@v3.6.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@v3.5.3
|
||||
uses: actions/checkout@v3.6.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@fa81e57adff234b2908110485695db0f181f3c67
|
||||
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@v3.5.3
|
||||
uses: actions/checkout@v3.6.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install chart-releaser
|
||||
|
||||
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3.5.3
|
||||
uses: actions/checkout@v3.6.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
sudo apt-get -y install rpm reprepro createrepo-c distro-info
|
||||
|
||||
- name: Checkout trivy-repo
|
||||
uses: actions/checkout@v3.5.3
|
||||
uses: actions/checkout@v3.6.0
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/trivy-repo
|
||||
path: trivy-repo
|
||||
|
||||
13
.github/workflows/reusable-release.yaml
vendored
13
.github/workflows/reusable-release.yaml
vendored
@@ -26,8 +26,17 @@ 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@ef0e9691595ea19ec990a46b1a591dcafe568f34
|
||||
uses: sigstore/cosign-installer@4a861528be5e691840a69536975ada1d4c30349d
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
@@ -60,7 +69,7 @@ jobs:
|
||||
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3.5.3
|
||||
uses: actions/checkout@v3.6.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
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.5.3
|
||||
uses: actions/checkout@v3.6.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
|
||||
|
||||
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.5.3
|
||||
uses: actions/checkout@v3.6.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
|
||||
24
.github/workflows/test.yaml
vendored
24
.github/workflows/test.yaml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v3.5.3
|
||||
- uses: actions/checkout@v3.6.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v3.6.0
|
||||
uses: golangci/golangci-lint-action@v3.7.0
|
||||
with:
|
||||
version: v1.52
|
||||
args: --deadline=30m
|
||||
@@ -71,7 +71,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3.5.3
|
||||
uses: actions/checkout@v3.6.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3.5.3
|
||||
uses: actions/checkout@v3.6.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.5.3
|
||||
uses: actions/checkout@v3.6.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -133,7 +133,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.5.3
|
||||
uses: actions/checkout@v3.6.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -156,8 +156,18 @@ jobs:
|
||||
env:
|
||||
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
||||
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'
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.5.3
|
||||
uses: actions/checkout@v3.6.0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
|
||||
@@ -43,7 +43,7 @@ linters:
|
||||
- misspell
|
||||
|
||||
run:
|
||||
go: 1.19
|
||||
go: '1.20'
|
||||
skip-files:
|
||||
- ".*._mock.go$"
|
||||
- ".*._test.go$"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.18.2
|
||||
FROM alpine:3.18.3
|
||||
RUN apk --no-cache add ca-certificates git
|
||||
COPY trivy /usr/local/bin/trivy
|
||||
COPY contrib/*.tpl contrib/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.18.2
|
||||
FROM alpine:3.18.3
|
||||
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
|
||||
|
||||
@@ -7,12 +7,14 @@ cd trivy-repo/deb
|
||||
|
||||
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
echo "Removing deb package of $release"
|
||||
reprepro -A i386 remove $release trivy
|
||||
reprepro -A amd64 remove $release trivy
|
||||
reprepro -A arm64 remove $release trivy
|
||||
done
|
||||
|
||||
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
echo "Adding deb package to $release"
|
||||
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
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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.
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -62,6 +62,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 +248,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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
8
docs/docs/coverage/index.md
Normal file
8
docs/docs/coverage/index.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# 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)
|
||||
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
|
||||
34
docs/docs/coverage/language/dotnet.md
Normal file
34
docs/docs/coverage/language/dotnet.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# .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.
|
||||
|
||||
### 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.
|
||||
|
||||
|
||||
[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
|
||||
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 | License |
|
||||
|------------------|:---------------------:|:-----------------|:-------:|
|
||||
| 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](#npm) | ✅ | ✅ | ✅ |
|
||||
| Yarn | yarn.lock | ✅ | [Excluded](#yarn) | ✅ | ✅ | - |
|
||||
| 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.
|
||||
@@ -33,10 +42,13 @@ By default, Trivy doesn't report development dependencies. Use the `--include-de
|
||||
|
||||
### 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.
|
||||
@@ -45,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,38 +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
|
||||
--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-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,69 +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-dev-deps include development dependencies in the report (supported: npm)
|
||||
--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, cyclonedx) (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])
|
||||
@@ -65,6 +67,7 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
|
||||
-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
|
||||
@@ -72,20 +75,21 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
|
||||
--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
|
||||
|
||||
@@ -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")
|
||||
@@ -49,10 +50,10 @@ trivy sbom [flags] SBOM_PATH
|
||||
--reset remove all caches and database
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--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,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,22 +2,19 @@
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
!!! Tip
|
||||
Note: The `--policy` path always needs to refer to a directory. You cannot pass a specific policy file.
|
||||
|
||||
As for `--namespaces` option, the detail is described as below.
|
||||
|
||||
### File formats
|
||||
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` |
|
||||
@@ -128,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: |
|
||||
|
||||
|
||||
@@ -181,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)
|
||||
|
||||
@@ -83,8 +83,7 @@ The policies can be placed in a structure as follows
|
||||
└── barschema.json
|
||||
```
|
||||
|
||||
To use such a policy with Trivy, use the `--config-policy` flag that points to the directory where the schemas and policies
|
||||
are contained.
|
||||
To use such a policy with Trivy, use the `--config-policy` flag that points to the policy file or to the directory where the schemas and policies are contained.
|
||||
|
||||
```bash
|
||||
$ trivy --config-policy=/Users/user/my-custom-policies <path/to/iac>
|
||||
|
||||
@@ -316,19 +316,18 @@ This section describes misconfiguration-specific configuration.
|
||||
Other common options are documented [here](../../configuration/index.md).
|
||||
|
||||
### Pass custom policies
|
||||
You can pass directories including your custom policies through `--policy` option.
|
||||
This can be repeated for specifying multiple directories.
|
||||
You can pass policy files or directories including your custom policies through `--policy` option.
|
||||
This can be repeated for specifying multiple files or directories.
|
||||
|
||||
```bash
|
||||
cd examplex/misconf/
|
||||
trivy conf --policy custom-policy/policy --policy combine/policy --namespaces user misconf/mixed
|
||||
trivy conf --policy custom-policy/policy --policy combine/policy --policy policy.rego --namespaces user misconf/mixed
|
||||
```
|
||||
|
||||
For more details, see [Custom Policies](./custom/index.md).
|
||||
|
||||
!!! tip
|
||||
You also need to specify `--namespaces` option.
|
||||
Furthermore, the `--policy` path always needs to refer to a directory. You cannot pass a specific policy file.
|
||||
You also need to specify `--namespaces` option.
|
||||
|
||||
### Pass custom data
|
||||
You can pass directories including your custom data through `--data` option.
|
||||
@@ -350,49 +349,4 @@ This can be repeated for specifying multiple packages.
|
||||
trivy conf --policy ./policy --namespaces main --namespaces user ./configs
|
||||
```
|
||||
|
||||
### Terraform value overrides
|
||||
You can pass `tf-vars` files to Trivy to override default values found in the Terraform HCL code.
|
||||
|
||||
```bash
|
||||
trivy conf --tf-vars dev.terraform.tfvars ./infrastructure/tf
|
||||
```
|
||||
|
||||
### Helm 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
|
||||
```
|
||||
|
||||
[custom]: custom/index.md
|
||||
@@ -1,23 +1,12 @@
|
||||
# Built-in Policies
|
||||
|
||||
## Policy Sources
|
||||
|
||||
Built-in policies are mainly written in [Rego][rego] and Go.
|
||||
Those policies are managed under [defsec repository][defsec].
|
||||
|
||||
| Config type | Source |
|
||||
|---------------------------|----------------------|
|
||||
| Kubernetes | [defsec][kubernetes] |
|
||||
| Dockerfile, Containerfile | [defsec][docker] |
|
||||
| Terraform | [defsec][defsec] |
|
||||
| CloudFormation | [defsec][defsec] |
|
||||
| Azure ARM Template | [defsec][defsec] |
|
||||
| Helm Chart | [defsec][kubernetes] |
|
||||
See [here](../../../coverage/iac/index.md) for the list of supported config types.
|
||||
|
||||
For suggestions or issues regarding policy content, please open an issue under the [defsec][defsec] repository.
|
||||
|
||||
Helm Chart scanning will resolve the chart to Kubernetes manifests then run the [kubernetes][kubernetes] checks.
|
||||
|
||||
## Policy Distribution
|
||||
defsec policies are distributed as an OPA bundle on [GitHub Container Registry][ghcr] (GHCR).
|
||||
When misconfiguration detection is enabled, Trivy pulls the OPA bundle from GHCR as an OCI artifact and stores it in the cache.
|
||||
@@ -28,7 +17,8 @@ If Trivy is unable to pull down newer policies, it will use the embedded set of
|
||||
Trivy checks for updates to OPA bundle on GHCR every 24 hours and pulls it if there are any updates.
|
||||
|
||||
[rego]: https://www.openpolicyagent.org/docs/latest/policy-language/
|
||||
|
||||
[kubernetes-policies]: https://github.com/aquasecurity/defsec/tree/master/rules/kubernetes/policies
|
||||
[docker-policies]: https://github.com/aquasecurity/defsec/tree/master/rules/docker/policies
|
||||
[defsec]: https://github.com/aquasecurity/defsec
|
||||
[kubernetes]: https://github.com/aquasecurity/defsec/tree/master/rules/kubernetes/policies
|
||||
[docker]: https://github.com/aquasecurity/defsec/tree/master/rules/docker/policies
|
||||
[ghcr]: https://github.com/aquasecurity/defsec/pkgs/container/defsec
|
||||
[ghcr]: https://github.com/aquasecurity/defsec/pkgs/container/defsec
|
||||
182
docs/docs/scanner/vulnerability.md
Normal file
182
docs/docs/scanner/vulnerability.md
Normal file
@@ -0,0 +1,182 @@
|
||||
# Vulnerability Scanning
|
||||
Trivy detects known vulnerabilities according to the versions of installed packages.
|
||||
|
||||
The following packages are supported.
|
||||
|
||||
- [OS packages](#os-packages)
|
||||
- [Language-specific packages](#language-specific-packages)
|
||||
|
||||
## OS Packages
|
||||
Trivy is capable of automatically detecting installed OS packages when scanning container images, VM images and running hosts.
|
||||
|
||||
!!! note
|
||||
Trivy doesn't support third-party/self-compiled packages/binaries, but official packages provided by vendors such as Red Hat and Debian.
|
||||
|
||||
### Supported OS
|
||||
See [here](../coverage/os/index.md#supported-os) for the supported OSes.
|
||||
|
||||
### Data Sources
|
||||
|
||||
| OS | Source |
|
||||
| ------------- | ------------------------------------------------------------ |
|
||||
| Arch Linux | [Vulnerable Issues][arch] |
|
||||
| Alpine Linux | [secdb][alpine] |
|
||||
| Wolfi Linux | [secdb][wolfi] |
|
||||
| Chainguard | [secdb][chainguard] |
|
||||
| Amazon Linux | [Amazon Linux Security Center][amazon] |
|
||||
| Debian | [Security Bug Tracker][debian-tracker] / [OVAL][debian-oval] |
|
||||
| Ubuntu | [Ubuntu CVE Tracker][ubuntu] |
|
||||
| RHEL/CentOS | [OVAL][rhel-oval] / [Security Data][rhel-api] |
|
||||
| AlmaLinux | [AlmaLinux Product Errata][alma] |
|
||||
| Rocky Linux | [Rocky Linux UpdateInfo][rocky] |
|
||||
| Oracle Linux | [OVAL][oracle] |
|
||||
| CBL-Mariner | [OVAL][mariner] |
|
||||
| OpenSUSE/SLES | [CVRF][suse] |
|
||||
| Photon OS | [Photon Security Advisory][photon] |
|
||||
|
||||
#### Data Source Selection
|
||||
Trivy **only** consumes security advisories from the sources listed in the above table.
|
||||
|
||||
As for packages installed from OS package managers (`dpkg`, `yum`, `apk`, etc.), Trivy uses the advisory database from the appropriate **OS vendor**.
|
||||
|
||||
For example: for a python package installed from `yum` (Amazon linux), Trivy will only get advisories from [ALAS][amazon].
|
||||
But for a python package installed from another source (e.g. `pip`), Trivy will get advisories from the `GitLab` and `GitHub` databases.
|
||||
|
||||
This advisory selection is essential to avoid getting false positives because OS vendors usually backport upstream fixes, and the fixed version can be different from the upstream fixed version.
|
||||
|
||||
#### Severity Selection
|
||||
The severity is taken from the selected data source since the severity from vendors is more accurate.
|
||||
Using CVE-2023-0464 as an example, while it is [rated as "HIGH" in NVD][nvd-CVE-2023-0464], Red Hat has marked its 'Impact' as ["Low"][redhat-CVE-2023-0464].
|
||||
As a result, Trivy will display it as "Low".
|
||||
|
||||
The severity depends on the compile option, the default configuration, etc.
|
||||
NVD doesn't know how the vendor distributes the software.
|
||||
Red Hat evaluates the severity more accurately.
|
||||
That's why Trivy prefers vendor scores over NVD.
|
||||
|
||||
If the data source does not provide a severity, the severity is determined based on the CVSS score as follows:
|
||||
|
||||
| Base Score Range | Severity |
|
||||
| ---------------- | -------- |
|
||||
| 0.1-3.9 | Low |
|
||||
| 4.0-6.9 | Medium |
|
||||
| 7.0-8.9 | High |
|
||||
| 9.0-10.0 | Critical |
|
||||
|
||||
If the CVSS score is also not provided, it falls back to [NVD][nvd], and if NVD does not have severity, it will be UNKNOWN.
|
||||
|
||||
### Unfixed Vulnerabilities
|
||||
The unfixed/unfixable vulnerabilities mean that the patch has not yet been provided on their distribution.
|
||||
To hide unfixed/unfixable vulnerabilities, you can use the `--ignore-unfixed` flag.
|
||||
|
||||
## Language-specific Packages
|
||||
|
||||
### Supported Languages
|
||||
See [here](../coverage/language/index.md#supported-languages) for the supported languages.
|
||||
|
||||
### Data Sources
|
||||
|
||||
| Language | Source | Commercial Use | Delay[^1] |
|
||||
|----------|-----------------------------------------------------|:--------------:|:---------:|
|
||||
| PHP | [PHP Security Advisories Database][php] | ✅ | - |
|
||||
| | [GitHub Advisory Database (Composer)][php-ghsa] | ✅ | - |
|
||||
| Python | [GitHub Advisory Database (pip)][python-ghsa] | ✅ | - |
|
||||
| | [Open Source Vulnerabilities (PyPI)][python-osv] | ✅ | - |
|
||||
| Ruby | [Ruby Advisory Database][ruby] | ✅ | - |
|
||||
| | [GitHub Advisory Database (RubyGems)][ruby-ghsa] | ✅ | - |
|
||||
| Node.js | [Ecosystem Security Working Group][nodejs] | ✅ | - |
|
||||
| | [GitHub Advisory Database (npm)][nodejs-ghsa] | ✅ | - |
|
||||
| Java | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
||||
| | [GitHub Advisory Database (Maven)][java-ghsa] | ✅ | - |
|
||||
| Go | [GitHub Advisory Database (Go)][go-ghsa] | ✅ | - |
|
||||
| Rust | [Open Source Vulnerabilities (crates.io)][rust-osv] | ✅ | - |
|
||||
| .NET | [GitHub Advisory Database (NuGet)][dotnet-ghsa] | ✅ | - |
|
||||
| C/C++ | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
||||
| Dart | [GitHub Advisory Database (Pub)][pub-ghsa] | ✅ | - |
|
||||
| Elixir | [GitHub Advisory Database (Erlang)][erlang-ghsa] | ✅ | - |
|
||||
| Swift | [GitHub Advisory Database (Swift)][swift-ghsa] | ✅ | - |
|
||||
|
||||
[^1]: Intentional delay between vulnerability disclosure and registration in the DB
|
||||
|
||||
## Database
|
||||
Trivy downloads [the vulnerability database](https://github.com/aquasecurity/trivy-db) every 6 hours.
|
||||
Trivy uses two types of databases for vulnerability detection:
|
||||
|
||||
- Vulnerability Database
|
||||
- Java Index Database
|
||||
|
||||
This page provides detailed information about these databases.
|
||||
|
||||
### Vulnerability Database
|
||||
Trivy utilizes a database containing vulnerability information.
|
||||
This database is built every six hours on [GitHub](https://github.com/aquasecurity/trivy-db) and is distributed via [GitHub Container registry (GHCR)](https://ghcr.io/aquasecurity/trivy-db).
|
||||
The database is cached and updated as needed.
|
||||
As Trivy updates the database automatically during execution, users don't need to be concerned about it.
|
||||
|
||||
For CLI flags related to the database, please refer to [this page](../configuration/db.md).
|
||||
|
||||
#### Private Hosting
|
||||
If you host the database on your own OCI registry, you can specify a different repository with the `--db-repository` flag.
|
||||
The default is `ghcr.io/aquasecurity/trivy-db`.
|
||||
|
||||
```shell
|
||||
$ trivy image --db-repository YOUR_REPO YOUR_IMAGE
|
||||
```
|
||||
|
||||
If authentication is required, it can be configured in the same way as for private images.
|
||||
Please refer to [the documentation](../advanced/private-registries/index.md) for more details.
|
||||
|
||||
### Java Index Database
|
||||
This database is only downloaded when scanning JAR files so that Trivy can identify the groupId, artifactId, and version of JAR files.
|
||||
It is built once a day on [GitHub](https://github.com/aquasecurity/trivy-java-db) and distributed via [GitHub Container registry (GHCR)](https://ghcr.io/aquasecurity/trivy-java-db).
|
||||
Like the vulnerability database, it is automatically downloaded and updated when needed, so users don't need to worry about it.
|
||||
|
||||
#### Private Hosting
|
||||
If you host the database on your own OCI registry, you can specify a different repository with the `--java-db-repository` flag.
|
||||
The default is `ghcr.io/aquasecurity/trivy-java-db`.
|
||||
|
||||
If authentication is required, you need to run `docker login YOUR_REGISTRY`.
|
||||
Currently, specifying a username and password is not supported.
|
||||
|
||||
[^1]: https://github.com/GoogleContainerTools/distroless
|
||||
|
||||
[nvd-CVE-2023-0464]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
|
||||
[redhat-CVE-2023-0464]: https://access.redhat.com/security/cve/cve-2023-0464
|
||||
|
||||
[arch]: https://security.archlinux.org/
|
||||
[alpine]: https://secdb.alpinelinux.org/
|
||||
[wolfi]: https://packages.wolfi.dev/os/security.json
|
||||
[chainguard]: https://packages.cgr.dev/chainguard/security.json
|
||||
[amazon]: https://alas.aws.amazon.com/
|
||||
[debian-tracker]: https://security-tracker.debian.org/tracker/
|
||||
[debian-oval]: https://www.debian.org/security/oval/
|
||||
[ubuntu]: https://ubuntu.com/security/cve
|
||||
[rhel-oval]: https://www.redhat.com/security/data/oval/v2/
|
||||
[rhel-api]: https://www.redhat.com/security/data/metrics/
|
||||
[alma]: https://errata.almalinux.org/
|
||||
[rocky]: https://download.rockylinux.org/pub/rocky/
|
||||
[oracle]: https://linux.oracle.com/security/oval/
|
||||
[suse]: http://ftp.suse.com/pub/projects/security/cvrf/
|
||||
[photon]: https://packages.vmware.com/photon/photon_cve_metadata/
|
||||
[mariner]: https://github.com/microsoft/CBL-MarinerVulnerabilityData/
|
||||
|
||||
[php-ghsa]: https://github.com/advisories?query=ecosystem%3Acomposer
|
||||
[python-ghsa]: https://github.com/advisories?query=ecosystem%3Apip
|
||||
[ruby-ghsa]: https://github.com/advisories?query=ecosystem%3Arubygems
|
||||
[nodejs-ghsa]: https://github.com/advisories?query=ecosystem%3Anpm
|
||||
[java-ghsa]: https://github.com/advisories?query=ecosystem%3Amaven
|
||||
[dotnet-ghsa]: https://github.com/advisories?query=ecosystem%3Anuget
|
||||
[pub-ghsa]: https://github.com/advisories?query=ecosystem%3Apub
|
||||
[erlang-ghsa]: https://github.com/advisories?query=ecosystem%3Aerlang
|
||||
[go-ghsa]: https://github.com/advisories?query=ecosystem%3Ago
|
||||
[swift-ghsa]: https://github.com/advisories?query=ecosystem%3Aswift
|
||||
|
||||
[php]: https://github.com/FriendsOfPHP/security-advisories
|
||||
[ruby]: https://github.com/rubysec/ruby-advisory-db
|
||||
[nodejs]: https://github.com/nodejs/security-wg
|
||||
[gitlab]: https://gitlab.com/gitlab-org/advisories-community
|
||||
|
||||
[python-osv]: https://osv.dev/list?q=&ecosystem=PyPI
|
||||
[rust-osv]: https://osv.dev/list?q=&ecosystem=crates.io
|
||||
|
||||
[nvd]: https://nvd.nist.gov/vuln
|
||||
@@ -1,51 +0,0 @@
|
||||
# Vulnerability Scanning
|
||||
|
||||
## Overview
|
||||
This section describes the overview of vulnerability scanning.
|
||||
Trivy detects known vulnerabilities according to the versions of installed packages.
|
||||
|
||||
The following packages are supported.
|
||||
|
||||
- [OS packages](os.md)
|
||||
- [Language-specific packages](language/index.md)
|
||||
|
||||
Trivy downloads [the vulnerabillity database](https://github.com/aquasecurity/trivy-db) every 6 hours.
|
||||
|
||||
## Database
|
||||
Trivy uses two types of databases for vulnerability detection:
|
||||
|
||||
- Vulnerability Database
|
||||
- Java Index Database
|
||||
|
||||
This page provides detailed information about these databases.
|
||||
|
||||
### Vulnerability Database
|
||||
Trivy utilizes a database containing vulnerability information.
|
||||
This database is built every six hours on [GitHub](https://github.com/aquasecurity/trivy-db) and is distributed via [GitHub Container registry (GHCR)](https://ghcr.io/aquasecurity/trivy-db).
|
||||
The database is cached and updated as needed.
|
||||
As Trivy updates the database automatically during execution, users don't need to be concerned about it.
|
||||
|
||||
For CLI flags related to the database, please refer to [this page](../../configuration/db.md).
|
||||
|
||||
#### Private Hosting
|
||||
If you host the database on your own OCI registry, you can specify a different repository with the `--db-repository` flag.
|
||||
The default is `ghcr.io/aquasecurity/trivy-db`.
|
||||
|
||||
```shell
|
||||
$ trivy image --db-repository YOUR_REPO YOUR_IMAGE
|
||||
```
|
||||
|
||||
If authentication is required, it can be configured in the same way as for private images.
|
||||
Please refer to [the documentation](../../advanced/private-registries/index.md) for more details.
|
||||
|
||||
### Java Index Database
|
||||
This database is only downloaded when scanning JAR files so that Trivy can identify the groupId, artifactId, and version of JAR files.
|
||||
It is built once a day on [GitHub](https://github.com/aquasecurity/trivy-java-db) and distributed via [GitHub Container registry (GHCR)](https://ghcr.io/aquasecurity/trivy-java-db).
|
||||
Like the vulnerability database, it is automatically downloaded and updated when needed, so users don't need to worry about it.
|
||||
|
||||
#### Private Hosting
|
||||
If you host the database on your own OCI registry, you can specify a different repository with the `--java-db-repository` flag.
|
||||
The default is `ghcr.io/aquasecurity/trivy-java-db`.
|
||||
|
||||
If authentication is required, you need to run `docker login YOUR_REGISTRY`.
|
||||
Currently, specifying a username and password is not supported.
|
||||
@@ -1,94 +0,0 @@
|
||||
# Language-specific Packages
|
||||
|
||||
`Trivy` automatically detects the following files and scans vulnerabilities in the application dependencies.
|
||||
|
||||
## Supported languages
|
||||
|
||||
| Language | File | Image[^7] | Rootfs[^8] | Filesystem[^9] | Repository[^10] | Dev dependencies | Dependency location[^11] |
|
||||
|----------------------|--------------------------------------------------------------------------------------------|:---------:|:----------:|:--------------:|:---------------:|------------------------------|:------------------------:|
|
||||
| Ruby | Gemfile.lock | - | - | ✅ | ✅ | included | - |
|
||||
| | gemspec | ✅ | ✅ | - | - | included | - |
|
||||
| [Python](python.md) | Pipfile.lock | - | - | ✅ | ✅ | excluded | ✅ |
|
||||
| | poetry.lock | - | - | ✅ | ✅ | excluded | - |
|
||||
| | requirements.txt | - | - | ✅ | ✅ | included | - |
|
||||
| | egg package[^1] | ✅ | ✅ | - | - | excluded | - |
|
||||
| | wheel package[^2] | ✅ | ✅ | - | - | excluded | - |
|
||||
| [PHP](php.md) | composer.lock | ✅ | ✅ | ✅ | ✅ | excluded | ✅ |
|
||||
| [Node.js](nodejs.md) | package-lock.json | - | - | ✅ | ✅ | [excluded](./nodejs.md#npm) | ✅ |
|
||||
| | yarn.lock | - | - | ✅ | ✅ | [excluded](./nodejs.md#yarn) | ✅ |
|
||||
| | pnpm-lock.yaml | - | - | ✅ | ✅ | excluded | - |
|
||||
| | package.json | ✅ | ✅ | - | - | excluded | - |
|
||||
| .NET | packages.lock.json | ✅ | ✅ | ✅ | ✅ | included | ✅ |
|
||||
| | packages.config | ✅ | ✅ | ✅ | ✅ | excluded | - |
|
||||
| | .deps.json | ✅ | ✅ | ✅ | ✅ | excluded | ✅ |
|
||||
| [Java](java.md) | JAR/WAR/PAR/EAR[^3] | ✅ | ✅ | - | - | included | - |
|
||||
| | pom.xml[^4] | - | - | ✅ | ✅ | excluded | - |
|
||||
| | *gradle.lockfile | - | - | ✅ | ✅ | excluded | - |
|
||||
| [Go](golang.md) | Binaries built by Go[^5] | ✅ | ✅ | - | - | excluded | - |
|
||||
| | go.mod[^6] | - | - | ✅ | ✅ | included | - |
|
||||
| [Rust](rust.md) | Cargo.lock | ✅ | ✅ | ✅ | ✅ | excluded | ✅ |
|
||||
| | Binaries built with [cargo-auditable](https://github.com/rust-secure-code/cargo-auditable) | ✅ | ✅ | - | - | excluded | - |
|
||||
| C/C++ | conan.lock[^12] | - | - | ✅ | ✅ | excluded | - |
|
||||
| Elixir | mix.lock[^12] | - | - | ✅ | ✅ | excluded | ✅ |
|
||||
| Dart | pubspec.lock | - | - | ✅ | ✅ | included | - |
|
||||
|
||||
The path of these files does not matter.
|
||||
|
||||
Example: [Dockerfile](https://github.com/aquasecurity/trivy-ci-test/blob/main/Dockerfile)
|
||||
|
||||
[^1]: `*.egg-info`, `*.egg-info/PKG-INFO`, `*.egg` and `EGG-INFO/PKG-INFO`
|
||||
[^2]: `.dist-info/META-DATA`
|
||||
[^3]: `*.jar`, `*.war`, `*.par` and `*.ear`
|
||||
[^4]: It requires Internet access when the POM doesn't exist in your local repository
|
||||
[^5]: UPX-compressed binaries don't work
|
||||
[^6]: If smaller than go 1.17, go.sum is also required
|
||||
[^7]: ✅ means "enabled" and `-` means "disabled" in the image scanning
|
||||
[^8]: ✅ means "enabled" and `-` means "disabled" in the rootfs scanning
|
||||
[^9]: ✅ means "enabled" and `-` means "disabled" in the filesystem scanning
|
||||
[^10]: ✅ means "enabled" and `-` means "disabled" in the git repository scanning
|
||||
[^11]: ✅ 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
|
||||
[^12]: To scan a filename other than the default filename use [file-patterns](../../../configuration/others.md#file-patterns)
|
||||
[^13]: When you scan `Cargo.lock` and `Cargo.toml` together. See about it [here](./rust.md#cargo).
|
||||
|
||||
## Data Sources
|
||||
|
||||
| Language | Source | Commercial Use | Delay[^1] |
|
||||
|----------|-----------------------------------------------------|:--------------:|:---------:|
|
||||
| PHP | [PHP Security Advisories Database][php] | ✅ | - |
|
||||
| | [GitHub Advisory Database (Composer)][php-ghsa] | ✅ | - |
|
||||
| Python | [GitHub Advisory Database (pip)][python-ghsa] | ✅ | - |
|
||||
| | [Open Source Vulnerabilities (PyPI)][python-osv] | ✅ | - |
|
||||
| Ruby | [Ruby Advisory Database][ruby] | ✅ | - |
|
||||
| | [GitHub Advisory Database (RubyGems)][ruby-ghsa] | ✅ | - |
|
||||
| Node.js | [Ecosystem Security Working Group][nodejs] | ✅ | - |
|
||||
| | [GitHub Advisory Database (npm)][nodejs-ghsa] | ✅ | - |
|
||||
| Java | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
||||
| | [GitHub Advisory Database (Maven)][java-ghsa] | ✅ | - |
|
||||
| Go | [GitHub Advisory Database (Go)][go-ghsa] | ✅ | - |
|
||||
| | [The Go Vulnerability Database][go] | ✅ | - |
|
||||
| Rust | [Open Source Vulnerabilities (crates.io)][rust-osv] | ✅ | - |
|
||||
| .NET | [GitHub Advisory Database (NuGet)][dotnet-ghsa] | ✅ | - |
|
||||
| C/C++ | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
||||
| Dart | [GitHub Advisory Database (Pub)][pub-ghsa] | ✅ | - |
|
||||
| Elixir | [GitHub Advisory Database (Erlang)][erlang-ghsa] | ✅ | |
|
||||
|
||||
[^1]: Intentional delay between vulnerability disclosure and registration in the DB
|
||||
|
||||
[php-ghsa]: https://github.com/advisories?query=ecosystem%3Acomposer
|
||||
[python-ghsa]: https://github.com/advisories?query=ecosystem%3Apip
|
||||
[ruby-ghsa]: https://github.com/advisories?query=ecosystem%3Arubygems
|
||||
[nodejs-ghsa]: https://github.com/advisories?query=ecosystem%3Anpm
|
||||
[java-ghsa]: https://github.com/advisories?query=ecosystem%3Amaven
|
||||
[dotnet-ghsa]: https://github.com/advisories?query=ecosystem%3Anuget
|
||||
[pub-ghsa]: https://github.com/advisories?query=ecosystem%3Apub
|
||||
[erlang-ghsa]: https://github.com/advisories?query=ecosystem%3Aerlang
|
||||
[go-ghsa]: https://github.com/advisories?query=ecosystem%3Ago
|
||||
|
||||
[php]: https://github.com/FriendsOfPHP/security-advisories
|
||||
[ruby]: https://github.com/rubysec/ruby-advisory-db
|
||||
[nodejs]: https://github.com/nodejs/security-wg
|
||||
[gitlab]: https://gitlab.com/gitlab-org/advisories-community
|
||||
[go]: https://github.com/golang/vulndb
|
||||
|
||||
[python-osv]: https://osv.dev/list?q=&ecosystem=PyPI
|
||||
[rust-osv]: https://osv.dev/list?q=&ecosystem=crates.io
|
||||
@@ -1,136 +0,0 @@
|
||||
# OS Packages
|
||||
Trivy is capable of automatically detecting installed OS packages when scanning container images, VM images and running hosts.
|
||||
This page provides an overview of OS packages in the context of Trivy scans.
|
||||
|
||||
## Supported OS
|
||||
|
||||
The unfixed/unfixable vulnerabilities mean that the patch has not yet been provided on their distribution.
|
||||
To hide unfixed/unfixable vulnerabilities, you can use the `--ignore-unfixed` flag.
|
||||
|
||||
Trivy doesn't support self-compiled packages/binaries, but official packages provided by vendors such as Red Hat and Debian.
|
||||
|
||||
| OS | Supported Versions | Target Packages | Detection of unfixed vulnerabilities |
|
||||
|----------------------------------|-------------------------------------|-------------------------------|:------------------------------------:|
|
||||
| Alpine Linux | 2.2 - 2.7, 3.0 - 3.18, edge | Installed by apk | NO |
|
||||
| Wolfi Linux | (n/a) | Installed by apk | NO |
|
||||
| Chainguard | (n/a) | Installed by apk | NO |
|
||||
| Red Hat Universal Base Image[^1] | 7, 8, 9 | Installed by yum/rpm | YES |
|
||||
| Red Hat Enterprise Linux | 6, 7, 8 | Installed by yum/rpm | YES |
|
||||
| CentOS | 6, 7, 8 | Installed by yum/rpm | YES |
|
||||
| AlmaLinux | 8, 9 | Installed by yum/rpm | NO |
|
||||
| Rocky Linux | 8, 9 | Installed by yum/rpm | NO |
|
||||
| Oracle Linux | 5, 6, 7, 8 | Installed by yum/rpm | NO |
|
||||
| CBL-Mariner | 1.0, 2.0 | Installed by yum/rpm | YES |
|
||||
| Amazon Linux | 1, 2, 2023 | Installed by yum/rpm | NO |
|
||||
| openSUSE Leap | 42, 15 | Installed by zypper/rpm | NO |
|
||||
| SUSE Enterprise Linux | 11, 12, 15 | Installed by zypper/rpm | NO |
|
||||
| Photon OS | 1.0, 2.0, 3.0, 4.0 | Installed by tdnf/yum/rpm | NO |
|
||||
| Debian GNU/Linux | 7, 8, 9, 10, 11, 12 | Installed by apt/apt-get/dpkg | YES |
|
||||
| Ubuntu | All versions supported by Canonical | Installed by apt/apt-get/dpkg | YES |
|
||||
| Distroless[^2] | Any | Installed by apt/apt-get/dpkg | YES |
|
||||
|
||||
## Data Sources
|
||||
|
||||
| OS | Source |
|
||||
|---------------|----------------------------------------|
|
||||
| Arch Linux | [Vulnerable Issues][arch] |
|
||||
| Alpine Linux | [secdb][alpine] |
|
||||
| Wolfi Linux | [secdb][wolfi] |
|
||||
| Chainguard | [secdb][chainguard] |
|
||||
| Amazon Linux | [Amazon Linux Security Center][amazon] |
|
||||
| Debian | [Security Bug Tracker][debian-tracker] |
|
||||
| | [OVAL][debian-oval] |
|
||||
| Ubuntu | [Ubuntu CVE Tracker][ubuntu] |
|
||||
| RHEL/CentOS | [OVAL][rhel-oval] |
|
||||
| | [Security Data][rhel-api] |
|
||||
| AlmaLinux | [AlmaLinux Product Errata][alma] |
|
||||
| Rocky Linux | [Rocky Linux UpdateInfo][rocky] |
|
||||
| Oracle Linux | [OVAL][oracle] |
|
||||
| CBL-Mariner | [OVAL][mariner] |
|
||||
| OpenSUSE/SLES | [CVRF][suse] |
|
||||
| Photon OS | [Photon Security Advisory][photon] |
|
||||
|
||||
### Data source selection
|
||||
Trivy **only** consumes security advisories from the sources listed in the above table.
|
||||
|
||||
As for packages installed from OS package managers (`dpkg`, `yum`, `apk`, etc.), Trivy uses the advisory database from the appropriate **OS vendor**.
|
||||
|
||||
For example: for a python package installed from `yum` (Amazon linux), Trivy will only get advisories from [ALAS][amazon].
|
||||
But for a python package installed from another source (e.g. `pip`), Trivy will get advisories from the `GitLab` and `GitHub` databases.
|
||||
|
||||
This advisory selection is essential to avoid getting false positives because OS vendors usually backport upstream fixes, and the fixed version can be different from the upstream fixed version.
|
||||
The severity is from the selected data source.
|
||||
If the data source does not provide severity, it falls back to [NVD][nvd], and if NVD does not have severity, it will be UNKNOWN.
|
||||
|
||||
## Distributions
|
||||
### CBL-Mariner
|
||||
Trivy scans [CBL-Mariner][cbl-mariner].
|
||||
|
||||
#### Support
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Version | Container image | Virtual machine | Distroless | Multi-arch | Unfixed support |
|
||||
|---------|:---------------:|:---------------:|:----------:|:------------:|:---------------:|
|
||||
| 1.0 | ✔ | ✔ | ✔ | amd64, arm64 | ✔ |
|
||||
| 2.0 | ✔ | ✔ | ✔ | amd64, arm64 | ✔ |
|
||||
|
||||
### Examples
|
||||
|
||||
=== "image"
|
||||
```
|
||||
➜ trivy image mcr.microsoft.com/cbl-mariner/base/core:2.0
|
||||
2022-07-27T14:48:20.355+0600 INFO Detected OS: cbl-mariner
|
||||
2022-07-27T14:48:20.355+0600 INFO Detecting CBL-Mariner vulnerabilities...
|
||||
2022-07-27T14:48:20.356+0600 INFO Number of language-specific files: 0
|
||||
|
||||
mcr.microsoft.com/cbl-mariner/base/core:2.0 (cbl-mariner 2.0.20220527)
|
||||
|
||||
Total: 33 (UNKNOWN: 0, LOW: 0, MEDIUM: 15, HIGH: 13, CRITICAL: 5)
|
||||
```
|
||||
|
||||
=== "rootfs"
|
||||
```
|
||||
➜ docker run -it --rm --entrypoint bin/bash mcr.microsoft.com/cbl-mariner/base/core:2.0
|
||||
root [ / ]# tdnf -y install ca-certificates
|
||||
root [ / ]# # Install the latest Trivy
|
||||
root [ / ]# trivy rootfs /
|
||||
2022-07-27T09:30:06.815Z INFO Need to update DB
|
||||
2022-07-27T09:30:06.815Z INFO DB Repository: ghcr.io/aquasecurity/trivy-db
|
||||
2022-07-27T09:30:06.815Z INFO Downloading DB...
|
||||
33.25 MiB / 33.25 MiB [------------------------------] 100.00% 4.20 MiB p/s 8.1s
|
||||
2022-07-27T09:30:21.756Z INFO Vulnerability scanning is enabled
|
||||
2022-07-27T09:30:21.756Z INFO Secret scanning is enabled
|
||||
2022-07-27T09:30:21.756Z INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
|
||||
2022-07-27T09:30:21.756Z INFO Please see also https://aquasecurity.github.io/trivy/v0.30.4/docs/secret/scanning/#recommendation for faster secret detection
|
||||
2022-07-27T09:30:22.205Z INFO Detected OS: cbl-mariner
|
||||
2022-07-27T09:30:22.205Z INFO Detecting CBL-Mariner vulnerabilities...
|
||||
2022-07-27T09:30:22.205Z INFO Number of language-specific files: 0
|
||||
|
||||
40ba9a55397c (cbl-mariner 2.0.20220527)
|
||||
=======================================
|
||||
Total: 33 (UNKNOWN: 0, LOW: 0, MEDIUM: 15, HIGH: 13, CRITICAL: 5)
|
||||
```
|
||||
|
||||
[^1]: https://developers.redhat.com/products/rhel/ubi
|
||||
[^2]: https://github.com/GoogleContainerTools/distroless
|
||||
|
||||
[arch]: https://security.archlinux.org/
|
||||
[alpine]: https://secdb.alpinelinux.org/
|
||||
[wolfi]: https://packages.wolfi.dev/os/security.json
|
||||
[chainguard]: https://packages.cgr.dev/chainguard/security.json
|
||||
[amazon]: https://alas.aws.amazon.com/
|
||||
[debian-tracker]: https://security-tracker.debian.org/tracker/
|
||||
[debian-oval]: https://www.debian.org/security/oval/
|
||||
[ubuntu]: https://ubuntu.com/security/cve
|
||||
[rhel-oval]: https://www.redhat.com/security/data/oval/v2/
|
||||
[rhel-api]: https://www.redhat.com/security/data/metrics/
|
||||
[alma]: https://errata.almalinux.org/
|
||||
[rocky]: https://download.rockylinux.org/pub/rocky/
|
||||
[oracle]: https://linux.oracle.com/security/oval/
|
||||
[suse]: http://ftp.suse.com/pub/projects/security/cvrf/
|
||||
[photon]: https://packages.vmware.com/photon/photon_cve_metadata/
|
||||
[mariner]: https://github.com/microsoft/CBL-MarinerVulnerabilityData/
|
||||
|
||||
[cbl-mariner]: https://github.com/microsoft/CBL-Mariner
|
||||
|
||||
[nvd]: https://nvd.nist.gov/
|
||||
@@ -185,18 +185,6 @@ Trivy supports the following packages.
|
||||
- [OS packages][os_packages]
|
||||
- [Language-specific packages][language_packages]
|
||||
|
||||
In addition to the above packages, Trivy also supports the following packages for generating SBOM.
|
||||
|
||||
!!! note
|
||||
These packages are not supported for vulnerability scanning.
|
||||
|
||||
| Language | File | Dependency location[^1] |
|
||||
|----------|-------------------|:-----------------------:|
|
||||
| Python | conda package[^2] | - |
|
||||
| Swift | Podfile.lock | - |
|
||||
|
||||
[^1]: Use `startline == 1 and endline == 1` for unsupported file types
|
||||
[^2]: `envs/*/conda-meta/*.json`
|
||||
|
||||
### Formats
|
||||
#### CycloneDX
|
||||
@@ -754,7 +742,7 @@ Trivy automatically detects the SBOM files and uses them for scanning.
|
||||
It is enabled in the following targets.
|
||||
|
||||
| Target | Enabled |
|
||||
|:---------------:|:-------:|
|
||||
| :-------------: | :-----: |
|
||||
| Container Image | ✓ |
|
||||
| Filesystem | |
|
||||
| Rootfs | ✓ |
|
||||
@@ -771,5 +759,5 @@ It is enabled in the following targets.
|
||||
[sbom]: https://cyclonedx.org/capabilities/sbom/
|
||||
[bov]: https://cyclonedx.org/capabilities/bov/
|
||||
|
||||
[os_packages]: ../scanner/vulnerability/os.md
|
||||
[language_packages]: ../scanner/vulnerability/language/index.md
|
||||
[os_packages]: ../scanner/vulnerability.md#os-packages
|
||||
[language_packages]: ../scanner/vulnerability.md#language-specific-packages
|
||||
|
||||
@@ -116,7 +116,7 @@ Total: 1 (UNKNOWN: 0, LOW: 1, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
|
||||
CVE-2020-8911 is no longer shown as it is filtered out according to the given CycloneDX VEX document.
|
||||
|
||||
## OpenVEX
|
||||
Trivy also supports [OpenVEX](https://github.com/openvex/spec) that is designed to be minimal, compliant, interoperable, and embeddable.
|
||||
Trivy also supports [OpenVEX][openvex] that is designed to be minimal, compliant, interoperable, and embeddable.
|
||||
Since OpenVEX aims to be SBOM format agnostic, both CycloneDX and SPDX formats are available for use as input SBOMs in Trivy.
|
||||
|
||||
The following steps are required:
|
||||
@@ -134,24 +134,21 @@ $ trivy image --format spdx-json --output debian11.spdx.json debian:11
|
||||
|
||||
### Create the VEX
|
||||
Please see also [the example](https://github.com/openvex/examples).
|
||||
The product identifiers differ depending on the SBOM format the VEX references.
|
||||
|
||||
- SPDX: [Package URL (PURL)](https://github.com/package-url/purl-spec)
|
||||
- CycloneDX: [BOM-Link](https://cyclonedx.org/capabilities/bomlink/)
|
||||
In Trivy, [the Package URL (PURL)][purl] is used as the product identifier.
|
||||
|
||||
```
|
||||
$ cat <<EOF > trivy.openvex
|
||||
$ cat <<EOF > debian11.openvex
|
||||
{
|
||||
"@context": "https://openvex.dev/ns",
|
||||
"@context": "https://openvex.dev/ns/v0.2.0",
|
||||
"@id": "https://openvex.dev/docs/public/vex-2e67563e128250cbcb3e98930df948dd053e43271d70dc50cfa22d57e03fe96f",
|
||||
"author": "Aqua Security",
|
||||
"timestamp": "2023-01-16T19:07:16.853479631-06:00",
|
||||
"version": "1",
|
||||
"timestamp": "2023-08-29T19:07:16.853479631-06:00",
|
||||
"version": 1,
|
||||
"statements": [
|
||||
{
|
||||
"vulnerability": "CVE-2019-8457",
|
||||
"vulnerability": {"name": "CVE-2019-8457"},
|
||||
"products": [
|
||||
"pkg:deb/debian/libdb5.3@5.3.28+dfsg1-0.8?arch=arm64\u0026distro=debian-11.6"
|
||||
{"@id": "pkg:deb/debian/libdb5.3@5.3.28+dfsg1-0.8"}
|
||||
],
|
||||
"status": "not_affected",
|
||||
"justification": "vulnerable_code_not_in_execute_path"
|
||||
@@ -161,15 +158,19 @@ $ cat <<EOF > trivy.openvex
|
||||
EOF
|
||||
```
|
||||
|
||||
In the above example, PURLs, located in `packages.externalRefs.referenceLocator` are used since the input SBOM format is SPDX.
|
||||
In the above example, PURLs, located in `packages.externalRefs.referenceLocator` in SPDX are used for the product identifier.
|
||||
|
||||
As for CycloneDX BOM-Link, please reference [the CycloneDX section](#cyclonedx).
|
||||
!!! note
|
||||
If a qualifier is specified in the PURL used as the product id in the VEX, the qualifier is compared.
|
||||
Other qualifiers are ignored in the comparison.
|
||||
`pkg:deb/debian/curl@7.50.3-1` in OpenVEX matches `pkg:deb/debian/curl@7.50.3-1?arch=i386`,
|
||||
while `pkg:deb/debian/curl@7.50.3-1?arch=amd64` does not match `pkg:deb/debian/curl@7.50.3-1?arch=i386`.
|
||||
|
||||
### Scan SBOM with VEX
|
||||
Provide the VEX when scanning the SBOM.
|
||||
|
||||
```
|
||||
$ trivy sbom debian11.spdx.json --vex trivy.openvex
|
||||
$ trivy sbom debian11.spdx.json --vex debian11.openvex
|
||||
...
|
||||
2023-04-26T17:56:05.358+0300 INFO Filtered out the detected vulnerability {"VEX format": "OpenVEX", "vulnerability-id": "CVE-2019-8457", "status": "not_affected", "justification": "vulnerable_code_not_in_execute_path"}
|
||||
|
||||
@@ -179,3 +180,6 @@ Total: 80 (UNKNOWN: 0, LOW: 58, MEDIUM: 6, HIGH: 16, CRITICAL: 0)
|
||||
```
|
||||
|
||||
CVE-2019-8457 is no longer shown as it is filtered out according to the given OpenVEX document.
|
||||
|
||||
[openvex]: https://github.com/openvex/spec
|
||||
[purl]: https://github.com/package-url/purl-spec
|
||||
@@ -103,5 +103,7 @@ Regardless of whether the cache is used or not, rules will be evaluated again wi
|
||||
|
||||
You can write custom policies for Trivy to evaluate against your AWS account.
|
||||
These policies are written in [Rego](https://www.openpolicyagent.org/docs/latest/policy-language/), the same language used by [Open Policy Agent](https://www.openpolicyagent.org/).
|
||||
See the [Custom Policies](../scanner/misconfiguration/custom/index.md) page for more information.
|
||||
See the [Custom Policies](../scanner/misconfiguration/custom/index.md) page for more information on how to write custom policies.
|
||||
|
||||
Custom policies in cloud scanning also support passing in custom data. This can be useful when you want to selectively enable/disable certain aspects of your cloud policies.
|
||||
See the [Custom Data](../scanner/misconfiguration/custom/data.md) page for more information on how to provide custom data to custom policies.
|
||||
|
||||
@@ -22,7 +22,7 @@ By default, vulnerability and secret scanning are enabled, and you can configure
|
||||
It is enabled by default.
|
||||
You can simply specify your image name (and a tag).
|
||||
It detects known vulnerabilities in your container image.
|
||||
See [here](../scanner/vulnerability/index.md) for the detail.
|
||||
See [here](../scanner/vulnerability.md) for the detail.
|
||||
|
||||
```
|
||||
$ trivy image [YOUR_IMAGE_NAME]
|
||||
|
||||
@@ -23,7 +23,7 @@ $ trivy fs ~/src/github.com/aquasecurity/trivy-ci-test/Pipfile.lock
|
||||
### Vulnerabilities
|
||||
It is enabled by default.
|
||||
Trivy will look for vulnerabilities based on lock files such as Gemfile.lock and package-lock.json.
|
||||
See [here](../scanner/vulnerability/index.md) for the detail.
|
||||
See [here](../scanner/vulnerability.md) for the detail.
|
||||
|
||||
```
|
||||
$ trivy fs ~/src/github.com/aquasecurity/trivy-ci-test
|
||||
|
||||
@@ -1,236 +0,0 @@
|
||||
# Git Repository
|
||||
|
||||
Scan your remote git repositories for
|
||||
|
||||
- Vulnerabilities
|
||||
- Misconfigurations
|
||||
- Secrets
|
||||
- Licenses
|
||||
|
||||
By default, vulnerability and secret scanning are enabled, and you can configure that with `--scanners`.
|
||||
|
||||
```bash
|
||||
$ trivy repo [YOUR_REPO_URL]
|
||||
```
|
||||
|
||||
## Scanners
|
||||
### Vulnerabilities
|
||||
It is enabled by default.
|
||||
Trivy will look for vulnerabilities based on lock files such as Gemfile.lock and package-lock.json.
|
||||
See [here](../scanner/vulnerability/index.md) for the detail.
|
||||
|
||||
```
|
||||
$ trivy repo https://github.com/knqyf263/trivy-ci-test
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```
|
||||
2021-03-09T15:04:19.003+0200 INFO Detecting cargo vulnerabilities...
|
||||
2021-03-09T15:04:19.005+0200 INFO Detecting pipenv vulnerabilities...
|
||||
|
||||
Cargo.lock
|
||||
==========
|
||||
Total: 7 (UNKNOWN: 7, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
|
||||
|
||||
+----------+-------------------+----------+-------------------+------------------------------+---------------------------------------------+
|
||||
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
||||
+----------+-------------------+----------+-------------------+------------------------------+---------------------------------------------+
|
||||
| ammonia | RUSTSEC-2019-0001 | UNKNOWN | 1.9.0 | >= 2.1.0 | Uncontrolled recursion leads |
|
||||
| | | | | | to abort in HTML serialization |
|
||||
| | | | | | -->rustsec.org/advisories/RUSTSEC-2019-0001 |
|
||||
+----------+-------------------+ +-------------------+------------------------------+---------------------------------------------+
|
||||
| openssl | RUSTSEC-2016-0001 | | 0.8.3 | >= 0.9.0 | SSL/TLS MitM vulnerability |
|
||||
| | | | | | due to insecure defaults |
|
||||
| | | | | | -->rustsec.org/advisories/RUSTSEC-2016-0001 |
|
||||
+----------+-------------------+ +-------------------+------------------------------+---------------------------------------------+
|
||||
| smallvec | RUSTSEC-2018-0018 | | 0.6.9 | >= 0.6.13 | smallvec creates uninitialized |
|
||||
| | | | | | value of any type |
|
||||
| | | | | | -->rustsec.org/advisories/RUSTSEC-2018-0018 |
|
||||
+ +-------------------+ + +------------------------------+---------------------------------------------+
|
||||
| | RUSTSEC-2019-0009 | | | >= 0.6.10 | Double-free and use-after-free |
|
||||
| | | | | | in SmallVec::grow() |
|
||||
| | | | | | -->rustsec.org/advisories/RUSTSEC-2019-0009 |
|
||||
+ +-------------------+ + + +---------------------------------------------+
|
||||
| | RUSTSEC-2019-0012 | | | | Memory corruption in SmallVec::grow() |
|
||||
| | | | | | -->rustsec.org/advisories/RUSTSEC-2019-0012 |
|
||||
+ +-------------------+ + +------------------------------+---------------------------------------------+
|
||||
| | RUSTSEC-2021-0003 | | | >= 0.6.14, < 1.0.0, >= 1.6.1 | Buffer overflow in SmallVec::insert_many |
|
||||
| | | | | | -->rustsec.org/advisories/RUSTSEC-2021-0003 |
|
||||
+----------+-------------------+ +-------------------+------------------------------+---------------------------------------------+
|
||||
| tempdir | RUSTSEC-2018-0017 | | 0.3.7 | | `tempdir` crate has been |
|
||||
| | | | | | deprecated; use `tempfile` instead |
|
||||
| | | | | | -->rustsec.org/advisories/RUSTSEC-2018-0017 |
|
||||
+----------+-------------------+----------+-------------------+------------------------------+---------------------------------------------+
|
||||
|
||||
Pipfile.lock
|
||||
============
|
||||
Total: 20 (UNKNOWN: 3, LOW: 0, MEDIUM: 7, HIGH: 5, CRITICAL: 5)
|
||||
|
||||
+---------------------+------------------+----------+-------------------+------------------------+---------------------------------------+
|
||||
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
||||
+---------------------+------------------+----------+-------------------+------------------------+---------------------------------------+
|
||||
| django | CVE-2019-19844 | CRITICAL | 2.0.9 | 3.0.1, 2.2.9, 1.11.27 | Django: crafted email address |
|
||||
| | | | | | allows account takeover |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2019-19844 |
|
||||
+ +------------------+ + +------------------------+---------------------------------------+
|
||||
| | CVE-2020-7471 | | | 3.0.3, 2.2.10, 1.11.28 | django: potential SQL injection |
|
||||
| | | | | | via StringAgg(delimiter) |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-7471 |
|
||||
+ +------------------+----------+ +------------------------+---------------------------------------+
|
||||
| | CVE-2019-6975 | HIGH | | 2.1.6, 2.0.11, 1.11.19 | python-django: memory exhaustion in |
|
||||
| | | | | | django.utils.numberformat.format() |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2019-6975 |
|
||||
+ +------------------+ + +------------------------+---------------------------------------+
|
||||
| | CVE-2020-9402 | | | 3.0.4, 2.2.11, 1.11.29 | django: potential SQL injection |
|
||||
| | | | | | via "tolerance" parameter in |
|
||||
| | | | | | GIS functions and aggregates... |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-9402 |
|
||||
+ +------------------+----------+ +------------------------+---------------------------------------+
|
||||
| | CVE-2019-3498 | MEDIUM | | 2.1.5, 2.0.10, 1.11.18 | python-django: Content spoofing |
|
||||
| | | | | | via URL path in default 404 page |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2019-3498 |
|
||||
+ +------------------+ + +------------------------+---------------------------------------+
|
||||
| | CVE-2020-13254 | | | 3.0.7, 2.2.13 | django: potential data leakage |
|
||||
| | | | | | via malformed memcached keys |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-13254 |
|
||||
+ +------------------+ + + +---------------------------------------+
|
||||
| | CVE-2020-13596 | | | | django: possible XSS via |
|
||||
| | | | | | admin ForeignKeyRawIdWidget |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-13596 |
|
||||
+---------------------+------------------+----------+-------------------+------------------------+---------------------------------------+
|
||||
| django-cors-headers | pyup.io-37132 | UNKNOWN | 2.5.2 | 3.0.0 | In django-cors-headers |
|
||||
| | | | | | version 3.0.0, |
|
||||
| | | | | | ``CORS_ORIGIN_WHITELIST`` |
|
||||
| | | | | | requires URI schemes, and |
|
||||
| | | | | | optionally ports. This... |
|
||||
+---------------------+------------------+----------+-------------------+------------------------+---------------------------------------+
|
||||
| djangorestframework | CVE-2020-25626 | MEDIUM | 3.9.2 | 3.11.2 | django-rest-framework: XSS |
|
||||
| | | | | | Vulnerability in API viewer |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-25626 |
|
||||
+---------------------+------------------+----------+-------------------+------------------------+---------------------------------------+
|
||||
| httplib2 | CVE-2021-21240 | HIGH | 0.12.1 | 0.19.0 | python-httplib2: Regular |
|
||||
| | | | | | expression denial of |
|
||||
| | | | | | service via malicious header |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2021-21240 |
|
||||
+ +------------------+----------+ +------------------------+---------------------------------------+
|
||||
| | CVE-2020-11078 | MEDIUM | | 0.18.0 | python-httplib2: CRLF injection |
|
||||
| | | | | | via an attacker controlled |
|
||||
| | | | | | unescaped part of uri for... |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-11078 |
|
||||
+ +------------------+----------+ + +---------------------------------------+
|
||||
| | pyup.io-38303 | UNKNOWN | | | Httplib2 0.18.0 is an |
|
||||
| | | | | | important security update to |
|
||||
| | | | | | patch a CWE-93 CRLF... |
|
||||
+---------------------+------------------+ +-------------------+------------------------+---------------------------------------+
|
||||
| jinja2 | pyup.io-39525 | | 2.10.1 | 2.11.3 | This affects the package |
|
||||
| | | | | | jinja2 from 0.0.0 and before |
|
||||
| | | | | | 2.11.3. The ReDOS... |
|
||||
+---------------------+------------------+----------+-------------------+------------------------+---------------------------------------+
|
||||
| py | CVE-2020-29651 | HIGH | 1.8.0 | | python-py: ReDoS in the py.path.svnwc |
|
||||
| | | | | | component via malicious input |
|
||||
| | | | | | to blame functionality... |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-29651 |
|
||||
+---------------------+------------------+----------+-------------------+------------------------+---------------------------------------+
|
||||
| pyyaml | CVE-2019-20477 | CRITICAL | 5.1 | | PyYAML: command execution |
|
||||
| | | | | | through python/object/apply |
|
||||
| | | | | | constructor in FullLoader |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2019-20477 |
|
||||
+ +------------------+ + +------------------------+---------------------------------------+
|
||||
| | CVE-2020-14343 | | | 5.4 | PyYAML: incomplete |
|
||||
| | | | | | fix for CVE-2020-1747 |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-14343 |
|
||||
+ +------------------+ + +------------------------+---------------------------------------+
|
||||
| | CVE-2020-1747 | | | 5.3.1 | PyYAML: arbitrary command |
|
||||
| | | | | | execution through python/object/new |
|
||||
| | | | | | when FullLoader is used |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-1747 |
|
||||
+---------------------+------------------+----------+-------------------+------------------------+---------------------------------------+
|
||||
| urllib3 | CVE-2019-11324 | HIGH | 1.24.1 | 1.24.2 | python-urllib3: Certification |
|
||||
| | | | | | mishandle when error should be thrown |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2019-11324 |
|
||||
+ +------------------+----------+ +------------------------+---------------------------------------+
|
||||
| | CVE-2019-11236 | MEDIUM | | | python-urllib3: CRLF injection |
|
||||
| | | | | | due to not encoding the |
|
||||
| | | | | | '\r\n' sequence leading to... |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2019-11236 |
|
||||
+ +------------------+ + +------------------------+---------------------------------------+
|
||||
| | CVE-2020-26137 | | | 1.25.9 | python-urllib3: CRLF injection |
|
||||
| | | | | | via HTTP request method |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-26137 |
|
||||
+---------------------+------------------+----------+-------------------+------------------------+---------------------------------------+
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Misconfigurations
|
||||
It is disabled by default and can be enabled with `--scanners config`.
|
||||
See [here](../scanner/misconfiguration/index.md) for the detail.
|
||||
|
||||
```shell
|
||||
$ trivy repo --scanners config [YOUR_REPO_URL]
|
||||
```
|
||||
|
||||
### Secrets
|
||||
It is enabled by default.
|
||||
See [here](../scanner/secret.md) for the detail.
|
||||
|
||||
```shell
|
||||
$ trivy repo [YOUR_REPO_URL]
|
||||
```
|
||||
|
||||
### Licenses
|
||||
It is disabled by default.
|
||||
See [here](../scanner/license.md) for the detail.
|
||||
|
||||
```shell
|
||||
$ trivy repo --scanners license [YOUR_REPO_URL]
|
||||
```
|
||||
|
||||
## SBOM generation
|
||||
Trivy can generate SBOM for git repositories.
|
||||
See [here](../supply-chain/sbom.md) for the detail.
|
||||
|
||||
## References
|
||||
### Scanning a Branch
|
||||
|
||||
Pass a `--branch` argument with a valid branch name on the remote repository provided:
|
||||
|
||||
```
|
||||
$ trivy repo --branch <branch-name> <repo-name>
|
||||
```
|
||||
|
||||
### Scanning upto a Commit
|
||||
|
||||
Pass a `--commit` argument with a valid commit hash on the remote repository provided:
|
||||
|
||||
```
|
||||
$ trivy repo --commit <commit-hash> <repo-name>
|
||||
```
|
||||
|
||||
### Scanning a Tag
|
||||
|
||||
Pass a `--tag` argument with a valid tag on the remote repository provided:
|
||||
|
||||
```
|
||||
$ trivy repo --tag <tag-name> <repo-name>
|
||||
```
|
||||
|
||||
### Scanning Private Repositories
|
||||
In order to scan private GitHub or GitLab repositories, the environment variable `GITHUB_TOKEN` or `GITLAB_TOKEN` must be set, respectively, with a valid token that has access to the private repository being scanned.
|
||||
|
||||
The `GITHUB_TOKEN` environment variable will take precedence over `GITLAB_TOKEN`, so if a private GitLab repository will be scanned, then `GITHUB_TOKEN` must be unset.
|
||||
|
||||
You can find how to generate your GitHub Token in the following [GitHub documentation.](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
$ export GITHUB_TOKEN="your_private_github_token"
|
||||
$ trivy repo <your private GitHub repo URL>
|
||||
$
|
||||
$ # or
|
||||
$ export GITLAB_TOKEN="your_private_gitlab_token"
|
||||
$ trivy repo <your private GitLab repo URL>
|
||||
```
|
||||
155
docs/docs/target/repository.md
Normal file
155
docs/docs/target/repository.md
Normal file
@@ -0,0 +1,155 @@
|
||||
# Code Repository
|
||||
|
||||
Scan your local or remote code repositories for
|
||||
|
||||
- Vulnerabilities
|
||||
- Misconfigurations
|
||||
- Secrets
|
||||
- Licenses
|
||||
|
||||
By default, vulnerability and secret scanning are enabled, and you can configure that with `--scanners`.
|
||||
|
||||
```bash
|
||||
$ trivy repo (REPO_PATH | REPO_URL)
|
||||
```
|
||||
|
||||
For example, you can scan a local repository as below.
|
||||
|
||||
```bash
|
||||
$ trivy repo ./
|
||||
```
|
||||
|
||||
It's also possible to scan a single file.
|
||||
|
||||
```
|
||||
$ trivy repo ./trivy-ci-test/Pipfile.lock
|
||||
```
|
||||
|
||||
To scan remote code repositories, you need to specify the URL.
|
||||
|
||||
```bash
|
||||
$ trivy repo https://github.com/aquasecurity/trivy-ci-test
|
||||
```
|
||||
|
||||
## Rationale
|
||||
`trivy repo` is designed to scan code repositories, and it is intended to be used for scanning local/remote repositories in your machine or in your CI environment.
|
||||
Therefore, unlike container/VM image scanning, it targets lock files such as package-lock.json and does not target artifacts like JAR files, binary files, etc.
|
||||
See [here](../scanner/vulnerability.md#language-specific-packages) for the detail.
|
||||
|
||||
## Scanners
|
||||
### Vulnerabilities
|
||||
It is enabled by default.
|
||||
Trivy will look for vulnerabilities based on lock files such as Gemfile.lock and package-lock.json.
|
||||
See [here](../scanner/vulnerability.md) for the detail.
|
||||
|
||||
```
|
||||
$ trivy repo ~/src/github.com/aquasecurity/trivy-ci-test
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```
|
||||
2020-06-01T17:06:58.652+0300 WARN OS is not detected and vulnerabilities in OS packages are not detected.
|
||||
2020-06-01T17:06:58.652+0300 INFO Detecting pipenv vulnerabilities...
|
||||
2020-06-01T17:06:58.691+0300 INFO Detecting cargo vulnerabilities...
|
||||
|
||||
Pipfile.lock
|
||||
============
|
||||
Total: 10 (UNKNOWN: 2, LOW: 0, MEDIUM: 6, HIGH: 2, CRITICAL: 0)
|
||||
|
||||
+---------------------+------------------+----------+-------------------+------------------------+------------------------------------+
|
||||
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
||||
+---------------------+------------------+----------+-------------------+------------------------+------------------------------------+
|
||||
| django | CVE-2020-7471 | HIGH | 2.0.9 | 3.0.3, 2.2.10, 1.11.28 | django: potential |
|
||||
| | | | | | SQL injection via |
|
||||
| | | | | | StringAgg(delimiter) |
|
||||
+ +------------------+----------+ +------------------------+------------------------------------+
|
||||
| | CVE-2019-19844 | MEDIUM | | 3.0.1, 2.2.9, 1.11.27 | Django: crafted email address |
|
||||
| | | | | | allows account takeover |
|
||||
+ +------------------+ + +------------------------+------------------------------------+
|
||||
| | CVE-2019-3498 | | | 2.1.5, 2.0.10, 1.11.18 | python-django: Content |
|
||||
| | | | | | spoofing via URL path in |
|
||||
| | | | | | default 404 page |
|
||||
+ +------------------+ + +------------------------+------------------------------------+
|
||||
| | CVE-2019-6975 | | | 2.1.6, 2.0.11, 1.11.19 | python-django: |
|
||||
| | | | | | memory exhaustion in |
|
||||
| | | | | | django.utils.numberformat.format() |
|
||||
+---------------------+------------------+----------+-------------------+------------------------+------------------------------------+
|
||||
...
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Misconfigurations
|
||||
It is disabled by default and can be enabled with `--scanners config`.
|
||||
See [here](../scanner/misconfiguration/index.md) for the detail.
|
||||
|
||||
```shell
|
||||
$ trivy repo --scanners config (REPO_PATH | REPO_URL)
|
||||
```
|
||||
|
||||
### Secrets
|
||||
It is enabled by default.
|
||||
See [here](../scanner/secret.md) for the detail.
|
||||
|
||||
```shell
|
||||
$ trivy repo (REPO_PATH | REPO_URL)
|
||||
```
|
||||
|
||||
### Licenses
|
||||
It is disabled by default.
|
||||
See [here](../scanner/license.md) for the detail.
|
||||
|
||||
```shell
|
||||
$ trivy repo --scanners license (REPO_PATH | REPO_URL)
|
||||
```
|
||||
|
||||
## SBOM generation
|
||||
Trivy can generate SBOM for code repositories.
|
||||
See [here](../supply-chain/sbom.md) for the detail.
|
||||
|
||||
## References
|
||||
The following flags and environmental variables are available for remote git repositories.
|
||||
|
||||
### Scanning a Branch
|
||||
|
||||
Pass a `--branch` argument with a valid branch name on the remote repository provided:
|
||||
|
||||
```
|
||||
$ trivy repo --branch <branch-name> <repo-name>
|
||||
```
|
||||
|
||||
### Scanning upto a Commit
|
||||
|
||||
Pass a `--commit` argument with a valid commit hash on the remote repository provided:
|
||||
|
||||
```
|
||||
$ trivy repo --commit <commit-hash> <repo-name>
|
||||
```
|
||||
|
||||
### Scanning a Tag
|
||||
|
||||
Pass a `--tag` argument with a valid tag on the remote repository provided:
|
||||
|
||||
```
|
||||
$ trivy repo --tag <tag-name> <repo-name>
|
||||
```
|
||||
|
||||
### Scanning Private Repositories
|
||||
In order to scan private GitHub or GitLab repositories, the environment variable `GITHUB_TOKEN` or `GITLAB_TOKEN` must be set, respectively, with a valid token that has access to the private repository being scanned.
|
||||
|
||||
The `GITHUB_TOKEN` environment variable will take precedence over `GITLAB_TOKEN`, so if a private GitLab repository will be scanned, then `GITHUB_TOKEN` must be unset.
|
||||
|
||||
You can find how to generate your GitHub Token in the following [GitHub documentation.](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
$ export GITHUB_TOKEN="your_private_github_token"
|
||||
$ trivy repo <your private GitHub repo URL>
|
||||
|
||||
# or
|
||||
$ export GITLAB_TOKEN="your_private_gitlab_token"
|
||||
$ trivy repo <your private GitLab repo URL>
|
||||
```
|
||||
@@ -12,4 +12,4 @@ $ trivy rootfs /path/to/rootfs
|
||||
!!! note
|
||||
Rootfs scanning works differently from the Filesystem scanning.
|
||||
You should use `trivy fs` to scan your local projects in CI/CD.
|
||||
See [here](../scanner/vulnerability/index.md) for the differences.
|
||||
See [here](../scanner/vulnerability.md) for the differences.
|
||||
|
||||
@@ -144,7 +144,7 @@ Trivy supports VM image scanning for
|
||||
It is enabled by default.
|
||||
You can simply specify your VM image location.
|
||||
It detects known vulnerabilities in your VM image.
|
||||
See [here](../scanner/vulnerability/index.md) for the detail.
|
||||
See [here](../scanner/vulnerability.md) for the detail.
|
||||
|
||||
```
|
||||
$ trivy vm [YOUR_VM_IMAGE]
|
||||
|
||||
@@ -54,3 +54,13 @@ Web application that allows to load a Trivy report in json format and displays t
|
||||
A trivy pre-commit hook that runs a `trivy fs` in your git repo before commiting, preventing you from commiting secrets in the first place.
|
||||
|
||||
👉 Get it at: <https://github.com/mxab/pre-commit-trivy>
|
||||
|
||||
## AWS CDK
|
||||
|
||||
[The AWS Cloud Development Kit (AWS CDK)](https://aws.amazon.com/cdk/) is an open-source software development framework to define cloud infrastructure in code and provision it through AWS CloudFormation.
|
||||
|
||||
### image-scanner-with-trivy (Community)
|
||||
|
||||
A CDK Construct Library to scan an image with trivy in CDK codes.
|
||||
|
||||
👉 Get it at: <https://constructs.dev/packages/image-scanner-with-trivy>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user