Compare commits
295 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c06f467e67 | ||
|
|
df4f7604a4 | ||
|
|
bf7a8ede35 | ||
|
|
acb22c60ac | ||
|
|
9a3510ffdd | ||
|
|
7806b37e23 | ||
|
|
eadc6fb641 | ||
|
|
cc489b1af5 | ||
|
|
013f71a6a3 | ||
|
|
113a5b2162 | ||
|
|
733e5ac1fb | ||
|
|
d311e49bc3 | ||
|
|
cf1a7bf30b | ||
|
|
d465d9d1e0 | ||
|
|
0af225ccf1 | ||
|
|
6f64d55180 | ||
|
|
8c27430a2f | ||
|
|
c2b46d3c20 | ||
|
|
4368f11e0d | ||
|
|
5ec62f8636 | ||
|
|
8016b821a2 | ||
|
|
7a25dadb44 | ||
|
|
9c794c0ffc | ||
|
|
14c1024b47 | ||
|
|
998f750432 | ||
|
|
770b14113c | ||
|
|
3ccb1a0f10 | ||
|
|
58cfd1b074 | ||
|
|
715963d754 | ||
|
|
37da98df45 | ||
|
|
cdee7030ac | ||
|
|
6a2225b425 | ||
|
|
a2a02de7c5 | ||
|
|
e739ab8506 | ||
|
|
c6d5d856ce | ||
|
|
194a814688 | ||
|
|
03830c50c9 | ||
|
|
8e814fa23d | ||
|
|
2dc76ba782 | ||
|
|
c17176ba97 | ||
|
|
bce70af369 | ||
|
|
4369a19af7 | ||
|
|
5566548b78 | ||
|
|
a8af76a471 | ||
|
|
c8ed432f28 | ||
|
|
551a46efcc | ||
|
|
261649b115 | ||
|
|
acfddd4570 | ||
|
|
419e3d2023 | ||
|
|
f0961d54f6 | ||
|
|
a5d485cf8a | ||
|
|
29b8faf5fa | ||
|
|
e3bef02018 | ||
|
|
916f6c66f8 | ||
|
|
8e6cd0e917 | ||
|
|
060d0bb641 | ||
|
|
2d090ef2df | ||
|
|
6343e4fc71 | ||
|
|
a018ee1f9b | ||
|
|
5da053f302 | ||
|
|
3d66cb8d88 | ||
|
|
9aca98cca8 | ||
|
|
7811ad0d24 | ||
|
|
fae710db8f | ||
|
|
d2d4022ef3 | ||
|
|
164b025413 | ||
|
|
5dd9bd4701 | ||
|
|
7c2017fa7a | ||
|
|
63c9469bdd | ||
|
|
aa822c260f | ||
|
|
30cc88fa87 | ||
|
|
e32215c99d | ||
|
|
d4da83c633 | ||
|
|
0d7d97d131 | ||
|
|
9873cf3b9c | ||
|
|
95c8fd912e | ||
|
|
12ec0dfe9e | ||
|
|
9b7d7132b7 | ||
|
|
13e72eca58 | ||
|
|
a9861994e5 | ||
|
|
46d5abad42 | ||
|
|
34ab09d559 | ||
|
|
1ba5b59527 | ||
|
|
4fab0f8b99 | ||
|
|
d7709816c3 | ||
|
|
4337068208 | ||
|
|
d82d6cb731 | ||
|
|
cfddfb33c1 | ||
|
|
dfcb0f90db | ||
|
|
183eaafb4e | ||
|
|
94d6e8ced6 | ||
|
|
336c47ecc3 | ||
|
|
06b44738e7 | ||
|
|
a51ceddada | ||
|
|
53517d622b | ||
|
|
ad544e97cc | ||
|
|
089368d968 | ||
|
|
116356500e | ||
|
|
637da2b178 | ||
|
|
13190e92d9 | ||
|
|
6bca7c3c79 | ||
|
|
8e4279b863 | ||
|
|
e98c873ed0 | ||
|
|
b1c2eab5aa | ||
|
|
1c49a16c65 | ||
|
|
8dd0fcd61b | ||
|
|
74e4c6e012 | ||
|
|
245c120532 | ||
|
|
86714bf6bf | ||
|
|
a75839212c | ||
|
|
4d00d8b52a | ||
|
|
3ad2b3e255 | ||
|
|
8baccd7909 | ||
|
|
e75a90f2e5 | ||
|
|
6625bd32e0 | ||
|
|
826fe60732 | ||
|
|
f23ed77598 | ||
|
|
df024e88dd | ||
|
|
29dee32814 | ||
|
|
1a67472d2b | ||
|
|
09e37b7c67 | ||
|
|
87a9aa60d1 | ||
|
|
712dcd3007 | ||
|
|
625f22b819 | ||
|
|
6a2f6fde4f | ||
|
|
5f69937cc6 | ||
|
|
258d153461 | ||
|
|
ade033a837 | ||
|
|
f85c9fac6f | ||
|
|
9d7f5c948e | ||
|
|
f148eb10f2 | ||
|
|
97f95c4ddf | ||
|
|
abd62ae74e | ||
|
|
7c409fd270 | ||
|
|
1b68327b65 | ||
|
|
a2482c14e1 | ||
|
|
e866bd5b5d | ||
|
|
1870f28461 | ||
|
|
6c81e5505e | ||
|
|
8ec3938e01 | ||
|
|
f6c5d58001 | ||
|
|
c4022d61b3 | ||
|
|
317792433e | ||
|
|
dd9620ef38 | ||
|
|
eb3ceb323d | ||
|
|
ab74caa87f | ||
|
|
71da44f7e1 | ||
|
|
102b6df738 | ||
|
|
aa19aaf4e4 | ||
|
|
8fcef352b3 | ||
|
|
fb8c516ded | ||
|
|
96bd7ac594 | ||
|
|
12c5bf0805 | ||
|
|
d6c40ce058 | ||
|
|
9d2057a7c2 | ||
|
|
2a9d9bd214 | ||
|
|
617c3e31bd | ||
|
|
56cedc0d67 | ||
|
|
d7d7265eb0 | ||
|
|
6639911662 | ||
|
|
337cb75353 | ||
|
|
9361cdb7e2 | ||
|
|
ee01e6e2f4 | ||
|
|
3d2f583ecd | ||
|
|
c4b5ab7881 | ||
|
|
355c1b583b | ||
|
|
7244ece536 | ||
|
|
5cd0566843 | ||
|
|
ebb74a5de0 | ||
|
|
24a8d6aaa8 | ||
|
|
9d0d7ad886 | ||
|
|
e8230e19d7 | ||
|
|
04535b554a | ||
|
|
939e34e37c | ||
|
|
7cb6c02a4e | ||
|
|
c1d26ec334 | ||
|
|
4f70468bdd | ||
|
|
1dfece89d0 | ||
|
|
e1ea02c7b8 | ||
|
|
64926d8423 | ||
|
|
eb54bb5da5 | ||
|
|
dc76c6e4f4 | ||
|
|
1b7e47424b | ||
|
|
876ab84b36 | ||
|
|
eef7c4fb40 | ||
|
|
069aae59ec | ||
|
|
4a9ac6d199 | ||
|
|
9c5e5a04ee | ||
|
|
388f47669d | ||
|
|
cd3e4bcac2 | ||
|
|
ce81c05851 | ||
|
|
cf0f0d00c2 | ||
|
|
8a3a113eea | ||
|
|
19495ba7c2 | ||
|
|
e787e1af01 | ||
|
|
327cf88397 | ||
|
|
82214736a9 | ||
|
|
7694df11fb | ||
|
|
74dc5b6804 | ||
|
|
32a02a95dd | ||
|
|
fb79ea7c95 | ||
|
|
c6844a73f1 | ||
|
|
a813506f41 | ||
|
|
14adbb4464 | ||
|
|
efe0e0f8f3 | ||
|
|
73dde32632 | ||
|
|
aadbad1d78 | ||
|
|
14a0981efa | ||
|
|
3ac63887dc | ||
|
|
3c1601b6cb | ||
|
|
c107e1af29 | ||
|
|
b26f217172 | ||
|
|
7bd3b630bb | ||
|
|
535b5a96d9 | ||
|
|
428420ee84 | ||
|
|
7fec991c58 | ||
|
|
6ccc0a554b | ||
|
|
458c5d95e6 | ||
|
|
5c0ff6dad1 | ||
|
|
e2bd7f75d5 | ||
|
|
f95fbcb672 | ||
|
|
7651bf59b2 | ||
|
|
fc20dfdd80 | ||
|
|
3bd80e7c28 | ||
|
|
2900a21176 | ||
|
|
85cb9a7639 | ||
|
|
4e962c02aa | ||
|
|
aa48a7b865 | ||
|
|
8aabbea2d3 | ||
|
|
ec02a655af | ||
|
|
27d35baa4a | ||
|
|
c3a66da9c3 | ||
|
|
2000fe24c6 | ||
|
|
2be642154f | ||
|
|
41c0ef642e | ||
|
|
729a0512ab | ||
|
|
884745b5e5 | ||
|
|
59e54334d1 | ||
|
|
5924c021da | ||
|
|
4df9363890 | ||
|
|
70dd572ef7 | ||
|
|
13f797f885 | ||
|
|
adfde63d00 | ||
|
|
e2eb70ecb8 | ||
|
|
f9da021315 | ||
|
|
b4b90cfe20 | ||
|
|
fb36c4ed09 | ||
|
|
f6be42b71d | ||
|
|
bb6caea5cb | ||
|
|
189a46a01c | ||
|
|
91a2547d15 | ||
|
|
a96f66f176 | ||
|
|
2212d14432 | ||
|
|
7cad04bdf1 | ||
|
|
fbc1a83f32 | ||
|
|
260aa281f4 | ||
|
|
2c9d7c6b50 | ||
|
|
ffe2ca7cb5 | ||
|
|
f90d4ee436 | ||
|
|
c75143f5e8 | ||
|
|
a3fac90b47 | ||
|
|
b1b4734f55 | ||
|
|
a2b654945a | ||
|
|
ae134a9b38 | ||
|
|
c8c55fe21e | ||
|
|
4d2e785ff2 | ||
|
|
7895657c89 | ||
|
|
37e7e3eabf | ||
|
|
d0c81e23c4 | ||
|
|
958e1f11f7 | ||
|
|
56c4e248aa | ||
|
|
92d9b3dbba | ||
|
|
a626cdf334 | ||
|
|
47b6c2817a | ||
|
|
0ebb6c4682 | ||
|
|
c47ed0d816 | ||
|
|
2cdd65dd64 | ||
|
|
cba67d1f06 | ||
|
|
d990e702a2 | ||
|
|
c72dfbfbb0 | ||
|
|
121898423b | ||
|
|
682210ac64 | ||
|
|
e1a60cc88c | ||
|
|
b508414ca2 | ||
|
|
df3e90af8f | ||
|
|
fa2e88360b | ||
|
|
30eff9c83e | ||
|
|
013df4c6b8 | ||
|
|
b1489f3485 | ||
|
|
7f2e4223ff | ||
|
|
da597c479c | ||
|
|
1607eee77c | ||
|
|
b3d516eafe | ||
|
|
c17b6603db | ||
|
|
1f0d6290c3 |
19
.github/CODEOWNERS
vendored
@@ -1,15 +1,22 @@
|
||||
# Global
|
||||
* @knqyf263
|
||||
|
||||
# SBOM/Vulnerability scanning
|
||||
pkg/dependency/ @knqyf263 @DmitriyLewen
|
||||
pkg/fanal/ @knqyf263 @DmitriyLewen
|
||||
pkg/sbom/ @knqyf263 @DmitriyLewen
|
||||
pkg/scanner/ @knqyf263 @DmitriyLewen
|
||||
|
||||
# Misconfiguration scanning
|
||||
docs/docs/scanner/misconfiguration @knqyf263 @simar7
|
||||
docs/docs/target/aws.md @knqyf263 @simar7
|
||||
pkg/fanal/analyzer/config @knqyf263 @simar7
|
||||
pkg/cloud @knqyf263 @simar7
|
||||
docs/docs/scanner/misconfiguration/ @simar7 @nikpivkin
|
||||
docs/docs/target/aws.md @simar7 @nikpivkin
|
||||
pkg/fanal/analyzer/config/ @simar7 @nikpivkin
|
||||
pkg/cloud/ @simar7 @nikpivkin
|
||||
pkg/iac/ @simar7 @nikpivkin
|
||||
|
||||
# Helm chart
|
||||
helm/trivy/ @chen-keinan
|
||||
|
||||
# Kubernetes scanning
|
||||
pkg/k8s/ @josedonizetti @chen-keinan @knqyf263
|
||||
docs/docs/kubernetes/ @josedonizetti @chen-keinan @knqyf263
|
||||
pkg/k8s/ @chen-keinan
|
||||
docs/docs/target/kubernetes.md @chen-keinan
|
||||
|
||||
12
.github/workflows/auto-update-labels.yaml
vendored
@@ -5,22 +5,24 @@ on:
|
||||
- 'misc/triage/labels.yaml'
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
GO_VERSION: '1.22'
|
||||
jobs:
|
||||
deploy:
|
||||
name: Auto-update labels
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
# cf. https://github.com/aquasecurity/trivy/pull/6711
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install aqua tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
uses: aquaproj/aqua-installer@v3.0.0
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
|
||||
10
.github/workflows/canary.yaml
vendored
@@ -25,35 +25,35 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Restore Trivy binaries from cache
|
||||
uses: actions/cache@v3.3.2
|
||||
uses: actions/cache@v4.0.2
|
||||
with:
|
||||
path: dist/
|
||||
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
||||
|
||||
# Upload artifacts
|
||||
- name: Upload artifacts (trivy_Linux-64bit)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: trivy_Linux-64bit
|
||||
path: dist/trivy_*_Linux-64bit.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload artifacts (trivy_Linux-ARM64)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: trivy_Linux-ARM64
|
||||
path: dist/trivy_*_Linux-ARM64.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload artifacts (trivy_macOS-64bit)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: trivy_macOS-64bit
|
||||
path: dist/trivy_*_macOS-64bit.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload artifacts (trivy_macOS-ARM64)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: trivy_macOS-ARM64
|
||||
path: dist/trivy_*_macOS-ARM64.tar.gz
|
||||
|
||||
4
.github/workflows/mkdocs-dev.yaml
vendored
@@ -12,11 +12,11 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Install dependencies
|
||||
|
||||
4
.github/workflows/mkdocs-latest.yaml
vendored
@@ -14,11 +14,11 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Install dependencies
|
||||
|
||||
10
.github/workflows/publish-chart.yaml
vendored
@@ -22,22 +22,22 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78
|
||||
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814
|
||||
with:
|
||||
version: v3.5.0
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Setup Chart Linting
|
||||
id: lint
|
||||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992
|
||||
- name: Setup Kubernetes cluster (KIND)
|
||||
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140
|
||||
uses: helm/kind-action@99576bfa6ddf9a8e612d83b513da5a75875caced
|
||||
with:
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
image: ${{ env.KIND_IMAGE }}
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install chart-releaser
|
||||
|
||||
6
.github/workflows/release.yaml
vendored
@@ -19,12 +19,12 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Restore Trivy binaries from cache
|
||||
uses: actions/cache@v3.3.2
|
||||
uses: actions/cache@v4.0.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@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/trivy-repo
|
||||
path: trivy-repo
|
||||
|
||||
22
.github/workflows/reusable-release.yaml
vendored
@@ -14,6 +14,7 @@ on:
|
||||
|
||||
env:
|
||||
GH_USER: "aqua-bot"
|
||||
GO_VERSION: '1.22'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -27,16 +28,16 @@ jobs:
|
||||
contents: read # Not required for public repositories, but for clarity
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v9
|
||||
uses: easimon/maximize-build-space@v10
|
||||
with:
|
||||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
root-reserve-mb: 32768 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
remove-android: 'true'
|
||||
remove-docker-images: 'true'
|
||||
remove-dotnet: 'true'
|
||||
remove-haskell: 'true'
|
||||
|
||||
- name: Cosign install
|
||||
uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8
|
||||
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
@@ -69,14 +70,15 @@ jobs:
|
||||
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
cache: false # Disable cache to avoid free space issues during `Post Setup Go` step.
|
||||
|
||||
- name: Generate SBOM
|
||||
uses: CycloneDX/gh-gomod-generate-sbom@v2
|
||||
@@ -90,6 +92,11 @@ jobs:
|
||||
run: |
|
||||
echo "$GPG_KEY" > gpg.key
|
||||
|
||||
# Create tmp dir for GoReleaser
|
||||
- name: "create tmp dir"
|
||||
run: |
|
||||
mkdir tmp
|
||||
|
||||
- name: GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
@@ -99,6 +106,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
|
||||
NFPM_DEFAULT_RPM_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||
GPG_FILE: "gpg.key"
|
||||
TMPDIR: "tmp"
|
||||
|
||||
- name: "remove gpg key"
|
||||
run: |
|
||||
@@ -121,7 +129,7 @@ jobs:
|
||||
public.ecr.aws/aquasecurity/trivy:canary
|
||||
|
||||
- name: Cache Trivy binaries
|
||||
uses: actions/cache@v3.3.2
|
||||
uses: actions/cache@v4.0.2
|
||||
with:
|
||||
path: dist/
|
||||
# use 'github.sha' to create a unique cache folder for each run.
|
||||
|
||||
8
.github/workflows/roadmap.yaml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 'kind/feature' AND 'priority/backlog' labels -> 'Backlog' column
|
||||
- uses: actions/add-to-project@v0.4.1 # add new issue to project
|
||||
- uses: actions/add-to-project@v1.0.0 # add new issue to project
|
||||
with:
|
||||
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
field-values: Backlog
|
||||
|
||||
# 'kind/feature' AND 'priority/important-longterm' labels -> 'Important (long-term)' column
|
||||
- uses: actions/add-to-project@v0.4.1 # add new issue to project
|
||||
- uses: actions/add-to-project@v1.0.0 # add new issue to project
|
||||
with:
|
||||
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
field-values: Important (long-term)
|
||||
|
||||
# 'kind/feature' AND 'priority/important-soon' labels -> 'Important (soon)' column
|
||||
- uses: actions/add-to-project@v0.4.1 # add new issue to project
|
||||
- uses: actions/add-to-project@v1.0.0 # add new issue to project
|
||||
with:
|
||||
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
field-values: Important (soon)
|
||||
|
||||
# 'kind/feature' AND 'priority/critical-urgent' labels -> 'Urgent' column
|
||||
- uses: actions/add-to-project@v0.4.1 # add new issue to project
|
||||
- uses: actions/add-to-project@v1.0.0 # add new issue to project
|
||||
with:
|
||||
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||
|
||||
2
.github/workflows/scan.yaml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
|
||||
- name: Run Trivy vulnerability scanner and create GitHub issues
|
||||
uses: knqyf263/trivy-issue-action@v0.0.5
|
||||
|
||||
2
.github/workflows/semantic-pr.yaml
vendored
@@ -75,6 +75,7 @@ jobs:
|
||||
dart
|
||||
swift
|
||||
bitnami
|
||||
conda
|
||||
|
||||
os
|
||||
lang
|
||||
@@ -100,4 +101,5 @@ jobs:
|
||||
helm
|
||||
report
|
||||
db
|
||||
parser
|
||||
deps
|
||||
|
||||
2
.github/workflows/stale-issues.yaml
vendored
@@ -7,7 +7,7 @@ jobs:
|
||||
timeout-minutes: 1
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-pr-message: 'This PR is stale because it has been labeled with inactivity.'
|
||||
|
||||
4
.github/workflows/test-docs.yaml
vendored
@@ -10,11 +10,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Install dependencies
|
||||
|
||||
77
.github/workflows/test.yaml
vendored
@@ -7,6 +7,8 @@ on:
|
||||
- 'mkdocs.yml'
|
||||
- 'LICENSE'
|
||||
merge_group:
|
||||
env:
|
||||
GO_VERSION: '1.22'
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
@@ -15,13 +17,22 @@ jobs:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v10
|
||||
with:
|
||||
root-reserve-mb: 32768 # The golangci-lint uses a lot of space.
|
||||
remove-android: "true"
|
||||
remove-docker-images: "true"
|
||||
remove-dotnet: "true"
|
||||
remove-haskell: "true"
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- uses: actions/checkout@v4.1.4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: go mod tidy
|
||||
run: |
|
||||
go mod tidy
|
||||
@@ -33,10 +44,10 @@ jobs:
|
||||
|
||||
- name: Lint
|
||||
id: lint
|
||||
uses: golangci/golangci-lint-action@v3.7.0
|
||||
uses: golangci/golangci-lint-action@v4.0.0
|
||||
with:
|
||||
version: v1.54
|
||||
args: --deadline=30m --out-format=line-number
|
||||
version: v1.57
|
||||
args: --timeout=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'
|
||||
|
||||
@@ -47,7 +58,7 @@ jobs:
|
||||
if: ${{ failure() && steps.lint.conclusion == 'failure' }}
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
uses: aquaproj/aqua-installer@v3.0.0
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
aqua_opts: ""
|
||||
@@ -69,15 +80,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
uses: aquaproj/aqua-installer@v3.0.0
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
@@ -89,24 +100,24 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v9
|
||||
uses: easimon/maximize-build-space@v10
|
||||
with:
|
||||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
root-reserve-mb: 32768 # 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@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
uses: aquaproj/aqua-installer@v3.0.0
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
@@ -118,15 +129,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
uses: aquaproj/aqua-installer@v3.0.0
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
@@ -140,23 +151,23 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v9
|
||||
uses: easimon/maximize-build-space@v10
|
||||
with:
|
||||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
root-reserve-mb: 32768 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
remove-android: 'true'
|
||||
remove-docker-images: 'true'
|
||||
remove-dotnet: 'true'
|
||||
remove-haskell: 'true'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
uses: aquaproj/aqua-installer@v3.0.0
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Run vm integration tests
|
||||
@@ -173,9 +184,9 @@ jobs:
|
||||
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v9
|
||||
uses: easimon/maximize-build-space@v10
|
||||
with:
|
||||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
|
||||
root-reserve-mb: 32768 # 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'
|
||||
@@ -183,12 +194,12 @@ jobs:
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Determine GoReleaser ID
|
||||
id: goreleaser_id
|
||||
|
||||
@@ -19,6 +19,7 @@ linters-settings:
|
||||
locale: US
|
||||
ignore-words:
|
||||
- licence
|
||||
- optimise
|
||||
gosec:
|
||||
excludes:
|
||||
- G101
|
||||
@@ -87,14 +88,16 @@ linters:
|
||||
- gocritic
|
||||
|
||||
run:
|
||||
go: '1.21'
|
||||
skip-files:
|
||||
go: '1.22'
|
||||
|
||||
issues:
|
||||
exclude-files:
|
||||
- ".*_mock.go$"
|
||||
- ".*_test.go$"
|
||||
- "integration/*"
|
||||
- "examples/*"
|
||||
|
||||
issues:
|
||||
exclude-dirs:
|
||||
- "pkg/iac/scanners/terraform/parser/funcs" # copies of Terraform functions
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- gosec
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.18.5
|
||||
FROM alpine:3.19.1
|
||||
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.5
|
||||
FROM alpine:3.19.1
|
||||
RUN apk --no-cache add ca-certificates git
|
||||
|
||||
# binaries were created with GoReleaser
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM --platform=linux/amd64 golang:1.21
|
||||
FROM --platform=linux/amd64 golang:1.22
|
||||
|
||||
# Set environment variable for protoc
|
||||
ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip
|
||||
@@ -14,7 +14,7 @@ RUN curl --retry 5 -OL https://github.com/protocolbuffers/protobuf/releases/down
|
||||
|
||||
# Install Go tools
|
||||
RUN go install github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0
|
||||
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
|
||||
RUN go install github.com/magefile/mage@v1.14.0
|
||||
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0
|
||||
RUN go install github.com/magefile/mage@v1.15.0
|
||||
|
||||
ENV TRIVY_PROTOC_CONTAINER=true
|
||||
|
||||
@@ -5,6 +5,6 @@ registries:
|
||||
- type: standard
|
||||
ref: v3.157.0 # renovate: depName=aquaproj/aqua-registry
|
||||
packages:
|
||||
- name: tinygo-org/tinygo@v0.29.0
|
||||
- name: tinygo-org/tinygo@v0.31.1
|
||||
- name: WebAssembly/binaryen@version_112
|
||||
- name: magefile/mage@v1.14.0
|
||||
|
||||
|
Before Width: | Height: | Size: 36 KiB |
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 265 135" enable-background="new 0 0 265 135" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#07242D" d="M148.629,103.076v5.928c-4.038,0-7.676-1.454-10.545-3.863c-3.605-3.025-5.894-7.565-5.894-12.638V62.815
|
||||
h5.894v13.471h10.545v5.966h-10.545v10.395C138.164,98.419,142.84,103.076,148.629,103.076z"/>
|
||||
<path fill="#07242D" d="M169.65,76.285v5.889c-5.591,0.011-10.143,4.446-10.345,9.984v16.845h-5.908V76.285h5.908v3.735
|
||||
C162.113,77.689,165.718,76.291,169.65,76.285z"/>
|
||||
<path fill="#07242D" d="M173.447,68.698v-5.9h5.897v5.9H173.447z M173.447,109.003V76.285h5.897v32.719H173.447z"/>
|
||||
<path fill="#07242D" d="M215.508,76.285l-16.348,32.719l-16.364-32.719h6.699l9.665,19.32l9.646-19.32L215.508,76.285z"/>
|
||||
<path fill="#07242D" d="M250.874,76.285c0,0,0,35.771,0,38.135c0,9.136-7.493,16.428-16.37,16.423
|
||||
c-4.157,0-8.009-1.576-10.934-4.196l4.24-4.24c1.809,1.532,4.143,2.464,6.693,2.459c5.745,0,10.396-4.696,10.396-10.446v-9.141
|
||||
c-2.85,2.359-6.488,3.724-10.396,3.724c-8.894,0.005-16.384-7.171-16.384-16.372c0-0.194,0-16.345,0-16.345h5.972
|
||||
c0,0,0.003,15.907,0.003,16.345c0,5.722,4.659,10.451,10.409,10.446c5.745,0,10.396-4.701,10.396-10.446V76.285H250.874z"/>
|
||||
</g>
|
||||
<g>
|
||||
<polygon fill="#FFFFFF" points="65.469,5.431 10.124,37.409 10.125,101.877 65.462,134.109 120.813,101.895 120.813,37.407 "/>
|
||||
<g>
|
||||
<path fill="#1904DA" d="M63.957,92.94V79.575c-6.048-2.856-9.846-8.792-9.768-15.27l-12.456-7.193
|
||||
c-0.783,7.101,0.852,14.447,4.636,20.771C50.545,84.86,56.46,89.923,63.957,92.94z"/>
|
||||
<path fill="#1904DA" d="M63.957,111.255V95.742c-8.438-3.162-15.089-8.73-19.77-16.553c-4.275-7.141-5.989-15.458-4.842-23.457
|
||||
l-11.564-6.678C21.14,74.652,36.57,101.186,63.957,111.255z"/>
|
||||
<path fill="#08B1D5" d="M66.804,95.596v15.649c26.877-10.306,42.715-37.348,36.372-62.1l-11.488,6.693
|
||||
c1.481,8.635,0.079,16.879-4.065,23.865C83.476,86.697,76.281,92.188,66.804,95.596z"/>
|
||||
<path fill="#08B1D5" d="M66.804,79.551v13.402c8.456-3.219,14.89-8.239,18.632-14.548c3.675-6.197,5.016-13.512,3.896-21.2
|
||||
L76.888,64.38C76.826,70.53,73.171,76.032,66.804,79.551z"/>
|
||||
<path fill="#FFC900" d="M78.53,41.442c5.228,2.549,9.501,6.608,12.373,11.749l11.183-6.458c-0.075-0.106-0.146-0.211-0.211-0.316
|
||||
c-4.4-7.116-10.209-12.47-17.267-15.913c-19.641-9.576-44.026-2.441-55.772,16.23l11.227,6.481
|
||||
C48.47,40.151,65.268,34.975,78.53,41.442z"/>
|
||||
<path fill="#FFC900" d="M65.771,55.646c1.762,0,3.527,0.385,5.182,1.193h0.001c2.175,1.062,3.954,2.75,5.158,4.894L88.7,54.463
|
||||
c-2.618-4.7-6.516-8.409-11.285-10.735c-12.078-5.888-27.409-1.16-35.147,10.76l12.525,7.229
|
||||
C57.397,57.836,61.572,55.646,65.771,55.646z"/>
|
||||
<path fill="#08B1D5" d="M66.804,130.848l51.828-30.205V40.14l-13.177,7.677c7.242,26.586-9.654,55.513-38.651,66.142V130.848z"/>
|
||||
<path fill="#1904DA" d="M25.5,47.738l-13.196-7.621v60.509l51.653,30.22v-16.883C34.902,103.736,18.087,74.773,25.5,47.738z"/>
|
||||
<path fill="#FFC900" d="M85.722,28.218c7.498,3.656,13.661,9.329,18.316,16.859c0.074,0.12,0.164,0.245,0.263,0.376l13.056-7.539
|
||||
L65.469,7.948l-51.9,29.973l13.061,7.54C39.042,25.644,64.896,18.062,85.722,28.218z"/>
|
||||
<path fill="#FF0036" d="M74.264,64.806c0.001-0.014,0.022-0.508-0.015-1.301c-0.104-0.324-1.328-2.715-4.385-4.383
|
||||
c-2.089-1.139-4.769-1.27-7.357-0.362c-2.536,0.891-4.688,2.664-5.922,4.873c-0.015,0.192-0.044,0.647-0.022,1.173
|
||||
c0.167,4.129,2.721,9.743,7.931,12.311l0.802,0.383l0.696-0.372C71.055,74.294,74.07,69.803,74.264,64.806z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#07242D" d="M149.768,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
|
||||
s8.789,3.943,8.789,8.789V48.152z M140.979,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
|
||||
C146.199,36.485,143.858,34.143,140.979,34.143z"/>
|
||||
<path fill="#07242D" d="M208.745,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
|
||||
c4.846,0,8.789,3.943,8.789,8.789V48.152z M199.956,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
|
||||
C205.176,36.485,202.835,34.143,199.956,34.143z"/>
|
||||
<path fill="#07242D" d="M180.296,48.156c-4.848,0-8.793-3.944-8.793-8.793v-8.248h3.571v8.248c0,2.879,2.343,5.222,5.222,5.222
|
||||
c2.879,0,5.222-2.343,5.222-5.222v-8.248h3.571v8.248C189.089,44.211,185.144,48.156,180.296,48.156z"/>
|
||||
<path fill="#07242D" d="M160.636,30.574c-4.846,0-8.789,3.943-8.789,8.789c0,4.846,3.943,8.789,8.789,8.789l3.569-3.569h-3.569
|
||||
c-2.878,0-5.22-2.342-5.22-5.22c0-2.878,2.342-5.22,5.22-5.22c2.878,0,5.22,2.342,5.22,5.22V56.54h3.569V39.363
|
||||
C169.425,34.516,165.482,30.574,160.636,30.574z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.7 KiB |
BIN
brand/Trivy-OSS-Logo-Color-Horizontal-RGB.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
85
brand/Trivy-OSS-Logo-Color-Horizontal-RGB.svg
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 28.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1920 891" style="enable-background:new 0 0 1920 891;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#031730;}
|
||||
.st1{fill:#08B1D5;}
|
||||
.st2{fill:#1904DA;}
|
||||
.st3{fill:#FFC900;}
|
||||
.st4{fill:#FF0036;}
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M1437.8,277.53h-46.05c-25.39,0-46.05-20.66-46.05-46.05c0-25.39,20.66-46.05,46.05-46.05
|
||||
c25.39,0,46.05,20.66,46.05,46.05V277.53z M1391.75,204.13c-15.08,0-27.35,12.27-27.35,27.35c0,15.08,12.27,27.35,27.35,27.35
|
||||
h27.35v-27.35C1419.1,216.4,1406.84,204.13,1391.75,204.13z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M1746.82,277.53h-46.05c-25.39,0-46.05-20.66-46.05-46.05c0-25.39,20.66-46.05,46.05-46.05
|
||||
c25.39,0,46.05,20.66,46.05,46.05V277.53z M1700.77,204.13c-15.08,0-27.35,12.27-27.35,27.35c0,15.08,12.27,27.35,27.35,27.35
|
||||
h27.35v-27.35C1728.12,216.4,1715.85,204.13,1700.77,204.13z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M1597.76,277.55c-25.4,0-46.07-20.66-46.07-46.07v-43.22h18.71v43.22c0,15.09,12.28,27.36,27.36,27.36
|
||||
s27.36-12.28,27.36-27.36v-43.22h18.71v43.22C1643.83,256.88,1623.16,277.55,1597.76,277.55z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M1494.75,185.43c-25.39,0-46.05,20.66-46.05,46.05c0,25.39,20.66,46.05,46.05,46.05l18.7-18.7h-18.7
|
||||
c-15.08,0-27.35-12.27-27.35-27.35c0-15.08,12.27-27.35,27.35-27.35s27.35,12.27,27.35,27.35v90h18.7v-90
|
||||
C1540.8,206.09,1520.14,185.43,1494.75,185.43z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M968.09,578.05v45.38c-30.92,0-58.76-11.12-80.72-29.55c-27.59-23.17-45.14-57.93-45.14-96.78V269.82h45.14
|
||||
v103.14h80.72v45.68h-80.72v79.6C887.98,542.42,923.77,578.05,968.09,578.05z"/>
|
||||
<path class="st0" d="M1128.93,372.97v45.08c-42.79,0.09-77.63,34.03-79.2,76.45v128.94h-45.21V372.96h45.21v28.59
|
||||
C1071.24,383.73,1098.84,373.01,1128.93,372.97z"/>
|
||||
<path class="st0" d="M1157.94,347.93v-39.5h45.14v39.5H1157.94z M1157.94,623.44V372.96h45.14v250.48H1157.94z"/>
|
||||
<path class="st0" d="M1479.86,372.96l-125.14,250.48l-125.3-250.48h51.3l73.99,147.93l73.84-147.93H1479.86z"/>
|
||||
<path class="st0" d="M1750.5,372.96c0,0,0,273.85,0,291.97c0,69.91-57.37,125.75-125.32,125.69
|
||||
c-31.84,0.03-61.33-12.05-83.7-32.11l32.45-32.45c13.85,11.74,31.73,18.85,51.25,18.82c43.98,0,79.58-35.97,79.58-79.95v-69.99
|
||||
c-21.82,18.06-49.68,28.52-79.58,28.49c-68.1,0.06-125.44-54.9-125.44-125.35c0-1.49,0-125.13,0-125.13h45.73
|
||||
c0,0,0.02,121.79,0.02,125.13c0,43.8,35.68,80,79.69,79.96c43.98,0,79.58-35.97,79.58-79.96V372.96H1750.5z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st1" d="M463.95,358.89c0.04,0,0.08,0,0.12,0c6.43,0.01,11.75-4.93,11.75-11.36V134.47l-11.99-6.7l-11.94,6.67
|
||||
v213.1c0,6.43,5.32,11.38,11.75,11.35C463.73,358.89,463.84,358.89,463.95,358.89z"/>
|
||||
<path class="st2" d="M392.02,455.6L194.35,588.27v15.11l11.26,6.17L405.34,475.5c5.13-3.44,6.41-10.31,3.09-15.52
|
||||
c-0.14-0.22-0.28-0.44-0.42-0.67C404.58,453.78,397.42,451.98,392.02,455.6z"/>
|
||||
<path class="st3" d="M522.51,475.6l199.56,133.93l11.23-6.15v-15.14L535.83,455.71c-5.4-3.62-12.56-1.83-16,3.69
|
||||
c-0.13,0.21-0.26,0.42-0.4,0.63C516.09,465.26,517.36,472.15,522.51,475.6z"/>
|
||||
<path class="st0" d="M757.23,277.9V264.2l-12.26-6.85l-0.91-0.48L475.5,106.89l-11.68-6.51l-11.63,6.51L183.58,256.88
|
||||
l-0.91,0.48l-12.25,6.85v13.69l-0.91,0.53l0.91,0.48v13.64v325.01l12.45,6.8l261.62,143.33l3.3,1.82l16.08,8.81l16.04-8.81
|
||||
l3.3-1.82l261.62-143.33l12.4-6.8V292.55v-13.6l0.96-0.53L757.23,277.9z M476.11,744.33V502.51c0-6.59-5.39-11.98-11.98-11.97
|
||||
l-0.18,0l-0.12,0c-6.59-0.01-11.98,5.38-11.98,11.97v241.81L205.61,609.55l-11.26-6.17v-15.11V290.06l196.06,107.42
|
||||
c5.66,3.1,12.84,1.02,15.97-4.63l0.14-0.25c3.16-5.71,1.06-12.96-4.67-16.1L208.33,270.47l243.55-136.03l11.94-6.67l11.99,6.7
|
||||
l243.5,136.01L525.64,376.58c-5.7,3.12-7.48,10.25-4.32,15.92c0.05,0.1,0.11,0.19,0.16,0.29c3.1,5.62,10.02,7.85,15.65,4.77
|
||||
l196.16-107.5v298.19v15.14l-11.23,6.15L476.11,744.33z"/>
|
||||
</g>
|
||||
<circle class="st4" cx="463.95" cy="424.72" r="34.73"/>
|
||||
</g>
|
||||
<path class="st1" d="M649.35,258.97L461.77,153.83c-5.77-3.23-7.82-10.53-4.59-16.29v0c3.23-5.77,10.53-7.82,16.29-4.59
|
||||
l187.58,105.15c5.77,3.23,7.82,10.53,4.59,16.29v0C662.41,260.15,655.12,262.2,649.35,258.97z"/>
|
||||
<path class="st1" d="M567.15,267.09l-105.38-59.07c-5.77-3.23-7.82-10.53-4.59-16.29v0c3.23-5.77,10.53-7.82,16.29-4.59
|
||||
l105.38,59.07c5.77,3.23,7.82,10.53,4.59,16.29l0,0C580.21,268.26,572.92,270.32,567.15,267.09z"/>
|
||||
<path class="st1" d="M601.67,286.44L601.67,286.44c-5.77-3.23-7.82-10.53-4.59-16.29v0c3.23-5.77,10.53-7.82,16.29-4.59l0,0
|
||||
c5.77,3.23,7.82,10.53,4.59,16.29v0C614.73,287.61,607.44,289.67,601.67,286.44z"/>
|
||||
<path class="st1" d="M497.04,283.82l-35-19.62c-5.77-3.23-7.82-10.53-4.59-16.29v0c3.23-5.77,10.53-7.82,16.29-4.59l35,19.62
|
||||
c5.77,3.23,7.82,10.53,4.59,16.29l0,0C510.1,284.99,502.8,287.05,497.04,283.82z"/>
|
||||
<path class="st1" d="M549.85,316.05l-20.26-11.36c-5.77-3.23-7.82-10.53-4.59-16.29h0c3.23-5.77,10.53-7.82,16.29-4.59
|
||||
l20.26,11.36c5.77,3.23,7.82,10.53,4.59,16.29v0C562.91,317.23,555.61,319.28,549.85,316.05z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 81 KiB |
@@ -1,202 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 500 524" enable-background="new 0 0 500 524" xml:space="preserve">
|
||||
<g display="none">
|
||||
<g display="inline">
|
||||
<path fill="#07242D" d="M-483.763,450.803h-11.559l-22.557-22.807c-0.919,0.114-1.853,0.174-2.802,0.174v22.632h-8.238v-63.931
|
||||
h8.239c0,0-0.016,33.158,0,33.158c4.013,0,7.684-1.656,10.29-4.32l9.86-10.073h11.814l-16.032,15.918
|
||||
c-1.42,1.421-3.031,2.655-4.787,3.659L-483.763,450.803z"/>
|
||||
<path fill="#07242D" d="M-438.316,405.517v22.819c0,0,0,0.033,0,0.049c0,12.39-10.039,22.418-22.429,22.418
|
||||
c-12.389,0-22.421-10.059-22.421-22.448c0-0.017,0-22.837,0-22.837h7.989v22.819c0,7.967,6.466,14.457,14.433,14.457
|
||||
c7.966,0,14.424-6.491,14.424-14.457v-22.819H-438.316z"/>
|
||||
<path fill="#07242D" d="M-385.244,428.166c0,12.501-10.133,22.636-22.636,22.636c-5.485,0-10.514-1.95-14.431-5.196v5.196h-8.218
|
||||
c0.005-0.516,0.005-63.931,0.005-63.931h8.217l-0.004,23.854c3.918-3.246,8.947-5.196,14.432-5.196
|
||||
C-395.377,405.529-385.242,415.664-385.244,428.166z M-393.437,428.166c0-7.976-6.466-14.441-14.442-14.441
|
||||
c-7.793,0-14.443,6.329-14.443,14.418c0,8.089,6.649,14.464,14.443,14.464C-399.903,442.607-393.437,436.142-393.437,428.166z"/>
|
||||
<path fill="#07242D" d="M-335.539,431.11h-36.518c1.375,6.517,7.157,11.435,14.075,11.435c4.514,0,8.538-2.095,11.172-5.362h9.577
|
||||
c-3.496,8.008-11.475,13.619-20.748,13.619c-12.489,0-22.644-10.173-22.644-22.676c0-12.503,10.155-22.608,22.644-22.608
|
||||
C-344.426,405.411-333.664,417.688-335.539,431.11z M-344.611,422.85c-2.103-5.316-7.296-9.06-13.371-9.06
|
||||
c-6.076,0-11.275,3.746-13.382,9.06H-344.611z"/>
|
||||
<path fill="#07242D" d="M-306.194,420.895v7.548h-23.302v-7.548H-306.194z"/>
|
||||
<path fill="#07242D" d="M-252.987,428.166c0,12.501-10.133,22.636-22.636,22.636c-5.485,0-10.514-1.95-14.431-5.196v5.196h-8.218
|
||||
c0.005-0.516,0.005-63.931,0.005-63.931h8.218l-0.004,23.854c3.918-3.246,8.946-5.196,14.431-5.196
|
||||
C-263.12,405.529-252.985,415.664-252.987,428.166z M-261.181,428.166c0-7.976-6.467-14.441-14.442-14.441
|
||||
c-7.794,0-14.443,6.329-14.443,14.418c0,8.089,6.649,14.464,14.443,14.464C-267.647,442.607-261.181,436.142-261.181,428.166z"/>
|
||||
<path fill="#07242D" d="M-203.283,431.11h-36.518c1.375,6.517,7.157,11.435,14.075,11.435c4.514,0,8.538-2.095,11.172-5.362h9.577
|
||||
c-3.496,8.008-11.475,13.619-20.748,13.619c-12.489,0-22.644-10.173-22.644-22.676c0-12.503,10.155-22.608,22.644-22.608
|
||||
C-212.17,405.411-201.408,417.688-203.283,431.11z M-212.355,422.85c-2.103-5.316-7.296-9.06-13.371-9.06
|
||||
c-6.076,0-11.275,3.746-13.382,9.06H-212.355z"/>
|
||||
<path fill="#07242D" d="M-151.113,428.114c0,15.871,0,22.688,0,22.688h-8.262c0,0,0-14.878,0-22.688
|
||||
c0-8.095-6.591-14.327-14.363-14.327c-7.772,0-14.393,6.163-14.393,14.327c0,7.814,0,22.688,0,22.688h-8.26v-45.285
|
||||
c0,0,3.539,0,8.26,0v5.101c0,0,5.421-5.101,14.393-5.101C-163.095,405.517-151.113,413.789-151.113,428.114z"/>
|
||||
<path fill="#07242D" d="M-112.598,438.373l5.799,5.798c-4.098,4.097-9.758,6.632-16.01,6.632c-6.252,0-11.912-2.534-16.01-6.632
|
||||
c-4.097-4.098-6.632-9.758-6.632-16.01s2.534-11.912,6.632-16.01c4.098-4.097,9.758-6.632,16.01-6.632
|
||||
c6.252,0,11.912,2.534,16.01,6.632l-5.799,5.799c-2.613-2.615-6.224-4.231-10.212-4.231c-3.988,0-7.599,1.617-10.212,4.231
|
||||
c-2.614,2.613-4.23,6.224-4.23,10.212s1.616,7.599,4.23,10.213c2.613,2.613,6.224,4.229,10.212,4.229
|
||||
C-118.821,442.602-115.211,440.986-112.598,438.373z"/>
|
||||
<path fill="#07242D" d="M-55.678,428.174c0,15.827,0,22.626,0,22.626h-8.239c0,0,0-14.838,0-22.626
|
||||
c0-8.072-6.575-14.287-14.324-14.287c-7.751,0-14.353,6.146-14.353,14.287c0,7.793,0,22.626,0,22.626h-8.238v-63.929h8.238v23.856
|
||||
c0,0,5.405-5.086,14.353-5.086C-67.626,405.641-55.678,413.889-55.678,428.174z"/>
|
||||
</g>
|
||||
<g display="inline">
|
||||
<path fill="#07242D" d="M186.582,442.579v8.203c-5.588,0-10.623-2.012-14.594-5.346c-4.989-4.186-8.157-10.469-8.157-17.489
|
||||
v-41.085h8.157v18.642h14.594v8.257h-14.594v14.386C172.1,436.134,178.571,442.579,186.582,442.579z"/>
|
||||
<path fill="#07242D" d="M215.674,405.503v8.149c-7.739,0.015-14.037,6.152-14.317,13.818v23.312h-8.176v-45.279h8.176v5.169
|
||||
C205.243,407.446,210.232,405.51,215.674,405.503z"/>
|
||||
<path fill="#07242D" d="M220.928,395.003v-8.165h8.161v8.165H220.928z M220.928,450.782v-45.279h8.161v45.279H220.928z"/>
|
||||
<path fill="#07242D" d="M279.137,405.503l-22.624,45.279l-22.647-45.279h9.271l13.376,26.737l13.349-26.737H279.137z"/>
|
||||
<path fill="#07242D" d="M328.08,405.503c0,0,0,49.504,0,52.776c0,12.643-10.369,22.736-22.655,22.728
|
||||
c-5.753,0-11.084-2.181-15.131-5.807l5.868-5.868c2.504,2.12,5.734,3.41,9.263,3.403c7.95,0,14.386-6.498,14.386-14.456v-12.651
|
||||
c-3.944,3.264-8.979,5.154-14.386,5.154c-12.309,0.008-22.674-9.924-22.674-22.659c0-0.269,0-22.62,0-22.62h8.265
|
||||
c0,0,0.004,22.014,0.004,22.62c0,7.919,6.448,14.463,14.406,14.456c7.95,0,14.386-6.506,14.386-14.456v-22.62H328.08z"/>
|
||||
</g>
|
||||
<g display="inline">
|
||||
<path fill="#07242D" d="M1186.898,438.384c-0.411,4.687-4.656,12.67-15.302,12.67c-10.092,0-16.135-6.761-16.135-6.761
|
||||
l5.797-5.801c4.906,4.664,10.338,4.372,10.338,4.372c3.473-0.238,6.258-2.643,6.469-5.471c0.242-3.235-2.009-5.486-6.469-6.124
|
||||
c-2.098-0.307-7.184-0.791-11.36-4.533c-1.36-1.222-6.489-6.577-2.217-14.191c0.834-1.491,4.556-6.769,13.577-6.769
|
||||
c0,0,7.434-0.53,14.311,5.086l-5.866,5.863c-1.16-0.96-4.46-2.904-8.444-2.881c-7.207,0.046-7.007,4.011-7.007,4.011
|
||||
c0.061,3.166,2.874,4.864,7.007,5.409C1185.672,425.114,1187.309,433.743,1186.898,438.384z"/>
|
||||
<path fill="#07242D" d="M1215.419,442.848v8.206c-5.59,0-10.626-2.013-14.599-5.348c-4.99-4.188-8.16-10.473-8.16-17.495v-41.099
|
||||
h8.16v18.648h14.599v8.26h-14.599v14.391C1200.932,436.401,1207.405,442.848,1215.419,442.848z"/>
|
||||
<path fill="#07242D" d="M1263.522,428.372v22.682h-22.705c-0.5,0-0.999-0.015-1.495-0.054c-6.431-0.423-12.128-3.527-15.985-8.214
|
||||
c-3.289-4.003-5.171-8.928-5.186-14.414c0.526-25.548,35.106-31.264,44.03-7.699
|
||||
C1263.068,423.132,1263.522,425.76,1263.522,428.372z M1255.131,428.372c0.054-12.824-15.563-19.132-24.433-10.135l-0.004-0.008
|
||||
c-2.609,2.605-4.226,6.17-4.226,10.142c0,7.937,6.435,14.399,14.368,14.399c3.976,0,14.295,0,14.295,0
|
||||
S1255.131,432.352,1255.131,428.372z"/>
|
||||
<path fill="#07242D" d="M1293.898,405.76v8.152c-7.741,0.015-14.042,6.154-14.322,13.823v23.319h-8.179V405.76h8.179v5.171
|
||||
C1283.464,407.704,1288.454,405.767,1293.898,405.76z"/>
|
||||
<path fill="#07242D" d="M1344.448,428.411c0,12.509-10.135,22.643-22.639,22.643c-5.486,0-10.515-1.952-14.433-5.194v5.194h-8.221
|
||||
c0.008-0.515,0.008-63.942,0.008-63.942h8.217l-0.004,23.857c3.919-3.25,8.947-5.202,14.433-5.202
|
||||
C1334.313,405.767,1344.452,415.91,1344.448,428.411z M1336.254,428.411c0-7.975-6.466-14.445-14.445-14.445
|
||||
c-7.795,0-14.445,6.331-14.445,14.422c0,8.091,6.65,14.468,14.445,14.468C1329.788,442.856,1336.254,436.394,1336.254,428.411z"/>
|
||||
<path fill="#07242D" d="M1394.394,428.411c0,12.509-10.15,22.643-22.643,22.643s-22.651-10.135-22.651-22.643
|
||||
s10.157-22.651,22.651-22.651S1394.394,415.91,1394.394,428.411z M1386.127,428.411c0-7.937-6.431-14.376-14.376-14.376
|
||||
c-7.941,0-14.387,6.431-14.387,14.376s6.446,14.383,14.387,14.383C1379.696,442.794,1386.127,436.355,1386.127,428.411z"/>
|
||||
<path fill="#07242D" d="M1444.414,428.372v22.682h-22.705c-0.499,0-0.999-0.015-1.494-0.054
|
||||
c-6.431-0.423-12.128-3.527-15.985-8.214c-3.289-4.003-5.171-8.928-5.186-14.414c0.526-25.548,35.106-31.264,44.03-7.699
|
||||
C1443.961,423.132,1444.414,425.76,1444.414,428.372z M1436.024,428.372c0.054-12.824-15.563-19.132-24.433-10.135l-0.004-0.008
|
||||
c-2.609,2.605-4.226,6.17-4.226,10.142c0,7.937,6.435,14.399,14.368,14.399c3.976,0,14.295,0,14.295,0
|
||||
S1436.024,432.352,1436.024,428.372z"/>
|
||||
<path fill="#07242D" d="M1474.791,405.76v8.152c-7.741,0.015-14.042,6.154-14.322,13.823v23.319h-8.179V405.76h8.179v5.171
|
||||
C1464.356,407.704,1469.347,405.767,1474.791,405.76z"/>
|
||||
<path fill="#07242D" d="M1521.556,451.031h-8.214v-5.194c-3.919,3.242-8.951,5.194-14.43,5.194
|
||||
c-12.501,0-22.635-10.127-22.635-22.628s10.135-22.636,22.635-22.636c5.478,0,10.511,1.952,14.43,5.194l0.008-23.85h8.221
|
||||
C1521.572,387.112,1521.556,450.516,1521.556,451.031z M1513.35,428.38c0-8.091-6.646-14.422-14.437-14.422
|
||||
c-7.975,0-14.445,6.469-14.445,14.445s6.469,14.437,14.445,14.437C1506.704,442.84,1513.35,436.471,1513.35,428.38z"/>
|
||||
</g>
|
||||
<g display="inline">
|
||||
<path fill="#07242D" d="M1711.171,438.276l5.802,5.802c-4.1,4.096-9.763,6.632-16.014,6.632c-6.255,0-11.918-2.536-16.018-6.632
|
||||
c-4.1-4.103-6.635-9.759-6.635-16.014s2.536-11.918,6.635-16.022c4.1-4.096,9.763-6.632,16.018-6.632
|
||||
c6.251,0,11.915,2.536,16.014,6.632l-5.802,5.802c-2.613-2.613-6.224-4.234-10.213-4.234c-3.992,0-7.604,1.621-10.216,4.234
|
||||
c-2.617,2.613-4.234,6.224-4.234,10.22c0,3.988,1.618,7.6,4.234,10.213c2.613,2.613,6.224,4.234,10.216,4.234
|
||||
C1704.947,442.511,1708.559,440.889,1711.171,438.276z"/>
|
||||
<path fill="#07242D" d="M1722.967,450.71v-63.95h8.241v63.95H1722.967z"/>
|
||||
<path fill="#07242D" d="M1783.282,428.064c0,12.51-10.151,22.646-22.646,22.646c-12.495,0-22.654-10.136-22.654-22.646
|
||||
s10.159-22.654,22.654-22.654C1773.131,405.41,1783.282,415.561,1783.282,428.064z M1775.013,428.064
|
||||
c0-7.938-6.432-14.378-14.378-14.378c-7.942,0-14.389,6.432-14.389,14.378c0,7.946,6.447,14.385,14.389,14.385
|
||||
C1768.581,442.449,1775.013,436.01,1775.013,428.064z"/>
|
||||
<path fill="#07242D" d="M1833.833,405.41v22.823c0,0,0,0.038,0,0.054c0,12.395-10.04,22.423-22.435,22.423
|
||||
c-12.395,0-22.427-10.059-22.427-22.454c0-0.015,0-22.846,0-22.846h7.992v22.823c0,7.976,6.466,14.462,14.435,14.462
|
||||
c7.969,0,14.431-6.486,14.431-14.462V405.41H1833.833z"/>
|
||||
<path fill="#07242D" d="M1884.777,450.687h-8.218v-5.195c-3.915,3.243-8.945,5.195-14.431,5.195
|
||||
c-12.503,0-22.634-10.128-22.634-22.631c0-12.503,10.132-22.638,22.634-22.638c5.487,0,10.516,1.952,14.431,5.195l0.011-23.852
|
||||
h8.219C1884.789,386.76,1884.773,450.172,1884.777,450.687z M1876.574,428.033c0-8.092-6.651-14.424-14.447-14.424
|
||||
c-7.973,0-14.443,6.47-14.443,14.447c0,7.976,6.466,14.439,14.443,14.439C1869.923,442.495,1876.574,436.125,1876.574,428.033z"/>
|
||||
<path fill="#07242D" d="M1922.865,438.038c-0.411,4.687-4.657,12.672-15.303,12.672c-10.094,0-16.137-6.762-16.137-6.762
|
||||
l5.798-5.802c4.906,4.664,10.339,4.372,10.339,4.372c3.473-0.238,6.259-2.643,6.47-5.471c0.242-3.235-2.009-5.487-6.47-6.124
|
||||
c-2.098-0.307-7.185-0.792-11.361-4.534c-1.36-1.222-6.489-6.578-2.217-14.193c0.834-1.491,4.557-6.77,13.578-6.77
|
||||
c0,0,7.435-0.53,14.312,5.087l-5.867,5.863c-1.16-0.961-4.461-2.905-8.445-2.882c-7.208,0.046-7.008,4.011-7.008,4.011
|
||||
c0.062,3.166,2.874,4.864,7.008,5.41C1921.639,424.767,1923.276,433.397,1922.865,438.038z"/>
|
||||
<path fill="#07242D" d="M1975.107,428.041c0,12.526-10.151,22.73-22.661,22.73c-5.471,0-10.493-1.952-14.416-5.195v35.371h-8.276
|
||||
V405.41h8.276v5.156c3.923-3.22,8.945-5.156,14.416-5.156C1964.956,405.41,1975.107,415.523,1975.107,428.041z M1966.831,428.041
|
||||
c0-7.953-6.432-14.347-14.385-14.347s-14.416,6.393-14.416,14.347s6.463,14.462,14.416,14.462S1966.831,435.994,1966.831,428.041z
|
||||
"/>
|
||||
<path fill="#07242D" d="M1981.877,450.71v-63.95h8.245v63.95H1981.877z"/>
|
||||
<path fill="#07242D" d="M2042.192,428.064c0,12.51-10.151,22.646-22.646,22.646c-12.495,0-22.654-10.136-22.654-22.646
|
||||
s10.159-22.654,22.654-22.654C2032.041,405.41,2042.192,415.561,2042.192,428.064z M2033.916,428.064
|
||||
c0-7.938-6.432-14.378-14.37-14.378c-7.946,0-14.393,6.432-14.393,14.378c0,7.946,6.447,14.385,14.393,14.385
|
||||
C2027.484,442.449,2033.916,436.01,2033.916,428.064z"/>
|
||||
<path fill="#07242D" d="M2049.016,394.906v-8.168h8.168v8.168H2049.016z M2049.016,450.71v-45.3h8.168v45.3H2049.016z"/>
|
||||
<path fill="#07242D" d="M2087.737,442.503v8.207c-5.594,0-10.627-2.013-14.6-5.348c-4.987-4.188-8.161-10.474-8.161-17.497V386.76
|
||||
h8.161v18.65h14.6v8.261h-14.6v14.393C2073.252,436.056,2079.722,442.503,2087.737,442.503z"/>
|
||||
</g>
|
||||
<g display="inline">
|
||||
<path fill="#07242D" d="M690.837,442.596v8.206c-5.59,0-10.626-2.013-14.599-5.348c-4.99-4.188-8.16-10.473-8.16-17.495V386.86
|
||||
h8.16v18.648h14.599v8.26h-14.599v14.391C676.35,436.15,682.823,442.596,690.837,442.596z"/>
|
||||
<path fill="#07242D" d="M719.939,405.508v8.152c-7.737,0.015-14.042,6.154-14.322,13.823v23.319h-8.179v-45.294h8.179v5.171
|
||||
C709.504,407.452,714.495,405.516,719.939,405.508z"/>
|
||||
<path fill="#07242D" d="M766.789,428.12v22.682h-22.705c-0.499,0-0.999-0.015-1.494-0.054c-6.431-0.423-12.128-3.527-15.985-8.214
|
||||
c-3.289-4.003-5.171-8.928-5.183-14.414c0.523-25.548,35.102-31.264,44.026-7.699C766.335,422.88,766.789,425.508,766.789,428.12z
|
||||
M758.398,428.12c0.054-12.824-15.563-19.132-24.433-10.135l-0.004-0.008c-2.609,2.605-4.226,6.17-4.226,10.142
|
||||
c0,7.937,6.435,14.399,14.368,14.399c3.976,0,14.295,0,14.295,0S758.398,432.101,758.398,428.12z"/>
|
||||
<path fill="#07242D" d="M805.36,438.37l5.801,5.801c-4.099,4.095-9.762,6.631-16.016,6.631c-6.254,0-11.913-2.536-16.012-6.631
|
||||
c-4.099-4.103-6.631-9.766-6.631-16.02c0-6.247,2.532-11.909,6.631-16.012c4.099-4.095,9.758-6.631,16.012-6.631
|
||||
c6.254,0,11.917,2.536,16.016,6.631l-5.801,5.801c-2.612-2.612-6.224-4.234-10.215-4.234c-3.988,0-7.599,1.621-10.211,4.234
|
||||
c-2.616,2.612-4.234,6.224-4.234,10.211c0,3.995,1.617,7.607,4.234,10.219c2.612,2.612,6.224,4.234,10.211,4.234
|
||||
C799.136,442.604,802.747,440.983,805.36,438.37z"/>
|
||||
<path fill="#07242D" d="M858.664,431.109h-36.527c1.375,6.516,7.161,11.433,14.08,11.433c4.514,0,8.54-2.098,11.172-5.363h9.581
|
||||
c-3.5,8.014-11.479,13.623-20.753,13.623c-12.493,0-22.647-10.173-22.647-22.682c0-12.501,10.154-22.612,22.647-22.612
|
||||
C849.774,405.4,860.539,417.679,858.664,431.109z M849.59,422.842c-2.105-5.317-7.295-9.059-13.373-9.059
|
||||
s-11.276,3.742-13.385,9.059H849.59z"/>
|
||||
<path fill="#07242D" d="M908.514,431.109h-36.527c1.375,6.516,7.161,11.433,14.08,11.433c4.514,0,8.54-2.098,11.172-5.363h9.581
|
||||
c-3.5,8.014-11.479,13.623-20.753,13.623c-12.493,0-22.647-10.173-22.647-22.682c0-12.501,10.154-22.612,22.647-22.612
|
||||
C899.625,405.4,910.389,417.679,908.514,431.109z M899.44,422.842c-2.105-5.317-7.295-9.059-13.373-9.059
|
||||
s-11.276,3.742-13.385,9.059H899.44z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#07242D" d="M186.351,471.553v8.229c-5.606,0-10.656-2.019-14.639-5.363c-5.005-4.199-8.182-10.502-8.182-17.544v-41.21
|
||||
h8.182v18.699h14.639v8.282h-14.639v14.43C171.824,465.089,178.316,471.553,186.351,471.553z"/>
|
||||
<path fill="#07242D" d="M215.533,434.363v8.175c-7.762,0.016-14.08,6.172-14.361,13.86v23.384h-8.202v-45.419h8.202v5.185
|
||||
C205.069,436.313,210.074,434.371,215.533,434.363z"/>
|
||||
<path fill="#07242D" d="M220.803,423.832v-8.191h8.186v8.191H220.803z M220.803,479.782v-45.419h8.186v45.419H220.803z"/>
|
||||
<path fill="#07242D" d="M279.191,434.363l-22.694,45.419l-22.716-45.419h9.3l13.417,26.82l13.39-26.82H279.191z"/>
|
||||
<path fill="#07242D" d="M328.286,434.363c0,0,0,49.656,0,52.938c0,12.682-10.402,22.805-22.725,22.798
|
||||
c-5.771,0-11.118-2.188-15.178-5.824l5.887-5.887c2.512,2.126,5.751,3.42,9.291,3.413c7.975,0,14.431-6.519,14.431-14.5v-12.689
|
||||
c-3.956,3.275-9.006,5.17-14.431,5.17c-12.346,0.007-22.743-9.954-22.743-22.728c0-0.27,0-22.69,0-22.69h8.291
|
||||
c0,0,0.004,22.082,0.004,22.69c0,7.944,6.468,14.508,14.45,14.5c7.975,0,14.431-6.526,14.431-14.5v-22.691H328.286z"/>
|
||||
</g>
|
||||
<g>
|
||||
<polygon fill="#FFFFFF" points="250.554,44.159 116.876,121.396 116.877,277.11 250.537,354.962 384.229,277.154 384.229,121.392
|
||||
"/>
|
||||
<g>
|
||||
<path fill="#1904DA" d="M246.902,255.524v-32.282c-14.609-6.898-23.783-21.236-23.594-36.882l-30.086-17.374
|
||||
c-1.892,17.15,2.057,34.896,11.198,50.171C214.507,236.009,228.793,248.237,246.902,255.524z"/>
|
||||
<path fill="#1904DA" d="M246.902,299.761v-37.468c-20.381-7.638-36.445-21.086-47.752-39.981
|
||||
c-10.325-17.249-14.466-37.337-11.695-56.657l-27.931-16.129C143.482,211.352,180.751,275.442,246.902,299.761z"/>
|
||||
<path fill="#08B1D5" d="M253.779,261.938v37.797c64.918-24.892,103.171-90.209,87.852-149.994l-27.747,16.165
|
||||
c3.578,20.856,0.191,40.77-9.818,57.644C294.046,240.446,276.67,253.707,253.779,261.938z"/>
|
||||
<path fill="#08B1D5" d="M253.779,223.185v32.371c20.424-7.774,35.964-19.9,45.004-35.138c8.877-14.969,12.116-32.637,9.411-51.205
|
||||
l-30.06,17.33C277.985,201.395,269.156,214.685,253.779,223.185z"/>
|
||||
<path fill="#FFC900" d="M282.1,131.138c12.628,6.157,22.948,15.961,29.885,28.378l27.012-15.598
|
||||
c-0.182-0.255-0.351-0.51-0.509-0.764c-10.628-17.188-24.658-30.12-41.707-38.435c-47.439-23.13-106.339-5.896-134.71,39.2
|
||||
l27.117,15.654C209.496,128.018,250.069,115.518,282.1,131.138z"/>
|
||||
<path fill="#FFC900" d="M251.284,165.445c4.256,0,8.519,0.931,12.516,2.881h0.002c5.253,2.564,9.549,6.643,12.458,11.821
|
||||
l30.404-17.558c-6.323-11.352-15.738-20.312-27.257-25.93c-29.172-14.223-66.203-2.802-84.893,25.99l30.251,17.46
|
||||
C231.056,170.735,241.141,165.445,251.284,165.445z"/>
|
||||
<path fill="#08B1D5" d="M253.779,347.086l125.184-72.957V127.993l-31.828,18.542c17.491,64.215-23.319,134.084-93.356,159.757
|
||||
V347.086z"/>
|
||||
<path fill="#1904DA" d="M154.014,146.345l-31.873-18.406v146.151l124.761,72.993v-40.779
|
||||
C176.723,281.599,136.109,211.643,154.014,146.345z"/>
|
||||
<path fill="#FFC900" d="M299.471,99.198c18.111,8.832,32.995,22.533,44.241,40.722c0.179,0.289,0.397,0.592,0.636,0.908
|
||||
l31.536-18.21l-125.33-72.378l-125.358,72.395l31.548,18.211C186.722,92.98,249.169,74.667,299.471,99.198z"/>
|
||||
<path fill="#FF0036" d="M271.797,187.57c0.002-0.035,0.052-1.226-0.036-3.143c-0.251-0.783-3.208-6.558-10.592-10.586
|
||||
c-5.045-2.751-11.518-3.068-17.769-0.874c-6.124,2.152-11.322,6.434-14.303,11.769c-0.036,0.464-0.105,1.563-0.052,2.832
|
||||
c0.404,9.974,6.573,23.534,19.156,29.736l1.938,0.925l1.682-0.899C264.046,210.487,271.328,199.641,271.797,187.57z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#07242D" d="M186.846,398.474H175.2c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
|
||||
s11.646,5.224,11.646,11.646V398.474z M175.2,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916h6.916
|
||||
v-6.916C182.117,383.015,179.014,379.912,175.2,379.912z"/>
|
||||
<path fill="#07242D" d="M264.991,398.474h-11.646c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
|
||||
c6.421,0,11.646,5.224,11.646,11.646V398.474z M253.345,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916
|
||||
h6.916v-6.916C260.261,383.015,257.159,379.912,253.345,379.912z"/>
|
||||
<path fill="#07242D" d="M227.295,398.479c-6.424,0-11.651-5.226-11.651-11.651V375.9h4.731v10.928c0,3.815,3.104,6.919,6.919,6.919
|
||||
c3.815,0,6.919-3.104,6.919-6.919V375.9h4.731v10.928C238.946,393.253,233.719,398.479,227.295,398.479z"/>
|
||||
<path fill="#07242D" d="M201.245,375.183c-6.421,0-11.645,5.224-11.645,11.646c0,6.421,5.224,11.646,11.645,11.646l4.729-4.729
|
||||
h-4.729c-3.814,0-6.916-3.103-6.916-6.916c0-3.814,3.103-6.916,6.916-6.916c3.814,0,6.916,3.103,6.916,6.916v22.76h4.729v-22.76
|
||||
C212.891,380.407,207.666,375.183,201.245,375.183z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 18 KiB |
BIN
brand/Trivy-OSS-Logo-Color-Stacked-RGB.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
3206
brand/Trivy-OSS-Logo-Color-Stacked-RGB.svg
Normal file
|
After Width: | Height: | Size: 233 KiB |
|
Before Width: | Height: | Size: 36 KiB |
@@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 265 135" enable-background="new 0 0 265 135" xml:space="preserve">
|
||||
<g display="none">
|
||||
<polygon display="inline" fill="#FFFFFF" points="65.469,9.61 12.669,40.117 12.669,101.621 65.463,132.371 118.268,101.639
|
||||
118.268,40.115 "/>
|
||||
<g display="inline">
|
||||
<path fill="#08B1D5" d="M64.511,80.035c-5.972-2.687-9.502-8.433-9.313-14.534l-12.765-7.371c-0.952,7.062,0.569,14.449,4.4,20.85
|
||||
c4.078,6.813,9.966,11.887,17.678,14.825V80.035L64.511,80.035z"/>
|
||||
<path fill="#08B1D5" d="M64.511,111.257V95.432c-8.26-3.017-14.588-8.448-18.931-15.703c-4.108-6.864-5.671-14.819-4.507-22.384
|
||||
l-11.864-6.851C22.412,75.299,37.662,101.72,64.511,111.257z"/>
|
||||
<path fill="#0D819B" d="M66.259,95.288v15.969c26.352-9.758,42.17-36.132,35.489-60.682l-11.8,6.874
|
||||
c1.473,8.16,0.189,16.115-3.759,22.77C82.134,87.057,75.052,92.189,66.259,95.288z"/>
|
||||
<path fill="#0D819B" d="M75.879,65.569c0.053,5.924-3.429,11.136-9.62,14.466v13.769c8.227-2.999,14.873-7.918,18.675-14.329
|
||||
c3.681-6.207,4.934-13.613,3.671-21.243L75.879,65.569z"/>
|
||||
<path fill="#F69421" d="M77.717,44.4c4.977,2.427,9.031,6.315,11.724,11.244c0.035,0.065,0.069,0.132,0.104,0.198l11.574-6.684
|
||||
c-0.184-0.232-0.361-0.466-0.506-0.701c-4.246-6.868-9.855-12.036-16.673-15.361c-19.245-9.385-42.827-2.309-54.094,16.087
|
||||
l11.546,6.665C49.232,43.242,65.013,38.204,77.717,44.4z"/>
|
||||
<path fill="#F69421" d="M70.489,59.089c2.06,1.005,3.731,2.627,4.832,4.692c0.037,0.07,0.07,0.143,0.105,0.214l12.854-7.423
|
||||
c-0.04-0.076-0.079-0.153-0.12-0.228c-2.546-4.662-6.379-8.339-11.082-10.632c-12.018-5.861-26.965-1.08-34.421,10.866
|
||||
l12.783,7.379C58.771,58.613,65.217,56.518,70.489,59.089z"/>
|
||||
<path fill="#0D819B" d="M116.672,41.881l-13.621,7.936c7.185,25.544-9.291,53.076-36.791,62.992v17.294l50.413-29.381V41.881z"/>
|
||||
<path fill="#08B1D5" d="M14.265,41.864v58.842l50.245,29.397v-17.294C36.51,103.127,20.607,75.545,27.905,49.74l-13.001-7.508
|
||||
L14.265,41.864z"/>
|
||||
<path fill="#F69421" d="M14.987,40.606l1.484,0.857l12.109,6.989C40.23,29.398,64.649,22.066,84.579,31.784
|
||||
c7.069,3.448,12.881,8.799,17.274,15.904c0.139,0.225,0.333,0.472,0.543,0.731l13.542-7.82l-50.47-29.146L14.987,40.606z"/>
|
||||
<path fill="#F0DF36" d="M66.202,78.433c4.968-2.778,7.95-7.226,8.141-12.159c0,0,0.022-0.489-0.015-1.283
|
||||
c-0.007-0.163-1.102-2.766-4.435-4.583c-4.476-2.441-10.828-0.093-13.372,4.583c0,0-0.061,0.574-0.033,1.283
|
||||
c0.182,4.483,2.945,9.749,7.836,12.159l0.991,0.473L66.202,78.433z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M148.629,103.076v5.928c-4.038,0-7.676-1.454-10.545-3.863c-3.605-3.025-5.894-7.565-5.894-12.638V62.815
|
||||
h5.894v13.471h10.545v5.966h-10.545v10.395C138.164,98.419,142.84,103.076,148.629,103.076z"/>
|
||||
<path fill="#FFFFFF" d="M169.65,76.285v5.889c-5.591,0.011-10.143,4.446-10.345,9.984v16.845h-5.908V76.285h5.908v3.735
|
||||
C162.113,77.689,165.718,76.291,169.65,76.285z"/>
|
||||
<path fill="#FFFFFF" d="M173.447,68.698v-5.9h5.897v5.9H173.447z M173.447,109.003V76.285h5.897v32.719H173.447z"/>
|
||||
<path fill="#FFFFFF" d="M215.508,76.285l-16.348,32.719l-16.364-32.719h6.699l9.665,19.32l9.646-19.32L215.508,76.285z"/>
|
||||
<path fill="#FFFFFF" d="M250.874,76.285c0,0,0,35.771,0,38.135c0,9.136-7.493,16.428-16.37,16.423
|
||||
c-4.157,0-8.009-1.576-10.934-4.196l4.24-4.24c1.809,1.532,4.143,2.464,6.693,2.459c5.745,0,10.396-4.696,10.396-10.446v-9.141
|
||||
c-2.85,2.359-6.488,3.724-10.396,3.724c-8.894,0.005-16.384-7.171-16.384-16.372c0-0.194,0-16.345,0-16.345h5.972
|
||||
c0,0,0.003,15.907,0.003,16.345c0,5.722,4.659,10.451,10.409,10.446c5.745,0,10.396-4.701,10.396-10.446V76.285H250.874z"/>
|
||||
</g>
|
||||
<g>
|
||||
<polygon fill="#FFFFFF" points="65.469,5.431 10.124,37.409 10.125,101.877 65.462,134.109 120.813,101.895 120.813,37.407 "/>
|
||||
<g>
|
||||
<path fill="#1904DA" d="M63.957,92.94V79.575c-6.048-2.856-9.846-8.792-9.768-15.27l-12.456-7.193
|
||||
c-0.783,7.101,0.852,14.447,4.636,20.771C50.545,84.86,56.46,89.923,63.957,92.94z"/>
|
||||
<path fill="#1904DA" d="M63.957,111.255V95.742c-8.438-3.162-15.089-8.73-19.77-16.553c-4.275-7.141-5.989-15.458-4.842-23.457
|
||||
l-11.564-6.678C21.14,74.652,36.57,101.186,63.957,111.255z"/>
|
||||
<path fill="#08B1D5" d="M66.804,95.596v15.649c26.877-10.306,42.715-37.348,36.372-62.1l-11.488,6.693
|
||||
c1.481,8.635,0.079,16.879-4.065,23.865C83.476,86.697,76.281,92.188,66.804,95.596z"/>
|
||||
<path fill="#08B1D5" d="M66.804,79.551v13.402c8.456-3.219,14.89-8.239,18.632-14.548c3.675-6.197,5.016-13.512,3.896-21.2
|
||||
L76.888,64.38C76.826,70.53,73.171,76.032,66.804,79.551z"/>
|
||||
<path fill="#FFC900" d="M78.53,41.442c5.228,2.549,9.501,6.608,12.373,11.749l11.183-6.458c-0.075-0.105-0.146-0.211-0.211-0.316
|
||||
c-4.4-7.116-10.209-12.47-17.267-15.913c-19.641-9.576-44.026-2.441-55.772,16.23l11.227,6.481
|
||||
C48.47,40.15,65.268,34.975,78.53,41.442z"/>
|
||||
<path fill="#FFC900" d="M65.771,55.646c1.762,0,3.527,0.385,5.182,1.193h0.001c2.175,1.062,3.954,2.75,5.158,4.894L88.7,54.463
|
||||
c-2.618-4.7-6.516-8.409-11.285-10.735c-12.078-5.888-27.409-1.16-35.147,10.76l12.525,7.229
|
||||
C57.397,57.836,61.572,55.646,65.771,55.646z"/>
|
||||
<path fill="#08B1D5" d="M66.804,130.848l51.828-30.205V40.14l-13.177,7.677c7.242,26.586-9.654,55.513-38.651,66.142V130.848z"/>
|
||||
<path fill="#1904DA" d="M25.5,47.738l-13.196-7.621v60.509l51.653,30.22v-16.883C34.902,103.736,18.087,74.773,25.5,47.738z"/>
|
||||
<path fill="#FFC900" d="M85.722,28.218c7.498,3.656,13.661,9.329,18.316,16.859c0.074,0.12,0.164,0.245,0.263,0.376l13.056-7.539
|
||||
L65.469,7.948l-51.9,29.973l13.061,7.54C39.042,25.644,64.896,18.062,85.722,28.218z"/>
|
||||
<path fill="#FF0036" d="M74.264,64.806c0.001-0.014,0.022-0.508-0.015-1.301c-0.104-0.324-1.328-2.715-4.385-4.383
|
||||
c-2.089-1.139-4.769-1.27-7.357-0.362c-2.536,0.891-4.688,2.664-5.922,4.873c-0.015,0.192-0.044,0.647-0.022,1.173
|
||||
c0.167,4.129,2.721,9.743,7.931,12.311l0.802,0.383l0.696-0.372C71.055,74.294,74.07,69.803,74.264,64.806z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M149.768,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
|
||||
s8.789,3.943,8.789,8.789V48.152z M140.979,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
|
||||
C146.199,36.485,143.858,34.143,140.979,34.143z"/>
|
||||
<path fill="#FFFFFF" d="M208.745,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
|
||||
c4.846,0,8.789,3.943,8.789,8.789V48.152z M199.956,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
|
||||
C205.176,36.485,202.835,34.143,199.956,34.143z"/>
|
||||
<path fill="#FFFFFF" d="M180.296,48.156c-4.848,0-8.793-3.944-8.793-8.793v-8.248h3.571v8.248c0,2.879,2.343,5.222,5.222,5.222
|
||||
c2.879,0,5.222-2.343,5.222-5.222v-8.248h3.571v8.248C189.089,44.211,185.144,48.156,180.296,48.156z"/>
|
||||
<path fill="#FFFFFF" d="M160.636,30.574c-4.846,0-8.789,3.943-8.789,8.789c0,4.846,3.943,8.789,8.789,8.789l3.569-3.569h-3.569
|
||||
c-2.878,0-5.22-2.342-5.22-5.22c0-2.878,2.342-5.22,5.22-5.22c2.878,0,5.22,2.342,5.22,5.22V56.54h3.569V39.363
|
||||
C169.425,34.516,165.482,30.574,160.636,30.574z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 7.0 KiB |
BIN
brand/Trivy-OSS-Logo-White-Horizontal-RGB.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
69
brand/Trivy-OSS-Logo-White-Horizontal-RGB.svg
Normal file
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 28.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1920 891" style="enable-background:new 0 0 1920 891;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
.st1{fill:#50F0FF;}
|
||||
.st2{fill:#0744DD;}
|
||||
.st3{fill:#FFC900;}
|
||||
.st4{fill:#FF0036;}
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M1421.86,281.92h-46.97c-25.9,0-46.97-21.07-46.97-46.97c0-25.9,21.07-46.97,46.97-46.97
|
||||
c25.9,0,46.97,21.07,46.97,46.97V281.92z M1374.89,207.05c-15.38,0-27.9,12.52-27.9,27.9c0,15.38,12.52,27.9,27.9,27.9h27.9v-27.9
|
||||
C1402.79,219.57,1390.28,207.05,1374.89,207.05z"/>
|
||||
<path class="st0" d="M1737.06,281.92h-46.97c-25.9,0-46.97-21.07-46.97-46.97c0-25.9,21.07-46.97,46.97-46.97
|
||||
c25.9,0,46.97,21.07,46.97,46.97V281.92z M1690.09,207.05c-15.38,0-27.9,12.52-27.9,27.9c0,15.38,12.52,27.9,27.9,27.9h27.9v-27.9
|
||||
C1717.98,219.57,1705.47,207.05,1690.09,207.05z"/>
|
||||
<path class="st0" d="M1585.02,281.94c-25.91,0-46.99-21.08-46.99-46.99v-44.08h19.08v44.08c0,15.39,12.52,27.91,27.91,27.91
|
||||
c15.39,0,27.91-12.52,27.91-27.91v-44.08h19.09v44.08C1632.01,260.86,1610.92,281.94,1585.02,281.94z"/>
|
||||
<path class="st0" d="M1479.94,187.98c-25.9,0-46.97,21.07-46.97,46.97c0,25.9,21.07,46.97,46.97,46.97l19.07-19.07h-19.07
|
||||
c-15.38,0-27.9-12.52-27.9-27.9c0-15.38,12.52-27.9,27.9-27.9c15.38,0,27.9,12.52,27.9,27.9v91.8h19.07v-91.8
|
||||
C1526.91,209.05,1505.84,187.98,1479.94,187.98z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M942.76,588.45v46.29c-31.53,0-59.94-11.34-82.34-30.14c-28.15-23.63-46.04-59.08-46.04-98.71V274.06h46.04
|
||||
v105.2h82.34v46.59h-82.34v81.19C861.05,552.1,897.55,588.45,942.76,588.45z"/>
|
||||
<path class="st0" d="M1106.82,379.26v45.98c-43.65,0.1-79.18,34.71-80.78,77.98v131.52h-46.12V379.26h46.12v29.16
|
||||
C1047.97,390.24,1076.12,379.3,1106.82,379.26z"/>
|
||||
<path class="st0" d="M1136.4,353.72v-40.29h46.05v40.29H1136.4z M1136.4,634.74V379.26h46.05v255.48H1136.4z"/>
|
||||
<path class="st0" d="M1464.76,379.26l-127.64,255.48l-127.8-255.48h52.33l75.47,150.88l75.31-150.88H1464.76z"/>
|
||||
<path class="st0" d="M1740.81,379.26c0,0,0,279.32,0,297.8c0,71.31-58.52,128.26-127.83,128.2
|
||||
c-32.47,0.03-62.55-12.29-85.37-32.76l33.1-33.09c14.13,11.97,32.36,19.22,52.28,19.2c44.86,0,81.17-36.69,81.17-81.55v-71.39
|
||||
c-22.26,18.42-50.67,29.09-81.17,29.06c-69.46,0.06-127.95-56-127.95-127.85c0-1.51,0-127.64,0-127.64h46.64
|
||||
c0,0,0.02,124.23,0.02,127.64c0,44.67,36.39,81.6,81.28,81.55c44.86,0,81.17-36.69,81.17-81.55V379.26H1740.81z"/>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st1" d="M428.54,364.9c0.04,0,0.08,0,0.12,0c6.56,0.01,11.98-5.03,11.98-11.58V135.99l-12.23-6.83l-12.18,6.8
|
||||
v217.36c0,6.56,5.43,11.61,11.98,11.58C428.32,364.9,428.43,364.9,428.54,364.9z"/>
|
||||
<path class="st2" d="M355.18,463.55L153.55,598.87v15.41l11.49,6.29l203.73-136.73c5.23-3.51,6.53-10.52,3.15-15.84
|
||||
c-0.14-0.23-0.29-0.45-0.43-0.68C367.99,461.7,360.68,459.86,355.18,463.55z"/>
|
||||
<path class="st3" d="M488.27,483.95l203.55,136.61l11.45-6.28v-15.44L501.86,463.66c-5.51-3.7-12.82-1.87-16.32,3.76
|
||||
c-0.13,0.21-0.27,0.43-0.4,0.64C481.73,473.4,483.02,480.43,488.27,483.95z"/>
|
||||
<path class="st0" d="M727.69,282.29v-13.96l-12.5-6.98l-0.93-0.49L440.33,107.87l-11.92-6.64l-11.87,6.64L142.56,260.86
|
||||
l-0.93,0.49l-12.5,6.98v13.96l-0.93,0.54l0.93,0.49v13.92v331.5l12.69,6.94l266.85,146.2l3.37,1.85l16.41,8.98l16.36-8.98
|
||||
l3.37-1.85l266.85-146.2l12.65-6.94v-331.5v-13.87l0.98-0.54L727.69,282.29z M440.95,758.05V511.4c0-6.72-5.5-12.22-12.22-12.21
|
||||
l-0.19,0l-0.13,0c-6.72-0.01-12.22,5.49-12.22,12.21v246.64L165.04,620.57l-11.49-6.29v-15.41V294.7l199.98,109.56
|
||||
c5.77,3.16,13.1,1.04,16.28-4.72l0.14-0.26c3.22-5.83,1.08-13.22-4.76-16.42L167.81,274.72l248.42-138.75l12.18-6.8l12.23,6.83
|
||||
l248.37,138.73L491.47,382.95c-5.81,3.18-7.63,10.45-4.41,16.24c0.05,0.1,0.11,0.2,0.16,0.29c3.16,5.73,10.22,8.01,15.96,4.86
|
||||
L703.27,294.7v304.15v15.44l-11.45,6.28L440.95,758.05z"/>
|
||||
</g>
|
||||
<circle class="st4" cx="428.54" cy="432.05" r="35.42"/>
|
||||
</g>
|
||||
<path class="st1" d="M617.65,262.99L426.32,155.74c-5.88-3.3-7.98-10.74-4.68-16.62v0c3.3-5.88,10.74-7.98,16.62-4.68
|
||||
l191.33,107.25c5.88,3.3,7.98,10.74,4.68,16.62l0,0C630.97,264.19,623.53,266.29,617.65,262.99z"/>
|
||||
<path class="st1" d="M533.81,271.27l-107.48-60.25c-5.88-3.3-7.98-10.74-4.68-16.62v0c3.3-5.88,10.74-7.98,16.62-4.68
|
||||
l107.48,60.25c5.88,3.3,7.98,10.74,4.68,16.62v0C547.13,272.47,539.69,274.56,533.81,271.27z"/>
|
||||
<path class="st1" d="M569.02,291L569.02,291c-5.88-3.3-7.98-10.74-4.68-16.62l0,0c3.3-5.88,10.74-7.98,16.62-4.68v0
|
||||
c5.88,3.3,7.98,10.74,4.68,16.62v0C582.34,292.2,574.9,294.3,569.02,291z"/>
|
||||
<path class="st1" d="M462.29,288.33l-35.7-20.01c-5.88-3.3-7.98-10.74-4.68-16.62v0c3.3-5.88,10.74-7.98,16.62-4.68l35.7,20.01
|
||||
c5.88,3.3,7.98,10.74,4.68,16.62v0C475.61,289.53,468.17,291.63,462.29,288.33z"/>
|
||||
<path class="st1" d="M516.16,321.21l-20.67-11.58c-5.88-3.3-7.98-10.74-4.68-16.62v0c3.3-5.88,10.74-7.98,16.62-4.68l20.67,11.58
|
||||
c5.88,3.3,7.98,10.74,4.68,16.62v0C529.48,322.41,522.04,324.51,516.16,321.21z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 80 KiB |
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 500 524" enable-background="new 0 0 500 524" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M186.351,471.553v8.229c-5.606,0-10.656-2.019-14.639-5.363c-5.005-4.199-8.182-10.502-8.182-17.544v-41.21
|
||||
h8.182v18.699h14.639v8.282h-14.639v14.43C171.824,465.089,178.316,471.553,186.351,471.553z"/>
|
||||
<path fill="#FFFFFF" d="M215.533,434.363v8.175c-7.762,0.016-14.08,6.172-14.361,13.86v23.384h-8.202v-45.419h8.202v5.185
|
||||
C205.069,436.313,210.074,434.371,215.533,434.363z"/>
|
||||
<path fill="#FFFFFF" d="M220.803,423.832v-8.191h8.186v8.191H220.803z M220.803,479.782v-45.419h8.186v45.419H220.803z"/>
|
||||
<path fill="#FFFFFF" d="M279.191,434.363l-22.694,45.419l-22.716-45.419h9.3l13.417,26.82l13.39-26.82H279.191z"/>
|
||||
<path fill="#FFFFFF" d="M328.286,434.363c0,0,0,49.656,0,52.938c0,12.682-10.402,22.805-22.725,22.798
|
||||
c-5.771,0-11.118-2.188-15.178-5.824l5.887-5.887c2.512,2.126,5.751,3.42,9.291,3.413c7.975,0,14.431-6.519,14.431-14.5v-12.689
|
||||
c-3.956,3.275-9.006,5.17-14.431,5.17c-12.346,0.007-22.743-9.954-22.743-22.728c0-0.27,0-22.69,0-22.69h8.291
|
||||
c0,0,0.004,22.082,0.004,22.69c0,7.944,6.468,14.508,14.45,14.5c7.975,0,14.431-6.526,14.431-14.5v-22.691H328.286z"/>
|
||||
</g>
|
||||
<g>
|
||||
<polygon fill="#FFFFFF" points="250.554,44.159 116.876,121.396 116.877,277.11 250.537,354.962 384.229,277.154 384.229,121.392
|
||||
"/>
|
||||
<g>
|
||||
<path fill="#1904DA" d="M246.902,255.524v-32.282c-14.609-6.898-23.783-21.236-23.594-36.882l-30.086-17.374
|
||||
c-1.892,17.15,2.057,34.896,11.198,50.171C214.507,236.009,228.793,248.237,246.902,255.524z"/>
|
||||
<path fill="#1904DA" d="M246.902,299.761v-37.468c-20.381-7.638-36.445-21.086-47.752-39.981
|
||||
c-10.325-17.249-14.466-37.337-11.695-56.657l-27.931-16.129C143.482,211.352,180.751,275.442,246.902,299.761z"/>
|
||||
<path fill="#08B1D5" d="M253.779,261.938v37.797c64.918-24.892,103.171-90.209,87.852-149.994l-27.747,16.165
|
||||
c3.578,20.856,0.191,40.77-9.818,57.644C294.046,240.446,276.67,253.707,253.779,261.938z"/>
|
||||
<path fill="#08B1D5" d="M253.779,223.185v32.371c20.424-7.774,35.964-19.9,45.004-35.138c8.877-14.969,12.116-32.637,9.411-51.205
|
||||
l-30.06,17.33C277.985,201.395,269.156,214.685,253.779,223.185z"/>
|
||||
<path fill="#FFC900" d="M282.1,131.138c12.628,6.157,22.948,15.961,29.885,28.378l27.012-15.598
|
||||
c-0.182-0.255-0.351-0.51-0.509-0.764c-10.628-17.188-24.658-30.12-41.707-38.435c-47.439-23.13-106.339-5.896-134.71,39.2
|
||||
l27.117,15.654C209.496,128.018,250.069,115.518,282.1,131.138z"/>
|
||||
<path fill="#FFC900" d="M251.284,165.445c4.256,0,8.519,0.931,12.516,2.881h0.002c5.253,2.564,9.549,6.643,12.458,11.821
|
||||
l30.404-17.558c-6.323-11.352-15.738-20.312-27.257-25.93c-29.172-14.223-66.203-2.802-84.893,25.99l30.251,17.46
|
||||
C231.056,170.735,241.141,165.445,251.284,165.445z"/>
|
||||
<path fill="#08B1D5" d="M253.779,347.086l125.184-72.957V127.993l-31.828,18.542c17.491,64.215-23.319,134.084-93.356,159.757
|
||||
V347.086z"/>
|
||||
<path fill="#1904DA" d="M154.014,146.345l-31.873-18.406v146.151l124.761,72.993v-40.779
|
||||
C176.723,281.599,136.109,211.643,154.014,146.345z"/>
|
||||
<path fill="#FFC900" d="M299.471,99.198c18.111,8.832,32.995,22.533,44.241,40.722c0.179,0.289,0.397,0.592,0.636,0.908
|
||||
l31.536-18.21l-125.33-72.378l-125.358,72.395l31.548,18.211C186.722,92.98,249.169,74.667,299.471,99.198z"/>
|
||||
<path fill="#FF0036" d="M271.797,187.57c0.002-0.035,0.052-1.226-0.036-3.143c-0.251-0.783-3.208-6.558-10.592-10.586
|
||||
c-5.045-2.751-11.518-3.068-17.769-0.874c-6.124,2.152-11.322,6.434-14.303,11.769c-0.036,0.464-0.105,1.563-0.052,2.832
|
||||
c0.404,9.974,6.573,23.534,19.156,29.736l1.938,0.925l1.682-0.899C264.046,210.487,271.328,199.641,271.797,187.57z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M186.846,398.474H175.2c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
|
||||
s11.646,5.224,11.646,11.646V398.474z M175.2,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916h6.916
|
||||
v-6.916C182.117,383.015,179.014,379.912,175.2,379.912z"/>
|
||||
<path fill="#FFFFFF" d="M264.991,398.474h-11.646c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
|
||||
c6.421,0,11.646,5.224,11.646,11.646V398.474z M253.345,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916
|
||||
h6.916v-6.916C260.261,383.015,257.159,379.912,253.345,379.912z"/>
|
||||
<path fill="#FFFFFF" d="M227.295,398.479c-6.424,0-11.651-5.226-11.651-11.651V375.9h4.731v10.928c0,3.815,3.104,6.919,6.919,6.919
|
||||
c3.815,0,6.919-3.104,6.919-6.919V375.9h4.731v10.928C238.946,393.253,233.719,398.479,227.295,398.479z"/>
|
||||
<path fill="#FFFFFF" d="M201.245,375.183c-6.421,0-11.645,5.224-11.645,11.646c0,6.421,5.224,11.646,11.645,11.646l4.729-4.729
|
||||
h-4.729c-3.814,0-6.916-3.103-6.916-6.916c0-3.814,3.103-6.916,6.916-6.916c3.814,0,6.916,3.103,6.916,6.916v22.76h4.729v-22.76
|
||||
C212.891,380.407,207.666,375.183,201.245,375.183z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.9 KiB |
BIN
brand/Trivy-OSS-Logo-White-Stacked-RGB.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
3179
brand/Trivy-OSS-Logo-White-Stacked-RGB.svg
Normal file
|
After Width: | Height: | Size: 232 KiB |
@@ -5,14 +5,14 @@ UBUNTU_RELEASES=$(sort -u <(ubuntu-distro-info --supported-esm) <(ubuntu-distro-
|
||||
|
||||
cd trivy-repo/deb
|
||||
|
||||
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
for release in generic ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
echo "Removing deb package of $release"
|
||||
reprepro -A i386 remove $release trivy
|
||||
reprepro -A amd64 remove $release trivy
|
||||
reprepro -A arm64 remove $release trivy
|
||||
done
|
||||
|
||||
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
for release in generic ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
echo "Adding deb package to $release"
|
||||
reprepro includedeb $release ../../dist/*Linux-32bit.deb
|
||||
reprepro includedeb $release ../../dist/*Linux-64bit.deb
|
||||
|
||||
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"os"
|
||||
|
||||
"golang.org/x/xerrors"
|
||||
@@ -9,13 +10,18 @@ import (
|
||||
"github.com/aquasecurity/trivy/pkg/commands"
|
||||
"github.com/aquasecurity/trivy/pkg/log"
|
||||
"github.com/aquasecurity/trivy/pkg/plugin"
|
||||
"github.com/aquasecurity/trivy/pkg/types"
|
||||
|
||||
_ "modernc.org/sqlite" // sqlite driver for RPM DB and Java DB
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := run(); err != nil {
|
||||
log.Fatal(err)
|
||||
var exitError *types.ExitError
|
||||
if errors.As(err, &exitError) {
|
||||
os.Exit(exitError.Code)
|
||||
}
|
||||
log.Fatal("Fatal error", log.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
{
|
||||
"SchemaVersion": "2018-10-08",
|
||||
"Id": "{{ $target }}",
|
||||
"ProductArn": "arn:aws:securityhub:{{ env "AWS_DEFAULT_REGION" }}::product/aquasecurity/aquasecurity",
|
||||
"ProductArn": "arn:aws:securityhub:{{ env "AWS_REGION" }}::product/aquasecurity/aquasecurity",
|
||||
"GeneratorId": "Trivy",
|
||||
"AwsAccountId": "{{ env "AWS_ACCOUNT_ID" }}",
|
||||
"Types": [ "Sensitive Data Identifications" ],
|
||||
@@ -145,7 +145,7 @@
|
||||
"Type": "Other",
|
||||
"Id": "{{ $target }}",
|
||||
"Partition": "aws",
|
||||
"Region": "{{ env "AWS_DEFAULT_REGION" }}",
|
||||
"Region": "{{ env "AWS_REGION" }}",
|
||||
"Details": {
|
||||
"Other": {
|
||||
"Filename": "{{ $target }}"
|
||||
|
||||
@@ -56,3 +56,21 @@ ignore {
|
||||
# https://cwe.mitre.org/data/definitions/352.html
|
||||
input.CweIDs[_] == "CWE-352"
|
||||
}
|
||||
|
||||
# Ignore a license
|
||||
ignore {
|
||||
input.PkgName == "alpine-baselayout"
|
||||
input.Name == "GPL-2.0"
|
||||
}
|
||||
|
||||
# Ignore loose file license
|
||||
ignore {
|
||||
input.Name == "AGPL-3.0"
|
||||
input.FilePath == "/usr/share/grafana/LICENSE"
|
||||
}
|
||||
|
||||
# Ignore secret
|
||||
ignore {
|
||||
input.RuleID == "aws-access-key-id"
|
||||
input.Match == "AWS_ACCESS_KEY_ID=\"********************\""
|
||||
}
|
||||
|
||||
@@ -73,8 +73,11 @@
|
||||
{{- /* TODO: Type not extractable - https://github.com/aquasecurity/trivy-db/pull/24 */}}
|
||||
"type": "cve",
|
||||
"name": "{{ .VulnerabilityID }}",
|
||||
"value": "{{ .VulnerabilityID }}",
|
||||
"value": "{{ .VulnerabilityID }}"
|
||||
{{- /* cf. https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/e3d280d7f0862ca66a1555ea8b24016a004bb914/dist/container-scanning-report-format.json#L157-179 */}}
|
||||
{{- if .PrimaryURL | regexMatch "^(https?|ftp)://.+" -}},
|
||||
"url": "{{ .PrimaryURL }}"
|
||||
{{- end }}
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
@@ -85,9 +88,13 @@
|
||||
{{- else -}}
|
||||
,
|
||||
{{- end -}}
|
||||
{{- if . | regexMatch "^(https?|ftp)://.+" -}}
|
||||
{
|
||||
"url": "{{ regexFind "[^ ]+" . }}"
|
||||
"url": "{{ . }}"
|
||||
}
|
||||
{{- else -}}
|
||||
{{- $l_first = true }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ There are 4 categories:
|
||||
If you find any false positives or false negatives, please make sure to report them under the "False Detection" category, not "Bugs".
|
||||
|
||||
## False detection
|
||||
Trivy depends on [multiple data sources](https://aquasecurity.github.io/trivy/latest/docs/vulnerability/detection/data-source/).
|
||||
Trivy depends on [multiple data sources](https://aquasecurity.github.io/trivy/latest/docs/scanner/vulnerability/#data-sources).
|
||||
Sometime these databases contain mistakes.
|
||||
|
||||
If Trivy can't detect any CVE-IDs or shows false positive result, at first please follow the next steps:
|
||||
|
||||
@@ -178,6 +178,7 @@ others:
|
||||
- helm
|
||||
- report
|
||||
- db
|
||||
- parser
|
||||
- deps
|
||||
|
||||
The `<scope>` can be empty (e.g. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted.
|
||||
|
||||
53
docs/community/principles.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# Trivy Project Principles
|
||||
This document outlines the guiding principles and governance framework for the Trivy project.
|
||||
|
||||
## Core Principles
|
||||
Trivy is a security scanner focused on static analysis and designed with simplicity and security at its core.
|
||||
All new proposals to the project must adhere to the following principles.
|
||||
|
||||
### Static Analysis (No Runtime Required)
|
||||
Trivy operates without requiring container or VM image startups, eliminating the need for Docker or similar runtimes, except for scanning images stored within a container runtime.
|
||||
This approach enhances security and efficiency by minimizing dependencies.
|
||||
|
||||
### External Dependency Free (Single Binary)
|
||||
Operating as a single binary, Trivy is independent of external environments and avoids executing external OS commands or processes.
|
||||
If specific functionality, like Maven's, is needed, Trivy opts for internal reimplementations or processing outputs of the tool without direct execution of external tools.
|
||||
|
||||
This approach obviously requires more effort but significantly reduces security risks associated with executing OS commands and dependency errors due to external environment versions.
|
||||
Simplifying the scanner's use by making it operational immediately upon binary download facilitates easier initiation of scans.
|
||||
|
||||
### No Setup Required
|
||||
Trivy must be ready to use immediately after installation.
|
||||
It's unacceptable for Trivy not to function without setting up a database or writing configuration files by default.
|
||||
Such setups should only be necessary for users requiring specific customizations.
|
||||
|
||||
Security often isn't a top priority for many organizations and can be easily deferred.
|
||||
Trivy aims to lower the barrier to entry by simplifying the setup process, making it easier for users to start securing their projects.
|
||||
|
||||
### Security Focus
|
||||
Trivy prioritizes the identification of security issues, excluding features unrelated to security, such as performance metrics or content listings of container images.
|
||||
It can, however, produce and output intermediate representations like SBOMs for comprehensive security assessments.
|
||||
|
||||
Trivy serves as a tool with opinions on security, used to warn users about potential issues.
|
||||
|
||||
### Detecting Unintended States
|
||||
Trivy is designed to detect unintended vulnerable states in projects, such as the use of vulnerable versions of dependencies or misconfigurations in Infrastructure as Code (IaC) that may unintentionally expose servers to the internet.
|
||||
The focus is on identifying developer mistakes or undesirable states, not on detecting intentional attacks, such as malicious images and malware.
|
||||
|
||||
## Out of Scope Features
|
||||
Aqua Security offers a premium version with several features not available in the open-source Trivy project.
|
||||
While detailed information can be found [here][trivy-aqua], it's beneficial to highlight specific functionalities frequently inquired about:
|
||||
|
||||
### Runtime Security
|
||||
As mentioned in [the Core Principles](#static-analysis-no-runtime-required), Trivy is a static analysis security scanner, making runtime security outside its scope.
|
||||
Runtime security needs are addressed by [Tracee][tracee] or [the commercial version of Aqua Security]().
|
||||
|
||||
### Intentional Attacks
|
||||
As mentioned in [the Core Principles](#detecting-unintended-states), detection of intentional attacks, such as malware or malicious container images, is not covered by Trivy and is supported in [the commercial version][aqua].
|
||||
|
||||
### User Interface
|
||||
Trivy primarily operates via CLI for displaying results, with a richer UI available in [the commercial version][aqua].
|
||||
|
||||
[trivy-aqua]: https://github.com/aquasecurity/resources/blob/main/trivy-aqua.md
|
||||
[tracee]: https://github.com/aquasecurity/tracee
|
||||
[aqua]: https://www.aquasec.com/
|
||||
@@ -137,6 +137,6 @@ $ trivy conf --skip-policy-update /path/to/conf
|
||||
```
|
||||
|
||||
[allowlist]: ../references/troubleshooting.md
|
||||
[oras]: https://oras.land/cli/
|
||||
[oras]: https://oras.land/docs/installation
|
||||
|
||||
[^1]: This is only required to scan `jar` files. More information about `Java index db` [here](../coverage/language/java.md)
|
||||
|
||||
@@ -70,7 +70,7 @@ $ trivy server --cache-backend redis://localhost:6379 \
|
||||
|
||||
[trivy-db]: ./db.md#vulnerability-database
|
||||
[trivy-java-db]: ./db.md#java-index-database
|
||||
[misconf-policies]: ../scanner/misconfiguration/policy/builtin.md
|
||||
[misconf-policies]: ../scanner/misconfiguration/check/builtin.md
|
||||
|
||||
[^1]: Downloaded when scanning for vulnerabilities
|
||||
[^2]: Downloaded when scanning `jar/war/par/ear` files
|
||||
|
||||
@@ -54,18 +54,28 @@ $ trivy image --download-db-only
|
||||
$ trivy image --db-repository registry.gitlab.com/gitlab-org/security-products/dependencies/trivy-db
|
||||
```
|
||||
|
||||
!!!note
|
||||
Trivy automatically adds the `trivy-db` schema version as a tag if the tag is not used:
|
||||
|
||||
`trivy-db-registry:latest` => `trivy-db-registry:latest`, but `trivy-db-registry` => `trivy-db-registry:2`.
|
||||
|
||||
## Java Index Database
|
||||
The same options are also available for the Java index DB, which is used for scanning Java applications.
|
||||
Skipping an update can be done by using the `--skip-java-db-update` option, while `--download-java-db-only` can be used to only download the Java index DB.
|
||||
|
||||
!!! Note
|
||||
In [Client/Server](../references/modes/client-server.md) mode, `Java index DB` is currently only used on the `client` side.
|
||||
|
||||
Downloading the Java index DB from an external OCI registry can be done by using the `--java-db-repository` option.
|
||||
|
||||
```
|
||||
$ 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.
|
||||
!!!note
|
||||
Trivy automatically adds the `trivy-java-db` schema version as a tag if the tag is not used:
|
||||
|
||||
`java-db-registry:latest` => `java-db-registry:latest`, but `java-db-registry` => `java-db-registry:1`.
|
||||
|
||||
## Remove DBs
|
||||
The `--reset` flag removes all caches and databases.
|
||||
|
||||
@@ -1,81 +1,34 @@
|
||||
# Filtering
|
||||
Trivy provides various methods for filtering the results.
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
Issues("Detected\nIssues") --> Severity
|
||||
|
||||
## By Status
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | |
|
||||
| Secret | |
|
||||
| License | |
|
||||
|
||||
Trivy supports the following vulnerability statuses:
|
||||
|
||||
- `unknown`
|
||||
- `not_affected`: this package is not affected by this vulnerability on this platform
|
||||
- `affected`: this package is affected by this vulnerability on this platform, but there is no patch released yet
|
||||
- `fixed`: this vulnerability is fixed on this platform
|
||||
- `under_investigation`: it is currently unknown whether or not this vulnerability affects this package on this platform, and it is under investigation
|
||||
- `will_not_fix`: this package is affected by this vulnerability on this platform, but there is currently no intention to fix it (this would primarily be for flaws that are of Low or Moderate impact that pose no significant risk to customers)
|
||||
- `fix_deferred`: this package is affected by this vulnerability on this platform, and may be fixed in the future
|
||||
- `end_of_life`: this package has been identified to contain the impacted component, but analysis to determine whether it is affected or not by this vulnerability was not performed
|
||||
|
||||
Note that vulnerabilities with the `unknown`, `not_affected` or `under_investigation` status are not detected.
|
||||
These are only defined for comprehensiveness, and you will not have the opportunity to specify these statuses.
|
||||
|
||||
Some statuses are supported in limited distributions.
|
||||
|
||||
| OS | Fixed | Affected | Under Investigation | Will Not Fix | Fix Deferred | End of Life |
|
||||
|:----------:|:-----:|:--------:|:-------------------:|:------------:|:------------:|:-----------:|
|
||||
| Debian | ✓ | ✓ | | | ✓ | ✓ |
|
||||
| RHEL | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| Other OSes | ✓ | ✓ | | | | |
|
||||
|
||||
|
||||
To ignore vulnerabilities with specific statuses, use the `--ignore-status <list_of_statuses>` option.
|
||||
|
||||
|
||||
```bash
|
||||
$ trivy image --ignore-status affected,fixed ruby:2.4.0
|
||||
subgraph Filtering
|
||||
subgraph Prioritization
|
||||
direction TB
|
||||
Severity("By Severity") --> Status("By Status")
|
||||
end
|
||||
subgraph Suppression
|
||||
Status --> Ignore("By Finding IDs")
|
||||
Ignore --> Rego("By Rego")
|
||||
Rego --> VEX("By VEX")
|
||||
end
|
||||
end
|
||||
VEX --> Results
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
Similar to the functionality of filtering results, you can also limit the sub-targets for each scanner.
|
||||
For information on these settings, please refer to the scanner-specific documentation ([vulnerability](../scanner/vulnerability.md) , [misconfiguration](../scanner/misconfiguration/index.md), etc.).
|
||||
|
||||
```
|
||||
2019-05-16T12:50:14.786+0900 INFO Detecting Debian vulnerabilities...
|
||||
## Prioritization
|
||||
You can filter the results by
|
||||
|
||||
ruby:2.4.0 (debian 8.7)
|
||||
=======================
|
||||
Total: 527 (UNKNOWN: 0, LOW: 276, MEDIUM: 83, HIGH: 158, CRITICAL: 10)
|
||||
- [Severity](#by-severity)
|
||||
- [Status](#by-status)
|
||||
|
||||
┌─────────────────────────────┬──────────────────┬──────────┬──────────────┬────────────────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
|
||||
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
|
||||
├─────────────────────────────┼──────────────────┼──────────┼──────────────┼────────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
|
||||
│ binutils │ CVE-2014-9939 │ CRITICAL │ will_not_fix │ 2.25-5 │ │ binutils: buffer overflow in ihex.c │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2014-9939 │
|
||||
│ ├──────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
|
||||
│ │ CVE-2017-6969 │ │ │ │ │ binutils: Heap-based buffer over-read in readelf when │
|
||||
│ │ │ │ │ │ │ processing corrupt RL78 binaries │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2017-6969 │
|
||||
│ ├──────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
|
||||
...
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
!!! tip
|
||||
To skip all unfixed vulnerabilities, you can use the `--ignore-unfixed` flag .
|
||||
It is a shorthand of `--ignore-status affected,will_not_fix,fix_deferred,end_of_life`.
|
||||
It displays "fixed" vulnerabilities only.
|
||||
|
||||
```bash
|
||||
$ trivy image --ignore-unfixed ruby:2.4.0
|
||||
```
|
||||
|
||||
## By Severity
|
||||
### By Severity
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
@@ -202,11 +155,125 @@ See https://avd.aquasec.com/misconfig/avd-aws-0081
|
||||
```
|
||||
</details>
|
||||
|
||||
## By Finding IDs
|
||||
### By Status
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | |
|
||||
| Secret | |
|
||||
| License | |
|
||||
|
||||
Trivy supports the following vulnerability statuses:
|
||||
|
||||
- `unknown`
|
||||
- `not_affected`: this package is not affected by this vulnerability on this platform
|
||||
- `affected`: this package is affected by this vulnerability on this platform, but there is no patch released yet
|
||||
- `fixed`: this vulnerability is fixed on this platform
|
||||
- `under_investigation`: it is currently unknown whether or not this vulnerability affects this package on this platform, and it is under investigation
|
||||
- `will_not_fix`: this package is affected by this vulnerability on this platform, but there is currently no intention to fix it (this would primarily be for flaws that are of Low or Moderate impact that pose no significant risk to customers)
|
||||
- `fix_deferred`: this package is affected by this vulnerability on this platform, and may be fixed in the future
|
||||
- `end_of_life`: this package has been identified to contain the impacted component, but analysis to determine whether it is affected or not by this vulnerability was not performed
|
||||
|
||||
Note that vulnerabilities with the `unknown`, `not_affected` or `under_investigation` status are not detected.
|
||||
These are only defined for comprehensiveness, and you will not have the opportunity to specify these statuses.
|
||||
|
||||
Some statuses are supported in limited distributions.
|
||||
|
||||
| OS | Fixed | Affected | Under Investigation | Will Not Fix | Fix Deferred | End of Life |
|
||||
|:----------:|:-----:|:--------:|:-------------------:|:------------:|:------------:|:-----------:|
|
||||
| Debian | ✓ | ✓ | | | ✓ | ✓ |
|
||||
| RHEL | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| Other OSes | ✓ | ✓ | | | | |
|
||||
|
||||
|
||||
To ignore vulnerabilities with specific statuses, use the `--ignore-status <list_of_statuses>` option.
|
||||
|
||||
|
||||
```bash
|
||||
$ trivy image --ignore-status affected,fixed ruby:2.4.0
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```
|
||||
2019-05-16T12:50:14.786+0900 INFO Detecting Debian vulnerabilities...
|
||||
|
||||
ruby:2.4.0 (debian 8.7)
|
||||
=======================
|
||||
Total: 527 (UNKNOWN: 0, LOW: 276, MEDIUM: 83, HIGH: 158, CRITICAL: 10)
|
||||
|
||||
┌─────────────────────────────┬──────────────────┬──────────┬──────────────┬────────────────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
|
||||
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
|
||||
├─────────────────────────────┼──────────────────┼──────────┼──────────────┼────────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
|
||||
│ binutils │ CVE-2014-9939 │ CRITICAL │ will_not_fix │ 2.25-5 │ │ binutils: buffer overflow in ihex.c │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2014-9939 │
|
||||
│ ├──────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
|
||||
│ │ CVE-2017-6969 │ │ │ │ │ binutils: Heap-based buffer over-read in readelf when │
|
||||
│ │ │ │ │ │ │ processing corrupt RL78 binaries │
|
||||
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2017-6969 │
|
||||
│ ├──────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
|
||||
...
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
!!! tip
|
||||
To skip all unfixed vulnerabilities, you can use the `--ignore-unfixed` flag .
|
||||
It is a shorthand of `--ignore-status affected,will_not_fix,fix_deferred,end_of_life`.
|
||||
It displays "fixed" vulnerabilities only.
|
||||
|
||||
```bash
|
||||
$ trivy image --ignore-unfixed ruby:2.4.0
|
||||
```
|
||||
|
||||
## Suppression
|
||||
You can filter the results by
|
||||
|
||||
- [Finding IDs](#by-finding-ids)
|
||||
- [Rego](#by-rego)
|
||||
- [Vulnerability Exploitability Exchange (VEX)](#by-vulnerability-exploitability-exchange-vex)
|
||||
|
||||
To show the suppressed results, use the `--show-suppressed` flag.
|
||||
|
||||
!!! note
|
||||
This flag is currently available only in the table format.
|
||||
|
||||
```bash
|
||||
$ trivy image --vex debian11.csaf.vex --ignorefile .trivyignore.yaml --show-suppressed debian:11
|
||||
...
|
||||
|
||||
Suppressed Vulnerabilities (Total: 9)
|
||||
|
||||
┌───────────────┬───────────────┬──────────┬──────────────┬─────────────────────────────────────────────┬───────────────────┐
|
||||
│ Library │ Vulnerability │ Severity │ Status │ Statement │ Source │
|
||||
├───────────────┼───────────────┼──────────┼──────────────┼─────────────────────────────────────────────┼───────────────────┤
|
||||
│ libdb5.3 │ CVE-2019-8457 │ CRITICAL │ not_affected │ vulnerable_code_not_in_execute_path │ CSAF VEX │
|
||||
├───────────────┼───────────────┼──────────┼──────────────┼─────────────────────────────────────────────┼───────────────────┤
|
||||
│ bsdutils │ CVE-2022-0563 │ LOW │ ignored │ Accept the risk │ .trivyignore.yaml │
|
||||
├───────────────┤ │ │ │ │ │
|
||||
│ libblkid1 │ │ │ │ │ │
|
||||
├───────────────┤ │ │ │ │ │
|
||||
│ libmount1 │ │ │ │ │ │
|
||||
├───────────────┤ │ │ │ │ │
|
||||
│ libsmartcols1 │ │ │ │ │ │
|
||||
├───────────────┤ │ │ │ │ │
|
||||
│ libuuid1 │ │ │ │ │ │
|
||||
├───────────────┤ │ │ │ │ │
|
||||
│ mount │ │ │ │ │ │
|
||||
├───────────────┼───────────────┤ │ ├─────────────────────────────────────────────┤ │
|
||||
│ tar │ CVE-2005-2541 │ │ │ The vulnerable configuration is not enabled │ │
|
||||
├───────────────┼───────────────┤ │ ├─────────────────────────────────────────────┤ │
|
||||
│ util-linux │ CVE-2022-0563 │ │ │ Accept the risk │ │
|
||||
└───────────────┴───────────────┴──────────┴──────────────┴─────────────────────────────────────────────┴───────────────────┘
|
||||
```
|
||||
|
||||
### By Finding IDs
|
||||
|
||||
Trivy supports the [.trivyignore](#trivyignore) and [.trivyignore.yaml](#trivyignoreyaml) ignore files.
|
||||
|
||||
### .trivyignore
|
||||
#### .trivyignore
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
@@ -254,7 +321,7 @@ Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
|
||||
|
||||
</details>
|
||||
|
||||
### .trivyignore.yaml
|
||||
#### .trivyignore.yaml
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
@@ -271,12 +338,13 @@ For the `.trivyignore.yaml` file, you can set ignored IDs separately for `vulner
|
||||
|
||||
Available fields:
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|------------|:--------:|---------------------|------------------------------------------------------------------------------------------------------------|
|
||||
| id | ✓ | string | The identifier of the vulnerability, misconfiguration, secret, or license[^1]. |
|
||||
| paths | | string array | The list of file paths to be ignored. If `paths` is not set, the ignore finding is applied to all files. |
|
||||
| expired_at | | date (`yyyy-mm-dd`) | The expiration date of the ignore finding. If `expired_at` is not set, the ignore finding is always valid. |
|
||||
| statement | | string | The reason for ignoring the finding. (This field is not used for filtering.) |
|
||||
| Field | Required | Type | Description |
|
||||
|------------|:--------:|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| id | ✓ | string | The identifier of the vulnerability, misconfiguration, secret, or license[^1]. |
|
||||
| paths[^2] | | string array | The list of file paths to ignore. If `paths` is not set, the ignore finding is applied to all files. |
|
||||
| purls | | string array | The list of PURLs to ignore packages. If `purls` is not set, the ignore finding is applied to all packages. This field is currently available only for vulnerabilities. |
|
||||
| expired_at | | date (`yyyy-mm-dd`) | The expiration date of the ignore finding. If `expired_at` is not set, the ignore finding is always valid. |
|
||||
| statement | | string | The reason for ignoring the finding. (This field is not used for filtering.) |
|
||||
|
||||
```bash
|
||||
$ cat .trivyignore.yaml
|
||||
@@ -288,6 +356,8 @@ vulnerabilities:
|
||||
- id: CVE-2023-2650
|
||||
- id: CVE-2023-3446
|
||||
- id: CVE-2023-3817
|
||||
purls:
|
||||
- "pkg:deb/debian/libssl1.1"
|
||||
- id: CVE-2023-29491
|
||||
expired_at: 2023-09-01
|
||||
|
||||
@@ -339,8 +409,83 @@ Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
|
||||
|
||||
</details>
|
||||
|
||||
### By Rego
|
||||
|
||||
## By Vulnerability Target
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
[Rego](https://www.openpolicyagent.org/docs/latest/policy-language/) is a policy language that allows you to express decision logic in a concise syntax.
|
||||
Rego is part of the popular [Open Policy Agent (OPA)](https://www.openpolicyagent.org) CNCF project.
|
||||
For advanced filtering, Trivy allows you to use Rego language to filter vulnerabilities.
|
||||
|
||||
Use the `--ignore-policy` flag which takes a path to a Rego file that defines the filtering policy.
|
||||
The Rego package name must be `trivy` and it must include a "rule" named `ignore` which determines if each individual scan result should be excluded (ignore=true) or not (ignore=false).
|
||||
The `input` for the evaluation is each [DetectedVulnerability](https://github.com/aquasecurity/trivy/blob/00f2059e5d7bc2ca2e3e8b1562bdfede1ed570e3/pkg/types/vulnerability.go#L9) and [DetectedMisconfiguration](https://github.com/aquasecurity/trivy/blob/00f2059e5d7bc2ca2e3e8b1562bdfede1ed570e3/pkg/types/misconfiguration.go#L6).
|
||||
|
||||
A practical way to observe the filtering policy input in your case, is to run a scan with the `--format json` option and look at the resulting structure:
|
||||
|
||||
```bash
|
||||
trivy image -f json centos:7
|
||||
|
||||
...
|
||||
"Results": [
|
||||
{
|
||||
"Target": "centos:7 (centos 7.9.2009)",
|
||||
"Class": "os-pkgs",
|
||||
"Type": "centos",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2015-5186",
|
||||
"PkgID": "audit-libs@2.8.5-4.el7.x86_64",
|
||||
"PkgName": "audit-libs",
|
||||
"InstalledVersion": "2.8.5-4.el7",
|
||||
"Layer": {
|
||||
"Digest": "sha256:2d473b07cdd5f0912cd6f1a703352c82b512407db6b05b43f2553732b55df3bc",
|
||||
"DiffID": "sha256:174f5685490326fc0a1c0f5570b8663732189b327007e47ff13d2ca59673db02"
|
||||
},
|
||||
"SeveritySource": "redhat",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2015-5186",
|
||||
"Title": "log terminal emulator escape sequences handling",
|
||||
"Description": "Audit before 2.4.4 in Linux does not sanitize escape characters in filenames.",
|
||||
"Severity": "MEDIUM",
|
||||
"CweIDs": [
|
||||
"CWE-20"
|
||||
],
|
||||
...
|
||||
```
|
||||
|
||||
Each individual Vulnerability, Misconfiguration, License and Secret (under `Results.Vulnerabilities`, `Results.Misconfigurations`,
|
||||
`Results.Licenses`, `Results.Secrets`) is evaluated for exclusion or inclusion by the `ignore` rule.
|
||||
|
||||
The following is a Rego ignore policy that filters out every vulnerability with a specific CWE ID (as seen in the JSON example above):
|
||||
|
||||
```rego
|
||||
package trivy
|
||||
|
||||
default ignore = false
|
||||
|
||||
ignore {
|
||||
input.CweIDs[_] == "CWE-20"
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
trivy image --ignore-policy contrib/example_policy/basic.rego centos:7
|
||||
```
|
||||
|
||||
For more advanced use cases, there is a built-in Rego library with helper functions that you can import into your policy using: `import data.lib.trivy`.
|
||||
More info about the helper functions are in the library [here](https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/pkg/result/module.go).
|
||||
|
||||
You can find more example policies [here](https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/pkg/result/module.go)
|
||||
|
||||
### By Vulnerability Exploitability Exchange (VEX)
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
@@ -348,171 +493,8 @@ Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
|
||||
| Secret | |
|
||||
| License | |
|
||||
|
||||
Use `--vuln-type` option.
|
||||
Please refer to the [VEX documentation](../supply-chain/vex.md) for the details.
|
||||
|
||||
```bash
|
||||
$ trivy image --vuln-type os ruby:2.4.0
|
||||
```
|
||||
|
||||
Available values:
|
||||
|
||||
- library
|
||||
- os
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```bash
|
||||
2019-05-22T19:36:50.530+0200 [34mINFO[0m Updating vulnerability database...
|
||||
2019-05-22T19:36:51.681+0200 [34mINFO[0m Detecting Alpine vulnerabilities...
|
||||
2019-05-22T19:36:51.685+0200 [34mINFO[0m Updating npm Security DB...
|
||||
2019-05-22T19:36:52.389+0200 [34mINFO[0m Detecting npm vulnerabilities...
|
||||
2019-05-22T19:36:52.390+0200 [34mINFO[0m Updating pipenv Security DB...
|
||||
2019-05-22T19:36:53.406+0200 [34mINFO[0m Detecting pipenv vulnerabilities...
|
||||
|
||||
ruby:2.4.0 (debian 8.7)
|
||||
=======================
|
||||
Total: 7 (UNKNOWN: 0, LOW: 1, MEDIUM: 1, HIGH: 3, CRITICAL: 2)
|
||||
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| curl | CVE-2018-14618 | CRITICAL | 7.61.0-r0 | 7.61.1-r0 | curl: NTLM password overflow |
|
||||
| | | | | | via integer overflow |
|
||||
+ +------------------+----------+ +---------------+----------------------------------+
|
||||
| | CVE-2018-16839 | HIGH | | 7.61.1-r1 | curl: Integer overflow leading |
|
||||
| | | | | | to heap-based buffer overflow in |
|
||||
| | | | | | Curl_sasl_create_plain_message() |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| git | CVE-2018-17456 | HIGH | 2.15.2-r0 | 2.15.3-r0 | git: arbitrary code execution |
|
||||
| | | | | | via .gitmodules |
|
||||
+ +------------------+ + + +----------------------------------+
|
||||
| | CVE-2018-19486 | | | | git: Improper handling of |
|
||||
| | | | | | PATH allows for commands to be |
|
||||
| | | | | | executed from... |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| libssh2 | CVE-2019-3855 | CRITICAL | 1.8.0-r2 | 1.8.1-r0 | libssh2: Integer overflow in |
|
||||
| | | | | | transport read resulting in |
|
||||
| | | | | | out of bounds write... |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| sqlite | CVE-2018-20346 | MEDIUM | 3.21.0-r1 | 3.25.3-r0 | CVE-2018-20505 CVE-2018-20506 |
|
||||
| | | | | | sqlite: Multiple flaws in |
|
||||
| | | | | | sqlite which can be triggered |
|
||||
| | | | | | via... |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| tar | CVE-2018-20482 | LOW | 1.29-r1 | 1.31-r0 | tar: Infinite read loop in |
|
||||
| | | | | | sparse_dump_region function in |
|
||||
| | | | | | sparse.c |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## By Open Policy Agent
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | |
|
||||
| License | |
|
||||
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
Trivy supports Open Policy Agent (OPA) to filter vulnerabilities.
|
||||
You can specify a Rego file with `--ignore-policy` option.
|
||||
|
||||
The Rego package name must be `trivy` and it must include a rule called `ignore` which determines if each individual vulnerability should be excluded (ignore=true) or not (ignore=false). In the policy, each vulnerability will be available for inspection as the `input` variable. The structure of each vulnerability input is the same as for the Trivy JSON output.
|
||||
There is a built-in Rego library with helper functions that you can import into your policy using: `import data.lib.trivy`. For more info about the helper functions, look at the library [here][helper]
|
||||
|
||||
To get started, see the [example policy][policy].
|
||||
|
||||
```bash
|
||||
$ trivy image --ignore-policy contrib/example_policy/basic.rego centos:7
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```bash
|
||||
centos:7 (centos 7.9.2009)
|
||||
==========================
|
||||
Total: 9 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 4, CRITICAL: 5)
|
||||
|
||||
+--------------+------------------+----------+-------------------+-------------------+-----------------------------------------+
|
||||
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
||||
+--------------+------------------+----------+-------------------+-------------------+-----------------------------------------+
|
||||
| glib2 | CVE-2015-8385 | HIGH | 2.56.1-7.el7 | | pcre: buffer overflow caused |
|
||||
| | | | | | by named forward reference |
|
||||
| | | | | | to duplicate group number... |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2015-8385 |
|
||||
+ +------------------+ + +-------------------+-----------------------------------------+
|
||||
| | CVE-2016-3191 | | | | pcre: workspace overflow for |
|
||||
| | | | | | (*ACCEPT) with deeply nested |
|
||||
| | | | | | parentheses (8.39/13, 10.22/12) |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2016-3191 |
|
||||
+ +------------------+ + +-------------------+-----------------------------------------+
|
||||
| | CVE-2021-27219 | | | 2.56.1-9.el7_9 | glib: integer overflow in |
|
||||
| | | | | | g_bytes_new function on |
|
||||
| | | | | | 64-bit platforms due to an... |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2021-27219 |
|
||||
+--------------+------------------+----------+-------------------+-------------------+-----------------------------------------+
|
||||
| glibc | CVE-2019-1010022 | CRITICAL | 2.17-317.el7 | | glibc: stack guard protection bypass |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2019-1010022 |
|
||||
+--------------+ + + +-------------------+ +
|
||||
| glibc-common | | | | | |
|
||||
| | | | | | |
|
||||
+--------------+------------------+ +-------------------+-------------------+-----------------------------------------+
|
||||
| nss | CVE-2021-43527 | | 3.53.1-3.el7_9 | 3.67.0-4.el7_9 | nss: Memory corruption in |
|
||||
| | | | | | decodeECorDsaSignature with |
|
||||
| | | | | | DSA signatures (and RSA-PSS) |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2021-43527 |
|
||||
+--------------+ + + + + +
|
||||
| nss-sysinit | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
+--------------+ + + + + +
|
||||
| nss-tools | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
+--------------+------------------+----------+-------------------+-------------------+-----------------------------------------+
|
||||
| openssl-libs | CVE-2020-1971 | HIGH | 1:1.0.2k-19.el7 | 1:1.0.2k-21.el7_9 | openssl: EDIPARTYNAME |
|
||||
| | | | | | NULL pointer de-reference |
|
||||
| | | | | | -->avd.aquasec.com/nvd/cve-2020-1971 |
|
||||
+--------------+------------------+----------+-------------------+-------------------+-----------------------------------------+
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
[helper]: https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/pkg/result/module.go
|
||||
[policy]: https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/contrib/example_policy
|
||||
|
||||
## By Inline Comments
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | |
|
||||
| License | |
|
||||
|
||||
Some configuration file formats (e.g. Terraform) support inline comments.
|
||||
|
||||
In cases where trivy can detect comments of a specific format immediately adjacent to resource definitions, it is possible to filter/ignore findings from a single point of resource definition (in contrast to `.trivyignore`, which has a directory-wide scope on all of the files scanned).
|
||||
|
||||
The format for these comments is `trivy:ignore:<Vulnerability ID>` immediately following the format-specific line-comment token.
|
||||
|
||||
For example, to filter a Vulnerability ID "AVD-GCP-0051" in a Terraform HCL file:
|
||||
|
||||
```terraform
|
||||
#trivy:ignore:AVD-GCP-0051
|
||||
resource "google_container_cluster" "one_off_test" {
|
||||
name = var.cluster_name
|
||||
location = var.region
|
||||
}
|
||||
```
|
||||
|
||||
[^1]: license name is used as id for `.trivyignore.yaml` files
|
||||
[^1]: license name is used as id for `.trivyignore.yaml` files.
|
||||
[^2]: This doesn't work for os package licenses (e.g. apk, dpkg, rpm). For projects which manage dependencies through a dependency file (e.g. go.mod, yarn.lock) `path` should point to that particular file.
|
||||
|
||||
@@ -63,6 +63,7 @@ The following languages are currently supported:
|
||||
| Go | [go.mod][go-mod] |
|
||||
| PHP | [composer.lock][composer-lock] |
|
||||
| Java | [pom.xml][pom-xml] |
|
||||
| | [*gradle.lockfile][gradle-lockfile] |
|
||||
| Dart | [pubspec.lock][pubspec-lock] |
|
||||
|
||||
This tree is the reverse of the dependency graph.
|
||||
@@ -445,5 +446,6 @@ $ trivy convert --format table --severity CRITICAL result.json
|
||||
[go-mod]: ../coverage/language/golang.md#go-modules
|
||||
[composer-lock]: ../coverage/language/php.md#composer
|
||||
[pom-xml]: ../coverage/language/java.md#pomxml
|
||||
[gradle-lockfile]: ../coverage/language/java.md#gradlelock
|
||||
[pubspec-lock]: ../coverage/language/dart.md#dart
|
||||
[cargo-binaries]: ../coverage/language/rust.md#binaries
|
||||
@@ -11,7 +11,7 @@ The following scanners are supported.
|
||||
Trivy recursively searches directories and scans all found Helm files.
|
||||
|
||||
It evaluates variables, functions, and other elements within Helm templates and resolve the chart to Kubernetes manifests then run the Kubernetes checks.
|
||||
See [here](../../scanner/misconfiguration/policy/builtin.md) for more details on the built-in policies.
|
||||
See [here](../../scanner/misconfiguration/check/builtin.md) for more details on the built-in policies.
|
||||
|
||||
### Value overrides
|
||||
There are a number of options for overriding values in Helm charts.
|
||||
|
||||
@@ -8,14 +8,15 @@ 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, |
|
||||
| [CloudFormation](cloudformation.md) | *.yml, *.yaml, *.json |
|
||||
| [Azure ARM Template](azure-arm.md) | *.json |
|
||||
| [Helm](helm.md) | *.yaml, *.tpl, *.tar.gz, etc. |
|
||||
| Config type | File patterns |
|
||||
|-------------------------------------|-----------------------------------------------|
|
||||
| [Kubernetes](kubernetes.md) | \*.yml, \*.yaml, \*.json |
|
||||
| [Docker](docker.md) | Dockerfile, Containerfile |
|
||||
| [Terraform](terraform.md) | \*.tf, \*.tf.json, \*.tfvars |
|
||||
| [Terraform Plan](terraform.md) | tfplan, \*.tfplan, \*.tfplan.json, \*.tf.json |
|
||||
| [CloudFormation](cloudformation.md) | \*.yml, \*.yaml, \*.json |
|
||||
| [Azure ARM Template](azure-arm.md) | \*.json |
|
||||
| [Helm](helm.md) | \*.yaml, \*.tpl, \*.tar.gz, etc. |
|
||||
|
||||
[misconf]: ../../scanner/misconfiguration/index.md
|
||||
[secret]: ../../scanner/secret.md
|
||||
|
||||
@@ -8,18 +8,23 @@ Trivy supports the scanners listed in the table below.
|
||||
|
||||
It supports the following formats:
|
||||
|
||||
| Format | Supported |
|
||||
|:---------:|:---------:|
|
||||
| JSON | ✓ |
|
||||
| HCL | ✓ |
|
||||
| Plan JSON | ✓ |
|
||||
|
||||
Trivy can scan the results of `terraform plan`.
|
||||
You can scan by passing the file generated as shown below to Trivy:
|
||||
| Format | Supported |
|
||||
|:-------------:|:---------:|
|
||||
| JSON | ✓ |
|
||||
| HCL | ✓ |
|
||||
| Plan Snapshot | ✓ |
|
||||
| Plan JSON | ✓ |
|
||||
|
||||
Trivy can scan Terraform Plan files (snapshots) or their JSON representations. To create a Terraform Plan and scan it, run the following command:
|
||||
```bash
|
||||
terraform plan --out tfplan
|
||||
trivy conf tfplan
|
||||
```
|
||||
$ terraform plan --out tfplan.binary
|
||||
$ terraform show -json tfplan.binary > tfplan.json
|
||||
|
||||
To scan a Terraform Plan representation in JSON format, run the following command:
|
||||
```bash
|
||||
terraform show -json tfplan > tfplan.json
|
||||
trivy conf tfplan.json
|
||||
```
|
||||
|
||||
## Misconfiguration
|
||||
|
||||
@@ -1,23 +1,34 @@
|
||||
# C/C++
|
||||
|
||||
Trivy supports [Conan][conan] C/C++ Package Manager.
|
||||
Trivy supports Conan C/C++ Package Manager ([v1][conanV1] and [v2][conanV2] with limitations).
|
||||
|
||||
The following scanners are supported.
|
||||
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
| --------------- | :---: | :-----------: | :-----: |
|
||||
| Conan | ✓ | ✓ | - |
|
||||
| Package manager | SBOM | Vulnerability | License |
|
||||
|-----------------|:----:|:-------------:|:-------:|
|
||||
| Conan | ✓ | ✓ | ✓[^1] |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
| --------------- | -------------- | :---------------------: | :--------------: | :----------------------------------: | :------: |
|
||||
| Conan | conan.lock[^1] | ✓ | Excluded | ✓ | ✓ |
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|-----------------------|----------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
|
||||
| Conan (lockfile v1) | conan.lock[^2] | ✓ | Excluded | ✓ | ✓ |
|
||||
| Conan (lockfile v2) | conan.lock[^2] | ✓ [^3] | Excluded | - | ✓ |
|
||||
|
||||
## Conan
|
||||
In order to detect dependencies, Trivy searches for `conan.lock`[^1].
|
||||
|
||||
[conan]: https://docs.conan.io/1/index.html
|
||||
[conanV1]: https://docs.conan.io/1/index.html
|
||||
[conanV2]: https://docs.conan.io/2/
|
||||
|
||||
### Licenses
|
||||
The Conan lock file doesn't contain any license information.
|
||||
To obtain licenses we parse the `conanfile.py` files from the [conan cache directory][conan-cache-dir].
|
||||
To correctly detection licenses, ensure that the cache directory contains all dependencies used.
|
||||
|
||||
[conan-cache-dir]: https://docs.conan.io/1/mastering/custom_cache.html
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
[^1]: `conan.lock` is default name. To scan a custom filename use [file-patterns](../../configuration/skipping.md#file-patterns)
|
||||
[^1]: The local cache should contain the dependencies used. See [licenses](#licenses).
|
||||
[^2]: `conan.lock` is default name. To scan a custom filename use [file-patterns](../../configuration/skipping.md#file-patterns).
|
||||
[^3]: For `conan.lock` in version 2, indirect dependencies are included in analysis but not flagged explicitly in dependency tree
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Go
|
||||
|
||||
## Data Sources
|
||||
The data sources are listed [here](../../scanner/vulnerability.md#data-sources-1).
|
||||
Trivy uses Go Vulnerability Database for standard packages, such as `net/http`, and uses GitHub Advisory Database for third-party packages.
|
||||
|
||||
## Features
|
||||
Trivy supports two types of Go scanning, Go Modules and binaries built by Go.
|
||||
|
||||
@@ -12,10 +16,10 @@ The following scanners are supported.
|
||||
|
||||
The table below provides an outline of the features Trivy offers.
|
||||
|
||||
| Artifact | Offline[^1] | Dev dependencies | [Dependency graph][dependency-graph] |
|
||||
|----------|:-----------:|:-----------------|:----------------------------------:|
|
||||
| Modules | ✅ | Include | ✅[^2] |
|
||||
| Binaries | ✅ | Exclude | - |
|
||||
| Artifact | Offline[^1] | Dev dependencies | [Dependency graph][dependency-graph] | Stdlib |
|
||||
|----------|:-----------:|:-----------------|:------------------------------------:|:------:|
|
||||
| Modules | ✅ | Include | ✅[^2] | - |
|
||||
| Binaries | ✅ | Exclude | - | ✅[^4] |
|
||||
|
||||
!!! note
|
||||
Trivy scans only dependencies of the Go project.
|
||||
@@ -68,13 +72,26 @@ If there is a Go binary in your container image, Trivy automatically finds and s
|
||||
Also, you can scan your local binaries.
|
||||
|
||||
```
|
||||
$ trivy fs ./your_binary
|
||||
$ trivy rootfs ./your_binary
|
||||
```
|
||||
|
||||
!!! note
|
||||
It doesn't work with UPX-compressed binaries.
|
||||
|
||||
#### Empty versions
|
||||
There are times when Go uses the `(devel)` version for modules/dependencies.
|
||||
|
||||
- Only Go binaries installed using the `go install` command contain correct (semver) version for the main module.
|
||||
In other cases, Go uses the `(devel)` version[^3].
|
||||
- Dependencies replaced with local ones use the `(devel)` versions.
|
||||
|
||||
In the first case, Trivy will attempt to parse any `-ldflags` as a secondary source, and will leave the version
|
||||
empty if it cannot do so[^5]. For the second case, the version of such packages is empty.
|
||||
|
||||
[^1]: It doesn't require the Internet access.
|
||||
[^2]: Need to download modules to local cache beforehand
|
||||
[^3]: See https://github.com/aquasecurity/trivy/issues/1837#issuecomment-1832523477
|
||||
[^4]: Identify the Go version used to compile the binary and detect its vulnerabilities
|
||||
[^5]: See https://github.com/golang/go/issues/63432#issuecomment-1751610604
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
|
||||
@@ -3,19 +3,19 @@ Trivy supports three types of Java scanning: `JAR/WAR/PAR/EAR`, `pom.xml` and `*
|
||||
|
||||
Each artifact supports the following scanners:
|
||||
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
| ---------------- | :---: | :-----------: | :-----: |
|
||||
| JAR/WAR/PAR/EAR | ✓ | ✓ | - |
|
||||
| pom.xml | ✓ | ✓ | ✓ |
|
||||
| *gradle.lockfile | ✓ | ✓ | - |
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
|------------------|:----:|:-------------:|:-------:|
|
||||
| JAR/WAR/PAR/EAR | ✓ | ✓ | - |
|
||||
| pom.xml | ✓ | ✓ | ✓ |
|
||||
| *gradle.lockfile | ✓ | ✓ | ✓ |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Artifact | Internet access | Dev dependencies | [Dependency graph][dependency-graph] |
|
||||
|------------------|:---------------------:|:----------------:|:------------------------------------:|
|
||||
| JAR/WAR/PAR/EAR | Trivy Java DB | Include | - |
|
||||
| pom.xml | Maven repository [^1] | Exclude | ✓ |
|
||||
| *gradle.lockfile | - | Exclude | - |
|
||||
| Artifact | Internet access | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|
||||
|------------------|:---------------------:|:----------------:|:------------------------------------:|:--------:|
|
||||
| JAR/WAR/PAR/EAR | Trivy Java DB | Include | - | - |
|
||||
| pom.xml | Maven repository [^1] | Exclude | ✓ | ✓[^7] |
|
||||
| *gradle.lockfile | - | Exclude | ✓ | ✓ |
|
||||
|
||||
These may be enabled or disabled depending on the target.
|
||||
See [here](./index.md) for the detail.
|
||||
@@ -42,11 +42,23 @@ Trivy parses your `pom.xml` file and tries to find files with dependencies from
|
||||
- relativePath field[^5]
|
||||
- local repository directory[^6].
|
||||
|
||||
If your machine doesn't have the necessary files - Trivy tries to find the information about these dependencies in the [maven repository](https://repo.maven.apache.org/maven2/).
|
||||
### remote repositories
|
||||
If your machine doesn't have the necessary files - Trivy tries to find the information about these dependencies in the remote repositories:
|
||||
|
||||
- [repositories from pom files][maven-pom-repos]
|
||||
- [maven central repository][maven-central]
|
||||
|
||||
Trivy reproduces Maven's repository selection and priority:
|
||||
|
||||
- for snapshot artifacts:
|
||||
- check only snapshot repositories from pom files (if exists)
|
||||
- for other artifacts:
|
||||
- check release repositories from pom files (if exists)
|
||||
- check [maven central][maven-central]
|
||||
|
||||
!!! Note
|
||||
Trivy only takes information about packages. We don't take a list of vulnerabilities for packages from the `maven repository`.
|
||||
Information about data sources for Java you can see [here](../../scanner/vulnerability.md#data-sources_1).
|
||||
Information about data sources for Java you can see [here](../../scanner/vulnerability.md#data-sources-1).
|
||||
|
||||
You can disable connecting to the maven repository with the `--offline-scan` flag.
|
||||
The `--offline-scan` flag does not affect the Trivy database.
|
||||
@@ -55,17 +67,43 @@ The vulnerability database will be downloaded anyway.
|
||||
!!! Warning
|
||||
Trivy may skip some dependencies (that were not found on your local machine) when the `--offline-scan` flag is passed.
|
||||
|
||||
## Gradle.lock
|
||||
`gradle.lock` files contain all necessary information about used dependencies.
|
||||
Trivy simply parses the file, extract dependencies, and finds vulnerabilities for them.
|
||||
It doesn't require the internet access.
|
||||
|
||||
[^1]: https://github.com/aquasecurity/trivy-java-db
|
||||
### maven-invoker-plugin
|
||||
Typically, the integration tests directory (`**/[src|target]/it/*/pom.xml`) of [maven-invoker-plugin][maven-invoker-plugin] doesn't contain actual `pom.xml` files and should be skipped to avoid noise.
|
||||
|
||||
Trivy marks dependencies from these files as the development dependencies and skip them by default.
|
||||
If you need to show them, use the `--include-dev-deps` flag.
|
||||
|
||||
|
||||
## Gradle.lock
|
||||
`gradle.lock` files only contain information about used dependencies.
|
||||
|
||||
!!!note
|
||||
All necessary files are checked locally. Gradle file scanning doesn't require internet access.
|
||||
|
||||
### Dependency-tree
|
||||
!!! warning "EXPERIMENTAL"
|
||||
This feature might change without preserving backwards compatibility.
|
||||
Trivy finds child dependencies from `*.pom` files in the cache[^8] directory.
|
||||
|
||||
But there is no reliable way to determine direct dependencies (even using other files).
|
||||
Therefore, we mark all dependencies as indirect to use logic to guess direct dependencies and build a dependency tree.
|
||||
|
||||
### Licenses
|
||||
Trity also can detect licenses for dependencies.
|
||||
|
||||
Make sure that you have cache[^8] directory to find licenses from `*.pom` dependency files.
|
||||
|
||||
[^1]: Uses maven repository to get information about dependencies. Internet access required.
|
||||
[^2]: It means `*.jar`, `*.war`, `*.par` and `*.ear` file
|
||||
[^3]: `ArtifactID`, `GroupID` and `Version`
|
||||
[^4]: e.g. when parent pom.xml file has `../pom.xml` path
|
||||
[^5]: When you use dependency path in `relativePath` field in pom.xml file
|
||||
[^6]: `/Users/<username>/.m2/repository` (for Linux and Mac) and `C:/Users/<username>/.m2/repository` (for Windows) by default
|
||||
[^7]: To avoid confusion, Trivy only finds locations for direct dependencies from the base pom.xml file.
|
||||
[^8]: The supported directories are `$GRADLE_USER_HOME/caches` and `$HOME/.gradle/caches` (`%HOMEPATH%\.gradle\caches` for Windows).
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[maven-invoker-plugin]: https://maven.apache.org/plugins/maven-invoker-plugin/usage.html
|
||||
[maven-central]: https://repo.maven.apache.org/maven2/
|
||||
[maven-pom-repos]: https://maven.apache.org/settings.html#repositories
|
||||
@@ -1,14 +1,15 @@
|
||||
# Node.js
|
||||
|
||||
Trivy supports three types of Node.js package managers: `npm`, `Yarn` and `pnpm`.
|
||||
Trivy supports four types of Node.js package managers: `npm`, `Yarn`, `pnpm` and `Bun`[^1].
|
||||
|
||||
The following scanners are supported.
|
||||
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
| -------- | :---: | :-----------: | :-----: |
|
||||
| npm | ✓ | ✓ | ✓ |
|
||||
| Yarn | ✓ | ✓ | ✓ |
|
||||
| pnpm | ✓ | ✓ | - |
|
||||
| Artifact | SBOM | Vulnerability | License |
|
||||
|----------|:----:|:-------------:|:-------:|
|
||||
| npm | ✓ | ✓ | ✓ |
|
||||
| Yarn | ✓ | ✓ | ✓ |
|
||||
| pnpm | ✓ | ✓ | - |
|
||||
| Bun | ✓ | ✓ | ✓ |
|
||||
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
@@ -17,11 +18,12 @@ The following table provides an outline of the features Trivy offers.
|
||||
| npm | package-lock.json | ✓ | [Excluded](#npm) | ✓ | ✓ |
|
||||
| Yarn | yarn.lock | ✓ | [Excluded](#yarn) | ✓ | ✓ |
|
||||
| pnpm | pnpm-lock.yaml | ✓ | Excluded | ✓ | - |
|
||||
| Bun | yarn.lock | ✓ | [Excluded](#yarn) | ✓ | ✓ |
|
||||
|
||||
In addition, Trivy scans installed packages with `package.json`.
|
||||
|
||||
| File | Dependency graph | Position | License |
|
||||
| ------------ | :--------------: | :------: | :-----: |
|
||||
|--------------|:----------------:|:--------:|:-------:|
|
||||
| package.json | - | - | ✅ |
|
||||
|
||||
These may be enabled or disabled depending on the target.
|
||||
@@ -42,7 +44,10 @@ By default, Trivy doesn't report development dependencies. Use the `--include-de
|
||||
|
||||
### Yarn
|
||||
Trivy parses `yarn.lock`, which doesn't contain information about development dependencies.
|
||||
To exclude devDependencies, `package.json` also needs to be present next to `yarn.lock`.
|
||||
Trivy also uses `package.json` file to handle [aliases](https://classic.yarnpkg.com/lang/en/docs/cli/add/#toc-yarn-add-alias).
|
||||
|
||||
To exclude devDependencies and allow aliases, `package.json` also needs to be present next to `yarn.lock`.
|
||||
|
||||
Trivy analyzes `.yarn` (Yarn 2+) or `node_modules` (Yarn Classic) folder next to the yarn.lock file to detect licenses.
|
||||
|
||||
By default, Trivy doesn't report development dependencies. Use the `--include-dev-deps` flag to include them.
|
||||
@@ -50,6 +55,15 @@ By default, Trivy doesn't report development dependencies. Use the `--include-de
|
||||
### pnpm
|
||||
Trivy parses `pnpm-lock.yaml`, then finds production dependencies and builds a [tree][dependency-graph] of dependencies with vulnerabilities.
|
||||
|
||||
!!! note
|
||||
Trivy currently only supports Lockfile [v6][pnpm-lockfile-v6] or earlier.
|
||||
|
||||
### Bun
|
||||
Trivy supports scanning `yarn.lock` files generated by [Bun](https://bun.sh/docs/install/lockfile#how-do-i-inspect-bun-s-lockfile). You can use the command `bun install -y` to generate a Yarn-compatible `yarn.lock`.
|
||||
|
||||
!!! note
|
||||
`bun.lockb` is not supported.
|
||||
|
||||
## Packages
|
||||
Trivy parses the manifest files of installed packages in container image scanning and so on.
|
||||
|
||||
@@ -57,4 +71,7 @@ Trivy parses the manifest files of installed packages in container image scannin
|
||||
Trivy searches for `package.json` files under `node_modules` and identifies installed packages.
|
||||
It only extracts package names, versions and licenses for those packages.
|
||||
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
|
||||
[pnpm-lockfile-v6]: https://github.com/pnpm/spec/blob/fd3238639af86c09b7032cc942bab3438b497036/lockfile/6.0.md
|
||||
|
||||
[^1]: [yarn.lock](#bun) must be generated
|
||||
|
||||
36
docs/docs/coverage/os/conda.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Conda
|
||||
|
||||
Trivy supports the following scanners for Conda packages.
|
||||
|
||||
| Scanner | Supported |
|
||||
|:-------------:|:---------:|
|
||||
| SBOM | ✓ |
|
||||
| Vulnerability | - |
|
||||
| License | ✓[^1] |
|
||||
|
||||
|
||||
## SBOM
|
||||
Trivy detects packages that have been installed with `Conda`.
|
||||
|
||||
|
||||
### `<package>.json`
|
||||
Trivy parses `<conda-root>/envs/<env>/conda-meta/<package>.json` files to find the version and license for the dependencies installed in your env.
|
||||
|
||||
### `environment.yml`[^2]
|
||||
Trivy supports parsing [environment.yml][environment.yml][^2] files to find dependency list.
|
||||
|
||||
!!! note
|
||||
License detection is currently not supported.
|
||||
|
||||
`environment.yml`[^2] files supports [version range][env-version-range]. We can't be sure about versions for these dependencies.
|
||||
Therefore, you need to use `conda env export` command to get dependency list in `Conda` default format before scanning `environment.yml`[^2] file.
|
||||
|
||||
!!! note
|
||||
For dependencies in a non-Conda format, Trivy doesn't include a version of them.
|
||||
|
||||
|
||||
[^1]: License detection is only supported for `<package>.json` files
|
||||
[^2]: Trivy supports both `yaml` and `yml` extensions.
|
||||
|
||||
[environment.yml]: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#sharing-an-environment
|
||||
[env-version-range]: https://docs.conda.io/projects/conda-build/en/latest/resources/package-spec.html#examples-of-package-specs
|
||||
@@ -9,23 +9,24 @@ Trivy supports operating systems for
|
||||
|
||||
## Supported OS
|
||||
|
||||
| OS | Supported Versions | Package Managers |
|
||||
|-----------------------------------------------|-------------------------------------|------------------|
|
||||
| [Alpine Linux](alpine.md) | 2.2 - 2.7, 3.0 - 3.18, edge | apk |
|
||||
| [Wolfi Linux](wolfi.md) | (n/a) | apk |
|
||||
| [Chainguard](chainguard.md) | (n/a) | apk |
|
||||
| [Red Hat Enterprise Linux](rhel.md) | 6, 7, 8 | dnf/yum/rpm |
|
||||
| [CentOS](centos.md)[^1] | 6, 7, 8 | dnf/yum/rpm |
|
||||
| [AlmaLinux](alma.md) | 8, 9 | dnf/yum/rpm |
|
||||
| [Rocky Linux](rocky.md) | 8, 9 | dnf/yum/rpm |
|
||||
| [Oracle Linux](oracle.md) | 5, 6, 7, 8 | dnf/yum/rpm |
|
||||
| [CBL-Mariner](cbl-mariner.md) | 1.0, 2.0 | dnf/yum/rpm |
|
||||
| [Amazon Linux](amazon.md) | 1, 2, 2023 | dnf/yum/rpm |
|
||||
| [openSUSE Leap](suse.md) | 42, 15 | zypper/rpm |
|
||||
| [SUSE Enterprise Linux](suse.md) | 11, 12, 15 | zypper/rpm |
|
||||
| [Photon OS](photon.md) | 1.0, 2.0, 3.0, 4.0 | tndf/yum/rpm |
|
||||
| [Debian GNU/Linux](debian.md) | 7, 8, 9, 10, 11, 12 | apt/dpkg |
|
||||
| [Ubuntu](ubuntu.md) | All versions supported by Canonical | apt/dpkg |
|
||||
| OS | Supported Versions | Package Managers |
|
||||
|--------------------------------------|-------------------------------------|------------------|
|
||||
| [Alpine Linux](alpine.md) | 2.2 - 2.7, 3.0 - 3.19, edge | apk |
|
||||
| [Wolfi Linux](wolfi.md) | (n/a) | apk |
|
||||
| [Chainguard](chainguard.md) | (n/a) | apk |
|
||||
| [Red Hat Enterprise Linux](rhel.md) | 6, 7, 8 | dnf/yum/rpm |
|
||||
| [CentOS](centos.md)[^1] | 6, 7, 8 | dnf/yum/rpm |
|
||||
| [AlmaLinux](alma.md) | 8, 9 | dnf/yum/rpm |
|
||||
| [Rocky Linux](rocky.md) | 8, 9 | dnf/yum/rpm |
|
||||
| [Oracle Linux](oracle.md) | 5, 6, 7, 8 | dnf/yum/rpm |
|
||||
| [CBL-Mariner](cbl-mariner.md) | 1.0, 2.0 | dnf/yum/rpm |
|
||||
| [Amazon Linux](amazon.md) | 1, 2, 2023 | dnf/yum/rpm |
|
||||
| [openSUSE Leap](suse.md) | 42, 15 | zypper/rpm |
|
||||
| [SUSE Enterprise Linux](suse.md) | 11, 12, 15 | zypper/rpm |
|
||||
| [Photon OS](photon.md) | 1.0, 2.0, 3.0, 4.0 | tndf/yum/rpm |
|
||||
| [Debian GNU/Linux](debian.md) | 7, 8, 9, 10, 11, 12 | apt/dpkg |
|
||||
| [Ubuntu](ubuntu.md) | All versions supported by Canonical | apt/dpkg |
|
||||
| [OSs with installed Conda](conda.md) | - | conda |
|
||||
|
||||
## Supported container images
|
||||
|
||||
@@ -42,4 +43,4 @@ Each page gives more details.
|
||||
|
||||
[sbom]: ../../supply-chain/sbom.md
|
||||
[vuln]: ../../scanner/vulnerability.md
|
||||
[license]: ../../scanner/license.md
|
||||
[license]: ../../scanner/license.md
|
||||
|
||||
@@ -53,7 +53,7 @@ trivy [global flags] command [flags] target
|
||||
* [trivy plugin](trivy_plugin.md) - Manage plugins
|
||||
* [trivy repository](trivy_repository.md) - Scan a repository
|
||||
* [trivy rootfs](trivy_rootfs.md) - Scan rootfs
|
||||
* [trivy sbom](trivy_sbom.md) - Scan SBOM for vulnerabilities
|
||||
* [trivy sbom](trivy_sbom.md) - Scan SBOM for vulnerabilities and licenses
|
||||
* [trivy server](trivy_server.md) - Server mode
|
||||
* [trivy version](trivy_version.md) - Print the version
|
||||
* [trivy vm](trivy_vm.md) - [EXPERIMENTAL] Scan a virtual machine image
|
||||
|
||||
@@ -69,13 +69,17 @@ 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
|
||||
--check-namespaces strings Rego namespaces
|
||||
--checks-bundle-repository string OCI registry URL to retrieve checks bundle from (default "ghcr.io/aquasecurity/trivy-checks:0")
|
||||
--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
|
||||
--config-check strings specify the paths to the Rego check files or to the directories containing them, applying config files
|
||||
--config-data strings specify paths from which data for the Rego checks will be recursively loaded
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--endpoint string AWS Endpoint override
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -85,18 +89,16 @@ trivy aws [flags]
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--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])
|
||||
--max-cache-age duration The maximum age of the cloud cache. Cached data will be required 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-json,terraformplan-snapshot])
|
||||
-o, --output string output file name
|
||||
--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")
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--reset-checks-bundle remove checks bundle
|
||||
--service strings Only scan AWS Service(s) specified with this flag. Can specify multiple services using --service A --service B etc.
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
--skip-check-update skip fetching rego check 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 exclude misconfigurations for downloaded terraform modules
|
||||
|
||||
@@ -12,14 +12,18 @@ 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
|
||||
--check-namespaces strings Rego namespaces
|
||||
--checks-bundle-repository string OCI registry URL to retrieve checks bundle from (default "ghcr.io/aquasecurity/trivy-checks:0")
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--config-check strings specify the paths to the Rego check files or to the directories containing them, applying config files
|
||||
--config-data strings specify paths from which data for the Rego checks will be recursively loaded
|
||||
--enable-modules strings [EXPERIMENTAL] module names to enable
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -29,24 +33,22 @@ trivy config [flags] DIR
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--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])
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
-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/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
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--report string specify a compliance report format for the output (all,summary) (default "all")
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--reset-checks-bundle remove checks bundle
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
|
||||
@@ -31,6 +31,7 @@ trivy convert [flags] RESULT_JSON
|
||||
--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])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
-t, --template string output template
|
||||
```
|
||||
|
||||
|
||||
@@ -22,12 +22,14 @@ 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
|
||||
--check-namespaces strings Rego namespaces
|
||||
--checks-bundle-repository string OCI registry URL to retrieve checks bundle from (default "ghcr.io/aquasecurity/trivy-checks:0")
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--config-check strings specify the paths to the Rego check files or to the directories containing them, applying config files
|
||||
--config-data strings specify paths from which data for the Rego checks will be recursively loaded
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db:2")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
@@ -35,6 +37,8 @@ trivy filesystem [flags] PATH
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -47,11 +51,11 @@ trivy filesystem [flags] PATH
|
||||
--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 misconfig'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db:1")
|
||||
--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])
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
@@ -59,8 +63,6 @@ trivy filesystem [flags] PATH
|
||||
--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/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
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
@@ -69,17 +71,18 @@ trivy filesystem [flags] PATH
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--report string specify a compliance report format for the output (all,summary) (default "all")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--reset-checks-bundle remove checks 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,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])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
@@ -87,6 +90,7 @@ trivy filesystem [flags] PATH
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex string [EXPERIMENTAL] file path to VEX
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
|
||||
@@ -36,12 +36,14 @@ trivy image [flags] IMAGE_NAME
|
||||
```
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--check-namespaces strings Rego namespaces
|
||||
--checks-bundle-repository string OCI registry URL to retrieve checks bundle from (default "ghcr.io/aquasecurity/trivy-checks:0")
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate (docker-cis)
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--config-check strings specify the paths to the Rego check files or to the directories containing them, applying config files
|
||||
--config-data strings specify paths from which data for the Rego checks will be recursively loaded
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db:2")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--docker-host string unix domain socket path to use for docker scanning
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
@@ -51,6 +53,8 @@ trivy image [flags] IMAGE_NAME
|
||||
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -65,11 +69,11 @@ trivy image [flags] IMAGE_NAME
|
||||
--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 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")
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db:1")
|
||||
--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])
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
@@ -78,8 +82,7 @@ trivy image [flags] IMAGE_NAME
|
||||
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--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/trivy-policies:0")
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--podman-host string unix podman socket path to use for podman scanning
|
||||
--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
|
||||
@@ -89,23 +92,25 @@ trivy image [flags] IMAGE_NAME
|
||||
--removed-pkgs detect vulnerabilities of removed packages (only for Alpine)
|
||||
--report string specify a format for the compliance report. (all,summary) (default "summary")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--reset-checks-bundle remove checks 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,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])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex string [EXPERIMENTAL] file path to VEX
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
|
||||
@@ -2,49 +2,56 @@
|
||||
|
||||
[EXPERIMENTAL] Scan kubernetes cluster
|
||||
|
||||
### Synopsis
|
||||
|
||||
Default context in kube configuration will be used unless specified
|
||||
|
||||
```
|
||||
trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg: pods, pod/NAME }
|
||||
trivy kubernetes [flags] [CONTEXT]
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
# cluster scanning
|
||||
$ trivy k8s --report summary cluster
|
||||
$ trivy k8s --report summary
|
||||
|
||||
# namespace scanning:
|
||||
$ trivy k8s -n kube-system --report summary all
|
||||
# cluster scanning with specific namespace:
|
||||
$ trivy k8s --include-namespaces kube-system --report summary
|
||||
|
||||
# resources scanning:
|
||||
$ trivy k8s --report=summary deploy
|
||||
$ trivy k8s --namespace=kube-system --report=summary deploy,configmaps
|
||||
|
||||
# resource scanning:
|
||||
$ trivy k8s deployment/orion
|
||||
# cluster with specific context:
|
||||
$ trivy k8s kind-kind --report summary
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-A, --all-namespaces fetch resources from all cluster namespaces
|
||||
--burst int specify the maximum burst for throttle (default 10)
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--check-namespaces strings Rego namespaces
|
||||
--checks-bundle-repository string OCI registry URL to retrieve checks bundle from (default "ghcr.io/aquasecurity/trivy-checks:0")
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate (k8s-nsa,k8s-cis,k8s-pss-baseline,k8s-pss-restricted)
|
||||
--components strings specify which components to scan (workload,infra) (default [workload,infra])
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--context string specify a context to scan
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--config-check strings specify the paths to the Rego check files or to the directories containing them, applying config files
|
||||
--config-data strings specify paths from which data for the Rego checks will be recursively loaded
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db:2")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--disable-node-collector When the flag is activated, the node-collector job will not be executed, thus skipping misconfiguration findings on the node.
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--exclude-kinds strings indicate the kinds exclude from scanning (example: node)
|
||||
--exclude-namespaces strings indicate the namespaces excluded from scanning (example: kube-system)
|
||||
--exclude-nodes strings indicate the node labels that the node-collector job should exclude from scanning (example: kubernetes.io/arch:arm64,team:dev)
|
||||
--exclude-owned exclude resources that have an owner reference
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,cyclonedx) (default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -55,23 +62,23 @@ 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-kinds strings indicate the kinds included in scanning (example: node)
|
||||
--include-namespaces strings indicate the namespaces included in scanning (example: kube-system)
|
||||
--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")
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db:1")
|
||||
--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
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
|
||||
--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-imageref string indicate the image reference for the node-collector scan job (default "ghcr.io/aquasecurity/node-collector:0.2.1")
|
||||
--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
|
||||
--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/trivy-policies:0")
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--qps float specify the maximum QPS to the master from this client (default 5)
|
||||
--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
|
||||
@@ -80,21 +87,24 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--report string specify a report format for the output (all,summary) (default "all")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--reset-checks-bundle remove checks 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,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])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-images skip the downloading and scanning of images (vulnerabilities and secrets) in the cluster resources
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
-t, --template string output template
|
||||
--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.
|
||||
--vex string [EXPERIMENTAL] file path to VEX
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
|
||||
@@ -22,12 +22,14 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--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
|
||||
--check-namespaces strings Rego namespaces
|
||||
--checks-bundle-repository string OCI registry URL to retrieve checks bundle from (default "ghcr.io/aquasecurity/trivy-checks:0")
|
||||
--clear-cache clear image caches without scanning
|
||||
--commit string pass the commit hash to be scanned
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
|
||||
--config-check strings specify the paths to the Rego check files or to the directories containing them, applying config files
|
||||
--config-data strings specify paths from which data for the Rego checks will be recursively loaded
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db:2")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
@@ -35,6 +37,8 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -47,11 +51,11 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--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 misconfig'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db:1")
|
||||
--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])
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
@@ -59,8 +63,6 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--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/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
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
@@ -68,17 +70,18 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--registry-token string registry token
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--reset-checks-bundle remove checks 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,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])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
--tag string pass the tag name to be scanned
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
@@ -87,6 +90,7 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex string [EXPERIMENTAL] file path to VEX
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
|
||||
@@ -25,11 +25,13 @@ 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
|
||||
--check-namespaces strings Rego namespaces
|
||||
--checks-bundle-repository string OCI registry URL to retrieve checks bundle from (default "ghcr.io/aquasecurity/trivy-checks:0")
|
||||
--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
|
||||
--config-check strings specify the paths to the Rego check files or to the directories containing them, applying config files
|
||||
--config-data strings specify paths from which data for the Rego checks will be recursively loaded
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db:2")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
@@ -38,6 +40,8 @@ trivy rootfs [flags] ROOTDIR
|
||||
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -49,11 +53,11 @@ trivy rootfs [flags] ROOTDIR
|
||||
--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 misconfig'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db:1")
|
||||
--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])
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
@@ -61,8 +65,6 @@ trivy rootfs [flags] ROOTDIR
|
||||
--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/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
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
@@ -70,17 +72,18 @@ trivy rootfs [flags] ROOTDIR
|
||||
--registry-token string registry token
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--reset-checks-bundle remove checks 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,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])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-check-update skip fetching rego check updates
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
-t, --template string output template
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
@@ -88,6 +91,7 @@ trivy rootfs [flags] ROOTDIR
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vex string [EXPERIMENTAL] file path to VEX
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## trivy sbom
|
||||
|
||||
Scan SBOM for vulnerabilities
|
||||
Scan SBOM for vulnerabilities and licenses
|
||||
|
||||
```
|
||||
trivy sbom [flags] SBOM_PATH
|
||||
@@ -25,7 +25,7 @@ trivy sbom [flags] SBOM_PATH
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db:2")
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
@@ -36,8 +36,9 @@ trivy sbom [flags] SBOM_PATH
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db:1")
|
||||
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
@@ -50,8 +51,10 @@ trivy sbom [flags] SBOM_PATH
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--reset remove all caches and database
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,license) (default [vuln])
|
||||
--server string server address in client mode
|
||||
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
|
||||
@@ -23,7 +23,7 @@ trivy server [flags]
|
||||
--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")
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db:2")
|
||||
--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
|
||||
|
||||
@@ -23,10 +23,11 @@ trivy vm [flags] VM_IMAGE
|
||||
--aws-region string AWS region to scan
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--checks-bundle-repository string OCI registry URL to retrieve checks bundle from (default "ghcr.io/aquasecurity/trivy-checks:0")
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate
|
||||
--custom-headers strings custom headers in client mode
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db:2")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
@@ -35,6 +36,8 @@ trivy vm [flags] VM_IMAGE
|
||||
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
|
||||
--helm-api-versions strings Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command. (can specify multiple or separate values with commas: policy/v1/PodDisruptionBudget,apps/v1/Deployment)
|
||||
--helm-kube-version string Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
@@ -45,28 +48,28 @@ trivy vm [flags] VM_IMAGE
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--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")
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db:1")
|
||||
--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])
|
||||
--misconfig-scanners strings comma-separated list of misconfig scanners to use for misconfiguration scanning (default [azure-arm,cloudformation,dockerfile,helm,kubernetes,terraform,terraformplan-json,terraformplan-snapshot])
|
||||
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
|
||||
--no-progress suppress progress bar
|
||||
--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)
|
||||
--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
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--reset-checks-bundle remove checks 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,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])
|
||||
--show-suppressed [EXPERIMENTAL] show suppressed vulnerabilities
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories or glob patterns to skip
|
||||
--skip-files strings specify the files or glob patterns to skip
|
||||
@@ -75,6 +78,7 @@ trivy vm [flags] VM_IMAGE
|
||||
--tf-exclude-downloaded-modules exclude misconfigurations for downloaded terraform modules
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--vex string [EXPERIMENTAL] file path to VEX
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
|
||||
@@ -81,6 +81,15 @@ severity:
|
||||
- MEDIUM
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
|
||||
scan:
|
||||
# Same as '--compliance'
|
||||
# Default is empty
|
||||
compliance:
|
||||
|
||||
# Same as '--show-suppressed'
|
||||
# Default is false
|
||||
show-suppressed: false
|
||||
```
|
||||
|
||||
## Scan Options
|
||||
@@ -106,7 +115,7 @@ scan:
|
||||
|
||||
# Same as '--offline-scan'
|
||||
# Default is false
|
||||
offline-scan: false
|
||||
offline: false
|
||||
|
||||
# Same as '--scanners'
|
||||
# Default depends on subcommand
|
||||
@@ -115,6 +124,24 @@ scan:
|
||||
- misconfig
|
||||
- secret
|
||||
- license
|
||||
-
|
||||
# Same as '--parallel'
|
||||
# Default is 5
|
||||
parallel: 1
|
||||
|
||||
# Same as '--sbom-sources'
|
||||
# Default is empty
|
||||
sbom-sources:
|
||||
- oci
|
||||
- rekor
|
||||
|
||||
# Same as '--rekor-url'
|
||||
# Default is 'https://rekor.sigstore.dev'
|
||||
rekor-url: https://rekor.sigstore.dev
|
||||
|
||||
# Same as '--include-dev-deps'
|
||||
# Default is false
|
||||
include-dev-deps: false
|
||||
```
|
||||
|
||||
## Cache Options
|
||||
@@ -131,6 +158,9 @@ cache:
|
||||
|
||||
# Redis options
|
||||
redis:
|
||||
# Same as '--redis-tls'
|
||||
# Default is false
|
||||
tls:
|
||||
# Same as '--redis-ca'
|
||||
# Default is empty
|
||||
ca:
|
||||
@@ -148,21 +178,25 @@ cache:
|
||||
|
||||
```yaml
|
||||
db:
|
||||
# Same as '--no-progress'
|
||||
# Default is false
|
||||
no-progress: false
|
||||
|
||||
# Same as '--skip-db-update'
|
||||
# Default is false
|
||||
skip-update: false
|
||||
|
||||
# Same as '--no-progress'
|
||||
# Default is false
|
||||
no-progress: false
|
||||
|
||||
# Same as '--db-repository'
|
||||
# Default is 'ghcr.io/aquasecurity/trivy-db'
|
||||
repository: ghcr.io/aquasecurity/trivy-db
|
||||
# Default is 'ghcr.io/aquasecurity/trivy-db:2'
|
||||
repository: ghcr.io/aquasecurity/trivy-db:2
|
||||
|
||||
# Same as '--skip-java-db-update'
|
||||
# Default is false
|
||||
java-skip-update: false
|
||||
|
||||
# Same as '--java-db-repository'
|
||||
# Default is 'ghcr.io/aquasecurity/trivy-java-db'
|
||||
java-repository: ghcr.io/aquasecurity/trivy-java-db
|
||||
# Default is 'ghcr.io/aquasecurity/trivy-java-db:1'
|
||||
java-repository: ghcr.io/aquasecurity/trivy-java-db:1
|
||||
```
|
||||
|
||||
## Registry Options
|
||||
@@ -197,12 +231,29 @@ image:
|
||||
|
||||
# Same as '--platform'
|
||||
# Default is empty
|
||||
platform:
|
||||
platform:
|
||||
|
||||
# Same as '--image-src'
|
||||
# Default is 'docker,containerd,podman,remote'
|
||||
source:
|
||||
- podman
|
||||
- docker
|
||||
|
||||
# Same as '--image-config-scanners'
|
||||
# Default is empty
|
||||
image-config-scanners:
|
||||
- misconfig
|
||||
- secret
|
||||
|
||||
docker:
|
||||
# Same as '--docker-host'
|
||||
# Default is empty
|
||||
host:
|
||||
|
||||
podman:
|
||||
# Same as '--podman-host'
|
||||
# Default is empty
|
||||
host:
|
||||
```
|
||||
|
||||
## Vulnerability Options
|
||||
@@ -219,6 +270,67 @@ vulnerability:
|
||||
# Same as '--ignore-unfixed'
|
||||
# Default is false
|
||||
ignore-unfixed: false
|
||||
|
||||
# Same as '--ignore-unfixed'
|
||||
# Default is empty
|
||||
ignore-status:
|
||||
- end_of_life
|
||||
```
|
||||
|
||||
## License Options
|
||||
Available with license scanning
|
||||
|
||||
```yaml
|
||||
license:
|
||||
# Same as '--license-full'
|
||||
# Default is false
|
||||
full: false
|
||||
|
||||
# Same as '--ignored-licenses'
|
||||
# Default is empty
|
||||
ignored:
|
||||
- MPL-2.0
|
||||
- MIT
|
||||
|
||||
# Same as '--license-confidence-level'
|
||||
# Default is 0.9
|
||||
confidenceLevel: 0.9
|
||||
|
||||
# Set list of forbidden licenses
|
||||
# Default is https://github.com/aquasecurity/trivy/blob/164b025413c5fb9c6759491e9a306b46b869be93/pkg/licensing/category.go#L171
|
||||
forbidden:
|
||||
- AGPL-1.0
|
||||
- AGPL-3.0
|
||||
|
||||
# Set list of restricted licenses
|
||||
# Default is https://github.com/aquasecurity/trivy/blob/164b025413c5fb9c6759491e9a306b46b869be93/pkg/licensing/category.go#L199
|
||||
restricted:
|
||||
- AGPL-1.0
|
||||
- AGPL-3.0
|
||||
|
||||
# Set list of reciprocal licenses
|
||||
# Default is https://github.com/aquasecurity/trivy/blob/164b025413c5fb9c6759491e9a306b46b869be93/pkg/licensing/category.go#L238
|
||||
reciprocal:
|
||||
- AGPL-1.0
|
||||
- AGPL-3.0
|
||||
|
||||
# Set list of notice licenses
|
||||
# Default is https://github.com/aquasecurity/trivy/blob/164b025413c5fb9c6759491e9a306b46b869be93/pkg/licensing/category.go#L260
|
||||
notice:
|
||||
- AGPL-1.0
|
||||
- AGPL-3.0
|
||||
|
||||
# Set list of permissive licenses
|
||||
# Default is empty
|
||||
permissive:
|
||||
- AGPL-1.0
|
||||
- AGPL-3.0
|
||||
|
||||
# Set list of unencumbered licenses
|
||||
# Default is https://github.com/aquasecurity/trivy/blob/164b025413c5fb9c6759491e9a306b46b869be93/pkg/licensing/category.go#L334
|
||||
unencumbered:
|
||||
- AGPL-1.0
|
||||
- AGPL-3.0
|
||||
```
|
||||
|
||||
## Secret Options
|
||||
@@ -234,11 +346,15 @@ secret:
|
||||
## Rego Options
|
||||
|
||||
```yaml
|
||||
rego
|
||||
rego:
|
||||
# Same as '--trace'
|
||||
# Default is false
|
||||
trace: false
|
||||
|
||||
# Same as '--skip-policy-update'
|
||||
# Default is false
|
||||
skip-policy-update: false
|
||||
|
||||
# Same as '--config-policy'
|
||||
# Default is empty
|
||||
policy:
|
||||
@@ -266,6 +382,10 @@ misconfiguration:
|
||||
# Same as '--include-non-failures'
|
||||
# Default is false
|
||||
include-non-failures: false
|
||||
|
||||
# Same as '--policy-bundle-repository'
|
||||
# Default is 'ghcr.io/aquasecurity/trivy-checks:0'
|
||||
policy-bundle-repository: ghcr.io/aquasecurity/trivy-checks:0
|
||||
|
||||
# Same as '--miconfig-scanners'
|
||||
# Default is all scanners
|
||||
@@ -274,36 +394,46 @@ misconfiguration:
|
||||
- terraform
|
||||
|
||||
# helm value override configurations
|
||||
# set individual values
|
||||
helm:
|
||||
# set individual values
|
||||
set:
|
||||
- securityContext.runAsUser=10001
|
||||
|
||||
# set values with file
|
||||
helm:
|
||||
# set values with file
|
||||
values:
|
||||
- overrides.yaml
|
||||
|
||||
# set specific values from specific files
|
||||
helm:
|
||||
# set specific values from specific files
|
||||
set-file:
|
||||
- image=dev-overrides.yaml
|
||||
|
||||
# set as string and preserve type
|
||||
helm:
|
||||
# set as string and preserve type
|
||||
set-string:
|
||||
- name=true
|
||||
|
||||
# Available API versions used for Capabilities.APIVersions. This flag is the same as the api-versions flag of the helm template command.
|
||||
api-versions:
|
||||
- policy/v1/PodDisruptionBudget
|
||||
- apps/v1/Deployment
|
||||
|
||||
# Kubernetes version used for Capabilities.KubeVersion. This flag is the same as the kube-version flag of the helm template command.
|
||||
kube-version: "v1.21.0"
|
||||
|
||||
# terraform tfvars overrrides
|
||||
terraform:
|
||||
vars:
|
||||
- dev-terraform.tfvars
|
||||
- common-terraform.tfvars
|
||||
|
||||
# Same as '--tf-exclude-downloaded-modules'
|
||||
# Default is false
|
||||
terraform:
|
||||
# Same as '--tf-exclude-downloaded-modules'
|
||||
# Default is false
|
||||
exclude-downloaded-modules: false
|
||||
|
||||
# Same as '--cf-params'
|
||||
# Default is false
|
||||
cloudformation:
|
||||
params:
|
||||
- params.json
|
||||
```
|
||||
|
||||
## Kubernetes Options
|
||||
@@ -318,6 +448,58 @@ kubernetes:
|
||||
# Same as '--namespace'
|
||||
# Default is empty
|
||||
namespace:
|
||||
|
||||
# Same as '--kubeconfig'
|
||||
# Default is empty
|
||||
kubeconfig: ~/.kube/config2
|
||||
|
||||
# Same as '--components'
|
||||
# Default is 'workload,infra'
|
||||
components:
|
||||
- workload
|
||||
- infra
|
||||
|
||||
# Same as '--k8s-version'
|
||||
# Default is empty
|
||||
k8s-version: 1.21.0
|
||||
|
||||
# Same as '--tolerations'
|
||||
# Default is empty
|
||||
tolerations:
|
||||
- key1=value1:NoExecute
|
||||
- key2=value2:NoSchedule
|
||||
|
||||
# Same as '--all-namespaces'
|
||||
# Default is false
|
||||
all-namespaces: false
|
||||
|
||||
node-collector:
|
||||
# Same as '--node-collector-namespace'
|
||||
# Default is 'trivy-temp'
|
||||
namespace: ~/.kube/config2
|
||||
|
||||
# Same as '--node-collector-imageref'
|
||||
# Default is 'ghcr.io/aquasecurity/node-collector:0.0.9'
|
||||
imageref: ghcr.io/aquasecurity/node-collector:0.0.9
|
||||
|
||||
exclude:
|
||||
# Same as '--exclude-owned'
|
||||
# Default is false
|
||||
owned: true
|
||||
|
||||
# Same as '--exclude-nodes'
|
||||
# Default is empty
|
||||
nodes:
|
||||
- kubernetes.io/arch:arm64
|
||||
- team:dev
|
||||
|
||||
# Same as '--qps'
|
||||
# Default is 5.0
|
||||
qps: 5.0
|
||||
|
||||
# Same as '--burst'
|
||||
# Default is 10
|
||||
burst: 10
|
||||
```
|
||||
|
||||
## Repository Options
|
||||
@@ -388,6 +570,35 @@ cloud:
|
||||
|
||||
# the aws account to use (this will be determined from your environment when not set)
|
||||
account: 123456789012
|
||||
|
||||
# the aws specific services
|
||||
service:
|
||||
- s3
|
||||
- ec2
|
||||
|
||||
# the aws specific arn
|
||||
arn: arn:aws:s3:::example-bucket
|
||||
|
||||
# skip the aws specific services
|
||||
skip-service:
|
||||
- s3
|
||||
- ec2
|
||||
```
|
||||
|
||||
## Module Options
|
||||
Available for modules
|
||||
|
||||
```yaml
|
||||
module:
|
||||
# Same as '--module-dir'
|
||||
# Default is '$HOME/.trivy/modules'
|
||||
dir: $HOME/.trivy/modules
|
||||
|
||||
# Same as '--enable-modules'
|
||||
# Default is empty
|
||||
enable-modules:
|
||||
- trivy-module-spring4shell
|
||||
- trivy-module-wordpress
|
||||
```
|
||||
|
||||
[example]: https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/examples/trivy-conf/trivy.yaml
|
||||
|
||||
@@ -12,6 +12,61 @@
|
||||
|
||||
Your scan may time out. Java takes a particularly long time to scan. Try increasing the value of the ---timeout option such as `--timeout 15m`.
|
||||
|
||||
### Unable to initialize an image scanner
|
||||
|
||||
!!! error
|
||||
```bash
|
||||
$ trivy image ...
|
||||
...
|
||||
2024-01-19T08:15:33.288Z FATAL image scan error: scan error: unable to initialize a scanner: unable to initialize an image scanner: 4 errors occurred:
|
||||
* docker error: unable to inspect the image (ContainerImageName): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
|
||||
* containerd error: containerd socket not found: /run/containerd/containerd.sock
|
||||
* podman error: unable to initialize Podman client: no podman socket found: stat podman/podman.sock: no such file or directory
|
||||
* remote error: GET https://index.docker.io/v2/ContainerImageName: MANIFEST_UNKNOWN: manifest unknown; unknown tag=0.1
|
||||
```
|
||||
|
||||
It means Trivy is unable to find the container image in the following places:
|
||||
|
||||
* Docker Engine
|
||||
* containerd
|
||||
* Podman
|
||||
* A remote registry
|
||||
|
||||
Please see error messages for details of each error.
|
||||
|
||||
Common mistakes include the following, depending on where you are pulling images from:
|
||||
|
||||
#### Common
|
||||
- Typos in the image name
|
||||
- Common mistake :)
|
||||
- Forgetting to specify the registry
|
||||
- By default, it is considered to be Docker Hub ( `index.docker.io` ).
|
||||
|
||||
#### Docker Engine
|
||||
- Incorrect Docker host
|
||||
- If the Docker daemon's socket path is not `/var/run/docker.sock`, you need to specify the `--docker-host` flag or the `DOCKER_HOST` environment variable.
|
||||
The same applies when using TCP; you must specify the correct host address.
|
||||
|
||||
#### containerd
|
||||
- Incorrect containerd address
|
||||
- If you are using a non-default path, you need to specify the `CONTAINERD_ADDRESS` environment variable.
|
||||
Please refer to [this documentation](../target/container_image.md#containerd).
|
||||
- Incorrect namespace
|
||||
- If you are using a non-default namespace, you need to specify the `CONTAINERD_NAMESPACE` environment variable.
|
||||
Please refer to [this documentation](../target/container_image.md#containerd).
|
||||
-
|
||||
#### Podman
|
||||
- Podman socket configuration
|
||||
- You need to enable the Podman socket. Please refer to [this documentation](../target/container_image.md#podman).
|
||||
|
||||
#### Container Registry
|
||||
- Unauthenticated
|
||||
- If you are using a private container registry, you need to authenticate. Please refer to [this documentation](../advanced/private-registries/index.md).
|
||||
- Using a proxy
|
||||
- If you are using a proxy within your network, you need to correctly set the `HTTP_PROXY`, `HTTPS_PROXY`, etc., environment variables.
|
||||
- Use of a self-signed certificate in the registry
|
||||
- Because certificate verification will fail, you need to either trust that certificate or use the `--insecure` flag (not recommended in production).
|
||||
|
||||
### Certification
|
||||
|
||||
!!! error
|
||||
|
||||
@@ -22,18 +22,16 @@ Check out [the coverage document][coverage] for details.
|
||||
To enable extended license scanning, you can use `--license-full`.
|
||||
In addition to package licenses, Trivy scans source code files, Markdown documents, text files and `LICENSE` documents to identify license usage within the image or filesystem.
|
||||
|
||||
By default, Trivy only classifies licenses that are matched with a confidence level of 0.9 or more by the classifer.
|
||||
By default, Trivy only classifies licenses that are matched with a confidence level of 0.9 or more by the classifier.
|
||||
To configure the confidence level, you can use `--license-confidence-level`. This enables us to classify licenses that might be matched with a lower confidence level by the classifer.
|
||||
|
||||
!!! note
|
||||
The full license scanning is expensive. It takes a while.
|
||||
|
||||
Currently, the standard license scanning doesn't support filesystem and repository scanning.
|
||||
|
||||
| License scanning | Image | Rootfs | Filesystem | Repository |
|
||||
| :-------------------: | :---: | :----: | :--------: | :--------: |
|
||||
| Standard | ✅ | ✅ | - | - |
|
||||
| Full (--license-full) | ✅ | ✅ | ✅ | ✅ |
|
||||
| License scanning | Image | Rootfs | Filesystem | Repository | SBOM |
|
||||
|:---------------------:|:-----:|:------:|:----------:|:----------:|:----:|
|
||||
| Standard | ✅ | ✅ | ✅[^1][^2] | ✅[^1][^2] | ✅ |
|
||||
| Full (--license-full) | ✅ | ✅ | ✅ | ✅ | - |
|
||||
|
||||
License checking classifies the identified licenses and map the classification to severity.
|
||||
|
||||
@@ -344,6 +342,8 @@ license:
|
||||
permissive: []
|
||||
```
|
||||
|
||||
[^1]: See the list of supported language files [here](../coverage/language/index.md).
|
||||
[^2]: Some lock files require additional files (e.g. files from the cache directory) to detect licenses. Check [coverage][coverage] for more information.
|
||||
|
||||
[coverage]: ../coverage/index.md
|
||||
[google-license-classification]: https://opensource.google/documentation/reference/thirdparty/licenses
|
||||
|
||||
21
docs/docs/scanner/misconfiguration/check/builtin.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Built-in Checks
|
||||
|
||||
## Check Sources
|
||||
Built-in checks are mainly written in [Rego][rego] and Go.
|
||||
Those checks are managed under [trivy-checks repository][trivy-checks].
|
||||
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 [trivy-checks][trivy-checks] repository.
|
||||
|
||||
## Check Distribution
|
||||
Trivy checks 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 checks are then loaded into Trivy OPA engine and used for detecting misconfigurations.
|
||||
If Trivy is unable to pull down newer checks, it will use the embedded set of checks as a fallback. This is also the case in air-gap environments where `--skip-policy-update` might be passed.
|
||||
|
||||
## Update Interval
|
||||
Trivy checks for updates to OPA bundle on GHCR every 24 hours and pulls it if there are any updates.
|
||||
|
||||
[rego]: https://www.openpolicyagent.org/docs/latest/policy-language/
|
||||
[trivy-checks]: https://github.com/aquasecurity/trivy-checks
|
||||
[ghcr]: https://github.com/aquasecurity/trivy-checks/pkgs/container/trivy-checks
|
||||
@@ -28,8 +28,6 @@ The `exception` rule must be defined under `namespace.exceptions`.
|
||||
|
||||
This example exempts all built-in policies for Kubernetes.
|
||||
|
||||
For more details, see [an example][ns-example].
|
||||
|
||||
## Rule-based exceptions
|
||||
There are some cases where you need more flexibility and granularity in defining which cases to exempt.
|
||||
Rule-based exceptions lets you granularly choose which individual rules to exempt, while also declaring under which conditions to exempt them.
|
||||
@@ -87,12 +85,8 @@ If you want to apply rule-based exceptions to built-in policies, you have to def
|
||||
}
|
||||
```
|
||||
|
||||
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.
|
||||
This exception is applied to [KSV012][ksv012] in trivy-checks.
|
||||
You can get the package names in the [trivy-checks repository][trivy-checks] 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/trivy-policies/blob/main/rules/kubernetes/policies/pss/restricted/3_runs_as_root.rego
|
||||
[trivy-policies]: https://github.com/aquasecurity/trivy-policies/
|
||||
[ksv012]: https://github.com/aquasecurity/trivy-checks/blob/f36a5b732c4b1293a720c40baab0a7c106ea455e/checks/kubernetes/pss/restricted/3_runs_as_root.rego
|
||||
[trivy-checks]: https://github.com/aquasecurity/trivy-checks/
|
||||
@@ -27,7 +27,7 @@ In the above general file formats, Trivy automatically identifies the following
|
||||
- CloudFormation (JSON/YAML)
|
||||
- Kubernetes (JSON/YAML)
|
||||
- Helm (YAML)
|
||||
- Terraform Plan (JSON)
|
||||
- Terraform Plan (JSON/Snapshot)
|
||||
|
||||
This is useful for filtering inputs, as described below.
|
||||
|
||||
@@ -101,9 +101,8 @@ In this case, `user.*` will be evaluated.
|
||||
Any package prefixes such as `main` and `user` are allowed.
|
||||
|
||||
### Metadata
|
||||
Metadata helps enrich Trivy's scan results with useful information.
|
||||
|
||||
The annotation format is described in the [OPA documentation](https://www.openpolicyagent.org/docs/latest/annotations/).
|
||||
The check must contain a [Rego Metadata](https://www.openpolicyagent.org/docs/latest/policy-language/#metadata) section. Trivy uses standard rego metadata to define the new policy and general information about it.
|
||||
|
||||
Trivy supports extra fields in the `custom` section as described below.
|
||||
|
||||
|
||||
@@ -4,8 +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/trivy-iac/blob/main/pkg/rego/schemas/dockerfile.json)
|
||||
Without input schemas, a policy would be as follows:
|
||||
In Trivy we have been able to define a schema for a [Dockerfile](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/dockerfile.json). Without input schemas, a policy would be as follows:
|
||||
|
||||
!!! example
|
||||
```
|
||||
@@ -36,7 +35,7 @@ schema as such
|
||||
```
|
||||
|
||||
Here `input: schema["dockerfile"]` points to a schema that expects a valid `Dockerfile` as input. An example of this
|
||||
can be found [here](https://github.com/aquasecurity/defsec/blob/master/pkg/rego/schemas/dockerfile.json)
|
||||
can be found [here](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/dockerfile.json).
|
||||
|
||||
Now if this policy is evaluated against, a more descriptive error will be available to help fix the problem.
|
||||
|
||||
@@ -50,9 +49,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/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)
|
||||
1. [Docker](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/dockerfile.json)
|
||||
2. [Kubernetes](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/kubernetes.json)
|
||||
3. [Cloud](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/cloud.json)
|
||||
|
||||
|
||||
## Custom Policies with Custom Schemas
|
||||
@@ -89,4 +88,4 @@ To use such a policy with Trivy, use the `--config-policy` flag that points to t
|
||||
$ trivy --config-policy=/Users/user/my-custom-policies <path/to/iac>
|
||||
```
|
||||
|
||||
For more details on how to define schemas within Rego policies, please see the [OPA guide](https://www.openpolicyagent.org/docs/latest/schemas/#schema-annotations) that describes it in more detail.
|
||||
For more details on how to define schemas within Rego policies, please see the [OPA guide](https://www.openpolicyagent.org/docs/latest/policy-language/#schema-annotations) that describes it in more detail.
|
||||
@@ -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 [trivy-policies][trivy-policies].
|
||||
To write tests for custom policies, you can refer to existing tests under [trivy-checks][trivy-checks].
|
||||
|
||||
## 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/trivy-policies/tree/main
|
||||
[defsec]: https://github.com/aquasecurity/trivy-checks/tree/main
|
||||
[table]: https://github.com/golang/go/wiki/TableDrivenTests
|
||||
[fanal]: https://github.com/aquasecurity/fanal
|
||||
@@ -6,7 +6,7 @@ In addition to built-in policies, you can write your own custom policies, as you
|
||||
|
||||
Simply specify a directory containing IaC files such as Terraform, CloudFormation, Azure ARM templates, Helm Charts and Dockerfile.
|
||||
|
||||
``` bash
|
||||
```bash
|
||||
$ trivy config [YOUR_IaC_DIRECTORY]
|
||||
```
|
||||
|
||||
@@ -316,15 +316,17 @@ 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.
|
||||
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
|
||||
### Passing 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.
|
||||
|
||||
@@ -338,7 +340,7 @@ For more details, see [Custom Policies](./custom/index.md).
|
||||
!!! tip
|
||||
You also need to specify `--namespaces` option.
|
||||
|
||||
### Pass custom data
|
||||
### Passing custom data
|
||||
You can pass directories including your custom data through `--data` option.
|
||||
This can be repeated for specifying multiple directories.
|
||||
|
||||
@@ -349,7 +351,7 @@ trivy conf --policy ./policy --data ./data --namespaces user ./configs
|
||||
|
||||
For more details, see [Custom Data](./custom/data.md).
|
||||
|
||||
### Pass namespaces
|
||||
### Passing namespaces
|
||||
By default, Trivy evaluates policies defined in `builtin.*`.
|
||||
If you want to evaluate custom policies in other packages, you have to specify package prefixes through `--namespaces` option.
|
||||
This can be repeated for specifying multiple packages.
|
||||
@@ -358,4 +360,202 @@ This can be repeated for specifying multiple packages.
|
||||
trivy conf --policy ./policy --namespaces main --namespaces user ./configs
|
||||
```
|
||||
|
||||
[custom]: custom/index.md
|
||||
### Private terraform registries
|
||||
Trivy can download terraform code from private registries.
|
||||
To pass credentials you must use the `TF_TOKEN_` environment variables.
|
||||
You cannot use a `.terraformrc` or `terraform.rc` file, these are not supported by trivy yet.
|
||||
|
||||
From the terraform [docs](https://developer.hashicorp.com/terraform/cli/config/config-file#environment-variable-credentials):
|
||||
|
||||
> Environment variable names should have the prefix TF_TOKEN_ added to the domain name, with periods encoded as underscores.
|
||||
> For example, the value of a variable named `TF_TOKEN_app_terraform_io` will be used as a bearer authorization token when the CLI makes service requests to the hostname `app.terraform.io`.
|
||||
>
|
||||
> You must convert domain names containing non-ASCII characters to their punycode equivalent with an ACE prefix.
|
||||
> For example, token credentials for `例えば.com` must be set in a variable called `TF_TOKEN_xn--r8j3dr99h_com`.
|
||||
>
|
||||
> Hyphens are also valid within host names but usually invalid as variable names and may be encoded as double underscores.
|
||||
> For example, you can set a token for the domain name café.fr as TF_TOKEN_xn--caf-dma_fr or TF_TOKEN_xn____caf__dma_fr.
|
||||
|
||||
If multiple variables evaluate to the same hostname, Trivy will choose the environment variable name where the dashes have not been encoded as double underscores.
|
||||
|
||||
|
||||
### Skipping resources by inline comments
|
||||
|
||||
Trivy supports ignoring misconfigured resources by inline comments for Terraform and CloudFormation configuration files only.
|
||||
|
||||
In cases where Trivy can detect comments of a specific format immediately adjacent to resource definitions, it is possible to ignore findings from a single source of resource definition (in contrast to `.trivyignore`, which has a directory-wide scope on all of the files scanned). The format for these comments is `trivy:ignore:<rule>` immediately following the format-specific line-comment [token](https://developer.hashicorp.com/terraform/language/syntax/configuration#comments).
|
||||
|
||||
The ignore rule must contain one of the possible check IDs that can be found in its metadata: ID, short code or alias. The `id` from the metadata is not case-sensitive, so you can specify, for example, `AVD-AWS-0089` or `avd-aws-0089`.
|
||||
|
||||
For example, to ignore a misconfiguration ID `AVD-GCP-0051` in a Terraform HCL file:
|
||||
|
||||
```terraform
|
||||
#trivy:ignore:AVD-GCP-0051
|
||||
resource "google_container_cluster" "example" {
|
||||
name = var.cluster_name
|
||||
location = var.region
|
||||
}
|
||||
```
|
||||
|
||||
You can add multiple ignores on the same comment line:
|
||||
```terraform
|
||||
#trivy:ignore:AVD-GCP-0051 trivy:ignore:AVD-GCP-0053
|
||||
resource "google_container_cluster" "example" {
|
||||
name = var.cluster_name
|
||||
location = var.region
|
||||
}
|
||||
```
|
||||
|
||||
You can also specify a long ID, which is formed as follows: `<provider>-<service>-<short-code>`.
|
||||
|
||||
As an example, consider the following check metadata:
|
||||
|
||||
```yaml
|
||||
# custom:
|
||||
# id: AVD-AWS-0089
|
||||
# avd_id: AVD-AWS-0089
|
||||
# provider: aws
|
||||
# service: s3
|
||||
# severity: LOW
|
||||
# short_code: enable-logging
|
||||
```
|
||||
|
||||
Long ID would look like the following: `aws-s3-enable-logging`.
|
||||
|
||||
Example for CloudFromation:
|
||||
```yaml
|
||||
AWSTemplateFormatVersion: "2010-09-09"
|
||||
Resources:
|
||||
#trivy:ignore:*
|
||||
S3Bucket:
|
||||
Type: 'AWS::S3::Bucket'
|
||||
Properties:
|
||||
BucketName: test-bucket
|
||||
```
|
||||
|
||||
#### Expiration Date
|
||||
|
||||
You can specify the expiration date of the ignore rule in `yyyy-mm-dd` format. This is a useful feature when you want to make sure that an ignored issue is not forgotten and worth revisiting in the future. For example:
|
||||
```tf
|
||||
#trivy:ignore:aws-s3-enable-logging:exp:2024-03-10
|
||||
resource "aws_s3_bucket" "example" {
|
||||
bucket = "test"
|
||||
}
|
||||
```
|
||||
|
||||
The `aws-s3-enable-logging` check will be ignored until `2024-03-10` until the ignore rule expires.
|
||||
|
||||
#### Ignoring by attributes
|
||||
|
||||
You can ignore a resource by its attribute value. This is useful when using the `for-each` meta-argument. For example:
|
||||
|
||||
```tf
|
||||
locals {
|
||||
ports = ["3306", "5432"]
|
||||
}
|
||||
|
||||
#trivy:ignore:aws-ec2-no-public-ingress-sgr[from_port=3306]
|
||||
resource "aws_security_group_rule" "example" {
|
||||
for_each = toset(local.ports)
|
||||
type = "ingress"
|
||||
from_port = each.key
|
||||
to_port = each.key
|
||||
protocol = "TCP"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
security_group_id = aws_security_group.example.id
|
||||
source_security_group_id = aws_security_group.example.id
|
||||
}
|
||||
```
|
||||
|
||||
The `aws-ec2-no-public-ingress-sgr` check will be ignored only for the `aws_security_group_rule` resource with port number `5432`. It is important to note that the ignore rule should not enclose the attribute value in quotes, despite the fact that the port is represented as a string.
|
||||
|
||||
If you want to ignore multiple resources on different attributes, you can specify multiple ignore rules:
|
||||
|
||||
```tf
|
||||
#trivy:ignore:aws-ec2-no-public-ingress-sgr[from_port=3306]
|
||||
#trivy:ignore:aws-ec2-no-public-ingress-sgr[from_port=5432]
|
||||
```
|
||||
|
||||
You can also ignore a resource on multiple attributes:
|
||||
```tf
|
||||
locals {
|
||||
rules = {
|
||||
first = {
|
||||
port = 1000
|
||||
type = "ingress"
|
||||
},
|
||||
second = {
|
||||
port = 1000
|
||||
type = "egress"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#trivy:ignore:aws-ec2-no-public-ingress-sgr[from_port=1000,type=egress]
|
||||
resource "aws_security_group_rule" "example" {
|
||||
for_each = { for k, v in local.rules : k => v }
|
||||
|
||||
type = each.value.type
|
||||
from_port = each.value.port
|
||||
to_port = each.value.port
|
||||
protocol = "TCP"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
security_group_id = aws_security_group.example.id
|
||||
source_security_group_id = aws_security_group.example.id
|
||||
}
|
||||
```
|
||||
|
||||
Checks can also be ignored by nested attributes, but certain restrictions apply:
|
||||
|
||||
- You cannot access an individual block using indexes, for example when working with dynamic blocks.
|
||||
- Special variables like [each](https://developer.hashicorp.com/terraform/language/meta-arguments/for_each#the-each-object) and [count](https://developer.hashicorp.com/terraform/language/meta-arguments/count#the-count-object) cannot be accessed.
|
||||
|
||||
```tf
|
||||
#trivy:ignore:*[logging_config.prefix=myprefix]
|
||||
resource "aws_cloudfront_distribution" "example" {
|
||||
logging_config {
|
||||
include_cookies = false
|
||||
bucket = "mylogs.s3.amazonaws.com"
|
||||
prefix = "myprefix"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Ignoring module issues
|
||||
|
||||
Issues in third-party modules cannot be ignored using the method described above, because you may not have access to modify the module source code. In such a situation you can add ignore rules above the module block, for example:
|
||||
|
||||
```tf
|
||||
#trivy:ignore:aws-s3-enable-logging
|
||||
module "s3_bucket" {
|
||||
source = "terraform-aws-modules/s3-bucket/aws"
|
||||
|
||||
bucket = "my-s3-bucket"
|
||||
}
|
||||
```
|
||||
|
||||
An example of ignoring checks for a specific bucket in a module:
|
||||
```tf
|
||||
locals {
|
||||
bucket = ["test1", "test2"]
|
||||
}
|
||||
|
||||
#trivy:ignore:*[bucket=test1]
|
||||
module "s3_bucket" {
|
||||
for_each = toset(local.bucket)
|
||||
source = "terraform-aws-modules/s3-bucket/aws"
|
||||
bucket = each.value
|
||||
}
|
||||
```
|
||||
|
||||
#### Support for Wildcards
|
||||
|
||||
You can use wildcards in the `ws` (workspace) and `ignore` sections of the ignore rules.
|
||||
|
||||
```tf
|
||||
# trivy:ignore:aws-s3-*:ws:dev-*
|
||||
```
|
||||
|
||||
This example ignores all checks starting with `aws-s3-` for workspaces matching the pattern `dev-*`.
|
||||
|
||||
[custom]: custom/index.md
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# Built-in Policies
|
||||
|
||||
## Policy Sources
|
||||
Built-in policies are mainly written in [Rego][rego] and Go.
|
||||
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 [trivy-policies][trivy-policies] repository.
|
||||
|
||||
## Policy Distribution
|
||||
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.
|
||||
|
||||
## Update Interval
|
||||
Trivy checks for updates to OPA bundle on GHCR every 24 hours and pulls it if there are any updates.
|
||||
|
||||
[rego]: https://www.openpolicyagent.org/docs/latest/policy-language/
|
||||
|
||||
[kubernetes-policies]: https://github.com/aquasecurity/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
|
||||
@@ -91,6 +91,7 @@ See [here](../coverage/language/index.md#supported-languages) for the supported
|
||||
| | [GitHub Advisory Database (npm)][nodejs-ghsa] | ✅ | - |
|
||||
| Java | [GitHub Advisory Database (Maven)][java-ghsa] | ✅ | - |
|
||||
| Go | [GitHub Advisory Database (Go)][go-ghsa] | ✅ | - |
|
||||
| | [Go Vulnerability Database][go-vulndb] | ✅ | - |
|
||||
| Rust | [Open Source Vulnerabilities (crates.io)][rust-osv] | ✅ | - |
|
||||
| .NET | [GitHub Advisory Database (NuGet)][dotnet-ghsa] | ✅ | - |
|
||||
| C/C++ | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
||||
@@ -152,6 +153,76 @@ The default is `ghcr.io/aquasecurity/trivy-java-db`.
|
||||
If authentication is required, you need to run `docker login YOUR_REGISTRY`.
|
||||
Currently, specifying a username and password is not supported.
|
||||
|
||||
## Configuration
|
||||
This section describes vulnerability-specific configuration.
|
||||
Other common options are documented [here](../configuration/index.md).
|
||||
|
||||
### Enabling a subset of package types
|
||||
It's possible to only enable certain package types if you prefer.
|
||||
You can do so by passing the `--vuln-type` option.
|
||||
This flag takes a comma-separated list of package types.
|
||||
|
||||
Available values:
|
||||
|
||||
- os
|
||||
- Scan OS packages managed by the OS package manager (e.g. `dpkg`, `yum`, `apk`).
|
||||
- library
|
||||
- Scan language-specific packages (e.g. packages installed by `pip`, `npm`, or `gem`).
|
||||
|
||||
```bash
|
||||
$ trivy image --vuln-type os ruby:2.4.0
|
||||
```
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```bash
|
||||
2019-05-22T19:36:50.530+0200 [34mINFO[0m Updating vulnerability database...
|
||||
2019-05-22T19:36:51.681+0200 [34mINFO[0m Detecting Alpine vulnerabilities...
|
||||
2019-05-22T19:36:51.685+0200 [34mINFO[0m Updating npm Security DB...
|
||||
2019-05-22T19:36:52.389+0200 [34mINFO[0m Detecting npm vulnerabilities...
|
||||
2019-05-22T19:36:52.390+0200 [34mINFO[0m Updating pipenv Security DB...
|
||||
2019-05-22T19:36:53.406+0200 [34mINFO[0m Detecting pipenv vulnerabilities...
|
||||
|
||||
ruby:2.4.0 (debian 8.7)
|
||||
=======================
|
||||
Total: 7 (UNKNOWN: 0, LOW: 1, MEDIUM: 1, HIGH: 3, CRITICAL: 2)
|
||||
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| curl | CVE-2018-14618 | CRITICAL | 7.61.0-r0 | 7.61.1-r0 | curl: NTLM password overflow |
|
||||
| | | | | | via integer overflow |
|
||||
+ +------------------+----------+ +---------------+----------------------------------+
|
||||
| | CVE-2018-16839 | HIGH | | 7.61.1-r1 | curl: Integer overflow leading |
|
||||
| | | | | | to heap-based buffer overflow in |
|
||||
| | | | | | Curl_sasl_create_plain_message() |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| git | CVE-2018-17456 | HIGH | 2.15.2-r0 | 2.15.3-r0 | git: arbitrary code execution |
|
||||
| | | | | | via .gitmodules |
|
||||
+ +------------------+ + + +----------------------------------+
|
||||
| | CVE-2018-19486 | | | | git: Improper handling of |
|
||||
| | | | | | PATH allows for commands to be |
|
||||
| | | | | | executed from... |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| libssh2 | CVE-2019-3855 | CRITICAL | 1.8.0-r2 | 1.8.1-r0 | libssh2: Integer overflow in |
|
||||
| | | | | | transport read resulting in |
|
||||
| | | | | | out of bounds write... |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| sqlite | CVE-2018-20346 | MEDIUM | 3.21.0-r1 | 3.25.3-r0 | CVE-2018-20505 CVE-2018-20506 |
|
||||
| | | | | | sqlite: Multiple flaws in |
|
||||
| | | | | | sqlite which can be triggered |
|
||||
| | | | | | via... |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
| tar | CVE-2018-20482 | LOW | 1.29-r1 | 1.31-r0 | tar: Infinite read loop in |
|
||||
| | | | | | sparse_dump_region function in |
|
||||
| | | | | | sparse.c |
|
||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
[^1]: https://github.com/GoogleContainerTools/distroless
|
||||
|
||||
[nvd-CVE-2023-0464]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
|
||||
@@ -185,6 +256,7 @@ Currently, specifying a username and password is not supported.
|
||||
[go-ghsa]: https://github.com/advisories?query=ecosystem%3Ago
|
||||
[swift-ghsa]: https://github.com/advisories?query=ecosystem%3Aswift
|
||||
|
||||
[go-vulndb]: https://pkg.go.dev/vuln/
|
||||
[php]: https://github.com/FriendsOfPHP/security-advisories
|
||||
[ruby]: https://github.com/rubysec/ruby-advisory-db
|
||||
[nodejs]: https://github.com/nodejs/security-wg
|
||||
|
||||
@@ -179,13 +179,14 @@ You can use Cosign to sign without keys by authenticating with an OpenID Connect
|
||||
|
||||
```
|
||||
$ trivy image --format cosign-vuln -o vuln.json <IMAGE>
|
||||
$ COSIGN_EXPERIMENTAL=1 cosign attest --type vuln --predicate vuln.json <IMAGE>
|
||||
$ cosign attest --type vuln --predicate vuln.json <IMAGE>
|
||||
```
|
||||
This will provide a certificate in the output section.
|
||||
|
||||
You can verify attestations.
|
||||
You can verify attestations:
|
||||
|
||||
```
|
||||
$ COSIGN_EXPERIMENTAL=1 cosign verify-attestation --type vuln <IMAGE>
|
||||
$ cosign verify-attestation --certificate=path-to-the-certificate --type vuln --certificate-identity Email-used-to-sign --certificate-oidc-issuer='the-issuer-used' <IMAGE>
|
||||
```
|
||||
|
||||
[vuln-attest-spec]: https://github.com/sigstore/cosign/blob/95b74db89941e8ec85e768f639efd4d948db06cd/specs/COSIGN_VULN_ATTESTATION_SPEC.md
|
||||
@@ -217,13 +217,16 @@ $ cat result.json | jq .
|
||||
"version": 1,
|
||||
"metadata": {
|
||||
"timestamp": "2022-02-22T15:11:40.270597Z",
|
||||
"tools": [
|
||||
{
|
||||
"vendor": "aquasecurity",
|
||||
"name": "trivy",
|
||||
"version": "dev"
|
||||
}
|
||||
],
|
||||
"tools": {
|
||||
"components": [
|
||||
{
|
||||
"type": "application",
|
||||
"group": "aquasecurity",
|
||||
"name": "trivy",
|
||||
"version": "dev"
|
||||
}
|
||||
]
|
||||
},
|
||||
"component": {
|
||||
"bom-ref": "pkg:oci/alpine@sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300?repository_url=index.docker.io%2Flibrary%2Falpine&arch=amd64",
|
||||
"type": "container",
|
||||
|
||||
@@ -4,15 +4,25 @@
|
||||
This feature might change without preserving backwards compatibility.
|
||||
|
||||
Trivy supports filtering detected vulnerabilities using [the Vulnerability Exploitability Exchange (VEX)](https://www.ntia.gov/files/ntia/publications/vex_one-page_summary.pdf), a standardized format for sharing and exchanging information about vulnerabilities.
|
||||
By providing VEX alongside the Software Bill of Materials (SBOM) during scanning, it is possible to filter vulnerabilities based on their status.
|
||||
Currently, Trivy supports the following two formats:
|
||||
By providing VEX during scanning, it is possible to filter vulnerabilities based on their status.
|
||||
Currently, Trivy supports the following three formats:
|
||||
|
||||
- [CycloneDX](https://cyclonedx.org/capabilities/vex/)
|
||||
- [OpenVEX](https://github.com/openvex/spec)
|
||||
- [CSAF](https://oasis-open.github.io/csaf-documentation/specification.html)
|
||||
|
||||
This is still an experimental implementation, with only minimal functionality added.
|
||||
|
||||
## CycloneDX
|
||||
| Target | Supported |
|
||||
|:---------------:|:---------:|
|
||||
| Container Image | |
|
||||
| Filesystem | |
|
||||
| Code Repository | |
|
||||
| VM Image | |
|
||||
| Kubernetes | |
|
||||
| SBOM | ✅ |
|
||||
|
||||
There are [two VEX formats](https://cyclonedx.org/capabilities/vex/) for CycloneDX:
|
||||
|
||||
- Independent BOM and VEX BOM
|
||||
@@ -27,7 +37,7 @@ The following steps are required:
|
||||
2. Create a VEX based on the SBOM generated in step 1
|
||||
3. Provide the VEX when scanning the CycloneDX SBOM
|
||||
|
||||
### Generating the SBOM
|
||||
### Generate the SBOM
|
||||
You can generate a CycloneDX SBOM with Trivy as follows:
|
||||
|
||||
```shell
|
||||
@@ -116,23 +126,24 @@ Total: 1 (UNKNOWN: 0, LOW: 1, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
|
||||
CVE-2020-8911 is no longer shown as it is filtered out according to the given CycloneDX VEX document.
|
||||
|
||||
## OpenVEX
|
||||
| Target | Supported |
|
||||
|:---------------:|:---------:|
|
||||
| Container Image | ✅ |
|
||||
| Filesystem | ✅ |
|
||||
| Code Repository | ✅ |
|
||||
| VM Image | ✅ |
|
||||
| Kubernetes | ✅ |
|
||||
| SBOM | ✅ |
|
||||
|
||||
Trivy also supports [OpenVEX][openvex] that is designed to be minimal, compliant, interoperable, and embeddable.
|
||||
Since OpenVEX aims to be SBOM format agnostic, both CycloneDX and SPDX formats are available for use as input SBOMs in Trivy.
|
||||
OpenVEX can be used in all Trivy targets, unlike CycloneDX VEX.
|
||||
|
||||
The following steps are required:
|
||||
|
||||
1. Generate a SBOM (CycloneDX or SPDX)
|
||||
2. Create a VEX based on the SBOM generated in step 1
|
||||
3. Provide the VEX when scanning the SBOM
|
||||
1. Create a VEX document
|
||||
2. Provide the VEX when scanning your target
|
||||
|
||||
### Generating the SBOM
|
||||
You can generate a CycloneDX or SPDX SBOM with Trivy as follows:
|
||||
|
||||
```shell
|
||||
$ trivy image --format spdx-json --output debian11.spdx.json debian:11
|
||||
```
|
||||
|
||||
### Create the VEX
|
||||
### Create the VEX document
|
||||
Please see also [the example](https://github.com/openvex/examples).
|
||||
In Trivy, [the Package URL (PURL)][purl] is used as the product identifier.
|
||||
|
||||
@@ -166,11 +177,11 @@ In the above example, PURLs, located in `packages.externalRefs.referenceLocator`
|
||||
`pkg:deb/debian/curl@7.50.3-1` in OpenVEX matches `pkg:deb/debian/curl@7.50.3-1?arch=i386`,
|
||||
while `pkg:deb/debian/curl@7.50.3-1?arch=amd64` does not match `pkg:deb/debian/curl@7.50.3-1?arch=i386`.
|
||||
|
||||
### Scan SBOM with VEX
|
||||
Provide the VEX when scanning the SBOM.
|
||||
### Scan with VEX
|
||||
Provide the VEX when scanning your target.
|
||||
|
||||
```
|
||||
$ trivy sbom debian11.spdx.json --vex debian11.openvex
|
||||
$ trivy image debian:11 --vex debian11.openvex
|
||||
...
|
||||
2023-04-26T17:56:05.358+0300 INFO Filtered out the detected vulnerability {"VEX format": "OpenVEX", "vulnerability-id": "CVE-2019-8457", "status": "not_affected", "justification": "vulnerable_code_not_in_execute_path"}
|
||||
|
||||
@@ -181,5 +192,187 @@ Total: 80 (UNKNOWN: 0, LOW: 58, MEDIUM: 6, HIGH: 16, CRITICAL: 0)
|
||||
|
||||
CVE-2019-8457 is no longer shown as it is filtered out according to the given OpenVEX document.
|
||||
|
||||
|
||||
## CSAF
|
||||
| Target | Supported |
|
||||
|:---------------:|:---------:|
|
||||
| Container Image | ✅ |
|
||||
| Filesystem | ✅ |
|
||||
| Code Repository | ✅ |
|
||||
| VM Image | ✅ |
|
||||
| Kubernetes | ✅ |
|
||||
| SBOM | ✅ |
|
||||
|
||||
Trivy also supports [CSAF][csaf] format for VEX.
|
||||
Since CSAF aims to be SBOM format agnostic, both CycloneDX and SPDX formats are available for use as input SBOMs in Trivy.
|
||||
|
||||
The following steps are required:
|
||||
|
||||
1. Create a CSAF document
|
||||
2. Provide the CSAF when scanning your target
|
||||
|
||||
|
||||
### Create the CSAF document
|
||||
Create a CSAF document in JSON format as follows:
|
||||
|
||||
```
|
||||
$ cat <<EOF > debian11.vex.csaf
|
||||
{
|
||||
"document": {
|
||||
"category": "csaf_vex",
|
||||
"csaf_version": "2.0",
|
||||
"notes": [
|
||||
{
|
||||
"category": "summary",
|
||||
"text": "Example Company VEX document. Unofficial content for demonstration purposes only.",
|
||||
"title": "Author comment"
|
||||
}
|
||||
],
|
||||
"publisher": {
|
||||
"category": "vendor",
|
||||
"name": "Example Company ProductCERT",
|
||||
"namespace": "https://psirt.example.com"
|
||||
},
|
||||
"title": "AquaSecurity example VEX document",
|
||||
"tracking": {
|
||||
"current_release_date": "2024-01-01T11:00:00.000Z",
|
||||
"generator": {
|
||||
"date": "2024-01-01T11:00:00.000Z",
|
||||
"engine": {
|
||||
"name": "Secvisogram",
|
||||
"version": "1.11.0"
|
||||
}
|
||||
},
|
||||
"id": "2024-EVD-UC-01-A-001",
|
||||
"initial_release_date": "2024-01-01T11:00:00.000Z",
|
||||
"revision_history": [
|
||||
{
|
||||
"date": "2024-01-01T11:00:00.000Z",
|
||||
"number": "1",
|
||||
"summary": "Initial version."
|
||||
}
|
||||
],
|
||||
"status": "final",
|
||||
"version": "1"
|
||||
}
|
||||
},
|
||||
"product_tree": {
|
||||
"branches": [
|
||||
{
|
||||
"branches": [
|
||||
{
|
||||
"branches": [
|
||||
{
|
||||
"category": "product_version",
|
||||
"name": "5.3",
|
||||
"product": {
|
||||
"name": "Database Libraries 5.3",
|
||||
"product_id": "LIBDB-5328",
|
||||
"product_identification_helper": {
|
||||
"purl": "pkg:deb/debian/libdb5.3@5.3.28%2Bdfsg1-0.8?arch=amd64\u0026distro=debian-11.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"category": "product_name",
|
||||
"name": "Database Libraries"
|
||||
}
|
||||
],
|
||||
"category": "vendor",
|
||||
"name": "Debian"
|
||||
}
|
||||
]
|
||||
},
|
||||
"vulnerabilities": [
|
||||
{
|
||||
"cve": "CVE-2019-8457",
|
||||
"notes": [
|
||||
{
|
||||
"category": "description",
|
||||
"text": "SQLite3 from 3.6.0 to and including 3.27.2 is vulnerable to heap out-of-bound read in the rtreenode() function when handling invalid rtree tables.",
|
||||
"title": "CVE description"
|
||||
}
|
||||
],
|
||||
"product_status": {
|
||||
"known_not_affected": [
|
||||
"LIBDB-5328"
|
||||
]
|
||||
},
|
||||
"threats": [
|
||||
{
|
||||
"category": "impact",
|
||||
"details": "Vulnerable code not in execute path.",
|
||||
"product_ids": [
|
||||
"LIBDB-5328"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
### Scan with CSAF VEX
|
||||
Provide the CSAF document when scanning your target.
|
||||
|
||||
```console
|
||||
$ trivy image debian:11 --vex debian11.vex.csaf
|
||||
...
|
||||
2024-01-02T10:28:26.704+0100 INFO Filtered out the detected vulnerability {"VEX format": "CSAF", "vulnerability-id": "CVE-2019-8457", "status": "not_affected"}
|
||||
|
||||
debian11.spdx.json (debian 11.6)
|
||||
================================
|
||||
Total: 80 (UNKNOWN: 0, LOW: 58, MEDIUM: 6, HIGH: 16, CRITICAL: 0)
|
||||
```
|
||||
|
||||
CVE-2019-8457 is no longer shown as it is filtered out according to the given CSAF document.
|
||||
|
||||
## Appendix
|
||||
### PURL matching
|
||||
In the context of VEX, Package URLs (PURLs) are utilized to identify specific software packages and their versions.
|
||||
The PURL matching specification outlines how PURLs are interpreted for vulnerability exception processing, ensuring precise identification and broad coverage of software packages.
|
||||
|
||||
!!! note
|
||||
The following PURL matching rules are not formally defined within the current official PURL specification.
|
||||
Instead, they represent [a community consensus][purl-matching] on how to interpret PURLs.
|
||||
|
||||
Below are the key aspects of the PURL matching rules:
|
||||
|
||||
#### Matching Without Version
|
||||
A PURL without a specified version (e.g., `pkg:maven/com.google.guava/guava`) matches all versions of that package.
|
||||
This rule simplifies the application of vulnerability exceptions to all versions of a package.
|
||||
|
||||
**Example**: `pkg:maven/com.google.guava/guava` matches:
|
||||
|
||||
- All versions of `guava`, such as `com.google.guava:guava:24.1.1`, `com.google.guava:guava:30.0`.
|
||||
|
||||
#### Matching Without Qualifiers
|
||||
A PURL without any qualifiers (e.g., `pkg:maven/com.google.guava/guava@24.1.1`) matches any variation of that package, irrespective of qualifiers.
|
||||
This approach ensures broad matching capabilities, covering all architectural or platform-specific variations of a package version.
|
||||
|
||||
**Example**: `pkg:maven/com.google.guava/guava@24.1.1` matches:
|
||||
|
||||
- `pkg:maven/com.google.guava/guava@24.1.1?classifier=x86`
|
||||
- `pkg:maven/com.google.guava/guava@24.1.1?type=pom`
|
||||
|
||||
#### Matching With Specific Qualifiers
|
||||
A PURL that includes specific qualifiers (e.g., `pkg:maven/com.google.guava/guava@24.1.1?classifier=x86`) matches only those package versions that include the same qualifiers.
|
||||
|
||||
**Example**: `pkg:maven/com.google.guava/guava@24.1.1?classifier=x86` matches:
|
||||
|
||||
- `pkg:maven/com.google.guava/guava@24.1.1?classifier=x86&type=dll`
|
||||
- Extra qualifiers (e.g., `type=dll`) are ignored.
|
||||
|
||||
does not match:
|
||||
|
||||
- `pkg:maven/com.google.guava/guava@24.1.1`
|
||||
- `classifier=x86` is missing.
|
||||
- `pkg:maven/com.google.guava/guava@24.1.1?classifier=sources`
|
||||
- `classifier` must have the same value.
|
||||
|
||||
|
||||
[csaf]: https://oasis-open.github.io/csaf-documentation/specification.html
|
||||
[openvex]: https://github.com/openvex/spec
|
||||
[purl]: https://github.com/package-url/purl-spec
|
||||
[purl]: https://github.com/package-url/purl-spec
|
||||
[purl-matching]: https://github.com/openvex/spec/issues/27
|
||||
|
||||
@@ -107,10 +107,10 @@ The image config is converted into Dockerfile and Trivy handles it as Dockerfile
|
||||
See [here](../scanner/misconfiguration/index.md) for the detail of Dockerfile scanning.
|
||||
|
||||
It is disabled by default.
|
||||
You can enable it with `--image-config-scanners config`.
|
||||
You can enable it with `--image-config-scanners misconfig`.
|
||||
|
||||
```
|
||||
$ trivy image --image-config-scanners config [YOUR_IMAGE_NAME]
|
||||
$ trivy image --image-config-scanners misconfig [YOUR_IMAGE_NAME]
|
||||
```
|
||||
|
||||
<details>
|
||||
@@ -500,3 +500,10 @@ You can configure Docker daemon socket with `DOCKER_HOST` or `--docker-host`.
|
||||
```shell
|
||||
$ trivy image --docker-host tcp://127.0.0.1:2375 YOUR_IMAGE
|
||||
```
|
||||
|
||||
### Configure Podman daemon socket to connect to.
|
||||
You can configure Podman daemon socket with `--podman-host`.
|
||||
|
||||
```shell
|
||||
$ trivy image --podman-host /run/user/1000/podman/podman.sock YOUR_IMAGE
|
||||
```
|
||||
|
||||
@@ -9,7 +9,7 @@ Trivy can also be installed *inside* your cluster as a Kubernetes Operator, and
|
||||
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. 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.
|
||||
@@ -28,60 +28,79 @@ Kubernetes resource definition is scanned for:
|
||||
|
||||
## 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
|
||||
```sh
|
||||
trivy k8s [flags] [CONTEXT] - if the target name [CONTEXT] is not specified, the default will be used.
|
||||
```
|
||||
|
||||
Note that the scope argument must appear last in the command line, after any other flag.
|
||||
for example:
|
||||
|
||||
### Cluster
|
||||
```sh
|
||||
trivy k8s --report summary
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```
|
||||
```sh
|
||||
trivy k8s --kubeconfig ~/.kube/config2
|
||||
```
|
||||
|
||||
### Namespace
|
||||
By default, all cluster resource images will be downloaded and scanned.
|
||||
|
||||
By default Trivy will scan all namespaces (following `kubectl` behavior). To specify a namespace use the `--namespace` flag:
|
||||
### Skip-images
|
||||
|
||||
You can control whether Trivy will scan and download the cluster resource images. To disable this feature, add the --skip-images flag.
|
||||
|
||||
- `--skip-images` flag will prevent the downloading and scanning of images (including vulnerabilities and secrets) in the cluster resources.
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
trivy k8s --report summary --skip-images
|
||||
```
|
||||
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:
|
||||
### Include/Exclude Kinds
|
||||
|
||||
You can control which kinds of resources will be discovered using the `--include-kinds` or `--exclude-kinds` comma-separated flags:
|
||||
|
||||
***Note:*** Both flags (`--include-kinds` or `--exclude-kinds`) cannot be set in conjunction.
|
||||
|
||||
- `--include-kinds` will include the listed kinds in cluster scanning.
|
||||
- `--exclude-kinds` will exclude the listed kinds from cluster scanning.
|
||||
|
||||
By default, all kinds will be included in cluster scanning.
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
trivy k8s --report summary --exclude-kinds node,pod
|
||||
```
|
||||
trivy k8s cluster --report summary --exclude-nodes kubernetes.io/arch:arm6
|
||||
|
||||
### Include/Exclude Namespaces
|
||||
|
||||
You can control which namespaces will be discovered using the `--include-namespaces` or `--exclude-namespaces` comma-separated flags:
|
||||
|
||||
***Note:*** Both flags (`--include-namespaces` or `--exclude-namespaces`) cannot be set in conjunction.
|
||||
|
||||
- `--include-namespaces` will include the listed namespaces in cluster scanning.
|
||||
- `--exclude-namespaces` will exclude the listed namespaces from cluster scanning.
|
||||
|
||||
By default, all namespaces will be included in cluster scanning.
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
trivy k8s --report summary --exclude-namespace dev-system,staging-system
|
||||
```
|
||||
|
||||
## 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 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.
|
||||
|
||||
To read more about KBOM, see the [documentation for Kubernetes scanning](./sbom.md#kbom).
|
||||
|
||||
```
|
||||
trivy k8s cluster --scanners vuln --report all
|
||||
```sh
|
||||
trivy k8s --scanners vuln --report all
|
||||
|
||||
NodeComponents/kind-control-plane (kubernetes)
|
||||
|
||||
@@ -101,13 +120,43 @@ Total: 3 (UNKNOWN: 0, LOW: 1, MEDIUM: 0, HIGH: 2, CRITICAL: 0)
|
||||
└────────────────┴────────────────┴──────────┴────────┴───────────────────┴──────────────────────────────────┴───────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Node-Collector
|
||||
|
||||
### Components types
|
||||
Node-collector is a scan job that collects node configuration parameters and permission information. This information will be evaluated against Kubernetes hardening (e.g. CIS benchmark) and best practices values. The scan results will be output in infrastructure assessment and CIS benchmark compliance reports.
|
||||
|
||||
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.
|
||||
### Disable Node Collector
|
||||
|
||||
You can control whether the node scan-job (`node-collector`) will run in the cluster. To disable it, add the `--disable-node-collector` flag
|
||||
|
||||
- `--disable-node-collector` This flag will exclude findings related to Node (infra assessment) misconfigurations
|
||||
|
||||
By default, the node scan-job (`node-collector`) will run in the cluster.
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
trivy k8s --report summary --disable-node-collector
|
||||
```
|
||||
|
||||
### Taints and Tolerations
|
||||
|
||||
The node-collector scan-job will run on every node. In case the node has been tainted, it is possible to add toleration to the scan job for it to be scheduled on the tainted node. for more details [see k8s docs](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)
|
||||
|
||||
- `--tolerations key1=value1:NoExecute,key2=value2:NoSchedule` this flag wil enable node-collector to be schedule on tainted Node
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
trivy k8s --report summary --tolerations key1=value1:NoExecute,key2=value2:NoSchedule
|
||||
```
|
||||
|
||||
### Exclude Nodes by Label
|
||||
|
||||
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:
|
||||
|
||||
```sh
|
||||
trivy k8s --report summary --exclude-nodes kubernetes.io/arch:arm6
|
||||
```
|
||||
|
||||
## Reporting and filtering
|
||||
|
||||
@@ -117,8 +166,8 @@ You can always choose the report granularity using the `--report summary`/`--rep
|
||||
|
||||
Scan a full cluster and generate a simple summary report:
|
||||
|
||||
```
|
||||
$ trivy k8s --report=summary cluster
|
||||
```sh
|
||||
trivy k8s --report=summary
|
||||
```
|
||||
|
||||

|
||||
@@ -126,15 +175,15 @@ $ trivy k8s --report=summary cluster
|
||||
Filter by severity:
|
||||
|
||||
```
|
||||
trivy k8s --severity=CRITICAL --report=all cluster
|
||||
trivy k8s --severity=CRITICAL --report=all
|
||||
```
|
||||
|
||||
Filter by scanners (Vulnerabilities, Secrets or Misconfigurations):
|
||||
|
||||
```
|
||||
trivy k8s --scanners=secret --report=summary cluster
|
||||
trivy k8s --scanners=secret --report=summary
|
||||
# or
|
||||
trivy k8s --scanners=misconfig --report=summary cluster
|
||||
trivy k8s --scanners=misconfig --report=summary
|
||||
```
|
||||
|
||||
The supported output formats are `table`, which is the default, and `json`.
|
||||
@@ -300,6 +349,7 @@ trivy k8s --format json -o results.json cluster
|
||||
</details>
|
||||
|
||||
## 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).
|
||||
|
||||
@@ -318,7 +368,7 @@ Scan the cluster for Kubernetes Pod Security Standards Baseline compliance:
|
||||
|
||||
```
|
||||
|
||||
$ trivy k8s cluster --compliance=k8s-pss-baseline --report summary
|
||||
trivy k8s --compliance=k8s-pss-baseline --report summary
|
||||
|
||||
```
|
||||
|
||||
@@ -326,7 +376,7 @@ Get the detailed report for checks:
|
||||
|
||||
```
|
||||
|
||||
$ trivy k8s cluster --compliance=k8s-cis --report all
|
||||
trivy k8s --compliance=k8s-cis --report all
|
||||
|
||||
```
|
||||
|
||||
@@ -334,7 +384,7 @@ Get summary report in JSON format:
|
||||
|
||||
```
|
||||
|
||||
$ trivy k8s cluster --compliance=k8s-cis --report summary --format json
|
||||
trivy k8s --compliance=k8s-cis --report summary --format json
|
||||
|
||||
```
|
||||
|
||||
@@ -342,7 +392,7 @@ Get detailed report in JSON format:
|
||||
|
||||
```
|
||||
|
||||
$ trivy k8s cluster --compliance=k8s-cis --report all --format json
|
||||
trivy k8s --compliance=k8s-cis --report all --format json
|
||||
|
||||
```
|
||||
|
||||
@@ -355,7 +405,7 @@ Trivy can generate KBOM in CycloneDX format:
|
||||
|
||||
```sh
|
||||
|
||||
$ trivy k8s cluster --format cyclonedx --output mykbom.cdx.json
|
||||
trivy k8s --format cyclonedx --output mykbom.cdx.json
|
||||
|
||||
```
|
||||
|
||||
@@ -363,7 +413,7 @@ Trivy can also scan that generated KBOM (or any SBOM) for vulnerabilities:
|
||||
|
||||
```sh
|
||||
|
||||
$ trivy sbom mykbom.cdx.json
|
||||
trivy sbom mykbom.cdx.json
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SBOM scanning
|
||||
|
||||
Trivy can take the following SBOM formats as an input and scan for vulnerabilities.
|
||||
Trivy can take the following SBOM formats as an input and scan for vulnerabilities and licenses.
|
||||
|
||||
- CycloneDX
|
||||
- SPDX
|
||||
@@ -17,6 +17,9 @@ $ trivy sbom /path/to/sbom_file
|
||||
|
||||
```
|
||||
|
||||
By default, vulnerability scan in SBOM is executed. You can use `--scanners vuln,license`
|
||||
command property to select also license scan, or `--scanners license` alone.
|
||||
|
||||
!!! note
|
||||
Passing SBOMs generated by tool other than Trivy may result in inaccurate detection
|
||||
because Trivy relies on custom properties in SBOM for accurate scanning.
|
||||
@@ -117,6 +120,11 @@ Total: 2 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 2)
|
||||
|
||||
To read more about KBOM, see the [documentation for Kubernetes scanning](./kubernetes.md#KBOM).
|
||||
|
||||
The supported Kubernetes distributions for core components vulnerability scanning are:
|
||||
|
||||
- [Kubernetes upstream](https://github.com/kubernetes/kubernetes)
|
||||
- [Rancher rke2](https://github.com/rancher/rke2)
|
||||
|
||||
```sh
|
||||
|
||||
$ trivy k8s --format cyclonedx cluster -o kbom.json
|
||||
|
||||
@@ -79,3 +79,11 @@ You can use Trivy Resource in Concourse for scanning containers and introducing
|
||||
It has capabilities to fail the pipeline, create issues, alert communication channels (using respective resources) based on Trivy scan output.
|
||||
|
||||
👉 Get it at: <https://github.com/Comcast/trivy-resource/>
|
||||
|
||||
|
||||
## SecObserve GitHub actions and GitLab templates (Community)
|
||||
[SecObserve GitHub actions and GitLab templates](https://github.com/MaibornWolff/secobserve_actions_templates) run various vulnerability scanners, providing uniform methods and parameters for launching the tools.
|
||||
|
||||
The Trivy integration supports scanning Docker images and local filesystems for vulnerabilities as well as scanning IaC files for misconfigurations.
|
||||
|
||||
👉 Get it at: <https://github.com/MaibornWolff/secobserve_actions_templates>
|
||||
|
||||
32
docs/ecosystem/reporting.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Reporting
|
||||
|
||||
## DefectDojo (Community)
|
||||
DefectDojo can parse Trivy JSON reports. The parser supports deduplication and auto-close features.
|
||||
|
||||
👉 Get it at: <https://github.com/DefectDojo/django-DefectDojo>
|
||||
|
||||
## SecObserve (Community)
|
||||
SecObserve can parse Trivy results as CycloneDX reports and provides an unified overview of vulnerabilities from different sources. Vulnerabilities can be evaluated with manual and rule based assessments.
|
||||
|
||||
👉 Get it at: <https://github.com/MaibornWolff/SecObserve>
|
||||
|
||||
## Scan2html (Community)
|
||||
A Trivy plugin that scans and outputs the results to an interactive html file.
|
||||
|
||||
👉 Get it at: <https://github.com/fatihtokus/scan2html>
|
||||
|
||||
## SonarQube (Community)
|
||||
A Trivy plugin that converts JSON report to SonarQube [generic issues format](https://docs.sonarqube.org/9.6/analyzing-source-code/importing-external-issues/generic-issue-import-format/).
|
||||
|
||||
👉 Get it at: <https://github.com/umax/trivy-plugin-sonarqube>
|
||||
|
||||
## Trivy-Streamlit (Community)
|
||||
Trivy-Streamlit is a Streamlit application that allows you to quickly parse the results from a Trivy JSON report.
|
||||
|
||||
👉 Get it at: <https://github.com/mfreeman451/trivy-streamlit>
|
||||
|
||||
## Trivy-Vulnerability-Explorer (Community)
|
||||
|
||||
This project is a web application that allows to load a Trivy report in json format and displays the vulnerabilities of a single target in an interactive data table.
|
||||
|
||||
👉 Get it at: <https://github.com/dbsystel/trivy-vulnerability-explorer>
|
||||
@@ -1,11 +0,0 @@
|
||||
# Security Management
|
||||
|
||||
## SonarQube (Community)
|
||||
A Trivy plugin that converts JSON report to SonarQube [generic issues format](https://docs.sonarqube.org/9.6/analyzing-source-code/importing-external-issues/generic-issue-import-format/).
|
||||
|
||||
👉 Get it at: <https://github.com/umax/trivy-plugin-sonarqube>
|
||||
|
||||
## DefectDojo (Community)
|
||||
DefectDojo can parse Trivy JSON reports. The parser supports deduplication and auto-close features.
|
||||
|
||||
👉 Get it at: <https://github.com/DefectDojo/django-DefectDojo>
|
||||
@@ -10,11 +10,10 @@ In this section you will find an aggregation of the different ways to install Tr
|
||||
Add repository setting to `/etc/yum.repos.d`.
|
||||
|
||||
``` bash
|
||||
RELEASE_VERSION=$(grep -Po '(?<=VERSION_ID=")[0-9]' /etc/os-release)
|
||||
cat << EOF | sudo tee -a /etc/yum.repos.d/trivy.repo
|
||||
[trivy]
|
||||
name=Trivy repository
|
||||
baseurl=https://aquasecurity.github.io/trivy-repo/rpm/releases/$RELEASE_VERSION/\$basearch/
|
||||
baseurl=https://aquasecurity.github.io/trivy-repo/rpm/releases/\$basearch/
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
gpgkey=https://aquasecurity.github.io/trivy-repo/rpm/public.key
|
||||
@@ -35,9 +34,9 @@ In this section you will find an aggregation of the different ways to install Tr
|
||||
Add repository setting to `/etc/apt/sources.list.d`.
|
||||
|
||||
``` bash
|
||||
sudo apt-get install wget apt-transport-https gnupg lsb-release
|
||||
sudo apt-get install wget apt-transport-https gnupg
|
||||
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --dearmor | sudo tee /usr/share/keyrings/trivy.gpg > /dev/null
|
||||
echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list
|
||||
echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb generic main" | sudo tee -a /etc/apt/sources.list.d/trivy.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install trivy
|
||||
```
|
||||
@@ -86,31 +85,79 @@ References:
|
||||
Nix package manager for Linux and MacOS.
|
||||
|
||||
=== "Command line"
|
||||
|
||||
`nix-env --install -A nixpkgs.trivy`
|
||||
`nix-env --install -A nixpkgs.trivy`
|
||||
|
||||
=== "Configuration"
|
||||
|
||||
```nix
|
||||
# your other config ...
|
||||
environment.systemPackages = with pkgs; [
|
||||
# your other packages ...
|
||||
trivy
|
||||
];
|
||||
```
|
||||
```nix
|
||||
# your other config ...
|
||||
environment.systemPackages = with pkgs; [
|
||||
# your other packages ...
|
||||
trivy
|
||||
];
|
||||
```
|
||||
|
||||
=== "Home Manager"
|
||||
|
||||
```nix
|
||||
# your other config ...
|
||||
home.packages = with pkgs; [
|
||||
# your other packages ...
|
||||
trivy
|
||||
];
|
||||
```
|
||||
```nix
|
||||
# your other config ...
|
||||
home.packages = with pkgs; [
|
||||
# your other packages ...
|
||||
trivy
|
||||
];
|
||||
```
|
||||
|
||||
References:
|
||||
- <https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/admin/trivy/default.nix>
|
||||
|
||||
- https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/admin/trivy/default.nix
|
||||
|
||||
### FreeBSD (Official)
|
||||
|
||||
[Pkg](https://freebsd.org) for FreeBSD.
|
||||
|
||||
```bash
|
||||
pkg install trivy
|
||||
```
|
||||
|
||||
### asdf/mise (Community)
|
||||
|
||||
[asdf](https://github.com/asdf-vm/asdf) and [mise](https://github.com/jdx/mise) are quite similar tools you can use to install trivy.
|
||||
See their respective documentation for more information of how to install them and use them:
|
||||
|
||||
- [asdf](https://asdf-vm.com/guide/getting-started.html)
|
||||
- [mise](https://mise.jdx.dev/getting-started.html)
|
||||
|
||||
The plugin used by both tools is developped [here](https://github.com/zufardhiyaulhaq/asdf-trivy)
|
||||
|
||||
|
||||
=== "asdf"
|
||||
A basic global installation is shown below, for specific version or/and local version to a directory see "asdf" documentation.
|
||||
|
||||
```shell
|
||||
# Install plugin
|
||||
asdf plugin add trivy https://github.com/zufardhiyaulhaq/asdf-trivy.git
|
||||
|
||||
# Install latest version
|
||||
asdf install trivy latest
|
||||
|
||||
# Set a version globally (on your ~/.tool-versions file)
|
||||
asdf global trivy latest
|
||||
|
||||
# Now trivy commands are available
|
||||
trivy --version
|
||||
```
|
||||
|
||||
=== "mise"
|
||||
A basic global installation is shown below, for specific version or/and local version to a directory see "mise" documentation.
|
||||
|
||||
``` shell
|
||||
# Install plugin and install latest version
|
||||
mise install trivy@latest
|
||||
|
||||
# Set a version globally (on your ~/.tool-versions file)
|
||||
mise use -g trivy@latest
|
||||
|
||||
# Now trivy commands are available
|
||||
trivy --version
|
||||
```
|
||||
|
||||
## Install from GitHub Release (Official)
|
||||
|
||||
|
||||
@@ -1,32 +1,85 @@
|
||||
<svg width="265" height="135" viewBox="0 0 265 135" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M148.629 103.077V109.005C144.591 109.005 140.953 107.551 138.084 105.142C134.479 102.117 132.19 97.5774 132.19 92.5044V62.8164H138.084V76.2874H148.629V82.2534H138.084V92.6484C138.164 98.4204 142.84 103.077 148.629 103.077Z" fill="#07242D"/>
|
||||
<path d="M169.65 76.2852V82.1742C164.059 82.1852 159.507 86.6201 159.305 92.1581V109.003H153.397V76.2852H159.305V80.0201C162.113 77.6891 165.718 76.2912 169.65 76.2852Z" fill="#07242D"/>
|
||||
<path d="M173.447 68.6988V62.7988H179.344V68.6988H173.447ZM173.447 109.004V76.2858H179.344V109.005H173.447V109.004Z" fill="#07242D"/>
|
||||
<path d="M215.508 76.2852L199.16 109.004L182.796 76.2852H189.495L199.16 95.6052L208.806 76.2852H215.508Z" fill="#07242D"/>
|
||||
<path d="M250.874 76.2852C250.874 76.2852 250.874 112.056 250.874 114.42C250.874 123.556 243.381 130.848 234.504 130.843C230.347 130.843 226.495 129.267 223.57 126.647L227.81 122.407C229.619 123.939 231.953 124.871 234.503 124.866C240.248 124.866 244.899 120.17 244.899 114.42V105.279C242.049 107.638 238.411 109.003 234.503 109.003C225.609 109.008 218.119 101.832 218.119 92.6311C218.119 92.4371 218.119 76.2862 218.119 76.2862H224.091C224.091 76.2862 224.094 92.1931 224.094 92.6311C224.094 98.3531 228.753 103.082 234.503 103.077C240.248 103.077 244.899 98.3761 244.899 92.6311V76.2852H250.874Z" fill="#07242D"/>
|
||||
<path d="M166.114 59.3782H169.243V39.9432C169.253 39.7722 169.243 39.5992 169.243 39.4262C169.243 34.6752 165.402 30.8242 160.651 30.8242C155.9 30.8242 152.049 34.6752 152.049 39.4262C152.049 44.1772 155.9 48.0282 160.651 48.0282H161.086L164.25 44.8782H160.89H160.651C157.64 44.8782 155.2 42.4372 155.2 39.4272C155.2 36.4172 157.641 33.9762 160.651 33.9762C163.662 33.9762 166.114 36.4172 166.114 39.4272V59.3782Z" fill="#07242D"/>
|
||||
<path d="M185.899 30.8242V39.5332C185.899 42.5742 183.434 45.0512 180.394 45.0512C177.353 45.0512 174.886 42.5742 174.886 39.5332V30.8242H171.837V39.5332C171.837 39.5332 171.837 39.5332 171.837 39.5402C171.837 44.2692 175.665 48.1082 180.394 48.1082C185.123 48.1082 188.955 44.2812 188.955 39.5522C188.955 39.5462 188.955 39.5332 188.955 39.5332V30.8242H185.899Z" fill="#07242D"/>
|
||||
<path d="M148.941 36.5135C145.536 27.5195 132.339 29.7035 132.139 39.4525C132.144 41.5465 132.863 43.4245 134.118 44.9545C135.59 46.7415 137.764 47.9275 140.219 48.0885C140.408 48.1005 140.598 48.1075 140.789 48.1075H149.454C149.454 48.1075 149.454 39.4515 149.454 39.4525C149.454 38.4535 149.281 37.4515 148.941 36.5135ZM146.252 44.9475C146.252 44.9475 142.315 44.9475 140.797 44.9475C137.769 44.9475 135.315 42.4795 135.315 39.4515C135.315 37.9345 135.932 36.5745 136.928 35.5815L136.929 35.5825C140.315 32.1515 146.274 34.5585 146.253 39.4515C146.252 40.9695 146.252 44.9475 146.252 44.9475Z" fill="#07242D"/>
|
||||
<path d="M208.351 36.5135C204.946 27.5195 191.749 29.7035 191.549 39.4525C191.554 41.5465 192.273 43.4245 193.528 44.9545C195 46.7415 197.174 47.9275 199.629 48.0885C199.818 48.1005 200.008 48.1075 200.199 48.1075H208.864C208.864 48.1075 208.864 39.4515 208.864 39.4525C208.863 38.4535 208.69 37.4515 208.351 36.5135ZM205.661 44.9475C205.661 44.9475 201.724 44.9475 200.206 44.9475C197.178 44.9475 194.724 42.4795 194.724 39.4515C194.724 37.9345 195.341 36.5745 196.337 35.5815L196.338 35.5825C199.724 32.1515 205.683 34.5585 205.662 39.4515C205.661 40.9695 205.661 44.9475 205.661 44.9475Z" fill="#07242D"/>
|
||||
<path d="M65.469 5.43164L10.124 37.4096L10.125 101.878L65.462 134.11L120.813 101.896V37.4076L65.469 5.43164Z" fill="white"/>
|
||||
<path d="M64.4641 79.2511C58.2051 76.4341 54.5051 70.4121 54.7021 64.0161L41.3221 56.2891C40.3241 63.6921 41.9181 71.4341 45.9341 78.1431C50.2081 85.2841 56.3811 90.6031 64.4651 93.6831V79.2511H64.4641Z" fill="#1904DA"/>
|
||||
<path d="M64.9709 94.4207L64.2839 94.1587C56.2419 91.0947 49.9219 85.7947 45.4989 78.4057C41.4619 71.6607 39.7999 63.7827 40.8199 56.2227L40.9209 55.4727L55.2169 63.7287L55.2079 64.0327C55.0139 70.3227 58.7289 76.1157 64.6709 78.7887L64.9699 78.9237V94.4207H64.9709ZM41.7329 57.1127C40.9499 64.2137 42.5849 71.5597 46.3689 77.8837C50.5449 84.8607 56.4599 89.9237 63.9569 92.9407V79.5767C57.9089 76.7207 54.1109 70.7847 54.1889 64.3067L41.7329 57.1127Z" fill="white"/>
|
||||
<path d="M64.4641 111.978V95.3902C55.8061 92.2282 49.1731 86.5352 44.6211 78.9302C40.3151 71.7362 38.6771 63.3972 39.8971 55.4672L27.4611 48.2852C20.3371 74.2882 36.3221 101.982 64.4641 111.978Z" fill="#1904DA"/>
|
||||
<path d="M64.9709 112.696L64.2949 112.456C50.5849 107.586 39.2219 98.3286 32.2989 86.3876C25.3779 74.4516 23.4859 60.8726 26.9719 48.1506L27.1459 47.5176L40.4509 55.2006L40.3989 55.5436C39.1879 63.4146 40.8429 71.6266 45.0569 78.6686C49.6779 86.3896 56.2659 91.8556 64.6389 94.9126L64.9719 95.0346V112.696H64.9709ZM27.7809 49.0556C21.1389 74.6526 36.5699 101.188 63.9569 111.256V95.7426C55.5189 92.5806 48.8679 87.0126 44.1869 79.1896C39.9119 72.0486 38.1979 63.7316 39.3449 55.7326L27.7809 49.0556Z" fill="white"/>
|
||||
<path d="M66.2969 95.24V111.979C93.9189 101.751 110.5 74.105 103.496 48.373L91.1269 55.579C92.6709 64.132 91.3249 72.47 87.1869 79.446C82.9369 86.613 75.5139 91.992 66.2969 95.24Z" fill="#08B1D5"/>
|
||||
<path d="M65.79 112.708V94.8806L66.129 94.7616C75.546 91.4436 82.676 86.0576 86.753 79.1876C90.825 72.3196 92.166 64.1876 90.629 55.6696L90.566 55.3196L103.812 47.6016L103.985 48.2396C110.962 73.8746 94.485 102.082 66.473 112.455L65.79 112.708ZM66.804 95.5976V111.247C93.681 100.941 109.519 73.8986 103.176 49.1466L91.688 55.8396C93.17 64.4746 91.767 72.7186 87.623 79.7046C83.476 86.6986 76.281 92.1896 66.804 95.5976Z" fill="white"/>
|
||||
<path d="M76.3809 64.0884C76.4369 70.2984 72.7869 75.7614 66.2969 79.2514V93.6844C74.9209 90.5404 81.8869 85.3844 85.8719 78.6654C89.7309 72.1594 91.0429 64.3964 89.7199 56.3984L76.3809 64.0884Z" fill="#08B1D5"/>
|
||||
<path d="M65.79 94.4097V78.9487L66.057 78.8048C72.348 75.4208 75.926 70.0588 75.873 64.0928L75.87 63.7967L90.101 55.5938L90.22 56.3158C91.575 64.5068 90.223 72.3247 86.308 78.9237C82.345 85.6057 75.486 90.8747 66.47 94.1607L65.79 94.4097ZM66.804 79.5528V92.9548C75.26 89.7358 81.694 84.7157 85.436 78.4067C89.111 72.2097 90.452 64.8948 89.332 57.2068L76.888 64.3817C76.826 70.5317 73.171 76.0338 66.804 79.5528Z" fill="white"/>
|
||||
<path d="M78.3069 41.8987C83.5239 44.4427 87.7739 48.5187 90.5959 53.6847C90.6329 53.7527 90.6679 53.8237 90.7049 53.8917L102.837 46.8857C102.644 46.6427 102.459 46.3967 102.306 46.1507C97.8549 38.9517 91.9759 33.5347 84.8299 30.0497C64.6569 20.2117 39.9379 27.6297 28.1289 46.9117L40.2319 53.8977C48.4489 40.6847 64.9909 35.4047 78.3069 41.8987Z" fill="#FFC900"/>
|
||||
<path d="M90.5038 54.5924L90.1508 53.9304C87.3788 48.8534 83.2058 44.8524 78.0848 42.3534C65.1428 36.0424 48.7038 41.2304 40.6608 54.1654L40.4018 54.5814L27.4238 47.0914L27.6948 46.6474C39.6018 27.2064 64.7978 19.7184 85.0508 29.5944C92.2848 33.1224 98.2348 38.6034 102.736 45.8844C102.879 46.1134 103.053 46.3434 103.233 46.5704L103.598 47.0314L90.5038 54.5924ZM28.8358 46.7354L40.0628 53.2164C48.4698 40.1524 65.2678 34.9764 78.5298 41.4434C83.7578 43.9924 88.0308 48.0514 90.9028 53.1924L102.087 46.7344C102.012 46.6294 101.941 46.5234 101.876 46.4184C97.4758 39.3024 91.6668 33.9484 84.6088 30.5054C64.9668 20.9294 40.5818 28.0644 28.8358 46.7354Z" fill="white"/>
|
||||
<path d="M70.7312 57.2939C72.8912 58.3469 74.6422 60.0479 75.7962 62.2119C75.8352 62.2849 75.8692 62.3619 75.9062 62.4359L89.3792 54.6559C89.3372 54.5769 89.2962 54.4949 89.2532 54.4169C86.5842 49.5309 82.5672 45.6759 77.6362 43.2719C65.0392 37.1279 49.3712 42.1399 41.5562 54.6619L54.9562 62.3959C58.4482 56.7959 65.2052 54.5999 70.7312 57.2939Z" fill="#FFC900"/>
|
||||
<path d="M75.6891 63.1474L75.3461 62.4474C74.2461 60.3824 72.5721 58.7574 70.5081 57.7504H70.5091C65.2351 55.1804 58.7351 57.2924 55.3861 62.6654L55.1281 63.0814L40.8491 54.8394L41.1271 54.3944C49.1731 41.5044 64.9661 36.5264 77.8601 42.8174C82.8851 45.2674 86.9801 49.1954 89.6991 54.1744L90.0601 54.8494L75.6891 63.1474ZM65.7711 55.6464C67.5331 55.6464 69.2981 56.0314 70.9531 56.8394H70.9541C73.1291 57.9014 74.9081 59.5894 76.1121 61.7334L88.7001 54.4634C86.0821 49.7634 82.1841 46.0544 77.4151 43.7284C65.3371 37.8404 50.0061 42.5684 42.2681 54.4884L54.7921 61.7174C57.3971 57.8364 61.5721 55.6464 65.7711 55.6464Z" fill="white"/>
|
||||
<path d="M119.14 39.2578L104.862 47.5758C112.393 74.3508 95.1229 103.21 66.2979 113.604V131.732L119.14 100.935V39.2578Z" fill="#08B1D5"/>
|
||||
<path d="M65.79 132.614V113.248L66.125 113.127C94.965 102.727 111.766 73.994 104.374 47.713L104.268 47.335L119.647 38.375V101.225L119.395 101.372L65.79 132.614ZM66.804 113.959V130.849L118.632 100.644V40.141L105.455 47.818C112.697 74.404 95.801 103.331 66.804 113.959Z" fill="white"/>
|
||||
<path d="M11.7979 39.2402V100.918L64.4648 131.731V113.603C35.1148 103.455 18.4449 74.5442 26.0949 47.4952L12.4679 39.6262L11.7979 39.2402Z" fill="#1904DA"/>
|
||||
<path d="M64.971 132.614L11.29 101.208V38.3613L26.69 47.2533L26.583 47.6333C19.022 74.3663 35.735 103.133 64.63 113.124L64.972 113.242V132.614H64.971ZM12.304 100.626L63.957 130.846V113.963C34.902 103.736 18.087 74.7733 25.5 47.7383L12.304 40.1173V100.626Z" fill="white"/>
|
||||
<path d="M12.5542 37.9232L14.1102 38.8222L26.8032 46.1482C39.0142 26.1752 64.6102 18.4892 85.5002 28.6762C92.9102 32.2902 99.0022 37.8992 103.607 45.3472C103.753 45.5832 103.956 45.8412 104.177 46.1132L118.372 37.9162L65.4692 7.36523L12.5542 37.9232Z" fill="#FFC900"/>
|
||||
<path d="M26.977 46.8333L11.541 37.9223L65.469 6.7793L65.723 6.9253L119.386 37.9153L104.056 46.7673L103.784 46.4323C103.547 46.1413 103.331 45.8643 103.176 45.6123C98.622 38.2473 92.601 32.7023 85.279 29.1303C64.768 19.1303 39.274 26.7213 27.236 46.4113L26.977 46.8333ZM13.569 37.9223L26.63 45.4623C39.042 25.6453 64.896 18.0633 85.722 28.2193C93.22 31.8763 99.382 37.5483 104.038 45.0783C104.112 45.1983 104.202 45.3233 104.301 45.4543L117.357 37.9153L65.469 7.9493L13.569 37.9223Z" fill="white"/>
|
||||
<path d="M66.2373 77.5717C71.4443 74.6597 74.5703 69.9977 74.7713 64.8267C74.7713 64.8267 74.7943 64.3137 74.7553 63.4817C74.7473 63.3107 73.6003 60.5827 70.1063 58.6777C65.4143 56.1197 58.7563 58.5807 56.0903 63.4817C56.0903 63.4817 56.0263 64.0827 56.0563 64.8267C56.2473 69.5267 59.1433 75.0457 64.2703 77.5717L65.3093 78.0677L66.2373 77.5717Z" fill="#FF445F"/>
|
||||
<path d="M65.3232 78.6355L64.0532 78.0294C58.4362 75.2604 55.7362 69.4144 55.5502 64.8475C55.5182 64.0745 55.5842 63.4544 55.5872 63.4274L55.6452 63.2394C56.9892 60.7704 59.3682 58.7895 62.1722 57.8035C65.0272 56.7995 68.0082 56.9554 70.3502 58.2314C73.8942 60.1634 75.2422 62.9965 75.2622 63.4575C75.3032 64.3175 75.2782 64.8484 75.2782 64.8484C75.0702 70.2064 71.8652 75.0054 66.4852 78.0145L65.3232 78.6355ZM56.5862 63.6325C56.5712 63.8245 56.5422 64.2795 56.5642 64.8055C56.7312 68.9345 59.2862 74.5484 64.4952 77.1164L65.2972 77.4995L65.9932 77.1274C71.0552 74.2944 74.0702 69.8044 74.2642 64.8074C74.2652 64.7934 74.2862 64.2995 74.2492 63.5065C74.1452 63.1825 72.9212 60.7915 69.8642 59.1235C67.7752 57.9845 65.0952 57.8535 62.5072 58.7615C59.9722 59.6505 57.8202 61.4234 56.5862 63.6325Z" fill="white"/>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 28.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1920 891" style="enable-background:new 0 0 1920 891;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#031730;}
|
||||
.st1{fill:#08B1D5;}
|
||||
.st2{fill:#1904DA;}
|
||||
.st3{fill:#FFC900;}
|
||||
.st4{fill:#FF0036;}
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M1437.8,277.53h-46.05c-25.39,0-46.05-20.66-46.05-46.05c0-25.39,20.66-46.05,46.05-46.05
|
||||
c25.39,0,46.05,20.66,46.05,46.05V277.53z M1391.75,204.13c-15.08,0-27.35,12.27-27.35,27.35c0,15.08,12.27,27.35,27.35,27.35
|
||||
h27.35v-27.35C1419.1,216.4,1406.84,204.13,1391.75,204.13z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M1746.82,277.53h-46.05c-25.39,0-46.05-20.66-46.05-46.05c0-25.39,20.66-46.05,46.05-46.05
|
||||
c25.39,0,46.05,20.66,46.05,46.05V277.53z M1700.77,204.13c-15.08,0-27.35,12.27-27.35,27.35c0,15.08,12.27,27.35,27.35,27.35
|
||||
h27.35v-27.35C1728.12,216.4,1715.85,204.13,1700.77,204.13z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M1597.76,277.55c-25.4,0-46.07-20.66-46.07-46.07v-43.22h18.71v43.22c0,15.09,12.28,27.36,27.36,27.36
|
||||
s27.36-12.28,27.36-27.36v-43.22h18.71v43.22C1643.83,256.88,1623.16,277.55,1597.76,277.55z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M1494.75,185.43c-25.39,0-46.05,20.66-46.05,46.05c0,25.39,20.66,46.05,46.05,46.05l18.7-18.7h-18.7
|
||||
c-15.08,0-27.35-12.27-27.35-27.35c0-15.08,12.27-27.35,27.35-27.35s27.35,12.27,27.35,27.35v90h18.7v-90
|
||||
C1540.8,206.09,1520.14,185.43,1494.75,185.43z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M968.09,578.05v45.38c-30.92,0-58.76-11.12-80.72-29.55c-27.59-23.17-45.14-57.93-45.14-96.78V269.82h45.14
|
||||
v103.14h80.72v45.68h-80.72v79.6C887.98,542.42,923.77,578.05,968.09,578.05z"/>
|
||||
<path class="st0" d="M1128.93,372.97v45.08c-42.79,0.09-77.63,34.03-79.2,76.45v128.94h-45.21V372.96h45.21v28.59
|
||||
C1071.24,383.73,1098.84,373.01,1128.93,372.97z"/>
|
||||
<path class="st0" d="M1157.94,347.93v-39.5h45.14v39.5H1157.94z M1157.94,623.44V372.96h45.14v250.48H1157.94z"/>
|
||||
<path class="st0" d="M1479.86,372.96l-125.14,250.48l-125.3-250.48h51.3l73.99,147.93l73.84-147.93H1479.86z"/>
|
||||
<path class="st0" d="M1750.5,372.96c0,0,0,273.85,0,291.97c0,69.91-57.37,125.75-125.32,125.69
|
||||
c-31.84,0.03-61.33-12.05-83.7-32.11l32.45-32.45c13.85,11.74,31.73,18.85,51.25,18.82c43.98,0,79.58-35.97,79.58-79.95v-69.99
|
||||
c-21.82,18.06-49.68,28.52-79.58,28.49c-68.1,0.06-125.44-54.9-125.44-125.35c0-1.49,0-125.13,0-125.13h45.73
|
||||
c0,0,0.02,121.79,0.02,125.13c0,43.8,35.68,80,79.69,79.96c43.98,0,79.58-35.97,79.58-79.96V372.96H1750.5z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st1" d="M463.95,358.89c0.04,0,0.08,0,0.12,0c6.43,0.01,11.75-4.93,11.75-11.36V134.47l-11.99-6.7l-11.94,6.67
|
||||
v213.1c0,6.43,5.32,11.38,11.75,11.35C463.73,358.89,463.84,358.89,463.95,358.89z"/>
|
||||
<path class="st2" d="M392.02,455.6L194.35,588.27v15.11l11.26,6.17L405.34,475.5c5.13-3.44,6.41-10.31,3.09-15.52
|
||||
c-0.14-0.22-0.28-0.44-0.42-0.67C404.58,453.78,397.42,451.98,392.02,455.6z"/>
|
||||
<path class="st3" d="M522.51,475.6l199.56,133.93l11.23-6.15v-15.14L535.83,455.71c-5.4-3.62-12.56-1.83-16,3.69
|
||||
c-0.13,0.21-0.26,0.42-0.4,0.63C516.09,465.26,517.36,472.15,522.51,475.6z"/>
|
||||
<path class="st0" d="M757.23,277.9V264.2l-12.26-6.85l-0.91-0.48L475.5,106.89l-11.68-6.51l-11.63,6.51L183.58,256.88
|
||||
l-0.91,0.48l-12.25,6.85v13.69l-0.91,0.53l0.91,0.48v13.64v325.01l12.45,6.8l261.62,143.33l3.3,1.82l16.08,8.81l16.04-8.81
|
||||
l3.3-1.82l261.62-143.33l12.4-6.8V292.55v-13.6l0.96-0.53L757.23,277.9z M476.11,744.33V502.51c0-6.59-5.39-11.98-11.98-11.97
|
||||
l-0.18,0l-0.12,0c-6.59-0.01-11.98,5.38-11.98,11.97v241.81L205.61,609.55l-11.26-6.17v-15.11V290.06l196.06,107.42
|
||||
c5.66,3.1,12.84,1.02,15.97-4.63l0.14-0.25c3.16-5.71,1.06-12.96-4.67-16.1L208.33,270.47l243.55-136.03l11.94-6.67l11.99,6.7
|
||||
l243.5,136.01L525.64,376.58c-5.7,3.12-7.48,10.25-4.32,15.92c0.05,0.1,0.11,0.19,0.16,0.29c3.1,5.62,10.02,7.85,15.65,4.77
|
||||
l196.16-107.5v298.19v15.14l-11.23,6.15L476.11,744.33z"/>
|
||||
</g>
|
||||
<circle class="st4" cx="463.95" cy="424.72" r="34.73"/>
|
||||
</g>
|
||||
<path class="st1" d="M649.35,258.97L461.77,153.83c-5.77-3.23-7.82-10.53-4.59-16.29v0c3.23-5.77,10.53-7.82,16.29-4.59
|
||||
l187.58,105.15c5.77,3.23,7.82,10.53,4.59,16.29v0C662.41,260.15,655.12,262.2,649.35,258.97z"/>
|
||||
<path class="st1" d="M567.15,267.09l-105.38-59.07c-5.77-3.23-7.82-10.53-4.59-16.29v0c3.23-5.77,10.53-7.82,16.29-4.59
|
||||
l105.38,59.07c5.77,3.23,7.82,10.53,4.59,16.29l0,0C580.21,268.26,572.92,270.32,567.15,267.09z"/>
|
||||
<path class="st1" d="M601.67,286.44L601.67,286.44c-5.77-3.23-7.82-10.53-4.59-16.29v0c3.23-5.77,10.53-7.82,16.29-4.59l0,0
|
||||
c5.77,3.23,7.82,10.53,4.59,16.29v0C614.73,287.61,607.44,289.67,601.67,286.44z"/>
|
||||
<path class="st1" d="M497.04,283.82l-35-19.62c-5.77-3.23-7.82-10.53-4.59-16.29v0c3.23-5.77,10.53-7.82,16.29-4.59l35,19.62
|
||||
c5.77,3.23,7.82,10.53,4.59,16.29l0,0C510.1,284.99,502.8,287.05,497.04,283.82z"/>
|
||||
<path class="st1" d="M549.85,316.05l-20.26-11.36c-5.77-3.23-7.82-10.53-4.59-16.29h0c3.23-5.77,10.53-7.82,16.29-4.59
|
||||
l20.26,11.36c5.77,3.23,7.82,10.53,4.59,16.29v0C562.91,317.23,555.61,319.28,549.85,316.05z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 227 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 397 KiB After Width: | Height: | Size: 330 KiB |
@@ -126,7 +126,7 @@ Contact us about any matter by opening a GitHub Discussion [here][discussions]
|
||||
|
||||
[Ecosystem]: ./ecosystem/index.md
|
||||
[Installation]: getting-started/installation.md
|
||||
[pronunciation]: #how-to-pronounce-the-name-trivy
|
||||
[pronunciation]: getting-started/faq.md#how-to-pronounce-the-name-trivy
|
||||
[Scanning Coverage]: ./docs/coverage/index.md
|
||||
|
||||
[aquasec]: https://aquasec.com
|
||||
|
||||
@@ -41,7 +41,7 @@ trivy:
|
||||
# Build image
|
||||
- docker build -t $IMAGE .
|
||||
# Build report
|
||||
- ./trivy image --exit-code 0 --format template --template "@contrib/gitlab.tpl" -o gl-container-scanning-report.json $IMAGE
|
||||
- ./trivy image --exit-code 0 --format template --template "@/contrib/gitlab.tpl" -o gl-container-scanning-report.json $IMAGE
|
||||
# Print report
|
||||
- ./trivy image --exit-code 0 --severity HIGH $IMAGE
|
||||
# Fail on severe vulnerabilities
|
||||
@@ -49,7 +49,7 @@ trivy:
|
||||
cache:
|
||||
paths:
|
||||
- .trivycache/
|
||||
# Enables https://docs.gitlab.com/ee/user/application_security/container_scanning/ (Container Scanning report is available on GitLab EE Ultimate or GitLab.com Gold)
|
||||
# Enables https://docs.gitlab.com/ee/user/application_security/container_scanning/ (Container Scanning report is available on GitLab Ultimate)
|
||||
artifacts:
|
||||
reports:
|
||||
container_scanning: gl-container-scanning-report.json
|
||||
@@ -148,9 +148,9 @@ trivy:
|
||||
# Build image
|
||||
- docker build -t $IMAGE .
|
||||
# Image report
|
||||
- ./trivy image --exit-code 0 --format template --template "@contrib/gitlab-codequality.tpl" -o gl-codeclimate-image.json $IMAGE
|
||||
- ./trivy image --exit-code 0 --format template --template "@/contrib/gitlab-codequality.tpl" -o gl-codeclimate-image.json $IMAGE
|
||||
# Filesystem report
|
||||
- ./trivy filesystem --scanners misconfig,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
|
||||
|
||||
@@ -1,58 +1,51 @@
|
||||
# Kubernetes Scanning Tutorial
|
||||
|
||||
## Prerequisites
|
||||
## Prerequisites
|
||||
|
||||
To test the following commands yourself, make sure that you’re connected to a Kubernetes cluster. A simple kind, a Docker-Desktop or microk8s cluster will do. In our case, we’ll use a one-node kind cluster.
|
||||
|
||||
Pro tip: The output of the commands will be even more interesting if you have some workloads running in your cluster.
|
||||
Pro tip: The output of the commands will be even more interesting if you have some workloads running in your cluster.
|
||||
|
||||
## Cluster Scanning
|
||||
|
||||
Trivy K8s is great to get an overview of all the vulnerabilities and misconfiguration issues or to scan specific workloads that are running in your cluster. You would want to use the Trivy K8s command either on your own local cluster or in your CI/CD pipeline post deployments.
|
||||
|
||||
The `trivy k8s` command is part of the Trivy CLI.
|
||||
The `trivy k8s` command is part of the Trivy CLI.
|
||||
|
||||
With the following command, we can scan our entire Kubernetes cluster for vulnerabilities and get a summary of the scan:
|
||||
With the following command, we can scan our entire Kubernetes cluster for vulnerabilities and get a summary of the scan:
|
||||
|
||||
```
|
||||
trivy k8s --report=summary cluster
|
||||
```sh
|
||||
trivy k8s --report=summary
|
||||
```
|
||||
|
||||
To get detailed information for all your resources, just replace ‘summary’ with ‘all’:
|
||||
|
||||
```
|
||||
trivy k8s --report=all cluster
|
||||
```sh
|
||||
trivy k8s --report=all
|
||||
```
|
||||
|
||||
However, we recommend displaying all information only in case you scan a specific namespace or resource since you can get overwhelmed with additional details.
|
||||
|
||||
Furthermore, we can specify the namespace that Trivy is supposed to scan to focus on specific resources in the scan result:
|
||||
|
||||
```
|
||||
trivy k8s -n kube-system --report=summary cluster
|
||||
```sh
|
||||
trivy k8s --include-namespaces kube-system --report summary
|
||||
```
|
||||
|
||||
Again, if you’d like to receive additional details, use the ‘--report=all’ flag:
|
||||
|
||||
```
|
||||
trivy k8s -n kube-system --report=all cluster
|
||||
```sh
|
||||
trivy k8s --include-namespaces kube-system --report all
|
||||
```
|
||||
|
||||
Like with scanning for vulnerabilities, we can also filter in-cluster security issues by severity of the vulnerabilities:
|
||||
|
||||
```
|
||||
trivy k8s --severity=CRITICAL --report=summary cluster
|
||||
```sh
|
||||
trivy k8s --severity=CRITICAL --report=summary
|
||||
```
|
||||
|
||||
Note that you can use any of the Trivy flags on the Trivy K8s command.
|
||||
|
||||
With the Trivy K8s command, you can also scan specific workloads that are running within your cluster, such as our deployment:
|
||||
|
||||
```
|
||||
trivy k8s --namespace app --report=summary deployments/react-application
|
||||
```
|
||||
|
||||
## Trivy Operator
|
||||
## Trivy Operator
|
||||
|
||||
The Trivy K8s command is an imperative model to scan resources. We wouldn’t want to manually scan each resource across different environments. The larger the cluster and the more workloads are running in it, the more error-prone this process would become. With the Trivy Operator, we can automate the scanning process after the deployment.
|
||||
|
||||
@@ -66,15 +59,9 @@ This has several benefits:
|
||||
|
||||
- The CRDs can be both machine and human-readable depending on which applications consume the CRDs. This allows for more versatile applications of the Trivy operator.
|
||||
|
||||
|
||||
There are several ways that you can install the Trivy Operator in your cluster. In this guide, we’re going to use the Helm installation based on the [following documentation.](../../docs/target/kubernetes.md#trivy-operator)
|
||||
|
||||
Please follow the Trivy Operator documentation for further information on:
|
||||
|
||||
- [Installation of the Trivy Operator](https://aquasecurity.github.io/trivy-operator/latest/getting-started/installation/)
|
||||
- [Getting started guide](https://aquasecurity.github.io/trivy-operator/latest/getting-started/quick-start/)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- [Getting started guide](https://aquasecurity.github.io/trivy-operator/latest/getting-started/quick-start/)
|
||||
@@ -7,8 +7,9 @@ This tutorial details
|
||||
- Verify the container image has an attestation with Kyverno
|
||||
|
||||
### Prerequisites
|
||||
1. [Attestation of the vulnerability scan uploaded][vuln-attestation]
|
||||
2. A running Kubernetes cluster that kubectl is connected to
|
||||
1. A running Kubernetes cluster that kubectl is connected to
|
||||
2. A Container image signed with Cosign and an attestation generated for a Trivy Vulnerability scan.
|
||||
[Follow this tutorial for more information.][vuln-attestation]
|
||||
|
||||
### Kyverno Policy to check attestation
|
||||
|
||||
@@ -24,11 +25,12 @@ kind: ClusterPolicy
|
||||
metadata:
|
||||
name: check-vulnerabilities
|
||||
spec:
|
||||
validationFailureAction: enforce
|
||||
webhookTimeoutSeconds: 10
|
||||
validationFailureAction: Enforce
|
||||
background: false
|
||||
webhookTimeoutSeconds: 30
|
||||
failurePolicy: Fail
|
||||
rules:
|
||||
- name: not-older-than-one-week
|
||||
- name: checking-vulnerability-scan-not-older-than-one-hour
|
||||
match:
|
||||
any:
|
||||
- resources:
|
||||
@@ -36,14 +38,23 @@ spec:
|
||||
- Pod
|
||||
verifyImages:
|
||||
- imageReferences:
|
||||
- "CONTAINER-REGISTRY/*:*"
|
||||
- "*"
|
||||
attestations:
|
||||
- predicateType: cosign.sigstore.dev/attestation/vuln/v1
|
||||
- type: https://cosign.sigstore.dev/attestation/vuln/v1
|
||||
conditions:
|
||||
- all:
|
||||
- key: "{{ time_since('','{{metadata.scanFinishedOn}}','') }}"
|
||||
- key: "{{ time_since('','{{ metadata.scanFinishedOn }}', '') }}"
|
||||
operator: LessThanOrEquals
|
||||
value: "168h"
|
||||
value: "1h"
|
||||
attestors:
|
||||
- count: 1
|
||||
entries:
|
||||
- keys:
|
||||
publicKeys: |-
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
abc
|
||||
xyz
|
||||
-----END PUBLIC KEY-----
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
@@ -57,38 +68,12 @@ Next, apply the above policy:
|
||||
kubectl apply -f vuln-attestation.yaml
|
||||
```
|
||||
|
||||
To ensure that the policy worked, we can deploye an example deployment file with our container image:
|
||||
To ensure that the policy worked, we can deploy an example Kubernetes Pod with our container image:
|
||||
|
||||
deployment.yaml
|
||||
```
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: cns-website
|
||||
namespace: app
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
run: cns-website
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
run: cns-website
|
||||
spec:
|
||||
containers:
|
||||
- name: cns-website
|
||||
image: docker.io/anaisurlichs/cns-website:0.0.6
|
||||
ports:
|
||||
- containerPort: 80
|
||||
imagePullPolicy: Always
|
||||
resources:
|
||||
limits:
|
||||
memory: 512Mi
|
||||
cpu: 200m
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
kubectl run app-signed --image= docker.io/anaisurlichs/signed-example@sha256:c5911ac313e0be82a740bd726dc290e655800a9588424ba4e0558c705d1287fd
|
||||
```
|
||||
Note that the image is based on the [signing tutorial.][vuln-attestation]
|
||||
|
||||
Once we apply the deployment, it should pass since our attestation is available:
|
||||
```
|
||||
@@ -98,7 +83,7 @@ deployment.apps/cns-website created
|
||||
|
||||
However, if we try to deploy any other container image, our deployment will fail. We can verify this by replacing the image referenced in the deployment with `docker.io/anaisurlichs/cns-website:0.0.5` and applying the deployment:
|
||||
```
|
||||
kubectl apply -f deployment-two.yaml
|
||||
kubectl run app-unsigned --image=docker.io/anaisurlichs/cns-website:0.1.1
|
||||
|
||||
Resource: "apps/v1, Resource=deployments", GroupVersionKind: "apps/v1, Kind=Deployment"
|
||||
Name: "cns-website", Namespace: "app"
|
||||
|
||||
111
docs/tutorials/misconfiguration/custom-checks.md
Normal file
@@ -0,0 +1,111 @@
|
||||
# Custom Checks with Rego
|
||||
|
||||
Trivy can scan configuration files for common security issues (a.k.a IaC misconfiguration scanning). In addition to a comprehensive built in database of checks, you can add your own custom checks. Checks are written in [Rego](https://www.openpolicyagent.org/docs/latest/policy-language/) language and the full documentation for checks and customizing them is available [here](https://aquasecurity.github.io/trivy/latest/docs/scanner/misconfiguration/custom/).
|
||||
|
||||
This tutorial will walk you through writing a custom check in Rego that checks for an issue in a Dockerfile.
|
||||
|
||||
When you are writing a check, it's important to understand the input to the check. This will be the IaC file that you are scanning; for example, a Kubernetes YAML resource definition, or an AWS JSON CloudFormation, or in our case a Dockerfile.
|
||||
|
||||
Since Rego is primarily tailored to query JSON objects, all incoming configuration files needs to be first converted to structured objects, which is available to the Rego code as the input variable. This is nothing that users have to do manually in Trivy. Instead, Rego makes it possible to pass in custom Schemas that detail how files are converted. Once Rego has access to a custom Schema, it will know in which format to access configuration files such as a Dockerfile.
|
||||
|
||||
[Here you can find the schemas](https://github.com/aquasecurity/trivy/tree/main/pkg/iac/rego/schemas) that define how different configuration files are converted to JSON by Trivy.
|
||||
This tutorial will make use of the [dockerfile.json schema](https://github.com/aquasecurity/trivy/blob/main/pkg/iac/rego/schemas/dockerfile.json). The schema will need to be parsed into your custom check.
|
||||
|
||||
Users can also use the [Schema Explorer](https://aquasecurity.github.io/trivy-schemas/) to view the structure of the data provided to Rego.
|
||||
|
||||
## Create a Rego file and Specify Trivy metadata
|
||||
|
||||
First, create a new `.rego` file e.g. a `docker-check.rego` file:
|
||||
```
|
||||
touch docker-check.rego
|
||||
```
|
||||
|
||||
Next, we need to specify metadata about the check. This is information that helps Trivy load and process the check.
|
||||
|
||||
```
|
||||
# METADATA
|
||||
# title: Verify Image
|
||||
# description: Verify Image is allowed to be used and in the right format
|
||||
# schemas:
|
||||
# - input: schema["dockerfile"]
|
||||
# custom:
|
||||
# id: ID001
|
||||
# severity: MEDIUM
|
||||
# input:
|
||||
# selector:
|
||||
# - type: dockerfile
|
||||
```
|
||||
|
||||
Important: The `METADATA` has to be defined on top of the file.
|
||||
|
||||
More information on the different fields in the metadata can be found in the [Trivy documentation.](https://aquasecurity.github.io/trivy/latest/docs/scanner/misconfiguration/custom/)
|
||||
|
||||
## Package and imports
|
||||
|
||||
```
|
||||
package custom.dockerfile.ID001
|
||||
|
||||
import future.keywords.in
|
||||
```
|
||||
|
||||
Every rego check has a package name. In our case, we will call it `custom.dockerfile.ID001` to avoid confusion between custom checks and built-in checks. The group name `dockerfile` has no effect on the package name. Note that each package has to contain only one check. However, we can pass multiple checks into our Trivy scan.
|
||||
The first keyword of the package, in this case `custom`, will be reused in the `trivy` command as the `--namespace`.
|
||||
|
||||
## Allowed data
|
||||
|
||||
The check that we are setting up compares the container images used in the Dockerfile with a list of white-listed container images. Thus, we need to add the images that are allowed to be used in the Dockerfile to our check. In our case, we will store them in an array of arrays:
|
||||
|
||||
```
|
||||
allowed_images := {
|
||||
["node:21-alpine3.19", "as", "build-deps"],
|
||||
["nginx:1.2"]
|
||||
}
|
||||
```
|
||||
|
||||
## Select the images that are used in the Dockerfile
|
||||
|
||||
Next, we need to iterate over the different commands in our Dockerfile and identify the commands that provide the base container images:
|
||||
|
||||
```
|
||||
deny[msg] {
|
||||
input.Stages[m].Commands[l].Cmd == "from"
|
||||
val := input.Stages[m].Commands[l].Value
|
||||
not val in allowed_images
|
||||
msg := sprintf("The container image '%s' used in the Dockerfile is not allowed", val)
|
||||
}
|
||||
```
|
||||
|
||||
Let's look at the check line by line:
|
||||
|
||||
1. The rule should always be `deny` in the Trivy Rego checks
|
||||
2. `input.Stages[m].Commands[l].Cmd` `input` allows us to access the different commands in the Dockerfile. We need to access the commands that use "FROM". Every command will be converted to lowercase.
|
||||
3. `val := input.Stages[m].Commands[l].Value` accesses the value of the `FROM` command and stores it in `val`
|
||||
4. `not val in allowed_images` checks whether val is not part of our allowed images list; this part of the check relies on the import statement
|
||||
5. In case our check fails, the `msg` will be printed with the image name used in `val`
|
||||
|
||||
Note that Rego
|
||||
|
||||
* uses `AND` automatically to combine conditions in this check
|
||||
* automatically iterates through the array of commands in the Dockefile and allowed images
|
||||
|
||||
## Run the check in a Trivy misconfiguration scan
|
||||
|
||||
Ensure that you have Trivy installed and run the following command:
|
||||
|
||||
```bash
|
||||
trivy fs --scanners misconf --policy ./docker-check.rego --namespaces custom ./Dockerfile
|
||||
```
|
||||
|
||||
Please replace:
|
||||
|
||||
* `./docker-check.rego` with the file path to your check
|
||||
* `custom` should be replaced with your package name if different
|
||||
* `./Dockerfile` is the path to the Dockerfile that should be scanned
|
||||
|
||||
**Note**: If you define custom packages, you have to specify the package prefix via `--namespaces` option. In our case, we called the custom package `custom`.
|
||||
|
||||
## Resources
|
||||
|
||||
* [Rego provides a long list of courses](https://academy.styra.com/collections) that can be useful in writing more complex checks
|
||||
* [The Rego documentation provides detailed information on the different types, iterations etc.](https://www.openpolicyagent.org/docs/latest/)
|
||||
* Have a look at the [built-in checks](https://github.com/aquasecurity/trivy-checks/tree/main/checks) for Trivy for inspiration on how to write custom checks.
|
||||
@@ -104,22 +104,7 @@ The `trivy config` command is a sub-command of the `trivy fs` command. You can l
|
||||
|
||||
## Scanning Terraform Plan files
|
||||
|
||||
Instead of scanning your different Terraform resources individually, you could also scan your terraform plan output before it is deployed for misconfiguration. This will give you insights into any misconfiguration of your resources as they would become deployed. [Here](https://aquasecurity.github.io/trivy/latest/docs/scanner/misconfiguration/custom/examples/#terraform-plan) is the link to the documentation.
|
||||
|
||||
First, create a terraform plan and save it to a file:
|
||||
```
|
||||
terraform plan --out tfplan.binary
|
||||
```
|
||||
|
||||
Next, convert the file into json format:
|
||||
```
|
||||
terraform show -json tfplan.binary > tfplan.json
|
||||
```
|
||||
|
||||
Lastly, scan the file with the `trivy config` command:
|
||||
```
|
||||
trivy config ./tfplan.json
|
||||
```
|
||||
Instead of scanning your different Terraform resources individually, you could also scan your Terraform Plan file before it is deployed for misconfiguration. This will give you insights into any misconfiguration of your resources as they would become deployed. [Here](https://aquasecurity.github.io/trivy/latest/docs/coverage/iac/terraform/#terraform) is the link to the documentation.
|
||||
|
||||
Note that you need to be able to create a terraform init and plan without any errors.
|
||||
|
||||
|
||||