Downloaded file name is `javadb.tar.gz` rather than `db.tar.gz`.
Also `--skip-update` is deprecated in favor of `--skip-db-update` and `--skip-java-db-update`.
* adding a fix for update-cache that was not applied on AWS scans.
* removing unneeded code
---------
Co-authored-by: Gio Rodriguez <giovanni.rodriguez@aquasec.com>
* Add test for filter with both duplicates and different package paths
* Add package path in key of uniqVulns map
* Add package path to the sorting logic
This commit bumps the go-dep-parser version. This revents Trivy from detecting vulnerabilities in Poetry dev-dependency, so the document is also updated.
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
For images with single layer, the layer key was directly being used as merged cache key.
This was posing an issue of data override and any other image having the same layer could get incorrect data.
So, fixed:
1. Even for 1 layer - merged layer key hash will be calculated
2. We will not go with assumption that merged data will have only 1 pkgInfo
3. We are setting a SchemaVersion in blob being generated in ToBlobInfo
YAML files can also have the `.yml` file extension. So the helm config should take that into account.
Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
While analyzing failure of the report schema validation i found URL looks like that: `https://ubuntu.com/security/notices/USN-5051-4 (regression only in trusty/esm)`. This causing gitlab to mark report as invalid. Patch provided just using first word of the url word.
* chore: add integration label and merge security label
* use the kind/security label for vulnerabilities
Co-authored-by: knqyf263 <knqyf263@gmail.com>
* fix: support for helm chart *.tar.gz
- add test to validate
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
* fix: adding missing test tar
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
* feat: adding helm support
- adding tests for helm analyzer
- add test for non helm tarball
- adding in-memory filesystem for helm
- handle multiple charts at a time
- check the size is smaller than arbitrary size of 200MB if a tarball
* fix(secrets): added '/' for file paths derived from image
* refactor(secrets): used input.Dir to find image scan
* test(secrets): added path to image-config.yaml
* fix(k8s): summary report when when only vulns exit
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
* fix(k8s): return error for not supported report
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
* test(k8s): add tests for report Failed()
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
* refactor: improve error message
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
* feat(k8s): Add report flag for summary
* chore: add headings to the severity columns
* chore: make the default output of k8s summary table
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
This is being mitigated in defsec as well to prevent results with no
filename getting through to fanal
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
The Label Schema Convention has been deprecated in favor of the OCI
image spec.
Update the gorelease config to use the new replacement fields.
This is not considered a breaking change, as it only touches metadata
and the Label Schema Convention is deprecated for over two years (March
2019).
Most fields only need to be renamed. `org.label-schema.schema-version`
could be removed without replacement.
`org.opencontainers.image.documentation` was added to link to the
Github page documentation in the exact version.
`org.opencontainers.image.url` was added pointing to the Aqua Security
product page of trivy.
Further labels were considered but not added (unclear purpose or value).
Find the `*.proto` files and run in a `for loop` to run `protoc`
for each file in a separated command. If fail, `|| exit` will exit
with the returned error.
The POSIX standard specifies that the return status of `find` is 0
unless an error occurred while traversing the directories;
the return status of executed commands doesn't enter into it.
To overcome this limitation, the `-exec ... +` pattern could be used
From the docs (https://man7.org/linux/man-pages/man1/find.1.html):
"If any invocation with the `+' form returns a non-zero
value as exit status, then find returns a non-zero exit
status."
But as well, "This variant of the -exec action runs the specified command
on the selected files, but the command line is built by appending each selected
file name at the end;"
Unfortunately, at the moment `protoc-gen-twirp` plugin doesn't
support multiple files from different packages when the `go_package` option
is explicitly mentioned.
https://github.com/twitchtv/twirp/blob/main/protoc-gen-twirp/generator.go#L181-L185
Signed-off-by: Yuval Goldberg <yuvigoldi@gmail.com>
- rework some of the iac tests to be more flexible to change
- update the scanner to use the moved parser
- everything is now in defsec now for CF parsing, scanning and testing
* feature(iac): Add location and resource to Results
- add the iac resource and line in file information for tfsec and cfsec
- update the version of tfsec and cfsec
* Made below changes
1. To avoid confusion, changed the layer(blobinfo) size to uncompressed size
2. Added v1.configfile as return type of inspect method
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
* Capture license information for apk packages
* changed order or license info in package struct
* Remove space replacement with comma for license info
* feat: Support Google artifact registry
This commit adds the capability to scan images from Google artifact
registry(GAR). GAR domains were earlier rejected by Trivy e.g.
europe-west3-docker.pkg.dev etc. With this change, we will treat domain
ending with 'docker.pkg.dev' as GAR domain and use gcloud sdk to fetch
credentials from provided file or credstore.
* refactor: rename GCR to Registry
Co-authored-by: knqyf263 <knqyf263@gmail.com>
* Add uncompressed layer size
This commit will help in getting uncompressed layer sizes. Can sum up these layer sizes to get the actual image size
* Removed unnecessary exception
* refactor
Co-authored-by: knqyf263 <knqyf263@gmail.com>
* feat(GoBinary) support gobinary and add test
* update(modules) update go-dep-parser
* test(gobinary) update test
* fix(library): return nil with empty result
* test(library): add tests
* refactor: group imports
* chore: update .gitignore
* Update README.md
* refactor(gobinary): update an error
* chore(ci): bunp up Go to 1.16
Co-authored-by: knqyf263 <knqyf263@gmail.com>
* feat(config): support HCL1 files
* feat(config): support HCL2 files
* feat(hcl): add Version()
* feat(config): support HCL files
- combine HCL2.0 and HCL1.0 parsing, checking for conformation to HCL2.0
spec first
- checks for HCL1.0 conformation if content does not comply with HCL2.0
spec
- parsing returns an error only if file content does not
comply with BOTH HCL2.0 and HCL1.0
* add Type() test
Co-authored-by: knqyf263 <knqyf263@gmail.com>
* feat(config): support Dockerfile
* update namings and add Type() test
* only accepts dockerfile as ext/base name
* simplify dockerfile check
* add test case
* feat(cache): support Redis
* chore(mod): update
* feat(main): support Redis
* test: update error messages according to different errors on GitHub Actions
* feat(redis): add prefix
* fix an error
Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
* fix an error
Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
* fix(main): defer close
* test(redis): fix error messages
* test(redis): count current connections
Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
* test(redis): use structs instead of string literals
Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
Condition:- Specify an image name and tag ":" separated.
If correct image name and tag is specified ":" separated, image with given tag will be return otherwise first one will be return
* fix: Due read after write consistency in S3 missingLayers called the actual object that created cache 403 response
This change creating index file for each object so missingLayers will not hit object that not exist.
* fix comments error description
Co-authored-by: oranmoshai <oran.moshai@aquasec.com>
* test(integration): move to the test directory
* chore: update fixtures path
* test: put common test images under the test directory
* chore(Makefile): rename
* feat: support local filesystem and remote git repository [PART 1] (fanal#109)
* feat(walker): add tar/fs walker
* fs_test: Add test names
Signed-off-by: Simarpreet Singh <simar@linux.com>
* walk_test: Add Test_isIgnored
Signed-off-by: Simarpreet Singh <simar@linux.com>
* feat: support local filesystem and remote git repository [PART 2] (fanal#110)
* refactor(analyzer): merge OSAnalyzer, PkgAnalyze, LibAnalyzer into
Analyzer
* test: comment out temporarily
* fix(amazon): check the length
* fix(analyzer): make AnalysisResult a reference
* library/analyzer: Refactor library analyzer code.
Signed-off-by: Simarpreet Singh <simar@linux.com>
* feat: support local filesystem and remote git repository [PART 3] (fanal#111)
* refactor(image): move directory
* feat(applier): add applier
* fix(apk): replace extractor with applier
* test: comment out temporarily
* feat: support local filesystem and remote git repository [PART 4] (fanal#112)
* feat(artifact): add image, local and remote artifact
* image_test: Rename test field to use new convention
Signed-off-by: Simarpreet Singh <simar@linux.com>
* image_test: Add a test for put artifact failure
Signed-off-by: Simarpreet Singh <simar@linux.com>
* refactor(remote): remove unnecessary files for unit test
* feat: support local filesystem and remote git repository [PART 5] (fanal#113)
* test(integration): fix tests
* feat: support local filesystem and remote git repository [PART 6] (fanal#114)
* feat(main): add sub commands
* refactor(types): remove unused type
* chore(mod): update
* test(artifact): add mock
* fix(analyzer): redhat must be replaced with oracle
* fix(analyzer): debian must be replaced with ubuntu
* fix(fs): display dir when hostname is empty
Co-authored-by: Simarpreet Singh <simar@linux.com>
Co-authored-by: Simarpreet Singh <simar@linux.com>
* fix: make AnalysisResult a reference
Co-authored-by: Simarpreet Singh <simar@linux.com>
* refactor(walker): fix comment
Co-authored-by: Simarpreet Singh <simar@linux.com>
Co-authored-by: Simarpreet Singh <simar@linux.com>
Co-authored-by: Simarpreet Singh <simar@linux.com>
* Add S3 support for layer caching this will allow to save image results on managed persistent object store
* Working on PR comments
Co-authored-by: oranmoshai <oran.moshai@aquasec.com>
* analyzer: Send back package and apps info for unknown OS if found.
We should send back package and apps info if found even
in the case of an unknown OS. Example Dockerfile:
```
$ cat Dockerfile
FROM hello-world
ADD https://raw.githubusercontent.com/aquasecurity/trivy-ci-test/master/Cargo.lock .
```
Should say ErrUnknownOS but still scan the Cargo vulns.
Signed-off-by: Simarpreet Singh <simar@linux.com>
* fix(analyzer): send back package and apps info even if there is no package found
* fix(main): handle specific errors
Co-authored-by: knqyf263 <knqyf263@gmail.com>
* feat(image): support OCI Image Format
* refactor: rename NewDockerArchiveImage to NewArchiveImage
* test: rename TestNewDockerArchiveImage to TestNewArchiveImage
* fix: introduce go-multierror
* image: add more sad paths for tryOCI func
Signed-off-by: Simarpreet Singh <simar@linux.com>
* test(image): add more test case
Co-authored-by: Simarpreet Singh <simar@linux.com>
* feat(extractor): switch to layer ID of origin layer
* integration: update golden file for vuln-image
This file was updated during a COVID-19 crisis.
Signed-off-by: Simarpreet Singh <simar@linux.com>
* test(docker): sort applications
* test(docker): fix order
Co-authored-by: Simarpreet Singh <simar@linux.com>
* analyzer: Include layerID as part of LayerInfo
Signed-off-by: Simarpreet Singh <simar@linux.com>
* Add LayerID to Package struct
Signed-off-by: Simarpreet Singh <simar@linux.com>
* analyzer: Remove ID from returned layerInfo
Signed-off-by: Simarpreet Singh <simar@linux.com>
* analyzer: Handle missing layer.ID from cached layer
Signed-off-by: Simarpreet Singh <simar@linux.com>
* extractor/docker: Cleanup logic to avoid extra slice usage
Signed-off-by: Simarpreet Singh <simar@linux.com>
* integration: Fix golden files to include LayerID
Signed-off-by: Simarpreet Singh <simar@linux.com>
* analyzer: Remove condition for adding layer.ID
Signed-off-by: Simarpreet Singh <simar@linux.com>
* types: Introduce types.LibraryInfo
Signed-off-by: Simarpreet Singh <simar@linux.com>
* docker: Add LayerID to each LibraryInfo
Signed-off-by: Simarpreet Singh <simar@linux.com>
* .github/bench: Bump up docker version
Signed-off-by: Simarpreet Singh <simar@linux.com>
* intergration/perf: Remove other OSes for the timebeing.
Looks like Github CI is running out of space while running
other tests. Until we find a better solution we need to comment
out bigger OSes.
Signed-off-by: Simarpreet Singh <simar@linux.com>
* fix(image): call Close() via cleanup funcion
* refactor(type): add omitempty
* analyzer: Change to types.LibraryInfo in analzyer.go
Signed-off-by: Simarpreet Singh <simar@linux.com>
* wip: add CleanupDockerExtractorFn for cleanup
Signed-off-by: Simarpreet Singh <simar@linux.com>
* refactor(analyzer): remove un-needed function
* test(cache): comment in
* Revert "wip: add CleanupDockerExtractorFn for cleanup"
This reverts commit dabfae104bf6d63492823c6c3eb94175d26eabad.
* Revert ".github/bench: Bump up docker version"
This reverts commit b982c46861e1cc0851d53621c0e68ac40918d755.
* refactor(analyzer): sort imports
* test(cache): remove debug code
* test(cache): format
* chore(image): remove debug code
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
* integration: Add a test to use fanal as a library
Signed-off-by: Simarpreet Singh <simar@linux.com>
* integration: Table driven library_tests
Signed-off-by: Simarpreet Singh <simar@linux.com>
* integration: Add even more OSes to the docker mode test
Signed-off-by: Simarpreet Singh <simar@linux.com>
* library_test: run tests in parallel
Signed-off-by: Simarpreet Singh <simar@linux.com>
* .git: Update gitignore with trivy images dir
Signed-off-by: Simarpreet Singh <simar@linux.com>
* library_test: add golden files for packages
Signed-off-by: Simarpreet Singh <simar@linux.com>
* library_test: Run all tests in parallel
Signed-off-by: Simarpreet Singh <simar@linux.com>
* library_test: Refactor check logic to run twice.
Once for no cache, once with cache.
Signed-off-by: Simarpreet Singh <simar@linux.com>
* library_test: Fix cache invocation
Signed-off-by: Simarpreet Singh <simar@linux.com>
* integration: Add a more comprehensive image for library_test
Signed-off-by: Simarpreet Singh <simar@linux.com>
* library_test: Introduce anon struct type
Signed-off-by: Simarpreet Singh <simar@linux.com>
* travis: add make test-integration
Signed-off-by: Simarpreet Singh <simar@linux.com>
* travis: Upgrade docker version
Signed-off-by: Simarpreet Singh <simar@linux.com>
* change mod genuinetools/reg to vanilla
Instead of using tomoyamachi's fork we can now use the vanilla upstream
package genuinetools/reg. This package gets better maintenance.
Also introducing new checksums for reg's children/dependecies.
Signed-off-by: Jakub Bielecki <jakub.bielecki@codilime.com>
* go mod tidy
Workaround for a deficient Ping implementation of reg package.
Ping fails on docker registries that return http 401
Authentication Required when requesting general /v2 url, but
happily allow unauthenticated pull of a specific image.
Closesaquasecurity/trivyfanal#229
Signed-off-by: Jakub Bielecki <jakub.bielecki@codilime.com>
* extract all files in target require filedirs
* use separator to string
* change dpkg file match algorithm
* use filepath.Clean
* add test for target dir files
- Adds a new analyzer error for "no packages detected"
- Package analyzers now return the common "no packages detected" error
- Returned errors from the package analyzers are checked against the
common "no packages detected" errors and filters those out. Other
errors will now be passed back to the user for debugging.
* fix genuinetools/reg module version
* merge ubuntu analyzer into debianbase analyzer
* add os analyzer tests
* add redhat base test
* add redhatbase test file
* use AnalyzeOsError
* add gitignore empty folder
* change variable name in test codes
* skip coverage check on forked project
Thank you for taking interest in contributing to Trivy!
## Issues
- 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.
## Pull Requests
1. Every Pull Request should have an associated bug or feature issue unless you are fixing a trivial documentation issue.
4. Please add the associated Issue link in the PR description.
2. Your PR is more likely to be accepted if it focuses on just one change.
5. There's no need to add or tag reviewers.
6. If a reviewer commented on your code or asked for changes, please remember to respond with comment. Do not mark discussion as resolved. It's up to reviewer to mark it resolved (in case if suggested fix addresses problem properly). PRs with unresolved issues should not be merged (even if the comment is unclear or requires no action from your side).
7. Please include a comment with the results before and after your change.
8. Your PR is more likely to be accepted if it includes tests (We have not historically been very strict about tests, but we would like to improve this!).
9. If your PR affects the user experience in some way, please update the README.md and the CLI help accordingly.
### Title
It is not that strict, but we use the title conventions in this repository.
Each commit message doesn't have to follow the conventions as long as it is clear and descriptive since it will be squashed and merged.
#### Format of the title
```
<type>(<scope>): <subject>
```
The `type` and `scope` should always be lowercase as shown below.
**Allowed `<type>` values:**
- **feat** for a new feature for the user, not a new feature for build script. Such commit will trigger a release bumping a MINOR version.
- **fix** for a bug fix for the user, not a fix to a build script. Such commit will trigger a release bumping a PATCH version.
- **perf** for performance improvements. Such commit will trigger a release bumping a PATCH version.
- **docs** for changes to the documentation.
- **style** for formatting changes, missing semicolons, etc.
- **refactor** for refactoring production code, e.g. renaming a variable.
- **test** for adding missing tests, refactoring tests; no production code change.
- **build** for updating build configuration, development tools or other changes irrelevant to the user.
- **chore** for updates that do not apply to the above, such as dependency updates.
**Example `<scope>` values:**
- alpine
- redhat
- ruby
- python
- terraform
- report
- etc.
The `<scope>` can be empty (e.g. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted.
#### Example titles
```
feat(alma): add support for AlmaLinux
```
```
fix(oracle): handle advisories with ksplice versions
```
```
docs(misconf): add comparison with Conftest and TFsec
```
```
chore(deps): bump go.uber.org/zap from 1.19.1 to 1.20.0
```
**NOTE**: please do not use `chore(deps): update fanal` and something like that if you add new features or fix bugs in Trivy-related projects.
The PR title should describe what the PR adds or fixes even though it just updates the dependency in Trivy.
### Unit tests
Your PR must pass all the unit tests. You can test it as below.
```
$ make test
```
### Integration tests
Your PR must pass all the integration tests. You can test it as below.
```
$ make test-integration
```
### Documentation
You can build the documents as below and view it at http://localhost:8000.
```
$ make mkdocs-serve
```
## Understand where your pull request belongs
Trivy is composed of several different repositories that work together:
- [Trivy](https://github.com/aquasecurity/trivy) is the client-side, user-facing, command line tool.
- [vuln-list](https://github.com/aquasecurity/vuln-list) is a vulnerabilities database, aggregated from different sources, and normalized for easy consumption. Think of this as the "server" side of the trivy command line tool. **There should be no pull requests to this repo**
- [vuln-list-update](https://github.com/aquasecurity/vuln-list-update) is the code that maintains the vuln-list database.
- [trivy-db](https://github.com/aquasecurity/trivy-db) maintains the vulnerability database pulled by Trivy CLI.
- [fanal](https://github.com/aquasecurity/fanal) is a library for extracting system information from containers. It is being used by Trivy to find testable subjects in the container image.
See [Issues](https://aquasecurity.github.io/trivy/latest/community/contribute/issue/) and [Pull Requests](https://aquasecurity.github.io/trivy/latest/community/contribute/pr/)
`Trivy` (`tri` pronounced like **tri**gger, `vy` pronounced like en**vy**) is a simple and comprehensive scanner for vulnerabilities in container images, file systems, and Git repositories, as well as for configuration issues.
`Trivy` detects vulnerabilities of OS packages (Alpine, RHEL, CentOS, etc.) and language-specific packages (Bundler, Composer, npm, yarn, etc.).
In addition, `Trivy` scans Infrastructure as Code (IaC) files such as Terraform, Dockerfile and Kubernetes, to detect potential configuration issues that expose your deployments to the risk of attack.
`Trivy` is easy to use. Just install the binary and you're ready to scan.
Trivy ([pronunciation][pronunciation]) is a comprehensive and versatile security scanner.
Trivy has *scanners* that look for security issues, and *targets* where it can find those issues.
- OS packages and software dependencies in use (SBOM)
- Known vulnerabilities (CVEs)
- IaC issues and misconfigurations
- Sensitive information and secrets
- Software licenses
```
$ trivy image [YOUR_IMAGE_NAME]
To learn more, go to the [Trivy homepage][homepage] for feature highlights, or to the [Documentation site][docs] for detailed information.
## Quick Start
### Get Trivy
Trivy is available in most common distribution channels. The full list of installation options is available in the [Installation] page. Here are a few popular examples:
-`brew install trivy`
-`docker run aquasec/trivy`
- Download binary from <https://github.com/aquasecurity/trivy/releases/latest/>
- See [Installation] for more
Trivy is integrated with many popular platforms and applications. The complete list of integrations is available in the [Ecosystem] page. Here are a few popular examples:
There are canary builds ([Docker Hub](https://hub.docker.com/r/aquasec/trivy/tags?page=1&name=canary), [GitHub](https://github.com/aquasecurity/trivy/pkgs/container/trivy/75776514?tag=canary), [ECR](https://gallery.ecr.aws/aquasecurity/trivy#canary) images and [binaries](https://github.com/aquasecurity/trivy/actions/workflows/canary.yaml)) as generated every push to main branch.
Please be aware: canary builds might have critical bugs, it's not recommended for use in production.
- OS packages (Alpine Linux, Red Hat Universal Base Image, Red Hat Enterprise Linux, CentOS, AlmaLinux, Rocky Linux, CBL-Mariner, Oracle Linux, Debian, Ubuntu, Amazon Linux, openSUSE Leap, SUSE Enterprise Linux, Photon OS and Distroless)
- A wide variety of built-in policies are provided **out of the box**
- Kubernetes, Docker, Terraform, and more coming soon
- Support custom policies
- Simple
- Specify only an image name, a path to config files, or an artifact name
- Fast
- The first scan will finish within 10 seconds (depending on your network). Consequent scans will finish in single seconds.
- Easy installation
-`apt-get install`, `yum install` and `brew install` are possible.
- **No pre-requisites** such as installation of DB, libraries, etc.
- High accuracy
- **Especially [Alpine Linux][alpine] and RHEL/CentOS**
- Other OSes are also high
- DevSecOps
- **Suitable for CI** such as GitHub Actions, Jenkins, GitLab CI, etc.
- Support multiple targets
- container image, local filesystem and remote git repository
- Supply chain security (SBOM support)
- Support CycloneDX
# Integrations
- [GitHub Actions][action]
- [Visual Studio Code][vscode]
# Documentation
The official documentation, which provides detailed installation, configuration, and quick start guides, is available at https://aquasecurity.github.io/trivy/.
`tri` is pronounced like **tri**gger, `vy` is pronounced like en**vy**.
---
@@ -207,14 +115,20 @@ Contact us about any matter by opening a GitHub Discussion [here][discussions]
This directory contains media assets, such as the Trivy logo.
Assets under this directory are provided under the Creative Commons - BY 4.0 License. For more details, see here: <https://creativecommons.org/licenses/by/4.0/>
You have to know where to put the DB file. The following command shows the default cache directory.
```
$ ssh user@host
$ trivy -h | grep cache
--cache-dir value cache directory (default: "/home/myuser/.cache/trivy") [$TRIVY_CACHE_DIR]
```
Put the DB file in the cache directory + `/db`.
```
$ mkdir -p /home/myuser/.cache/trivy/db
$ cd /home/myuser/.cache/trivy/db
$ tar xvf /path/to/db.tar.gz -C /home/myuser/.cache/trivy/db
x trivy.db
x metadata.json
$ rm /path/to/db.tar.gz
```
In an air-gapped environment it is your responsibility to update the Trivy database on a regular basis, so that the scanner can detect recently-identified vulnerabilities.
### Run Trivy with --skip-update and --offline-scan option
In an air-gapped environment, specify `--skip-update` so that Trivy doesn't attempt to download the latest database file.
In addition, if you want to scan Java dependencies such as JAR and pom.xml, you need to specify `--offline-scan` since Trivy tries to issue API requests for scanning Java applications by default.
`bundle.tar.gz ` file includes two folders: `docker`, `kubernetes` and file: `.manifest`.
```
$ tar xvf bundle.tar.gz
x ./docker/
...
x ./kubernetes/
...
x ./.manifest
$ rm bundle.tar.gz
```
In an air-gapped environment it is your responsibility to update policies on a regular basis, so that the scanner can detect recently-identified misconfigurations.
### Run Trivy with --skip-policy-update option
In an air-gapped environment, specify `--skip-policy-update` so that Trivy doesn't attempt to download the latest misconfiguration policies.
The open source community has been hard at work developing new tools for Trivy. You can check out some of them here.
Have you created a tool that’s not listed? Add the name and description of your integration and open a pull request in the GitHub repository to get your change merged.
| [Continuous Vulnerability Testing with Trivy][semaphore-tutorial] | Tutorial on scanning code, containers, infrastructure, and Kubernetes with Semaphore CI/CD. |
| [Trivy Vulnerability Explorer][explorer] | Explore trivy vulnerability reports in your browser and create .trivyignore files interactively. Can be integrated in your CI/CD tooling with deep links. |
In the following example using the template `asff.tpl`, [ASFF](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-format.html) file can be generated.
Trivy has client/server mode. Trivy server has vulnerability database and Trivy client doesn't have to download vulnerability database. It is useful if you want to scan images at multiple locations and do not want to download the database at every location.
## Server
At first, you need to launch Trivy server. It downloads vulnerability database automatically and continue to fetch the latest DB in the background.
```
$ trivy server --listen localhost:8080
2019-12-12T15:17:06.551+0200 INFO Need to update DB
2019-12-12T15:17:56.706+0200 INFO Reopening DB...
2019-12-12T15:17:56.707+0200 INFO Listening localhost:8080...
```
If you want to accept a connection from outside, you have to specify `0.0.0.0` or your ip address, not `localhost`.
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.
Thank you for taking interest in contributing to Trivy!
1. Every Pull Request should have an associated bug or feature issue unless you are fixing a trivial documentation issue.
1. Please add the associated Issue link in the PR description.
1. Your PR is more likely to be accepted if it focuses on just one change.
1. There's no need to add or tag reviewers.
1. If a reviewer commented on your code or asked for changes, please remember to respond with comment. Do not mark discussion as resolved. It's up to reviewer to mark it resolved (in case if suggested fix addresses problem properly). PRs with unresolved issues should not be merged (even if the comment is unclear or requires no action from your side).
1. Please include a comment with the results before and after your change.
1. Your PR is more likely to be accepted if it includes tests (We have not historically been very strict about tests, but we would like to improve this!).
1. If your PR affects the user experience in some way, please update the README.md and the CLI help accordingly.
## Development
Install the necessary tools for development by following their respective installation instructions.
- [Go](https://go.dev/doc/install)
- [Mage](https://magefile.org/)
### Build
After making changes to the Go source code, build the project with the following command:
```shell
$ mage build
$ ./trivy -h
```
### Lint
You must pass the linter checks:
```shell
$ mage lint
```
Additionally, you need to have run `go mod tidy`, so execute the following command as well:
```shell
$ mage tidy
```
### Unit tests
Your PR must pass all the unit tests. You can test it as below.
```
$ mage test:unit
```
### Integration tests
Your PR must pass all the integration tests. You can test it as below.
```
$ mage test:integration
```
### Documentation
You can build the documents as below and view it at http://localhost:8000.
```
$ mage docs:serve
```
## Title
It is not that strict, but we use the title conventions in this repository.
Each commit message doesn't have to follow the conventions as long as it is clear and descriptive since it will be squashed and merged.
### Format of the title
```
<type>(<scope>): <subject>
```
The `type` and `scope` should always be lowercase as shown below.
**Allowed `<type>` values:**
- **feat** for a new feature for the user, not a new feature for build script. Such commit will trigger a release bumping a MINOR version.
- **fix** for a bug fix for the user, not a fix to a build script. Such commit will trigger a release bumping a PATCH version.
- **perf** for performance improvements. Such commit will trigger a release bumping a PATCH version.
- **docs** for changes to the documentation.
- **style** for formatting changes, missing semicolons, etc.
- **refactor** for refactoring production code, e.g. renaming a variable.
- **test** for adding missing tests, refactoring tests; no production code change.
- **build** for updating build configuration, development tools or other changes irrelevant to the user.
- **chore** for updates that do not apply to the above, such as dependency updates.
- **ci** for changes to CI configuration files and scripts
- **revert** for revert to a previous commit
**Allowed `<scope>` values:**
checks:
- vuln
- misconf
- secret
- license
mode:
- image
- fs
- repo
- sbom
- k8s
- server
- aws
- vm
os:
- alpine
- redhat
- alma
- rocky
- mariner
- oracle
- debian
- ubuntu
- amazon
- suse
- photon
- distroless
language:
- ruby
- php
- python
- nodejs
- rust
- dotnet
- java
- go
- elixir
- dart
vuln:
- os
- lang
config:
- kubernetes
- dockerfile
- terraform
- cloudformation
container
- docker
- podman
- containerd
- oci
cli:
- cli
- flag
SBOM:
- cyclonedx
- spdx
- purl
others:
- helm
- report
- db
- deps
The `<scope>` can be empty (e.g. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted.
### Example titles
```
feat(alma): add support for AlmaLinux
```
```
fix(oracle): handle advisories with ksplice versions
```
```
docs(misconf): add comparison with Conftest and TFsec
```
```
chore(deps): bump go.uber.org/zap from 1.19.1 to 1.20.0
```
**NOTE**: please do not use `chore(deps): update fanal` and something like that if you add new features or fix bugs in Trivy-related projects.
The PR title should describe what the PR adds or fixes even though it just updates the dependency in Trivy.
## Commits
## Understand where your pull request belongs
Trivy is composed of several repositories that work together:
- [Trivy](https://github.com/aquasecurity/trivy) is the client-side, user-facing, command line tool.
- [vuln-list](https://github.com/aquasecurity/vuln-list) is a vulnerability database, aggregated from different sources, and normalized for easy consumption. Think of this as the "server" side of the trivy command line tool. **There should be no pull requests to this repo**
- [vuln-list-update](https://github.com/aquasecurity/vuln-list-update) is the code that maintains the vuln-list database.
- [trivy-db](https://github.com/aquasecurity/trivy-db) maintains the vulnerability database pulled by Trivy CLI.
- [go-dep-parser](https://github.com/aquasecurity/go-dep-parser) is a library for parsing lock files such as package-lock.json and Gemfile.lock.
Triage is an important part of maintaining the health of the trivy repo.
A well organized repo allows maintainers to prioritize feature requests, fix bugs, and respond to users facing difficulty with the tool as quickly as possible.
Triage includes:
- Labeling issues
- Responding to issues
- Closing issues
@@ -185,7 +188,7 @@ We use two labels [help wanted](https://github.com/aquasecurity/trivy/issues?q=i
and [good first issue](https://github.com/aquasecurity/trivy/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
to identify issues that have been specially groomed for new contributors.
We have specific [guidelines](/docs/advanced/contribd/contrib/help-wanted.md)
We have specific [guidelines](/docs/community/maintainer/help-wanted.md)
for how to use these labels. If you see an issue that satisfies these
guidelines, you can add the `help wanted` label and the `good first issue` label.
Please note that adding the `good first issue` label must also
You have to know where to put the DB files. The following command shows the default cache directory.
```
$ ssh user@host
$ trivy -h | grep cache
--cache-dir value cache directory (default: "/home/myuser/.cache/trivy") [$TRIVY_CACHE_DIR]
```
=== "Vulnerability db"
Put the DB file in the cache directory + `/db`.
```
$ mkdir -p /home/myuser/.cache/trivy/db
$ cd /home/myuser/.cache/trivy/db
$ tar xvf /path/to/db.tar.gz -C /home/myuser/.cache/trivy/db
x trivy.db
x metadata.json
$ rm /path/to/db.tar.gz
```
=== "Java index db[^1]"
Put the DB file in the cache directory + `/java-db`.
```
$ mkdir -p /home/myuser/.cache/trivy/java-db
$ cd /home/myuser/.cache/trivy/java-db
$ tar xvf /path/to/javadb.tar.gz -C /home/myuser/.cache/trivy/java-db
x trivy-java.db
x metadata.json
$ rm /path/to/javadb.tar.gz
```
In an air-gapped environment it is your responsibility to update the Trivy databases on a regular basis, so that the scanner can detect recently-identified vulnerabilities.
### Run Trivy with the specific flags.
In an air-gapped environment, you have to specify `--skip-db-update` and `--skip-java-db-update`[^1] so that Trivy doesn't attempt to download the latest database files.
In addition, if you want to scan `pom.xml` dependencies, you need to specify `--offline-scan` since Trivy tries to issue API requests for scanning Java applications by default.
2022-09-16T17:37:13.258+0900 INFO Vulnerability scanning is enabled
2022-09-16T17:37:13.258+0900 INFO Secret scanning is enabled
2022-09-16T17:37:13.258+0900 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2022-09-16T17:37:13.258+0900 INFO Please see also https://aquasecurity.github.io/trivy/dev/docs/secret/scanning/#recommendation for faster secret detection
2022-09-16T17:37:14.827+0900 INFO Detected SBOM format: cyclonedx-json
2022-09-16T17:37:14.901+0900 INFO Found SBOM (cyclonedx) attestation in Rekor
2022-09-16T17:37:14.903+0900 INFO Detected OS: alpine
2022-09-16T17:37:14.903+0900 INFO Detecting Alpine vulnerabilities...
2022-09-16T17:37:14.907+0900 INFO Number of language-specific files: 0
2022-09-16T17:37:14.908+0900 WARN This OS version is no longer supported by the distribution: alpine 3.7.3
2022-09-16T17:37:14.908+0900 WARN The vulnerability detection may be insufficient because security updates are not provided
[Cosign](https://github.com/sigstore/cosign) supports generating and verifying [in-toto attestations](https://github.com/in-toto/attestation). This tool enables you to sign and verify SBOM attestation.
And, Trivy can take an SBOM attestation as input and scan for vulnerabilities
!!! note
In the following examples, the `cosign` command will write an attestation to a target OCI registry, so you must have permission to write.
If you want to avoid writing an OCI registry and only want to see an attestation, add the `--no-upload` option to the `cosign` command.
## Sign with a local key pair
Cosign can generate key pairs and use them for signing and verification. After you run the following command, you will get a public and private key pair. Read more about [how to generate key pairs](https://docs.sigstore.dev/cosign/key-generation).
```bash
$ cosign generate-key-pair
```
In the following example, Trivy generates an SBOM in the CycloneDX format, and then Cosign attaches an attestation of the SBOM to a container image with a local key pair.
```bash
# The cyclonedx type is supported in Cosign v1.10.0 or later.
Trivy can take an SBOM attestation as input and scan for vulnerabilities. Currently, Trivy supports CycloneDX-type attestation.
In the following example, Cosign can get an CycloneDX-type attestation and trivy scan it.
You must create CycloneDX-type attestation before trying the example.
To learn more about how to create an CycloneDX-Type attestation and attach it to an image, see the [Sign with a local key pair](#sign-with-a-local-key-pair) section.
"Description":"libfetch before 2021-07-26, as used in apk-tools, xbps, and other products, mishandles numeric strings for the FTP and HTTP protocols. The FTP passive mode implementation allows an out-of-bounds read because strtol is used to parse the relevant numbers into address bytes. It does not check if the line ends prematurely. If it does, the for-loop condition checks for the '\\0' terminator one byte too late.",
[Cosign](https://github.com/sigstore/cosign) supports generating and verifying [in-toto attestations](https://github.com/in-toto/attestation). This tool enables you to sign and verify Cosign vulnerability attestation.
!!! note
In the following examples, the `cosign` command will write an attestation to a target OCI registry, so you must have permission to write.
If you want to avoid writing an OCI registry and only want to see an attestation, add the `--no-upload` option to the `cosign` command.
### Sign with a local key pair
Cosign can generate key pairs and use them for signing and verification. After you run the following command, you will get a public and private key pair. Read more about [how to generate key pairs](https://docs.sigstore.dev/cosign/key-generation).
```bash
$ cosign generate-key-pair
```
In the following example, Trivy generates a cosign vulnerability scan record, and then Cosign attaches an attestation of it to a container image with a local key pair.
This feature might change without preserving backwards compatibility.
Trivy’s compliance flag lets you curate a specific set of checks into a report. In a typical Trivy scan, there are hundreds of different checks for many different components and configurations, but sometimes you already know which specific checks you are interested in. Often this would be an industry accepted set of checks such as CIS, or some vendor specific guideline, or your own organization policy that you want to comply with. These are all possible using the flexible compliance infrastructure that's built into Trivy. Compliance reports are defined as simple YAML documents that select checks to include in the report.
## Usage
Compliance report is currently supported in the following targets (trivy sub-commands):
-`trivy image`
-`trivy aws`
-`trivy k8s`
Add the `--compliance` flag to the command line, and set it's value to desired report.
For example: `trivy k8s cluster --compliance k8s-nsa` (see below for built-in and custom reports)
### Options
The following flags are compatible with `--compliance` flag and allows customizing it's output:
You can create your own custom compliance report. A compliance report is a simple YAML document in the following format:
```yaml
spec:
id:"k8s-myreport"# report unique identifier. this should not container spaces.
title:"My custom Kubernetes report"# report title. Any one-line title.
description:"Describe your report"# description of the report. Any text.
relatedResources :
- https://some.url# useful references. URLs only.
version:"1.0"# spec version (string)
controls:
- name:"Non-root containers"# Name for the control (appears in the report as is). Any one-line name.
description:'Check that container is not running as root'# Description (appears in the report as is). Any text.
id:"1.0"# control identifier (string)
checks:# list of existing Trivy checks that define the control
- id:AVD-KSV-0012# check ID. Must start with `AVD-` or `CVE-`
severity:"MEDIUM"# Severity for the control (note that checks severity isn't used)
- name:"Immutable container file systems"
description:'Check that container root file system is immutable'
id:"1.1"
checks:
- id:AVD-KSV-0014
severity:"LOW"
```
The check id field (`controls[].checks[].id`) is referring to existing check by it's "AVD ID". This AVD ID is easily located in the check's source code metadata header, or by browsing [Aqua vulnerability DB](https://avd.aquasec.com/), specifically in the [Misconfigurations](https://avd.aquasec.com/misconfig/) and [Vulnerabilities](https://avd.aquasec.com/nvd) sections.
Once you have a compliance spec, you can select it by file path: `trivy --compliance @</path/to/compliance.yaml>` (note the `@` indicating file path instead of report id).
Trivy scans any container image for license files and offers an opinionated view on the risk associated with the license.
License are classified using the [Google License Classification][google-license-classification] -
- Forbidden
- Restricted
- Reciprocal
- Notice
- Permissive
- Unencumbered
- Unknown
!!! tip
Licenses that Trivy fails to recognize are classified as UNKNOWN.
As those licenses may be in violation, it is recommended to check those unknown licenses as well.
By default, Trivy scans licenses for packages installed by `apk`, `apt-get`, `dnf`, `npm`, `pip`, `gem`, etc.
To enable extended license scanning, you can use `--license-full`.
In addition to package licenses, Trivy scans source code files, Markdown documents, text files and `LICENSE` documents to identify license usage within the image or filesystem.
!!! note
The full license scanning is expensive. It takes a while.
Currently, the standard license scanning doesn't support filesystem and repository scanning.
Running containers with 'root' user can lead to a container escape situation. It is a best practice to run containers as non-root users, which can be done by adding a 'USER' statement to the Dockerfile.
| Dockerfile | `Dockerfile`, `Dockerfile.*`, and `*.Dockerfile` |
| Containerfile | `Containerfile`, `Containerfile.*`, and `*.Containerfile` |
| Terraform | `*.tf` and `*.tf.json` |
### Configuration languages
In the above general file formats, Trivy automatically identifies the following types of configuration files:
- CloudFormation (JSON/YAML)
- Kubernetes (JSON/YAML)
- Helm (YAML)
- Terraform Plan (JSON)
This is useful for filtering inputs, as described below.
## Rego format
A single package must contain only one policy.
!!!example
``` rego
# METADATA
# title: Deployment not allowed
# description: Deployments are not allowed because of some reasons.
# schemas:
# - input: schema["kubernetes"]
# custom:
# id: ID001
# severity: LOW
# input:
# selector:
# - type: kubernetes
package user.kubernetes.ID001
deny[res] {
input.kind == "Deployment"
msg := sprintf("Found deployment '%s' but deployments are not allowed", [input.metadata.name])
res := result.new(msg, input.kind)
}
```
In this example, ID001 "Deployment not allowed" is defined under `user.kubernetes.ID001`.
If you add a new custom policy, it must be defined under a new package like `user.kubernetes.ID002`.
### Policy structure
`# METADATA` (optional)
: - SHOULD be defined for clarity since these values will be displayed in the scan results
- `custom.input` SHOULD be set to indicate the input type the policy should be applied to. See [list of available types](https://github.com/aquasecurity/defsec/blob/418759b4dc97af25f30f32e0bd365be7984003a1/pkg/types/sources.go)
`package` (required)
: - MUST follow the Rego's [specification][package]
- MUST be unique per policy
- SHOULD include policy id for uniqueness
- MAY include the group name such as `kubernetes` for clarity
- Group name has no effect on policy evaluation
`deny` (required)
: - SHOULD be `deny` or start with `deny_`
- Although `warn`, `warn_*`, `violation`, `violation_` also work for compatibility, `deny` is recommended as severity can be defined in `__rego_metadata__`.
- SHOULD return ONE OF:
- The result of a call to `result.new(msg, cause)`. The `msg` is a `string` describing the issue occurrence, and the `cause` is the property/object where the issue occurred. Providing this allows Trivy to ascertain line numbers and highlight code in the output.
- A `string` denoting the detected issue
- Although `object` with `msg` field is accepted, other fields are dropped and `string` is recommended if `result.new()` is not utilised.
- e.g. `{"msg": "deny message", "details": "something"}`
### Package
A package name must be unique per policy.
!!!example
``` rego
package user.kubernetes.ID001
```
By default, only `builtin.*` packages will be evaluated.
If you define custom packages, you have to specify the package prefix via `--namespaces` option.
``` bash
trivy conf --policy /path/to/custom_policies --namespaces user /path/to/config_dir
```
In this case, `user.*` will be evaluated.
Any package prefixes such as `main` and `user` are allowed.
### Metadata
Metadata helps enrich Trivy's scan results with useful information.
The annotation format is described in the [OPA documentation](https://www.openpolicyagent.org/docs/latest/annotations/).
Trivy supports extra fields in the `custom` section as described below.
!!!example
``` rego
# METADATA
# title: Deployment not allowed
# description: Deployments are not allowed because of some reasons.
# custom:
# id: ID001
# severity: LOW
# input:
# selector:
# - type: kubernetes
```
All fields are optional. The `schemas` field should be used to enable policy validation using a built-in schema. The
schema that will be used is based on the input document type. It is recommended to use this to ensure your policies are
correct and do not reference incorrect properties/values.
| Field name | Allowed values | Default value | In table | In JSON |
For more details on how to define schemas within Rego policies, please see the [OPA guide](https://www.openpolicyagent.org/docs/latest/schemas/#schema-annotations) that describes it in more detail.
Running containers with 'root' user can lead to a container escape situation. It is a best practice to run containers as non-root users, which can be done by adding a 'USER' statement to the Dockerfile.
There are a number of options for overriding values in Helm charts. When override values are passed to the Helm scanner, the values will be used during the Manifest rendering process and will become part of the scanned artifact.
For suggestions or issues regarding policy content, please open an issue under the [defsec][defsec] repository.
Helm Chart scanning will resolve the chart to Kubernetes manifests then run the [kubernetes][kubernetes] checks.
## Policy Distribution
defsec policies are distributed as an OPA bundle on [GitHub Container Registry][ghcr] (GHCR).
When misconfiguration detection is enabled, Trivy pulls the OPA bundle from GHCR as an OCI artifact and stores it in the cache.
Those policies are then loaded into Trivy OPA engine and used for detecting misconfigurations.
If Trivy is unable to pull down newer policies, it will use the embedded set of policies as a fallback. This is also the case in air-gap environments where `--skip-policy-update` might be passed.
## Update Interval
Trivy checks for updates to OPA bundle on GHCR every 24 hours and pulls it if there are any updates.
Trivy provides built-in policies to detect configuration issues in popular Infrastructure as Code files, such as: Docker, Kubernetes, Terraform, CloudFormation, and more.
In addition to built-in policies, you can write your own custom policies, as you can see [here][custom].

## Quick start
Simply specify a directory containing IaC files such as Terraform, CloudFormation, Azure ARM templates, Helm Charts and Dockerfile.
``` bash
$ trivy config [YOUR_IaC_DIRECTORY]
```
!!! example
```
$ ls build/
Dockerfile
$ trivy config ./build
2022-05-16T13:29:29.952+0100 INFO Detected config files: 1
Running containers with 'root' user can lead to a container escape situation. It is a best practice to run containers as non-root users, which can be done by adding a 'USER' statement to the Dockerfile.
Running containers with 'root' user can lead to a container escape situation. It is a best practice to run containers as non-root users, which can be done by adding a 'USER' statement to the Dockerfile.
Sysctls can disable security mechanisms or affect all containers on a host, and should be disallowed except for an allowed 'safe' subset. A sysctl is considered safe if it is namespaced in the container or the Pod, and it is isolated from other Pods or processes on the same Node.
Scan an AWS account for misconfigurations. Trivy uses the same authentication methods as the AWS CLI. See https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for aws
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--include-non-failures include successes and exceptions, available with '--scanners config'
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--max-cache-age duration The maximum age of the cloud cache. Cached data will be requeried from the cloud provider if it is older than this. (default 24h0m0s)
-o, --output string output file name
--policy-namespaces strings Rego namespaces
--region string AWS Region to scan
--report string specify a report format for the output. (all,summary) (default "all")
--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")
--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
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for filesystem
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-unfixed display only fixed vulnerabilities
--ignored-licenses strings specify a list of license to ignore
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for image
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-unfixed display only fixed vulnerabilities
--ignored-licenses strings specify a list of license to ignore
--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
--ignored-licenses strings specify a list of license to ignore
###### Auto generated by spf13/cobra on 16-Mar-2023
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.