Compare commits

...

257 Commits

Author SHA1 Message Date
DmitriyLewen
27a3e55e8e fix(java): download java-db once (#5442) 2023-10-28 12:20:47 +09:00
dependabot[bot]
d223732657 chore(deps): bump google.golang.org/grpc from 1.57.0 to 1.57.1 (#5447)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-28 12:20:43 +09:00
Teppei Fukuda
cbbd1ce1f0 feat(k8s): add support for vulnerability detection (#5268)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Signed-off-by: chenk <hen.keinan@gmail.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
Co-authored-by: chenk <hen.keinan@gmail.com>
2023-10-14 12:32:55 +00:00
DmitriyLewen
24a0d92145 fix(python): override BOM in requirements.txt files (#5375) 2023-10-14 08:37:32 +00:00
Itay Shakury
0c3e2f08b7 docs: add kbom documentation (#5363) 2023-10-13 09:00:28 +00:00
DmitriyLewen
6c12f04286 test: use maximize build space for VM tests (#5362) 2023-10-13 01:42:57 +00:00
dependabot[bot]
c4134224a2 chore(deps): bump golang.org/x/net from 0.15.0 to 0.17.0 (#5365)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-12 15:45:22 +00:00
DmitriyLewen
20ab7033b8 fix(report): add escaping quotes in misconfig Title for asff template (#5351) 2023-10-11 07:38:07 +00:00
DmitriyLewen
91841f59ba ci: add workflow to check Go versions of dependencies (#5340) 2023-10-09 11:04:09 +00:00
simar7
57ba05c766 chore(deps): Upgrade defsec to v0.93.1 (#5348) 2023-10-08 12:40:21 +00:00
dependabot[bot]
fef3ed4358 chore(deps): bump alpine from 3.18.3 to 3.18.4 (#5300)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-06 06:07:11 +00:00
Doug Donohoe
ced54aced1 fix: Report error when os.CreateTemp fails (to be consistent with other uses) (#5342) 2023-10-05 14:45:45 +00:00
Nikita Pivkin
2798df916b fix: add config files to FS for post-analyzers (#5333) 2023-10-05 12:59:47 +00:00
DmitriyLewen
af485b33fd fix: fix MIME warnings after updating to Go 1.20 (#5336) 2023-10-05 12:58:40 +00:00
Teppei Fukuda
008babfb8b build: fix a compile error with Go 1.21 (#5339)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2023-10-05 10:06:32 +00:00
Alexandr Hacicheant
00d9c4666f feat: added Metadata into the k8s resource's scan report (#5322) 2023-10-05 08:16:50 +00:00
DmitriyLewen
03b6787c44 ci: check only PR's in actions/stale (#5337) 2023-10-05 07:36:02 +00:00
Itay Shakury
e6d5889ed4 chore: update adopters template (#5330) 2023-10-04 12:13:20 +00:00
Teppei Fukuda
74dbd8a1fd ci: do not trigger tests on the push event (#5313)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2023-10-03 11:10:05 +00:00
j1nka
393bfdc1ac fix(sbom): use PURL or Group and Name in case of Java (#5154) 2023-10-03 11:06:27 +00:00
Anais Urlichs
76eb8a57b6 docs: add buildkite repository to ecosystem page (#5316)
Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>
2023-10-03 09:02:52 +00:00
dependabot[bot]
6c74ee11f0 chore(deps): bump docker/setup-qemu-action from 2 to 3 (#5290)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 09:01:37 +00:00
dependabot[bot]
6119878de1 chore(deps): bump docker/setup-buildx-action from 2 to 3 (#5292)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 08:25:12 +00:00
dependabot[bot]
a346587b8d chore(deps): bump actions/cache from 3.3.1 to 3.3.2 (#5293)
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.3.1...v3.3.2)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 15:54:49 +00:00
dependabot[bot]
7e613cc5f7 chore(deps): bump github.com/google/uuid from 1.3.0 to 1.3.1 (#5286)
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/uuid/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/google/uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 15:45:32 +00:00
dependabot[bot]
f05bc4be4f chore(deps): bump github.com/hashicorp/go-getter from 1.7.1 to 1.7.2 (#5289)
Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/hashicorp/go-getter/releases)
- [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml)
- [Commits](https://github.com/hashicorp/go-getter/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-getter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 15:45:07 +00:00
Teppei Fukuda
3be5e6b242 chore: enable go-critic (#5302)
* chore: enable gocritic

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* refactor: fix lint issues

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* test: return true for latest versions

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* chore(lint): enforce map and slice styles

Signed-off-by: knqyf263 <knqyf263@gmail.com>

---------

Signed-off-by: knqyf263 <knqyf263@gmail.com>
2023-10-02 08:33:21 +00:00
dependabot[bot]
f6cd21c873 chore(deps): bump actions/checkout from 3.6.0 to 4.1.0 (#5288)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.6.0...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 08:31:07 +00:00
dependabot[bot]
f7b975187d chore(deps): bump github.com/aws/aws-sdk-go from 1.45.3 to 1.45.19 (#5287)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.45.3 to 1.45.19.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.45.3...v1.45.19)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 07:35:19 +00:00
DmitriyLewen
18d168769c close java-db client (#5273) 2023-10-02 06:56:33 +00:00
dependabot[bot]
eb60e9f3c0 chore(deps): bump docker/login-action from 2 to 3 (#5291)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 05:20:14 +00:00
dependabot[bot]
5a92055e1c chore(deps): bump github.com/aws/aws-sdk-go-v2/service/sts (#5294)
Bumps [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) from 1.21.5 to 1.22.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/s3/v1.22.0/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/efs/v1.21.5...service/s3/v1.22.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sts
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 05:19:08 +00:00
dependabot[bot]
46afe65eed chore(deps): bump github.com/sigstore/rekor from 1.2.1 to 1.3.0 (#5304)
Bumps [github.com/sigstore/rekor](https://github.com/sigstore/rekor) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/sigstore/rekor/releases)
- [Changelog](https://github.com/sigstore/rekor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sigstore/rekor/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/sigstore/rekor
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 05:18:49 +00:00
dependabot[bot]
0bf2a11a2e chore(deps): bump github.com/opencontainers/image-spec (#5295)
Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec) from 1.1.0-rc4 to 1.1.0-rc5.
- [Release notes](https://github.com/opencontainers/image-spec/releases)
- [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md)
- [Commits](https://github.com/opencontainers/image-spec/compare/v1.1.0-rc4...v1.1.0-rc5)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/image-spec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 05:18:09 +00:00
Ignacio Íñigo Hernández
23b5fece08 fix(report): removes git::http from uri in sarif (#5244)
* fix(sarif): removes git::http from uri in sarif
* fix(sarif): removes git::http from uri in sarif

## Description

## Related issues
- Fixes https://github.com/aquasecurity/trivy/issues/5003

## Checklist
- [ ] I've read the [guidelines for contributing](https://aquasecurity.github.io/trivy/latest/community/contribute/pr/) to this repository.
- [ ] I've followed the [conventions](https://aquasecurity.github.io/trivy/latest/community/contribute/pr/#title) in the PR title.
- [ ] I've added tests that prove my fix is effective or that my feature works.
- [ ] I've updated the [documentation](https://github.com/aquasecurity/trivy/blob/main/docs) with the relevant information (if needed).
- [ ] I've added usage information (if the PR introduces new options)
- [ ] I've included a "before" and "after" example to the description (if the PR is a user interface change).

* fix lint

---------

Co-authored-by: Simar <simar@linux.com>
2023-10-02 05:17:43 +00:00
PranitRout07
4f1d576e5a Improve the meaning of sentence (#5301)
Sentence has incomplete meaning .
Go to this link to see the issue: https://aquasecurity.github.io/trivy/v0.45/tutorials/kubernetes/gitops/
2023-10-01 18:13:12 +00:00
dependabot[bot]
6ab2bdfa7c chore(deps): bump github.com/owenrumney/go-sarif/v2 from 2.2.0 to 2.2.2 (#5297)
Bumps [github.com/owenrumney/go-sarif/v2](https://github.com/owenrumney/go-sarif) from 2.2.0 to 2.2.2.
- [Release notes](https://github.com/owenrumney/go-sarif/releases)
- [Changelog](https://github.com/owenrumney/go-sarif/blob/main/.goreleaser.yml)
- [Commits](https://github.com/owenrumney/go-sarif/compare/v2.2.0...v2.2.2)

---
updated-dependencies:
- dependency-name: github.com/owenrumney/go-sarif/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-01 17:43:34 +00:00
dependabot[bot]
4217cffb5a chore(deps): bump golang.org/x/term from 0.11.0 to 0.12.0 (#5296)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.11.0 to 0.12.0.
- [Commits](https://github.com/golang/term/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-01 17:30:33 +00:00
DmitriyLewen
1840584703 add app nil check (#5274) 2023-10-01 07:36:59 +00:00
Erik McKelvey
c5ae9f265f typo: in secret.md (#5281) 2023-10-01 07:27:47 +00:00
DmitriyLewen
562723f0a7 docs: add info about github format (#5265)
* docs: add info about github format

* rename `GitHub SBOM` to `GitHub dependency snapshots`
2023-09-28 18:40:45 +00:00
DmitriyLewen
3dd5b1e946 feat(dotnet): add license support for NuGet (#5217)
* add nuspec files support

* docs: docs, log messages, comments refactoring

* save found licences to use next time

* refactor

* refactor

* fix typo
2023-09-28 08:13:31 +00:00
Itay Shakury
5c18475f37 docs: correctly export variables (#5260)
missing = in variable definition
2023-09-28 07:15:48 +00:00
simar7
0c08dde015 chore: Add line numbers for lint output (#5247)
* fix(github): Add line numbers for lint output

* correctional message check

* update messaging
2023-09-28 07:12:47 +00:00
DmitriyLewen
0ccbb4f7fd chore(cli): disable java-db flags in server mode (#5263)
* disable java-db flag for server mode

* update docs
2023-09-28 07:10:14 +00:00
Michel Meyer
908a4914c7 feat(db): allow passing registry options (#5226)
* feat(db): allow passing registry options

Signed-off-by: Michel Meyer <meyer_michel@outlook.com>

* feat(db): pass cli registry options to javaDB

---------

Signed-off-by: Michel Meyer <meyer_michel@outlook.com>
2023-09-27 13:17:11 +00:00
simar7
5b4652d796 chore(deps): Bump up defsec to v0.93.0 (#5253) 2023-09-27 06:43:55 +00:00
DmitriyLewen
faf8d49c49 refactor(purl): use TypeApk from purl (#5232)
* use TypeApk from purl

* refactor: some tweaks

Signed-off-by: knqyf263 <knqyf263@gmail.com>

---------

Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-09-26 08:55:23 +00:00
DmitriyLewen
559c0f30b1 chore: enable more linters (#5228)
* chore: enable more linters

* fix typos

* ci: add `verbose` option in linter action

* ci: remove `verbose` option in linter action
2023-09-26 06:20:54 +00:00
Nikita Pivkin
2baad46189 ci: bump GoReleaser from 1.16.2 to 1.20.0 (#5236)
* chore: replace brews.tap with brews.repository

* ci: bump GoReleaser from 1.16.2 to 1.20.0
2023-09-25 19:08:53 +00:00
za
df2bff9f5e Fix typo on ide.md (#5239)
mange -> manage.
2023-09-25 19:05:22 +00:00
Teppei Fukuda
44656f2853 refactor: use defined types (#5225)
* refactor: replace string with defined types

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* chore: add gci

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* fix(purl): not confuse trivy type with purl type

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* test: fix cyclonedx fixture

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* fix(template): cast TargetType to string

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* chore: bump TinyGo to v0.29.0

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* test: change license to licence

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* use `analyzer.TypeGoMod` for gomod analyzer

* ignore `licence` for misspell linter

---------

Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2023-09-22 10:44:39 +00:00
Javier Freire Riobó
37af529947 fix(purl): skip local Go packages (#5190)
* fix(purl): trim a final slash

* fix(purl): skip local Go packages

* fix(purl): a few improvements
2023-09-20 14:19:21 +00:00
Nikita Pivkin
eea3320d83 docs: update info about license scanning in Yarn projects (#5207) 2023-09-19 06:24:11 +00:00
DmitriyLewen
2e6662060e ci: auto apply labels (#5200)
* add label for mage file. Create workflow.

* fix typo

* setup go and aqua tools

* set fetch-depth == 1
2023-09-18 13:51:12 +00:00
DmitriyLewen
49680dc881 fix link (#5203) 2023-09-18 08:07:56 +00:00
Paternity Leave
daae88287b fix(purl): handle rust types (#5186)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2023-09-15 20:58:10 +00:00
Paternity Leave
81240cf080 chore: auto-close issues (#5177)
* chore: auto close issues

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* chore: add state_reason

* docs: add a warning message about issues

Signed-off-by: knqyf263 <knqyf263@gmail.com>

---------

Signed-off-by: knqyf263 <knqyf263@gmail.com>
2023-09-14 06:19:59 +00:00
dependabot[bot]
bd0accd8a0 chore(deps): bump github.com/spf13/viper from 1.15.0 to 1.16.0 (#5093)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 06:17:08 +00:00
chenk
ecee79403e fix(k8s): kbom support addons labels (#5178)
* feat: kbom support addons label

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kbom support addons label

Signed-off-by: chenk <hen.keinan@gmail.com>

---------

Signed-off-by: chenk <hen.keinan@gmail.com>
2023-09-14 06:12:48 +00:00
Nikita Pivkin
9ebc25d88b test: validate SPDX with the JSON schema (#5124)
* test: validate SPDX with the JSON schema

* use the SPDX schema version based on the document version

* additionally validate the document using spdx
2023-09-14 06:10:09 +00:00
chenk
9a49a37737 chore: bump trivy-kubernetes-latest (#5161)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-09-12 07:21:44 +00:00
Nikita Pivkin
ad1dc6327a docs: add 'Signature Verification' guide (#4731)
* add 'Signature Verification' guide

* add gpg signature verification doc

---------

Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-09-12 06:57:40 +00:00
k.goto
7c68d4a7ec docs: add image-scanner-with-trivy for ecosystem (#5159) 2023-09-11 09:18:56 +00:00
Katsuya Miyachi
ed49609a73 fix(fs): assign the absolute path to be inspected to ROOTPATH when filesystem (#5158) 2023-09-10 15:08:09 +00:00
dependabot[bot]
19539722e0 chore(deps): bump github.com/CycloneDX/cyclonedx-go (#5102)
Bumps [github.com/CycloneDX/cyclonedx-go](https://github.com/CycloneDX/cyclonedx-go) from 0.7.2-0.20230625092137-07e2f29defc3 to 0.7.2.
- [Release notes](https://github.com/CycloneDX/cyclonedx-go/releases)
- [Changelog](https://github.com/CycloneDX/cyclonedx-go/blob/master/.goreleaser.yml)
- [Commits](https://github.com/CycloneDX/cyclonedx-go/commits/v0.7.2)

---
updated-dependencies:
- dependency-name: github.com/CycloneDX/cyclonedx-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-10 12:57:56 +00:00
Srishanth
c7516011b5 Update filtering.md (#5131) 2023-09-10 08:52:19 +00:00
dependabot[bot]
ccc6d7cb2c chore(deps): bump sigstore/cosign-installer (#5104)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from a5d81fb6bdbcbb3d239e864d6552820420254494 to 4a861528be5e691840a69536975ada1d4c30349d.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](a5d81fb6bd...4a861528be)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-08 14:04:16 +00:00
dependabot[bot]
48cbf45534 chore(deps): bump github.com/cyphar/filepath-securejoin (#5143)
Bumps [github.com/cyphar/filepath-securejoin](https://github.com/cyphar/filepath-securejoin) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/cyphar/filepath-securejoin/releases)
- [Commits](https://github.com/cyphar/filepath-securejoin/compare/v0.2.3...v0.2.4)

---
updated-dependencies:
- dependency-name: github.com/cyphar/filepath-securejoin
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-08 13:47:33 +00:00
dependabot[bot]
a9c2c74c55 chore(deps): bump golangci/golangci-lint-action from 3.6.0 to 3.7.0 (#5103)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-07 20:17:29 +00:00
dependabot[bot]
120ac68b5b chore(deps): bump easimon/maximize-build-space from 7 to 8 (#5105)
Bumps [easimon/maximize-build-space](https://github.com/easimon/maximize-build-space) from 7 to 8.
- [Release notes](https://github.com/easimon/maximize-build-space/releases)
- [Changelog](https://github.com/easimon/maximize-build-space/blob/master/CHANGELOG.md)
- [Commits](https://github.com/easimon/maximize-build-space/compare/v7...v8)

---
updated-dependencies:
- dependency-name: easimon/maximize-build-space
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-07 20:16:13 +00:00
dependabot[bot]
41eaa78ae0 chore(deps): bump github.com/aws/aws-sdk-go from 1.44.273 to 1.45.3 (#5126)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.273 to 1.45.3.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.273...v1.45.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-06 11:09:44 +00:00
Anais Urlichs
932f927555 chaging adopters discussion tempalte (#5091)
Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>
2023-09-05 20:55:25 +00:00
dependabot[bot]
db3133346a chore(deps): bump github.com/cheggaaa/pb/v3 from 3.1.2 to 3.1.4 (#5092)
Bumps [github.com/cheggaaa/pb/v3](https://github.com/cheggaaa/pb) from 3.1.2 to 3.1.4.
- [Commits](https://github.com/cheggaaa/pb/compare/v3.1.2...v3.1.4)

---
updated-dependencies:
- dependency-name: github.com/cheggaaa/pb/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 20:50:58 +00:00
dependabot[bot]
8c0b7d619c chore(deps): bump github.com/hashicorp/golang-lru/v2 from 2.0.2 to 2.0.6 (#5094)
Bumps [github.com/hashicorp/golang-lru/v2](https://github.com/hashicorp/golang-lru) from 2.0.2 to 2.0.6.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](https://github.com/hashicorp/golang-lru/compare/v2.0.2...v2.0.6)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/golang-lru/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 07:23:20 +00:00
dependabot[bot]
c61c664c30 chore(deps): bump github.com/aws/aws-sdk-go-v2/config (#5095)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.25 to 1.18.38.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.25...config/v1.18.38)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 07:21:05 +00:00
dependabot[bot]
a99944c1c2 chore(deps): bump github.com/containerd/containerd from 1.7.3 to 1.7.5 (#5097)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.3 to 1.7.5.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.7.3...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 07:19:50 +00:00
dependabot[bot]
9fc844ecfc chore(deps): bump github.com/Azure/azure-sdk-for-go/sdk/azidentity (#5098)
Bumps [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.3.0...sdk/azcore/v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 07:18:15 +00:00
dependabot[bot]
c504f8be44 chore(deps): bump actions/checkout from 3.5.3 to 3.6.0 (#5106)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.3...v3.6.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 18:42:12 +00:00
Teppei Fukuda
cdab67e7fa docs: add Bitnami (#5078)
* docs: add Bitnami

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* docs: add a Debian link

Signed-off-by: knqyf263 <knqyf263@gmail.com>

---------

Signed-off-by: knqyf263 <knqyf263@gmail.com>
2023-09-01 04:29:05 +00:00
Juan Ariza Toledano
7acc5e8312 feat(docker): add support for scanning Bitnami components (#5062)
* feat(bitnami): add support for scanning Bitnami components

Signed-off-by: juan131 <jariza@vmware.com>

* chore(deps): bump packageurl-go

TypeBitnami is not included in v0.1.1

* feat(spdx): handle orphan packages

* fix: update Elastic SPDX

Signed-off-by: juan131 <jariza@vmware.com>

* Update pkg/fanal/analyzer/sbom/sbom.go

Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>

* fix: remove useless else

Signed-off-by: juan131 <jariza@vmware.com>

* call AnalysisResult.Sort()

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* delete app packages

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* fix: set the component path to packages

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* docs: add a comment about continue

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* chore: bump trivy-db

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* docs: add Bitnami

Signed-off-by: knqyf263 <knqyf263@gmail.com>

---------

Signed-off-by: juan131 <jariza@vmware.com>
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
2023-08-31 20:18:05 +00:00
Teppei Fukuda
9628b1cbf3 feat: add support for .trivyignore.yaml (#5070)
* feat: add support for .trivyignore.yaml

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* add test for trivyignore.yaml

* Add doublestar support

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* go mod tidy

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* update docs

* test: fix

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* fix: load .trivyignore once

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* feat: add a debug log

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* docs: add a table for fields

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* fix: skip empty results

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* revert the change

Signed-off-by: knqyf263 <knqyf263@gmail.com>

---------

Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2023-08-31 11:53:37 +00:00
Nikita Pivkin
4547e27666 fix(terraform): improve detection of terraform files (#4984)
* fix(terraform): improve detection of terraform files

* update defsec

---------

Co-authored-by: Simar <simar@linux.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-08-31 10:47:06 +00:00
Bishwa Thapa
0c8919e1e4 feat: filter artifacts on --exclude-owned flag (#5059)
* feat: filter artifacts on --exclude-owned flag

- filter artifacts using trivy-kubernetes library
- upgrade dependencies
- generate docs

* chore: remove shorthand flag for --exclude-owned flag
2023-08-31 10:17:52 +00:00
DmitriyLewen
c04f234fa4 fix(sbom): cyclonedx advisory should omit null value (#5041)
* return nil for advisories, if len of refs == 0
add marshal test

* add integration test for cyclonedx with vulns

* use existing testcase

* test(pom): add ID for cyclondedx integration golden file

* test(integration): add sorting cyclonedx vulns
2023-08-31 10:16:34 +00:00
Teppei Fukuda
f811ed2d48 build: maximize build space for build tests (#5072)
* build: maximize build space for build tests

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* only for Linux

Signed-off-by: knqyf263 <knqyf263@gmail.com>

* maximize first

Signed-off-by: knqyf263 <knqyf263@gmail.com>

---------

Signed-off-by: knqyf263 <knqyf263@gmail.com>
2023-08-31 09:02:18 +00:00
chenk
69ea5bf70e feat: improve kbom component name (#5058)
* feat: improve component name - merge

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: improve component name

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: improve component name

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: improve component name

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: improve component name

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: improve component name

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: improve component name

Signed-off-by: chenk <hen.keinan@gmail.com>

---------

Signed-off-by: chenk <hen.keinan@gmail.com>
2023-08-31 07:35:47 +00:00
DmitriyLewen
3715dcb3f4 fix(pom): add licenses for pom artifacts (#5071) 2023-08-31 06:41:35 +00:00
simar7
07f7e9853b chore(deps): Update defsec to v0.92.0 (#5068)
* chore(deps): Update defsec to v0.92.0

* update tests

* update integration tests
2023-08-30 20:43:08 +00:00
DmitriyLewen
d4ca3cce21 chore: bump Go to 1.20 (#5067)
* update go.mod, linter, protoc dockerfile

* bump go version in .golangci.yaml
2023-08-30 10:22:33 +00:00
Teppei Fukuda
49fdd584ba feat: PURL matching with qualifiers in OpenVEX (#5061)
* feat: PURL match in OpenVEX

* test: fix fixture

* Update docs/docs/supply-chain/vex.md

Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>

* docs: add a comment about overriding statements

---------

Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
2023-08-30 07:48:32 +00:00
DmitriyLewen
4401998ec1 feat(java): add graph support for pom.xml (#4902)
* add graph support

* update docs

* bump go-dep-parser

* remove replace for go-dep-parser

* update docs
2023-08-30 06:56:41 +00:00
DmitriyLewen
9c211d005d feat(swift): add vulns for cocoapods (#5037)
* add vulns for cocoapods, fix purl

* update docs

* remove go-dep-parser replace

* update purl and test

* bump github.com/DmitriyLewen/trivy-db

* remove replace for trivy-db

* remove added sbom tests

* add test for Package() func

* add wrong epoch test

* refactor docs

* add comment to join the module and submodule in purl

* docs: add an example

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-08-29 12:46:49 +00:00
chenk
422fa414e8 fix: support image pull secret for additional workloads (#5052)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-08-29 06:33:31 +00:00
Jan Mosig
8e933860a3 fix: #5033 Superfluous double quote in html.tpl (#5036) 2023-08-28 12:20:02 +00:00
Florian Bufler
9345a98ed1 docs(repo): update trivy repo usage and example (#5049) 2023-08-28 08:46:39 +00:00
Leke Ariyo
5d8da70c62 perf: Optimize Dockerfile for reduced layers and size (#5038)
* Optimize Dockerfile for reduced layers and size

* Optimize Dockerfile for clarity and efficiency without compromising debuggability
2023-08-27 07:52:02 +00:00
Bishwa Thapa
1be9da7aae feat: scan K8s Resources Kind with --all-namespaces (#5043) 2023-08-27 07:38:45 +00:00
guangwu
0e17d0befc fix: vulnerability typo (#5044)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-08-27 07:12:11 +00:00
Anais Urlichs
d70fab2318 docs: adding a terraform tutorial to the docs (#3708)
* adding a terraform tutorial to the docs

* modifying Terraform tutorial

Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>

* changes to the terraform tutorial in accoradance with the feedback

Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>

* updates to the terraform tutorial based on PR feedback

Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>

---------

Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>
2023-08-27 07:08:51 +00:00
Nikita Pivkin
2fa264ac1e feat(report): add licenses to sarif format (#4866)
* feat(report): add licenses to sarif format

* update doc
2023-08-23 11:56:08 +00:00
Nikita Pivkin
07ddf47905 feat(misconf): show the resource name in the report (#4806)
* feat(misconf): show the resource name in the report

* fix typo

* use a loop instead of lo.Map

* add test
2023-08-23 11:54:08 +00:00
Jonathan Lopez Torres
9de360623a chore: update alpine base images (#5015) 2023-08-23 11:53:31 +00:00
DmitriyLewen
ef70d20766 feat: add Package.resolved swift files support (#4932)
* add Package.resolved files analyzer

* add Swift detector and integration test

* refactor after go-dep-parser changes

* bump go-dep-parser

* remove replaces

* use filePath for Required func

* add ID field
2023-08-23 11:23:50 +00:00
Nikita Pivkin
ec5d8bec0d feat(nodejs): parse licenses in yarn projects (#4652)
* feat(nodejs): parse licenses in yarn projects

* close the zip file

* use fsutils.WalkDir

* refactor: extract traverseFunc

* update tests

* update required

* improve required fn

* handle error

* fix required

* fix required

* fix required

* update test

* fix after review

* simplify test data

* fix path

* rename fn

* update docs

* update docs

* simplify required fn

* skip an empty license

* improve required

* improve required

* update golden

* classify license file

* fix path

* fix path

* improve license parsing from cache

* classify the license file from zip

* refactor

* refactor

* fix lint

* fix after review

* fix test

* mv files

* mv files

* fix dbg message

* refactor: use zip.Reader as fs.FS

* refactor: pass io.Reader

* refactor: use fs.Sub

* refactor: add a struct for license traversing

* refactor: use lo.Some

* feat: bump the yarn analyzer version

* go mod tidy

* fix: sort imports

* use multierror

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-08-23 06:35:54 +00:00
chenk
3114c87e60 fix: k8s private registries support (#5021)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-08-21 12:00:04 +00:00
DmitriyLewen
6d79f55db9 bump github.com/testcontainers/testcontainers-go from 0.21.0 to 0.23.0 (#5018) 2023-08-21 09:16:56 +00:00
Nikita Pivkin
9ace59106e feat(vuln): support last_affected field from osv (#4944)
* feat(vuln): support last_affected field from osv

* run go mod tidy

* bump trivy-db
2023-08-20 16:08:56 +00:00
Nikita Pivkin
d442176405 feat(server): add version endpoint (#4869)
* feat(server): add version endpoint

* fix panic and test

* move version.go

* move version variable

* add docs about endpoints

* move testdata

* refactor

* update build command

* refactor
2023-08-20 06:12:31 +00:00
chenk
63cd41d20d feat: k8s private registries support (#4987)
* feat: k8s private registries support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: k8s private registries support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: k8s private registries support

Signed-off-by: chenk <hen.keinan@gmail.com>

* fix: add non empty credential update

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: k8s private registries support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: k8s private registries support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: k8s private registries support

Signed-off-by: chenk <hen.keinan@gmail.com>

---------

Signed-off-by: chenk <hen.keinan@gmail.com>
2023-08-20 06:07:30 +00:00
rlubetkin
cb16e23f14 fix(server): add indirect prop to package (#4974)
* fix(server): add indirect prop to package

* fix(server): fix test
2023-08-17 08:57:20 +00:00
Teppei Fukuda
a4e981b4ec docs: add coverage (#4954)
* docs: add coverage

* add more pages

* add dart, dotnet, elixir languages.

* add C, ruby, cocoapods. Update links

* rename headers for dart and elixir

* docs: add Google Distroless and Photon OS

* docs: add IaC

* docs: put vulnerability into a single page

* fixed broken links

* docs: add coverage overview

* update some links

* add note about arch for Rocky linux

* docs: fix typo

* fix typo

* docs: add footnotes

* docs: add a link to coverage in the license section

* docs: add a conversion table

* docs: get aligned

---------

Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2023-08-17 08:00:34 +00:00
DmitriyLewen
6f03c79405 feat(c): add location for lock file dependencies. (#4994)
* add location for conan lock files

* bump go-dep-parser

* go mod tidy
2023-08-16 11:34:03 +00:00
Anais Urlichs
c74870500a docs: adding blog post on ec2 (#4813)
* adding blog post on ec2

Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>

* update title of section

Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>

* changing the location of the article to be under Vulnerabilities

---------

Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>
2023-08-13 07:40:08 +00:00
DmitriyLewen
4e1316c37f revert 32bit bins (#4977) 2023-08-13 07:32:08 +00:00
dependabot[bot]
fc959fc57f chore(deps): bump github.com/xlab/treeprint from 1.1.0 to 1.2.0 (#4917)
Bumps [github.com/xlab/treeprint](https://github.com/xlab/treeprint) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/xlab/treeprint/releases)
- [Commits](https://github.com/xlab/treeprint/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/xlab/treeprint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10 08:21:41 +00:00
DmitriyLewen
f105279989 fix(report): return severity colors in table format (#4969)
* use xio.NopCloser to compare with os.Stdout

* fmt of import
2023-08-10 03:58:42 +00:00
DmitriyLewen
bc2b0ca6c3 build: maximize available disk space for release (#4937)
* remove unneeded bins and archives

* use jlumbroso/free-disk-space

* remove repeating step

* use maximize-build-space

* build: remove unused step

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-08-09 18:18:15 +00:00
simar7
9493c6f087 test(cli): Fix assertion helptext (#4966) 2023-08-09 09:07:45 +00:00
simar7
b0359de664 chore(deps): Bump defsec to v0.91.1 (#4965) 2023-08-09 09:07:13 +00:00
Teppei Fukuda
d3a34e409c test: validate CycloneDX with the JSON schema (#4956)
* test: validate CycloneDX with the JSON schema

* fix(sbom): move licenses to `name` field in Cyclonedx format (#4941)

* use license.Name instead of Expression

* update tests

* test: add uuid package

* test: compare UUID

---------

Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
2023-08-08 12:51:10 +00:00
Nikita Pivkin
798ef1b64a fix(server): add licenses to the Result message (#4955) 2023-08-08 07:21:59 +00:00
Nikita Pivkin
e8cf281471 fix(aws): resolve endpoint if endpoint is passed (#4925)
* fix(aws): resolve endpoint to get identity if endpoint is passed

* resolve endpoint for ami and ebs

* return an error if aws region is missing
2023-08-08 07:19:40 +00:00
DmitriyLewen
f18b0db583 fix(sbom): move licenses to name field in Cyclonedx format (#4941)
* use license.Name instead of Expression

* update tests
2023-08-06 12:50:35 +00:00
DmitriyLewen
a79670156f add only uniq deps in dependsOn (#4943) 2023-08-06 11:39:39 +00:00
Nikita Pivkin
b544e0dea7 use testify instead of gotest.tools (#4946) 2023-08-06 11:33:16 +00:00
Nikita Pivkin
067a0fcb9c fix(nodejs): do not detect lock file in node_modules as an app (#4949)
* fix(npm): do not detect lock file in node_modules as an app

* refactor: add x/path.Contains

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-08-06 08:59:18 +00:00
DmitriyLewen
e6d7705a51 bump go-dep-parser (#4936) 2023-08-06 08:07:30 +00:00
dependabot[bot]
c584dc1768 chore(deps): bump github.com/openvex/go-vex from 0.2.0 to 0.2.1 (#4914)
Bumps [github.com/openvex/go-vex](https://github.com/openvex/go-vex) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/openvex/go-vex/releases)
- [Commits](https://github.com/openvex/go-vex/compare/v0.2.0...v0.2.1)

---
updated-dependencies:
- dependency-name: github.com/openvex/go-vex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-03 13:07:12 +00:00
dependabot[bot]
358d56b6b5 chore(deps): bump helm/kind-action from 1.7.0 to 1.8.0 (#4909)
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](fa81e57adf...dda0770415)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-03 06:14:49 +00:00
dependabot[bot]
17f3ea9180 chore(deps): bump github.com/Azure/azure-sdk-for-go/sdk/azcore (#4912)
Bumps [github.com/Azure/azure-sdk-for-go/sdk/azcore](https://github.com/Azure/azure-sdk-for-go) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.6.0...sdk/azcore/v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azcore
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-03 06:13:41 +00:00
Nikita Pivkin
39ccbf7b58 test(aws): move part of unit tests to integration (#4884)
* test(aws): move part of unit tests to integration

* fix typo

* fix test

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-08-02 15:48:52 +00:00
Will Yardley
6d3ae3bcf2 docs(cli): update help string for file and dir skipping (#4872)
* docs(cli): update help string for file and dir skipping

- Update the contextual help messages
- Add some additional examples (and clarify YAML file configuration) for
  globbing
- Update docs
- Fix broken link in skipping docs

See also #3754

Signed-off-by: William Yardley <wyardley@users.noreply.github.com>

* docs: revert

---------

Signed-off-by: William Yardley <wyardley@users.noreply.github.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-08-02 12:33:59 +00:00
dependabot[bot]
7d7a1ef54a chore(deps): bump sigstore/cosign-installer (#4910)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from ef0e9691595ea19ec990a46b1a591dcafe568f34 to a5d81fb6bdbcbb3d239e864d6552820420254494.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](ef0e969159...a5d81fb6bd)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 11:54:14 +00:00
dependabot[bot]
fc7495017d chore(deps): bump github.com/sosedoff/gitkit from 0.3.0 to 0.4.0 (#4916)
Bumps [github.com/sosedoff/gitkit](https://github.com/sosedoff/gitkit) from 0.3.0 to 0.4.0.
- [Commits](https://github.com/sosedoff/gitkit/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: github.com/sosedoff/gitkit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 11:41:38 +00:00
dependabot[bot]
b2a68bc06d chore(deps): bump k8s.io/api from 0.27.3 to 0.27.4 (#4918)
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.27.3 to 0.27.4.
- [Commits](https://github.com/kubernetes/api/compare/v0.27.3...v0.27.4)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 11:37:31 +00:00
dependabot[bot]
e5c0c15b6e chore(deps): bump github.com/secure-systems-lab/go-securesystemslib (#4919)
Bumps [github.com/secure-systems-lab/go-securesystemslib](https://github.com/secure-systems-lab/go-securesystemslib) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/secure-systems-lab/go-securesystemslib/releases)
- [Commits](https://github.com/secure-systems-lab/go-securesystemslib/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: github.com/secure-systems-lab/go-securesystemslib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 11:37:09 +00:00
dependabot[bot]
da37803d59 chore(deps): bump github.com/aws/aws-sdk-go-v2/service/sts (#4913)
Bumps [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) from 1.19.0 to 1.21.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.19.0...service/s3/v1.21.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sts
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 11:31:47 +00:00
dependabot[bot]
9744e6498d chore(deps): bump github.com/magefile/mage from 1.14.0 to 1.15.0 (#4915)
Bumps [github.com/magefile/mage](https://github.com/magefile/mage) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/magefile/mage/releases)
- [Changelog](https://github.com/magefile/mage/blob/master/.goreleaser.yml)
- [Commits](https://github.com/magefile/mage/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/magefile/mage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 10:52:46 +00:00
Teppei Fukuda
99eebc6703 docs: update the discussion template (#4928) 2023-08-02 10:51:51 +00:00
Teppei Fukuda
d19c7d9f29 feat(repo): support local repositories (#4890)
* feat(repo): support local repositories

* fix tests

* test: fix client/server tests

* docs: update

* test: add fs tests

* test: do not update golden files if overridden

* docs: remove a comment about fs deprecation
2023-07-31 11:27:36 +00:00
DmitriyLewen
3c19761875 bump go-dep-parser (#4893) 2023-07-31 11:08:25 +00:00
Nikita Pivkin
e1c2a8c804 fix(misconf): add missing fields to proto (#4861)
* fix(misconf): add missing fields to proto

* mark deleted fields as reserved
2023-07-30 11:15:36 +00:00
Nikita Pivkin
8b8e0e83d1 fix: remove trivy-db package replacement (#4877)
* fix: remove trivy-db package replacement

* fix: remove trivy-db package replacement
2023-07-30 07:37:14 +00:00
Nikita Pivkin
f9efe44fd3 chore(test): bump the integration test timeout to 15m (#4880) 2023-07-30 07:34:48 +00:00
simar7
7271d682fb chore(deps): Update defsec to v0.91.0 (#4886)
* chore(deps): Update defsec to v0.91.0

* update tests

Signed-off-by: Simar <simar@linux.com>

---------

Signed-off-by: Simar <simar@linux.com>
2023-07-30 07:31:34 +00:00
Teppei Fukuda
c3bc67c89a chore: update CODEOWNERS (#4871)
* Update CODEOWNERS

* Add simar7
2023-07-27 07:05:15 +00:00
Teppei Fukuda
232ba823e1 feat(vuln): support vulnerability status (#4867)
* feat: support vulnerability status

* feat: show status in table

* don't add `fixed` status in debian/redhat

* update test golden files

* add Status in rpc

* update docs

* update ignore-status example

* add ignore-status in integration test

* docs: add the explanation for statuses

---------

Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2023-07-26 11:55:03 +00:00
simar7
11618c9408 feat(misconf): Support custom URLs for policy bundle (#4834)
* feat(misconf): Support custom URLs for policy bundle

This PR adds support for custom policy bundles to be specified
with a flag `--policy-bundle-url` as an option to Trivy.

Fixes: https://github.com/aquasecurity/trivy/issues/4672

Signed-off-by: Simar <simar@linux.com>

* update docs

Signed-off-by: Simar <simar@linux.com>

* rename flag to `--policy-bundle-repository`

Signed-off-by: Simar <simar@linux.com>

* fix field

* rebase and update docs

Signed-off-by: Simar <simar@linux.com>

* set policyBundleRepo on client

Signed-off-by: Simar <simar@linux.com>

---------

Signed-off-by: Simar <simar@linux.com>
2023-07-26 08:45:49 +00:00
Teppei Fukuda
07075696d1 refactor: replace with sortable packages (#4858) 2023-07-24 07:09:14 +00:00
Damian E
fbe1c9eb1f docs: correct license scanning sample command (#4855) 2023-07-24 05:02:55 +00:00
Teppei Fukuda
20c2246a61 fix(report): close the file (#4842)
* fix(report): close the file

* refactor: add the format type

* fix: return errors in version printing

* fix: lint issues

* fix: do not fail on bogus cache dir

---------

Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2023-07-23 13:37:18 +00:00
DmitriyLewen
24a3e547d9 feat(nodejs): add support for include-dev-deps flag for yarn (#4812)
* add support for include-dev-deps flag

* remove go.mod replace

* refactor

* bump go-dep-parser

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-07-23 13:07:49 +00:00
simar7
a7bd7bb65f feat(misconf): Add support for independently enabling libraries (#4070)
* feat(misconf): Add support for independently enabling libraries

Implements: https://github.com/aquasecurity/trivy/issues/4181

Signed-off-by: Simar <simar@linux.com>

* update tests

Signed-off-by: Simar <simar@linux.com>

* fix lint

Signed-off-by: Simar <simar@linux.com>

* fix tests

Signed-off-by: Simar <simar@linux.com>

* update defsec

Signed-off-by: Simar <simar@linux.com>

* fix test

Signed-off-by: Simar <simar@linux.com>

---------

Signed-off-by: Simar <simar@linux.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-07-23 09:44:59 +00:00
DmitriyLewen
4aa9ea0961 feat(secret): add secret config file for cache calculation (#4837)
* move parse secret config to initScannerConfig + add secret to cache key

* add calc cache test

* just read config file and add to cache

* refactor comments

* refactor
2023-07-23 08:26:22 +00:00
Sogo Kato
5d349d8147 Fix a link in gitlab-ci.md (#4850) 2023-07-23 08:20:29 +00:00
Nikita Pivkin
a61531c1f7 fix(flag): use globalstar to skip directories (#4854) 2023-07-23 06:11:46 +00:00
DmitriyLewen
78cc20937d chore(deps): bump github.com/docker/docker from v23.0.5+incompatible to v23.0.7-0.20230714215826-f00e7af96042+incompatible (#4849)
* use 1.19.10 version for integration tests

* fix go-version field

* revert test workflow changes

* bump docker/docker
2023-07-21 09:00:35 +00:00
afdesk
93996041b2 fix(license): using common way for splitting licenses (#4434)
* fix(license): using common way for splitting licenses

* add test cases

* TEST new regex

* extract function

* fix version detection

---------

Co-authored-by: Nikita Pivkin <nikita.pivkin@smartforce.io>
2023-07-19 08:05:43 +00:00
AliDatadog
3e2416d77c fix(containerd): Use img platform in exporter instead of strict host platform (#4477)
* match with img platform instead of host platform

* client matching pull spec

* use default platform

* pull with platforms default strict

* use withplatform to pull and add debug log

* looks like we are trying to scan a i386 image

* revert changes on test, use the right platform match

* try with Config.Platform

* use spect.platform

* fix function usage

* try another way to retrieve the platform

* fix compilation

* read platforms from config manifest

* use platform from RegistryOptions if available, otherwise get the actual platform

* goimport

* put platform in containerd client

* fix panic

* use DefaultStrict as default
2023-07-19 07:54:24 +00:00
DmitriyLewen
ce77bb46c3 remove govulndb (#4783) 2023-07-19 07:24:35 +00:00
Nikita Pivkin
c05caae43f fix(java): inherit licenses from parents (#4817) 2023-07-19 06:51:58 +00:00
Teppei Fukuda
aca11b95d0 refactor: add allowed values for CLI flags (#4800)
* refactor: rename Value to Default

* refactor: support allowed values for CLI flags

* docs: auto-generate

* test: fix

* test: add tests for flags
2023-07-17 13:13:23 +00:00
DmitriyLewen
4cecd17ea5 add example regex to allow rules (#4827) 2023-07-17 12:36:22 +00:00
simar7
4bc8d29c15 feat(misconf): Support custom data for rego policies for cloud (#4745)
* feat(misconf): Support custom data for cloud policies

Signed-off-by: Simar <simar@linux.com>

* use policyfs

Signed-off-by: Simar <simar@linux.com>

* refactor to reduce cyclomatic complexity

Signed-off-by: Simar <simar@linux.com>

* bump defsec

* update docs

Signed-off-by: Simar <simar@linux.com>

* update test assertion

Signed-off-by: Simar <simar@linux.com>

* update test

Need this as OPA is currently broken on Windows

https://github.com/open-policy-agent/opa/issues/4521

Signed-off-by: Simar <simar@linux.com>

* fix data path

* fix(mapfs): convert volume names into dirs

* revert creating temp dirs

---------

Signed-off-by: Simar <simar@linux.com>
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2023-07-17 12:34:20 +00:00
Anais Urlichs
88243a0ad6 docs: correcting the trivy k8s tutorial (#4815)
* correcting the trivy k8s tutorial

Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>

* docs: fix

---------

Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-07-16 09:06:28 +00:00
Nikita Pivkin
3c7d988d71 feat(cli): add --tf-exclude-downloaded-modules flag (#4810)
* feat(cli): add --tf-exclude-downloaded-modules flag

* fix typo

* generate docs
2023-07-16 08:56:03 +00:00
DmitriyLewen
fd0fd104f8 fix(sbom): cyclonedx recommendations should include fixed versions for each package (#4794)
* add all fixed versions to recommendations

* fix tests
2023-07-13 11:16:11 +00:00
Nikita Pivkin
d0d543b881 feat(misconf): enable --policy flag to accept directory and files both (#4777)
* feat(misconf): enable --policy flag to accept directory and files both

* fix test

* Revert "clarifying a dir path is required for custom policies (#4716)"

This reverts commit 8a1aa448a1.

* update doc

* update the flag description
2023-07-13 10:59:21 +00:00
Nikita Pivkin
b43a3e6237 feat(python): add license fields (#4722)
* bump go-dep-parser

* update tests

* fix testdata
2023-07-13 10:55:36 +00:00
chenk
aef7b148af fix: support trivy k8s-version on k8s sub-command (#4786)
* fix: support trivy k8s-version on k8s sub-command

Signed-off-by: chenk <hen.keinan@gmail.com>

* fix: support last applied configuration

Signed-off-by: chenk <hen.keinan@gmail.com>

---------

Signed-off-by: chenk <hen.keinan@gmail.com>
2023-07-13 08:28:09 +00:00
simar7
5d76abadc9 chore(deps): Update defsec to v0.90.3 (#4793)
* chore(deps): Update defsec to v0.90.2

Signed-off-by: Simar <simar@linux.com>

* go mod tidy

---------

Signed-off-by: Simar <simar@linux.com>
2023-07-07 08:13:56 +00:00
dependabot[bot]
fed446c515 chore(deps): bump google.golang.org/protobuf from 1.30.0 to 1.31.0 (#4752)
Bumps google.golang.org/protobuf from 1.30.0 to 1.31.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-07 04:56:30 +00:00
dependabot[bot]
df62927e58 chore(deps): bump alpine from 3.18.0 to 3.18.2 (#4748)
Bumps alpine from 3.18.0 to 3.18.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-07 04:05:43 +00:00
dependabot[bot]
1b9b9a84f7 chore(deps): bump github.com/alicebob/miniredis/v2 from 2.30.3 to 2.30.4 (#4758)
Bumps [github.com/alicebob/miniredis/v2](https://github.com/alicebob/miniredis) from 2.30.3 to 2.30.4.
- [Release notes](https://github.com/alicebob/miniredis/releases)
- [Changelog](https://github.com/alicebob/miniredis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/alicebob/miniredis/compare/v2.30.3...v2.30.4)

---
updated-dependencies:
- dependency-name: github.com/alicebob/miniredis/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 13:23:01 +00:00
zunlongzhou
3c16ca821b docs(image): fix the comment on the soft/hard link (#4740)
* Update tar.go

The comment before the following w.processFile(filePath, tr, hdr.FileInfo(), analyzeFn) call says: // A symbolic/hard link or regular file will reach here. 
But defualt's processing causes the symbolic/hard link to not reach the processFile function location

* Update tar.go

update tar.go comment

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-07-06 10:49:48 +00:00
DmitriyLewen
e5bee5cccd check Type when filling pkgs in vulns (#4776) 2023-07-06 10:45:52 +00:00
Bill Wang
4b9f310b9c feat: add support of linux/ppc64le and linux/s390x architectures for Install.sh script (#4770)
* feat: add support of linux/ppc64le and linux/s390x architectures for Install.sh script #4747

* feat: add support of linux/ppc64le and linux/s390x architectures for Install.sh script #4747
2023-07-06 09:05:37 +00:00
dependabot[bot]
8e7fb7cc84 chore(deps): bump modernc.org/sqlite from 1.20.3 to 1.23.1 (#4756)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.20.3 to 1.23.1.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.20.3...v1.23.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 19:45:34 +00:00
DmitriyLewen
a9badeaba8 fix(rocky): add architectures support for advisories (#4691)
* add multi-arch support for rocky linux advisories

* feat: comply with the new signagure

* bump trivy-db

* fix tests

* chore(deps): remove fork replace

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-07-03 08:48:57 +00:00
dependabot[bot]
f8ebccc680 chore(deps): bump github.com/opencontainers/image-spec (#4751)
Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec) from 1.1.0-rc3 to 1.1.0-rc4.
- [Release notes](https://github.com/opencontainers/image-spec/releases)
- [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md)
- [Commits](https://github.com/opencontainers/image-spec/compare/v1.1.0-rc3...v1.1.0-rc4)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/image-spec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 07:19:56 +00:00
dependabot[bot]
1c81948e03 chore(deps): bump github.com/package-url/packageurl-go (#4754)
Bumps [github.com/package-url/packageurl-go](https://github.com/package-url/packageurl-go) from 0.1.1-0.20220428063043-89078438f170 to 0.1.1.
- [Release notes](https://github.com/package-url/packageurl-go/releases)
- [Commits](https://github.com/package-url/packageurl-go/commits/v0.1.1)

---
updated-dependencies:
- dependency-name: github.com/package-url/packageurl-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 04:06:44 +00:00
dependabot[bot]
497cc10d8e chore(deps): bump golang.org/x/sync from 0.2.0 to 0.3.0 (#4750)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.2.0 to 0.3.0.
- [Commits](https://github.com/golang/sync/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-02 14:57:57 +00:00
dependabot[bot]
065f0afa54 chore(deps): bump github.com/tetratelabs/wazero from 1.2.0 to 1.2.1 (#4755)
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-02 14:52:44 +00:00
dependabot[bot]
e2603056dd chore(deps): bump github.com/testcontainers/testcontainers-go (#4759)
Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.20.1 to 0.21.0.
- [Release notes](https://github.com/testcontainers/testcontainers-go/releases)
- [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.20.1...v0.21.0)

---
updated-dependencies:
- dependency-name: github.com/testcontainers/testcontainers-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-02 13:57:46 +00:00
Alexandre
0621402bf7 fix: documentation about reseting trivy image (#4733) 2023-07-02 12:29:23 +00:00
Dirk Mueller
798fdbc013 fix(suse): Add openSUSE Leap 15.5 eol date as well (#4744)
Taken directly from https://en.opensuse.org/Lifetime
2023-07-02 11:22:26 +00:00
Teppei Fukuda
34a89293d5 fix: update Amazon Linux 1 EOL (#4761) 2023-07-02 11:00:20 +00:00
simar7
600819248d chore(deps): Update defsec to v0.90.1 (#4739)
Fixes: https://github.com/aquasecurity/trivy/issues/4628

Signed-off-by: Simar <simar@linux.com>
2023-06-30 06:48:47 +00:00
Nikita Pivkin
73734eab21 feat(nodejs): support yarn workspaces (#4664)
* feat(nodejs): add the workspaces field to the package

* fix go.mod

* update go.mod

* compare workspaces by length
2023-06-30 06:40:28 +00:00
DmitriyLewen
22463ababd feat(cli): add include-dev-deps flag (#4700)
* add Dev field for Package

* fix integration test

* update docs

* feat(cli): add include-dev flag

* bump go-dep-parser

* update docs

* add integration test

* refactor

* refactor

* fix integration test

* refactor: rename flag to include-dev-deps

* update docs

* update docs

* filter dev deps when scanning packages

* add flag support for server mode

* refactor: remove comment that might confuse

* refactor: move --include-dev-deps to the scanner flag group

* refactor: not return apps

* docs: update

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-06-29 13:15:52 +00:00
Nikita Pivkin
790c8054ec fix(image): pass the secret scanner option to scan the img config (#4735) 2023-06-29 08:37:45 +00:00
chenk
86fec9c4a9 fix: scan job pod it not found on k8s-1.27.x (#4729)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-06-28 14:38:39 +00:00
Manveer Singh
26bc91160b feat(docker): add support for mTLS authentication when connecting to registry (#4649)
* feat: add support for mTLS authentication when connecting to registry

* feat: add support for mTLS authentication when connecting to registry - added error handling

* feat: add support for mTLS authentication when connecting to registry
- code quality improvements

* feat: add support for mTLS authentication when connecting to registry
- code quality improvements

* wrap errors

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-06-28 11:21:26 +00:00
simar7
d699e8c101 chore(deps): Update defsec to v0.90.0 (#4723)
Signed-off-by: Simar <simar@linux.com>
2023-06-28 08:34:56 +00:00
DmitriyLewen
1777878e83 fix: skip scanning the gpg-pubkey package (#4720) 2023-06-28 07:06:08 +00:00
Makhonin Alexey
9be08253a2 Fix http registry oci pull (#4701)
Signed-off-by: alexey.makhonin <alexey.makhonin@flant.com>
2023-06-26 12:40:40 +00:00
simar7
5d73b47dbc feat(misconf): Support skipping services (#4686)
* feat(misconf): Add support for `--skip-service` flag.

Fixes: https://github.com/aquasecurity/trivy/issues/4619
Signed-off-by: Simar <simar@linux.com>

* update docs

Signed-off-by: Simar <simar@linux.com>

* update go mod

* refactor processOptions to reduce cyclo complexity

Signed-off-by: Simar <simar@linux.com>

* fix a bug with multiple skip services

Signed-off-by: Simar <simar@linux.com>

* refactor tests

Signed-off-by: Simar <simar@linux.com>

* use x/slice and x/xerrors

Signed-off-by: Simar <simar@linux.com>

* go mod tidy

* lint

---------

Signed-off-by: Simar <simar@linux.com>
2023-06-26 11:11:59 +00:00
DmitriyLewen
46e784c8a9 docs: fix supported modes for pubspec.lock files (#4713) 2023-06-26 11:04:45 +00:00
Teppei Fukuda
0f61a84712 fix(misconf): disable the terraform plan analyzer for other scanners (#4714) 2023-06-26 11:03:25 +00:00
Anais Urlichs
8a1aa448a1 clarifying a dir path is required for custom policies (#4716)
Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>
2023-06-26 10:56:57 +00:00
Sandro
fbab9eea3a chore: update alpine base images (#4715) 2023-06-26 10:34:50 +00:00
AliDatadog
f84417bba0 fix last-history-created (#4697) 2023-06-26 03:57:54 +00:00
chenk
85c681d443 feat: kbom and cyclonedx v1.5 spec support (#4708)
* feat: kbom and cyclonedx v1.5 spec support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kbom and cyclonedx v1.5 spec support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kbom and cyclonedx v1.5 spec support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: feat: kbom and cyclonedx 1.5 spec support

Signed-off-by: chenk <hen.keinan@gmail.com>

* fix: unmarshal bom on v1.5 return invalid specification version

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: cyclonedx-1.5 spec support

Signed-off-by: chenk <hen.keinan@gmail.com>

---------

Signed-off-by: chenk <hen.keinan@gmail.com>
2023-06-25 13:47:06 +00:00
Itay Shakury
46748ce6ea docs: add information about Aqua (#4590)
* docs: add information about Aqua

* update link
2023-06-25 10:40:45 +00:00
chenk
c6741bddff fix: k8s escape resource filename on windows os (#4693)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-06-22 11:16:24 +00:00
Teppei Fukuda
a21acc7e08 ci: ignore merge queue branches (#4696) 2023-06-22 11:02:22 +00:00
dependabot[bot]
32a3a3311c chore(deps): bump actions/checkout from 2.4.0 to 3.5.3 (#4695)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3.5.3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 10:56:11 +00:00
dependabot[bot]
cbb47dc7c4 chore(deps): bump aquaproj/aqua-installer from 2.1.1 to 2.1.2 (#4694)
Bumps [aquaproj/aqua-installer](https://github.com/aquaproj/aqua-installer) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/aquaproj/aqua-installer/releases)
- [Commits](https://github.com/aquaproj/aqua-installer/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: aquaproj/aqua-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 10:31:20 +00:00
chenk
e3d10d2512 feat: cyclondx sbom custom property support (#4688)
* feat: custom property support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: custom property support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: custom property support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: custom property support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: custom property support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: custom property support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: custom property support

Signed-off-by: chenk <hen.keinan@gmail.com>

---------

Signed-off-by: chenk <hen.keinan@gmail.com>
2023-06-22 08:33:27 +00:00
Teppei Fukuda
e1770e046c ci: do not trigger tests in main (#4692) 2023-06-22 08:25:58 +00:00
Dirk Mueller
337c0b70d5 add SUSE Linux Enterprise Server 15 SP5 and update SP4 eol date (#4690)
all dates are taken from https://www.suse.com/lifecycle#suse-linux-enterprise-server-15
2023-06-22 07:34:59 +00:00
DmitriyLewen
5ccee14304 use group field for jar in cyclonedx (#4674) 2023-06-22 07:19:38 +00:00
Nikita Pivkin
96db52c3f6 feat(java): capture licenses from pom.xml (#4681)
* feat(java): capture licenses from pom.xml

* update doc
2023-06-21 13:12:37 +00:00
Leroy Shirto
3e902a57a9 feat(helm): make sessionAffinity configurable (#4623)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-06-21 11:14:36 +00:00
Tung Bui (Leo)
904f1cf24e fix: Show the correct URL of the secret scanning (#4682) 2023-06-21 10:57:54 +00:00
Meisam
7d48c5d5d4 document expected file pattern definition format (#4654) 2023-06-20 14:02:55 +00:00
guangwu
dcc73e964a fix: format arg error (#4642)
* fix: format arg error

* fix: xerrors.Errorf
2023-06-19 10:52:38 +00:00
chenk
35c4262d0b feat(k8s): cyclonedx kbom support (#4557)
* feat: cyclonedx kbom support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: cyclonedx kbom support

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kubernetes bill of materials

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kubernetes bill of materials

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kubernetes bill of materials

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kubernetes bill of materials

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kubernetes bill of materials

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kubernetes bill of materials

Signed-off-by: chenk <hen.keinan@gmail.com>

* chore: update sum db

Signed-off-by: chenk <hen.keinan@gmail.com>

* chore: update sum db

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kubernetes bill of materials

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kubernetes bill of materials

Signed-off-by: chenk <hen.keinan@gmail.com>

* chore: update sumdb

Signed-off-by: chenk <hen.keinan@gmail.com>

* chore: update sumdb

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kubernetes bill of materials

Signed-off-by: chenk <hen.keinan@gmail.com>

* feat: kubernetes bill of materials

Signed-off-by: chenk <hen.keinan@gmail.com>

---------

Signed-off-by: chenk <hen.keinan@gmail.com>
2023-06-19 10:48:26 +00:00
Nikita Pivkin
0e01851e9e fix(nodejs): remove unused fields for the pnpm lockfile (#4630)
* refactor(nodejs): remove unused fields for the pnpm lockfile

* run go mod tidy

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-06-19 03:17:31 +00:00
Masahiro331
4d9b444499 fix(vm): update ext4-filesystem parser for parse multi block extents (#4616)
* chore(deps): update ext4-filesystem parser for parse multi block extents

* test(vm): update integration-vm test fixtures

* test(vm): add gzip decompresser for sparse file

* test(vm): add mage command update golden file for vm integration test

* chore(magefile): [WIP] change test repository

* Revert "chore(magefile): [WIP] change test repository"

This reverts commit c015c8892f.

* fix(test): update fixtures and golden file

* fix(test): revert fixVersion and PkgID
2023-06-18 16:41:55 +00:00
afdesk
c29197ab7d ci: update build IDs (#4641) 2023-06-18 11:24:29 +00:00
Chris Novakovic
d7637adc6b fix(debian): update EOL for Debian 12 (#4647)
* fix(debian): update EOL for Debian 12

Debian 12 was released on 2023-06-10 and will be supported for five
years - see https://www.debian.org/News/2023/20230610.

* Update docs
2023-06-16 04:18:55 +00:00
Teppei Fukuda
ef39eeedf3 chore(deps): bump go-containerregistry (#4639) 2023-06-15 09:44:24 +00:00
guangwu
1ce8bb535a chore: unnecessary use of fmt.Sprintf (S1039) (#4637) 2023-06-15 08:36:15 +00:00
Björn Wenzel
bc9513fc57 fix(db): change argument order in Exists query for JavaDB (#4595) 2023-06-14 02:26:10 +00:00
simar7
aecd2f0bf0 feat(aws): Add support to see successes in results (#4427)
Fixes: https://github.com/aquasecurity/trivy/discussions/4417

Signed-off-by: Simar <simar@linux.com>
2023-06-13 17:36:05 +00:00
dependabot[bot]
2cbf402b6a chore(deps): bump golangci/golangci-lint-action from 3.5.0 to 3.6.0 (#4613)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 13:52:43 +00:00
Teppei Fukuda
0099b20e31 ci: do not trigger tests in main (#4614) 2023-06-12 13:00:32 +00:00
dependabot[bot]
a597a54fb6 chore(deps): bump sigstore/cosign-installer (#4609)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 204a51a57a74d190b284a0ce69b44bc37201f343 to ef0e9691595ea19ec990a46b1a591dcafe568f34.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](204a51a57a...ef0e969159)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 12:16:20 +00:00
dependabot[bot]
b453fbec37 chore(deps): bump CycloneDX/gh-gomod-generate-sbom from 1 to 2 (#4608)
Bumps [CycloneDX/gh-gomod-generate-sbom](https://github.com/CycloneDX/gh-gomod-generate-sbom) from 1 to 2.
- [Release notes](https://github.com/CycloneDX/gh-gomod-generate-sbom/releases)
- [Commits](https://github.com/CycloneDX/gh-gomod-generate-sbom/compare/v1...v2)

---
updated-dependencies:
- dependency-name: CycloneDX/gh-gomod-generate-sbom
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-06-12 11:40:58 +00:00
Teppei Fukuda
0e876d5aa0 ci: bypass the required status checks (#4611) 2023-06-12 14:39:47 +03:00
Teppei Fukuda
a4f27d24a3 ci: support merge queue (#3652) 2023-06-12 11:39:08 +03:00
Teppei Fukuda
9e6411e9f5 ci: matrix build for testing (#4587) 2023-06-12 10:49:13 +03:00
chenk
ef6538a171 feat: trivy k8s private registry support (#4567)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-06-12 05:40:25 +03:00
Itay Shakury
139f3e1e32 docs: add general coverage page (#3859) 2023-06-11 08:49:29 +03:00
Itay Shakury
479cfdd40e chore: create SECURITY.md (#4601) 2023-06-11 06:16:42 +03:00
afdesk
9a279fa7bb ci: remove 32bit packages (#4585) 2023-06-08 16:52:37 +03:00
Teppei Fukuda
d52b0b7bc0 fix(misconf): deduplicate misconf results (#4588) 2023-06-08 15:15:21 +03:00
Amir Ben Nun
9b531fa27b fix(vm): support sector size of 4096 (#4564)
Co-authored-by: masahiro331 <m_fujimura@r.recruit.co.jp>
2023-06-08 11:31:13 +03:00
Teppei Fukuda
8ca1bfdd23 fix(misconf): terraform relative paths (#4571) 2023-06-08 11:24:52 +03:00
Nikita Pivkin
c20d466044 fix(purl): skip unsupported library type (#4577) 2023-06-08 08:45:32 +03:00
Jonathan Lassoff
52cbe79759 fix(terraform): recursively detect all Root Modules (#4457)
Signed-off-by: Simar <simar@linux.com>
Co-authored-by: Simar <simar@linux.com>
2023-06-08 07:06:00 +03:00
Masahiro331
4a5b915578 fix(vm): support post analyzer for vm command (#4544) 2023-06-07 16:16:27 +03:00
Nikita Pivkin
56cdc55f77 fix(nodejs): change the type of the devDependencies field (#4560) 2023-06-06 15:51:39 +03:00
Nikita Pivkin
17d753676b fix(sbom): export empty dependencies in CycloneDX (#4568) 2023-06-06 15:49:23 +03:00
Teppei Fukuda
2796abe1ed refactor: add composite fs for post-analyzers (#4556) 2023-06-06 08:19:15 +03:00
dependabot[bot]
22a1573807 chore(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0 (#4554) 2023-06-04 16:17:54 +03:00
dependabot[bot]
43586659a1 chore(deps): bump helm/kind-action from 1.5.0 to 1.7.0 (#4526) 2023-06-04 14:50:38 +03:00
dependabot[bot]
5081399659 chore(deps): bump github.com/BurntSushi/toml from 1.2.1 to 1.3.0 (#4528) 2023-06-04 14:48:41 +03:00
dependabot[bot]
e1a38128ab chore(deps): bump github.com/alicebob/miniredis/v2 from 2.30.2 to 2.30.3 (#4529) 2023-06-04 11:19:53 +03:00
dependabot[bot]
283eef6372 chore(deps): bump github.com/aws/aws-sdk-go-v2/service/ec2 (#4536) 2023-06-04 11:13:44 +03:00
dependabot[bot]
bbd7b98741 chore(deps): bump github.com/tetratelabs/wazero from 1.0.0 to 1.2.0 (#4549) 2023-06-04 11:12:49 +03:00
dependabot[bot]
11c81bf2f6 chore(deps): bump github.com/spf13/cast from 1.5.0 to 1.5.1 (#4532) 2023-06-04 11:11:32 +03:00
dependabot[bot]
2d8d63e61a chore(deps): bump github.com/testcontainers/testcontainers-go (#4537) 2023-06-04 09:27:43 +03:00
dependabot[bot]
a46839b1ce chore(deps): bump github.com/go-git/go-git/v5 from 5.6.1 to 5.7.0 (#4530) 2023-06-04 09:25:43 +03:00
dependabot[bot]
19715f5de8 chore(deps): bump github.com/aws/aws-sdk-go-v2/config (#4534) 2023-06-04 09:25:04 +03:00
745 changed files with 30722 additions and 9252 deletions

19
.github/CODEOWNERS vendored
View File

@@ -1,24 +1,15 @@
# Global
* @knqyf263
# Docs
/docs/** @knqyf263 @AnaisUrlichs @itaysk
/mkdocs.yml @knqyf263 @AnaisUrlichs @itaysk
/README.md @knqyf263 @AnaisUrlichs @itaysk
# Misconfiguration scanning
docs/docs/scanner/misconfiguration @knqyf263 @simar7
docs/docs/target/aws.md @knqyf263 @simar7
pkg/fanal/analyzer/config @knqyf263 @simar7
pkg/cloud @knqyf263 @simar7
# Helm chart
helm/trivy/ @chen-keinan
# Misconfiguration scanning
examples/misconf/ @knqyf263
docs/docs/misconfiguration @knqyf263
docs/docs/cloud @knqyf263
pkg/fanal/analyzer/config @knqyf263
pkg/fanal/handler/misconf @knqyf263
pkg/cloud @knqyf263
pkg/flag/aws_flags.go @knqyf263
pkg/flag/misconf_flags.go @knqyf263
# Kubernetes scanning
pkg/k8s/ @josedonizetti @chen-keinan @knqyf263
docs/docs/kubernetes/ @josedonizetti @chen-keinan @knqyf263

View File

@@ -0,0 +1,31 @@
title: "<company name>"
labels: ["adopters"]
body:
- type: textarea
id: info
attributes:
label: "[Optional] How do you use Trivy?"
validations:
required: false
- type: checkboxes
attributes:
label: "[Optional] Which targets are you scanning with Trivy?"
options:
- label: "Container Image"
- label: "Filesystem"
- label: "Git Repository"
- label: "Virtual Machine Image"
- label: "Kubernetes"
- label: "AWS"
- label: "SBOM"
validations:
required: false
- type: checkboxes
attributes:
label: "[Optional] What kind of issues are scanning with Trivy?"
options:
- label: "Software Bill of Materials (SBOM)"
- label: "Known vulnerabilities (CVEs)"
- label: "IaC issues and misconfigurations"
- label: "Sensitive information and secrets"
- label: "Software licenses"

View File

@@ -8,6 +8,8 @@ body:
Please ensure that you're not creating a duplicate report by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
If you see any false positives or false negatives, please file a ticket [here](https://github.com/aquasecurity/trivy/discussions/new?category=false-detection).
**Do not open a GitHub issue, please.** Maintainers triage discussions and then create issues.
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
- type: textarea
attributes:
@@ -114,9 +116,9 @@ body:
label: Checklist
description: Have you tried the following?
options:
- label: Run `trivy --reset`
- 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).
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=adopters).

View File

@@ -6,6 +6,8 @@ body:
Feel free to raise a bug report if something doesn't work as expected.
Please ensure that you're not creating a duplicate report by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
**Do not open a GitHub issue, please.** Maintainers triage discussions and then create issues.
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
- type: input
attributes:
@@ -91,4 +93,4 @@ body:
- type: markdown
attributes:
value: |
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=adopters).

View File

@@ -7,6 +7,8 @@ body:
Feel free to share your idea.
Please ensure that you're not creating a duplicate ticket by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
**Do not open a GitHub issue, please.** Maintainers triage discussions and then create issues.
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
- type: textarea
attributes:
@@ -42,4 +44,4 @@ body:
- type: markdown
attributes:
value: |
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=adopters).

View File

@@ -7,6 +7,8 @@ body:
If you have any troubles/questions, feel free to ask.
Please ensure that you're not asking a duplicate question by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
**Do not open a GitHub issue, please.** Maintainers triage discussions and then create issues.
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
- type: textarea
attributes:
@@ -79,4 +81,4 @@ body:
- type: markdown
attributes:
value: |
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=adopters.

View File

@@ -1,53 +0,0 @@
title: "<company name> "
labels: ["adopters"]
body:
- type: textarea
id: links
attributes:
label: "Share Links"
description: "If you would like to share a link to your project or company, please paste it below 🌐"
value: |
...
validations:
required: false
- type: textarea
id: logo
attributes:
label: "Share Logo"
description: "If you have a link to your logo, please provide it in the following text-box 🌐"
value: |
...
validations:
required: false
- type: checkboxes
attributes:
label: Please select all the scan targets that you are using
options:
- label: Container Images
- label: Filesystem
- label: Git Repository
- label: Virtual Machine Images
- label: Kubernetes
- label: AWS
validations:
required: false
- type: checkboxes
attributes:
label: Which scanners are you using on those scan targets?
options:
- label: OS packages and software dependencies in use (SBOM)
- label: Known vulnerabilities (CVEs)
- label: IaC issues and misconfigurations
- label: Sensitive information and secrets
- label: Software licenses
validations:
required: false
- type: textarea
id: info
attributes:
label: "Additional Information"
description: "Please tell us more about your use case of Trivy -- anything that you would like to share 🎉"
value: |
...
validations:
required: false

46
.github/workflows/auto-close-issue.yaml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Auto-close issues
on:
issues:
types: [opened]
jobs:
close_issue:
runs-on: ubuntu-latest
steps:
- name: Close issue if user does not have write or admin permissions
uses: actions/github-script@v6
with:
script: |
// Get the issue creator's username
const issueCreator = context.payload.issue.user.login;
// Check the user's permissions for the repository
const repoPermissions = await github.rest.repos.getCollaboratorPermissionLevel({
owner: context.repo.owner,
repo: context.repo.repo,
username: issueCreator
});
const permission = repoPermissions.data.permission;
// If the user does not have write or admin permissions, leave a comment and close the issue
if (permission !== 'write' && permission !== 'admin') {
const commentBody = "Please see https://aquasecurity.github.io/trivy/latest/community/contribute/issue/";
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
body: commentBody
});
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
state: 'closed',
state_reason: 'not_planned'
});
console.log(`Issue #${context.payload.issue.number} closed because ${issueCreator} does not have sufficient permissions.`);
}

View File

@@ -0,0 +1,30 @@
name: Auto-update labels
on:
push:
paths:
- 'misc/triage/labels.yaml'
branches:
- main
jobs:
deploy:
name: Auto-update labels
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4.1.0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Install aqua tools
uses: aquaproj/aqua-installer@v2.1.2
with:
aqua_version: v1.25.0
- name: update labels
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mage label

12
.github/workflows/bypass-cla.yaml vendored Normal file
View 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
View 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"'

View File

@@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Restore Trivy binaries from cache
uses: actions/cache@v3.3.1
uses: actions/cache@v3.3.2
with:
path: dist/
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}

View File

@@ -0,0 +1,31 @@
name: Check Go versions of dependencies
on:
pull_request:
paths:
- 'go.mod'
workflow_dispatch:
jobs:
check-go-versions:
name: Check Go versions of dependencies
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4.1.0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
# This workflow is a workaround before the "old stable" version becomes Go 1.21.
# To avoid updating dependencies that require Go 1.21, we use this workflow
# Example of wrong update:
# https://github.com/aquasecurity/trivy/discussions/5323#discussioncomment-7186321
- name: Check that dependencies doesn't require Go 1.21
run: |
go mod tidy
if grep -q "go 1.21" go.mod; then
echo "One of new dependencies requires Go '1.21'. Use 'go get go@1.20' to fix this."
exit 1
fi

View File

@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout main
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
persist-credentials: true

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout main
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
persist-credentials: true

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
- name: Install Helm
@@ -37,7 +37,7 @@ jobs:
id: lint
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76
- name: Setup Kubernetes cluster (KIND)
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140
with:
version: ${{ env.KIND_VERSION }}
image: ${{ env.KIND_IMAGE }}
@@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
- name: Install chart-releaser

View File

@@ -19,12 +19,12 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
- name: Restore Trivy binaries from cache
uses: actions/cache@v3.3.1
uses: actions/cache@v3.3.2
with:
path: dist/
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
@@ -35,7 +35,7 @@ jobs:
sudo apt-get -y install rpm reprepro createrepo-c distro-info
- name: Checkout trivy-repo
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
with:
repository: ${{ github.repository_owner }}/trivy-repo
path: trivy-repo

View File

@@ -26,41 +26,50 @@ jobs:
packages: write # For GHCR
contents: read # Not required for public repositories, but for clarity
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v8
with:
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
remove-android: 'true'
remove-docker-images: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
- name: Cosign install
uses: sigstore/cosign-installer@204a51a57a74d190b284a0ce69b44bc37201f343
uses: sigstore/cosign-installer@4a861528be5e691840a69536975ada1d4c30349d
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Show available Docker Buildx platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to docker.io registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to ghcr.io registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ env.GH_USER }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to ECR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: public.ecr.aws
username: ${{ secrets.ECR_ACCESS_KEY_ID }}
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
@@ -70,7 +79,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
@@ -84,7 +93,7 @@ jobs:
- name: GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: v1.16.2
version: v1.20.0
args: release -f=${{ inputs.goreleaser_config}} ${{ inputs.goreleaser_options}}
env:
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
@@ -112,7 +121,7 @@ jobs:
public.ecr.aws/aquasecurity/trivy:canary
- name: Cache Trivy binaries
uses: actions/cache@v3.3.1
uses: actions/cache@v3.3.2
with:
path: dist/
# use 'github.sha' to create a unique cache folder for each run.

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
- name: Run Trivy vulnerability scanner and create GitHub issues
uses: knqyf263/trivy-issue-action@v0.0.5

View File

@@ -73,6 +73,8 @@ jobs:
c\+\+
elixir
dart
swift
bitnami
os
lang
@@ -93,6 +95,7 @@ jobs:
cyclonedx
spdx
purl
vex
helm
report

View File

@@ -1,4 +1,4 @@
name: "Stale issues"
name: "Stale PR's"
on:
schedule:
- cron: '0 0 * * *'
@@ -10,11 +10,10 @@ jobs:
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been labeled with inactivity.'
stale-pr-message: 'This PR is stale because it has been labeled with inactivity.'
exempt-issue-labels: 'lifecycle/frozen,lifecycle/active,priority/critical-urgent,priority/important-soon,priority/important-longterm,priority/backlog,priority/awaiting-more-evidence'
exempt-pr-labels: 'lifecycle/active'
stale-pr-label: 'lifecycle/stale'
stale-issue-label: 'lifecycle/stale'
days-before-stale: 60
days-before-issue-stale: '-1'
days-before-close: 20
days-before-issue-close: '-1'

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
persist-credentials: true

View File

@@ -1,19 +1,12 @@
name: Test
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'docs/**'
- 'mkdocs.yml'
- 'LICENSE'
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
- 'mkdocs.yml'
- 'LICENSE'
merge_group:
jobs:
test:
name: Test
@@ -22,7 +15,7 @@ jobs:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.0
- name: Set up Go
uses: actions/setup-go@v4
@@ -39,15 +32,22 @@ jobs:
if: matrix.operating-system == 'ubuntu-latest'
- name: Lint
uses: golangci/golangci-lint-action@v3.4.0
id: lint
uses: golangci/golangci-lint-action@v3.7.0
with:
version: v1.52
args: --deadline=30m
version: v1.54
args: --deadline=30m --out-format=line-number
skip-cache: true # https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052197778
if: matrix.operating-system == 'ubuntu-latest'
- name: Check if linter failed
run: |
echo "Linter failed, running 'mage lint:fix' might help to correct some errors"
exit 1
if: ${{ failure() && steps.lint.conclusion == 'failure' }}
- name: Install tools
uses: aquaproj/aqua-installer@v2.1.1
uses: aquaproj/aqua-installer@v2.1.2
with:
aqua_version: v1.25.0
aqua_opts: ""
@@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
- name: Set up Go
uses: actions/setup-go@v4
@@ -77,7 +77,7 @@ jobs:
go-version-file: go.mod
- name: Install tools
uses: aquaproj/aqua-installer@v2.1.1
uses: aquaproj/aqua-installer@v2.1.2
with:
aqua_version: v1.25.0
@@ -89,7 +89,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
- name: Set up Go
uses: actions/setup-go@v4
@@ -97,7 +97,7 @@ jobs:
go-version-file: go.mod
- name: Install tools
uses: aquaproj/aqua-installer@v2.1.1
uses: aquaproj/aqua-installer@v2.1.2
with:
aqua_version: v1.25.0
@@ -109,7 +109,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
- name: Set up Go
uses: actions/setup-go@v4
@@ -117,7 +117,7 @@ jobs:
go-version-file: go.mod
- name: Install tools
uses: aquaproj/aqua-installer@v2.1.1
uses: aquaproj/aqua-installer@v2.1.2
with:
aqua_version: v1.25.0
@@ -126,34 +126,75 @@ jobs:
run: |
mage test:module
vm-test:
name: VM Integration Test
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v8
with:
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
remove-android: 'true'
remove-docker-images: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v4.1.0
- 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: Maximize build space
uses: easimon/maximize-build-space@v8
with:
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space.
remove-android: 'true'
remove-docker-images: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
if: matrix.operating-system == 'ubuntu-latest'
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.0
- 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"
version: v1.20.0
args: build --snapshot --clean --timeout 90m ${{ steps.goreleaser_id.outputs.id }}

View File

@@ -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.1.1
with:
aqua_version: v1.25.0
- name: Run vm integration tests
run: |
mage test:vm

View File

@@ -17,14 +17,54 @@ linters-settings:
min-occurrences: 3
misspell:
locale: US
goimports:
local-prefixes: github.com/aquasecurity
ignore-words:
- licence
gosec:
excludes:
- G101
- G114
- G204
- G402
gci:
sections:
- standard
- default
- prefix(github.com/aquasecurity/)
- blank
- dot
gomodguard:
blocked:
modules:
- github.com/hashicorp/go-version:
recommendations:
- github.com/aquasecurity/go-version
reason: "`aquasecurity/go-version` is designed for our use-cases"
- github.com/Masterminds/semver:
recommendations:
- github.com/aquasecurity/go-version
reason: "`aquasecurity/go-version` is designed for our use-cases"
gocritic:
disabled-checks:
- appendAssign
- unnamedResult
- whyNoLint
- indexAlloc
- octalLiteral
- hugeParam
- rangeValCopy
- regexpSimplify
- sloppyReassign
- commentedOutCode
enabled-tags:
- diagnostic
- style
- performance
- experimental
- opinionated
settings:
ruleguard:
failOn: all
rules: '${configDir}/misc/lint/rules.go'
linters:
disable-all: true
@@ -39,14 +79,18 @@ linters:
- goconst
- gocyclo
- gofmt
- goimports
- misspell
- bodyclose
- gci
- gomodguard
- tenv
- gocritic
run:
go: 1.19
go: '1.20'
skip-files:
- ".*._mock.go$"
- ".*._test.go$"
- ".*_mock.go$"
- ".*_test.go$"
- "integration/*"
- "examples/*"

View File

@@ -1,4 +1,4 @@
FROM alpine:3.18.0
FROM alpine:3.18.4
RUN apk --no-cache add ca-certificates git
COPY trivy /usr/local/bin/trivy
COPY contrib/*.tpl contrib/

View File

@@ -1,4 +1,4 @@
FROM alpine:3.18.0
FROM alpine:3.18.4
RUN apk --no-cache add ca-certificates git
# binaries were created with GoReleaser

View File

@@ -1,13 +1,18 @@
FROM golang:1.19
FROM --platform=linux/amd64 golang:1.20
# Install protoc (cf. http://google.github.io/proto-lens/installing-protoc.html)
# Set environment variable for protoc
ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip
RUN apt-get update && apt-get install -y unzip
# Install unzip for protoc installation and clean up cache
RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
# Download and install protoc
RUN curl --retry 5 -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/$PROTOC_ZIP \
&& unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
&& unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \
&& unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \
&& rm -f $PROTOC_ZIP
# Install Go tools
RUN go install github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
RUN go install github.com/magefile/mage@v1.14.0

View File

@@ -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,6 +105,13 @@ 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.
@@ -130,6 +139,7 @@ Please ensure to abide by our [Code of Conduct][code-of-conduct] during all inte
[Installation]:https://aquasecurity.github.io/trivy/latest/getting-started/installation/
[Ecosystem]: https://aquasecurity.github.io/trivy/latest/ecosystem/
[Scanning Coverage]: https://aquasecurity.github.io/trivy/latest/docs/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
View 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).

View File

@@ -5,6 +5,6 @@ registries:
- type: standard
ref: v3.157.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: tinygo-org/tinygo@v0.27.0
- name: tinygo-org/tinygo@v0.29.0
- name: WebAssembly/binaryen@version_112
- name: magefile/mage@v1.14.0

View File

@@ -14,8 +14,8 @@ 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-64bit.deb
reprepro includedeb $release ../../dist/*Linux-ARM64.deb
done

View File

@@ -13,10 +13,6 @@ import (
_ "modernc.org/sqlite" // sqlite driver for RPM DB and Java DB
)
var (
version = "dev"
)
func main() {
if err := run(); err != nil {
log.Fatal(err)
@@ -35,7 +31,7 @@ func run() error {
return nil
}
app := commands.NewApp(version)
app := commands.NewApp()
if err := app.Execute(); err != nil {
return err
}

View File

@@ -91,7 +91,7 @@
"Severity": {
"Label": "{{ $severity }}"
},
"Title": "Trivy found a misconfiguration in {{ $target }}: {{ .Title }}",
"Title": "Trivy found a misconfiguration in {{ $target }}: {{ escapeString .Title }}",
"Description": {{ escapeString $description | printf "%q" }},
"Remediation": {
"Recommendation": {

View File

@@ -85,7 +85,7 @@
<h1>{{- escapeXML ( index . 0 ).Target }} - Trivy Report - {{ now }}</h1>
<table>
{{- range . }}
<tr class="group-header"><th colspan="6">{{ escapeXML .Type }}</th></tr>
<tr class="group-header"><th colspan="6">{{ .Type | toString | escapeXML }}</th></tr>
{{- if (eq (len .Vulnerabilities) 0) }}
<tr><th colspan="6">No Vulnerabilities found</th></tr>
{{- else }}
@@ -128,7 +128,7 @@
<td>{{ escapeXML .ID }}</td>
<td class="misconf-check">{{ escapeXML .Title }}</td>
<td class="severity">{{ escapeXML .Severity }}</td>
<td class="link" data-more-links="off" style="white-space:normal;"">
<td class="link" data-more-links="off" style="white-space:normal;">
{{ escapeXML .Message }}
<br>
<a href={{ escapeXML .PrimaryURL | printf "%q" }}>{{ escapeXML .PrimaryURL }}</a>

View File

@@ -75,6 +75,7 @@ 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" ;;
@@ -115,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 ;;
@@ -133,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 ;;
@@ -222,6 +225,7 @@ uname_arch() {
armv5*) arch="armv5" ;;
armv6*) arch="armv6" ;;
armv7*) arch="armv7" ;;
s390*) arch="s390x" ;;
esac
echo ${arch}
}

View File

@@ -1,4 +1,7 @@
# Issues
Thank you for taking interest in contributing to Trivy!
Trivy uses [GitHub Discussion](./discussion.md) for bug reports, feature requests, and questions.
Trivy uses [GitHub Discussion](./discussion.md) for bug reports, feature requests, and questions.
!!! warning
Issues created by non-maintainers will be immediately closed.

View File

@@ -27,7 +27,7 @@ $ ./trivy -h
You must pass the linter checks:
```shell
$ mage lint
$ mage lint:run
```
Additionally, you need to have run `go mod tidy`, so execute the following command as well:
@@ -36,6 +36,11 @@ Additionally, you need to have run `go mod tidy`, so execute the following comma
$ mage tidy
```
To autofix linters use the following command:
```shell
$ mage lint:fix
```
### Unit tests
Your PR must pass all the unit tests. You can test it as below.

View File

@@ -139,4 +139,4 @@ $ trivy conf --skip-policy-update /path/to/conf
[allowlist]: ../references/troubleshooting.md
[oras]: https://oras.land/cli/
[^1]: This is only required to scan `jar` files. More information about `Java index db` [here](../scanner/vulnerability/language/java.md)
[^1]: This is only required to scan `jar` files. More information about `Java index db` [here](../coverage/language/java.md)

View File

@@ -12,16 +12,16 @@ export SP_DATA=$(az ad sp create-for-rbac --name TrivyTest --role AcrPull --scop
# Usage
```bash
# must set TRIVY_USERNAME empty char
export AZURE_CLIENT_ID$(echo $SP_DATA | jq -r .appId)
export AZURE_CLIENT_SECRET$(echo $SP_DATA | jq -r .password)
export AZURE_TENANT_ID$(echo $SP_DATA | jq -r .tenant)
export AZURE_CLIENT_ID=$(echo $SP_DATA | jq -r '.appId')
export AZURE_CLIENT_SECRET=$(echo $SP_DATA | jq -r '.password')
export AZURE_TENANT_ID=$(echo $SP_DATA | jq -r '.tenant')
```
# Testing
You can test credentials in the following manner.
```bash
docker run -it --rm -v /tmp:/tmp\
-e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \
-e AZURE_TENANT_ID=${AZURE_TENANT_ID} aquasec/trivy image your_special_project.azurecr.io/your_special_image:your_special_tag
docker run -it --rm -v /tmp:/tmp \
-e AZURE_CLIENT_ID -e AZURE_CLIENT_SECRET -e AZURE_TENANT_ID \
aquasec/trivy image your_special_project.azurecr.io/your_special_image:your_special_tag
```

View File

@@ -8,7 +8,7 @@
| License | |
The vulnerability database and the Java index database are needed only for vulnerability scanning.
See [here](../scanner/vulnerability/index.md) for the detail.
See [here](../scanner/vulnerability.md) for the detail.
## Vulnerability Database
@@ -64,6 +64,9 @@ Downloading the Java index DB from an external OCI registry can be done by using
$ trivy image --java-db-repository registry.gitlab.com/gitlab-org/security-products/dependencies/trivy-java-db --download-java-db-only
```
!!! Note
In [Client/Server](../references/modes/client-server.md) mode, `Java index DB` is currently only used on the `client` side.
## Remove DBs
The `--reset` flag removes all caches and databases.

View File

@@ -2,7 +2,7 @@
Trivy provides various methods for filtering the results.
## Hide Unfixed Vulnerabilities
## By Status
| Scanner | Supported |
|:----------------:|:---------:|
@@ -11,53 +11,70 @@ Trivy provides various methods for filtering the results.
| Secret | |
| License | |
By default, `Trivy` also detects unpatched/unfixed vulnerabilities.
This means you can't fix these vulnerabilities even if you update all packages.
If you would like to ignore them, use the `--ignore-unfixed` option.
Trivy supports the following vulnerability statuses:
- `unknown`
- `not_affected`: this package is not affected by this vulnerability on this platform
- `affected`: this package is affected by this vulnerability on this platform, but there is no patch released yet
- `fixed`: this vulnerability is fixed on this platform
- `under_investigation`: it is currently unknown whether or not this vulnerability affects this package on this platform, and it is under investigation
- `will_not_fix`: this package is affected by this vulnerability on this platform, but there is currently no intention to fix it (this would primarily be for flaws that are of Low or Moderate impact that pose no significant risk to customers)
- `fix_deferred`: this package is affected by this vulnerability on this platform, and may be fixed in the future
- `end_of_life`: this package has been identified to contain the impacted component, but analysis to determine whether it is affected or not by this vulnerability was not performed
Note that vulnerabilities with the `unknown`, `not_affected` or `under_investigation` status are not detected.
These are only defined for comprehensiveness, and you will not have the opportunity to specify these statuses.
Some statuses are supported in limited distributions.
| OS | Fixed | Affected | Under Investigation | Will Not Fix | Fix Deferred | End of Life |
|:----------:|:-----:|:--------:|:-------------------:|:------------:|:------------:|:-----------:|
| Debian | ✓ | ✓ | | | ✓ | ✓ |
| RHEL | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Other OSes | ✓ | ✓ | | | | |
To ignore vulnerabilities with specific statuses, use the `--ignore-status <list_of_statuses>` option.
```bash
$ trivy image --ignore-unfixed ruby:2.4.0
$ trivy image --ignore-status affected,fixed ruby:2.4.0
```
<details>
<summary>Result</summary>
```
2019-05-16T12:49:52.656+0900 INFO Updating vulnerability database...
2019-05-16T12:50:14.786+0900 INFO Detecting Debian vulnerabilities...
ruby:2.4.0 (debian 8.7)
=======================
Total: 4730 (UNKNOWN: 1, LOW: 145, MEDIUM: 3487, HIGH: 1014, CRITICAL: 83)
Total: 527 (UNKNOWN: 0, LOW: 276, MEDIUM: 83, HIGH: 158, CRITICAL: 10)
+------------------------------+------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
+------------------------------+------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
| apt | CVE-2019-3462 | CRITICAL | 1.0.9.8.3 | 1.0.9.8.5 | Incorrect sanitation of the |
| | | | | | 302 redirect field in HTTP |
| | | | | | transport method of... |
+ +------------------+----------+ +----------------------------------+-----------------------------------------------------+
| | CVE-2016-1252 | MEDIUM | | 1.0.9.8.4 | The apt package in Debian |
| | | | | | jessie before 1.0.9.8.4, in |
| | | | | | Debian unstable before... |
+------------------------------+------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
| bash | CVE-2019-9924 | HIGH | 4.3-11 | 4.3-11+deb8u2 | bash: BASH_CMD is writable in |
| | | | | | restricted bash shells |
+ +------------------+ + +----------------------------------+-----------------------------------------------------+
| | CVE-2016-7543 | | | 4.3-11+deb8u1 | bash: Specially crafted |
| | | | | | SHELLOPTS+PS4 variables allows |
| | | | | | command substitution |
+ +------------------+----------+ + +-----------------------------------------------------+
| | CVE-2016-0634 | MEDIUM | | | bash: Arbitrary code execution |
| | | | | | via malicious hostname |
+ +------------------+----------+ +----------------------------------+-----------------------------------------------------+
| | CVE-2016-9401 | LOW | | 4.3-11+deb8u2 | bash: popd controlled free |
+------------------------------+------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
┌─────────────────────────────┬──────────────────┬──────────┬──────────────┬────────────────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
Library │ Vulnerability │ Severity │ Status │ Installed Version Fixed Version │ Title
├─────────────────────────────┼──────────────────┼──────────┼──────────────┼────────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ binutils CVE-2014-9939 CRITICAL │ will_not_fix │ 2.25-5 │ binutils: buffer overflow in ihex.c
│ │ │ https://avd.aquasec.com/nvd/cve-2014-9939
├──────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ CVE-2017-6969 │ │ │ │ binutils: Heap-based buffer over-read in readelf when │
│ │ │ │ processing corrupt RL78 binaries
│ https://avd.aquasec.com/nvd/cve-2017-6969
├──────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
...
```
</details>
!!! tip
To skip all unfixed vulnerabilities, you can use the `--ignore-unfixed` flag .
It is a shorthand of `--ignore-status affected,will_not_fix,fix_deferred,end_of_life`.
It displays "fixed" vulnerabilities only.
```bash
$ trivy image --ignore-unfixed ruby:2.4.0
```
## By Severity
| Scanner | Supported |
@@ -187,6 +204,10 @@ See https://avd.aquasec.com/misconfig/avd-aws-0081
## By Finding IDs
Trivy supports the [.trivyignore](#trivyignore) and [.trivyignore.yaml](#trivyignoreyaml) ignore files.
### .trivyignore
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
@@ -194,7 +215,6 @@ See https://avd.aquasec.com/misconfig/avd-aws-0081
| Secret | ✓ |
| License | |
Use `.trivyignore`.
```bash
$ cat .trivyignore
@@ -234,6 +254,92 @@ Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
</details>
### .trivyignore.yaml
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | ✓ |
!!! warning "EXPERIMENTAL"
This feature might change without preserving backwards compatibility.
When the extension of the specified ignore file is either `.yml` or `.yaml`, Trivy will load the file as YAML.
For the `.trivyignore.yaml` file, you can set ignored IDs separately for `vulnerabilities`, `misconfigurations`, `secrets`, or `licenses`[^1].
Available fields:
| Field | Required | Type | Description |
|------------|:--------:|---------------------|------------------------------------------------------------------------------------------------------------|
| id | ✓ | string | The identifier of the vulnerability, misconfiguration, secret, or license[^1]. |
| paths | | string array | The list of file paths to be ignored. If `paths` is not set, the ignore finding is applied to all files. |
| expired_at | | date (`yyyy-mm-dd`) | The expiration date of the ignore finding. If `expired_at` is not set, the ignore finding is always valid. |
| statement | | string | The reason for ignoring the finding. (This field is not used for filtering.) |
```bash
$ cat .trivyignore.yaml
vulnerabilities:
- id: CVE-2022-40897
paths:
- "usr/local/lib/python3.9/site-packages/setuptools-58.1.0.dist-info/METADATA"
statement: Accept the risk
- id: CVE-2023-2650
- id: CVE-2023-3446
- id: CVE-2023-3817
- id: CVE-2023-29491
expired_at: 2023-09-01
misconfigurations:
- id: AVD-DS-0001
- id: AVD-DS-0002
paths:
- "docs/Dockerfile"
statement: The image needs root privileges
secrets:
- id: aws-access-key-id
- id: aws-secret-access-key
paths:
- "foo/bar/aws.secret"
licenses:
- id: GPL-3.0 # License name is used as ID
paths:
- "usr/share/gcc/python/libstdcxx/v6/__init__.py"
```
Since this feature is experimental, you must explicitly specify the YAML file path using the `--ignorefile` flag.
Once this functionality is stable, the YAML file will be loaded automatically.
```bash
$ trivy image --ignorefile ./.trivyignore.yaml python:3.9.16-alpine3.16
```
<details>
<summary>Result</summary>
```bash
2023-08-31T11:10:27.155+0600 INFO Vulnerability scanning is enabled
2023-08-31T11:10:27.155+0600 INFO Secret scanning is enabled
2023-08-31T11:10:27.155+0600 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2023-08-31T11:10:27.155+0600 INFO Please see also https://aquasecurity.github.io/trivy/dev/docs/scanner/secret/#recommendation for faster secret detection
2023-08-31T11:10:29.164+0600 INFO Detected OS: alpine
2023-08-31T11:10:29.164+0600 INFO Detecting Alpine vulnerabilities...
2023-08-31T11:10:29.169+0600 INFO Number of language-specific files: 1
2023-08-31T11:10:29.170+0600 INFO Detecting python-pkg vulnerabilities...
python:3.9.16-alpine3.16 (alpine 3.16.5)
========================================
Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
```
</details>
## By Vulnerability Target
| Scanner | Supported |
|:----------------:|:---------:|
@@ -408,3 +514,5 @@ resource "google_container_cluster" "one_off_test" {
location = var.region
}
```
[^1]: license name is used as id for `.trivyignore.yaml` files

View File

@@ -8,6 +8,7 @@ Trivy supports the following formats:
- [SARIF](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning)
- Template
- SBOM
- GitHub dependency snapshot
### Table (Default)
@@ -62,6 +63,8 @@ The following packages/languages are currently supported:
- Modules: go.mod
- PHP
- Composer
- Java
- Maven: pom.xml
This tree is the reverse of the npm list command.
However, if you want to resolve a vulnerability in a particular indirect dependency, the reversed tree is useful to know where that dependency comes from and identify which package you actually need to update.
@@ -246,7 +249,7 @@ $ trivy image -f json -o results.json golang:1.12-alpine
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | |
| License | |
[SARIF][sarif] can be generated with the `--format sarif` flag.
@@ -256,6 +259,20 @@ $ trivy image --format sarif -o report.sarif golang:1.12-alpine
This SARIF file can be uploaded to GitHub code scanning results, and there is a [Trivy GitHub Action][action] for automating this process.
### GitHub dependency snapshot
Trivy supports the following packages.
- [OS packages][os_packages]
- [Language-specific packages][language_packages]
[GitHub dependency snapshots][github-sbom] can be generated with the `--format github` flag.
```
$ trivy image --format github -o report.gsbom alpine
```
This snapshot file can be [submitted][github-sbom-submit] to your GitHub repository.
### Template
| Scanner | Supported |
@@ -387,3 +404,8 @@ $ trivy convert --format table --severity CRITICAL result.json
[asff]: ../../tutorials/integrations/aws-security-hub.md
[sarif]: https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/managing-results-from-code-scanning
[sprig]: http://masterminds.github.io/sprig/
[github-sbom]: https://docs.github.com/en/rest/dependency-graph/dependency-submission?apiVersion=2022-11-28#about-dependency-submissions
[github-sbom-submit]: https://docs.github.com/en/rest/dependency-graph/dependency-submission?apiVersion=2022-11-28#create-a-snapshot-of-dependencies-for-a-repository
[os_packages]: ../scanner/vulnerability.md#os-packages
[language_packages]: ../scanner/vulnerability.md#language-specific-packages

View File

@@ -11,19 +11,34 @@ This section details ways to specify the files and directories that Trivy should
| License | ✓ |
By default, Trivy traverses directories and searches for all necessary files for scanning.
You can skip files that you don't maintain using the `--skip-files` flag.
You can skip files that you don't maintain using the `--skip-files` flag, or the equivalent Trivy YAML config option.
```
Using the `--skip-files` flag:
```bash
$ trivy image --skip-files "/Gemfile.lock" --skip-files "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0/Gemfile.lock" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
```
Using the Trivy YAML configuration:
```yaml
image:
skip-files:
- foo
- "testdata/*/bar"
```
It's possible to specify globs as part of the value.
```bash
$ trivy image --skip-files "./testdata/*/bar" .
```
Will skip any file named `bar` in the subdirectories of testdata.
This will skip any file named `bar` in the subdirectories of testdata.
```bash
$ trivy config --skip-files "./foo/**/*.tf" .
```
This will skip any files with the extension `.tf` in subdirectories of foo at any depth.
## Skip Directories
| Scanner | Supported |
@@ -34,32 +49,48 @@ Will skip any file named `bar` in the subdirectories of testdata.
| License | ✓ |
By default, Trivy traverses directories and searches for all necessary files for scanning.
You can skip directories that you don't maintain using the `--skip-dirs` flag.
You can skip directories that you don't maintain using the `--skip-dirs` flag, or the equivalent Trivy YAML config option.
```
Using the `--skip-dirs` flag:
```bash
$ trivy image --skip-dirs /var/lib/gems/2.5.0/gems/fluent-plugin-detect-exceptions-0.0.13 --skip-dirs "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
```
Using the Trivy YAML configuration:
```yaml
image:
skip-dirs:
- foo/bar/
- "**/.terraform"
```
It's possible to specify globs as part of the value.
```bash
$ trivy image --skip-dirs "./testdata/*" .
```
Will skip all subdirectories of the testdata directory.
This will skip all subdirectories of the testdata directory.
```bash
$ trivy config --skip-dirs "**/.terraform" .
```
This will skip subdirectories at any depth named `.terraform/`. (Note: this will match `./foo/.terraform` or
`./foo/bar/.terraform`, but not `./.terraform`.)
!!! tip
Glob patterns work with any trivy subcommand (image, config, etc.) and can be specified to skip both directories (with `--skip-dirs`) and files (with `--skip-files`).
### Advanced globbing
Trivy also supports the [globstar](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Pattern-Matching) pattern matching.
Trivy also supports bash style [extended](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Pattern-Matching) glob pattern matching.
```bash
$ trivy image --skip-files "**/foo" image:tag
```
Will skip the file `foo` that happens to be nested under any parent(s).
This will skip the file `foo` that happens to be nested under any parent(s).
## File patterns
| Scanner | Supported |

View File

@@ -0,0 +1,33 @@
# Azure ARM Template
Trivy supports the scanners listed in the table below.
| Scanner | Supported |
| :----------------: | :-------: |
| [Misconfiguration] | ✓ |
| [Secret] | ✓ |
It supports the following configurations:
| Format | Supported |
| :----------: | :-------: |
| ARM template | ✓ |
| Bicep | ✓[^1] |
To scan Bicep codes, you need to convert them into ARM templates first.
```
az bicep build -f main.bicep
or
bicep build main.bicep
```
## Misconfiguration
Trivy recursively searches directories and scans all found Azure ARM templates.
## Secret
The secret scan is performed on plain text files, with no special treatment for Azure ARM templates.
[Misconfiguration]: ../../scanner/misconfiguration/index.md
[Secret]: ../../scanner/secret.md
[^1]: Bicep is not natively supported. It needs to be converted into Azure ARM templates.

View File

@@ -0,0 +1,24 @@
# CloudFormation
Trivy supports the scanners listed in the table below.
| Scanner | Supported |
| :----------------: | :-------: |
| [Misconfiguration] | ✓ |
| [Secret] | ✓ |
It supports the following formats.
| Format | Supported |
| :----: | :-------: |
| JSON | ✓ |
| YAML | ✓ |
## Misconfiguration
Trivy recursively searches directories and scans all found CloudFormation files.
It evaluates properties, functions, and other elements within CloudFormation files to detect misconfigurations.
## Secret
The secret scan is performed on plain text files, with no special treatment for CloudFormation.
[Misconfiguration]: ../../scanner/misconfiguration/index.md
[Secret]: ../../scanner/secret.md

View File

@@ -0,0 +1,24 @@
# Docker
Trivy supports the scanners listed in the table below.
| Scanner | Supported |
| :----------------: | :-------: |
| [Misconfiguration] | ✓ |
| [Secret] | ✓ |
It supports the following configurations.
| Config | Supported |
| :-----------: | :-------: |
| Dockerfile | ✓ |
| Containerfile | ✓ |
| Compose | - |
## Misconfiguration
Trivy recursively searches directories and scans all found Docker files.
## Secret
The secret scan is performed on plain text files, with no special treatment for Dockerfile.
[Misconfiguration]: ../../scanner/misconfiguration/index.md
[Secret]: ../../scanner/secret.md

View File

@@ -0,0 +1,60 @@
# Helm
Trivy supports two types of Helm scanning, templates and packaged charts.
The following scanners are supported.
| Format | [Misconfiguration] | [Secret] |
| -------- | :----------------: | :------: |
| Template | ✓ | ✓ |
| Chart | ✓ | - |
## Misconfiguration
Trivy recursively searches directories and scans all found Helm files.
It evaluates variables, functions, and other elements within Helm templates and resolve the chart to Kubernetes manifests then run the Kubernetes checks.
See [here](../../scanner/misconfiguration/policy/builtin.md) for more details on the built-in policies.
### Value overrides
There are a number of options for overriding values in Helm charts.
When override values are passed to the Helm scanner, the values will be used during the Manifest rendering process and will become part of the scanned artifact.
#### Setting inline value overrides
Overrides can be set inline on the command line
```bash
trivy conf --helm-set securityContext.runAsUser=0 ./charts/mySql
```
#### Setting value file overrides
Overrides can be in a file that has the key=value set.
```yaml
# Example override file (overrides.yaml)
securityContext:
runAsUser: 0
```
```bash
trivy conf --helm-values overrides.yaml ./charts/mySql
```
#### Setting value as explicit string
the `--helm-set-string` is the same as `--helm-set` but explicitly retains the value as a string
```bash
trivy config --helm-set-string name=false ./infrastructure/tf
```
#### Setting specific values from files
Specific override values can come from specific files
```bash
trivy conf --helm-set-file environment=dev.values.yaml ./charts/mySql
```
## Secret
The secret scan is performed on plain text files, with no special treatment for Helm.
Secret scanning is not conducted on the contents of packaged Charts, such as tar or tar.gz.
[Misconfiguration]: ../../scanner/misconfiguration/index.md
[Secret]: ../../scanner/secret.md

View File

@@ -0,0 +1,21 @@
# Infrastructure as Code
## Scanner
Trivy scans Infrastructure as Code (IaC) files for
- [Misconfigurations][misconf]
- [Secrets][secret]
## Supported configurations
| Config type | File patterns |
| ----------------------------------- | ----------------------------- |
| [Kubernetes](kubernetes.md) | *.yml, *.yaml, *.json |
| [Docker](docker.md) | Dockerfile, Containerfile |
| [Terraform](terraform.md) | *.tf, *.tf.json, *.tfvars, |
| [CloudFormation](cloudformation.md) | *.yml, *.yaml, *.json |
| [Azure ARM Template](azure-arm.md) | *.json |
| [Helm](helm.md) | *.yaml, *.tpl, *.tar.gz, etc. |
[misconf]: ../../scanner/misconfiguration/index.md
[secret]: ../../scanner/secret.md

View File

@@ -0,0 +1,31 @@
# Kubernetes
Trivy supports the scanners listed in the table below.
| Scanner | Supported |
| :----------------: | :-------: |
| [Misconfiguration] | ✓ |
| [Secret] | ✓ |
In addition to raw YAML and JSON, it supports the following templates:
| Template | Supported |
| :-------------: | :-------: |
| [Helm](helm.md) | ✓ |
| Kustomize | ✓[^1] |
!!! note
Trivy does not support Kustomize overlays, so it scans files defined in the base.
Or, you can scan the output of `kustomize build`.
## Misconfiguration
Trivy recursively searches directories and scans all found Kubernetes files.
## Secret
The secret scan is performed on plain text files, with no special treatment for Kubernetes.
This means that Base64 encoded secrets are not scanned, and only secrets written in plain text are detected.
[Misconfiguration]: ../../scanner/misconfiguration/index.md
[Secret]: ../../scanner/secret.md
[^1]: Kustomize is not natively supported.

View File

@@ -0,0 +1,45 @@
# Terraform
Trivy supports the scanners listed in the table below.
| Scanner | Supported |
| :--------------: | :-------: |
| Misconfiguration | ✓ |
| Secret | ✓ |
It supports the following formats:
| Format | Supported |
| :-------: | :-------: |
| JSON | ✓ |
| HCL | ✓ |
| Plan JSON | ✓ |
Trivy can scan the results of `terraform plan`.
You can scan by passing the file generated as shown below to Trivy:
```
$ terraform plan --out tfplan.binary
$ terraform show -json tfplan.binary > tfplan.json
```
## Misconfiguration
Trivy recursively searches directories and scans all found Terraform files.
It also evaluates variables, imports, and other elements within Terraform files to detect misconfigurations.
### Value Overrides
You can provide `tf-vars` files to Trivy to override default values specified in the Terraform HCL code.
```bash
trivy conf --tf-vars dev.terraform.tfvars ./infrastructure/tf
```
### Exclude Downloaded Terraform Modules
By default, downloaded modules are also scanned.
If you don't want to scan modules downloaded into the `.terraform` directory, you can use the `--tf-exclude-downloaded-modules` flag.
```bash
trivy conf --tf-exclude-downloaded-modules ./configs
```
## Secret
The secret scan is performed on plain text files, with no special treatment for Terraform.

View File

@@ -0,0 +1,9 @@
# Scanning Coverage
Trivy can detect security issues in many different platforms, languages and configuration files.
This section gives a general overview of that coverage, and can help answer the frequently asked question "Does Trivy support X?".
For more detailed information about the specific platforms and languages, check the relevant documentation.
- [OS Packages](os/index.md)
- [Language-specific Packages](language/index.md)
- [IaC files](iac/index.md)
- [Kubernetes clusters](./kubernetes.md)

View File

@@ -0,0 +1,22 @@
# Kubernetes
When scanning a Kubernetes cluster, Trivy differentiates between the following:
1. Cluster infrastructure (e.g api-server, kubelet, addons)
1. Cluster configuration (e.g Roles, ClusterRoles).
1. Application workloads (e.g nginx, postgresql).
Whenever Trivy scans either of these Kubernetes resources, the container image is scanned separately to the Kubernetes resource definition (the YAML manifest) that defines the resource.
When scanning any of the above, the container image is scanned separately to the Kubernetes resource definition (the YAML manifest) that defines the resource.
Container image is scanned for:
- Vulnerabilities
- Misconfigurations
- Exposed secrets
Kubernetes resource definition is scanned for:
- Vulnerabilities - partially supported through [KBOM scanning](#KBOM)
- Misconfigurations
- Exposed secrets
To learn more, please see the [documentation for Kubernetes scanning](../target/kubernetes.md)

View File

@@ -0,0 +1,23 @@
# C/C++
Trivy supports [Conan][conan] C/C++ Package Manager.
The following scanners are supported.
| Package manager | SBOM | Vulnerability | License |
| --------------- | :---: | :-----------: | :-----: |
| Conan | ✓ | ✓ | - |
The following table provides an outline of the features Trivy offers.
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
| --------------- | -------------- | :---------------------: | :--------------: | :----------------------------------: | :------: |
| Conan | conan.lock[^1] | ✓ | Excluded | ✓ | ✓ |
## Conan
In order to detect dependencies, Trivy searches for `conan.lock`[^1].
[conan]: https://docs.conan.io/1/index.html
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[^1]: `conan.lock` is default name. To scan a custom filename use [file-patterns](../../configuration/skipping.md#file-patterns)

View File

@@ -0,0 +1,26 @@
# Dart
Trivy supports [Dart][dart].
The following scanners are supported.
| Package manager | SBOM | Vulnerability | License |
|-------------------------| :---: | :-----------: |:-------:|
| [Dart][dart-repository] | ✓ | ✓ | - |
The following table provides an outline of the features Trivy offers.
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|-------------------------|--------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
| [Dart][dart-repository] | pubspec.lock | ✓ | Included | - | - |
## Dart
In order to detect dependencies, Trivy searches for `pubspec.lock`.
Trivy marks indirect dependencies, but `pubspec.lock` file doesn't have options to separate root and dev transitive dependencies.
So Trivy includes all dependencies in report.
[dart]: https://dart.dev/
[dart-repository]: https://pub.dev/
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies

View File

@@ -0,0 +1,47 @@
# .NET
Trivy supports `.NET core` and `NuGet` package managers.
The following scanners are supported.
| Artifact | SBOM | Vulnerability | License |
|-----------|:----:|:-------------:|:-------:|
| .Net Core | ✓ | ✓ | - |
| NuGet | ✓ | ✓ | ✓ |
The following table provides an outline of the features Trivy offers.
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|:---------------:|--------------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
| .Net Core | *.deps.json | ✓ | Excluded | - | ✓ |
| NuGet | packages.config | ✓ | Excluded | - | - |
| NuGet | packages.lock.json | ✓ | Included | ✓ | ✓ |
## *.deps.json
Trivy parses `*.deps.json` files. Trivy currently excludes dev dependencies from the report.
## packages.config
Trivy only finds dependency names and versions from `packages.config` files. To build dependency graph, it is better to use `packages.lock.json` files.
### license detection
`packages.config` files don't have information about the licenses used.
Trivy uses [*.nuspec][nuspec] files from [global packages folder][global-packages] to detect licenses.
!!! note
The `licenseUrl` field is [deprecated][license-url]. Trivy doesn't parse this field and only checks the [license] field (license `expression` type only).
Currently only the default path and `NUGET_PACKAGES` environment variable are supported.
## packages.lock.json
Don't forgot to [enable][enable-lock] lock files in your project.
!!! tip
Please make sure your lock file is up-to-date after modifying dependencies.
### license detection
Same as [packages.config](#license-detection)
[enable-lock]: https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#enabling-the-lock-file
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[nuspec]: https://learn.microsoft.com/en-us/nuget/reference/nuspec
[global-packages]: https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders
[license]: https://learn.microsoft.com/en-us/nuget/reference/nuspec#license
[license-url]: https://learn.microsoft.com/en-us/nuget/reference/nuspec#licenseurl

View File

@@ -0,0 +1,27 @@
# Elixir
Trivy supports [Hex][hex] repository for [Elixir][elixir].
The following scanners are supported.
| Package manager | SBOM | Vulnerability | License |
|-----------------| :---: | :-----------: |:-------:|
| [hex][hex] | ✓ | ✓ | - |
The following table provides an outline of the features Trivy offers.
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|-----------------|--------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
| [hex][hex] | mix.lock[^1] | ✓ | Excluded | - | ✓ |
## Hex
In order to detect dependencies, Trivy searches for `mix.lock`[^1].
[Configure](https://hexdocs.pm/mix/Mix.Project.html#module-configuration) your project to use `mix.lock`[^1] file.
[elixir]: https://elixir-lang.org/
[hex]: https://hex.pm/
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[^1]: `mix.lock` is default name. To scan a custom filename use [file-patterns](../../configuration/skipping.md#file-patterns)

View File

@@ -2,12 +2,20 @@
## Features
Trivy supports two types of Go scanning, Go Modules and binaries built by Go.
The following table provides an outline of the features Trivy offers.
| Artifact | Offline[^1] | Dev dependencies | License | Dependency graph |
|----------|:-----------:|:-----------------|:-------:|:----------------:|
| Modules | ✅ | Include | ✅[^2] | ✅[^2] |
| Binaries | ✅ | Exclude | - | - |
The following scanners are supported.
| Artifact | SBOM | Vulnerability | License |
| -------- | :---: | :-----------: | :-----: |
| Modules | ✓ | ✓ | ✓[^2] |
| Binaries | ✓ | ✓ | - |
The table below provides an outline of the features Trivy offers.
| Artifact | Offline[^1] | Dev dependencies | [Dependency graph][dependency-graph] |
|----------|:-----------:|:-----------------|:----------------------------------:|
| Modules | ✅ | Include | ✅[^2] |
| Binaries | ✅ | Exclude | - |
!!! note
Trivy scans only dependencies of the Go project.
@@ -18,7 +26,7 @@ The following table provides an outline of the features Trivy offers.
Depending on Go versions, the required files are different.
| Version | Required files | Offline |
|---------|:--------------:|:-------:|
| ------- | :------------: | :-----: |
| \>=1.17 | go.mod | ✅ |
| <1.17 | go.mod, go.sum | ✅ |
@@ -63,5 +71,10 @@ Also, you can scan your local binaries.
$ trivy fs ./your_binary
```
!!! note
It doesn't work with UPX-compressed binaries.
[^1]: It doesn't require the Internet access.
[^2]: Need to download modules to local cache beforehand
[^2]: Need to download modules to local cache beforehand
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies

View File

@@ -0,0 +1,67 @@
# Programming Language
Trivy supports programming languages for
- [SBOM][sbom]
- [Vulnerabilities][vuln]
- [Licenses][license]
## Supported languages
The files analyzed vary depending on the target.
This is because Trivy primarily categorizes targets into two groups:
- Pre-build
- Post-build
If the target is a pre-build project, like a code repository, Trivy will analyze files used for building, such as lock files.
On the other hand, when the target is a post-build artifact, like a container image, Trivy will analyze installed package metadata like `.gemspec`, binary files, and so on.
| Language | File | Image[^5] | Rootfs[^6] | Filesystem[^7] | Repository[^8] |
|----------------------|--------------------------------------------------------------------------------------------|:---------:|:----------:|:--------------:|:--------------:|
| [Ruby](ruby.md) | Gemfile.lock | - | - | ✅ | ✅ |
| | gemspec | ✅ | ✅ | - | - |
| [Python](python.md) | Pipfile.lock | - | - | ✅ | ✅ |
| | poetry.lock | - | - | ✅ | ✅ |
| | requirements.txt | - | - | ✅ | ✅ |
| | egg package[^1] | ✅ | ✅ | - | - |
| | wheel package[^2] | ✅ | ✅ | - | - |
| | conda package[^3] | ✅ | ✅ | - | - |
| [PHP](php.md) | composer.lock | ✅ | ✅ | ✅ | ✅ |
| [Node.js](nodejs.md) | package-lock.json | - | - | ✅ | ✅ |
| | yarn.lock | - | - | ✅ | ✅ |
| | pnpm-lock.yaml | - | - | ✅ | ✅ |
| | package.json | ✅ | ✅ | - | - |
| [.NET](dotnet.md) | packages.lock.json | ✅ | ✅ | ✅ | ✅ |
| | packages.config | ✅ | ✅ | ✅ | ✅ |
| | .deps.json | ✅ | ✅ | ✅ | ✅ |
| [Java](java.md) | JAR/WAR/PAR/EAR[^4] | ✅ | ✅ | - | - |
| | pom.xml | - | - | ✅ | ✅ |
| | *gradle.lockfile | - | - | ✅ | ✅ |
| [Go](golang.md) | Binaries built by Go | ✅ | ✅ | - | - |
| | go.mod | - | - | ✅ | ✅ |
| [Rust](rust.md) | Cargo.lock | ✅ | ✅ | ✅ | ✅ |
| | Binaries built with [cargo-auditable](https://github.com/rust-secure-code/cargo-auditable) | ✅ | ✅ | - | - |
| [C/C++](c.md) | conan.lock | - | - | ✅ | ✅ |
| [Elixir](elixir.md) | mix.lock[^10] | - | - | ✅ | ✅ |
| [Dart](dart.md) | pubspec.lock | - | - | ✅ | ✅ |
| [Swift](swift.md) | Podfile.lock | - | - | ✅ | ✅ |
| | Package.resolved | - | - | ✅ | ✅ |
The path of these files does not matter.
Example: [Dockerfile](https://github.com/aquasecurity/trivy-ci-test/blob/main/Dockerfile)
[sbom]: ../../supply-chain/sbom.md
[vuln]: ../../scanner/vulnerability.md
[license]: ../../scanner/license.md
[^1]: `*.egg-info`, `*.egg-info/PKG-INFO`, `*.egg` and `EGG-INFO/PKG-INFO`
[^2]: `.dist-info/META-DATA`
[^3]: `envs/*/conda-meta/*.json`
[^4]: `*.jar`, `*.war`, `*.par` and `*.ear`
[^5]: ✅ means "enabled" and `-` means "disabled" in the image scanning
[^6]: ✅ means "enabled" and `-` means "disabled" in the rootfs scanning
[^7]: ✅ means "enabled" and `-` means "disabled" in the filesystem scanning
[^8]: ✅ means "enabled" and `-` means "disabled" in the git repository scanning
[^9]: ✅ means that Trivy detects line numbers where each dependency is declared in the scanned file. Only supported in [json](../../configuration/reporting.md#json) and [sarif](../../configuration/reporting.md#sarif) formats. SARIF uses `startline == 1 and endline == 1` for unsupported file types
[^10]: To scan a filename other than the default filename use [file-patterns](../../configuration/skipping.md#file-patterns)

View File

@@ -1,14 +1,21 @@
# Java
Trivy supports three types of Java scanning: `JAR/WAR/PAR/EAR`, `pom.xml` and `*gradle.lockfile` files.
Each artifact supports the following scanners:
| Artifact | SBOM | Vulnerability | License |
| ---------------- | :---: | :-----------: | :-----: |
| JAR/WAR/PAR/EAR | ✓ | ✓ | - |
| pom.xml | ✓ | ✓ | ✓ |
| *gradle.lockfile | ✓ | ✓ | - |
The following table provides an outline of the features Trivy offers.
| Artifact | Internet access | Dev dependencies |
|------------------|:---------------------:|:-----------------|
| JAR/WAR/PAR/EAR | Trivy Java DB | Include |
| pom.xml | Maven repository [^1] | Exclude |
| *gradle.lockfile | - | Exclude |
| Artifact | Internet access | Dev dependencies | [Dependency graph][dependency-graph] |
|------------------|:---------------------:|:----------------:|:------------------------------------:|
| JAR/WAR/PAR/EAR | Trivy Java DB | Include | - |
| pom.xml | Maven repository [^1] | Exclude | ✓ |
| *gradle.lockfile | - | Exclude | - |
These may be enabled or disabled depending on the target.
See [here](./index.md) for the detail.
@@ -18,7 +25,7 @@ To find information about your JAR[^2] file, Trivy parses `pom.properties` and `
If those files don't exist or don't contain enough information - Trivy will try to find this JAR[^2] file in [trivy-java-db](https://github.com/aquasecurity/trivy-java-db).
The Java DB will be automatically downloaded/updated when any JAR[^2] file is found.
It is stored in [the cache directory](../../../configuration/cache.md#cache-directory).
It is stored in [the cache directory](../../configuration/cache.md#cache-directory).
!!! warning "EXPERIMENTAL"
Finding JARs in `trivy-java-db` is an experimental function.
@@ -39,7 +46,7 @@ If your machine doesn't have the necessary files - Trivy tries to find the infor
!!! Note
Trivy only takes information about packages. We don't take a list of vulnerabilities for packages from the `maven repository`.
Information about data sources for Java you can see [here](./index.md#data-sources).
Information about data sources for Java you can see [here](../../scanner/vulnerability.md#data-sources_1).
You can disable connecting to the maven repository with the `--offline-scan` flag.
The `--offline-scan` flag does not affect the Trivy database.
@@ -59,4 +66,6 @@ It doesn't require the internet access.
[^3]: `ArtifactID`, `GroupID` and `Version`
[^4]: e.g. when parent pom.xml file has `../pom.xml` path
[^5]: When you use dependency path in `relativePath` field in pom.xml file
[^6]: `/Users/<username>/.m2/repository` (for Linux and Mac) and `C:/Users/<username>/.m2/repository` (for Windows) by default
[^6]: `/Users/<username>/.m2/repository` (for Linux and Mac) and `C:/Users/<username>/.m2/repository` (for Windows) by default
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies

View File

@@ -1,18 +1,27 @@
# Node.js
Trivy supports three types of Node.js package managers: `npm`, `Yarn` and `pnpm`.
The following scanners are supported.
| Artifact | SBOM | Vulnerability | License |
| -------- | :---: | :-----------: | :-----: |
| npm | ✓ | ✓ | ✓ |
| Yarn | ✓ | ✓ | ✓ |
| pnpm | ✓ | ✓ | - |
The following table provides an outline of the features Trivy offers.
| Package manager | File | Transitive dependencies | Dev dependencies | Dependency graph | Position | License |
|:---------------:|-------------------|:-----------------------:|:----------------:|:----------------:|:--------:|:-------:|
| npm | package-lock.json | | Excluded | | | |
| Yarn | yarn.lock | | Excluded | | | - |
| pnpm | pnpm-lock.yaml | | Excluded | ✅ | - | - |
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|:---------------:|-------------------|:-----------------------:|:-----------------:|:------------------------------------:|:--------:|
| npm | package-lock.json | | [Excluded](#npm) | | |
| Yarn | yarn.lock | | [Excluded](#yarn) | | |
| pnpm | pnpm-lock.yaml | | Excluded | ✓ | - |
In addition, Trivy scans installed packages with `package.json`.
| File | Dependency graph | Position | License |
|--------------|:----------------:|:--------:|:-------:|
| ------------ | :--------------: | :------: | :-----: |
| package.json | - | - | ✅ |
These may be enabled or disabled depending on the target.
@@ -29,12 +38,17 @@ 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`.
To exclude devDependencies, `package.json` also needs to be present next to `yarn.lock`.
Trivy analyzes `.yarn` (Yarn 2+) or `node_modules` (Yarn Classic) folder next to the yarn.lock file to detect licenses.
By default, Trivy doesn't report development dependencies. Use the `--include-dev-deps` flag to include them.
### pnpm
Trivy parses `pnpm-lock.yaml`, then finds production dependencies and builds a [tree] of dependencies with vulnerabilities.
Trivy parses `pnpm-lock.yaml`, then finds production dependencies and builds a [tree][dependency-graph] of dependencies with vulnerabilities.
## Packages
Trivy parses the manifest files of installed packages in container image scanning and so on.
@@ -43,5 +57,4 @@ Trivy parses the manifest files of installed packages in container image scannin
Trivy searches for `package.json` files under `node_modules` and identifies installed packages.
It only extracts package names, versions and licenses for those packages.
[tree]: ../../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies

View File

@@ -1,12 +1,19 @@
# PHP
Trivy supports [Composer][composer], which is a tool for dependency management in PHP.
The following scanners are supported.
| Package manager | SBOM | Vulnerability | License |
| --------------- | :---: | :-----------: | :-----: |
| Composer | ✓ | ✓ | ✓ |
The following table provides an outline of the features Trivy offers.
| Package Manager | File | Transitive dependencies | Dev dependencies | Dependency graph | Position | License |
|-----------------|---------------|:-----------------------:|:----------------:|:----------------:|:--------:|:-------:|
| Composer | composer.lock | | Excluded | | ✅ | |
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|-----------------|---------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
| Composer | composer.lock | | Excluded | | |
## Composer
In order to detect dependencies, Trivy searches for `composer.lock`.
@@ -15,4 +22,5 @@ Trivy also supports dependency trees; however, to display an accurate tree, it n
Since this information is not included in `composer.lock`, Trivy parses `composer.json`, which should be located next to `composer.lock`.
If you want to see the dependency tree, please ensure that `composer.json` is present.
[composer]: https://getcomposer.org/
[composer]: https://getcomposer.org/
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies

View File

@@ -1,20 +1,37 @@
# Python
Trivy supports three types of Python package managers: `pip`, `Pipenv` and `Poetry`.
The following scanners are supported for package managers.
| Package manager | SBOM | Vulnerability | License |
| --------------- | :---: | :-----------: | :-----: |
| pip | ✓ | ✓ | - |
| Pipenv | ✓ | ✓ | - |
| Poetry | ✓ | ✓ | - |
In addition, Trivy supports three formats of Python packages: `egg`, `wheel` and `conda`.
The following scanners are supported for Python packages.
| Packaging | SBOM | Vulnerability | License |
| --------- | :---: | :-----------: | :-----: |
| Egg | ✓ | ✓ | ✓ |
| Wheel | ✓ | ✓ | ✓ |
| Conda | ✓ | - | - |
The following table provides an outline of the features Trivy offers.
| Package manager | File | Transitive dependencies | Dev dependencies | Dependency graph | Position | License |
|-----------------|------------------|:-----------------------:|:----------------:|:----------------:|:--------:|:-------:|
| pip | requirements.txt | - | Include | - | - | - |
| Pipenv | Pipfile.lock | | Include | - | | - |
| Poetry | poetry.lock | | Exclude | | | - |
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|-----------------|------------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
| pip | requirements.txt | - | Include | - | - |
| Pipenv | Pipfile.lock | | Include | - | |
| Poetry | poetry.lock | | Exclude | | |
In addition, Trivy supports two formats of Python packages: `egg` and `wheel`.
| Packaging | License |
|-----------|:-------:|
| Egg | |
| Wheel | |
| Packaging | Dependency graph |
| --------- | :--------------: |
| Egg | |
| Wheel | |
These may be enabled or disabled depending on the target.
See [here](./index.md) for the detail.
@@ -73,3 +90,5 @@ Trivy looks for `*.egg-info`, `*.egg-info/PKG-INFO`, `*.egg` and `EGG-INFO/PKG-I
### Wheel
Trivy looks for `.dist-info/META-DATA` to identify Python packages.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies

View File

@@ -0,0 +1,30 @@
# Ruby
Trivy supports [Bundler][bundler] and [RubyGems][rubygems].
The following scanners are supported for Cargo.
| Package manager | SBOM | Vulnerability | License |
|-----------------|:----:|:-------------:|:-------:|
| Bundler | ✓ | ✓ | - |
| RubyGems | ✓ | ✓ | ✓ |
The following table provides an outline of the features Trivy offers.
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|-----------------|--------------|:-----------------------:|:-----------------|:------------------------------------:|:--------:|
| Bundler | Gemfile.lock | ✓ | Included | ✓ | ✓ |
| RubyGems | .gemspec | - | Included | - | - |
### Bundler
Trivy searches for `Gemfile.lock` to detect dependencies.
### RubyGems
`.gemspec` files doesn't contains transitive dependencies. You need to scan each `.gemspec` file separately.
[bundler]: https://bundler.io
[rubygems]: https://rubygems.org/
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies

View File

@@ -1,18 +1,29 @@
# Rust
## Features
Trivy supports [Cargo](https://doc.rust-lang.org/stable/cargo/), which is the Rust package manager.
The following table provides an outline of the features Trivy offers.
The following scanners are supported for Cargo.
| Package manager | File | Transitive dependencies | Dev dependencies | License | Dependency graph | Position |
|-----------------|------------|:-----------------------:|:-----------------|:-------:|:----------------:|:--------:|
| Cargo | Cargo.lock | ✅ | Excluded[^1] | - | ✅ | |
| Package manager | SBOM | Vulnerability | License |
| --------------- | :---: | :-----------: | :-----: |
| Cargo | | | - |
In addition, it supports binaries built with [cargo-auditable](https://github.com/rust-secure-code/cargo-auditable).
| Artifact | Transitive dependencies | Dev dependencies | License | Dependency graph | Position |
|----------|:-----------------------:|:-----------------|:-------:|:----------------:|:--------:|
| Binaries | ✅ | Excluded | - | - | - |
| Artifact | SBOM | Vulnerability | License |
| -------- | :---: | :-----------: | :-----: |
| Binaries | ✓ | ✓ | - |
## Features
The following table provides an outline of the features Trivy offers.
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|-----------------|------------|:-----------------------:|:-----------------|:------------------------------------:|:--------:|
| Cargo | Cargo.lock | ✓ | Excluded[^1] | ✓ | ✓ |
| Artifact | Transitive dependencies | Dev dependencies | Dependency graph | Position |
| -------- | :---------------------: | :--------------- | :--------------: | :------: |
| Binaries | ✓ | Excluded | - | - |
### Cargo
@@ -28,4 +39,6 @@ Scan `Cargo.lock` and `Cargo.toml` together also removes developer dependencies.
Trivy scans binaries built with [cargo-auditable](https://github.com/rust-secure-code/cargo-auditable).
If such a binary exists, Trivy will identify it as being built with cargo-audit and scan it.
[^1]: When you scan Cargo.lock and Cargo.toml together.
[^1]: When you scan Cargo.lock and Cargo.toml together.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies

View File

@@ -0,0 +1,44 @@
# Swift
Trivy supports [CocoaPods][cocoapods] and [Swift][swift] package managers.
The following scanners are supported.
| Package manager | SBOM | Vulnerability | License |
|-----------------|:----:|:-------------:|:-------:|
| Swift | ✓ | ✓ | - |
| CocoaPods | ✓ | ✓ | - |
The following table provides an outline of the features Trivy offers.
| Package manager | File | Transitive dependencies | Dev dependencies | [Dependency graph][dependency-graph] | Position |
|:---------------:|------------------|:-----------------------:|:----------------:|:------------------------------------:|:--------:|
| Swift | Package.resolved | ✓ | Included | - | ✓ |
| CocoaPods | Podfile.lock | ✓ | Included | ✓ | - |
These may be enabled or disabled depending on the target.
See [here](./index.md) for the detail.
## Swift
Trivy parses [Package.resolved][package-resolved] file to find dependencies.
Don't forget to update (`swift package update` command) this file before scanning.
## CocoaPods
CocoaPods uses package names in `PodFile.lock`, but [GitHub Advisory Database (GHSA)][ghsa] Trivy relies on uses Git URLs.
We parse [the CocoaPods Specs][cocoapods-specs] to match package names and links.
!!! note "Limitation"
Since [GHSA][ghsa] holds only Git URLs, such as github.com/apple/swift-nio,
Trivy can't identify affected submodules, and detect all submodules maintained by the same URL.
For example, [SwiftNIOHTTP1][niohttp1] and [SwiftNIOWebSocket][niowebsocket] both are maintained under `github.com/apple/swift-nio`,
and Trivy detect CVE-2022-3215 for both of them, even though only [SwiftNIOHTTP1][niohttp1] is actually affected.
[cocoapods]: https://cocoapods.org/
[cocoapods-specs]: https://github.com/CocoaPods/Specs
[ghsa]: https://github.com/advisories?query=type%3Areviewed+ecosystem%3Aswift
[swift]: https://www.swift.org/package-manager/
[package-resolved]: https://github.com/apple/swift-package-manager/blob/4a42f2519e3f7b8a731c5ed89b47ed577df8f86c/Documentation/Usage.md#resolving-versions-packageresolved-file
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[niohttp1]: https://cocoapods.org/pods/SwiftNIOHTTP1
[niowebsocket]: https://cocoapods.org/pods/SwiftNIOWebSocket

View File

@@ -0,0 +1,73 @@
# AlmaLinux
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The table below outlines the features offered by Trivy.
| Feature | Supported |
|:------------------------------------:|:---------:|
| Unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
## Vulnerability
AlmaLinux offers its own security advisories, and these are utilized when scanning AlmaLinux for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
### Fixed Version
When looking at fixed versions, it's crucial to consider the patches supplied by AlmaLinux.
For example, for CVE-2023-0464, the fixed version for AlmaLinux 9 is listed as `3.0.7-16.el9_2` in [their advisory][ALSA-2023:3722].
Note that this is different from the upstream fixed version, which is `3.0.9`, `3.1.1`, and son on.
Typically, only the upstream information gets listed on [NVD], so it's important not to get confused.
### Severity
Trivy calculates the severity of an issue based on the severity provided by AlmaLinux.
If the severity is not provided or defined yet by AlmaLinux, the severity from the NVD is taken into account.
Using CVE-2023-0464 as an example, while it is rated as "High" in NVD, AlmaLinux has marked as ["moderate"][ALSA-2023:3722].
As a result, Trivy will display it as "Medium".
The table below is the mapping of AlmaLinux's severity to Trivy's severity levels.
| AlmaLinux | Trivy |
| :-------: | :------: |
| Low | Low |
| Moderate | Medium |
| Important | High |
| Critical | Critical |
### Status
Trivy supports the following [vulnerability statuses] for AlmaLinux.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | |
| Will Not Fix | |
| Fix Deferred | |
| End of Life | |
## License
Trivy identifies licenses by examining the metadata of RPM packages.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[errata]: https://errata.almalinux.org/
[ALSA-2023:3722]: https://errata.almalinux.org/9/ALSA-2023-3722.html
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,59 @@
# Alpine Linux
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The table below outlines the features offered by Trivy.
| Feature | Supported |
|:------------------------------------:|:---------:|
| Unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages that have been installed through `apk`.
## Vulnerability
Alpine Linux offers its own security advisories, and these are utilized when scanning Alpine for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
### Fixed Version
When looking at fixed versions, it's crucial to consider the patches supplied by Alpine.
For example, for CVE-2023-0464, the fixed version for Alpine Linux is listed as `3.1.0-r1` in [the secfixes][CVE-2023-0464].
Note that this is different from the upstream fixed version, which is `3.1.1`.
Typically, only the upstream information gets listed on [NVD], so it's important not to get confused.
### Severity
For Alpine vulnerabilities, the severity is determined using the values set by NVD.
### Status
Trivy supports the following [vulnerability statuses] for Alpine.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | |
| Will Not Fix | |
| Fix Deferred | |
| End of Life | |
## License
Trivy identifies licenses by examining the metadata of APK packages.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[secdb]: https://secdb.alpinelinux.org/
[CVE-2023-0464]: https://gitlab.alpinelinux.org/alpine/aports/-/blob/dad5b7380ab3be705951ce6fd2d7bba513d6a744/main/openssl/APKBUILD#L36-37
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,72 @@
# Amazon Linux
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The table below outlines the features offered by Trivy.
| Feature | Supported |
|:------------------------------------:|:---------:|
| Unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
## Vulnerability
Amazon Linux offers its own security advisories, and these are utilized when scanning Amazon Linux for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
### Fixed Version
When looking at fixed versions, it's crucial to consider the patches supplied by Amazon.
For example, for CVE-2023-0464, the fixed version for Amazon Linux 2023 is listed as `3.0.8-1.amzn2023.0.2` in [ALAS2023-2023-181].
Note that this is different from the upstream fixed version, which is `3.0.9`, `3.1.1`, and so on.
Typically, only the upstream information gets listed on [NVD], so it's important not to get confused.
### Severity
Trivy determines vulnerability severity based on the severity metric provided by Amazon.
For example, the security patch for [CVE-2023-0464] in Amazon Linux 2023 is provided as [ALAS2023-2023-181].
Its severity is rated as "Medium".
Thus, even though it's evaluated as "HIGH" in the NVD, Trivy displays it with a severity of "MEDIUM".
The table below is the mapping of Amazon's severity to Trivy's severity levels.
| Amazon | Trivy |
| :-------: | :------: |
| Low | Low |
| Medium | Medium |
| Important | High |
| Critical | Critical |
### Status
Trivy supports the following [vulnerability statuses] for Amazon Linux.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | |
| Will Not Fix | |
| Fix Deferred | |
| End of Life | |
## License
Trivy identifies licenses by examining the metadata of RPM packages.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[center]: https://alas.aws.amazon.com/
[CVE-2023-0464]: https://alas.aws.amazon.com/cve/html/CVE-2023-0464.html
[ALAS2023-2023-181]: https://alas.aws.amazon.com/AL2023/ALAS-2023-181.html
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,63 @@
# Bitnami Images
!!! warning "EXPERIMENTAL"
Scanning results may be inaccurate.
While it is not an OS, this page describes the details of the [container images provided by Bitnami](https://github.com/bitnami/containers).
Bitnami images are based on [Debian](debian.md).
Please see [the Debian page](debian.md) for OS packages.
Trivy supports the following scanners for Bitnami packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
The table below outlines the features offered by Trivy.
| Feature | Supported |
| :----------------------------------: | :-------: |
| Unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | - |
## SBOM
Trivy analyzes the SBOM information contained within the container images provided by Bitnami.
The SBOM files are located at `/opt/bitnami/<component>/.spdx-<component>.spdx`.
## Vulnerability
Since Bitnami has its [own vulnerability database][vulndb], it uses these for vulnerability detection of applications and packages distributed by Bitnami.
!!! note
Trivy does not support vulnerability detection of independently compiled binaries, so even if you scan container images like `nginx:1.15.2`, vulnerabilities in Nginx cannot be detected.
This is because main applications like Nginx are [not installed by the package manager](https://github.com/nginxinc/docker-nginx/blob/321a13a966eeff945196ddd31a629dad2aa85eda/mainline/debian/Dockerfile).
However, in the case of Bitnami images, since these SBOMs are stored within the image, scanning `bitnami/nginx:1.15.2` allows for the detection of vulnerabilities in Nginx.
### Fixed Version
Trivy refers to the [Bitnami database][vulndb]. Please note that these may differ from the upstream fixed versions.
### Severity
Similar to Fixed versions, it follows Bitnami's vulnerability database.
### Status
Trivy supports the following [vulnerability statuses] for Bitnami packages.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | |
| Will Not Fix | |
| Fix Deferred | |
| End of Life | |
## License
If licenses are included in the SBOM distributed by Bitnami, they will be used for scanning.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[vulndb]: https://github.com/bitnami/vulndb
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,66 @@
# CBL-Mariner
Trivy supports the following scanners for OS packages.
| Version | SBOM | Vulnerability | License |
| ---------------- | :---: | :-----------: | :-----: |
| 1.0 | ✔ | ✔ | ✔ |
| 1.0 (Distroless) | ✔ | ✔ | |
| 2.0 | ✔ | ✔ | ✔ |
| 2.0 (Distroless) | ✔ | ✔ | |
The following table provides an outline of the targets Trivy supports.
| Version | Container image | Virtual machine | Arch |
| ------- | :-------------: | :-------------: | :----------: |
| 1.0 | ✔ | ✔ | amd64, arm64 |
| 2.0 | ✔ | ✔ | amd64, arm64 |
The table below outlines the features offered by Trivy.
| Feature | Supported |
|:------------------------------------:|:---------:|
| Detect unfixed vulnerabilities | ✓ |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
## Vulnerability
CBL-Mariner offers its own security advisories, and these are utilized when scanning CBL-Mariner for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
### Fixed Version
Trivy takes fixed versions from [CBL-Mariner OVAL][oval].
### Severity
Trivy calculates the severity of an issue based on the severity provided in [CBL-Mariner OVAL][oval].
### Status
Trivy supports the following [vulnerability statuses] for CBL-Mariner.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | |
| Will Not Fix | |
| Fix Deferred | |
| End of Life | |
## License
Trivy identifies licenses by examining the metadata of RPM packages.
!!! note
License detection is not supported for CBL-Mariner Distroless.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[cbl-mariner]: https://github.com/microsoft/CBL-Mariner
[oval]: https://github.com/microsoft/CBL-MarinerVulnerabilityData/
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,38 @@
# CentOS
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The table below outlines the features offered by Trivy.
| Feature | Supported |
| :-----------------------------------: | :-------: |
| Unfixed vulnerabilities | ✓ |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Same as [RHEL](rhel.md#sbom).
## Vulnerability
CentOS does not provide straightforward machine-readable security advisories.
As a result, Trivy utilizes the security advisories from [Red Hat Enterprise Linux (RHEL)](rhel.md#vulnerability) for detecting vulnerabilities in CentOS.
This approach might lead to situations where, even though Trivy displays a fixed version, CentOS might not have the patch available yet.
Since patches released for RHEL often become available in CentOS after some time, it's usually just a matter of waiting.
!!! note
The case for CentOS Stream, which is not supported by Trivy, is entirely different from CentOS.
As Trivy relies on Red Hat's advisories, please refer to [Red Hat](rhel.md) for details regarding vulnerability severity and status.
## License
Same as [RHEL](rhel.md#license).
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies

View File

@@ -0,0 +1,32 @@
# Chainguard
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
The table below outlines the features offered by Trivy.
| Feature | Supported |
| :-----------------------------------: | :-------: |
| Detect unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Same as [Alpine Linux](alpine.md#sbom).
## Vulnerability
Chainguard offers its own security advisories, and these are utilized when scanning Chainguard for vulnerabilities.
Everything else is the same as [Alpine Linux](alpine.md#vulnerability).
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
## License
Same as [Alpine Linux](alpine.md#license).
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[secdb]: https://packages.cgr.dev/chainguard/security.json

View File

@@ -0,0 +1,74 @@
# Debian
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The table below outlines the features offered by Trivy.
| Feature | Supported |
| :-----------------------------------: | :-------: |
| Unfixed vulnerabilities | ✓ |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages that have been installed through package managers such as `apt` and `dpkg`.
While there are some exceptions, like Go binaries and JAR files, it's important to note that binaries that have been custom-built using `make` or tools installed via `curl` are generally not detected.
## Vulnerability
Debian offers its own security advisories, and these are utilized when scanning Debian for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
### Fixed Version
When looking at fixed versions, it's crucial to consider the patches supplied by Debian.
For example, for CVE-2023-3269, the fixed version for Debian 12 (bookworm) is listed as `6.1.37-1` in [the Security Tracker][CVE-2023-3269].
This patch is provided in [DSA-5448-1].
Note that this is different from the upstream fixed version, which is `6.5`.
Typically, only the upstream information gets listed on [NVD], so it's important not to get confused.
### Severity
Trivy calculates the severity of an issue based on the 'Urgency' metric found in the Security Tracker.
If 'Urgency' isn't provided by Debian, the severity from the NVD is taken into account.
Using CVE-2019-15052 as an example, while it is rated as "Critical" in NVD, Debian has marked its "Urgency" as ["Low"][CVE-2019-15052].
As a result, Trivy will display it as "Low".
### Status
Trivy supports the following [vulnerability statuses] for Debian.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | |
| Will Not Fix | |
| Fix Deferred | ✓ |
| End of Life | ✓ |
## License
To identify the license of a package, Trivy checks the copyright file located at `/usr/share/doc/*/copyright`.
However, this method has its limitations as the file isn't machine-readable, leading to situations where the license isn't detected.
In such scenarios, the `--license-full` flag can be passed.
It compares the contents of known licenses with the copyright file to discern the license in question.
Please be aware that using this flag can increase memory usage, so it's disabled by default for efficiency.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[debian-tracker]: https://security-tracker.debian.org/tracker/
[debian-oval]: https://www.debian.org/security/oval/
[CVE-2023-3269]: https://security-tracker.debian.org/tracker/CVE-2023-3269
[CVE-2019-15052]: https://security-tracker.debian.org/tracker/CVE-2019-15052
[DSA-5448-1]: https://security-tracker.debian.org/tracker/DSA-5448-1
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-3269
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,34 @@
# Google Distroless Images
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The table below outlines the features offered by Trivy.
| Feature | Supported |
| :----------------------------------: | :-------: |
| Unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages pre-installed in distroless images.
## Vulnerability
Google Distroless is based on [Debian]; see there for details.
## License
Google Distroless is based on [Debian]; see there for details.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[metadata]: https://packages.vmware.com/photon/photon_cve_metadata/
[vulnerability statuses]: ../../configuration/filtering.md#by-status
[Debian]: debian.md

View File

@@ -0,0 +1,45 @@
# OS
## Scanner
Trivy supports operating systems for
- [SBOM][sbom]
- [Vulnerabilities][vuln]
- [Licenses][license]
## Supported OS
| OS | Supported Versions | Package Managers |
|-----------------------------------------------|-------------------------------------|------------------|
| [Alpine Linux](alpine.md) | 2.2 - 2.7, 3.0 - 3.18, edge | apk |
| [Wolfi Linux](wolfi.md) | (n/a) | apk |
| [Chainguard](chainguard.md) | (n/a) | apk |
| [Red Hat Enterprise Linux](rhel.md) | 6, 7, 8 | dnf/yum/rpm |
| [CentOS](centos.md)[^1] | 6, 7, 8 | dnf/yum/rpm |
| [AlmaLinux](alma.md) | 8, 9 | dnf/yum/rpm |
| [Rocky Linux](rocky.md) | 8, 9 | dnf/yum/rpm |
| [Oracle Linux](oracle.md) | 5, 6, 7, 8 | dnf/yum/rpm |
| [CBL-Mariner](cbl-mariner.md) | 1.0, 2.0 | dnf/yum/rpm |
| [Amazon Linux](amazon.md) | 1, 2, 2023 | dnf/yum/rpm |
| [openSUSE Leap](suse.md) | 42, 15 | zypper/rpm |
| [SUSE Enterprise Linux](suse.md) | 11, 12, 15 | zypper/rpm |
| [Photon OS](photon.md) | 1.0, 2.0, 3.0, 4.0 | tndf/yum/rpm |
| [Debian GNU/Linux](debian.md) | 7, 8, 9, 10, 11, 12 | apt/dpkg |
| [Ubuntu](ubuntu.md) | All versions supported by Canonical | apt/dpkg |
## Supported container images
| Container image | Supported Versions | Package Managers |
|-----------------------------------------------|-------------------------------------|------------------|
| [Google Distroless](google-distroless.md)[^2] | Any | apt/dpkg |
| [Bitnami](bitnami.md) | Any | - |
Each page gives more details.
[^1]: CentOS Stream is not supported
[^2]: https://github.com/GoogleContainerTools/distroless
[sbom]: ../../supply-chain/sbom.md
[vuln]: ../../scanner/vulnerability.md
[license]: ../../scanner/license.md

View File

@@ -0,0 +1,70 @@
# Oracle Linux
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The table below outlines the features offered by Trivy.
| Feature | Supported |
| :-----------------------------------: | :-------: |
| Unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
## Vulnerability
Oracle Linux offers its own security advisories, and these are utilized when scanning Oracle Linux for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
### Fixed Version
Trivy takes fixed versions from [Oracle security advisories][alerts].
### Severity
Trivy determines vulnerability severity based on the severity metric provided in [Oracle security advisories][alerts].
For example, the security patch for [CVE-2023-0464][CVE-2023-0464] is provided as [ELSA-2023-2645][ELSA-2023-2645].
Its severity is rated as "MODERATE".
Thus, even though it's evaluated as "HIGH" in the NVD, Trivy displays it with a severity of "MEDIUM".
The table below is the mapping of Oracle's threat to Trivy's severity levels.
| Oracle | Trivy |
| :-------: | :------: |
| Low | Low |
| Moderate | Medium |
| Important | High |
| Critical | Critical |
### Status
Trivy supports the following [vulnerability statuses] for Oracle Linux.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | |
| Will Not Fix | |
| Fix Deferred | |
| End of Life | |
## License
Trivy identifies licenses by examining the metadata of RPM packages.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[oval]: https://linux.oracle.com/security/oval/
[alerts]: https://www.oracle.com/security-alerts/
[CVE-2023-0464]: https://linux.oracle.com/cve/CVE-2023-0464.html
[ELSA-2023-2645]: https://linux.oracle.com/errata/ELSA-2023-2645.html
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,54 @@
# Photon OS
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The table below outlines the features offered by Trivy.
| Feature | Supported |
|:------------------------------------:|:---------:|
| Unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages that have been installed through package managers such as `tdnf` and `yum`.
## Vulnerability
Photon OS offers its own security advisories, and these are utilized when scanning Photon OS for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
### Fixed Version
Trivy takes fixed versions from [Photon CVE metadata][metadata].
### Severity
Trivy determines the severity of vulnerabilities based on the CVSSv3 score provided by Photon OS.
See [here](../../scanner/vulnerability.md#severity-selection) for the conversion table from CVSS score to severity.
### Status
Trivy supports the following [vulnerability statuses] for Photon OS.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | |
| Will Not Fix | |
| Fix Deferred | |
| End of Life | |
## License
Trivy identifies licenses by examining the metadata of RPM packages.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[metadata]: https://packages.vmware.com/photon/photon_cve_metadata/
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,84 @@
# Red Hat Enterprise Linux
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The table below outlines the features offered by Trivy.
| Feature | Supported |
| :----------------------------------: | :-------: |
| Unfixed vulnerabilities | ✓ |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
## Vulnerability
Red Hat offers its own security advisories, and these are utilized when scanning Red Hat Enterprise Linux (RHEL) for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
### Fixed Version
When looking at fixed versions, it's crucial to consider the patches supplied by Red Hat.
For example, for CVE-2023-0464, the fixed version for RHEL 9 is listed as `3.0.7-16.el9_2` in [their advisory][CVE-2023-0464].
This patch is provided in [RHSA-2023:3722].
Note that this is different from the upstream fixed version, which is `3.0.9`, `3.1.1`, and so on.
Typically, only the upstream information gets listed on [NVD], so it's important not to get confused.
### Severity
Trivy calculates the severity of a vulnerability based on the 'Impact' metric provided by Red Hat.
If the impact is not provided or defined yet by Red Hat, the severity from the NVD is taken into account.
Using CVE-2023-0464 as an example, while it is rated as "HIGH" in NVD, Red Hat has marked its 'Impact' as ["Low"][CVE-2023-0464].
As a result, Trivy will display it as "Low".
The table below is the mapping of Red Hat's impact to Trivy's severity levels.
| Red Hat | Trivy |
| :-------: | :------: |
| Low | Low |
| Moderate | Medium |
| Important | High |
| Critical | Critical |
### Status
Trivy supports the following [vulnerability statuses] for RHEL.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | ✓ |
| Will Not Fix | ✓ |
| Fix Deferred | ✓ |
| End of Life | ✓ |
When a vulnerability status is listed as "End of Life", it means a vulnerability with the impact level assigned to this CVE is no longer covered by its current support lifecycle phase.
The product has been identified to contain the impacted component, but analysis to determine whether it is affected or not by this vulnerability was not performed.
Red Hat advises that the product should be assumed to be affected.
Therefore, Trivy detects vulnerabilities with this status as "End of Life".
On the other hand, for those marked "Under Investigation," the impact is unclear as they are still being examined, so Trivy does not detect them. Once the investigation is completed, the status should be updated.
!!! abstract
Vulnerabilities with a status of "End of Life", where the presence or absence of impact is unclear, are detected by Trivy. However, those with a status of "Under Investigation" are not detected.
## License
Trivy identifies licenses by examining the metadata of RPM packages.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[oval]: https://www.redhat.com/security/data/oval/v2/
[api]: https://www.redhat.com/security/data/metrics/
[CVE-2023-0464]: https://access.redhat.com/security/cve/cve-2023-0464
[RHSA-2023:3722]: https://access.redhat.com/errata/RHSA-2023:3722
[NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-0464
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,70 @@
# Rocky Linux
Trivy supports the following scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The table below outlines the features offered by Trivy.
| Feature | Supported |
|:------------------------------------:|:---------:|
| Unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
## Vulnerability
Rocky Linux offers its own security advisories, and these are utilized when scanning Rocky Linux for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
### Fixed Version
Trivy takes fixed versions from [Rocky Linux Errata][errata], not NVD or somewhere else.
See [here](../../scanner/vulnerability.md#data-source-selection) for more details.
!!! architectures
There are cases when the vulnerability affects packages of not all architectures.
For example, vulnerable packages for [CVE-2023-0361](https://errata.rockylinux.org/RLSA-2023:1141) are only `aarch64` packages.
Trivy only detects vulnerabilities for packages of your architecture.
### Severity
Trivy calculates the severity of an issue based on the severity provided in [Rocky Linux Errata][errata].
The table below is the mapping of Rocky Linux's severity to Trivy's severity levels.
| Rocky Linux | Trivy |
| :---------: | :------: |
| Low | Low |
| Moderate | Medium |
| Important | High |
| Critical | Critical |
### Status
Trivy supports the following [vulnerability statuses] for Rocky Linux.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | |
| Will Not Fix | |
| Fix Deferred | |
| End of Life | |
## License
Trivy identifies licenses by examining the metadata of RPM packages.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[updateinfo]: https://download.rockylinux.org/pub/rocky/
[errata]: https://errata.rockylinux.org/
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,40 @@
# SUSE
Trivy supports the following distributions:
- openSUSE Leap
- SUSE Enterprise Linux (SLE)
Please see [here](index.md#supported-os) for supported versions.
Trivy supports these scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
The table below outlines the features offered by Trivy.
| Feature | Supported |
|:------------------------------------:|:---------:|
| Unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Trivy detects packages that have been installed through package managers such as `dnf` and `yum`.
## Vulnerability
SUSE offers its [own security advisories][cvrf], and these are utilized when scanning openSUSE/SLE for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
## License
Trivy identifies licenses by examining the metadata of RPM packages.
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[cvrf]: http://ftp.suse.com/pub/projects/security/cvrf/
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,65 @@
# Ubuntu
Trivy supports these scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
Please see [here](index.md#supported-os) for supported versions.
The following table provides an outline of the features Trivy offers.
| Feature | Supported |
|:------------------------------------:|:---------:|
| Detect unfixed vulnerabilities | ✓ |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Same as [Debian](debian.md#sbom).
## Vulnerability
Ubuntu offers its own security advisories, and these are utilized when scanning Ubuntu for vulnerabilities.
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
### Fixed Version
When looking at fixed versions, it's crucial to consider the patches supplied by Ubuntu.
As an illustration, for CVE-2023-3269, the fixed version for Ubuntu 23.04 (lunar) is listed as `6.2.0-26.26` in [the Security Tracker][CVE-2023-3269].
It's essential to recognize that this differs from the upstream fixed version, which stands at `6.5`.
Typically, only the upstream information gets listed on [NVD][CVE-2023-3269 NVD], so it's important not to get confused.
### Severity
Trivy calculates the severity of an issue based on the 'Priority' metric found in the Security Tracker.
If 'Priority' isn't provided by Ubuntu, the severity from the NVD is taken into account.
Using CVE-2019-15052 as an example, while it is rated as ["Critical" in NVD][CVE-2019-15052 NVD], Ubuntu has marked its "Priority" as ["Medium"][CVE-2019-15052].
As a result, Trivy will display it as "Medium".
### Status
Trivy supports the following [vulnerability statuses] for Ubuntu.
| Status | Supported |
| :-----------------: | :-------: |
| Fixed | ✓ |
| Affected | ✓ |
| Under Investigation | |
| Will Not Fix | |
| Fix Deferred | |
| End of Life | |
## License
Same as [Debian](debian.md#license).
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[Ubuntu CVE Tracker]: https://ubuntu.com/security/cve
[CVE-2023-3269]: https://ubuntu.com/security/CVE-2023-3269
[CVE-2019-15052]: https://ubuntu.com/security/CVE-2019-15052
[CVE-2023-3269 NVD]: https://nvd.nist.gov/vuln/detail/CVE-2023-3269
[CVE-2019-15052 NVD]: https://nvd.nist.gov/vuln/detail/CVE-2019-15052
[vulnerability statuses]: ../../configuration/filtering.md#by-status

View File

@@ -0,0 +1,31 @@
# Wolfi Linux
Trivy supports these scanners for OS packages.
| Scanner | Supported |
| :-----------: | :-------: |
| SBOM | ✓ |
| Vulnerability | ✓ |
| License | ✓ |
The table below outlines the features offered by Trivy.
| Feature | Supported |
|:------------------------------------:|:---------:|
| Detect unfixed vulnerabilities | - |
| [Dependency graph][dependency-graph] | ✓ |
## SBOM
Same as [Alpine Linux](alpine.md#sbom).
## Vulnerability
Wolfi Linux offers its own security advisories, and these are utilized when scanning Wolfi for vulnerabilities.
Everything else is the same as [Alpine Linux](alpine.md#vulnerability).
### Data Source
See [here](../../scanner/vulnerability.md#data-sources).
## License
Same as [Alpine Linux](alpine.md#license).
[dependency-graph]: ../../configuration/reporting.md#show-origins-of-vulnerable-dependencies
[secdb]: https://packages.wolfi.dev/os/security.json

View File

@@ -51,7 +51,7 @@ trivy [global flags] command [flags] target
* [trivy kubernetes](trivy_kubernetes.md) - [EXPERIMENTAL] Scan kubernetes cluster
* [trivy module](trivy_module.md) - Manage modules
* [trivy plugin](trivy_plugin.md) - Manage plugins
* [trivy repository](trivy_repository.md) - Scan a remote repository
* [trivy repository](trivy_repository.md) - Scan a repository
* [trivy rootfs](trivy_rootfs.md) - Scan rootfs
* [trivy sbom](trivy_sbom.md) - Scan SBOM for vulnerabilities
* [trivy server](trivy_server.md) - Server mode

View File

@@ -65,37 +65,40 @@ trivy aws [flags]
### Options
```
--account string The AWS account to scan. It's useful to specify this when reviewing cached results for multiple accounts.
--arn string The AWS ARN to show results for. Useful to filter results once a scan is cached.
--compliance string compliance report to generate (aws-cis-1.2, aws-cis-1.4)
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify paths to the Rego policy files directory, applying config files
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--endpoint string AWS Endpoint override
--exit-code int specify exit code when any security issues are found
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for aws
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-non-failures include successes and exceptions, available with '--scanners config'
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--max-cache-age duration The maximum age of the cloud cache. Cached data will be requeried from the cloud provider if it is older than this. (default 24h0m0s)
-o, --output string output file name
--policy-namespaces strings Rego namespaces
--region string AWS Region to scan
--report string specify a report format for the output. (all,summary) (default "all")
--reset-policy-bundle remove policy bundle
--service strings Only scan AWS Service(s) specified with this flag. Can specify multiple services using --service A --service B etc.
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
--skip-policy-update skip fetching rego policy updates
-t, --template string output template
--tf-vars strings specify paths to override the Terraform tfvars files
--trace enable more verbose trace output for custom queries
--update-cache Update the cache for the applicable cloud provider instead of using cached results.
--account string The AWS account to scan. It's useful to specify this when reviewing cached results for multiple accounts.
--arn string The AWS ARN to show results for. Useful to filter results once a scan is cached.
--compliance string compliance report to generate (aws-cis-1.2,aws-cis-1.4)
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--endpoint string AWS Endpoint override
--exit-code int specify exit code when any security issues are found
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for aws
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-non-failures include successes and exceptions, available with '--scanners config'
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--max-cache-age duration The maximum age of the cloud cache. Cached data will be requeried from the cloud provider if it is older than this. (default 24h0m0s)
-o, --output string output file name
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
--policy-namespaces strings Rego namespaces
--region string AWS Region to scan
--report string specify a report format for the output (all,summary) (default "all")
--reset-policy-bundle remove policy bundle
--service strings Only scan AWS Service(s) specified with this flag. Can specify multiple services using --service A --service B etc.
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
--skip-policy-update skip fetching rego policy updates
--skip-service strings Skip selected AWS Service(s) specified with this flag. Can specify multiple services using --skip-service A --skip-service B etc.
-t, --template string output template
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
--tf-vars strings specify paths to override the Terraform tfvars files
--trace enable more verbose trace output for custom queries
--update-cache Update the cache for the applicable cloud provider instead of using cached results.
```
### Options inherited from parent commands

View File

@@ -9,43 +9,45 @@ trivy config [flags] DIR
### Options
```
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--compliance string compliance report to generate
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify paths to the Rego policy files directory, applying config files
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--file-patterns strings specify config file patterns
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for config
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-non-failures include successes and exceptions, available with '--scanners config'
--k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
-o, --output string output file name
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--report string specify a compliance report format for the output. (all,summary) (default "all")
--reset-policy-bundle remove policy bundle
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
--skip-dirs strings specify the directories where the traversal is skipped
--skip-files strings specify the file paths to skip traversal
--skip-policy-update skip fetching rego policy updates
-t, --template string output template
--tf-vars strings specify paths to override the Terraform tfvars files
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--compliance string compliance report to generate
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--file-patterns strings specify config file patterns
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for config
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-non-failures include successes and exceptions, available with '--scanners config'
--k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
-o, --output string output file name
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--report string specify a compliance report format for the output (all,summary) (default "all")
--reset-policy-bundle remove policy bundle
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
--skip-dirs strings specify the directories or glob patterns to skip
--skip-files strings specify the files or glob patterns to skip
--skip-policy-update skip fetching rego policy updates
-t, --template string output template
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
--tf-vars strings specify paths to override the Terraform tfvars files
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
```
### Options inherited from parent commands

View File

@@ -22,14 +22,14 @@ trivy convert [flags] RESULT_JSON
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--exit-code int specify exit code when any security issues are found
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
-h, --help help for convert
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignorefile string specify .trivyignore file (default ".trivyignore")
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
-o, --output string output file name
--report string specify a report format for the output. (all,summary) (default "all")
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
--report string specify a report format for the output (all,summary) (default "all")
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
-t, --template string output template
```

View File

@@ -19,68 +19,72 @@ trivy filesystem [flags] PATH
### Options
```
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--compliance string compliance report to generate
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify paths to the Rego policy files directory, applying config files
--custom-headers strings custom headers in client mode
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--file-patterns strings specify config file patterns
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for filesystem
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-unfixed display only fixed vulnerabilities
--ignored-licenses strings specify a list of license to ignore
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-non-failures include successes and exceptions, available with '--scanners config'
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--license-confidence-level float specify license classifier's confidence level (default 0.9)
--license-full eagerly look for licenses in source code headers and license files
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--report string specify a compliance report format for the output. (all,summary) (default "all")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
--server string server address in client mode
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories where the traversal is skipped
--skip-files strings specify the file paths to skip traversal
--skip-java-db-update skip updating Java index database
--skip-policy-update skip fetching rego policy updates
--slow scan over time with lower CPU and memory utilization
-t, --template string output template
--tf-vars strings specify paths to override the Terraform tfvars files
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--compliance string compliance report to generate
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
--custom-headers strings custom headers in client mode
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--file-patterns strings specify config file patterns
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for filesystem
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
--ignore-unfixed display only fixed vulnerabilities
--ignored-licenses strings specify a list of license to ignore
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-dev-deps include development dependencies in the report (supported: npm, yarn)
--include-non-failures include successes and exceptions, available with '--scanners config'
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--license-confidence-level float specify license classifier's confidence level (default 0.9)
--license-full eagerly look for licenses in source code headers and license files
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--report string specify a compliance report format for the output (all,summary) (default "all")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
--server string server address in client mode
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories or glob patterns to skip
--skip-files strings specify the files or glob patterns to skip
--skip-java-db-update skip updating Java index database
--skip-policy-update skip fetching rego policy updates
--slow scan over time with lower CPU and memory utilization
-t, --template string output template
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
--tf-vars strings specify paths to override the Terraform tfvars files
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
```
### Options inherited from parent commands

View File

@@ -34,75 +34,78 @@ trivy image [flags] IMAGE_NAME
### Options
```
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--compliance string compliance report to generate (docker-cis)
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify paths to the Rego policy files directory, applying config files
--custom-headers strings custom headers in client mode
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--docker-host string unix domain socket path to use for docker scanning
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
--file-patterns strings specify config file patterns
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for image
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-unfixed display only fixed vulnerabilities
--ignored-licenses strings specify a list of license to ignore
--ignorefile string specify .trivyignore file (default ".trivyignore")
--image-config-scanners string comma-separated list of what security issues to detect on container image configurations (config,secret)
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
--include-non-failures include successes and exceptions, available with '--scanners config'
--input string input file path instead of image name
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--license-confidence-level float specify license classifier's confidence level (default 0.9)
--license-full eagerly look for licenses in source code headers and license files
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--platform string set platform in the form os/arch if image is multi-platform capable
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--removed-pkgs detect vulnerabilities of removed packages (only for Alpine)
--report string specify a format for the compliance report. (default "summary")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
--server string server address in client mode
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories where the traversal is skipped
--skip-files strings specify the file paths to skip traversal
--skip-java-db-update skip updating Java index database
--skip-policy-update skip fetching rego policy updates
--slow scan over time with lower CPU and memory utilization
-t, --template string output template
--tf-vars strings specify paths to override the Terraform tfvars files
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--compliance string compliance report to generate (docker-cis)
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
--custom-headers strings custom headers in client mode
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--docker-host string unix domain socket path to use for docker scanning
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
--file-patterns strings specify config file patterns
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for image
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
--ignore-unfixed display only fixed vulnerabilities
--ignored-licenses strings specify a list of license to ignore
--ignorefile string specify .trivyignore file (default ".trivyignore")
--image-config-scanners strings comma-separated list of what security issues to detect on container image configurations (config,secret)
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
--include-non-failures include successes and exceptions, available with '--scanners config'
--input string input file path instead of image name
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--license-confidence-level float specify license classifier's confidence level (default 0.9)
--license-full eagerly look for licenses in source code headers and license files
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--platform string set platform in the form os/arch if image is multi-platform capable
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--removed-pkgs detect vulnerabilities of removed packages (only for Alpine)
--report string specify a format for the compliance report. (all,summary) (default "summary")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
--server string server address in client mode
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories or glob patterns to skip
--skip-files strings specify the files or glob patterns to skip
--skip-java-db-update skip updating Java index database
--skip-policy-update skip fetching rego policy updates
--slow scan over time with lower CPU and memory utilization
-t, --template string output template
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
--tf-vars strings specify paths to override the Terraform tfvars files
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
```
### Options inherited from parent commands

View File

@@ -31,25 +31,27 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--compliance string compliance report to generate (k8s-nsa,k8s-cis, k8s-pss-baseline, k8s-pss-restricted)
--components strings specify which components to scan (default [workload,infra])
--compliance string compliance report to generate (k8s-nsa,k8s-cis,k8s-pss-baseline,k8s-pss-restricted)
--components strings specify which components to scan (workload,infra) (default [workload,infra])
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify paths to the Rego policy files directory, applying config files
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
--context string specify a context to scan
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--exclude-nodes strings indicate the node labels that the node-collector job should exclude from scanning (example: kubernetes.io/arch:arm64,team:dev)
--exclude-owned exclude resources that have an owner reference
--exit-code int specify exit code when any security issues are found
--file-patterns strings specify config file patterns
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
-f, --format string format (table,json,cyclonedx) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for kubernetes
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
--ignore-unfixed display only fixed vulnerabilities
--ignorefile string specify .trivyignore file (default ".trivyignore")
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
@@ -64,29 +66,34 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
--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-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--report string specify a report format for the output. (all,summary) (default "all")
--report string specify a report format for the output (all,summary) (default "all")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners string comma-separated list of what security issues to detect (vuln,config,secret,license) (default "vuln,config,secret,rbac")
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories where the traversal is skipped
--skip-files strings specify the file paths to skip traversal
--skip-dirs strings specify the directories or glob patterns to skip
--skip-files strings specify the files or glob patterns to skip
--skip-java-db-update skip updating Java index database
--skip-policy-update skip fetching rego policy updates
--slow scan over time with lower CPU and memory utilization
-t, --template string output template
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
--tf-vars strings specify paths to override the Terraform tfvars files
--tolerations strings specify node-collector job tolerations (example: key1=value1:NoExecute,key2=value2:NoSchedule)
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
```

View File

@@ -1,9 +1,9 @@
## trivy repository
Scan a remote repository
Scan a repository
```
trivy repository [flags] REPO_URL
trivy repository [flags] (REPO_PATH | REPO_URL)
```
### Examples
@@ -11,74 +11,80 @@ trivy repository [flags] REPO_URL
```
# Scan your remote git repository
$ trivy repo https://github.com/knqyf263/trivy-ci-test
# Scan your local git repository
$ trivy repo /path/to/your/repository
```
### Options
```
--branch string pass the branch name to be scanned
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--commit string pass the commit hash to be scanned
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify paths to the Rego policy files directory, applying config files
--custom-headers strings custom headers in client mode
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--file-patterns strings specify config file patterns
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for repository
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-unfixed display only fixed vulnerabilities
--ignored-licenses strings specify a list of license to ignore
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-non-failures include successes and exceptions, available with '--scanners config'
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--license-confidence-level float specify license classifier's confidence level (default 0.9)
--license-full eagerly look for licenses in source code headers and license files
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
--server string server address in client mode
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories where the traversal is skipped
--skip-files strings specify the file paths to skip traversal
--skip-java-db-update skip updating Java index database
--skip-policy-update skip fetching rego policy updates
--slow scan over time with lower CPU and memory utilization
--tag string pass the tag name to be scanned
-t, --template string output template
--tf-vars strings specify paths to override the Terraform tfvars files
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
--branch string pass the branch name to be scanned
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--commit string pass the commit hash to be scanned
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
--custom-headers strings custom headers in client mode
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--file-patterns strings specify config file patterns
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for repository
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
--ignore-unfixed display only fixed vulnerabilities
--ignored-licenses strings specify a list of license to ignore
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-dev-deps include development dependencies in the report (supported: npm, yarn)
--include-non-failures include successes and exceptions, available with '--scanners config'
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--license-confidence-level float specify license classifier's confidence level (default 0.9)
--license-full eagerly look for licenses in source code headers and license files
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
--server string server address in client mode
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories or glob patterns to skip
--skip-files strings specify the files or glob patterns to skip
--skip-java-db-update skip updating Java index database
--skip-policy-update skip fetching rego policy updates
--slow scan over time with lower CPU and memory utilization
--tag string pass the tag name to be scanned
-t, --template string output template
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
--tf-vars strings specify paths to override the Terraform tfvars files
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
```
### Options inherited from parent commands

View File

@@ -22,67 +22,70 @@ trivy rootfs [flags] ROOTDIR
### Options
```
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify paths to the Rego policy files directory, applying config files
--custom-headers strings custom headers in client mode
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
--file-patterns strings specify config file patterns
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for rootfs
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-unfixed display only fixed vulnerabilities
--ignored-licenses strings specify a list of license to ignore
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-non-failures include successes and exceptions, available with '--scanners config'
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--license-confidence-level float specify license classifier's confidence level (default 0.9)
--license-full eagerly look for licenses in source code headers and license files
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
--server string server address in client mode
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories where the traversal is skipped
--skip-files strings specify the file paths to skip traversal
--skip-java-db-update skip updating Java index database
--skip-policy-update skip fetching rego policy updates
--slow scan over time with lower CPU and memory utilization
-t, --template string output template
--tf-vars strings specify paths to override the Terraform tfvars files
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify the paths to the Rego policy files or to the directories containing them, applying config files
--custom-headers strings custom headers in client mode
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
--file-patterns strings specify config file patterns
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for rootfs
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
--ignore-unfixed display only fixed vulnerabilities
--ignored-licenses strings specify a list of license to ignore
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-non-failures include successes and exceptions, available with '--scanners config'
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--license-confidence-level float specify license classifier's confidence level (default 0.9)
--license-full eagerly look for licenses in source code headers and license files
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
--server string server address in client mode
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories or glob patterns to skip
--skip-files strings specify the files or glob patterns to skip
--skip-java-db-update skip updating Java index database
--skip-policy-update skip fetching rego policy updates
--slow scan over time with lower CPU and memory utilization
-t, --template string output template
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
--tf-vars strings specify paths to override the Terraform tfvars files
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
```
### Options inherited from parent commands

View File

@@ -31,9 +31,10 @@ trivy sbom [flags] SBOM_PATH
--exit-code int specify exit code when any security issues are found
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
--file-patterns strings specify config file patterns
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
-h, --help help for sbom
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
--ignore-unfixed display only fixed vulnerabilities
--ignorefile string specify .trivyignore file (default ".trivyignore")
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
@@ -48,12 +49,11 @@ 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")
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories where the traversal is skipped
--skip-files strings specify the file paths to skip traversal
--skip-dirs strings specify the directories or glob patterns to skip
--skip-files strings specify the files or glob patterns to skip
--skip-java-db-update skip updating Java index database
--slow scan over time with lower CPU and memory utilization
-t, --template string output template

View File

@@ -20,30 +20,27 @@ trivy server [flags]
### Options
```
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
-h, --help help for server
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--listen string listen address in server mode (default "localhost:4954")
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--reset remove all caches and database
--skip-db-update skip updating vulnerability database
--skip-java-db-update skip updating Java index database
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--username strings username. Comma-separated usernames allowed.
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--download-db-only download/update vulnerability database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
-h, --help help for server
--listen string listen address in server mode (default "localhost:4954")
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--reset remove all caches and database
--skip-db-update skip updating vulnerability database
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--username strings username. Comma-separated usernames allowed.
```
### Options inherited from parent commands

View File

@@ -20,58 +20,61 @@ trivy vm [flags] VM_IMAGE
### Options
```
--aws-region string AWS region to scan
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--compliance string compliance report to generate
--custom-headers strings custom headers in client mode
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
--file-patterns strings specify config file patterns
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for vm
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-unfixed display only fixed vulnerabilities
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-non-failures include successes and exceptions, available with '--scanners config'
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
--server string server address in client mode
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories where the traversal is skipped
--skip-files strings specify the file paths to skip traversal
--skip-java-db-update skip updating Java index database
--slow scan over time with lower CPU and memory utilization
-t, --template string output template
--tf-vars strings specify paths to override the Terraform tfvars files
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
--aws-region string AWS region to scan
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--compliance string compliance report to generate
--custom-headers strings custom headers in client mode
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--enable-modules strings [EXPERIMENTAL] module names to enable
--exit-code int specify exit code when any security issues are found
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
--file-patterns strings specify config file patterns
-f, --format string format (table,json,template,sarif,cyclonedx,spdx,spdx-json,github,cosign-vuln) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for vm
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-status strings comma-separated list of vulnerability status to ignore (unknown,not_affected,affected,fixed,under_investigation,will_not_fix,fix_deferred,end_of_life)
--ignore-unfixed display only fixed vulnerabilities
--ignorefile string specify .trivyignore file (default ".trivyignore")
--include-non-failures include successes and exceptions, available with '--scanners config'
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
--no-progress suppress progress bar
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--policy-bundle-repository string OCI registry URL to retrieve policy bundle from (default "ghcr.io/aquasecurity/defsec:0")
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners strings comma-separated list of what security issues to detect (vuln,config,secret,license) (default [vuln,secret])
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
--server string server address in client mode
-s, --severity strings severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories or glob patterns to skip
--skip-files strings specify the files or glob patterns to skip
--skip-java-db-update skip updating Java index database
--slow scan over time with lower CPU and memory utilization
-t, --template string output template
--tf-exclude-downloaded-modules remove results for downloaded modules in .terraform folder
--tf-vars strings specify paths to override the Terraform tfvars files
--token string for authentication in client/server mode
--token-header string specify a header name for token in client/server mode (default "Trivy-Token")
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
```
### Options inherited from parent commands

View File

@@ -243,6 +243,7 @@ rego
policy:
- policy/repository
- policy/custom
- policy/some-policy.rego
# Same as '--config-data'
# Default is empty
@@ -291,6 +292,11 @@ misconfiguration:
vars:
- dev-terraform.tfvars
- common-terraform.tfvars
# Same as '--tf-exclude-downloaded-modules'
# Default is false
terraform:
exclude-downloaded-modules: false
```
## Kubernetes Options

View File

@@ -288,6 +288,48 @@ $ trivy server --listen localhost:8080 --token dummy
$ trivy image --server http://localhost:8080 --token dummy alpine:3.10
```
## Endpoints
### Health
Checks whether the Trivy server is running. Authentication is not required.
Example request:
```bash
curl -s 0.0.0.0:8080/healthz
ok
```
Returns the `200 OK` status if the request was successful.
### Version
Returns the version of the Trivy and all components (db, policy). Authentication is not required.
Example request:
```bash
curl -s 0.0.0.0:8080/version | jq
{
"Version": "dev",
"VulnerabilityDB": {
"Version": 2,
"NextUpdate": "2023-07-25T14:15:29.876639806Z",
"UpdatedAt": "2023-07-25T08:15:29.876640206Z",
"DownloadedAt": "2023-07-25T09:36:25.599004Z"
},
"JavaDB": {
"Version": 1,
"NextUpdate": "2023-07-28T01:03:52.169192565Z",
"UpdatedAt": "2023-07-25T01:03:52.169192765Z",
"DownloadedAt": "2023-07-25T09:37:48.906152Z"
},
"PolicyBundle": {
"Digest": "sha256:829832357626da2677955e3b427191212978ba20012b6eaa03229ca28569ae43",
"DownloadedAt": "2023-07-23T11:40:33.122462Z"
}
}
```
Returns the `200 OK` status if the request was successful.
## Architecture
![architecture](../../../imgs/client-server.png)

View File

@@ -17,6 +17,8 @@ License are classified using the [Google License Classification][google-license-
As those licenses may be in violation, it is recommended to check those unknown licenses as well.
By default, Trivy scans licenses for packages installed by `apk`, `apt-get`, `dnf`, `npm`, `pip`, `gem`, etc.
Check out [the coverage document][coverage] for details.
To enable extended license scanning, you can use `--license-full`.
In addition to package licenses, Trivy scans source code files, Markdown documents, text files and `LICENSE` documents to identify license usage within the image or filesystem.
@@ -29,14 +31,14 @@ To configure the confidence level, you can use `--license-confidence-level`. Thi
Currently, the standard license scanning doesn't support filesystem and repository scanning.
| License scanning | Image | Rootfs | Filesystem | Repository |
|:---------------------:|:-----:|:------:|:----------:|:----------:|
| :-------------------: | :---: | :----: | :--------: | :--------: |
| Standard | ✅ | ✅ | - | - |
| Full (--license-full) | ✅ | ✅ | ✅ | ✅ |
License checking classifies the identified licenses and map the classification to severity.
| Classification | Severity |
|----------------|----------|
| -------------- | -------- |
| Forbidden | CRITICAL |
| Restricted | HIGH |
| Reciprocal | MEDIUM |
@@ -143,7 +145,7 @@ Trivy has number of configuration flags for use with license scanning;
Trivy license scanning can ignore licenses that are identified to explicitly remove them from the results using the `--ignored-licenses` flag;
```shell
$ trivy image --scanners license --ignored-licenses MPL-2.0,MIT --severity LOW grafana/grafana:latest
$ trivy image --scanners license --ignored-licenses MPL-2.0,MIT --severity HIGH grafana/grafana:latest
2022-07-13T18:15:28.605Z INFO License scanning is enabled
OS Packages (license)
@@ -343,4 +345,5 @@ license:
```
[coverage]: ../coverage/index.md
[google-license-classification]: https://opensource.google/documentation/reference/thirdparty/licenses

View File

@@ -3,7 +3,7 @@
Custom policies may require additional data in order to determine an answer.
For example, an allowed list of resources that can be created.
Instead of hardcoding this information inside of your policy, Trivy allows passing paths to data files with the `--data` flag.
Instead of hardcoding this information inside your policy, Trivy allows passing paths to data files with the `--data` flag.
Given the following yaml file:

View File

@@ -2,10 +2,10 @@
## Overview
You can write custom policies in [Rego][rego].
Once you finish writing custom policies, you can pass the directory where those policies are stored with `--policy` option.
Once you finish writing custom policies, you can pass the policy files or the directory where those policies are stored with `--policy` option.
``` bash
trivy conf --policy /path/to/custom_policies --namespaces user /path/to/config_dir
trivy conf --policy /path/to/policy.rego --policy /path/to/custom_policies --namespaces user /path/to/config_dir
```
As for `--namespaces` option, the detail is described as below.
@@ -14,7 +14,7 @@ As for `--namespaces` option, the detail is described as below.
If a file name matches the following file patterns, Trivy will parse the file and pass it as input to your Rego policy.
| File format | File pattern |
|---------------|-----------------------------------------------------------|
| ------------- | --------------------------------------------------------- |
| JSON | `*.json` |
| YAML | `*.yaml` and `*.yml` |
| Dockerfile | `Dockerfile`, `Dockerfile.*`, and `*.Dockerfile` |
@@ -125,14 +125,14 @@ schema that will be used is based on the input document type. It is recommended
correct and do not reference incorrect properties/values.
| Field name | Allowed values | Default value | In table | In JSON |
|----------------------------|-------------------------------------------------------------------|:----------------------------:|:----------------:|:----------------:|
| -------------------------- | ----------------------------------------------------------------- | :--------------------------: | :--------------: | :--------------: |
| title | Any characters | N/A | :material-check: | :material-check: |
| description | Any characters | | :material-close: | :material-check: |
| schemas.input | `schema["kubernetes"]`, `schema["dockerfile"]`, `schema["cloud"]` | (applied to all input types) | :material-close: | :material-close: |
| custom.id | Any characters | N/A | :material-check: | :material-check: |
| custom.severity | `LOW`, `MEDIUM`, `HIGH`, `CRITICAL` | UNKNOWN | :material-check: | :material-check: |
| custom.recommended_actions | Any characters | | :material-close: | :material-check: |
| custom.input.selector.type | Any item(s) in [this list][source-types] | | :material-close: | :material-check: |
| custom.recommended_actions | Any characters | | :material-close: | :material-check: |
| custom.input.selector.type | Any item(s) in [this list][source-types] | | :material-close: | :material-check: |
| url | Any characters | | :material-close: | :material-check: |
@@ -178,6 +178,7 @@ You can specify input format via the `custom.input` annotation.
Even if a Dockerfile exists in the specified directory, it will not be passed to the policy as input.
Possible values for input types are:
- `dockerfile` (Dockerfile)
- `kubernetes` (Kubernetes YAML/JSON)
- `rbac` (Kubernetes RBAC YAML/JSON)

Some files were not shown because too many files have changed in this diff Show More