mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 07:10:41 -08:00
Compare commits
169 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eac751339d | ||
|
|
d866b71dd6 | ||
|
|
34ba96eb78 | ||
|
|
4cdff0e573 | ||
|
|
be969d4136 | ||
|
|
81748f5ad0 | ||
|
|
ba825b2ae1 | ||
|
|
abf227e06e | ||
|
|
df49ea4a14 | ||
|
|
f25e2df1c0 | ||
|
|
b5e3b77f0f | ||
|
|
6cc00c2f0c | ||
|
|
c317fe828d | ||
|
|
9b4bcedf0e | ||
|
|
be5a550491 | ||
|
|
01edbda347 | ||
|
|
eb9741954c | ||
|
|
be1c55497f | ||
|
|
a5342da067 | ||
|
|
108a5b05ce | ||
|
|
6080e245ce | ||
|
|
e27ec3261e | ||
|
|
f2aa9bf3eb | ||
|
|
6d7e2f8116 | ||
|
|
0ff5f96bb7 | ||
|
|
a54d1e95fd | ||
|
|
99c04c4383 | ||
|
|
70078b9c0e | ||
|
|
49e83a6ad2 | ||
|
|
af32cb310a | ||
|
|
176627192f | ||
|
|
7ee854767e | ||
|
|
654147fc60 | ||
|
|
256957523a | ||
|
|
c0610097a6 | ||
|
|
aedbd85d6e | ||
|
|
e018b9c423 | ||
|
|
b5874e3ad3 | ||
|
|
075d8f6286 | ||
|
|
16b757d180 | ||
|
|
372efc9ec7 | ||
|
|
edad5f6902 | ||
|
|
ed9d34030d | ||
|
|
8ff574e3f7 | ||
|
|
ad977a4256 | ||
|
|
b1dc60b885 | ||
|
|
65351d4f2a | ||
|
|
c866f1c4e9 | ||
|
|
ed0022b915 | ||
|
|
3c81727034 | ||
|
|
214546427e | ||
|
|
44d0b28ada | ||
|
|
ae4bcf6a06 | ||
|
|
b6fafa04a2 | ||
|
|
13362233c8 | ||
|
|
71051863c6 | ||
|
|
d9d7f3f190 | ||
|
|
e3c28f8ee3 | ||
|
|
ac0e327492 | ||
|
|
5372067611 | ||
|
|
a3895298de | ||
|
|
f4dd062f58 | ||
|
|
d005f5af24 | ||
|
|
a96ec35572 | ||
|
|
950e431f0f | ||
|
|
2310f0dd69 | ||
|
|
04b93e9fd6 | ||
|
|
cccaa15ccd | ||
|
|
3891e3d5d4 | ||
|
|
138feb024c | ||
|
|
cb241a8007 | ||
|
|
e7f6a5c805 | ||
|
|
2f5afa5f29 | ||
|
|
91fc8dac92 | ||
|
|
05df24477e | ||
|
|
a1b47441a5 | ||
|
|
7712f8f216 | ||
|
|
043fbfcd38 | ||
|
|
d6df5fbcda | ||
|
|
156d4cc605 | ||
|
|
772d1d08f8 | ||
|
|
df47073fa4 | ||
|
|
fed4710188 | ||
|
|
46f1b9e7dc | ||
|
|
fdb3a15b2d | ||
|
|
d0d956fdc1 | ||
|
|
68b0797e5b | ||
|
|
474167c47e | ||
|
|
7299867c21 | ||
|
|
8656bd9f77 | ||
|
|
2e10cd2eba | ||
|
|
13df746527 | ||
|
|
b0141cfbaa | ||
|
|
520830b51b | ||
|
|
9a6e125c78 | ||
|
|
6e5927266c | ||
|
|
f3de7bc3be | ||
|
|
e2fb3dd58f | ||
|
|
3e833be7d8 | ||
|
|
ca50b77a35 | ||
|
|
048150d433 | ||
|
|
013d901993 | ||
|
|
26b4959541 | ||
|
|
57fa701a87 | ||
|
|
53c9a7d762 | ||
|
|
01c98d1516 | ||
|
|
05b3c86a14 | ||
|
|
1a15a3adb1 | ||
|
|
f2a12f5f90 | ||
|
|
6040d9f43a | ||
|
|
e5317c7bc2 | ||
|
|
9fba79f0b6 | ||
|
|
00f2059e5d | ||
|
|
57a1022318 | ||
|
|
5b2b4ea380 | ||
|
|
cbbd1ce1f0 | ||
|
|
24a0d92145 | ||
|
|
0c3e2f08b7 | ||
|
|
6c12f04286 | ||
|
|
c4134224a2 | ||
|
|
20ab7033b8 | ||
|
|
91841f59ba | ||
|
|
57ba05c766 | ||
|
|
fef3ed4358 | ||
|
|
ced54aced1 | ||
|
|
2798df916b | ||
|
|
af485b33fd | ||
|
|
008babfb8b | ||
|
|
00d9c4666f | ||
|
|
03b6787c44 | ||
|
|
e6d5889ed4 | ||
|
|
74dbd8a1fd | ||
|
|
393bfdc1ac | ||
|
|
76eb8a57b6 | ||
|
|
6c74ee11f0 | ||
|
|
6119878de1 | ||
|
|
a346587b8d | ||
|
|
7e613cc5f7 | ||
|
|
f05bc4be4f | ||
|
|
3be5e6b242 | ||
|
|
f6cd21c873 | ||
|
|
f7b975187d | ||
|
|
18d168769c | ||
|
|
eb60e9f3c0 | ||
|
|
5a92055e1c | ||
|
|
46afe65eed | ||
|
|
0bf2a11a2e | ||
|
|
23b5fece08 | ||
|
|
4f1d576e5a | ||
|
|
6ab2bdfa7c | ||
|
|
4217cffb5a | ||
|
|
1840584703 | ||
|
|
c5ae9f265f | ||
|
|
562723f0a7 | ||
|
|
3dd5b1e946 | ||
|
|
5c18475f37 | ||
|
|
0c08dde015 | ||
|
|
0ccbb4f7fd | ||
|
|
908a4914c7 | ||
|
|
5b4652d796 | ||
|
|
faf8d49c49 | ||
|
|
559c0f30b1 | ||
|
|
2baad46189 | ||
|
|
df2bff9f5e | ||
|
|
44656f2853 | ||
|
|
37af529947 | ||
|
|
eea3320d83 | ||
|
|
2e6662060e | ||
|
|
49680dc881 |
64
.github/DISCUSSION_TEMPLATE/adopters.yml
vendored
64
.github/DISCUSSION_TEMPLATE/adopters.yml
vendored
@@ -1,35 +1,47 @@
|
||||
title: "<company name> "
|
||||
title: "<company name>"
|
||||
labels: ["adopters"]
|
||||
body:
|
||||
- type: checkboxes
|
||||
- type: textarea
|
||||
id: info
|
||||
attributes:
|
||||
label: Please select all the scan targets that you are using
|
||||
options:
|
||||
- label: Container Images
|
||||
- label: Filesystem
|
||||
- label: Git Repository
|
||||
- label: Virtual Machine Images
|
||||
- label: Kubernetes
|
||||
- label: AWS
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Which scanners are you using on those scan targets?
|
||||
options:
|
||||
- label: OS packages and software dependencies in use (SBOM)
|
||||
- label: Known vulnerabilities (CVEs)
|
||||
- label: IaC issues and misconfigurations
|
||||
- label: Sensitive information and secrets
|
||||
- label: Software licenses
|
||||
label: "[Optional] How do you use Trivy?"
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: info
|
||||
attributes:
|
||||
label: "Additional Information"
|
||||
description: "Please tell us more about your use case of Trivy -- anything that you would like to share 🎉"
|
||||
value: |
|
||||
...
|
||||
label: "[Optional] Can you provide us with a quote on your favourite part of Trivy? This may be used on the trivy.dev website, posted on Twitter (@AquaTrivy) or similar marketing material."
|
||||
validations:
|
||||
required: false
|
||||
required: false
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "[Optional] Which targets are you scanning with Trivy?"
|
||||
options:
|
||||
- label: "Container Image"
|
||||
- label: "Filesystem"
|
||||
- label: "Git Repository"
|
||||
- label: "Virtual Machine Image"
|
||||
- label: "Kubernetes"
|
||||
- label: "AWS"
|
||||
- label: "SBOM"
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "[Optional] What kind of issues are scanning with Trivy?"
|
||||
options:
|
||||
- label: "Software Bill of Materials (SBOM)"
|
||||
- label: "Known vulnerabilities (CVEs)"
|
||||
- label: "IaC issues and misconfigurations"
|
||||
- label: "Sensitive information and secrets"
|
||||
- label: "Software licenses"
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Get in touch
|
||||
We are always looking for
|
||||
* User feedback
|
||||
* Collaboration with other companies and organisations
|
||||
* Or just to have a chat with you about trivy.
|
||||
If any of this interests you or your marketing team, please reach out at: oss@aquasec.com
|
||||
We would love to hear from you!
|
||||
|
||||
2
.github/workflows/auto-close-issue.yaml
vendored
2
.github/workflows/auto-close-issue.yaml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Close issue if user does not have write or admin permissions
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
// Get the issue creator's username
|
||||
|
||||
30
.github/workflows/auto-update-labels.yaml
vendored
Normal file
30
.github/workflows/auto-update-labels.yaml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Auto-update labels
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'misc/triage/labels.yaml'
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Auto-update labels
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Install aqua tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
- name: update labels
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: mage label
|
||||
2
.github/workflows/canary.yaml
vendored
2
.github/workflows/canary.yaml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Restore Trivy binaries from cache
|
||||
uses: actions/cache@v3.3.1
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: dist/
|
||||
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
||||
|
||||
3
.github/workflows/mkdocs-dev.yaml
vendored
3
.github/workflows/mkdocs-dev.yaml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
@@ -21,6 +21,7 @@ jobs:
|
||||
python-version: 3.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
||||
pip install -r docs/build/requirements.txt
|
||||
env:
|
||||
|
||||
3
.github/workflows/mkdocs-latest.yaml
vendored
3
.github/workflows/mkdocs-latest.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
@@ -23,6 +23,7 @@ jobs:
|
||||
python-version: 3.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
||||
pip install -r docs/build/requirements.txt
|
||||
env:
|
||||
|
||||
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.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Helm
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
python-version: 3.7
|
||||
- name: Setup Chart Linting
|
||||
id: lint
|
||||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76
|
||||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992
|
||||
- name: Setup Kubernetes cluster (KIND)
|
||||
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140
|
||||
with:
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install chart-releaser
|
||||
|
||||
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
@@ -19,12 +19,12 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Restore Trivy binaries from cache
|
||||
uses: actions/cache@v3.3.1
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: dist/
|
||||
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
sudo apt-get -y install rpm reprepro createrepo-c distro-info
|
||||
|
||||
- name: Checkout trivy-repo
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/trivy-repo
|
||||
path: trivy-repo
|
||||
|
||||
24
.github/workflows/reusable-release.yaml
vendored
24
.github/workflows/reusable-release.yaml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
contents: read # Not required for public repositories, but for clarity
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v8
|
||||
uses: easimon/maximize-build-space@v9
|
||||
with:
|
||||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
remove-android: 'true'
|
||||
@@ -36,40 +36,40 @@ jobs:
|
||||
remove-haskell: 'true'
|
||||
|
||||
- name: Cosign install
|
||||
uses: sigstore/cosign-installer@4a861528be5e691840a69536975ada1d4c30349d
|
||||
uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Show available Docker Buildx platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: Login to docker.io registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to ghcr.io registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ env.GH_USER }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to ECR
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: public.ecr.aws
|
||||
username: ${{ secrets.ECR_ACCESS_KEY_ID }}
|
||||
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -91,9 +91,9 @@ jobs:
|
||||
echo "$GPG_KEY" > gpg.key
|
||||
|
||||
- name: GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v4
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
version: v1.16.2
|
||||
version: v1.20.0
|
||||
args: release -f=${{ inputs.goreleaser_config}} ${{ inputs.goreleaser_options}}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
|
||||
@@ -109,7 +109,7 @@ jobs:
|
||||
# because GoReleaser Free doesn't support pushing images with the `--snapshot` flag.
|
||||
- name: Build and push
|
||||
if: ${{ inputs.goreleaser_config == 'goreleaser-canary.yml' }}
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: linux/amd64, linux/arm64
|
||||
file: ./Dockerfile.canary # path to Dockerfile
|
||||
@@ -121,7 +121,7 @@ jobs:
|
||||
public.ecr.aws/aquasecurity/trivy:canary
|
||||
|
||||
- name: Cache Trivy binaries
|
||||
uses: actions/cache@v3.3.1
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: dist/
|
||||
# use 'github.sha' to create a unique cache folder for each run.
|
||||
|
||||
2
.github/workflows/scan.yaml
vendored
2
.github/workflows/scan.yaml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Run Trivy vulnerability scanner and create GitHub issues
|
||||
uses: knqyf263/trivy-issue-action@v0.0.5
|
||||
|
||||
7
.github/workflows/stale-issues.yaml
vendored
7
.github/workflows/stale-issues.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: "Stale issues"
|
||||
name: "Stale PR's"
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
@@ -10,11 +10,10 @@ jobs:
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue is stale because it has been labeled with inactivity.'
|
||||
stale-pr-message: 'This PR is stale because it has been labeled with inactivity.'
|
||||
exempt-issue-labels: 'lifecycle/frozen,lifecycle/active,priority/critical-urgent,priority/important-soon,priority/important-longterm,priority/backlog,priority/awaiting-more-evidence'
|
||||
exempt-pr-labels: 'lifecycle/active'
|
||||
stale-pr-label: 'lifecycle/stale'
|
||||
stale-issue-label: 'lifecycle/stale'
|
||||
days-before-stale: 60
|
||||
days-before-issue-stale: '-1'
|
||||
days-before-close: 20
|
||||
days-before-issue-close: '-1'
|
||||
|
||||
3
.github/workflows/test-docs.yaml
vendored
3
.github/workflows/test-docs.yaml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
@@ -19,6 +19,7 @@ jobs:
|
||||
python-version: 3.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
pip install -r docs/build/requirements.txt
|
||||
- name: Configure the git user
|
||||
run: |
|
||||
|
||||
58
.github/workflows/test.yaml
vendored
58
.github/workflows/test.yaml
vendored
@@ -1,14 +1,5 @@
|
||||
name: Test
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'main'
|
||||
- 'gh-readonly-queue/**'
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'LICENSE'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
@@ -24,12 +15,12 @@ jobs:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v3.6.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: oldstable
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: go mod tidy
|
||||
run: |
|
||||
@@ -41,13 +32,20 @@ jobs:
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Lint
|
||||
id: lint
|
||||
uses: golangci/golangci-lint-action@v3.7.0
|
||||
with:
|
||||
version: v1.52
|
||||
args: --deadline=30m
|
||||
version: v1.54
|
||||
args: --deadline=30m --out-format=line-number
|
||||
skip-cache: true # https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052197778
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Check if linter failed
|
||||
run: |
|
||||
echo "Linter failed, running 'mage lint:fix' might help to correct some errors"
|
||||
exit 1
|
||||
if: ${{ failure() && steps.lint.conclusion == 'failure' }}
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
@@ -71,7 +69,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -90,8 +88,17 @@ jobs:
|
||||
name: K8s Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v9
|
||||
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: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -111,7 +118,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -132,8 +139,17 @@ jobs:
|
||||
name: VM Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v9
|
||||
with:
|
||||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
remove-android: 'true'
|
||||
remove-docker-images: 'true'
|
||||
remove-dotnet: 'true'
|
||||
remove-haskell: 'true'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -157,7 +173,7 @@ jobs:
|
||||
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v8
|
||||
uses: easimon/maximize-build-space@v9
|
||||
with:
|
||||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
remove-android: 'true'
|
||||
@@ -167,7 +183,7 @@ jobs:
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -187,7 +203,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v4
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
version: v1.16.2
|
||||
version: v1.20.0
|
||||
args: build --snapshot --clean --timeout 90m ${{ steps.goreleaser_id.outputs.id }}
|
||||
|
||||
@@ -17,14 +17,54 @@ linters-settings:
|
||||
min-occurrences: 3
|
||||
misspell:
|
||||
locale: US
|
||||
goimports:
|
||||
local-prefixes: github.com/aquasecurity
|
||||
ignore-words:
|
||||
- licence
|
||||
gosec:
|
||||
excludes:
|
||||
- G101
|
||||
- G114
|
||||
- G204
|
||||
- G402
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/aquasecurity/)
|
||||
- blank
|
||||
- dot
|
||||
gomodguard:
|
||||
blocked:
|
||||
modules:
|
||||
- github.com/hashicorp/go-version:
|
||||
recommendations:
|
||||
- github.com/aquasecurity/go-version
|
||||
reason: "`aquasecurity/go-version` is designed for our use-cases"
|
||||
- github.com/Masterminds/semver:
|
||||
recommendations:
|
||||
- github.com/aquasecurity/go-version
|
||||
reason: "`aquasecurity/go-version` is designed for our use-cases"
|
||||
gocritic:
|
||||
disabled-checks:
|
||||
- appendAssign
|
||||
- unnamedResult
|
||||
- whyNoLint
|
||||
- indexAlloc
|
||||
- octalLiteral
|
||||
- hugeParam
|
||||
- rangeValCopy
|
||||
- regexpSimplify
|
||||
- sloppyReassign
|
||||
- commentedOutCode
|
||||
enabled-tags:
|
||||
- diagnostic
|
||||
- style
|
||||
- performance
|
||||
- experimental
|
||||
- opinionated
|
||||
settings:
|
||||
ruleguard:
|
||||
failOn: all
|
||||
rules: '${configDir}/misc/lint/rules.go'
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
@@ -39,14 +79,18 @@ linters:
|
||||
- goconst
|
||||
- gocyclo
|
||||
- gofmt
|
||||
- goimports
|
||||
- misspell
|
||||
- bodyclose
|
||||
- gci
|
||||
- gomodguard
|
||||
- tenv
|
||||
- gocritic
|
||||
|
||||
run:
|
||||
go: '1.20'
|
||||
go: '1.21'
|
||||
skip-files:
|
||||
- ".*._mock.go$"
|
||||
- ".*._test.go$"
|
||||
- ".*_mock.go$"
|
||||
- ".*_test.go$"
|
||||
- "integration/*"
|
||||
- "examples/*"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.18.3
|
||||
FROM alpine:3.18.5
|
||||
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.3
|
||||
FROM alpine:3.18.5
|
||||
RUN apk --no-cache add ca-certificates git
|
||||
|
||||
# binaries were created with GoReleaser
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM --platform=linux/amd64 golang:1.20
|
||||
FROM --platform=linux/amd64 golang:1.21
|
||||
|
||||
# Set environment variable for protoc
|
||||
ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip
|
||||
|
||||
@@ -78,7 +78,7 @@ https://user-images.githubusercontent.com/1161307/171013513-95f18734-233d-45d3-a
|
||||
</details>
|
||||
|
||||
```bash
|
||||
trivy fs --scanners vuln,secret,config myproject/
|
||||
trivy fs --scanners vuln,secret,misconfig myproject/
|
||||
```
|
||||
|
||||
<details>
|
||||
@@ -139,7 +139,7 @@ Please ensure to abide by our [Code of Conduct][code-of-conduct] during all inte
|
||||
|
||||
[Installation]:https://aquasecurity.github.io/trivy/latest/getting-started/installation/
|
||||
[Ecosystem]: https://aquasecurity.github.io/trivy/latest/ecosystem/
|
||||
[Scanning Coverage]: https://aquasecurity.github.io/trivy/latest/getting-started/coverage/
|
||||
[Scanning Coverage]: https://aquasecurity.github.io/trivy/latest/docs/coverage/
|
||||
|
||||
[alpine]: https://ariadne.space/2021/06/08/the-vulnerability-remediation-lifecycle-of-alpine-containers/
|
||||
[rego]: https://www.openpolicyagent.org/docs/latest/#rego
|
||||
|
||||
@@ -5,6 +5,6 @@ registries:
|
||||
- type: standard
|
||||
ref: v3.157.0 # renovate: depName=aquaproj/aqua-registry
|
||||
packages:
|
||||
- name: tinygo-org/tinygo@v0.27.0
|
||||
- name: tinygo-org/tinygo@v0.29.0
|
||||
- name: WebAssembly/binaryen@version_112
|
||||
- name: magefile/mage@v1.14.0
|
||||
|
||||
@@ -25,7 +25,7 @@ func run() error {
|
||||
if !plugin.IsPredefined(runAsPlugin) {
|
||||
return xerrors.Errorf("unknown plugin: %s", runAsPlugin)
|
||||
}
|
||||
if err := plugin.RunWithArgs(context.Background(), runAsPlugin, os.Args[1:]); err != nil {
|
||||
if err := plugin.RunWithURL(context.Background(), runAsPlugin, plugin.RunOptions{Args: os.Args[1:]}); err != nil {
|
||||
return xerrors.Errorf("plugin error: %w", err)
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
"Severity": {
|
||||
"Label": "{{ $severity }}"
|
||||
},
|
||||
"Title": "Trivy found a misconfiguration in {{ $target }}: {{ .Title }}",
|
||||
"Title": "Trivy found a misconfiguration in {{ $target }}: {{ escapeString .Title }}",
|
||||
"Description": {{ escapeString $description | printf "%q" }},
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
|
||||
@@ -1,6 +1,29 @@
|
||||
{{- /* Template based on https://docs.gitlab.com/ee/user/application_security/container_scanning/#reports-json-format */ -}}
|
||||
{
|
||||
"version": "14.0.6",
|
||||
"version": "15.0.7",
|
||||
"scan": {
|
||||
"analyzer": {
|
||||
"id": "trivy",
|
||||
"name": "Trivy",
|
||||
"vendor": {
|
||||
"name": "Aqua Security"
|
||||
},
|
||||
"version": "{{ appVersion }}"
|
||||
},
|
||||
"end_time": "{{ now | date "2006-01-02T15:04:05" }}",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "Trivy",
|
||||
"url": "https://github.com/aquasecurity/trivy/",
|
||||
"vendor": {
|
||||
"name": "Aqua Security"
|
||||
},
|
||||
"version": "{{ appVersion }}"
|
||||
},
|
||||
"start_time": "{{ now | date "2006-01-02T15:04:05" }}",
|
||||
"status": "success",
|
||||
"type": "container_scanning"
|
||||
},
|
||||
"vulnerabilities": [
|
||||
{{- $t_first := true }}
|
||||
{{- range . }}
|
||||
@@ -14,11 +37,8 @@
|
||||
{{- end }}
|
||||
{
|
||||
"id": "{{ .VulnerabilityID }}",
|
||||
"category": "container_scanning",
|
||||
"message": {{ .Title | printf "%q" }},
|
||||
"name": {{ .Title | printf "%q" }},
|
||||
"description": {{ .Description | printf "%q" }},
|
||||
{{- /* cve is a deprecated key, use id instead */}}
|
||||
"cve": "{{ .VulnerabilityID }}",
|
||||
"severity": {{ if eq .Severity "UNKNOWN" -}}
|
||||
"Unknown"
|
||||
{{- else if eq .Severity "LOW" -}}
|
||||
@@ -37,10 +57,6 @@
|
||||
{{- else -}}
|
||||
"No solution provided"
|
||||
{{- end }},
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<h1>{{- escapeXML ( index . 0 ).Target }} - Trivy Report - {{ now }}</h1>
|
||||
<table>
|
||||
{{- range . }}
|
||||
<tr class="group-header"><th colspan="6">{{ escapeXML .Type }}</th></tr>
|
||||
<tr class="group-header"><th colspan="6">{{ .Type | toString | escapeXML }}</th></tr>
|
||||
{{- if (eq (len .Vulnerabilities) 0) }}
|
||||
<tr><th colspan="6">No Vulnerabilities found</th></tr>
|
||||
{{- else }}
|
||||
|
||||
@@ -14,8 +14,12 @@
|
||||
</testcase>
|
||||
{{- end }}
|
||||
</testsuite>
|
||||
{{- $failures := len .Misconfigurations }}
|
||||
<testsuite tests="{{ $failures }}" failures="{{ $failures }}" name="{{ .Target }}" errors="0" skipped="0" time="">
|
||||
|
||||
{{- if .MisconfSummary }}
|
||||
<testsuite tests="{{ add .MisconfSummary.Successes .MisconfSummary.Failures }}" failures="{{ .MisconfSummary.Failures }}" name="{{ .Target }}" errors="0" skipped="{{ .MisconfSummary.Exceptions }}" time="">
|
||||
{{- else }}
|
||||
<testsuite tests="0" failures="0" name="{{ .Target }}" errors="0" skipped="0" time="">
|
||||
{{- end }}
|
||||
{{- if not (eq .Type "") }}
|
||||
<properties>
|
||||
<property name="type" value="{{ .Type }}"></property>
|
||||
@@ -23,7 +27,9 @@
|
||||
{{- end -}}
|
||||
{{ range .Misconfigurations }}
|
||||
<testcase classname="{{ .Type }}" name="[{{ .Severity }}] {{ .ID }}" time="">
|
||||
{{- if (eq .Status "FAIL") }}
|
||||
<failure message="{{ escapeXML .Title }}" type="description">{{ escapeXML .Description }}</failure>
|
||||
{{- end }}
|
||||
</testcase>
|
||||
{{- end }}
|
||||
</testsuite>
|
||||
|
||||
2
docs/build/Dockerfile
vendored
2
docs/build/Dockerfile
vendored
@@ -1,4 +1,4 @@
|
||||
FROM squidfunk/mkdocs-material:8.3.9
|
||||
FROM squidfunk/mkdocs-material:9.4.6
|
||||
|
||||
## If you want to see exactly the same version as is published to GitHub pages
|
||||
## use a private image for insiders, which requires authentication.
|
||||
|
||||
2
docs/build/requirements.txt
vendored
2
docs/build/requirements.txt
vendored
@@ -20,7 +20,7 @@ Pygments==2.12.0
|
||||
pymdown-extensions==9.5
|
||||
pyparsing==3.0.8
|
||||
python-dateutil==2.8.2
|
||||
PyYAML==6.0
|
||||
PyYAML==6.0.1
|
||||
pyyaml-env-tag==0.1
|
||||
six==1.16.0
|
||||
termcolor==1.1.0
|
||||
|
||||
@@ -27,7 +27,7 @@ $ ./trivy -h
|
||||
You must pass the linter checks:
|
||||
|
||||
```shell
|
||||
$ mage lint
|
||||
$ mage lint:run
|
||||
```
|
||||
|
||||
Additionally, you need to have run `go mod tidy`, so execute the following command as well:
|
||||
@@ -36,6 +36,11 @@ Additionally, you need to have run `go mod tidy`, so execute the following comma
|
||||
$ mage tidy
|
||||
```
|
||||
|
||||
To autofix linters use the following command:
|
||||
```shell
|
||||
$ mage lint:fix
|
||||
```
|
||||
|
||||
### Unit tests
|
||||
Your PR must pass all the unit tests. You can test it as below.
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ Put the built binary to the module directory that is under the home directory by
|
||||
|
||||
```bash
|
||||
$ mkdir -p ~/.trivy/modules
|
||||
$ cp spring4shell.wasm ~/.trivy/modules
|
||||
$ cp wordpress.wasm ~/.trivy/modules
|
||||
```
|
||||
|
||||
## Distribute Your Module
|
||||
|
||||
@@ -182,8 +182,51 @@ $ trivy myplugin
|
||||
Hello from Trivy demo plugin!
|
||||
```
|
||||
|
||||
## Plugin Types
|
||||
Plugins are typically intended to be used as subcommands of Trivy,
|
||||
but some plugins can be invoked as part of Trivy's built-in commands.
|
||||
Currently, the following type of plugin is experimentally supported:
|
||||
|
||||
- Output plugins
|
||||
|
||||
### Output Plugins
|
||||
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
Trivy supports "output plugins" which process Trivy's output,
|
||||
such as by transforming the output format or sending it elsewhere.
|
||||
For instance, in the case of image scanning, the output plugin can be called as follows:
|
||||
|
||||
```shell
|
||||
$ trivy image --format json --output plugin=<plugin_name> [--output-plugin-arg <plugin_flags>] <image_name>
|
||||
```
|
||||
|
||||
Since scan results are passed to the plugin via standard input, plugins must be capable of handling standard input.
|
||||
|
||||
!!! warning
|
||||
To avoid Trivy hanging, you need to read all data from `Stdin` before the plugin exits successfully or stops with an error.
|
||||
|
||||
While the example passes JSON to the plugin, other formats like SBOM can also be passed (e.g., `--format cyclonedx`).
|
||||
|
||||
If a plugin requires flags or other arguments, they can be passed using `--output-plugin-arg`.
|
||||
This is directly forwarded as arguments to the plugin.
|
||||
For example, `--output plugin=myplugin --output-plugin-arg "--foo --bar=baz"` translates to `myplugin --foo --bar=baz` in execution.
|
||||
|
||||
An example of the output plugin is available [here](https://github.com/aquasecurity/trivy-output-plugin-count).
|
||||
It can be used as below:
|
||||
|
||||
```shell
|
||||
# Install the plugin first
|
||||
$ trivy plugin install github.com/aquasecurity/trivy-output-plugin-count
|
||||
|
||||
# Call the output plugin in image scanning
|
||||
$ trivy image --format json --output plugin=count --output-plugin-arg "--published-after 2023-10-01" debian:12
|
||||
```
|
||||
|
||||
## Example
|
||||
https://github.com/aquasecurity/trivy-plugin-kubectl
|
||||
- https://github.com/aquasecurity/trivy-plugin-kubectl
|
||||
- https://github.com/aquasecurity/trivy-output-plugin-count
|
||||
|
||||
[kubectl]: https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/
|
||||
[helm]: https://helm.sh/docs/topics/plugins/
|
||||
|
||||
@@ -12,16 +12,16 @@ export SP_DATA=$(az ad sp create-for-rbac --name TrivyTest --role AcrPull --scop
|
||||
# Usage
|
||||
```bash
|
||||
# must set TRIVY_USERNAME empty char
|
||||
export AZURE_CLIENT_ID$(echo $SP_DATA | jq -r .appId)
|
||||
export AZURE_CLIENT_SECRET$(echo $SP_DATA | jq -r .password)
|
||||
export AZURE_TENANT_ID$(echo $SP_DATA | jq -r .tenant)
|
||||
export AZURE_CLIENT_ID=$(echo $SP_DATA | jq -r '.appId')
|
||||
export AZURE_CLIENT_SECRET=$(echo $SP_DATA | jq -r '.password')
|
||||
export AZURE_TENANT_ID=$(echo $SP_DATA | jq -r '.tenant')
|
||||
```
|
||||
|
||||
# Testing
|
||||
You can test credentials in the following manner.
|
||||
|
||||
```bash
|
||||
docker run -it --rm -v /tmp:/tmp\
|
||||
-e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \
|
||||
-e AZURE_TENANT_ID=${AZURE_TENANT_ID} aquasec/trivy image your_special_project.azurecr.io/your_special_image:your_special_tag
|
||||
docker run -it --rm -v /tmp:/tmp \
|
||||
-e AZURE_CLIENT_ID -e AZURE_CLIENT_SECRET -e AZURE_TENANT_ID \
|
||||
aquasec/trivy image your_special_project.azurecr.io/your_special_image:your_special_tag
|
||||
```
|
||||
|
||||
@@ -64,6 +64,9 @@ Downloading the Java index DB from an external OCI registry can be done by using
|
||||
$ trivy image --java-db-repository registry.gitlab.com/gitlab-org/security-products/dependencies/trivy-java-db --download-java-db-only
|
||||
```
|
||||
|
||||
!!! Note
|
||||
In [Client/Server](../references/modes/client-server.md) mode, `Java index DB` is currently only used on the `client` side.
|
||||
|
||||
## Remove DBs
|
||||
The `--reset` flag removes all caches and databases.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ You can enable/disable scanners with the `--scanners` flag.
|
||||
Supported values:
|
||||
|
||||
- vuln
|
||||
- config
|
||||
- misconfig
|
||||
- secret
|
||||
- license
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Reporting
|
||||
|
||||
## Supported Formats
|
||||
## Format
|
||||
Trivy supports the following formats:
|
||||
|
||||
- Table
|
||||
@@ -8,6 +8,7 @@ Trivy supports the following formats:
|
||||
- [SARIF](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning)
|
||||
- Template
|
||||
- SBOM
|
||||
- GitHub dependency snapshot
|
||||
|
||||
### Table (Default)
|
||||
|
||||
@@ -40,32 +41,31 @@ In some cases, vulnerable dependencies are not linked directly, and it requires
|
||||
To make this task simpler Trivy can show a dependency origin tree with the `--dependency-tree` flag.
|
||||
This flag is only available with the `--format table` flag.
|
||||
|
||||
The following packages/languages are currently supported:
|
||||
The following OS package managers are currently supported:
|
||||
|
||||
- OS packages
|
||||
- apk
|
||||
- dpkg
|
||||
- rpm
|
||||
- Node.js
|
||||
- npm: package-lock.json
|
||||
- pnpm: pnpm-lock.yaml
|
||||
- yarn: yarn.lock
|
||||
- .NET
|
||||
- NuGet: packages.lock.json
|
||||
- Python
|
||||
- Poetry: poetry.lock
|
||||
- Ruby
|
||||
- Bundler: Gemfile.lock
|
||||
- Rust
|
||||
- Binaries built with [cargo-auditable][cargo-auditable]
|
||||
- Go
|
||||
- Modules: go.mod
|
||||
- PHP
|
||||
- Composer
|
||||
- Java
|
||||
- Maven: pom.xml
|
||||
| OS Package Managers |
|
||||
|---------------------|
|
||||
| apk |
|
||||
| dpkg |
|
||||
| rpm |
|
||||
|
||||
This tree is the reverse of the npm list command.
|
||||
The following languages are currently supported:
|
||||
|
||||
| Language | File |
|
||||
|----------|--------------------------------------------|
|
||||
| Node.js | [package-lock.json][nodejs-package-lock] |
|
||||
| | [pnpm-lock.yaml][pnpm-lock] |
|
||||
| | [yarn.lock][yarn-lock] |
|
||||
| .NET | [packages.lock.json][dotnet-packages-lock] |
|
||||
| Python | [poetry.lock][poetry-lock] |
|
||||
| Ruby | [Gemfile.lock][gemfile-lock] |
|
||||
| Rust | [cargo-auditable binaries][cargo-binaries] |
|
||||
| Go | [go.mod][go-mod] |
|
||||
| PHP | [composer.lock][composer-lock] |
|
||||
| Java | [pom.xml][pom-xml] |
|
||||
| Dart | [pubspec.lock][pubspec-lock] |
|
||||
|
||||
This tree is the reverse of the dependency graph.
|
||||
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.
|
||||
|
||||
In table output, it looks like:
|
||||
@@ -258,6 +258,20 @@ $ trivy image --format sarif -o report.sarif golang:1.12-alpine
|
||||
|
||||
This SARIF file can be uploaded to GitHub code scanning results, and there is a [Trivy GitHub Action][action] for automating this process.
|
||||
|
||||
### GitHub dependency snapshot
|
||||
Trivy supports the following packages.
|
||||
|
||||
- [OS packages][os_packages]
|
||||
- [Language-specific packages][language_packages]
|
||||
|
||||
[GitHub dependency snapshots][github-sbom] can be generated with the `--format github` flag.
|
||||
|
||||
```
|
||||
$ trivy image --format github -o report.gsbom alpine
|
||||
```
|
||||
|
||||
This snapshot file can be [submitted][github-sbom-submit] to your GitHub repository.
|
||||
|
||||
### Template
|
||||
|
||||
| Scanner | Supported |
|
||||
@@ -359,6 +373,33 @@ $ trivy image --format template --template "@/usr/local/share/trivy/templates/ht
|
||||
### SBOM
|
||||
See [here](../supply-chain/sbom.md) for details.
|
||||
|
||||
## Output
|
||||
Trivy supports the following output destinations:
|
||||
|
||||
- File
|
||||
- Plugin
|
||||
|
||||
### File
|
||||
By specifying `--output <file_path>`, you can output the results to a file.
|
||||
Here is an example:
|
||||
|
||||
```
|
||||
$ trivy image --format json --output result.json debian:12
|
||||
```
|
||||
|
||||
### Plugin
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
Plugins capable of receiving Trivy's results via standard input, called "output plugin", can be seamlessly invoked using the `--output` flag.
|
||||
|
||||
```
|
||||
$ trivy <target> [--format <format>] --output plugin=<plugin_name> [--output-plugin-arg <plugin_flags>] <target_name>
|
||||
```
|
||||
|
||||
This is useful for cases where you want to convert the output into a custom format, or when you want to send the output somewhere.
|
||||
For more details, please check [here](../advanced/plugins.md#output-plugins).
|
||||
|
||||
## Converting
|
||||
To generate multiple reports, you can generate the JSON report first and convert it to other formats with the `convert` subcommand.
|
||||
|
||||
@@ -389,3 +430,20 @@ $ trivy convert --format table --severity CRITICAL result.json
|
||||
[asff]: ../../tutorials/integrations/aws-security-hub.md
|
||||
[sarif]: https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/managing-results-from-code-scanning
|
||||
[sprig]: http://masterminds.github.io/sprig/
|
||||
[github-sbom]: https://docs.github.com/en/rest/dependency-graph/dependency-submission?apiVersion=2022-11-28#about-dependency-submissions
|
||||
[github-sbom-submit]: https://docs.github.com/en/rest/dependency-graph/dependency-submission?apiVersion=2022-11-28#create-a-snapshot-of-dependencies-for-a-repository
|
||||
|
||||
[os_packages]: ../scanner/vulnerability.md#os-packages
|
||||
[language_packages]: ../scanner/vulnerability.md#language-specific-packages
|
||||
|
||||
[nodejs-package-lock]: ../coverage/language/nodejs.md#npm
|
||||
[pnpm-lock]: ../coverage/language/nodejs.md#pnpm
|
||||
[yarn-lock]: ../coverage/language/nodejs.md#yarn
|
||||
[dotnet-packages-lock]: ../coverage/language/dotnet.md#packageslockjson
|
||||
[poetry-lock]: ../coverage/language/python.md#poetry
|
||||
[gemfile-lock]: ../coverage/language/ruby.md#bundler
|
||||
[go-mod]: ../coverage/language/golang.md#go-modules
|
||||
[composer-lock]: ../coverage/language/php.md#composer
|
||||
[pom-xml]: ../coverage/language/java.md#pomxml
|
||||
[pubspec-lock]: ../coverage/language/dart.md#dart
|
||||
[cargo-binaries]: ../coverage/language/rust.md#binaries
|
||||
@@ -98,7 +98,7 @@ This will skip the file `foo` that happens to be nested under any parent(s).
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | |
|
||||
| License | |
|
||||
| License | ✓[^1] |
|
||||
|
||||
When a directory is given as an input, Trivy will recursively look for and test all files based on file patterns.
|
||||
The default file patterns are [here](../scanner/misconfiguration/custom/index.md).
|
||||
@@ -114,3 +114,6 @@ A file pattern contains the analyzer it is used for, and the pattern itself, joi
|
||||
```
|
||||
|
||||
The prefixes are listed [here](https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/pkg/fanal/analyzer/const.go)
|
||||
|
||||
|
||||
[^1]: Only work with the [license-full](../scanner/license.md) flag)
|
||||
@@ -2,14 +2,14 @@
|
||||
Trivy supports the scanners listed in the table below.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :----------------: | :-------: |
|
||||
|:------------------:|:---------:|
|
||||
| [Misconfiguration] | ✓ |
|
||||
| [Secret] | ✓ |
|
||||
|
||||
It supports the following formats.
|
||||
|
||||
| Format | Supported |
|
||||
| :----: | :-------: |
|
||||
|:------:|:---------:|
|
||||
| JSON | ✓ |
|
||||
| YAML | ✓ |
|
||||
|
||||
@@ -17,8 +17,19 @@ It supports the following formats.
|
||||
Trivy recursively searches directories and scans all found CloudFormation files.
|
||||
It evaluates properties, functions, and other elements within CloudFormation files to detect misconfigurations.
|
||||
|
||||
### Value Overrides
|
||||
You can provide `cf-params` with path to [CloudFormation Parameters] file to Trivy to scan your CloudFormation code with parameters.
|
||||
|
||||
```bash
|
||||
trivy conf --cf-params params.json ./infrastructure/cf
|
||||
```
|
||||
|
||||
You can check a [CloudFormation Parameters Example]
|
||||
|
||||
## 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
|
||||
[Secret]: ../../scanner/secret.md
|
||||
[CloudFormation Parameters]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html
|
||||
[CloudFormation Parameters Example]: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/deploy.html#supported-json-syntax
|
||||
@@ -9,7 +9,7 @@ Trivy scans Infrastructure as Code (IaC) files for
|
||||
## Supported configurations
|
||||
|
||||
| Config type | File patterns |
|
||||
| ----------------------------------- | ----------------------------- |
|
||||
|-------------------------------------|-------------------------------|
|
||||
| [Kubernetes](kubernetes.md) | *.yml, *.yaml, *.json |
|
||||
| [Docker](docker.md) | Dockerfile, Containerfile |
|
||||
| [Terraform](terraform.md) | *.tf, *.tf.json, *.tfvars, |
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
Trivy supports the scanners listed in the table below.
|
||||
|
||||
| Scanner | Supported |
|
||||
| :--------------: | :-------: |
|
||||
|:----------------:|:---------:|
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | ✓ |
|
||||
|
||||
It supports the following formats:
|
||||
|
||||
| Format | Supported |
|
||||
| :-------: | :-------: |
|
||||
|:---------:|:---------:|
|
||||
| JSON | ✓ |
|
||||
| HCL | ✓ |
|
||||
| Plan JSON | ✓ |
|
||||
@@ -35,7 +35,7 @@ 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.
|
||||
If you don't want to scan them, you can use the `--tf-exclude-downloaded-modules` flag.
|
||||
|
||||
```bash
|
||||
trivy conf --tf-exclude-downloaded-modules ./configs
|
||||
|
||||
@@ -5,4 +5,5 @@ For more detailed information about the specific platforms and languages, check
|
||||
|
||||
- [OS Packages](os/index.md)
|
||||
- [Language-specific Packages](language/index.md)
|
||||
- [IaC files](iac/index.md)
|
||||
- [IaC files](iac/index.md)
|
||||
- [Kubernetes clusters](./kubernetes.md)
|
||||
24
docs/docs/coverage/kubernetes.md
Normal file
24
docs/docs/coverage/kubernetes.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Kubernetes
|
||||
|
||||
When scanning a Kubernetes cluster, Trivy differentiates between the following:
|
||||
|
||||
1. Cluster infrastructure (e.g api-server, kubelet, addons)
|
||||
1. Cluster configuration (e.g Roles, ClusterRoles).
|
||||
1. Application workloads (e.g nginx, postgresql).
|
||||
|
||||
Whenever Trivy scans either of these Kubernetes resources, the container image is scanned separately to the Kubernetes resource definition (the YAML manifest) that defines the resource.
|
||||
When scanning any of the above, the container image is scanned separately to the Kubernetes resource definition (the YAML manifest) that defines the resource.
|
||||
|
||||
Container image is scanned for:
|
||||
|
||||
- Vulnerabilities
|
||||
- Misconfigurations
|
||||
- Exposed secrets
|
||||
|
||||
Kubernetes resource definition is scanned for:
|
||||
|
||||
- Vulnerabilities - partially supported through [KBOM scanning](#KBOM)
|
||||
- Misconfigurations
|
||||
- Exposed secrets
|
||||
|
||||
To learn more, please see the [documentation for Kubernetes scanning](../target/kubernetes.md).
|
||||
@@ -13,7 +13,7 @@ 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][dart-repository] | pubspec.lock | ✓ | Included | ✓ | - |
|
||||
|
||||
## Dart
|
||||
In order to detect dependencies, Trivy searches for `pubspec.lock`.
|
||||
@@ -21,6 +21,11 @@ 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.
|
||||
|
||||
To build `dependency tree` Trivy parses [cache directory][cache-directory]. Currently supported default directories and `PUB_CACHE` environment (absolute path only).
|
||||
!!! note
|
||||
Make sure the cache directory contains all the dependencies installed in your application. To download missing dependencies, use `dart pub get` command.
|
||||
|
||||
[dart]: https://dart.dev/
|
||||
[dart-repository]: https://pub.dev/
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[cache-directory]: https://dart.dev/tools/pub/glossary#system-cache
|
||||
|
||||
@@ -7,7 +7,7 @@ The following scanners are supported.
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
|-----------|:----:|:-------------:|:-------:|
|
||||
| .Net Core | ✓ | ✓ | - |
|
||||
| NuGet | ✓ | ✓ | - |
|
||||
| NuGet | ✓ | ✓ | ✓ |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
@@ -15,20 +15,37 @@ The following table provides an outline of the features Trivy offers.
|
||||
|:---------------:|--------------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
|
||||
| .Net Core | *.deps.json | ✓ | Excluded | - | ✓ |
|
||||
| NuGet | packages.config | ✓ | Excluded | - | - |
|
||||
| NuGet | *Packages.props | - | Excluded | - | - |
|
||||
| NuGet | packages.lock.json | ✓ | Included | ✓ | ✓ |
|
||||
|
||||
### *.deps.json
|
||||
## *.deps.json
|
||||
Trivy parses `*.deps.json` files. Trivy currently excludes dev dependencies from the report.
|
||||
|
||||
### packages.config
|
||||
## 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
|
||||
## *Packages.props
|
||||
Trivy parses `*Packages.props` files. Both legacy `Packages.props` and modern `Directory.Packages.props` are supported.
|
||||
|
||||
### license detection
|
||||
`packages.config` files don't have information about the licenses used.
|
||||
Trivy uses [*.nuspec][nuspec] files from [global packages folder][global-packages] to detect licenses.
|
||||
!!! note
|
||||
The `licenseUrl` field is [deprecated][license-url]. Trivy doesn't parse this field and only checks the [license] field (license `expression` type only).
|
||||
Currently only the default path and `NUGET_PACKAGES` environment variable are supported.
|
||||
|
||||
## packages.lock.json
|
||||
Don't forgot to [enable][enable-lock] lock files in your project.
|
||||
|
||||
!!! tip
|
||||
Please make sure your lock file is up-to-date after modifying dependencies.
|
||||
|
||||
### license detection
|
||||
Same as [packages.config](#license-detection)
|
||||
|
||||
[enable-lock]: https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#enabling-the-lock-file
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[nuspec]: https://learn.microsoft.com/en-us/nuget/reference/nuspec
|
||||
[global-packages]: https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders
|
||||
[license]: https://learn.microsoft.com/en-us/nuget/reference/nuspec#license
|
||||
[license-url]: https://learn.microsoft.com/en-us/nuget/reference/nuspec#licenseurl
|
||||
|
||||
@@ -34,6 +34,7 @@ On the other hand, when the target is a post-build artifact, like a container im
|
||||
| [.NET](dotnet.md) | packages.lock.json | ✅ | ✅ | ✅ | ✅ |
|
||||
| | packages.config | ✅ | ✅ | ✅ | ✅ |
|
||||
| | .deps.json | ✅ | ✅ | ✅ | ✅ |
|
||||
| | *Packages.props[^11] | ✅ | ✅ | ✅ | ✅ |
|
||||
| [Java](java.md) | JAR/WAR/PAR/EAR[^4] | ✅ | ✅ | - | - |
|
||||
| | pom.xml | - | - | ✅ | ✅ |
|
||||
| | *gradle.lockfile | - | - | ✅ | ✅ |
|
||||
@@ -65,3 +66,4 @@ Example: [Dockerfile](https://github.com/aquasecurity/trivy-ci-test/blob/main/Do
|
||||
[^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)
|
||||
[^11]: `Directory.Packages.props` and legacy `Packages.props` file names are supported
|
||||
|
||||
@@ -7,7 +7,7 @@ The following scanners are supported.
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
| -------- | :---: | :-----------: | :-----: |
|
||||
| npm | ✓ | ✓ | ✓ |
|
||||
| Yarn | ✓ | ✓ | - |
|
||||
| Yarn | ✓ | ✓ | ✓ |
|
||||
| pnpm | ✓ | ✓ | - |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
@@ -40,6 +40,31 @@ See [here](./index.md) for the detail.
|
||||
Trivy parses your files generated by package managers in filesystem/repository scanning.
|
||||
|
||||
### pip
|
||||
Trivy only parses [version specifiers](https://packaging.python.org/en/latest/specifications/version-specifiers/#id4) with `==` comparison operator and without `.*`.
|
||||
To convert unsupported version specifiers - use the `pip freeze` command.
|
||||
|
||||
```bash
|
||||
$ cat requirements.txt
|
||||
boto3~=1.24.60
|
||||
click>=8.0
|
||||
json-fix==0.5.*
|
||||
$ pip install -r requirements.txt
|
||||
...
|
||||
$ pip freeze > requirements.txt
|
||||
$ cat requirements.txt
|
||||
boto3==1.24.96
|
||||
botocore==1.27.96
|
||||
click==8.1.7
|
||||
jmespath==1.0.1
|
||||
json-fix==0.5.2
|
||||
python-dateutil==2.8.2
|
||||
s3transfer==0.6.2
|
||||
setuptools==69.0.2
|
||||
six==1.16.0
|
||||
urllib3==1.26.18
|
||||
wheel==0.42.0
|
||||
```
|
||||
|
||||
`requirements.txt` files usually contain only the direct dependencies and not contain the transitive dependencies.
|
||||
Therefore, Trivy scans only for the direct dependencies with `requirements.txt`.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Docs
|
||||
|
||||
In this section you can find the complete reference documentation for all of the different features and settings that Trivy has to offer.
|
||||
In this section you can find the complete reference documentation for all the different features and settings that Trivy has to offer.
|
||||
|
||||
👈 Please use the side-navigation on the left in order to browse the different topics.
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
Scan an AWS account for misconfigurations. Trivy uses the same authentication methods as the AWS CLI. See https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
|
||||
|
||||
The following services are supported:
|
||||
|
||||
- accessanalyzer
|
||||
- api-gateway
|
||||
- athena
|
||||
@@ -67,6 +68,7 @@ trivy aws [flags]
|
||||
```
|
||||
--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.
|
||||
--cf-params strings specify paths to override the CloudFormation parameters files
|
||||
--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
|
||||
@@ -81,11 +83,13 @@ trivy aws [flags]
|
||||
-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'
|
||||
--include-non-failures include successes and exceptions, available with '--scanners misconfig'
|
||||
--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)
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan])
|
||||
-o, --output string output file name
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/trivy-policies: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")
|
||||
@@ -95,7 +99,7 @@ trivy aws [flags]
|
||||
--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-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--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.
|
||||
|
||||
@@ -11,6 +11,7 @@ trivy config [flags] DIR
|
||||
```
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--cf-params strings specify paths to override the CloudFormation parameters files
|
||||
--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
|
||||
@@ -24,13 +25,16 @@ trivy config [flags] DIR
|
||||
--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
|
||||
--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'
|
||||
--include-non-failures include successes and exceptions, available with '--scanners misconfig'
|
||||
--k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan])
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
-o, --output string output file name
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/trivy-policies: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
|
||||
@@ -44,7 +48,7 @@ trivy config [flags] DIR
|
||||
--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-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--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.
|
||||
|
||||
@@ -18,19 +18,20 @@ trivy convert [flags] RESULT_JSON
|
||||
### Options
|
||||
|
||||
```
|
||||
--compliance string compliance report to generate
|
||||
--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")
|
||||
-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 strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
-t, --template string output template
|
||||
--compliance string compliance report to generate
|
||||
--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")
|
||||
-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
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--report string specify a report format for the output (all,summary) (default "all")
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
-t, --template string output template
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -21,6 +21,7 @@ trivy filesystem [flags] PATH
|
||||
```
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--cf-params strings specify paths to override the CloudFormation parameters files
|
||||
--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
|
||||
@@ -45,17 +46,20 @@ trivy filesystem [flags] PATH
|
||||
--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'
|
||||
--include-non-failures include successes and exceptions, available with '--scanners misconfig'
|
||||
--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
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan])
|
||||
--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
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--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-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/trivy-policies: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
|
||||
@@ -67,7 +71,7 @@ trivy filesystem [flags] PATH
|
||||
--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])
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
@@ -76,9 +80,8 @@ trivy filesystem [flags] PATH
|
||||
--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-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--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")
|
||||
|
||||
@@ -61,21 +61,24 @@ trivy image [flags] IMAGE_NAME
|
||||
--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-config-scanners strings comma-separated list of what security issues to detect on container image configurations (misconfig,secret)
|
||||
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--include-non-failures include successes and exceptions, available with '--scanners misconfig'
|
||||
--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
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan])
|
||||
--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
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--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-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/trivy-policies: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
|
||||
@@ -88,7 +91,7 @@ trivy image [flags] IMAGE_NAME
|
||||
--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])
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
@@ -97,10 +100,8 @@ trivy image [flags] IMAGE_NAME
|
||||
--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
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
|
||||
@@ -55,19 +55,22 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
|
||||
--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])
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--include-non-failures include successes and exceptions, available with '--scanners misconfig'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
|
||||
--kubeconfig string specify the kubeconfig file path to use
|
||||
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan])
|
||||
-n, --namespace string specify a namespace to scan
|
||||
--no-progress suppress progress bar
|
||||
--node-collector-imageref string indicate the image reference for the node-collector scan job (default "ghcr.io/aquasecurity/node-collector:0.0.9")
|
||||
--node-collector-namespace string specify the namespace in which the node-collector job should be deployed (default "trivy-temp")
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--parallel int number (between 1-20) of goroutines enabled for parallel scanning (default 5)
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--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-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/trivy-policies: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
|
||||
@@ -79,7 +82,7 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
|
||||
--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")
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,rbac) (default [vuln,misconfig,secret,rbac])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--skip-db-update skip updating vulnerability database
|
||||
@@ -87,10 +90,8 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
|
||||
--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
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--tolerations strings specify node-collector job tolerations (example: key1=value1:NoExecute,key2=value2:NoSchedule)
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
|
||||
@@ -21,6 +21,7 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--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
|
||||
--cf-params strings specify paths to override the CloudFormation parameters files
|
||||
--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
|
||||
@@ -45,17 +46,20 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--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'
|
||||
--include-non-failures include successes and exceptions, available with '--scanners misconfig'
|
||||
--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
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan])
|
||||
--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
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--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-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/trivy-policies: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
|
||||
@@ -66,7 +70,7 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--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])
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
@@ -75,10 +79,9 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--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-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--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")
|
||||
|
||||
@@ -24,6 +24,7 @@ trivy rootfs [flags] ROOTDIR
|
||||
```
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--cf-params strings specify paths to override the CloudFormation parameters files
|
||||
--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
|
||||
@@ -47,17 +48,20 @@ trivy rootfs [flags] ROOTDIR
|
||||
--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'
|
||||
--include-non-failures include successes and exceptions, available with '--scanners misconfig'
|
||||
--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
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan])
|
||||
--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
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--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-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/trivy-policies: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
|
||||
@@ -68,7 +72,7 @@ trivy rootfs [flags] ROOTDIR
|
||||
--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])
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
@@ -77,9 +81,8 @@ trivy rootfs [flags] ROOTDIR
|
||||
--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-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--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")
|
||||
|
||||
@@ -42,6 +42,7 @@ trivy sbom [flags] SBOM_PATH
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--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
|
||||
@@ -55,7 +56,6 @@ trivy sbom [flags] SBOM_PATH
|
||||
--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
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
|
||||
@@ -20,30 +20,27 @@ trivy server [flags]
|
||||
### Options
|
||||
|
||||
```
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--enable-modules strings [EXPERIMENTAL] module names to enable
|
||||
-h, --help help for server
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--listen string listen address in server mode (default "localhost:4954")
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--reset remove all caches and database
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--enable-modules strings [EXPERIMENTAL] module names to enable
|
||||
-h, --help help for server
|
||||
--listen string listen address in server mode (default "localhost:4954")
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--reset remove all caches and database
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -44,14 +44,17 @@ trivy vm [flags] VM_IMAGE
|
||||
--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'
|
||||
--include-non-failures include successes and exceptions, available with '--scanners misconfig'
|
||||
--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
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan])
|
||||
--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")
|
||||
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/trivy-policies: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
|
||||
@@ -60,7 +63,7 @@ trivy vm [flags] VM_IMAGE
|
||||
--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])
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,misconfig,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
@@ -68,10 +71,8 @@ trivy vm [flags] VM_IMAGE
|
||||
--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
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
|
||||
@@ -112,8 +112,9 @@ scan:
|
||||
# Default depends on subcommand
|
||||
scanners:
|
||||
- vuln
|
||||
- config
|
||||
- misconfig
|
||||
- secret
|
||||
- license
|
||||
```
|
||||
|
||||
## Cache Options
|
||||
@@ -265,6 +266,12 @@ misconfiguration:
|
||||
# Same as '--include-non-failures'
|
||||
# Default is false
|
||||
include-non-failures: false
|
||||
|
||||
# Same as '--miconfig-scanners'
|
||||
# Default is all scanners
|
||||
scanners:
|
||||
- dockerfile
|
||||
- terraform
|
||||
|
||||
# helm value override configurations
|
||||
# set individual values
|
||||
|
||||
@@ -14,7 +14,7 @@ As for `--namespaces` option, the detail is described as below.
|
||||
If a file name matches the following file patterns, Trivy will parse the file and pass it as input to your Rego policy.
|
||||
|
||||
| File format | File pattern |
|
||||
| ------------- | --------------------------------------------------------- |
|
||||
|---------------|-----------------------------------------------------------|
|
||||
| JSON | `*.json` |
|
||||
| YAML | `*.yaml` and `*.yml` |
|
||||
| Dockerfile | `Dockerfile`, `Dockerfile.*`, and `*.Dockerfile` |
|
||||
@@ -125,7 +125,7 @@ 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: |
|
||||
@@ -201,4 +201,4 @@ See [here](schema.md) for the detail.
|
||||
|
||||
[rego]: https://www.openpolicyagent.org/docs/latest/policy-language/
|
||||
[package]: https://www.openpolicyagent.org/docs/latest/policy-language/#packages
|
||||
[source-types]: https://github.com/aquasecurity/defsec/blob/418759b4dc97af25f30f32e0bd365be7984003a1/pkg/types/sources.go)
|
||||
[source-types]: https://github.com/aquasecurity/defsec/blob/418759b4dc97af25f30f32e0bd365be7984003a1/pkg/types/sources.go
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Policies can be defined with custom schemas that allow inputs to be verified against them. Adding a policy schema
|
||||
enables Trivy to show more detailed error messages when an invalid input is encountered.
|
||||
|
||||
In Trivy we have been able to define a schema for a [Dockerfile](https://github.com/aquasecurity/defsec/blob/master/pkg/rego/schemas/dockerfile.json).
|
||||
In Trivy we have been able to define a schema for a [Dockerfile](https://github.com/aquasecurity/trivy-iac/blob/main/pkg/rego/schemas/dockerfile.json)
|
||||
Without input schemas, a policy would be as follows:
|
||||
|
||||
!!! example
|
||||
@@ -50,9 +50,9 @@ Now if this policy is evaluated against, a more descriptive error will be availa
|
||||
|
||||
Currently, out of the box the following schemas are supported natively:
|
||||
|
||||
1. [Docker](https://github.com/aquasecurity/defsec/blob/master/pkg/rego/schemas/dockerfile.json)
|
||||
2. [Kubernetes](https://github.com/aquasecurity/defsec/blob/master/pkg/rego/schemas/kubernetes.json)
|
||||
3. [Cloud](https://github.com/aquasecurity/defsec/blob/master/pkg/rego/schemas/cloud.json)
|
||||
1. [Docker](https://github.com/aquasecurity/trivy-iac/blob/main/pkg/rego/schemas/dockerfile.json)
|
||||
2. [Kubernetes](https://github.com/aquasecurity/trivy-iac/blob/main/pkg/rego/schemas/kubernetes.json)
|
||||
3. [Cloud](https://github.com/aquasecurity/trivy-iac/blob/main/pkg/rego/schemas/cloud.json)
|
||||
|
||||
|
||||
## Custom Policies with Custom Schemas
|
||||
|
||||
@@ -22,7 +22,7 @@ For more details, see [Policy Testing][opa-testing].
|
||||
}
|
||||
```
|
||||
|
||||
To write tests for custom policies, you can refer to existing tests under [defsec][defsec].
|
||||
To write tests for custom policies, you can refer to existing tests under [trivy-policies][trivy-policies].
|
||||
|
||||
## Go testing
|
||||
[Fanal][fanal] which is a core library of Trivy can be imported as a Go library.
|
||||
@@ -85,6 +85,6 @@ The following example stores allowed and denied configuration files in a directo
|
||||
`Dockerfile.allowed` has one successful result in `Successes`, while `Dockerfile.denied` has one failure result in `Failures`.
|
||||
|
||||
[opa-testing]: https://www.openpolicyagent.org/docs/latest/policy-testing/
|
||||
[defsec]: https://github.com/aquasecurity/defsec
|
||||
[defsec]: https://github.com/aquasecurity/trivy-policies/tree/main
|
||||
[table]: https://github.com/golang/go/wiki/TableDrivenTests
|
||||
[fanal]: https://github.com/aquasecurity/fanal
|
||||
@@ -35,28 +35,28 @@ $ trivy config [YOUR_IaC_DIRECTORY]
|
||||
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
```
|
||||
|
||||
You can also enable misconfiguration detection in container image, filesystem and git repository scanning via `--scanners config`.
|
||||
You can also enable misconfiguration detection in container image, filesystem and git repository scanning via `--scanners misconfig`.
|
||||
|
||||
```bash
|
||||
$ trivy image --scanners config IMAGE_NAME
|
||||
$ trivy image --scanners misconfig IMAGE_NAME
|
||||
```
|
||||
|
||||
```bash
|
||||
$ trivy fs --scanners config /path/to/dir
|
||||
$ trivy fs --scanners misconfig /path/to/dir
|
||||
```
|
||||
|
||||
!!! note
|
||||
Misconfiguration detection is not enabled by default in `image`, `fs` and `repo` subcommands.
|
||||
|
||||
Unlike the `config` subcommand, `image`, `fs` and `repo` subcommands can also scan for vulnerabilities and secrets at the same time.
|
||||
You can specify `--scanners vuln,config,secret` to enable vulnerability and secret detection as well as misconfiguration detection.
|
||||
You can specify `--scanners vuln,misconfig,secret` to enable vulnerability and secret detection as well as misconfiguration detection.
|
||||
|
||||
|
||||
!!! example
|
||||
``` bash
|
||||
$ ls myapp/
|
||||
Dockerfile Pipfile.lock
|
||||
$ trivy fs --scanners vuln,config,secret --severity HIGH,CRITICAL myapp/
|
||||
$ trivy fs --scanners vuln,misconfig,secret --severity HIGH,CRITICAL myapp/
|
||||
2022-05-16T13:42:21.440+0100 INFO Number of language-specific files: 1
|
||||
2022-05-16T13:42:21.440+0100 INFO Detecting pipenv vulnerabilities...
|
||||
2022-05-16T13:42:21.440+0100 INFO Detected config files: 1
|
||||
@@ -315,6 +315,15 @@ Failures: 2 (MEDIUM: 2, HIGH: 0, CRITICAL: 0)
|
||||
This section describes misconfiguration-specific configuration.
|
||||
Other common options are documented [here](../../configuration/index.md).
|
||||
|
||||
### Enabling a subset of misconfiguration scanners
|
||||
It's possible to only enable certain misconfiguration scanners if you prefer. You can do so by passing the `--misconfig-scanners` option.
|
||||
This flag takes a comma-separated list of configuration scanner types.
|
||||
```bash
|
||||
trivy config --misconfig-scanners=terraform,dockerfile .
|
||||
```
|
||||
|
||||
Will only scan for misconfigurations that pertain to Terraform and Dockerfiles.
|
||||
|
||||
### Pass custom policies
|
||||
You can pass policy files or directories including your custom policies through `--policy` option.
|
||||
This can be repeated for specifying multiple files or directories.
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
## Policy Sources
|
||||
Built-in policies are mainly written in [Rego][rego] and Go.
|
||||
Those policies are managed under [defsec repository][defsec].
|
||||
Those policies are managed under [trivy-policies repository][trivy-policies].
|
||||
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.
|
||||
For suggestions or issues regarding policy content, please open an issue under the [trivy-policies][trivy-policies] repository.
|
||||
|
||||
## Policy Distribution
|
||||
defsec policies are distributed as an OPA bundle on [GitHub Container Registry][ghcr] (GHCR).
|
||||
Trivy 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.
|
||||
Those policies are then loaded into Trivy OPA engine and used for detecting misconfigurations.
|
||||
If Trivy is unable to pull down newer policies, it will use the embedded set of policies as a fallback. This is also the case in air-gap environments where `--skip-policy-update` might be passed.
|
||||
@@ -18,7 +18,7 @@ Trivy checks for updates to OPA bundle on GHCR every 24 hours and pulls it if th
|
||||
|
||||
[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
|
||||
[ghcr]: https://github.com/aquasecurity/defsec/pkgs/container/defsec
|
||||
[kubernetes-policies]: https://github.com/aquasecurity/trivy-policies/tree/main/rules/kubernetes/policies
|
||||
[docker-policies]: https://github.com/aquasecurity/trivy-policies/tree/main/rules/docker/policies
|
||||
[trivy-policies]: https://github.com/aquasecurity/trivy-policies
|
||||
[ghcr]: https://github.com/aquasecurity/trivy-policies/pkgs/container/trivy-policies
|
||||
@@ -87,12 +87,12 @@ If you want to apply rule-based exceptions to built-in policies, you have to def
|
||||
}
|
||||
```
|
||||
|
||||
This exception is applied to [KSV012][ksv012] in defsec.
|
||||
You can get the package names in the [defsec repository][defsec] or the JSON output from Trivy.
|
||||
This exception is applied to [KSV012][ksv012] in trivy-policies.
|
||||
You can get the package names in the [trivy-policies repository][trivy-policies] or the JSON output from Trivy.
|
||||
|
||||
For more details, see [an example][rule-example].
|
||||
|
||||
[ns-example]: https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/namespace-exception
|
||||
[rule-example]: https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/rule-exception
|
||||
[ksv012]: https://github.com/aquasecurity/defsec/blob/master/internal/rules/kubernetes/policies/pss/restricted/3_runs_as_root.rego
|
||||
[defsec]: https://github.com/aquasecurity/defsec/
|
||||
[ksv012]: https://github.com/aquasecurity/trivy-policies/blob/main/rules/kubernetes/policies/pss/restricted/3_runs_as_root.rego
|
||||
[trivy-policies]: https://github.com/aquasecurity/trivy-policies/
|
||||
@@ -96,7 +96,7 @@ If the file doesn't exist, only built-in rules are used.
|
||||
You can customize the config file path via the `--secret-config` flag.
|
||||
|
||||
!!! warning
|
||||
Trivy uses [Golang regexp package](https://pkg.go.dev/regexp/syntax#hdr-Syntax). To use `^` and `$` as simbols of begin and end of line use multi-line mode -`(?m)`.
|
||||
Trivy uses [Golang regexp package](https://pkg.go.dev/regexp/syntax#hdr-Syntax). To use `^` and `$` as symbols of begin and end of line use multi-line mode -`(?m)`.
|
||||
|
||||
### Custom Rules
|
||||
Trivy allows defining custom rules.
|
||||
|
||||
@@ -5,6 +5,9 @@ The following packages are supported.
|
||||
|
||||
- [OS packages](#os-packages)
|
||||
- [Language-specific packages](#language-specific-packages)
|
||||
- [Kubernetes components (control plane, node and addons)](#kubernetes)
|
||||
|
||||
Trivy also detects known vulnerabilities in Kubernetes components using KBOM (Kubernetes bill of Material) scanning. To learn more, see the [documentation for Kubernetes scanning](../target/kubernetes.md#KBOM).
|
||||
|
||||
## OS Packages
|
||||
Trivy is capable of automatically detecting installed OS packages when scanning container images, VM images and running hosts.
|
||||
@@ -86,8 +89,7 @@ See [here](../coverage/language/index.md#supported-languages) for the supported
|
||||
| | [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] | ✅ | - |
|
||||
| Java | [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] | ✅ | - |
|
||||
@@ -98,6 +100,18 @@ See [here](../coverage/language/index.md#supported-languages) for the supported
|
||||
|
||||
[^1]: Intentional delay between vulnerability disclosure and registration in the DB
|
||||
|
||||
## Kubernetes
|
||||
|
||||
Trivy can detect vulnerabilities in Kubernetes clusters and components.
|
||||
|
||||
### Data Sources
|
||||
|
||||
| Vendor | Source |
|
||||
| ------------- |---------------------------------------------|
|
||||
| Kubernetes | [Kubernetes Official CVE feed][k8s-cve][^1] |
|
||||
|
||||
[^1]: Some manual triage and correction has been made.
|
||||
|
||||
## Database
|
||||
Trivy downloads [the vulnerability database](https://github.com/aquasecurity/trivy-db) every 6 hours.
|
||||
Trivy uses two types of databases for vulnerability detection:
|
||||
@@ -180,3 +194,5 @@ Currently, specifying a username and password is not supported.
|
||||
[rust-osv]: https://osv.dev/list?q=&ecosystem=crates.io
|
||||
|
||||
[nvd]: https://nvd.nist.gov/vuln
|
||||
|
||||
[k8s-cve]: https://kubernetes.io/docs/reference/issues-security/official-cve-feed/
|
||||
|
||||
@@ -30,6 +30,7 @@ $ trivy image --format cosign-vuln --output vuln.json alpine:3.10
|
||||
},
|
||||
"result": {
|
||||
"SchemaVersion": 2,
|
||||
"CreatedAt": 1629894030,
|
||||
"ArtifactName": "alpine:3.10",
|
||||
"ArtifactType": "container_image",
|
||||
"Metadata": {
|
||||
|
||||
@@ -64,10 +64,10 @@ $ trivy image --scanners vuln [YOUR_IMAGE_NAME]
|
||||
### Misconfigurations
|
||||
It is supported, but it is not useful in most cases.
|
||||
As mentioned [here](../scanner/misconfiguration/index.md), Trivy mainly supports Infrastructure as Code (IaC) files for misconfigurations.
|
||||
If your container image includes IaC files such as Kubernetes YAML files or Terraform files, you should enable this feature with `--scanners config`.
|
||||
If your container image includes IaC files such as Kubernetes YAML files or Terraform files, you should enable this feature with `--scanners misconfig`.
|
||||
|
||||
```
|
||||
$ trivy image --scanners config [YOUR_IMAGE_NAME]
|
||||
$ trivy image --scanners misconfig [YOUR_IMAGE_NAME]
|
||||
```
|
||||
|
||||
### Secrets
|
||||
@@ -113,13 +113,6 @@ You can enable it with `--image-config-scanners config`.
|
||||
$ trivy image --image-config-scanners config [YOUR_IMAGE_NAME]
|
||||
```
|
||||
|
||||
If you just want to scan the image config, you can disable scanners with `--scanners none`.
|
||||
For example:
|
||||
|
||||
```
|
||||
$ trivy image --scanners none --image-config-scanners config alpine:3.17.0
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
@@ -171,13 +164,6 @@ See [here](../scanner/secret.md) for the detail.
|
||||
$ trivy image --image-config-scanners secret [YOUR_IMAGE_NAME]
|
||||
```
|
||||
|
||||
If you just want to scan the image config, you can disable scanners with `--scanners none`.
|
||||
For example:
|
||||
|
||||
```shell
|
||||
$ trivy image --scanners none --image-config-scanners secret vuln-image
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
|
||||
@@ -65,11 +65,11 @@ Total: 10 (UNKNOWN: 2, LOW: 0, MEDIUM: 6, HIGH: 2, CRITICAL: 0)
|
||||
</details>
|
||||
|
||||
### Misconfigurations
|
||||
It is disabled by default and can be enabled with `--scanners config`.
|
||||
It is disabled by default and can be enabled with `--scanners misconfig`.
|
||||
See [here](../scanner/misconfiguration/index.md) for the detail.
|
||||
|
||||
```shell
|
||||
$ trivy fs --scanners config /path/to/project
|
||||
$ trivy fs --scanners misconfig /path/to/project
|
||||
```
|
||||
|
||||
### Secrets
|
||||
|
||||
@@ -3,21 +3,117 @@
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
## CLI
|
||||
The Trivy K8s CLI allows you to scan your Kubernetes cluster for
|
||||
Trivy can connect to your Kubernetes cluster and scan it for security issues using the `trivy k8s` command. This page covers the technical capabilities of Trivy Kubernetes scanning.
|
||||
Trivy can also be installed *inside* your cluster as a Kubernetes Operator, and continuously scan it. For more about this, please see the [Trivy Operator](https://aquasecurity.github.io/trivy-operator/) project.
|
||||
|
||||
When scanning a Kubernetes cluster, Trivy differentiates between the following:
|
||||
|
||||
1. Cluster infrastructure (e.g api-server, kubelet, addons)
|
||||
1. Cluster configuration (e.g Roles, ClusterRoles).
|
||||
1. Application workloads (e.g nginx, postgresql).
|
||||
|
||||
When scanning any of the above, the container image is scanned separately to the Kubernetes resource definition (the YAML manifest) that defines the resource.
|
||||
|
||||
Container image is scanned for:
|
||||
|
||||
- Vulnerabilities
|
||||
- Misconfigurations
|
||||
- Secrets
|
||||
|
||||
You can either run the CLI locally or integrate it into your CI/CD pipeline.
|
||||
The difference to the Trivy CLI is that the Trivy K8s CLI allows you to scan running workloads directly within your cluster.
|
||||
- Exposed secrets
|
||||
|
||||
If you are looking for continuous cluster audit scanning, have a look at the Trivy K8s operator below.
|
||||
Kubernetes resource definition is scanned for:
|
||||
|
||||
Trivy uses your local kubectl configuration to access the API server to list artifacts.
|
||||
- Vulnerabilities (Open Source Libraries, Control Plane and Node Components)
|
||||
- Misconfigurations
|
||||
- Exposed secrets
|
||||
|
||||
### Commands
|
||||
## Kubernetes target configurations
|
||||
|
||||
Trivy follows the behavior of the `kubectl` tool as much as possible.
|
||||
|
||||
### Scope
|
||||
|
||||
The command expects an argument that selects the scope of the scan (similarly to how `kubectl` expects an argument after `kubectl get`). This argument can be:
|
||||
1. A Kubernetes Kind. e.g `pod`, `deployment`, etc.
|
||||
2. A Kubernetes Resource. e.g `pods/mypod`, etc.
|
||||
3. `all`. Scan common workload kinds, as listed [here](https://github.com/aquasecurity/trivy-kubernetes/blob/bf8cc2a00d9772e0aa271f06d375b936152b54b1/pkg/k8s/k8s.go#L296:L314)
|
||||
4. `cluster` scan the entire cluster including all namespaced resources and cluster level resources.
|
||||
|
||||
Examples:
|
||||
|
||||
```
|
||||
trivy k8s all
|
||||
trivy k8s pods
|
||||
trivy k8s deploy myapp
|
||||
trivy k8s pod/mypod
|
||||
trivy k8s pods,deploy
|
||||
trivy k8s cluster
|
||||
```
|
||||
|
||||
Note that the scope argument must appear last in the command line, after any other flag.
|
||||
|
||||
### Cluster
|
||||
|
||||
By default Trivy will look for a [`kubeconfig` configuration file in the default location](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/), and use the default cluster that is specified.
|
||||
You can also specify a `kubeconfig` using the `--kubeconfig` flag:
|
||||
|
||||
```
|
||||
trivy k8s --kubeconfig ~/.kube/config2
|
||||
```
|
||||
|
||||
### Namespace
|
||||
|
||||
By default Trivy will scan all namespaces (following `kubectl` behavior). To specify a namespace use the `--namespace` flag:
|
||||
|
||||
```
|
||||
trivy k8s --kubeconfig ~/.kube/config2 --namespace default
|
||||
```
|
||||
### Node
|
||||
|
||||
You can exclude specific nodes from the scan using the `--exclude-nodes` flag, which takes a label in the format `label-name:label-value` and excludes all matching nodes:
|
||||
|
||||
```
|
||||
trivy k8s cluster --report summary --exclude-nodes kubernetes.io/arch:arm6
|
||||
```
|
||||
|
||||
## Control Plane and Node Components Vulnerability Scanning
|
||||
|
||||
Trivy is capable of discovering Kubernetes control plane (apiserver, controller-manager and etc) and node components(kubelet, kube-proxy and etc), matching them against the [official Kubernetes vulnerability database feed](https://github.com/aquasecurity/vuln-list-k8s), and reporting any vulnerabilities it finds
|
||||
|
||||
|
||||
```
|
||||
trivy k8s cluster --scanners vuln --report all
|
||||
|
||||
NodeComponents/kind-control-plane (kubernetes)
|
||||
|
||||
Total: 3 (UNKNOWN: 0, LOW: 1, MEDIUM: 0, HIGH: 2, CRITICAL: 0)
|
||||
|
||||
┌────────────────┬────────────────┬──────────┬────────┬───────────────────┬──────────────────────────────────┬───────────────────────────────────────────────────┐
|
||||
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
|
||||
├────────────────┼────────────────┼──────────┼────────┼───────────────────┼──────────────────────────────────┼───────────────────────────────────────────────────┤
|
||||
│ k8s.io/kubelet │ CVE-2023-2431 │ LOW │ fixed │ 1.21.1 │ 1.24.14, 1.25.10, 1.26.5, 1.27.2 │ Bypass of seccomp profile enforcement │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-2431 │
|
||||
│ ├────────────────┼──────────┤ │ ├──────────────────────────────────┼───────────────────────────────────────────────────┤
|
||||
│ │ CVE-2021-25741 │ HIGH │ │ │ 1.19.16, 1.20.11, 1.21.5, 1.22.1 │ Symlink exchange can allow host filesystem access │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-25741 │
|
||||
│ ├────────────────┤ │ │ ├──────────────────────────────────┼───────────────────────────────────────────────────┤
|
||||
│ │ CVE-2021-25749 │ │ │ │ 1.22.14, 1.23.11, 1.24.5 │ runAsNonRoot logic bypass for Windows containers │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-25749 │
|
||||
└────────────────┴────────────────┴──────────┴────────┴───────────────────┴──────────────────────────────────┴───────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
|
||||
### Components types
|
||||
|
||||
You can control what kinds of components are discovered using the `--components` flag:
|
||||
- `--components infra` will discover only cluster infrastructure components.
|
||||
- `--components workloads` will discover only application workloads.
|
||||
- If the flag is omitted: infra, workloads, and RBAC are discovered.
|
||||
|
||||
## Reporting and filtering
|
||||
|
||||
Since scanning an entire cluster for any security issue can be overwhelming, By default Trivy summarizes the results in a simple "summary" view.
|
||||
By scoping the scan on a specific resource, you can see the detailed report.
|
||||
You can always choose the report granularity using the `--report summary`/`--report all` flag.
|
||||
|
||||
Scan a full cluster and generate a simple summary report:
|
||||
|
||||
@@ -27,60 +123,24 @@ $ trivy k8s --report=summary cluster
|
||||
|
||||

|
||||
|
||||
The summary report is the default. To get all of the detail the output contains, use `--report all`.
|
||||
|
||||
Filter by severity:
|
||||
|
||||
```
|
||||
$ trivy k8s --severity=CRITICAL --report=all cluster
|
||||
trivy k8s --severity=CRITICAL --report=all cluster
|
||||
```
|
||||
|
||||
Filter by scanners (Vulnerabilities, Secrets or Misconfigurations):
|
||||
|
||||
```
|
||||
$ trivy k8s --scanners=secret --report=summary cluster
|
||||
trivy k8s --scanners=secret --report=summary cluster
|
||||
# or
|
||||
$ trivy k8s --scanners=config --report=summary cluster
|
||||
trivy k8s --scanners=misconfig --report=summary cluster
|
||||
```
|
||||
|
||||
Scan a specific namespace:
|
||||
The supported output formats are `table`, which is the default, and `json`.
|
||||
|
||||
```
|
||||
$ trivy k8s -n kube-system --report=summary all
|
||||
```
|
||||
|
||||
Use a specific kubeconfig file:
|
||||
|
||||
```
|
||||
$ trivy k8s --kubeconfig ~/.kube/config2 -n kube-system --report=summary all
|
||||
```
|
||||
|
||||
Scan a specific resource and get all the output:
|
||||
|
||||
```
|
||||
$ trivy k8s deployment appname
|
||||
```
|
||||
|
||||
Scan all deploys, or deploys and configmaps:
|
||||
|
||||
```
|
||||
$ trivy k8s --report=summary deployment
|
||||
$ trivy k8s --report=summary deployment,configmaps
|
||||
```
|
||||
|
||||
If you want to pass in flags before scanning specific workloads, you will have to do it before the resource name.
|
||||
For example, scanning a deployment in the app namespace of your Kubernetes cluster for critical vulnerabilities would be done through the following command:
|
||||
|
||||
```
|
||||
$ trivy k8s -n app --severity=CRITICAL deployment/appname
|
||||
```
|
||||
This is specific to all Trivy CLI commands.
|
||||
|
||||
The supported formats are `table`, which is the default, and `json`.
|
||||
To get a JSON output on a full cluster scan:
|
||||
|
||||
```
|
||||
$ trivy k8s --format json -o results.json cluster
|
||||
trivy k8s --format json -o results.json cluster
|
||||
```
|
||||
|
||||
<details>
|
||||
@@ -239,62 +299,10 @@ $ trivy k8s --format json -o results.json cluster
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
### Infra checks
|
||||
|
||||
Trivy by default scans kubernetes infra components (apiserver, controller-manager, scheduler and etcd)
|
||||
if they exist under the `kube-system` namespace. For example, if you run a full cluster scan, or scan all
|
||||
components under `kube-system` with commands:
|
||||
|
||||
```
|
||||
$ trivy k8s cluster --report summary # full cluster scan
|
||||
$ trivy k8s all -n kube-system --report summary # scan all components under kube-system
|
||||
```
|
||||
|
||||
A table will be printed about misconfigurations found on kubernetes core components:
|
||||
|
||||
```
|
||||
Summary Report for minikube
|
||||
┌─────────────┬──────────────────────────────────────┬─────────────────────────────┐
|
||||
│ Namespace │ Resource │ Kubernetes Infra Assessment │
|
||||
│ │ ├────┬────┬────┬─────┬────────┤
|
||||
│ │ │ C │ H │ M │ L │ U │
|
||||
├─────────────┼──────────────────────────────────────┼────┼────┼────┼─────┼────────┤
|
||||
│ kube-system │ Pod/kube-apiserver-minikube │ │ │ 1 │ 10 │ │
|
||||
│ kube-system │ Pod/kube-controller-manager-minikube │ │ │ │ 3 │ │
|
||||
│ kube-system │ Pod/kube-scheduler-minikube │ │ │ │ 1 │ │
|
||||
└─────────────┴──────────────────────────────────────┴────┴────┴────┴─────┴────────┘
|
||||
Severities: C=CRITICAL H=HIGH M=MEDIUM L=LOW U=UNKNOWN
|
||||
```
|
||||
|
||||
The infra checks are based on CIS Benchmarks recommendations for kubernetes.
|
||||
|
||||
|
||||
If you want filter only for the infra checks, you can use the flag `--components` along with the `--scanners=config`
|
||||
|
||||
```
|
||||
$ trivy k8s cluster --report summary --components=infra --scanners=config # scan only infra
|
||||
```
|
||||
|
||||
Or, to filter for all other checks besides the infra checks, you can:
|
||||
|
||||
```
|
||||
$ trivy k8s cluster --report summary --components=workload --scanners=config # scan all components besides infra
|
||||
```
|
||||
|
||||
If you wish to exclude nodes from being scanned, you can use the flag `--exclude-nodes` with the node labels
|
||||
|
||||
```
|
||||
trivy k8s cluster --report summary --exclude-nodes kubernetes.io/arch:arm6
|
||||
```
|
||||
|
||||
### Compliance
|
||||
## Compliance
|
||||
This section describes Kubernetes specific compliance reports.
|
||||
For an overview of Trivy's Compliance feature, including working with custom compliance, check out the [Compliance documentation](../compliance/compliance.md).
|
||||
|
||||
#### Built in reports
|
||||
|
||||
The following reports are available out of the box:
|
||||
|
||||
| Compliance | Name for command | More info |
|
||||
@@ -304,55 +312,90 @@ The following reports are available out of the box:
|
||||
| Pod Security Standards, Baseline | `k8s-pss-baseline` | [Link](https://kubernetes.io/docs/concepts/security/pod-security-standards/#baseline) |
|
||||
| Pod Security Standards, Restricted | `k8s-pss-restricted` | [Link](https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted) |
|
||||
|
||||
#### Examples
|
||||
Examples:
|
||||
|
||||
Scan a full cluster and generate a compliance summary report:
|
||||
Scan the cluster for Kubernetes Pod Security Standards Baseline compliance:
|
||||
|
||||
```
|
||||
$ trivy k8s cluster --compliance=<compliance_id> --report summary
|
||||
```
|
||||
|
||||
***Note*** : The `Issues` column represent the total number of failed checks for this control.
|
||||
|
||||
|
||||
Get all of the detailed output for checks:
|
||||
$ trivy k8s cluster --compliance=k8s-pss-baseline --report summary
|
||||
|
||||
```
|
||||
trivy k8s cluster --compliance=<compliance_id> --report all
|
||||
```
|
||||
|
||||
Report result in JSON format:
|
||||
Get the detailed report for checks:
|
||||
|
||||
```
|
||||
trivy k8s cluster --compliance=<compliance_id> --report summary --format json
|
||||
```
|
||||
|
||||
$ trivy k8s cluster --compliance=k8s-cis --report all
|
||||
|
||||
```
|
||||
trivy k8s cluster --compliance=<compliance_id> --report all --format json
|
||||
|
||||
Get summary report in JSON format:
|
||||
|
||||
```
|
||||
|
||||
## Operator
|
||||
Trivy has a native [Kubernetes Operator][operator] which continuously scans your Kubernetes cluster for security issues, and generates security reports as Kubernetes [Custom Resources][crd]. It does it by watching Kubernetes for state changes and automatically triggering scans in response to changes, for example initiating a vulnerability scan when a new Pod is created.
|
||||
$ trivy k8s cluster --compliance=k8s-cis --report summary --format json
|
||||
|
||||
> Kubernetes-native security toolkit. ([Documentation][trivy-operator]).
|
||||
```
|
||||
|
||||
<figure>
|
||||
<figcaption>Workload reconcilers discover K8s controllers, manage scan jobs, and create VulnerabilityReport and ConfigAuditReport objects.</figcaption>
|
||||
</figure>
|
||||
Get detailed report in JSON format:
|
||||
|
||||
[operator]: https://kubernetes.io/docs/concepts/extend-kubernetes/operator/
|
||||
[crd]: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
|
||||
[trivy-operator]: https://aquasecurity.github.io/trivy-operator/latest
|
||||
```
|
||||
|
||||
## SBOM
|
||||
$ trivy k8s cluster --compliance=k8s-cis --report all --format json
|
||||
|
||||
Trivy supports the generation of Kubernetes Bill of Materials (KBOM) for kubernetes cluster control plane components, node components and addons.
|
||||
```
|
||||
|
||||
## KBOM
|
||||
|
||||
KBOM, Kubernetes Bill of Materials, is a manifest of all the important components that make up your Kubernetes cluster – Control plane components, Node Components, and Addons, including their versions and images. Which “api-server” version are you currently running? Which flavor of “kubelet” is running on each node? What kind of etcd or storage are you currently using? And most importantly – are there any vulnerabilities known to affect these components? These are all questions that KBOM can help you answer.
|
||||
KBOM, Kubernetes Bill of Materials, is a manifest of all the important components that make up your Kubernetes cluster – Control plane components, Node Components, and Addons, including their versions and images. Which “api-server” version are you currently running? Which flavor of "kubelet" is running on each node? What kind of etcd or storage are you currently using? And most importantly – are there any vulnerabilities known to affect these components? These are all questions that KBOM can help you answer.
|
||||
For more background on KBOM, see [here](https://blog.aquasec.com/introducing-kbom-kubernetes-bill-of-materials).
|
||||
|
||||
Trivy can generate KBOM in CycloneDX format:
|
||||
|
||||
```sh
|
||||
trivy k8s cluster --format cyclonedx
|
||||
```
|
||||
|
||||
$ trivy k8s cluster --format cyclonedx --output mykbom.cdx.json
|
||||
|
||||
```
|
||||
|
||||
Trivy can also scan that generated KBOM (or any SBOM) for vulnerabilities:
|
||||
|
||||
```sh
|
||||
|
||||
$ trivy sbom mykbom.cdx.json
|
||||
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```sh
|
||||
|
||||
2023-09-28T22:52:25.707+0300 INFO Vulnerability scanning is enabled
|
||||
2023-09-28T22:52:25.707+0300 INFO Detected SBOM format: cyclonedx-json
|
||||
2023-09-28T22:52:25.717+0300 WARN No OS package is detected. Make sure you haven't deleted any files that contain information about the installed packages.
|
||||
2023-09-28T22:52:25.717+0300 WARN e.g. files under "/lib/apk/db/", "/var/lib/dpkg/" and "/var/lib/rpm"
|
||||
2023-09-28T22:52:25.717+0300 INFO Detected OS: debian gnu/linux
|
||||
2023-09-28T22:52:25.717+0300 WARN unsupported os : debian gnu/linux
|
||||
2023-09-28T22:52:25.717+0300 INFO Number of language-specific files: 3
|
||||
2023-09-28T22:52:25.717+0300 INFO Detecting kubernetes vulnerabilities...
|
||||
2023-09-28T22:52:25.718+0300 INFO Detecting gobinary vulnerabilities...
|
||||
Kubernetes (kubernetes)
|
||||
Total: 2 (UNKNOWN: 0, LOW: 1, MEDIUM: 0, HIGH: 1, CRITICAL: 0)
|
||||
┌────────────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────────────────────┬──────────────────────────────────────────────────┐
|
||||
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
|
||||
├────────────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────────────────────┼──────────────────────────────────────────────────┤
|
||||
│ k8s.io/kubelet │ CVE-2021-25749 │ HIGH │ fixed │ 1.24.0 │ 1.22.14, 1.23.11, 1.24.5 │ runAsNonRoot logic bypass for Windows containers │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-25749 │
|
||||
│ ├────────────────┼──────────┤ │ ├─────────────────────────────────┼──────────────────────────────────────────────────┤
|
||||
│ │ CVE-2023-2431 │ LOW │ │ │ 1.24.14, 1.25.9, 1.26.4, 1.27.1 │ Bypass of seccomp profile enforcement │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-2431 │
|
||||
└────────────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────────────────────┴──────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Find more in the [documentation for SBOM scanning](./sbom.md).
|
||||
|
||||
Currently KBOM vulnerability matching works for plain Kubernetes distributions and does not work well for vendor variants, including some cloud managed distributions.
|
||||
|
||||
@@ -82,11 +82,11 @@ Total: 10 (UNKNOWN: 2, LOW: 0, MEDIUM: 6, HIGH: 2, CRITICAL: 0)
|
||||
</details>
|
||||
|
||||
### Misconfigurations
|
||||
It is disabled by default and can be enabled with `--scanners config`.
|
||||
It is disabled by default and can be enabled with `--scanners misconfig`.
|
||||
See [here](../scanner/misconfiguration/index.md) for the detail.
|
||||
|
||||
```shell
|
||||
$ trivy repo --scanners config (REPO_PATH | REPO_URL)
|
||||
$ trivy repo --scanners misconfig (REPO_PATH | REPO_URL)
|
||||
```
|
||||
|
||||
### Secrets
|
||||
|
||||
@@ -1,34 +1,39 @@
|
||||
# SBOM scanning
|
||||
|
||||
Trivy can take the following SBOM formats as an input and scan for vulnerabilities.
|
||||
|
||||
- CycloneDX
|
||||
- SPDX
|
||||
- SPDX JSON
|
||||
- CycloneDX-type attestation
|
||||
- [KBOM](./kubernetes.md#KBOM) in CycloneDX format
|
||||
|
||||
To scan SBOM, you can use the `sbom` subcommand and pass the path to the SBOM.
|
||||
The input format is automatically detected.
|
||||
|
||||
```bash
|
||||
|
||||
$ trivy sbom /path/to/sbom_file
|
||||
|
||||
```
|
||||
|
||||
!!! note
|
||||
Passing SBOMs generated by tool other than Trivy may result in inaccurate detection
|
||||
Passing SBOMs generated by tool other than Trivy may result in inaccurate detection
|
||||
because Trivy relies on custom properties in SBOM for accurate scanning.
|
||||
|
||||
## CycloneDX
|
||||
|
||||
Trivy supports CycloneDX as an input.
|
||||
|
||||
!!! note
|
||||
CycloneDX XML is not supported at the moment.
|
||||
|
||||
|
||||
```bash
|
||||
$ trivy sbom /path/to/cyclonedx.json
|
||||
```
|
||||
|
||||
## SPDX
|
||||
|
||||
Trivy supports the SPDX SBOM as an input.
|
||||
|
||||
The following SPDX formats are supported:
|
||||
@@ -107,3 +112,33 @@ Total: 2 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 2)
|
||||
│ │ │ │ │ │ │
|
||||
└────────────┴────────────────┴──────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## KBOM
|
||||
|
||||
To read more about KBOM, see the [documentation for Kubernetes scanning](./kubernetes.md#KBOM).
|
||||
|
||||
```sh
|
||||
|
||||
$ trivy k8s --format cyclonedx cluster -o kbom.json
|
||||
$ trivy sbom kbom.json
|
||||
2023-09-28T22:52:25.707+0300 INFO Vulnerability scanning is enabled
|
||||
2023-09-28T22:52:25.717+0300 INFO Number of language-specific files: 3
|
||||
2023-09-28T22:52:25.717+0300 INFO Detecting kubernetes vulnerabilities...
|
||||
2023-09-28T22:52:25.718+0300 INFO Detecting gobinary vulnerabilities...
|
||||
|
||||
Kubernetes (kubernetes)
|
||||
|
||||
Total: 2 (UNKNOWN: 0, LOW: 1, MEDIUM: 0, HIGH: 1, CRITICAL: 0)
|
||||
|
||||
|
||||
┌────────────────┬────────────────┬──────────┬────────┬───────────────────┬────────────────────────────────┬──────────────────────────────────────────────────┐
|
||||
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
|
||||
├────────────────┼────────────────┼──────────┼────────┼───────────────────┼────────────────────────────────┼──────────────────────────────────────────────────┤
|
||||
│ k8s.io/kubelet │ CVE-2021-25749 │ HIGH │ fixed │ 1.24.0 │ 1.22.14, 1.23.11, 1.24.5 │ runAsNonRoot logic bypass for Windows containers │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-25749 │
|
||||
│ ├────────────────┼──────────┤ │ ├────────────────────────────────┼──────────────────────────────────────────────────┤
|
||||
│ │ CVE-2023-2431 │ LOW │ │ │1.24.14, 1.25.9, 1.26.4, 1.27.1 │ Bypass of seccomp profile enforcement │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-2431 │
|
||||
└────────────────┴────────────────┴──────────┴────────┴───────────────────┴────────────────────────────────┴──────────────────────────────────────────────────┘
|
||||
|
||||
```
|
||||
|
||||
@@ -153,10 +153,10 @@ $ trivy vm [YOUR_VM_IMAGE]
|
||||
### Misconfigurations
|
||||
It is supported, but it is not useful in most cases.
|
||||
As mentioned [here](../scanner/misconfiguration/index.md), Trivy mainly supports Infrastructure as Code (IaC) files for misconfigurations.
|
||||
If your VM image includes IaC files such as Kubernetes YAML files or Terraform files, you should enable this feature with `--scanners config`.
|
||||
If your VM image includes IaC files such as Kubernetes YAML files or Terraform files, you should enable this feature with `--scanners misconfig`.
|
||||
|
||||
```
|
||||
$ trivy vm --scanners config [YOUR_VM_IMAGE]
|
||||
$ trivy vm --scanners misconfig [YOUR_VM_IMAGE]
|
||||
```
|
||||
|
||||
### Secrets
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# CI/CD Integrations
|
||||
|
||||
## Azure DevOps (Official)
|
||||
[Azure Devops](https://azure.microsoft.com/en-us/products/devops/#overview) is Microsoft Azure cloud native CI/CD service.
|
||||
|
||||
Trivy has a "Azure Devops Pipelines Task" for Trivy, that lets you easily introduce security scanning into your workflow, with an integrated Azure Devops UI.
|
||||
|
||||
👉 Get it at: <https://github.com/aquasecurity/trivy-azure-pipelines-task>
|
||||
|
||||
## GitHub Actions
|
||||
[GitHub Actions](https://github.com/features/actions) is GitHub's native CI/CD and job orchestration service.
|
||||
|
||||
@@ -21,12 +28,19 @@ In this action, Trivy scans the dependency files such as package-lock.json and g
|
||||
|
||||
👉 Get it at: <https://github.com/marketplace/actions/trivy-github-issues>
|
||||
|
||||
## Azure DevOps (Official)
|
||||
[Azure Devops](https://azure.microsoft.com/en-us/products/devops/#overview) is Microsoft Azure cloud native CI/CD service.
|
||||
## Buildkite Plugin (Community)
|
||||
|
||||
Trivy has a "Azure Devops Pipelines Task" for Trivy, that lets you easily introduce security scanning into your workflow, with an integrated Azure Devops UI.
|
||||
The trivy buildkite plugin provides a convenient mechanism for running the open-source trivy static analysis tool on your project.
|
||||
|
||||
👉 Get it at: https://github.com/equinixmetal-buildkite/trivy-buildkite-plugin
|
||||
|
||||
## Dagger (Community)
|
||||
[Dagger](https://dagger.io/) is CI/CD as code that runs anywhere.
|
||||
|
||||
The Dagger module for Trivy provides functions for scanning container images from registries as well as Dagger Container objects from any Dagger SDK (e.g. Go, Python, Node.js, etc).
|
||||
|
||||
👉 Get it at: <https://daggerverse.dev/mod/github.com/jpadams/daggerverse/trivy>
|
||||
|
||||
👉 Get it at: <https://github.com/aquasecurity/trivy-azure-pipelines-task>
|
||||
|
||||
## Semaphore (Community)
|
||||
[Semaphore](https://semaphoreci.com/) is a CI/CD service.
|
||||
|
||||
@@ -34,7 +34,7 @@ Trivy Docker Desktop extension for scanning container images for vulnerabilities
|
||||
👉 Get it at: <https://github.com/aquasecurity/trivy-docker-extension>
|
||||
|
||||
## Rancher Desktop (Community)
|
||||
[Rancher Desktop](https://rancherdesktop.io/) is an easy way to use containers and Kubernetes on your development machine, and mange it in a GUI.
|
||||
[Rancher Desktop](https://rancherdesktop.io/) is an easy way to use containers and Kubernetes on your development machine, and manage it in a GUI.
|
||||
|
||||
Trivy is natively integrated with Rancher, no installation is needed. More info in Rancher documentation: <https://docs.rancherdesktop.io/getting-started/features#scanning-images>
|
||||
|
||||
|
||||
@@ -21,3 +21,11 @@ Trivy is natively integrated into Harbor, no installation is needed. More info i
|
||||
You can use Kyverno to ensure and enforce that deployed workloads' images are scanned for vulnerabilities.
|
||||
|
||||
👉 Get it at: <https://neonmirrors.net/post/2022-07/attesting-image-scans-kyverno>
|
||||
|
||||
## Zora (Community)
|
||||
|
||||
[Zora](https://zora-docs.undistro.io/) is an open-source solution that scans Kubernetes clusters with multiple plugins at scheduled times.
|
||||
|
||||
Trivy is integrated into Zora as a vulnerability scanner plugin.
|
||||
|
||||
👉 Get it at: <https://zora-docs.undistro.io/latest/plugins/trivy/>
|
||||
|
||||
@@ -59,15 +59,15 @@ brew install trivy
|
||||
|
||||
### Arch Linux (Community)
|
||||
|
||||
Arch Community Package Manager.
|
||||
Arch Linux Package Repository.
|
||||
|
||||
```bash
|
||||
pacman -S trivy
|
||||
```
|
||||
|
||||
References:
|
||||
- <https://archlinux.org/packages/community/x86_64/trivy/>
|
||||
- <https://github.com/archlinux/svntogit-community/blob/packages/trivy/trunk/PKGBUILD>
|
||||
- <https://archlinux.org/packages/extra/x86_64/trivy/>
|
||||
- <https://gitlab.archlinux.org/archlinux/packaging/packages/trivy/-/blob/main/PKGBUILD>
|
||||
|
||||
|
||||
### MacPorts (Community)
|
||||
@@ -149,10 +149,11 @@ Example:
|
||||
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/Library/Caches:/root/.cache/ aquasec/trivy:{{ git.tag[1:] }} image python:3.4-alpine
|
||||
```
|
||||
|
||||
Registry | Repository | Link | Supportability
|
||||
Docker Hub | `docker.io/aquasec/trivy` | https://hub.docker.com/r/aquasec/trivy | Official
|
||||
GitHub Container Registry (GHCR) | `ghcr.io/aquasecurity/trivy` | https://github.com/orgs/aquasecurity/packages/container/package/trivy | Official
|
||||
AWS Elastic Container Registry (ECR) | `public.ecr.aws/aquasecurity/trivy` | https://gallery.ecr.aws/aquasecurity/trivy | Official
|
||||
| Registry | Repository | Link | Supportability |
|
||||
|--------------------------------------|-------------------------------------|-----------------------------------------------------------------------|----------------|
|
||||
| Docker Hub | `docker.io/aquasec/trivy` | https://hub.docker.com/r/aquasec/trivy | Official |
|
||||
| GitHub Container Registry (GHCR) | `ghcr.io/aquasecurity/trivy` | https://github.com/orgs/aquasecurity/packages/container/package/trivy | Official |
|
||||
| AWS Elastic Container Registry (ECR) | `public.ecr.aws/aquasecurity/trivy` | https://gallery.ecr.aws/aquasecurity/trivy | Official |
|
||||
|
||||
## Other Tools to use and deploy Trivy
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ trivy image python:3.4-alpine
|
||||
</details>
|
||||
|
||||
```bash
|
||||
trivy fs --scanners vuln,secret,config myproject/
|
||||
trivy fs --scanners vuln,secret,misconfig myproject/
|
||||
```
|
||||
|
||||
<details>
|
||||
|
||||
@@ -150,7 +150,7 @@ trivy:
|
||||
# Image report
|
||||
- ./trivy image --exit-code 0 --format template --template "@contrib/gitlab-codequality.tpl" -o gl-codeclimate-image.json $IMAGE
|
||||
# Filesystem report
|
||||
- ./trivy filesystem --scanners config,vuln --exit-code 0 --format template --template "@contrib/gitlab-codequality.tpl" -o gl-codeclimate-fs.json .
|
||||
- ./trivy filesystem --scanners misconfig,vuln --exit-code 0 --format template --template "@contrib/gitlab-codequality.tpl" -o gl-codeclimate-fs.json .
|
||||
# Combine report
|
||||
- apk update && apk add jq
|
||||
- jq -s 'add' gl-codeclimate-image.json gl-codeclimate-fs.json > gl-codeclimate.json
|
||||
|
||||
@@ -41,7 +41,7 @@ spec:
|
||||
selfHeal: true
|
||||
```
|
||||
|
||||
The apply the Kubernetes manifest. If you have the manifest locally, you can use the following command through kubectl:
|
||||
To apply the Kubernetes manifest, if you have the manifest locally, you can use the following command through kubectl:
|
||||
```
|
||||
> kubectl apply -f trivy-operator.yaml
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ We have been consolidating all of our scanning-related efforts in one place, and
|
||||
|
||||
## Trivy Config Command
|
||||
|
||||
Terraform configuration scanning is available as part of the `trivy config` command. This command scans all configuration files for misconfiguration issues. You can find the details within [misconfiguration scans in the Trivy documentation.](https://aquasecurity.github.io/trivy/latest/docs/misconfiguration/scanning/)
|
||||
Terraform configuration scanning is available as part of the `trivy config` command. This command scans all configuration files for misconfiguration issues. You can find the details within [misconfiguration scans in the Trivy documentation.](https://aquasecurity.github.io/trivy/latest/docs/scanner/misconfiguration/)
|
||||
|
||||
Command structure:
|
||||
```
|
||||
@@ -83,21 +83,21 @@ trivy config --severity CRITICAL, MEDIUM terraform-infra
|
||||
|
||||
### Passing tf.tfvars files into `trivy config` scans
|
||||
|
||||
You can pass terraform values to Trivy to override default values found in the Terraform HCL code. More information are provided [in the documentation.](https://aquasecurity.github.io/trivy/latest/docs/misconfiguration/options/values/)
|
||||
You can pass terraform values to Trivy to override default values found in the Terraform HCL code. More information are provided [in the documentation.](https://aquasecurity.github.io/trivy/latest/docs/coverage/iac/terraform/#value-overrides)
|
||||
|
||||
```
|
||||
trivy conf --tf-vars terraform.tfvars ./
|
||||
```
|
||||
### Custom Checks
|
||||
|
||||
We have lots of examples in the [documentation](https://aquasecurity.github.io/trivy/latest/docs/misconfiguration/custom/) on how you can write and pass custom Rego policies into terraform misconfiguration scans.
|
||||
We have lots of examples in the [documentation](https://aquasecurity.github.io/trivy/latest/docs/scanner/misconfiguration/custom/) on how you can write and pass custom Rego policies into terraform misconfiguration scans.
|
||||
|
||||
## Secret and vulnerability scans
|
||||
|
||||
The `trivy config` command does not perform secrete and vulnerability checks out of the box. However, you can specify as part of your `trivy fs` scan that you would like to scan you terraform files for exposed secrets and misconfiguraction through the following flags:
|
||||
|
||||
```
|
||||
trivy fs --scanners secret,config ./
|
||||
trivy fs --scanners secret,misconfig ./
|
||||
```
|
||||
|
||||
The `trivy config` command is a sub-command of the `trivy fs` command. You can learn more about this command in the [documentation.](https://aquasecurity.github.io/trivy/latest/docs/target/filesystem/)
|
||||
|
||||
285
go.mod
285
go.mod
@@ -1,20 +1,20 @@
|
||||
module github.com/aquasecurity/trivy
|
||||
|
||||
go 1.20
|
||||
go 1.21
|
||||
|
||||
require (
|
||||
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0
|
||||
github.com/BurntSushi/toml v1.3.2
|
||||
github.com/CycloneDX/cyclonedx-go v0.7.2
|
||||
github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible
|
||||
github.com/Masterminds/sprig/v3 v3.2.3
|
||||
github.com/NYTimes/gziphandler v1.1.1
|
||||
github.com/alicebob/miniredis/v2 v2.30.4
|
||||
github.com/alicebob/miniredis/v2 v2.31.0
|
||||
github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986
|
||||
github.com/aquasecurity/defsec v0.92.0
|
||||
github.com/aquasecurity/go-dep-parser v0.0.0-20230830122616-841bc0f812c7
|
||||
github.com/aquasecurity/defsec v0.93.2-0.20231208181342-318642ac6f08
|
||||
github.com/aquasecurity/go-dep-parser v0.0.0-20231120074854-8322cc2242bf
|
||||
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce
|
||||
github.com/aquasecurity/go-npm-version v0.0.0-20201110091526-0b796d180798
|
||||
github.com/aquasecurity/go-pep440-version v0.0.0-20210121094942-22b2f8951d46
|
||||
@@ -23,39 +23,45 @@ require (
|
||||
github.com/aquasecurity/table v1.8.0
|
||||
github.com/aquasecurity/testdocker v0.0.0-20230111101738-e741bda259da
|
||||
github.com/aquasecurity/tml v0.6.1
|
||||
github.com/aquasecurity/trivy-db v0.0.0-20230831170347-f732860d4917
|
||||
github.com/aquasecurity/trivy-aws v0.5.0
|
||||
github.com/aquasecurity/trivy-db v0.0.0-20231005141211-4fc651f7ac8d
|
||||
github.com/aquasecurity/trivy-iac v0.7.1
|
||||
github.com/aquasecurity/trivy-java-db v0.0.0-20230209231723-7cddb1406728
|
||||
github.com/aquasecurity/trivy-kubernetes v0.5.7
|
||||
github.com/aws/aws-sdk-go v1.45.3
|
||||
github.com/aws/aws-sdk-go-v2 v1.21.0
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.38
|
||||
github.com/aws/aws-sdk-go-v2/service/ec2 v1.98.0
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.21.5
|
||||
github.com/aquasecurity/trivy-kubernetes v0.5.9-0.20231203080602-50a069120091
|
||||
github.com/aquasecurity/trivy-policies v0.6.1-0.20231120231532-f6f2330bf842
|
||||
github.com/aws/aws-sdk-go-v2 v1.23.5
|
||||
github.com/aws/aws-sdk-go-v2/config v1.25.11
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.9
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.90
|
||||
github.com/aws/aws-sdk-go-v2/service/ec2 v1.134.0
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.24.1
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.26.2
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.0
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/cheggaaa/pb/v3 v3.1.4
|
||||
github.com/containerd/containerd v1.7.5
|
||||
github.com/docker/docker v24.0.5+incompatible
|
||||
github.com/containerd/containerd v1.7.11
|
||||
github.com/docker/docker v24.0.7+incompatible
|
||||
github.com/docker/go-connections v0.4.0
|
||||
github.com/fatih/color v1.15.0
|
||||
github.com/go-git/go-git/v5 v5.7.0
|
||||
github.com/go-git/go-git/v5 v5.11.0
|
||||
github.com/go-openapi/runtime v0.26.0
|
||||
github.com/go-openapi/strfmt v0.21.7
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible
|
||||
github.com/golang/protobuf v1.5.3
|
||||
github.com/google/go-containerregistry v0.16.1
|
||||
github.com/google/go-containerregistry v0.17.0
|
||||
github.com/google/licenseclassifier/v2 v2.0.0
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/google/uuid v1.4.0
|
||||
github.com/google/wire v0.5.0
|
||||
github.com/hashicorp/go-getter v1.7.1
|
||||
github.com/hashicorp/go-getter v1.7.2
|
||||
github.com/hashicorp/go-multierror v1.1.1
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.6
|
||||
github.com/in-toto/in-toto-golang v0.9.0
|
||||
github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f
|
||||
github.com/knqyf263/go-deb-version v0.0.0-20230223133812-3ed183d23422
|
||||
github.com/knqyf263/go-rpm-version v0.0.0-20220614171824-631e686d1075
|
||||
github.com/knqyf263/go-rpmdb v0.0.0-20230517124904-b97c85e63254
|
||||
github.com/knqyf263/go-rpmdb v0.0.0-20231008124120-ac49267ab4e1
|
||||
github.com/knqyf263/nested v0.0.1
|
||||
github.com/kylelemons/godebug v1.1.0
|
||||
github.com/magefile/mage v1.15.0
|
||||
@@ -66,58 +72,62 @@ require (
|
||||
github.com/masahiro331/go-mvn-version v0.0.0-20210429150710-d3157d602a08
|
||||
github.com/masahiro331/go-vmdk-parser v0.0.0-20221225061455-612096e4bbbd
|
||||
github.com/masahiro331/go-xfs-filesystem v0.0.0-20230608043311-a335f4599b70
|
||||
github.com/mattn/go-shellwords v1.0.12
|
||||
github.com/mitchellh/hashstructure/v2 v2.0.2
|
||||
github.com/mitchellh/mapstructure v1.5.0
|
||||
github.com/moby/buildkit v0.11.6
|
||||
github.com/open-policy-agent/opa v0.45.0
|
||||
github.com/open-policy-agent/opa v0.58.0
|
||||
github.com/opencontainers/go-digest v1.0.0
|
||||
github.com/opencontainers/image-spec v1.1.0-rc4
|
||||
github.com/opencontainers/image-spec v1.1.0-rc5
|
||||
github.com/openvex/go-vex v0.2.5
|
||||
github.com/owenrumney/go-sarif/v2 v2.2.0
|
||||
github.com/package-url/packageurl-go v0.1.2-0.20230812223828-f8bb31c1f10b
|
||||
github.com/owenrumney/go-sarif/v2 v2.3.0
|
||||
github.com/package-url/packageurl-go v0.1.2
|
||||
github.com/quasilyte/go-ruleguard/dsl v0.3.22
|
||||
github.com/samber/lo v1.38.1
|
||||
github.com/saracen/walker v0.1.3
|
||||
github.com/secure-systems-lab/go-securesystemslib v0.7.0
|
||||
github.com/sigstore/rekor v1.2.1
|
||||
github.com/sigstore/rekor v1.2.2
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/sosedoff/gitkit v0.4.0
|
||||
github.com/spdx/tools-golang v0.5.0
|
||||
github.com/spdx/tools-golang v0.5.4-0.20231108154018-0c0f394b5e1a // v0.5.3 with necessary changes. Can be upgraded to version 0.5.4 after release.
|
||||
github.com/spf13/cast v1.5.1
|
||||
github.com/spf13/cobra v1.7.0
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/spf13/viper v1.16.0
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/testcontainers/testcontainers-go v0.23.0
|
||||
github.com/testcontainers/testcontainers-go/modules/localstack v0.21.0
|
||||
github.com/testcontainers/testcontainers-go v0.26.0
|
||||
github.com/testcontainers/testcontainers-go/modules/localstack v0.26.0
|
||||
github.com/tetratelabs/wazero v1.2.1
|
||||
github.com/twitchtv/twirp v8.1.2+incompatible
|
||||
github.com/xeipuuv/gojsonschema v1.2.0
|
||||
github.com/xlab/treeprint v1.2.0
|
||||
go.etcd.io/bbolt v1.3.7
|
||||
go.uber.org/zap v1.25.0
|
||||
go.uber.org/zap v1.26.0
|
||||
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
|
||||
golang.org/x/mod v0.12.0
|
||||
golang.org/x/sync v0.3.0
|
||||
golang.org/x/term v0.11.0
|
||||
golang.org/x/text v0.12.0
|
||||
golang.org/x/mod v0.14.0
|
||||
golang.org/x/sync v0.4.0
|
||||
golang.org/x/term v0.15.0
|
||||
golang.org/x/text v0.14.0
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
|
||||
google.golang.org/protobuf v1.31.0
|
||||
google.golang.org/protobuf v1.32.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
k8s.io/api v0.28.1
|
||||
k8s.io/api v0.28.4
|
||||
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
|
||||
modernc.org/sqlite v1.23.1
|
||||
)
|
||||
|
||||
require github.com/bitnami/go-version v0.0.0-20231130084017-bb00604d650c
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.110.0 // indirect
|
||||
cloud.google.com/go/compute v1.19.3 // indirect
|
||||
cloud.google.com/go v0.110.7 // indirect
|
||||
cloud.google.com/go/compute v1.23.0 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
||||
cloud.google.com/go/iam v0.13.0 // indirect
|
||||
cloud.google.com/go/storage v1.29.0 // indirect
|
||||
cloud.google.com/go/iam v1.1.1 // indirect
|
||||
cloud.google.com/go/storage v1.31.0 // indirect
|
||||
dario.cat/mergo v1.0.0 // indirect
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
|
||||
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
|
||||
github.com/Azure/go-autorest/autorest v0.11.29 // indirect
|
||||
@@ -132,11 +142,10 @@ require (
|
||||
github.com/Masterminds/semver/v3 v3.2.1 // indirect
|
||||
github.com/Masterminds/squirrel v1.5.4 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/Microsoft/hcsshim v0.10.0-rc.8 // indirect
|
||||
github.com/Microsoft/hcsshim v0.11.4 // indirect
|
||||
github.com/OneOfOne/xxhash v1.2.8 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
|
||||
github.com/VividCortex/ewma v1.2.0 // indirect
|
||||
github.com/acomagu/bufpipe v1.0.4 // indirect
|
||||
github.com/agext/levenshtein v1.2.3 // indirect
|
||||
github.com/agnivade/levenshtein v1.1.1 // indirect
|
||||
github.com/alecthomas/chroma v0.10.0 // indirect
|
||||
@@ -144,66 +153,66 @@ require (
|
||||
github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 // indirect
|
||||
github.com/apparentlymart/go-cidr v1.1.0 // indirect
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
|
||||
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.36 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.25 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.16.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/apigateway v1.15.24 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.13.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/athena v1.30.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.20.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.27.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.26.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.15.20 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/codebuild v1.19.17 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/docdb v1.19.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.17.7 // indirect
|
||||
github.com/aws/aws-sdk-go v1.48.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.9 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.21.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/apigateway v1.18.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.14.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/athena v1.31.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.28.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.29.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.23.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/codebuild v1.22.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/docdb v1.23.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.21.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ebs v1.18.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.17.18 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ecs v1.28.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/efs v1.20.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/eks v1.27.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticache v1.26.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.19.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.19.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/emr v1.24.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/iam v1.21.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.28 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/kafka v1.19.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/kinesis v1.15.19 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/kms v1.23.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/lambda v1.24.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/mq v1.15.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/neptune v1.20.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/rds v1.26.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/redshift v1.27.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.33.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.16.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sns v1.20.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sqs v1.20.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/workspaces v1.23.0 // indirect
|
||||
github.com/aws/smithy-go v1.14.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ecs v1.30.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/efs v1.21.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/eks v1.29.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticache v1.29.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.20.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/emr v1.28.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/iam v1.22.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.38 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.35 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/kafka v1.22.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/kinesis v1.18.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/kms v1.24.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/lambda v1.39.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/mq v1.16.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/neptune v1.21.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/rds v1.54.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/redshift v1.29.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.21.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sns v1.21.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sqs v1.24.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.18.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/workspaces v1.31.1 // indirect
|
||||
github.com/aws/smithy-go v1.18.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
|
||||
github.com/briandowns/spinner v1.23.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/chai2010/gettext-go v1.0.2 // indirect
|
||||
github.com/cloudflare/circl v1.3.3 // indirect
|
||||
github.com/cloudflare/circl v1.3.7 // indirect
|
||||
github.com/containerd/cgroups v1.1.0 // indirect
|
||||
github.com/containerd/continuity v0.4.2 // indirect
|
||||
github.com/containerd/fifo v1.1.0 // indirect
|
||||
github.com/containerd/log v0.1.0 // indirect
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
|
||||
github.com/containerd/ttrpc v1.2.2 // indirect
|
||||
github.com/containerd/typeurl v1.0.2 // indirect
|
||||
@@ -226,21 +235,22 @@ require (
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
|
||||
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.3 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/go-errors/errors v1.4.2 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.4.1 // indirect
|
||||
github.com/go-gorp/gorp/v3 v3.0.5 // indirect
|
||||
github.com/go-logr/logr v1.2.4 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.5.0 // indirect
|
||||
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
|
||||
github.com/go-ini/ini v1.67.0 // indirect
|
||||
github.com/go-logr/logr v1.3.0 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-openapi/analysis v0.21.4 // indirect
|
||||
github.com/go-openapi/errors v0.20.3 // indirect
|
||||
github.com/go-openapi/errors v0.20.4 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.6 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/loads v0.21.2 // indirect
|
||||
github.com/go-openapi/spec v0.20.9 // indirect
|
||||
github.com/go-openapi/swag v0.22.3 // indirect
|
||||
github.com/go-openapi/swag v0.22.4 // indirect
|
||||
github.com/go-openapi/validate v0.22.1 // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/goccy/go-yaml v1.8.1 // indirect
|
||||
@@ -251,12 +261,12 @@ require (
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/google/btree v1.1.2 // indirect
|
||||
github.com/google/gnostic-models v0.6.8 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/s2a-go v0.1.3 // indirect
|
||||
github.com/google/s2a-go v0.1.5 // indirect
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.8.0 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
|
||||
github.com/gorilla/mux v1.8.0 // indirect
|
||||
github.com/gosuri/uitable v0.0.4 // indirect
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
|
||||
@@ -266,7 +276,7 @@ require (
|
||||
github.com/hashicorp/go-uuid v1.0.3 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.17.0 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.19.1 // indirect
|
||||
github.com/huandu/xstrings v1.4.0 // indirect
|
||||
github.com/imdario/mergo v0.3.15 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
@@ -277,12 +287,12 @@ require (
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/klauspost/compress v1.16.5 // indirect
|
||||
github.com/klauspost/compress v1.16.6 // indirect
|
||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
|
||||
github.com/liamg/iamgo v0.0.9 // indirect
|
||||
github.com/liamg/jfather v0.0.7 // indirect
|
||||
github.com/liamg/memoryfs v1.4.3 // indirect
|
||||
github.com/liamg/memoryfs v1.6.0 // indirect
|
||||
github.com/lib/pq v1.10.9 // indirect
|
||||
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
|
||||
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 // indirect
|
||||
@@ -299,7 +309,7 @@ require (
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||
github.com/moby/locker v1.0.1 // indirect
|
||||
github.com/moby/patternmatcher v0.5.0 // indirect
|
||||
github.com/moby/patternmatcher v0.6.0 // indirect
|
||||
github.com/moby/spdystream v0.2.0 // indirect
|
||||
github.com/moby/sys/mountinfo v0.6.2 // indirect
|
||||
github.com/moby/sys/sequential v0.5.0 // indirect
|
||||
@@ -316,7 +326,7 @@ require (
|
||||
github.com/opencontainers/runtime-spec v1.1.0-rc.1 // indirect
|
||||
github.com/opencontainers/selinux v1.11.0 // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||
github.com/owenrumney/squealer v1.1.1 // indirect
|
||||
github.com/owenrumney/squealer v1.2.1 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
@@ -330,59 +340,62 @@ require (
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/rubenv/sql-migrate v1.3.1 // indirect
|
||||
github.com/rubenv/sql-migrate v1.5.2 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sergi/go-diff v1.2.0 // indirect
|
||||
github.com/shibumi/go-pathspec v1.3.0 // indirect
|
||||
github.com/shopspring/decimal v1.3.1 // indirect
|
||||
github.com/skeema/knownhosts v1.1.1 // indirect
|
||||
github.com/skeema/knownhosts v1.2.1 // indirect
|
||||
github.com/spf13/afero v1.9.5 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/stretchr/objx v0.5.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.2 // indirect
|
||||
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
|
||||
github.com/ulikunitz/xz v0.5.10 // indirect
|
||||
github.com/ulikunitz/xz v0.5.11 // indirect
|
||||
github.com/vbatts/tar-split v0.11.3 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||
github.com/yashtewari/glob-intersection v0.1.0 // indirect
|
||||
github.com/yashtewari/glob-intersection v0.2.0 // indirect
|
||||
github.com/yuin/gopher-lua v1.1.0 // indirect
|
||||
github.com/zclconf/go-cty v1.13.0 // indirect
|
||||
github.com/zclconf/go-cty-yaml v1.0.3 // indirect
|
||||
go.mongodb.org/mongo-driver v1.11.3 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/otel v1.14.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.14.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
|
||||
go.opentelemetry.io/otel v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.19.0 // indirect
|
||||
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/crypto v0.12.0 // indirect
|
||||
golang.org/x/net v0.14.0 // indirect
|
||||
golang.org/x/oauth2 v0.8.0 // indirect
|
||||
golang.org/x/sys v0.11.0 // indirect
|
||||
golang.org/x/crypto v0.17.0 // indirect
|
||||
golang.org/x/net v0.19.0 // indirect
|
||||
golang.org/x/oauth2 v0.11.0 // indirect
|
||||
golang.org/x/sys v0.15.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
golang.org/x/tools v0.10.0 // indirect
|
||||
google.golang.org/api v0.122.0 // indirect
|
||||
golang.org/x/tools v0.13.0 // indirect
|
||||
google.golang.org/api v0.138.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
|
||||
google.golang.org/grpc v1.57.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
|
||||
google.golang.org/grpc v1.59.0 // indirect
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
helm.sh/helm/v3 v3.12.3 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.27.3 // indirect
|
||||
k8s.io/apimachinery v0.28.1 // indirect
|
||||
k8s.io/apiserver v0.27.3 // indirect
|
||||
k8s.io/cli-runtime v0.28.1 // indirect
|
||||
k8s.io/client-go v0.28.1 // indirect
|
||||
k8s.io/component-base v0.28.1 // indirect
|
||||
k8s.io/klog/v2 v2.100.1 // indirect
|
||||
helm.sh/helm/v3 v3.13.0 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.28.2 // indirect
|
||||
k8s.io/apimachinery v0.28.4 // indirect
|
||||
k8s.io/apiserver v0.28.2 // indirect
|
||||
k8s.io/cli-runtime v0.28.4 // indirect
|
||||
k8s.io/client-go v0.28.4 // indirect
|
||||
k8s.io/component-base v0.28.3 // indirect
|
||||
k8s.io/klog/v2 v2.110.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
|
||||
k8s.io/kubectl v0.28.1 // indirect
|
||||
k8s.io/kubectl v0.28.3 // indirect
|
||||
lukechampine.com/uint128 v1.2.0 // indirect
|
||||
modernc.org/cc/v3 v3.40.0 // indirect
|
||||
modernc.org/ccgo/v3 v3.16.13 // indirect
|
||||
@@ -397,9 +410,13 @@ require (
|
||||
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
)
|
||||
|
||||
// oras 1.2.2 is incompatible with github.com/docker/docker v24.0.2
|
||||
// cf. https://github.com/oras-project/oras-go/pull/527
|
||||
replace oras.land/oras-go => oras.land/oras-go v1.2.4-0.20230801060855-932dd06d38af
|
||||
|
||||
// testcontainers-go has a bug with versions v0.25.0 and v0.26.0
|
||||
// ref: https://github.com/testcontainers/testcontainers-go/issues/1782
|
||||
replace github.com/testcontainers/testcontainers-go => github.com/testcontainers/testcontainers-go v0.23.0
|
||||
|
||||
@@ -133,7 +133,7 @@ archives:
|
||||
|
||||
brews:
|
||||
-
|
||||
tap:
|
||||
repository:
|
||||
owner: aquasecurity
|
||||
name: homebrew-trivy
|
||||
homepage: "https://github.com/aquasecurity/trivy"
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
awscommands "github.com/aquasecurity/trivy/pkg/cloud/aws/commands"
|
||||
"github.com/aquasecurity/trivy/pkg/flag"
|
||||
dockercontainer "github.com/docker/docker/api/types/container"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
testcontainers "github.com/testcontainers/testcontainers-go"
|
||||
@@ -36,13 +37,16 @@ func TestAwsCommandRun(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "fail without creds",
|
||||
envs: map[string]string{
|
||||
"AWS_PROFILE": "non-existent-profile",
|
||||
},
|
||||
options: flag.Options{
|
||||
RegoOptions: flag.RegoOptions{SkipPolicyUpdate: true},
|
||||
AWSOptions: flag.AWSOptions{
|
||||
Region: "us-east-1",
|
||||
},
|
||||
},
|
||||
wantErr: "failed to retrieve credentials",
|
||||
wantErr: "non-existent-profile",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -57,7 +61,6 @@ func TestAwsCommandRun(t *testing.T) {
|
||||
tt.options.AWSOptions.Endpoint = addr
|
||||
tt.options.GlobalOptions.Timeout = time.Minute
|
||||
|
||||
t.Setenv("AWS_PROFILE", "non-existent-profile")
|
||||
for k, v := range tt.envs {
|
||||
t.Setenv(k, v)
|
||||
}
|
||||
@@ -77,11 +80,14 @@ func TestAwsCommandRun(t *testing.T) {
|
||||
|
||||
func setupLocalStack(t *testing.T, ctx context.Context) (*localstack.LocalStackContainer, string) {
|
||||
t.Helper()
|
||||
|
||||
t.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true")
|
||||
container, err := localstack.RunContainer(ctx, testcontainers.CustomizeRequest(
|
||||
testcontainers.GenericContainerRequest{
|
||||
ContainerRequest: testcontainers.ContainerRequest{
|
||||
Image: "localstack/localstack:2.2.0",
|
||||
HostConfigModifier: func(hostConfig *dockercontainer.HostConfig) {
|
||||
hostConfig.AutoRemove = true
|
||||
},
|
||||
},
|
||||
},
|
||||
))
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
dockercontainer "github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -343,6 +344,15 @@ func TestClientServerWithFormat(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/alpine-310.html.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.10 with junit template",
|
||||
args: csArgs{
|
||||
Format: "template",
|
||||
TemplatePath: "@../contrib/junit.tpl",
|
||||
Input: "testdata/fixtures/images/alpine-310.tar.gz",
|
||||
},
|
||||
golden: "testdata/alpine-310.junit.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.10 with github dependency snapshots format",
|
||||
args: csArgs{
|
||||
@@ -353,7 +363,7 @@ func TestClientServerWithFormat(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
fakeTime := time.Date(2020, 8, 10, 7, 28, 17, 958601, time.UTC)
|
||||
fakeTime := time.Date(2021, 8, 25, 12, 20, 30, 5, time.UTC)
|
||||
clock.SetFakeTime(t, fakeTime)
|
||||
|
||||
report.CustomTemplateFuncMap = map[string]interface{}{
|
||||
@@ -418,7 +428,7 @@ func TestClientServerWithCycloneDX(t *testing.T) {
|
||||
addr, cacheDir := setup(t, setupOptions{})
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
clock.SetFakeTime(t, time.Date(2020, 9, 10, 14, 20, 30, 5, time.UTC))
|
||||
clock.SetFakeTime(t, time.Date(2021, 8, 25, 12, 20, 30, 5, time.UTC))
|
||||
uuid.SetFakeUUID(t, "3ff14136-e09f-4df9-80ea-%012d")
|
||||
|
||||
osArgs, outputFile := setupClient(t, tt.args, addr, cacheDir, tt.golden)
|
||||
@@ -496,6 +506,8 @@ func TestClientServerWithToken(t *testing.T) {
|
||||
func TestClientServerWithRedis(t *testing.T) {
|
||||
// Set up a Redis container
|
||||
ctx := context.Background()
|
||||
// This test includes 2 checks
|
||||
// redisC container will terminate after first check
|
||||
redisC, addr := setupRedis(t, ctx)
|
||||
|
||||
// Set up Trivy server
|
||||
@@ -650,6 +662,7 @@ func setupClient(t *testing.T, c csArgs, addr string, cacheDir string, golden st
|
||||
}
|
||||
|
||||
func setupRedis(t *testing.T, ctx context.Context) (testcontainers.Container, string) {
|
||||
t.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true")
|
||||
t.Helper()
|
||||
imageName := "redis:5.0"
|
||||
port := "6379/tcp"
|
||||
@@ -657,8 +670,9 @@ func setupRedis(t *testing.T, ctx context.Context) (testcontainers.Container, st
|
||||
Name: "redis",
|
||||
Image: imageName,
|
||||
ExposedPorts: []string{port},
|
||||
SkipReaper: true,
|
||||
AutoRemove: true,
|
||||
HostConfigModifier: func(hostConfig *dockercontainer.HostConfig) {
|
||||
hostConfig.AutoRemove = true
|
||||
},
|
||||
}
|
||||
|
||||
redis, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
|
||||
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
|
||||
"github.com/aquasecurity/trivy-db/pkg/db"
|
||||
"github.com/aquasecurity/trivy-db/pkg/metadata"
|
||||
"github.com/aquasecurity/trivy/pkg/clock"
|
||||
"github.com/aquasecurity/trivy/pkg/commands"
|
||||
"github.com/aquasecurity/trivy/pkg/dbtest"
|
||||
"github.com/aquasecurity/trivy/pkg/types"
|
||||
@@ -43,6 +44,8 @@ func initDB(t *testing.T) string {
|
||||
entries, err := os.ReadDir(fixtureDir)
|
||||
require.NoError(t, err)
|
||||
|
||||
clock.SetFakeTime(t, time.Date(2021, 8, 25, 12, 20, 30, 5, time.UTC))
|
||||
|
||||
var fixtures []string
|
||||
for _, entry := range entries {
|
||||
if entry.IsDir() {
|
||||
|
||||
@@ -109,4 +109,49 @@ func TestK8s(t *testing.T) {
|
||||
}))
|
||||
|
||||
})
|
||||
|
||||
t.Run("specific resource scan", func(t *testing.T) {
|
||||
// Set up the output file
|
||||
outputFile := filepath.Join(t.TempDir(), "output.json")
|
||||
|
||||
osArgs := []string{
|
||||
"k8s",
|
||||
"-n",
|
||||
"default",
|
||||
"deployments/nginx-deployment",
|
||||
"-q",
|
||||
"--timeout",
|
||||
"5m0s",
|
||||
"--format",
|
||||
"json",
|
||||
"--components",
|
||||
"workload",
|
||||
"--context",
|
||||
"kind-kind-test",
|
||||
"--output",
|
||||
outputFile,
|
||||
}
|
||||
|
||||
// Run Trivy
|
||||
err := execute(osArgs)
|
||||
require.NoError(t, err)
|
||||
|
||||
var got report.Report
|
||||
f, err := os.Open(outputFile)
|
||||
require.NoError(t, err)
|
||||
defer f.Close()
|
||||
|
||||
err = json.NewDecoder(f).Decode(&got)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Flatten findings
|
||||
results := lo.FlatMap(got.Resources, func(resource report.Resource, _ int) []types.Result {
|
||||
return resource.Results
|
||||
})
|
||||
|
||||
// Has vulnerabilities
|
||||
assert.True(t, lo.SomeBy(results, func(r types.Result) bool {
|
||||
return len(r.Vulnerabilities) > 0
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
dockercontainer "github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/google/go-containerregistry/pkg/authn"
|
||||
"github.com/google/go-containerregistry/pkg/name"
|
||||
@@ -58,8 +59,9 @@ func setupRegistry(ctx context.Context, baseDir string, authURL *url.URL) (testc
|
||||
Mounts: testcontainers.Mounts(
|
||||
testcontainers.BindMount(filepath.Join(baseDir, "data", "certs"), "/certs"),
|
||||
),
|
||||
SkipReaper: true,
|
||||
AutoRemove: true,
|
||||
HostConfigModifier: func(hostConfig *dockercontainer.HostConfig) {
|
||||
hostConfig.AutoRemove = true
|
||||
},
|
||||
WaitingFor: wait.ForLog("listening on [::]:5443"),
|
||||
}
|
||||
|
||||
@@ -79,9 +81,10 @@ func setupAuthServer(ctx context.Context, baseDir string) (testcontainers.Contai
|
||||
testcontainers.BindMount(filepath.Join(baseDir, "data", "auth_config"), "/config"),
|
||||
testcontainers.BindMount(filepath.Join(baseDir, "data", "certs"), "/certs"),
|
||||
),
|
||||
SkipReaper: true,
|
||||
AutoRemove: true,
|
||||
Cmd: []string{"/config/config.yml"},
|
||||
HostConfigModifier: func(hostConfig *dockercontainer.HostConfig) {
|
||||
hostConfig.AutoRemove = true
|
||||
},
|
||||
Cmd: []string{"/config/config.yml"},
|
||||
}
|
||||
|
||||
authC, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
|
||||
@@ -119,6 +122,9 @@ func TestRegistry(t *testing.T) {
|
||||
baseDir, err := filepath.Abs(".")
|
||||
require.NoError(t, err)
|
||||
|
||||
// disable Reaper for auth server and registry containers
|
||||
t.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true")
|
||||
|
||||
// set up auth server
|
||||
authC, err := setupAuthServer(ctx, baseDir)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -36,6 +37,7 @@ func TestRepository(t *testing.T) {
|
||||
command string
|
||||
format types.Format
|
||||
includeDevDeps bool
|
||||
parallel int
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -69,6 +71,15 @@ func TestRepository(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/gomod-skip.json.golden",
|
||||
},
|
||||
{
|
||||
name: "gomod in series",
|
||||
args: args{
|
||||
scanner: types.VulnerabilityScanner,
|
||||
input: "testdata/fixtures/repo/gomod",
|
||||
parallel: 1,
|
||||
},
|
||||
golden: "testdata/gomod.json.golden",
|
||||
},
|
||||
{
|
||||
name: "npm",
|
||||
args: args{
|
||||
@@ -175,6 +186,15 @@ func TestRepository(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/dotnet.json.golden",
|
||||
},
|
||||
{
|
||||
name: "packages-props",
|
||||
args: args{
|
||||
scanner: types.VulnerabilityScanner,
|
||||
listAllPkgs: true,
|
||||
input: "testdata/fixtures/repo/packagesprops",
|
||||
},
|
||||
golden: "testdata/packagesprops.json.golden",
|
||||
},
|
||||
{
|
||||
name: "swift",
|
||||
args: args{
|
||||
@@ -360,10 +380,10 @@ func TestRepository(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "dockerfile with fs subcommand",
|
||||
name: "dockerfile with fs subcommand and an alias scanner",
|
||||
args: args{
|
||||
command: "fs",
|
||||
scanner: types.MisconfigScanner,
|
||||
scanner: "config", // for backward compatibility
|
||||
policyPaths: []string{"testdata/fixtures/repo/custom-policy/policy"},
|
||||
namespaces: []string{"user"},
|
||||
input: "testdata/fixtures/repo/custom-policy",
|
||||
@@ -396,13 +416,12 @@ func TestRepository(t *testing.T) {
|
||||
|
||||
osArgs := []string{
|
||||
"-q",
|
||||
"--cache-dir",
|
||||
cacheDir,
|
||||
"--cache-dir", cacheDir,
|
||||
command,
|
||||
"--skip-db-update",
|
||||
"--skip-policy-update",
|
||||
"--format",
|
||||
string(format),
|
||||
"--format", string(format),
|
||||
"--parallel", fmt.Sprint(tt.args.parallel),
|
||||
"--offline-scan",
|
||||
}
|
||||
|
||||
@@ -480,7 +499,7 @@ func TestRepository(t *testing.T) {
|
||||
osArgs = append(osArgs, "--output", outputFile)
|
||||
osArgs = append(osArgs, tt.args.input)
|
||||
|
||||
clock.SetFakeTime(t, time.Date(2020, 9, 10, 14, 20, 30, 5, time.UTC))
|
||||
clock.SetFakeTime(t, time.Date(2021, 8, 25, 12, 20, 30, 5, time.UTC))
|
||||
uuid.SetFakeUUID(t, "3ff14136-e09f-4df9-80ea-%012d")
|
||||
|
||||
// Run "trivy repo"
|
||||
|
||||
@@ -58,6 +58,15 @@ func TestSBOM(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/fluentd-multiple-lockfiles.json.golden",
|
||||
},
|
||||
{
|
||||
name: "minikube KBOM",
|
||||
args: args{
|
||||
input: "testdata/fixtures/sbom/minikube-kbom.json",
|
||||
format: "json",
|
||||
artifactType: "cyclonedx",
|
||||
},
|
||||
golden: "testdata/minikube-kbom.json.golden",
|
||||
},
|
||||
{
|
||||
name: "centos7 in in-toto attestation",
|
||||
args: args{
|
||||
|
||||
13
integration/testdata/almalinux-8.json.golden
vendored
13
integration/testdata/almalinux-8.json.golden
vendored
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"SchemaVersion": 2,
|
||||
"CreatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"ArtifactName": "testdata/fixtures/images/almalinux-8.tar.gz",
|
||||
"ArtifactType": "container_image",
|
||||
"Metadata": {
|
||||
@@ -75,6 +76,18 @@
|
||||
"CweIDs": [
|
||||
"CWE-125"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"alma": 2,
|
||||
"amazon": 2,
|
||||
"arch-linux": 3,
|
||||
"cbl-mariner": 3,
|
||||
"nvd": 3,
|
||||
"oracle-oval": 2,
|
||||
"photon": 3,
|
||||
"redhat": 2,
|
||||
"rocky": 2,
|
||||
"ubuntu": 2
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:M/Au:N/C:P/I:N/A:P",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"SchemaVersion": 2,
|
||||
"ArtifactName": "localhost:55844/alpine:3.10",
|
||||
"CreatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"ArtifactName": "localhost:53869/alpine:3.10",
|
||||
"ArtifactType": "container_image",
|
||||
"Metadata": {
|
||||
"OS": {
|
||||
@@ -13,10 +14,10 @@
|
||||
"sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
],
|
||||
"RepoTags": [
|
||||
"localhost:55844/alpine:3.10"
|
||||
"localhost:53869/alpine:3.10"
|
||||
],
|
||||
"RepoDigests": [
|
||||
"localhost:55844/alpine@sha256:b1c5a500182b21d0bfa5a584a8526b56d8be316f89e87d951be04abed2446e60"
|
||||
"localhost:53869/alpine@sha256:b1c5a500182b21d0bfa5a584a8526b56d8be316f89e87d951be04abed2446e60"
|
||||
],
|
||||
"ImageConfig": {
|
||||
"architecture": "amd64",
|
||||
@@ -55,7 +56,7 @@
|
||||
},
|
||||
"Results": [
|
||||
{
|
||||
"Target": "localhost:55844/alpine:3.10 (alpine 3.10.2)",
|
||||
"Target": "localhost:53869/alpine:3.10 (alpine 3.10.2)",
|
||||
"Class": "os-pkgs",
|
||||
"Type": "alpine",
|
||||
"Vulnerabilities": [
|
||||
@@ -83,6 +84,14 @@
|
||||
"CweIDs": [
|
||||
"CWE-330"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"amazon": 2,
|
||||
"nvd": 2,
|
||||
"oracle-oval": 2,
|
||||
"photon": 2,
|
||||
"redhat": 1,
|
||||
"ubuntu": 1
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
|
||||
@@ -144,6 +153,14 @@
|
||||
"CweIDs": [
|
||||
"CWE-200"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"amazon": 1,
|
||||
"nvd": 2,
|
||||
"oracle-oval": 1,
|
||||
"photon": 2,
|
||||
"redhat": 1,
|
||||
"ubuntu": 1
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
|
||||
@@ -215,6 +232,14 @@
|
||||
"CweIDs": [
|
||||
"CWE-330"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"amazon": 2,
|
||||
"nvd": 2,
|
||||
"oracle-oval": 2,
|
||||
"photon": 2,
|
||||
"redhat": 1,
|
||||
"ubuntu": 1
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
|
||||
@@ -276,6 +301,14 @@
|
||||
"CweIDs": [
|
||||
"CWE-200"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"amazon": 1,
|
||||
"nvd": 2,
|
||||
"oracle-oval": 1,
|
||||
"photon": 2,
|
||||
"redhat": 1,
|
||||
"ubuntu": 1
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
|
||||
|
||||
16
integration/testdata/alpine-310.asff.golden
vendored
16
integration/testdata/alpine-310.asff.golden
vendored
@@ -7,8 +7,8 @@
|
||||
"GeneratorId": "Trivy/CVE-2019-1549",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"CreatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"UpdatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"Severity": {
|
||||
"Label": "MEDIUM"
|
||||
},
|
||||
@@ -52,8 +52,8 @@
|
||||
"GeneratorId": "Trivy/CVE-2019-1551",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"CreatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"UpdatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"Severity": {
|
||||
"Label": "MEDIUM"
|
||||
},
|
||||
@@ -97,8 +97,8 @@
|
||||
"GeneratorId": "Trivy/CVE-2019-1549",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"CreatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"UpdatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"Severity": {
|
||||
"Label": "MEDIUM"
|
||||
},
|
||||
@@ -142,8 +142,8 @@
|
||||
"GeneratorId": "Trivy/CVE-2019-1551",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"CreatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"UpdatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"Severity": {
|
||||
"Label": "MEDIUM"
|
||||
},
|
||||
|
||||
57
integration/testdata/alpine-310.gitlab.golden
vendored
57
integration/testdata/alpine-310.gitlab.golden
vendored
@@ -1,18 +1,35 @@
|
||||
{
|
||||
"version": "14.0.6",
|
||||
"version": "15.0.7",
|
||||
"scan": {
|
||||
"analyzer": {
|
||||
"id": "trivy",
|
||||
"name": "Trivy",
|
||||
"vendor": {
|
||||
"name": "Aqua Security"
|
||||
},
|
||||
"version": "dev"
|
||||
},
|
||||
"end_time": "2021-08-25T12:20:30",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "Trivy",
|
||||
"url": "https://github.com/aquasecurity/trivy/",
|
||||
"vendor": {
|
||||
"name": "Aqua Security"
|
||||
},
|
||||
"version": "dev"
|
||||
},
|
||||
"start_time": "2021-08-25T12:20:30",
|
||||
"status": "success",
|
||||
"type": "container_scanning"
|
||||
},
|
||||
"vulnerabilities": [
|
||||
{
|
||||
"id": "CVE-2019-1549",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: information disclosure in fork()",
|
||||
"name": "openssl: information disclosure in fork()",
|
||||
"description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"cve": "CVE-2019-1549",
|
||||
"severity": "Medium",
|
||||
"solution": "Upgrade libcrypto1.1 to 1.1.1d-r0",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
@@ -76,16 +93,10 @@
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1551",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"name": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"cve": "CVE-2019-1551",
|
||||
"severity": "Medium",
|
||||
"solution": "Upgrade libcrypto1.1 to 1.1.1d-r2",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
@@ -169,16 +180,10 @@
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1549",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: information disclosure in fork()",
|
||||
"name": "openssl: information disclosure in fork()",
|
||||
"description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"cve": "CVE-2019-1549",
|
||||
"severity": "Medium",
|
||||
"solution": "Upgrade libssl1.1 to 1.1.1d-r0",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
@@ -242,16 +247,10 @@
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1551",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"name": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"cve": "CVE-2019-1551",
|
||||
"severity": "Medium",
|
||||
"solution": "Upgrade libssl1.1 to 1.1.1d-r2",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
|
||||
30
integration/testdata/alpine-310.gsbom.golden
vendored
30
integration/testdata/alpine-310.gsbom.golden
vendored
@@ -11,13 +11,13 @@
|
||||
"correlator": "workflow-name_integration",
|
||||
"id": "1910764383"
|
||||
},
|
||||
"scanned": "2020-08-10T07:28:17Z",
|
||||
"scanned": "2021-08-25T12:20:30Z",
|
||||
"manifests": {
|
||||
"testdata/fixtures/images/alpine-310.tar.gz (alpine 3.10.2)": {
|
||||
"name": "alpine",
|
||||
"resolved": {
|
||||
"alpine-baselayout": {
|
||||
"package_url": "pkg:apk/alpine-baselayout@3.1.2-r0",
|
||||
"package_url": "pkg:apk/alpine/alpine-baselayout@3.1.2-r0?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"busybox@1.30.1-r2",
|
||||
@@ -26,12 +26,12 @@
|
||||
"scope": "runtime"
|
||||
},
|
||||
"alpine-keys": {
|
||||
"package_url": "pkg:apk/alpine-keys@2.1-r2",
|
||||
"package_url": "pkg:apk/alpine/alpine-keys@2.1-r2?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"scope": "runtime"
|
||||
},
|
||||
"apk-tools": {
|
||||
"package_url": "pkg:apk/apk-tools@2.10.4-r2",
|
||||
"package_url": "pkg:apk/alpine/apk-tools@2.10.4-r2?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"libcrypto1.1@1.1.1c-r0",
|
||||
@@ -42,7 +42,7 @@
|
||||
"scope": "runtime"
|
||||
},
|
||||
"busybox": {
|
||||
"package_url": "pkg:apk/busybox@1.30.1-r2",
|
||||
"package_url": "pkg:apk/alpine/busybox@1.30.1-r2?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"musl@1.1.22-r3"
|
||||
@@ -50,12 +50,12 @@
|
||||
"scope": "runtime"
|
||||
},
|
||||
"ca-certificates-cacert": {
|
||||
"package_url": "pkg:apk/ca-certificates-cacert@20190108-r0",
|
||||
"package_url": "pkg:apk/alpine/ca-certificates-cacert@20190108-r0?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"scope": "runtime"
|
||||
},
|
||||
"libc-utils": {
|
||||
"package_url": "pkg:apk/libc-utils@0.7.1-r0",
|
||||
"package_url": "pkg:apk/alpine/libc-utils@0.7.1-r0?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"musl-utils@1.1.22-r3"
|
||||
@@ -63,7 +63,7 @@
|
||||
"scope": "runtime"
|
||||
},
|
||||
"libcrypto1.1": {
|
||||
"package_url": "pkg:apk/libcrypto1.1@1.1.1c-r0",
|
||||
"package_url": "pkg:apk/alpine/libcrypto1.1@1.1.1c-r0?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"musl@1.1.22-r3"
|
||||
@@ -71,7 +71,7 @@
|
||||
"scope": "runtime"
|
||||
},
|
||||
"libssl1.1": {
|
||||
"package_url": "pkg:apk/libssl1.1@1.1.1c-r0",
|
||||
"package_url": "pkg:apk/alpine/libssl1.1@1.1.1c-r0?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"libcrypto1.1@1.1.1c-r0",
|
||||
@@ -80,7 +80,7 @@
|
||||
"scope": "runtime"
|
||||
},
|
||||
"libtls-standalone": {
|
||||
"package_url": "pkg:apk/libtls-standalone@2.9.1-r0",
|
||||
"package_url": "pkg:apk/alpine/libtls-standalone@2.9.1-r0?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"ca-certificates-cacert@20190108-r0",
|
||||
@@ -91,12 +91,12 @@
|
||||
"scope": "runtime"
|
||||
},
|
||||
"musl": {
|
||||
"package_url": "pkg:apk/musl@1.1.22-r3",
|
||||
"package_url": "pkg:apk/alpine/musl@1.1.22-r3?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"scope": "runtime"
|
||||
},
|
||||
"musl-utils": {
|
||||
"package_url": "pkg:apk/musl-utils@1.1.22-r3",
|
||||
"package_url": "pkg:apk/alpine/musl-utils@1.1.22-r3?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"musl@1.1.22-r3",
|
||||
@@ -105,7 +105,7 @@
|
||||
"scope": "runtime"
|
||||
},
|
||||
"scanelf": {
|
||||
"package_url": "pkg:apk/scanelf@1.2.3-r0",
|
||||
"package_url": "pkg:apk/alpine/scanelf@1.2.3-r0?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"musl@1.1.22-r3"
|
||||
@@ -113,7 +113,7 @@
|
||||
"scope": "runtime"
|
||||
},
|
||||
"ssl_client": {
|
||||
"package_url": "pkg:apk/ssl_client@1.30.1-r2",
|
||||
"package_url": "pkg:apk/alpine/ssl_client@1.30.1-r2?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"libtls-standalone@2.9.1-r0",
|
||||
@@ -122,7 +122,7 @@
|
||||
"scope": "runtime"
|
||||
},
|
||||
"zlib": {
|
||||
"package_url": "pkg:apk/zlib@1.2.11-r1",
|
||||
"package_url": "pkg:apk/alpine/zlib@1.2.11-r1?arch=x86_64\u0026distro=3.10.2",
|
||||
"relationship": "direct",
|
||||
"dependencies": [
|
||||
"musl@1.1.22-r3"
|
||||
|
||||
4
integration/testdata/alpine-310.html.golden
vendored
4
integration/testdata/alpine-310.html.golden
vendored
@@ -51,7 +51,7 @@
|
||||
}
|
||||
a.toggle-more-links { cursor: pointer; }
|
||||
</style>
|
||||
<title>testdata/fixtures/images/alpine-310.tar.gz (alpine 3.10.2) - Trivy Report - 2020-08-10 07:28:17.000958601 +0000 UTC </title>
|
||||
<title>testdata/fixtures/images/alpine-310.tar.gz (alpine 3.10.2) - Trivy Report - 2021-08-25 12:20:30.000000005 +0000 UTC </title>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
document.querySelectorAll('td.links').forEach(function(linkCell) {
|
||||
@@ -81,7 +81,7 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>testdata/fixtures/images/alpine-310.tar.gz (alpine 3.10.2) - Trivy Report - 2020-08-10 07:28:17.000958601 +0000 UTC</h1>
|
||||
<h1>testdata/fixtures/images/alpine-310.tar.gz (alpine 3.10.2) - Trivy Report - 2021-08-25 12:20:30.000000005 +0000 UTC</h1>
|
||||
<table>
|
||||
<tr class="group-header"><th colspan="6">alpine</th></tr>
|
||||
<tr class="sub-header">
|
||||
|
||||
33
integration/testdata/alpine-310.json.golden
vendored
33
integration/testdata/alpine-310.json.golden
vendored
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"SchemaVersion": 2,
|
||||
"CreatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"ArtifactName": "testdata/fixtures/images/alpine-310.tar.gz",
|
||||
"ArtifactType": "container_image",
|
||||
"Metadata": {
|
||||
@@ -77,6 +78,14 @@
|
||||
"CweIDs": [
|
||||
"CWE-330"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"amazon": 2,
|
||||
"nvd": 2,
|
||||
"oracle-oval": 2,
|
||||
"photon": 2,
|
||||
"redhat": 1,
|
||||
"ubuntu": 1
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
|
||||
@@ -138,6 +147,14 @@
|
||||
"CweIDs": [
|
||||
"CWE-200"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"amazon": 1,
|
||||
"nvd": 2,
|
||||
"oracle-oval": 1,
|
||||
"photon": 2,
|
||||
"redhat": 1,
|
||||
"ubuntu": 1
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
|
||||
@@ -209,6 +226,14 @@
|
||||
"CweIDs": [
|
||||
"CWE-330"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"amazon": 2,
|
||||
"nvd": 2,
|
||||
"oracle-oval": 2,
|
||||
"photon": 2,
|
||||
"redhat": 1,
|
||||
"ubuntu": 1
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
|
||||
@@ -270,6 +295,14 @@
|
||||
"CweIDs": [
|
||||
"CWE-200"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"amazon": 1,
|
||||
"nvd": 2,
|
||||
"oracle-oval": 1,
|
||||
"photon": 2,
|
||||
"redhat": 1,
|
||||
"ubuntu": 1
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
|
||||
|
||||
25
integration/testdata/alpine-310.junit.golden
vendored
Normal file
25
integration/testdata/alpine-310.junit.golden
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" ?>
|
||||
<testsuites name="trivy">
|
||||
<testsuite tests="4" failures="4" name="testdata/fixtures/images/alpine-310.tar.gz (alpine 3.10.2)" errors="0" skipped="0" time="">
|
||||
<properties>
|
||||
<property name="type" value="alpine"></property>
|
||||
</properties>
|
||||
<testcase classname="libcrypto1.1-1.1.1c-r0" name="[MEDIUM] CVE-2019-1549" time="">
|
||||
<failure message="openssl: information disclosure in fork()" type="description">OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).</failure>
|
||||
</testcase>
|
||||
<testcase classname="libcrypto1.1-1.1.1c-r0" name="[MEDIUM] CVE-2019-1551" time="">
|
||||
<failure message="openssl: Integer overflow in RSAZ modular exponentiation on x86_64" type="description">There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).</failure>
|
||||
</testcase>
|
||||
<testcase classname="libssl1.1-1.1.1c-r0" name="[MEDIUM] CVE-2019-1549" time="">
|
||||
<failure message="openssl: information disclosure in fork()" type="description">OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).</failure>
|
||||
</testcase>
|
||||
<testcase classname="libssl1.1-1.1.1c-r0" name="[MEDIUM] CVE-2019-1551" time="">
|
||||
<failure message="openssl: Integer overflow in RSAZ modular exponentiation on x86_64" type="description">There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).</failure>
|
||||
</testcase>
|
||||
</testsuite>
|
||||
<testsuite tests="0" failures="0" name="testdata/fixtures/images/alpine-310.tar.gz (alpine 3.10.2)" errors="0" skipped="0" time="">
|
||||
<properties>
|
||||
<property name="type" value="alpine"></property>
|
||||
</properties>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
18
integration/testdata/alpine-310.sarif.golden
vendored
18
integration/testdata/alpine-310.sarif.golden
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"$schema": "https://json.schemastore.org/sarif-2.1.0.json",
|
||||
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
||||
"runs": [
|
||||
{
|
||||
"tool": {
|
||||
@@ -23,8 +23,8 @@
|
||||
},
|
||||
"helpUri": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"help": {
|
||||
"text": "Vulnerability CVE-2019-1549\nSeverity: MEDIUM\nPackage: libssl1.1\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)\nOpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"markdown": "**Vulnerability CVE-2019-1549**\n| Severity | Package | Fixed Version | Link |\n| --- | --- | --- | --- |\n|MEDIUM|libssl1.1|1.1.1d-r0|[CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)|\n\nOpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c)."
|
||||
"text": "Vulnerability CVE-2019-1549\\nSeverity: MEDIUM\\nPackage: libssl1.1\\nFixed Version: 1.1.1d-r0\\nLink: [CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)\\nOpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"markdown": "**Vulnerability CVE-2019-1549**\\n| Severity | Package | Fixed Version | Link |\\n| --- | --- | --- | --- |\\n|MEDIUM|libssl1.1|1.1.1d-r0|[CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)|\\n\\nOpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c)."
|
||||
},
|
||||
"properties": {
|
||||
"precision": "very-high",
|
||||
@@ -50,8 +50,8 @@
|
||||
},
|
||||
"helpUri": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"help": {
|
||||
"text": "Vulnerability CVE-2019-1551\nSeverity: MEDIUM\nPackage: libssl1.1\nFixed Version: 1.1.1d-r2\nLink: [CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)\nThere is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"markdown": "**Vulnerability CVE-2019-1551**\n| Severity | Package | Fixed Version | Link |\n| --- | --- | --- | --- |\n|MEDIUM|libssl1.1|1.1.1d-r2|[CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)|\n\nThere is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t)."
|
||||
"text": "Vulnerability CVE-2019-1551\\nSeverity: MEDIUM\\nPackage: libssl1.1\\nFixed Version: 1.1.1d-r2\\nLink: [CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)\\nThere is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"markdown": "**Vulnerability CVE-2019-1551**\\n| Severity | Package | Fixed Version | Link |\\n| --- | --- | --- | --- |\\n|MEDIUM|libssl1.1|1.1.1d-r2|[CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)|\\n\\nThere is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t)."
|
||||
},
|
||||
"properties": {
|
||||
"precision": "very-high",
|
||||
@@ -73,7 +73,7 @@
|
||||
"ruleIndex": 0,
|
||||
"level": "warning",
|
||||
"message": {
|
||||
"text": "Package: libcrypto1.1\nInstalled Version: 1.1.1c-r0\nVulnerability CVE-2019-1549\nSeverity: MEDIUM\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)"
|
||||
"text": "Package: libcrypto1.1\\nInstalled Version: 1.1.1c-r0\\nVulnerability CVE-2019-1549\\nSeverity: MEDIUM\\nFixed Version: 1.1.1d-r0\\nLink: [CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)"
|
||||
},
|
||||
"locations": [
|
||||
{
|
||||
@@ -100,7 +100,7 @@
|
||||
"ruleIndex": 1,
|
||||
"level": "warning",
|
||||
"message": {
|
||||
"text": "Package: libcrypto1.1\nInstalled Version: 1.1.1c-r0\nVulnerability CVE-2019-1551\nSeverity: MEDIUM\nFixed Version: 1.1.1d-r2\nLink: [CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)"
|
||||
"text": "Package: libcrypto1.1\\nInstalled Version: 1.1.1c-r0\\nVulnerability CVE-2019-1551\\nSeverity: MEDIUM\\nFixed Version: 1.1.1d-r2\\nLink: [CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)"
|
||||
},
|
||||
"locations": [
|
||||
{
|
||||
@@ -127,7 +127,7 @@
|
||||
"ruleIndex": 0,
|
||||
"level": "warning",
|
||||
"message": {
|
||||
"text": "Package: libssl1.1\nInstalled Version: 1.1.1c-r0\nVulnerability CVE-2019-1549\nSeverity: MEDIUM\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)"
|
||||
"text": "Package: libssl1.1\\nInstalled Version: 1.1.1c-r0\\nVulnerability CVE-2019-1549\\nSeverity: MEDIUM\\nFixed Version: 1.1.1d-r0\\nLink: [CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)"
|
||||
},
|
||||
"locations": [
|
||||
{
|
||||
@@ -154,7 +154,7 @@
|
||||
"ruleIndex": 1,
|
||||
"level": "warning",
|
||||
"message": {
|
||||
"text": "Package: libssl1.1\nInstalled Version: 1.1.1c-r0\nVulnerability CVE-2019-1551\nSeverity: MEDIUM\nFixed Version: 1.1.1d-r2\nLink: [CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)"
|
||||
"text": "Package: libssl1.1\\nInstalled Version: 1.1.1c-r0\\nVulnerability CVE-2019-1551\\nSeverity: MEDIUM\\nFixed Version: 1.1.1d-r2\\nLink: [CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)"
|
||||
},
|
||||
"locations": [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"SchemaVersion": 2,
|
||||
"CreatedAt": "2021-08-25T12:20:30.000000005Z",
|
||||
"ArtifactName": "testdata/fixtures/images/alpine-39.tar.gz",
|
||||
"ArtifactType": "container_image",
|
||||
"Metadata": {
|
||||
@@ -76,6 +77,9 @@
|
||||
"CweIDs": [
|
||||
"CWE-787"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"nvd": 4
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P",
|
||||
@@ -115,6 +119,9 @@
|
||||
"CweIDs": [
|
||||
"CWE-787"
|
||||
],
|
||||
"VendorSeverity": {
|
||||
"nvd": 4
|
||||
},
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V2Vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user