mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-08 05:40:49 -08:00
Compare commits
171 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d76abadc9 | ||
|
|
fed446c515 | ||
|
|
df62927e58 | ||
|
|
1b9b9a84f7 | ||
|
|
3c16ca821b | ||
|
|
e5bee5cccd | ||
|
|
4b9f310b9c | ||
|
|
8e7fb7cc84 | ||
|
|
a9badeaba8 | ||
|
|
f8ebccc680 | ||
|
|
1c81948e03 | ||
|
|
497cc10d8e | ||
|
|
065f0afa54 | ||
|
|
e2603056dd | ||
|
|
0621402bf7 | ||
|
|
798fdbc013 | ||
|
|
34a89293d5 | ||
|
|
600819248d | ||
|
|
73734eab21 | ||
|
|
22463ababd | ||
|
|
790c8054ec | ||
|
|
86fec9c4a9 | ||
|
|
26bc91160b | ||
|
|
d699e8c101 | ||
|
|
1777878e83 | ||
|
|
9be08253a2 | ||
|
|
5d73b47dbc | ||
|
|
46e784c8a9 | ||
|
|
0f61a84712 | ||
|
|
8a1aa448a1 | ||
|
|
fbab9eea3a | ||
|
|
f84417bba0 | ||
|
|
85c681d443 | ||
|
|
46748ce6ea | ||
|
|
c6741bddff | ||
|
|
a21acc7e08 | ||
|
|
32a3a3311c | ||
|
|
cbb47dc7c4 | ||
|
|
e3d10d2512 | ||
|
|
e1770e046c | ||
|
|
337c0b70d5 | ||
|
|
5ccee14304 | ||
|
|
96db52c3f6 | ||
|
|
3e902a57a9 | ||
|
|
904f1cf24e | ||
|
|
7d48c5d5d4 | ||
|
|
dcc73e964a | ||
|
|
35c4262d0b | ||
|
|
0e01851e9e | ||
|
|
4d9b444499 | ||
|
|
c29197ab7d | ||
|
|
d7637adc6b | ||
|
|
ef39eeedf3 | ||
|
|
1ce8bb535a | ||
|
|
bc9513fc57 | ||
|
|
aecd2f0bf0 | ||
|
|
2cbf402b6a | ||
|
|
0099b20e31 | ||
|
|
a597a54fb6 | ||
|
|
b453fbec37 | ||
|
|
0e876d5aa0 | ||
|
|
a4f27d24a3 | ||
|
|
9e6411e9f5 | ||
|
|
ef6538a171 | ||
|
|
139f3e1e32 | ||
|
|
479cfdd40e | ||
|
|
9a279fa7bb | ||
|
|
d52b0b7bc0 | ||
|
|
9b531fa27b | ||
|
|
8ca1bfdd23 | ||
|
|
c20d466044 | ||
|
|
52cbe79759 | ||
|
|
4a5b915578 | ||
|
|
56cdc55f77 | ||
|
|
17d753676b | ||
|
|
2796abe1ed | ||
|
|
22a1573807 | ||
|
|
43586659a1 | ||
|
|
5081399659 | ||
|
|
e1a38128ab | ||
|
|
283eef6372 | ||
|
|
bbd7b98741 | ||
|
|
11c81bf2f6 | ||
|
|
2d8d63e61a | ||
|
|
a46839b1ce | ||
|
|
19715f5de8 | ||
|
|
854b63940a | ||
|
|
59e1a86643 | ||
|
|
9ef01133c8 | ||
|
|
dadd1e10c2 | ||
|
|
1a658210a4 | ||
|
|
411862c908 | ||
|
|
62a1aaf031 | ||
|
|
48b2e15c23 | ||
|
|
c15f269a99 | ||
|
|
b6ee08e55d | ||
|
|
d4740401a3 | ||
|
|
4cf2f94d0d | ||
|
|
18ce1c3363 | ||
|
|
87eed38c6c | ||
|
|
b0c591ef66 | ||
|
|
b84b5ecfc2 | ||
|
|
305255a497 | ||
|
|
d586de585e | ||
|
|
de6eef3b00 | ||
|
|
83a9c4a4cf | ||
|
|
537272257b | ||
|
|
6fcd1538d9 | ||
|
|
72e302cf81 | ||
|
|
7e99d08a13 | ||
|
|
12a1789be5 | ||
|
|
919e8c92b2 | ||
|
|
50fe43f14c | ||
|
|
09db1d4389 | ||
|
|
3f0721ff6e | ||
|
|
0ef0dadb16 | ||
|
|
3a7717fdeb | ||
|
|
63cfb2714a | ||
|
|
e1361368a1 | ||
|
|
29b5f7e8ec | ||
|
|
92ed344e8a | ||
|
|
16af41be15 | ||
|
|
cab8569cd7 | ||
|
|
92f9e98d04 | ||
|
|
33fb04763d | ||
|
|
8b162f287f | ||
|
|
3b7c9198dd | ||
|
|
c75d35ff61 | ||
|
|
d298415c09 | ||
|
|
1a56295ff8 | ||
|
|
864ad10a38 | ||
|
|
7a20d96227 | ||
|
|
ea5fd75ffe | ||
|
|
56a01ec6f7 | ||
|
|
6a0e152657 | ||
|
|
50c8b418a9 | ||
|
|
51ca6536c3 | ||
|
|
e5e7ebcdab | ||
|
|
6ee4960776 | ||
|
|
c067b026e0 | ||
|
|
ff6374829a | ||
|
|
0009b02bb8 | ||
|
|
d61ae8cc73 | ||
|
|
636ce808fe | ||
|
|
e859d10eef | ||
|
|
a6ef37fa3d | ||
|
|
dca8c039ed | ||
|
|
b003f58b2c | ||
|
|
86f0016165 | ||
|
|
2f318ce97d | ||
|
|
ec3906c24e | ||
|
|
37b25d28b2 | ||
|
|
45d5edb0d7 | ||
|
|
090a00e717 | ||
|
|
f2188eb56d | ||
|
|
b79850f416 | ||
|
|
36acdfa8db | ||
|
|
55fb723a6e | ||
|
|
9c87cb2710 | ||
|
|
21cf179f6b | ||
|
|
fbf7a77aee | ||
|
|
547391c224 | ||
|
|
882bfdd782 | ||
|
|
949cd10c0c | ||
|
|
93bc162ca5 | ||
|
|
57993ef673 | ||
|
|
dc4baeb359 | ||
|
|
25d0255dc3 | ||
|
|
73e54549f1 | ||
|
|
08de7c613f | ||
|
|
ade4730fa7 |
122
.github/DISCUSSION_TEMPLATE/bugs.yml
vendored
Normal file
122
.github/DISCUSSION_TEMPLATE/bugs.yml
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
labels: ["kind/bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
#### Note
|
||||
Feel free to raise a bug report if something doesn't work as expected.
|
||||
Please ensure that you're not creating a duplicate report by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
|
||||
If you see any false positives or false negatives, please file a ticket [here](https://github.com/aquasecurity/trivy/discussions/new?category=false-detection).
|
||||
|
||||
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: Briefly describe the problem you are having in a few paragraphs.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Desired Behavior
|
||||
description: What did you expect to happen?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Actual Behavior
|
||||
description: What happened instead?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Reproduction Steps
|
||||
description: How do you trigger this bug? Please walk us through it step by step.
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
render: bash
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Target
|
||||
description: Which target are you scanning? It is equal to which subcommand you are using.
|
||||
options:
|
||||
- Container Image
|
||||
- Filesystem
|
||||
- Git Repository
|
||||
- Virtual Machine Image
|
||||
- Kubernetes
|
||||
- AWS
|
||||
- SBOM
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Scanner
|
||||
description: Which scanner are you using?
|
||||
options:
|
||||
- Vulnerability
|
||||
- Misconfiguration
|
||||
- Secret
|
||||
- License
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Output Format
|
||||
description: Which output format are you using?
|
||||
options:
|
||||
- Table
|
||||
- JSON
|
||||
- Template
|
||||
- SARIF
|
||||
- CycloneDX
|
||||
- SPDX
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Mode
|
||||
description: Which mode are you using? Specify "Standalone" if you are not using `trivy server`.
|
||||
options:
|
||||
- Standalone
|
||||
- Client/Server
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Debug Output
|
||||
description: Output of run with `--debug`
|
||||
placeholder: "$ trivy <target> <subject> --debug"
|
||||
render: bash
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Operating System
|
||||
description: On what operating system are you running Trivy?
|
||||
placeholder: "e.g. macOS Big Sur"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Version
|
||||
description: Output of `trivy --version`
|
||||
placeholder: "$ trivy --version"
|
||||
render: bash
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Checklist
|
||||
description: Have you tried the following?
|
||||
options:
|
||||
- label: Run `trivy image --reset`
|
||||
- label: Read [the troubleshooting](https://aquasecurity.github.io/trivy/latest/docs/references/troubleshooting/)
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
|
||||
28
.github/DISCUSSION_TEMPLATE/documentation.yml
vendored
Normal file
28
.github/DISCUSSION_TEMPLATE/documentation.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
labels: ["kind/documentation"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
#### Note
|
||||
Feel free to create a docs report if something doesn't work as expected or is unclear in the documentation.
|
||||
Please ensure that you're not creating a duplicate report by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
|
||||
|
||||
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: Briefly describe the what has been unclear in the existing documentation
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Link
|
||||
description: Please provide a link to the current documentation or where you thought to find the information you were looking for
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Suggestions
|
||||
description: What would you like to have added or changed in the documentation?
|
||||
validations:
|
||||
required: true
|
||||
94
.github/DISCUSSION_TEMPLATE/false-detection.yml
vendored
Normal file
94
.github/DISCUSSION_TEMPLATE/false-detection.yml
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
#### Note
|
||||
Feel free to raise a bug report if something doesn't work as expected.
|
||||
Please ensure that you're not creating a duplicate report by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
|
||||
|
||||
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
|
||||
- type: input
|
||||
attributes:
|
||||
label: IDs
|
||||
description: List the IDs of vulnerabilities, misconfigurations, secrets, or licenses that are either not detected or mistakenly detected.
|
||||
placeholder: "e.g. CVE-2021-44228, CVE-2022-22965"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: Describe the false detection.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Reproduction Steps
|
||||
description: How do you trigger this bug? Please walk us through it step by step.
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
render: bash
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Target
|
||||
description: Which target are you scanning? It is equal to which subcommand you are using.
|
||||
options:
|
||||
- Container Image
|
||||
- Filesystem
|
||||
- Git Repository
|
||||
- Virtual Machine Image
|
||||
- Kubernetes
|
||||
- AWS
|
||||
- SBOM
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Scanner
|
||||
description: Which scanner are you using?
|
||||
options:
|
||||
- Vulnerability
|
||||
- Misconfiguration
|
||||
- Secret
|
||||
- License
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Target OS
|
||||
description: What operating system are you scanning? Fill in this field if the scanning target is an operating system.
|
||||
placeholder: "Example: Ubuntu 22.04"
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Debug Output
|
||||
description: Output of run with `--debug`
|
||||
placeholder: "$ trivy <target> <subject> --debug"
|
||||
render: bash
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Version
|
||||
description: Output of `trivy --version`
|
||||
placeholder: "$ trivy --version"
|
||||
render: bash
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: Read [the documentation regarding wrong detection](https://aquasecurity.github.io/trivy/dev/community/contribute/discussion/#false-detection)
|
||||
- label: Ran Trivy with `-f json` that shows data sources and confirmed that the security advisory in data sources was correct
|
||||
validations:
|
||||
required: true
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
|
||||
45
.github/DISCUSSION_TEMPLATE/ideas.yml
vendored
Normal file
45
.github/DISCUSSION_TEMPLATE/ideas.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
labels: ["kind/feature"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
#### Note
|
||||
Feel free to share your idea.
|
||||
Please ensure that you're not creating a duplicate ticket by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
|
||||
|
||||
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: Describe your idea.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Target
|
||||
description: Which target is your idea related to?
|
||||
options:
|
||||
- Container Image
|
||||
- Filesystem
|
||||
- Git Repository
|
||||
- Virtual Machine Image
|
||||
- Kubernetes
|
||||
- AWS
|
||||
- SBOM
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Scanner
|
||||
description: Which scanner is your idea related to?
|
||||
options:
|
||||
- Vulnerability
|
||||
- Misconfiguration
|
||||
- Secret
|
||||
- License
|
||||
validations:
|
||||
required: false
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
|
||||
82
.github/DISCUSSION_TEMPLATE/q-a.yml
vendored
Normal file
82
.github/DISCUSSION_TEMPLATE/q-a.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
labels: ["triage/support"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
#### Note
|
||||
If you have any troubles/questions, feel free to ask.
|
||||
Please ensure that you're not asking a duplicate question by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
|
||||
|
||||
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Question
|
||||
description: What kind of problem are you facing? Or, what questions do you have?
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Target
|
||||
description: Which target are you scanning? It is equal to which subcommand you are using.
|
||||
options:
|
||||
- Container Image
|
||||
- Filesystem
|
||||
- Git Repository
|
||||
- Virtual Machine Image
|
||||
- Kubernetes
|
||||
- AWS
|
||||
- SBOM
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Scanner
|
||||
description: Which scanner are you using?
|
||||
options:
|
||||
- Vulnerability
|
||||
- Misconfiguration
|
||||
- Secret
|
||||
- License
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Output Format
|
||||
description: Which output format are you using?
|
||||
options:
|
||||
- Table
|
||||
- JSON
|
||||
- Template
|
||||
- SARIF
|
||||
- CycloneDX
|
||||
- SPDX
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Mode
|
||||
description: Which mode are you using? Specify "Standalone" if you are not using `trivy server`.
|
||||
options:
|
||||
- Standalone
|
||||
- Client/Server
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
attributes:
|
||||
label: Operating System
|
||||
description: What operating system are you using?
|
||||
placeholder: "Example: macOS Big Sur"
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Version
|
||||
description: Output of `trivy --version`
|
||||
placeholder: "$ trivy --version"
|
||||
render: bash
|
||||
validations:
|
||||
required: false
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
|
||||
31
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
31
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
@@ -1,31 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
labels: kind/bug
|
||||
about: If something isn't working as expected.
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
<!--
|
||||
Briefly describe the problem you are having in a few paragraphs.
|
||||
-->
|
||||
|
||||
## What did you expect to happen?
|
||||
|
||||
|
||||
## What happened instead?
|
||||
|
||||
|
||||
## Output of run with `--debug`:
|
||||
|
||||
```
|
||||
(paste your output here)
|
||||
```
|
||||
|
||||
## Output of `trivy -v`:
|
||||
|
||||
```
|
||||
(paste your output here)
|
||||
```
|
||||
|
||||
## Additional details (base image name, container registry info...):
|
||||
9
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
9
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
@@ -1,9 +0,0 @@
|
||||
---
|
||||
name: Feature Request
|
||||
labels: kind/feature
|
||||
about: I have a suggestion (and might want to implement myself)!
|
||||
---
|
||||
|
||||
<!--
|
||||
If this is a FEATURE REQUEST, request format does not matter!
|
||||
-->
|
||||
10
.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
vendored
10
.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
vendored
@@ -1,10 +0,0 @@
|
||||
---
|
||||
name: Support Question
|
||||
labels: triage/support
|
||||
about: If you have a question about Trivy.
|
||||
---
|
||||
|
||||
<!--
|
||||
If you have a trouble, feel free to ask.
|
||||
Make sure you're not asking duplicate question by searching on the issues lists.
|
||||
-->
|
||||
33
.github/ISSUE_TEMPLATE/WRONG_DETECTION.md
vendored
33
.github/ISSUE_TEMPLATE/WRONG_DETECTION.md
vendored
@@ -1,33 +0,0 @@
|
||||
---
|
||||
name: Wrong Detection
|
||||
labels: ["kind/bug"]
|
||||
about: If Trivy doesn't detect something, or shows false positive detection
|
||||
---
|
||||
|
||||
## Checklist
|
||||
- [ ] I've read [the documentation regarding wrong detection](https://aquasecurity.github.io/trivy/latest/community/contribute/issue/#wrong-detection).
|
||||
- [ ] I've confirmed that a security advisory in data sources was correct.
|
||||
- Run Trivy with `-f json` that shows data sources and make sure that the security advisory is correct.
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
<!--
|
||||
Briefly describe the CVE that aren't detected and information about artifacts with this CVE.
|
||||
-->
|
||||
|
||||
## JSON Output of run with `-debug`:
|
||||
|
||||
```
|
||||
(paste your output here)
|
||||
```
|
||||
|
||||
## Output of `trivy -v`:
|
||||
|
||||
```
|
||||
(paste your output here)
|
||||
```
|
||||
|
||||
## Additional details (base image name, container registry info...):
|
||||
|
||||
|
||||
17
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
17
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Report a false detection
|
||||
url: https://github.com/aquasecurity/trivy/discussions/new?category=false-detection
|
||||
about: Report false positives/negatives
|
||||
- name: Report a bug
|
||||
url: https://github.com/aquasecurity/trivy/discussions/new?category=bugs
|
||||
about: Report bugs
|
||||
- name: Enhance documentation
|
||||
url: https://github.com/aquasecurity/trivy/discussions/new?category=documentation
|
||||
about: Make suggestions to the documentation
|
||||
- name: Request a feature enhancement
|
||||
url: https://github.com/aquasecurity/trivy/discussions/new?category=ideas
|
||||
about: Share ideas for new features
|
||||
- name: Ask the community for help
|
||||
url: https://github.com/aquasecurity/trivy/discussions/new?category=q-a
|
||||
about: Ask questions and discuss with other community members
|
||||
12
.github/workflows/bypass-cla.yaml
vendored
Normal file
12
.github/workflows/bypass-cla.yaml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# This workflow is used to bypass the required status checks in merge queue.
|
||||
# cf. https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks
|
||||
name: CLA
|
||||
on:
|
||||
merge_group:
|
||||
|
||||
jobs:
|
||||
cla:
|
||||
name: license/cla
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No test required"'
|
||||
31
.github/workflows/bypass-test.yaml
vendored
Normal file
31
.github/workflows/bypass-test.yaml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# This workflow is used to bypass the required status checks.
|
||||
# cf. https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks
|
||||
name: Test
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'LICENSE'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'LICENSE'
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- run: 'echo "No test required"'
|
||||
|
||||
integration:
|
||||
name: Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No test required"'
|
||||
2
.github/workflows/mkdocs-dev.yaml
vendored
2
.github/workflows/mkdocs-dev.yaml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
|
||||
2
.github/workflows/mkdocs-latest.yaml
vendored
2
.github/workflows/mkdocs-latest.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
|
||||
6
.github/workflows/publish-chart.yaml
vendored
6
.github/workflows/publish-chart.yaml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Helm
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
id: lint
|
||||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76
|
||||
- name: Setup Kubernetes cluster (KIND)
|
||||
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00
|
||||
uses: helm/kind-action@fa81e57adff234b2908110485695db0f181f3c67
|
||||
with:
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
image: ${{ env.KIND_IMAGE }}
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install chart-releaser
|
||||
|
||||
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
sudo apt-get -y install rpm reprepro createrepo-c distro-info
|
||||
|
||||
- name: Checkout trivy-repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/trivy-repo
|
||||
path: trivy-repo
|
||||
|
||||
6
.github/workflows/reusable-release.yaml
vendored
6
.github/workflows/reusable-release.yaml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
contents: read # Not required for public repositories, but for clarity
|
||||
steps:
|
||||
- name: Cosign install
|
||||
uses: sigstore/cosign-installer@c3667d99424e7e6047999fb6246c0da843953c65
|
||||
uses: sigstore/cosign-installer@ef0e9691595ea19ec990a46b1a591dcafe568f34
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Generate SBOM
|
||||
uses: CycloneDX/gh-gomod-generate-sbom@v1
|
||||
uses: CycloneDX/gh-gomod-generate-sbom@v2
|
||||
with:
|
||||
args: mod -licenses -json -output bom.json
|
||||
version: ^v1
|
||||
|
||||
2
.github/workflows/scan.yaml
vendored
2
.github/workflows/scan.yaml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v3.5.3
|
||||
|
||||
- name: Run Trivy vulnerability scanner and create GitHub issues
|
||||
uses: knqyf263/trivy-issue-action@v0.0.5
|
||||
|
||||
2
.github/workflows/test-docs.yaml
vendored
2
.github/workflows/test-docs.yaml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
|
||||
98
.github/workflows/test.yaml
vendored
98
.github/workflows/test.yaml
vendored
@@ -1,8 +1,9 @@
|
||||
name: Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
branches-ignore:
|
||||
- 'main'
|
||||
- 'gh-readonly-queue/**'
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
@@ -14,6 +15,7 @@ on:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'LICENSE'
|
||||
merge_group:
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
@@ -22,7 +24,7 @@ jobs:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3.5.3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -39,7 +41,7 @@ jobs:
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v3.4.0
|
||||
uses: golangci/golangci-lint-action@v3.6.0
|
||||
with:
|
||||
version: v1.52
|
||||
args: --deadline=30m
|
||||
@@ -47,7 +49,7 @@ jobs:
|
||||
if: matrix.operating-system == 'ubuntu-latest'
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.0.2
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
aqua_opts: ""
|
||||
@@ -69,7 +71,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v3.5.3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -77,19 +79,19 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.0.2
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
- name: Run integration tests
|
||||
run: mage test:integration
|
||||
|
||||
module-test:
|
||||
name: Module Integration Test
|
||||
k8s-integration:
|
||||
name: K8s Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3.5.3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
@@ -97,7 +99,27 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.0.2
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
- name: Run k8s integration tests
|
||||
run: mage test:k8s
|
||||
|
||||
module-test:
|
||||
name: Module Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.5.3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
|
||||
@@ -106,34 +128,56 @@ jobs:
|
||||
run: |
|
||||
mage test:module
|
||||
|
||||
vm-test:
|
||||
name: VM Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.5.3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.1.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Run vm integration tests
|
||||
run: |
|
||||
mage test:vm
|
||||
|
||||
build-test:
|
||||
name: Build Test
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
env:
|
||||
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Show available Docker Buildx platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v3.5.3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Determine GoReleaser ID
|
||||
id: goreleaser_id
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ matrix.operating-system }}" == "windows-latest" ]; then
|
||||
echo "id=--id build-windows" >> $GITHUB_OUTPUT
|
||||
elif [ "${{ matrix.operating-system }}" == "macos-latest" ]; then
|
||||
echo "id=--id build-macos --id build-bsd" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "id=--id build-linux" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v4
|
||||
with:
|
||||
version: v1.16.2
|
||||
args: release --skip-sign --snapshot --clean --skip-publish --timeout 90m
|
||||
env:
|
||||
GPG_FILE: "nogpg.key"
|
||||
args: build --snapshot --clean --timeout 90m ${{ steps.goreleaser_id.outputs.id }}
|
||||
|
||||
36
.github/workflows/vm-test.yaml
vendored
36
.github/workflows/vm-test.yaml
vendored
@@ -1,36 +0,0 @@
|
||||
name: VM Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'pkg/fanal/vm/**'
|
||||
- 'pkg/fanal/walker/vm.go'
|
||||
- 'pkg/fanal/artifact/vm/**'
|
||||
- 'integration/vm_test.go'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'pkg/fanal/vm/**'
|
||||
- 'pkg/fanal/walker/vm.go'
|
||||
- 'pkg/fanal/artifact/vm/**'
|
||||
- 'integration/vm_test.go'
|
||||
|
||||
jobs:
|
||||
vm-test:
|
||||
name: VM Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Install tools
|
||||
uses: aquaproj/aqua-installer@v2.0.2
|
||||
with:
|
||||
aqua_version: v1.25.0
|
||||
- name: Run vm integration tests
|
||||
run: |
|
||||
mage test:vm
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -38,3 +38,4 @@ dist
|
||||
|
||||
# Signing
|
||||
gpg.key
|
||||
cmd/trivy/trivy
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.17.3
|
||||
FROM alpine:3.18.2
|
||||
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.17.3
|
||||
FROM alpine:3.18.2
|
||||
RUN apk --no-cache add ca-certificates git
|
||||
|
||||
# binaries were created with GoReleaser
|
||||
|
||||
17
README.md
17
README.md
@@ -31,6 +31,8 @@ Scanners (what Trivy can find there):
|
||||
- Sensitive information and secrets
|
||||
- Software licenses
|
||||
|
||||
Trivy supports most popular programming languages, operating systems, and platforms. For a complete list, see the [Scanning Coverage] page.
|
||||
|
||||
To learn more, go to the [Trivy homepage][homepage] for feature highlights, or to the [Documentation site][docs] for detailed information.
|
||||
|
||||
## Quick Start
|
||||
@@ -103,11 +105,21 @@ trivy k8s --report summary cluster
|
||||
|
||||
`tri` is pronounced like **tri**gger, `vy` is pronounced like en**vy**.
|
||||
|
||||
---
|
||||
## Want more? Check out Aqua
|
||||
|
||||
If you liked Trivy, you will love Aqua which builds on top of Trivy to provide even more enhanced capabilities for a complete security management offering.
|
||||
You can find a high level comparison table specific to Trivy users [here](https://github.com/aquasecurity/resources/blob/main/trivy-aqua.md).
|
||||
In addition check out the <https://aquasec.com> website for more information about our products and services.
|
||||
If you'd like to contact Aqua or request a demo, please use this form: <https://www.aquasec.com/demo>
|
||||
|
||||
## Community
|
||||
|
||||
Trivy is an [Aqua Security][aquasec] open source project.
|
||||
Learn about our open source work and portfolio [here][oss].
|
||||
Contact us about any matter by opening a GitHub Discussion [here][discussions]
|
||||
Join our [Slack community][slack] to stay up to date with community efforts.
|
||||
|
||||
Please ensure to abide by our [Code of Conduct][code-of-conduct] during all interactions.
|
||||
|
||||
[test]: https://github.com/aquasecurity/trivy/actions/workflows/test.yaml
|
||||
[test-img]: https://github.com/aquasecurity/trivy/actions/workflows/test.yaml/badge.svg
|
||||
@@ -122,9 +134,12 @@ Contact us about any matter by opening a GitHub Discussion [here][discussions]
|
||||
[homepage]: https://trivy.dev
|
||||
[docs]: https://aquasecurity.github.io/trivy
|
||||
[pronunciation]: #how-to-pronounce-the-name-trivy
|
||||
[slack]: https://slack.aquasec.com
|
||||
[code-of-conduct]: https://github.com/aquasecurity/community/blob/main/CODE_OF_CONDUCT.md
|
||||
|
||||
[Installation]:https://aquasecurity.github.io/trivy/latest/getting-started/installation/
|
||||
[Ecosystem]: https://aquasecurity.github.io/trivy/latest/ecosystem/
|
||||
[Scanning Coverage]: https://aquasecurity.github.io/trivy/latest/getting-started/coverage/
|
||||
|
||||
[alpine]: https://ariadne.space/2021/06/08/the-vulnerability-remediation-lifecycle-of-alpine-containers/
|
||||
[rego]: https://www.openpolicyagent.org/docs/latest/#rego
|
||||
|
||||
10
SECURITY.md
Normal file
10
SECURITY.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
This is an open source project that is provided as-is without warrenty or liability.
|
||||
As such no supportability commitment. The maintainers will do the best they can to address any report promptly and responsibly.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please use the "Private vulnerability reporting" feature in the GitHub repository (under the "Security" tab).
|
||||
@@ -7,7 +7,6 @@ cd trivy-repo/deb
|
||||
|
||||
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
echo "Removing deb package of $release"
|
||||
reprepro -A i386 remove $release trivy
|
||||
reprepro -A amd64 remove $release trivy
|
||||
reprepro -A arm64 remove $release trivy
|
||||
done
|
||||
@@ -15,7 +14,6 @@ done
|
||||
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
echo "Adding deb package to $release"
|
||||
reprepro includedeb $release ../../dist/*Linux-64bit.deb
|
||||
reprepro includedeb $release ../../dist/*Linux-32bit.deb
|
||||
reprepro includedeb $release ../../dist/*Linux-ARM64.deb
|
||||
done
|
||||
|
||||
|
||||
@@ -2,6 +2,25 @@
|
||||
|
||||
TRIVY_VERSION=$(find dist/ -type f -name "*64bit.rpm" -printf "%f\n" | head -n1 | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
|
||||
|
||||
function create_common_rpm_repo () {
|
||||
rpm_path=$1
|
||||
|
||||
ARCHES=("x86_64" "aarch64")
|
||||
for arch in ${ARCHES[@]}; do
|
||||
prefix=$arch
|
||||
if [ "$arch" == "x86_64" ]; then
|
||||
prefix="64bit"
|
||||
elif [ "$arch" == "aarch64" ]; then
|
||||
prefix="ARM64"
|
||||
fi
|
||||
|
||||
mkdir -p $rpm_path/$arch
|
||||
cp ../dist/*${prefix}.rpm ${rpm_path}/$arch/
|
||||
createrepo_c -u https://github.com/aquasecurity/trivy/releases/download/ --location-prefix="v"$TRIVY_VERSION --update $rpm_path/$arch
|
||||
rm ${rpm_path}/$arch/*${prefix}.rpm
|
||||
done
|
||||
}
|
||||
|
||||
function create_rpm_repo () {
|
||||
version=$1
|
||||
rpm_path=rpm/releases/${version}/x86_64
|
||||
@@ -18,6 +37,9 @@ echo "Create RPM releases for Trivy v$TRIVY_VERSION"
|
||||
|
||||
cd trivy-repo
|
||||
|
||||
echo "Processing common repository for RHEL/CentOS..."
|
||||
create_common_rpm_repo rpm/releases
|
||||
|
||||
VERSIONS=(5 6 7 8 9)
|
||||
for version in ${VERSIONS[@]}; do
|
||||
echo "Processing RHEL/CentOS $version..."
|
||||
|
||||
@@ -75,10 +75,12 @@ get_binaries() {
|
||||
linux/ppc64le) BINARIES="trivy" ;;
|
||||
linux/arm64) BINARIES="trivy" ;;
|
||||
linux/armv7) BINARIES="trivy" ;;
|
||||
linux/s390x) BINARIES="trivy" ;;
|
||||
openbsd/386) BINARIES="trivy" ;;
|
||||
openbsd/amd64) BINARIES="trivy" ;;
|
||||
openbsd/arm64) BINARIES="trivy" ;;
|
||||
openbsd/armv7) BINARIES="trivy" ;;
|
||||
windows/amd64) BINARIES="trivy" ;;
|
||||
*)
|
||||
log_crit "platform $PLATFORM is not supported. Make sure this script is up-to-date and file request at https://github.com/${PREFIX}/issues/new"
|
||||
exit 1
|
||||
@@ -102,6 +104,9 @@ tag_to_version() {
|
||||
}
|
||||
adjust_format() {
|
||||
# change format (tar.gz or zip) based on OS
|
||||
case ${OS} in
|
||||
windows) FORMAT=zip ;;
|
||||
esac
|
||||
true
|
||||
}
|
||||
adjust_os() {
|
||||
@@ -111,7 +116,8 @@ adjust_os() {
|
||||
amd64) OS=64bit ;;
|
||||
arm) OS=ARM ;;
|
||||
arm64) OS=ARM64 ;;
|
||||
ppc64le) OS=PPC64LE ;;
|
||||
ppc64le) OS=Linux ;;
|
||||
s390x) OS=Linux ;;
|
||||
darwin) OS=macOS ;;
|
||||
dragonfly) OS=DragonFlyBSD ;;
|
||||
freebsd) OS=FreeBSD ;;
|
||||
@@ -129,7 +135,8 @@ adjust_arch() {
|
||||
arm) ARCH=ARM ;;
|
||||
armv7) ARCH=ARM ;;
|
||||
arm64) ARCH=ARM64 ;;
|
||||
ppc64le) OS=PPC64LE ;;
|
||||
ppc64le) ARCH=PPC64LE ;;
|
||||
s390x) ARCH=s390x ;;
|
||||
darwin) ARCH=macOS ;;
|
||||
dragonfly) ARCH=DragonFlyBSD ;;
|
||||
freebsd) ARCH=FreeBSD ;;
|
||||
@@ -218,6 +225,7 @@ uname_arch() {
|
||||
armv5*) arch="armv5" ;;
|
||||
armv6*) arch="armv6" ;;
|
||||
armv7*) arch="armv7" ;;
|
||||
s390*) arch="s390x" ;;
|
||||
esac
|
||||
echo ${arch}
|
||||
}
|
||||
|
||||
49
docs/community/contribute/discussion.md
Normal file
49
docs/community/contribute/discussion.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Discussions
|
||||
Thank you for taking interest in contributing to Trivy!
|
||||
|
||||
Trivy uses [GitHub Discussion](https://github.com/aquasecurity/trivy/discussions) for bug reports, feature requests, and questions.
|
||||
If maintainers decide to accept a new feature or confirm that it is a bug, they will close the discussion and create a [GitHub Issue](https://github.com/aquasecurity/trivy/issues) associated with that discussion.
|
||||
|
||||
- Feel free to open discussions for any reason. When you open a new discussion, you'll have to select a discussion category as described below.
|
||||
- Please spend a small amount of time giving due diligence to the issue/discussion tracker. Your discussion might be a duplicate. If it is, please add your comment to the existing issue/discussion.
|
||||
- Remember that users might search for your issue/discussion in the future, so please give it a meaningful title to help others.
|
||||
- The issue should clearly explain the reason for opening, the proposal if you have any, and any relevant technical information.
|
||||
|
||||
There are 4 categories:
|
||||
|
||||
- 💡 [Ideas](https://github.com/aquasecurity/trivy/discussions/categories/ideas)
|
||||
- Share ideas for new features
|
||||
- 🔎 [False Detection](https://github.com/aquasecurity/trivy/discussions/categories/false-detection)
|
||||
- Report false positives/negatives
|
||||
- 🐛 [Bugs](https://github.com/aquasecurity/trivy/discussions/categories/bugs)
|
||||
- Report something that is not working as expected
|
||||
- 🙏 [Q&A](https://github.com/aquasecurity/trivy/discussions/categories/q-a)
|
||||
- Ask the community for help
|
||||
|
||||
!!! note
|
||||
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/).
|
||||
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:
|
||||
|
||||
1. Run Trivy with `-f json` that shows data sources.
|
||||
2. According to the shown data source, make sure that the security advisory in the data source is correct.
|
||||
|
||||
If the data source is correct and Trivy shows wrong results, please raise an issue on Trivy.
|
||||
|
||||
### GitHub Advisory Database
|
||||
Visit [here](https://github.com/advisories) and search CVE-ID.
|
||||
|
||||
If you find a problem, it'll be nice to fix it: [How to contribute to a GitHub security advisory](https://github.blog/2022-02-22-github-advisory-database-now-open-to-community-contributions/)
|
||||
|
||||
### GitLab Advisory Database
|
||||
Visit [here](https://advisories.gitlab.com/) and search CVE-ID.
|
||||
|
||||
If you find a problem, it'll be nice to fix it: [Create an issue to GitLab Advisory Database](https://gitlab.com/gitlab-org/security-products/gemnasium-db/-/issues/new)
|
||||
|
||||
### Red Hat CVE Database
|
||||
Visit [here](https://access.redhat.com/security/security-updates/?cwe=476#/cve) and search CVE-ID.
|
||||
|
||||
@@ -1,31 +1,4 @@
|
||||
# Issues
|
||||
Thank you for taking interest in contributing to Trivy!
|
||||
|
||||
- Feel free to open issues for any reason. When you open a new issue, you'll have to select an issue kind: bug/feature/support and fill the required information based on the selected template.
|
||||
- Please spend a small amount of time giving due diligence to the issue tracker. Your issue might be a duplicate. If it is, please add your comment to the existing issue.
|
||||
- Remember that users might search for your issue in the future, so please give it a meaningful title to help others.
|
||||
- The issue should clearly explain the reason for opening, the proposal if you have any, and any relevant technical information.
|
||||
|
||||
## Wrong detection
|
||||
Trivy depends on [multiple data sources](https://aquasecurity.github.io/trivy/latest/docs/vulnerability/detection/data-source/).
|
||||
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:
|
||||
|
||||
1. Run Trivy with `-f json` that shows data sources.
|
||||
2. According to the shown data source, make sure that the security advisory in the data source is correct.
|
||||
|
||||
If the data source is correct and Trivy shows wrong results, please raise an issue on Trivy.
|
||||
|
||||
### GitHub Advisory Database
|
||||
Visit [here](https://github.com/advisories) and search CVE-ID.
|
||||
|
||||
If you find a problem, it'll be nice to fix it: [How to contribute to a GitHub security advisory](https://github.blog/2022-02-22-github-advisory-database-now-open-to-community-contributions/)
|
||||
|
||||
### GitLab Advisory Database
|
||||
Visit [here](https://advisories.gitlab.com/) and search CVE-ID.
|
||||
|
||||
If you find a problem, it'll be nice to fix it: [Create an issue to GitLab Advisory Database](https://gitlab.com/gitlab-org/security-products/gemnasium-db/-/issues/new)
|
||||
|
||||
### Red Hat CVE Database
|
||||
Visit [here](https://access.redhat.com/security/security-updates/?cwe=476#/cve) and search CVE-ID.
|
||||
|
||||
Trivy uses [GitHub Discussion](./discussion.md) for bug reports, feature requests, and questions.
|
||||
@@ -17,88 +17,6 @@ If you don't need secret scanning, it can be disabled.
|
||||
$ trivy image --scanners vuln alpine:3.15
|
||||
```
|
||||
|
||||
## Skip Files
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
By default, Trivy traverses directories and searches for all necessary files for scanning.
|
||||
You can skip files that you don't maintain using the `--skip-files` flag.
|
||||
|
||||
```
|
||||
$ trivy image --skip-files "/Gemfile.lock" --skip-files "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0/Gemfile.lock" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
|
||||
```
|
||||
|
||||
It's possible to specify globs as part of the value.
|
||||
|
||||
```bash
|
||||
$ trivy image --skip-files "./testdata/*/bar" .
|
||||
```
|
||||
|
||||
Will skip any file named `bar` in the subdirectories of testdata.
|
||||
|
||||
## Skip Directories
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
By default, Trivy traverses directories and searches for all necessary files for scanning.
|
||||
You can skip directories that you don't maintain using the `--skip-dirs` flag.
|
||||
|
||||
```
|
||||
$ trivy image --skip-dirs /var/lib/gems/2.5.0/gems/fluent-plugin-detect-exceptions-0.0.13 --skip-dirs "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
|
||||
```
|
||||
|
||||
It's possible to specify globs as part of the value.
|
||||
|
||||
```bash
|
||||
$ trivy image --skip-dirs "./testdata/*" .
|
||||
```
|
||||
|
||||
Will skip all subdirectories of the testdata directory.
|
||||
|
||||
!!! tip
|
||||
Glob patterns work with any trivy subcommand (image, config, etc.) and can be specified to skip both directories (with `--skip-dirs`) and files (with `--skip-files`).
|
||||
|
||||
|
||||
### Advanced globbing
|
||||
Trivy also supports the [globstar](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Pattern-Matching) pattern matching.
|
||||
|
||||
```bash
|
||||
$ trivy image --skip-files "**/foo"``` image:tag
|
||||
```
|
||||
|
||||
Will skip the file `foo` that happens to be nested under any parent(s).
|
||||
|
||||
## File patterns
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | |
|
||||
| License | |
|
||||
|
||||
When a directory is given as an input, Trivy will recursively look for and test all files based on file patterns.
|
||||
The default file patterns are [here](../scanner/misconfiguration/custom/index.md).
|
||||
|
||||
In addition to the default file patterns, the `--file-patterns` option takes regexp patterns to look for your files.
|
||||
For example, it may be useful when your file name of Dockerfile doesn't match the default patterns.
|
||||
|
||||
This can be repeated for specifying multiple file patterns.
|
||||
|
||||
A file pattern contains the analyzer it is used for, and the pattern itself, joined by a semicolon. For example:
|
||||
```
|
||||
--file-patterns "dockerfile:.*.docker" --file-patterns "yaml:deployment" --file-patterns "pip:requirements-.*\.txt"
|
||||
```
|
||||
|
||||
The prefixes are listed [here](https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/pkg/fanal/analyzer/const.go)
|
||||
|
||||
## Exit Code
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Reporting
|
||||
|
||||
## Supported Formats
|
||||
Trivy supports the following formats:
|
||||
|
||||
- Table
|
||||
@@ -8,7 +9,7 @@ Trivy supports the following formats:
|
||||
- Template
|
||||
- SBOM
|
||||
|
||||
## Table (Default)
|
||||
### Table (Default)
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
@@ -21,7 +22,7 @@ Trivy supports the following formats:
|
||||
$ trivy image -f table golang:1.12-alpine
|
||||
```
|
||||
|
||||
### Show origins of vulnerable dependencies
|
||||
#### Show origins of vulnerable dependencies
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
@@ -105,7 +106,7 @@ Also, **glob-parent@3.1.0** with some vulnerabilities is included through chain
|
||||
|
||||
Then, you can try to update **axios@0.21.4** and **cra-append-sw@2.7.0** to resolve vulnerabilities in **follow-redirects@1.14.6** and **glob-parent@3.1.0**.
|
||||
|
||||
## JSON
|
||||
### JSON
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
@@ -239,7 +240,7 @@ $ trivy image -f json -o results.json golang:1.12-alpine
|
||||
|
||||
`VulnerabilityID`, `PkgName`, `InstalledVersion`, and `Severity` in `Vulnerabilities` are always filled with values, but other fields might be empty.
|
||||
|
||||
## SARIF
|
||||
### SARIF
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
@@ -255,7 +256,7 @@ $ trivy image --format sarif -o report.sarif golang:1.12-alpine
|
||||
|
||||
This SARIF file can be uploaded to GitHub code scanning results, and there is a [Trivy GitHub Action][action] for automating this process.
|
||||
|
||||
## Template
|
||||
### Template
|
||||
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
@@ -264,7 +265,7 @@ This SARIF file can be uploaded to GitHub code scanning results, and there is a
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
### Custom Template
|
||||
#### Custom Template
|
||||
|
||||
{% raw %}
|
||||
```
|
||||
@@ -301,18 +302,18 @@ Critical: 0, High: 2
|
||||
|
||||
For other features of sprig, see the official [sprig][sprig] documentation.
|
||||
|
||||
### Load templates from a file
|
||||
#### Load templates from a file
|
||||
You can load templates from a file prefixing the template path with an @.
|
||||
|
||||
```
|
||||
$ trivy image --format template --template "@/path/to/template" golang:1.12-alpine
|
||||
```
|
||||
|
||||
### Default Templates
|
||||
#### Default Templates
|
||||
|
||||
If Trivy is installed using rpm then default templates can be found at `/usr/local/share/trivy/templates`.
|
||||
|
||||
#### JUnit
|
||||
##### JUnit
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
@@ -325,7 +326,7 @@ In the following example using the template `junit.tpl` XML can be generated.
|
||||
$ trivy image --format template --template "@contrib/junit.tpl" -o junit-report.xml golang:1.12-alpine
|
||||
```
|
||||
|
||||
#### ASFF
|
||||
##### ASFF
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
@@ -335,7 +336,7 @@ $ trivy image --format template --template "@contrib/junit.tpl" -o junit-report.
|
||||
|
||||
Trivy also supports an [ASFF template for reporting findings to AWS Security Hub][asff]
|
||||
|
||||
#### HTML
|
||||
##### HTML
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
@@ -353,9 +354,34 @@ The following example shows use of default HTML template when Trivy is installed
|
||||
$ trivy image --format template --template "@/usr/local/share/trivy/templates/html.tpl" -o report.html golang:1.12-alpine
|
||||
```
|
||||
|
||||
## SBOM
|
||||
### SBOM
|
||||
See [here](../supply-chain/sbom.md) for details.
|
||||
|
||||
## Converting
|
||||
To generate multiple reports, you can generate the JSON report first and convert it to other formats with the `convert` subcommand.
|
||||
|
||||
```shell
|
||||
$ trivy image --format json -o result.json --list-all-pkgs debian:11
|
||||
$ trivy convert --format cyclonedx --output result.cdx result.json
|
||||
```
|
||||
|
||||
!!! note
|
||||
Please note that if you want to convert to a format that requires a list of packages,
|
||||
such as SBOM, you need to add the `--list-all-pkgs` flag when outputting in JSON.
|
||||
|
||||
[Filtering options](./filtering.md) such as `--severity` are also available with `convert`.
|
||||
|
||||
```shell
|
||||
# Output all severities in JSON
|
||||
$ trivy image --format json -o result.json --list-all-pkgs debian:11
|
||||
|
||||
# Output only critical issues in table format
|
||||
$ trivy convert --format table --severity CRITICAL result.json
|
||||
```
|
||||
|
||||
!!! note
|
||||
JSON reports from "trivy aws" and "trivy k8s" are not yet supported.
|
||||
|
||||
[cargo-auditable]: https://github.com/rust-secure-code/cargo-auditable/
|
||||
[action]: https://github.com/aquasecurity/trivy-action
|
||||
[asff]: ../../tutorials/integrations/aws-security-hub.md
|
||||
|
||||
85
docs/docs/configuration/skipping.md
Normal file
85
docs/docs/configuration/skipping.md
Normal file
@@ -0,0 +1,85 @@
|
||||
# Skipping Files and Directories
|
||||
|
||||
This section details ways to specify the files and directories that Trivy should not scan.
|
||||
|
||||
## Skip Files
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
By default, Trivy traverses directories and searches for all necessary files for scanning.
|
||||
You can skip files that you don't maintain using the `--skip-files` flag.
|
||||
|
||||
```
|
||||
$ trivy image --skip-files "/Gemfile.lock" --skip-files "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0/Gemfile.lock" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
|
||||
```
|
||||
|
||||
It's possible to specify globs as part of the value.
|
||||
|
||||
```bash
|
||||
$ trivy image --skip-files "./testdata/*/bar" .
|
||||
```
|
||||
|
||||
Will skip any file named `bar` in the subdirectories of testdata.
|
||||
|
||||
## Skip Directories
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | ✓ |
|
||||
| License | ✓ |
|
||||
|
||||
By default, Trivy traverses directories and searches for all necessary files for scanning.
|
||||
You can skip directories that you don't maintain using the `--skip-dirs` flag.
|
||||
|
||||
```
|
||||
$ trivy image --skip-dirs /var/lib/gems/2.5.0/gems/fluent-plugin-detect-exceptions-0.0.13 --skip-dirs "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
|
||||
```
|
||||
|
||||
It's possible to specify globs as part of the value.
|
||||
|
||||
```bash
|
||||
$ trivy image --skip-dirs "./testdata/*" .
|
||||
```
|
||||
|
||||
Will skip all subdirectories of the testdata directory.
|
||||
|
||||
!!! tip
|
||||
Glob patterns work with any trivy subcommand (image, config, etc.) and can be specified to skip both directories (with `--skip-dirs`) and files (with `--skip-files`).
|
||||
|
||||
|
||||
### Advanced globbing
|
||||
Trivy also supports the [globstar](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Pattern-Matching) pattern matching.
|
||||
|
||||
```bash
|
||||
$ trivy image --skip-files "**/foo" image:tag
|
||||
```
|
||||
|
||||
Will skip the file `foo` that happens to be nested under any parent(s).
|
||||
|
||||
## File patterns
|
||||
| Scanner | Supported |
|
||||
|:----------------:|:---------:|
|
||||
| Vulnerability | ✓ |
|
||||
| Misconfiguration | ✓ |
|
||||
| Secret | |
|
||||
| License | |
|
||||
|
||||
When a directory is given as an input, Trivy will recursively look for and test all files based on file patterns.
|
||||
The default file patterns are [here](../scanner/misconfiguration/custom/index.md).
|
||||
|
||||
In addition to the default file patterns, the `--file-patterns` option takes regexp patterns to look for your files.
|
||||
For example, it may be useful when your file name of Dockerfile doesn't match the default patterns.
|
||||
|
||||
This can be repeated for specifying multiple file patterns.
|
||||
|
||||
A file pattern contains the analyzer it is used for, and the pattern itself, joined by a semicolon. For example:
|
||||
```
|
||||
--file-patterns "dockerfile:.*.docker" --file-patterns "kubernetes:*.tpl" --file-patterns "pip:requirements-.*\.txt"
|
||||
```
|
||||
|
||||
The prefixes are listed [here](https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/pkg/fanal/analyzer/const.go)
|
||||
@@ -45,6 +45,7 @@ trivy [global flags] command [flags] target
|
||||
|
||||
* [trivy aws](trivy_aws.md) - [EXPERIMENTAL] Scan AWS account
|
||||
* [trivy config](trivy_config.md) - Scan config files for misconfigurations
|
||||
* [trivy convert](trivy_convert.md) - Convert Trivy JSON report into a different format
|
||||
* [trivy filesystem](trivy_filesystem.md) - Scan local filesystem
|
||||
* [trivy image](trivy_image.md) - Scan a container image
|
||||
* [trivy kubernetes](trivy_kubernetes.md) - [EXPERIMENTAL] Scan kubernetes cluster
|
||||
|
||||
@@ -88,9 +88,11 @@ trivy aws [flags]
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--region string AWS Region to scan
|
||||
--report string specify a report format for the output. (all,summary) (default "all")
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--service strings Only scan AWS Service(s) specified with this flag. Can specify multiple services using --service A --service B etc.
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
--skip-service strings Skip selected AWS Service(s) specified with this flag. Can specify multiple services using --skip-service A --skip-service B etc.
|
||||
-t, --template string output template
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--trace enable more verbose trace output for custom queries
|
||||
|
||||
@@ -37,6 +37,7 @@ trivy config [flags] DIR
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--report string specify a compliance report format for the output. (all,summary) (default "all")
|
||||
--reset-policy-bundle remove policy bundle
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
|
||||
52
docs/docs/references/configuration/cli/trivy_convert.md
Normal file
52
docs/docs/references/configuration/cli/trivy_convert.md
Normal file
@@ -0,0 +1,52 @@
|
||||
## trivy convert
|
||||
|
||||
Convert Trivy JSON report into a different format
|
||||
|
||||
```
|
||||
trivy convert [flags] RESULT_JSON
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
# report conversion
|
||||
$ trivy image --format json --output result.json --list-all-pkgs debian:11
|
||||
$ trivy convert --format cyclonedx --output result.cdx result.json
|
||||
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--compliance string compliance report to generate
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
|
||||
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
|
||||
-h, --help help for convert
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
|
||||
-o, --output string output file name
|
||||
--report string specify a report format for the output. (all,summary) (default "all")
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
-t, --template string output template
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--cache-dir string cache directory (default "/path/to/cache")
|
||||
-c, --config string config path (default "trivy.yaml")
|
||||
-d, --debug debug mode
|
||||
--generate-default-config write the default config to trivy-default.yaml
|
||||
--insecure allow insecure server connections
|
||||
-q, --quiet suppress progress bar and log output
|
||||
--timeout duration timeout (default 5m0s)
|
||||
-v, --version show version
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [trivy](trivy.md) - Unified security scanner
|
||||
|
||||
@@ -43,6 +43,7 @@ trivy filesystem [flags] PATH
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-dev-deps include development dependencies in the report (supported: npm)
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--license-confidence-level float specify license classifier's confidence level (default 0.9)
|
||||
@@ -62,6 +63,7 @@ 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
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
@@ -79,7 +81,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.
|
||||
--vuln-type string comma-separated list of vulnerability types (os,library) (default "os,library")
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -61,6 +61,7 @@ trivy image [flags] IMAGE_NAME
|
||||
--ignored-licenses strings specify a list of license to ignore
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--image-config-scanners string comma-separated list of what security issues to detect on container image configurations (config,secret)
|
||||
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--input string input file path instead of image name
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
@@ -83,6 +84,7 @@ trivy image [flags] IMAGE_NAME
|
||||
--removed-pkgs detect vulnerabilities of removed packages (only for Alpine)
|
||||
--report string specify a format for the compliance report. (default "summary")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
@@ -100,7 +102,7 @@ trivy image [flags] IMAGE_NAME
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type string comma-separated list of vulnerability types (os,library) (default "os,library")
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -27,63 +27,70 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
|
||||
### Options
|
||||
|
||||
```
|
||||
-A, --all-namespaces fetch resources from all cluster namespaces
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate (k8s-nsa,k8s-cis, k8s-pss-baseline, k8s-pss-restricted)
|
||||
--components strings specify which components to scan (default [workload,infra])
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify paths to the Rego policy files directory, applying config files
|
||||
--context string specify a context to scan
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--exit-code int specify exit code when any security issues are found
|
||||
--file-patterns strings specify config file patterns
|
||||
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
|
||||
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for kubernetes
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--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
|
||||
-n, --namespace string specify a namespace to scan
|
||||
--no-progress suppress progress bar
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--parallel int number (between 1-20) of goroutines enabled for parallel scanning (default 5)
|
||||
--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
|
||||
--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
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners string comma-separated list of what security issues to detect (vuln,config,secret,license) (default "vuln,config,secret,rbac")
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--tolerations strings specify node-collector job tolerations (example: key1=value1:NoExecute,key2=value2:NoSchedule)
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--vuln-type string comma-separated list of vulnerability types (os,library) (default "os,library")
|
||||
-A, --all-namespaces fetch resources from all cluster namespaces
|
||||
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
|
||||
--cache-ttl duration cache TTL when using redis as cache backend
|
||||
--clear-cache clear image caches without scanning
|
||||
--compliance string compliance report to generate (k8s-nsa,k8s-cis, k8s-pss-baseline, k8s-pss-restricted)
|
||||
--components strings specify which components to scan (default [workload,infra])
|
||||
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
|
||||
--config-policy strings specify paths to the Rego policy files directory, applying config files
|
||||
--context string specify a context to scan
|
||||
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
|
||||
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
|
||||
--download-db-only download/update vulnerability database but don't run a scan
|
||||
--download-java-db-only download/update Java index database but don't run a scan
|
||||
--exclude-nodes strings indicate the node labels that the node-collector job should exclude from scanning (example: kubernetes.io/arch:arm64,team:dev)
|
||||
--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-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--helm-values strings specify paths to override the Helm values.yaml files
|
||||
-h, --help help for kubernetes
|
||||
--ignore-policy string specify the Rego file path to evaluate each vulnerability
|
||||
--ignore-unfixed display only fixed vulnerabilities
|
||||
--ignorefile string specify .trivyignore file (default ".trivyignore")
|
||||
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
|
||||
--include-non-failures include successes and exceptions, available with '--scanners config'
|
||||
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
|
||||
--k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
|
||||
--kubeconfig string specify the kubeconfig file path to use
|
||||
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
|
||||
-n, --namespace string specify a namespace to scan
|
||||
--no-progress suppress progress bar
|
||||
--node-collector-namespace string specify the namespace in which the node-collector job should be deployed (default "trivy-temp")
|
||||
--offline-scan do not issue API requests to identify dependencies
|
||||
-o, --output string output file name
|
||||
--parallel int number (between 1-20) of goroutines enabled for parallel scanning (default 5)
|
||||
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
|
||||
--policy-namespaces strings Rego namespaces
|
||||
--redis-ca string redis ca file location, if using redis as cache backend
|
||||
--redis-cert string redis certificate file location, if using redis as cache backend
|
||||
--redis-key string redis key file location, if using redis as cache backend
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--registry-token string registry token
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--report string specify a report format for the output. (all,summary) (default "all")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners string comma-separated list of what security issues to detect (vuln,config,secret,license) (default "vuln,config,secret,rbac")
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-db-update skip updating vulnerability database
|
||||
--skip-dirs strings specify the directories where the traversal is skipped
|
||||
--skip-files strings specify the file paths to skip traversal
|
||||
--skip-java-db-update skip updating Java index database
|
||||
--skip-policy-update skip fetching rego policy updates
|
||||
--slow scan over time with lower CPU and memory utilization
|
||||
-t, --template string output template
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--tolerations strings specify node-collector job tolerations (example: key1=value1:NoExecute,key2=value2:NoSchedule)
|
||||
--trace enable more verbose trace output for custom queries
|
||||
--username strings username. Comma-separated usernames allowed.
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -59,6 +59,7 @@ trivy repository [flags] 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
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
@@ -77,7 +78,7 @@ trivy repository [flags] 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.
|
||||
--vuln-type string comma-separated list of vulnerability types (os,library) (default "os,library")
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -64,6 +64,7 @@ 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
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
@@ -81,7 +82,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.
|
||||
--vuln-type string comma-separated list of vulnerability types (os,library) (default "os,library")
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -12,9 +12,6 @@ trivy sbom [flags] SBOM_PATH
|
||||
# Scan CycloneDX and show the result in tables
|
||||
$ trivy sbom /path/to/report.cdx
|
||||
|
||||
# Scan CycloneDX and generate a CycloneDX report
|
||||
$ trivy sbom --format cyclonedx /path/to/report.cdx
|
||||
|
||||
# Scan CycloneDX-type attestation and show the result in tables
|
||||
$ trivy sbom /path/to/report.cdx.intoto.jsonl
|
||||
|
||||
@@ -51,7 +48,6 @@ trivy sbom [flags] SBOM_PATH
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--reset remove all caches and database
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
|
||||
--server string server address in client mode
|
||||
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
|
||||
--skip-db-update skip updating vulnerability database
|
||||
@@ -63,7 +59,7 @@ trivy sbom [flags] SBOM_PATH
|
||||
--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 string comma-separated list of vulnerability types (os,library) (default "os,library")
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -56,6 +56,7 @@ trivy vm [flags] VM_IMAGE
|
||||
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
|
||||
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
|
||||
--reset remove all caches and database
|
||||
--reset-policy-bundle remove policy bundle
|
||||
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
|
||||
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
|
||||
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
|
||||
@@ -70,7 +71,7 @@ trivy vm [flags] VM_IMAGE
|
||||
--tf-vars strings specify paths to override the Terraform tfvars files
|
||||
--token string for authentication in client/server mode
|
||||
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
|
||||
--vuln-type string comma-separated list of vulnerability types (os,library) (default "os,library")
|
||||
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
@@ -1,296 +0,0 @@
|
||||
# Examples
|
||||
|
||||
## Custom Policy
|
||||
### Kubernetes
|
||||
See [here][k8s].
|
||||
|
||||
The custom policy is defined in `user.kubernetes.ID001` package.
|
||||
You need to pass the package prefix you want to evaluate through `--namespaces` option.
|
||||
In this case, the package prefix should be `user`, `user.kubernetes`, or `user.kubernetes.ID001`.
|
||||
|
||||
### Dockerfile
|
||||
See [here][dockerfile].
|
||||
|
||||
The input will be a dictionary of stages.
|
||||
|
||||
#### Single Stage
|
||||
|
||||
??? example
|
||||
Dockerfile
|
||||
```dockerfile
|
||||
FROM foo
|
||||
COPY . /
|
||||
RUN echo hello
|
||||
```
|
||||
|
||||
Rego Input
|
||||
```json
|
||||
{
|
||||
"stages": {
|
||||
"foo": [
|
||||
{
|
||||
"Cmd": "from",
|
||||
"EndLine": 1,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "FROM foo",
|
||||
"Stage": 0,
|
||||
"StartLine": 1,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"foo"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "copy",
|
||||
"EndLine": 2,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "COPY . /",
|
||||
"Stage": 0,
|
||||
"StartLine": 2,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
".",
|
||||
"/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "run",
|
||||
"EndLine": 3,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "RUN echo hello",
|
||||
"Stage": 0,
|
||||
"StartLine": 3,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"echo hello"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Multi Stage
|
||||
|
||||
??? example
|
||||
Dockerfile
|
||||
```dockerfile
|
||||
FROM golang:1.16 AS builder
|
||||
WORKDIR /go/src/github.com/alexellis/href-counter/
|
||||
RUN go get -d -v golang.org/x/net/html
|
||||
COPY app.go .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates \
|
||||
&& apk add --no-cache bash
|
||||
WORKDIR /root/
|
||||
COPY --from=builder /go/src/github.com/alexellis/href-counter/app .
|
||||
CMD ["./app"]
|
||||
```
|
||||
|
||||
Rego Input
|
||||
```json
|
||||
{
|
||||
"stages": {
|
||||
"alpine:latest": [
|
||||
{
|
||||
"Cmd": "from",
|
||||
"EndLine": 7,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "FROM alpine:latest",
|
||||
"Stage": 1,
|
||||
"StartLine": 7,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"alpine:latest"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "run",
|
||||
"EndLine": 9,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "RUN apk --no-cache add ca-certificates \u0026\u0026 apk add --no-cache bash",
|
||||
"Stage": 1,
|
||||
"StartLine": 8,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"apk --no-cache add ca-certificates \u0026\u0026 apk add --no-cache bash"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "workdir",
|
||||
"EndLine": 10,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "WORKDIR /root/",
|
||||
"Stage": 1,
|
||||
"StartLine": 10,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"/root/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "copy",
|
||||
"EndLine": 11,
|
||||
"Flags": [
|
||||
"--from=builder"
|
||||
],
|
||||
"JSON": false,
|
||||
"Original": "COPY --from=builder /go/src/github.com/alexellis/href-counter/app .",
|
||||
"Stage": 1,
|
||||
"StartLine": 11,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"/go/src/github.com/alexellis/href-counter/app",
|
||||
"."
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "cmd",
|
||||
"EndLine": 12,
|
||||
"Flags": [],
|
||||
"JSON": true,
|
||||
"Original": "CMD [\"./app\"]",
|
||||
"Stage": 1,
|
||||
"StartLine": 12,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"./app"
|
||||
]
|
||||
}
|
||||
],
|
||||
"golang:1.16 AS builder": [
|
||||
{
|
||||
"Cmd": "from",
|
||||
"EndLine": 1,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "FROM golang:1.16 AS builder",
|
||||
"Stage": 0,
|
||||
"StartLine": 1,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"golang:1.16",
|
||||
"AS",
|
||||
"builder"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "workdir",
|
||||
"EndLine": 2,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "WORKDIR /go/src/github.com/alexellis/href-counter/",
|
||||
"Stage": 0,
|
||||
"StartLine": 2,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"/go/src/github.com/alexellis/href-counter/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "run",
|
||||
"EndLine": 3,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "RUN go get -d -v golang.org/x/net/html",
|
||||
"Stage": 0,
|
||||
"StartLine": 3,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"go get -d -v golang.org/x/net/html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "copy",
|
||||
"EndLine": 4,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "COPY app.go .",
|
||||
"Stage": 0,
|
||||
"StartLine": 4,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"app.go",
|
||||
"."
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "run",
|
||||
"EndLine": 5,
|
||||
"Flags": [],
|
||||
"JSON": false,
|
||||
"Original": "RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .",
|
||||
"Stage": 0,
|
||||
"StartLine": 5,
|
||||
"SubCmd": "",
|
||||
"Value": [
|
||||
"CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app ."
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Docker Compose
|
||||
See [here][compose].
|
||||
|
||||
Docker Compose uses YAML format for configurations. You can apply your Rego policies to `docker-compose.yml`.
|
||||
|
||||
### HCL
|
||||
See [here][hcl].
|
||||
|
||||
Trivy parses HCL files and converts into structured data.
|
||||
|
||||
!!! warning
|
||||
Terraform HCL files are not supported yet.
|
||||
|
||||
### Terraform Plan
|
||||
See [here][tfplan].
|
||||
|
||||
Use the command [terraform show][terraform-show] to convert the Terraform plan into JSON so that OPA can read the plan.
|
||||
|
||||
```bash
|
||||
$ terraform init
|
||||
$ terraform plan --out tfplan.binary
|
||||
$ terraform show -json tfplan.binary > tfplan.json
|
||||
```
|
||||
|
||||
For more details, see also [OPA document][opa-terraform].
|
||||
|
||||
### Serverless Framework
|
||||
See [here][serverless].
|
||||
|
||||
Server Framework uses YAML format for configurations. You can apply your Rego policies to `serverless.yaml`.
|
||||
|
||||
## Custom Data
|
||||
See [here][data].
|
||||
|
||||
## Combined Input
|
||||
See [here][combine].
|
||||
|
||||
## Go Testing
|
||||
See [here][go-testing].
|
||||
|
||||
[k8s]:https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/custom-policy/kubernetes/
|
||||
[dockerfile]:https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/custom-policy/dockerfile/
|
||||
[compose]:https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/custom-policy/docker-compose/
|
||||
[hcl]:https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/custom-policy/hcl/
|
||||
[serverless]:https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/custom-policy/serverless/
|
||||
[tfplan]:https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/custom-policy/terraform-plan/
|
||||
[terraform-show]: https://www.terraform.io/docs/cli/commands/show.html
|
||||
[opa-terraform]: https://www.openpolicyagent.org/docs/latest/terraform/
|
||||
|
||||
[custom]: https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/custom-policy
|
||||
[data]: https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/custom-data
|
||||
[combine]: https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/combine
|
||||
[go-testing]: https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/examples/misconf/go-testing
|
||||
|
||||
@@ -8,6 +8,9 @@ Once you finish writing custom policies, you can pass the directory where those
|
||||
trivy conf --policy /path/to/custom_policies --namespaces user /path/to/config_dir
|
||||
```
|
||||
|
||||
!!! Tip
|
||||
Note: The `--policy` path always needs to refer to a directory. You cannot pass a specific policy file.
|
||||
|
||||
As for `--namespaces` option, the detail is described as below.
|
||||
|
||||
### File formats
|
||||
|
||||
@@ -327,7 +327,8 @@ trivy conf --policy custom-policy/policy --policy combine/policy --namespaces us
|
||||
For more details, see [Custom Policies](./custom/index.md).
|
||||
|
||||
!!! tip
|
||||
You also need to specify `--namespaces` option.
|
||||
You also need to specify `--namespaces` option.
|
||||
Furthermore, the `--policy` path always needs to refer to a directory. You cannot pass a specific policy file.
|
||||
|
||||
### Pass custom data
|
||||
You can pass directories including your custom data through `--data` option.
|
||||
|
||||
@@ -95,6 +95,9 @@ Trivy tries to load `trivy-secret.yaml` in the current directory by default.
|
||||
If the file doesn't exist, only built-in rules are used.
|
||||
You can customize the config file path via the `--secret-config` flag.
|
||||
|
||||
!!! warning
|
||||
Trivy uses [Golang regexp package](https://pkg.go.dev/regexp/syntax#hdr-Syntax). To use `^` and `$` as simbols of begin and end of line use multi-line mode -`(?m)`.
|
||||
|
||||
### Custom Rules
|
||||
Trivy allows defining custom rules.
|
||||
|
||||
|
||||
@@ -4,33 +4,33 @@
|
||||
|
||||
## Supported languages
|
||||
|
||||
| Language | File | Image[^7] | Rootfs[^8] | Filesystem[^9] | Repository[^10] | Dev dependencies | Dependency location[^11] |
|
||||
|----------------------|--------------------------------------------------------------------------------------------|:---------:|:----------:|:--------------:|:---------------:|------------------|:------------------------:|
|
||||
| Ruby | Gemfile.lock | - | - | ✅ | ✅ | included | - |
|
||||
| | gemspec | ✅ | ✅ | - | - | included | - |
|
||||
| [Python](python.md) | Pipfile.lock | - | - | ✅ | ✅ | excluded | ✅ |
|
||||
| | poetry.lock | - | - | ✅ | ✅ | excluded | - |
|
||||
| | requirements.txt | - | - | ✅ | ✅ | included | - |
|
||||
| | egg package[^1] | ✅ | ✅ | - | - | excluded | - |
|
||||
| | wheel package[^2] | ✅ | ✅ | - | - | excluded | - |
|
||||
| [PHP](php.md) | composer.lock | ✅ | ✅ | ✅ | ✅ | excluded | ✅ |
|
||||
| [Node.js](nodejs.md) | package-lock.json | - | - | ✅ | ✅ | excluded | ✅ |
|
||||
| | yarn.lock | - | - | ✅ | ✅ | included | ✅ |
|
||||
| | pnpm-lock.yaml | - | - | ✅ | ✅ | excluded | - |
|
||||
| | package.json | ✅ | ✅ | - | - | excluded | - |
|
||||
| .NET | packages.lock.json | ✅ | ✅ | ✅ | ✅ | included | ✅ |
|
||||
| | packages.config | ✅ | ✅ | ✅ | ✅ | excluded | - |
|
||||
| | .deps.json | ✅ | ✅ | ✅ | ✅ | excluded | ✅ |
|
||||
| [Java](java.md) | JAR/WAR/PAR/EAR[^3] | ✅ | ✅ | - | - | included | - |
|
||||
| | pom.xml[^4] | - | - | ✅ | ✅ | excluded | - |
|
||||
| | *gradle.lockfile | - | - | ✅ | ✅ | excluded | - |
|
||||
| [Go](golang.md) | Binaries built by Go[^5] | ✅ | ✅ | - | - | excluded | - |
|
||||
| | go.mod[^6] | - | - | ✅ | ✅ | included | - |
|
||||
| [Rust](rust.md) | Cargo.lock | ✅ | ✅ | ✅ | ✅ | excluded | ✅ |
|
||||
| | Binaries built with [cargo-auditable](https://github.com/rust-secure-code/cargo-auditable) | ✅ | ✅ | - | - | excluded | - |
|
||||
| C/C++ | conan.lock[^12] | - | - | ✅ | ✅ | excluded | - |
|
||||
| Elixir | mix.lock[^12] | - | - | ✅ | ✅ | excluded | ✅ |
|
||||
| Dart | pubspec.lock | ✅ | ✅ | - | - | included | - |
|
||||
| Language | File | Image[^7] | Rootfs[^8] | Filesystem[^9] | Repository[^10] | Dev dependencies | Dependency location[^11] |
|
||||
|----------------------|--------------------------------------------------------------------------------------------|:---------:|:----------:|:--------------:|:---------------:|------------------------------|:------------------------:|
|
||||
| Ruby | Gemfile.lock | - | - | ✅ | ✅ | included | - |
|
||||
| | gemspec | ✅ | ✅ | - | - | included | - |
|
||||
| [Python](python.md) | Pipfile.lock | - | - | ✅ | ✅ | excluded | ✅ |
|
||||
| | poetry.lock | - | - | ✅ | ✅ | excluded | - |
|
||||
| | requirements.txt | - | - | ✅ | ✅ | included | - |
|
||||
| | egg package[^1] | ✅ | ✅ | - | - | excluded | - |
|
||||
| | wheel package[^2] | ✅ | ✅ | - | - | excluded | - |
|
||||
| [PHP](php.md) | composer.lock | ✅ | ✅ | ✅ | ✅ | excluded | ✅ |
|
||||
| [Node.js](nodejs.md) | package-lock.json | - | - | ✅ | ✅ | [excluded](./nodejs.md#npm) | ✅ |
|
||||
| | yarn.lock | - | - | ✅ | ✅ | [excluded](./nodejs.md#yarn) | ✅ |
|
||||
| | pnpm-lock.yaml | - | - | ✅ | ✅ | excluded | - |
|
||||
| | package.json | ✅ | ✅ | - | - | excluded | - |
|
||||
| .NET | packages.lock.json | ✅ | ✅ | ✅ | ✅ | included | ✅ |
|
||||
| | packages.config | ✅ | ✅ | ✅ | ✅ | excluded | - |
|
||||
| | .deps.json | ✅ | ✅ | ✅ | ✅ | excluded | ✅ |
|
||||
| [Java](java.md) | JAR/WAR/PAR/EAR[^3] | ✅ | ✅ | - | - | included | - |
|
||||
| | pom.xml[^4] | - | - | ✅ | ✅ | excluded | - |
|
||||
| | *gradle.lockfile | - | - | ✅ | ✅ | excluded | - |
|
||||
| [Go](golang.md) | Binaries built by Go[^5] | ✅ | ✅ | - | - | excluded | - |
|
||||
| | go.mod[^6] | - | - | ✅ | ✅ | included | - |
|
||||
| [Rust](rust.md) | Cargo.lock | ✅ | ✅ | ✅ | ✅ | excluded | ✅ |
|
||||
| | Binaries built with [cargo-auditable](https://github.com/rust-secure-code/cargo-auditable) | ✅ | ✅ | - | - | excluded | - |
|
||||
| C/C++ | conan.lock[^12] | - | - | ✅ | ✅ | excluded | - |
|
||||
| Elixir | mix.lock[^12] | - | - | ✅ | ✅ | excluded | ✅ |
|
||||
| Dart | pubspec.lock | - | - | ✅ | ✅ | included | - |
|
||||
|
||||
The path of these files does not matter.
|
||||
|
||||
@@ -64,7 +64,7 @@ Example: [Dockerfile](https://github.com/aquasecurity/trivy-ci-test/blob/main/Do
|
||||
| | [GitHub Advisory Database (npm)][nodejs-ghsa] | ✅ | - |
|
||||
| Java | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
||||
| | [GitHub Advisory Database (Maven)][java-ghsa] | ✅ | - |
|
||||
| Go | [GitLab Advisories Community][gitlab] | ✅ | 1 month |
|
||||
| Go | [GitHub Advisory Database (Go)][go-ghsa] | ✅ | - |
|
||||
| | [The Go Vulnerability Database][go] | ✅ | - |
|
||||
| Rust | [Open Source Vulnerabilities (crates.io)][rust-osv] | ✅ | - |
|
||||
| .NET | [GitHub Advisory Database (NuGet)][dotnet-ghsa] | ✅ | - |
|
||||
@@ -82,6 +82,7 @@ Example: [Dockerfile](https://github.com/aquasecurity/trivy-ci-test/blob/main/Do
|
||||
[dotnet-ghsa]: https://github.com/advisories?query=ecosystem%3Anuget
|
||||
[pub-ghsa]: https://github.com/advisories?query=ecosystem%3Apub
|
||||
[erlang-ghsa]: https://github.com/advisories?query=ecosystem%3Aerlang
|
||||
[go-ghsa]: https://github.com/advisories?query=ecosystem%3Ago
|
||||
|
||||
[php]: https://github.com/FriendsOfPHP/security-advisories
|
||||
[ruby]: https://github.com/rubysec/ruby-advisory-db
|
||||
|
||||
@@ -4,11 +4,11 @@ Trivy supports three types of Java scanning: `JAR/WAR/PAR/EAR`, `pom.xml` and `*
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
|
||||
| Artifact | Internet access | Dev dependencies |
|
||||
|------------------|:---------------------:|:-----------------|
|
||||
| JAR/WAR/PAR/EAR | Trivy Java DB | Include |
|
||||
| pom.xml | Maven repository [^1] | Exclude |
|
||||
| *gradle.lockfile | - | Exclude |
|
||||
| Artifact | Internet access | Dev dependencies | License |
|
||||
|------------------|:---------------------:|:-----------------|:-------:|
|
||||
| JAR/WAR/PAR/EAR | Trivy Java DB | Include | - |
|
||||
| pom.xml | Maven repository [^1] | Exclude | ✅ |
|
||||
| *gradle.lockfile | - | Exclude | - |
|
||||
|
||||
These may be enabled or disabled depending on the target.
|
||||
See [here](./index.md) for the detail.
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
Trivy supports three types of Node.js package managers: `npm`, `Yarn` and `pnpm`.
|
||||
The following table provides an outline of the features Trivy offers.
|
||||
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | Dependency graph | Position | License |
|
||||
|:---------------:|-------------------|:-----------------------:|:----------------:|:----------------:|:--------:|:-------:|
|
||||
| npm | package-lock.json | ✅ | Excluded | ✅ | ✅ | ✅ |
|
||||
| Yarn | yarn.lock | ✅ | Excluded | ✅ | ✅ | - |
|
||||
| pnpm | pnpm-lock.yaml | ✅ | Excluded | ✅ | - | - |
|
||||
| Package manager | File | Transitive dependencies | Dev dependencies | Dependency graph | Position | License |
|
||||
|:---------------:|-------------------|:-----------------------:|:-----------------:|:----------------:|:--------:|:-------:|
|
||||
| npm | package-lock.json | ✅ | [Excluded](#npm) | ✅ | ✅ | ✅ |
|
||||
| Yarn | yarn.lock | ✅ | [Excluded](#yarn) | ✅ | ✅ | - |
|
||||
| pnpm | pnpm-lock.yaml | ✅ | Excluded | ✅ | - | - |
|
||||
|
||||
In addition, Trivy scans installed packages with `package.json`.
|
||||
|
||||
@@ -29,6 +29,8 @@ Trivy parses `package-lock.json`.
|
||||
To identify licenses, you need to download dependencies to `node_modules` beforehand.
|
||||
Trivy analyzes `node_modules` for licenses.
|
||||
|
||||
By default, Trivy doesn't report development dependencies. Use the `--include-dev-deps` flag to include them.
|
||||
|
||||
### Yarn
|
||||
Trivy parses `yarn.lock`, which doesn't contain information about development dependencies.
|
||||
To exclude devDependencies, `package.json` also needs to be present next to `yarn.lock`.
|
||||
|
||||
@@ -9,25 +9,25 @@ To hide unfixed/unfixable vulnerabilities, you can use the `--ignore-unfixed` fl
|
||||
|
||||
Trivy doesn't support self-compiled packages/binaries, but official packages provided by vendors such as Red Hat and Debian.
|
||||
|
||||
| OS | Supported Versions | Target Packages | Detection of unfixed vulnerabilities |
|
||||
|----------------------------------|-------------------------------------------|-------------------------------|:------------------------------------:|
|
||||
| Alpine Linux | 2.2 - 2.7, 3.0 - 3.17, edge | Installed by apk | NO |
|
||||
| Wolfi Linux | (n/a) | Installed by apk | NO |
|
||||
| Chainguard | (n/a) | Installed by apk | NO |
|
||||
| Red Hat Universal Base Image[^1] | 7, 8, 9 | Installed by yum/rpm | YES |
|
||||
| Red Hat Enterprise Linux | 6, 7, 8 | Installed by yum/rpm | YES |
|
||||
| CentOS | 6, 7, 8 | Installed by yum/rpm | YES |
|
||||
| AlmaLinux | 8, 9 | Installed by yum/rpm | NO |
|
||||
| Rocky Linux | 8, 9 | Installed by yum/rpm | NO |
|
||||
| Oracle Linux | 5, 6, 7, 8 | Installed by yum/rpm | NO |
|
||||
| CBL-Mariner | 1.0, 2.0 | Installed by yum/rpm | YES |
|
||||
| Amazon Linux | 1, 2, 2023 | Installed by yum/rpm | NO |
|
||||
| openSUSE Leap | 42, 15 | Installed by zypper/rpm | NO |
|
||||
| SUSE Enterprise Linux | 11, 12, 15 | Installed by zypper/rpm | NO |
|
||||
| Photon OS | 1.0, 2.0, 3.0, 4.0 | Installed by tdnf/yum/rpm | NO |
|
||||
| Debian GNU/Linux | wheezy, jessie, stretch, buster, bullseye | Installed by apt/apt-get/dpkg | YES |
|
||||
| Ubuntu | All versions supported by Canonical | Installed by apt/apt-get/dpkg | YES |
|
||||
| Distroless[^2] | Any | Installed by apt/apt-get/dpkg | YES |
|
||||
| OS | Supported Versions | Target Packages | Detection of unfixed vulnerabilities |
|
||||
|----------------------------------|-------------------------------------|-------------------------------|:------------------------------------:|
|
||||
| Alpine Linux | 2.2 - 2.7, 3.0 - 3.18, edge | Installed by apk | NO |
|
||||
| Wolfi Linux | (n/a) | Installed by apk | NO |
|
||||
| Chainguard | (n/a) | Installed by apk | NO |
|
||||
| Red Hat Universal Base Image[^1] | 7, 8, 9 | Installed by yum/rpm | YES |
|
||||
| Red Hat Enterprise Linux | 6, 7, 8 | Installed by yum/rpm | YES |
|
||||
| CentOS | 6, 7, 8 | Installed by yum/rpm | YES |
|
||||
| AlmaLinux | 8, 9 | Installed by yum/rpm | NO |
|
||||
| Rocky Linux | 8, 9 | Installed by yum/rpm | NO |
|
||||
| Oracle Linux | 5, 6, 7, 8 | Installed by yum/rpm | NO |
|
||||
| CBL-Mariner | 1.0, 2.0 | Installed by yum/rpm | YES |
|
||||
| Amazon Linux | 1, 2, 2023 | Installed by yum/rpm | NO |
|
||||
| openSUSE Leap | 42, 15 | Installed by zypper/rpm | NO |
|
||||
| SUSE Enterprise Linux | 11, 12, 15 | Installed by zypper/rpm | NO |
|
||||
| Photon OS | 1.0, 2.0, 3.0, 4.0 | Installed by tdnf/yum/rpm | NO |
|
||||
| Debian GNU/Linux | 7, 8, 9, 10, 11, 12 | Installed by apt/apt-get/dpkg | YES |
|
||||
| Ubuntu | All versions supported by Canonical | Installed by apt/apt-get/dpkg | YES |
|
||||
| Distroless[^2] | Any | Installed by apt/apt-get/dpkg | YES |
|
||||
|
||||
## Data Sources
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
# SBOM generation
|
||||
# SBOM
|
||||
|
||||
## Generating
|
||||
|
||||
Trivy can generate the following SBOM formats.
|
||||
|
||||
- [CycloneDX](#cyclonedx)
|
||||
- [SPDX](#spdx)
|
||||
|
||||
## CLI commands
|
||||
### CLI commands
|
||||
To generate SBOM, you can use the `--format` option for each subcommand such as `image`, `fs` and `vm`.
|
||||
|
||||
```
|
||||
@@ -177,7 +179,7 @@ $ trivy fs --format cyclonedx --output result.json /app/myproject
|
||||
|
||||
</details>
|
||||
|
||||
## Supported packages
|
||||
### Supported packages
|
||||
Trivy supports the following packages.
|
||||
|
||||
- [OS packages][os_packages]
|
||||
@@ -196,8 +198,8 @@ In addition to the above packages, Trivy also supports the following packages fo
|
||||
[^1]: Use `startline == 1 and endline == 1` for unsupported file types
|
||||
[^2]: `envs/*/conda-meta/*.json`
|
||||
|
||||
## Formats
|
||||
### CycloneDX
|
||||
### Formats
|
||||
#### CycloneDX
|
||||
Trivy can generate SBOM in the [CycloneDX][cyclonedx] format.
|
||||
Note that XML format is not supported at the moment.
|
||||
|
||||
@@ -222,7 +224,7 @@ $ trivy image --format cyclonedx --output result.json alpine:3.15
|
||||
$ cat result.json | jq .
|
||||
{
|
||||
"bomFormat": "CycloneDX",
|
||||
"specVersion": "1.4",
|
||||
"specVersion": "1.5",
|
||||
"serialNumber": "urn:uuid:2be5773d-7cd3-4b4b-90a5-e165474ddace",
|
||||
"version": 1,
|
||||
"metadata": {
|
||||
@@ -442,7 +444,7 @@ If you want to include vulnerabilities, you can enable vulnerability scanning vi
|
||||
$ trivy image --scanners vuln --format cyclonedx --output result.json alpine:3.15
|
||||
```
|
||||
|
||||
### SPDX
|
||||
#### SPDX
|
||||
Trivy can generate SBOM in the [SPDX][spdx] format.
|
||||
|
||||
You can use the regular subcommands (like `image`, `fs` and `rootfs`) and specify `spdx` with the `--format` option.
|
||||
@@ -737,6 +739,31 @@ $ cat result.spdx.json | jq .
|
||||
|
||||
</details>
|
||||
|
||||
## Scanning
|
||||
Trivy can take SBOM documents as input for scanning.
|
||||
See [here](../target/sbom.md) for more details.
|
||||
|
||||
Also, Trivy searches for SBOM files in container images.
|
||||
|
||||
```bash
|
||||
$ trivy image bitnami/elasticsearch:8.7.1
|
||||
```
|
||||
|
||||
For example, [Bitnami images](https://github.com/bitnami/containers) contain SBOM files in `/opt/bitnami` directory.
|
||||
Trivy automatically detects the SBOM files and uses them for scanning.
|
||||
It is enabled in the following targets.
|
||||
|
||||
| Target | Enabled |
|
||||
|:---------------:|:-------:|
|
||||
| Container Image | ✓ |
|
||||
| Filesystem | |
|
||||
| Rootfs | ✓ |
|
||||
| Git Repository | |
|
||||
| VM Image | ✓ |
|
||||
| Kubernetes | |
|
||||
| AWS | |
|
||||
| SBOM | |
|
||||
|
||||
|
||||
[spdx]: https://spdx.dev/wp-content/uploads/sites/41/2020/08/SPDX-specification-2-2.pdf
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ Take a look at the example below.
|
||||
$ cat <<EOF > trivy.vex.cdx
|
||||
{
|
||||
"bomFormat": "CycloneDX",
|
||||
"specVersion": "1.4",
|
||||
"specVersion": "1.5",
|
||||
"version": 1,
|
||||
"vulnerabilities": [
|
||||
{
|
||||
|
||||
@@ -224,6 +224,23 @@ GitHub Personal Access Token
|
||||
You can see environment variables with `docker inspect`.
|
||||
|
||||
## Supported
|
||||
|
||||
Trivy will look for the specified image in a series of locations. By default, it
|
||||
will first look in the local Docker Engine, then Containerd, Podman, and
|
||||
finally container registry.
|
||||
|
||||
This behavior can be modified with the `--image-src` flag. For example, the
|
||||
command
|
||||
|
||||
```bash
|
||||
trivy image --image-src podman,containerd alpine:3.7.3
|
||||
```
|
||||
|
||||
Will first search in Podman. If the image is found there, it will be scanned
|
||||
and the results returned. If the image is not found in Podman, then Trivy will
|
||||
search in Containerd. If the image is not found there either, the scan will
|
||||
fail and no more image sources will be searched.
|
||||
|
||||
### Docker Engine
|
||||
Trivy tries to looks for the specified image in your local Docker Engine.
|
||||
It will be skipped if Docker Engine is not running locally.
|
||||
@@ -375,6 +392,15 @@ $ skopeo copy docker-daemon:alpine:3.11 oci:/path/to/alpine
|
||||
$ trivy image --input /path/to/alpine
|
||||
```
|
||||
|
||||
Referencing specific images can be done by their tag or by their manifest digest:
|
||||
```
|
||||
# Referenced by tag
|
||||
$ trivy image --input /path/to/alpine:3.15
|
||||
|
||||
# Referenced by digest
|
||||
$ trivy image --input /path/to/alpine@sha256:82389ea44e50c696aba18393b168a833929506f5b29b9d75eb817acceb6d54ba
|
||||
```
|
||||
|
||||
## SBOM
|
||||
Trivy supports the generation of Software Bill of Materials (SBOM) for container images and the search for SBOMs during vulnerability scanning.
|
||||
|
||||
|
||||
@@ -283,6 +283,12 @@ Or, to filter for all other checks besides the infra checks, you can:
|
||||
$ trivy k8s cluster --report summary --components=workload --scanners=config # scan all components besides infra
|
||||
```
|
||||
|
||||
If you wish to exclude nodes from being scanned, you can use the flag `--exclude-nodes` with the node labels
|
||||
|
||||
```
|
||||
trivy k8s cluster --report summary --exclude-nodes kubernetes.io/arch:arm6
|
||||
```
|
||||
|
||||
### Compliance
|
||||
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).
|
||||
@@ -337,3 +343,16 @@ Trivy has a native [Kubernetes Operator][operator] which continuously scans your
|
||||
[operator]: https://kubernetes.io/docs/concepts/extend-kubernetes/operator/
|
||||
[crd]: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
|
||||
[trivy-operator]: https://aquasecurity.github.io/trivy-operator/latest
|
||||
|
||||
## SBOM
|
||||
|
||||
Trivy supports the generation of Kubernetes Bill of Materials (KBOM) for kubernetes cluster control plane components, node components and addons.
|
||||
|
||||
## KBOM
|
||||
|
||||
KBOM, Kubernetes Bill of Materials, is a manifest of all the important components that make up your Kubernetes cluster – Control plane components, Node Components, and Addons, including their versions and images. Which “api-server” version are you currently running? Which flavor of “kubelet” is running on each node? What kind of etcd or storage are you currently using? And most importantly – are there any vulnerabilities known to affect these components? These are all questions that KBOM can help you answer.
|
||||
Trivy can generate KBOM in CycloneDX format:
|
||||
|
||||
```sh
|
||||
trivy k8s cluster --format cyclonedx
|
||||
```
|
||||
@@ -28,10 +28,6 @@ Trivy supports CycloneDX as an input.
|
||||
$ trivy sbom /path/to/cyclonedx.json
|
||||
```
|
||||
|
||||
!!! note
|
||||
If you want to generate a CycloneDX report from a CycloneDX input, please be aware that the output stores references to your original CycloneDX report and contains only detected vulnerabilities, not components.
|
||||
The report is called [BOV](https://cyclonedx.org/capabilities/sbom/).
|
||||
|
||||
## SPDX
|
||||
Trivy supports the SPDX SBOM as an input.
|
||||
|
||||
|
||||
58
docs/getting-started/coverage.md
Normal file
58
docs/getting-started/coverage.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Scanning Coverage
|
||||
|
||||
Trivy can detect security issues in many different platforms and languages. This page gives a general overview of that coverage, and can help answer the frequently asked question "Does Trivy support X?". For more detailed information about the specific features and options, check the relevant scanner documentation.
|
||||
|
||||
## Vulnerabilities & SBOM
|
||||
|
||||
### Programming languages
|
||||
Trivy detects code dependencies for the purpose of SBOM generation and vulnerability detection. The following programming languages have some level of support:
|
||||
|
||||
- Ruby
|
||||
- Python
|
||||
- PHP
|
||||
- Node.js
|
||||
- .NET
|
||||
- Java
|
||||
- Go
|
||||
- Rust
|
||||
- C/C++
|
||||
- Elixir
|
||||
- Dart
|
||||
- Swift
|
||||
|
||||
Some features might be not be universally supported. For a full supportability matrix, [see here](../docs/scanner/vulnerability/language/index.md).
|
||||
|
||||
### OS
|
||||
Trivy detects installed packages for the purpose of vulnerability detection. The following package managers are supported:
|
||||
|
||||
- Alpine Linux
|
||||
- Wolfi Linux
|
||||
- Chainguard
|
||||
- Red Hat Universal Base Image
|
||||
- Red Hat Enterprise Linux
|
||||
- CentOS
|
||||
- AlmaLinux
|
||||
- Rocky Linux
|
||||
- Oracle Linux
|
||||
- CBL-Mariner
|
||||
- Amazon Linux
|
||||
- openSUSE Leap
|
||||
- SUSE Enterprise Linux
|
||||
- Photon OS
|
||||
- Debian GNU/Linux
|
||||
- Ubuntu
|
||||
- Distroless
|
||||
|
||||
Some features might be not be universally supported. For a full supportability matrix, [see here](../docs/scanner/vulnerability/os.md).
|
||||
|
||||
## IaC & configuration
|
||||
Trivy reads IaC & configuration languages for the purpose of misconfiguration detection and custom checks.
|
||||
|
||||
- Kubernetes
|
||||
- Dockerfile, Containerfile
|
||||
- Terraform
|
||||
- CloudFormation
|
||||
- Azure ARM Template
|
||||
- Helm Chart
|
||||
|
||||
For more information about checks [see here](../docs/misconfiguration/policy/builtin.md).
|
||||
@@ -3,3 +3,21 @@
|
||||
### How to pronounce the name "Trivy"?
|
||||
|
||||
`tri` is pronounced like **tri**gger, `vy` is pronounced like en**vy**.
|
||||
|
||||
### Does Trivy support X?
|
||||
|
||||
Check out the [Scanning coverage page](./coverage.md)
|
||||
|
||||
### Is there a paid version of Trivy?
|
||||
|
||||
If you liked Trivy, you will love Aqua which builds on top of Trivy to provide even more enhanced capabilities for a complete security management offering.
|
||||
You can find a high level comparison table specific to Trivy users [here](https://github.com/aquasecurity/resources/blob/main/trivy-aqua.md).
|
||||
In addition check out the <https://aquasec.com> website for more information about our products and services.
|
||||
If you'd like to contact Aqua or request a demo, please use this form: <https://www.aquasec.com/demo>
|
||||
|
||||
### How to generate multiple reports?
|
||||
See [here](../docs/configuration/reporting.md#converting).
|
||||
|
||||
### How to run Trivy under air-gapped environment?
|
||||
See [here](../docs/advanced/air-gap.md).
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/inst
|
||||
```bash
|
||||
git clone --depth 1 --branch {{ git.tag }} https://github.com/aquasecurity/trivy
|
||||
cd trivy
|
||||
go install
|
||||
go install ./cmd/trivy
|
||||
```
|
||||
|
||||
## Use container image
|
||||
|
||||
@@ -35,6 +35,8 @@ Scanners (what Trivy can find there):
|
||||
- Sensitive information and secrets
|
||||
- Software licenses
|
||||
|
||||
Trivy supports most popular programming languages, operating systems, and platforms. For a complete list, see the [Scanning Coverage] page.
|
||||
|
||||
To learn more, go to the [Trivy homepage][homepage] for feature highlights, or to the [Documentation site][Docs] for detailed information.
|
||||
|
||||
## Quick Start
|
||||
@@ -108,6 +110,14 @@ trivy k8s --report summary cluster
|
||||
</figure>
|
||||
|
||||
</details>
|
||||
|
||||
# Want more? Check out Aqua
|
||||
|
||||
If you liked Trivy, you will love Aqua which builds on top of Trivy to provide even more enhanced capabilities for a complete security management offering.
|
||||
You can find a high level comparison table specific to Trivy users [here](https://github.com/aquasecurity/resources/blob/main/trivy-aqua.md).
|
||||
In addition check out the <https://aquasec.com> website for more information about our products and services.
|
||||
If you'd like to contact Aqua or request a demo, please use this form: <https://www.aquasec.com/demo>
|
||||
|
||||
---
|
||||
|
||||
Trivy is an [Aqua Security][aquasec] open source project.
|
||||
@@ -117,6 +127,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
|
||||
[Scanning Coverage]: getting-started/coverage.md
|
||||
|
||||
[aquasec]: https://aquasec.com
|
||||
[oss]: https://www.aquasec.com/products/open-source-projects/
|
||||
|
||||
8
docs/overrides/main.html
Normal file
8
docs/overrides/main.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block outdated %}
|
||||
You're not viewing the latest version.
|
||||
<a href="{{ '../' ~ base_url }}">
|
||||
<strong>Click here to go to latest.</strong>
|
||||
</a>
|
||||
{% endblock %}
|
||||
@@ -7,7 +7,7 @@ The [Certified Kubernetes Security Specialist (CKS) Exam](https://training.linux
|
||||
- [Trivy Video overview (short)][overview]
|
||||
- [Example questions from the exam][exam]
|
||||
- [More example questions][questions]
|
||||
- [CKS exam study guide](study-guide)
|
||||
- [CKS exam study guide][study-guide]
|
||||
- [Docker Image Vulnerabilities & Trivy Image Scanning Demo | K21Academy](https://youtu.be/gHz10UsEdys)
|
||||
|
||||
### Aqua Security Blog posts to learn more
|
||||
|
||||
257
go.mod
257
go.mod
@@ -4,18 +4,17 @@ go 1.19
|
||||
|
||||
require (
|
||||
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
|
||||
github.com/Azure/go-autorest/autorest v0.11.28
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.23
|
||||
github.com/Azure/go-autorest/autorest/azure/auth v0.5.12
|
||||
github.com/BurntSushi/toml v1.2.1
|
||||
github.com/CycloneDX/cyclonedx-go v0.7.0
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0
|
||||
github.com/BurntSushi/toml v1.3.2
|
||||
github.com/CycloneDX/cyclonedx-go v0.7.2-0.20230625092137-07e2f29defc3
|
||||
github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible
|
||||
github.com/Masterminds/sprig/v3 v3.2.3
|
||||
github.com/NYTimes/gziphandler v1.1.1
|
||||
github.com/alicebob/miniredis/v2 v2.30.1
|
||||
github.com/alicebob/miniredis/v2 v2.30.4
|
||||
github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986
|
||||
github.com/aquasecurity/defsec v0.85.0
|
||||
github.com/aquasecurity/go-dep-parser v0.0.0-20230424082450-f8baca321fbf
|
||||
github.com/aquasecurity/defsec v0.90.3
|
||||
github.com/aquasecurity/go-dep-parser v0.0.0-20230626110909-e7ea5097483b
|
||||
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce
|
||||
github.com/aquasecurity/go-npm-version v0.0.0-20201110091526-0b796d180798
|
||||
github.com/aquasecurity/go-pep440-version v0.0.0-20210121094942-22b2f8951d46
|
||||
@@ -24,113 +23,116 @@ require (
|
||||
github.com/aquasecurity/table v1.8.0
|
||||
github.com/aquasecurity/testdocker v0.0.0-20230111101738-e741bda259da
|
||||
github.com/aquasecurity/tml v0.6.1
|
||||
github.com/aquasecurity/trivy-db v0.0.0-20230411140759-3c2ee2168575
|
||||
github.com/aquasecurity/trivy-db v0.0.0-20230703082116-dc52e83376ce
|
||||
github.com/aquasecurity/trivy-java-db v0.0.0-20230209231723-7cddb1406728
|
||||
github.com/aquasecurity/trivy-kubernetes v0.4.1-0.20230420095211-019a895da295
|
||||
github.com/aws/aws-sdk-go v1.44.234
|
||||
github.com/aws/aws-sdk-go-v2 v1.17.7
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.15
|
||||
github.com/aws/aws-sdk-go-v2/service/ec2 v1.89.1
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.7
|
||||
github.com/aquasecurity/trivy-kubernetes v0.5.7-0.20230628140707-dae3bdb6ee81
|
||||
github.com/aws/aws-sdk-go v1.44.245
|
||||
github.com/aws/aws-sdk-go-v2 v1.18.1
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.25
|
||||
github.com/aws/aws-sdk-go-v2/service/ec2 v1.98.0
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.19.0
|
||||
github.com/bmatcuk/doublestar v1.3.4
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/cheggaaa/pb/v3 v3.1.2
|
||||
github.com/containerd/containerd v1.7.0
|
||||
github.com/docker/docker v23.0.3+incompatible
|
||||
github.com/docker/docker v23.0.5+incompatible
|
||||
github.com/docker/go-connections v0.4.0
|
||||
github.com/fatih/color v1.14.1
|
||||
github.com/go-git/go-git/v5 v5.6.1
|
||||
github.com/go-openapi/runtime v0.25.0
|
||||
github.com/go-git/go-git/v5 v5.7.0
|
||||
github.com/go-openapi/runtime v0.26.0
|
||||
github.com/go-openapi/strfmt v0.21.7
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible
|
||||
github.com/golang/protobuf v1.5.3
|
||||
github.com/google/go-containerregistry v0.14.0
|
||||
github.com/google/go-containerregistry v0.15.2
|
||||
github.com/google/licenseclassifier/v2 v2.0.0
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/google/wire v0.5.0
|
||||
github.com/hashicorp/go-getter v1.7.0
|
||||
github.com/hashicorp/go-getter v1.7.1
|
||||
github.com/hashicorp/go-multierror v1.1.1
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.1
|
||||
github.com/in-toto/in-toto-golang v0.7.0
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.2
|
||||
github.com/in-toto/in-toto-golang v0.9.0
|
||||
github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f
|
||||
github.com/knqyf263/go-deb-version v0.0.0-20230223133812-3ed183d23422
|
||||
github.com/knqyf263/go-rpm-version v0.0.0-20220614171824-631e686d1075
|
||||
github.com/knqyf263/go-rpmdb v0.0.0-20230301153543-ba94b245509b
|
||||
github.com/knqyf263/go-rpmdb v0.0.0-20230517124904-b97c85e63254
|
||||
github.com/knqyf263/nested v0.0.1
|
||||
github.com/kylelemons/godebug v1.1.0
|
||||
github.com/magefile/mage v1.14.0
|
||||
github.com/mailru/easyjson v0.7.7
|
||||
github.com/masahiro331/go-disk v0.0.0-20220919035250-c8da316f91ac
|
||||
github.com/masahiro331/go-ebs-file v0.0.0-20221225061409-5ef263bb2cc3
|
||||
github.com/masahiro331/go-ext4-filesystem v0.0.0-20221225060520-c150f5eacfe1
|
||||
github.com/masahiro331/go-ext4-filesystem v0.0.0-20230612143131-27ccd485b7a1
|
||||
github.com/masahiro331/go-mvn-version v0.0.0-20210429150710-d3157d602a08
|
||||
github.com/masahiro331/go-vmdk-parser v0.0.0-20221225061455-612096e4bbbd
|
||||
github.com/masahiro331/go-xfs-filesystem v0.0.0-20221225060805-c02764233454
|
||||
github.com/masahiro331/go-xfs-filesystem v0.0.0-20230608043311-a335f4599b70
|
||||
github.com/mitchellh/hashstructure/v2 v2.0.2
|
||||
github.com/moby/buildkit v0.11.5
|
||||
github.com/mitchellh/mapstructure v1.5.0
|
||||
github.com/moby/buildkit v0.11.6
|
||||
github.com/open-policy-agent/opa v0.45.0
|
||||
github.com/opencontainers/go-digest v1.0.0
|
||||
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221020182949-4df8887994e8
|
||||
github.com/opencontainers/image-spec v1.1.0-rc4
|
||||
github.com/openvex/go-vex v0.2.0
|
||||
github.com/owenrumney/go-sarif/v2 v2.1.2
|
||||
github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170
|
||||
github.com/samber/lo v1.37.0
|
||||
github.com/owenrumney/go-sarif/v2 v2.2.0
|
||||
github.com/package-url/packageurl-go v0.1.1
|
||||
github.com/samber/lo v1.38.1
|
||||
github.com/saracen/walker v0.1.3
|
||||
github.com/secure-systems-lab/go-securesystemslib v0.5.0
|
||||
github.com/sigstore/rekor v1.1.0
|
||||
github.com/secure-systems-lab/go-securesystemslib v0.6.0
|
||||
github.com/sigstore/rekor v1.2.1
|
||||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/sosedoff/gitkit v0.3.0
|
||||
github.com/spdx/tools-golang v0.5.0
|
||||
github.com/spf13/cast v1.5.0
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/spf13/cast v1.5.1
|
||||
github.com/spf13/cobra v1.7.0
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/spf13/viper v1.15.0
|
||||
github.com/stretchr/testify v1.8.2
|
||||
github.com/testcontainers/testcontainers-go v0.17.0
|
||||
github.com/tetratelabs/wazero v1.0.0
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/testcontainers/testcontainers-go v0.21.0
|
||||
github.com/tetratelabs/wazero v1.2.1
|
||||
github.com/twitchtv/twirp v8.1.2+incompatible
|
||||
github.com/xlab/treeprint v1.1.0
|
||||
go.etcd.io/bbolt v1.3.7
|
||||
go.uber.org/zap v1.24.0
|
||||
golang.org/x/crypto v0.7.0
|
||||
golang.org/x/exp v0.0.0-20230124195608-d38c7dcee874
|
||||
golang.org/x/mod v0.9.0
|
||||
golang.org/x/sync v0.1.0
|
||||
golang.org/x/term v0.6.0
|
||||
golang.org/x/text v0.9.0
|
||||
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
|
||||
golang.org/x/mod v0.11.0
|
||||
golang.org/x/sync v0.3.0
|
||||
golang.org/x/term v0.9.0
|
||||
golang.org/x/text v0.10.0
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
|
||||
google.golang.org/protobuf v1.30.0
|
||||
google.golang.org/protobuf v1.31.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
gotest.tools v2.2.0+incompatible
|
||||
k8s.io/api v0.26.3
|
||||
k8s.io/api v0.27.2
|
||||
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5
|
||||
modernc.org/sqlite v1.20.3
|
||||
modernc.org/sqlite v1.23.1
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.110.0 // indirect
|
||||
cloud.google.com/go/compute v1.18.0 // indirect
|
||||
cloud.google.com/go/compute v1.19.1 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
||||
cloud.google.com/go/iam v0.12.0 // indirect
|
||||
cloud.google.com/go/iam v0.13.0 // indirect
|
||||
cloud.google.com/go/storage v1.29.0 // indirect
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect
|
||||
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
|
||||
github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect
|
||||
github.com/Azure/go-autorest/autorest v0.11.29 // indirect
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
|
||||
github.com/Azure/go-autorest/logger v0.2.1 // indirect
|
||||
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect
|
||||
github.com/MakeNowJust/heredoc v1.0.0 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.2.0 // indirect
|
||||
github.com/Masterminds/squirrel v1.5.3 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.0 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.2.1 // indirect
|
||||
github.com/Masterminds/squirrel v1.5.4 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/Microsoft/hcsshim v0.10.0-rc.7 // indirect
|
||||
github.com/OneOfOne/xxhash v1.2.8 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 // indirect
|
||||
github.com/VividCortex/ewma v1.2.0 // indirect
|
||||
github.com/acomagu/bufpipe v1.0.4 // indirect
|
||||
github.com/agext/levenshtein v1.2.3 // indirect
|
||||
@@ -142,19 +144,19 @@ require (
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.15 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.30 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.24 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.16.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/apigateway v1.15.24 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.12.18 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.13.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/athena v1.18.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.20.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.24.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.21.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.27.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.26.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.15.20 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/codebuild v1.19.17 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/docdb v1.19.11 // indirect
|
||||
@@ -162,41 +164,42 @@ require (
|
||||
github.com/aws/aws-sdk-go-v2/service/ebs v1.15.19 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.17.18 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ecs v1.18.26 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/efs v1.17.15 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/eks v1.22.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticache v1.22.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.18.20 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.16.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/emr v1.23.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/iam v1.18.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/efs v1.20.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/eks v1.27.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticache v1.26.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.19.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.19.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/emr v1.24.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/iam v1.19.12 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.18 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.19 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.28 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.17 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/kafka v1.19.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/kinesis v1.15.19 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/kms v1.20.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/kms v1.23.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/lambda v1.24.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/mq v1.13.15 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/neptune v1.17.12 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/mq v1.15.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/neptune v1.20.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/rds v1.26.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/redshift v1.27.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.16.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sns v1.18.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sns v1.20.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sqs v1.20.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/workspaces v1.23.0 // indirect
|
||||
github.com/aws/smithy-go v1.13.5 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.0 // indirect
|
||||
github.com/briandowns/spinner v1.23.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/chai2010/gettext-go v1.0.2 // indirect
|
||||
github.com/cloudflare/circl v1.1.0 // indirect
|
||||
github.com/cloudflare/circl v1.3.3 // indirect
|
||||
github.com/containerd/cgroups v1.1.0 // indirect
|
||||
github.com/containerd/continuity v0.3.0 // indirect
|
||||
github.com/containerd/fifo v1.1.0 // indirect
|
||||
@@ -204,14 +207,14 @@ require (
|
||||
github.com/containerd/ttrpc v1.2.1 // indirect
|
||||
github.com/containerd/typeurl v1.0.2 // indirect
|
||||
github.com/containerd/typeurl/v2 v2.1.0 // indirect
|
||||
github.com/cpuguy83/dockercfg v0.3.1 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/dimchansky/utfbom v1.1.1 // indirect
|
||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
github.com/docker/cli v23.0.1+incompatible // indirect
|
||||
github.com/docker/distribution v2.8.1+incompatible // indirect
|
||||
github.com/docker/cli v23.0.5+incompatible // indirect
|
||||
github.com/docker/distribution v2.8.2+incompatible // indirect
|
||||
github.com/docker/docker-credential-helpers v0.7.0 // indirect
|
||||
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
|
||||
github.com/docker/go-metrics v0.0.1 // indirect
|
||||
@@ -224,18 +227,18 @@ require (
|
||||
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-errors/errors v1.0.1 // indirect
|
||||
github.com/go-git/gcfg v1.5.0 // indirect
|
||||
github.com/go-errors/errors v1.4.2 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.4.1 // indirect
|
||||
github.com/go-gorp/gorp/v3 v3.0.2 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-gorp/gorp/v3 v3.0.5 // indirect
|
||||
github.com/go-logr/logr v1.2.4 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-openapi/analysis v0.21.4 // indirect
|
||||
github.com/go-openapi/errors v0.20.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.6 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.1 // indirect
|
||||
github.com/go-openapi/loads v0.21.2 // indirect
|
||||
github.com/go-openapi/spec v0.20.8 // indirect
|
||||
github.com/go-openapi/spec v0.20.9 // indirect
|
||||
github.com/go-openapi/swag v0.22.3 // indirect
|
||||
github.com/go-openapi/validate v0.22.1 // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
@@ -248,6 +251,7 @@ require (
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/s2a-go v0.1.3 // indirect
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.8.0 // indirect
|
||||
@@ -261,8 +265,8 @@ require (
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.14.1 // indirect
|
||||
github.com/huandu/xstrings v1.3.3 // indirect
|
||||
github.com/imdario/mergo v0.3.13 // indirect
|
||||
github.com/huandu/xstrings v1.4.0 // indirect
|
||||
github.com/imdario/mergo v0.3.15 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
@@ -271,13 +275,13 @@ require (
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/klauspost/compress v1.16.0 // indirect
|
||||
github.com/klauspost/compress v1.16.5 // indirect
|
||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
|
||||
github.com/liamg/iamgo v0.0.9 // indirect
|
||||
github.com/liamg/jfather v0.0.7 // indirect
|
||||
github.com/liamg/memoryfs v1.4.3 // indirect
|
||||
github.com/lib/pq v1.10.7 // indirect
|
||||
github.com/lib/pq v1.10.9 // indirect
|
||||
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
|
||||
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
@@ -291,7 +295,6 @@ require (
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||
github.com/moby/locker v1.0.1 // indirect
|
||||
github.com/moby/patternmatcher v0.5.0 // indirect
|
||||
@@ -299,7 +302,7 @@ require (
|
||||
github.com/moby/sys/mountinfo v0.6.2 // indirect
|
||||
github.com/moby/sys/sequential v0.5.0 // indirect
|
||||
github.com/moby/sys/signal v0.7.0 // indirect
|
||||
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
|
||||
github.com/moby/term v0.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
|
||||
@@ -315,28 +318,29 @@ require (
|
||||
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/client_golang v1.14.0 // indirect
|
||||
github.com/prometheus/client_model v0.3.0 // indirect
|
||||
github.com/prometheus/common v0.39.0 // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
github.com/prometheus/client_golang v1.15.1 // indirect
|
||||
github.com/prometheus/client_model v0.4.0 // indirect
|
||||
github.com/prometheus/common v0.42.0 // indirect
|
||||
github.com/prometheus/procfs v0.9.0 // indirect
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230126093431-47fa9a501578 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/rubenv/sql-migrate v1.2.0 // indirect
|
||||
github.com/rubenv/sql-migrate v1.3.1 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sergi/go-diff v1.2.0 // indirect
|
||||
github.com/shibumi/go-pathspec v1.3.0 // indirect
|
||||
github.com/shopspring/decimal v1.2.0 // indirect
|
||||
github.com/skeema/knownhosts v1.1.0 // indirect
|
||||
github.com/shopspring/decimal v1.3.1 // indirect
|
||||
github.com/skeema/knownhosts v1.1.1 // indirect
|
||||
github.com/spf13/afero v1.9.3 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/stretchr/objx v0.5.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.2 // indirect
|
||||
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
|
||||
github.com/ulikunitz/xz v0.5.10 // indirect
|
||||
github.com/vbatts/tar-split v0.11.2 // indirect
|
||||
github.com/vbatts/tar-split v0.11.3 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||
@@ -352,48 +356,47 @@ require (
|
||||
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.9.0 // indirect
|
||||
golang.org/x/net v0.8.0 // indirect
|
||||
golang.org/x/oauth2 v0.6.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
golang.org/x/crypto v0.10.0 // indirect
|
||||
golang.org/x/net v0.11.0 // indirect
|
||||
golang.org/x/oauth2 v0.7.0 // indirect
|
||||
golang.org/x/sys v0.9.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
golang.org/x/tools v0.7.0 // indirect
|
||||
google.golang.org/api v0.114.0 // indirect
|
||||
golang.org/x/tools v0.8.0 // indirect
|
||||
google.golang.org/api v0.121.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
|
||||
google.golang.org/grpc v1.54.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
|
||||
google.golang.org/grpc v1.55.0 // indirect
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gotest.tools/v3 v3.1.0 // indirect
|
||||
helm.sh/helm/v3 v3.11.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.26.0 // indirect
|
||||
k8s.io/apimachinery v0.26.3 // indirect
|
||||
k8s.io/apiserver v0.26.2 // indirect
|
||||
k8s.io/cli-runtime v0.26.3 // indirect
|
||||
k8s.io/client-go v0.26.3 // indirect
|
||||
k8s.io/component-base v0.26.3 // indirect
|
||||
k8s.io/klog/v2 v2.90.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
|
||||
k8s.io/kubectl v0.26.3 // indirect
|
||||
helm.sh/helm/v3 v3.12.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.27.2 // indirect
|
||||
k8s.io/apimachinery v0.27.2 // indirect
|
||||
k8s.io/apiserver v0.27.2 // indirect
|
||||
k8s.io/cli-runtime v0.27.2 // indirect
|
||||
k8s.io/client-go v0.27.2 // indirect
|
||||
k8s.io/component-base v0.27.2 // indirect
|
||||
k8s.io/klog/v2 v2.100.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
|
||||
k8s.io/kubectl v0.27.2 // indirect
|
||||
lukechampine.com/uint128 v1.2.0 // indirect
|
||||
modernc.org/cc/v3 v3.40.0 // indirect
|
||||
modernc.org/ccgo/v3 v3.16.13 // indirect
|
||||
modernc.org/libc v1.22.2 // indirect
|
||||
modernc.org/libc v1.22.5 // indirect
|
||||
modernc.org/mathutil v1.5.0 // indirect
|
||||
modernc.org/memory v1.5.0 // indirect
|
||||
modernc.org/opt v0.1.3 // indirect
|
||||
modernc.org/strutil v1.1.3 // indirect
|
||||
modernc.org/token v1.0.1 // indirect
|
||||
oras.land/oras-go v1.2.2 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
|
||||
sigs.k8s.io/kustomize/api v0.12.1 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
sigs.k8s.io/kustomize/api v0.13.2 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.14.1 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
||||
// v1.2.0 is taken from github.com/open-policy-agent/opa v0.42.0
|
||||
// v1.2.0 incompatible with github.com/docker/docker v23.0.0-rc.1+incompatible
|
||||
replace oras.land/oras-go => oras.land/oras-go v1.1.1
|
||||
// oras 1.2.2 is incompatible with github.com/docker/docker v23.0.0-rc.1+incompatible
|
||||
replace oras.land/oras-go => oras.land/oras-go v1.2.3
|
||||
|
||||
@@ -1,6 +1,38 @@
|
||||
project_name: trivy
|
||||
builds:
|
||||
-
|
||||
- id: build-linux
|
||||
main: cmd/trivy/main.go
|
||||
binary: trivy
|
||||
ldflags:
|
||||
- -s -w
|
||||
- "-extldflags '-static'"
|
||||
- -X main.version={{.Version}}
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
- s390x
|
||||
- ppc64le
|
||||
goarm:
|
||||
- 7
|
||||
- id: build-bsd
|
||||
main: cmd/trivy/main.go
|
||||
binary: trivy
|
||||
ldflags:
|
||||
- -s -w
|
||||
- "-extldflags '-static'"
|
||||
- -X main.version={{.Version}}
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- freebsd
|
||||
goarch:
|
||||
# modernc.org/sqlite doesn't support freebsd/arm64, etc.
|
||||
- amd64
|
||||
- id: build-macos
|
||||
main: cmd/trivy/main.go
|
||||
binary: trivy
|
||||
ldflags:
|
||||
@@ -11,36 +43,26 @@ builds:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- darwin
|
||||
- linux
|
||||
- freebsd
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
goarm:
|
||||
- 7
|
||||
- id: build-windows
|
||||
main: cmd/trivy/main.go
|
||||
binary: trivy
|
||||
ldflags:
|
||||
- -s -w
|
||||
- "-extldflags '-static'"
|
||||
- -X main.version={{.Version}}
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
- 386
|
||||
- arm
|
||||
- arm64
|
||||
- s390x
|
||||
- ppc64le
|
||||
goarm:
|
||||
- 7
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: 386
|
||||
# modernc.org/sqlite doesn't support the following pairs
|
||||
- goos: freebsd
|
||||
goarch: arm
|
||||
- goos: freebsd
|
||||
goarch: arm64
|
||||
- goos: windows
|
||||
goarch: 386
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
- goos: windows
|
||||
goarch: arm64
|
||||
- goos: windows
|
||||
goarch: s390x
|
||||
- goos: windows
|
||||
goarch: ppc64le
|
||||
|
||||
release:
|
||||
extra_files:
|
||||
@@ -66,7 +88,6 @@ nfpms:
|
||||
{{- else if eq .Os "dragonfly" }}DragonFlyBSD
|
||||
{{- else}}{{- title .Os }}{{ end }}-
|
||||
{{- if eq .Arch "amd64" }}64bit
|
||||
{{- else if eq .Arch "386" }}32bit
|
||||
{{- else if eq .Arch "arm" }}ARM
|
||||
{{- else if eq .Arch "arm64" }}ARM64
|
||||
{{- else if eq .Arch "ppc64le" }}PPC64LE
|
||||
@@ -79,7 +100,7 @@ nfpms:
|
||||
key_file: '{{ .Env.GPG_FILE }}'
|
||||
|
||||
archives:
|
||||
-
|
||||
- id: archive
|
||||
format: tar.gz
|
||||
name_template: >-
|
||||
{{ .ProjectName }}_{{ .Version }}_
|
||||
@@ -91,7 +112,6 @@ archives:
|
||||
{{- else if eq .Os "dragonfly" }}DragonFlyBSD
|
||||
{{- else}}{{- .Os }}{{ end }}-
|
||||
{{- if eq .Arch "amd64" }}64bit
|
||||
{{- else if eq .Arch "386" }}32bit
|
||||
{{- else if eq .Arch "arm" }}ARM
|
||||
{{- else if eq .Arch "arm64" }}ARM64
|
||||
{{- else if eq .Arch "ppc64le" }}PPC64LE
|
||||
@@ -127,7 +147,7 @@ dockers:
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
ids:
|
||||
- trivy
|
||||
- build-linux
|
||||
build_flag_templates:
|
||||
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
|
||||
- "--label=org.opencontainers.image.description=A Fast Vulnerability Scanner for Containers"
|
||||
@@ -152,7 +172,7 @@ dockers:
|
||||
goos: linux
|
||||
goarch: arm64
|
||||
ids:
|
||||
- trivy
|
||||
- build-linux
|
||||
build_flag_templates:
|
||||
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
|
||||
- "--label=org.opencontainers.image.description=A Fast Vulnerability Scanner for Containers"
|
||||
@@ -177,7 +197,7 @@ dockers:
|
||||
goos: linux
|
||||
goarch: s390x
|
||||
ids:
|
||||
- trivy
|
||||
- build-linux
|
||||
build_flag_templates:
|
||||
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
|
||||
- "--label=org.opencontainers.image.description=A Fast Vulnerability Scanner for Containers"
|
||||
@@ -202,7 +222,7 @@ dockers:
|
||||
goos: linux
|
||||
goarch: ppc64le
|
||||
ids:
|
||||
- trivy
|
||||
- build-linux
|
||||
build_flag_templates:
|
||||
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
|
||||
- "--label=org.opencontainers.image.description=A Fast Vulnerability Scanner for Containers"
|
||||
|
||||
@@ -81,6 +81,7 @@ The following table lists the configurable parameters of the Trivy chart and the
|
||||
| `service.name` | If specified, the name used for the Trivy service | |
|
||||
| `service.type` | Kubernetes service type | `ClusterIP` |
|
||||
| `service.port` | Kubernetes service port | `4954` |
|
||||
| `service.sessionAffinity` | Kubernetes service session affinity | `ClientIP` |
|
||||
| `httpProxy` | The URL of the HTTP proxy server | |
|
||||
| `httpsProxy` | The URL of the HTTPS proxy server | |
|
||||
| `noProxy` | The URLs that the proxy settings do not apply to | |
|
||||
|
||||
@@ -14,4 +14,5 @@ spec:
|
||||
protocol: TCP
|
||||
port: {{ .Values.service.port | default 4954 }}
|
||||
targetPort: {{ .Values.service.port | default 4954 }}
|
||||
sessionAffinity: ClientIP
|
||||
sessionAffinity: {{ .Values.service.sessionAffinity | default "ClientIP" }}
|
||||
|
||||
|
||||
@@ -136,6 +136,8 @@ service:
|
||||
type: ClusterIP
|
||||
# port Kubernetes service port
|
||||
port: 4954
|
||||
# sessionAffinity Kubernetes service session affinity
|
||||
sessionAffinity: ClientIP
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
|
||||
@@ -402,6 +402,9 @@ func TestClientServerWithFormat(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestClientServerWithCycloneDX(t *testing.T) {
|
||||
if *update {
|
||||
t.Skipf("This test doesn't use golden files")
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args csArgs
|
||||
@@ -415,7 +418,7 @@ func TestClientServerWithCycloneDX(t *testing.T) {
|
||||
Input: "testdata/fixtures/images/fluentd-multiple-lockfiles.tar.gz",
|
||||
},
|
||||
wantComponentsCount: 161,
|
||||
wantDependenciesCount: 80,
|
||||
wantDependenciesCount: 162,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@ import (
|
||||
)
|
||||
|
||||
func TestDockerEngine(t *testing.T) {
|
||||
if *update {
|
||||
t.Skipf("This test doesn't update golden files")
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
imageTag string
|
||||
|
||||
@@ -32,6 +32,7 @@ func TestFilesystem(t *testing.T) {
|
||||
skipDirs []string
|
||||
command string
|
||||
format string
|
||||
includeDevDeps bool
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -73,6 +74,16 @@ func TestFilesystem(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/npm.json.golden",
|
||||
},
|
||||
{
|
||||
name: "npm with dev deps",
|
||||
args: args{
|
||||
scanner: types.VulnerabilityScanner,
|
||||
input: "testdata/fixtures/fs/npm",
|
||||
listAllPkgs: true,
|
||||
includeDevDeps: true,
|
||||
},
|
||||
golden: "testdata/npm-with-dev.json.golden",
|
||||
},
|
||||
{
|
||||
name: "yarn",
|
||||
args: args{
|
||||
@@ -412,6 +423,10 @@ func TestFilesystem(t *testing.T) {
|
||||
osArgs = append(osArgs, "--list-all-pkgs")
|
||||
}
|
||||
|
||||
if tt.args.includeDevDeps {
|
||||
osArgs = append(osArgs, "--include-dev-deps")
|
||||
}
|
||||
|
||||
if tt.args.secretConfig != "" {
|
||||
osArgs = append(osArgs, "--secret-config", tt.args.secretConfig)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build integration || vm_integration || module_integration
|
||||
//go:build integration || vm_integration || module_integration || k8s_integration
|
||||
|
||||
package integration
|
||||
|
||||
@@ -178,6 +178,10 @@ func readSpdxJson(t *testing.T, filePath string) *spdx.Document {
|
||||
return bom.Relationships[i].RefB.ElementRefID < bom.Relationships[j].RefB.ElementRefID
|
||||
})
|
||||
|
||||
sort.Slice(bom.Files, func(i, j int) bool {
|
||||
return bom.Files[i].FileSPDXIdentifier < bom.Files[j].FileSPDXIdentifier
|
||||
})
|
||||
|
||||
// We don't compare values which change each time an SBOM is generated
|
||||
bom.CreationInfo.Created = ""
|
||||
bom.DocumentNamespace = ""
|
||||
|
||||
112
integration/k8s_test.go
Normal file
112
integration/k8s_test.go
Normal file
@@ -0,0 +1,112 @@
|
||||
//go:build k8s_integration
|
||||
|
||||
package integration
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
cdx "github.com/CycloneDX/cyclonedx-go"
|
||||
"github.com/aquasecurity/trivy/pkg/k8s/report"
|
||||
"github.com/aquasecurity/trivy/pkg/types"
|
||||
|
||||
"github.com/samber/lo"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// Note: the test required k8s (kind) cluster installed.
|
||||
// "mage test:k8s" will run this test.
|
||||
|
||||
func TestK8s(t *testing.T) {
|
||||
t.Run("misconfig and vulnerability scan", func(t *testing.T) {
|
||||
// Set up the output file
|
||||
outputFile := filepath.Join(t.TempDir(), "output.json")
|
||||
|
||||
osArgs := []string{
|
||||
"k8s",
|
||||
"cluster",
|
||||
"--report",
|
||||
"summary",
|
||||
"-q",
|
||||
"--timeout",
|
||||
"5m0s",
|
||||
"--format",
|
||||
"json",
|
||||
"--components",
|
||||
"workload",
|
||||
"--context",
|
||||
"kind-kind-test",
|
||||
"--output",
|
||||
outputFile,
|
||||
}
|
||||
|
||||
// Run Trivy
|
||||
err := execute(osArgs)
|
||||
require.NoError(t, err)
|
||||
|
||||
var got report.ConsolidatedReport
|
||||
f, err := os.Open(outputFile)
|
||||
require.NoError(t, err)
|
||||
defer f.Close()
|
||||
|
||||
err = json.NewDecoder(f).Decode(&got)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Flatten findings
|
||||
results := lo.FlatMap(got.Findings, func(resource report.Resource, _ int) []types.Result {
|
||||
return resource.Results
|
||||
})
|
||||
|
||||
// Has vulnerabilities
|
||||
assert.True(t, lo.SomeBy(results, func(r types.Result) bool {
|
||||
return len(r.Vulnerabilities) > 0
|
||||
}))
|
||||
|
||||
// Has misconfigurations
|
||||
assert.True(t, lo.SomeBy(results, func(r types.Result) bool {
|
||||
return len(r.Misconfigurations) > 0
|
||||
}))
|
||||
})
|
||||
t.Run("kbom cycloneDx", func(t *testing.T) {
|
||||
// Set up the output file
|
||||
outputFile := filepath.Join(t.TempDir(), "output.json")
|
||||
osArgs := []string{
|
||||
"k8s",
|
||||
"cluster",
|
||||
"--format",
|
||||
"cyclonedx",
|
||||
"-q",
|
||||
"--context",
|
||||
"kind-kind-test",
|
||||
"--output",
|
||||
outputFile,
|
||||
}
|
||||
|
||||
// Run Trivy
|
||||
err := execute(osArgs)
|
||||
require.NoError(t, err)
|
||||
|
||||
var got *cdx.BOM
|
||||
f, err := os.Open(outputFile)
|
||||
require.NoError(t, err)
|
||||
defer f.Close()
|
||||
|
||||
err = json.NewDecoder(f).Decode(&got)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, got.Metadata.Component.Name, "kind-kind-test")
|
||||
assert.Equal(t, got.Metadata.Component.Type, cdx.ComponentType("platform"))
|
||||
|
||||
// Has components
|
||||
assert.True(t, len(*got.Components) > 0)
|
||||
|
||||
// Has dependecies
|
||||
assert.True(t, lo.SomeBy(*got.Dependencies, func(r cdx.Dependency) bool {
|
||||
return len(*r.Dependencies) > 0
|
||||
}))
|
||||
|
||||
})
|
||||
}
|
||||
@@ -30,16 +30,30 @@ func TestSBOM(t *testing.T) {
|
||||
name: "centos7 cyclonedx",
|
||||
args: args{
|
||||
input: "testdata/fixtures/sbom/centos-7-cyclonedx.json",
|
||||
format: "cyclonedx",
|
||||
format: "json",
|
||||
artifactType: "cyclonedx",
|
||||
},
|
||||
golden: "testdata/centos-7-cyclonedx.json.golden",
|
||||
golden: "testdata/centos-7.json.golden",
|
||||
override: types.Report{
|
||||
ArtifactName: "testdata/fixtures/sbom/centos-7-cyclonedx.json",
|
||||
ArtifactType: ftypes.ArtifactType("cyclonedx"),
|
||||
Results: types.Results{
|
||||
{
|
||||
Target: "testdata/fixtures/sbom/centos-7-cyclonedx.json (centos 7.6.1810)",
|
||||
Vulnerabilities: []types.DetectedVulnerability{
|
||||
{PkgRef: "pkg:rpm/centos/bash@4.2.46-31.el7?arch=x86_64&distro=centos-7.6.1810"},
|
||||
{PkgRef: "pkg:rpm/centos/openssl-libs@1.0.2k-16.el7?arch=x86_64&epoch=1&distro=centos-7.6.1810"},
|
||||
{PkgRef: "pkg:rpm/centos/openssl-libs@1.0.2k-16.el7?arch=x86_64&epoch=1&distro=centos-7.6.1810"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "fluentd-multiple-lockfiles cyclonedx",
|
||||
args: args{
|
||||
input: "testdata/fixtures/sbom/fluentd-multiple-lockfiles-cyclonedx.json",
|
||||
format: "cyclonedx",
|
||||
format: "json",
|
||||
artifactType: "cyclonedx",
|
||||
},
|
||||
golden: "testdata/fluentd-multiple-lockfiles-cyclonedx.json.golden",
|
||||
@@ -48,10 +62,24 @@ func TestSBOM(t *testing.T) {
|
||||
name: "centos7 in in-toto attestation",
|
||||
args: args{
|
||||
input: "testdata/fixtures/sbom/centos-7-cyclonedx.intoto.jsonl",
|
||||
format: "cyclonedx",
|
||||
format: "json",
|
||||
artifactType: "cyclonedx",
|
||||
},
|
||||
golden: "testdata/centos-7-cyclonedx.json.golden",
|
||||
golden: "testdata/centos-7.json.golden",
|
||||
override: types.Report{
|
||||
ArtifactName: "testdata/fixtures/sbom/centos-7-cyclonedx.intoto.jsonl",
|
||||
ArtifactType: ftypes.ArtifactType("cyclonedx"),
|
||||
Results: types.Results{
|
||||
{
|
||||
Target: "testdata/fixtures/sbom/centos-7-cyclonedx.intoto.jsonl (centos 7.6.1810)",
|
||||
Vulnerabilities: []types.DetectedVulnerability{
|
||||
{PkgRef: "pkg:rpm/centos/bash@4.2.46-31.el7?arch=x86_64&distro=centos-7.6.1810"},
|
||||
{PkgRef: "pkg:rpm/centos/openssl-libs@1.0.2k-16.el7?arch=x86_64&epoch=1&distro=centos-7.6.1810"},
|
||||
{PkgRef: "pkg:rpm/centos/openssl-libs@1.0.2k-16.el7?arch=x86_64&epoch=1&distro=centos-7.6.1810"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "centos7 spdx tag-value",
|
||||
@@ -131,8 +159,6 @@ func TestSBOM(t *testing.T) {
|
||||
|
||||
// Compare want and got
|
||||
switch tt.args.format {
|
||||
case "cyclonedx":
|
||||
compareCycloneDX(t, tt.golden, outputFile)
|
||||
case "json":
|
||||
compareSBOMReports(t, tt.golden, outputFile, tt.override)
|
||||
default:
|
||||
@@ -146,8 +172,12 @@ func TestSBOM(t *testing.T) {
|
||||
func compareSBOMReports(t *testing.T, wantFile, gotFile string, overrideWant types.Report) {
|
||||
want := readReport(t, wantFile)
|
||||
|
||||
want.ArtifactName = overrideWant.ArtifactName
|
||||
want.ArtifactType = overrideWant.ArtifactType
|
||||
if overrideWant.ArtifactName != "" {
|
||||
want.ArtifactName = overrideWant.ArtifactName
|
||||
}
|
||||
if overrideWant.ArtifactType != "" {
|
||||
want.ArtifactType = overrideWant.ArtifactType
|
||||
}
|
||||
want.Metadata.ImageID = ""
|
||||
want.Metadata.ImageConfig = v1.ConfigFile{}
|
||||
want.Metadata.DiffIDs = nil
|
||||
|
||||
@@ -134,9 +134,12 @@ func TestTar(t *testing.T) {
|
||||
name: "alpine 3.9 with high and critical severity",
|
||||
testArgs: args{
|
||||
IgnoreUnfixed: true,
|
||||
Severity: []string{"HIGH", "CRITICAL"},
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/images/alpine-39.tar.gz",
|
||||
Severity: []string{
|
||||
"HIGH",
|
||||
"CRITICAL",
|
||||
},
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/images/alpine-39.tar.gz",
|
||||
},
|
||||
golden: "testdata/alpine-39-high-critical.json.golden",
|
||||
},
|
||||
@@ -144,9 +147,12 @@ func TestTar(t *testing.T) {
|
||||
name: "alpine 3.9 with .trivyignore",
|
||||
testArgs: args{
|
||||
IgnoreUnfixed: false,
|
||||
IgnoreIDs: []string{"CVE-2019-1549", "CVE-2019-14697"},
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/images/alpine-39.tar.gz",
|
||||
IgnoreIDs: []string{
|
||||
"CVE-2019-1549",
|
||||
"CVE-2019-14697",
|
||||
},
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/images/alpine-39.tar.gz",
|
||||
},
|
||||
golden: "testdata/alpine-39-ignore-cveids.json.golden",
|
||||
},
|
||||
@@ -358,7 +364,15 @@ func TestTar(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
osArgs := []string{"--cache-dir", cacheDir, "image", "-q", "--format", tt.testArgs.Format, "--skip-update"}
|
||||
osArgs := []string{
|
||||
"--cache-dir",
|
||||
cacheDir,
|
||||
"image",
|
||||
"-q",
|
||||
"--format",
|
||||
tt.testArgs.Format,
|
||||
"--skip-update",
|
||||
}
|
||||
|
||||
if tt.testArgs.IgnoreUnfixed {
|
||||
osArgs = append(osArgs, "--ignore-unfixed")
|
||||
@@ -394,7 +408,10 @@ func TestTar(t *testing.T) {
|
||||
outputFile = tt.golden
|
||||
}
|
||||
|
||||
osArgs = append(osArgs, []string{"--output", outputFile}...)
|
||||
osArgs = append(osArgs, []string{
|
||||
"--output",
|
||||
outputFile,
|
||||
}...)
|
||||
|
||||
// Run Trivy
|
||||
err := execute(osArgs)
|
||||
@@ -405,3 +422,173 @@ func TestTar(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestTarWithEnv(t *testing.T) {
|
||||
type args struct {
|
||||
IgnoreUnfixed bool
|
||||
Severity []string
|
||||
Format string
|
||||
Input string
|
||||
SkipDirs []string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
testArgs args
|
||||
golden string
|
||||
}{
|
||||
{
|
||||
name: "alpine 3.9 with skip dirs",
|
||||
testArgs: args{
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/images/alpine-39.tar.gz",
|
||||
SkipDirs: []string{
|
||||
"/etc",
|
||||
},
|
||||
},
|
||||
golden: "testdata/alpine-39-skip.json.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.9 with high and critical severity",
|
||||
testArgs: args{
|
||||
IgnoreUnfixed: true,
|
||||
Severity: []string{
|
||||
"HIGH",
|
||||
"CRITICAL",
|
||||
},
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/images/alpine-39.tar.gz",
|
||||
},
|
||||
golden: "testdata/alpine-39-high-critical.json.golden",
|
||||
},
|
||||
{
|
||||
name: "debian buster/10 with --ignore-unfixed option",
|
||||
testArgs: args{
|
||||
IgnoreUnfixed: true,
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/images/debian-buster.tar.gz",
|
||||
},
|
||||
golden: "testdata/debian-buster-ignore-unfixed.json.golden",
|
||||
},
|
||||
}
|
||||
|
||||
// Set up testing DB
|
||||
cacheDir := initDB(t)
|
||||
|
||||
// Set a temp dir so that modules will not be loaded
|
||||
t.Setenv("XDG_DATA_HOME", cacheDir)
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
osArgs := []string{"image"}
|
||||
|
||||
t.Setenv("TRIVY_FORMAT", tt.testArgs.Format)
|
||||
t.Setenv("TRIVY_CACHE_DIR", cacheDir)
|
||||
t.Setenv("TRIVY_QUIET", "true")
|
||||
t.Setenv("TRIVY_SKIP_UPDATE", "true")
|
||||
|
||||
if tt.testArgs.IgnoreUnfixed {
|
||||
t.Setenv("TRIVY_IGNORE_UNFIXED", "true")
|
||||
}
|
||||
if len(tt.testArgs.Severity) != 0 {
|
||||
t.Setenv("TRIVY_SEVERITY", strings.Join(tt.testArgs.Severity, ","))
|
||||
}
|
||||
if tt.testArgs.Input != "" {
|
||||
osArgs = append(osArgs, "--input", tt.testArgs.Input)
|
||||
}
|
||||
|
||||
if len(tt.testArgs.SkipDirs) != 0 {
|
||||
t.Setenv("TRIVY_SKIP_DIRS", strings.Join(tt.testArgs.SkipDirs, ","))
|
||||
}
|
||||
|
||||
// Set up the output file
|
||||
outputFile := filepath.Join(t.TempDir(), "output.json")
|
||||
|
||||
osArgs = append(osArgs, []string{
|
||||
"--output",
|
||||
outputFile,
|
||||
}...)
|
||||
|
||||
// Run Trivy
|
||||
err := execute(osArgs)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Compare want and got
|
||||
compareReports(t, tt.golden, outputFile)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestTarWithConfigFile(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
input string
|
||||
configFile string
|
||||
golden string
|
||||
}{
|
||||
{
|
||||
name: "alpine 3.9 with high and critical severity",
|
||||
input: "testdata/fixtures/images/alpine-39.tar.gz",
|
||||
configFile: `quiet: true
|
||||
format: json
|
||||
severity:
|
||||
- HIGH
|
||||
- CRITICAL
|
||||
vulnerability:
|
||||
type:
|
||||
- os
|
||||
cache:
|
||||
dir: /should/be/overwritten
|
||||
`,
|
||||
golden: "testdata/alpine-39-high-critical.json.golden",
|
||||
},
|
||||
{
|
||||
name: "debian buster/10 with --ignore-unfixed option",
|
||||
input: "testdata/fixtures/images/debian-buster.tar.gz",
|
||||
configFile: `quiet: true
|
||||
format: json
|
||||
vulnerability:
|
||||
ignore-unfixed: true
|
||||
cache:
|
||||
dir: /should/be/overwritten
|
||||
`,
|
||||
golden: "testdata/debian-buster-ignore-unfixed.json.golden",
|
||||
},
|
||||
}
|
||||
|
||||
// Set up testing DB
|
||||
cacheDir := initDB(t)
|
||||
|
||||
// Set a temp dir so that modules will not be loaded
|
||||
t.Setenv("XDG_DATA_HOME", cacheDir)
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
tmpDir := t.TempDir()
|
||||
outputFile := filepath.Join(tmpDir, "output.json")
|
||||
configPath := filepath.Join(tmpDir, "trivy.yaml")
|
||||
|
||||
err := os.WriteFile(configPath, []byte(tt.configFile), 0600)
|
||||
require.NoError(t, err)
|
||||
|
||||
osArgs := []string{
|
||||
"--cache-dir",
|
||||
cacheDir,
|
||||
"image",
|
||||
"--skip-db-update",
|
||||
"--config",
|
||||
configPath,
|
||||
"--input",
|
||||
tt.input,
|
||||
"--output",
|
||||
outputFile,
|
||||
}
|
||||
|
||||
// Run Trivy
|
||||
err = execute(osArgs)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Compare want and got
|
||||
compareReports(t, tt.golden, outputFile)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"SchemaVersion": 2,
|
||||
"ArtifactName": "localhost:63577/alpine:3.10",
|
||||
"ArtifactName": "localhost:55844/alpine:3.10",
|
||||
"ArtifactType": "container_image",
|
||||
"Metadata": {
|
||||
"OS": {
|
||||
@@ -13,10 +13,10 @@
|
||||
"sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
],
|
||||
"RepoTags": [
|
||||
"localhost:63577/alpine:3.10"
|
||||
"localhost:55844/alpine:3.10"
|
||||
],
|
||||
"RepoDigests": [
|
||||
"localhost:63577/alpine@sha256:d9b1a0d4fab413443a22e550cb8720de487295cebca3f9b2fcbf8882192a9bf9"
|
||||
"localhost:55844/alpine@sha256:b1c5a500182b21d0bfa5a584a8526b56d8be316f89e87d951be04abed2446e60"
|
||||
],
|
||||
"ImageConfig": {
|
||||
"architecture": "amd64",
|
||||
@@ -55,7 +55,7 @@
|
||||
},
|
||||
"Results": [
|
||||
{
|
||||
"Target": "localhost:63577/alpine:3.10 (alpine 3.10.2)",
|
||||
"Target": "localhost:55844/alpine:3.10 (alpine 3.10.2)",
|
||||
"Class": "os-pkgs",
|
||||
"Type": "alpine",
|
||||
"Vulnerabilities": [
|
||||
@@ -66,7 +66,7 @@
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"Digest": "sha256:3489774ebf88fb1f0b08e0abb45826a3cbd9d0eb6458d5fc54729197feddffb9",
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
@@ -126,7 +126,7 @@
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"Digest": "sha256:3489774ebf88fb1f0b08e0abb45826a3cbd9d0eb6458d5fc54729197feddffb9",
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
@@ -196,7 +196,7 @@
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"Digest": "sha256:3489774ebf88fb1f0b08e0abb45826a3cbd9d0eb6458d5fc54729197feddffb9",
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
@@ -256,7 +256,7 @@
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"Digest": "sha256:3489774ebf88fb1f0b08e0abb45826a3cbd9d0eb6458d5fc54729197feddffb9",
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
@@ -322,4 +322,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
2
integration/testdata/alpine-310.sarif.golden
vendored
2
integration/testdata/alpine-310.sarif.golden
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"$schema": "https://json.schemastore.org/sarif-2.1.0-rtm.5.json",
|
||||
"$schema": "https://json.schemastore.org/sarif-2.1.0.json",
|
||||
"runs": [
|
||||
{
|
||||
"tool": {
|
||||
|
||||
@@ -25,40 +25,41 @@
|
||||
"Type": "amazon",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2022-21233",
|
||||
"PkgID": "microcode_ctl@2.1-47.amzn2.0.12.x86_64",
|
||||
"PkgName": "microcode_ctl",
|
||||
"InstalledVersion": "2:2.1-47.amzn2.0.12",
|
||||
"FixedVersion": "2:2.1-47.amzn2.0.13",
|
||||
"VulnerabilityID": "CVE-2022-38177",
|
||||
"PkgID": "bind-export-libs@9.11.4-26.P2.amzn2.5.2.x86_64",
|
||||
"PkgName": "bind-export-libs",
|
||||
"InstalledVersion": "32:9.11.4-26.P2.amzn2.5.2",
|
||||
"FixedVersion": "99:9.11.4-26.P2.amzn2.13",
|
||||
"Layer": {},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-21233",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-38177",
|
||||
"DataSource": {
|
||||
"ID": "amazon",
|
||||
"Name": "Amazon Linux Security Center",
|
||||
"URL": "https://alas.aws.amazon.com/"
|
||||
},
|
||||
"Title": "hw: cpu: Intel: Stale Data Read from legacy xAPIC vulnerability",
|
||||
"Description": "Improper isolation of shared resources in some Intel(R) Processors may allow",
|
||||
"Title": "bind: memory leak in ECDSA DNSSEC verification code",
|
||||
"Description": "By spoofing the target resolver with responses that have a malformed ECDSA signature, an attacker can trigger a small memory leak. It is possible to gradually erode available memory to the point where named crashes for lack of resources.",
|
||||
"Severity": "MEDIUM",
|
||||
"CVSS": {
|
||||
"nvd": {
|
||||
"V3Vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
|
||||
"V3Score": 5.5
|
||||
"V3Vector": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N",
|
||||
"V3Score": 7.5
|
||||
},
|
||||
"redhat": {
|
||||
"V3Vector": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N",
|
||||
"V3Score": 6
|
||||
"V3Score": 7.5
|
||||
}
|
||||
},
|
||||
"References": [
|
||||
"https://access.redhat.com/security/cve/CVE-2022-21233",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21233",
|
||||
"https://security.netapp.com/advisory/ntap-20220923-0002/",
|
||||
"https://ubuntu.com/security/notices/USN-5612-1"
|
||||
"http://www.openwall.com/lists/oss-security/2022/09/21/3",
|
||||
"https://access.redhat.com/errata/RHSA-2022:6763",
|
||||
"https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2022-38177.json",
|
||||
"https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2022-38178.json",
|
||||
"https://access.redhat.com/security/cve/CVE-2022-38177"
|
||||
],
|
||||
"PublishedDate": "2022-08-18T20:15:00Z",
|
||||
"LastModifiedDate": "2022-09-23T15:15:00Z"
|
||||
"PublishedDate": "2022-09-21T11:15:00Z",
|
||||
"LastModifiedDate": "2022-09-21T11:15:00Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-15542",
|
||||
"PkgName": "ammonia",
|
||||
"PkgID": "ammonia@1.9.0",
|
||||
"PkgName": "ammonia",
|
||||
"InstalledVersion": "1.9.0",
|
||||
"FixedVersion": "\u003e= 2.1.0",
|
||||
"Layer": {
|
||||
@@ -92,8 +92,8 @@
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2021-38193",
|
||||
"PkgName": "ammonia",
|
||||
"PkgID": "ammonia@1.9.0",
|
||||
"PkgName": "ammonia",
|
||||
"InstalledVersion": "1.9.0",
|
||||
"FixedVersion": "\u003e= 3.1.0, \u003e= 2.1.3, \u003c 3.0.0",
|
||||
"Layer": {
|
||||
|
||||
528
integration/testdata/centos-7-cyclonedx.json.golden
vendored
528
integration/testdata/centos-7-cyclonedx.json.golden
vendored
@@ -1,528 +0,0 @@
|
||||
{
|
||||
"bomFormat": "CycloneDX",
|
||||
"specVersion": "1.4",
|
||||
"version": 1,
|
||||
"metadata": {
|
||||
"timestamp": "2022-08-14T12:39:11+00:00",
|
||||
"tools": [
|
||||
{
|
||||
"vendor": "aquasecurity",
|
||||
"name": "trivy",
|
||||
"version": "dev"
|
||||
}
|
||||
],
|
||||
"component": {
|
||||
"bom-ref": "urn:uuid:1455c02d-64ca-453e-a5df-ddfb70a7c804/1",
|
||||
"type": "container",
|
||||
"name": "integration/testdata/fixtures/images/centos-7.tar.gz"
|
||||
}
|
||||
},
|
||||
"vulnerabilities": [
|
||||
{
|
||||
"id": "CVE-2019-18276",
|
||||
"ratings": [
|
||||
{
|
||||
"source": {
|
||||
"name": "cbl-mariner"
|
||||
},
|
||||
"severity": "high"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "nvd"
|
||||
},
|
||||
"score": 7.2,
|
||||
"severity": "high",
|
||||
"method": "CVSSv2",
|
||||
"vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "nvd"
|
||||
},
|
||||
"score": 7.8,
|
||||
"severity": "high",
|
||||
"method": "CVSSv31",
|
||||
"vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "oracle-oval"
|
||||
},
|
||||
"severity": "low"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "photon"
|
||||
},
|
||||
"severity": "high"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "redhat"
|
||||
},
|
||||
"score": 7.8,
|
||||
"severity": "low",
|
||||
"method": "CVSSv31",
|
||||
"vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "ubuntu"
|
||||
},
|
||||
"severity": "low"
|
||||
}
|
||||
],
|
||||
"cwes": [
|
||||
273
|
||||
],
|
||||
"description": "An issue was discovered in disable_priv_mode in shell.c in GNU Bash through 5.0 patch 11. By default, if Bash is run with its effective UID not equal to its real UID, it will drop privileges by setting its effective UID to its real UID. However, it does so incorrectly. On Linux and other systems that support \"saved UID\" functionality, the saved UID is not dropped. An attacker with command execution in the shell can use \"enable -f\" for runtime loading of a new builtin, which can be a shared object that calls setuid() and therefore regains privileges. However, binaries running with an effective UID of 0 are unaffected.",
|
||||
"advisories": [
|
||||
{
|
||||
"url": "http://packetstormsecurity.com/files/155498/Bash-5.0-Patch-11-Privilege-Escalation.html"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/security/cve/CVE-2019-18276"
|
||||
},
|
||||
{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18276"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/bminor/bash/commit/951bdaad7a18cc0dc1036bba86b18b90874d39ff"
|
||||
},
|
||||
{
|
||||
"url": "https://linux.oracle.com/cve/CVE-2019-18276.html"
|
||||
},
|
||||
{
|
||||
"url": "https://linux.oracle.com/errata/ELSA-2021-1679.html"
|
||||
},
|
||||
{
|
||||
"url": "https://lists.apache.org/thread.html/rf9fa47ab66495c78bb4120b0754dd9531ca2ff0430f6685ac9b07772@%3Cdev.mina.apache.org%3E"
|
||||
},
|
||||
{
|
||||
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-18276"
|
||||
},
|
||||
{
|
||||
"url": "https://security.gentoo.org/glsa/202105-34"
|
||||
},
|
||||
{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20200430-0003/"
|
||||
},
|
||||
{
|
||||
"url": "https://www.youtube.com/watch?v=-wGtxJ8opa8"
|
||||
}
|
||||
],
|
||||
"published": "2019-11-28T01:15:00+00:00",
|
||||
"updated": "2021-05-26T12:15:00+00:00",
|
||||
"affects": [
|
||||
{
|
||||
"ref": "urn:cdx:1455c02d-64ca-453e-a5df-ddfb70a7c804/1#pkg:rpm/centos/bash@4.2.46-31.el7?arch=x86_64\u0026distro=centos-7.6.1810",
|
||||
"versions": [
|
||||
{
|
||||
"version": "4.2.46-31.el7",
|
||||
"status": "affected"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1559",
|
||||
"ratings": [
|
||||
{
|
||||
"source": {
|
||||
"name": "amazon"
|
||||
},
|
||||
"severity": "medium"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "arch-linux"
|
||||
},
|
||||
"severity": "medium"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "nvd"
|
||||
},
|
||||
"score": 4.3,
|
||||
"severity": "medium",
|
||||
"method": "CVSSv2",
|
||||
"vector": "AV:N/AC:M/Au:N/C:P/I:N/A:N"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "nvd"
|
||||
},
|
||||
"score": 5.9,
|
||||
"severity": "medium",
|
||||
"method": "CVSSv3",
|
||||
"vector": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "oracle-oval"
|
||||
},
|
||||
"severity": "medium"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "redhat"
|
||||
},
|
||||
"score": 5.9,
|
||||
"severity": "medium",
|
||||
"method": "CVSSv31",
|
||||
"vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "ubuntu"
|
||||
},
|
||||
"severity": "medium"
|
||||
}
|
||||
],
|
||||
"cwes": [
|
||||
203
|
||||
],
|
||||
"description": "If an application encounters a fatal protocol error and then calls SSL_shutdown() twice (once to send a close_notify, and once to receive one) then OpenSSL can respond differently to the calling application if a 0 byte record is received with invalid padding compared to if a 0 byte record is received with an invalid MAC. If the application then behaves differently based on that in a way that is detectable to the remote peer, then this amounts to a padding oracle that could be used to decrypt data. In order for this to be exploitable \"non-stitched\" ciphersuites must be in use. Stitched ciphersuites are optimised implementations of certain commonly used ciphersuites. Also the application must call SSL_shutdown() twice even if a protocol error has occurred (applications should not do this but some do anyway). Fixed in OpenSSL 1.0.2r (Affected 1.0.2-1.0.2q).",
|
||||
"recommendation": "Upgrade openssl-libs to version 1:1.0.2k-19.el7",
|
||||
"advisories": [
|
||||
{
|
||||
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00041.html"
|
||||
},
|
||||
{
|
||||
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00019.html"
|
||||
},
|
||||
{
|
||||
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00046.html"
|
||||
},
|
||||
{
|
||||
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00047.html"
|
||||
},
|
||||
{
|
||||
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00049.html"
|
||||
},
|
||||
{
|
||||
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00080.html"
|
||||
},
|
||||
{
|
||||
"url": "http://www.securityfocus.com/bid/107174"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:2304"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:2437"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:2439"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:2471"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:3929"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:3931"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/security/cve/CVE-2019-1559"
|
||||
},
|
||||
{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1559"
|
||||
},
|
||||
{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e9bbefbf0f24c57645e7ad6a5a71ae649d18ac8e"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/RUB-NDS/TLS-Padding-Oracles"
|
||||
},
|
||||
{
|
||||
"url": "https://kc.mcafee.com/corporate/index?page=content\u0026id=SB10282"
|
||||
},
|
||||
{
|
||||
"url": "https://linux.oracle.com/cve/CVE-2019-1559.html"
|
||||
},
|
||||
{
|
||||
"url": "https://linux.oracle.com/errata/ELSA-2019-2471.html"
|
||||
},
|
||||
{
|
||||
"url": "https://lists.debian.org/debian-lts-announce/2019/03/msg00003.html"
|
||||
},
|
||||
{
|
||||
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EWC42UXL5GHTU5G77VKBF6JYUUNGSHOM/"
|
||||
},
|
||||
{
|
||||
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Y3IVFGSERAZLNJCK35TEM2R4726XIH3Z/"
|
||||
},
|
||||
{
|
||||
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZBEV5QGDRFUZDMNECFXUSN5FMYOZDE4V/"
|
||||
},
|
||||
{
|
||||
"url": "https://security.gentoo.org/glsa/201903-10"
|
||||
},
|
||||
{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190301-0001/"
|
||||
},
|
||||
{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190301-0002/"
|
||||
},
|
||||
{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190423-0002/"
|
||||
},
|
||||
{
|
||||
"url": "https://support.f5.com/csp/article/K18549143"
|
||||
},
|
||||
{
|
||||
"url": "https://support.f5.com/csp/article/K18549143?utm_source=f5support\u0026amp;utm_medium=RSS"
|
||||
},
|
||||
{
|
||||
"url": "https://ubuntu.com/security/notices/USN-3899-1"
|
||||
},
|
||||
{
|
||||
"url": "https://ubuntu.com/security/notices/USN-4376-2"
|
||||
},
|
||||
{
|
||||
"url": "https://usn.ubuntu.com/3899-1/"
|
||||
},
|
||||
{
|
||||
"url": "https://usn.ubuntu.com/4376-2/"
|
||||
},
|
||||
{
|
||||
"url": "https://www.debian.org/security/2019/dsa-4400"
|
||||
},
|
||||
{
|
||||
"url": "https://www.openssl.org/news/secadv/20190226.txt"
|
||||
},
|
||||
{
|
||||
"url": "https://www.oracle.com/security-alerts/cpujan2020.html"
|
||||
},
|
||||
{
|
||||
"url": "https://www.oracle.com/security-alerts/cpujan2021.html"
|
||||
},
|
||||
{
|
||||
"url": "https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html"
|
||||
},
|
||||
{
|
||||
"url": "https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html"
|
||||
},
|
||||
{
|
||||
"url": "https://www.oracle.com/technetwork/security-advisory/cpuoct2019-5072832.html"
|
||||
},
|
||||
{
|
||||
"url": "https://www.tenable.com/security/tns-2019-02"
|
||||
},
|
||||
{
|
||||
"url": "https://www.tenable.com/security/tns-2019-03"
|
||||
}
|
||||
],
|
||||
"published": "2019-02-27T23:29:00+00:00",
|
||||
"updated": "2021-01-20T15:15:00+00:00",
|
||||
"affects": [
|
||||
{
|
||||
"ref": "urn:cdx:1455c02d-64ca-453e-a5df-ddfb70a7c804/1#pkg:rpm/centos/openssl-libs@1.0.2k-16.el7?arch=x86_64\u0026epoch=1\u0026distro=centos-7.6.1810",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1:1.0.2k-16.el7",
|
||||
"status": "affected"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CVE-2018-0734",
|
||||
"ratings": [
|
||||
{
|
||||
"source": {
|
||||
"name": "amazon"
|
||||
},
|
||||
"severity": "medium"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "arch-linux"
|
||||
},
|
||||
"severity": "low"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "cbl-mariner"
|
||||
},
|
||||
"severity": "medium"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "nvd"
|
||||
},
|
||||
"score": 4.3,
|
||||
"severity": "medium",
|
||||
"method": "CVSSv2",
|
||||
"vector": "AV:N/AC:M/Au:N/C:P/I:N/A:N"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "nvd"
|
||||
},
|
||||
"score": 5.9,
|
||||
"severity": "medium",
|
||||
"method": "CVSSv3",
|
||||
"vector": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "oracle-oval"
|
||||
},
|
||||
"severity": "low"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "photon"
|
||||
},
|
||||
"severity": "medium"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "redhat"
|
||||
},
|
||||
"score": 5.1,
|
||||
"severity": "low",
|
||||
"method": "CVSSv3",
|
||||
"vector": "CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
"name": "ubuntu"
|
||||
},
|
||||
"severity": "low"
|
||||
}
|
||||
],
|
||||
"cwes": [
|
||||
327
|
||||
],
|
||||
"description": "The OpenSSL DSA signature algorithm has been shown to be vulnerable to a timing side channel attack. An attacker could use variations in the signing algorithm to recover the private key. Fixed in OpenSSL 1.1.1a (Affected 1.1.1). Fixed in OpenSSL 1.1.0j (Affected 1.1.0-1.1.0i). Fixed in OpenSSL 1.0.2q (Affected 1.0.2-1.0.2p).",
|
||||
"recommendation": "Upgrade openssl-libs to version 1:1.0.2k-19.el7",
|
||||
"advisories": [
|
||||
{
|
||||
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00030.html"
|
||||
},
|
||||
{
|
||||
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00056.html"
|
||||
},
|
||||
{
|
||||
"url": "http://www.securityfocus.com/bid/105758"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:2304"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:3700"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:3932"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:3933"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/errata/RHSA-2019:3935"
|
||||
},
|
||||
{
|
||||
"url": "https://access.redhat.com/security/cve/CVE-2018-0734"
|
||||
},
|
||||
{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-0734"
|
||||
},
|
||||
{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=43e6a58d4991a451daf4891ff05a48735df871ac"
|
||||
},
|
||||
{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=8abfe72e8c1de1b95f50aa0d9134803b4d00070f"
|
||||
},
|
||||
{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=ef11e19d1365eea2b1851e6f540a0bf365d303e7"
|
||||
},
|
||||
{
|
||||
"url": "https://linux.oracle.com/cve/CVE-2018-0734.html"
|
||||
},
|
||||
{
|
||||
"url": "https://linux.oracle.com/errata/ELSA-2019-3700.html"
|
||||
},
|
||||
{
|
||||
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EWC42UXL5GHTU5G77VKBF6JYUUNGSHOM/"
|
||||
},
|
||||
{
|
||||
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Y3IVFGSERAZLNJCK35TEM2R4726XIH3Z/"
|
||||
},
|
||||
{
|
||||
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZBEV5QGDRFUZDMNECFXUSN5FMYOZDE4V/"
|
||||
},
|
||||
{
|
||||
"url": "https://nodejs.org/en/blog/vulnerability/november-2018-security-releases/"
|
||||
},
|
||||
{
|
||||
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-0734"
|
||||
},
|
||||
{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20181105-0002/"
|
||||
},
|
||||
{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190118-0002/"
|
||||
},
|
||||
{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190423-0002/"
|
||||
},
|
||||
{
|
||||
"url": "https://ubuntu.com/security/notices/USN-3840-1"
|
||||
},
|
||||
{
|
||||
"url": "https://usn.ubuntu.com/3840-1/"
|
||||
},
|
||||
{
|
||||
"url": "https://www.debian.org/security/2018/dsa-4348"
|
||||
},
|
||||
{
|
||||
"url": "https://www.debian.org/security/2018/dsa-4355"
|
||||
},
|
||||
{
|
||||
"url": "https://www.openssl.org/news/secadv/20181030.txt"
|
||||
},
|
||||
{
|
||||
"url": "https://www.oracle.com/security-alerts/cpuapr2020.html"
|
||||
},
|
||||
{
|
||||
"url": "https://www.oracle.com/security-alerts/cpujan2020.html"
|
||||
},
|
||||
{
|
||||
"url": "https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html"
|
||||
},
|
||||
{
|
||||
"url": "https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html"
|
||||
},
|
||||
{
|
||||
"url": "https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html"
|
||||
},
|
||||
{
|
||||
"url": "https://www.tenable.com/security/tns-2018-16"
|
||||
},
|
||||
{
|
||||
"url": "https://www.tenable.com/security/tns-2018-17"
|
||||
}
|
||||
],
|
||||
"published": "2018-10-30T12:29:00+00:00",
|
||||
"updated": "2020-08-24T17:37:00+00:00",
|
||||
"affects": [
|
||||
{
|
||||
"ref": "urn:cdx:1455c02d-64ca-453e-a5df-ddfb70a7c804/1#pkg:rpm/centos/openssl-libs@1.0.2k-16.el7?arch=x86_64\u0026epoch=1\u0026distro=centos-7.6.1810",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1:1.0.2k-16.el7",
|
||||
"status": "affected"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
15
integration/testdata/cocoapods.json.golden
vendored
15
integration/testdata/cocoapods.json.golden
vendored
@@ -27,7 +27,8 @@
|
||||
"DependsOn": [
|
||||
"AppCenter/Analytics/4.2.0",
|
||||
"AppCenter/Crashes/4.2.0"
|
||||
]
|
||||
],
|
||||
"Layer": {}
|
||||
},
|
||||
{
|
||||
"ID": "AppCenter/Analytics/4.2.0",
|
||||
@@ -35,12 +36,14 @@
|
||||
"Version": "4.2.0",
|
||||
"DependsOn": [
|
||||
"AppCenter/Core/4.2.0"
|
||||
]
|
||||
],
|
||||
"Layer": {}
|
||||
},
|
||||
{
|
||||
"ID": "AppCenter/Core/4.2.0",
|
||||
"Name": "AppCenter/Core",
|
||||
"Version": "4.2.0"
|
||||
"Version": "4.2.0",
|
||||
"Layer": {}
|
||||
},
|
||||
{
|
||||
"ID": "AppCenter/Crashes/4.2.0",
|
||||
@@ -48,12 +51,14 @@
|
||||
"Version": "4.2.0",
|
||||
"DependsOn": [
|
||||
"AppCenter/Core/4.2.0"
|
||||
]
|
||||
],
|
||||
"Layer": {}
|
||||
},
|
||||
{
|
||||
"ID": "KeychainAccess/4.2.1",
|
||||
"Name": "KeychainAccess",
|
||||
"Version": "4.2.1"
|
||||
"Version": "4.2.1",
|
||||
"Layer": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -24,14 +24,13 @@
|
||||
"ID": "guzzlehttp/guzzle@7.4.4",
|
||||
"Name": "guzzlehttp/guzzle",
|
||||
"Version": "7.4.4",
|
||||
"Indirect": false,
|
||||
"Layer": {},
|
||||
"Licenses": [
|
||||
"MIT"
|
||||
],
|
||||
"DependsOn": [
|
||||
"guzzlehttp/psr7@1.8.3"
|
||||
],
|
||||
"Layer": {},
|
||||
"Locations": [
|
||||
{
|
||||
"StartLine": 9,
|
||||
@@ -43,11 +42,11 @@
|
||||
"ID": "guzzlehttp/psr7@1.8.3",
|
||||
"Name": "guzzlehttp/psr7",
|
||||
"Version": "1.8.3",
|
||||
"Indirect": true,
|
||||
"Layer": {},
|
||||
"Licenses": [
|
||||
"MIT"
|
||||
],
|
||||
"Indirect": true,
|
||||
"Layer": {},
|
||||
"Locations": [
|
||||
{
|
||||
"StartLine": 130,
|
||||
|
||||
34
integration/testdata/conan.json.golden
vendored
34
integration/testdata/conan.json.golden
vendored
@@ -2,6 +2,18 @@
|
||||
"SchemaVersion": 2,
|
||||
"ArtifactName": "testdata/fixtures/fs/conan",
|
||||
"ArtifactType": "filesystem",
|
||||
"Metadata": {
|
||||
"ImageConfig": {
|
||||
"architecture": "",
|
||||
"created": "0001-01-01T00:00:00Z",
|
||||
"os": "",
|
||||
"rootfs": {
|
||||
"type": "",
|
||||
"diff_ids": null
|
||||
},
|
||||
"config": {}
|
||||
}
|
||||
},
|
||||
"Results": [
|
||||
{
|
||||
"Target": "conan.lock",
|
||||
@@ -12,19 +24,22 @@
|
||||
"ID": "bzip2/1.0.8",
|
||||
"Name": "bzip2",
|
||||
"Version": "1.0.8",
|
||||
"Indirect": true
|
||||
"Indirect": true,
|
||||
"Layer": {}
|
||||
},
|
||||
{
|
||||
"ID": "expat/2.4.8",
|
||||
"Name": "expat",
|
||||
"Version": "2.4.8",
|
||||
"Indirect": true
|
||||
"Indirect": true,
|
||||
"Layer": {}
|
||||
},
|
||||
{
|
||||
"ID": "openssl/1.1.1q",
|
||||
"Name": "openssl",
|
||||
"Version": "1.1.1q",
|
||||
"Indirect": true
|
||||
"Indirect": true,
|
||||
"Layer": {}
|
||||
},
|
||||
{
|
||||
"ID": "pcre/8.43",
|
||||
@@ -34,7 +49,8 @@
|
||||
"DependsOn": [
|
||||
"bzip2/1.0.8",
|
||||
"zlib/1.2.12"
|
||||
]
|
||||
],
|
||||
"Layer": {}
|
||||
},
|
||||
{
|
||||
"ID": "poco/1.9.4",
|
||||
@@ -46,19 +62,22 @@
|
||||
"expat/2.4.8",
|
||||
"sqlite3/3.39.2",
|
||||
"openssl/1.1.1q"
|
||||
]
|
||||
],
|
||||
"Layer": {}
|
||||
},
|
||||
{
|
||||
"ID": "sqlite3/3.39.2",
|
||||
"Name": "sqlite3",
|
||||
"Version": "3.39.2",
|
||||
"Indirect": true
|
||||
"Indirect": true,
|
||||
"Layer": {}
|
||||
},
|
||||
{
|
||||
"ID": "zlib/1.2.12",
|
||||
"Name": "zlib",
|
||||
"Version": "1.2.12",
|
||||
"Indirect": true
|
||||
"Indirect": true,
|
||||
"Layer": {}
|
||||
}
|
||||
],
|
||||
"Vulnerabilities": [
|
||||
@@ -68,6 +87,7 @@
|
||||
"PkgName": "pcre",
|
||||
"InstalledVersion": "8.43",
|
||||
"FixedVersion": "8.45",
|
||||
"Layer": {},
|
||||
"Severity": "UNKNOWN"
|
||||
}
|
||||
]
|
||||
|
||||
62
integration/testdata/conda-cyclonedx.json.golden
vendored
62
integration/testdata/conda-cyclonedx.json.golden
vendored
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"bomFormat": "CycloneDX",
|
||||
"specVersion": "1.4",
|
||||
"serialNumber": "urn:uuid:4dd4cf4a-d4de-4ea0-b75f-ad617f31b5a9",
|
||||
"specVersion": "1.5",
|
||||
"serialNumber": "urn:uuid:e1f49b6f-018f-4bf3-97c8-85cd92a82c7c",
|
||||
"version": 1,
|
||||
"metadata": {
|
||||
"timestamp": "2023-01-08T23:57:37+00:00",
|
||||
"timestamp": "2023-05-19T10:38:39+00:00",
|
||||
"tools": [
|
||||
{
|
||||
"vendor": "aquasecurity",
|
||||
@@ -13,7 +13,7 @@
|
||||
}
|
||||
],
|
||||
"component": {
|
||||
"bom-ref": "582a7c6f-b30e-4b65-a911-f3f5034aa003",
|
||||
"bom-ref": "cd0ebb00-5c53-4b82-a3f7-271add663c51",
|
||||
"type": "application",
|
||||
"name": "testdata/fixtures/fs/conda",
|
||||
"properties": [
|
||||
@@ -25,28 +25,6 @@
|
||||
}
|
||||
},
|
||||
"components": [
|
||||
{
|
||||
"bom-ref": "pkg:conda/openssl@1.1.1q?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fopenssl-1.1.1q-h7f8727e_0.json",
|
||||
"type": "library",
|
||||
"name": "openssl",
|
||||
"version": "1.1.1q",
|
||||
"licenses": [
|
||||
{
|
||||
"expression": "OpenSSL"
|
||||
}
|
||||
],
|
||||
"purl": "pkg:conda/openssl@1.1.1q",
|
||||
"properties": [
|
||||
{
|
||||
"name": "aquasecurity:trivy:PkgType",
|
||||
"value": "conda-pkg"
|
||||
},
|
||||
{
|
||||
"name": "aquasecurity:trivy:FilePath",
|
||||
"value": "miniconda3/envs/testenv/conda-meta/openssl-1.1.1q-h7f8727e_0.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"bom-ref": "pkg:conda/pip@22.2.2?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fpip-22.2.2-py38h06a4308_0.json",
|
||||
"type": "library",
|
||||
@@ -68,16 +46,44 @@
|
||||
"value": "miniconda3/envs/testenv/conda-meta/pip-22.2.2-py38h06a4308_0.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"bom-ref": "pkg:conda/openssl@1.1.1q?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fopenssl-1.1.1q-h7f8727e_0.json",
|
||||
"type": "library",
|
||||
"name": "openssl",
|
||||
"version": "1.1.1q",
|
||||
"licenses": [
|
||||
{
|
||||
"expression": "OpenSSL"
|
||||
}
|
||||
],
|
||||
"purl": "pkg:conda/openssl@1.1.1q",
|
||||
"properties": [
|
||||
{
|
||||
"name": "aquasecurity:trivy:PkgType",
|
||||
"value": "conda-pkg"
|
||||
},
|
||||
{
|
||||
"name": "aquasecurity:trivy:FilePath",
|
||||
"value": "miniconda3/envs/testenv/conda-meta/openssl-1.1.1q-h7f8727e_0.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"ref": "582a7c6f-b30e-4b65-a911-f3f5034aa003",
|
||||
"ref": "cd0ebb00-5c53-4b82-a3f7-271add663c51",
|
||||
"dependsOn": [
|
||||
"pkg:conda/openssl@1.1.1q?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fopenssl-1.1.1q-h7f8727e_0.json",
|
||||
"pkg:conda/pip@22.2.2?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fpip-22.2.2-py38h06a4308_0.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ref": "pkg:conda/openssl@1.1.1q?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fopenssl-1.1.1q-h7f8727e_0.json"
|
||||
},
|
||||
{
|
||||
"ref": "pkg:conda/pip@22.2.2?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fpip-22.2.2-py38h06a4308_0.json"
|
||||
}
|
||||
],
|
||||
"vulnerabilities": []
|
||||
}
|
||||
}
|
||||
|
||||
88
integration/testdata/conda-spdx.json.golden
vendored
88
integration/testdata/conda-spdx.json.golden
vendored
@@ -3,26 +3,29 @@
|
||||
"dataLicense": "CC0-1.0",
|
||||
"SPDXID": "SPDXRef-DOCUMENT",
|
||||
"name": "testdata/fixtures/fs/conda",
|
||||
"documentNamespace": "http://aquasecurity.github.io/trivy/filesystem/testdata/fixtures/fs/conda-2738b2fe-b40c-4ecb-b8ae-5b3cc4cbc004",
|
||||
"creationInfo": {
|
||||
"licenseListVersion": "",
|
||||
"creators": [
|
||||
"Organization: aquasecurity",
|
||||
"Tool: trivy-dev"
|
||||
],
|
||||
"created": "2023-04-16T11:00:02Z"
|
||||
"created": "2023-06-27T05:37:40Z"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"name": "conda-pkg",
|
||||
"SPDXID": "SPDXRef-Application-ee5ef1aa4ac89125",
|
||||
"downloadLocation": "NONE",
|
||||
"primaryPackagePurpose": "APPLICATION",
|
||||
"sourceInfo": "Conda"
|
||||
"sourceInfo": "Conda",
|
||||
"copyrightText": "",
|
||||
"primaryPackagePurpose": "APPLICATION"
|
||||
},
|
||||
{
|
||||
"name": "openssl",
|
||||
"SPDXID": "SPDXRef-Package-b1088cb4090e3a55",
|
||||
"SPDXID": "SPDXRef-Package-950f99cb9edd281",
|
||||
"versionInfo": "1.1.1q",
|
||||
"supplier": "NOASSERTION",
|
||||
"downloadLocation": "NONE",
|
||||
"licenseConcluded": "OpenSSL",
|
||||
"licenseDeclared": "OpenSSL",
|
||||
@@ -34,28 +37,17 @@
|
||||
"referenceLocator": "pkg:conda/openssl@1.1.1q"
|
||||
}
|
||||
],
|
||||
"primaryPackagePurpose": "LIBRARY",
|
||||
"supplier": "NOASSERTION",
|
||||
"files": [
|
||||
{
|
||||
"fileName": "miniconda3/envs/testenv/conda-meta/openssl-1.1.1q-h7f8727e_0.json",
|
||||
"SPDXID": "SPDXRef-File-600e5e0110a84891",
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "237db0da53131e4548cb1181337fa0f420299e1f"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"primaryPackagePurpose": "LIBRARY"
|
||||
},
|
||||
{
|
||||
"name": "pip",
|
||||
"SPDXID": "SPDXRef-Package-6b677e82217fb5bd",
|
||||
"SPDXID": "SPDXRef-Package-39020c06af94ca53",
|
||||
"versionInfo": "22.2.2",
|
||||
"supplier": "NOASSERTION",
|
||||
"downloadLocation": "NONE",
|
||||
"licenseConcluded": "MIT",
|
||||
"licenseDeclared": "MIT",
|
||||
"copyrightText": "",
|
||||
"externalRefs": [
|
||||
{
|
||||
"referenceCategory": "PACKAGE-MANAGER",
|
||||
@@ -63,29 +55,41 @@
|
||||
"referenceLocator": "pkg:conda/pip@22.2.2"
|
||||
}
|
||||
],
|
||||
"primaryPackagePurpose": "LIBRARY",
|
||||
"supplier": "NOASSERTION",
|
||||
"files": [
|
||||
{
|
||||
"fileName": "miniconda3/envs/testenv/conda-meta/pip-22.2.2-py38h06a4308_0.json",
|
||||
"SPDXID": "SPDXRef-File-7eb62e2a3edddc0a",
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "a6a2db7668f1ad541d704369fc66c96a4415aa24"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"primaryPackagePurpose": "LIBRARY"
|
||||
},
|
||||
{
|
||||
"name": "testdata/fixtures/fs/conda",
|
||||
"SPDXID": "SPDXRef-Filesystem-6e0ac6a0fab50ab4",
|
||||
"downloadLocation": "NONE",
|
||||
"primaryPackagePurpose": "SOURCE",
|
||||
"copyrightText": "",
|
||||
"attributionTexts": [
|
||||
"SchemaVersion: 2"
|
||||
]
|
||||
],
|
||||
"primaryPackagePurpose": "SOURCE"
|
||||
}
|
||||
],
|
||||
"files": [
|
||||
{
|
||||
"fileName": "miniconda3/envs/testenv/conda-meta/openssl-1.1.1q-h7f8727e_0.json",
|
||||
"SPDXID": "SPDXRef-File-600e5e0110a84891",
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "237db0da53131e4548cb1181337fa0f420299e1f"
|
||||
}
|
||||
],
|
||||
"copyrightText": ""
|
||||
},
|
||||
{
|
||||
"fileName": "miniconda3/envs/testenv/conda-meta/pip-22.2.2-py38h06a4308_0.json",
|
||||
"SPDXID": "SPDXRef-File-7eb62e2a3edddc0a",
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "a6a2db7668f1ad541d704369fc66c96a4415aa24"
|
||||
}
|
||||
],
|
||||
"copyrightText": ""
|
||||
}
|
||||
],
|
||||
"relationships": [
|
||||
@@ -101,12 +105,22 @@
|
||||
},
|
||||
{
|
||||
"spdxElementId": "SPDXRef-Application-ee5ef1aa4ac89125",
|
||||
"relatedSpdxElement": "SPDXRef-Package-b1088cb4090e3a55",
|
||||
"relatedSpdxElement": "SPDXRef-Package-950f99cb9edd281",
|
||||
"relationshipType": "CONTAINS"
|
||||
},
|
||||
{
|
||||
"spdxElementId": "SPDXRef-Package-950f99cb9edd281",
|
||||
"relatedSpdxElement": "SPDXRef-File-600e5e0110a84891",
|
||||
"relationshipType": "CONTAINS"
|
||||
},
|
||||
{
|
||||
"spdxElementId": "SPDXRef-Application-ee5ef1aa4ac89125",
|
||||
"relatedSpdxElement": "SPDXRef-Package-6b677e82217fb5bd",
|
||||
"relatedSpdxElement": "SPDXRef-Package-39020c06af94ca53",
|
||||
"relationshipType": "CONTAINS"
|
||||
},
|
||||
{
|
||||
"spdxElementId": "SPDXRef-Package-39020c06af94ca53",
|
||||
"relatedSpdxElement": "SPDXRef-File-7eb62e2a3edddc0a",
|
||||
"relationshipType": "CONTAINS"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"Class": "config",
|
||||
"Type": "dockerfile",
|
||||
"MisconfSummary": {
|
||||
"Successes": 25,
|
||||
"Successes": 26,
|
||||
"Failures": 2,
|
||||
"Exceptions": 0
|
||||
},
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"MisconfSummary": {
|
||||
"Successes": 0,
|
||||
"Failures": 0,
|
||||
"Exceptions": 25
|
||||
"Exceptions": 26
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"Class": "config",
|
||||
"Type": "dockerfile",
|
||||
"MisconfSummary": {
|
||||
"Successes": 24,
|
||||
"Successes": 25,
|
||||
"Failures": 1,
|
||||
"Exceptions": 0
|
||||
},
|
||||
|
||||
2
integration/testdata/dockerfile.json.golden
vendored
2
integration/testdata/dockerfile.json.golden
vendored
@@ -20,7 +20,7 @@
|
||||
"Class": "config",
|
||||
"Type": "dockerfile",
|
||||
"MisconfSummary": {
|
||||
"Successes": 24,
|
||||
"Successes": 25,
|
||||
"Failures": 1,
|
||||
"Exceptions": 0
|
||||
},
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"Class": "config",
|
||||
"Type": "dockerfile",
|
||||
"MisconfSummary": {
|
||||
"Successes": 24,
|
||||
"Successes": 25,
|
||||
"Failures": 1,
|
||||
"Exceptions": 0
|
||||
},
|
||||
|
||||
1
integration/testdata/dotnet.json.golden
vendored
1
integration/testdata/dotnet.json.golden
vendored
@@ -23,6 +23,7 @@
|
||||
{
|
||||
"Name": "Newtonsoft.Json",
|
||||
"Version": "9.0.1",
|
||||
"Layer": {},
|
||||
"Locations": [
|
||||
{
|
||||
"StartLine": 8,
|
||||
|
||||
6
integration/testdata/fixtures/db/amazon.yaml
vendored
6
integration/testdata/fixtures/db/amazon.yaml
vendored
@@ -18,8 +18,8 @@
|
||||
- key: CVE-2019-5481
|
||||
value:
|
||||
FixedVersion: 7.61.1-12.amzn2.0.1
|
||||
- bucket: microcode_ctl
|
||||
- bucket: bind-export-libs
|
||||
pairs:
|
||||
- key: CVE-2022-21233
|
||||
- key: CVE-2022-38177
|
||||
value:
|
||||
FixedVersion: 2:2.1-47.amzn2.0.13
|
||||
FixedVersion: 99:9.11.4-26.P2.amzn2.13
|
||||
|
||||
@@ -4,4 +4,10 @@
|
||||
pairs:
|
||||
- key: CVE-2021-3712
|
||||
value:
|
||||
FixedVersion: 1:1.1.1k-5.el8_5
|
||||
FixedVersion: 1:1.1.1k-5.el8_5
|
||||
Entries:
|
||||
- FixedVersion: "1:1.1.1k-5.el8_5"
|
||||
Arches:
|
||||
- x86_64
|
||||
VendorIds:
|
||||
- RLSA-2021:4647
|
||||
7
integration/testdata/fixtures/db/ubuntu.yaml
vendored
7
integration/testdata/fixtures/db/ubuntu.yaml
vendored
@@ -14,8 +14,7 @@
|
||||
FixedVersion: 1.44.1-1ubuntu1.2
|
||||
- bucket: ubuntu 22.04
|
||||
pairs:
|
||||
- bucket: bind9
|
||||
- bucket: bash
|
||||
pairs:
|
||||
- key: CVE-2022-2795
|
||||
value:
|
||||
FixedVersion: 1:9.18.1-1ubuntu1.2
|
||||
- key: CVE-2022-3715
|
||||
value: {}
|
||||
@@ -1,55 +1,51 @@
|
||||
- bucket: vulnerability
|
||||
pairs:
|
||||
- key: CVE-2022-21233
|
||||
- key: CVE-2022-38177
|
||||
value:
|
||||
Title: "hw: cpu: Intel: Stale Data Read from legacy xAPIC vulnerability"
|
||||
Description: "Improper isolation of shared resources in some Intel(R) Processors may allow"
|
||||
Severity: MEDIUM
|
||||
Title: "bind: memory leak in ECDSA DNSSEC verification code"
|
||||
Description: "By spoofing the target resolver with responses that have a malformed ECDSA signature, an attacker can trigger a small memory leak. It is possible to gradually erode available memory to the point where named crashes for lack of resources."
|
||||
Severity: HIGH
|
||||
CVSS:
|
||||
nvd:
|
||||
V3Score: 5.5
|
||||
V3Vector: "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
|
||||
redhat:
|
||||
V3Score: 6.0
|
||||
V3Score: 7.5
|
||||
V3Vector: "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N"
|
||||
LastModifiedDate: "2022-09-23T15:15:00Z"
|
||||
PublishedDate: "2022-08-18T20:15:00Z"
|
||||
redhat:
|
||||
V3Score: 7.5
|
||||
V3Vector: "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N"
|
||||
LastModifiedDate: "2022-09-21T11:15:00Z"
|
||||
PublishedDate: "2022-09-21T11:15:00Z"
|
||||
References:
|
||||
- "https://access.redhat.com/security/cve/CVE-2022-21233"
|
||||
- "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21233"
|
||||
- "https://security.netapp.com/advisory/ntap-20220923-0002/"
|
||||
- "https://ubuntu.com/security/notices/USN-5612-1"
|
||||
- "http://www.openwall.com/lists/oss-security/2022/09/21/3"
|
||||
- "https://access.redhat.com/errata/RHSA-2022:6763"
|
||||
- "https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2022-38177.json"
|
||||
- "https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2022-38178.json"
|
||||
- "https://access.redhat.com/security/cve/CVE-2022-38177"
|
||||
VendorSeverity:
|
||||
arch-linux: 2
|
||||
nvd: 2
|
||||
redhat: 2
|
||||
ubuntu: 2
|
||||
- key: CVE-2022-2795
|
||||
- key: CVE-2022-3715
|
||||
value:
|
||||
Title: "bind: processing large delegations may severely degrade resolver performance"
|
||||
Severity: HIGH
|
||||
Description: By flooding the target resolver with queries exploiting this flaw an attacker
|
||||
Title: a heap-buffer-overflow in valid_parameter_transform
|
||||
Severity: LOW
|
||||
Description: A flaw was found in the bash package, where a heap-buffer overflow can occur in valid parameter_transform. This issue may lead to memory problems.
|
||||
CVSS:
|
||||
nvd:
|
||||
V3Score: 7.5
|
||||
V3Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
|
||||
V3Score: 7.8
|
||||
V3Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
|
||||
redhat:
|
||||
V3Score: 5.3
|
||||
V3Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
|
||||
V3Score: 6.6
|
||||
V3Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
|
||||
CweIDs:
|
||||
- CWE-400
|
||||
LastModifiedDate: 2022-10-06T20:15:00Z
|
||||
PublishedDate: 2022-09-21T11:15:00Z
|
||||
- CWE-787
|
||||
LastModifiedDate: 2023-02-24T18:38:00Z
|
||||
PublishedDate: 2023-01-05T15:15:00Z
|
||||
References:
|
||||
- http://www.openwall.com/lists/oss-security/2022/09/21/3
|
||||
- https://access.redhat.com/security/cve/CVE-2022-2795
|
||||
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-2795
|
||||
- https://kb.isc.org/docs/cve-2022-2795
|
||||
- https://lists.debian.org/debian-lts-announce/2022/10/msg00007.html
|
||||
- https://nvd.nist.gov/vuln/detail/CVE-2022-2795
|
||||
- https://ubuntu.com/security/notices/USN-5626-1
|
||||
- https://ubuntu.com/security/notices/USN-5626-2
|
||||
- https://www.debian.org/security/2022/dsa-5235
|
||||
- https://access.redhat.com/errata/RHSA-2023:0340
|
||||
- https://access.redhat.com/security/cve/CVE-2022-3715
|
||||
- https://bugzilla.redhat.com/2126720
|
||||
- https://bugzilla.redhat.com/show_bug.cgi?id=2126720
|
||||
VendorSeverity:
|
||||
cbl-mariner: 3.0
|
||||
nvd: 3.0
|
||||
|
||||
26
integration/testdata/fixtures/fs/npm/node_modules/z-lock/package.json
generated
vendored
Normal file
26
integration/testdata/fixtures/fs/npm/node_modules/z-lock/package.json
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "z-lock",
|
||||
"version": "1.0.0",
|
||||
"description": "This CommonJS module can create a simple \"lock\" that can be checked, locked/unlocked.",
|
||||
"main": "lock.js",
|
||||
"scripts": {
|
||||
"test": "mocha test/*.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ZeeCoder/z-lock.git"
|
||||
},
|
||||
"keywords": [
|
||||
"lock"
|
||||
],
|
||||
"author": "Hubert Viktor",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ZeeCoder/z-lock/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ZeeCoder/z-lock",
|
||||
"devDependencies": {
|
||||
"clone": "^1.0.2",
|
||||
"mocha": "^2.2.5"
|
||||
}
|
||||
}
|
||||
6
integration/testdata/fixtures/fs/npm/package-lock.json
generated
vendored
6
integration/testdata/fixtures/fs/npm/package-lock.json
generated
vendored
@@ -87,6 +87,12 @@
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz",
|
||||
"integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ=="
|
||||
},
|
||||
"z-lock": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/z-lock/-/z-lock-1.0.0.tgz",
|
||||
"integrity": "sha512-TWoID7h5wphb4YHcY/tu9u7nZb6wtmBjqpRUYbQCemrhmJXL+7/Vblb6rs7ANnBInIt9Qccb7bXUCNGZpxekeA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
21
integration/testdata/fixtures/k8s/test_nginx.yaml
vendored
Normal file
21
integration/testdata/fixtures/k8s/test_nginx.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.14.2
|
||||
ports:
|
||||
- containerPort: 80
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user