Compare commits

...

1887 Commits

Author SHA1 Message Date
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
dependabot[bot]
854b63940a chore(deps): bump github.com/sigstore/rekor from 1.2.0 to 1.2.1 (#4533) 2023-06-02 09:36:08 +03:00
dependabot[bot]
59e1a86643 chore(deps): bump alpine from 3.17.3 to 3.18.0 (#4525) 2023-06-02 09:34:44 +03:00
Teppei Fukuda
9ef01133c8 feat: add SBOM analyzer (#4210)
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2023-06-02 09:34:07 +03:00
DmitriyLewen
dadd1e10c2 fix(sbom): update logic for work with files in spdx format (#4513)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2023-06-01 12:52:56 +03:00
chenk
1a658210a4 feat: azure workload identity support (#4489)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-06-01 10:16:23 +03:00
DmitriyLewen
411862c908 feat(ubuntu): add eol date for 18.04 ESM (#4524) 2023-06-01 09:48:33 +03:00
simar7
62a1aaf031 fix(misconf): Update required extensions for terraformplan (#4523)
Signed-off-by: Simar <simar@linux.com>
2023-06-01 07:23:37 +03:00
Teppei Fukuda
48b2e15c23 refactor(cyclonedx): add intermediate representation (#4490) 2023-06-01 05:50:47 +03:00
simar7
c15f269a99 fix(misconf): Remove debug print while scanning (#4521)
Signed-off-by: Simar <simar@linux.com>
2023-06-01 05:28:37 +03:00
DmitriyLewen
b6ee08e55d fix(java): remove duplicates of jar libs (#4515)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-05-31 15:09:18 +03:00
DmitriyLewen
d4740401a3 fix(java): fix overwriting project props in pom.xml (#4498) 2023-05-31 13:16:28 +03:00
Tung Bui (Leo)
4cf2f94d0d docs: Update compilation instructions (#4512) 2023-05-31 10:47:56 +03:00
DmitriyLewen
18ce1c3363 fix(nodejs): update logic for parsing pnpm lock files (#4502) 2023-05-31 08:41:08 +03:00
DmitriyLewen
87eed38c6c fix(secret): remove aws-account-id rule (#4494) 2023-05-31 07:00:20 +03:00
LaurentiuNiculae
b0c591ef66 feat(oci): add support for referencing an input image by digest (#4470)
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
2023-05-31 06:39:42 +03:00
dependabot[bot]
b84b5ecfc2 chore(deps): bump github.com/cloudflare/circl from 1.1.0 to 1.3.3 (#4338) 2023-05-30 18:50:09 +03:00
Tej Singh Rana
305255a497 docs: fixed the format (#4503) 2023-05-30 16:37:06 +03:00
DmitriyLewen
d586de585e fix(java): add support of * for exclusions for pom.xml files (#4501) 2023-05-30 16:34:54 +03:00
Anais Urlichs
de6eef3b00 feat: adding issue template for documentation (#4453) 2023-05-30 12:23:05 +03:00
DmitriyLewen
83a9c4a4cf docs: switch glad to ghsa for Go (#4493) 2023-05-30 09:46:49 +03:00
simar7
537272257b chore(deps): Update defsec to v0.89.0 (#4474) 2023-05-30 06:06:46 +03:00
simar7
6fcd1538d9 feat(misconf): Add terraformplan support (#4342)
* feat(misconf): Add terraformplan support

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

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

* update defsec

* fix lint

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

* remove debug prints

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

* update tests

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

---------

Signed-off-by: Simar <simar@linux.com>
2023-05-29 14:48:26 -06:00
DmitriyLewen
72e302cf81 feat(debian): add digests for dpkg (#4445)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-05-28 10:30:58 +03:00
dependabot[bot]
7e99d08a13 chore(deps): bump github.com/sigstore/rekor from 1.1.1 to 1.2.0 (#4478) 2023-05-28 06:37:30 +03:00
chenk
12a1789be5 feat(k8s): exclude node scanning by node labels (#4459)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-05-25 14:52:28 +03:00
DmitriyLewen
919e8c92b2 docs: add info about multi-line mode for regexp from custom secret rules (#4159) 2023-05-24 14:59:50 +03:00
Teppei Fukuda
50fe43f14c feat(cli): convert JSON reports into a different format (#4452)
Co-authored-by: Aurelien LAJOIE <aurelien.lajoie@kili-technology.com>
2023-05-24 11:45:26 +03:00
DmitriyLewen
09db1d4389 feat(image): add logic to guess base layer for docker-cis scan (#4344) 2023-05-24 10:43:09 +03:00
afdesk
3f0721ff6e fix(cyclonedx): set original names for packages (#4306) 2023-05-23 12:35:52 +03:00
Teppei Fukuda
0ef0dadb16 feat: group subcommands (#4449) 2023-05-23 08:15:39 +03:00
rlubetkin
3a7717fdeb feat(cli): add retry to cache operations (#4189) 2023-05-22 16:56:18 +03:00
AliDatadog
63cfb2714a fix(vuln): report architecture for apk packages (#4247)
Co-authored-by: Sylvain Baubeau <lebauce@gmail.com>
2023-05-22 16:37:00 +03:00
Teppei Fukuda
e1361368a1 refactor: enable cases where return values are not needed in pipeline (#4443) 2023-05-22 08:11:24 +03:00
Mike Poindexter
29b5f7e8ec fix(image): resolve scan deadlock when error occurs in slow mode (#4336) 2023-05-21 10:48:06 +03:00
simar7
92ed344e8a docs(misconf): Update docs for kubernetes file patterns (#4435)
Signed-off-by: Simar <simar@linux.com>
2023-05-21 10:20:15 +03:00
chenk
16af41be15 test: k8s integration tests (#4423)
Signed-off-by: chenk <hen.keinan@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-05-18 22:41:22 +03:00
DmitriyLewen
cab8569cd7 feat(redhat): add package digest for rpm (#4410) 2023-05-18 14:30:00 +03:00
simar7
92f9e98d04 feat(misconf): Add --reset-policy-bundle for policy bundle (#4167) 2023-05-18 11:54:01 +03:00
guangwu
33fb04763d fix: typo (#4431) 2023-05-18 10:09:26 +03:00
DmitriyLewen
8b162f287f add user instruction to imgconf (#4429) 2023-05-18 08:53:34 +03:00
DmitriyLewen
3b7c9198dd fix(k8s): add image sources (#4411) 2023-05-17 07:01:58 +03:00
simar7
c75d35ff61 docs(scanning): Add versioning banner (#4415) 2023-05-17 06:32:17 +03:00
DmitriyLewen
d298415c09 feat(cli): add mage command to update golden integration test files (#4380) 2023-05-16 13:58:50 +03:00
chenk
1a56295ff8 feat: node-collector custom namespace support (#4407)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-05-16 13:41:01 +03:00
DmitriyLewen
864ad10a38 chore(deps): bump owenrumney/go-sarif from v2.1.3 to v2.2.0 (#4378) 2023-05-16 09:02:15 +03:00
DmitriyLewen
7a20d96227 refactor(sbom): use multiline json for spdx-json format (#4404) 2023-05-16 08:22:07 +03:00
Chris Novakovic
ea5fd75ffe fix(ubuntu): add EOL date for Ubuntu 23.04 (#4347) 2023-05-16 05:21:45 +03:00
guangwu
56a01ec6f7 refactor: code-optimization (#4214) 2023-05-15 14:48:09 +03:00
Peter Engelbert
6a0e152657 feat(image): Add image-src flag to specify which runtime(s) to use (#4047)
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-05-15 14:42:42 +03:00
DmitriyLewen
50c8b418a9 test: skip wrong update of test golden files (#4379) 2023-05-15 11:35:50 +03:00
DmitriyLewen
51ca6536c3 refactor: don't return error for package.json without version/name (#4377) 2023-05-15 11:30:10 +03:00
guangwu
e5e7ebcdab docs: cmd error (#4376) 2023-05-15 08:58:32 +03:00
DmitriyLewen
6ee4960776 test(cli): add test for config file and env combination (#2666)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-05-15 08:56:56 +03:00
afdesk
c067b026e0 fix(report): set a correct file location for license scan output (#4326) 2023-05-14 15:27:13 +03:00
afdesk
ff6374829a ci: rpm repository for all versions and aarch64 (#4077)
Co-authored-by: Franco Gil <45880759+realFranco@users.noreply.github.com>
2023-05-14 14:53:25 +03:00
Eugene Bykov
0009b02bb8 chore(alpine): Update Alpine to 3.18 (#4351) 2023-05-14 14:37:35 +03:00
Chris Novakovic
d61ae8cc73 fix(alpine): add EOL date for Alpine 3.18 (#4308) 2023-05-12 13:30:11 +03:00
dependabot[bot]
636ce808fe chore(deps): bump github.com/docker/distribution (#4337) 2023-05-12 07:59:23 +03:00
Teppei Fukuda
e859d10eef feat: allow root break for mapfs (#4094) 2023-05-11 14:41:17 +03:00
simar7
a6ef37fa3d docs(misconf): Remove examples.md (#4256) 2023-05-10 20:41:18 +03:00
afdesk
dca8c039ed fix(ubuntu): update eol dates for Ubuntu (#4258) 2023-05-10 18:10:12 +03:00
DmitriyLewen
b003f58b2c feat(alpine): add digests for apk packages (#4168) 2023-05-10 16:37:50 +03:00
Teppei Fukuda
86f0016165 chore: add discussion templates (#4190) 2023-05-10 12:06:37 +03:00
simar7
2f318ce97d fix(terraform): Support tfvars (#4123) 2023-05-10 11:18:19 +03:00
Teppei Fukuda
ec3906c24e chore: separate docs:generate (#4242) 2023-05-10 09:08:31 +03:00
dependabot[bot]
37b25d28b2 chore(deps): bump github.com/aws/aws-sdk-go-v2/config (#4246) 2023-05-10 09:06:23 +03:00
Teppei Fukuda
45d5edb0d7 refactor: define vulnerability scanner interfaces (#4117) 2023-05-09 22:25:08 +03:00
chenk
090a00e717 feat: unified k8s scan resources (#4188) 2023-05-09 16:52:02 +03:00
simar7
f2188eb56d chore(deps): Update defsec to v0.88.1 (#4178) 2023-05-09 16:34:29 +03:00
dependabot[bot]
b79850f416 chore(deps): bump github.com/alicebob/miniredis/v2 from 2.30.1 to 2.30.2 (#4141) 2023-05-09 16:01:12 +03:00
guangwu
36acdfa8db chore: trivy bin ignore (#4212) 2023-05-09 12:03:47 +03:00
Teppei Fukuda
55fb723a6e feat(image): enforce image platform (#4083) 2023-05-08 21:04:22 +03:00
dependabot[bot]
9c87cb2710 chore(deps): bump github.com/owenrumney/go-sarif/v2 from 2.1.2 to 2.1.3 (#4143) 2023-05-08 12:07:30 +03:00
dependabot[bot]
21cf179f6b chore(deps): bump github.com/docker/docker (#4144) 2023-05-07 21:56:16 +03:00
dependabot[bot]
fbf7a77aee chore(deps): bump github.com/hashicorp/golang-lru/v2 from 2.0.1 to 2.0.2 (#4146) 2023-05-07 21:55:24 +03:00
dependabot[bot]
547391c224 chore(deps): bump aquaproj/aqua-installer from 2.0.2 to 2.1.1 (#4140) 2023-05-05 12:59:49 +03:00
DmitriyLewen
882bfdd782 fix(ubuntu): fix version selection logic for ubuntu esm (#4171) 2023-05-05 12:59:02 +03:00
dependabot[bot]
949cd10c0c chore(deps): bump github.com/samber/lo from 1.37.0 to 1.38.1 (#4147) 2023-05-05 12:56:59 +03:00
dependabot[bot]
93bc162ca5 chore(deps): bump github.com/hashicorp/go-getter from 1.7.0 to 1.7.1 (#4145) 2023-05-04 15:06:52 +03:00
dependabot[bot]
57993ef673 chore(deps): bump sigstore/cosign-installer from 3.0.1 to 3.0.3 (#4138) 2023-05-04 13:55:10 +03:00
dependabot[bot]
dc4baeb359 chore(deps): bump github.com/testcontainers/testcontainers-go (#4150) 2023-05-04 13:53:27 +03:00
second-frank
25d0255dc3 chore: install.sh support for windows (#4155) 2023-05-04 13:48:58 +03:00
dependabot[bot]
73e54549f1 chore(deps): bump github.com/sigstore/rekor from 1.1.0 to 1.1.1 (#4166) 2023-05-04 13:44:02 +03:00
dependabot[bot]
08de7c613f chore(deps): bump golang.org/x/crypto from 0.7.0 to 0.8.0 (#4149) 2023-05-03 12:23:58 +03:00
Anais Urlichs
ade4730fa7 docs: moving skipping files out of others (#4154)
Signed-off-by: AnaisUrlichs <urlichsanais@gmail.com>
2023-05-03 12:23:21 +03:00
Masahiro331
1be1e2e638 fix(spdx): add workaround for no src packages (#4118) 2023-04-28 07:16:21 +03:00
Teppei Fukuda
45bc9e0de4 test(golang): rename broken go.mod (#4129) 2023-04-28 07:02:59 +03:00
DmitriyLewen
3334e78fa3 feat(sbom): add supplier field (#4122)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2023-04-27 14:31:49 +03:00
DmitriyLewen
27fb1bfdee test(misconf): skip downloading of policies for tests #4126 2023-04-27 14:25:31 +03:00
DmitriyLewen
845ae31e5d refactor: use debug message for post-analyze errors (#4037)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-04-27 12:07:35 +03:00
Teppei Fukuda
11a5b91a1a feat(sbom): add VEX support (#4053) 2023-04-27 10:21:06 +03:00
DmitriyLewen
5eab464987 feat(sbom): add primary package purpose field for SPDX (#4119) 2023-04-25 14:47:25 +03:00
chenk
a00d00eb94 fix(k8s): fix quiet flag (#4120)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-04-25 14:46:37 +03:00
DmitriyLewen
9bc326909f fix(python): parse of pip extras (#4103)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-04-24 21:17:56 +03:00
DmitriyLewen
8559841677 feat(java): use full path for nested jars (#3992) 2023-04-24 13:45:41 +03:00
Adarsh A
0650e0e1d5 feat(license): add new flag for classifier confidence level (#4073)
Co-authored-by: Aswath S <aswath.s@thoughtworks.com>
2023-04-24 13:41:08 +03:00
chenk
43b6496274 feat: config and fs compliance support (#4097) 2023-04-24 11:49:19 +03:00
dependabot[bot]
9181bc1f70 chore(deps): bump sigstore/cosign-installer from 2.8.1 to 3.0.1 (#3952)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2023-04-24 08:43:07 +03:00
Idan Frimark
48e021ea6b feat(spdx): add support for SPDX 2.3 (#4058)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-04-23 23:36:04 +03:00
chenk
107752df65 fix: k8s all-namespaces support (#4096) 2023-04-23 20:08:37 +03:00
Teppei Fukuda
bd0c60364a perf(misconf): replace with post-analyzers (#4090)
Signed-off-by: Simar <simar@linux.com>
Co-authored-by: Simar <simar@linux.com>
2023-04-23 19:22:46 +03:00
bgoareguer
76662d5dd7 fix(helm): update networking API version detection (#4106) 2023-04-23 10:50:40 +03:00
aswath-s-tw
be47b688c7 feat(image): custom docker host option (#3599)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-04-20 22:10:51 +03:00
Chris Burns
cc18f92cf3 style: debug flag is incorrect and needs extra - (#4087) 2023-04-19 10:02:44 +03:00
Jonathan Lassoff
572a6193e7 docs(vuln): Document inline vulnerability filtering comments (#4024)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-04-18 12:02:14 +03:00
Teppei Fukuda
914c6f0921 feat(fs): customize error callback during fs walk (#4038) 2023-04-17 16:51:51 +03:00
DmitriyLewen
3f02feeff3 fix(ubuntu): skip copyright files from subfolders (#4076) 2023-04-17 14:07:58 +03:00
Teppei Fukuda
57bb77c060 docs: restructure scanners (#3977)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2023-04-17 11:54:31 +03:00
DmitriyLewen
b19b56c341 fix: fix file does not exist error for post-analyzers (#4061)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-04-17 08:15:44 +03:00
simar7
b43b19ba54 feat(flag): Support globstar for --skip-files and --skip-directories (#4026)
Signed-off-by: Simar <simar@linux.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-04-16 13:48:20 +03:00
dependabot[bot]
14805002d3 chore(deps): bump actions/stale from 7 to 8 (#3955) 2023-04-16 13:40:12 +03:00
DmitriyLewen
83bb97ab13 fix: return insecure option to download javadb (#4064) 2023-04-15 08:26:50 +03:00
DmitriyLewen
79a1ba32d5 fix(nodejs): don't stop parsing when unsupported yarn.lock protocols are found (#4052) 2023-04-14 07:35:51 +03:00
afdesk
ff1c43a791 ci: add gpg signing for RPM packages (#4056) 2023-04-14 07:28:44 +03:00
chenk
b608b116cc fix(k8s): current context title (#4055)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-04-13 17:56:22 +03:00
chenk
2c3b60f4c9 fix(k8s): quit support on k8s progress bar (#4021)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-04-13 17:30:54 +03:00
afdesk
a6b8642134 chore: add a note about Dockerfile.canary (#4050)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-04-13 17:27:28 +03:00
afdesk
90b80662c6 ci: fix path to canary binaries (#4045) 2023-04-13 10:27:06 +03:00
AliDatadog
dcefc6bf3c fix(vuln): report architecture for debian packages (#4032) 2023-04-12 15:51:12 +03:00
Dan Luhring
601e25fb2f feat: add support for Chainguard's commercial distro (#3641) 2023-04-12 15:20:52 +03:00
afdesk
0bebec19f0 ci: bump goreleaser for Github Action from 1.4.1 to 1.16.2 (#3979) 2023-04-12 15:15:16 +03:00
AliDatadog
707ea94234 fix(vuln): fix error message for remote scanners (#4031) 2023-04-11 16:50:45 +03:00
Teppei Fukuda
8e1fe769e4 feat(report): add image metadata to SARIF (#4020)
* feat(report): add image metadata to SARIF

* test: fix sarif golden
2023-04-11 16:33:25 +03:00
DmitriyLewen
4b36e97dce docs: fix broken cache link on Installation page (#3999)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-04-10 15:38:03 +03:00
Teppei Fukuda
f0df725c5a fix: lock downloading policies and database (#4017) 2023-04-10 15:37:13 +03:00
Teppei Fukuda
009675c825 fix: avoid concurrent access to the global map (#4014) 2023-04-10 12:30:08 +03:00
DmitriyLewen
3ed86aa3d0 feat(rust): add Cargo.lock v3 support (#4012) 2023-04-10 11:46:43 +03:00
chenk
f31dea4bd6 feat: auth support oci download server subcommand (#4008) 2023-04-10 08:26:17 +03:00
dependabot[bot]
d37c50a2b3 chore(deps): bump github.com/docker/docker (#4009) 2023-04-09 22:29:13 +03:00
Yousaf Nabi
693d20516b chore: install.sh support for armv7 (#3985) 2023-04-09 22:18:13 +03:00
dependabot[bot]
65d89b99d1 chore(deps): bump github.com/Azure/go-autorest/autorest/adal (#3961) 2023-04-09 15:58:06 +03:00
DmitriyLewen
a119ef86ea fix(rust): fix panic when 'dependencies' field is not used in cargo.toml (#3997) 2023-04-09 11:06:57 +03:00
DmitriyLewen
c8283cebde fix(sbom): fix infinite loop for cyclonedx (#3998) 2023-04-09 09:10:02 +03:00
dependabot[bot]
6c8b042548 chore(deps): bump helm/chart-testing-action from 2.3.1 to 2.4.0 (#3954) 2023-04-04 16:15:26 +03:00
DmitriyLewen
c42f360f57 fix: use warning for errors from enrichment files for post-analyzers (#3972) 2023-04-04 16:11:07 +03:00
dependabot[bot]
20c21caccf chore(deps): bump github.com/docker/docker (#3963) 2023-04-04 14:06:41 +03:00
Rewanth Tammana
54388ffd16 fix(helm): added annotation to psp configurable from values (#3893)
Signed-off-by: Rewanth Tammana <22347290+rewanthtammana@users.noreply.github.com>
2023-04-03 11:24:43 +03:00
dependabot[bot]
99a2519816 chore(deps): bump github.com/go-git/go-git/v5 from 5.5.2 to 5.6.1 (#3962) 2023-04-03 11:23:30 +03:00
afdesk
d113b93139 fix(secret): update built-in rule tests (#3855)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2023-04-03 10:37:08 +03:00
dependabot[bot]
5ab6d25880 chore(deps): bump github.com/alicebob/miniredis/v2 from 2.23.0 to 2.30.1 (#3957) 2023-04-03 10:32:13 +03:00
Teppei Fukuda
0767cb8443 test: rewrite scripts in Go (#3968) 2023-04-03 10:31:10 +03:00
simar7
428ee19cae docs(cli): Improve glob documentation (#3945)
Signed-off-by: Simar <simar@linux.com>
2023-04-03 07:59:02 +03:00
dependabot[bot]
3e00dc346f chore(deps): bump github.com/aws/aws-sdk-go-v2/service/sts (#3959) 2023-04-03 07:57:54 +03:00
Teppei Fukuda
cf2f0b2d1c ci: check CLI references (#3967) 2023-04-03 07:57:08 +03:00
dependabot[bot]
70f507e1af chore(deps): bump alpine from 3.17.2 to 3.17.3 (#3951) 2023-04-03 06:37:49 +03:00
dependabot[bot]
befabc6b99 chore(deps): bump github.com/aws/aws-sdk-go from 1.44.212 to 1.44.234 (#3956) 2023-04-03 06:36:35 +03:00
dependabot[bot]
ee69abb78f chore(deps): bump github.com/moby/buildkit from 0.11.4 to 0.11.5 (#3958) 2023-04-02 19:29:28 +03:00
dependabot[bot]
8901f7be62 chore(deps): bump actions/setup-go from 3 to 4 (#3953) 2023-04-02 19:28:40 +03:00
dependabot[bot]
4e6bbbc8cc chore(deps): bump actions/cache from 3.2.6 to 3.3.1 (#3950) 2023-04-02 19:28:10 +03:00
dependabot[bot]
d70f346f53 chore(deps): bump github.com/containerd/containerd from 1.6.19 to 1.7.0 (#3965) 2023-04-02 16:27:22 +03:00
dependabot[bot]
3efb2fdeda chore(deps): bump github.com/sigstore/rekor from 1.0.1 to 1.1.0 (#3964) 2023-04-02 10:49:41 +03:00
Krishna Dutt Panchagnula
ed590966a3 docs(cli): added makefile and go file to create docs (#3930)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2023-04-01 08:43:21 +03:00
Teppei Fukuda
a2f39a34c5 chore: Revert "ci: add gpg signing for RPM packages (#3612)" (#3946)
This reverts commit 67572dff6d.
2023-04-01 08:39:22 +03:00
Teppei Fukuda
5a10631023 chore: ignore gpg key (#3943) 2023-04-01 06:39:31 +03:00
afdesk
4072115e5a feat(cyclonedx): support dependency graph (#3177)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-04-01 00:46:30 +03:00
simar7
7cad265b7a chore(deps): Bump defsec to v0.85.0 (#3940)
Signed-off-by: Simar <simar@linux.com>
2023-03-31 16:58:01 +03:00
DmitriyLewen
f8b5733112 feat(rust): remove dev deps and find direct deps for Cargo.lock (#3919)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-30 22:05:34 +03:00
Rо́man
10796a2910 feat(server): redis with public TLS certs support (#3783)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-30 15:53:21 +03:00
simar7
abff1398c2 feat(flag): Add glob support to --skip-dirs and --skip-files (#3866) 2023-03-30 10:48:56 +03:00
Teppei Fukuda
b40f60c405 chore: replace make with mage (#3932) 2023-03-30 10:40:24 +03:00
DmitriyLewen
67236f6aac fix(sbom): add checksum to files (#3888)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-30 09:24:27 +03:00
dependabot[bot]
00de24b16e chore(deps): bump github.com/opencontainers/runc from 1.1.4 to 1.1.5 (#3928)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-30 09:23:39 +03:00
chenk
5976d1fa07 chore: remove unused mount volumes (#3927)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-03-30 07:33:03 +03:00
Teppei Fukuda
f14bed4532 feat: add auth support for downloading OCI artifacts (#3915) 2023-03-30 05:53:24 +03:00
DmitriyLewen
1ee05189f0 refactor(purl): use epoch in qualifier (#3913) 2023-03-28 13:26:56 +03:00
dependabot[bot]
0000252ce4 chore(deps): bump github.com/in-toto/in-toto-golang from 0.5.0 to 0.7.0 (#3727)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-28 13:22:47 +03:00
Teppei Fukuda
ca0d972cdb feat(image): add registry options (#3906) 2023-03-28 07:00:04 +03:00
AndreyLevchenko
0336555773 feat(rust): dependency tree and line numbers support for cargo lock file (#3746)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-26 14:43:45 +03:00
dependabot[bot]
dd9cd9528f chore(deps): bump google.golang.org/protobuf from 1.29.0 to 1.29.1 (#3905)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-26 13:20:02 +03:00
DmitriyLewen
edb06826b4 feat(php): add support for location, licenses and graph for composer.lock files (#3873)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-26 12:02:53 +03:00
Crypt Keeper
c02b15b371 chore(deps): updates wazero to 1.0.0 (#3904)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-03-26 08:50:38 +03:00
Teppei Fukuda
63ef760c69 feat(image): discover SBOM in OCI referrers (#3768)
Co-authored-by: saso <sasoakira6114@gmail.com>
2023-03-26 08:27:10 +03:00
DmitriyLewen
3fa703c034 docs: change cache-dir key in config file (#3897) 2023-03-24 19:12:14 +03:00
DmitriyLewen
4d78747c40 fix(sbom): use release and epoch for SPDX package version (#3896) 2023-03-24 19:11:06 +03:00
afdesk
67572dff6d ci: add gpg signing for RPM packages (#3612) 2023-03-24 06:46:18 +03:00
adamcohen2
e76d5ff98a docs: Update incorrect comment for skip-update flag (#3878) 2023-03-23 07:25:01 +02:00
Teppei Fukuda
011ea60db4 refactor(misconf): simplify policy filesystem (#3875) 2023-03-23 06:27:29 +02:00
DmitriyLewen
6445309de4 feat(nodejs): parse package.json alongside yarn.lock (#3757)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-21 19:13:02 +02:00
DmitriyLewen
6e9c2c36da fix(spdx): add PkgDownloadLocation field (#3879) 2023-03-21 16:11:38 +02:00
DmitriyLewen
18eeea2f62 fix(report): try to guess direct deps for dependency tree (#3852)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-21 12:55:07 +02:00
DmitriyLewen
02b6914212 chore(amazon): update EOL (#3876) 2023-03-21 07:11:56 +02:00
DmitriyLewen
79096e1161 fix(nodejs): improvement logic for package-lock.json v2-v3 (#3877) 2023-03-21 07:06:34 +02:00
DmitriyLewen
fc2e80cfe0 feat(amazon): add al2023 support (#3854)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-20 15:56:16 +02:00
dependabot[bot]
5f8d69d72e chore(deps): bump github.com/cheggaaa/pb/v3 from 3.1.0 to 3.1.2 (#3736) 2023-03-20 14:13:30 +02:00
simar7
7916aafffb docs(misconf): Add information about selectors (#3703)
Signed-off-by: Simar <simar@linux.com>
2023-03-20 14:12:35 +02:00
Shubham Palriwala
1b1ed39c7d docs(cli): update CLI docs with cobra (#3815) 2023-03-20 13:48:58 +02:00
chenk
234a360a7a feat: k8s parallel processing (#3693)
Signed-off-by: chenk <hen.keinan@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-20 13:34:38 +02:00
bgoareguer
b864b3b926 docs: add DefectDojo in the Security Management section (#3871) 2023-03-20 11:38:26 +02:00
Crypt Keeper
ad34c989de chore(deps): updates wazero to 1.0.0-rc.2 (#3853)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-19 19:56:01 +02:00
Teppei Fukuda
7148de3252 refactor: add pipeline (#3868) 2023-03-19 19:55:36 +02:00
DmitriyLewen
927acf9579 feat(cli): add javadb metadata to version info (#3835) 2023-03-19 15:51:14 +02:00
simar7
33074cfab3 chore(deps): Move compliance types to defsec (#3842)
Signed-off-by: Simar <simar@linux.com>
2023-03-19 15:46:06 +02:00
saso
ba9b0410c9 feat(sbom): add support for CycloneDX JSON Attestation of the correct specification (#3849) 2023-03-19 15:40:58 +02:00
chenk
a754a04e2b feat: add node toleration option (#3823) 2023-03-19 14:05:57 +02:00
Teppei Fukuda
9e4b57fb43 fix: allow mapfs to open dirs (#3867) 2023-03-19 13:33:50 +02:00
DmitriyLewen
09fd299f96 fix(report): update uri only for os class targets (#3846) 2023-03-17 10:15:24 +02:00
DmitriyLewen
09e13022c2 feat(nodejs): Add v3 npm lock file support (#3826)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-15 21:54:59 +02:00
DmitriyLewen
52cbfebcdd feat(nodejs): parse package.json files alongside package-lock.json (#2916)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-15 21:54:01 +02:00
simar7
d6a2d6369a docs(misconf): Fix links to built in policies (#3841)
Signed-off-by: Simar <simar@linux.com>
2023-03-15 11:47:44 +02:00
dependabot[bot]
a12f58be57 chore(deps): bump github.com/aws/aws-sdk-go-v2/service/ec2 from 1.86.1 to 1.89.1 (#3827)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-14 11:17:36 +02:00
DmitriyLewen
ee518350c5 fix(java): skip empty files for jar post analyzer (#3832) 2023-03-14 11:15:31 +02:00
DmitriyLewen
3987a679f9 fix(docker): build healthcheck command for line without /bin/sh prefix (#3831) 2023-03-14 09:28:36 +02:00
Teppei Fukuda
2bb25e766b refactor(license): use goyacc for license parser (#3824) 2023-03-14 09:27:17 +02:00
dependabot[bot]
00c763bc10 chore(deps): bump github.com/docker/docker from 23.0.0-rc.1+incompatible to 23.0.1+incompatible (#3586)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-13 17:33:07 +02:00
chenk
cac5881bbb fix: populate timeout context to node-collector (#3766) 2023-03-13 13:10:37 +02:00
chenk
bd9c6e613e fix: exclude node collector scanning (#3771) 2023-03-13 11:40:23 +02:00
Ari Yonaty
20f10673b9 fix: display correct flag in error message when skipping java db update #3808 2023-03-13 00:39:17 +02:00
DmitriyLewen
1fac7bf1ba fix: disable jar analyzer for scanners other than vuln (#3810) 2023-03-13 00:11:25 +02:00
Masahiro331
aaf265881e fix(sbom): fix incompliant license format for spdx (#3335) 2023-03-12 17:21:25 +02:00
DmitriyLewen
f8307635ad fix(java): the project props take precedence over the parent's props (#3320)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-09 19:25:52 +02:00
DmitriyLewen
1aa3b7dc28 docs: add canary build info to README.md (#3799) 2023-03-09 13:36:04 +02:00
Anais Urlichs
57904c0f97 docs: adding link to gh token generation (#3784) 2023-03-08 14:24:02 +02:00
Anais Urlichs
bdccf72338 docs: changing docs in accordance with #3460 (#3787) 2023-03-08 14:23:17 +02:00
dependabot[bot]
800473a8bc chore(deps): bump github.com/moby/buildkit from 0.11.0 to 0.11.4 (#3789)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-08 11:51:16 +02:00
dependabot[bot]
e6ab389f9e chore(deps): bump actions/add-to-project from 0.4.0 to 0.4.1 (#3724) 2023-03-07 13:35:06 +02:00
DmitriyLewen
6614398ab4 fix(license): disable jar analyzer for licence scan only (#3780) 2023-03-07 13:22:23 +02:00
DmitriyLewen
1dc6fee781 bump trivy-issue-action to v0.0.0; skip pkg dir (#3781) 2023-03-07 11:52:32 +02:00
DmitriyLewen
3357ed096b fix: skip checking dirs for required post-analyzers (#3773) 2023-03-06 13:29:35 +02:00
afdesk
1064636b3d docs: add information about plugin format (#3749) 2023-03-06 11:27:30 +02:00
DmitriyLewen
60b7ef5a55 fix(sbom): add trivy version to spdx creators tool field (#3756)
* fix(sbom): add trivy version to spdx creators tool field

* refactor test
2023-03-03 10:41:39 +02:00
simar7
497c955a4b feat(misconf): Add support to show policy bundle version (#3743)
Fixes: https://github.com/aquasecurity/trivy/issues/3696

Signed-off-by: Simar <simar@linux.com>
2023-03-02 17:00:45 +02:00
Andrea Scarpino
5d54310d76 fix(python): fix error with optional dependencies in pyproject.toml (#3741) 2023-03-02 16:58:03 +02:00
dependabot[bot]
44cf1e2f57 chore(deps): bump github.com/aws/aws-sdk-go from 1.44.210 to 1.44.212 (#3740)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-02 15:18:51 +02:00
DmitriyLewen
743b4b0d97 add id for package.json files (#3750) 2023-03-02 14:25:56 +02:00
dependabot[bot]
6de43855f8 chore(deps): bump github.com/containerd/containerd from 1.6.18 to 1.6.19 (#3738)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-02 13:20:32 +02:00
dependabot[bot]
9a0ceef166 chore(deps): bump actions/cache from 3.2.4 to 3.2.6 (#3725) 2023-03-01 23:14:17 +02:00
dependabot[bot]
0501b46d48 chore(deps): bump github.com/google/go-containerregistry (#3731)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-01 23:13:31 +02:00
dependabot[bot]
ee3004d292 chore(deps): bump go.etcd.io/bbolt from 1.3.6 to 1.3.7 (#3732)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-01 20:53:53 +02:00
dependabot[bot]
5c8e604f56 chore(deps): bump alpine from 3.17.1 to 3.17.2 (#3723) 2023-03-01 20:53:30 +02:00
Teppei Fukuda
bc0836623c fix(cli): pass integer to exit-on-eol (#3716) 2023-03-01 12:18:11 +02:00
Itay Shakury
23cdac02ee feat: add kubernetes pss compliance (#3498)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-01 12:10:34 +02:00
Kalyana Krishna Varanasi
302c8ae24c feat: Adding --module-dir and --enable-modules (#3677)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-03-01 12:09:53 +02:00
Teppei Fukuda
34120f4201 feat: add special IDs for filtering secrets (#3702) 2023-03-01 09:51:11 +02:00
simar7
e399ed8439 chore(deps): Update defsec (#3713)
* chore(deps): Update defsec

* fix tests
2023-03-01 08:10:03 +02:00
simar7
ef7b762e48 docs(misconf): Add guide on input schema (#3692)
* docs(misconf): Add guide on input schema

* Update docs/docs/misconfiguration/custom/schema.md

Co-authored-by: Itay Shakury <itay@itaysk.com>

* make schema usage more descriptive

* docs: point to the full page

* update docs

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

---------

Signed-off-by: Simar <simar@linux.com>
Co-authored-by: Itay Shakury <itay@itaysk.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-28 15:55:49 -08:00
Teppei Fukuda
00daebc161 feat(go): support dependency graph and show only direct dependencies in the tree (#3691) 2023-02-28 13:24:53 +02:00
chenk
98d1031552 feat: docker multi credential support (#3631)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-02-28 11:42:37 +02:00
Teppei Fukuda
b791362871 feat: summarize vulnerabilities in compliance reports (#3651) 2023-02-28 00:09:00 +02:00
Teppei Fukuda
719fdb1b11 feat(python): parse pyproject.toml alongside poetry.lock (#3695)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2023-02-27 20:48:55 +02:00
DmitriyLewen
3ff5699b4b feat(python): add dependency tree for poetry lock file (#3665)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-26 16:15:00 +02:00
Masahiro331
33909d9df3 fix(cyclonedx): incompliant affect ref (#3679) 2023-02-26 16:04:29 +02:00
Manuel Morejón
d85a3e087b chore(helm): update skip-db-update environment variable (#3657)
Signed-off-by: Manuel Morejon <manuel@mmorejon.io>
2023-02-26 14:16:17 +02:00
Masahiro331
551899c24e fix(spdx): change CreationInfo timestamp format RFC3336Nano to RFC3336 (#3675) 2023-02-26 10:11:47 +02:00
Teppei Fukuda
3aaa2cfb75 fix(sbom): export empty dependencies in CycloneDX (#3664) 2023-02-25 18:33:59 +02:00
Dmitry Ivankov
9d1300c3e7 docs: java-db air-gap doc tweaks (#3561)
Downloaded file name is `javadb.tar.gz` rather than `db.tar.gz`.
Also `--skip-update` is deprecated in favor of `--skip-db-update` and `--skip-java-db-update`.
2023-02-24 17:54:29 +02:00
Teppei Fukuda
793cc43d4c feat(go): license support (#3683) 2023-02-24 17:52:35 +02:00
AndreyLevchenko
6a3294e476 feat(ruby): add dependency tree/location support for Gemfile.lock (#3669)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-23 23:47:28 +02:00
chenk
e9dc21d88a fix(k8s): k8s label size (#3678)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-02-23 15:09:27 +02:00
Masahiro331
12976d42df fix(cyclondx): fix array empty value, null to [] (#3676) 2023-02-23 13:35:59 +02:00
Teppei Fukuda
1dc2b349c6 refactor: rewrite gomod analyzer as post-analyzer (#3674) 2023-02-23 13:35:08 +02:00
chenk
92eaf636ca feat: config outdated-api result filtered by k8s version (#3578)
Signed-off-by: chenk <hen.keinan@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-22 15:41:37 +02:00
Alexander Lauster
9af436b999 fix: Update to Alpine 3.17.2 (#3655)
Fix CVE-2023-0286
2023-02-21 19:38:20 +02:00
Teppei Fukuda
88ee68d0c6 feat: add support for virtual files (#3654) 2023-02-20 17:20:57 +02:00
Teppei Fukuda
75c96bd968 feat: add post-analyzers (#3640)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2023-02-20 13:08:26 +02:00
Edoardo Vacchi
baea3997d2 chore(deps): updates wazero to 1.0.0-pre.9 (#3653)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-02-20 13:03:28 +02:00
dependabot[bot]
7ca0db17ea chore(deps): bump github.com/go-openapi/runtime from 0.24.2 to 0.25.0 (#3528)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-20 13:01:33 +02:00
dependabot[bot]
866999e454 chore(deps): bump github.com/containerd/containerd from 1.6.15 to 1.6.18 (#3633)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-20 10:11:01 +02:00
DmitriyLewen
b7bfb9a207 feat(python): add dependency locations for Pipfile.lock (#3614) 2023-02-20 09:51:42 +02:00
dependabot[bot]
9badef27ac chore(deps): bump golang.org/x/net from 0.5.0 to 0.7.0 (#3648)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-19 15:51:12 +02:00
DmitriyLewen
d856595b8e fix(java): fix groupID selection by ArtifactID for jar files. (#3644) 2023-02-18 09:07:08 +02:00
dependabot[bot]
fe7c26a741 chore(deps): bump github.com/aws/aws-sdk-go-v2/service/ec2 from 1.63.1 to 1.85.0 (#3607)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-17 12:44:55 +02:00
Gio Rodriguez
f251dfc5ce fix(aws): Adding a fix for update-cache flag that is not applied on AWS scans. (#3619)
* adding a fix for update-cache that was not applied on AWS scans.

* removing unneeded code

---------

Co-authored-by: Gio Rodriguez <giovanni.rodriguez@aquasec.com>
2023-02-16 22:49:20 +02:00
didiermichel
9be8062c10 feat(cli): add command completion (#3061)
Co-authored-by: congbang-le <lecongbang314@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-15 13:29:03 +02:00
Duy Nguyen
370098dbf4 docs(misconf): update dockerfile link (#3627) 2023-02-15 11:54:56 +02:00
Jack Lin
32acd293fd feat(flag): add exit-on-eosl option (#3423)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-15 10:51:15 +02:00
dependabot[bot]
aa8e185e03 chore(deps): bump github.com/go-git/go-git/v5 from 5.4.2 to 5.5.2 (#3533)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-14 16:17:28 +02:00
Alexej Disterhoft
86603bb9c5 fix(cli): make java db repository configurable (#3595)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-14 15:01:15 +02:00
chenk
7b1e173f51 chore: bump trivy-kubernetes (#3613)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-02-14 13:23:45 +02:00
Helge Eichelberg
85d5d61bc7 chore(helm): update Trivy from v0.36.1 to v0.37.2 (#3574)
* chore(helm): update Trivy from v0.36.1 to v0.37.1

Signed-off-by: elchenberg <elchenberg@users.noreply.github.com>

* chore(helm): bump Trivy to v0.37.2

Signed-off-by: elchenberg <elchenberg@users.noreply.github.com>

---------

Signed-off-by: elchenberg <elchenberg@users.noreply.github.com>
2023-02-14 13:10:07 +02:00
dependabot[bot]
2c17260ba8 chore(deps): bump github.com/spf13/viper from 1.14.0 to 1.15.0 (#3536)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-14 13:09:43 +02:00
Teppei Fukuda
c54f1aa8f0 chore(deps): bump golang/x/mod to v0.8.0 (#3606) 2023-02-14 07:02:26 +02:00
dependabot[bot]
625ea58122 chore(deps): bump golang.org/x/crypto from 0.3.0 to 0.5.0 (#3529)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-13 16:15:12 +02:00
dependabot[bot]
623c7f9432 chore(deps): bump helm.sh/helm/v3 from 3.10.3 to 3.11.1 (#3580)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-13 16:14:25 +02:00
DmitriyLewen
d291c34f51 ci: quote pros in c++ for semantic pr (#3605) 2023-02-13 14:05:35 +02:00
DmitriyLewen
6cac6c917f fix(image): check proxy settings from env for remote images (#3604) 2023-02-13 12:54:38 +02:00
DmitriyLewen
12b563b974 BREAKING: use normalized trivy-java-db (#3583)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-10 02:16:37 +02:00
DmitriyLewen
72a14c67af fix(image): add timeout for remote images (#3582)
* add timeout for remote image

* fix linter error
2023-02-09 14:19:17 +02:00
dependabot[bot]
4c01d73fb7 chore(deps): bump golang.org/x/mod from 0.6.0 to 0.7.0 (#3532)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-07 08:38:25 +02:00
dependabot[bot]
10dd5d1a95 chore(deps): bump golang.org/x/text from 0.5.0 to 0.6.0 (#3534)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2023-02-07 06:51:49 +02:00
simar7
439c541fd3 fix(misconf): handle dot files better (#3550) 2023-02-05 09:10:10 +09:00
Teppei Fukuda
200e04a767 chore: bump Go to 1.19 (#3551) 2023-02-03 15:08:01 +09:00
dependabot[bot]
a533ca87e6 chore(deps): bump alpine from 3.17.0 to 3.17.1 (#3522) 2023-02-03 04:21:25 +02:00
dependabot[bot]
4bccbe6e1c chore(deps): bump docker/build-push-action from 3 to 4 (#3523) 2023-02-03 04:20:52 +02:00
dependabot[bot]
d0562085df chore(deps): bump actions/cache from 3.2.2 to 3.2.4 (#3524) 2023-02-03 04:20:15 +02:00
dependabot[bot]
f5e65749b4 chore(deps): bump golangci/golangci-lint-action from 3.3.0 to 3.4.0 (#3525) 2023-02-03 04:17:39 +02:00
dependabot[bot]
d3da459d45 chore(deps): bump aquaproj/aqua-installer from 1.2.0 to 2.0.2 (#3526) 2023-02-03 04:15:56 +02:00
Teppei Fukuda
7f8868b7d8 fix(sbom): download the Java DB when generating SBOM (#3539) 2023-02-01 17:33:09 +02:00
Teppei Fukuda
364379b7b2 fix: use cgo free sqlite driver (#3521)
* fix: use cgo free sqlite driver

* chore: add CGO_ENABLED=0

* chore(deps): bump go-rpmdb
2023-02-01 17:06:12 +02:00
afdesk
0205475fa9 ci: fix path to dist folder (#3527) 2023-02-01 16:44:01 +02:00
Teppei Fukuda
e9d2af9174 fix(image): close layers (#3517) 2023-02-01 13:36:48 +02:00
Naimuddin Shaik
b169424089 refactor: db client changed (#3515)
changed the constructor to accept interface.
2023-02-01 13:15:36 +02:00
DmitriyLewen
7bf1e192ec feat(java): use trivy-java-db to get GAV (#3484)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-01 11:48:05 +02:00
Batuhan Apaydın
023e45b896 docs: add note about the limitation in Rekor (#3494)
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-01 11:14:47 +02:00
Teppei Fukuda
0fe62a93df docs: aggregate targets (#3503) 2023-02-01 08:48:33 +02:00
Edoardo Vacchi
0373e0822d deps: updates wazero to 1.0.0-pre.8 (#3510)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-02-01 06:48:37 +02:00
DmitriyLewen
a2e21f9b5c docs: add alma 9 and rocky 9 to supported os (#3513) 2023-02-01 06:47:26 +02:00
simar7
7d778b75f7 chore(deps): bump defsec to v0.82.9 (#3512) 2023-02-01 04:14:25 +02:00
Itay Shakury
9e9dbea717 chore: add missing target labels (#3504) 2023-01-31 17:20:56 +02:00
DmitriyLewen
d99a7b82f7 docs: add java vulnerability page (#3429)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-01-31 08:10:24 +02:00
Teppei Fukuda
cb5af0b33b feat(image): add support for Docker CIS Benchmark (#3496)
Co-authored-by: chenk <hen.keinan@gmail.com>
2023-01-31 07:31:59 +02:00
Teppei Fukuda
6eec9ac0a4 feat(image): secret scanning on container image config (#3495) 2023-01-30 16:50:56 +02:00
simar7
1eca973cbf chore(deps): Upgrade defsec to v0.82.8 (#3488)
Signed-off-by: Simar <simar@linux.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-01-30 09:38:17 +02:00
Teppei Fukuda
fb0d8f3f30 feat(image): scan misconfigurations in image config (#3437) 2023-01-30 04:48:29 +02:00
Helge Eichelberg
501d424d1f chore(helm): update Trivy from v0.30.4 to v0.36.1 (#3489)
Signed-off-by: elchenberg <elchenberg@users.noreply.github.com>
2023-01-28 07:12:08 +02:00
chenk
475dc17bc8 feat(k8s): add node info resource (#3482)
Signed-off-by: chenk <hen.keinan@gmail.com>
2023-01-25 22:00:05 +02:00
kunlongli
ed173b8295 perf(secret): optimize secret scanning memory usage (#3453) 2023-01-25 11:45:09 +02:00
Teppei Fukuda
1b368be367 feat: support aliases in CLI flag, env and config (#3481) 2023-01-25 11:33:12 +02:00
chenk
66a83d5cdb fix(k8s): migrate rbac k8s (#3459) 2023-01-25 11:13:41 +02:00
DmitriyLewen
81bee0f11e feat(java): add implementationVendor and specificationVendor fields to detect GroupID from MANIFEST.MF (#3480) 2023-01-24 12:21:19 +02:00
Teppei Fukuda
e1076085d9 refactor: rename security-checks to scanners (#3467) 2023-01-23 16:53:06 +02:00
Teppei Fukuda
aaf845d02e chore: display the troubleshooting URL for the DB denial error (#3474) 2023-01-23 16:12:00 +02:00
Corey Wilson
ed5bb0ba92 docs: yaml tabs to spaces, auto create namespace (#3469) 2023-01-23 10:51:55 +02:00
Anais Urlichs
3158bfe605 docs: adding show-and-tell template to GH discussions (#3391) 2023-01-22 17:34:09 +02:00
Lénaïc Huard
85b6c4aa15 fix: Fix a temporary file leak in case of error (#3465)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-01-22 16:12:56 +02:00
Teppei Fukuda
60bddae64c fix(test): sort cyclonedx components (#3468) 2023-01-22 14:21:20 +02:00
Anais Urlichs
e0bb04c915 docs: fixing spelling mistakes (#3462) 2023-01-22 14:18:15 +02:00
Teppei Fukuda
c25e826bb5 ci: set paths triggering VM tests in PR (#3438) 2023-01-22 11:35:19 +02:00
Raz Cohen
07ddc85a46 docs: typo in --skip-files (#3454) 2023-01-18 14:23:56 +02:00
Srinivas Kandukuri
e88507c999 feat(custom-forward): Extended advisory data (#3444) 2023-01-17 16:06:27 +02:00
Carl Winbäck
e2dfee208f docs: fix spelling error (#3436) 2023-01-16 14:31:43 +00:00
Teppei Fukuda
c575d6f7de refactor(image): extend image config analyzer (#3434) 2023-01-16 13:48:26 +02:00
Lior Vaisman Argon
036d5a8233 fix(nodejs): add ignore protocols to yarn parser (#3433) 2023-01-16 11:27:20 +02:00
DmitriyLewen
e6d7f15762 fix(db): check proxy settings when using insecure flag (#3435) 2023-01-16 10:40:27 +02:00
simar7
a1d4427c8b feat(misconf): Fetch policies from OCI registry (#3015)
Signed-off-by: Simar <simar@linux.com>
2023-01-15 13:37:04 +02:00
DmitriyLewen
682351a131 ci: downgrade Go to 1.18 and use stable and oldstable go versions for unit tests (#3413)
* use stable and oldstable go versions for unit tests

* downgrade Go to 1.18
2023-01-15 12:03:15 +02:00
afdesk
ff0c4516db ci: store URLs to Github Releases in RPM repository (#3414) 2023-01-15 11:59:18 +02:00
DmitriyLewen
ee12442b8d feat(server): add support of skip-db-update flag for hot db update (#3416) 2023-01-15 10:28:50 +02:00
DmitriyLewen
2033e05b6b chore(deps): bump github.com/moby/buildkit from v0.10.6 to v0.11.0 (#3411) 2023-01-12 08:45:07 +02:00
Teppei Fukuda
6bc564e887 fix(image): handle wrong empty layer detection (#3375) 2023-01-11 20:17:12 +02:00
DmitriyLewen
b3b8d4dd6e test: fix integration tests for spdx and cycloneDX (#3412) 2023-01-11 14:02:10 +02:00
Matthieu Maitre
b88bccae6e feat(python): Include Conda packages in SBOMs (#3379)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-01-10 16:11:17 +02:00
DmitriyLewen
fbd8a13d54 feat: add support pubspec.lock files for dart (#3344)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-01-10 13:34:53 +02:00
Kalyana Krishna Varanasi
0f545cfa96 fix(image): parsePlatform is failing with UNAUTHORIZED error (#3326)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-01-10 13:26:57 +02:00
DmitriyLewen
76c883dc43 fix(license): change normalize for GPL-3+-WITH-BISON-EXCEPTION (#3405) 2023-01-10 09:24:11 +00:00
Jack Lin
a8b671bc29 feat(server): log errors on server side (#3397) 2023-01-10 10:21:31 +02:00
Teppei Fukuda
a5919ca363 chore(deps): bump defsec to address helm vulnerabilities (#3399) 2023-01-08 15:34:11 +02:00
Itay Shakury
89016da21e docs: rewrite installation docs and general improvements (#3368)
improve installation guide, improve overview pages, rename cli section to docs
2023-01-08 15:16:03 +02:00
Itay Shakury
c3759c6d83 chore: update code owners (#3393) 2023-01-08 15:14:10 +02:00
Itay Shakury
044fb9761e chore: test docs separately from code (#3392) 2023-01-08 11:10:31 +02:00
Teppei Fukuda
ad2e648b33 docs: use the formula maintained by Homebrew (#3389) 2023-01-05 16:25:57 +02:00
Max Usachev
ad25a776cc docs: add Security Management section with SonarQube plugin 2023-01-05 14:59:47 +02:00
jerbob92
9039df4993 fix(deps): fix errors on yarn.lock files that contain local file reference (#3384) 2023-01-05 12:17:11 +02:00
Jack Lin
60cf4fe49f feat(flag): early fail when the format is invalid (#3370) 2023-01-04 13:46:04 +02:00
dependabot[bot]
9470e3cd27 chore(deps): bump github.com/aws/aws-sdk-go from 1.44.136 to 1.44.171 (#3366)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-01-03 20:53:50 +02:00
Olivier Jacques
d274d1568a docs(aws): fix broken links (#3374) 2023-01-03 17:59:28 +02:00
dependabot[bot]
2a870f8a82 chore(deps): bump actions/stale from 6 to 7 (#3360) 2023-01-03 15:28:29 +02:00
dependabot[bot]
5974023b7f chore(deps): bump helm/kind-action from 1.4.0 to 1.5.0 (#3359) 2023-01-03 15:23:58 +02:00
dependabot[bot]
02aa8c2c50 chore(deps): bump github.com/CycloneDX/cyclonedx-go from 0.6.0 to 0.7.0 (#2974)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
Co-authored-by: masahiro331 <m_fujimura@r.recruit.co.jp>
2023-01-03 15:15:07 +02:00
dependabot[bot]
6e6171fead chore(deps): bump azure/setup-helm from 3.4 to 3.5 (#3358) 2023-01-03 15:04:29 +02:00
dependabot[bot]
066f27792f chore(deps): bump github.com/moby/buildkit from 0.10.4 to 0.10.6 (#3173) 2023-01-03 14:44:40 +02:00
dependabot[bot]
8cc3284106 chore(deps): bump goreleaser/goreleaser-action from 3 to 4 (#3357) 2023-01-03 14:19:00 +02:00
dependabot[bot]
8d71346143 chore(deps): bump github.com/containerd/containerd from 1.6.8 to 1.6.14 (#3367)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-01-03 12:01:45 +02:00
Crypt Keeper
5b944d20ac chore(go): updates wazero to v1.0.0-pre.7 (#3355)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-01-03 11:08:17 +02:00
dependabot[bot]
9c645b99e2 chore(deps): bump golang.org/x/text from 0.4.0 to 0.5.0 (#3362)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-01-03 08:45:14 +02:00
dependabot[bot]
e2cd782d3a chore(deps): bump actions/cache from 3.0.11 to 3.2.2 (#3356) 2023-01-02 15:59:36 +02:00
Itay Shakury
4813cf5cfd docs: improve compliance docs (#3340) 2022-12-30 13:55:18 +02:00
Lior Vaisman Argon
025e5099d2 feat(deps): add yarn lock dependency tree (#3348) 2022-12-29 19:45:18 +02:00
chenk
4d59a1ef9b fix: compliance change id and title naming (#3349)
Signed-off-by: chenk <hen.keinan@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-29 17:46:50 +02:00
DmitriyLewen
eaa5bcf7d2 feat: add support for mix.lock files for elixir language (#3328)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-29 15:18:51 +02:00
chenk
a888440922 feat: add k8s cis bench (#3315)
Signed-off-by: chenk <hen.keinan@gmail.com>
2022-12-28 20:38:48 +02:00
DmitriyLewen
62b369ee39 test: disable SearchLocalStoreByNameOrDigest test for non-amd64 arch (#3322)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-28 13:02:25 +02:00
behara
c110c4e028 revert: cache merged layers (#3334)
This reverts commit 6b4ddaaef2.
2022-12-28 10:01:01 +02:00
Masahiro331
bc759efdc3 feat(cyclonedx): add recommendation (#3336)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-27 15:25:27 +02:00
DmitriyLewen
fe3831e0fe feat(ubuntu): added support ubuntu ESM versions (#1893)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-27 10:24:28 +02:00
DmitriyLewen
b0cebec324 fix: change logic to build relative paths for skip-dirs and skip-files (#3331)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-26 17:38:31 +02:00
dependabot[bot]
a66d3fe3f0 chore(deps): bump github.com/hashicorp/golang-lru from 0.5.4 to 2.0.1 (#3265)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: masahiro331 <m_fujimura@r.recruit.co.jp>
2022-12-25 12:39:26 +02:00
Owen Rumney
5190f9566b feat: Adding support for Windows testing (#3037)
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-22 22:54:18 +02:00
gboer
b00f3c60f6 feat: add support for Alpine 3.17 (#3319) 2022-12-19 13:25:29 +02:00
Teppei Fukuda
a70f885113 docs: change PodFile.lock to Podfile.lock (#3318) 2022-12-19 13:24:26 +02:00
saso
1ec1fe64e8 fix(sbom): support for the detection of old CycloneDX predicate type (#3316) 2022-12-19 11:06:36 +02:00
lsoumille
68eda79357 feat(secret): Use .trivyignore for filtering secret scanning result (#3312) 2022-12-18 11:58:34 +02:00
Takeshi Yoneda
b95d435a6a chore(go): remove experimental FS API usage in Wasm (#3299)
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2022-12-18 11:55:53 +02:00
DmitriyLewen
ac6b7c3354 ci: add workflow to add issues to roadmap project (#3292)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-18 10:32:39 +02:00
gmetaxo
cfabdf9138 fix(vuln): include duplicate vulnerabilities with different package paths in the final report (#3275)
* Add test for filter with both duplicates and different package paths

* Add package path in key of uniqVulns map

* Add package path to the sorting logic
2022-12-15 19:21:54 +02:00
dependabot[bot]
56e3d8de09 chore(deps): bump github.com/spf13/viper from 1.13.0 to 1.14.0 (#3250)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-15 16:29:58 +02:00
Masahiro331
bbccb4484a feat(sbom): better support for third-party SBOMs (#3262)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-15 16:20:21 +02:00
DmitriyLewen
e879b0697c docs: add information about languages with support for dependency locations (#3306)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-12-15 15:25:40 +02:00
tockn
e92266f2c8 feat(vm): add region option to vm scan to be able to scan any region's ami and ebs snapshots (#3284)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-12-15 12:21:05 +02:00
dependabot[bot]
01c7fb14bc chore(deps): bump github.com/Azure/azure-sdk-for-go from 66.0.0+incompatible to 67.1.0+incompatible (#3251)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-13 19:46:54 +02:00
DmitriyLewen
23d0613879 fix(vuln): change severity vendor priority for ghsa-ids and vulns from govuln (#3255) 2022-12-13 17:29:43 +02:00
Itay Shakury
407c2407d1 docs: remove comparisons (#3289) 2022-12-13 11:13:56 +02:00
Dan Luhring
93c5d2dc71 feat: add support for Wolfi Linux (#3215) 2022-12-12 22:43:44 +02:00
DmitriyLewen
2809794964 ci: add go.mod to canary workflow (#3288) 2022-12-12 22:40:14 +02:00
Catminusminus
08b55c3347 feat(python): skip dev dependencies (#3282)
This commit bumps the go-dep-parser version. This revents Trivy from detecting vulnerabilities in Poetry dev-dependency, so the document is also updated.

Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-12-12 15:04:48 +02:00
afdesk
52300e6069 chore: update ubuntu version for Github action runnners (#3257)
* chore: update ubuntu version for Github action runnners

* update the ubuntu version for docs actions
2022-12-12 11:09:46 +02:00
DmitriyLewen
a7ac6acaa2 fix(go): skip dep without Path for go-binaries (#3254) 2022-12-12 11:04:57 +02:00
DmitriyLewen
4436a202ff feat(rust): add ID for cargo pgks (#3256) 2022-12-12 07:40:15 +02:00
dependabot[bot]
34d505ad14 chore(deps): bump github.com/samber/lo from 1.33.0 to 1.36.0 (#3263)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-11 19:21:31 +02:00
dependabot[bot]
ea956026c8 chore(deps): bump github.com/Masterminds/sprig/v3 from 3.2.2 to 3.2.3 (#3253)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-11 19:16:10 +02:00
DmitriyLewen
aea298b3dc feat: add support for swift cocoapods lock files (#2956)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-11 19:15:10 +02:00
Teppei Fukuda
c67fe17b4e fix(sbom): use proper constants (#3286) 2022-12-11 15:56:48 +02:00
dependabot[bot]
f907255672 chore(deps): bump golang.org/x/term from 0.1.0 to 0.3.0 (#3278)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-11 15:33:28 +02:00
Teppei Fukuda
8f95743502 test(vm): import relevant analyzers (#3285) 2022-12-11 15:02:43 +02:00
Pikaqiu
8744534c28 feat: support scan remote repository (#3131)
Co-authored-by: AMF <work@afdesk.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-11 11:57:04 +02:00
DmitriyLewen
c278d86614 docs: fix typo in fluxcd (#3268) 2022-12-08 10:55:14 +02:00
Ari Yonaty
fa2281f723 docs: fix broken "ecosystem" link in readme (#3280) 2022-12-08 10:43:23 +02:00
simar7
a3eece4fef feat(misconf): Add compliance check support (#3130)
Signed-off-by: Simar <simar@linux.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-07 22:42:59 +02:00
hriprsd
7a6cf5a27c docs: Adding Concourse resource for trivy (#3224) 2022-12-04 16:22:10 +02:00
dependabot[bot]
dd26bd2306 chore(deps): change golang from 1.19.2 to 1.19 (#3249)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-12-04 11:03:02 +02:00
Masahiro331
cbba6d101a fix(sbom): duplicate dependson (#3261) 2022-12-04 10:48:02 +02:00
dependabot[bot]
fa2e3ac2c1 chore(deps): bump alpine from 3.16.2 to 3.17.0 (#3247) 2022-12-04 10:24:56 +02:00
Crypt Keeper
5c434753ce chore(go): updates wazero to 1.0.0-pre.4 (#3242)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-12-04 10:17:37 +02:00
DmitriyLewen
d29b0edcc7 feat(report): add dependency locations to sarif format (#3210) 2022-12-01 13:23:58 +02:00
Masahiro331
967e32f4a2 fix(rpm): add rocky to osVendors (#3241) 2022-12-01 12:44:21 +02:00
tsanva
947741660b docs: fix a typo (#3236) 2022-11-30 11:56:45 +02:00
DmitriyLewen
97ce61eef0 feat(dotnet): add dependency parsing for nuget lock files (#3222)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-11-29 16:15:46 +02:00
Max Fröhlich
17e13c4dbd docs: add pre-commit hook to community tools (#3203) 2022-11-29 16:15:17 +02:00
Cyril Jouve
b1a2c4e9c8 feat(helm): pass arbitrary env vars to trivy (#3208) 2022-11-29 11:36:45 +02:00
Masahiro331
bd30e983e3 chore(vm): update xfs filesystem parser for change log (#3230) 2022-11-27 18:04:10 +02:00
Masahiro331
22d92e4ad6 feat: add virtual machine scan command (#2910)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-11-27 11:45:00 +02:00
Itay Shakury
531eaa8f06 docs: reorganize index and readme (#3026) 2022-11-26 10:44:01 +02:00
afdesk
8569d43a7a fix: slowSizeThreshold should be less than defaultSizeThreshold (#3225) 2022-11-24 15:09:06 +02:00
Tamir Kiviti
604a73d325 feat: Export functions for trivy plugin (#3204) 2022-11-22 09:40:09 +02:00
Teppei Fukuda
7594b1f041 feat(image): add support wildcard for platform os (#3196)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2022-11-21 10:09:32 +02:00
chenk
fd5cafb26d fix: load compliance report from file system (#3161)
Signed-off-by: chenk <hen.keinan@gmail.com>
2022-11-20 15:15:03 +02:00
DmitriyLewen
6ab9380b29 fix(suse): use package name to get advisories (#3199) 2022-11-20 14:46:33 +02:00
Irum Malik
4a5d64355c docs(image): space issues during image scan (#3190) 2022-11-20 14:41:59 +02:00
Peter Engelbert
2206e008ea feat(containerd): scan image by digest (#3075) 2022-11-20 14:40:24 +02:00
AndrewCharlesHay
861bc03e2d fix(vuln): add package name to title (#3183) 2022-11-20 14:00:18 +02:00
chenk
f115895d30 fix: present control status instead of compliance percentage in compliance report (#3181)
Signed-off-by: chenk <hen.keinan@gmail.com>
2022-11-20 13:46:16 +02:00
afdesk
cc8cef1936 perf(license): remove go-enry/go-license-detector. (#3187)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-11-17 18:01:57 +02:00
Naimuddin Shaik
a0033f6b61 fix: workdir command as empty layer (#3087) 2022-11-17 09:43:01 +02:00
Itay Shakury
cb5744dcaf docs: reorganize ecosystem section (#3025) 2022-11-16 10:06:13 +02:00
DmitriyLewen
1ddd6d30b8 feat(dotnet): add support dependency location for dotnet-core files (#3095) 2022-11-16 09:46:28 +02:00
dependabot[bot]
30c8d75674 chore(deps): bump github.com/aws/aws-sdk-go from 1.44.114 to 1.44.136 (#3174)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-11-15 15:34:31 +02:00
dependabot[bot]
8e7b44f720 chore(deps): bump github.com/testcontainers/testcontainers-go from 0.13.0 to 0.15.0 (#3109)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-11-15 12:40:21 +02:00
DmitriyLewen
dfff371f84 feat(dotnet): add support dependency location for nuget lock files (#3032) 2022-11-15 12:38:31 +02:00
Teppei Fukuda
eb571fdc40 chore: update code owners for misconfigurations (#3176) 2022-11-14 23:06:36 +02:00
Teppei Fukuda
757178341d feat: add slow mode (#3084)
Co-authored-by: AMF <work@afdesk.com>
2022-11-14 15:49:02 +02:00
Chris Adams
01df475852 docs: fix typo in enable-builin-rules mentions (#3118) 2022-11-14 14:19:21 +02:00
Tal Kapon
6b3be150f1 feat: Add maintainer field to OS packages (#3149) 2022-11-14 14:16:12 +02:00
Nozomi Morimoto
9ebdc51d3a docs: fix some typo (#3171) 2022-11-14 14:15:31 +02:00
dependabot[bot]
42e81ad0a6 chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.17.8 to 1.18.0 (#3175)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-11-13 22:16:50 +02:00
dependabot[bot]
55ec898953 chore(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1 (#3112)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-11-13 18:27:38 +02:00
Emily Berk
0644ceba1b docs: fix links on Built-in Policies page (#3124) 2022-11-13 14:51:09 +02:00
dependabot[bot]
50af7a2f46 chore(deps): bump github.com/go-openapi/runtime from 0.24.1 to 0.24.2 (#3117)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-11-13 14:46:35 +02:00
dependabot[bot]
c455d14209 chore(deps): bump github.com/samber/lo from 1.28.2 to 1.33.0 (#3116)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-11-13 14:46:14 +02:00
Serge Dubrovin
8fb9d31617 fix: Perform filepath.Clean first and then filepath.ToSlash for skipFile/skipDirs settings (#3144) 2022-11-13 14:22:00 +02:00
Teppei Fukuda
8562b8cf33 chore: use newline for semantic pr (#3172) 2022-11-13 13:35:50 +02:00
dependabot[bot]
aff9a3e0d9 chore(deps): bump azure/setup-helm from 3.3 to 3.4 (#3107) 2022-11-13 13:04:29 +02:00
dependabot[bot]
001671ed79 chore(deps): bump sigstore/cosign-installer from 2.7.0 to 2.8.1 (#3106) 2022-11-13 13:03:35 +02:00
dependabot[bot]
4e7ab4842c chore(deps): bump amannn/action-semantic-pull-request from 4 to 5 (#3105) 2022-11-13 13:03:07 +02:00
dependabot[bot]
a6091a7e43 chore(deps): bump golangci/golangci-lint-action from 3.2.0 to 3.3.0 (#3104) 2022-11-13 13:00:37 +02:00
DmitriyLewen
6da148cca8 fix(spdx): rename describes field in spdx (#3102) 2022-11-13 12:59:37 +02:00
didiermichel
df9cf88163 chore: handle GOPATH with several paths in make file (#3092) 2022-11-13 12:50:14 +02:00
Jonathan Ballet
32fe108c0a docs(flag): add "rego" configuration file options (#3165) 2022-11-13 10:04:20 +02:00
Crypt Keeper
8fcca9c8cf chore(go): updates wazero to 1.0.0-pre.3 (#3090)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-11-13 09:53:01 +02:00
dependabot[bot]
02f77bc120 chore(deps): bump actions/cache from 3.0.9 to 3.0.11 (#3108) 2022-11-13 09:50:21 +02:00
alfajorcito
aa3ff09ad9 docs(license): fix typo inside quick start (#3134) 2022-11-13 09:44:26 +02:00
Itay Shakury
f26b45294d chore: update codeowners for docs (#3135) 2022-11-13 09:42:58 +02:00
chenk
3b6d7d8cb1 fix(cli): exclude --compliance flag from non supported sub-commands (#3158) 2022-11-13 09:39:25 +02:00
DmitriyLewen
e9a2549955 fix: remove --security-checks none from image help (#3156) 2022-11-13 09:38:25 +02:00
chenk
3aa19122f4 fix: compliance flag description (#3160) 2022-11-13 09:30:21 +02:00
BeHe
fc820570b7 docs(k8s): fix a typo (#3163) 2022-11-13 09:29:29 +02:00
dependabot[bot]
3a1f05e331 chore(deps): bump golang from 1.19.1 to 1.19.2 (#3103) 2022-11-09 20:18:37 +01:00
Teppei Fukuda
7912f585a3 feat(vuln): support dependency graph for RHEL/CentOS (#3094)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-10-31 11:07:41 +02:00
Teppei Fukuda
9468056c0f feat(vuln): support dependency graph for dpkg and apk (#3093)
Co-authored-by: Masahiro331 <m_fujimura@r.recruit.co.jp>
2022-10-31 08:54:42 +02:00
Teppei Fukuda
7cc83cc2f6 perf(license): enable license classifier only with "--license-full" (#3086) 2022-10-28 20:16:16 +03:00
AndrewCharlesHay
5b975de234 feat(report): add secret scanning to ASFF template (#2860)
Co-authored-by: AMF <work@afdesk.com>
2022-10-28 08:27:10 +03:00
Peter Engelbert
b6cef12534 feat: Allow override of containerd namespace (#3060)
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2022-10-27 16:43:55 +03:00
behara
07651480fa fix(vuln): In alpine use Name as SrcName (#3079) 2022-10-27 12:59:28 +03:00
DmitriyLewen
9e649b87b5 fix(secret): Alibaba AccessKey ID (#3083) 2022-10-27 12:58:14 +03:00
Teppei Fukuda
af89249dea refactor(k8s): custom reports (#3076) 2022-10-26 00:02:33 +03:00
Aibek
f4e970f374 fix(misconf): Bump in-toto-golang with correct CycloneDX predicate (#3068)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-10-25 23:41:27 +03:00
Shubham Palriwala
8ae4627941 feat(image): add support for passing architecture and OS (#3012)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-10-25 22:03:50 +03:00
DmitriyLewen
0501e70375 test: disable containerd integration tests for non-amd64 arch (#3073) 2022-10-25 21:05:54 +03:00
bgoareguer
a377c8d04f feat(server): Add support for client/server mode to rootfs command (#3021) 2022-10-25 21:04:29 +03:00
Teppei Fukuda
02a73f0138 feat(vuln): support non-packaged binaries (#3019) 2022-10-25 20:02:53 +03:00
chenk
18581f345b feat: compliance reports (#2951) 2022-10-25 19:42:01 +03:00
saso
63b8e4d6a0 fix(flag): disable flag parsing for each plugin command (#3074) 2022-10-25 19:02:42 +03:00
DmitriyLewen
cbedd712db feat(nodejs): add support dependency location for yarn.lock files (#3016) 2022-10-25 11:19:21 +03:00
Liam Galvin
b22e37e0c6 chore: Switch github.com/liamg dependencies to github.com/aquasecurity (#3069) 2022-10-25 11:17:47 +03:00
Jose Donizetti
9b0e9794cb feat: add k8s components (#2589)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-10-24 14:51:02 +03:00
behara
5e25182c98 fix(secret): update the regex for secrets scanning (#2964)
Co-authored-by: jyothikumar <behara.jyothi-kumar@aquasec.com>
2022-10-24 14:42:54 +03:00
dependabot[bot]
9947e5111c chore(deps): bump github.com/samber/lo from 1.27.1 to 1.28.2 (#2979)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-10-24 11:30:39 +03:00
Jose Donizetti
d2a15a7377 fix: bump trivy-kubernetes (#3064) 2022-10-23 21:07:41 +03:00
Shahar Naveh
f2efc9c554 docs: fix missing 'image' subcommand (#3051) 2022-10-21 12:44:12 +03:00
tspearconquest
34653c711b chore: Patch golang x/text vulnerability (#3046)
Signed-off-by: Thomas Spear <tspear@conquestcyber.com>
2022-10-21 12:43:50 +03:00
Itay Shakury
e252ea83e0 chore: add licensed project logo (#3058) 2022-10-21 07:22:00 +03:00
MaineK00n
439d216634 feat(ubuntu): set Ubuntu 22.10 EOL (#3054) 2022-10-20 21:52:44 +03:00
Matias Insaurralde
9f5113a920 refactor(analyzer): use strings.TrimSuffix instead of strings.HasSuffix (#3028) 2022-10-20 14:45:33 +03:00
Craig Andrews
c1e24d5344 feat(report): Use understandable value for shortDescription in SARIF reports (#3009)
Signed-off-by: Craig Andrews <candrews@integralblue.com>
Co-authored-by: AMF <work@afdesk.com>
2022-10-20 12:54:59 +03:00
Sen
212af07e27 docs(misconf): fix typo (#3043) 2022-10-20 08:51:37 +03:00
Owen Rumney
68f374ac9a feat: add support for scanning azure ARM (#3011)
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
2022-10-13 20:24:14 +03:00
Craig Andrews
d35c668f5c feat(report): add location.message to SARIF output (#3002) (#3003)
Signed-off-by: Craig Andrews <candrews@integralblue.com>
Co-authored-by: AMF <work@afdesk.com>
2022-10-12 16:07:58 +03:00
dependabot[bot]
2150ffc701 chore(deps): bump github.com/aws/aws-sdk-go from 1.44.95 to 1.44.109 (#2980)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-10-12 15:47:31 +03:00
DmitriyLewen
ca434f7f26 feat(nodejs): add dependency line numbers for npm lock files (#2932) 2022-10-12 15:22:34 +03:00
Hirotaka Tagawa / wafuwafu13
a8ff5f06b5 test(fs): add --skip-files, --skip-dirs (#2984) 2022-10-12 15:20:56 +03:00
6543
561b2e7566 docs: add Woodpecker CI integrations example (#2823)
Co-authored-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-10-12 15:01:59 +03:00
dependabot[bot]
4a3583da95 chore(deps): bump github.com/sigstore/rekor from 0.12.0 to 0.12.2 (#2981)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-10-12 13:45:56 +03:00
dependabot[bot]
4be9eebf07 chore(deps): bump github.com/liamg/memoryfs from 1.4.2 to 1.4.3 (#2976)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-10-12 13:44:35 +03:00
dependabot[bot]
a260d35dc1 chore(deps): bump github.com/spf13/viper from 1.12.0 to 1.13.0 (#2975)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-10-12 13:37:20 +03:00
dependabot[bot]
558189f763 chore(deps): bump github.com/caarlos0/env/v6 from 6.10.0 to 6.10.1 (#2982)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-10-12 13:36:30 +03:00
DmitriyLewen
c2eb6ee301 fix(sbom): ref generation if serialNumber is empty when input is cyclonedx file (#3000) 2022-10-11 21:25:46 +03:00
DmitriyLewen
68f79526bb fix(java): don't stop parsing jar file when wrong inner jar is found (#2989)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-10-11 12:45:44 +03:00
DmitriyLewen
be78da6c40 fix(sbom): use nuget purl type for dotnet-core (#2990)
* use nuget prefix for dotnet-core

* refactor
2022-10-11 12:23:43 +03:00
saso
92b5a1931e perf: retrieve rekor entries in bulk (#2987) 2022-10-09 10:53:00 +03:00
Liam Galvin
babd7e7526 feat(aws): Custom rego policies for AWS scanning (#2994) 2022-10-06 12:51:45 +03:00
AndrewCharlesHay
8ad9b8a939 docs: jq cli formatting (#2881)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-10-02 10:11:03 +03:00
Kyriakos Georgiou
a78684c340 docs(repo): troubleshooting $TMPDIR customization (#2985) 2022-10-02 10:05:09 +03:00
dependabot[bot]
7309ed0a5b chore(deps): bump actions/cache from 3.0.8 to 3.0.9 (#2969) 2022-10-02 10:03:49 +03:00
dependabot[bot]
9515a5ce8b chore(deps): bump actions/stale from 5 to 6 (#2970) 2022-10-02 10:03:26 +03:00
dependabot[bot]
955aff66df chore(deps): bump sigstore/cosign-installer from 2.5.1 to 2.7.0 (#2971) 2022-10-02 10:02:42 +03:00
dependabot[bot]
db56d238fd chore(deps): bump helm/chart-testing-action from 2.3.0 to 2.3.1 (#2972) 2022-10-02 10:02:22 +03:00
dependabot[bot]
05a723246e chore(deps): bump helm/kind-action from 1.3.0 to 1.4.0 (#2973) 2022-10-02 10:01:49 +03:00
afdesk
2c39d4729a chore: run go fmt (#2897) 2022-10-02 09:33:21 +03:00
Crypt Keeper
16a7dc10e0 chore(go): updates wazero to 1.0.0-pre.2 (#2955)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-10-02 09:29:15 +03:00
chavacava
ce4ba7c99c fix(aws): Less function for slice sorting always returns false #2967
Signed-off-by: Salvador Cavadini <salvadorcavadini+github@gmail.com>
2022-10-02 09:28:27 +03:00
DmitriyLewen
4ffe74643e fix(java): fix unmarshal pom exclusions (#2936)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-09-28 19:44:53 +03:00
DmitriyLewen
8b1cee845b fix(java): use fields of dependency from dependencyManagement from upper pom.xml to parse deps (#2943) 2022-09-28 15:32:01 +03:00
chenk
f5cbbb3fde chore: expat lib and go binary deps vulns (#2940)
Signed-off-by: chenk <hen.keinan@gmail.com>
2022-09-28 12:14:29 +03:00
Crypt Keeper
6882bdf561 wasm: Removes accidentally exported memory (#2950)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-09-28 11:12:46 +03:00
DmitriyLewen
6ea9a61cf3 fix(sbom): fix package name separation for gradle (#2906) 2022-09-28 11:11:23 +03:00
DmitriyLewen
3ee4c96f13 docs(readme.md): fix broken integrations link (#2931) 2022-09-28 11:03:20 +03:00
Moniseeta
5745961194 fix(image): handle images with single layer in rescan mergedLayers cache (#2927)
For images with single layer, the layer key was directly being used as merged cache key.
This was posing an issue of data override and any other image having the same layer could get incorrect data.
So, fixed:
1. Even for 1 layer - merged layer key hash will be calculated
2. We will not go with assumption that merged data will have only 1 pkgInfo
3. We are setting a SchemaVersion in blob being generated in ToBlobInfo
2022-09-22 14:46:28 +03:00
DmitriyLewen
e01253d54d fix(cli): split env values with ',' for slice flags (#2926) 2022-09-22 10:11:37 +03:00
Juan Antonio Osorio
0c1a42d4f3 fix(cli): config/helm: also take into account files with .yml (#2928)
YAML files can also have the `.yml` file extension. So the helm config should take that into account.

Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
2022-09-21 17:08:13 +01:00
DmitriyLewen
237b8dcd06 fix(flag): add file-patterns flag for config subcommand (#2925) 2022-09-21 10:02:58 +03:00
dependabot[bot]
047a0b3d88 chore(deps): bump github.com/open-policy-agent/opa from 0.43.0 to 0.43.1 (#2902)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-09-19 14:55:16 +03:00
Teppei Fukuda
585985edb3 docs: add Rekor SBOM attestation scanning (#2893)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2022-09-16 15:43:01 +03:00
Teppei Fukuda
d30fa00adc chore: narrow the owner scope (#2894) 2022-09-16 15:42:31 +03:00
afdesk
38c1513af6 fix: remove a patch number from the recommendation link (#2891) 2022-09-16 12:23:58 +03:00
saso
ba29ce648c fix: enable parsing of UUID-only rekor entry ID (#2887)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-09-16 11:16:41 +03:00
Teppei Fukuda
018eda618b docs(sbom): add SPDX scanning (#2885) 2022-09-16 10:20:40 +03:00
Anais Urlichs
20f1e5991a docs: restructure docs and add tutorials (#2883)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-09-15 21:27:58 +03:00
saso
192fd78ca2 feat(sbom): scan sbom attestation in the rekor record (#2699)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-09-15 20:16:39 +03:00
chenk
597836c3a2 feat(k8s): support outdated-api (#2877) 2022-09-15 13:02:16 +03:00
dependabot[bot]
6c7bd67c04 chore(deps): bump github.com/moby/buildkit from 0.10.3 to 0.10.4 (#2815) 2022-09-15 11:40:54 +03:00
François Poirotte
41270434fe fix(c): support revisions in Conan parser (#2878)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-09-15 11:35:44 +03:00
chenk
b677d7e2e8 feat: dynamic links support for scan results (#2838) 2022-09-15 10:42:33 +03:00
dependabot[bot]
8e03bbb422 chore(deps): bump go.uber.org/zap from 1.22.0 to 1.23.0 (#2818) 2022-09-15 10:16:47 +03:00
George Rodrigues
27005c7d6a docs: update archlinux commands (#2876) 2022-09-15 10:14:53 +03:00
DmitriyLewen
b6e394dc80 feat(secret): add line from dockerfile where secret was added to secret result (#2780)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-09-15 10:13:20 +03:00
Masahiro331
9f6680a1fa feat(sbom): Add unmarshal for spdx (#2868)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-09-15 08:39:59 +03:00
dependabot[bot]
db0aaf18e6 chore(deps): bump github.com/aws/aws-sdk-go-v2/config (#2827) 2022-09-14 17:28:14 +03:00
AndrewCharlesHay
bb3220c3de fix: revert asff arn and add documentation (#2852) 2022-09-14 17:27:46 +03:00
AndrewCharlesHay
c51f2b82e4 docs: batch-import-findings limit (#2851) 2022-09-14 17:26:32 +03:00
dependabot[bot]
552732b5d7 chore(deps): bump golang from 1.19.0 to 1.19.1 (#2872) 2022-09-14 17:23:51 +03:00
Masahiro331
3165c376e2 feat(sbom): Add marshal for spdx (#2867)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-09-14 13:36:10 +03:00
Teppei Fukuda
dac2b4a281 build: checkout before setting up Go (#2873) 2022-09-14 13:27:27 +03:00
Teppei Fukuda
39f83afefe chore: bump Go to 1.19 (#2861)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2022-09-14 11:41:55 +03:00
Carol Valencia
0ce95830c8 docs: azure doc and trivy (#2869)
Co-authored-by: carolina valencia <krol3@users.noreply.github.com>
2022-09-14 09:20:57 +03:00
Owen Rumney
2f37961661 fix: Scan tarr'd dependencies (#2857)
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
2022-09-12 14:55:38 +03:00
Carol Valencia
db14ef3cb5 chore(helm): helm test with ingress (#2630)
Co-authored-by: carolina valencia <krol3@users.noreply.github.com>
2022-09-12 12:13:08 +03:00
DmitriyLewen
acb65d565a feat(report): add secrets to sarif format (#2820)
Co-authored-by: AMF <work@afdesk.com>
2022-09-12 12:12:13 +03:00
dependabot[bot]
a18cd7c00a chore(deps): bump azure/setup-helm from 1.1 to 3.3 (#2807) 2022-09-12 12:11:02 +03:00
Teppei Fukuda
2de903ca35 refactor: add a new interface for initializing analyzers (#2835)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2022-09-12 11:46:53 +03:00
dependabot[bot]
63c3b8ed19 chore(deps): bump github.com/aws/aws-sdk-go from 1.44.77 to 1.44.92 (#2840) 2022-09-08 09:21:40 +03:00
AndrewCharlesHay
6717665ab0 fix: update ProductArn with account id (#2782) 2022-09-08 09:21:05 +03:00
Helge Eichelberg
41a8496716 feat(helm): make cache TTL configurable (#2798)
Signed-off-by: elchenberg <elchenberg@users.noreply.github.com>
2022-09-08 09:12:18 +03:00
Juan Antonio Osorio
0f1f2c1b29 build(): Sign releaser artifacts, not only container manifests (#2789) 2022-09-07 16:56:10 +03:00
Carol Valencia
b389a6f4fc chore: improve doc about azure devops (#2795)
Co-authored-by: carolina valencia <krol3@users.noreply.github.com>
2022-09-07 16:52:53 +03:00
dependabot[bot]
9ef9fce589 chore(deps): bump sigstore/cosign-installer from 2.5.0 to 2.5.1 (#2804) 2022-09-07 16:48:15 +03:00
dependabot[bot]
7b3225d0d8 chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.16.11 to 1.16.14 (#2828) 2022-09-07 16:47:38 +03:00
dependabot[bot]
37733edc4b chore(deps): bump github.com/aws/aws-sdk-go-v2/service/sts (#2825) 2022-09-07 16:46:01 +03:00
Itay Shakury
44d7e8dde1 docs: don't push patch versions (#2824) 2022-09-07 16:40:28 +03:00
DmitriyLewen
4839075c28 feat: add support for conan.lock file (#2779)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-09-06 21:59:13 +03:00
Teppei Fukuda
6b4ddaaef2 feat: cache merged layers
igned-off-by: knqyf263 <knqyf263@gmail.com>
2022-09-06 11:04:00 +03:00
dependabot[bot]
a18f398ac0 chore(deps): bump helm/chart-testing-action from 2.2.1 to 2.3.0 (#2805) 2022-09-04 12:32:45 +03:00
dependabot[bot]
4dcce14051 chore(deps): bump actions/cache from 3.0.5 to 3.0.8 (#2806) 2022-09-04 12:32:04 +03:00
dependabot[bot]
db4544711a chore(deps): bump github.com/caarlos0/env/v6 from 6.9.3 to 6.10.0 (#2811) 2022-09-04 12:15:53 +03:00
dependabot[bot]
a246d0f280 chore(deps): bump github.com/aquasecurity/table from 1.7.2 to 1.8.0 (#2810) 2022-09-04 12:11:31 +03:00
dependabot[bot]
1800017a9a chore(deps): bump github.com/samber/lo from 1.27.0 to 1.27.1 (#2808) 2022-09-04 12:08:54 +03:00
dependabot[bot]
218e41a435 chore(deps): bump github.com/alicebob/miniredis/v2 from 2.22.0 to 2.23.0 (#2814) 2022-09-04 12:08:13 +03:00
DmitriyLewen
a000adeed0 feat: add support for gradle.lockfile (#2759) 2022-09-01 11:27:36 +03:00
Crypt Keeper
43113bc01f chore(mod): updates wazero to 1.0.0-pre.1 #2791
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-09-01 11:09:48 +03:00
jerbob92
5f0bf1445a feat: move file patterns to a global level to be able to use it on any analyzer (#2539) 2022-09-01 11:01:57 +03:00
Alex Samorukov
2580ea1583 Fix url validaton failures (#2783)
While analyzing failure of the report schema validation i found URL looks like that: `https://ubuntu.com/security/notices/USN-5051-4 (regression only in trusty/esm)`. This causing gitlab to mark report as invalid. Patch provided just using first word of the url word.
2022-08-30 15:57:40 +03:00
DmitriyLewen
2473b2c881 fix(image): add logic to detect empty layers (#2790)
* add logic to detect empty layers

* add test for createdBy from buildkit
2022-08-30 15:56:14 +03:00
afdesk
9d018d44b9 feat(rust): add dependency graph from Rust binaries (#2771) 2022-08-30 15:46:38 +03:00
Teppei Fukuda
db67f16ac6 fix: handle empty OS family (#2768) 2022-08-29 08:53:13 +03:00
Jose Donizetti
77616bebae fix: fix k8s summary report (#2777)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-08-25 10:43:39 +03:00
DmitriyLewen
fcccfced23 fix: don't skip packages that don't contain vulns, when using --list-all-pkgs flag (#2767) 2022-08-25 10:40:03 +03:00
Jose Donizetti
8bc215ccf6 chore: bump trivy-kubernetes (#2770)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-08-25 09:37:47 +03:00
Ankush K
d8d8e62793 fix(secret): Consider secrets in rpc calls (#2753) 2022-08-25 09:36:51 +03:00
DmitriyLewen
b0e89d4c57 fix(java): check depManagement from upper pom's (#2747) 2022-08-24 11:22:22 +03:00
afdesk
da6f1b6f25 fix(php): skip composer.lock inside vendor folder (#2718)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-08-23 13:17:09 +03:00
Jose Donizetti
2f2952c658 fix: fix k8s rbac filter (#2765) 2022-08-23 11:56:06 +03:00
afdesk
8bc56bf2fc feat(misconf): skipping misconfigurations by AVD ID (#2743) 2022-08-22 11:06:04 +03:00
Alexander Lauster
9c1ce5afe8 chore(deps): Upgrade Alpine to 3.16.2 to fix zlib issue (#2741) 2022-08-18 17:05:39 +03:00
Herby Gillot
3cd10b2358 docs: add MacPorts install instructions (#2727) 2022-08-17 13:41:55 +03:00
will Farrell
f369bd3e3d docs: typo (#2730) 2022-08-17 10:58:44 +01:00
Liam Galvin
fefe7c4a7b fix: Correctly handle recoverable AWS scanning errors (#2726) 2022-08-16 18:00:44 +03:00
Liam Galvin
9c92e3d185 docs: Remove reference to SecurityAudit policy for AWS scanning (#2721) 2022-08-16 16:31:49 +03:00
Liam Galvin
d343d13ac6 fix: upgrade defsec to v0.71.7 for elb scan panic (#2720) 2022-08-16 15:00:18 +03:00
DmitriyLewen
917f388852 fix(flag): add error when there are no supported security checks (#2713) 2022-08-16 09:57:46 +03:00
Teppei Fukuda
aef02aa174 fix(vuln): continue scanning when no vuln found in the first application (#2712) 2022-08-16 08:41:01 +03:00
Teppei Fukuda
ed1fa89117 revert: add new classes for vulnerabilities (#2701) 2022-08-15 21:40:29 +03:00
DmitriyLewen
a5d4f7fbd9 feat(secret): detect secrets removed or overwritten in upper layer (#2611)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-08-15 20:40:54 +03:00
Moulick Aggarwal
ddffb1b451 fix(cli): secret scanning perf link fix (#2607) 2022-08-15 16:15:22 +03:00
dependabot[bot]
bc85441f7d chore(deps): bump github.com/spf13/viper from 1.8.1 to 1.12.0 (#2650) 2022-08-15 12:33:41 +03:00
Liam Galvin
b259b25ce4 feat: Add AWS Cloud scanning (#2493)
* feat: Added AWS Cloud scanning

Co-authored-by: Owen Rumney <owen.rumney@aquasec.com>
2022-08-11 14:59:32 +01:00
saso
f8edda8479 docs: specify the type when verifying an attestation (#2697) 2022-08-11 13:17:44 +03:00
saso
687941390e docs(sbom): improve SBOM docs by adding a description for scanning SBOM attestation (#2690) 2022-08-10 15:47:40 +03:00
Ankush K
babfb17465 fix(rpc): scanResponse rpc conversion for custom resources (#2692) 2022-08-10 13:45:32 +03:00
Tom Fay
517d2e0109 feat(rust): Add support for cargo-auditable (#2675) 2022-08-10 13:43:23 +03:00
Owen Rumney
01123854b4 feat: Support passing value overrides for configuration checks (#2679) 2022-08-08 18:22:58 +03:00
saso
317a026616 feat(sbom): add support for scanning a sbom attestation (#2652)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-08-08 16:27:05 +03:00
DmitriyLewen
390c256c38 chore(image): skip symlinks and hardlinks from tar scan (#2634) 2022-08-08 15:57:08 +03:00
Matteo Vitali
63c33bfa43 fix(report): Update junit.tpl (#2677)
Add explicit name="trivy" in the testsuite element
2022-08-08 15:47:18 +03:00
Masahiro331
de365c8e92 fix(cyclonedx): add nil check to metadata.component (#2673) 2022-08-08 15:15:38 +03:00
Lior Vaisman Argon
50db7da947 docs(secret): fix missing and broken links (#2674) 2022-08-08 15:14:55 +03:00
Teppei Fukuda
e848e6d009 refactor(cyclonedx): implement json.Unmarshaler (#2662)
* refactor(cyclonedx): implement json.Unmarshaler

* fix: use pointer
2022-08-04 14:15:33 +03:00
dependabot[bot]
df0b5e40db chore(deps): bump github.com/aquasecurity/table from 1.6.0 to 1.7.2 (#2643)
Bumps [github.com/aquasecurity/table](https://github.com/aquasecurity/table) from 1.6.0 to 1.7.2.
- [Release notes](https://github.com/aquasecurity/table/releases)
- [Commits](https://github.com/aquasecurity/table/compare/v1.6.0...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/aquasecurity/table
  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>
2022-08-04 11:44:55 +03:00
dependabot[bot]
006b8a5c29 chore(deps): bump github.com/Azure/go-autorest/autorest (#2642) 2022-08-04 11:43:18 +03:00
Magesh Dhasayyan
8d10de8b4f feat(kubernetes): add option to specify kubeconfig file path (#2576) 2022-08-04 10:18:18 +03:00
Axit Patel
169c55c688 docs: follow Debian's "instructions to connect to a third-party repository" (#2511) 2022-08-04 10:11:38 +03:00
dependabot[bot]
9b21831440 chore(deps): bump github.com/google/licenseclassifier/v2 (#2644) 2022-08-03 15:04:13 +03:00
dependabot[bot]
94db37e541 chore(deps): bump github.com/samber/lo from 1.24.0 to 1.27.0 (#2645) 2022-08-03 14:58:40 +03:00
dependabot[bot]
d9838053df chore(deps): bump github.com/Azure/go-autorest/autorest/adal (#2647) 2022-08-03 14:43:51 +03:00
dependabot[bot]
d8a9572930 chore(deps): bump github.com/cheggaaa/pb/v3 from 3.0.8 to 3.1.0 (#2646) 2022-08-03 10:46:37 +03:00
dependabot[bot]
3ab3050992 chore(deps): bump sigstore/cosign-installer from 2.4.1 to 2.5.0 (#2641) 2022-08-03 10:46:00 +03:00
dependabot[bot]
75984f347b chore(deps): bump actions/cache from 3.0.4 to 3.0.5 (#2640) 2022-08-03 10:44:59 +03:00
dependabot[bot]
525c2530d5 chore(deps): bump alpine from 3.16.0 to 3.16.1 (#2639) 2022-08-03 10:44:27 +03:00
dependabot[bot]
5e327e41a6 chore(deps): bump golang from 1.18.3 to 1.18.4 (#2638) 2022-08-03 10:44:05 +03:00
dependabot[bot]
469d771a59 chore(deps): bump github.com/aws/aws-sdk-go from 1.44.48 to 1.44.66 (#2648) 2022-08-03 10:43:40 +03:00
dependabot[bot]
6bc8c87bc1 chore(deps): bump github.com/open-policy-agent/opa from 0.42.0 to 0.43.0 (#2649) 2022-08-03 10:43:17 +03:00
dependabot[bot]
6ab832d099 chore(deps): bump google.golang.org/protobuf from 1.28.0 to 1.28.1 (#2651) 2022-08-03 10:40:57 +03:00
MaineK00n
3a10497a6f feat(alma): set AlmaLinux 9 EOL (#2653) 2022-08-03 10:40:07 +03:00
Liam Galvin
55825d760b fix(misconf): Allow quotes in Dockerfile WORKDIR when detecting relative dirs (#2636) 2022-08-01 15:38:04 +03:00
DmitriyLewen
6bb0e4b036 test(misconf): add tests for misconf handler for dockerfiles (#2621) 2022-08-01 14:56:53 +03:00
DmitriyLewen
44d53bed48 feat(oracle): set Oracle Linux 9 EOL (#2635) 2022-08-01 10:36:30 +03:00
Teppei Fukuda
f396c677a2 BREAKING: add new classes for vulnerabilities (#2541) 2022-07-31 10:47:08 +03:00
DmitriyLewen
3cd88abec5 fix(secret): add newline escaping for asymmetric private key (#2532) 2022-07-31 10:18:16 +03:00
Ben Bodenmiller
ea91fb91b0 docs: improve formatting (#2572) 2022-07-31 10:17:42 +03:00
cebidhem
d0ca610a96 feat(helm): allows users to define an existing secret for tokens (#2587)
Signed-off-by: cebidhem <cebidhem@pm.me>
2022-07-31 09:56:14 +03:00
DmitriyLewen
d0ba59a44d docs(mariner): use tdnf in fs usage example (#2616) 2022-07-31 09:50:27 +03:00
saso
d7742b6c17 docs: remove unnecessary double quotation marks (#2609) 2022-07-31 09:45:00 +03:00
Liam Galvin
27027cf40d fix: Fix --file-patterns flag (#2625) 2022-07-29 21:54:57 +03:00
saso
c2a7ad5c01 feat(report): add support for Cosign vulnerability attestation (#2567) 2022-07-27 17:39:35 +03:00
DmitriyLewen
dfb86f41f8 docs(mariner): use v2.0 in examples (#2602) 2022-07-27 14:42:09 +03:00
Nate
946ce1672d feat(report): add secrets template for codequality report (#2461) 2022-07-27 10:55:32 +03:00
Teppei Fukuda
f9c17bd2d8 fix: remove the first arg when running as a plugin (#2595) 2022-07-26 21:54:43 +03:00
Jose Donizetti
cccfade374 fix: k8s controlplaner scanning (#2593)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-07-26 16:35:34 +03:00
thiago-gitlab
5a65548662 fix(vuln): GitLab report template (#2578)
* fix(vuln): GitLab report template

- Upgrade to schema 14.0.6 (https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/v14.0.6/dist/container-scanning-report-format.json).
- Drop unsupported `confidence` property. Currently optional and will be removed by GitLab in schema 15-0-0.

* docs(vuln): remove note about broken GitLab integration
2022-07-26 15:51:20 +03:00
afdesk
fa8a8ba7dc fix(server): use a new db worker for hot updates (#2581)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-07-25 17:26:08 +03:00
DmitriyLewen
769ed554b0 docs: add trivy with download-db-only flag to Air-Gapped Environment (#2583) 2022-07-25 16:50:26 +03:00
DmitriyLewen
5f9a963ef6 docs: split commands to download db for different versions of oras (#2582) 2022-07-25 15:19:04 +03:00
Alexander Lauster
d93a997800 feat(report): export exitcode for license checks (#2564)
Also export the exit code for license checks 
fixes #2562
2022-07-25 14:26:12 +03:00
afdesk
f9be138aab fix: cli can use lowercase for severities (#2565) 2022-07-25 14:25:16 +03:00
Teppei Fukuda
c7f0bc92ae fix: allow subcommands with TRIVY_RUN_AS_PLUGIN (#2577) 2022-07-25 11:27:47 +03:00
MaineK00n
c2f3731873 fix: add missing types in TypeOSes and TypeLanguages in analyzer (#2569) 2022-07-24 17:24:13 +03:00
saso
7b4f2dc72f fix: enable some features of the wasm runtime (#2575) 2022-07-24 08:31:54 +03:00
Denys Mazhar
84677903a6 fix(k8s): no error logged if trivy can't get docker image in kubernetes mode (#2521)
* Enable k8s logging and increase log level of the image scan errors

* Rework errors reporting

* Rework GetErrors method into printErrors

Print errors during report writing

* Increase log level for scan errors logging
2022-07-21 15:34:47 -03:00
saso
e1e02d785f docs(sbom): improve sbom attestation documentation (#2566) 2022-07-21 17:54:21 +03:00
afdesk
80c7b91637 fix(report): show the summary without results (#2548) 2022-07-21 14:41:51 +03:00
DmitriyLewen
07c3ac4de1 fix(cli): replace '-' to '_' for env vars (#2561) 2022-07-21 13:41:56 +03:00
Teppei Fukuda
9da45f7bbd chore: remove a test repository (#2551) 2022-07-20 14:25:12 +03:00
Teppei Fukuda
6138f57bf9 fix(license): lazy loading of classifiers (#2547) 2022-07-20 13:43:53 +03:00
DmitriyLewen
2cbe8dfebd fix: CVE-2022-1996 in Trivy (#2499)
* replace k8s.io/client-go

* update trivy-kubernetes
2022-07-20 13:43:37 +03:00
saso
e393ce1477 docs(sbom): add sbom attestation (#2527)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-07-19 11:41:44 +03:00
MaineK00n
ae5a2d06b4 feat(rocky): set Rocky Linux 9 EOL (#2543) 2022-07-19 09:15:09 +03:00
saso
f8dd616545 docs: add attributes to the video tag to autoplay demo videos (#2538) 2022-07-18 12:39:44 +03:00
Owen Rumney
63cbbd071a fix: yaml files with non-string chart name (#2534)
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
2022-07-18 11:04:19 +03:00
afdesk
6d015d32aa fix: skip dirs (#2530) 2022-07-18 08:32:46 +03:00
Shubham Palriwala
30c9f90bf8 feat(repo): add support for branch, commit, & tag (#2494)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-07-17 13:54:28 +03:00
afdesk
783e7cfe0c fix: remove auto configure environment variables via viper (#2526) 2022-07-16 20:32:20 +03:00
DmitriyLewen
45dae7c2cf fix: separating multiple licenses from one line in dpkg copyright files (#2508)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-07-15 14:24:25 +03:00
afdesk
469028dca5 fix: change a capital letter for plugin uninstall subcommand (#2519) 2022-07-15 07:39:15 +03:00
Jose Donizetti
ae9ba340af fix: k8s hide empty report when scanning resource (#2517)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-07-14 10:30:01 -03:00
Teppei Fukuda
783cf6fe74 refactor: fix comments (#2516) 2022-07-14 16:11:20 +03:00
Teppei Fukuda
603825a4f9 fix: scan vendor dir (#2515) 2022-07-14 15:35:58 +03:00
Owen Rumney
a3a66df007 feat: Add support for license scanning (#2418)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-07-13 22:36:41 +03:00
Teppei Fukuda
bb06f6f8cf chore: add owners for secret scanning (#2485)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2022-07-13 14:36:05 +03:00
DmitriyLewen
6b501219de fix: remove dependency-tree flag for image subcommand (#2492) 2022-07-13 14:08:54 +03:00
Jose Donizetti
57192bd5ae fix(k8s): add shorthand for k8s namespace flag (#2495)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-07-13 14:07:25 +03:00
DmitriyLewen
9f8685c14e docs: add information about using multiple servers to troubleshooting (#2498) 2022-07-13 14:05:48 +03:00
DmitriyLewen
ed322ac666 ci: add pushing canary build images to registries (#2428) 2022-07-11 15:49:55 +03:00
dependabot[bot]
8d4dba02c9 chore(deps): bump github.com/open-policy-agent/opa from 0.41.0 to 0.42.0 (#2479)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-07-11 13:37:24 +03:00
afdesk
a6685b1bad feat(dotnet): add support for .Net core .deps.json files (#2487)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-07-11 13:32:38 +03:00
DmitriyLewen
56265a9b98 feat(amazon): add support for 2022 version (#2429)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-07-11 11:16:06 +03:00
Prakarsh
c6f68e361d Type correction bitnami chart (#2415) 2022-07-10 20:45:53 +03:00
dependabot[bot]
6ae4b360fd chore(deps): bump github.com/owenrumney/go-sarif/v2 from 2.1.1 to 2.1.2 (#2449) 2022-07-10 20:00:28 +03:00
dependabot[bot]
6def863470 chore(deps): bump github.com/aquasecurity/table from 1.5.1 to 1.6.0 (#2446) 2022-07-10 20:00:00 +03:00
Teppei Fukuda
e98bde3396 docs: add config file and update CLI references (#2489) 2022-07-10 19:41:42 +03:00
Teppei Fukuda
736e3f11f7 feat: add support for flag groups (#2488) 2022-07-10 15:03:57 +03:00
Teppei Fukuda
5b7e0a858d refactor: move from urfave/cli to spf13/cobra (#2458)
Co-authored-by: afdesk <work@afdesk.com>
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
2022-07-09 19:40:31 +03:00
Liam Galvin
7699153c66 fix: Fix secrets output not containing file/lines (#2467) 2022-07-08 16:17:21 +03:00
afdesk
a70fd758ec fix: clear output with modules (#2478) 2022-07-07 21:13:52 +03:00
dependabot[bot]
e99bf302b6 chore(deps): bump github.com/mailru/easyjson from 0.7.6 to 0.7.7 (#2448) 2022-07-07 11:18:26 +03:00
DmitriyLewen
64854fc850 docs(cbl): distroless 1.0 supported (#2473) 2022-07-07 09:06:01 +03:00
Liam Galvin
e77cfd6487 fix: Fix example dockerfile rego policy (#2460) 2022-07-05 17:46:27 +03:00
DmitriyLewen
e778ac3e21 fix(config): add helm to list of config analyzers (#2457) 2022-07-05 14:42:57 +03:00
Jose Donizetti
aedcf5b58c feat: k8s resouces scan (#2395)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-07-04 14:26:21 -03:00
Masahiro331
5b821d3b13 feat(sbom): add cyclonedx sbom scan (#2203)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-07-03 20:03:21 +03:00
Crypt Keeper
f0720f3ce5 chore(deps): bump wazero to latest main (#2436)
also fixes a redundant close

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-07-03 18:52:37 +03:00
dependabot[bot]
581fe1ed55 chore(deps): bump github.com/stretchr/testify from 1.7.3 to 1.8.0 (#2444) 2022-07-03 12:26:02 +03:00
dependabot[bot]
7a4e0687fc chore(deps): bump github.com/alicebob/miniredis/v2 from 2.21.0 to 2.22.0 (#2445) 2022-07-03 11:45:28 +03:00
dependabot[bot]
422b0fc0f1 chore(deps): bump sigstore/cosign-installer from 2.3.0 to 2.4.1 (#2442) 2022-07-03 10:27:03 +03:00
dependabot[bot]
260756d5b9 chore(deps): bump actions/setup-python from 3 to 4 (#2441) 2022-07-03 10:26:42 +03:00
dependabot[bot]
9b22035967 chore(deps): bump github.com/Azure/azure-sdk-for-go (#2450) 2022-07-03 10:26:20 +03:00
afdesk
c96090ca2c docs: remove links to removed content (#2431) 2022-07-03 10:17:21 +03:00
DmitriyLewen
14be70aa51 ci: added rpm build for rhel 9 (#2437) 2022-07-03 10:15:19 +03:00
DmitriyLewen
71980feca1 fix(secret): remove space from asymmetric private key (#2434) 2022-07-03 10:14:36 +03:00
dependabot[bot]
d94df3d9be chore(deps): bump actions/cache from 3.0.2 to 3.0.4 (#2440) 2022-07-01 18:42:31 +03:00
dependabot[bot]
d213223044 chore(deps): bump helm/kind-action from 1.2.0 to 1.3.0 (#2439) 2022-07-01 18:42:08 +03:00
dependabot[bot]
8e0c537392 chore(deps): bump golang from 1.18.2 to 1.18.3 (#2438) 2022-07-01 18:41:43 +03:00
dependabot[bot]
005d0243df chore(deps): bump github.com/aws/aws-sdk-go from 1.44.25 to 1.44.46 (#2447) 2022-07-01 18:41:19 +03:00
DmitriyLewen
7de7a1f8f3 test(integration): fix golden files for debian 9 (#2435) 2022-07-01 11:21:04 +03:00
Jonathan Pulsifer
f64534651a fix(cli): fix version string in docs link when secret scanning is enabled (#2422)
Signed-off-by: Jonathan Pulsifer <jonathan@pulsifer.ca>
2022-06-30 16:58:40 +03:00
Teppei Fukuda
164094968f refactor: move CycloneDX marshaling (#2420) 2022-06-30 10:37:46 +03:00
mycodeself
6be6f74d5c docs(nodejs): add docs about pnpm support (#2423) 2022-06-30 10:33:29 +03:00
Jose Donizetti
ac2fdc87ae docs: improve k8s usage documentation (#2425)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-06-30 10:28:52 +03:00
Liam Galvin
fe2ae8edc8 feat: Make secrets scanning output consistant (#2410) 2022-06-29 17:23:39 +03:00
DmitriyLewen
0ed39fc805 ci: create canary build after main branch changes (#1638)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-29 16:58:11 +03:00
afdesk
7111301fa4 fix(misconf): skip broken scans (#2396) 2022-06-29 13:35:38 +03:00
mycodeself
c36a373def feat(nodejs): add pnpm support (#2414)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-29 13:31:04 +03:00
Liam Galvin
e060026ec8 fix: Fix false positive for use of COS images (#2413)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-06-29 11:03:47 +03:00
Teppei Fukuda
8d03e5af9f eliminate nerdctl dependency (#2412) 2022-06-28 21:28:59 +03:00
Guilherme Macedo
938c0d1866 Add EOL date for SUSE SLES 15.3, 15.4 and OpenSUSE 15.4 (#2403)
Signed-off-by: Guilherme Macedo <guilherme.macedo@suse.com>
2022-06-28 06:26:44 +03:00
afdesk
6e8b50ede9 fix(go): no cast to lowercase go package names (#2401) 2022-06-27 17:31:58 +03:00
Teppei Fukuda
4a197efcb2 BREAKING(sbom): change 'trivy sbom' to scan SBOM (#2408) 2022-06-27 16:42:41 +03:00
afdesk
e2c3bc4124 fix(server): hot update the db from custom repository (#2406) 2022-06-27 13:45:48 +03:00
DmitriyLewen
57ed577459 feat: added license parser for dpkg (#2381)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-27 13:04:53 +03:00
Erik Godding Boye
4656850c04 chore(helm): bump appVersion to latest release (#2397)
Signed-off-by: Erik Godding Boye <egboye@gmail.com>
2022-06-27 12:18:54 +03:00
Liam Galvin
c537c91d75 fix(misconf): Update defsec (v0.68.5) to fix docker rego duplicate key (#2400)
Resolves #2394

Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-06-26 09:37:57 +03:00
Jose Donizetti
ee58d53fc8 feat: extract stripe publishable and secret keys (#2392) 2022-06-23 17:01:59 +03:00
chenk
776ef1a31e feat: rbac support k8s sub-command (#2339) 2022-06-23 13:49:14 +03:00
Kyriakos Georgiou
6ed789e88b feat(ruby): drop platform strings from dependency versions bundled with bundler v2 (#2390)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-23 10:49:05 +03:00
Anais Urlichs
bc27198d3e docs: Updating README with new CLI command (#2359) 2022-06-22 14:46:48 +03:00
Liam Galvin
4c35084f27 fix(misconf): Update defsec to v0.68.4 to resolve CF detection bug (#2383) 2022-06-22 14:02:40 +03:00
Itay Shakury
394c948130 chore: add integration label and merge security label (#2316)
* chore: add integration label and merge security label

* use the kind/security label for vulnerabilities

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-22 12:11:37 +03:00
afdesk
6b515bc736 chore: skip Visual Studio Code project folder (#2379) 2022-06-22 10:16:45 +03:00
afdesk
25416ae6d8 fix(helm): handle charts with templated names (#2374) 2022-06-21 20:34:17 +03:00
chenk
85cca55930 docs: redirect operator docs to trivy-operator repo (#2372) 2022-06-21 18:00:28 +03:00
Teppei Fukuda
b944ac6286 Merge pull request #2356 from aquasecurity/liamg-merge-fanal-magic-attempt-2
refactor: merge fanal into trivy
2022-06-21 17:15:10 +03:00
buda
9809a07bf1 fix(secret): use secret result when determining Failed status (#2370) 2022-06-21 17:01:20 +03:00
knqyf263
e9831cec2f try removing libdb-dev 2022-06-21 16:18:55 +03:00
knqyf263
04c01f6297 run integration tests in fanal 2022-06-21 16:18:08 +03:00
knqyf263
86e19bb677 use same testing images in fanal 2022-06-21 16:18:06 +03:00
Erik Godding Boye
484ddd897d feat(helm): add support for trivy dbRepository (#2345)
Signed-off-by: Erik Godding Boye <egboye@gmail.com>
2022-06-21 09:02:00 +03:00
Liam Galvin
9e7404e76d fix: Fix failing test due to deref lint issue 2022-06-20 13:13:23 +01:00
afdesk
6ce9404c16 fix(report): add required fields to the SARIF template (#2341)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-06-20 13:31:21 +03:00
Liam Galvin
85c6529cb5 test: Fix broken test 2022-06-20 10:42:23 +01:00
Liam Galvin
6c983cbf45 fix: Fix makefile when no previous named ref is visible in a shallow clone 2022-06-20 10:31:13 +01:00
Liam Galvin
1ac4fd8a61 chore: Fix linting issues in fanal 2022-06-20 10:11:13 +01:00
Liam Galvin
094db23a03 refactor: Fix fanal import paths and remove dotfiles 2022-06-20 09:43:33 +01:00
Liam Galvin
b6f615b535 refactor: Merge fanal into Trivy 2022-06-20 09:40:05 +01:00
Josh Soref
d6d0a60d16 chore: fix spelling errors (#2352) 2022-06-20 09:56:13 +03:00
Ben Harvey
6f1035269d Omit Remediation if PrimaryURL is empty (#2006) 2022-06-19 15:16:08 +03:00
Schlump
396e404eeb docs(repo): Link to installation documentation in readme shows 404 (#2348) 2022-06-19 15:11:31 +03:00
MaineK00n
79e941df0d feat(alma): support for scanning of modular packages for AlmaLinux (#2347) 2022-06-17 10:15:27 +03:00
AndreyLevchenko
cb76acbd9f fix(lang): fix dependency graph in client server mode (#2336) 2022-06-16 13:05:55 +03:00
maltemorgenstern
3d2fc78852 feat: allow expiration date for .trivyignore entries (#2332)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-06-16 13:04:19 +03:00
AndreyLevchenko
3e3c119555 feat(lang): add dependency origin graph (#1970)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-16 10:34:26 +03:00
j-k
685a92e09a docs: update nix installation info (#2331) 2022-06-15 20:11:09 +03:00
chenk
1e0b03d47f feat: add rbac scanning support (#2328) 2022-06-15 20:01:22 +03:00
chenk
6765c77c38 Merge pull request fanal#566 from chen-keinan/chore/bump-fanal-version
chore: bump defsec version v0.68.1
2022-06-15 18:05:50 +03:00
chenk
644ada1279 chore: bump defsec version v0.68.1
Signed-off-by: chenk <hen.keinan@gmail.com>
2022-06-15 17:48:55 +03:00
Teppei Fukuda
c9f9a9c917 refactor: move WordPress module to another repository (#2329)
* refactor: remove go.mod/sum from example

* move a wordpress example out
2022-06-15 16:56:51 +03:00
Rafael Sene
bcc231d3ba ci: add support for ppc64le (#2281)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-15 16:51:03 +03:00
Teppei Fukuda
7cecade3a1 feat: add support for WASM modules (#2195) 2022-06-15 15:23:00 +03:00
DmitriyLewen
a9ddb39d5f fix(secrets): added allow rule for examples (fanal#565)
* fix(secrets): added allow rule for examples

* test(secrets): added test for skip example file
2022-06-15 14:55:21 +03:00
Teppei Fukuda
a02c06bafd feat(secret): show recommendation for slow scanning (#2051)
Co-authored-by: afdesk <work@afdesk.com>
2022-06-15 12:39:32 +03:00
mycodeself
e85881231f fix(flag): remove --clear-cache flag client mode (#2301) 2022-06-15 11:48:24 +03:00
chenk
8d13f3da95 feat: support rbac scanner and type (fanal#563)
Signed-off-by: chenk <hen.keinan@gmail.com>
2022-06-15 11:39:17 +03:00
DmitriyLewen
276daae672 fix(java): added check for looping for variable evaluation in pom file (#2322) 2022-06-15 11:23:52 +03:00
Jose Donizetti
546e7bd6b1 BREAKING(k8s): change CLI API (#2186) 2022-06-15 10:41:18 +03:00
MaineK00n
b69c4de757 feat(alpine): add Alpine Linux 3.16 (#2319) 2022-06-14 20:00:26 +03:00
Jose Donizetti
33b8521aee docs: bump trivy-operator to v0.0.7 (#2320) 2022-06-14 19:59:48 +03:00
DmitriyLewen
c0ad4f705e chore(deps): updated go-dep-parser (fanal#556)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-14 15:34:34 +03:00
dependabot[bot]
a6f4ab3735 chore(deps): bump github.com/Azure/go-autorest/autorest/adal (fanal#543) 2022-06-14 15:13:19 +03:00
Teppei Fukuda
8ae754a7d2 Add custom resources in fs scanning and add deregister analyzers (fanal#564)
* Add deregister analyzers

* feat(fs): add CustomResources
2022-06-14 14:48:54 +03:00
afdesk
313ade3386 ci: add go mod tidy check (#2314) 2022-06-14 10:54:45 +03:00
afdesk
b331e771aa chore: run go mod tidy (#2313) 2022-06-14 08:19:38 +03:00
Jose Donizetti
bfe5c6f14f fix: do not exit if one resource is not found (#2311)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-06-13 17:13:19 +03:00
Patrick Decat
363a3e40ea feat(cli): use stderr for all log messages (resolve #381) (#2289) 2022-06-13 13:47:16 +03:00
afdesk
b213956cea test: replace deprecated subcommand client in integration tests (#2308) 2022-06-12 20:38:55 +03:00
Teppei Fukuda
efbc968ca8 feat: add support for containerd (#2305)
* chore(deps): bump fanal

* replace containerd

* fix: update signatures

* docs: containerd
2022-06-12 17:50:23 +03:00
Owen Rumney
9a601d49ef fix(kubernetes): Support floats in manifest yaml (#2297)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-12 17:01:50 +03:00
chenk
a589353bb3 docs(kubernetes): dead links (#2307)
Signed-off-by: chenk <hen.keinan@gmail.com>
2022-06-12 16:40:40 +03:00
Itay Shakury
f38f8d66fb chore: add license label (#2304) 2022-06-12 13:14:53 +03:00
geyingqi
decad9b429 Support get local image by containerd (fanal#348)
Co-authored-by: Andrey Levchenko <levchenko.andrey@gmail.com>
Co-authored-by: afdesk <work@afdesk.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-12 13:04:12 +03:00
Owen Rumney
9c531904ad chore(deps): update defsec (fanal#558)
* chore(deps): update defsec
* fix: update tests with changes
* fix test
* fix: lint fixes

Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
2022-06-10 08:48:19 +01:00
DmitriyLewen
2b1de93249 feat(mariner): added support for CBL-Mariner Distroless v2.0 (#2293) 2022-06-09 13:45:01 +03:00
JBOClara
5423196f4c feat(helm): add pod annotations (#2272)
Co-authored-by: azman0101 <azman0101@gmail.com>
2022-06-09 11:13:26 +03:00
DmitriyLewen
6fb477097c refactor: do not import defsec in fanal types package (#2292) 2022-06-09 11:11:44 +03:00
Rafael Sene
df669592ed Bump go-rpmdb (fanal#553)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-09 10:35:23 +03:00
DmitriyLewen
74fcd3f881 feat(mariner): added support for CBL-Mariner Distroless v2.0 (fanal#552)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-06-09 10:18:27 +03:00
DmitriyLewen
d523424fda feat(npm): calculate indirect libraries (fanal#557) 2022-06-09 10:05:07 +03:00
afdesk
42267f94c5 refactor: remove unused field imageName from integration test (fanal#555) 2022-06-08 15:24:31 +03:00
Liam Galvin
4d382a0302 feat(report): Add misconfiguration support to ASFF report template (#2285) 2022-06-08 14:28:18 +03:00
dependabot[bot]
1343996fec chore(deps): bump github.com/urfave/cli/v2 from 2.6.0 to 2.8.1 (fanal#544) 2022-06-08 14:25:34 +03:00
dependabot[bot]
8a877c5b29 chore(deps): bump github.com/Azure/azure-sdk-for-go (fanal#545) 2022-06-08 14:25:15 +03:00
dependabot[bot]
59f1a04ba5 chore(deps): bump github.com/samber/lo from 1.19.0 to 1.21.0 (fanal#546) 2022-06-08 14:24:48 +03:00
afdesk
d5a62c9a5c test: use images in GHCR for integration tests (fanal#554) 2022-06-08 14:23:22 +03:00
Teppei Fukuda
f1c6af3121 test: use images in GHCR (#2275)
Co-authored-by: AMF <work@afdesk.com>
2022-06-07 13:50:32 +03:00
mycodeself
0977dfcde8 feat(helm): support pod annotations (#2265) 2022-06-07 11:42:58 +03:00
Owen Rumney
6b2cd7e8da feat(misconf): Helm chart scanning (#2269)
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
2022-06-07 11:38:43 +03:00
Teppei Fukuda
96ce2db949 refactor: do not import defsec in types package (fanal#537)
* refactor: do not import defsec in types package

* test(external): fix imports
2022-06-07 11:26:32 +03:00
Owen Rumney
6c25b8326e fix: support for helm chart *.tar.gz (fanal#551)
* fix: support for helm chart *.tar.gz

- add test to validate

Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>

* fix: adding missing test tar

Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
2022-06-06 12:40:23 +01:00
Liam Galvin
3912768470 docs: Update custom rego policy docs to reflect latest defsec/fanal changes (#2267)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-06-06 12:51:23 +03:00
mycodeself
a17c3eec2a fix: mask redis credentials when logging (#2264) 2022-06-06 11:07:08 +03:00
Jose Donizetti
d8b59efea9 refactor: extract commands Runner interface (#2147) 2022-06-06 11:04:24 +03:00
dependabot[bot]
60a81fcb95 chore(deps): bump alpine from 3.15.4 to 3.16.0 (#2234) 2022-06-06 08:09:24 +03:00
dependabot[bot]
c73650d967 chore(deps): bump github.com/CycloneDX/cyclonedx-go from 0.5.2 to 0.6.0 (#2245) 2022-06-06 08:08:49 +03:00
chenk
6cfdffda18 docs: update operator release (#2263)
Signed-off-by: chenk <hen.keinan@gmail.com>
2022-06-06 07:39:20 +03:00
dependabot[bot]
510ce1a782 chore(deps): bump github.com/urfave/cli/v2 from 2.6.0 to 2.8.1 (#2243) 2022-06-02 16:48:59 +03:00
DmitriyLewen
92c0452b74 feat(redhat): added architecture check (#2172)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-06-02 15:35:42 +03:00
Anais Urlichs
1eb73f3fea docs: updating links in the docs to work again (#2256) 2022-06-02 15:22:51 +03:00
Jose Donizetti
270dc7346f docs: fix readme (#2251) 2022-06-02 12:59:35 +03:00
DmitriyLewen
a6ff0d12bb fix: fixed incorrect CycloneDX output format (#2255) 2022-06-02 09:55:49 +03:00
Masahiro331
43997f33c8 feat(types): add Ref to package (fanal#540) 2022-06-02 07:33:45 +03:00
dependabot[bot]
64c91249ef chore(deps): bump golangci/golangci-lint-action from 3.1.0 to 3.2.0 (fanal#541) 2022-06-01 19:35:08 +03:00
dependabot[bot]
7baccf2088 chore(deps): bump github.com/alicebob/miniredis/v2 from 2.18.0 to 2.21.0 (fanal#547) 2022-06-01 19:34:46 +03:00
dependabot[bot]
7dd7e2ba00 chore(deps): bump github.com/aws/aws-sdk-go from 1.44.5 to 1.44.25 (fanal#548) 2022-06-01 19:34:24 +03:00
dependabot[bot]
67d94774ba chore(deps): bump github.com/caarlos0/env/v6 from 6.9.1 to 6.9.3 (#2241) 2022-06-01 17:43:49 +03:00
dependabot[bot]
3e6dc37728 chore(deps): bump github.com/samber/lo from 1.19.0 to 1.21.0 (#2242) 2022-06-01 17:43:12 +03:00
dependabot[bot]
2dc5c9152e chore(deps): bump goreleaser/goreleaser-action from 2 to 3 (#2240) 2022-06-01 17:42:17 +03:00
dependabot[bot]
6daf62ebeb chore(deps): bump docker/setup-buildx-action from 1 to 2 (#2238) 2022-06-01 17:40:44 +03:00
dependabot[bot]
f9ee4943b1 chore(deps): bump docker/setup-qemu-action from 1 to 2 (#2236) 2022-06-01 17:40:14 +03:00
dependabot[bot]
c3e227b625 chore(deps): bump golang from 1.18.1 to 1.18.2 (#2235) 2022-06-01 17:39:23 +03:00
dependabot[bot]
ca390411f3 chore(deps): bump golangci/golangci-lint-action from 3.1.0 to 3.2.0 (#2237) 2022-06-01 17:38:34 +03:00
dependabot[bot]
c676361681 chore(deps): bump docker/login-action from 1 to 2 (#2239) 2022-06-01 17:38:03 +03:00
dependabot[bot]
126fe0abba chore(deps): bump github.com/hashicorp/go-getter from 1.5.11 to 1.6.1 (#2246) 2022-06-01 17:35:54 +03:00
AndreyLevchenko
f7d02538f6 refactor(deps): move dependencies to package (#2189) 2022-06-01 16:09:50 +03:00
Shira Cohen
f982167c0a fix(report): change github format version to required (#2229) 2022-06-01 15:39:40 +03:00
Itay Shakury
d3a73e4db7 docs: update readme (#2110)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-06-01 12:35:24 +03:00
DmitriyLewen
5d5b93ed69 docs: added information about choosing advisory database (#2212)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-06-01 11:26:46 +03:00
Jose Donizetti
36498501bf chore: update trivy-kubernetes (#2224)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-31 16:01:50 -03:00
Anais Urlichs
3c0e354743 docs: clarifying parts of the k8s docs and updating links (#2222) 2022-05-31 22:00:47 +03:00
Owen Rumney
f5e655e22a feat: adding helm support (fanal#534)
* feat: adding helm support
  -  adding tests for helm analyzer
  -  add test for non helm tarball
  -  adding in-memory filesystem for helm
  -  handle multiple charts at a time
  - check the size is smaller than arbitrary size of 200MB if a tarball
2022-05-31 18:50:57 +01:00
Jose Donizetti
af5882bc3e fix(k8s): timeout error logging (#2179)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-31 14:21:07 -03:00
DmitriyLewen
3d2921343b chore(deps): updated fanal after fix AsymmetricPrivateKeys (#2214) 2022-05-31 15:10:50 +03:00
AndreyLevchenko
df47d1be15 refactor(deps): move dependencies to package (fanal#535)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-31 15:04:23 +03:00
DmitriyLewen
ef8d77351f fix(secrets): AsymmetricPrivateKeys use only base64 characters (fanal#539) 2022-05-31 13:19:52 +03:00
Jose Donizetti
e18f38af3c feat(k8s): add --context flag (#2171)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-31 07:06:10 -03:00
Jose Donizetti
0e937b5367 fix(k8s): properly instantiate TableWriter (#2175)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-31 07:02:23 -03:00
DmitriyLewen
911c5e971a test: fixed integration tests after updating testcontainers to v0.13.0 (#2208) 2022-05-31 10:49:24 +03:00
Teppei Fukuda
6fd1887e64 chore: update labels (#2197)
* chore: update labels

* add targets
2022-05-30 15:55:05 +03:00
DmitriyLewen
4059e94aba fix(report): fixed panic if all misconf reports were removed in filter (#2188)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-30 15:16:42 +03:00
dependabot[bot]
24005c3ed0 chore(deps): bump github.com/testcontainers/testcontainers-go from 0.12.0 to 0.13.0 (fanal#502)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
2022-05-30 09:34:01 +03:00
Jose Donizetti
84af32a7fe feat(k8s): scan secrets (#2178) 2022-05-29 16:40:51 +03:00
dependabot[bot]
193680b1ed chore(deps): bump github.com/urfave/cli/v2 from 2.4.0 to 2.6.0 (fanal#517) 2022-05-29 11:08:01 +03:00
DmitriyLewen
22db37e9da fix(secrets): added leading slash for file paths extracted from image (fanal#525)
* fix(secrets): added '/' for file paths derived from image

* refactor(secrets): used input.Dir to find image scan

* test(secrets): added path to image-config.yaml
2022-05-29 11:07:38 +03:00
AndreyLevchenko
4ab696eaa2 feat(report): GitHub Dependency Snapshots support (#1522)
Co-authored-by: Shira Cohen <97398476+ShiraCohen33@users.noreply.github.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-26 21:34:15 +03:00
DmitriyLewen
b7ec642572 feat(db): added insecure skip tls verify to download trivy db (#2140)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-05-26 14:54:39 +03:00
DmitriyLewen
1e1ccbec52 fix(redhat): always use vulns with fixed version if there is one (#2165)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-26 11:24:31 +03:00
Vincent Palmer
4ceae2a052 chore(redhat): Add support for Red Hat UBI 9. (#2183)
* chore(redhat): Add support for Red Hat UBI 9.

* docs: add Red Hat UBI 9

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-26 10:08:30 +03:00
Jose Donizetti
4e7e842682 fix(k8s): update trivy-kubernetes (#2163)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-26 10:01:02 +03:00
Nate
089d34e866 fix misconfig start line for code quality tpl (#2181)
Co-authored-by: Nate Fear <natefear@users.noreply.github.com>
2022-05-26 09:41:29 +03:00
Lucas Bickel
bfb0f2a193 fix: update docker/distribution from 2.8.0 to 2.8.1 (#2176)
Signed-off-by: Lucas Bickel <lucas.bickel@adfinis.com>
2022-05-26 08:11:06 +03:00
thiago-gitlab
f19243127a docs(vuln): Include GitLab 15.0 integration (#2153) 2022-05-22 10:51:44 +03:00
Owen Rumney
4c6a866cce docs: fix the operator version (#2167) 2022-05-20 20:19:28 +03:00
Jose Donizetti
3ecc65d626 fix(k8s): summary report when when only vulns exit (#2146)
* fix(k8s): summary report when when only vulns exit

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>

* fix(k8s): return error for not supported report

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>

* test(k8s): add tests for report Failed()

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>

* refactor: improve error message

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-19 10:00:37 -03:00
Liam Galvin
6b95d3857f chore(deps): Update fanal to get defsec v0.58.2 (fixes false positives in ksv038) (#2156)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-05-19 15:33:33 +03:00
Liam Galvin
894fa25106 chore(deps): Update defsec to v0.58.2 (fixes false positives in ksv038) (fanal#533)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-05-19 14:47:54 +03:00
Liam Galvin
f6cfcaf193 perf(misconf): Improve performance when scanning very large files (#2152)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-05-18 18:57:32 +03:00
Liam Galvin
94f999ec07 perf(misconf): Update defsec to v0.58.1 to optimise result creation for very large files (fanal#532)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-05-18 13:41:01 +01:00
Liam Galvin
4b4a0c95ba docs(misconf): Update examples and docs to refer to builtin/defsec instead of appshield (#2150)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-05-18 14:49:15 +03:00
Liam Galvin
6d79fcacfc chore(deps): Update fanal (for less verbose code in misconf results) (#2151)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-05-18 13:47:53 +03:00
Liam Galvin
7a84438925 chore(deps): Update defsec to v0.58.0 (fanal#530)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-05-18 10:46:53 +01:00
DmitriyLewen
f8951f3847 docs: fixed installation instruction for rhel/centos (#2143) 2022-05-17 21:19:33 +03:00
Owen Rumney
afe3292843 fix: remove Highlighted from json output (#2131)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-16 19:04:09 +03:00
Jose Donizetti
3d23ad846c fix: remove trivy-kubernetes replace (#2132)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-16 18:56:22 +03:00
Owen Rumney
9822b40862 docs: Add Operator docs under Kubernetes section (#2111)
Co-authored-by: Itay Shakury <itay@itaysk.com>
2022-05-16 17:58:25 +03:00
Owen Rumney
898aaaa11c Merge pull request fanal#529 from aquasecurity/owenr-remove-highlighting-from-results
chore(deps): latest defsec for Highlight code ommission
2022-05-16 15:36:51 +01:00
Owen Rumney
c8682b55e2 fix: update defsec and fix tests accordingly 2022-05-16 15:29:06 +01:00
Jose Donizetti
bb6ff8511b fix(k8s): security-checks panic (#2127) 2022-05-16 17:24:33 +03:00
Owen Rumney
f776a91d18 chore(deps): update defsec 2022-05-16 15:09:13 +01:00
DmitriyLewen
3bed96f0cf ci: added k8s scope (#2130) 2022-05-16 16:17:38 +03:00
Liam Galvin
4a7544caea docs: Update misconfig output in examples (#2128) 2022-05-16 16:16:55 +03:00
Owen Rumney
267adde71b fix: remove Highlighted from json output 2022-05-16 13:48:08 +01:00
Liam Galvin
b7fc3dfc98 fix(misconf): Fix coloured output in Goland terminal (#2126) 2022-05-16 15:26:23 +03:00
Liam Galvin
95285015df chore(deps): Update defsec to v0.57.6 (fanal#528)
* chore(deps): Update defsec to v0.57.6
2022-05-16 12:07:34 +01:00
thiago-gitlab
89893a7303 docs(secret): Fix default value of --security-checks in docs (#2107)
* Fix default value of --security-checks in docs

* Add missing value to security-checks option
2022-05-16 10:49:10 +03:00
Teppei Fukuda
dbba0bf152 refactor(report): move colorize function from trivy-db (#2122) 2022-05-15 20:53:24 +03:00
Jose Donizetti
3ef450d9a4 feat: k8s resource scanning (#2118) 2022-05-15 19:01:58 +03:00
Teppei Fukuda
f4ec4e7483 chore: add CODEOWNERS (#2121) 2022-05-15 16:02:41 +03:00
afdesk
96a5cb106a feat(image): add --server option for remote scans (#1871)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-15 14:56:48 +03:00
Jose Donizetti
023e09e3f3 refactor: k8s (#2116)
* refactor: add pkg/k8s

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>

* refactor: extract scanner

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>

* refactor: extract scanVulns

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>

* refactor: extract scanMisconfigs

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>

* refactor: extract filter

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>

* refactor: improve k8s/run.go

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>

* fix(k8s): code improvements

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>

* chore: go mod tidy

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-15 08:07:31 -03:00
Teppei Fukuda
b3759f54fa refactor: export useful APIs (#2108)
Co-authored-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-13 22:09:20 +03:00
Jose Donizetti
dbf4b2dec5 docs: fix k8s doc (#2114)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-13 22:04:09 +03:00
Owen Rumney
2ae8faa7a8 feat(kubernetes): Add report flag for summary (#2112)
* feat(k8s): Add report flag for summary
* chore: add headings to the severity columns
* chore: make the default output of k8s summary table

Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
2022-05-13 19:02:01 +01:00
Liam Galvin
5f004f03d9 fix: Remove problematic advanced rego policies (#2113)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-13 20:28:57 +03:00
Liam Galvin
3679bc358c feat(misconf): Add special output format for misconfigurations (#2100) 2022-05-13 19:59:02 +03:00
Liam Galvin
0911eea9c0 chore(deps): Update defsec to v0.57.5 (remove commercial rego rules) (fanal#527) 2022-05-13 17:35:15 +01:00
Jose Donizetti
029dd76c30 feat: add k8s subcommand (#2065)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-12 21:11:29 +03:00
dependabot[bot]
cc5d76b4ee chore(deps): bump github.com/Azure/azure-sdk-for-go (fanal#518) 2022-05-12 09:38:03 +03:00
DmitriyLewen
be3993b60a fix(secrets): skip aws secrets of greater length (fanal#514) 2022-05-12 09:21:42 +03:00
Jose Donizetti
a39133a13c chore: fix make lint version (#2102)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-11 22:58:48 +03:00
Shira Cohen
995024f148 fix(java): handle relative pom modules (#2101) 2022-05-11 16:04:03 +03:00
Liam Galvin
3487accd99 chore(deps): Update defsec to v0.57.3 for improved syntax highlighting (fanal#524)
* chore(deps): Update defsec to v0.57.3 for improved syntax highlighting
2022-05-11 12:52:04 +01:00
Liam Galvin
c8e07a4bf8 chore(deps): Update defsec to v0.56.2 (fanal#523) 2022-05-10 16:36:46 +01:00
Shira Cohen
4249a1cadb Pom modules (fanal#511) 2022-05-10 18:25:57 +03:00
Liam Galvin
c9f9a346cc fix(misconf): Add missing links for non-rego misconfig results (#2094) 2022-05-10 17:52:34 +03:00
Liam Galvin
52934d2340 feat: Add causal code to misconfig results (fanal#522) 2022-05-10 13:52:56 +01:00
Liam Galvin
5a58e41476 feat(misconf): Added fs.FS based scanning via latest defsec (#2084)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-10 15:05:00 +03:00
Liam Galvin
329f071b30 chore(deps): Update defsec for 'builtin' namespaced rego policies (fanal#521) 2022-05-10 11:37:59 +01:00
Liam Galvin
154ccc6e35 chore(deps): Update defsec to v0.55.5 (adds freebsd support) (fanal#520) 2022-05-10 09:55:23 +01:00
Teppei Fukuda
49cfa08d25 fix(handler): import go mod handler (fanal#519) 2022-05-09 23:35:58 +03:00
Teppei Fukuda
bcc0218200 feat: add post handler (fanal#460)
Co-authored-by: Liam Galvin <liam.galvin@aquasec.com>
Co-authored-by: Liam Galvin <liamgalvin@protonmail.com>
2022-05-09 22:43:39 +03:00
Teppei Fukuda
fbb83c42d9 chore(deps): bump trivy-issue-action to v0.0.4 (#2091) 2022-05-06 20:45:02 +03:00
dependabot[bot]
8a4b49ca70 chore(deps): bump github.com/twitchtv/twirp (#2077) 2022-05-06 19:04:34 +03:00
dependabot[bot]
7ba773f2bb chore(deps): bump github.com/urfave/cli/v2 from 2.4.0 to 2.5.1 (#2074) 2022-05-06 18:20:50 +03:00
DmitriyLewen
bd94618b34 chore(os): updated fanal version and alpine distroless test (#2086) 2022-05-06 18:18:59 +03:00
dependabot[bot]
5feabc10ee chore(deps): bump github.com/aws/aws-sdk-go from 1.43.31 to 1.44.5 (fanal#512) 2022-05-03 19:36:17 +03:00
dependabot[bot]
fa03e9e983 chore(deps): bump github.com/open-policy-agent/opa from 0.39.0 to 0.40.0 (fanal#506) 2022-05-03 19:25:27 +03:00
dependabot[bot]
fa5dcaf8f2 chore(deps): bump github.com/CycloneDX/cyclonedx-go from 0.5.1 to 0.5.2 (#2075) 2022-05-03 19:07:20 +03:00
AndreyLevchenko
6d8ae1959c feat(lang): add parent dependencies (fanal#459)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-03 19:06:36 +03:00
Teppei Fukuda
d137df24f7 feat(analyzer): more general support for os-release (fanal#470)
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
2022-05-03 19:06:02 +03:00
dependabot[bot]
2c57716359 chore(deps): bump github.com/samber/lo from 1.16.0 to 1.19.0 (#2076) 2022-05-03 19:00:31 +03:00
VaismanLior
d08f3dfd6d refactor(secret): allow list match with secret subgroups (fanal#510)
* refactor(secret): allow list match with secret subgroups

* chore(secret): ignore locale/locales

* added tests to allow rules refactor

* update builtin avoid-tests rule

* update builtin avoid-tests rule desc
2022-05-03 15:02:53 +03:00
dependabot[bot]
346496f943 chore(deps): bump github.com/Azure/go-autorest/autorest (fanal#509) 2022-05-03 14:49:01 +03:00
Shira Cohen
6601d2957a feat(report): add support for SPDX (#2059)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-05-02 13:44:26 +03:00
dependabot[bot]
2e870836dd chore(deps): bump github.com/samber/lo from 1.15.0 to 1.19.0 (fanal#505) 2022-05-02 09:04:10 +03:00
dependabot[bot]
4066b57a84 chore(deps): bump actions/setup-go from 2 to 3 (fanal#499) 2022-05-02 09:03:39 +03:00
dependabot[bot]
6e2453c2d6 chore(deps): bump actions/setup-go from 2 to 3 (#2073) 2022-05-02 08:59:40 +03:00
dependabot[bot]
7c94df539c chore(deps): bump actions/cache from 3.0.1 to 3.0.2 (#2071) 2022-05-02 08:59:11 +03:00
dependabot[bot]
8c33bae5a8 chore(deps): bump golang from 1.18.0 to 1.18.1 (#2069) 2022-05-02 08:58:47 +03:00
dependabot[bot]
2cdacc1517 chore(deps): bump actions/stale from 4 to 5 (#2070) 2022-05-02 08:54:51 +03:00
dependabot[bot]
9acb240fdc chore(deps): bump sigstore/cosign-installer from 2.0.0 to 2.3.0 (#2072) 2022-05-02 08:52:44 +03:00
dependabot[bot]
4b193b4712 chore(deps): bump github.com/open-policy-agent/opa from 0.39.0 to 0.40.0 (#2079) 2022-05-02 08:47:19 +03:00
VaismanLior
1f5b26254b feat(secret): add default secret severity (fanal#497) 2022-05-01 12:41:01 +03:00
Carol Valencia
79d1a0163f chore: app version 0.27.0 (#2046)
Co-authored-by: carolina valencia <krol3@users.noreply.github.com>
2022-04-30 17:20:22 +03:00
DmitriyLewen
c1b4b5be16 fix(misconf): added to skip conf files if their scanning is not enabled (#2066)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-04-30 17:12:23 +03:00
VaismanLior
bbe490b162 docs(secret) fix rule path in docs (#2061) 2022-04-30 16:45:20 +03:00
DmitriyLewen
eb0da23d53 chore(analyzer): added array of config file analyzers (fanal#498) 2022-04-30 16:42:03 +03:00
MaineK00n
78286aaff1 docs: change from go.sum to go.mod (#2056) 2022-04-27 14:54:49 +03:00
afdesk
4f9e46c8d3 chore(deps): update defsec for fix CVE-2022-27191 inside x/crypto (fanal#495) 2022-04-27 09:32:26 +03:00
dependabot[bot]
55f29b8fb2 chore(deps): bump github.com/CycloneDX/cyclonedx-go from 0.5.0 to 0.5.1 (#1926)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-04-26 19:39:38 +03:00
Oran Moshai
b6baa65ff2 refactor(fs): scanner options (#2050)
To allow Trivy plugins create InitializeScanner signature scanner options need to be public

Co-authored-by: oranmoshai <oran.moshai@aquasec.com>
2022-04-26 16:05:27 +03:00
Teppei Fukuda
4b8e0ec2ea feat(secret): truncate long line (#2052) 2022-04-26 15:56:25 +03:00
Teppei Fukuda
1a6d9cb1b0 feat(secret): truncate matched line if it is long (fanal#494) 2022-04-26 14:52:53 +03:00
Teppei Fukuda
cf78a436d2 docs: fix a broken bullets (#2042) 2022-04-26 10:42:09 +03:00
jeffalder
f8c2ced302 feat(ubuntu): add 22.04 approx eol date (#2044)
Add support for Ubuntu 22.04 LTS, Jammy Jellyfish: https://lists.ubuntu.com/archives/ubuntu-announce/2022-April/000279.html
2022-04-26 10:35:26 +03:00
tomthetommy
84c199428f docs: update installation.md (#2027) 2022-04-26 10:20:47 +03:00
nishipy
bdf55e16db docs: add Containerfile (#2032) 2022-04-26 10:17:24 +03:00
DmitriyLewen
9fd86da367 fix(go): fixed panic to scan gomod without version (#2038) 2022-04-25 16:04:44 +03:00
DmitriyLewen
acaa8dd0be fix(go.mod): fixed panic for gomod without version (fanal#492) 2022-04-25 10:19:28 +03:00
Teppei Fukuda
fbc9030db6 docs(mariner): confirm it works with Mariner 2.0 VM (#2036) 2022-04-25 10:17:51 +03:00
Teppei Fukuda
db6eb9a15b feat(secret): allow rubygems path (fanal#493) 2022-04-25 10:16:35 +03:00
Teppei Fukuda
e2a31abd19 feat(secret): support enable rules (#2035)
Co-authored-by: VaismanLior <97836016+VaismanLior@users.noreply.github.com>
2022-04-24 19:04:30 +03:00
Teppei Fukuda
1d1f8f91c0 refactor(secret): split a file including built-in rules (fanal#491) 2022-04-24 17:51:04 +03:00
Carol Valencia
708a7a7175 chore: app version 26.0 (#2030)
Co-authored-by: carolina valencia <krol3@users.noreply.github.com>
2022-04-24 15:27:36 +03:00
Teppei Fukuda
04040b95f8 feat(secret): add enable-builtin-rules (fanal#488) 2022-04-24 15:22:31 +03:00
Teppei Fukuda
e000329ec4 docs(secret): add a demo movie (#2031) 2022-04-24 11:56:27 +03:00
VaismanLior
142d67f296 feat(secret): more builtin aws rules (fanal#489) 2022-04-24 11:54:56 +03:00
Teppei Fukuda
e127334664 feat: support cache TTL in Redis (#2021) 2022-04-22 23:19:01 +03:00
Teppei Fukuda
3870515a81 fix(go): skip system installed binaries (#2028) 2022-04-22 19:20:31 +03:00
Teppei Fukuda
4e6389af27 fix(go): check if go.sum is nil (#2029) 2022-04-22 18:50:01 +03:00
Teppei Fukuda
5f047f97db feat: add secret scanning (#1901)
Co-authored-by: VaismanLior <97836016+VaismanLior@users.noreply.github.com>
Co-authored-by: AMF <work@afdesk.com>
2022-04-22 17:08:18 +03:00
Carol Valencia
0700586483 chore: gh publish only with push the tag release (#2025)
Co-authored-by: carolina valencia <krol3@users.noreply.github.com>
2022-04-22 16:58:04 +03:00
Teppei Fukuda
34de675d87 feat(redis): support TTL (fanal#480) 2022-04-22 16:42:05 +03:00
Teppei Fukuda
1f393c12d5 fix(fs): ignore permission errors (#2022) 2022-04-22 11:47:56 +03:00
Teppei Fukuda
4dd5732125 feat(hook): skip system installed Go binaries (fanal#481) 2022-04-22 11:47:29 +03:00
MaineK00n
1e788040c5 fix(hook/gomod): check if gosum is nil (fanal#487) 2022-04-22 07:50:21 +03:00
Teppei Fukuda
ca57d318da fix(secret): take only config file name (fanal#486) 2022-04-22 00:12:05 +03:00
Teppei Fukuda
03b16ea0ba feat(secret): check if the config file exists (fanal#485) 2022-04-21 23:43:36 +03:00
Teppei Fukuda
bec2e29c59 feat(secret): ignore the secret config file (fanal#484) 2022-04-21 23:43:18 +03:00
Teppei Fukuda
b4ddc80c99 feat(image): disable secret scanning in base layers (fanal#483) 2022-04-21 19:15:06 +03:00
Teppei Fukuda
2061873f22 fix(secret): end line number is the same as start line number (fanal#482) 2022-04-21 19:14:52 +03:00
Teppei Fukuda
254a96e1d3 feat: add secret scanning (fanal#431)
Co-authored-by: VaismanLior <97836016+VaismanLior@users.noreply.github.com>
2022-04-21 18:15:37 +03:00
afdesk
110c534015 test(mod): using correct module inside test go.mod (#2020) 2022-04-21 16:48:33 +03:00
Teppei Fukuda
dff5dcea70 fix(analyzer): ignore permission errors (fanal#477) 2022-04-21 12:51:03 +03:00
Teppei Fukuda
c7e8d201dc chore: disable benchmark (fanal#478) 2022-04-21 12:42:32 +03:00
bgoareguer
525e2685ce feat(server): re-add proxy support for client/server communications (#1995) 2022-04-21 12:32:46 +03:00
nishipy
471e7cd5a4 Add Containerfile to requiredFiles (fanal#475) 2022-04-21 12:29:55 +03:00
afdesk
9898ac9251 fix(report): truncate a description before escaping in ASFF template (#2004) 2022-04-18 18:10:47 +03:00
afdesk
453a1edfd2 fix(cloudformation): correct margin removal for empty lines (#2002) 2022-04-17 21:46:01 +03:00
afdesk
8cd973739a fix(deps): correct margin removal for empty lines inside defsec (fanal#471) 2022-04-16 22:13:37 +03:00
afdesk
407f3b668b fix(template): correct check of old sarif template files (#2003) 2022-04-16 13:10:48 +03:00
Teppei Fukuda
a0047a7983 feat(alpine): warn mixing versions (#2000) 2022-04-16 00:03:04 +03:00
Ben Harvey
d786655a18 Update ASFF template (#1914) 2022-04-15 14:04:07 +03:00
afdesk
a02cf65196 chore(deps): replace containerd/containerd version to fix CVE-2022-23648 (#1994) 2022-04-14 16:29:00 +03:00
DmitriyLewen
613e38ccf6 chore(deps): bump alpine from 3.15.3 to 3.15.4 (#1993) 2022-04-14 14:33:08 +03:00
afdesk
3b6d65beb8 test(go): add integration tests for gomod (#1989) 2022-04-14 13:38:54 +03:00
DmitriyLewen
22f5b938f9 fix(python): fixed panic when scan .egg archive (#1992) 2022-04-14 13:13:40 +03:00
DmitriyLewen
67004a2b12 fix(python): fixed panic when scan .egg archive (fanal#446)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-04-14 11:34:17 +03:00
afdesk
485637c28a fix(go): set correct go modules type (#1990) 2022-04-14 09:55:37 +03:00
Teppei Fukuda
6fdb554a0d feat(alpine): support apk repositories (#1987) 2022-04-14 09:52:51 +03:00
Teppei Fukuda
d9bddb90fe docs: add CBL-Mariner (#1982)
* docs: add CBL-Mariner

* docs: put it into a single page
2022-04-13 20:13:37 +03:00
DmitriyLewen
528d07ef37 feat(alpine): add parsing /etc/apk/repositories file to get OS version (fanal#462)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-04-13 18:31:30 +03:00
Teppei Fukuda
1cf1873f21 docs(go): fix version (#1986) 2022-04-13 17:57:40 +03:00
Teppei Fukuda
d77dbe8a55 feat(go): support go.mod in Go 1.17+ (#1985) 2022-04-13 16:02:16 +03:00
Teppei Fukuda
065b301414 feat(golang): add support for go.mod (fanal#465) 2022-04-13 13:35:52 +03:00
Teppei Fukuda
32bd1e484a ci: fix URLs in the PR template (#1972) 2022-04-12 13:54:58 +03:00
Owen Rumney
0e28f7ccb6 Merge pull request fanal#463 from aquasecurity/liamg-fix-owens-demo
fix(cloudformation): add filename to cf results
2022-04-12 10:07:08 +01:00
Liam Galvin
910b8e6017 fix: add filename to cf results 2022-04-12 09:59:26 +01:00
DmitriyLewen
94a5a1808f ci: add semantic pull requests check (#1968) 2022-04-12 09:59:06 +03:00
afdesk
72d94b21cf docs(issue): added docs for wrong detection issues (#1961)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-04-12 09:57:27 +03:00
Teppei Fukuda
b4a7d6a861 docs: move CONTRIBUTING.md to docs (#1971) 2022-04-11 18:53:26 +03:00
DmitriyLewen
0127c1d39e refactor(table): use file name instead package path (#1966) 2022-04-11 12:15:15 +03:00
Teppei Fukuda
a92da72263 fix(sbom): add --db-repository (#1964) 2022-04-07 17:57:20 +03:00
DmitriyLewen
b0f3864e46 feat(table): add PkgPath in table result (#1960) 2022-04-06 15:52:13 +03:00
Jan-Otto Kröpke
0b1d32c182 fix(pom): merge multiple pom imports in a good manner (#1959) 2022-04-06 12:34:21 +03:00
Jan-Otto Kröpke
5f69847698 fix(pom): merge multiple pom imports in a good manner (fanal#457) 2022-04-06 11:40:15 +03:00
dependabot[bot]
3637c00b51 chore(deps): bump github.com/docker/docker (fanal#440) 2022-04-06 10:27:06 +03:00
DmitriyLewen
d4e3df81e8 fix(downloadDB): add dbRepositoryFlag to repository and rootfs commands (#1956) 2022-04-06 08:51:45 +03:00
afdesk
7e48cc1f4d fix(misconf): update BurntSushi/toml for fix runtime error (#1948) 2022-04-05 21:13:33 +03:00
dependabot[bot]
8bdd3feb3f chore(deps): bump github.com/urfave/cli/v2 from 2.3.0 to 2.4.0 (fanal#442) 2022-04-05 20:53:33 +03:00
Liam Galvin
c9efa8c479 fix(misconf): Update fanal/defsec to resolve missing metadata issues (#1947)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-04-05 20:40:04 +03:00
Kobus van Schoor
52b715421e feat(jar): allow setting Maven Central URL using environment variable (#1939)
* chore(deps): update fanal/go-dep-parser to allow setting maven central url

* docs(troubleshooting): Add documentation for MAVEN_CENTRAL_URL option
2022-04-05 19:02:39 +03:00
Dennis Irsigler
21f7a41b27 chore(chart): update Trivy version in HelmChart to 0.25.0 (#1931)
Signed-off-by: Dennis Irsigler <dennis.irsigler@metro-markets.de>
2022-04-05 16:36:51 +03:00
Teppei Fukuda
ff2b3d176d chore(chart): remove version comments (#1933)
Co-authored-by: Carol Valencia <8355621+krol3@users.noreply.github.com>
2022-04-05 16:22:19 +03:00
afdesk
85351adfa8 chore(deps): update BurntSushi/toml for fix runtime error (fanal#454) 2022-04-05 16:19:07 +03:00
Liam Galvin
fbf50203cc fix(iac): Added missing metadata to resolve Terraform scanning errors (fanal#455)
Signed-off-by: Liam Galvin <liam.galvin@aquasec.com>
2022-04-05 16:14:54 +03:00
DmitriyLewen
9c19298f5f fix(downloadDB): add flag to server command (#1942) 2022-04-05 11:43:42 +03:00
Kobus van Schoor
18fde60392 feat(jar): allow setting Maven Central URL using environment variable (fanal#448)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-04-05 00:39:28 +03:00
dependabot[bot]
c2f38ee378 chore(deps): bump github.com/open-policy-agent/opa from 0.37.2 to 0.39.0 (fanal#434) 2022-04-04 23:43:54 +03:00
dependabot[bot]
a545e3af04 chore(deps): bump github.com/Azure/azure-sdk-for-go (fanal#438) 2022-04-04 23:33:58 +03:00
Teppei Fukuda
c039177958 refactor(golang): use debug/buildinfo (fanal#453) 2022-04-04 23:30:26 +03:00
afdesk
86e72c0a43 chore(ci): enable gofmt linter (fanal#452) 2022-04-04 23:30:06 +03:00
Liam Galvin
aa3d696625 fix(misconf): update defsec to resolve panics (#1935) 2022-04-04 21:35:30 +03:00
Teppei Fukuda
177826a458 chore: bump up Go to 1.18 (fanal#449) 2022-04-04 20:00:08 +03:00
Liam Galvin
133c838902 fix: Update defsec to v0.28.3 to fix panics (fanal#450) 2022-04-04 16:52:52 +01:00
dependabot[bot]
da3d588276 chore(deps): bump github.com/Azure/go-autorest/autorest (fanal#441) 2022-04-04 18:03:10 +03:00
dependabot[bot]
31e76699da chore(deps): bump github.com/docker/docker (#1924) 2022-04-04 17:58:34 +03:00
Anais Urlichs
4ca35b26a7 docs: restructure the documentation (#1887)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-04-04 17:20:22 +03:00
dependabot[bot]
9766c47042 chore(deps): bump actions/checkout from 2 to 3 (fanal#432) 2022-04-04 17:04:28 +03:00
dependabot[bot]
db66572127 chore(deps): bump github.com/aws/aws-sdk-go from 1.43.8 to 1.43.31 (fanal#445) 2022-04-04 17:03:54 +03:00
dependabot[bot]
8da4548073 chore(deps): bump github.com/urfave/cli/v2 from 2.3.0 to 2.4.0 (#1923) 2022-04-04 17:03:06 +03:00
DmitriyLewen
c3e132ade5 refactor(cache messages): changed messages about missing Image and Layers in cache (fanal#447) 2022-04-04 16:24:06 +03:00
dependabot[bot]
76e9d7eb27 chore(deps): bump actions/cache from 2 to 3.0.1 (#1920) 2022-04-04 15:43:14 +03:00
dependabot[bot]
2b217a3b2a chore(deps): bump actions/checkout from 2 to 3 (#1916) 2022-04-04 15:04:29 +03:00
dependabot[bot]
902aa8ceb9 chore(deps): bump github.com/open-policy-agent/opa from 0.37.2 to 0.39.0 (#1921) 2022-04-04 13:40:33 +03:00
dependabot[bot]
60b19e5e60 chore(deps): bump sigstore/cosign-installer from 2.0.0 to 2.1.0 (#1919) 2022-04-04 13:38:13 +03:00
dependabot[bot]
58aab67928 chore(deps): bump helm/chart-testing-action from 2.2.0 to 2.2.1 (#1918) 2022-04-04 13:15:02 +03:00
dependabot[bot]
209b9cc25a chore(deps): bump golang from 1.17 to 1.18.0 (#1915) 2022-04-04 13:10:28 +03:00
Itay Shakury
bfb931d454 Add trivy horizontal logo (#1932) 2022-04-04 13:09:54 +03:00
dependabot[bot]
b194140c52 chore(deps): bump github.com/go-redis/redis/v8 from 8.11.4 to 8.11.5 (fanal#437) 2022-04-04 11:45:11 +03:00
dependabot[bot]
ae86a5b171 chore(deps): bump alpine from 3.15.0 to 3.15.3 (#1917) 2022-04-04 11:37:42 +03:00
dependabot[bot]
1a23039e31 chore(deps): bump github.com/go-redis/redis/v8 from 8.11.4 to 8.11.5 (#1925) 2022-04-04 11:06:49 +03:00
dependabot[bot]
56498ca1df chore(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (#1927) 2022-04-04 09:57:10 +03:00
Sashi Kumar
02105678ed feat(db): Add dbRepository flag to get advisory database from OCI registry (#1873)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-03-31 16:09:01 +03:00
dependabot[bot]
d048791355 chore(deps): bump github.com/Azure/azure-sdk-for-go (fanal#409) 2022-03-30 18:01:11 +03:00
DmitriyLewen
4470a181e2 docs(filter vulnerabilities): fix link (#1880)
fixed link to helper functions
2022-03-30 17:56:16 +03:00
Nate Fear
cb171ead72 feat(template) Add misconfigurations to gitlab codequality report (#1756) 2022-03-30 17:55:14 +03:00
afdesk
36e24b1858 fix(rpc): add PkgPath field to client / server mode (#1643) 2022-03-30 14:43:29 +03:00
Owen Rumney
005fe25c75 Merge pull request fanal#429 from aquasecurity/owenr-fix-issue-no-filename
fix: handle no filename comeing through from defsec
2022-03-28 17:17:13 +01:00
Owen Rumney
aac7cf576e fix: catch results where the filename is not specified
This is being mitigated in defsec as well to prevent results with no
filename getting through to fanal

Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
2022-03-28 17:07:28 +01:00
DmitriyLewen
88311745ba fix(vulnerabilities): fixed trivy-db vulns (#1883) 2022-03-28 11:30:20 +03:00
afdesk
9154b819ac feat(cache): remove temporary cache after filesystem scanning (#1868) 2022-03-27 11:31:54 +03:00
dependabot[bot]
fe1f9c916f chore(deps): bump github.com/GoogleCloudPlatform/docker-credential-gcr (fanal#360) 2022-03-27 10:55:58 +03:00
afdesk
9e3709fb09 feat(cache): add DeleteBlobs to ArtifactCache (fanal#426) 2022-03-24 17:42:34 +02:00
Tamir Kiviti
f36d9b6f90 feat(sbom): add a dedicated sbom command (#1799)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-03-23 23:42:22 +02:00
dependabot[bot]
ee54733e7b chore(deps): bump github.com/testcontainers/testcontainers-go from 0.11.1 to 0.12.0 (fanal#375)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-03-22 20:23:43 +02:00
Masahiro331
7a148089ec feat(cyclonedx): add vulnerabilities (#1832)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-03-22 20:22:55 +02:00
afdesk
df80fd31a0 fix(option): hide false warning about remote options (#1865) 2022-03-22 16:33:03 +02:00
Teppei Fukuda
88ebc07504 chore: bump up Go to 1.18 (#1862) 2022-03-21 16:38:54 +02:00
afdesk
d6418cf0de feat(filesystem): scan in client/server mode (#1829)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-03-21 15:51:18 +02:00
Teppei Fukuda
12d0317a67 refactor(template): remove unused test (#1861) 2022-03-21 14:50:36 +02:00
DmitriyLewen
c3aca1524c fix(cli): json format for trivy version (#1854)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-03-21 14:41:41 +02:00
Rory McCune
b2b68951f2 docs: change URL for tfsec-checks (#1857)
The current URL for the tfsec-checks is 404, so changing it in-line with what we've got for cfsec, which is just the base site URL.
2022-03-20 10:16:51 +02:00
afdesk
06659f1509 fix(docker): Getting images without a tag (#1852) 2022-03-17 21:05:41 +02:00
afdesk
e913433934 fix(docker): getting an image by ID or a name with tag (fanal#425) 2022-03-17 20:10:13 +02:00
SIPR
a91cc50df7 docs(gitlab-ci): Use environment variables TRIVY_CACHE_DIR and TRIVY_NO_PROGRESS (#1801) 2022-03-17 19:16:06 +02:00
DmitriyLewen
4b8bf874d8 chore(issue labels): added new labels (#1839)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-03-16 14:38:47 +02:00
Furkan Türkal
5040caefc8 refactor: clarify db update warning messages (#1808)
Signed-off-by: Furkan <furkan.turkal@trendyol.com>

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-03-16 14:35:40 +02:00
DmitriyLewen
28cd5a5537 chore(ci): change trivy vulnerability scan for every day (#1838) 2022-03-16 13:00:12 +02:00
Zach Stone
b2f554eb2a feat(helm): make Trivy service name configurable (#1825) 2022-03-16 10:38:45 +02:00
Ankush K
483697b416 feat(walker): export default skip variables (fanal#418) 2022-03-14 16:24:09 +02:00
DmitriyLewen
7a44a7a344 chore(deps): updated sprig to version v3.2.2. (#1814) 2022-03-14 14:40:52 +02:00
DmitriyLewen
18842fbe04 chore(deps): updated testcontainers-go to version v0.12.0 (#1822) 2022-03-14 14:13:29 +02:00
MaineK00n
12ca3ca6da docs: add packages.config for .NET (#1823) 2022-03-14 13:57:53 +02:00
Ankush K
dcadfa883d fix(filter-hook): systemfiles filter for custom resources (fanal#419) 2022-03-13 18:26:07 +02:00
Batuhan Apaydın
728a3db6c6 build: sign container image (#1668)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-03-13 15:35:43 +02:00
dependabot[bot]
4e7b5ca365 chore(deps): bump github.com/CycloneDX/cyclonedx-go from 0.4.0 to 0.5.0 (#1778)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: masahiro331 <m_fujimura@r.recruit.co.jp>
2022-03-13 14:10:36 +02:00
Ricardo
0fca2cda91 docs: fix Installation documentation (#1804)
* Add missing `image` argument in the Installation docs->Docker section for MacOS.
2022-03-13 11:59:01 +02:00
Cyrille Pontvieux
e50839bb40 fix(report): ensure json report got a final new line (#1797) 2022-03-13 11:58:21 +02:00
Owen Rumney
f95a0f0d52 fix(terraform): resolve panics in defsec (#1811) 2022-03-09 18:37:02 +02:00
Owen Rumney
bfd6eef94c Merge pull request fanal#421 from aquasecurity/owenr-defend-npe-issues
chore(deps): update tfsec and defsec
2022-03-09 11:53:21 +00:00
Owen Rumney
69be985153 chore: update tfsec and defsec 2022-03-09 11:38:44 +00:00
Malte Swart
e5bf3d1e30 feat(docker): Label images based on OCI image spec (#1793)
The Label Schema Convention has been deprecated in favor of the OCI
image spec.

Update the gorelease config to use the new replacement fields.

This is not considered a breaking change, as it only touches metadata
and the Label Schema Convention is deprecated for over two years (March
2019).

Most fields only need to be renamed. `org.label-schema.schema-version`
could be removed without replacement.
`org.opencontainers.image.documentation` was added to link to the
Github page documentation in the exact version.
`org.opencontainers.image.url` was added pointing to the Aqua Security
product page of trivy.
Further labels were considered but not added (unclear purpose or value).
2022-03-06 20:00:24 +02:00
Will Dowling
2193fb3c44 fix(helm): indentation for ServiceAccount annotations (#1795) 2022-03-06 09:34:38 +02:00
DmitriyLewen
4d625c21e6 feat(docker): add support for scanning docker image with ImageID (fanal#405)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-03-03 18:23:45 +02:00
bestgopher
bbccb5a69d fix(hcl): fix panic in hcl2json (#1791) 2022-03-03 18:21:18 +02:00
Kaito Ii
a625455f1c chore(helm): remove psp from helm manifest (#1315) 2022-03-03 15:38:53 +02:00
Yuval Goldberg
7e69f4820e build: Replace make protoc with for loop to return an error (#1655)
Find the `*.proto` files and run in a `for loop` to run `protoc`
for each file in a separated command. If fail, `|| exit` will exit
with the returned error.

The POSIX standard specifies that the return status of `find` is 0
unless an error occurred while traversing the directories;
the return status of executed commands doesn't enter into it.

To overcome this limitation, the `-exec ... +` pattern could be used
From the docs (https://man7.org/linux/man-pages/man1/find.1.html):
"If any invocation with the `+' form returns a non-zero
value as exit status, then find returns a non-zero exit
status."

But as well, "This variant of the -exec action runs the specified command
on the selected files, but the command line is built by appending each selected
file name at the end;"

Unfortunately, at the moment `protoc-gen-twirp` plugin doesn't
support multiple files from different packages when the `go_package` option
is explicitly mentioned.
https://github.com/twitchtv/twirp/blob/main/protoc-gen-twirp/generator.go#L181-L185

Signed-off-by: Yuval Goldberg <yuvigoldi@gmail.com>
2022-03-03 15:35:51 +02:00
Amndeep Singh Mann
f6c986b6c0 fix: ASFF template to match ASFF schema (#1685)
Signed-off-by: Amndeep Singh Mann <amann@mitre.org>
2022-03-03 15:28:20 +02:00
bestgopher
7663c9f902 fix(hcl2json): fix panic in hcl2json (fanal#417)
update hcl2json@v0.3.3 -> 0.3.4
2022-03-03 15:11:10 +02:00
Eric Bailey
aab6f0bf20 feat(helm): Add support for server token (#1734) 2022-03-03 14:38:20 +02:00
Teppei Fukuda
eebf9c8f58 fix(pom): keep an order of dependencies (#1784) 2022-03-03 12:36:21 +02:00
Owen Rumney
c3279fd9b2 Merge pull request fanal#416 from aquasecurity/dependabot/go_modules/github.com/aquasecurity/tfsec-1.5.0
chore(deps): bump github.com/aquasecurity/tfsec from 1.4.1 to 1.5.0
2022-03-03 09:20:13 +00:00
Teppei Fukuda
971092b847 chore: bump up Go to 1.17 (#1781) 2022-03-03 10:30:36 +02:00
Owen Rumney
7443cba9b5 Merge branch 'main' into dependabot/go_modules/github.com/aquasecurity/tfsec-1.5.0 2022-03-03 08:26:37 +00:00
Owen Rumney
49301ccf6d Merge pull request fanal#415 from aquasecurity/dependabot/go_modules/github.com/aquasecurity/defsec-0.14.0
chore(deps): bump github.com/aquasecurity/defsec from 0.12.1 to 0.14.0
2022-03-03 08:26:04 +00:00
dependabot[bot]
6e222bd809 chore(deps): bump golangci/golangci-lint-action from 2 to 3.1.0 (fanal#408) 2022-03-03 10:09:10 +02:00
dependabot[bot]
8c522a76af chore(deps): bump github.com/aquasecurity/tfsec from 1.4.1 to 1.5.0
Bumps [github.com/aquasecurity/tfsec](https://github.com/aquasecurity/tfsec) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/aquasecurity/tfsec/releases)
- [Changelog](https://github.com/aquasecurity/tfsec/blob/master/.goreleaser.yml)
- [Commits](https://github.com/aquasecurity/tfsec/compare/v1.4.1...v1.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-03 08:04:55 +00:00
dependabot[bot]
7fe75d50a0 chore(deps): bump github.com/aquasecurity/defsec from 0.12.1 to 0.14.0
Bumps [github.com/aquasecurity/defsec](https://github.com/aquasecurity/defsec) from 0.12.1 to 0.14.0.
- [Release notes](https://github.com/aquasecurity/defsec/releases)
- [Commits](https://github.com/aquasecurity/defsec/compare/v0.12.1...v0.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-03 08:04:53 +00:00
Teppei Fukuda
0e84c4dcbf fix(pom): keep an order of dependencies (fanal#413) 2022-03-03 10:03:09 +02:00
dependabot[bot]
2f2d8222e4 chore(deps): bump actions/setup-python from 2 to 3 (#1776)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-03-02 14:11:29 +02:00
dependabot[bot]
a2afd6e683 chore(deps): bump golangci/golangci-lint-action from 2 to 3.1.0 (#1777) 2022-03-02 10:43:16 +02:00
dependabot[bot]
82d9d4b77f chore(deps): bump github.com/aws/aws-sdk-go from 1.42.51 to 1.43.8 (fanal#411) 2022-03-01 18:16:24 +02:00
afdesk
a423b99312 fix(python): correct handling pip package names with a hyphen (#1771) 2022-02-27 17:47:53 +02:00
afdesk
525aadf14c fix(deps): correct handling a package name with a hyphen (fanal#407) 2022-02-25 11:58:22 +02:00
benterris
a069ad7818 doc(docker): fix command to run trivy with docker on linux (#1761) 2022-02-25 10:56:47 +02:00
Edvin N
015055e1f5 feat(helm): Add support for custom labels (#1767)
Solves #1766
2022-02-25 09:07:25 +02:00
Edvin N
cbaa363990 chore(helm): bump chart to trivy 0.24.0 (#1762)
Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
2022-02-25 09:06:56 +02:00
Owen Rumney
bec02f098d docs: remove erroneous command (#1763) 2022-02-24 14:21:10 +02:00
dependabot[bot]
d7f8b92a27 chore(deps): bump github.com/spf13/afero from 1.6.0 to 1.8.1 (#1708) 2022-02-22 22:49:01 +02:00
Teppei Fukuda
59ea0d5781 fix(option): warn list-all-pkgs only with the table format (#1755) 2022-02-22 22:48:39 +02:00
DmitriyLewen
c788676f87 feat(option): warn "--list-all-pkgs" with "--format table" (#1632)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-02-22 18:41:25 +02:00
Masahiro331
58ade462b4 feat(report): add support for CycloneDX (#1081)
Co-authored-by: tspearconquest <81998567+tspearconquest@users.noreply.github.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-02-22 18:01:15 +02:00
Owen Rumney
77cab6e0b9 chore(deps): update the defsec and tfsec versions (#1747) 2022-02-22 16:42:24 +02:00
AndreyLevchenko
2ede15d358 fix(scanner): fix skip of language-specific files when scanning rootf… (#1751) 2022-02-22 08:48:25 +02:00
dependabot[bot]
d266c74941 chore(deps): bump github.com/google/wire from 0.4.0 to 0.5.0 (#1712) 2022-02-21 18:46:55 +02:00
Guy Ben-Aharon
4423396bcc feat(report): considering App.Writer when printing results (#1722)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-02-21 16:47:42 +02:00
Owen Rumney
b72fa66c77 Merge pull request fanal#406 from aquasecurity/owenr-update-iac-scanning
chore: update the defsec and tfsec versions
2022-02-21 14:18:23 +00:00
afdesk
356ae30c7e chore(deps): replace satori version and skipping examples folder (#1745)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-02-21 15:58:45 +02:00
DmitriyLewen
f2e05d55d0 fix(hook): fix skip of language-specific files when scanning rootfs directory (fanal#380) 2022-02-21 15:35:08 +02:00
Owen Rumney
1e9376bea4 chore: update the defsec and tfsec versions
- rework some of the iac tests to be more flexible to change
- update the scanner to use the moved parser
  - everything is now in defsec now for CF parsing, scanning and testing
2022-02-21 09:56:02 +00:00
skuethe
477dc7d5f9 build: add s390x container images (#1726)
Signed-off-by: skuethe <56306041+skuethe@users.noreply.github.com>
2022-02-21 11:31:07 +02:00
Oran Moshai
89b8d7ff30 feat(template) Add misconfigurations to junit report (#1724)
Co-authored-by: oranmoshai <oran.moshai@aquasec.com>
2022-02-20 11:54:24 +02:00
dependabot[bot]
219b71b4fd chore(deps): bump github.com/twitchtv/twirp (#1709) 2022-02-14 10:25:28 +02:00
Christian Zunker
aa6e1eb6f9 feat(client): configure TLS InsecureSkipVerify for server connection (#1287)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-02-13 11:34:34 +02:00
Ankush K
de6c3cbb6c fix(rpc): Supports RPC calls for new identifier CustomResource (#1605) 2022-02-13 11:20:51 +02:00
dependabot[bot]
b7d4d1ead4 chore(deps): bump go.uber.org/zap from 1.20.0 to 1.21.0 (#1705) 2022-02-13 11:18:07 +02:00
dependabot[bot]
e6c029d08a chore(deps): bump github.com/caarlos0/env/v6 from 6.0.0 to 6.9.1 (#1707) 2022-02-13 10:13:06 +02:00
Will Dowling
ec6cb1a642 feat(helm): Parameterise ServiceAccount annotations (#1677) 2022-02-13 09:48:01 +02:00
dependabot[bot]
7dfc16cf21 chore(deps): bump github.com/hashicorp/go-getter from 1.5.2 to 1.5.11 (#1710) 2022-02-13 09:47:11 +02:00
dependabot[bot]
42d8fd6638 chore(deps): bump github.com/cheggaaa/pb/v3 from 3.0.3 to 3.0.8 (#1704) 2022-02-11 20:09:23 +02:00
dependabot[bot]
0805e8667e chore(deps): bump go.uber.org/zap from 1.20.0 to 1.21.0 (fanal#404) 2022-02-11 20:08:15 +02:00
dependabot[bot]
c3ef2035b5 chore(deps): bump github.com/open-policy-agent/opa from 0.36.1 to 0.37.2 (#1711) 2022-02-11 18:04:44 +02:00
dependabot[bot]
f8eb21d63a chore(deps): bump github.com/alicebob/miniredis/v2 from 2.17.0 to 2.18.0 (fanal#383) 2022-02-11 14:39:10 +02:00
dependabot[bot]
ed00632796 chore(deps): bump github.com/Azure/azure-sdk-for-go (fanal#389) 2022-02-11 14:38:30 +02:00
dependabot[bot]
1277e211ca chore(deps): bump github.com/Azure/go-autorest/autorest/azure/auth (fanal#386) 2022-02-11 14:37:52 +02:00
dependabot[bot]
5c663d389d chore(deps): bump github.com/aws/aws-sdk-go from 1.42.30 to 1.42.51 (fanal#403) 2022-02-11 14:37:16 +02:00
dependabot[bot]
411e5b8c97 chore(deps): bump github.com/open-policy-agent/opa from 0.36.1 to 0.37.2 (fanal#401) 2022-02-11 14:34:28 +02:00
Teppei Fukuda
327688504c chore(dependabot): set interval to monthly (fanal#399) 2022-02-11 14:24:43 +02:00
Teppei Fukuda
274103e883 chore(dependabot): enable gomod monthly (#1699) 2022-02-11 14:24:25 +02:00
Konstantinos Koukopoulos
e618d83dae fix(gitlab tpl): escape double quote (#1635) 2022-02-10 17:29:10 +02:00
Yuval Goldberg
3b0b2ed4ce build: Make make protoc be consistent (#1682)
Signed-off-by: Yuval Goldberg <yuvigoldi@gmail.com>
2022-02-10 11:07:30 +02:00
Masahiro331
5c8d098324 feat(purl): add generate purl package utilities (#1574) 2022-02-09 20:35:36 +02:00
Teppei Fukuda
11f4f81123 refactor: move result structs under types (#1696) 2022-02-09 19:31:12 +02:00
Teppei Fukuda
6db2092c72 feat(mariner): add support for CBL-Mariner 2.0 (#1694) 2022-02-09 14:45:39 +02:00
MaineK00n
b9a7fd1547 feat(rpm): detect RPM databases in SQLite3 format (fanal#381)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-02-09 13:16:51 +02:00
Sven Haardiek
8898bb0937 docs(gitlab-ci): fix Script in GitLab CI Example #1688
This patch changes the command line order to still work with the latest version
of trivy.

Signed-off-by: Sven Haardiek <sven.haardiek@uni-muenster.de>
2022-02-08 13:31:10 +02:00
Ankush K
9825529600 fix(applier): modify apply layer to merge custom resources as well (fanal#369) 2022-02-08 12:49:02 +02:00
Carol Valencia
33d0833717 chore: Upgrade helm chart version (#1683)
Co-authored-by: carolina valencia <krol3@users.noreply.github.com>
2022-02-08 12:45:11 +02:00
tspearconquest
13874d866c chore(mod): update Go dependencies (#1681)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-02-07 14:12:45 +02:00
Greg Myers
f26a06b980 docs: fix typos in markdown docs (#1674) 2022-02-04 22:05:30 +02:00
Rory McCune
e2821a4fba docs: update documentation for image scanning of tar files to use a tag present on Docker Hub (#1671) 2022-02-04 22:04:53 +02:00
Teppei Fukuda
ef8a1afcdb fix(repo): --no-progress suppresses git output (#1669) 2022-02-03 09:02:39 +02:00
Teppei Fukuda
4310d51b7e refactor: rename quiet with no progress (fanal#392) 2022-02-02 16:16:03 +02:00
Teppei Fukuda
449add24af docs: add ACR navigator (#1651) 2022-01-31 16:19:19 +02:00
John A Stevenson
cb9afc8441 fix: update example Rego files and docs (#1628) 2022-01-31 16:18:24 +02:00
Teppei Fukuda
78b2b899a0 feat(option): show a link to GitHub Discussions for --light deprecation (#1650) 2022-01-31 15:26:43 +02:00
afdesk
52fd3c2e0a fix(sarif): fix the warning message (#1647) 2022-01-31 10:11:27 +02:00
Teppei Fukuda
8d5882be03 refactor: migrate to prefixed buckets (#1644) 2022-01-31 10:05:38 +02:00
Masahiro331
84dd33f7e9 feat(mariner): add support for CBL-Mariner (#1640)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-29 22:53:07 +02:00
Teppei Fukuda
9e903a1d88 docs: commercial use available (#1641) 2022-01-29 21:26:16 +02:00
Masahiro331
c04a638d1a feat(mariner) add CBL-Mariner analyzer (fanal#387) 2022-01-29 19:49:24 +02:00
Christian Groschupp
f4c746a2d2 feat: support azure acr (#1611)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-28 22:50:28 +02:00
afdesk
420f8ab13e feat(os-pkg): add data sources (#1636) 2022-01-28 20:41:40 +02:00
Teppei Fukuda
d2827cba06 feat(redhat): support build info in RHEL (#807) 2022-01-28 18:35:00 +02:00
Teppei Fukuda
ffb5c8520f feat(analyzer): support Red Hat build info (fanal#151) 2022-01-28 15:31:14 +02:00
DmitriyLewen
ce703ce4a5 fix: change links in pull_request_template to static URLs (#1634) 2022-01-27 15:47:37 +02:00
Teppei Fukuda
50bb938a21 feat(lang-pkg): add data sources (#1625) 2022-01-27 14:22:06 +02:00
Teppei Fukuda
a31ddbe971 feat(detector): support custom detector (#1615) 2022-01-25 09:06:28 +02:00
AndreyLevchenko
3a4e18ac82 docs(contribution): change role who should resolve comments (#1618) 2022-01-24 15:11:03 +02:00
DmitriyLewen
8ba68361bd docs: add PR template (#1602)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-23 10:36:03 +02:00
MaineK00n
f5c5573936 feat(rocky): support Rocky Linux (#1570)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-20 11:43:43 +02:00
MarkusTeufelberger
eab2b425db Add the ability to set dockerhub credentials in the helm chart (#1569) 2022-01-20 07:51:07 +02:00
Christian Groschupp
533498f4f0 feat(token): add azure token auth (fanal#371)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-19 14:52:36 +02:00
Teppei Fukuda
2768c280c9 chore: bump Go to 1.17 (fanal#379) 2022-01-19 13:42:18 +02:00
dependabot[bot]
4e8832de4f chore(deps): bump github.com/open-policy-agent/opa from 0.36.0 to 0.36.1 (fanal#378) 2022-01-19 11:39:51 +02:00
Taufik Mulyana
cabd18daae feat(cache): redis TLS support (#1297) 2022-01-18 15:16:00 +02:00
DmitriyLewen
02c3c3659d feat(java): add support for PAR files (#1599) 2022-01-18 13:26:46 +02:00
dependabot[bot]
4b6109746e chore(deps): bump github.com/BurntSushi/toml from 0.4.1 to 1.0.0 (fanal#376) 2022-01-18 10:25:27 +02:00
dependabot[bot]
c6daf1a896 chore(deps): bump go.uber.org/zap from 1.19.1 to 1.20.0 (fanal#358) 2022-01-17 16:21:52 +02:00
DmitriyLewen
d2a4db8887 feat(java): add support PAR files (fanal#373) 2022-01-17 16:10:50 +02:00
DmitriyLewen
4f7b768369 refactor(rust): move rust-advisory-db to OSV (#1591) 2022-01-17 15:38:35 +02:00
rethab
d754cb8c6f feat: log ignored vulnerabilities on debug (#1378)
* feat: log ignored vulnerabilities

* feat: show IDs in an ignore file

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-17 08:38:08 +02:00
AndreyLevchenko
a936e675c9 chore(mod): hcl2json deps update (#1585)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-16 21:09:04 +02:00
dependabot[bot]
abf0055634 chore(deps): bump github.com/docker/docker (fanal#363)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-16 21:01:42 +02:00
DmitriyLewen
af116d3c9e fix(rpm): do not ignore installed files via third-party rpm (#1594) 2022-01-16 20:34:19 +02:00
jerbob92
b507360075 feat(fs): allow scanning a single file (#1578)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-16 16:32:31 +02:00
Teppei Fukuda
7fcbf44bb8 refactor(python): drop Safety DB (#1580) 2022-01-16 15:23:49 +02:00
DmitriyLewen
478d279919 feat: added insecure tls skip to scan git repo (#1528)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-14 11:25:45 +02:00
Yuval Goldberg
33bd41b40f Supress git clone output (#1590) 2022-01-14 08:59:49 +02:00
MaineK00n
39a10089fc fix(alma): skip modular package because MODULARITYLABEL is not set (#1588) 2022-01-13 17:30:20 +02:00
DmitriyLewen
37abd612aa feat(photon os): added EOL dates check (#1587)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-01-13 16:20:32 +02:00
DmitriyLewen
78de33e8ea docs: update supported os (#1586) 2022-01-13 13:53:13 +02:00
Teppei Fukuda
22054626f3 BREAKING: remove root command (#1579) 2022-01-12 16:13:13 +02:00
MaineK00n
28ddcf1ae8 docs: add Rust to Language-specific Packages Table (#1577) 2022-01-12 15:42:48 +02:00
AndreyLevchenko
9806fa6f92 chore(deps): update hcl2json dependency (fanal#368) 2022-01-12 14:21:46 +02:00
DmitriyLewen
c4fdc40f82 fix(rpm): do not ignore installed files via third-party rpm (fanal#367)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-01-12 14:19:16 +02:00
rizwan-kh
df134c73f8 docs: update int doc for gitlab ci (#1575) 2022-01-12 11:17:29 +02:00
afdesk
8da20c8c92 BREAKING: migrate the sarif template to Go code (#1437)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-12 08:49:47 +02:00
Teppei Fukuda
714b5ca246 refactor: remove unused field (#1567) 2022-01-11 19:47:52 +02:00
jerbob92
1bb7e4894e Allow to scan a single file (fanal#356)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-01-11 18:25:55 +02:00
dependabot[bot]
51e152b01c chore(deps): bump helm/chart-testing-action from 2.1.0 to 2.2.0 (#1554)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com
2022-01-11 14:58:23 +02:00
dependabot[bot]
d081855849 chore(deps): bump github.com/open-policy-agent/opa from 0.34.0 to 0.36.0 (fanal#362) 2022-01-11 14:54:41 +02:00
dependabot[bot]
ab0cb4f73b chore(deps): bump github.com/alicebob/miniredis/v2 from 2.16.0 to 2.17.0 (fanal#361) 2022-01-11 14:47:19 +02:00
DmitriyLewen
49a72f216f feat: added insecure tls skip to scan repo (fanal#352) 2022-01-11 14:07:22 +02:00
dependabot[bot]
0c8521a856 chore(deps): bump github.com/aws/aws-sdk-go from 1.42.0 to 1.42.30 (fanal#365) 2022-01-10 18:34:30 +02:00
Teppei Fukuda
89fa4a27ab feat(analyzer): introduce analyzer group (fanal#340) 2022-01-10 16:32:07 +02:00
Stan0304
884daff429 docs: gitlab integration (#1381) 2022-01-10 15:38:32 +02:00
MaineK00n
2a8336b9aa feat(alma): support AlmaLinux (#1238)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2022-01-06 22:26:09 +02:00
Sourabh Gupta
1e171af165 docs: added note about default template path when Trivy installed using rpm (#1551) 2022-01-06 20:36:39 +02:00
Teppei Fukuda
e65274e0ef BREAKING: Trivy DB from GHCR (#1539) 2022-01-06 20:08:40 +02:00
Liam Galvin
db35450bbb feat(cli): Do not set default commands when a plugin is being run (#1549) 2022-01-06 19:10:16 +02:00
Maria Kotlyarevskaya
24254d19f6 fix: add fingerprint field to codequality template (#1541)
Signed-off-by: Jasstkn <mariia.kotliarevskaia@gmail.com>
2022-01-06 15:12:24 +02:00
afdesk
2ee074568c fix(image): correct handling of uncompressed layers (#1544)
Fixes #1527
2022-01-05 20:38:08 +02:00
afdesk
0d2edbfa36 fix: crash of handling compressed layers (fanal#354) 2022-01-05 19:02:35 +02:00
Carol Valencia
0aef82c58e chore: helm chart app version 0.22.0 (#1535)
Co-authored-by: carolina valencia <krol3@users.noreply.github.com>
2022-01-04 22:24:39 +02:00
Teppei Fukuda
8b2a799721 test(integration): use fixtures (#1532) 2021-12-30 20:53:03 +02:00
Teppei Fukuda
42f795fa34 fix(java/pom): ignore unsupported requirements (#1514) 2021-12-24 23:37:28 +02:00
Teppei Fukuda
8f737cc6eb feat(cli): warning for root command (#1516) 2021-12-24 23:02:19 +02:00
Teppei Fukuda
996961a33f fix(java/pom): ignore unsupported requirements (fanal#351) 2021-12-24 22:57:55 +02:00
Teppei Fukuda
76249bdcf0 BREAKING: disable JAR detection in fs/repo scanning (#1512)
Co-authored-by: Andrey Levchenko <levchenko.andrey@gmail.com>
2021-12-24 16:14:50 +02:00
Teppei Fukuda
e9251fe0a8 feat(jar): mark JAR as individual packages (fanal#350) 2021-12-24 14:29:44 +02:00
Teppei Fukuda
59957d4c6b feat(scan): support --offline-scan option (#1511) 2021-12-24 12:20:21 +02:00
Teppei Fukuda
da8b72d2e7 fix: improve memory usage (#1509) 2021-12-24 08:33:43 +02:00
Teppei Fukuda
965400a481 feat(java): support offline mode (fanal#349) 2021-12-24 08:26:10 +02:00
Masahiro331
310dd3f5c0 fix(analyzer): improve performance (fanal#314)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-12-23 20:15:36 +02:00
Teppei Fukuda
b713ad0fd3 feat(java): support pom.xml (#1501) 2021-12-23 16:45:38 +02:00
Teppei Fukuda
91d4d9e385 feat(java): support pom.xml (fanal#346) 2021-12-23 14:27:27 +02:00
yuriShafet
56115e9d4f docs: fixing rust link to security advisory (#1504) 2021-12-22 17:52:35 +02:00
Owen Rumney
7f859afacb Add missing IacMetdata (#1505)
- Provider and Service added to IacMetadata on misconfiguration
2021-12-22 17:06:25 +02:00
afdesk
88094b1142 chore(deps): bump github.com/moby/buildkit from 0.8.1 to 0.9.3 (fanal#347) 2021-12-22 16:09:33 +02:00
Teppei Fukuda
628a7964d5 feat(jar): add file path (#1498) 2021-12-21 08:52:33 +02:00
Teppei Fukuda
c287239236 feat(jar): add file path (fanal#345) 2021-12-21 07:58:05 +02:00
Teppei Fukuda
82fba77141 feat(rpm): support NDB (#1497) 2021-12-21 07:57:06 +02:00
DmitriyLewen
d5269da5ee feat: added misconfiguration field for html.tpl (#1444)
* feat: added misconfiguration field for html.tpl

* feat: added message field for html.tpl

* fix: fixed integration test error
2021-12-20 17:14:00 +02:00
Dirk Mueller
0a17306666 Also detect RPM databases in NDB format (fanal#341)
RPM databases in the native DB format rather than the traditional
Berkeley DB format are stored as different filenames, so detect
those as well.
2021-12-19 11:37:10 +02:00
Chetan Goti
8e57dee86b fix(docs): typo (#1488) 2021-12-19 11:24:22 +02:00
Owen Rumney
c506f43613 chore(deps): Update tfsec version (fanal#339)
* Update the tfsec version

- get support for custom checks in the tfsec external scanner

* Pass debug through to tfsec
2021-12-16 13:41:28 +02:00
Owen Rumney
8bfbc84a41 feat(plugin): Add option to update plugin (#1462)
* Add option to update plugin

- add plugin update [pluginName] to update
- add supporting test

* refactor: wrap errors
2021-12-16 13:30:19 +02:00
DmitriyLewen
1e811de263 fix: fixed skipFiles/skipDirs flags for relative path (#1482) 2021-12-16 13:21:22 +02:00
Owen Rumney
8b5796f770 feat (plugin): add list and info command for plugin (#1452)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-12-15 22:36:08 +02:00
afdesk
a2199bb417 fix: set up a vulnerability severity (#1458) 2021-12-15 21:28:29 +02:00
geyingqi
279e76f704 chore: add arm64 deb package (#1480) 2021-12-15 20:08:05 +02:00
DmitriyLewen
7e09a9f84a fix: fixed skipFiles/skipDirs flags for relative path (fanal#342) 2021-12-15 19:33:05 +02:00
Tomas Fernandez
5262590831 Link to trivy tutorial on Semaphore (#1449)
* Link to trivy tutorial on Semaphore

* Move tutorial to Advanced > Community > Tools
2021-12-12 05:33:00 +02:00
abdennour
c275a841fd refactor(helm): externalize env vars to configMap (#1345)
\#1343

Signed-off-by: abdennour <mail@abdennoor.com>
2021-12-08 08:37:05 +02:00
nobletrout
7beed30170 docs: provide more information on scanning Google's GCR (#1426)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-12-07 03:28:46 +02:00
DmitriyLewen
f50e1f42a1 docs(misconfiguration): added instruction for misconfiguration detection (#1428)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-12-06 13:56:41 +02:00
Guilherme Macedo
3ae4de5869 Update git-repository.md (#1430)
Update instructions on how to scan private git repositories, as according to https://github.com/aquasecurity/fanal/pull/253 .
2021-12-06 13:04:03 +02:00
afdesk
f733307991 chore: removed old tfsec dependencies. (fanal#337)
There were removed several old dependencies after `go mod tidy`.
2021-12-06 11:12:33 +02:00
AndreyLevchenko
6e35b8f53c fix(hooks): exclude unrelated lib types from system files filtering (#1431) 2021-12-06 10:53:34 +02:00
afdesk
beb60b05f3 chore: run go fmt (#1429) 2021-12-02 17:52:57 +09:00
afdesk
582e7fd1ba fix(sarif): change help field in the sarif template. (#1423) 2021-12-02 14:23:26 +09:00
Owen Rumney
11bc290111 Update fanal with cfsec version update (#1425)
- new version of cfsec brought in with latest fanal
  - fixes issue where cfsec treats files as CloudFormation when they
    arent
  - fixes issuee where invalid content errors are surfaced to Trivy
- Gets addition of service and provider on the IaC results - this is not
  visible to others
2021-12-01 04:15:26 +02:00
Owen Rumney
bb5abd4cc7 Merge pull request fanal#336 from aquasecurity/owenr-update-tfsec-and-cfsec
chore(deps): updating code scanning
2021-11-30 14:55:58 +00:00
Owen Rumney
18d683af15 Update code scanning dependencies
- update cfsec
- update tfsec
2021-11-30 14:47:36 +00:00
AndreyLevchenko
6793d65417 fix(hooks): exclude go from filtering (fanal#332)
* fix(hooks): exclude go from filtering

* Limited scope to individual packages

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-11-29 09:41:51 +02:00
Matthieu MOREL
776f0ec16d ci(lint) : setup golangci-lint-action (fanal#256)
* build(lint): setup golangci-lint-action

Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>

* skip go installation

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-11-29 09:36:55 +02:00
Alex
0523fbc6be allow suppressing the git clone output by setting the quiet option (fanal#335) 2021-11-29 09:08:34 +02:00
Nilushan Costa
392f68926c Replace deprecated option in goreleaser (#1406)
* Replace deprecated docker.use_buildx with docker.use

* Bump goreleaser GitHub action to v0.183.0
2021-11-29 05:31:16 +02:00
Huang Huang
101d576025 feat(alpine): support 3.15 (#1422) 2021-11-29 05:30:44 +02:00
Carol Valencia
bd3ba68cce chore: test the helm chart in the PR and used the commit hash (#1414)
Co-authored-by: carolina valencia <krol3@users.noreply.github.com>
2021-11-29 05:29:01 +02:00
dependabot[bot]
3860d6e4e9 chore(deps): bump alpine from 3.14 to 3.15.0 (#1417)
Bumps alpine from 3.14 to 3.15.0.

---
updated-dependencies:
- dependency-name: alpine
  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>
2021-11-28 09:48:31 +02:00
afdesk
4f82673a61 chore(release): add ubuntu older versions to deploy script (#1416)
* chore(release): add ubuntu older versions to deploy script

`ubuntu-distro-info --supported` returns only versions: `bionic`, `focal`, `hirsute`, `impish` and `jammy`.

`ubuntu-distro-info --supported-esm` returns another versions: `trusty`, `xenial`, `bionic`, `focal` and `jammy`.

for the release script we should use the union of these sets.

Fixes #1194

* change `uniq` command to `-u` parameter
2021-11-28 09:43:07 +02:00
Guilherme Macedo
95afbb1a11 feat(repo): add authentication to git HTTP operation (fanal#253) 2021-11-28 09:28:47 +02:00
DmitriyLewen
7d550ea025 fix(applier): fixed layer applications update (fanal#333)
* Fix(Docker-image): fixed update applications
Closes trivy issue fanal#1407

* Test: added tests for Docker ApplyLayers

* test(applier): simplify the case

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-11-28 08:44:30 +02:00
Teppei Fukuda
b9a51de862 chore(mod): tidy (#1415) 2021-11-26 06:36:55 +02:00
AndreyLevchenko
7f248341cc fix(rpc): fix nil layer transmit (#1410)
* fix(rpc): fix nil layer transmit

Closes #1400

* added tests
2021-11-24 10:29:13 +02:00
Naimuddin Shaik
af3eaefdb2 Lang advisory order (#1409)
* chore(advisory reorder)

Reorder language advisory.

* fixed integration tests.
2021-11-24 10:27:12 +02:00
Raul Cabello Martin
07c9200eb7 chore: add support for s390x arch (#1304) 2021-11-21 11:38:47 +02:00
Carol Valencia
8bc8a4ad60 fix(chart): ingress helm manifest-update trivy image (#1323)
* fix: ingress helm manifest-update trivy image

* chore: helm ingress Capabilities.apiVersion

* feat: helm chart test gh

Co-authored-by: carolina valencia <krol3@users.noreply.github.com>
2021-11-21 09:57:30 +02:00
Owen Rumney
9076a49b0f docs: Add comparison for cfsec (#1388)
* Add cfsec comparison

* Add to mkdocs.yml
2021-11-17 16:42:17 +02:00
naoyukis
bb316d93ca remove: delete unused functions in utils package (#1379) 2021-11-16 14:12:18 +02:00
AndreyLevchenko
efdb29d0d4 fix(sarif): fix validation errors (#1376) 2021-11-15 16:36:51 +02:00
Teppei Fukuda
9bcf9e72f5 docs: add Bitbucket Pipelines (#1374) 2021-11-14 11:31:21 +02:00
Teppei Fukuda
3147097daf docs: add community integrations (#1361)
Co-authored-by: Carsten Hoffmann <choffmann87@googlemail.com>
2021-11-14 10:28:26 +02:00
Simon Engledew
33f74b3acb Use a stable SARIF identifier (#1230) 2021-11-11 20:02:40 +02:00
rahul2393
5915ffb42b fix(python): fix parsing of requirements.txt with hash checking mode available in pip since version 8.0 2021-11-11 13:18:31 +02:00
rahul2393
1ac6e8aef6 chore: update go-dep-parser dependency to fix pip parsing issue (fanal#330) 2021-11-11 11:02:23 +02:00
Owen Rumney
ae4c42b975 feat(iac): Add line information (#1366)
* feat(iac): Adding resource and Line data

- adding line in file information to the misconfiguration result
- updating tfsec and cfsec versions to provide this additional info

* Add usage of IaC metadata

* update the fanal version
2021-11-11 08:00:13 +02:00
Owen Rumney
b640ef099c chore(dep): bump cfsec version from v0.0.11 to v0.0.12 (fanal#329) 2021-11-10 13:12:15 +00:00
Owen Rumney
a688cdf7af feature(iac): Add location and resource to Results (fanal#328)
* feature(iac): Add location and resource to Results

- add the iac resource and line in file information for tfsec and cfsec
- update the version of tfsec and cfsec
2021-11-10 10:48:56 +00:00
Owen Rumney
0abfcf53e4 Merge pull request fanal#327 from aquasecurity/owenr-bump-cfsec-version 2021-11-10 06:44:16 +00:00
Owen Rumney
e0dfc37ef5 fix the test for cfsec output 2021-11-09 21:01:46 +00:00
Owen Rumney
3f52e32786 chore(deps): Bump cfsec version to get the resource
- cfsec now has the resource name in the message for the issue
2021-11-09 20:28:06 +00:00
Owen Rumney
19747d0535 feat(cloudformation): Adding support for cfsec IaC scanning (#1360) 2021-11-09 17:42:44 +02:00
Jamie
da45061f4d chore: send debug and info logs to stdout in install.sh, not stderr. (#1264)
The current install.sh script logs all messages to stderr via ```echoerr()``` function. Since godownloader is no longer maintained, it seems reasonable to update install.sh here.
2021-11-09 16:54:42 +02:00
tspearconquest
cb1a4ed3a1 Update containerd to v1.5.7 and docker-cli to v20.10.9 (#1356)
Signed-off-by: Thomas Spear <tspear@conquestcyber.com>
2021-11-09 16:00:41 +02:00
dependabot[bot]
0dbcb834ef chore(deps): bump github.com/docker/docker (fanal#315) 2021-11-09 15:57:36 +02:00
dependabot[bot]
6ad9b2558a chore(deps): bump github.com/aws/aws-sdk-go from 1.41.0 to 1.42.0 (fanal#325) 2021-11-09 15:01:21 +02:00
Owen Rumney
6726d12587 Merge pull request fanal#321 from owenrumney/owenr-add-cfsec-support
add support for cfsec
2021-11-09 10:41:27 +00:00
Owen Rumney
41c0dbb767 Add Cloudformation analyzer 2021-11-08 16:24:21 +00:00
Owen Rumney
0d03242cfc add support for cfsec 2021-11-08 16:23:09 +00:00
Teppei Fukuda
8a6775ad14 fix(daemon): handle nil config (fanal#322) 2021-11-03 15:14:17 +02:00
Vinod Anandan
69dae54aa1 chore: update SBOM generation (#1349) 2021-11-01 16:44:14 +02:00
dependabot[bot]
2674ce89ea chore(deps): bump github.com/aquasecurity/tfsec from 0.58.11 to 0.58.14 (fanal#307) 2021-11-01 16:43:01 +02:00
dependabot[bot]
802cc6fb26 chore(deps): bump github.com/open-policy-agent/opa from 0.32.0 to 0.34.0 (fanal#319) 2021-11-01 16:42:23 +02:00
dependabot[bot]
b0de7fc645 chore(deps): bump github.com/alicebob/miniredis/v2 from 2.15.1 to 2.16.0 (fanal#316) 2021-11-01 14:24:11 +02:00
Simar
5dc8cfe55d docs: update builtin.md (#1335) 2021-10-25 21:22:13 +03:00
psibre
798b564ee3 chore: fix issues with Homebrew formula (#1329) 2021-10-25 20:34:32 +03:00
psibre
21bf5e58f7 chore: bump GoReleaser to v0.183.0 (#1328) 2021-10-25 20:33:35 +03:00
Simar
e0f4ebd7cb docs: update iac.md for a typo (#1326) 2021-10-25 19:40:47 +03:00
Rory McCune
23a9a5e319 docs: typo fix (#1308)
Just fixing a typo in the docs "Filesysetm" --> "Filesystem
2021-10-25 19:39:34 +03:00
Christian Zunker
1f5d17fe13 Add new networking API features to Ingress (#1262)
* Add new networking API features to Ingress

This PR adds `v1` of the networking API introduced with k8s 1.19.
It also adds the new field `ingressClassName` introduced with k8s 1.18.

Fixes #1261

* Also query for the Kind in the capabilities

Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>
2021-10-20 18:59:12 +03:00
Teppei Fukuda
bcfa0287b9 chore(release): bump up GoReleaser to v0.182.1 (#1299) 2021-10-16 06:48:44 +03:00
Teppei Fukuda
681ab1b889 fix(yarn): support quoted version (#1298) 2021-10-15 08:22:40 +03:00
Ankush K
46051d5ec8 feat(custom-forward): Forward the extended advisory data (#1247)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-10-14 21:57:30 +03:00
Teppei Fukuda
223b1fd118 fix(yarn): support quoted version 2021-10-14 18:23:24 +03:00
dependabot[bot]
0ad38f33bc chore(deps): bump github.com/aws/aws-sdk-go from 1.40.49 to 1.41.0 (fanal#309) 2021-10-12 12:52:41 +03:00
dependabot[bot]
894d65898d chore(deps): bump github.com/go-redis/redis/v8 from 8.11.3 to 8.11.4 (fanal#308) 2021-10-12 10:55:35 +03:00
santhosh1729
d8d692b8ba feat(javascript) : Initialize npm driver for javascript packages (#1289) 2021-10-10 08:37:15 +03:00
besdollma
cc344dfbe3 fix(cli): fix incorrect comparision of DB metadata type. (#1286)
-- Incorrect Db metadata type comparision resulted in wrong
print in show version.

This fixes #1275.

Signed-off-by: Bes Dollma <besi7dollma@gmail.com>
2021-10-08 19:16:46 +03:00
Itay Shakury
0dec17fc3f docs: add footer to readme (#1281)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-10-07 10:18:38 +03:00
santhosh1729
7c72035b87 feat(javascript) : Add JavaScript const to support custom javascript analyser (fanal#304) 2021-10-07 09:09:30 +03:00
santhosh1729
1829e36541 refactor: add ctx object to analyser (fanal#303) 2021-10-06 16:48:50 +03:00
Teppei Fukuda
f12446d3ba feat(report): add package path (#1274) 2021-10-06 10:28:48 +03:00
Teppei Fukuda
d974076fe1 refactor(types): merge LibraryInfo into Package (fanal#302) 2021-10-05 20:20:59 +03:00
Teppei Fukuda
1c9ccb5e03 feat(command): add rootfs command (#1271) 2021-10-04 21:03:34 +03:00
Teppei Fukuda
5eb94f785b fix(artifact): remove default disabled analyzers (fanal#300) 2021-10-04 17:47:17 +03:00
Huang Huang
a463e794ce fix: update fanal (#1272)
Fixes #1251 Fixes #1183 Fixes #1172
2021-10-04 17:47:00 +03:00
Teppei Fukuda
e0ca5eff38 feat(commands): remove deprecated options (#1270) 2021-10-04 15:49:04 +03:00
Huang Huang
173b3eb654 fix(config/yaml): support yaml files which incompatible with json spec (fanal#296) 2021-10-04 13:36:28 +03:00
Masahiro331
1ebb3296ee Aggregate jar result for table (#1269)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-10-04 11:30:12 +03:00
Teppei Fukuda
b37f682ee2 BREAKING(report): migrate to new json schema (#1265) 2021-10-04 10:22:24 +03:00
Teppei Fukuda
c80126ab41 feat(daemon): add more config fields (fanal#299)
* feat(daemon): add more config fields

* test(daemon): add more fields
2021-10-04 10:01:00 +03:00
Masahiro331
7e9fd6719c feat(applier/docker) aggregate jar result (fanal#298) 2021-10-03 14:12:25 +03:00
Huang Huang
b76899c318 fix(rpm): don't panic when parse source rpm name failed (fanal#297)
* fix(rpm): don't panic when parse source rpm name failed

* fix review suggestions
2021-10-03 13:24:25 +03:00
Teppei Fukuda
da905108b4 feat: improve --skip-dirs and --skip-files (#1249) 2021-10-03 13:08:09 +03:00
Teppei Fukuda
a2b995a671 feat: skip files and dirs (fanal#284) 2021-10-01 19:59:56 +03:00
Teppei Fukuda
bd57b4f9b5 fix(gobinary): skip large files (#1259) 2021-10-01 19:54:47 +03:00
afdesk
12463ce1b0 fix(oci): handling of complex image indexes (fanal#262) 2021-09-30 15:37:13 +03:00
dependabot[bot]
9b78112814 chore(deps): bump github.com/mitchellh/mapstructure from 1.4.1 to 1.4.2 (fanal#289) 2021-09-30 15:26:47 +03:00
Owen Rumney
ad721cf154 Chore(dep): update the tfsec version (fanal#291)
- Latest tfsec version has many more checks and also includes the AVD ID

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-09-30 12:15:11 +03:00
afdesk
96f7cc774a fix(go-binary): skip large files (fanal#294) 2021-09-30 12:09:21 +03:00
Fabian Windheuser
9027dc3252 Disable library analyzer for OS only scan type (#1191) 2021-09-29 11:54:46 +03:00
Teppei Fukuda
843813c0f3 feat(analyzer): add group consts (fanal#293) 2021-09-29 10:57:52 +03:00
fnishe
5750cc2e1a chore: update trivy version (#1252) 2021-09-29 10:56:44 +03:00
dependabot[bot]
94460305f3 chore(deps): bump golang.org/x/mod from 0.5.0 to 0.5.1 (fanal#290) 2021-09-29 10:24:20 +03:00
Eng Zer Jun
bbcce9f7b7 refactor: move from io/ioutil to io and os package (#1245)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-09-29 10:17:02 +03:00
dependabot[bot]
f7329d0d9f chore(deps): bump github.com/aws/aws-sdk-go from 1.40.45 to 1.40.49 (fanal#287) 2021-09-29 09:42:38 +03:00
Ankush K
b04be6834a fix(configfile-metadata): Enriched configfile metadata with OS value (fanal#286) 2021-09-28 09:42:06 +03:00
Minchao
6bcb4af10f fix: brew test command (#1253) 2021-09-27 07:25:30 +03:00
Naimuddin Shaik
8d13234554 fix:added layer info in packages (#1248)
* added layer info in packages

* fixed unit cases
2021-09-22 17:17:16 +03:00
Teppei Fukuda
982f35b424 fix(go/binary): improve debug messages (#1244) 2021-09-20 10:28:02 +03:00
dependabot[bot]
791cf73bcb chore(deps): bump github.com/aws/aws-sdk-go from 1.40.37 to 1.40.45 (fanal#283) 2021-09-19 20:58:46 +03:00
洋仔
2e170cd15a Update db.go (#1199)
fix args name error
2021-09-19 20:38:22 +03:00
Teppei Fukuda
92d1b61b5d fix(go/binary): ignore unrecognized exe error (fanal#282) 2021-09-19 20:37:19 +03:00
dependabot[bot]
7f5b5a6aa8 chore(deps): bump go.uber.org/zap from 1.19.0 to 1.19.1 (fanal#272) 2021-09-19 20:30:10 +03:00
Teppei Fukuda
dd49885a45 fix(go/binary): check file mode (fanal#281) 2021-09-19 18:15:17 +03:00
MaineK00n
eec42da179 feat(analyzer): support AlmaLinux and Rocky Linux (fanal#193) 2021-09-19 11:01:25 +03:00
AndreyLevchenko
cc6c67d81c fix(deps): fix CVE-2021-32760 for github.com/containerd/containerd (#1243)
Closes #1226
2021-09-19 09:49:15 +03:00
Teppei Fukuda
669fd1fd1d feat(debian): support the versions that reached EOL (#1237)
* refactor(debian): aggregate oval and json api into salsa

* fix(vulnerability): use package-specific severity

* chore(mod): update trivy-db
2021-09-17 13:59:46 +03:00
Teppei Fukuda
8cd7de276e feat(alpine): support unfixed vulnerabilities (#1235) 2021-09-16 22:20:59 +03:00
Teppei Fukuda
3bf3a46cd4 feat(report): add image config (#1231)
* feat(report): add image config

* chore(mod): update fanal

* test(scanner): fix type
2021-09-15 22:19:37 +03:00
Ankush K
8edcc62a8d feat(nodejs): support package.json (#1225)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-09-15 14:23:35 +03:00
Teppei Fukuda
074587e22a fix(image): disable node.js analyzers depending on mode (fanal#279)
* fix(image): disable node.js analyzers depending on mode

* fix(walk): do not ignore node_modules

* test(integration): fix golden
2021-09-15 13:42:14 +03:00
Teppei Fukuda
31c45ffc52 refactor: use testing DB instead of mock (#1234) 2021-09-15 10:06:01 +03:00
Ankush K
d8cc8b550b feat(ruby): support gemspec (#1224)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-09-14 23:16:19 +03:00
Teppei Fukuda
9a4e3b1ffa fix(applier): aggregate packages after merging layers (fanal#277) 2021-09-14 20:20:41 +03:00
Teppei Fukuda
f76c806687 fix(filter): handle the leading slash (fanal#276) 2021-09-14 16:41:07 +03:00
Teppei Fukuda
f21e5919a1 fix(image): do not use pointer for metadata (fanal#273) 2021-09-14 07:53:55 +03:00
Naimuddin Shaik
1dce67f41b feat(image): add image metadata (fanal#227)
* Made below changes
1. To avoid confusion, changed the layer(blobinfo) size to uncompressed size
2. Added v1.configfile as return type of inspect method

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-09-13 23:46:46 +03:00
Ankush K
dbc7a83e8c feat(python): add packaging detector and respective hook (#1223)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-09-13 20:59:11 +03:00
Teppei Fukuda
8020b0fcfb fix(ruby): add file path (fanal#269) 2021-09-13 17:18:20 +03:00
Teppei Fukuda
fa57fce6c9 fix(filter): hardcode system files in Distroless (fanal#268) 2021-09-13 15:05:29 +03:00
Teppei Fukuda
08e9240efd feat(python): support egg zip (fanal#267) 2021-09-13 15:02:06 +03:00
Teppei Fukuda
41c38375b5 feat(python): support egg format (fanal#266) 2021-09-13 14:14:17 +03:00
Teppei Fukuda
34c3c46056 feat(dpkg): analyze installed files (fanal#265)
* feat(dpkg): analyze installed files

* test(analyzer): fix dpkg version

* test: fix
2021-09-12 20:56:28 +03:00
knqyf263
bb20d89469 feat(apk): analyze installed files (fanal#264) 2021-09-12 20:19:58 +03:00
Teppei Fukuda
62ccd79436 feat(hook): add system file filter (fanal#263) 2021-09-12 14:23:07 +03:00
Ankush K
19c0b70d26 feat(license): Added support to new License field of go-dep-parser's library (#1167) 2021-09-09 14:32:50 +03:00
Teppei Fukuda
1c877da6fd feat(image): revert size (fanal#261) 2021-09-07 13:43:44 +03:00
dependabot[bot]
ff9631b94f chore(deps): bump github.com/open-policy-agent/opa from 0.31.0 to 0.32.0 (fanal#260) 2021-09-07 11:02:28 +03:00
dependabot[bot]
255bbe1477 chore(deps): bump github.com/aws/aws-sdk-go from 1.40.27 to 1.40.37 (fanal#258)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.40.27 to 1.40.37.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.40.27...v1.40.37)

---
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>
2021-09-05 20:31:20 +03:00
Ankush K
6c11c0c5a6 feat(node): add package.json analyzer (fanal#225)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-09-05 20:30:22 +03:00
afdesk
9d617777d5 fix(oracle): handle advisories contain ksplice versions (#1209)
* fix(oracle): handle advisories contain ksplice versions

Improve a handling of advisories contain ksplice versions:
* when one of them doesn't have ksplice, we'll also skip it
* extract kspliceX and compare it with kspliceY in advisories
* if kspliceX and kspliceY are different, we will skip the advisory.

Fixes #1205

* fix(oracle): handle advisories contain ksplice versions

simplify code and remove duplicated tests

Fixes #1205

* run go fmt
2021-09-05 11:29:13 +03:00
Ankush K
1ac15af66b feat(ruby): added new gemspec analyzer (fanal#226)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-09-05 11:26:55 +03:00
afdesk
5d57deaa4f fix(docs): remove OSVDB advisories (#1215)
Trivy no longer depends on OSVDB and can use "Ruby Advisory Database" for commercial usage.

Fixes #1208
2021-09-05 08:39:10 +03:00
Guilherme Macedo
b5955597a4 docs: fix typos in CONTRIBUTING.md (#1181)
* Fix typos in CONTRIBUTING.md

Fix small typos in CONTRIBUTING.md

* Fix typos in CONTRIBUTING.md

Fix small typos in CONTRIBUTING.md
2021-09-02 14:51:57 +03:00
Huang Huang
b1410b27b8 Update EOL of Debian 11 (#1180)
https://bits.debian.org/2021/08/bullseye-released.html
2021-09-02 14:32:47 +03:00
afdesk
0e777d386e fix(plugin): resolve a closure (#1207)
There is a closure inside a function for Action field: variable p always refers on the last plugin.
solution: redefine variable inside the for loop.

Fixes #1086
2021-09-02 14:29:54 +03:00
Pascal Borreli
b6d9c30eea docs: fix typo (#1206) 2021-09-01 18:03:14 +03:00
afdesk
5160a2eb53 fix(detector): change an argument for trivy-db getter (#1203)
use a package name instead of SrcName for getting of advisories
about Oracle packages.

Fixes #1170
2021-09-01 14:27:14 +03:00
Teppei Fukuda
473fe3a487 feat: add hooks (fanal#254)
* refactor(types): define Empty

* feat: add hooks

* test(integration): fix constructor
2021-08-24 14:26:23 +03:00
dependabot[bot]
b01a7b7207 chore(deps): bump github.com/aws/aws-sdk-go from 1.40.22 to 1.40.27 (fanal#255)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.40.22 to 1.40.27.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.40.22...v1.40.27)

---
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>
2021-08-24 10:59:23 +03:00
Ankush K
beaf89351c feat(python): add egg and wheel analyzer (fanal#223)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-08-19 14:02:24 +03:00
Teppei Fukuda
40ed227c23 chore(mod): update fanal (#1179)
* chore(mod): update fanal

* test(integration): fix error message

* test(integration): skip reaper
2021-08-15 15:19:22 +03:00
dependabot[bot]
57eafb5545 chore(deps): bump golang.org/x/mod from 0.4.2 to 0.5.0 (fanal#252) 2021-08-15 14:46:57 +03:00
dependabot[bot]
6434945ee2 chore(deps): bump go.uber.org/zap from 1.17.0 to 1.19.0 (fanal#244) 2021-08-15 14:08:30 +03:00
dependabot[bot]
fd1fbf9c54 chore(deps): bump github.com/alicebob/miniredis/v2 from 2.14.1 to 2.15.1 (fanal#246) 2021-08-15 13:20:41 +03:00
dependabot[bot]
1352f0e964 chore(deps): bump github.com/BurntSushi/toml from 0.3.1 to 0.4.1 (fanal#245) 2021-08-15 13:20:13 +03:00
Teppei Fukuda
9a5940cede chore(dependabot): change interval to weekly (fanal#251) 2021-08-15 13:16:12 +03:00
santhosh1729
2a4400c147 Add license info to package data (#1176) 2021-08-15 13:05:37 +03:00
dependabot[bot]
493a383497 chore(deps): bump github.com/aws/aws-sdk-go from 1.40.20 to 1.40.22 (fanal#250)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.40.20 to 1.40.22.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.40.20...v1.40.22)

---
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>
2021-08-15 12:53:55 +03:00
dependabot[bot]
9763688eca chore(deps): bump github.com/google/go-containerregistry from 0.1.2 to 0.6.0 (fanal#237)
* chore(deps): bump github.com/google/go-containerregistry

Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.1.2 to 0.6.0.
- [Release notes](https://github.com/google/go-containerregistry/releases)
- [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml)
- [Commits](https://github.com/google/go-containerregistry/compare/v0.1.2...v0.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/google/go-containerregistry

Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.1.2 to 0.6.0.
- [Release notes](https://github.com/google/go-containerregistry/releases)
- [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml)
- [Commits](https://github.com/google/go-containerregistry/compare/v0.1.2...v0.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

* chore(mod): update testdocker

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-08-15 12:52:22 +03:00
Teppei Fukuda
d4855d203c refactor: move lang-specific analzyers to lang dirs (fanal#249)
* refactor: move lang-specific analzyers to lang dirs

* chore(mod): update go-dep-parser
2021-08-15 11:46:44 +03:00
dependabot[bot]
620831145c chore(deps): bump github.com/docker/docker (fanal#240)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.7+incompatible to 20.10.8+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.7...v20.10.8)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  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>
2021-08-13 17:37:39 +03:00
dependabot[bot]
02c4a51493 chore(deps): bump github.com/go-redis/redis/v8 from 8.4.0 to 8.11.3 (fanal#238)
Bumps [github.com/go-redis/redis/v8](https://github.com/go-redis/redis) from 8.4.0 to 8.11.3.
- [Release notes](https://github.com/go-redis/redis/releases)
- [Changelog](https://github.com/go-redis/redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-redis/redis/compare/v8.4.0...v8.11.3)

---
updated-dependencies:
- dependency-name: github.com/go-redis/redis/v8
  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>
2021-08-13 08:42:59 +03:00
dependabot[bot]
fbce2901f9 chore(deps): bump github.com/aws/aws-sdk-go from 1.37.0 to 1.40.20 (fanal#239)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.37.0 to 1.40.20.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.37.0...v1.40.20)

---
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>
2021-08-13 07:27:17 +03:00
dependabot[bot]
ba0aeedfe8 chore(deps): bump go.etcd.io/bbolt from 1.3.5 to 1.3.6 (fanal#241)
Bumps [go.etcd.io/bbolt](https://github.com/etcd-io/bbolt) from 1.3.5 to 1.3.6.
- [Release notes](https://github.com/etcd-io/bbolt/releases)
- [Commits](https://github.com/etcd-io/bbolt/compare/v1.3.5...v1.3.6)

---
updated-dependencies:
- dependency-name: go.etcd.io/bbolt
  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>
2021-08-12 18:17:21 +03:00
dependabot[bot]
3ec380e500 chore(deps): bump github.com/open-policy-agent/opa from 0.25.2 to 0.31.0 (fanal#234)
Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 0.25.2 to 0.31.0.
- [Release notes](https://github.com/open-policy-agent/opa/releases)
- [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-policy-agent/opa/compare/v0.25.2...v0.31.0)

---
updated-dependencies:
- dependency-name: github.com/open-policy-agent/opa
  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>
2021-08-12 17:05:20 +03:00
Tauseef
82eb630be7 feat(nuget): support packages.config (#1095)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-08-12 15:27:13 +03:00
dependabot[bot]
0058bafdee chore(deps): bump github.com/sosedoff/gitkit from 0.2.0 to 0.3.0 (fanal#235)
Bumps [github.com/sosedoff/gitkit](https://github.com/sosedoff/gitkit) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/sosedoff/gitkit/releases)
- [Commits](https://github.com/sosedoff/gitkit/compare/v0.2.0...v0.3.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>
2021-08-12 14:40:44 +03:00
dependabot[bot]
940367cf2c chore(deps): bump actions/setup-go from 1 to 2.1.3 (fanal#231)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-08-12 14:06:13 +03:00
dependabot[bot]
78845b4767 chore(deps): bump actions/checkout from 1 to 2 (fanal#232)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
2021-08-12 13:18:58 +03:00
Matthieu MOREL
d55c687c2e chore(ci) : Setup dependabot and fix security issues (fanal#228)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-08-12 12:36:00 +03:00
Teppei Fukuda
e749817ebb test(nuget): sort libraries for consistency (fanal#230) 2021-08-12 12:16:16 +03:00
AndreyLevchenko
4a8db20a9a feat(python): add support for requirements.txt (#1169) 2021-08-11 11:14:37 +03:00
Tauseef
8eb30c2f02 Added a nuget config parser for packages.config (fanal#204)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-08-08 15:48:15 +03:00
thiago-gitlab
8db9b6a2a6 GitLab CI integration documentation (#1168)
Recommend the native GitLab integration.
2021-08-08 14:10:16 +03:00
AndreyLevchenko
0f8ac99dfc feat(python): add support for requirements.txt (fanal#219) 2021-08-05 13:55:20 +03:00
santhosh1729
380c05baee feat(apk): capture license information (fanal#217)
* Capture license information for apk packages

* changed order or license info in package struct

* Remove space replacement with comma for license info
2021-08-02 14:30:32 +03:00
santhosh1729
4ca24d9a6f feat(rpm): capture license (fanal#218)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-08-02 11:02:46 +03:00
AndreyLevchenko
c159501d0d chore(gorelease) change goreleaser config to include template examples (#1138)
Closes #1123
2021-07-28 11:05:14 +03:00
dependabot[bot]
76e63d1124 chore(deps): bump dmnemec/copy_file_to_another_repo_action (#1153)
Bumps [dmnemec/copy_file_to_another_repo_action](https://github.com/dmnemec/copy_file_to_another_repo_action) from 1.0.4 to 1.1.1.
- [Release notes](https://github.com/dmnemec/copy_file_to_another_repo_action/releases)
- [Commits](https://github.com/dmnemec/copy_file_to_another_repo_action/compare/v1.0.4...v1.1.1)

---
updated-dependencies:
- dependency-name: dmnemec/copy_file_to_another_repo_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>
2021-07-28 10:57:32 +03:00
dependabot[bot]
79b6684840 chore(deps): bump actions/stale from 3 to 4 (#1152)
Bumps [actions/stale](https://github.com/actions/stale) from 3 to 4.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/stale
  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>
2021-07-28 10:56:09 +03:00
AndreyLevchenko
214fe82c7e feat(report): add end of service life flag to OS metadata (#1142)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-07-27 17:08:57 +03:00
Matthieu MOREL
c489e31f5d chore: set up Dependabot for github-actions and docker (#1128) 2021-07-27 16:03:43 +03:00
MaineK00n
efd812cb1a docs: fix typo (#1149) 2021-07-27 16:00:54 +03:00
Teppei Fukuda
3a920dc401 docs: add some external links (#1147) 2021-07-27 15:39:55 +03:00
AndreyLevchenko
7cb1598991 chore (release): add ubuntu esm versions to deploy script (#1151) 2021-07-26 12:49:42 +03:00
tonaim
e73d250a1d Layer size (fanal#210)
while doing walk tar, we can get the actual size of layer from tar headers.
2021-07-26 10:36:05 +03:00
AndreyLevchenko
adc7ecc159 feat(data) add eosl flag to OS (fanal#213) 2021-07-22 14:41:16 +03:00
AndreyLevchenko
6a8800286e docs(troubleshooting) add urls which are required to download vuls db (#1137) 2021-07-21 11:07:57 +03:00
Simran Munot
f3f3029014 Updated the Alpine Image to 3.14 (latest) (#1130) 2021-07-20 13:27:43 +03:00
Simran Munot
0e52fde047 Added EOL for Ubuntu 21.10 (#1131)
As per (https://wiki.ubuntu.com/Releases) and (https://ubuntu.com/about/release-cycle), Ubuntu 21.10 is supported until July 2022
2021-07-20 13:25:01 +03:00
AndreyLevchenko
9b3fba04f9 fix(image): disabled scanning of config files within container images (#1133) 2021-07-20 10:15:45 +03:00
Liam Galvin
81e4ab54dd Update tfsec to v0.46.0 (fanal#208) 2021-07-19 18:19:03 +03:00
AndreyLevchenko
13823326ed fix: disabled scanning of config files within containers (fanal#211) 2021-07-19 17:45:37 +03:00
mustafa-rean
1101634f6a docs: fixed typo (#1124) 2021-07-18 12:18:39 +03:00
Niklas
499b7a6ecf update cyclonedx github action to v0.3.0 (#1127)
use version `^v0` instead of `latest` to avoid breaking the build when cyclonedx-gomod introduces breaking changes in a new major version. See https://github.com/CycloneDX/gh-gomod-generate-sbom/releases/tag/v0.3.0

Signed-off-by: nscuro <nscuro@protonmail.com>
2021-07-18 11:59:55 +03:00
Teppei Fukuda
cea9b0bc78 fix(policy): fix panic on the first run (#1116) 2021-07-12 21:38:20 +03:00
Teppei Fukuda
dea3428804 docs(misconf): add comparison with Conftest and tfsec (#1111) 2021-07-12 13:43:39 +03:00
Teppei Fukuda
47d600a9b4 feat(report): add schema version (#1110) 2021-07-12 12:27:27 +03:00
Teppei Fukuda
eae4bafff3 fix(scan): change unknown os from info to debug (#1109) 2021-07-12 12:26:48 +03:00
Teppei Fukuda
9e08bd44fb docs: add misconfiguration (#1101)
Co-authored-by: Itay Shakury <itay@itaysk.com>
2021-07-12 03:14:17 +03:00
Teppei Fukuda
d9883e4442 fix(config): rename include-successes with include-non-failures (#1107) 2021-07-11 16:55:13 +03:00
Teppei Fukuda
e6f7e556e8 feat(config): support --trace (#1106) 2021-07-11 16:07:30 +03:00
Teppei Fukuda
c8cfd72cd5 feat(policy): add query and traces (fanal#207)
* feat(policy): add query and traces

* fix tests
2021-07-11 12:01:15 +03:00
Teppei Fukuda
4b84e79cc3 fix(policy): reduce the Internet access (#1105)
* fix(policy): send a request only when it needs update

* fix(policy): update DownloadedAt after fetching image manifest
2021-07-10 23:17:04 +03:00
Teppei Fukuda
05ae22a85c chore: bump golangci-lint to v1.41.1 (#1104) 2021-07-10 21:23:00 +03:00
Teppei Fukuda
0e8ab4f811 feat(config): add external scanner (fanal#206) 2021-07-10 11:07:53 +03:00
Teppei Fukuda
a0e5c3a2e2 feat: support config scanning (#931) 2021-07-09 08:18:53 +03:00
Teppei Fukuda
c0e4e47aba refactor(config): define hcl2 parser (fanal#205) 2021-07-07 22:57:41 +03:00
Teppei Fukuda
9bad4c6cc8 refactor(config): replace parsers (fanal#202) 2021-07-07 14:17:45 +03:00
Teppei Fukuda
8e8274eca7 feat(terraform): support additional metadata (fanal#201) 2021-07-07 11:56:24 +03:00
Teppei Fukuda
797fd0884f feat(config): add additional fields to metadata (fanal#200)
* feat(config): add additional fields to metadata

* feat(config): support multiple links
2021-07-07 11:41:57 +03:00
Teppei Fukuda
5d54332bb0 fix(policy): support empty string from exception rule (fanal#199) 2021-07-05 17:18:50 +03:00
Teppei Fukuda
a922042d2a fix(policy/engine): upper severity (fanal#197) 2021-07-04 16:02:57 +03:00
Teppei Fukuda
c3d5832300 test(config): add sort test (fanal#196) 2021-07-04 11:33:48 +03:00
Teppei Fukuda
959c07688e fix(config/json): skip lock files (fanal#195)
* fix(config/json): skip lock files

* refactor(config/json): use a single extension
2021-07-04 11:24:03 +03:00
Teppei Fukuda
8172518a05 fix(terraform): support severity of passed checks (fanal#194) 2021-07-04 10:32:58 +03:00
Teppei Fukuda
07a11744d5 fix(analyzer): unique analyzers (fanal#192) 2021-07-03 13:04:34 +03:00
Teppei Fukuda
712f9eba35 feat(report): add artifact metadata (#1079) 2021-06-30 12:53:33 +03:00
Teppei Fukuda
3120d6c3e1 fix(policy/engine): uniq rule names (fanal#191) 2021-06-30 10:32:18 +03:00
Teppei Fukuda
67b7257660 feat(config): support Terraform (fanal#190)
* feat(config): support Terraform

* test(config): add terraform

* refactor: add a comment

* test: fix
2021-06-29 15:43:58 +03:00
Teppei Fukuda
cb66108f4d fix(config): change selector type (fanal#189)
* fix(config): change selector type

* test(policy): fix test data
2021-06-28 14:52:57 +03:00
Teppei Fukuda
ac56d1c24d feat(artifact): add artifact type (fanal#185) 2021-06-28 11:31:54 +03:00
Teppei Fukuda
867eee8499 fix(dockerfile): rename command to stages (fanal#188)
* fix(dockerfile): rename command to stages

* test(docker): fix
2021-06-26 15:56:02 +03:00
Teppei Fukuda
1ab6552f73 test(dockerfile): add multi-stage build (fanal#187)
* test(dockerfile): add multi-stage build

* test(dockerfile): add multi-stage Dockerfile
2021-06-25 17:17:26 +03:00
Vinod Anandan
803b2f9a93 Generate SBOM (#1076)
* Generate SBOM

Generate and publish SBOM as part of the release.

* Publish bom.json

* Ignore SBOMs generated during CI
2021-06-22 09:53:08 +03:00
Teppei Fukuda
92f980f4b7 fix(db): multiple prefixed data sources (#1070) 2021-06-20 16:23:26 +03:00
Chris Novakovic
52e98f1bd9 Add EOL date for Alpine 3.14 (#1072)
Per https://alpinelinux.org/releases/, Alpine 3.14 is supported until
2023-05-01.

Closes #1071.
2021-06-20 11:15:22 +03:00
Dirk Mueller
6cd9a328a4 suse: mark sle 15.3 as maintained, add opensuse 15.3 (#1059)
SLE 15.3 is about to be released and will be maintained until
6 months after 15.4. this allows us to guess the 15 SP2 EOL date,
so updating that as well.
2021-06-17 12:09:46 +03:00
Teppei Fukuda
03a73667db docs: improve data sources (#1069)
* docs: improve data sources

* docs: add os data sources

* refactor
2021-06-16 16:43:42 +03:00
Teppei Fukuda
a29d6d8c5b chore(label): add kind/security-advisory (#1068) 2021-06-16 15:33:06 +03:00
Teppei Fukuda
2a08969ddc fix(asff): replace slice with substr (#1058) 2021-06-10 16:19:28 +03:00
Abhinav Khanna
3a94b7399b fix(helm-chart): parametrized ingress host path (#1049)
Signed-off-by: Abhinav Khanna <abhinav.khanna@salesforce.com>
2021-06-10 16:03:48 +03:00
Tauseef
41d000c97e feat: support Google Artifact Repository (#1055)
* Update Fanal library reference

This commit updates Fanal library version to latest which
includes support for Google artifact repository.

* chore(mod): tidy

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-06-10 12:19:40 +03:00
David Wittman
78da283c1b Update ASFF template to use label for severity (#1047)
* Update ASFF template to use label for severity

Use of the `Normalized` and `Product` fields is deprecated in the [ASFF spec](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-format-attributes.html#asff-severity). Instead, we should just provide the severity as a `Label`, which simplifies the logic in this template quite a bit as well.

* fix(asff): use severity var

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-06-10 12:12:53 +03:00
Teppei Fukuda
e362843705 BREAKING: migrate to a new JSON schema (#782)
* feat: introduce a new JSON schema

* test: update

* chore(mod): update fanal

* refactor: add a comment

* test(report): fix

* refactor(writer): add omitempty

* refactor: replace url

* test(scanner): fix
2021-06-08 18:03:24 +03:00
David Wittman
097b8d4881 docs: Fix link to AWS Security Hub template (#1046) 2021-06-07 10:14:18 +03:00
Teppei Fukuda
3b6122f86d refactor(server): support gzip (#1045) 2021-06-06 17:54:12 +03:00
Teppei Fukuda
f75a36945c chore(rpc): update protoc and twirp (#1044) 2021-06-06 16:33:25 +03:00
tonaim
e4c32cdb77 Added support for list all packages flag in client (#1032)
* Added support for list all packages flag in client

This commit is to support --list-all_pkgs argument in client command
Example command: trivy -d client --list-all-pkgs --remote http://localhost:8080 ubuntu:18.04.

* Updated argument in client.md

* Fixed all format issues
2021-06-03 22:47:48 +03:00
Tauseef
60c5a04ad1 feat: Support Google artifact registry (fanal#181)
* feat: Support Google artifact registry

This commit adds the capability to scan images from Google artifact
registry(GAR). GAR domains were earlier rejected by Trivy e.g.
europe-west3-docker.pkg.dev etc. With this change, we will treat domain
ending with 'docker.pkg.dev' as GAR domain and use gcloud sdk to fetch
credentials from provided file or credstore.

* refactor: rename GCR to Registry

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-06-02 08:40:43 +03:00
tonaim
2bb882fdec feat(image): add uncompressed layer size (fanal#182)
* Add uncompressed layer size

This commit will help in getting uncompressed layer sizes. Can sum up these layer sizes to get the actual image size

* Removed unnecessary exception

* refactor

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-06-01 17:41:05 +03:00
Carol Valencia
fb19abd09a chore: chart with 0.18.3 (#1033)
Co-authored-by: krol3 <krol3@users.noreply.github.com>
2021-06-01 08:29:21 +03:00
bmagistro
d2afc206b2 feat: add gitlab codequality template (#895)
* Add gitlab codequality template

* add unit test for gitlab codequality template

* update line endings to msdos (\r\n) from unix

* update gitlab docs for codeclimate template
2021-05-31 11:20:59 +03:00
Teppei Fukuda
43ff5f93e8 feat(plugin): add aqua plugin (#1029) 2021-05-31 10:54:46 +03:00
rahul2393
5e6a50b2f9 fix(go): if patchedVersion is empty mark it as vulnerable (#1030)
* fix(go): if patchedVersion is empty mark it as vulnerable

* fix(go): skip checking for vulnerable version if empty

* fix(go): refactored empty check at start of match

* fix(go): added unit test for empty patched/vulnerable version
2021-05-30 15:43:14 +03:00
Teppei Fukuda
23b9533791 docs(ubuntu): fix supported versions (#1028) 2021-05-30 14:13:45 +03:00
Huang Huang
d1f8cfcfdc Support Ubuntu 21.04 (#1027) 2021-05-30 11:10:19 +03:00
Teppei Fukuda
aa2336be92 chore: remove codecov (#1016) 2021-05-27 09:25:37 +03:00
Tomoya Amachi
e64617212e fix typo on github-actions.md (#1022) 2021-05-27 09:10:46 +03:00
Teppei Fukuda
85e45cad95 chore(ci): change to more granular tokens (#1014) 2021-05-24 02:35:44 +03:00
rahul2393
9fa512a652 chore(ci): add Go scanning and update dependencies (#1001)
* Fixed dependency

* Scan repo action added

* only check for Critical with exit-code=1

* Fix vulnerability in go.sum

* more fixes
2021-05-23 11:21:23 +03:00
skovati
349371bbc9 docs: Add HIGH severity to Trivy command in GitLab CI example to match comment (#1013)
* Add HIGH severity to Trivy command in GitLab CI example to match comment

* Change comment to accurately reflect Trivy command that fails only on CRITICAL vulnerabilities
2021-05-23 04:55:46 +03:00
Teppei Fukuda
4446961167 fix(image): disable go.sum scanning (#1007) 2021-05-20 10:01:19 +03:00
Teppei Fukuda
04473ada48 fix(gomod): handle go.sum with an empty line (#1006) 2021-05-20 09:39:06 +03:00
Teppei Fukuda
1b66b77f69 feat: prepare for config scanning (#1005)
* temp: disable config scanning
2021-05-20 09:05:36 +03:00
Teppei Fukuda
a0f5bdc861 fix(image): disable go.sum scanning (fanal#179) 2021-05-20 06:43:23 +03:00
Teppei Fukuda
4a2b1c09d1 fix(gomod): fix a panic (fanal#178) 2021-05-20 05:10:43 +03:00
Teppei Fukuda
6fd4c8951f feat: support config (fanal#166)
Co-authored-by: aprp <doelaudi@gmail.com>
Co-authored-by: rahul2393 <rahulyadavsep92@gmail.com>
2021-05-19 08:05:14 +03:00
gboer
8fc6ea6489 Clarify that dev dependencies are excluded (#986)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-05-19 05:47:05 +03:00
rahul2393
eaf2da20a6 Include target value in Sarif template ruleID (#991)
* Include target value in Sarif template ruleID

* Fix format
2021-05-13 20:10:34 +03:00
rahul2393
083c157b05 chore(mkdocs): allow workflow_dispatch (#989)
* Updated docs for go libraries.

* Add option to manually trigger doc publish
2021-05-12 19:57:14 +03:00
rahul2393
e26e39a7f8 fix(vuln) unique vulnerabilities from different data sources (#984)
* Fix duplicate Rule in sarif template

* Fix integration tests

* Fixed tests

* Update certs validity upto 2100

* Moved deduplication logic to Filter

* Fix linting issue

* Fix liniting issue

* fix: deduplicate vulnerabilities

* refactor

* fix: add installed versions to uniq keys

* Fix tests

* Fix Unit tests.

* Revert port change

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-05-12 13:10:05 +03:00
rahul2393
04e7ccabea feat(go): added support of gomod analyzer (#978)
* Added support of gomod analyzer.

* add imports

* fix gocyclo

* Ran go fmt
2021-05-11 04:18:13 +03:00
rahul2393
b2dd367f8e feat(go): added support of go.sum (fanal#175)
* Added support of go.sum

* Added requested changes

* fix test name

* refactor

* refactor

* feat(main): import gomod

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-05-02 02:50:03 +03:00
rahul2393
415e1d8ea3 Upgrade fanal dependency (#976) 2021-05-01 13:14:08 +03:00
rahul2393
7141f20e88 Skipping directory is file is symlink (fanal#176) 2021-05-01 12:30:21 +03:00
Teppei Fukuda
3bb8852ef7 docs: mention upx binaries (#974) 2021-05-01 04:39:42 +03:00
rahul2393
c0fddd9467 Upgrade alpine to fix git and libcurl vulnerabilities in trivy docker image scan (#971)
* Upgrade alpine to fix git and libcurl vulnerabilities in trivy docker image scan

* remove patch version
2021-04-30 11:06:57 +03:00
Teppei Fukuda
41c066d4c8 fix(fs): skip dirs (#969) 2021-04-30 07:50:07 +03:00
Teppei Fukuda
f6a678c60a fix(fs): skip dir (fanal#173)
* fix(fs): skip dir

* test(fs): fix
2021-04-30 07:43:51 +03:00
Teppei Fukuda
2316931e3b chore(ci): replace GITHUB_TOKEN with ORG_GITHUB_TOKEN (#965) 2021-04-29 21:57:43 +03:00
Teppei Fukuda
77f3d55149 chore(ci): clone trivy-repo after releasing binaries (#963) 2021-04-29 21:15:11 +03:00
Teppei Fukuda
b319579b78 docs: add golang support (#962) 2021-04-29 20:53:12 +03:00
Teppei Fukuda
0c0febe28a fix(table): skip zero vulnerabilities on java (#961) 2021-04-29 20:52:55 +03:00
Teppei Fukuda
d41736b828 chore(ci): create a release discussion (#959)
* chore(ci): create a release discussion

* chore(ci): bump up goreleaser version
2021-04-29 19:53:39 +03:00
Masahiro331
c88bbbd6cc feat(go): support binary scan (#948)
* feature(gobinary) support gobinary scan

* chore(mod): update fanal

* update(go.mod) update trivy-db

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-04-29 19:47:50 +03:00
Masahiro331
d88b7cfb08 feat(java): support GitLab Advisory Database (#917)
* feature(maven) support requirements

* test(maven) fix test name

* update(go.mod) update fanal

* refactor(maven compare) fix test

* update(go.mod) update go-mvn-version
2021-04-29 18:40:51 +03:00
Masahiro331
3cf1f4c972 feat(golang): support binary (fanal#165)
* feat(GoBinary) support gobinary and add test

* update(modules) update go-dep-parser

* test(gobinary) update test

* fix(library): return nil with empty result

* test(library): add tests

* refactor: group imports

* chore: update .gitignore

* Update README.md

* refactor(gobinary): update an error

* chore(ci): bunp up Go to 1.16

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-04-29 17:21:35 +03:00
Masahiro331
271879331e feat(analyzer): limit the number of parallelism (fanal#172)
* add(AnalyzeFile) add limit for analyze

* fix(AnalyzeFile) limiter define global

* change(AnalyzeFile) up to limit of scan concurrency

* change(Artifact Goroutine) fix limiter

* feat: use semaphore

* refactor: remove unused const

* refactor: wrap errors

* update(go.mod) update go-dep-parser

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-04-28 03:38:30 +03:00
Teppei Fukuda
1385fa4190 feat: show help message when the context's deadline passes (#955) 2021-04-27 17:13:01 +03:00
Teppei Fukuda
0346a106f8 chore(mkdocs): replace github token (#954) 2021-04-27 14:43:54 +03:00
Yong Yan
60a4e7e5d4 Update SARIF report template (#935)
* Update SARIF repot template

* Update test data sarif.golden

* Fix golangci-lint issue

* Add test cases

* Address review feedbacks

* Inline value in assert statement

* Fix location Uri format issue
2021-04-19 13:35:30 -07:00
Henry Jenkins
39ab6bd630 Update install docs to make commands consistent (#933)
* Update install docs to make commands consistent

Removed `$` prefixes from code blocks to make them constant across the page and make the commands copypasta-able.

* Revert change on docs which need manual changes
2021-04-12 10:04:59 +03:00
Drew Robinson
0518d2785f Docker multi-platform image build with buildx, using Goreleaser (#915)
* Minimal WIP cross platform build with goreleaser

* Add Docker manifest, update docker image tags

* Update GH release workflow

* Comment out ECR image repo and RPM/DEB generation

* Enable and set up Docker Buildx for multi-platform builds

Also add caching of Go modules

* Add Docker Buildx support, re-enable parent repo workflows

* Add Docker Buildx support for multi-arch image builds

* Added Docker Buildx setup into `build-test` job of `test` workflow

Otherwise the `test` workflow will fail.
Also updated `setup-go` GH action to latest version, v2, per request
of @krol3
2021-03-29 11:53:28 +03:00
Paul T
a6b8ec3134 Fix JUnit template for AWS CodeBuild compatibility (#904)
* #902 ensure the number of tests matches the number of failures

* #902 tidy up the template and ensure test is aligned
2021-03-29 11:53:09 +03:00
Teppei Fukuda
6d22387727 break(cli): use StringSliceFlag for skip-dirs/files (#916)
* fix(cli): use StringSliceFlag for skip-dirs/files

* test(scanner): rename

* test(integration): fix
2021-03-29 10:25:30 +03:00
Teppei Fukuda
7221579340 docs: add white logo (#914) 2021-03-24 13:04:17 +02:00
rahul2393
ee29ffaf4f add package name in ruleID (#913) 2021-03-23 17:27:58 -07:00
Carol Valencia
8935aa6523 feat: gh-action for stale issues (#908)
* feat: gh-action for stale issues

* Update .github/workflows/stale-issues.yaml

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

Update .github/workflows/stale-issues.yaml

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

Update .github/workflows/stale-issues.yaml

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

Update .github/workflows/stale-issues.yaml

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

Update .github/workflows/stale-issues.yaml

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

Update .github/workflows/stale-issues.yaml

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

Co-authored-by: krol3 <krol3@users.noreply.github.com>
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2021-03-21 17:39:59 +02:00
Teppei Fukuda
288481ffe1 chore(triage): add lifecycle/active label (#909) 2021-03-21 17:36:14 +02:00
Carol Valencia
f961e9912e feat: publish helm repository (#888)
* feat: publish helm repository

* chore: docs about helm installation

Co-authored-by: krol3 <krol3@users.noreply.github.com>
2021-03-19 11:00:51 +02:00
Stephan
0edf73bf3d Fix Documentation Typo (#901) 2021-03-19 10:59:19 +02:00
Teppei Fukuda
f5b060a9f1 docs: migrate README to MkDocs (#884)
* docs: slim README

* docs: add images

* docs: update README

* docs: add futher reading

* docs: add docs for maintainers

* docs: fix links

* docs: add notes

* Update docs/further.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/further.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/further.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/index.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/index.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/index.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* docs: update mkdocs.yml

* chore: add a mkdocs target to Makefile

* docs(installation): use git.tag

* chore(Makefile): fix the tag of the mkdocs image

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
2021-03-17 07:19:34 +02:00
Teppei Fukuda
c26a3e481f refactor(internal): export internal packages (#887)
* refactor: export internal packages

* refactor(server): define Server

* refactor: fix lint issues

* test(integration): fix imports
2021-03-14 17:04:01 +02:00
aprp
493a70b45c feat(config): support HCL files (fanal#158)
* feat(config): support HCL1 files

* feat(config): support HCL2 files

* feat(hcl): add Version()

* feat(config): support HCL files

- combine HCL2.0 and HCL1.0 parsing, checking for conformation to HCL2.0
spec first
- checks for HCL1.0 conformation if content does not comply with HCL2.0
spec
- parsing returns an error only if file content does not
comply with BOTH HCL2.0 and HCL1.0

* add Type() test

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-03-11 11:09:11 +02:00
Teppei Fukuda
8b3b5d0290 feat: support plugins (#878)
* fix(log): set the default logger

* feat: support plugins

* feat(plugin): add run command

* feat(plugin): add uninstall command

* test(plugin): add tests

* chore(ci): pin go version

* chore(ci): disable G204

* refactor: fix lint issues

* feat(plugin): skip downloading installed plugins

* feat: add TRIVY_RUN_AS_PLUGIN

* support Ubuntu 20.10 (#876)

* docs(README): update ubuntu versions (#877)

* add MkDocs implementation (#870)

* mkdocs: add top level nav

* mkdocs: add installation nav

* mkdocs: add quick-start nav

* mkdocs: add examples nav

* mkdocs: add CI nav

* mkdocs: add vuln-detection nav

* mkdocs: add comparison nav

* mkdocs: add usage nav

* mkdocs: add migration nav

* mkdocs: add FAQ nav

* mkdocs: add mkdocs.yml

* mkdocs: add github workflow

* docs: update documents

* fix links

* chore(ci): use ORG_GITHUB_TOKEN

* chore(mkdocs): use mike

* chore(ci): support dev

* chore(ci): documentation test

Co-authored-by: knqyf263 <knqyf263@gmail.com>

* docs: add plugins

* chore: remove stale workflow

* refactor: fix lint issues

Co-authored-by: Huang Huang <mozillazg101@gmail.com>
Co-authored-by: aprp <doelaudi@gmail.com>
2021-03-10 21:44:08 +02:00
Teppei Fukuda
37edc66418 chore(ci): deploy dev docs only for the main branch (#882)
* chore(ci): deploy dev docs only for the main branch

* chore(ci): add mkdocs.yml
2021-03-10 17:55:16 +02:00
aprp
becd5088df add MkDocs implementation (#870)
* mkdocs: add top level nav

* mkdocs: add installation nav

* mkdocs: add quick-start nav

* mkdocs: add examples nav

* mkdocs: add CI nav

* mkdocs: add vuln-detection nav

* mkdocs: add comparison nav

* mkdocs: add usage nav

* mkdocs: add migration nav

* mkdocs: add FAQ nav

* mkdocs: add mkdocs.yml

* mkdocs: add github workflow

* docs: update documents

* fix links

* chore(ci): use ORG_GITHUB_TOKEN

* chore(mkdocs): use mike

* chore(ci): support dev

* chore(ci): documentation test

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-03-09 20:05:37 +02:00
Teppei Fukuda
e517bef17f docs(README): update ubuntu versions (#877) 2021-03-07 08:35:26 +02:00
Huang Huang
da2b28a3bb support Ubuntu 20.10 (#876) 2021-03-07 07:10:23 +02:00
Teppei Fukuda
965bb6d08a feat(cache): introduce versioned cache (#865)
* refactor(scan): rename image to artifact

* refactor(scan): trim version suffixes for debug info

* chore(mod): update fanal

* refactor: reduce complexity

* chore(mod): update fanal

* refactor(scan): early return
2021-02-28 12:18:56 +02:00
Teppei Fukuda
b64a526223 feat(cache): introduce versioned keys (fanal#160)
* feat(analyzer): return analyzer versions as string

* feat(artifact): add version suffix

* fix: revert embedded analyzer versions

* test(cache/fs): update tests

* feat(cache): add common functions

* fix(analyzer): replace string with iota

* fix tests
2021-02-28 10:57:56 +02:00
aprp
1a53cbe31a feat(config): support Dockerfiles (fanal#161)
* feat(config): support Dockerfile

* update namings and add Type() test

* only accepts dockerfile as ext/base name

* simplify dockerfile check

* add test case
2021-02-28 10:19:59 +02:00
aprp
34f865d6e5 feat(config): support JSON files (fanal#159)
* feat(config): support JSON files

* feat(json): add Version()

* fix Type() and add test
2021-02-28 06:14:00 +02:00
Teppei Fukuda
049728665f chore: bump up Go to 1.16 (#861)
* chore: bump up Go to 1.16

* chore(release): support darwin/arm64
2021-02-25 19:04:13 +02:00
aprp
30fc5b97da feat(config): support TOML files (fanal#157)
* feat(config): support TOML files

* feat(toml): add Version()
2021-02-25 17:19:34 +02:00
Teppei Fukuda
fcb9a93d05 fix: allow the latest tag (#864)
* fix: allow the latest tag

* docs: update README
2021-02-25 16:23:11 +02:00
Teppei Fukuda
425eaf8a2a feat: disable analyzers (#846)
* feat: pass disabled analyzers

* refactor(run): split into functions

* feat(run): pass disabled analyzers

* chore(mod): update fanal

* chore(mod): update fanal

* refactor
2021-02-24 11:02:24 +02:00
Teppei Fukuda
059deda653 feat(cache): add analyzer versions (fanal#156)
* feat(cache): add analyzer versions

* feat(artifact): add analyzer versions

* feat(analyzer): add analyzer versions

* feat(analyzer): add Version()

* feat(yaml): add Version()

* fix(analyzer): use consts
2021-02-24 07:25:01 +02:00
Teppei Fukuda
47ce996d36 chore(ci): push the official image to public ECR (#855) 2021-02-23 07:35:31 +02:00
Teppei Fukuda
c813a60b6f feat(config): support YAML files (fanal#155)
* feat: add config

* feat(analyzer/config): add yaml analyzer

* chore(mod): update

* chore(ci): bump up Go to 1.15

* test(analyzer/config): add anchors yaml test

* test(analyzer/config): add circular referneces yaml test

* refactor(analyzer/config) change yaml interface

* test(analyzer/config) add multiple yaml test

* chore(analyzer) change comment

Co-authored-by: masahiro331 <mur4m4s4.331@gmail.com>
2021-02-23 07:11:35 +02:00
Teppei Fukuda
907e6be7fd feat(analyzer): disable analyzers (fanal#153)
* feat: add Type()

* feat: pass disabled analyzers

* fix(jar): return type

* fix: pass disable analyzers to constructors

* test: fix integration tests
2021-02-22 13:56:00 +02:00
Teppei Fukuda
e890ae02c2 chore(ci): migrate CircleCI to GitHub Actions (#850) 2021-02-22 06:56:17 +02:00
shorty-at-next
9bc3565af1 adds example with multistage build (#853) 2021-02-21 08:42:38 +02:00
aprp
a0cd5d70ae remove SARIF helpUri if empty (#841) (#845)
* remove SARIF helpUri if empty (#841)

* add tests for primary url
2021-02-19 12:24:11 -08:00
Nils Bokermann
3170dc3e63 Add Sprig to Template Engine (#832)
* Add sprig template function to template writer

* gofmt corrected

* includes corrected

* GoFMT corrected

* Added accidentically removed template functions

* Corrected use of template-file

* Add sprig test

* Add short example for sprig.
2021-02-18 08:39:22 +02:00
Andreas Härpfer
10ad2edd3c Fix "GitLab CI using Trivy container" usage example (fixes #843) (#844) 2021-02-15 11:24:48 +02:00
Teppei Fukuda
c9f22f4e55 feat(java): support jar/war/ear (#837)
* refactor(server): remove Detect endpoint

* refactor(library): do not use interface

* refactor: add dbtest package

* test: add bolt fixtures

* feat: support jar scanning

* refactor: rename node to npm

* refactor: fix lint issues

* test(maven): remove some tests

* chore(mod): update fanal

* docs: update README

* chore(mod): update trivy-db

* fix(library/drive): add ecosystem

* fix: do not display 0 vulnerabilities

* refactor(table): split method

* Update README.md (#838)

* fix(app): increase the default value of timeout (#842)

* feat(maven): use go-mvn-version

* test(maven): update tests

* fix(scan): skip files and dirs before vulnerability detection

* fix: display log messages only once per type

* docs(README): add file suffixes

* chore(mod): update go-mvn-version

* feat(log): set go-dep-parser logger

* chore(mod): update fanal

* docs: update README

* docs(README): add java source

* test(maven): fix invalid case
2021-02-14 18:19:42 +02:00
Teppei Fukuda
4f9e51897e feat(library): support jar/war/ear (fanal#152)
* refactor(library): fix the error message

* feat(analyzer): support jar/war/ear

* feat(main): add jar

* test(jar): add tests

* chore(mod): update go-dep-parser

* fix: change bundler to jar

* chore(mod): update go-dep-parser

* feat(jar): pass file paths

* feat(analyzer): analyze files in parallel

* chore(mod): update go-dep-parser

* fix: sort results

* feat(jar): allow capital extensions
2021-02-14 14:28:59 +02:00
Teppei Fukuda
3047c524d9 fix(app): increase the default value of timeout (#842) 2021-02-14 08:15:53 +02:00
Teppei Fukuda
89e5295421 Update README.md (#838) 2021-02-11 14:37:17 +02:00
Maximilian Schlosser
cdabe7fc9e Fix compatibility for Jenkins xunit plugin (#820)
* Compatibility for Jenkins xunit plugin

* fix test
2021-02-08 11:10:06 +02:00
Denis Pisarev
b0fe439309 README: add Gitlab job that uses a container with trivy (#823) 2021-02-08 11:08:57 +02:00
Teppei Fukuda
6685cd4e21 feat: support Podman (#825)
* docs(README): add Podman support

* chore(mod): update fanal

* docs: update README

* docs(README): add how to build images
2021-01-28 16:53:08 +02:00
Kota Kanbe
7a683bd02e fix(eol): update EOL dates (#824) 2021-01-27 07:46:22 +02:00
Teppei Fukuda
6ed03a83a5 fix(python): follow PEP 440 (#816)
* feat(python): replace go-version with go-pep440-version

* chore(mod): add go-pep440-version

* refactor: add trick for golangci-lint

* refactor: rename test functions
2021-01-25 14:44:07 +02:00
Huang Huang
182cb800a8 Support alpine 3.13 (#819) 2021-01-24 13:59:19 +02:00
Paul Mossman
2acd1cafd0 Changed the output string to "Using your github token". (#814) 2021-01-21 09:10:33 +02:00
Clemens Buchacher
dd35bfd1a1 Align comment with code (#812) 2021-01-21 09:09:42 +02:00
Christian Zunker
1f17e71dce Parse redis backend url (#804)
As suggested by the go-redis client, parse the url to get the config.
This will fix problems, when the url contains a username and/or password.

Fixes #798

Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>
2021-01-21 09:08:53 +02:00
Teppei Fukuda
4a10108d11 feat(image): support Podman (fanal#149)
* refactor(daemon): replace Image with DockerImage

* feat(image): support Podman

* chore(mod): update testdocker
2021-01-19 07:12:30 +02:00
Teppei Fukuda
0954f6b1bb Update README.md (#810) 2021-01-19 06:06:12 +02:00
Carlos Tolon
6b29bf1c71 Added nodeSelector, affinity and tolerations to helm chart (#803)
* Added nodeSelector, affinity and tolerations to helm chart

* Updated helm README.md and bumped version
2021-01-11 16:33:35 +02:00
Oran Moshai
f6afdf0145 Fix readme typo in policy flag (#805)
Co-authored-by: oranmoshai <oran.moshai@aquasec.com>
2021-01-11 16:32:33 +02:00
Teppei Fukuda
3f358815c9 refactor(analyzer): pass file paths to analyzers (fanal#150)
* refactor(analyze): pass file path to analyzers

* refactor(library): embed file path

* refactor(library): aligh with new interface

* refactor(os): align with new interface

* refactor(pkg): aligh with new interface

* refactor(analyzer): remove Name()

* Revert "refactor(analyzer): remove Name()"

This reverts commit aaea3808f493a8ae82956ac69880a5f287090408.

* refactor: pass AnalysisTarget
2021-01-11 06:47:04 +02:00
Damien Carol
412847d6a2 Fix errors in SARIF format (#801)
* Fix errors in SARIF format

* Fix one golden file for integration tests

* Fix golden file

* Fix golden again :>

* Update sarif.tpl

* Update alpine-310.sarif.golden
2021-01-08 14:16:35 -08:00
Christian Zunker
5b2786213a Fix env variable for github token (#796)
Fixes #795

Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>
2021-01-07 15:51:20 +02:00
Teppei Fukuda
6ed25c19e6 fix(vulnerability): set unknown severity for empty values (#793)
* fix(vulnerability): set unknown severity for empty values

* chore(mod): update trivy-db
2021-01-07 06:48:32 +02:00
Teppei Fukuda
bac65cb793 feat(image): support RepoTags and RepoDigests (fanal#148)
* refactor(oci): cut out to a separate file

* refactor(archive): cut out to a separate file

* feat(image): define extender

* feat(remote): support RepoTags and RepoDigests

* feat(image): add archiveExtender

* feat(image): add daemonExtender

* feat(daemon): return inspect content

* test(image): add tests for metadata

* chore(mod): update

* feat(image/artifact): return RepoTags and RepoDigests

* chore: remove craft

* chore(mod): add a comment

* feat(remote): add implicitReference

* feat(main): display RepoTags and RepoDigests
2021-01-06 10:33:48 +02:00
Robert Jacob
e2c483f856 Remove global flags from filesystem command (#772)
* Remove global flags from subcommands

If the global flags are added to the subcommand as well as being used
globally, their value will be overwritten when the arguments for the
subcommand are parsed. This leads to the value passed to the flag at the
global position being lost.

* Update readme
2021-01-05 12:49:39 +02:00
Christian Zunker
5c5e0cb86d Add imagePullSecrets to helm Chart (#789)
* Add imagePullSecrets to helm Chart

Fixes #787

Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>

* use only one imagePullSecret

Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>

* Bugfix

Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>
2021-01-05 12:41:42 +02:00
Christian Zunker
b9b84cd963 Add redis cache backend configuration options (#784)
You can now specify redis as caching as backend.
The default is still the filesystem.

In case redis is added as caching backend, the cache-dir is still
used for the vulnerability database.

Fixes #781

Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>
2021-01-04 11:42:05 +02:00
justfortee
e517bcc2b2 Update README.md (#735)
Grammatical error.
2021-01-03 12:23:42 +02:00
Teppei Fukuda
7f5a6d479e feat(redhat): support modular packages (#790) 2020-12-31 19:40:25 +02:00
Christian Zunker
8de09ddf37 Fix formatting of log message (#785)
Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>
2020-12-25 16:26:23 +02:00
Teppei Fukuda
e08ae8d01d chore(ci): migrate unit tests to GitHub Actions (#779) 2020-12-22 06:20:05 +02:00
Yashvardhan Kukreja
a00d719ed2 shifted: brews.github to brews.tap (#780) 2020-12-21 16:28:19 +02:00
Johannes
08ca1b00b7 Feat: NuGet Scanner (#686)
* Initial nuget advisory detector code.

Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>

* Added nuget package to scan.go

Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>

* Removed nuget advisory file and instead added csharp/nuget as a driver in driver.go.

Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>

* Removed nuget package from driver. Added ghasnuget as a source in vulnerability.go

Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>

* Updated nuget driver to use correct name and to initialize with the new generic scanner.

Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>

* refactor: cut out to a separate method

* chore(mod): update trivy-db

* fix(driver): add a general driver

* test(ghsa): add nuget

* chore: update README

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2020-12-21 10:17:15 +02:00
Teppei Fukuda
7b86f81e29 feat(cache): support Redis (#770)
* feat(config): add --cache-backend

* feat(operation): embed cache.Cache into operation.Cache

* feat(cache): support redis://

* test(integration): add redis test

* chore(README): add --cache-backend

* chore(mod): update

* chore: add disclaimer
2020-12-21 08:26:19 +02:00
Masahiro331
8cd4afeaf1 fix(redhat): skip module packages (#776)
* remove cbinding

* skip modular packages

* add debug log

* Fix clomatic complexity 11

* Add comment

* Fix test release

* chore(mod): update

* refactor(redhat): rename a method

* test(redhat): refactor

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2020-12-18 07:52:13 +02:00
Masahiro331
a20d4811d2 add support modularitylabel for rpm (fanal#147) 2020-12-18 07:09:47 +02:00
Teppei Fukuda
b606b621e5 chore: migrate from master to main (#778) 2020-12-17 17:27:36 +02:00
Teppei Fukuda
7da3f7e57d chore: migrate Travis CI to GitHub Actions (fanal#146) 2020-12-17 16:03:15 +02:00
Teppei Fukuda
42520f3edf chore: migrate from master to main (fanal#145) 2020-12-17 15:47:02 +02:00
Teppei Fukuda
5c2b14b910 chore(circleci): remove gofmt (#777) 2020-12-17 15:35:11 +02:00
Teppei Fukuda
a19a023f1f chore(README): remove experimental (#775) 2020-12-16 06:06:17 +02:00
Simarpreet Singh
e6cef75162 NVD: Add timestamps. (#761)
* (feat): Add NVD published and modified dates

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

* (test): Fix golden files.

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

* (test): Fix registry_test.go golden files.

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

* (test): Fix distroless-base-ignore-unfixed.json.golden with ignore-unfixed option.

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

* (test): Fix fluentd-multiple-lockfiles.json.golden.

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

* (test): Fix alpine-310.html.golden file.

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

* fix(convert): fix disparency between standalone and client/server

* test(integration): update trivy.db

* test(integration): update golden files

* (test): Add a check for non nil date types.

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

* (test): Add a unit test for ConvertFromRPCResults.

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

* (test): Add a nil date case for ConvertFromRPCResults.

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

* refactor: sort imports

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2020-12-14 13:21:09 -08:00
Teppei Fukuda
b75c6c4158 feat(cache): support Redis (fanal#143)
* feat(cache): support Redis

* chore(mod): update

* feat(main): support Redis

* test: update error messages according to different errors on GitHub Actions

* feat(redis): add prefix

* fix an error

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* fix an error

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* fix(main): defer close

* test(redis): fix error messages

* test(redis): count current connections

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* test(redis): use structs instead of string literals

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
2020-12-14 15:26:01 +02:00
Simarpreet Singh
1371f72cfb (fix): Make the table output less wide. (#763)
* (fix): Make the table output less wide.

Currently the table outupt can be as long as 200 characters wide in some
images like nginx:1.16

This PR merges the Title and the URL columns to shorten it.

With this change the longest column has reduced from 200 -> 162 (-19%).

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

* (fix): Remove Debian TEMP-* links.

These links are quite wide. Removing them makes it 200 -> 143 (-28.5%) shorter for table output.

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

* Revert "(fix): Remove Debian TEMP-* links."

This reverts commit 228540f7c3.
2020-12-08 11:08:30 -08:00
Christian Zunker
8ecaa2f057 Add gitHubToken to prevent rate limit problems (#769)
And remove unnecessary config parameters.

Fixes #768

Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>
2020-12-08 09:39:22 +02:00
Christian Zunker
8132174754 Add helm chart to install trivy in server mode. (#751)
Fixes #688

Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>
2020-12-06 13:21:19 +02:00
Jack Kelly
bcc285095d chore(docs): add nix install (#762) 2020-12-04 14:45:31 -08:00
irrandon
cb369727cd HTML template (#567)
* add html template

* test(integration): use JSONEq only for JSON folden files

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2020-12-02 10:50:45 +02:00
Teppei Fukuda
9bdbeaba66 feat: remove rpm dependency (#753)
* chore(docker): remove rpm

* chore(README): remove rpm

* fix(scanner): replace rpmcmd with rpm

* chore(goreleaser): remove rpm

* chore(mod): update fanal

* chore(mod): update fanal
2020-12-02 07:24:43 +02:00
Teppei Fukuda
d85cb77123 fix(vulnerability): make an empty severity UNKNOWN (#759) 2020-12-02 07:24:02 +02:00
Teppei Fukuda
1bee83ccc4 chore(README): add TRIVY_INSECURE (#760)
* chore(README): add TRIVY_INSECURE

* chore(README): replace server with registry
2020-11-30 16:43:33 +02:00
Teppei Fukuda
da40228e28 fix(rpm): fill source package information (fanal#142)
* fix(rpm): fill source package information

* test(rpm): update expected results

* refactor(rpmcmd): remove a package depending on rpm command

* test(integration): fix import

* refactor(rpm): remove arch and epoch
2020-11-29 10:53:23 +02:00
Teppei Fukuda
4d1894327e feat(vulnerability): add primary URLs (#752)
* refactor(vulnerability): rename a method

* feat(vulnerability): add primary url

* fix(templates): add primary links

* feat(writer): add url

* refactor(convert): remove an unnecessary function

* feat(rpc): add primary_url

* test(integration): update golden files
2020-11-26 06:06:26 +02:00
Teppei Fukuda
91dc954116 feat: remove CGO (fanal#141) 2020-11-23 07:36:33 +02:00
Teppei Fukuda
e17931c273 fix(main): import nuget (fanal#140) 2020-11-23 07:35:46 +02:00
Teppei Fukuda
1391b3bf47 fix(oracle): handle ksplice advisories (#745) 2020-11-18 20:14:01 +02:00
Teppei Fukuda
b6d5b82c48 fix: version comparison (#740)
* feat: add comparer

* refactor: rename lang with ecosystem

* feat(bundler): add comparer

* feat(node): add comparer

* feat(bundler): integrate comparer

* feat(cargo): integrate comparer

* feat(composer): add comparer

* feat(ghsa): integrate comparer

* feat(node): integrate comparer

* feat(python): integrate comparer

* test(bundler): add tests

* test(cargo): add tests

* test(composer): add tests

* test(ghsa): add tests

* test(node): add tests

* test(python): add tests

* refactor(utils): remove unnecessary functions

* test(utils): add tests

* test: rename bucket prefixes

* fix(detect): use string

* chore: update dependencies

* docs: add comments

* fix(cargo): handle unpatched vulnerability

* test(db): update trivy-db for integration tests

* test(integration): update a golden file

* test(cargo): Add a case for missing patched version

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

* refactor(advisory): update comments

* refactor(node/advisory): change the receiver

* chore(mod): update dependencies

* refactor(comparer): unexport MatchVersion

* refactor: fix maligned structs

* test(node): add empty value

* refactor

* refactor: sort imports

* chore(mod): update trivy-db

Co-authored-by: Simarpreet Singh <simar@linux.com>
2020-11-17 11:38:58 +02:00
Gianni Carafa
9dfb0fe3a9 updated Readme.md (#737)
removed unused env var TRIVY_AUTH_URL
2020-11-12 21:16:42 -08:00
Dirk Mueller
455546975c Add suse sles 15.2 to the EOL list as well (#734)
without that you get this arning:
  WARN	This OS version is not on the EOL list: suse linux enterprise server 15.2

which is actually misleading because 15.2 is the most current release,
we just don't know when it ends. we can however assume that it runs
for at least another year.

Signed-off-by: Dirk Mueller <dirk@dmllr.de>
Signed-off-by: Dirk Mueller <dmueller@suse.com>
2020-10-30 16:42:48 -07:00
Sinith
c189aa6a0a Update README.md (#731) 2020-10-29 12:24:21 -07:00
Dax McDonald
8442528fa7 Warn when a user attempts to use trivy without a detectable lockfile (#729)
* Warn when a user attempts to use trivy without a detectable lockfile

* Update pkg/scanner/local/scan.go

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2020-10-29 12:45:59 +02:00
Dax McDonald
d09787e150 Add back support for FreeBSD & OpenBSD (#728)
Reverts 7fc94ad95c
2020-10-29 07:21:49 +02:00
Johannes
8006d76f5d Feat: Created analyzer for NuGet lockfiles. (fanal#139)
* Created analyzer for NuGet.

Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>

* refactor(nuget): sort imports

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2020-10-28 14:29:20 +02:00
Carlos Eduardo
0285a89c7c Add support for ppc64le architecture (#724) 2020-10-26 17:08:14 -07:00
Evgeniy Kosov
7d7784fecb Skip packages from unsupported repository (remi) (#695)
* Skip packages from unsupported repository (remi)

* Use HasSuffix instead of regexp match
2020-10-26 13:14:46 +02:00
Huang Huang
ca6f196001 Skip downloading DB if a remote DB is not updated (#717)
* Skip downloading DB if a remote DB is not updated

* Apply suggestions from code review

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

* update github.com/aquasecurity/trivy-db version

* fix lint

* Use UTC datetime

* display DownloadedAt info in debug log

* refactor(db): merge isLatestDB into isNewDB

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2020-10-26 09:07:30 +02:00
Huang Huang
e621cf2bc1 Sunsetting VendorVectors (#718) 2020-10-25 13:45:56 +02:00
Teppei Fukuda
906ab5483e Add GitHub Container Registry to README (#712) 2020-10-25 13:17:16 +02:00
Pascal Andy
1549c25709 update BUG_REPORT.md using H2 instead of bold formatting (#714) 2020-10-22 14:15:20 -07:00
Teppei Fukuda
fe1d07e58c fix(ci/deb): do not remove old packages for EOL versions (#706) 2020-10-22 06:52:42 +03:00
rahul2393
793a1aa3c8 Add linter check support (#679)
* add linter supports

* add only minor version

* use latest version

* Fix println with format issue

* Fix test

* Fix tests

* For slice with unknown length, preallocating the array

* fix code-coverage

* Removed linter rules

* Reverting linter fixes, adding TODO for later

* Ignore linter error for import

* Remove another err var.

* Ignore shadow error

* Fixes

* Fix issue

* Add back goimports local-prefixes

* Update local prefixes

* Removed extra spaces and merge the imports

* more refactoring

* Update photon.go

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2020-10-20 15:20:04 +03:00
Jeff Rescignano
4a94477532 Optimize images (#696) 2020-10-20 08:13:33 +03:00
Teppei Fukuda
9bc2b1949c Update triage.md (#701) 2020-10-20 08:12:47 +03:00
Aron Moore
49691ba85e ci(circle): update remote docker version (#683) 2020-10-13 15:39:01 +03:00
Dirk Mueller
87ff0c1bbc suse: update end of life dates for SLES service packs (#676)
All synced with https://www.suse.com/lifecycle/ as of today

Signed-off-by: Dirk Mueller <dirk@dmllr.de>
Signed-off-by: Dirk Mueller <dmueller@suse.com>
2020-10-11 10:30:28 +03:00
Karan Thanvi
de30c3f8d6 update readme for parallel run issue (#660)
* update readme for parallel run

* move to Q&A
2020-10-11 10:24:19 +03:00
Neha Viswanathan
4c3bfb89a4 fix link for Clear images section in README (#659) 2020-10-05 13:59:01 -07:00
Neha Viswanathan
8b21cfe7eb add link to Gitlab CI pipeline in README (#658) 2020-10-05 13:47:49 -07:00
Teppei Fukuda
46700f7b74 test: add tests for mux (#645) 2020-09-30 09:10:33 +03:00
Bastian
fde2487249 Close open connections and files (fanal#135)
Ensure that the client and file is closed either in error cases or once cleanup() is called so no file descriptors are leaked.
2020-09-29 13:44:44 +03:00
Teppei Fukuda
014be7e143 chore: bump up Go to 1.15 (#646)
* chore: bump up Go to 1.15

* chore(goreleaser): ignore darwin/386
2020-09-24 08:00:08 +03:00
Alexander Lauster
b3ff2c35ea Add contrib/ to the release chain for Docker (#638)
* Add contrib/ to the release chain for Docker

Add the complete contrib/ folder to the release chain

* Include all template files to the tar.gz archives
2020-09-23 10:49:22 +03:00
Huang Huang
9c786de8f9 Add health check endpoint to trivy server (#644) 2020-09-21 16:30:45 +03:00
Teppei Fukuda
188e108d7c fix(cli): show help for subcommands (#629) 2020-09-21 14:03:25 +03:00
Huang Huang
7d7842f2f3 Add --skip-update option to fs and repo subcommand (#641) 2020-09-18 14:49:47 -07:00
Manuel Rüger
901a3715cb goreleaser.yml: Add all templates to archive (#636)
Fixes: https://github.com/aquasecurity/trivy/issues/631

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2020-09-15 16:09:38 -07:00
Masahiro331
095b5ce97c fix(cli): show help when no argument is passed (#628)
* Fix subcommands help

* refactor: call ShowAppHelpAndExit

* refactor: remove an unused error

* test: remove exit cases

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2020-09-08 17:32:20 +03:00
Teppei Fukuda
1d3f70e07f chore(image): push the official image to GitHub Container Registry as well (#627) 2020-09-08 15:06:32 +03:00
Teppei Fukuda
5e308da81a feat(cli): add --skip-files option (#624)
* feat(cli): add --skip-files

* test(integration): add --skip-files and --skip-dirs

* chore(docs): update README

* chore(docs): correct a grammar mistake
2020-09-08 15:04:56 +03:00
Teppei Fukuda
2231e4068d chore(docs): update comparison table (#623)
* chore(docs): update README

* use 
2020-09-02 16:56:30 +03:00
Simarpreet Singh
b3680f0016 logo: Add new Trivy logo (#615)
Signed-off-by: Simarpreet Singh <simar@linux.com>
2020-09-02 12:41:11 +03:00
Carol Valencia
89527796f6 fix(Readme) - Results using a template (#622)
Co-authored-by: Carol Valencia <krol3@users.noreply.github.com>
2020-09-02 12:40:05 +03:00
Chris Aumann
165d593fdb Improve Gitlab CI installation step in README (#621)
This improves the installation step in `.gitlab-ci.yml`. 

- Removes unnecessary installation and use of `curl` (replaces it with `wget`)
- Removes storing the intermediate file by using a pipe to `tar`
2020-09-02 12:39:05 +03:00
Teppei Fukuda
d8b09628f0 feat(rpc): add CWE-ID (#614) 2020-09-02 07:42:32 +03:00
rahul2393
b62ebec01e Fix: Support local cache of APK index (fanal#133)
* Added support for local APK index file read

* Updated test compare to assert

* refactoring

* Remove unnecessary write header in test
2020-09-01 15:56:02 +03:00
Teppei Fukuda
66b9842ac9 refactor(image): minor changes (fanal#134) 2020-08-31 16:37:39 +03:00
Alexander Lauster
d35e8ec351 Add all templates to the docker image (#619)
Before this change, only a subset of templates were included in the docker image.
Now all templates which are part of the git repo will be included when the docker image will be build, a future commit for every new template is not needed anymore
2020-08-31 11:16:22 +03:00
Shivam Mishra
fa1f12776b Support for scanning of an OCI image given a tag. (fanal#130)
Condition:- Specify an image name and tag ":" separated.
If correct image name and tag is specified ":" separated, image with given tag will be return otherwise first one will be return
2020-08-30 15:56:55 +03:00
Teppei Fukuda
f50b0ce8af feat(library): support a custom data source (#613)
* chore(mod): update trivy-db

* refactor(detector/library): use programming language instead of package
manager

* feat(library): add general advisory

* test(utils): add a util function initializing DB

* test(advisory): add tests

* chore: use aquasecurity/bolt-fixtures

* refactor: add comments

* chore(mod): revert fanal version

* chore(mod): update trivy-db

* refactor: update the comment
2020-08-30 10:11:32 +03:00
Teppei Fukuda
ed8607b710 fix(alpine): use source package (#607)
* chore(mod): update fanal

* fix(integration): support -update flag

* fix(alpine): use source package for vulnerability detection

* test(integration): update golden files

* chore(mod): update fanal
2020-08-25 13:01:49 +03:00
Teppei Fukuda
ea28d3b6f3 test(vulnerability): fix usages of new trivy-db refactor changes (#611)
* mod: Update trivy-db

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

* vulnerability_test: Fix usages of new trivy-db refactor changes

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

* chore(mod): update trivy-db

Co-authored-by: Simarpreet Singh <simar@linux.com>
2020-08-25 12:21:15 +03:00
Teppei Fukuda
827cea3245 refactor(bundler): remove unnecessary code (#610) 2020-08-24 13:22:11 +03:00
Simarpreet Singh
b2a0d83518 codecov: Move into root directory (#608)
Signed-off-by: Simarpreet Singh <simar@linux.com>
2020-08-20 10:21:52 -07:00
Teppei Fukuda
3f64bd6b32 fix(alpine): add origin package as source package (fanal#131)
* fix(alpine): add an origin package as a source package

* test(integration): add -update flag

* test(integration): update golden files
2020-08-20 10:46:32 +03:00
rahul2393
85e0139f32 Fix: fullDescription field in SARIF output is not correctly escaped (#605)
* Fixed sarif template fullDescription escape

* Added fix to other possible places

* Added test for escaping character
2020-08-19 10:23:04 -07:00
Teppei Fukuda
80d5df0ceb chore(docs): add AWS Security Hub (#598)
* chore(docs): add AWS Security Hub

* Update docs/integration/security-hub.md

Co-authored-by: Simarpreet Singh <simar@linux.com>

* Update README.md

Co-authored-by: Liz Rice <liz@lizrice.com>

Co-authored-by: Simarpreet Singh <simar@linux.com>
Co-authored-by: Liz Rice <liz@lizrice.com>
2020-08-19 13:19:24 +03:00
Teppei Fukuda
3a54e5b644 refactor(writer): define the constructor for TemplateWriter (#597) 2020-08-17 09:06:50 +03:00
Teppei Fukuda
c875ba5942 Revert "Added skip_dir in image artifacts scan (fanal#128)" (fanal#129)
This reverts commit 94c68283e7.
2020-08-13 23:47:49 +03:00
Simarpreet Singh
acc6a9bd01 circleci: Allow coverage changes without a failure (#599)
Ref: https://github.com/testground/testground/pull/430

Signed-off-by: Simarpreet Singh <simar@linux.com>
2020-08-13 10:13:49 +03:00
Teppei Fukuda
96af6dc499 feat: add --skip-directories option (#595)
* feat: add --skip-directories option

* chore(README): update

* refactor: rename skip-directories to skip-dirs

* Update internal/app.go

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* refactor: add some context in the warning message

* chore(README): update

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
2020-08-12 14:03:12 +03:00
rahul2393
675e1b4118 Added test and support of ASFF template (#594)
* Added test and support of ASFF template

* Improve test coverage

* Fixed/Improved tests

* Removed extra space

* Added NVD score/vectors, Added logic to trim description due to file size restriction

* Included quotations around AccountID
2020-08-12 13:25:58 +03:00
rahul2393
0bd417531d Added skip_dir in image artifacts scan (fanal#128)
* Added skip_dir in image artifact scan

* Updated walker as per suggestions

* Fixed factory method

* refactor(image): revert skipDirectories in artifact

* feat: add InspectOption

* test(walker): add tests for skipDirectories

* test(walker): add tests for skipDirectories

* test(fs): add tests

* test(image): add tests

* test(integration): fix

* feat(main): add --skip-directories

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2020-08-11 09:20:37 +03:00
Carol Valencia
8ca484f538 fix: remove error using no options (#539)
* fix: remove error using no options

* chore: return error in Init

* chore: return custom error ErrNoTarget

* Update internal/config/artifact.go

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

* Update internal/config/artifact.go

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

* Update internal/artifact/image.go

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>

* chore - remove error using no options

* fix(config): typo

* test(config): change the log level

* test(config): revert removed tests

Co-authored-by: Carol <krol3@users.noreply.github.com>
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2020-08-09 10:39:27 +03:00
Sebastian Gumprich
9a25f4fbe4 Fix comparison table to use words instead of symbols (#587)
fixes #301
2020-08-05 10:38:45 +03:00
Simarpreet Singh
467ec46cd3 sarif: Remove extra periods from short descriptions (#590)
Signed-off-by: Simarpreet Singh <simar@linux.com>
2020-08-04 22:28:11 -07:00
rahul2393
52feff2213 Added template fucntion to escape string before output (#583)
* Added template fucntion to escape string before output

* Fixed tests
2020-07-31 10:12:49 -07:00
rahul2393
add65f2f0c Revert Dockerfile changes (#581) 2020-07-30 22:04:31 +03:00
rahul2393
80595dc426 Check status for dpkg package (fanal#127)
* Check status for dpkg package

* by default package is installed if status is not present

* Fixed test file

* Updated check
2020-07-15 15:26:54 +03:00
Teppei Fukuda
ceb4e47ef1 fix(apk): replace go-deb-version with go-apk-version (fanal#118)
* fix(apk): replace go-deb-version with go-apk-version

* chore(mod): update dependencies

* chore(mod): update go-apk-version
2020-06-24 21:02:56 +03:00
Oran Moshai
4025117c23 Merge pull request fanal#122 from oranmoshai/fix/s3-head
fix(s3/cache): HeadObject bucketName was missing.
2020-06-15 12:18:07 +03:00
oranmoshai
d56c477e5f fix(s3/cache): HeadObject bucketName was missing.
Add unit testing
2020-06-14 10:06:03 +03:00
Oran Moshai
717f36c819 Fix/s3 cache (fanal#121)
* fix: Due read after write consistency in S3 missingLayers called the actual object that created cache 403 response
This change creating index file for each object so missingLayers will not hit object that not exist.

* fix comments error description

Co-authored-by: oranmoshai <oran.moshai@aquasec.com>
2020-06-10 15:10:41 +03:00
Teppei Fukuda
e8d06ba336 fix(cache/s3): take s3 client and prefix as args (fanal#116)
* fix(cache): revert options

* fix(cache/s3): take a s3 client as the argument

* test(cache): update mocks

* test(cache/s3): fix tests
2020-06-01 19:22:42 +03:00
Teppei Fukuda
81390970cd feat(cache): support options to pass S3 prefix (fanal#115)
* feat(cache): support options

* refactor(cache/s3): avoid overwriting session

* refactor(cache/s3): replace image and layer with artifact and blob

* fix(cache/s3): check if S3Cache implements Cache

* refactor(cache): move FSCache to a dedicated file

* test(cache): update mocks

* test(cache/s3): fix tests
2020-05-31 11:52:39 +03:00
Teppei Fukuda
4c77b76406 feat: support local filesystem and remote git repository (fanal#107)
* test(integration): move to the test directory

* chore: update fixtures path

* test: put common test images under the test directory

* chore(Makefile): rename

* feat: support local filesystem and remote git repository [PART 1] (fanal#109)

* feat(walker): add tar/fs walker

* fs_test: Add test names

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

* walk_test: Add Test_isIgnored

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

* feat: support local filesystem and remote git repository [PART 2] (fanal#110)

* refactor(analyzer): merge OSAnalyzer, PkgAnalyze, LibAnalyzer into
Analyzer

* test: comment out temporarily

* fix(amazon): check the length

* fix(analyzer): make AnalysisResult a reference

* library/analyzer: Refactor library analyzer code.

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

* feat: support local filesystem and remote git repository [PART 3] (fanal#111)

* refactor(image): move directory

* feat(applier): add applier

* fix(apk): replace extractor with applier

* test: comment out temporarily

* feat: support local filesystem and remote git repository [PART 4] (fanal#112)

* feat(artifact): add image, local and remote artifact

* image_test: Rename test field to use new convention

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

* image_test: Add a test for put artifact failure

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

* refactor(remote): remove unnecessary files for unit test

* feat: support local filesystem and remote git repository [PART 5] (fanal#113)

* test(integration): fix tests

* feat: support local filesystem and remote git repository [PART 6] (fanal#114)

* feat(main): add sub commands

* refactor(types): remove unused type

* chore(mod): update

* test(artifact): add mock

* fix(analyzer): redhat must be replaced with oracle

* fix(analyzer): debian must be replaced with ubuntu

* fix(fs): display dir when hostname is empty

Co-authored-by: Simarpreet Singh <simar@linux.com>

Co-authored-by: Simarpreet Singh <simar@linux.com>

* fix: make AnalysisResult a reference

Co-authored-by: Simarpreet Singh <simar@linux.com>

* refactor(walker): fix comment

Co-authored-by: Simarpreet Singh <simar@linux.com>

Co-authored-by: Simarpreet Singh <simar@linux.com>

Co-authored-by: Simarpreet Singh <simar@linux.com>
2020-05-28 23:29:07 +03:00
Teppei Fukuda
a1e818ac5e refactor(cache): replace image and layer with artifact and blob (fanal#108)
* refactor(cache): replace image and layer with artifact and blob

* fix(cache): replace S3
2020-05-21 10:51:29 +03:00
Oran Moshai
81526ed0d9 Add S3 support for layer caching this will allow to save image result… (fanal#106)
* Add S3 support for layer caching this will allow to save image results on managed persistent object store

* Working on PR comments

Co-authored-by: oranmoshai <oran.moshai@aquasec.com>
2020-05-17 15:53:16 +03:00
Teppei Fukuda
83ff3fda25 feat(cache): add close function (fanal#104)
* feat(cache): add close function

* test(mock): update mock

* test(analyzer): fix tests according to updated mock
2020-05-05 10:45:51 +03:00
Simarpreet Singh
aa4339ca41 analyzer: Send back package and apps info for unknown OS if found. (fanal#103)
* analyzer: Send back package and apps info for unknown OS if found.

We should send back package and apps info if found even
in the case of an unknown OS. Example Dockerfile:

```
$ cat Dockerfile
FROM hello-world

ADD https://raw.githubusercontent.com/aquasecurity/trivy-ci-test/master/Cargo.lock .
```

Should say ErrUnknownOS but still scan the Cargo vulns.

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

* fix(analyzer): send back package and apps info even if there is no package found

* fix(main): handle specific errors

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2020-04-27 15:16:47 -07:00
Teppei Fukuda
b22aebf826 feat(image): support registry token (fanal#102)
* feat(image): support registry token

* test: assert error messages

* chore(mod): point to the latest testdocker
2020-04-27 21:47:28 +03:00
Teppei Fukuda
364cc862f7 feat(image): support OCI Image Format (fanal#101)
* feat(image): support OCI Image Format

* refactor: rename NewDockerArchiveImage to NewArchiveImage

* test: rename TestNewDockerArchiveImage to TestNewArchiveImage

* fix: introduce go-multierror

* image: add more sad paths for tryOCI func

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

* test(image): add more test case

Co-authored-by: Simarpreet Singh <simar@linux.com>
2020-04-26 13:13:28 +03:00
Teppei Fukuda
05ea7f4201 fix: replace containers/image with google/go-containerregistry (fanal#96)
* fix(image): replace containers/image with google/go-containerregistry

* test(image): remove un-needed mocks

* fix(option): add NonSSL

* fix(docker): replace containers/image with google/go-containerregistry

* test(docker): add testing servers for Docker Registry/Engine

* refactor(extractor): replace digesst.Digest with string

* fix(analyzer): replace containers/image with google/go-containerregistry

* fix(main): remove cleanup function

* chore(actions): add apt-get update

* chore(Makefile): remove unnecessary tag

* test(integration): remove cleanup function

* test(integration): specify API version

* test(bench): remove cleanup function

* test(bench): remove some cases

* test: separate testutils into another repository

* feat: implement the original struct to communicate with Docker Engine

* fix(image): use daemon.Image

* fix(docker): use diff_id instead of digest

* fix(cache): use diff_id as a key of cache

* fix(analyzer): use diff_id

* fix(main): add cleanup

* test(testdata): cleanup

* test(benchmark): measure the cost of initializing structs

* chore(mod): update dependencies

* test(integration): add cleanup

* test(integration): negotiate API version

* chore(actions): remove exit

* chore(mod): remove replace

* fix(extractor): revert removing structs

* test: add testdata

* fix: skip calculating the hash of a compressed layer when analyzing an uncompressed layer

* test(image): remove code

* refactor(image/daemon): remove cruft

* test(integration): implement docker login/logout

* test(integration): change expectation

* refactor(cache): rename layerID to diffID

* test(cache): add sad path in GetLayer

* test(analyzer): renmae LayerID to DiffID

* chore(image): add a comment

* fix(image/daemon): return empty func() instead of nil

* fix(image/daemon): add a comment

* fix(image/daemon): add a comment

* refactor(image/daemon): use client.WithAPIVersionNegotiation

* refactor(analyzer): rename LayerIDs to DiffIDs

* refactor(analyzer): remove an un-needed arg

* refactor(cache): wrap an error

* refactor(main): format

* refactor(docker): reorder imports

* refactor(docker): change the order

* chore: add the comment

* refactor(extractor): rename

* refactor(image/daemon): wrap errors

* chore(image/daemon): add a comment

* refactor(image): remove unnecessary definitions

* refactor(integration): use client.WithAPIVersionNegotiation
2020-04-13 21:21:39 +03:00
Huang Huang
8b3289c880 Support settings apkIndexArchiveURL via env FANAL_APK_INDEX_ARCHIVE_URL (fanal#94) 2020-04-13 11:55:51 +03:00
Teppei Fukuda
fc2f5ddbb2 test(integration): add tests with TLS registry (fanal#99)
* test(integration): add tests with TLS registry

* test(integration): add the build tag

* test(registry): aggregate imports

* test(registry): remove un-needed expectations
2020-04-06 19:25:43 +03:00
Teppei Fukuda
21e1ebf92c fix(bench): measure initializing structs (fanal#98)
* fix(bench): remove some cases

* fix(bench): measure initializing Analyzer

* chore(ci): force benchmark tests to pass
2020-04-05 16:53:27 +03:00
Teppei Fukuda
bf63cc7f34 feat: split ID into Digest and DiffID (fanal#97) 2020-03-24 20:34:42 +02:00
Teppei Fukuda
5d7149d6cf feat(extractor): switch to layer ID of origin layer (fanal#93)
* feat(extractor): switch to layer ID of origin layer

* integration: update golden file for vuln-image

This file was updated during a COVID-19 crisis.

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

* test(docker): sort applications

* test(docker): fix order

Co-authored-by: Simarpreet Singh <simar@linux.com>
2020-03-17 20:10:56 +02:00
Simarpreet Singh
c63e3aa5d5 integration: Add dockerless mode tests (fanal#81)
* integration: Add dockerless mode tests

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

* .github: Fix typo

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

* library_test: Improve cache assertions with containers/image

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

* github: Update docker version before running

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

* integration: Remove un-needed random num generation

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

* rebase on latest master

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

* integration: improve packages check

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

* integration: Remove un-needed goldenfiles

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

* library_test: Rename dockerlessImageName to remoteImageName

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

* github: Remove un-needed bench target

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

* library_test: Rename dockerlessImageName to remoteImageName

Signed-off-by: Simarpreet Singh <simar@linux.com>
2020-03-15 11:35:17 +02:00
Liz Rice
3ac504288d Change license to Apache 2.0 (fanal#92)
* Change license to Apache 2.0

* Change license to Apache 2.0, continued
2020-03-13 10:22:25 +00:00
Daniel Pacak
016f45e8d3 fix: Move check for rpm command to the parsePkgInfo method (fanal#90)
Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
2020-03-06 14:29:36 +02:00
Teppei Fukuda
45ada28e38 fix(token): use the credential from enviroment variable (fanal#89) 2020-03-06 11:32:50 +02:00
Simarpreet Singh
b0937b624b Add layer id info (merge to master) (fanal#88)
* analyzer: Include layerID as part of LayerInfo

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

* Add LayerID to Package struct

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

* analyzer: Remove ID from returned layerInfo

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

* analyzer: Handle missing layer.ID from cached layer

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

* extractor/docker: Cleanup logic to avoid extra slice usage

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

* integration: Fix golden files to include LayerID

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

* analyzer: Remove condition for adding layer.ID

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

* types: Introduce types.LibraryInfo

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

* docker: Add LayerID to each LibraryInfo

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

* .github/bench: Bump up docker version

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

* intergration/perf: Remove other OSes for the timebeing.

Looks like Github CI is running out of space while running
other tests. Until we find a better solution we need to comment
out bigger OSes.

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

* fix(image): call Close() via cleanup funcion

* refactor(type): add omitempty

* analyzer: Change to types.LibraryInfo in analzyer.go

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

* wip: add CleanupDockerExtractorFn for cleanup

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

* refactor(analyzer): remove un-needed function

* test(cache): comment in

* Revert "wip: add CleanupDockerExtractorFn for cleanup"

This reverts commit dabfae104bf6d63492823c6c3eb94175d26eabad.

* Revert ".github/bench: Bump up docker version"

This reverts commit b982c46861e1cc0851d53621c0e68ac40918d755.

* refactor(analyzer): sort imports

* test(cache): remove debug code

* test(cache): format

* chore(image): remove debug code

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2020-03-04 08:25:19 -08:00
Teppei Fukuda
bfa6e76141 feat(cache): based on JSON (fanal#84)
* temp

* update

* fix integration test

* update

* update

* test(docker): add a test for ExtractLayerFiles

* docker_test: Add opq and wh file paths.

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

* docker_test: Add sad path for GetLayer

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

* docker_test: Add invalid file for extractFiles

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

* docker_test: remove old crufty tests

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

* docker_test: Add tests for ApplyLayers

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

* test(docker): add tests for status.d

* test(docker): no mock

* temp

* analyze_test: Add tests for Analzye() happy path

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

* cache: remove mock_cache.go

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

* analyzer_test: Prefer real extractor over mock

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

* analyzer_test: Add sad paths for Analyze

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

* tests: Fix invocation call sites for new JSON cache

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

* test(image): add httptest server

* utils_test: Add build tags

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

* test(analyzer): add sad path

* test(image): remove unused tests

* test(integration): fix interface

* test(analyzer): add an image including lock files

* refactor(analyzer): remove the unused function

* test(analyzer): add tests for Applier

* test(cache): add cache tests

* feat(cache): support schema version

* refactor(mock): remove unnecessary mocks

* refactor: clean up debug code

* test(analyzer): add a test image

* test(bench): fix cache

* cache_test: Add a layer with SchemaVersion of 2

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

* library_test: remove cruft

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

* feat(image): support docker host and cert path

* refactor(image): add omitempty

* feat(image): add new struct to have image information in cache

* feat(cache): add image bucket

* refactor(cache): commonize getting layer

* test(mock): generate new mocks

* feat(analyzer): analyze image config and store it in cache

* refactor(analyzer): make errors lowercase

* test(cache): update tests

* test(analyzer): fix tests

* fix(cmd): pass image ID

* fix(analyzer): add HistoryPackages to store package from history

* fix(cache): return an error in GetLayer

* refactor(cache): rename ImageConfig to ImageInfo

* refactor(err): wrap errors

Co-authored-by: Simarpreet Singh <simar@linux.com>
2020-02-27 21:09:05 +02:00
Masahiro Fujimura
f0dc9fa748 Change library parse error log (fanal#85)
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2020-02-17 22:13:04 +02:00
Teppei Fukuda
412209b0d1 test(bench): exclude master branch in GitHub Actions (fanal#82) 2020-02-17 21:04:31 +02:00
Teppei Fukuda
3d55fc5ea6 test(integration/bench): wait for an image load and remove images after tests (fanal#86)
* bench: remove images after finishing benchmarks

* test(integration): remove images after finishing tests

* test(bench): merge master branch

* debug

* chore(Makefile): exclude all tests when running benchmarks

* test(bench): wait for an image load

* fix(image): close source

* test(integration): wait for an image load

* test(bench): clean up debug code
2020-02-17 20:02:22 +02:00
Teppei Fukuda
495332ccd1 refactor: replace genuinetools/reg with containers/image (fanal#70)
* chore(ci): remove unused lines

* feat(cache): add SetBytes

* refactor(cache): replace Initialize with New

* fix(cache): use ReadCloser instead of Reader

* fix(option): update options according to containers/image

* feat(image): add struct to manipulate an image

* refactor(token): move the directory

* chore(Makefile): fix test

* chore(Makefile): add containers_image_storage_stub tag

* refactor(docker): use Image

* refactor(docker): remove unused functions

* refactor(docker): update imports

* test(docker): fix tests

* refactor(analyer): use containers/image

* chore(mod): update dependencies

* fix(extractor): update interface

* fix(main): use updated functions

* test(integration): fix

* refactor(image): remove unused definition

* refactor(error): wrap errors

* test(image): add TestNewImage

* test(mock): prepare interfaces

* test(mock): generate mocks

* test(image): add TestImage_LayerInfos

* test(image): add TestImage_ConfigBlob

* test(image): add TestImage_GetBlob

* chore(mod): update dependencies

* refactor(error): wrap errors

* fix(auth): pass nil when auth is empty

* chore(Makefile): add a tag

* test(bench): fix

* chore(bench): introduce cob

* chore(ci): restrict a push trigger

* chore(bench): run benchmarks 10 times

* test(bench): use a random tag

* test(integration): remove ImageRemove

* chore(cob): set threshold to 0.7

* image_test: Add unhappy paths for GetBlob

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

* refactor(image): remove unused fuction

* fix(image): close io.ReadCloser via cleanup function

* test(image): do not skip populateSource

Co-authored-by: Simarpreet Singh <simar@linux.com>
2020-01-29 13:37:32 +02:00
Simarpreet Singh
285e1f1bbf integration: Fix filenames to not include the : char (fanal#79)
Signed-off-by: Simarpreet Singh <simar@linux.com>
2020-01-24 11:45:49 -08:00
Simarpreet Singh
d3979a0d1f Perf testing (fanal#72)
* integration: Add a test to use fanal as a library

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

* integration: Table driven library_tests

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

* integration: Add even more OSes to the docker mode test

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

* library_test: run tests in parallel

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

* .git: Update gitignore with trivy images dir

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

* library_test: add golden files for packages

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

* library_test: Run all tests in parallel

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

* library_test: Refactor check logic to run twice.

Once for no cache, once with cache.

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

* library_test: Fix cache invocation

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

* integration: Add a more comprehensive image for library_test

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

* library_test: Introduce anon struct type

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

* travis: add make test-integration

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

* travis: Upgrade docker version

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

* benchmark: Add benchmark tests

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

* removeme: Add deliberate sleep

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

* remove sleep

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

* travis: Add cob to travis

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

* chore(bench): use GitHub Actions

* chore(bench): use GitHub Actions

* chore(bench): install make

* chore(bench): use GitHub Actions

* chore(ci): move unit tests to GitHub Actions

* benchmark_test: Remove assertions and goroutines

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

* benchmark_test: Split with and without cache

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

* benchamark_test: Add missing assertions, remove cruft

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

* benchmark_test: Make tests indepedent of each other.

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

* benchmark_test: Refactor teardown

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

* benchmark_test: Clear cache per run for Without Cache

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

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2020-01-22 13:51:25 -08:00
Simarpreet Singh
c87f30c25e integration: Fanal as a library for tar mode (fanal#76)
* rename library_test > library_dockermode_test

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

* integration: Introduce fanal as a library for tar mode tests.

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

* integration: Refactor tar and dockermode together

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

* integration: DRY check funcs

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

* library_test: Refactor signatures

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

* library_test: Remove removal of images for tar mode

Signed-off-by: Simarpreet Singh <simar@linux.com>
2020-01-22 11:55:51 -08:00
Simarpreet Singh
d328815939 integration: Add a test to use fanal as a library in Docker mode (fanal#66)
* integration: Add a test to use fanal as a library

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

* integration: Table driven library_tests

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

* integration: Add even more OSes to the docker mode test

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

* library_test: run tests in parallel

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

* .git: Update gitignore with trivy images dir

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

* library_test: add golden files for packages

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

* library_test: Run all tests in parallel

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

* library_test: Refactor check logic to run twice.

Once for no cache, once with cache.

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

* library_test: Fix cache invocation

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

* integration: Add a more comprehensive image for library_test

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

* library_test: Introduce anon struct type

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

* travis: add make test-integration

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

* travis: Upgrade docker version

Signed-off-by: Simarpreet Singh <simar@linux.com>
2020-01-17 10:49:50 -08:00
Masahiro Fujimura
ca5843cec2 Fix circular dependency for alpine apk index. (fanal#68)
* Fix Alpine Apk index resolve dependency, apkIndex has circular dependency package

* Add nodejs test

* Fix review

* Fix pointer
2020-01-12 16:40:21 +02:00
Simarpreet Singh
1d57f7be5c Revert PR fanal#51 entirely (fanal#67)
* Revert "Revert part of fanal#51 (fanal#64)"

This reverts commit a3284d4a2d.

* revert: PR fanal#51 for cache

Signed-off-by: Simarpreet Singh <simar@linux.com>
2020-01-10 11:58:23 -08:00
Masahiro Fujimura
68eb4c6c8d Revert part of fanal#51 (fanal#64)
* Fix getFilteredTarballBuffer function

* Add dotfilepath tar.gz

* Add dot filepath test

* fix test name

* change test filename

* Add empty files

* fix(docker): remove getFilteredTarballBuffer

* test(docker): remove tests for TestDocker_ExtractLayerWorker

* test(docker): remove unused files

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2020-01-05 22:39:22 +02:00
Teppei Fukuda
eaf9fa5e3f feat(cache): wrap kv cache (fanal#62) 2019-12-25 13:57:07 +02:00
Tomoya Amachi
60a7565870 add aws session token (fanal#61) 2019-12-25 13:56:15 +02:00
Masahiro Fujimura
78df35b570 Add photon support (fanal#59)
* Add photon support

* fix(suse): add continue

* refactor(photon): remove unnecessary end index

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2019-12-24 14:14:51 +02:00
Simarpreet Singh
162fb42d62 Merge pull request fanal#57 from aquasecurity/switch-to-raw-encoding
cache: Switch to Raw encoding.
2019-12-16 22:46:57 +08:00
Simarpreet Singh
7d0165c767 cache: Switch to Raw encoding.
This commit also switches zstd to use SpeedDefault.

Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-12-16 00:34:45 -08:00
Teppei Fukuda
7ef1e5f970 Cache: Save only required files (fanal#51) 2019-12-16 08:44:43 +02:00
Teppei Fukuda
94f9cf49fb Add suse linux enterprise server support (fanal#55)
* Add suse linux enterprise server

* Fix comment

* Add openSUSE Tumbleweed support
2019-12-15 14:53:51 +02:00
masahiro331
bed0a0ebd1 Add openSUSE Tumbleweed support 2019-12-07 17:01:14 +09:00
masahiro331
0c254184d6 Fix comment 2019-12-07 15:22:41 +09:00
masahiro331
306c551fdf Add suse 2019-12-07 13:54:35 +09:00
Simarpreet Singh
9c6b9a69c3 analyzer: Add tests for AnalyzeFile
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-12-04 20:41:28 -08:00
Samuel Archambault
2cb920d5d9 Using bufio reader for Stdin, otherwise the first 3 bytes are consumed and file gets "corrupted" (stdin is not seekable?) 2019-12-04 20:41:28 -08:00
Teppei Fukuda
9bf16ae1ba Revert "change mod genuinetools/reg to vanilla (fanal#50)" (fanal#53)
This reverts commit ad03c4f38c.
2019-12-02 14:48:03 +02:00
Simarpreet Singh
3867fc71ee cmd: Rebase on master and add SkipPing=true
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
3348a0669e analyzer_test: Remove un-needed assertions
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
030687c989 analyzer: Rename struct
As per: https://github.com/golang/go/wiki/CodeReviewCommentsfanal#package-names

Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
a273649227 docker_test: Fix import order
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
e6a79f7bc7 docker: Accept interfaces, return structs
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
2c08d9d3dc cmd: Fix import lines
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
673fc374ed analyzer_test: Reduce cruft.
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
511e061c0c docker_test: Add a sample testdir.tar.gz
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
55e97e97ce docker: Fix signature for downloadConfigFile()
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
aac55275bb docker: Fix getValidManifest() signature
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
9aea551d86 analyzer: Remove cruft.
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
72334df0c5 docker: extract downloadConfigFile
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
72e5ec702d docker: Extract extractLayerFiles
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
971269bac8 docker: Extract extractLayerWorker()
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
98341f1e9e docker_test: refactor getValidManifest
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
1e66346f29 docker_test: Add sad paths for Extract()
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
e41cf57454 docker_test: Add a happy path for Extract()
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
3813f90496 gitignore: update gitignore
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
24c612e166 cache: Define an interface for cache, remove global state
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
d993110d96 analyzer_test: Fix tests by fighting with global state
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
e4b1b64788 docker: Inject docker client
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
a1ea9aeeeb main: Update example of how to use fanal
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
3aca6b2d6a analyzer: Add another happy path with no docker and/or image
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
a183360e76 analyzer_test: switch to table driven
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
7eb94404a3 analzyer_test: Add stronger assertions for extractFromFile
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
Simarpreet Singh
985442dc1c analyzer_test: Adding seams for testability
Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-27 09:32:37 -08:00
jabielecki
95e89a424e change mod genuinetools/reg to vanilla (fanal#50)
* change mod genuinetools/reg to vanilla

Instead of using tomoyamachi's fork we can now use the vanilla upstream
package genuinetools/reg. This package gets better maintenance.

Also introducing new checksums for reg's children/dependecies.

Signed-off-by: Jakub Bielecki <jakub.bielecki@codilime.com>

* go mod tidy
2019-11-26 08:49:05 +02:00
jabielecki
728ba00be5 fix docker reg with option SkipPing (fanal#48)
Workaround for a deficient Ping implementation of reg package.
Ping fails on docker registries that return http 401
Authentication Required when requesting general /v2 url, but
happily allow unauthenticated pull of a specific image.

Closes aquasecurity/trivyfanal#229

Signed-off-by: Jakub Bielecki <jakub.bielecki@codilime.com>
2019-11-24 09:30:22 +02:00
Simarpreet Singh
177a2b0ad9 Add cache tests (fanal#46)
* docker_test: Do not pass nil context

Ref: https://github.com/golang/go/blob/master/src/context/context.gofanal#L37:L38

Instead pass context.TODO()

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

* cache_test: Add happy path for Get() and Set()

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

* cache_test: Add happy path for clear

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

* main: Rename os -> osFound to avoid shadowing

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

* cache_test: Assert that cache is indeed cleared up.

Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-11-19 10:07:12 +02:00
Teppei Fukuda
f9907823b8 Update LICENSE (fanal#45) 2019-11-04 11:58:41 +00:00
Teppei Fukuda
cf9d00dfc2 feat(library): ignore files under vendor dir (fanal#44) 2019-10-31 12:25:12 +02:00
Teppei Fukuda
9e8f0bb4f0 feat(image): support tar.gz image (fanal#40) 2019-10-15 11:48:52 +03:00
Nikita Titov
83f0e2b08b added markup and reference for code snippet in README (fanal#41) 2019-10-15 08:56:39 +03:00
R0GG
b318dec1e0 extractor/docker/docker.go: add parsing for tar.gz layers (fanal#26)
* extractor/docker/docker.go: add parsing for tar.gz layers

* extractor/docker/docker.go: ExtractFromFile: add new parsing logic

* extractor/docker/docker_test.go: add tarball with tar.gz layers

* Apply review
2019-10-01 00:41:48 +03:00
Teppei Fukuda
3841cf6d94 Check whether rpm is installed (fanal#39)
* Check whether rpm is installed

* Apply the review
2019-09-25 17:02:27 +03:00
Teppei Fukuda
cdeb41a58c Fix wrong break (fanal#38) 2019-09-25 15:52:46 +03:00
Teppei Fukuda
4a9f3d9aa9 Bug fix: wrap nil err (fanal#37) 2019-09-25 14:11:35 +03:00
Teppei Fukuda
d5d2729237 Add error wrap (fanal#35)
* Add error wrap

* Fix bug

* Fix typo
2019-09-25 12:57:09 +03:00
Teppei Fukuda
a5ed21ec13 Update Go to 1.13 (fanal#36) 2019-09-25 12:05:54 +03:00
Tomoya Amachi
afcb70977c extract all files in target require filedirs (fanal#29)
* extract all files in target require filedirs

* use separator to string

* change dpkg file match algorithm

* use filepath.Clean

* add test for target dir files
2019-09-25 09:35:58 +03:00
Masahiro Fujimura
c9f8a8546e Change error log (fanal#32) 2019-09-25 09:33:36 +03:00
Tomoya Amachi
f9a8f80485 skip scan composer.lock in vendor dir (fanal#34) 2019-09-25 09:32:02 +03:00
Teppei Fukuda
a8380ab5e5 Transfer repositoriy (fanal#27)
* Transfer repositoriy

* Disable coverall temporarily
2019-08-19 09:15:12 +01:00
Tomoya Amachi
430740f537 change reg version (fanal#25) 2019-07-07 02:51:50 +09:00
Andrew Hamilton
cef12efc04 Improves package analysis errors usability (fanal#24)
- Adds a new analyzer error for "no packages detected"
- Package analyzers now return the common "no packages detected" error
- Returned errors from the package analyzers are checked against the
  common "no packages detected" errors and filters those out. Other
  errors will now be passed back to the user for debugging.
2019-07-02 11:42:31 +09:00
Tomoya Amachi
3a38594cd1 to be able add required files (fanal#22)
* to be able add required files

* fix typo
2019-05-28 13:25:47 +09:00
Tomoya Amachi
6c02a38295 add Arch for amazon linux scan (fanal#21) 2019-05-23 09:27:21 +09:00
Masahiro
4e0c7fc226 Add poetry parser (fanal#19) 2019-05-22 00:46:31 +09:00
Tomoya Amachi
dd938fd693 update go-dep-parser for yarn bugfix (fanal#18) 2019-05-22 00:13:59 +09:00
Naoki Harima
e41f180236 Use go-deb-version for version validation (fanal#17) 2019-05-17 18:06:27 +09:00
Tomoya Amachi
b7debf7f0a add yarn.lock parser (fanal#16)
* add yarn.lock parser

* skip analyze package files in dependency folder
2019-05-16 09:29:14 +09:00
Teppei Fukuda
ce1f557cf7 Include source package in the package struct (fanal#15)
* Include source package in package struct

* Use SOURCERPM

* Use epoch of bin package as epoch of src package
2019-05-14 14:28:04 +09:00
Teppei Fukuda
9fa86c550a Replace slash with underscore (fanal#14) 2019-05-13 15:12:10 +09:00
Teppei Fukuda
89f6348b9c Analyze origin (fanal#13) 2019-05-13 03:56:15 +09:00
Teppei Fukuda
faed25bfec Analyze command (fanal#12)
* Extract commands

* Analyze commands

* Add comment

* Resolve dependency
2019-05-12 11:18:34 +09:00
Masahiro
856dd3a464 Add cargo analyzer (fanal#11) 2019-05-11 17:35:00 +09:00
Tomoya Amachi
cb5b791d13 GetToken only run extractor/docker (fanal#10)
* GetToken only run extractor/docker

* delete dockerhub register analyzer

* create types package
2019-05-09 13:39:17 +09:00
Tomoya AMACHI
1211b105dc add ecr test 2019-05-09 13:33:11 +09:00
Tomoya AMACHI
e9e2777c32 add gcr test 2019-05-09 12:58:12 +09:00
Tomoya AMACHI
123ee18257 fix reviewed point 2019-05-09 12:27:18 +09:00
Tomoya AMACHI
224069af28 refact import cycle in docker package 2019-05-09 12:25:01 +09:00
Tomoya AMACHI
5e96fa6a55 create types package 2019-05-09 12:23:22 +09:00
Tomoya AMACHI
d773f56aae change var name : GCRCredPath -> GcpCredPath 2019-05-09 11:18:01 +09:00
Tomoya AMACHI
48a3ac53fb fix typo 2019-05-09 11:10:58 +09:00
Tomoya AMACHI
1d2fe13f28 delete dockerhub register analyzer 2019-05-09 11:08:11 +09:00
Tomoya AMACHI
c8127c458f GetToken only run extractor/docker 2019-05-09 11:06:20 +09:00
Teppei Fukuda
2c3bf38c73 Cache the saved image (fanal#9)
* Cache saved images

* Update README
2019-05-08 16:18:37 +09:00
Teppei Fukuda
1778abe4e3 Clear cache (fanal#8) 2019-05-07 21:32:06 +09:00
Teppei Fukuda
c0563f81bc Use local images when docker daemon exists (fanal#7)
* Use local images when docker daemon exists

* Fix error handling
2019-05-06 20:07:05 +09:00
Tomoya Amachi
028073bd02 merge ubuntu analyzer into debianbase analyzer (fanal#6)
* fix genuinetools/reg module version

* merge ubuntu analyzer into debianbase analyzer

* add os analyzer tests

* add redhat base test

* add redhatbase test file

* use AnalyzeOsError

* add gitignore empty folder

* change variable name in test codes

* skip coverage check on forked project
2019-05-06 11:28:18 +09:00
Teppei Fukuda
8394568aa0 Merge pull request fanal#5 from knqyf263/initial
Initial
2019-05-01 22:47:35 +09:00
Teppei Fukuda
1b5c33658f Revert "Initial commit (fanal#1)" (fanal#4)
This reverts commit 549812a784.
2019-05-01 22:42:59 +09:00
Teppei Fukuda
808a6459b4 Initial commit (fanal#1)
* Initial commit

* update

* add apk analyzer

* add dpkg analyzer

* Analyze docker image

* Update README

* Pull image

* Support private registry and use cache

* fix test

* fix for merge

* add rpm analyzer

* add tmp gcr

* Add test

* fix tmp : fix gcr bug on reg package

* fetch gcr container from credential

* use no auth docker token

* update alpine os analyzer

* continue package if no files found

* ignore vendor

* check OS

* add soft link file path

* Add rpm

* update comment

* Support library

* Add rpm analyzer without rpm command
2019-05-01 16:21:38 +09:00
knqyf263
05821edb41 Add rpm analyzer without rpm command 2019-05-01 16:09:49 +09:00
knqyf263
e55ec73aba Support library 2019-05-01 15:24:08 +09:00
Teppei Fukuda
fefe879691 Merge pull request fanal#2 from knqyf263/add_analyzer
Add analyzer
2019-05-01 12:30:25 +09:00
knqyf263
bd57e64268 update comment 2019-05-01 12:19:38 +09:00
knqyf263
66aac5d640 Add rpm 2019-04-29 10:40:18 +09:00
Tomoya AMACHI
f071cecd5c add soft link file path 2019-04-25 22:55:00 +09:00
Tomoya AMACHI
6a2ca8f74f check OS 2019-04-25 01:05:15 +09:00
Tomoya AMACHI
5529c83920 ignore vendor 2019-04-24 20:09:21 +09:00
Tomoya AMACHI
022b948545 continue package if no files found 2019-04-24 20:06:40 +09:00
Tomoya AMACHI
f99701585f update alpine os analyzer 2019-04-24 14:06:51 +09:00
Tomoya AMACHI
76333a382c use no auth docker token 2019-04-24 14:04:52 +09:00
Tomoya AMACHI
ed8de8b1aa fetch gcr container from credential 2019-04-18 21:03:36 +09:00
Tomoya AMACHI
e72e8693ef Merge remote-tracking branch 'origin/initial' into add_analyzer 2019-04-18 17:01:54 +09:00
Tomoya AMACHI
f06501ea2b fix tmp : fix gcr bug on reg package 2019-04-17 20:21:35 +09:00
knqyf263
e996e0112a Add test 2019-04-17 20:12:20 +09:00
Tomoya AMACHI
f6fe06fd12 add tmp gcr 2019-04-13 11:00:49 +09:00
Tomoya AMACHI
984ce9bd38 add rpm analyzer 2019-04-09 22:05:09 +09:00
Tomoya AMACHI
c7cf493ebd fix for merge 2019-04-09 15:55:15 +09:00
Tomoya Amachi
9916efbf5e Merge branch 'initial' into add_analyzer 2019-04-09 12:34:08 +09:00
knqyf263
0954e0f44b fix test 2019-04-08 00:23:39 +09:00
knqyf263
c7208b3efa Support private registry and use cache 2019-04-08 00:10:39 +09:00
knqyf263
262fee4195 Pull image 2019-04-07 18:01:27 +09:00
knqyf263
9f32fd0525 Update README 2019-04-07 15:04:15 +09:00
knqyf263
8065c4bf53 Analyze docker image 2019-04-07 14:56:43 +09:00
Tomoya AMACHI
64d449ee57 add dpkg analyzer 2019-04-04 01:37:43 +09:00
Tomoya AMACHI
68cb8ceba4 add apk analyzer 2019-04-03 12:16:36 +09:00
knqyf263
ec2b20dcd8 update 2019-04-01 23:34:38 +09:00
knqyf263
552c4de1a0 Initial commit 2019-04-01 00:16:25 +09:00
Teppei Fukuda
7b3bf986e8 Initial commit 2019-03-27 17:33:38 +09:00
1486 changed files with 321381 additions and 89373 deletions

View File

@@ -1,8 +0,0 @@
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true

View File

@@ -1,72 +0,0 @@
version: 2.1
orbs:
codecov: codecov/codecov@1.1.0
defaults: &defaults
docker :
- image: aquasec/trivy-ci:latest
environment:
CGO_ENABLED: "0"
jobs:
unit-test:
<<: *defaults
steps:
- checkout
- run:
name: Check if there's anything to fix with gofmt
command: |
if test -z "$(gofmt -l .)"; then
echo "Congrats! There is nothing to fix."
else
echo "The following lines should be fixed."
gofmt -s -d .
exit 1
fi
- run:
name: Test
command: make test
- codecov/upload:
file: ./coverage.txt
release:
<<: *defaults
steps:
- checkout
- setup_remote_docker:
version: 18.06.0-ce
- run:
name: setup docker
command: echo $DOCKER_PASS | docker login --username $DOCKER_USER --password-stdin
- run:
name: Release
command: goreleaser --rm-dist
- run:
name: Clone trivy repository
command: git clone git@github.com:aquasecurity/trivy-repo.git
- run:
name: Setup git settings
command: |
git config --global user.email "knqyf263@gmail.com"
git config --global user.name "Teppei Fukuda"
- run:
name: Create rpm repository
command: ci/deploy-rpm.sh
- run:
name: Import GPG key
command: echo -e "$GPG_KEY" | gpg --import
- run:
name: Create deb repository
command: ci/deploy-deb.sh
workflows:
version: 2
release:
jobs:
- unit-test
- release:
filters:
branches:
ignore: /.*/
tags:
only: /.*/

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* text=auto eol=lf

24
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,24 @@
# Global
* @knqyf263
# Docs
/docs/** @knqyf263 @AnaisUrlichs @itaysk
/mkdocs.yml @knqyf263 @AnaisUrlichs @itaysk
/README.md @knqyf263 @AnaisUrlichs @itaysk
# 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

122
.github/DISCUSSION_TEMPLATE/bugs.yml vendored Normal file
View File

@@ -0,0 +1,122 @@
labels: ["kind/bug"]
body:
- type: markdown
attributes:
value: |
#### Note
Feel free to raise a bug report if something doesn't work as expected.
Please ensure that you're not creating a duplicate report by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
If you see any false positives or false negatives, please file a ticket [here](https://github.com/aquasecurity/trivy/discussions/new?category=false-detection).
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
- type: textarea
attributes:
label: Description
description: Briefly describe the problem you are having in a few paragraphs.
validations:
required: true
- type: textarea
attributes:
label: Desired Behavior
description: What did you expect to happen?
validations:
required: true
- type: textarea
attributes:
label: Actual Behavior
description: What happened instead?
validations:
required: true
- type: textarea
attributes:
label: Reproduction Steps
description: How do you trigger this bug? Please walk us through it step by step.
value: |
1.
2.
3.
...
render: bash
validations:
required: true
- type: dropdown
attributes:
label: Target
description: Which target are you scanning? It is equal to which subcommand you are using.
options:
- Container Image
- Filesystem
- Git Repository
- Virtual Machine Image
- Kubernetes
- AWS
- SBOM
validations:
required: false
- type: dropdown
attributes:
label: Scanner
description: Which scanner are you using?
options:
- Vulnerability
- Misconfiguration
- Secret
- License
validations:
required: false
- type: dropdown
attributes:
label: Output Format
description: Which output format are you using?
options:
- Table
- JSON
- Template
- SARIF
- CycloneDX
- SPDX
validations:
required: false
- type: dropdown
attributes:
label: Mode
description: Which mode are you using? Specify "Standalone" if you are not using `trivy server`.
options:
- Standalone
- Client/Server
validations:
required: false
- type: textarea
attributes:
label: Debug Output
description: Output of run with `--debug`
placeholder: "$ trivy <target> <subject> --debug"
render: bash
validations:
required: true
- type: input
attributes:
label: Operating System
description: On what operating system are you running Trivy?
placeholder: "e.g. macOS Big Sur"
validations:
required: true
- type: textarea
attributes:
label: Version
description: Output of `trivy --version`
placeholder: "$ trivy --version"
render: bash
validations:
required: true
- type: checkboxes
attributes:
label: Checklist
description: Have you tried the following?
options:
- label: Run `trivy image --reset`
- label: Read [the troubleshooting](https://aquasecurity.github.io/trivy/latest/docs/references/troubleshooting/)
- type: markdown
attributes:
value: |
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).

View File

@@ -0,0 +1,28 @@
labels: ["kind/documentation"]
body:
- type: markdown
attributes:
value: |
#### Note
Feel free to create a docs report if something doesn't work as expected or is unclear in the documentation.
Please ensure that you're not creating a duplicate report by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
- type: textarea
attributes:
label: Description
description: Briefly describe the what has been unclear in the existing documentation
validations:
required: true
- type: textarea
attributes:
label: Link
description: Please provide a link to the current documentation or where you thought to find the information you were looking for
validations:
required: false
- type: textarea
attributes:
label: Suggestions
description: What would you like to have added or changed in the documentation?
validations:
required: true

View File

@@ -0,0 +1,94 @@
body:
- type: markdown
attributes:
value: |
#### Note
Feel free to raise a bug report if something doesn't work as expected.
Please ensure that you're not creating a duplicate report by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
- type: input
attributes:
label: IDs
description: List the IDs of vulnerabilities, misconfigurations, secrets, or licenses that are either not detected or mistakenly detected.
placeholder: "e.g. CVE-2021-44228, CVE-2022-22965"
validations:
required: true
- type: textarea
attributes:
label: Description
description: Describe the false detection.
validations:
required: true
- type: textarea
attributes:
label: Reproduction Steps
description: How do you trigger this bug? Please walk us through it step by step.
value: |
1.
2.
3.
...
render: bash
validations:
required: true
- type: dropdown
attributes:
label: Target
description: Which target are you scanning? It is equal to which subcommand you are using.
options:
- Container Image
- Filesystem
- Git Repository
- Virtual Machine Image
- Kubernetes
- AWS
- SBOM
validations:
required: true
- type: dropdown
attributes:
label: Scanner
description: Which scanner are you using?
options:
- Vulnerability
- Misconfiguration
- Secret
- License
validations:
required: true
- type: input
attributes:
label: Target OS
description: What operating system are you scanning? Fill in this field if the scanning target is an operating system.
placeholder: "Example: Ubuntu 22.04"
validations:
required: false
- type: textarea
attributes:
label: Debug Output
description: Output of run with `--debug`
placeholder: "$ trivy <target> <subject> --debug"
render: bash
validations:
required: true
- type: textarea
attributes:
label: Version
description: Output of `trivy --version`
placeholder: "$ trivy --version"
render: bash
validations:
required: true
- type: checkboxes
attributes:
label: Checklist
options:
- label: Read [the documentation regarding wrong detection](https://aquasecurity.github.io/trivy/dev/community/contribute/discussion/#false-detection)
- label: Ran Trivy with `-f json` that shows data sources and confirmed that the security advisory in data sources was correct
validations:
required: true
- type: markdown
attributes:
value: |
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).

45
.github/DISCUSSION_TEMPLATE/ideas.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
labels: ["kind/feature"]
body:
- type: markdown
attributes:
value: |
#### Note
Feel free to share your idea.
Please ensure that you're not creating a duplicate ticket by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
- type: textarea
attributes:
label: Description
description: Describe your idea.
validations:
required: true
- type: dropdown
attributes:
label: Target
description: Which target is your idea related to?
options:
- Container Image
- Filesystem
- Git Repository
- Virtual Machine Image
- Kubernetes
- AWS
- SBOM
validations:
required: false
- type: dropdown
attributes:
label: Scanner
description: Which scanner is your idea related to?
options:
- Vulnerability
- Misconfiguration
- Secret
- License
validations:
required: false
- type: markdown
attributes:
value: |
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).

82
.github/DISCUSSION_TEMPLATE/q-a.yml vendored Normal file
View File

@@ -0,0 +1,82 @@
labels: ["triage/support"]
body:
- type: markdown
attributes:
value: |
#### Note
If you have any troubles/questions, feel free to ask.
Please ensure that you're not asking a duplicate question by searching the [issues](https://github.com/aquasecurity/trivy/issues)/[discussions](https://github.com/aquasecurity/trivy/discussions) beforehand.
Please also check [our contribution guidelines](https://aquasecurity.github.io/trivy/latest/community/contribute/discussion/).
- type: textarea
attributes:
label: Question
description: What kind of problem are you facing? Or, what questions do you have?
validations:
required: true
- type: dropdown
attributes:
label: Target
description: Which target are you scanning? It is equal to which subcommand you are using.
options:
- Container Image
- Filesystem
- Git Repository
- Virtual Machine Image
- Kubernetes
- AWS
- SBOM
validations:
required: false
- type: dropdown
attributes:
label: Scanner
description: Which scanner are you using?
options:
- Vulnerability
- Misconfiguration
- Secret
- License
validations:
required: false
- type: dropdown
attributes:
label: Output Format
description: Which output format are you using?
options:
- Table
- JSON
- Template
- SARIF
- CycloneDX
- SPDX
validations:
required: false
- type: dropdown
attributes:
label: Mode
description: Which mode are you using? Specify "Standalone" if you are not using `trivy server`.
options:
- Standalone
- Client/Server
validations:
required: false
- type: input
attributes:
label: Operating System
description: What operating system are you using?
placeholder: "Example: macOS Big Sur"
validations:
required: false
- type: textarea
attributes:
label: Version
description: Output of `trivy --version`
placeholder: "$ trivy --version"
render: bash
validations:
required: false
- type: markdown
attributes:
value: |
We would be happy if you could share how you are using Trivy [here](https://github.com/aquasecurity/trivy/discussions/new?category=show-and-tell).

View File

@@ -0,0 +1,53 @@
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

View File

@@ -1,31 +0,0 @@
---
name: Bug Report
labels: kind/bug
about: If something isn't working as expected.
---
**Description**
<!--
Briefly describe the problem you are having in a few paragraphs.
-->
**What did you expect to happen?**
**What happened instead?**
**Output of run with `-debug`:**
```
(paste your output here)
```
**Output of `trivy -v`:**
```
(paste your output here)
```
**Additional details (base image name, container registry info...):**

View File

@@ -1,9 +0,0 @@
---
name: Feature Request
labels: kind/feature
about: I have a suggestion (and might want to implement myself)!
---
<!--
If this is a FEATURE REQUEST, request format does not matter!
-->

View File

@@ -1,10 +0,0 @@
---
name: Support Question
labels: triage/support
about: If you have a question about Trivy.
---
<!--
If you have a trouble, feel free to ask.
Make sure you're not asking duplicate question by searching on the issues lists.
-->

17
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
blank_issues_enabled: false
contact_links:
- name: Report a false detection
url: https://github.com/aquasecurity/trivy/discussions/new?category=false-detection
about: Report false positives/negatives
- name: Report a bug
url: https://github.com/aquasecurity/trivy/discussions/new?category=bugs
about: Report bugs
- name: Enhance documentation
url: https://github.com/aquasecurity/trivy/discussions/new?category=documentation
about: Make suggestions to the documentation
- name: Request a feature enhancement
url: https://github.com/aquasecurity/trivy/discussions/new?category=ideas
about: Share ideas for new features
- name: Ask the community for help
url: https://github.com/aquasecurity/trivy/discussions/new?category=q-a
about: Ask questions and discuss with other community members

15
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
- package-ecosystem: docker
directory: /
schedule:
interval: monthly
- package-ecosystem: gomod
open-pull-requests-limit: 10
directory: /
schedule:
interval: monthly

18
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,18 @@
## Description
## Related issues
- Close #XXX
## Related PRs
- [ ] #XXX
- [ ] #YYY
Remove this section if you don't have related PRs.
## 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).

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"'

60
.github/workflows/canary.yaml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: Canary build
on:
push:
branches:
- 'main'
paths:
- '**.go'
- 'go.mod'
- 'Dockerfile.canary'
- '.github/workflows/canary.yaml'
workflow_dispatch:
jobs:
build-binaries:
name: Build binaries
uses: ./.github/workflows/reusable-release.yaml
with:
goreleaser_config: goreleaser-canary.yml
goreleaser_options: '--snapshot --clean --timeout 60m' # will not release
secrets: inherit
upload-binaries:
name: Upload binaries
needs: build-binaries # run this job after 'build-binaries' job completes
runs-on: ubuntu-latest
steps:
- name: Restore Trivy binaries from cache
uses: actions/cache@v3.3.1
with:
path: dist/
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
# Upload artifacts
- name: Upload artifacts (trivy_Linux-64bit)
uses: actions/upload-artifact@v3
with:
name: trivy_Linux-64bit
path: dist/trivy_*_Linux-64bit.tar.gz
if-no-files-found: error
- name: Upload artifacts (trivy_Linux-ARM64)
uses: actions/upload-artifact@v3
with:
name: trivy_Linux-ARM64
path: dist/trivy_*_Linux-ARM64.tar.gz
if-no-files-found: error
- name: Upload artifacts (trivy_macOS-64bit)
uses: actions/upload-artifact@v3
with:
name: trivy_macOS-64bit
path: dist/trivy_*_macOS-64bit.tar.gz
if-no-files-found: error
- name: Upload artifacts (trivy_macOS-ARM64)
uses: actions/upload-artifact@v3
with:
name: trivy_macOS-ARM64
path: dist/trivy_*_macOS-ARM64.tar.gz
if-no-files-found: error

33
.github/workflows/mkdocs-dev.yaml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Deploy the dev documentation
on:
push:
paths:
- 'docs/**'
- mkdocs.yml
branches:
- main
jobs:
deploy:
name: Deploy the dev documentation
runs-on: ubuntu-22.04
steps:
- name: Checkout main
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
persist-credentials: true
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
pip install -r docs/build/requirements.txt
env:
GH_TOKEN: ${{ secrets.MKDOCS_AQUA_BOT }}
- name: Configure the git user
run: |
git config user.name "knqyf263"
git config user.email "knqyf263@gmail.com"
- name: Deploy the dev documents
run: mike deploy --push dev

41
.github/workflows/mkdocs-latest.yaml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Deploy the latest documentation
on:
workflow_dispatch:
inputs:
version:
description: Version to be deployed
required: true
push:
tags:
- "v*"
jobs:
deploy:
name: Deploy the latest documentation
runs-on: ubuntu-22.04
steps:
- name: Checkout main
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
persist-credentials: true
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
pip install -r docs/build/requirements.txt
env:
GH_TOKEN: ${{ secrets.MKDOCS_AQUA_BOT }}
- name: Configure the git user
run: |
git config user.name "knqyf263"
git config user.email "knqyf263@gmail.com"
- name: Deploy the latest documents from new tag push
if: ${{ github.event.inputs.version == '' }}
run: |
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
mike deploy --push --update-aliases ${VERSION%.*} latest
- name: Deploy the latest documents from manual trigger
if: ${{ github.event.inputs.version != '' }}
run: mike deploy --push --update-aliases ${{ github.event.inputs.version }} latest

87
.github/workflows/publish-chart.yaml vendored Normal file
View File

@@ -0,0 +1,87 @@
name: Publish Helm chart
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- 'helm/trivy/**'
push:
tags:
- "v*"
env:
HELM_REP: helm-charts
GH_OWNER: aquasecurity
CHART_DIR: helm/trivy
KIND_VERSION: "v0.14.0"
KIND_IMAGE: "kindest/node:v1.23.6@sha256:b1fa224cc6c7ff32455e0b1fd9cbfd3d3bc87ecaa8fcb06961ed1afb3db0f9ae"
jobs:
test-chart:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78
with:
version: v3.5.0
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Setup Chart Linting
id: lint
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76
- name: Setup Kubernetes cluster (KIND)
uses: helm/kind-action@fa81e57adff234b2908110485695db0f181f3c67
with:
version: ${{ env.KIND_VERSION }}
image: ${{ env.KIND_IMAGE }}
- name: Run chart-testing
run: ct lint-and-install --validate-maintainers=false --charts helm/trivy
- name: Run chart-testing (Ingress enabled)
run: |
sed -i -e '136s,false,'true',g' ./helm/trivy/values.yaml
ct lint-and-install --validate-maintainers=false --charts helm/trivy
publish-chart:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
needs:
- test-chart
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
- name: Install chart-releaser
run: |
wget https://github.com/helm/chart-releaser/releases/download/v1.3.0/chart-releaser_1.3.0_linux_amd64.tar.gz
echo "baed2315a9bb799efb71d512c5198a2a3b8dcd139d7f22f878777cffcd649a37 chart-releaser_1.3.0_linux_amd64.tar.gz" | sha256sum -c -
tar xzvf chart-releaser_1.3.0_linux_amd64.tar.gz cr
- name: Package helm chart
run: |
./cr package ${{ env.CHART_DIR }}
- name: Upload helm chart
# Failed with upload the same version: https://github.com/helm/chart-releaser/issues/101
continue-on-error: true
run: |
./cr upload -o ${{ env.GH_OWNER }} -r ${{ env.HELM_REP }} --token ${{ secrets.ORG_REPO_TOKEN }} -p .cr-release-packages
- name: Index helm chart
run: |
./cr index -o ${{ env.GH_OWNER }} -r ${{ env.HELM_REP }} -c https://${{ env.GH_OWNER }}.github.io/${{ env.HELM_REP }}/ -i index.yaml
- name: Push index file
uses: dmnemec/copy_file_to_another_repo_action@c93037aa10fa8893de271f19978c980d0c1a9b37 #v1.1.1
env:
API_TOKEN_GITHUB: ${{ secrets.ORG_REPO_TOKEN }}
with:
source_file: 'index.yaml'
destination_repo: '${{ env.GH_OWNER }}/${{ env.HELM_REP }}'
destination_folder: '.'
destination_branch: 'gh-pages'
user_email: aqua-bot@users.noreply.github.com
user_name: 'aqua-bot'

57
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: Release
on:
push:
tags:
- "v*"
jobs:
release:
name: Release
uses: ./.github/workflows/reusable-release.yaml
with:
goreleaser_config: goreleaser.yml
goreleaser_options: '--clean --timeout 90m'
secrets: inherit
deploy-packages:
name: Deploy rpm/dep packages
needs: release # run this job after 'release' job completes
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
- name: Restore Trivy binaries from cache
uses: actions/cache@v3.3.1
with:
path: dist/
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install rpm reprepro createrepo-c distro-info
- name: Checkout trivy-repo
uses: actions/checkout@v3.5.3
with:
repository: ${{ github.repository_owner }}/trivy-repo
path: trivy-repo
fetch-depth: 0
token: ${{ secrets.ORG_REPO_TOKEN }}
- name: Setup git settings
run: |
git config --global user.email "knqyf263@gmail.com"
git config --global user.name "Teppei Fukuda"
- name: Create rpm repository
run: ci/deploy-rpm.sh
- name: Import GPG key
run: echo -e "${{ secrets.GPG_KEY }}" | gpg --import
- name: Create deb repository
run: ci/deploy-deb.sh

121
.github/workflows/reusable-release.yaml vendored Normal file
View File

@@ -0,0 +1,121 @@
name: Reusable release
on:
workflow_call:
inputs:
goreleaser_config:
description: 'file path to GoReleaser config'
required: true
type: string
goreleaser_options:
description: 'GoReleaser options separated by spaces'
default: ''
required: false
type: string
env:
GH_USER: "aqua-bot"
jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
permissions:
id-token: write # For cosign
packages: write # For GHCR
contents: read # Not required for public repositories, but for clarity
steps:
- name: Cosign install
uses: sigstore/cosign-installer@ef0e9691595ea19ec990a46b1a591dcafe568f34
- 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: Login to docker.io registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to ghcr.io registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ env.GH_USER }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws
username: ${{ secrets.ECR_ACCESS_KEY_ID }}
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
- name: Checkout code
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Generate SBOM
uses: CycloneDX/gh-gomod-generate-sbom@v2
with:
args: mod -licenses -json -output bom.json
version: ^v1
- name: "save gpg key"
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
run: |
echo "$GPG_KEY" > gpg.key
- name: GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: v1.16.2
args: release -f=${{ inputs.goreleaser_config}} ${{ inputs.goreleaser_options}}
env:
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
NFPM_DEFAULT_RPM_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_FILE: "gpg.key"
- name: "remove gpg key"
run: |
rm gpg.key
# Push images to registries (only for canary build)
# The custom Dockerfile.canary is necessary
# because GoReleaser Free doesn't support pushing images with the `--snapshot` flag.
- name: Build and push
if: ${{ inputs.goreleaser_config == 'goreleaser-canary.yml' }}
uses: docker/build-push-action@v4
with:
platforms: linux/amd64, linux/arm64
file: ./Dockerfile.canary # path to Dockerfile
context: .
push: true
tags: |
aquasec/trivy:canary
ghcr.io/aquasecurity/trivy:canary
public.ecr.aws/aquasecurity/trivy:canary
- name: Cache Trivy binaries
uses: actions/cache@v3.3.1
with:
path: dist/
# use 'github.sha' to create a unique cache folder for each run.
# use 'github.workflow' to create a unique cache folder if some runs have same commit sha.
# e.g. build and release runs
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}

79
.github/workflows/roadmap.yaml vendored Normal file
View File

@@ -0,0 +1,79 @@
name: Add issues to the roadmap project
on:
issues:
types:
- labeled
jobs:
add-issue-to-roadmap-project:
name: Add issue to the roadmap project
runs-on: ubuntu-latest
steps:
# 'kind/feature' AND 'priority/backlog' labels -> 'Backlog' column
- uses: actions/add-to-project@v0.4.1 # add new issue to project
with:
project-url: https://github.com/orgs/aquasecurity/projects/25
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
labeled: kind/feature, priority/backlog
label-operator: AND
id: add-backlog-issue
- uses: titoportas/update-project-fields@v0.1.0 # change Priority(column) of added issue
if: ${{ steps.add-backlog-issue.outputs.itemId }}
with:
project-url: https://github.com/orgs/aquasecurity/projects/25
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
item-id: ${{ steps.add-backlog-issue.outputs.itemId }} # Use the item-id output of the previous step
field-keys: Priority
field-values: Backlog
# 'kind/feature' AND 'priority/important-longterm' labels -> 'Important (long-term)' column
- uses: actions/add-to-project@v0.4.1 # add new issue to project
with:
project-url: https://github.com/orgs/aquasecurity/projects/25
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
labeled: kind/feature, priority/important-longterm
label-operator: AND
id: add-longterm-issue
- uses: titoportas/update-project-fields@v0.1.0 # change Priority(column) of added issue
if: ${{ steps.add-longterm-issue.outputs.itemId }}
with:
project-url: https://github.com/orgs/aquasecurity/projects/25
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
item-id: ${{ steps.add-longterm-issue.outputs.itemId }} # Use the item-id output of the previous step
field-keys: Priority
field-values: Important (long-term)
# 'kind/feature' AND 'priority/important-soon' labels -> 'Important (soon)' column
- uses: actions/add-to-project@v0.4.1 # add new issue to project
with:
project-url: https://github.com/orgs/aquasecurity/projects/25
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
labeled: kind/feature, priority/important-soon
label-operator: AND
id: add-soon-issue
- uses: titoportas/update-project-fields@v0.1.0 # change Priority(column) of added issue
if: ${{ steps.add-soon-issue.outputs.itemId }}
with:
project-url: https://github.com/orgs/aquasecurity/projects/25
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
item-id: ${{ steps.add-soon-issue.outputs.itemId }} # Use the item-id output of the previous step
field-keys: Priority
field-values: Important (soon)
# 'kind/feature' AND 'priority/critical-urgent' labels -> 'Urgent' column
- uses: actions/add-to-project@v0.4.1 # add new issue to project
with:
project-url: https://github.com/orgs/aquasecurity/projects/25
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
labeled: kind/feature, priority/critical-urgent
label-operator: AND
id: add-urgent-issue
- uses: titoportas/update-project-fields@v0.1.0 # change Priority(column) of added issue
if: ${{ steps.add-urgent-issue.outputs.itemId }}
with:
project-url: https://github.com/orgs/aquasecurity/projects/25
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
item-id: ${{ steps.add-urgent-issue.outputs.itemId }} # Use the item-id output of the previous step
field-keys: Priority
field-values: Urgent

23
.github/workflows/scan.yaml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Scan vulnerabilities
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
name: Scan Go vulnerabilities
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.5.3
- name: Run Trivy vulnerability scanner and create GitHub issues
uses: knqyf263/trivy-issue-action@v0.0.5
with:
assignee: knqyf263
severity: CRITICAL
skip-dirs: integration,examples,pkg
label: kind/security
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

100
.github/workflows/semantic-pr.yaml vendored Normal file
View File

@@ -0,0 +1,100 @@
name: "Lint PR title"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
BREAKING
scopes: |
vuln
misconf
secret
license
image
fs
repo
sbom
server
k8s
aws
vm
alpine
wolfi
chainguard
redhat
alma
rocky
mariner
oracle
debian
ubuntu
amazon
suse
photon
distroless
windows
ruby
php
python
nodejs
rust
dotnet
java
go
c
c\+\+
elixir
dart
os
lang
kubernetes
dockerfile
terraform
cloudformation
docker
podman
containerd
oci
cli
flag
cyclonedx
spdx
purl
helm
report
db
deps

20
.github/workflows/stale-issues.yaml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: "Stale issues"
on:
schedule:
- cron: '0 0 * * *'
jobs:
stale:
timeout-minutes: 1
runs-on: ubuntu-latest
steps:
- 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-close: 20

28
.github/workflows/test-docs.yaml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Test docs
on:
pull_request:
paths:
- 'docs/**'
- 'mkdocs.yml'
jobs:
build-documents:
name: Documentation Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
persist-credentials: true
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
pip install -r docs/build/requirements.txt
- name: Configure the git user
run: |
git config user.name "knqyf263"
git config user.email "knqyf263@gmail.com"
- name: Deploy the dev documents
run: mike deploy test

View File

@@ -1,36 +1,183 @@
name: Test
on: pull_request
on:
push:
branches-ignore:
- 'main'
- 'gh-readonly-queue/**'
paths-ignore:
- '**.md'
- 'docs/**'
- 'mkdocs.yml'
- 'LICENSE'
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
- 'mkdocs.yml'
- 'LICENSE'
merge_group:
jobs:
test:
name: Test
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3.5.3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: oldstable
- name: go mod tidy
run: |
go mod tidy
if [ -n "$(git status --porcelain)" ]; then
echo "Run 'go mod tidy' and push it"
exit 1
fi
if: matrix.operating-system == 'ubuntu-latest'
- name: Lint
uses: golangci/golangci-lint-action@v3.6.0
with:
version: v1.52
args: --deadline=30m
skip-cache: true # https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052197778
if: matrix.operating-system == 'ubuntu-latest'
- name: Install tools
uses: aquaproj/aqua-installer@v2.1.2
with:
aqua_version: v1.25.0
aqua_opts: ""
- name: Check if CLI references are up-to-date
run: |
mage docs:generate
if [ -n "$(git status --porcelain)" ]; then
echo "Run 'mage docs:generate' and push it"
exit 1
fi
if: matrix.operating-system == 'ubuntu-latest'
- name: Run unit tests
run: mage test:unit
integration:
name: Integration Test
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14.x
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3.5.3
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Run integration tests
run: make test-integration
- name: Install tools
uses: aquaproj/aqua-installer@v2.1.2
with:
aqua_version: v1.25.0
- name: Run integration tests
run: mage test:integration
k8s-integration:
name: K8s Integration Test
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3.5.3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Install tools
uses: aquaproj/aqua-installer@v2.1.2
with:
aqua_version: v1.25.0
- name: Run k8s integration tests
run: mage test:k8s
module-test:
name: Module Integration Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Install tools
uses: aquaproj/aqua-installer@v2.1.2
with:
aqua_version: v1.25.0
- name: Run module integration tests
shell: bash
run: |
mage test:module
vm-test:
name: VM Integration Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Install tools
uses: aquaproj/aqua-installer@v2.1.2
with:
aqua_version: v1.25.0
- name: Run vm integration tests
run: |
mage test:vm
build-test:
name: Build Test
runs-on: ubuntu-latest
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.5.3
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v4
with:
go-version: 1.14.x
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@v1
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --snapshot --rm-dist --skip-publish
version: v1.16.2
args: build --snapshot --clean --timeout 90m ${{ steps.goreleaser_id.outputs.id }}

21
.gitignore vendored
View File

@@ -4,6 +4,10 @@
*.dll
*.so
*.dylib
/trivy
## chart release
.cr-release-packages
# Test binary, build with `go test -c`
*.test
@@ -12,6 +16,7 @@
*.out
.idea
.vscode
# Directory Cache Files
.DS_Store
@@ -19,4 +24,18 @@ thumbs.db
# test fixtures
coverage.txt
integration/testdata/fixtures/
integration/testdata/fixtures/images
integration/testdata/fixtures/vm-images
# SBOMs generated during CI
/bom.json
# goreleaser output
dist
# WebAssembly
*.wasm
# Signing
gpg.key
cmd/trivy/trivy

73
.golangci.yaml Normal file
View File

@@ -0,0 +1,73 @@
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
govet:
check-shadowing: false
gofmt:
simplify: false
revive:
ignore-generated-header: true
gocyclo:
min-complexity: 20
dupl:
threshold: 100
goconst:
min-len: 3
min-occurrences: 3
misspell:
locale: US
goimports:
local-prefixes: github.com/aquasecurity
gosec:
excludes:
- G101
- G114
- G204
- G402
linters:
disable-all: true
enable:
- unused
- ineffassign
- typecheck
- govet
- revive
- gosec
- unconvert
- goconst
- gocyclo
- gofmt
- goimports
- misspell
run:
go: 1.19
skip-files:
- ".*._mock.go$"
- ".*._test.go$"
- "integration/*"
- "examples/*"
issues:
exclude-rules:
- linters:
- gosec
text: "G304: Potential file inclusion"
- linters:
- gosec
text: "Deferring unsafe method"
- linters:
- errcheck
text: "Close` is not checked"
- linters:
- errcheck
text: "os.*` is not checked"
- linters:
- golint
text: "a blank import should be only in a main or test package"
exclude:
- "should have a package comment, unless it's in another file for this package"
exclude-use-default: false
max-same-issues: 0

View File

@@ -1,28 +1 @@
Thank you for taking interest in contributing to Trivy !
## Issues
- Feel free to open issues for any reason. When you open a new issue, you'll have to select an issue kind: bug/feature/support and fill the required information based on the selected template.
- Please spend a small amount of time giving due diligence to the issue tracker. Your issue might be a duplicate. If it is, please add your comment to the existing issue.
- Remember users might be searching for your issue in the future, so please give it a meaningful title to help others.
- The issue should clearly explain the reason for opening, the proposal if you have any, and any relevant technical information.
## Pull Requests
1. Every Pull Request should have an associated bug or feature issue unless you are fixing a trivial documentation issue.
1. Your PR is more likely to be accepted if it focuses on just one change.
1. Describe what the PR does. There's no convention enforced, but please try to be concise and descriptive. Treat the PR description as a commit message. Titles that starts with "fix"/"add"/"improve"/"remove" are good examples.
1. Please add the associated Issue in the PR description.
1. There's no need to add or tag reviewers.
1. If a reviewer commented on your code or asked for changes, please remember to mark the discussion as resolved after you address it. PRs with unresolved issues should not be merged (even if the comment is unclear or requires no action from your side).
1. Please include a comment with the results before and after your change.
1. Your PR is more likely to be accepted if it includes tests (We have not historically been very strict about tests, but we would like to improve this!).
1. If your PR affects the user experience in some way, please update the Readme and the CLI help accordingly.
## Understand where your pull request belongs
Trivy is composed of several different repositories that work together:
- [Trivy](https://github.com/aquasecurity/trivy) is the client-side, user-facing, command line tool.
- [vuln-list](https://github.com/aquasecurity/vuln-list) is a vulnerabilities database, aggregated from different sources, and normalized for easy consumption. This of this as the "server" side of the trivy command line tool. **There should be no pull requests to this repo**
- [vuln-list-update](https://github.com/aquasecurity/vuln-list-update) is the code that maintains the vuln-list database.
- [fanal](https://github.com/aquasecurity/fanal) is a library for extracting system information containers. It is being used by Trivy to find testable subjects in the container image.
See [Issues](https://aquasecurity.github.io/trivy/latest/community/contribute/issue/) and [Pull Requests](https://aquasecurity.github.io/trivy/latest/community/contribute/pr/)

View File

@@ -1,9 +1,5 @@
FROM alpine:3.12
RUN addgroup -g 1000 -S appgroup && adduser -u 1000 -S appuser -G appgroup
RUN apk --no-cache add ca-certificates git rpm
FROM alpine:3.18.2
RUN apk --no-cache add ca-certificates git
COPY trivy /usr/local/bin/trivy
COPY contrib/gitlab.tpl contrib/gitlab.tpl
COPY contrib/junit.tpl contrib/junit.tpl
COPY contrib/sarif.tpl contrib/sarif.tpl
USER appuser
COPY contrib/*.tpl contrib/
ENTRYPOINT ["trivy"]

11
Dockerfile.canary Normal file
View File

@@ -0,0 +1,11 @@
FROM alpine:3.18.2
RUN apk --no-cache add ca-certificates git
# binaries were created with GoReleaser
# need to copy binaries from folder with correct architecture
# example architecture folder: dist/trivy_canary_build_linux_arm64/trivy
# GoReleaser adds _v* to the folder name, but only when GOARCH is amd64
ARG TARGETARCH
COPY "dist/trivy_canary_build_linux_${TARGETARCH}*/trivy" /usr/local/bin/trivy
COPY contrib/*.tpl contrib/
ENTRYPOINT ["trivy"]

15
Dockerfile.protoc Normal file
View File

@@ -0,0 +1,15 @@
FROM golang:1.19
# Install protoc (cf. http://google.github.io/proto-lens/installing-protoc.html)
ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip
RUN apt-get update && apt-get install -y unzip
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/*' \
&& rm -f $PROTOC_ZIP
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
ENV TRIVY_PROTOC_CONTAINER=true

View File

@@ -1,69 +0,0 @@
VERSION := $(shell git describe --tags)
LDFLAGS=-ldflags "-s -w -X=main.version=$(VERSION)"
GOPATH=$(shell go env GOPATH)
GOBIN=$(GOPATH)/bin
GOSRC=$(GOPATH)/src
u := $(if $(update),-u)
$(GOBIN)/wire:
GO111MODULE=off go get github.com/google/wire/cmd/wire
.PHONY: wire
wire: $(GOBIN)/wire
wire gen ./pkg/... ./internal/...
.PHONY: mock
mock: $(GOBIN)/mockery
mockery -all -inpkg -case=snake -dir $(DIR)
.PHONY: deps
deps:
go get ${u} -d
go mod tidy
$(GOBIN)/golangci-lint:
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOBIN) v1.21.0
.PHONY: test
test:
go test -v -short -coverprofile=coverage.txt -covermode=atomic ./...
integration/testdata/fixtures/*.tar.gz:
git clone https://github.com/aquasecurity/trivy-test-images.git integration/testdata/fixtures
.PHONY: test-integration
test-integration: integration/testdata/fixtures/*.tar.gz
go test -v -tags=integration ./integration/...
.PHONY: lint
lint: $(GOBIN)/golangci-lint
$(GOBIN)/golangci-lint run
.PHONY: fmt
fmt:
find ./ -name "*.proto" | xargs clang-format -i
.PHONY: build
build:
go build $(LDFLAGS) ./cmd/trivy
.PHONY: protoc
protoc:
find ./rpc/ -name "*.proto" -type f -exec protoc --proto_path=$(GOSRC):. --twirp_out=. --go_out=. {} \;
.PHONY: install
install:
go install $(LDFLAGS) ./cmd/trivy
.PHONY: clean
clean:
rm -rf integration/testdata/fixtures/
$(GOBIN)/labeler:
GO111MODULE=off go get github.com/knqyf263/labeler
.PHONY: label
label: $(GOBIN)/labeler
labeler apply misc/triage/labels.yaml -r aquasecurity/trivy -l 5

2031
README.md

File diff suppressed because it is too large Load Diff

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).

10
aqua.yaml Normal file
View File

@@ -0,0 +1,10 @@
---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
registries:
- type: standard
ref: v3.157.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: tinygo-org/tinygo@v0.27.0
- name: WebAssembly/binaryen@version_112
- name: magefile/mage@v1.14.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 265 135" enable-background="new 0 0 265 135" xml:space="preserve">
<g>
<path fill="#07242D" d="M148.629,103.076v5.928c-4.038,0-7.676-1.454-10.545-3.863c-3.605-3.025-5.894-7.565-5.894-12.638V62.815
h5.894v13.471h10.545v5.966h-10.545v10.395C138.164,98.419,142.84,103.076,148.629,103.076z"/>
<path fill="#07242D" d="M169.65,76.285v5.889c-5.591,0.011-10.143,4.446-10.345,9.984v16.845h-5.908V76.285h5.908v3.735
C162.113,77.689,165.718,76.291,169.65,76.285z"/>
<path fill="#07242D" d="M173.447,68.698v-5.9h5.897v5.9H173.447z M173.447,109.003V76.285h5.897v32.719H173.447z"/>
<path fill="#07242D" d="M215.508,76.285l-16.348,32.719l-16.364-32.719h6.699l9.665,19.32l9.646-19.32L215.508,76.285z"/>
<path fill="#07242D" d="M250.874,76.285c0,0,0,35.771,0,38.135c0,9.136-7.493,16.428-16.37,16.423
c-4.157,0-8.009-1.576-10.934-4.196l4.24-4.24c1.809,1.532,4.143,2.464,6.693,2.459c5.745,0,10.396-4.696,10.396-10.446v-9.141
c-2.85,2.359-6.488,3.724-10.396,3.724c-8.894,0.005-16.384-7.171-16.384-16.372c0-0.194,0-16.345,0-16.345h5.972
c0,0,0.003,15.907,0.003,16.345c0,5.722,4.659,10.451,10.409,10.446c5.745,0,10.396-4.701,10.396-10.446V76.285H250.874z"/>
</g>
<g>
<polygon fill="#FFFFFF" points="65.469,5.431 10.124,37.409 10.125,101.877 65.462,134.109 120.813,101.895 120.813,37.407 "/>
<g>
<path fill="#1904DA" d="M63.957,92.94V79.575c-6.048-2.856-9.846-8.792-9.768-15.27l-12.456-7.193
c-0.783,7.101,0.852,14.447,4.636,20.771C50.545,84.86,56.46,89.923,63.957,92.94z"/>
<path fill="#1904DA" d="M63.957,111.255V95.742c-8.438-3.162-15.089-8.73-19.77-16.553c-4.275-7.141-5.989-15.458-4.842-23.457
l-11.564-6.678C21.14,74.652,36.57,101.186,63.957,111.255z"/>
<path fill="#08B1D5" d="M66.804,95.596v15.649c26.877-10.306,42.715-37.348,36.372-62.1l-11.488,6.693
c1.481,8.635,0.079,16.879-4.065,23.865C83.476,86.697,76.281,92.188,66.804,95.596z"/>
<path fill="#08B1D5" d="M66.804,79.551v13.402c8.456-3.219,14.89-8.239,18.632-14.548c3.675-6.197,5.016-13.512,3.896-21.2
L76.888,64.38C76.826,70.53,73.171,76.032,66.804,79.551z"/>
<path fill="#FFC900" d="M78.53,41.442c5.228,2.549,9.501,6.608,12.373,11.749l11.183-6.458c-0.075-0.106-0.146-0.211-0.211-0.316
c-4.4-7.116-10.209-12.47-17.267-15.913c-19.641-9.576-44.026-2.441-55.772,16.23l11.227,6.481
C48.47,40.151,65.268,34.975,78.53,41.442z"/>
<path fill="#FFC900" d="M65.771,55.646c1.762,0,3.527,0.385,5.182,1.193h0.001c2.175,1.062,3.954,2.75,5.158,4.894L88.7,54.463
c-2.618-4.7-6.516-8.409-11.285-10.735c-12.078-5.888-27.409-1.16-35.147,10.76l12.525,7.229
C57.397,57.836,61.572,55.646,65.771,55.646z"/>
<path fill="#08B1D5" d="M66.804,130.848l51.828-30.205V40.14l-13.177,7.677c7.242,26.586-9.654,55.513-38.651,66.142V130.848z"/>
<path fill="#1904DA" d="M25.5,47.738l-13.196-7.621v60.509l51.653,30.22v-16.883C34.902,103.736,18.087,74.773,25.5,47.738z"/>
<path fill="#FFC900" d="M85.722,28.218c7.498,3.656,13.661,9.329,18.316,16.859c0.074,0.12,0.164,0.245,0.263,0.376l13.056-7.539
L65.469,7.948l-51.9,29.973l13.061,7.54C39.042,25.644,64.896,18.062,85.722,28.218z"/>
<path fill="#FF0036" d="M74.264,64.806c0.001-0.014,0.022-0.508-0.015-1.301c-0.104-0.324-1.328-2.715-4.385-4.383
c-2.089-1.139-4.769-1.27-7.357-0.362c-2.536,0.891-4.688,2.664-5.922,4.873c-0.015,0.192-0.044,0.647-0.022,1.173
c0.167,4.129,2.721,9.743,7.931,12.311l0.802,0.383l0.696-0.372C71.055,74.294,74.07,69.803,74.264,64.806z"/>
</g>
</g>
<g>
<path fill="#07242D" d="M149.768,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
s8.789,3.943,8.789,8.789V48.152z M140.979,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
C146.199,36.485,143.858,34.143,140.979,34.143z"/>
<path fill="#07242D" d="M208.745,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
c4.846,0,8.789,3.943,8.789,8.789V48.152z M199.956,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
C205.176,36.485,202.835,34.143,199.956,34.143z"/>
<path fill="#07242D" d="M180.296,48.156c-4.848,0-8.793-3.944-8.793-8.793v-8.248h3.571v8.248c0,2.879,2.343,5.222,5.222,5.222
c2.879,0,5.222-2.343,5.222-5.222v-8.248h3.571v8.248C189.089,44.211,185.144,48.156,180.296,48.156z"/>
<path fill="#07242D" d="M160.636,30.574c-4.846,0-8.789,3.943-8.789,8.789c0,4.846,3.943,8.789,8.789,8.789l3.569-3.569h-3.569
c-2.878,0-5.22-2.342-5.22-5.22c0-2.878,2.342-5.22,5.22-5.22c2.878,0,5.22,2.342,5.22,5.22V56.54h3.569V39.363
C169.425,34.516,165.482,30.574,160.636,30.574z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@@ -0,0 +1,202 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 500 524" enable-background="new 0 0 500 524" xml:space="preserve">
<g display="none">
<g display="inline">
<path fill="#07242D" d="M-483.763,450.803h-11.559l-22.557-22.807c-0.919,0.114-1.853,0.174-2.802,0.174v22.632h-8.238v-63.931
h8.239c0,0-0.016,33.158,0,33.158c4.013,0,7.684-1.656,10.29-4.32l9.86-10.073h11.814l-16.032,15.918
c-1.42,1.421-3.031,2.655-4.787,3.659L-483.763,450.803z"/>
<path fill="#07242D" d="M-438.316,405.517v22.819c0,0,0,0.033,0,0.049c0,12.39-10.039,22.418-22.429,22.418
c-12.389,0-22.421-10.059-22.421-22.448c0-0.017,0-22.837,0-22.837h7.989v22.819c0,7.967,6.466,14.457,14.433,14.457
c7.966,0,14.424-6.491,14.424-14.457v-22.819H-438.316z"/>
<path fill="#07242D" d="M-385.244,428.166c0,12.501-10.133,22.636-22.636,22.636c-5.485,0-10.514-1.95-14.431-5.196v5.196h-8.218
c0.005-0.516,0.005-63.931,0.005-63.931h8.217l-0.004,23.854c3.918-3.246,8.947-5.196,14.432-5.196
C-395.377,405.529-385.242,415.664-385.244,428.166z M-393.437,428.166c0-7.976-6.466-14.441-14.442-14.441
c-7.793,0-14.443,6.329-14.443,14.418c0,8.089,6.649,14.464,14.443,14.464C-399.903,442.607-393.437,436.142-393.437,428.166z"/>
<path fill="#07242D" d="M-335.539,431.11h-36.518c1.375,6.517,7.157,11.435,14.075,11.435c4.514,0,8.538-2.095,11.172-5.362h9.577
c-3.496,8.008-11.475,13.619-20.748,13.619c-12.489,0-22.644-10.173-22.644-22.676c0-12.503,10.155-22.608,22.644-22.608
C-344.426,405.411-333.664,417.688-335.539,431.11z M-344.611,422.85c-2.103-5.316-7.296-9.06-13.371-9.06
c-6.076,0-11.275,3.746-13.382,9.06H-344.611z"/>
<path fill="#07242D" d="M-306.194,420.895v7.548h-23.302v-7.548H-306.194z"/>
<path fill="#07242D" d="M-252.987,428.166c0,12.501-10.133,22.636-22.636,22.636c-5.485,0-10.514-1.95-14.431-5.196v5.196h-8.218
c0.005-0.516,0.005-63.931,0.005-63.931h8.218l-0.004,23.854c3.918-3.246,8.946-5.196,14.431-5.196
C-263.12,405.529-252.985,415.664-252.987,428.166z M-261.181,428.166c0-7.976-6.467-14.441-14.442-14.441
c-7.794,0-14.443,6.329-14.443,14.418c0,8.089,6.649,14.464,14.443,14.464C-267.647,442.607-261.181,436.142-261.181,428.166z"/>
<path fill="#07242D" d="M-203.283,431.11h-36.518c1.375,6.517,7.157,11.435,14.075,11.435c4.514,0,8.538-2.095,11.172-5.362h9.577
c-3.496,8.008-11.475,13.619-20.748,13.619c-12.489,0-22.644-10.173-22.644-22.676c0-12.503,10.155-22.608,22.644-22.608
C-212.17,405.411-201.408,417.688-203.283,431.11z M-212.355,422.85c-2.103-5.316-7.296-9.06-13.371-9.06
c-6.076,0-11.275,3.746-13.382,9.06H-212.355z"/>
<path fill="#07242D" d="M-151.113,428.114c0,15.871,0,22.688,0,22.688h-8.262c0,0,0-14.878,0-22.688
c0-8.095-6.591-14.327-14.363-14.327c-7.772,0-14.393,6.163-14.393,14.327c0,7.814,0,22.688,0,22.688h-8.26v-45.285
c0,0,3.539,0,8.26,0v5.101c0,0,5.421-5.101,14.393-5.101C-163.095,405.517-151.113,413.789-151.113,428.114z"/>
<path fill="#07242D" d="M-112.598,438.373l5.799,5.798c-4.098,4.097-9.758,6.632-16.01,6.632c-6.252,0-11.912-2.534-16.01-6.632
c-4.097-4.098-6.632-9.758-6.632-16.01s2.534-11.912,6.632-16.01c4.098-4.097,9.758-6.632,16.01-6.632
c6.252,0,11.912,2.534,16.01,6.632l-5.799,5.799c-2.613-2.615-6.224-4.231-10.212-4.231c-3.988,0-7.599,1.617-10.212,4.231
c-2.614,2.613-4.23,6.224-4.23,10.212s1.616,7.599,4.23,10.213c2.613,2.613,6.224,4.229,10.212,4.229
C-118.821,442.602-115.211,440.986-112.598,438.373z"/>
<path fill="#07242D" d="M-55.678,428.174c0,15.827,0,22.626,0,22.626h-8.239c0,0,0-14.838,0-22.626
c0-8.072-6.575-14.287-14.324-14.287c-7.751,0-14.353,6.146-14.353,14.287c0,7.793,0,22.626,0,22.626h-8.238v-63.929h8.238v23.856
c0,0,5.405-5.086,14.353-5.086C-67.626,405.641-55.678,413.889-55.678,428.174z"/>
</g>
<g display="inline">
<path fill="#07242D" d="M186.582,442.579v8.203c-5.588,0-10.623-2.012-14.594-5.346c-4.989-4.186-8.157-10.469-8.157-17.489
v-41.085h8.157v18.642h14.594v8.257h-14.594v14.386C172.1,436.134,178.571,442.579,186.582,442.579z"/>
<path fill="#07242D" d="M215.674,405.503v8.149c-7.739,0.015-14.037,6.152-14.317,13.818v23.312h-8.176v-45.279h8.176v5.169
C205.243,407.446,210.232,405.51,215.674,405.503z"/>
<path fill="#07242D" d="M220.928,395.003v-8.165h8.161v8.165H220.928z M220.928,450.782v-45.279h8.161v45.279H220.928z"/>
<path fill="#07242D" d="M279.137,405.503l-22.624,45.279l-22.647-45.279h9.271l13.376,26.737l13.349-26.737H279.137z"/>
<path fill="#07242D" d="M328.08,405.503c0,0,0,49.504,0,52.776c0,12.643-10.369,22.736-22.655,22.728
c-5.753,0-11.084-2.181-15.131-5.807l5.868-5.868c2.504,2.12,5.734,3.41,9.263,3.403c7.95,0,14.386-6.498,14.386-14.456v-12.651
c-3.944,3.264-8.979,5.154-14.386,5.154c-12.309,0.008-22.674-9.924-22.674-22.659c0-0.269,0-22.62,0-22.62h8.265
c0,0,0.004,22.014,0.004,22.62c0,7.919,6.448,14.463,14.406,14.456c7.95,0,14.386-6.506,14.386-14.456v-22.62H328.08z"/>
</g>
<g display="inline">
<path fill="#07242D" d="M1186.898,438.384c-0.411,4.687-4.656,12.67-15.302,12.67c-10.092,0-16.135-6.761-16.135-6.761
l5.797-5.801c4.906,4.664,10.338,4.372,10.338,4.372c3.473-0.238,6.258-2.643,6.469-5.471c0.242-3.235-2.009-5.486-6.469-6.124
c-2.098-0.307-7.184-0.791-11.36-4.533c-1.36-1.222-6.489-6.577-2.217-14.191c0.834-1.491,4.556-6.769,13.577-6.769
c0,0,7.434-0.53,14.311,5.086l-5.866,5.863c-1.16-0.96-4.46-2.904-8.444-2.881c-7.207,0.046-7.007,4.011-7.007,4.011
c0.061,3.166,2.874,4.864,7.007,5.409C1185.672,425.114,1187.309,433.743,1186.898,438.384z"/>
<path fill="#07242D" d="M1215.419,442.848v8.206c-5.59,0-10.626-2.013-14.599-5.348c-4.99-4.188-8.16-10.473-8.16-17.495v-41.099
h8.16v18.648h14.599v8.26h-14.599v14.391C1200.932,436.401,1207.405,442.848,1215.419,442.848z"/>
<path fill="#07242D" d="M1263.522,428.372v22.682h-22.705c-0.5,0-0.999-0.015-1.495-0.054c-6.431-0.423-12.128-3.527-15.985-8.214
c-3.289-4.003-5.171-8.928-5.186-14.414c0.526-25.548,35.106-31.264,44.03-7.699
C1263.068,423.132,1263.522,425.76,1263.522,428.372z M1255.131,428.372c0.054-12.824-15.563-19.132-24.433-10.135l-0.004-0.008
c-2.609,2.605-4.226,6.17-4.226,10.142c0,7.937,6.435,14.399,14.368,14.399c3.976,0,14.295,0,14.295,0
S1255.131,432.352,1255.131,428.372z"/>
<path fill="#07242D" d="M1293.898,405.76v8.152c-7.741,0.015-14.042,6.154-14.322,13.823v23.319h-8.179V405.76h8.179v5.171
C1283.464,407.704,1288.454,405.767,1293.898,405.76z"/>
<path fill="#07242D" d="M1344.448,428.411c0,12.509-10.135,22.643-22.639,22.643c-5.486,0-10.515-1.952-14.433-5.194v5.194h-8.221
c0.008-0.515,0.008-63.942,0.008-63.942h8.217l-0.004,23.857c3.919-3.25,8.947-5.202,14.433-5.202
C1334.313,405.767,1344.452,415.91,1344.448,428.411z M1336.254,428.411c0-7.975-6.466-14.445-14.445-14.445
c-7.795,0-14.445,6.331-14.445,14.422c0,8.091,6.65,14.468,14.445,14.468C1329.788,442.856,1336.254,436.394,1336.254,428.411z"/>
<path fill="#07242D" d="M1394.394,428.411c0,12.509-10.15,22.643-22.643,22.643s-22.651-10.135-22.651-22.643
s10.157-22.651,22.651-22.651S1394.394,415.91,1394.394,428.411z M1386.127,428.411c0-7.937-6.431-14.376-14.376-14.376
c-7.941,0-14.387,6.431-14.387,14.376s6.446,14.383,14.387,14.383C1379.696,442.794,1386.127,436.355,1386.127,428.411z"/>
<path fill="#07242D" d="M1444.414,428.372v22.682h-22.705c-0.499,0-0.999-0.015-1.494-0.054
c-6.431-0.423-12.128-3.527-15.985-8.214c-3.289-4.003-5.171-8.928-5.186-14.414c0.526-25.548,35.106-31.264,44.03-7.699
C1443.961,423.132,1444.414,425.76,1444.414,428.372z M1436.024,428.372c0.054-12.824-15.563-19.132-24.433-10.135l-0.004-0.008
c-2.609,2.605-4.226,6.17-4.226,10.142c0,7.937,6.435,14.399,14.368,14.399c3.976,0,14.295,0,14.295,0
S1436.024,432.352,1436.024,428.372z"/>
<path fill="#07242D" d="M1474.791,405.76v8.152c-7.741,0.015-14.042,6.154-14.322,13.823v23.319h-8.179V405.76h8.179v5.171
C1464.356,407.704,1469.347,405.767,1474.791,405.76z"/>
<path fill="#07242D" d="M1521.556,451.031h-8.214v-5.194c-3.919,3.242-8.951,5.194-14.43,5.194
c-12.501,0-22.635-10.127-22.635-22.628s10.135-22.636,22.635-22.636c5.478,0,10.511,1.952,14.43,5.194l0.008-23.85h8.221
C1521.572,387.112,1521.556,450.516,1521.556,451.031z M1513.35,428.38c0-8.091-6.646-14.422-14.437-14.422
c-7.975,0-14.445,6.469-14.445,14.445s6.469,14.437,14.445,14.437C1506.704,442.84,1513.35,436.471,1513.35,428.38z"/>
</g>
<g display="inline">
<path fill="#07242D" d="M1711.171,438.276l5.802,5.802c-4.1,4.096-9.763,6.632-16.014,6.632c-6.255,0-11.918-2.536-16.018-6.632
c-4.1-4.103-6.635-9.759-6.635-16.014s2.536-11.918,6.635-16.022c4.1-4.096,9.763-6.632,16.018-6.632
c6.251,0,11.915,2.536,16.014,6.632l-5.802,5.802c-2.613-2.613-6.224-4.234-10.213-4.234c-3.992,0-7.604,1.621-10.216,4.234
c-2.617,2.613-4.234,6.224-4.234,10.22c0,3.988,1.618,7.6,4.234,10.213c2.613,2.613,6.224,4.234,10.216,4.234
C1704.947,442.511,1708.559,440.889,1711.171,438.276z"/>
<path fill="#07242D" d="M1722.967,450.71v-63.95h8.241v63.95H1722.967z"/>
<path fill="#07242D" d="M1783.282,428.064c0,12.51-10.151,22.646-22.646,22.646c-12.495,0-22.654-10.136-22.654-22.646
s10.159-22.654,22.654-22.654C1773.131,405.41,1783.282,415.561,1783.282,428.064z M1775.013,428.064
c0-7.938-6.432-14.378-14.378-14.378c-7.942,0-14.389,6.432-14.389,14.378c0,7.946,6.447,14.385,14.389,14.385
C1768.581,442.449,1775.013,436.01,1775.013,428.064z"/>
<path fill="#07242D" d="M1833.833,405.41v22.823c0,0,0,0.038,0,0.054c0,12.395-10.04,22.423-22.435,22.423
c-12.395,0-22.427-10.059-22.427-22.454c0-0.015,0-22.846,0-22.846h7.992v22.823c0,7.976,6.466,14.462,14.435,14.462
c7.969,0,14.431-6.486,14.431-14.462V405.41H1833.833z"/>
<path fill="#07242D" d="M1884.777,450.687h-8.218v-5.195c-3.915,3.243-8.945,5.195-14.431,5.195
c-12.503,0-22.634-10.128-22.634-22.631c0-12.503,10.132-22.638,22.634-22.638c5.487,0,10.516,1.952,14.431,5.195l0.011-23.852
h8.219C1884.789,386.76,1884.773,450.172,1884.777,450.687z M1876.574,428.033c0-8.092-6.651-14.424-14.447-14.424
c-7.973,0-14.443,6.47-14.443,14.447c0,7.976,6.466,14.439,14.443,14.439C1869.923,442.495,1876.574,436.125,1876.574,428.033z"/>
<path fill="#07242D" d="M1922.865,438.038c-0.411,4.687-4.657,12.672-15.303,12.672c-10.094,0-16.137-6.762-16.137-6.762
l5.798-5.802c4.906,4.664,10.339,4.372,10.339,4.372c3.473-0.238,6.259-2.643,6.47-5.471c0.242-3.235-2.009-5.487-6.47-6.124
c-2.098-0.307-7.185-0.792-11.361-4.534c-1.36-1.222-6.489-6.578-2.217-14.193c0.834-1.491,4.557-6.77,13.578-6.77
c0,0,7.435-0.53,14.312,5.087l-5.867,5.863c-1.16-0.961-4.461-2.905-8.445-2.882c-7.208,0.046-7.008,4.011-7.008,4.011
c0.062,3.166,2.874,4.864,7.008,5.41C1921.639,424.767,1923.276,433.397,1922.865,438.038z"/>
<path fill="#07242D" d="M1975.107,428.041c0,12.526-10.151,22.73-22.661,22.73c-5.471,0-10.493-1.952-14.416-5.195v35.371h-8.276
V405.41h8.276v5.156c3.923-3.22,8.945-5.156,14.416-5.156C1964.956,405.41,1975.107,415.523,1975.107,428.041z M1966.831,428.041
c0-7.953-6.432-14.347-14.385-14.347s-14.416,6.393-14.416,14.347s6.463,14.462,14.416,14.462S1966.831,435.994,1966.831,428.041z
"/>
<path fill="#07242D" d="M1981.877,450.71v-63.95h8.245v63.95H1981.877z"/>
<path fill="#07242D" d="M2042.192,428.064c0,12.51-10.151,22.646-22.646,22.646c-12.495,0-22.654-10.136-22.654-22.646
s10.159-22.654,22.654-22.654C2032.041,405.41,2042.192,415.561,2042.192,428.064z M2033.916,428.064
c0-7.938-6.432-14.378-14.37-14.378c-7.946,0-14.393,6.432-14.393,14.378c0,7.946,6.447,14.385,14.393,14.385
C2027.484,442.449,2033.916,436.01,2033.916,428.064z"/>
<path fill="#07242D" d="M2049.016,394.906v-8.168h8.168v8.168H2049.016z M2049.016,450.71v-45.3h8.168v45.3H2049.016z"/>
<path fill="#07242D" d="M2087.737,442.503v8.207c-5.594,0-10.627-2.013-14.6-5.348c-4.987-4.188-8.161-10.474-8.161-17.497V386.76
h8.161v18.65h14.6v8.261h-14.6v14.393C2073.252,436.056,2079.722,442.503,2087.737,442.503z"/>
</g>
<g display="inline">
<path fill="#07242D" d="M690.837,442.596v8.206c-5.59,0-10.626-2.013-14.599-5.348c-4.99-4.188-8.16-10.473-8.16-17.495V386.86
h8.16v18.648h14.599v8.26h-14.599v14.391C676.35,436.15,682.823,442.596,690.837,442.596z"/>
<path fill="#07242D" d="M719.939,405.508v8.152c-7.737,0.015-14.042,6.154-14.322,13.823v23.319h-8.179v-45.294h8.179v5.171
C709.504,407.452,714.495,405.516,719.939,405.508z"/>
<path fill="#07242D" d="M766.789,428.12v22.682h-22.705c-0.499,0-0.999-0.015-1.494-0.054c-6.431-0.423-12.128-3.527-15.985-8.214
c-3.289-4.003-5.171-8.928-5.183-14.414c0.523-25.548,35.102-31.264,44.026-7.699C766.335,422.88,766.789,425.508,766.789,428.12z
M758.398,428.12c0.054-12.824-15.563-19.132-24.433-10.135l-0.004-0.008c-2.609,2.605-4.226,6.17-4.226,10.142
c0,7.937,6.435,14.399,14.368,14.399c3.976,0,14.295,0,14.295,0S758.398,432.101,758.398,428.12z"/>
<path fill="#07242D" d="M805.36,438.37l5.801,5.801c-4.099,4.095-9.762,6.631-16.016,6.631c-6.254,0-11.913-2.536-16.012-6.631
c-4.099-4.103-6.631-9.766-6.631-16.02c0-6.247,2.532-11.909,6.631-16.012c4.099-4.095,9.758-6.631,16.012-6.631
c6.254,0,11.917,2.536,16.016,6.631l-5.801,5.801c-2.612-2.612-6.224-4.234-10.215-4.234c-3.988,0-7.599,1.621-10.211,4.234
c-2.616,2.612-4.234,6.224-4.234,10.211c0,3.995,1.617,7.607,4.234,10.219c2.612,2.612,6.224,4.234,10.211,4.234
C799.136,442.604,802.747,440.983,805.36,438.37z"/>
<path fill="#07242D" d="M858.664,431.109h-36.527c1.375,6.516,7.161,11.433,14.08,11.433c4.514,0,8.54-2.098,11.172-5.363h9.581
c-3.5,8.014-11.479,13.623-20.753,13.623c-12.493,0-22.647-10.173-22.647-22.682c0-12.501,10.154-22.612,22.647-22.612
C849.774,405.4,860.539,417.679,858.664,431.109z M849.59,422.842c-2.105-5.317-7.295-9.059-13.373-9.059
s-11.276,3.742-13.385,9.059H849.59z"/>
<path fill="#07242D" d="M908.514,431.109h-36.527c1.375,6.516,7.161,11.433,14.08,11.433c4.514,0,8.54-2.098,11.172-5.363h9.581
c-3.5,8.014-11.479,13.623-20.753,13.623c-12.493,0-22.647-10.173-22.647-22.682c0-12.501,10.154-22.612,22.647-22.612
C899.625,405.4,910.389,417.679,908.514,431.109z M899.44,422.842c-2.105-5.317-7.295-9.059-13.373-9.059
s-11.276,3.742-13.385,9.059H899.44z"/>
</g>
</g>
<g>
<path fill="#07242D" d="M186.351,471.553v8.229c-5.606,0-10.656-2.019-14.639-5.363c-5.005-4.199-8.182-10.502-8.182-17.544v-41.21
h8.182v18.699h14.639v8.282h-14.639v14.43C171.824,465.089,178.316,471.553,186.351,471.553z"/>
<path fill="#07242D" d="M215.533,434.363v8.175c-7.762,0.016-14.08,6.172-14.361,13.86v23.384h-8.202v-45.419h8.202v5.185
C205.069,436.313,210.074,434.371,215.533,434.363z"/>
<path fill="#07242D" d="M220.803,423.832v-8.191h8.186v8.191H220.803z M220.803,479.782v-45.419h8.186v45.419H220.803z"/>
<path fill="#07242D" d="M279.191,434.363l-22.694,45.419l-22.716-45.419h9.3l13.417,26.82l13.39-26.82H279.191z"/>
<path fill="#07242D" d="M328.286,434.363c0,0,0,49.656,0,52.938c0,12.682-10.402,22.805-22.725,22.798
c-5.771,0-11.118-2.188-15.178-5.824l5.887-5.887c2.512,2.126,5.751,3.42,9.291,3.413c7.975,0,14.431-6.519,14.431-14.5v-12.689
c-3.956,3.275-9.006,5.17-14.431,5.17c-12.346,0.007-22.743-9.954-22.743-22.728c0-0.27,0-22.69,0-22.69h8.291
c0,0,0.004,22.082,0.004,22.69c0,7.944,6.468,14.508,14.45,14.5c7.975,0,14.431-6.526,14.431-14.5v-22.691H328.286z"/>
</g>
<g>
<polygon fill="#FFFFFF" points="250.554,44.159 116.876,121.396 116.877,277.11 250.537,354.962 384.229,277.154 384.229,121.392
"/>
<g>
<path fill="#1904DA" d="M246.902,255.524v-32.282c-14.609-6.898-23.783-21.236-23.594-36.882l-30.086-17.374
c-1.892,17.15,2.057,34.896,11.198,50.171C214.507,236.009,228.793,248.237,246.902,255.524z"/>
<path fill="#1904DA" d="M246.902,299.761v-37.468c-20.381-7.638-36.445-21.086-47.752-39.981
c-10.325-17.249-14.466-37.337-11.695-56.657l-27.931-16.129C143.482,211.352,180.751,275.442,246.902,299.761z"/>
<path fill="#08B1D5" d="M253.779,261.938v37.797c64.918-24.892,103.171-90.209,87.852-149.994l-27.747,16.165
c3.578,20.856,0.191,40.77-9.818,57.644C294.046,240.446,276.67,253.707,253.779,261.938z"/>
<path fill="#08B1D5" d="M253.779,223.185v32.371c20.424-7.774,35.964-19.9,45.004-35.138c8.877-14.969,12.116-32.637,9.411-51.205
l-30.06,17.33C277.985,201.395,269.156,214.685,253.779,223.185z"/>
<path fill="#FFC900" d="M282.1,131.138c12.628,6.157,22.948,15.961,29.885,28.378l27.012-15.598
c-0.182-0.255-0.351-0.51-0.509-0.764c-10.628-17.188-24.658-30.12-41.707-38.435c-47.439-23.13-106.339-5.896-134.71,39.2
l27.117,15.654C209.496,128.018,250.069,115.518,282.1,131.138z"/>
<path fill="#FFC900" d="M251.284,165.445c4.256,0,8.519,0.931,12.516,2.881h0.002c5.253,2.564,9.549,6.643,12.458,11.821
l30.404-17.558c-6.323-11.352-15.738-20.312-27.257-25.93c-29.172-14.223-66.203-2.802-84.893,25.99l30.251,17.46
C231.056,170.735,241.141,165.445,251.284,165.445z"/>
<path fill="#08B1D5" d="M253.779,347.086l125.184-72.957V127.993l-31.828,18.542c17.491,64.215-23.319,134.084-93.356,159.757
V347.086z"/>
<path fill="#1904DA" d="M154.014,146.345l-31.873-18.406v146.151l124.761,72.993v-40.779
C176.723,281.599,136.109,211.643,154.014,146.345z"/>
<path fill="#FFC900" d="M299.471,99.198c18.111,8.832,32.995,22.533,44.241,40.722c0.179,0.289,0.397,0.592,0.636,0.908
l31.536-18.21l-125.33-72.378l-125.358,72.395l31.548,18.211C186.722,92.98,249.169,74.667,299.471,99.198z"/>
<path fill="#FF0036" d="M271.797,187.57c0.002-0.035,0.052-1.226-0.036-3.143c-0.251-0.783-3.208-6.558-10.592-10.586
c-5.045-2.751-11.518-3.068-17.769-0.874c-6.124,2.152-11.322,6.434-14.303,11.769c-0.036,0.464-0.105,1.563-0.052,2.832
c0.404,9.974,6.573,23.534,19.156,29.736l1.938,0.925l1.682-0.899C264.046,210.487,271.328,199.641,271.797,187.57z"/>
</g>
</g>
<g>
<path fill="#07242D" d="M186.846,398.474H175.2c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
s11.646,5.224,11.646,11.646V398.474z M175.2,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916h6.916
v-6.916C182.117,383.015,179.014,379.912,175.2,379.912z"/>
<path fill="#07242D" d="M264.991,398.474h-11.646c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
c6.421,0,11.646,5.224,11.646,11.646V398.474z M253.345,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916
h6.916v-6.916C260.261,383.015,257.159,379.912,253.345,379.912z"/>
<path fill="#07242D" d="M227.295,398.479c-6.424,0-11.651-5.226-11.651-11.651V375.9h4.731v10.928c0,3.815,3.104,6.919,6.919,6.919
c3.815,0,6.919-3.104,6.919-6.919V375.9h4.731v10.928C238.946,393.253,233.719,398.479,227.295,398.479z"/>
<path fill="#07242D" d="M201.245,375.183c-6.421,0-11.645,5.224-11.645,11.646c0,6.421,5.224,11.646,11.645,11.646l4.729-4.729
h-4.729c-3.814,0-6.916-3.103-6.916-6.916c0-3.814,3.103-6.916,6.916-6.916c3.814,0,6.916,3.103,6.916,6.916v22.76h4.729v-22.76
C212.891,380.407,207.666,375.183,201.245,375.183z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 265 135" enable-background="new 0 0 265 135" xml:space="preserve">
<g display="none">
<polygon display="inline" fill="#FFFFFF" points="65.469,9.61 12.669,40.117 12.669,101.621 65.463,132.371 118.268,101.639
118.268,40.115 "/>
<g display="inline">
<path fill="#08B1D5" d="M64.511,80.035c-5.972-2.687-9.502-8.433-9.313-14.534l-12.765-7.371c-0.952,7.062,0.569,14.449,4.4,20.85
c4.078,6.813,9.966,11.887,17.678,14.825V80.035L64.511,80.035z"/>
<path fill="#08B1D5" d="M64.511,111.257V95.432c-8.26-3.017-14.588-8.448-18.931-15.703c-4.108-6.864-5.671-14.819-4.507-22.384
l-11.864-6.851C22.412,75.299,37.662,101.72,64.511,111.257z"/>
<path fill="#0D819B" d="M66.259,95.288v15.969c26.352-9.758,42.17-36.132,35.489-60.682l-11.8,6.874
c1.473,8.16,0.189,16.115-3.759,22.77C82.134,87.057,75.052,92.189,66.259,95.288z"/>
<path fill="#0D819B" d="M75.879,65.569c0.053,5.924-3.429,11.136-9.62,14.466v13.769c8.227-2.999,14.873-7.918,18.675-14.329
c3.681-6.207,4.934-13.613,3.671-21.243L75.879,65.569z"/>
<path fill="#F69421" d="M77.717,44.4c4.977,2.427,9.031,6.315,11.724,11.244c0.035,0.065,0.069,0.132,0.104,0.198l11.574-6.684
c-0.184-0.232-0.361-0.466-0.506-0.701c-4.246-6.868-9.855-12.036-16.673-15.361c-19.245-9.385-42.827-2.309-54.094,16.087
l11.546,6.665C49.232,43.242,65.013,38.204,77.717,44.4z"/>
<path fill="#F69421" d="M70.489,59.089c2.06,1.005,3.731,2.627,4.832,4.692c0.037,0.07,0.07,0.143,0.105,0.214l12.854-7.423
c-0.04-0.076-0.079-0.153-0.12-0.228c-2.546-4.662-6.379-8.339-11.082-10.632c-12.018-5.861-26.965-1.08-34.421,10.866
l12.783,7.379C58.771,58.613,65.217,56.518,70.489,59.089z"/>
<path fill="#0D819B" d="M116.672,41.881l-13.621,7.936c7.185,25.544-9.291,53.076-36.791,62.992v17.294l50.413-29.381V41.881z"/>
<path fill="#08B1D5" d="M14.265,41.864v58.842l50.245,29.397v-17.294C36.51,103.127,20.607,75.545,27.905,49.74l-13.001-7.508
L14.265,41.864z"/>
<path fill="#F69421" d="M14.987,40.606l1.484,0.857l12.109,6.989C40.23,29.398,64.649,22.066,84.579,31.784
c7.069,3.448,12.881,8.799,17.274,15.904c0.139,0.225,0.333,0.472,0.543,0.731l13.542-7.82l-50.47-29.146L14.987,40.606z"/>
<path fill="#F0DF36" d="M66.202,78.433c4.968-2.778,7.95-7.226,8.141-12.159c0,0,0.022-0.489-0.015-1.283
c-0.007-0.163-1.102-2.766-4.435-4.583c-4.476-2.441-10.828-0.093-13.372,4.583c0,0-0.061,0.574-0.033,1.283
c0.182,4.483,2.945,9.749,7.836,12.159l0.991,0.473L66.202,78.433z"/>
</g>
</g>
<g>
<path fill="#FFFFFF" d="M148.629,103.076v5.928c-4.038,0-7.676-1.454-10.545-3.863c-3.605-3.025-5.894-7.565-5.894-12.638V62.815
h5.894v13.471h10.545v5.966h-10.545v10.395C138.164,98.419,142.84,103.076,148.629,103.076z"/>
<path fill="#FFFFFF" d="M169.65,76.285v5.889c-5.591,0.011-10.143,4.446-10.345,9.984v16.845h-5.908V76.285h5.908v3.735
C162.113,77.689,165.718,76.291,169.65,76.285z"/>
<path fill="#FFFFFF" d="M173.447,68.698v-5.9h5.897v5.9H173.447z M173.447,109.003V76.285h5.897v32.719H173.447z"/>
<path fill="#FFFFFF" d="M215.508,76.285l-16.348,32.719l-16.364-32.719h6.699l9.665,19.32l9.646-19.32L215.508,76.285z"/>
<path fill="#FFFFFF" d="M250.874,76.285c0,0,0,35.771,0,38.135c0,9.136-7.493,16.428-16.37,16.423
c-4.157,0-8.009-1.576-10.934-4.196l4.24-4.24c1.809,1.532,4.143,2.464,6.693,2.459c5.745,0,10.396-4.696,10.396-10.446v-9.141
c-2.85,2.359-6.488,3.724-10.396,3.724c-8.894,0.005-16.384-7.171-16.384-16.372c0-0.194,0-16.345,0-16.345h5.972
c0,0,0.003,15.907,0.003,16.345c0,5.722,4.659,10.451,10.409,10.446c5.745,0,10.396-4.701,10.396-10.446V76.285H250.874z"/>
</g>
<g>
<polygon fill="#FFFFFF" points="65.469,5.431 10.124,37.409 10.125,101.877 65.462,134.109 120.813,101.895 120.813,37.407 "/>
<g>
<path fill="#1904DA" d="M63.957,92.94V79.575c-6.048-2.856-9.846-8.792-9.768-15.27l-12.456-7.193
c-0.783,7.101,0.852,14.447,4.636,20.771C50.545,84.86,56.46,89.923,63.957,92.94z"/>
<path fill="#1904DA" d="M63.957,111.255V95.742c-8.438-3.162-15.089-8.73-19.77-16.553c-4.275-7.141-5.989-15.458-4.842-23.457
l-11.564-6.678C21.14,74.652,36.57,101.186,63.957,111.255z"/>
<path fill="#08B1D5" d="M66.804,95.596v15.649c26.877-10.306,42.715-37.348,36.372-62.1l-11.488,6.693
c1.481,8.635,0.079,16.879-4.065,23.865C83.476,86.697,76.281,92.188,66.804,95.596z"/>
<path fill="#08B1D5" d="M66.804,79.551v13.402c8.456-3.219,14.89-8.239,18.632-14.548c3.675-6.197,5.016-13.512,3.896-21.2
L76.888,64.38C76.826,70.53,73.171,76.032,66.804,79.551z"/>
<path fill="#FFC900" d="M78.53,41.442c5.228,2.549,9.501,6.608,12.373,11.749l11.183-6.458c-0.075-0.105-0.146-0.211-0.211-0.316
c-4.4-7.116-10.209-12.47-17.267-15.913c-19.641-9.576-44.026-2.441-55.772,16.23l11.227,6.481
C48.47,40.15,65.268,34.975,78.53,41.442z"/>
<path fill="#FFC900" d="M65.771,55.646c1.762,0,3.527,0.385,5.182,1.193h0.001c2.175,1.062,3.954,2.75,5.158,4.894L88.7,54.463
c-2.618-4.7-6.516-8.409-11.285-10.735c-12.078-5.888-27.409-1.16-35.147,10.76l12.525,7.229
C57.397,57.836,61.572,55.646,65.771,55.646z"/>
<path fill="#08B1D5" d="M66.804,130.848l51.828-30.205V40.14l-13.177,7.677c7.242,26.586-9.654,55.513-38.651,66.142V130.848z"/>
<path fill="#1904DA" d="M25.5,47.738l-13.196-7.621v60.509l51.653,30.22v-16.883C34.902,103.736,18.087,74.773,25.5,47.738z"/>
<path fill="#FFC900" d="M85.722,28.218c7.498,3.656,13.661,9.329,18.316,16.859c0.074,0.12,0.164,0.245,0.263,0.376l13.056-7.539
L65.469,7.948l-51.9,29.973l13.061,7.54C39.042,25.644,64.896,18.062,85.722,28.218z"/>
<path fill="#FF0036" d="M74.264,64.806c0.001-0.014,0.022-0.508-0.015-1.301c-0.104-0.324-1.328-2.715-4.385-4.383
c-2.089-1.139-4.769-1.27-7.357-0.362c-2.536,0.891-4.688,2.664-5.922,4.873c-0.015,0.192-0.044,0.647-0.022,1.173
c0.167,4.129,2.721,9.743,7.931,12.311l0.802,0.383l0.696-0.372C71.055,74.294,74.07,69.803,74.264,64.806z"/>
</g>
</g>
<g>
<path fill="#FFFFFF" d="M149.768,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
s8.789,3.943,8.789,8.789V48.152z M140.979,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
C146.199,36.485,143.858,34.143,140.979,34.143z"/>
<path fill="#FFFFFF" d="M208.745,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
c4.846,0,8.789,3.943,8.789,8.789V48.152z M199.956,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
C205.176,36.485,202.835,34.143,199.956,34.143z"/>
<path fill="#FFFFFF" d="M180.296,48.156c-4.848,0-8.793-3.944-8.793-8.793v-8.248h3.571v8.248c0,2.879,2.343,5.222,5.222,5.222
c2.879,0,5.222-2.343,5.222-5.222v-8.248h3.571v8.248C189.089,44.211,185.144,48.156,180.296,48.156z"/>
<path fill="#FFFFFF" d="M160.636,30.574c-4.846,0-8.789,3.943-8.789,8.789c0,4.846,3.943,8.789,8.789,8.789l3.569-3.569h-3.569
c-2.878,0-5.22-2.342-5.22-5.22c0-2.878,2.342-5.22,5.22-5.22c2.878,0,5.22,2.342,5.22,5.22V56.54h3.569V39.363
C169.425,34.516,165.482,30.574,160.636,30.574z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 500 524" enable-background="new 0 0 500 524" xml:space="preserve">
<g>
<path fill="#FFFFFF" d="M186.351,471.553v8.229c-5.606,0-10.656-2.019-14.639-5.363c-5.005-4.199-8.182-10.502-8.182-17.544v-41.21
h8.182v18.699h14.639v8.282h-14.639v14.43C171.824,465.089,178.316,471.553,186.351,471.553z"/>
<path fill="#FFFFFF" d="M215.533,434.363v8.175c-7.762,0.016-14.08,6.172-14.361,13.86v23.384h-8.202v-45.419h8.202v5.185
C205.069,436.313,210.074,434.371,215.533,434.363z"/>
<path fill="#FFFFFF" d="M220.803,423.832v-8.191h8.186v8.191H220.803z M220.803,479.782v-45.419h8.186v45.419H220.803z"/>
<path fill="#FFFFFF" d="M279.191,434.363l-22.694,45.419l-22.716-45.419h9.3l13.417,26.82l13.39-26.82H279.191z"/>
<path fill="#FFFFFF" d="M328.286,434.363c0,0,0,49.656,0,52.938c0,12.682-10.402,22.805-22.725,22.798
c-5.771,0-11.118-2.188-15.178-5.824l5.887-5.887c2.512,2.126,5.751,3.42,9.291,3.413c7.975,0,14.431-6.519,14.431-14.5v-12.689
c-3.956,3.275-9.006,5.17-14.431,5.17c-12.346,0.007-22.743-9.954-22.743-22.728c0-0.27,0-22.69,0-22.69h8.291
c0,0,0.004,22.082,0.004,22.69c0,7.944,6.468,14.508,14.45,14.5c7.975,0,14.431-6.526,14.431-14.5v-22.691H328.286z"/>
</g>
<g>
<polygon fill="#FFFFFF" points="250.554,44.159 116.876,121.396 116.877,277.11 250.537,354.962 384.229,277.154 384.229,121.392
"/>
<g>
<path fill="#1904DA" d="M246.902,255.524v-32.282c-14.609-6.898-23.783-21.236-23.594-36.882l-30.086-17.374
c-1.892,17.15,2.057,34.896,11.198,50.171C214.507,236.009,228.793,248.237,246.902,255.524z"/>
<path fill="#1904DA" d="M246.902,299.761v-37.468c-20.381-7.638-36.445-21.086-47.752-39.981
c-10.325-17.249-14.466-37.337-11.695-56.657l-27.931-16.129C143.482,211.352,180.751,275.442,246.902,299.761z"/>
<path fill="#08B1D5" d="M253.779,261.938v37.797c64.918-24.892,103.171-90.209,87.852-149.994l-27.747,16.165
c3.578,20.856,0.191,40.77-9.818,57.644C294.046,240.446,276.67,253.707,253.779,261.938z"/>
<path fill="#08B1D5" d="M253.779,223.185v32.371c20.424-7.774,35.964-19.9,45.004-35.138c8.877-14.969,12.116-32.637,9.411-51.205
l-30.06,17.33C277.985,201.395,269.156,214.685,253.779,223.185z"/>
<path fill="#FFC900" d="M282.1,131.138c12.628,6.157,22.948,15.961,29.885,28.378l27.012-15.598
c-0.182-0.255-0.351-0.51-0.509-0.764c-10.628-17.188-24.658-30.12-41.707-38.435c-47.439-23.13-106.339-5.896-134.71,39.2
l27.117,15.654C209.496,128.018,250.069,115.518,282.1,131.138z"/>
<path fill="#FFC900" d="M251.284,165.445c4.256,0,8.519,0.931,12.516,2.881h0.002c5.253,2.564,9.549,6.643,12.458,11.821
l30.404-17.558c-6.323-11.352-15.738-20.312-27.257-25.93c-29.172-14.223-66.203-2.802-84.893,25.99l30.251,17.46
C231.056,170.735,241.141,165.445,251.284,165.445z"/>
<path fill="#08B1D5" d="M253.779,347.086l125.184-72.957V127.993l-31.828,18.542c17.491,64.215-23.319,134.084-93.356,159.757
V347.086z"/>
<path fill="#1904DA" d="M154.014,146.345l-31.873-18.406v146.151l124.761,72.993v-40.779
C176.723,281.599,136.109,211.643,154.014,146.345z"/>
<path fill="#FFC900" d="M299.471,99.198c18.111,8.832,32.995,22.533,44.241,40.722c0.179,0.289,0.397,0.592,0.636,0.908
l31.536-18.21l-125.33-72.378l-125.358,72.395l31.548,18.211C186.722,92.98,249.169,74.667,299.471,99.198z"/>
<path fill="#FF0036" d="M271.797,187.57c0.002-0.035,0.052-1.226-0.036-3.143c-0.251-0.783-3.208-6.558-10.592-10.586
c-5.045-2.751-11.518-3.068-17.769-0.874c-6.124,2.152-11.322,6.434-14.303,11.769c-0.036,0.464-0.105,1.563-0.052,2.832
c0.404,9.974,6.573,23.534,19.156,29.736l1.938,0.925l1.682-0.899C264.046,210.487,271.328,199.641,271.797,187.57z"/>
</g>
</g>
<g>
<path fill="#FFFFFF" d="M186.846,398.474H175.2c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
s11.646,5.224,11.646,11.646V398.474z M175.2,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916h6.916
v-6.916C182.117,383.015,179.014,379.912,175.2,379.912z"/>
<path fill="#FFFFFF" d="M264.991,398.474h-11.646c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
c6.421,0,11.646,5.224,11.646,11.646V398.474z M253.345,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916
h6.916v-6.916C260.261,383.015,257.159,379.912,253.345,379.912z"/>
<path fill="#FFFFFF" d="M227.295,398.479c-6.424,0-11.651-5.226-11.651-11.651V375.9h4.731v10.928c0,3.815,3.104,6.919,6.919,6.919
c3.815,0,6.919-3.104,6.919-6.919V375.9h4.731v10.928C238.946,393.253,233.719,398.479,227.295,398.479z"/>
<path fill="#FFFFFF" d="M201.245,375.183c-6.421,0-11.645,5.224-11.645,11.646c0,6.421,5.224,11.646,11.645,11.646l4.729-4.729
h-4.729c-3.814,0-6.916-3.103-6.916-6.916c0-3.814,3.103-6.916,6.916-6.916c3.814,0,6.916,3.103,6.916,6.916v22.76h4.729v-22.76
C212.891,380.407,207.666,375.183,201.245,375.183z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

2
brand/readme.md Normal file
View File

@@ -0,0 +1,2 @@
This directory contains media assets, such as the Trivy logo.
Assets under this directory are provided under the Creative Commons - BY 4.0 License. For more details, see here: <https://creativecommons.org/licenses/by/4.0/>

View File

@@ -1,10 +0,0 @@
FROM circleci/golang:1.13-buster
RUN sudo apt-get -y update \
&& sudo apt-get -y install rpm reprepro createrepo distro-info
ARG GORELEASER_VERSION=0.124.1
ARG GORELEASER_ARTIFACT=goreleaser_Linux_x86_64.tar.gz
RUN wget https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VERSION}/${GORELEASER_ARTIFACT} \
&& sudo tar -xzf ${GORELEASER_ARTIFACT} -C /usr/bin/ goreleaser \
&& rm ${GORELEASER_ARTIFACT}

View File

@@ -1,22 +1,22 @@
#!/bin/bash
DEBIAN_RELEASES=$(debian-distro-info --supported)
UBUNTU_RELEASES=$(ubuntu-distro-info --supported)
UBUNTU_RELEASES=$(sort -u <(ubuntu-distro-info --supported-esm) <(ubuntu-distro-info --supported))
cd trivy-repo/deb
for release in $(reprepro ls trivy | awk -F "|" '{print $3}' | sed 's/ //g'); do
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
echo "Removing deb package of $release"
reprepro -A i386 remove $release trivy
reprepro -A amd64 remove $release trivy
reprepro -A arm64 remove $release trivy
done
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
echo "Adding deb package to $release"
reprepro includedeb $release ../../dist/*Linux-64bit.deb
reprepro includedeb $release ../../dist/*Linux-32bit.deb
reprepro includedeb $release ../../dist/*Linux-ARM64.deb
done
git add .
git commit -m "Update deb packages"
git push origin master
git push origin main

View File

@@ -1,27 +1,51 @@
#!/bin/bash
TRIVY_VERSION=$(find dist/ -type f -name "*64bit.rpm" -printf "%f\n" | head -n1 | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
function create_common_rpm_repo () {
rpm_path=$1
ARCHES=("x86_64" "aarch64")
for arch in ${ARCHES[@]}; do
prefix=$arch
if [ "$arch" == "x86_64" ]; then
prefix="64bit"
elif [ "$arch" == "aarch64" ]; then
prefix="ARM64"
fi
mkdir -p $rpm_path/$arch
cp ../dist/*${prefix}.rpm ${rpm_path}/$arch/
createrepo_c -u https://github.com/aquasecurity/trivy/releases/download/ --location-prefix="v"$TRIVY_VERSION --update $rpm_path/$arch
rm ${rpm_path}/$arch/*${prefix}.rpm
done
}
function create_rpm_repo () {
version=$1
rpm_path=rpm/releases/${version}/x86_64
RPM_EL=$(find ../dist/ -type f -name "*64bit.rpm" -printf "%f\n" | head -n1 | sed -e "s/_/-/g" -e "s/-Linux/.el$version/" -e "s/-64bit/.x86_64/")
echo $RPM_EL
mkdir -p $rpm_path
cp ../dist/*64bit.rpm ${rpm_path}/${RPM_EL}
cp ../dist/*64bit.rpm ${rpm_path}/
createrepo --update $rpm_path
createrepo_c -u https://github.com/aquasecurity/trivy/releases/download/ --location-prefix="v"$TRIVY_VERSION --update $rpm_path
rm ${rpm_path}/*64bit.rpm
}
echo "Create RPM releases for Trivy v$TRIVY_VERSION"
cd trivy-repo
VERSIONS=(5 6 7 8)
echo "Processing common repository for RHEL/CentOS..."
create_common_rpm_repo rpm/releases
VERSIONS=(5 6 7 8 9)
for version in ${VERSIONS[@]}; do
echo "Processing RHEL/CentOS $version..."
create_rpm_repo $version
done
git add .
git commit -m "Update rpm packages"
git push origin master
git commit -m "Update rpm packages for Trivy v$TRIVY_VERSION"
git push origin main

View File

@@ -1,12 +1,16 @@
package main
import (
l "log"
"context"
"os"
"github.com/aquasecurity/trivy/internal"
"golang.org/x/xerrors"
"github.com/aquasecurity/trivy/pkg/commands"
"github.com/aquasecurity/trivy/pkg/log"
"github.com/aquasecurity/trivy/pkg/plugin"
_ "modernc.org/sqlite" // sqlite driver for RPM DB and Java DB
)
var (
@@ -14,12 +18,26 @@ var (
)
func main() {
app := internal.NewApp(version)
err := app.Run(os.Args)
if err != nil {
if log.Logger != nil {
log.Fatal(err)
}
l.Fatal(err)
if err := run(); err != nil {
log.Fatal(err)
}
}
func run() error {
// Trivy behaves as the specified plugin.
if runAsPlugin := os.Getenv("TRIVY_RUN_AS_PLUGIN"); runAsPlugin != "" {
if !plugin.IsPredefined(runAsPlugin) {
return xerrors.Errorf("unknown plugin: %s", runAsPlugin)
}
if err := plugin.RunWithArgs(context.Background(), runAsPlugin, os.Args[1:]); err != nil {
return xerrors.Errorf("plugin error: %w", err)
}
return nil
}
app := commands.NewApp(version)
if err := app.Execute(); err != nil {
return err
}
return nil
}

View File

@@ -10,10 +10,10 @@ Trivy_container_scanning:
IMAGE: "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA"
allow_failure: true
before_script:
- export TRIVY_VERSION=${TRIVY_VERSION:-v0.4.3}
- export TRIVY_VERSION=${TRIVY_VERSION:-v0.19.2}
- apk add --no-cache curl docker-cli
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sh -s -- -b /usr/local/bin ${TRIVY_VERSION}
- curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin ${TRIVY_VERSION}
- curl -sSL -o /tmp/trivy-gitlab.tpl https://github.com/aquasecurity/trivy/raw/${TRIVY_VERSION}/contrib/gitlab.tpl
script:
- trivy --exit-code 0 --cache-dir .trivycache/ --no-progress --format template --template "@/tmp/trivy-gitlab.tpl" -o gl-container-scanning-report.json $IMAGE

161
contrib/asff.tpl Normal file
View File

@@ -0,0 +1,161 @@
{
"Findings": [
{{- $t_first := true -}}
{{- range . -}}
{{- $target := .Target -}}
{{- $image := .Target -}}
{{- if gt (len $image) 127 -}}
{{- $image = $image | regexFind ".{124}$" | printf "...%v" -}}
{{- end}}
{{- range .Vulnerabilities -}}
{{- if $t_first -}}
{{- $t_first = false -}}
{{- else -}}
,
{{- end -}}
{{- $severity := .Severity -}}
{{- if eq $severity "UNKNOWN" -}}
{{- $severity = "INFORMATIONAL" -}}
{{- end -}}
{{- $description := .Description -}}
{{- if gt (len $description ) 512 -}}
{{- $description = (substr 0 512 $description) | printf "%v .." -}}
{{- end}}
{
"SchemaVersion": "2018-10-08",
"Id": "{{ $target }}/{{ .VulnerabilityID }}",
"ProductArn": "arn:aws:securityhub:{{ env "AWS_REGION" }}::product/aquasecurity/aquasecurity",
"GeneratorId": "Trivy/{{ .VulnerabilityID }}",
"AwsAccountId": "{{ env "AWS_ACCOUNT_ID" }}",
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
"CreatedAt": "{{ now | date "2006-01-02T15:04:05.999999999Z07:00" }}",
"UpdatedAt": "{{ now | date "2006-01-02T15:04:05.999999999Z07:00" }}",
"Severity": {
"Label": "{{ $severity }}"
},
"Title": "Trivy found a vulnerability to {{ .VulnerabilityID }} in container {{ $target }}, related to {{ .PkgName }}",
"Description": {{ escapeString $description | printf "%q" }},
{{ if not (empty .PrimaryURL) -}}
"Remediation": {
"Recommendation": {
"Text": "More information on this vulnerability is provided in the hyperlink",
"Url": "{{ .PrimaryURL }}"
}
},
{{ end -}}
"ProductFields": { "Product Name": "Trivy" },
"Resources": [
{
"Type": "Container",
"Id": "{{ $target }}",
"Partition": "aws",
"Region": "{{ env "AWS_REGION" }}",
"Details": {
"Container": { "ImageName": "{{ $image }}" },
"Other": {
"CVE ID": "{{ .VulnerabilityID }}",
"CVE Title": {{ .Title | printf "%q" }},
"PkgName": "{{ .PkgName }}",
"Installed Package": "{{ .InstalledVersion }}",
"Patched Package": "{{ .FixedVersion }}",
"NvdCvssScoreV3": "{{ (index .CVSS (sourceID "nvd")).V3Score }}",
"NvdCvssVectorV3": "{{ (index .CVSS (sourceID "nvd")).V3Vector }}",
"NvdCvssScoreV2": "{{ (index .CVSS (sourceID "nvd")).V2Score }}",
"NvdCvssVectorV2": "{{ (index .CVSS (sourceID "nvd")).V2Vector }}"
}
}
}
],
"RecordState": "ACTIVE"
}
{{- end -}}
{{- range .Misconfigurations -}}
{{- if $t_first -}}{{- $t_first = false -}}{{- else -}},{{- end -}}
{{- $severity := .Severity -}}
{{- if eq $severity "UNKNOWN" -}}
{{- $severity = "INFORMATIONAL" -}}
{{- end -}}
{{- $description := .Description -}}
{{- if gt (len $description ) 512 -}}
{{- $description = (substr 0 512 $description) | printf "%v .." -}}
{{- end}}
{
"SchemaVersion": "2018-10-08",
"Id": "{{ $target }}/{{ .ID }}",
"ProductArn": "arn:aws:securityhub:{{ env "AWS_REGION" }}::product/aquasecurity/aquasecurity",
"GeneratorId": "Trivy/{{ .ID }}",
"AwsAccountId": "{{ env "AWS_ACCOUNT_ID" }}",
"Types": [ "Software and Configuration Checks" ],
"CreatedAt": "{{ now | date "2006-01-02T15:04:05.999999999Z07:00" }}",
"UpdatedAt": "{{ now | date "2006-01-02T15:04:05.999999999Z07:00" }}",
"Severity": {
"Label": "{{ $severity }}"
},
"Title": "Trivy found a misconfiguration in {{ $target }}: {{ .Title }}",
"Description": {{ escapeString $description | printf "%q" }},
"Remediation": {
"Recommendation": {
"Text": "{{ .Resolution }}",
"Url": "{{ .PrimaryURL }}"
}
},
"ProductFields": { "Product Name": "Trivy" },
"Resources": [
{
"Type": "Other",
"Id": "{{ $target }}",
"Partition": "aws",
"Region": "{{ env "AWS_REGION" }}",
"Details": {
"Other": {
"Message": "{{ .Message }}",
"Filename": "{{ $target }}",
"StartLine": "{{ .CauseMetadata.StartLine }}",
"EndLine": "{{ .CauseMetadata.EndLine }}"
}
}
}
],
"RecordState": "ACTIVE"
}
{{- end -}}
{{- range .Secrets -}}
{{- if $t_first -}}{{- $t_first = false -}}{{- else -}},{{- end -}}
{{- $severity := .Severity -}}
{{- if eq $severity "UNKNOWN" -}}
{{- $severity = "INFORMATIONAL" -}}
{{- end -}}
{
"SchemaVersion": "2018-10-08",
"Id": "{{ $target }}",
"ProductArn": "arn:aws:securityhub:{{ env "AWS_DEFAULT_REGION" }}::product/aquasecurity/aquasecurity",
"GeneratorId": "Trivy",
"AwsAccountId": "{{ env "AWS_ACCOUNT_ID" }}",
"Types": [ "Sensitive Data Identifications" ],
"CreatedAt": "{{ now | date "2006-01-02T15:04:05.999999999Z07:00" }}",
"UpdatedAt": "{{ now | date "2006-01-02T15:04:05.999999999Z07:00" }}",
"Severity": {
"Label": "{{ $severity }}"
},
"Title": "Trivy found a secret in {{ $target }}: {{ .Title }}",
"Description": "Trivy found a secret in {{ $target }}: {{ .Title }}",
"ProductFields": { "Product Name": "Trivy" },
"Resources": [
{
"Type": "Other",
"Id": "{{ $target }}",
"Partition": "aws",
"Region": "{{ env "AWS_DEFAULT_REGION" }}",
"Details": {
"Other": {
"Filename": "{{ $target }}"
}
}
}
],
"RecordState": "ACTIVE"
}
{{- end -}}
{{- end }}
]
}

View File

@@ -5,30 +5,42 @@ import data.lib.trivy
default ignore = false
nvd_v3_vector = v {
v := input.CVSS.nvd.v3
v := input.CVSS.nvd.V3Vector
}
redhat_v3_vector = v {
v := input.CVSS.redhat.V3Vector
}
# Ignore a vulnerability which requires high privilege
ignore {
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
cvss_vector.PrivilegesRequired == "High"
nvd_cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
nvd_cvss_vector.PrivilegesRequired == "High"
# Check against RedHat scores as well as NVD
redhat_cvss_vector := trivy.parse_cvss_vector_v3(redhat_v3_vector)
redhat_cvss_vector.PrivilegesRequired == "High"
}
# Ignore a vulnerability which requires user interaction
ignore {
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
cvss_vector.UserInteraction == "Required"
nvd_cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
nvd_cvss_vector.UserInteraction == "Required"
# Check against RedHat scores as well as NVD
redhat_cvss_vector := trivy.parse_cvss_vector_v3(redhat_v3_vector)
redhat_cvss_vector.UserInteraction == "Required"
}
ignore {
input.PkgName == "openssl"
# Split CVSSv3 vector
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
nvd_cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
# Evaluate Attack Vector
ignore_attack_vectors := {"Physical", "Local"}
cvss_vector.AttackVector == ignore_attack_vectors[_]
nvd_cvss_vector.AttackVector == ignore_attack_vectors[_]
}
ignore {
@@ -50,11 +62,11 @@ ignore {
input.PkgName == "bash"
# Split CVSSv3 vector
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
nvd_cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
# Evaluate Attack Vector
ignore_attack_vectors := {"Physical", "Local", "Adjacent"}
cvss_vector.AttackVector == ignore_attack_vectors[_]
nvd_cvss_vector.AttackVector == ignore_attack_vectors[_]
# Evaluate severity
input.Severity == {"LOW", "MEDIUM", "HIGH"}[_]
@@ -64,11 +76,11 @@ ignore {
input.PkgName == "django"
# Split CVSSv3 vector
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
nvd_cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
# Evaluate Attack Vector
ignore_attack_vectors := {"Physical", "Local"}
cvss_vector.AttackVector == ignore_attack_vectors[_]
nvd_cvss_vector.AttackVector == ignore_attack_vectors[_]
# Evaluate severity
input.Severity == {"LOW", "MEDIUM"}[_]
@@ -86,7 +98,7 @@ ignore {
input.PkgName == "jquery"
# Split CVSSv3 vector
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
nvd_cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
# Evaluate CWE-ID
deny_cwe_ids := {"CWE-79"} # XSS

View File

@@ -9,7 +9,11 @@ ignore_pkgs := {"bash", "bind-license", "rpm", "vim", "vim-minimal"}
ignore_severities := {"LOW", "MEDIUM"}
nvd_v3_vector = v {
v := input.CVSS.nvd.v3
v := input.CVSS.nvd.V3Vector
}
redhat_v3_vector = v {
v := input.CVSS.redhat.V3Vector
}
ignore {
@@ -22,20 +26,29 @@ ignore {
# Ignore a vulnerability which is not remotely exploitable
ignore {
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
cvss_vector.AttackVector != "Network"
nvd_cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
nvd_cvss_vector.AttackVector != "Network"
redhat_cvss_vector := trivy.parse_cvss_vector_v3(redhat_v3_vector)
redhat_cvss_vector.AttackVector != "Network"
}
# Ignore a vulnerability which requires high privilege
ignore {
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
cvss_vector.PrivilegesRequired == "High"
nvd_cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
nvd_cvss_vector.PrivilegesRequired == "High"
redhat_cvss_vector := trivy.parse_cvss_vector_v3(redhat_v3_vector)
redhat_cvss_vector.PrivilegesRequired == "High"
}
# Ignore a vulnerability which requires user interaction
ignore {
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
cvss_vector.UserInteraction == "Required"
nvd_cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
nvd_cvss_vector.UserInteraction == "Required"
redhat_cvss_vector := trivy.parse_cvss_vector_v3(redhat_v3_vector)
redhat_cvss_vector.UserInteraction == "Required"
}
# Ignore CSRF

View File

@@ -0,0 +1,103 @@
{{- /* Template based on https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types */ -}}
[
{{- $t_first := true }}
{{- range . }}
{{- $target := .Target }}
{{- range .Vulnerabilities -}}
{{- if $t_first -}}
{{- $t_first = false -}}
{{ else -}}
,
{{- end }}
{
"type": "issue",
"check_name": "container_scanning",
"categories": [ "Security" ],
"description": {{ list .VulnerabilityID .PkgName .InstalledVersion .Title | join " - " | printf "%q" }},
"fingerprint": "{{ list .VulnerabilityID .PkgName .InstalledVersion $target | join "" | sha1sum }}",
"content": {{ .Description | printf "%q" }},
"severity": {{ if eq .Severity "LOW" -}}
"info"
{{- else if eq .Severity "MEDIUM" -}}
"minor"
{{- else if eq .Severity "HIGH" -}}
"major"
{{- else if eq .Severity "CRITICAL" -}}
"critical"
{{- else -}}
"info"
{{- end }},
"location": {
"path": "{{ $target }}",
"lines": {
"begin": 0
}
}
}
{{- end -}}
{{- range .Misconfigurations -}}
{{- if $t_first -}}
{{- $t_first = false -}}
{{ else -}}
,
{{- end }}
{
"type": "issue",
"check_name": "container_scanning",
"categories": [ "Security" ],
"description": {{ list "Misconfig" .ID .Title | join " - " | printf "%q" }},
"fingerprint": "{{ list .ID .Title $target | join "" | sha1sum }}",
"content": {{ .Description | printf "%q" }},
"severity": {{ if eq .Severity "LOW" -}}
"info"
{{- else if eq .Severity "MEDIUM" -}}
"minor"
{{- else if eq .Severity "HIGH" -}}
"major"
{{- else if eq .Severity "CRITICAL" -}}
"critical"
{{- else -}}
"info"
{{- end }},
"location": {
"path": "{{ $target }}",
"lines": {
"begin": {{ .CauseMetadata.StartLine }}
}
}
}
{{- end -}}
{{- range .Secrets -}}
{{- if $t_first -}}
{{- $t_first = false -}}
{{ else -}}
,
{{- end }}
{
"type": "issue",
"check_name": "container_scanning",
"categories": [ "Security" ],
"description": {{ list "Secret" .RuleID .Title | join " - " | printf "%q" }},
"fingerprint": "{{ list .RuleID .Title $target | join "" | sha1sum }}",
"content": {{ .Title | printf "%q" }},
"severity": {{ if eq .Severity "LOW" -}}
"info"
{{- else if eq .Severity "MEDIUM" -}}
"minor"
{{- else if eq .Severity "HIGH" -}}
"major"
{{- else if eq .Severity "CRITICAL" -}}
"critical"
{{- else -}}
"info"
{{- end }},
"location": {
"path": "{{ $target }}",
"lines": {
"begin": {{ .StartLine }}
}
}
}
{{- end -}}
{{- end }}
]

View File

@@ -1,10 +1,11 @@
{{- /* Template based on https://docs.gitlab.com/ee/user/application_security/container_scanning/#reports-json-format */ -}}
{
"version": "2.3",
"version": "14.0.6",
"vulnerabilities": [
{{- $t_first := true }}
{{- range . }}
{{- $target := .Target }}
{{- $image := $target | regexFind "[^\\s]+" }}
{{- range .Vulnerabilities -}}
{{- if $t_first -}}
{{- $t_first = false -}}
@@ -31,8 +32,6 @@
{{- else -}}
"{{ .Severity }}"
{{- end }},
{{- /* TODO: Define confidence */}}
"confidence": "Unknown",
"solution": {{ if .FixedVersion -}}
"Upgrade {{ .PkgName }} to {{ .FixedVersion }}"
{{- else -}}
@@ -51,7 +50,7 @@
},
{{- /* TODO: No mapping available - https://github.com/aquasecurity/trivy/issues/332 */}}
"operating_system": "Unknown",
"image": "{{ $target }}"
"image": "{{ $image }}"
},
"identifiers": [
{
@@ -59,7 +58,7 @@
"type": "cve",
"name": "{{ .VulnerabilityID }}",
"value": "{{ .VulnerabilityID }}",
"url": ""
"url": "{{ .PrimaryURL }}"
}
],
"links": [
@@ -71,7 +70,7 @@
,
{{- end -}}
{
"url": "{{ . }}"
"url": "{{ regexFind "[^ ]+" . }}"
}
{{- end }}
]

148
contrib/html.tpl Normal file
View File

@@ -0,0 +1,148 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
{{- if . }}
<style>
* {
font-family: Arial, Helvetica, sans-serif;
}
h1 {
text-align: center;
}
.group-header th {
font-size: 200%;
}
.sub-header th {
font-size: 150%;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
white-space: nowrap;
padding: .3em;
}
table {
margin: 0 auto;
}
.severity {
text-align: center;
font-weight: bold;
color: #fafafa;
}
.severity-LOW .severity { background-color: #5fbb31; }
.severity-MEDIUM .severity { background-color: #e9c600; }
.severity-HIGH .severity { background-color: #ff8800; }
.severity-CRITICAL .severity { background-color: #e40000; }
.severity-UNKNOWN .severity { background-color: #747474; }
.severity-LOW { background-color: #5fbb3160; }
.severity-MEDIUM { background-color: #e9c60060; }
.severity-HIGH { background-color: #ff880060; }
.severity-CRITICAL { background-color: #e4000060; }
.severity-UNKNOWN { background-color: #74747460; }
table tr td:first-of-type {
font-weight: bold;
}
.links a,
.links[data-more-links=on] a {
display: block;
}
.links[data-more-links=off] a:nth-of-type(1n+5) {
display: none;
}
a.toggle-more-links { cursor: pointer; }
</style>
<title>{{- escapeXML ( index . 0 ).Target }} - Trivy Report - {{ now }} </title>
<script>
window.onload = function() {
document.querySelectorAll('td.links').forEach(function(linkCell) {
var links = [].concat.apply([], linkCell.querySelectorAll('a'));
[].sort.apply(links, function(a, b) {
return a.href > b.href ? 1 : -1;
});
links.forEach(function(link, idx) {
if (links.length > 3 && 3 === idx) {
var toggleLink = document.createElement('a');
toggleLink.innerText = "Toggle more links";
toggleLink.href = "#toggleMore";
toggleLink.setAttribute("class", "toggle-more-links");
linkCell.appendChild(toggleLink);
}
linkCell.appendChild(link);
});
});
document.querySelectorAll('a.toggle-more-links').forEach(function(toggleLink) {
toggleLink.onclick = function() {
var expanded = toggleLink.parentElement.getAttribute("data-more-links");
toggleLink.parentElement.setAttribute("data-more-links", "on" === expanded ? "off" : "on");
return false;
};
});
};
</script>
</head>
<body>
<h1>{{- escapeXML ( index . 0 ).Target }} - Trivy Report - {{ now }}</h1>
<table>
{{- range . }}
<tr class="group-header"><th colspan="6">{{ escapeXML .Type }}</th></tr>
{{- if (eq (len .Vulnerabilities) 0) }}
<tr><th colspan="6">No Vulnerabilities found</th></tr>
{{- else }}
<tr class="sub-header">
<th>Package</th>
<th>Vulnerability ID</th>
<th>Severity</th>
<th>Installed Version</th>
<th>Fixed Version</th>
<th>Links</th>
</tr>
{{- range .Vulnerabilities }}
<tr class="severity-{{ escapeXML .Vulnerability.Severity }}">
<td class="pkg-name">{{ escapeXML .PkgName }}</td>
<td>{{ escapeXML .VulnerabilityID }}</td>
<td class="severity">{{ escapeXML .Vulnerability.Severity }}</td>
<td class="pkg-version">{{ escapeXML .InstalledVersion }}</td>
<td>{{ escapeXML .FixedVersion }}</td>
<td class="links" data-more-links="off">
{{- range .Vulnerability.References }}
<a href={{ escapeXML . | printf "%q" }}>{{ escapeXML . }}</a>
{{- end }}
</td>
</tr>
{{- end }}
{{- end }}
{{- if (eq (len .Misconfigurations ) 0) }}
<tr><th colspan="6">No Misconfigurations found</th></tr>
{{- else }}
<tr class="sub-header">
<th>Type</th>
<th>Misconf ID</th>
<th>Check</th>
<th>Severity</th>
<th>Message</th>
</tr>
{{- range .Misconfigurations }}
<tr class="severity-{{ escapeXML .Severity }}">
<td class="misconf-type">{{ escapeXML .Type }}</td>
<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;"">
{{ escapeXML .Message }}
<br>
<a href={{ escapeXML .PrimaryURL | printf "%q" }}>{{ escapeXML .PrimaryURL }}</a>
</br>
</td>
</tr>
{{- end }}
{{- end }}
{{- end }}
</table>
{{- else }}
</head>
<body>
<h1>Trivy Returned Empty Report</h1>
{{- end }}
</body>
</html>

View File

@@ -72,12 +72,15 @@ get_binaries() {
freebsd/armv7) BINARIES="trivy" ;;
linux/386) BINARIES="trivy" ;;
linux/amd64) BINARIES="trivy" ;;
linux/ppc64le) BINARIES="trivy" ;;
linux/arm64) BINARIES="trivy" ;;
linux/armv7) BINARIES="trivy" ;;
linux/s390x) BINARIES="trivy" ;;
openbsd/386) BINARIES="trivy" ;;
openbsd/amd64) BINARIES="trivy" ;;
openbsd/arm64) BINARIES="trivy" ;;
openbsd/armv7) BINARIES="trivy" ;;
windows/amd64) BINARIES="trivy" ;;
*)
log_crit "platform $PLATFORM is not supported. Make sure this script is up-to-date and file request at https://github.com/${PREFIX}/issues/new"
exit 1
@@ -101,6 +104,9 @@ tag_to_version() {
}
adjust_format() {
# change format (tar.gz or zip) based on OS
case ${OS} in
windows) FORMAT=zip ;;
esac
true
}
adjust_os() {
@@ -110,6 +116,8 @@ adjust_os() {
amd64) OS=64bit ;;
arm) OS=ARM ;;
arm64) OS=ARM64 ;;
ppc64le) OS=Linux ;;
s390x) OS=Linux ;;
darwin) OS=macOS ;;
dragonfly) OS=DragonFlyBSD ;;
freebsd) OS=FreeBSD ;;
@@ -125,7 +133,10 @@ adjust_arch() {
386) ARCH=32bit ;;
amd64) ARCH=64bit ;;
arm) ARCH=ARM ;;
armv7) ARCH=ARM ;;
arm64) ARCH=ARM64 ;;
ppc64le) ARCH=PPC64LE ;;
s390x) ARCH=s390x ;;
darwin) ARCH=macOS ;;
dragonfly) ARCH=DragonFlyBSD ;;
freebsd) ARCH=FreeBSD ;;
@@ -179,11 +190,11 @@ log_tag() {
}
log_debug() {
log_priority 7 || return 0
echoerr "$(log_prefix)" "$(log_tag 7)" "$@"
echo "$(log_prefix)" "$(log_tag 7)" "$@"
}
log_info() {
log_priority 6 || return 0
echoerr "$(log_prefix)" "$(log_tag 6)" "$@"
echo "$(log_prefix)" "$(log_tag 6)" "$@"
}
log_err() {
log_priority 3 || return 0
@@ -209,10 +220,12 @@ uname_arch() {
x86) arch="386" ;;
i686) arch="386" ;;
i386) arch="386" ;;
ppc64le) arch="ppc64le" ;;
aarch64) arch="arm64" ;;
armv5*) arch="armv5" ;;
armv6*) arch="armv6" ;;
armv7*) arch="armv7" ;;
s390*) arch="s390x" ;;
esac
echo ${arch}
}

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" ?>
<testsuites>
<testsuites name="trivy">
{{- range . -}}
{{- $failures := len .Vulnerabilities }}
<testsuite tests="1" failures="{{ $failures }}" time="" name="{{ .Target }}">
<testsuite tests="{{ $failures }}" failures="{{ $failures }}" name="{{ .Target }}" errors="0" skipped="0" time="">
{{- if not (eq .Type "") }}
<properties>
<property name="type" value="{{ .Type }}"></property>
@@ -10,9 +10,22 @@
{{- end -}}
{{ range .Vulnerabilities }}
<testcase classname="{{ .PkgName }}-{{ .InstalledVersion }}" name="[{{ .Vulnerability.Severity }}] {{ .VulnerabilityID }}" time="">
<failure message={{escapeXML .Title | printf "%q" }} type="description">{{escapeXML .Description | printf "%q" }}</failure>
<failure message="{{ escapeXML .Title }}" type="description">{{ escapeXML .Description }}</failure>
</testcase>
{{- end }}
</testsuite>
{{- $failures := len .Misconfigurations }}
<testsuite tests="{{ $failures }}" failures="{{ $failures }}" name="{{ .Target }}" errors="0" skipped="0" time="">
{{- if not (eq .Type "") }}
<properties>
<property name="type" value="{{ .Type }}"></property>
</properties>
{{- end -}}
{{ range .Misconfigurations }}
<testcase classname="{{ .Type }}" name="[{{ .Severity }}] {{ .ID }}" time="">
<failure message="{{ escapeXML .Title }}" type="description">{{ escapeXML .Description }}</failure>
</testcase>
{{- end }}
</testsuite>
{{- end }}
</testsuites>
</testsuites>

View File

@@ -1,81 +0,0 @@
{
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.4.json",
"version": "2.1.0",
"runs": [
{
"tool": {
"driver": {
"name": "Trivy",
"fullName": "Trivy Vulnerability Scanner",
"rules": [
{{- $t_first := true }}
{{- range . }}
{{- range .Vulnerabilities -}}
{{- if $t_first -}}
{{- $t_first = false -}}
{{ else -}}
,
{{- end }}
{
"id": "[{{ .Vulnerability.Severity }}] {{ .VulnerabilityID }}",
"name": "dockerfile_scan",
"shortDescription": {
"text": "{{ .VulnerabilityID }} Package: {{ .PkgName }}"
},
"fullDescription": {
"text": "{{ endWithPeriod .Title }}"
},
"help": {
"text": "Vulnerability {{ .VulnerabilityID }}\nSeverity: {{ .Vulnerability.Severity }}\nPackage: {{ .PkgName }}\nInstalled Version: {{ .InstalledVersion }}\nFixed Version: {{ .FixedVersion }}\nLink: [{{ .VulnerabilityID }}](https://nvd.nist.gov/vuln/detail/{{ .VulnerabilityID | toLower }})",
"markdown": "**Vulnerability {{ .VulnerabilityID }}**\n| Severity | Package | Installed Version | Fixed Version | Link |\n| --- | --- | --- | --- | --- |\n|{{ .Vulnerability.Severity }}|{{ .PkgName }}|{{ .InstalledVersion }}|{{ .FixedVersion }}|[{{ .VulnerabilityID }}](https://nvd.nist.gov/vuln/detail/{{ .VulnerabilityID | toLower }})|\n"
},
"properties": {
"tags": [
"vulnerability",
"{{ .Vulnerability.Severity }}",
"{{ .PkgName }}"
],
"precision": "very-high"
}
}
{{- end -}}
{{- end -}}
]
}
},
"results": [
{{- $t_first := true }}
{{- range . }}
{{- range $index, $vulnerability := .Vulnerabilities -}}
{{- if $t_first -}}
{{- $t_first = false -}}
{{ else -}}
,
{{- end }}
{
"ruleId": "[{{ $vulnerability.Vulnerability.Severity }}] {{ $vulnerability.VulnerabilityID }}",
"ruleIndex": {{ $index }},
"level": "error",
"message": {
"text": {{ endWithPeriod $vulnerability.Description | printf "%q" }}
},
"locations": [{
"physicalLocation": {
"artifactLocation": {
"uri": "Dockerfile"
},
"region": {
"startLine": 1,
"startColumn": 1,
"endColumn": 1
}
}
}]
}
{{- end -}}
{{- end -}}
],
"columnKind": "utf16CodeUnits"
}
]
}

View File

@@ -1,55 +0,0 @@
# Air-gapped environment
Trivy can be used in air-gapped environments.
## Download the vulnerability database
At first, you need to download the vulnerability database for use in air-gapped environments.
Go to [trivy-db](https://github.com/aquasecurity/trivy-db/releases) and download `trivy-offline.db.tgz` in the latest release.
If you download `trivy-light-offline.db.tgz`, you have to run Trivy with `--light` option.
```
$ wget https://github.com/aquasecurity/trivy-db/releases/latest/download/trivy-offline.db.tgz
```
## Transfer the DB file into the air-gapped environment
The way of transfer depends on the environment.
```
$ rsync -av -e ssh /path/to/trivy-offline.db.tgz [user]@[host]:dst
```
## Put the DB file in Trivy's cache directory
You have to know where to put the DB file. The following command shows the default cache directory.
```
$ ssh user@host
$ trivy -h | grep cache
--cache-dir value cache directory (default: "/home/myuser/.cache/trivy") [$TRIVY_CACHE_DIR]
```
Put the DB file in the cache directory + `/db`.
```
$ mkdir -p /home/myuser/.cache/trivy/db
$ cd /home/myuser/.cache/trivy/db
$ mv /path/to/trivy-offline.db.tgz .
```
Then, decompress it.
`trivy-offline.db.tgz` file includes two files, `trivy.db` and `metadata.json`.
```
$ tar xvf trivy-offline.db.tgz
x trivy.db
x metadata.json
$ rm trivy-offline.db.tgz
```
In an air-gapped environment it is your responsibility to update the Trivy database on a regular basis, so that the scanner can detect recently-identified vulnerabilities.
## Run Trivy with --skip-update option
In an air-gapped environment, specify `--skip-update` so that Trivy doesn't attempt to download the latest database file.
```
$ trivy image --skip-update alpine:3.12
```

10
docs/build/Dockerfile vendored Normal file
View File

@@ -0,0 +1,10 @@
FROM squidfunk/mkdocs-material:8.3.9
## If you want to see exactly the same version as is published to GitHub pages
## use a private image for insiders, which requires authentication.
# docker login -u ${GITHUB_USERNAME} -p ${GITHUB_TOKEN} ghcr.io
# FROM ghcr.io/squidfunk/mkdocs-material-insiders
COPY requirements.txt .
RUN pip install -r requirements.txt

30
docs/build/requirements.txt vendored Normal file
View File

@@ -0,0 +1,30 @@
click==8.1.2
csscompressor==0.9.5
ghp-import==2.0.2
htmlmin==0.1.12
importlib-metadata==4.11.3
Jinja2==3.1.1
jsmin==3.0.1
Markdown==3.3.6
MarkupSafe==2.1.1
mergedeep==1.3.4
mike==1.1.2
mkdocs==1.3.0
mkdocs-macros-plugin==0.7.0
mkdocs-material==8.3.9
mkdocs-material-extensions==1.0.3
mkdocs-minify-plugin==0.5.0
mkdocs-redirects==1.0.4
packaging==21.3
Pygments==2.12.0
pymdown-extensions==9.5
pyparsing==3.0.8
python-dateutil==2.8.2
PyYAML==6.0
pyyaml-env-tag==0.1
six==1.16.0
termcolor==1.1.0
verspec==0.1.0
watchdog==2.1.7
zipp==3.8.0

View File

@@ -0,0 +1,49 @@
# Discussions
Thank you for taking interest in contributing to Trivy!
Trivy uses [GitHub Discussion](https://github.com/aquasecurity/trivy/discussions) for bug reports, feature requests, and questions.
If maintainers decide to accept a new feature or confirm that it is a bug, they will close the discussion and create a [GitHub Issue](https://github.com/aquasecurity/trivy/issues) associated with that discussion.
- Feel free to open discussions for any reason. When you open a new discussion, you'll have to select a discussion category as described below.
- Please spend a small amount of time giving due diligence to the issue/discussion tracker. Your discussion might be a duplicate. If it is, please add your comment to the existing issue/discussion.
- Remember that users might search for your issue/discussion in the future, so please give it a meaningful title to help others.
- The issue should clearly explain the reason for opening, the proposal if you have any, and any relevant technical information.
There are 4 categories:
- 💡 [Ideas](https://github.com/aquasecurity/trivy/discussions/categories/ideas)
- Share ideas for new features
- 🔎 [False Detection](https://github.com/aquasecurity/trivy/discussions/categories/false-detection)
- Report false positives/negatives
- 🐛 [Bugs](https://github.com/aquasecurity/trivy/discussions/categories/bugs)
- Report something that is not working as expected
- 🙏 [Q&A](https://github.com/aquasecurity/trivy/discussions/categories/q-a)
- Ask the community for help
!!! note
If you find any false positives or false negatives, please make sure to report them under the "False Detection" category, not "Bugs".
## False detection
Trivy depends on [multiple data sources](https://aquasecurity.github.io/trivy/latest/docs/vulnerability/detection/data-source/).
Sometime these databases contain mistakes.
If Trivy can't detect any CVE-IDs or shows false positive result, at first please follow the next steps:
1. Run Trivy with `-f json` that shows data sources.
2. According to the shown data source, make sure that the security advisory in the data source is correct.
If the data source is correct and Trivy shows wrong results, please raise an issue on Trivy.
### GitHub Advisory Database
Visit [here](https://github.com/advisories) and search CVE-ID.
If you find a problem, it'll be nice to fix it: [How to contribute to a GitHub security advisory](https://github.blog/2022-02-22-github-advisory-database-now-open-to-community-contributions/)
### GitLab Advisory Database
Visit [here](https://advisories.gitlab.com/) and search CVE-ID.
If you find a problem, it'll be nice to fix it: [Create an issue to GitLab Advisory Database](https://gitlab.com/gitlab-org/security-products/gemnasium-db/-/issues/new)
### Red Hat CVE Database
Visit [here](https://access.redhat.com/security/security-updates/?cwe=476#/cve) and search CVE-ID.

View File

@@ -0,0 +1,4 @@
# Issues
Thank you for taking interest in contributing to Trivy!
Trivy uses [GitHub Discussion](./discussion.md) for bug reports, feature requests, and questions.

View File

@@ -0,0 +1,212 @@
Thank you for taking interest in contributing to Trivy!
1. Every Pull Request should have an associated bug or feature issue unless you are fixing a trivial documentation issue.
1. Please add the associated Issue link in the PR description.
1. Your PR is more likely to be accepted if it focuses on just one change.
1. There's no need to add or tag reviewers.
1. If a reviewer commented on your code or asked for changes, please remember to respond with comment. Do not mark discussion as resolved. It's up to reviewer to mark it resolved (in case if suggested fix addresses problem properly). PRs with unresolved issues should not be merged (even if the comment is unclear or requires no action from your side).
1. Please include a comment with the results before and after your change.
1. Your PR is more likely to be accepted if it includes tests (We have not historically been very strict about tests, but we would like to improve this!).
1. If your PR affects the user experience in some way, please update the README.md and the CLI help accordingly.
## Development
Install the necessary tools for development by following their respective installation instructions.
- [Go](https://go.dev/doc/install)
- [Mage](https://magefile.org/)
### Build
After making changes to the Go source code, build the project with the following command:
```shell
$ mage build
$ ./trivy -h
```
### Lint
You must pass the linter checks:
```shell
$ mage lint
```
Additionally, you need to have run `go mod tidy`, so execute the following command as well:
```shell
$ mage tidy
```
### Unit tests
Your PR must pass all the unit tests. You can test it as below.
```
$ mage test:unit
```
### Integration tests
Your PR must pass all the integration tests. You can test it as below.
```
$ mage test:integration
```
### Documentation
If you update CLI flags, you need to generate the CLI references.
The test will fail if they are not up-to-date.
```shell
$ mage docs:generate
```
You can build the documents as below and view it at http://localhost:8000.
```
$ mage docs:serve
```
## Title
It is not that strict, but we use the title conventions in this repository.
Each commit message doesn't have to follow the conventions as long as it is clear and descriptive since it will be squashed and merged.
### Format of the title
```
<type>(<scope>): <subject>
```
The `type` and `scope` should always be lowercase as shown below.
**Allowed `<type>` values:**
- **feat** for a new feature for the user, not a new feature for build script. Such commit will trigger a release bumping a MINOR version.
- **fix** for a bug fix for the user, not a fix to a build script. Such commit will trigger a release bumping a PATCH version.
- **perf** for performance improvements. Such commit will trigger a release bumping a PATCH version.
- **docs** for changes to the documentation.
- **style** for formatting changes, missing semicolons, etc.
- **refactor** for refactoring production code, e.g. renaming a variable.
- **test** for adding missing tests, refactoring tests; no production code change.
- **build** for updating build configuration, development tools or other changes irrelevant to the user.
- **chore** for updates that do not apply to the above, such as dependency updates.
- **ci** for changes to CI configuration files and scripts
- **revert** for revert to a previous commit
**Allowed `<scope>` values:**
checks:
- vuln
- misconf
- secret
- license
mode:
- image
- fs
- repo
- sbom
- k8s
- server
- aws
- vm
os:
- alpine
- redhat
- alma
- rocky
- mariner
- oracle
- debian
- ubuntu
- amazon
- suse
- photon
- distroless
language:
- ruby
- php
- python
- nodejs
- rust
- dotnet
- java
- go
- elixir
- dart
vuln:
- os
- lang
config:
- kubernetes
- dockerfile
- terraform
- cloudformation
container
- docker
- podman
- containerd
- oci
cli:
- cli
- flag
SBOM:
- cyclonedx
- spdx
- purl
others:
- helm
- report
- db
- deps
The `<scope>` can be empty (e.g. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted.
### Example titles
```
feat(alma): add support for AlmaLinux
```
```
fix(oracle): handle advisories with ksplice versions
```
```
docs(misconf): add comparison with Conftest and TFsec
```
```
chore(deps): bump go.uber.org/zap from 1.19.1 to 1.20.0
```
**NOTE**: please do not use `chore(deps): update fanal` and something like that if you add new features or fix bugs in Trivy-related projects.
The PR title should describe what the PR adds or fixes even though it just updates the dependency in Trivy.
## Commits
## Understand where your pull request belongs
Trivy is composed of several repositories that work together:
- [Trivy](https://github.com/aquasecurity/trivy) is the client-side, user-facing, command line tool.
- [vuln-list](https://github.com/aquasecurity/vuln-list) is a vulnerability database, aggregated from different sources, and normalized for easy consumption. Think of this as the "server" side of the trivy command line tool. **There should be no pull requests to this repo**
- [vuln-list-update](https://github.com/aquasecurity/vuln-list-update) is the code that maintains the vuln-list database.
- [trivy-db](https://github.com/aquasecurity/trivy-db) maintains the vulnerability database pulled by Trivy CLI.
- [go-dep-parser](https://github.com/aquasecurity/go-dep-parser) is a library for parsing lock files such as package-lock.json and Gemfile.lock.

View File

@@ -1,7 +1,10 @@
# Triage
Triage is an important part of maintaining the health of the trivy repo.
A well organized repo allows maintainers to prioritize feature requests, fix bugs, and respond to users facing difficulty with the tool as quickly as possible.
Triage includes:
- Labeling issues
- Responding to issues
- Closing issues
@@ -185,11 +188,11 @@ We use two labels [help wanted](https://github.com/aquasecurity/trivy/issues?q=i
and [good first issue](https://github.com/aquasecurity/trivy/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
to identify issues that have been specially groomed for new contributors.
We have specific [guidelines](/docs/help-wanted.md)
We have specific [guidelines](/docs/community/maintainer/help-wanted.md)
for how to use these labels. If you see an issue that satisfies these
guidelines, you can add the `help wanted` label and the `good first issue` label.
Please note that adding the `good first issue` label must also
add the `help wanted` label.
If an issue has these labels but does not satisfy the guidelines, please
ask for more details to be added to the issue or remove the labels.
ask for more details to be added to the issue or remove the labels.

View File

@@ -0,0 +1,142 @@
# Air-Gapped Environment
Trivy can be used in air-gapped environments. Note that an allowlist is [here][allowlist].
## Air-Gapped Environment for vulnerabilities
### Download the vulnerability database
At first, you need to download the vulnerability database for use in air-gapped environments.
=== "Trivy"
```
TRIVY_TEMP_DIR=$(mktemp -d)
trivy --cache-dir $TRIVY_TEMP_DIR image --download-db-only
tar -cf ./db.tar.gz -C $TRIVY_TEMP_DIR/db metadata.json trivy.db
rm -rf $TRIVY_TEMP_DIR
```
=== "oras >= v0.13.0"
Please follow [oras installation instruction][oras].
Download `db.tar.gz`:
```
$ oras pull ghcr.io/aquasecurity/trivy-db:2
```
=== "oras < v0.13.0"
Please follow [oras installation instruction][oras].
Download `db.tar.gz`:
```
$ oras pull -a ghcr.io/aquasecurity/trivy-db:2
```
### Download the Java index database[^1]
Java users also need to download the Java index database for use in air-gapped environments.
!!! note
You container image may contain JAR files even though you don't use Java directly.
In that case, you also need to download the Java index database.
=== "Trivy"
```
TRIVY_TEMP_DIR=$(mktemp -d)
trivy --cache-dir $TRIVY_TEMP_DIR image --download-java-db-only
tar -cf ./javadb.tar.gz -C $TRIVY_TEMP_DIR/java-db metadata.json trivy-java.db
rm -rf $TRIVY_TEMP_DIR
```
=== "oras >= v0.13.0"
Please follow [oras installation instruction][oras].
Download `javadb.tar.gz`:
```
$ oras pull ghcr.io/aquasecurity/trivy-java-db:1
```
=== "oras < v0.13.0"
Please follow [oras installation instruction][oras].
Download `javadb.tar.gz`:
```
$ oras pull -a ghcr.io/aquasecurity/trivy-java-db:1
```
### Transfer the DB files into the air-gapped environment
The way of transfer depends on the environment.
=== "Vulnerability db"
```
$ rsync -av -e ssh /path/to/db.tar.gz [user]@[host]:dst
```
=== "Java index db[^1]"
```
$ rsync -av -e ssh /path/to/javadb.tar.gz [user]@[host]:dst
```
### Put the DB files in Trivy's cache directory
You have to know where to put the DB files. The following command shows the default cache directory.
```
$ ssh user@host
$ trivy -h | grep cache
--cache-dir value cache directory (default: "/home/myuser/.cache/trivy") [$TRIVY_CACHE_DIR]
```
=== "Vulnerability db"
Put the DB file in the cache directory + `/db`.
```
$ mkdir -p /home/myuser/.cache/trivy/db
$ cd /home/myuser/.cache/trivy/db
$ tar xvf /path/to/db.tar.gz -C /home/myuser/.cache/trivy/db
x trivy.db
x metadata.json
$ rm /path/to/db.tar.gz
```
=== "Java index db[^1]"
Put the DB file in the cache directory + `/java-db`.
```
$ mkdir -p /home/myuser/.cache/trivy/java-db
$ cd /home/myuser/.cache/trivy/java-db
$ tar xvf /path/to/javadb.tar.gz -C /home/myuser/.cache/trivy/java-db
x trivy-java.db
x metadata.json
$ rm /path/to/javadb.tar.gz
```
In an air-gapped environment it is your responsibility to update the Trivy databases on a regular basis, so that the scanner can detect recently-identified vulnerabilities.
### Run Trivy with the specific flags.
In an air-gapped environment, you have to specify `--skip-db-update` and `--skip-java-db-update`[^1] so that Trivy doesn't attempt to download the latest database files.
In addition, if you want to scan `pom.xml` dependencies, you need to specify `--offline-scan` since Trivy tries to issue API requests for scanning Java applications by default.
```
$ trivy image --skip-db-update --skip-java-db-update --offline-scan alpine:3.12
```
## Air-Gapped Environment for misconfigurations
No special measures are required to detect misconfigurations in an air-gapped environment.
### Run Trivy with `--skip-policy-update` option
In an air-gapped environment, specify `--skip-policy-update` so that Trivy doesn't attempt to download the latest misconfiguration policies.
```
$ 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)

View File

@@ -0,0 +1,28 @@
# Embed in Dockerfile
Scan your image as part of the build process by embedding Trivy in the
Dockerfile. This approach can be used to update Dockerfiles currently using
Aquas [Microscanner][microscanner].
```bash
$ cat Dockerfile
FROM alpine:3.7
RUN apk add curl \
&& curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \
&& trivy rootfs --exit-code 1 --no-progress /
$ docker build -t vulnerable-image .
```
Alternatively you can use Trivy in a multistage build. Thus avoiding the
insecure `curl | sh`. Also the image is not changed.
```bash
[...]
# Run vulnerability scan on build image
FROM build AS vulnscan
COPY --from=aquasec/trivy:latest /usr/local/bin/trivy /usr/local/bin/trivy
RUN trivy rootfs --exit-code 1 --no-progress /
[...]
```
[microscanner]: https://github.com/aquasecurity/microscanner

View File

@@ -0,0 +1,116 @@
# Unpacked Filesystem
Scan an unpacked container image filesystem.
In this case, Trivy works the same way when scanning containers
```bash
$ docker export $(docker create alpine:3.10.2) | tar -C /tmp/rootfs -xvf -
$ trivy rootfs /tmp/rootfs
```
<details>
<summary>Result</summary>
```bash
2021-03-08T05:22:26.378Z INFO Need to update DB
2021-03-08T05:22:26.380Z INFO Downloading DB...
20.37 MiB / 20.37 MiB [-------------------------------------------------------------------------------------------------------------------------------------] 100.00% 8.24 MiB p/s 2s
2021-03-08T05:22:30.134Z INFO Detecting Alpine vulnerabilities...
/tmp/rootfs (alpine 3.10.2)
===========================
Total: 20 (UNKNOWN: 0, LOW: 2, MEDIUM: 10, HIGH: 8, CRITICAL: 0)
+--------------+------------------+----------+-------------------+---------------+---------------------------------------+
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
+--------------+------------------+----------+-------------------+---------------+---------------------------------------+
| libcrypto1.1 | CVE-2020-1967 | HIGH | 1.1.1c-r0 | 1.1.1g-r0 | openssl: Segmentation |
| | | | | | fault in SSL_check_chain |
| | | | | | causes denial of service |
| | | | | | -->avd.aquasec.com/nvd/cve-2020-1967 |
+ +------------------+ + +---------------+---------------------------------------+
| | CVE-2021-23839 | | | 1.1.1j-r0 | openssl: incorrect SSLv2 |
| | | | | | rollback protection |
| | | | | | -->avd.aquasec.com/nvd/cve-2021-23839 |
+ +------------------+ + + +---------------------------------------+
| | CVE-2021-23840 | | | | openssl: integer |
| | | | | | overflow in CipherUpdate |
| | | | | | -->avd.aquasec.com/nvd/cve-2021-23840 |
+ +------------------+ + + +---------------------------------------+
| | CVE-2021-23841 | | | | openssl: NULL pointer dereference |
| | | | | | in X509_issuer_and_serial_hash() |
| | | | | | -->avd.aquasec.com/nvd/cve-2021-23841 |
+ +------------------+----------+ +---------------+---------------------------------------+
| | CVE-2019-1547 | MEDIUM | | 1.1.1d-r0 | openssl: side-channel weak |
| | | | | | encryption vulnerability |
| | | | | | -->avd.aquasec.com/nvd/cve-2019-1547 |
+ +------------------+ + + +---------------------------------------+
| | CVE-2019-1549 | | | | openssl: information |
| | | | | | disclosure in fork() |
| | | | | | -->avd.aquasec.com/nvd/cve-2019-1549 |
+ +------------------+ + +---------------+---------------------------------------+
| | CVE-2019-1551 | | | 1.1.1d-r2 | openssl: Integer overflow in RSAZ |
| | | | | | modular exponentiation on x86_64 |
| | | | | | -->avd.aquasec.com/nvd/cve-2019-1551 |
+ +------------------+ + +---------------+---------------------------------------+
| | CVE-2020-1971 | | | 1.1.1i-r0 | openssl: EDIPARTYNAME |
| | | | | | NULL pointer de-reference |
| | | | | | -->avd.aquasec.com/nvd/cve-2020-1971 |
+ +------------------+----------+ +---------------+---------------------------------------+
| | CVE-2019-1563 | LOW | | 1.1.1d-r0 | openssl: information |
| | | | | | disclosure in PKCS7_dataDecode |
| | | | | | and CMS_decrypt_set1_pkey |
| | | | | | -->avd.aquasec.com/nvd/cve-2019-1563 |
+--------------+------------------+----------+ +---------------+---------------------------------------+
| libssl1.1 | CVE-2020-1967 | HIGH | | 1.1.1g-r0 | openssl: Segmentation |
| | | | | | fault in SSL_check_chain |
| | | | | | causes denial of service |
| | | | | | -->avd.aquasec.com/nvd/cve-2020-1967 |
+ +------------------+ + +---------------+---------------------------------------+
| | CVE-2021-23839 | | | 1.1.1j-r0 | openssl: incorrect SSLv2 |
| | | | | | rollback protection |
| | | | | | -->avd.aquasec.com/nvd/cve-2021-23839 |
+ +------------------+ + + +---------------------------------------+
| | CVE-2021-23840 | | | | openssl: integer |
| | | | | | overflow in CipherUpdate |
| | | | | | -->avd.aquasec.com/nvd/cve-2021-23840 |
+ +------------------+ + + +---------------------------------------+
| | CVE-2021-23841 | | | | openssl: NULL pointer dereference |
| | | | | | in X509_issuer_and_serial_hash() |
| | | | | | -->avd.aquasec.com/nvd/cve-2021-23841 |
+ +------------------+----------+ +---------------+---------------------------------------+
| | CVE-2019-1547 | MEDIUM | | 1.1.1d-r0 | openssl: side-channel weak |
| | | | | | encryption vulnerability |
| | | | | | -->avd.aquasec.com/nvd/cve-2019-1547 |
+ +------------------+ + + +---------------------------------------+
| | CVE-2019-1549 | | | | openssl: information |
| | | | | | disclosure in fork() |
| | | | | | -->avd.aquasec.com/nvd/cve-2019-1549 |
+ +------------------+ + +---------------+---------------------------------------+
| | CVE-2019-1551 | | | 1.1.1d-r2 | openssl: Integer overflow in RSAZ |
| | | | | | modular exponentiation on x86_64 |
| | | | | | -->avd.aquasec.com/nvd/cve-2019-1551 |
+ +------------------+ + +---------------+---------------------------------------+
| | CVE-2020-1971 | | | 1.1.1i-r0 | openssl: EDIPARTYNAME |
| | | | | | NULL pointer de-reference |
| | | | | | -->avd.aquasec.com/nvd/cve-2020-1971 |
+ +------------------+----------+ +---------------+---------------------------------------+
| | CVE-2019-1563 | LOW | | 1.1.1d-r0 | openssl: information |
| | | | | | disclosure in PKCS7_dataDecode |
| | | | | | and CMS_decrypt_set1_pkey |
| | | | | | -->avd.aquasec.com/nvd/cve-2019-1563 |
+--------------+------------------+----------+-------------------+---------------+---------------------------------------+
| musl | CVE-2020-28928 | MEDIUM | 1.1.22-r3 | 1.1.22-r4 | In musl libc through 1.2.1, |
| | | | | | wcsnrtombs mishandles particular |
| | | | | | combinations of destination buffer... |
| | | | | | -->avd.aquasec.com/nvd/cve-2020-28928 |
+--------------+ + + + + +
| musl-utils | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
+--------------+------------------+----------+-------------------+---------------+---------------------------------------+
```
</details>

View File

@@ -0,0 +1,358 @@
# Modules
!!! warning "EXPERIMENTAL"
This feature might change without preserving backwards compatibility.
Trivy provides a module feature to allow others to extend the Trivy CLI without the need to change the Trivy code base.
It changes the behavior during scanning by WebAssembly.
## Overview
Trivy modules are add-on tools that integrate seamlessly with Trivy.
They provide a way to extend the core feature set of Trivy, but without updating the Trivy binary.
- They can be added and removed from a Trivy installation without impacting the core Trivy tool.
- They can be written in any programming language supporting WebAssembly.
- It supports only [TinyGo][tinygo] at the moment.
You can write your own detection logic.
- Evaluate complex vulnerability conditions like [Spring4Shell][spring4shell]
- Detect a shell script communicating with malicious domains
- Detect malicious python install script (setup.py)
- Even detect misconfigurations in WordPress setting
- etc.
Then, you can update the scan result however you want.
- Change a severity
- Remove a vulnerability
- Add a new vulnerability
- etc.
Modules should be distributed in OCI registries like GitHub Container Registry.
!!! warning
WebAssembly doesn't allow file access and network access by default.
Modules can read required files only, but cannot overwrite them.
WebAssembly is sandboxed and secure by design, but Trivy modules available in public are not audited for security.
You should install and run third-party modules at your own risk even though
Under the hood Trivy leverages [wazero][wazero] to run WebAssembly modules without CGO.
## Installing a Module
A module can be installed using the `trivy module install` command.
This command takes an url. It will download the module and install it in the module cache.
Trivy adheres to the XDG specification, so the location depends on whether XDG_DATA_HOME is set.
Trivy will now search XDG_DATA_HOME for the location of the Trivy modules cache.
The preference order is as follows:
- XDG_DATA_HOME if set and .trivy/plugins exists within the XDG_DATA_HOME dir
- $HOME/.trivy/plugins
For example, to download the WebAssembly module, you can execute the following command:
```bash
$ trivy module install ghcr.io/aquasecurity/trivy-module-spring4shell
```
## Using Modules
Once the module is installed, Trivy will load all available modules in the cache on the start of the next Trivy execution.
The modules may inject custom logic into scanning and change the result.
You can run Trivy as usual and modules are loaded automatically.
You will see the log messages about WASM modules.
```shell
$ trivy image ghcr.io/aquasecurity/trivy-test-images:spring4shell-jre8
2022-06-12T12:57:13.210+0300 INFO Loading ghcr.io/aquasecurity/trivy-module-spring4shell/spring4shell.wasm...
2022-06-12T12:57:13.596+0300 INFO Registering WASM module: spring4shell@v1
...
2022-06-12T12:57:14.865+0300 INFO Module spring4shell: Java Version: 8, Tomcat Version: 8.5.77
2022-06-12T12:57:14.865+0300 INFO Module spring4shell: change CVE-2022-22965 severity from CRITICAL to LOW
Java (jar)
Total: 9 (UNKNOWN: 1, LOW: 3, MEDIUM: 2, HIGH: 3, CRITICAL: 0)
┌──────────────────────────────────────────────────────────────┬─────────────────────┬──────────┬───────────────────┬────────────────────────┬────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │
├──────────────────────────────────────────────────────────────┼─────────────────────┼──────────┼───────────────────┼────────────────────────┼────────────────────────────────────────────────────────────┤
│ org.springframework.boot:spring-boot (helloworld.war) │ CVE-2022-22965 │ LOW │ 2.6.3 │ 2.5.12, 2.6.6 │ spring-framework: RCE via Data Binding on JDK 9+ │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-22965 │
├──────────────────────────────────────────────────────────────┼─────────────────────┼──────────┼───────────────────┼────────────────────────┼────────────────────────────────────────────────────────────┤
...(snip)...
```
In the above example, the Spring4Shell module changed the severity from CRITICAL to LOW because the application doesn't satisfy one of conditions.
## Uninstalling Modules
Specify a module repository with `trivy module uninstall` command.
```bash
$ trivy module uninstall ghcr.io/aquasecurity/trivy-module-spring4shell
```
## Building Modules
It supports TinyGo only at the moment.
### TinyGo
Trivy provides Go SDK including three interfaces.
Your own module needs to implement either or both `Analyzer` and `PostScanner` in addition to `Module`.
```go
type Module interface {
Version() int
Name() string
}
type Analyzer interface {
RequiredFiles() []string
Analyze(filePath string) (*serialize.AnalysisResult, error)
}
type PostScanner interface {
PostScanSpec() serialize.PostScanSpec
PostScan(serialize.Results) (serialize.Results, error)
}
```
In the following tutorial, it creates a WordPress module that detects a WordPress version and a critical vulnerability accordingly.
!!! tips
You can use logging functions such as `Debug` and `Info` for debugging.
See [examples](#examples) for the detail.
#### Initialize your module
Replace the repository name with yours.
```
$ go mod init github.com/aquasecurity/trivy-module-wordpress
```
#### Module interface
`Version()` returns your module version and should be incremented after updates.
`Name()` returns your module name.
```go
package main
const (
version = 1
name = "wordpress-module"
)
type WordpressModule struct{
// Cannot define fields as modules can't keep state.
}
func (WordpressModule) Version() int {
return version
}
func (WordpressModule) Name() string {
return name
}
```
!!! info
A struct cannot have any fields. Each method invocation is performed in different states.
#### Analyzer interface
If you implement the `Analyzer` interface, `Analyze` method is called when the file path is matched to file patterns returned by `RequiredFiles()`.
A file pattern must be a regular expression. The syntax detail is [here][regexp].
`Analyze` takes the matched file path, then the file can be opened by `os.Open()`.
```go
const typeWPVersion = "wordpress-version"
func (WordpressModule) RequiredFiles() []string {
return []string{
`wp-includes\/version.php`,
}
}
func (WordpressModule) Analyze(filePath string) (*serialize.AnalysisResult, error) {
f, err := os.Open(filePath) // e.g. filePath: /usr/src/wordpress/wp-includes/version.php
if err != nil {
return nil, err
}
defer f.Close()
var wpVersion string
scanner := bufio.NewScanner(f)
for scanner.Scan() {
line := scanner.Text()
if !strings.HasPrefix(line, "$wp_version=") {
continue
}
ss := strings.Split(line, "=")
if len(ss) != 2 {
return nil, fmt.Errorf("invalid wordpress version: %s", line)
}
// NOTE: it is an example; you actually need to handle comments, etc
ss[1] = strings.TrimSpace(ss[1])
wpVersion = strings.Trim(ss[1], `";`)
}
if err = scanner.Err(); err != nil {
return nil, err
}
return &serialize.AnalysisResult{
CustomResources: []serialize.CustomResource{
{
Type: typeWPVersion,
FilePath: filePath,
Data: wpVersion,
},
},
}, nil
}
```
!!! tips
Trivy caches analysis results according to the module version.
We'd recommend cleaning the cache or changing the module version every time you update `Analyzer`.
#### PostScanner interface
`PostScan` is called after scanning and takes the scan result as an argument from Trivy.
In post scanning, your module can perform one of three actions:
- Insert
- Add a new security finding
- e.g. Add a new vulnerability and misconfiguration
- Update
- Update the detected vulnerability and misconfiguration
- e.g. Change a severity
- Delete
- Delete the detected vulnerability and misconfiguration
- e.g. Remove Spring4Shell because it is not actually affected.
`PostScanSpec()` returns which action the module does.
If it is `Update` or `Delete`, it also needs to return IDs such as CVE-ID and misconfiguration ID, which your module wants to update or delete.
`serialize.Results` contains the filtered results matching IDs you specified.
Also, it includes `CustomResources` with the values your `Analyze` returns, so you can modify the scan result according to the custom resources.
```go
func (WordpressModule) PostScanSpec() serialize.PostScanSpec {
return serialize.PostScanSpec{
Action: api.ActionInsert, // Add new vulnerabilities
}
}
func (WordpressModule) PostScan(results serialize.Results) (serialize.Results, error) {
// e.g. results
// [
// {
// "Target": "",
// "Class": "custom",
// "CustomResources": [
// {
// "Type": "wordpress-version",
// "FilePath": "/usr/src/wordpress/wp-includes/version.php",
// "Layer": {
// "DiffID": "sha256:057649e61046e02c975b84557c03c6cca095b8c9accd3bd20eb4e432f7aec887"
// },
// "Data": "5.7.1"
// }
// ]
// }
// ]
var wpVersion int
for _, result := range results {
if result.Class != types.ClassCustom {
continue
}
for _, c := range result.CustomResources {
if c.Type != typeWPVersion {
continue
}
wpVersion = c.Data.(string)
wasm.Info(fmt.Sprintf("WordPress Version: %s", wpVersion))
...snip...
if affectedVersion.Check(ver) {
vulnerable = true
}
break
}
}
if vulnerable {
// Add CVE-2020-36326
results = append(results, serialize.Result{
Target: wpPath,
Class: types.ClassLangPkg,
Type: "wordpress",
Vulnerabilities: []types.DetectedVulnerability {
{
VulnerabilityID: "CVE-2020-36326",
PkgName: "wordpress",
InstalledVersion: wpVersion,
FixedVersion: "5.7.2",
Vulnerability: dbTypes.Vulnerability{
Title: "PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname.",
Severity: "CRITICAL",
},
},
},
})
}
return results, nil
}
```
The new vulnerability will be added to the scan results.
This example shows how the module inserts a new finding.
If you are interested in `Update`, you can see an example of [Spring4Shell][trivy-module-spring4shell].
In the `Delete` action, `PostScan` needs to return results you want to delete.
If `PostScan` returns an empty, Trivy will not delete anything.
#### Build
Follow [the install guide][tinygo-installation] and install TinyGo.
```bash
$ tinygo build -o wordpress.wasm -scheduler=none -target=wasi --no-debug wordpress.go
```
Put the built binary to the module directory that is under the home directory by default.
```bash
$ mkdir -p ~/.trivy/modules
$ cp spring4shell.wasm ~/.trivy/modules
```
## Distribute Your Module
You can distribute your own module in OCI registries. Please follow [the oras installation instruction][oras].
```bash
oras push ghcr.io/aquasecurity/trivy-module-wordpress:latest wordpress.wasm:application/vnd.module.wasm.content.layer.v1+wasm
Uploading 3daa3dac086b wordpress.wasm
Pushed ghcr.io/aquasecurity/trivy-module-wordpress:latest
Digest: sha256:6416d0199d66ce52ced19f01d75454b22692ff3aa7737e45f7a189880840424f
```
## Examples
- [Spring4Shell][trivy-module-spring4shell]
- [WordPress][trivy-module-wordpress]
[regexp]: https://github.com/google/re2/wiki/Syntax
[tinygo]: https://tinygo.org/
[spring4shell]: https://blog.aquasec.com/zero-day-rce-vulnerability-spring4shell
[wazero]: https://github.com/tetratelabs/wazero
[trivy-module-spring4shell]: https://github.com/aquasecurity/trivy/tree/main/examples/module/spring4shell
[trivy-module-wordpress]: https://github.com/aquasecurity/trivy-module-wordpress
[tinygo-installation]: https://tinygo.org/getting-started/install/
[oras]: https://oras.land/cli/

View File

@@ -0,0 +1,193 @@
# Plugins
Trivy provides a plugin feature to allow others to extend the Trivy CLI without the need to change the Trivycode base.
This plugin system was inspired by the plugin system used in [kubectl][kubectl], [Helm][helm], and [Conftest][conftest].
## Overview
Trivy plugins are add-on tools that integrate seamlessly with Trivy.
They provide a way to extend the core feature set of Trivy, but without requiring every new feature to be written in Go and added to the core tool.
- They can be added and removed from a Trivy installation without impacting the core Trivy tool.
- They can be written in any programming language.
- They integrate with Trivy, and will show up in Trivy help and subcommands.
!!! warning
Trivy plugins available in public are not audited for security.
You should install and run third-party plugins at your own risk, since they are arbitrary programs running on your machine.
## Installing a Plugin
A plugin can be installed using the `trivy plugin install` command.
This command takes a url and will download the plugin and install it in the plugin cache.
Trivy adheres to the XDG specification, so the location depends on whether XDG_DATA_HOME is set.
Trivy will now search XDG_DATA_HOME for the location of the Trivy plugins cache.
The preference order is as follows:
- XDG_DATA_HOME if set and .trivy/plugins exists within the XDG_DATA_HOME dir
- ~/.trivy/plugins
Under the hood Trivy leverages [go-getter][go-getter] to download plugins.
This means the following protocols are supported for downloading plugins:
- OCI Registries
- Local Files
- Git
- HTTP/HTTPS
- Mercurial
- Amazon S3
- Google Cloud Storage
For example, to download the Kubernetes Trivy plugin you can execute the following command:
```bash
$ trivy plugin install github.com/aquasecurity/trivy-plugin-kubectl
```
Also, Trivy plugin can be installed from a local archive:
```bash
$ trivy plugin install myplugin.tar.gz
```
## Using Plugins
Once the plugin is installed, Trivy will load all available plugins in the cache on the start of the next Trivy execution.
A plugin will be made in the Trivy CLI based on the plugin name.
To display all plugins, you can list them by `trivy --help`
```bash
$ trivy --help
NAME:
trivy - A simple and comprehensive vulnerability scanner for containers
USAGE:
trivy [global options] command [command options] target
VERSION:
dev
COMMANDS:
image, i scan an image
filesystem, fs scan local filesystem
repository, repo scan remote repository
client, c client mode
server, s server mode
plugin, p manage plugins
kubectl scan kubectl resources
help, h Shows a list of commands or help for one command
```
As shown above, `kubectl` subcommand exists in the `COMMANDS` section.
To call the kubectl plugin and scan existing Kubernetes deployments, you can execute the following command:
```
$ trivy kubectl deployment <deployment-id> -- --ignore-unfixed --severity CRITICAL
```
Internally the kubectl plugin calls the kubectl binary to fetch information about that deployment and passes the using images to Trivy.
You can see the detail [here][trivy-plugin-kubectl].
If you want to omit even the subcommand, you can use `TRIVY_RUN_AS_PLUGIN` environment variable.
```bash
$ TRIVY_RUN_AS_PLUGIN=kubectl trivy job your-job -- --format json
```
## Installing and Running Plugins on the fly
`trivy plugin run` installs a plugin and runs it on the fly.
If the plugin is already present in the cache, the installation is skipped.
```bash
trivy plugin run github.com/aquasecurity/trivy-plugin-kubectl pod your-pod -- --exit-code 1
```
## Uninstalling Plugins
Specify a plugin name with `trivy plugin uninstall` command.
```bash
$ trivy plugin uninstall kubectl
```
## Building Plugins
Each plugin has a top-level directory, and then a plugin.yaml file.
```bash
your-plugin/
|
|- plugin.yaml
|- your-plugin.sh
```
In the example above, the plugin is contained inside of a directory named `your-plugin`.
It has two files: plugin.yaml (required) and an executable script, your-plugin.sh (optional).
The core of a plugin is a simple YAML file named plugin.yaml.
Here is an example YAML of trivy-plugin-kubectl plugin that adds support for Kubernetes scanning.
```yaml
name: "kubectl"
repository: github.com/aquasecurity/trivy-plugin-kubectl
version: "0.1.0"
usage: scan kubectl resources
description: |-
A Trivy plugin that scans the images of a kubernetes resource.
Usage: trivy kubectl TYPE[.VERSION][.GROUP] NAME
platforms:
- selector: # optional
os: darwin
arch: amd64
uri: ./trivy-kubectl # where the execution file is (local file, http, git, etc.)
bin: ./trivy-kubectl # path to the execution file
- selector: # optional
os: linux
arch: amd64
uri: https://github.com/aquasecurity/trivy-plugin-kubectl/releases/download/v0.1.0/trivy-kubectl.tar.gz
bin: ./trivy-kubectl
```
The `plugin.yaml` field should contain the following information:
- name: The name of the plugin. This also determines how the plugin will be made available in the Trivy CLI. For example, if the plugin is named kubectl, you can call the plugin with `trivy kubectl`. (required)
- version: The version of the plugin. (required)
- usage: A short usage description. (required)
- description: A long description of the plugin. This is where you could provide a helpful documentation of your plugin. (required)
- platforms: (required)
- selector: The OS/Architecture specific variations of a execution file. (optional)
- os: OS information based on GOOS (linux, darwin, etc.) (optional)
- arch: The architecture information based on GOARCH (amd64, arm64, etc.) (optional)
- uri: Where the executable file is. Relative path from the root directory of the plugin or remote URL such as HTTP and S3. (required)
- bin: Which file to call when the plugin is executed. Relative path from the root directory of the plugin. (required)
The following rules will apply in deciding which platform to select:
- If both `os` and `arch` under `selector` match the current platform, search will stop and the platform will be used.
- If `selector` is not present, the platform will be used.
- If `os` matches and there is no more specific `arch` match, the platform will be used.
- If no `platform` match is found, Trivy will exit with an error.
After determining platform, Trivy will download the execution file from `uri` and store it in the plugin cache.
When the plugin is called via Trivy CLI, `bin` command will be executed.
The plugin is responsible for handling flags and arguments. Any arguments are passed to the plugin from the `trivy` command.
A plugin should be archived `*.tar.gz`.
```bash
$ tar -czvf myplugin.tar.gz plugin.yaml script.py
plugin.yaml
script.py
$ trivy plugin install myplugin.tar.gz
2023-03-03T19:04:42.026+0600 INFO Installing the plugin from myplugin.tar.gz...
2023-03-03T19:04:42.026+0600 INFO Loading the plugin metadata...
$ trivy myplugin
Hello from Trivy demo plugin!
```
## Example
https://github.com/aquasecurity/trivy-plugin-kubectl
[kubectl]: https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/
[helm]: https://helm.sh/docs/topics/plugins/
[conftest]: https://www.conftest.dev/plugins/
[go-getter]: https://github.com/hashicorp/go-getter
[trivy-plugin-kubectl]: https://github.com/aquasecurity/trivy-plugin-kubectl

View File

@@ -0,0 +1,27 @@
# Requirements
None, Trivy uses Azure SDK for Go. You don't need to install `az` command.
# Privileges
Service principal must have the `AcrPull` permissions.
## Creation of a service principal
```bash
export SP_DATA=$(az ad sp create-for-rbac --name TrivyTest --role AcrPull --scope "/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.ContainerRegistry/registries/<registry_name>")
```
# 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)
```
# 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
```

View File

@@ -0,0 +1,2 @@
See [here](./index.md) for the detail.
You don't need to provide a credential when download from public repository.

View File

@@ -0,0 +1,35 @@
Trivy uses AWS SDK. You don't need to install `aws` CLI tool.
You can use [AWS CLI's ENV Vars][env-var].
[env-var]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
### AWS private registry permissions
You may need to grant permissions to allow Trivy to pull images from private ECR.
It depends on how you want to provide AWS Role to trivy.
- [IAM Role Service account](https://github.com/aws/amazon-eks-pod-identity-webhook)
- [Kube2iam](https://github.com/jtblin/kube2iam) or [Kiam](https://github.com/uswitch/kiam)
#### IAM Role Service account
Add the AWS role in trivy's service account annotations:
```yaml
trivy:
serviceAccount:
annotations: {}
# eks.amazonaws.com/role-arn: arn:aws:iam::ACCOUNT_ID:role/IAM_ROLE_NAME
```
#### Kube2iam or Kiam
Add the AWS role to pod's annotations:
```yaml
podAnnotations: {}
## kube2iam/kiam annotation
# iam.amazonaws.com/role: arn:aws:iam::ACCOUNT_ID:role/IAM_ROLE_NAME
```

View File

@@ -0,0 +1,40 @@
# Requirements
None, Trivy uses Google Cloud SDK. You don't need to install `gcloud` command.
# Privileges
Credential file must have the `roles/storage.objectViewer` permissions.
More information can be found in [Google's documentation](https://cloud.google.com/container-registry/docs/access-control)
## JSON File Format
The JSON file specified should have the following format provided by google's service account mechanisms:
```json
{
"type": "service_account",
"project_id": "your_special_project",
"private_key_id": "XXXXXXXXXXXXXXXXXXXXxx",
"private_key": "-----BEGIN PRIVATE KEY-----\nNONONONO\n-----END PRIVATE KEY-----\n",
"client_email": "somedude@your_special_project.iam.gserviceaccount.com",
"client_id": "1234567890",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/somedude%40your_special_project.iam.gserviceaccount.com"
}
```
# Usage
If you want to use target project's repository, you can set them via `GOOGLE_APPLICATION_CREDENTIALS`.
```bash
# must set TRIVY_USERNAME empty char
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credential.json
```
# Testing
You can test credentials in the following manner (assuming they are in `/tmp` on host machine).
```bash
docker run -it --rm -v /tmp:/tmp\
-e GOOGLE_APPLICATION_CREDENTIALS=/tmp/service_account.json\
aquasec/trivy image gcr.io/your_special_project/your_special_image:your_special_tag
```

View File

@@ -0,0 +1,49 @@
Trivy can download images from a private registry without the need for installing Docker or any other 3rd party tools.
This makes it easy to run within a CI process.
## Credential
To use Trivy with private images, simply install it and provide your credentials:
```shell
$ TRIVY_USERNAME=YOUR_USERNAME TRIVY_PASSWORD=YOUR_PASSWORD trivy image YOUR_PRIVATE_IMAGE
```
Trivy also supports providing credentials through CLI flags:
```shell
$ TRIVY_PASSWORD=YOUR_PASSWORD trivy image --username YOUR_USERNAME YOUR_PRIVATE_IMAGE
```
!!! warning
The CLI flag `--password` is available, but its use is not recommended for security reasons.
You can also store your credentials in `trivy.yaml`.
For more information, please refer to [the documentation](../../references/configuration/config-file.md).
It can handle multiple sets of credentials as well:
```shell
$ export TRIVY_USERNAME=USERNAME1,USERNAME2
$ export TRIVY_PASSWORD=PASSWORD1,PASSWORD2
$ trivy image YOUR_PRIVATE_IMAGE
```
In the example above, Trivy attempts to use two pairs of credentials:
- USERNAME1/PASSWORD1
- USERNAME2/PASSWORD2
Please note that the number of usernames and passwords must be the same.
## docker login
If you have Docker configured locally and have set up the credentials, Trivy can access them.
```shell
$ docker login ghcr.io
Username:
Password:
$ trivy image ghcr.io/your/private_image
```
!!! note
`docker login` can be used with any container runtime, such as Podman.

View File

@@ -0,0 +1,9 @@
BasicAuth server needs `TRIVY_USERNAME` and `TRIVY_PASSWORD`.
```bash
export TRIVY_USERNAME={USERNAME}
export TRIVY_PASSWORD={PASSWORD}
# if you want to use 80 port, use NonSSL
export TRIVY_NON_SSL=true
```

View File

@@ -0,0 +1,70 @@
# Compliance Reports
!!! warning "EXPERIMENTAL"
This feature might change without preserving backwards compatibility.
Trivys compliance flag lets you curate a specific set of checks into a report. In a typical Trivy scan, there are hundreds of different checks for many different components and configurations, but sometimes you already know which specific checks you are interested in. Often this would be an industry accepted set of checks such as CIS, or some vendor specific guideline, or your own organization policy that you want to comply with. These are all possible using the flexible compliance infrastructure that's built into Trivy. Compliance reports are defined as simple YAML documents that select checks to include in the report.
## Usage
Compliance report is currently supported in the following targets (trivy sub-commands):
- `trivy image`
- `trivy aws`
- `trivy k8s`
Add the `--compliance` flag to the command line, and set it's value to desired report.
For example: `trivy k8s cluster --compliance k8s-nsa` (see below for built-in and custom reports)
### Options
The following flags are compatible with `--compliance` flag and allows customizing it's output:
| flag | effect |
|--------------------|--------------------------------------------------------------------------------------|
| `--report summary` | shows a summary of the results. for every control shows the number of failed checks. |
| `--report all` | shows fully detailed results. for every control shows where it failed and why. |
| `--format table` | shows results in textual table format (good for human readability). |
| `--format json` | shows results in json format (good for machine readability). |
## Built-in compliance
Trivy has a number of built-in compliance reports that you can asses right out of the box.
to specify a built-in compliance report, select it by ID like `trivy --compliance <compliance_id>`.
For the list of built-in compliance reports, please see the relevant section:
- [Docker compliance](../target/container_image.md#compliance)
- [Kubernetes compliance](../target/kubernetes.md#compliance)
- [AWS compliance](../target/aws.md#compliance)
## Custom compliance
You can create your own custom compliance report. A compliance report is a simple YAML document in the following format:
```yaml
spec:
id: "k8s-myreport" # report unique identifier. this should not container spaces.
title: "My custom Kubernetes report" # report title. Any one-line title.
description: "Describe your report" # description of the report. Any text.
relatedResources :
- https://some.url # useful references. URLs only.
version: "1.0" # spec version (string)
controls:
- name: "Non-root containers" # Name for the control (appears in the report as is). Any one-line name.
description: 'Check that container is not running as root' # Description (appears in the report as is). Any text.
id: "1.0" # control identifier (string)
checks: # list of existing Trivy checks that define the control
- id: AVD-KSV-0012 # check ID. Must start with `AVD-` or `CVE-`
severity: "MEDIUM" # Severity for the control (note that checks severity isn't used)
- name: "Immutable container file systems"
description: 'Check that container root file system is immutable'
id: "1.1"
checks:
- id: AVD-KSV-0014
severity: "LOW"
```
The check id field (`controls[].checks[].id`) is referring to existing check by it's "AVD ID". This AVD ID is easily located in the check's source code metadata header, or by browsing [Aqua vulnerability DB](https://avd.aquasec.com/), specifically in the [Misconfigurations](https://avd.aquasec.com/misconfig/) and [Vulnerabilities](https://avd.aquasec.com/nvd) sections.
Once you have a compliance spec, you can select it by file path: `trivy --compliance @</path/to/compliance.yaml>` (note the `@` indicating file path instead of report id).

View File

@@ -0,0 +1,77 @@
# Cache
The cache directory includes
- [Vulnerability Database][trivy-db][^1]
- [Java Index Database][trivy-java-db][^2]
- [Misconfiguration Policies][misconf-policies][^3]
- Cache of previous scans.
The cache option is common to all scanners.
## Clear Caches
The `--clear-cache` option removes caches.
**The scan is not performed.**
```
$ trivy image --clear-cache
```
<details>
<summary>Result</summary>
```
2019-11-15T15:13:26.209+0200 INFO Reopening vulnerability DB
2019-11-15T15:13:26.209+0200 INFO Removing image caches...
```
</details>
## Cache Directory
Specify where the cache is stored with `--cache-dir`.
```
$ trivy --cache-dir /tmp/trivy/ image python:3.4-alpine3.9
```
## Cache Backend
!!! warning "EXPERIMENTAL"
This feature might change without preserving backwards compatibility.
Trivy supports local filesystem and Redis as the cache backend. This option is useful especially for client/server mode.
Two options:
- `fs`
- the cache path can be specified by `--cache-dir`
- `redis://`
- `redis://[HOST]:[PORT]`
- TTL can be configured via `--cache-ttl`
```
$ trivy server --cache-backend redis://localhost:6379
```
If you want to use TLS with Redis, you can enable it by specifying the `--redis-tls` flag.
```shell
$ trivy server --cache-backend redis://localhost:6379 --redis-tls
```
Trivy also supports for connecting to Redis with your certificates.
You need to specify `--redis-ca` , `--redis-cert` , and `--redis-key` options.
```
$ trivy server --cache-backend redis://localhost:6379 \
--redis-ca /path/to/ca-cert.pem \
--redis-cert /path/to/cert.pem \
--redis-key /path/to/key.pem
```
[trivy-db]: ./db.md#vulnerability-database
[trivy-java-db]: ./db.md#java-index-database
[misconf-policies]: ../scanner/misconfiguration/policy/builtin.md
[^1]: Downloaded when scanning for vulnerabilities
[^2]: Downloaded when scanning `jar/war/par/ear` files
[^3]: Downloaded when scanning for misconfigurations

View File

@@ -0,0 +1,72 @@
# DB
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | |
| Secret | |
| License | |
The vulnerability database and the Java index database are needed only for vulnerability scanning.
See [here](../scanner/vulnerability/index.md) for the detail.
## Vulnerability Database
### Skip update of vulnerability DB
If you want to skip downloading the vulnerability database, use the `--skip-db-update` option.
```
$ trivy image --skip-db-update python:3.4-alpine3.9
```
<details>
<summary>Result</summary>
```
2019-05-16T12:48:08.703+0900 INFO Detecting Alpine vulnerabilities...
python:3.4-alpine3.9 (alpine 3.9.2)
===================================
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 0, CRITICAL: 0)
+---------+------------------+----------+-------------------+---------------+--------------------------------+
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
+---------+------------------+----------+-------------------+---------------+--------------------------------+
| openssl | CVE-2019-1543 | MEDIUM | 1.1.1a-r1 | 1.1.1b-r1 | openssl: ChaCha20-Poly1305 |
| | | | | | with long nonces |
+---------+------------------+----------+-------------------+---------------+--------------------------------+
```
</details>
### Only download vulnerability database
You can also ask `Trivy` to simply retrieve the vulnerability database.
This is useful to initialize workers in Continuous Integration systems.
```
$ trivy image --download-db-only
```
### DB Repository
`Trivy` could also download the vulnerability database from an external OCI registry by using `--db-repository` option.
```
$ trivy image --db-repository registry.gitlab.com/gitlab-org/security-products/dependencies/trivy-db
```
## Java Index Database
The same options are also available for the Java index DB, which is used for scanning Java applications.
Skipping an update can be done by using the `--skip-java-db-update` option, while `--download-java-db-only` can be used to only download the Java index DB.
Downloading the Java index DB from an external OCI registry can be done by using the `--java-db-repository` option.
```
$ trivy image --java-db-repository registry.gitlab.com/gitlab-org/security-products/dependencies/trivy-java-db --download-java-db-only
```
## Remove DBs
The `--reset` flag removes all caches and databases.
```
$ trivy image --reset
```

View File

@@ -0,0 +1,410 @@
# Filtering
Trivy provides various methods for filtering the results.
## Hide Unfixed Vulnerabilities
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | |
| 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.
```bash
$ trivy image --ignore-unfixed 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)
+------------------------------+------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
| 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 |
+------------------------------+------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
...
```
</details>
## By Severity
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | ✓ |
Use `--severity` option.
```bash
$ trivy image --severity HIGH,CRITICAL ruby:2.4.0
```
<details>
<summary>Result</summary>
```bash
2019-05-16T01:51:46.255+0900 INFO Updating vulnerability database...
2019-05-16T01:51:49.213+0900 INFO Detecting Debian vulnerabilities...
ruby:2.4.0 (debian 8.7)
=======================
Total: 1785 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 1680, CRITICAL: 105)
+-----------------------------+------------------+----------+---------------------------+----------------------------------+-------------------------------------------------+
| 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... |
+-----------------------------+------------------+----------+---------------------------+----------------------------------+-------------------------------------------------+
| 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 |
+-----------------------------+------------------+ +---------------------------+----------------------------------+-------------------------------------------------+
| binutils | CVE-2017-8421 | | 2.25-5 | | binutils: Memory exhaustion in |
| | | | | | objdump via a crafted PE file |
+ +------------------+ + +----------------------------------+-------------------------------------------------+
| | CVE-2017-14930 | | | | binutils: Memory leak in |
| | | | | | decode_line_info |
+ +------------------+ + +----------------------------------+-------------------------------------------------+
| | CVE-2017-7614 | | | | binutils: NULL |
| | | | | | pointer dereference in |
| | | | | | bfd_elf_final_link function |
+ +------------------+ + +----------------------------------+-------------------------------------------------+
| | CVE-2014-9939 | | | | binutils: buffer overflow in |
| | | | | | ihex.c |
+ +------------------+ + +----------------------------------+-------------------------------------------------+
| | CVE-2017-13716 | | | | binutils: Memory leak with the |
| | | | | | C++ symbol demangler routine |
| | | | | | in libiberty |
+ +------------------+ + +----------------------------------+-------------------------------------------------+
| | CVE-2018-12699 | | | | binutils: heap-based buffer |
| | | | | | overflow in finish_stab in |
| | | | | | stabs.c |
+-----------------------------+------------------+ +---------------------------+----------------------------------+-------------------------------------------------+
| bsdutils | CVE-2015-5224 | | 2.25.2-6 | | util-linux: File name |
| | | | | | collision due to incorrect |
| | | | | | mkstemp use |
+ +------------------+ + +----------------------------------+-------------------------------------------------+
| | CVE-2016-2779 | | | | util-linux: runuser tty hijack |
| | | | | | via TIOCSTI ioctl |
+-----------------------------+------------------+----------+---------------------------+----------------------------------+-------------------------------------------------+
```
</details>
```bash
trivy conf --severity HIGH,CRITICAL examples/misconf/mixed
```
<details>
<summary>Result</summary>
```shell
2022-05-16T13:50:42.718+0100 INFO Detected config files: 3
Dockerfile (dockerfile)
=======================
Tests: 17 (SUCCESSES: 16, FAILURES: 1, EXCEPTIONS: 0)
Failures: 1 (HIGH: 1, CRITICAL: 0)
HIGH: Last USER command in Dockerfile should not be 'root'
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Running containers with 'root' user can lead to a container escape situation. It is a best practice to run containers as non-root users, which can be done by adding a 'USER' statement to the Dockerfile.
See https://avd.aquasec.com/misconfig/ds002
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Dockerfile:3
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
3 [ USER root
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
deployment.yaml (kubernetes)
============================
Tests: 8 (SUCCESSES: 8, FAILURES: 0, EXCEPTIONS: 0)
Failures: 0 (HIGH: 0, CRITICAL: 0)
main.tf (terraform)
===================
Tests: 1 (SUCCESSES: 0, FAILURES: 1, EXCEPTIONS: 0)
Failures: 1 (HIGH: 0, CRITICAL: 1)
CRITICAL: Classic resources should not be used.
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
AWS Classic resources run in a shared environment with infrastructure owned by other AWS customers. You should run
resources in a VPC instead.
See https://avd.aquasec.com/misconfig/avd-aws-0081
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
main.tf:2-4
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2 ┌ resource "aws_db_security_group" "sg" {
3
4}
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
```
</details>
## By Finding IDs
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | |
Use `.trivyignore`.
```bash
$ cat .trivyignore
# Accept the risk
CVE-2018-14618
# Accept the risk until 2023-01-01
CVE-2019-14697 exp:2023-01-01
# No impact in our settings
CVE-2019-1543
# Ignore misconfigurations
AVD-DS-0002
# Ignore secrets
generic-unwanted-rule
aws-account-id
```
```bash
$ trivy image python:3.4-alpine3.9
```
<details>
<summary>Result</summary>
```bash
2019-05-16T12:53:10.076+0900 INFO Updating vulnerability database...
2019-05-16T12:53:28.134+0900 INFO Detecting Alpine vulnerabilities...
python:3.4-alpine3.9 (alpine 3.9.2)
===================================
Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
```
</details>
## By Vulnerability Target
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | |
| Secret | |
| License | |
Use `--vuln-type` option.
```bash
$ trivy image --vuln-type os ruby:2.4.0
```
Available values:
- library
- os
<details>
<summary>Result</summary>
```bash
2019-05-22T19:36:50.530+0200 INFO Updating vulnerability database...
2019-05-22T19:36:51.681+0200 INFO Detecting Alpine vulnerabilities...
2019-05-22T19:36:51.685+0200 INFO Updating npm Security DB...
2019-05-22T19:36:52.389+0200 INFO Detecting npm vulnerabilities...
2019-05-22T19:36:52.390+0200 INFO Updating pipenv Security DB...
2019-05-22T19:36:53.406+0200 INFO Detecting pipenv vulnerabilities...
ruby:2.4.0 (debian 8.7)
=======================
Total: 7 (UNKNOWN: 0, LOW: 1, MEDIUM: 1, HIGH: 3, CRITICAL: 2)
+---------+------------------+----------+-------------------+---------------+----------------------------------+
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
+---------+------------------+----------+-------------------+---------------+----------------------------------+
| curl | CVE-2018-14618 | CRITICAL | 7.61.0-r0 | 7.61.1-r0 | curl: NTLM password overflow |
| | | | | | via integer overflow |
+ +------------------+----------+ +---------------+----------------------------------+
| | CVE-2018-16839 | HIGH | | 7.61.1-r1 | curl: Integer overflow leading |
| | | | | | to heap-based buffer overflow in |
| | | | | | Curl_sasl_create_plain_message() |
+---------+------------------+----------+-------------------+---------------+----------------------------------+
| git | CVE-2018-17456 | HIGH | 2.15.2-r0 | 2.15.3-r0 | git: arbitrary code execution |
| | | | | | via .gitmodules |
+ +------------------+ + + +----------------------------------+
| | CVE-2018-19486 | | | | git: Improper handling of |
| | | | | | PATH allows for commands to be |
| | | | | | executed from... |
+---------+------------------+----------+-------------------+---------------+----------------------------------+
| libssh2 | CVE-2019-3855 | CRITICAL | 1.8.0-r2 | 1.8.1-r0 | libssh2: Integer overflow in |
| | | | | | transport read resulting in |
| | | | | | out of bounds write... |
+---------+------------------+----------+-------------------+---------------+----------------------------------+
| sqlite | CVE-2018-20346 | MEDIUM | 3.21.0-r1 | 3.25.3-r0 | CVE-2018-20505 CVE-2018-20506 |
| | | | | | sqlite: Multiple flaws in |
| | | | | | sqlite which can be triggered |
| | | | | | via... |
+---------+------------------+----------+-------------------+---------------+----------------------------------+
| tar | CVE-2018-20482 | LOW | 1.29-r1 | 1.31-r0 | tar: Infinite read loop in |
| | | | | | sparse_dump_region function in |
| | | | | | sparse.c |
+---------+------------------+----------+-------------------+---------------+----------------------------------+
```
</details>
## By Open Policy Agent
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | |
| License | |
!!! warning "EXPERIMENTAL"
This feature might change without preserving backwards compatibility.
Trivy supports Open Policy Agent (OPA) to filter vulnerabilities.
You can specify a Rego file with `--ignore-policy` option.
The Rego package name must be `trivy` and it must include a rule called `ignore` which determines if each individual vulnerability should be excluded (ignore=true) or not (ignore=false). In the policy, each vulnerability will be available for inspection as the `input` variable. The structure of each vulnerability input is the same as for the Trivy JSON output.
There is a built-in Rego library with helper functions that you can import into your policy using: `import data.lib.trivy`. For more info about the helper functions, look at the library [here][helper]
To get started, see the [example policy][policy].
```bash
$ trivy image --ignore-policy contrib/example_policy/basic.rego centos:7
```
<details>
<summary>Result</summary>
```bash
centos:7 (centos 7.9.2009)
==========================
Total: 9 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 4, CRITICAL: 5)
+--------------+------------------+----------+-------------------+-------------------+-----------------------------------------+
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
+--------------+------------------+----------+-------------------+-------------------+-----------------------------------------+
| glib2 | CVE-2015-8385 | HIGH | 2.56.1-7.el7 | | pcre: buffer overflow caused |
| | | | | | by named forward reference |
| | | | | | to duplicate group number... |
| | | | | | -->avd.aquasec.com/nvd/cve-2015-8385 |
+ +------------------+ + +-------------------+-----------------------------------------+
| | CVE-2016-3191 | | | | pcre: workspace overflow for |
| | | | | | (*ACCEPT) with deeply nested |
| | | | | | parentheses (8.39/13, 10.22/12) |
| | | | | | -->avd.aquasec.com/nvd/cve-2016-3191 |
+ +------------------+ + +-------------------+-----------------------------------------+
| | CVE-2021-27219 | | | 2.56.1-9.el7_9 | glib: integer overflow in |
| | | | | | g_bytes_new function on |
| | | | | | 64-bit platforms due to an... |
| | | | | | -->avd.aquasec.com/nvd/cve-2021-27219 |
+--------------+------------------+----------+-------------------+-------------------+-----------------------------------------+
| glibc | CVE-2019-1010022 | CRITICAL | 2.17-317.el7 | | glibc: stack guard protection bypass |
| | | | | | -->avd.aquasec.com/nvd/cve-2019-1010022 |
+--------------+ + + +-------------------+ +
| glibc-common | | | | | |
| | | | | | |
+--------------+------------------+ +-------------------+-------------------+-----------------------------------------+
| nss | CVE-2021-43527 | | 3.53.1-3.el7_9 | 3.67.0-4.el7_9 | nss: Memory corruption in |
| | | | | | decodeECorDsaSignature with |
| | | | | | DSA signatures (and RSA-PSS) |
| | | | | | -->avd.aquasec.com/nvd/cve-2021-43527 |
+--------------+ + + + + +
| nss-sysinit | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
+--------------+ + + + + +
| nss-tools | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
+--------------+------------------+----------+-------------------+-------------------+-----------------------------------------+
| openssl-libs | CVE-2020-1971 | HIGH | 1:1.0.2k-19.el7 | 1:1.0.2k-21.el7_9 | openssl: EDIPARTYNAME |
| | | | | | NULL pointer de-reference |
| | | | | | -->avd.aquasec.com/nvd/cve-2020-1971 |
+--------------+------------------+----------+-------------------+-------------------+-----------------------------------------+
```
</details>
[helper]: https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/pkg/result/module.go
[policy]: https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/contrib/example_policy
## By Inline Comments
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | |
| Misconfiguration | ✓ |
| Secret | |
| License | |
Some configuration file formats (e.g. Terraform) support inline comments.
In cases where trivy can detect comments of a specific format immediately adjacent to resource definitions, it is possible to filter/ignore findings from a single point of resource definition (in contrast to `.trivyignore`, which has a directory-wide scope on all of the files scanned).
The format for these comments is `trivy:ignore:<Vulnerability ID>` immediately following the format-specific line-comment token.
For example, to filter a Vulnerability ID "AVD-GCP-0051" in a Terraform HCL file:
```terraform
#trivy:ignore:AVD-GCP-0051
resource "google_container_cluster" "one_off_test" {
name = var.cluster_name
location = var.region
}
```

View File

@@ -0,0 +1,31 @@
# Configuration
Trivy can be configured using the following ways. Each item takes precedence over the item below it:
- CLI flags
- Environment variables
- Configuration file
## CLI Flags
You can view the list of available flags using the `--help` option.
For more details, please refer to [the CLI reference](../references/configuration/cli/trivy.md).
## Environment Variables
Trivy can be customized by environment variables.
The environment variable key is the flag name converted by the following procedure.
- Add `TRIVY_` prefix
- Make it all uppercase
- Replace `-` with `_`
For example,
- `--debug` => `TRIVY_DEBUG`
- `--cache-dir` => `TRIVY_CACHE_DIR`
```
$ TRIVY_DEBUG=true TRIVY_SEVERITY=CRITICAL trivy image alpine:3.15
```
## Configuration File
By default, Trivy reads the `trivy.yaml` file.
For more details, please refer to [the page](../references/configuration/config-file.md).

View File

@@ -0,0 +1,119 @@
# Others
## Enable/Disable Scanners
You can enable/disable scanners with the `--scanners` flag.
Supported values:
- vuln
- config
- secret
- license
For example, container image scanning enables vulnerability and secret scanners by default.
If you don't need secret scanning, it can be disabled.
``` shell
$ trivy image --scanners vuln alpine:3.15
```
## Exit Code
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | ✓ |
By default, `Trivy` exits with code 0 even when security issues are detected.
Use the `--exit-code` option if you want to exit with a non-zero exit code.
```
$ trivy image --exit-code 1 python:3.4-alpine3.9
```
<details>
<summary>Result</summary>
```
2019-05-16T12:51:43.500+0900 INFO Updating vulnerability database...
2019-05-16T12:52:00.387+0900 INFO Detecting Alpine vulnerabilities...
python:3.4-alpine3.9 (alpine 3.9.2)
===================================
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 0, CRITICAL: 0)
+---------+------------------+----------+-------------------+---------------+--------------------------------+
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
+---------+------------------+----------+-------------------+---------------+--------------------------------+
| openssl | CVE-2019-1543 | MEDIUM | 1.1.1a-r1 | 1.1.1b-r1 | openssl: ChaCha20-Poly1305 |
| | | | | | with long nonces |
+---------+------------------+----------+-------------------+---------------+--------------------------------+
```
</details>
This option is useful for CI/CD. In the following example, the test will fail only when a critical vulnerability is found.
```
$ trivy image --exit-code 0 --severity MEDIUM,HIGH ruby:2.4.0
$ trivy image --exit-code 1 --severity CRITICAL ruby:2.4.0
```
## Exit on EOL
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | |
| Secret | |
| License | |
Sometimes you may surprisingly get 0 vulnerabilities in an old image:
- Enabling `--ignore-unfixed` option while all packages have no fixed versions.
- Scanning a rather outdated OS (e.g. Ubuntu 10.04).
An OS at the end of service/life (EOL) usually gets into this situation, which is definitely full of vulnerabilities.
`--exit-on-eol` can fail scanning on EOL OS with a non-zero code.
This flag is available with the following targets.
- Container images (`trivy image`)
- Virtual machine images (`trivy vm`)
- SBOM (`trivy sbom`)
- Root filesystem (`trivy rootfs`)
```
$ trivy image --exit-on-eol 1 alpine:3.10
```
<details>
<summary>Result</summary>
```
2023-03-01T11:07:15.455+0200 INFO Vulnerability scanning is enabled
...
2023-03-01T11:07:17.938+0200 WARN This OS version is no longer supported by the distribution: alpine 3.10.9
2023-03-01T11:07:17.938+0200 WARN The vulnerability detection may be insufficient because security updates are not provided
alpine:3.10 (alpine 3.10.9)
===========================
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 1)
┌───────────┬────────────────┬──────────┬───────────────────┬───────────────┬─────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │
├───────────┼────────────────┼──────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
│ apk-tools │ CVE-2021-36159 │ CRITICAL │ 2.10.6-r0 │ 2.10.7-r0 │ libfetch before 2021-07-26, as used in apk-tools, xbps, and │
│ │ │ │ │ │ other products, mishandles... │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-36159 │
└───────────┴────────────────┴──────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────────┘
2023-03-01T11:07:17.941+0200 ERROR Detected EOL OS: alpine 3.10.9
```
</details>
This option is useful for CI/CD.
The following example will fail when a critical vulnerability is found or the OS is EOSL:
```
$ trivy image --exit-code 1 --exit-on-eol 1 --severity CRITICAL alpine:3.16.3
```

View File

@@ -0,0 +1,389 @@
# Reporting
## Supported Formats
Trivy supports the following formats:
- Table
- JSON
- [SARIF](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning)
- Template
- SBOM
### Table (Default)
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | ✓ |
```
$ trivy image -f table golang:1.12-alpine
```
#### Show origins of vulnerable dependencies
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | |
| Secret | |
| License | |
!!! warning "EXPERIMENTAL"
This feature might change without preserving backwards compatibility.
Modern software development relies on the use of third-party libraries.
Third-party dependencies also depend on others so a list of dependencies can be represented as a dependency graph.
In some cases, vulnerable dependencies are not linked directly, and it requires analyses of the tree.
To make this task simpler Trivy can show a dependency origin tree with the `--dependency-tree` flag.
This flag is only available with the `--format table` flag.
The following packages/languages are currently supported:
- OS packages
- apk
- dpkg
- rpm
- Node.js
- npm: package-lock.json
- pnpm: pnpm-lock.yaml
- yarn: yarn.lock
- .NET
- NuGet: packages.lock.json
- Python
- Poetry: poetry.lock
- Ruby
- Bundler: Gemfile.lock
- Rust
- Binaries built with [cargo-auditable][cargo-auditable]
- Go
- Modules: go.mod
- PHP
- Composer
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.
In table output, it looks like:
```sh
$ trivy fs --severity HIGH,CRITICAL --dependency-tree /path/to/your_node_project
package-lock.json (npm)
=======================
Total: 2 (HIGH: 1, CRITICAL: 1)
┌──────────────────┬────────────────┬──────────┬───────────────────┬───────────────┬────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │
├──────────────────┼────────────────┼──────────┼───────────────────┼───────────────┼────────────────────────────────────────────────────────────┤
│ follow-redirects │ CVE-2022-0155 │ HIGH │ 1.14.6 │ 1.14.7 │ follow-redirects: Exposure of Private Personal Information │
│ │ │ │ │ │ to an Unauthorized Actor │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-0155 │
├──────────────────┼────────────────┼──────────┼───────────────────┼───────────────┼────────────────────────────────────────────────────────────┤
│ glob-parent │ CVE-2020-28469 │ CRITICAL │ 3.1.0 │ 5.1.2 │ nodejs-glob-parent: Regular expression denial of service │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2020-28469 │
└──────────────────┴────────────────┴──────────┴───────────────────┴───────────────┴────────────────────────────────────────────────────────────┘
Dependency Origin Tree (Reversed)
=================================
package-lock.json
├── follow-redirects@1.14.6, (HIGH: 1, CRITICAL: 0)
│ └── axios@0.21.4
└── glob-parent@3.1.0, (HIGH: 0, CRITICAL: 1)
└── chokidar@2.1.8
└── watchpack-chokidar2@2.0.1
└── watchpack@1.7.5
└── webpack@4.46.0
└── cra-append-sw@2.7.0
```
Vulnerable dependencies are shown in the top level of the tree.
Lower levels show how those vulnerabilities are introduced.
In the example above **axios@0.21.4** included in the project directly depends on the vulnerable **follow-redirects@1.14.6**.
Also, **glob-parent@3.1.0** with some vulnerabilities is included through chain of dependencies that is added by **cra-append-sw@2.7.0**.
Then, you can try to update **axios@0.21.4** and **cra-append-sw@2.7.0** to resolve vulnerabilities in **follow-redirects@1.14.6** and **glob-parent@3.1.0**.
### JSON
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | ✓ |
```
$ trivy image -f json -o results.json golang:1.12-alpine
```
<details>
<summary>Result</summary>
```
2019-05-16T01:46:31.777+0900 INFO Updating vulnerability database...
2019-05-16T01:47:03.007+0900 INFO Detecting Alpine vulnerabilities...
```
</details>
<details>
<summary>JSON</summary>
```
[
{
"Target": "php-app/composer.lock",
"Vulnerabilities": null
},
{
"Target": "node-app/package-lock.json",
"Vulnerabilities": [
{
"VulnerabilityID": "CVE-2018-16487",
"PkgName": "lodash",
"InstalledVersion": "4.17.4",
"FixedVersion": "\u003e=4.17.11",
"Title": "lodash: Prototype pollution in utilities function",
"Description": "A prototype pollution vulnerability was found in lodash \u003c4.17.11 where the functions merge, mergeWith, and defaultsDeep can be tricked into adding or modifying properties of Object.prototype.",
"Severity": "HIGH",
"References": [
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16487",
]
}
]
},
{
"Target": "trivy-ci-test (alpine 3.7.1)",
"Vulnerabilities": [
{
"VulnerabilityID": "CVE-2018-16840",
"PkgName": "curl",
"InstalledVersion": "7.61.0-r0",
"FixedVersion": "7.61.1-r1",
"Title": "curl: Use-after-free when closing \"easy\" handle in Curl_close()",
"Description": "A heap use-after-free flaw was found in curl versions from 7.59.0 through 7.61.1 in the code related to closing an easy handle. ",
"Severity": "HIGH",
"References": [
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16840",
]
},
{
"VulnerabilityID": "CVE-2019-3822",
"PkgName": "curl",
"InstalledVersion": "7.61.0-r0",
"FixedVersion": "7.61.1-r2",
"Title": "curl: NTLMv2 type-3 header stack buffer overflow",
"Description": "libcurl versions from 7.36.0 to before 7.64.0 are vulnerable to a stack-based buffer overflow. ",
"Severity": "HIGH",
"References": [
"https://curl.haxx.se/docs/CVE-2019-3822.html",
"https://lists.apache.org/thread.html/8338a0f605bdbb3a6098bb76f666a95fc2b2f53f37fa1ecc89f1146f@%3Cdevnull.infra.apache.org%3E"
]
},
{
"VulnerabilityID": "CVE-2018-16839",
"PkgName": "curl",
"InstalledVersion": "7.61.0-r0",
"FixedVersion": "7.61.1-r1",
"Title": "curl: Integer overflow leading to heap-based buffer overflow in Curl_sasl_create_plain_message()",
"Description": "Curl versions 7.33.0 through 7.61.1 are vulnerable to a buffer overrun in the SASL authentication code that may lead to denial of service.",
"Severity": "HIGH",
"References": [
"https://github.com/curl/curl/commit/f3a24d7916b9173c69a3e0ee790102993833d6c5",
]
},
{
"VulnerabilityID": "CVE-2018-19486",
"PkgName": "git",
"InstalledVersion": "2.15.2-r0",
"FixedVersion": "2.15.3-r0",
"Title": "git: Improper handling of PATH allows for commands to be executed from the current directory",
"Description": "Git before 2.19.2 on Linux and UNIX executes commands from the current working directory (as if '.' were at the end of $PATH) in certain cases involving the run_command() API and run-command.c, because there was a dangerous change from execvp to execv during 2017.",
"Severity": "HIGH",
"References": [
"https://usn.ubuntu.com/3829-1/",
]
},
{
"VulnerabilityID": "CVE-2018-17456",
"PkgName": "git",
"InstalledVersion": "2.15.2-r0",
"FixedVersion": "2.15.3-r0",
"Title": "git: arbitrary code execution via .gitmodules",
"Description": "Git before 2.14.5, 2.15.x before 2.15.3, 2.16.x before 2.16.5, 2.17.x before 2.17.2, 2.18.x before 2.18.1, and 2.19.x before 2.19.1 allows remote code execution during processing of a recursive \"git clone\" of a superproject if a .gitmodules file has a URL field beginning with a '-' character.",
"Severity": "HIGH",
"References": [
"http://www.securitytracker.com/id/1041811",
]
}
]
},
{
"Target": "python-app/Pipfile.lock",
"Vulnerabilities": null
},
{
"Target": "ruby-app/Gemfile.lock",
"Vulnerabilities": null
},
{
"Target": "rust-app/Cargo.lock",
"Vulnerabilities": null
}
]
```
</details>
`VulnerabilityID`, `PkgName`, `InstalledVersion`, and `Severity` in `Vulnerabilities` are always filled with values, but other fields might be empty.
### SARIF
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | |
[SARIF][sarif] can be generated with the `--format sarif` flag.
```
$ trivy image --format sarif -o report.sarif golang:1.12-alpine
```
This SARIF file can be uploaded to GitHub code scanning results, and there is a [Trivy GitHub Action][action] for automating this process.
### Template
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | ✓ |
#### Custom Template
{% raw %}
```
$ trivy image --format template --template "{{ range . }} {{ .Target }} {{ end }}" golang:1.12-alpine
```
{% endraw %}
<details>
<summary>Result</summary>
```
2020-01-02T18:02:32.856+0100 INFO Detecting Alpine vulnerabilities...
golang:1.12-alpine (alpine 3.10.2)
```
</details>
You can compute different figures within the template using [sprig][sprig] functions.
As an example you can summarize the different classes of issues:
{% raw %}
```
$ trivy image --format template --template '{{- $critical := 0 }}{{- $high := 0 }}{{- range . }}{{- range .Vulnerabilities }}{{- if eq .Severity "CRITICAL" }}{{- $critical = add $critical 1 }}{{- end }}{{- if eq .Severity "HIGH" }}{{- $high = add $high 1 }}{{- end }}{{- end }}{{- end }}Critical: {{ $critical }}, High: {{ $high }}' golang:1.12-alpine
```
{% endraw %}
<details>
<summary>Result</summary>
```
Critical: 0, High: 2
```
</details>
For other features of sprig, see the official [sprig][sprig] documentation.
#### Load templates from a file
You can load templates from a file prefixing the template path with an @.
```
$ trivy image --format template --template "@/path/to/template" golang:1.12-alpine
```
#### Default Templates
If Trivy is installed using rpm then default templates can be found at `/usr/local/share/trivy/templates`.
##### JUnit
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | |
| License | |
In the following example using the template `junit.tpl` XML can be generated.
```
$ trivy image --format template --template "@contrib/junit.tpl" -o junit-report.xml golang:1.12-alpine
```
##### ASFF
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | |
Trivy also supports an [ASFF template for reporting findings to AWS Security Hub][asff]
##### HTML
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | |
| License | |
```
$ trivy image --format template --template "@contrib/html.tpl" -o report.html golang:1.12-alpine
```
The following example shows use of default HTML template when Trivy is installed using rpm.
```
$ trivy image --format template --template "@/usr/local/share/trivy/templates/html.tpl" -o report.html golang:1.12-alpine
```
### SBOM
See [here](../supply-chain/sbom.md) for details.
## Converting
To generate multiple reports, you can generate the JSON report first and convert it to other formats with the `convert` subcommand.
```shell
$ trivy image --format json -o result.json --list-all-pkgs debian:11
$ trivy convert --format cyclonedx --output result.cdx result.json
```
!!! note
Please note that if you want to convert to a format that requires a list of packages,
such as SBOM, you need to add the `--list-all-pkgs` flag when outputting in JSON.
[Filtering options](./filtering.md) such as `--severity` are also available with `convert`.
```shell
# Output all severities in JSON
$ trivy image --format json -o result.json --list-all-pkgs debian:11
# Output only critical issues in table format
$ trivy convert --format table --severity CRITICAL result.json
```
!!! note
JSON reports from "trivy aws" and "trivy k8s" are not yet supported.
[cargo-auditable]: https://github.com/rust-secure-code/cargo-auditable/
[action]: https://github.com/aquasecurity/trivy-action
[asff]: ../../tutorials/integrations/aws-security-hub.md
[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/

View File

@@ -0,0 +1,85 @@
# Skipping Files and Directories
This section details ways to specify the files and directories that Trivy should not scan.
## Skip Files
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | ✓ |
By default, Trivy traverses directories and searches for all necessary files for scanning.
You can skip files that you don't maintain using the `--skip-files` flag.
```
$ trivy image --skip-files "/Gemfile.lock" --skip-files "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0/Gemfile.lock" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
```
It's possible to specify globs as part of the value.
```bash
$ trivy image --skip-files "./testdata/*/bar" .
```
Will skip any file named `bar` in the subdirectories of testdata.
## Skip Directories
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | ✓ |
| License | ✓ |
By default, Trivy traverses directories and searches for all necessary files for scanning.
You can skip directories that you don't maintain using the `--skip-dirs` flag.
```
$ trivy image --skip-dirs /var/lib/gems/2.5.0/gems/fluent-plugin-detect-exceptions-0.0.13 --skip-dirs "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
```
It's possible to specify globs as part of the value.
```bash
$ trivy image --skip-dirs "./testdata/*" .
```
Will skip all subdirectories of the testdata directory.
!!! tip
Glob patterns work with any trivy subcommand (image, config, etc.) and can be specified to skip both directories (with `--skip-dirs`) and files (with `--skip-files`).
### Advanced globbing
Trivy also supports the [globstar](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Pattern-Matching) pattern matching.
```bash
$ trivy image --skip-files "**/foo" image:tag
```
Will skip the file `foo` that happens to be nested under any parent(s).
## File patterns
| Scanner | Supported |
|:----------------:|:---------:|
| Vulnerability | ✓ |
| Misconfiguration | ✓ |
| Secret | |
| License | |
When a directory is given as an input, Trivy will recursively look for and test all files based on file patterns.
The default file patterns are [here](../scanner/misconfiguration/custom/index.md).
In addition to the default file patterns, the `--file-patterns` option takes regexp patterns to look for your files.
For example, it may be useful when your file name of Dockerfile doesn't match the default patterns.
This can be repeated for specifying multiple file patterns.
A file pattern contains the analyzer it is used for, and the pattern itself, joined by a semicolon. For example:
```
--file-patterns "dockerfile:.*.docker" --file-patterns "kubernetes:*.tpl" --file-patterns "pip:requirements-.*\.txt"
```
The prefixes are listed [here](https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/pkg/fanal/analyzer/const.go)

5
docs/docs/index.md Normal file
View File

@@ -0,0 +1,5 @@
# Docs
In this section you can find the complete reference documentation for all of the different features and settings that Trivy has to offer.
👈 Please use the side-navigation on the left in order to browse the different topics.

View File

@@ -0,0 +1,60 @@
## trivy
Unified security scanner
### Synopsis
Scanner for vulnerabilities in container images, file systems, and Git repositories, as well as for configuration issues and hard-coded secrets
```
trivy [global flags] command [flags] target
```
### Examples
```
# Scan a container image
$ trivy image python:3.4-alpine
# Scan a container image from a tar archive
$ trivy image --input ruby-3.1.tar
# Scan local filesystem
$ trivy fs .
# Run in server mode
$ trivy server
```
### Options
```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
-f, --format string version format (json)
--generate-default-config write the default config to trivy-default.yaml
-h, --help help for trivy
--insecure allow insecure server connections
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```
### SEE ALSO
* [trivy aws](trivy_aws.md) - [EXPERIMENTAL] Scan AWS account
* [trivy config](trivy_config.md) - Scan config files for misconfigurations
* [trivy convert](trivy_convert.md) - Convert Trivy JSON report into a different format
* [trivy filesystem](trivy_filesystem.md) - Scan local filesystem
* [trivy image](trivy_image.md) - Scan a container image
* [trivy kubernetes](trivy_kubernetes.md) - [EXPERIMENTAL] Scan kubernetes cluster
* [trivy module](trivy_module.md) - Manage modules
* [trivy plugin](trivy_plugin.md) - Manage plugins
* [trivy repository](trivy_repository.md) - Scan a remote repository
* [trivy rootfs](trivy_rootfs.md) - Scan rootfs
* [trivy sbom](trivy_sbom.md) - Scan SBOM for vulnerabilities
* [trivy server](trivy_server.md) - Server mode
* [trivy version](trivy_version.md) - Print the version
* [trivy vm](trivy_vm.md) - [EXPERIMENTAL] Scan a virtual machine image

View File

@@ -0,0 +1,118 @@
## trivy aws
[EXPERIMENTAL] Scan AWS account
### Synopsis
Scan an AWS account for misconfigurations. Trivy uses the same authentication methods as the AWS CLI. See https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
The following services are supported:
- accessanalyzer
- api-gateway
- athena
- cloudfront
- cloudtrail
- cloudwatch
- codebuild
- documentdb
- dynamodb
- ec2
- ecr
- ecs
- efs
- eks
- elasticache
- elasticsearch
- elb
- emr
- iam
- kinesis
- kms
- lambda
- mq
- msk
- neptune
- rds
- redshift
- s3
- sns
- sqs
- ssm
- workspaces
```
trivy aws [flags]
```
### Examples
```
# basic scanning
$ trivy aws --region us-east-1
# limit scan to a single service:
$ trivy aws --region us-east-1 --service s3
# limit scan to multiple services:
$ trivy aws --region us-east-1 --service s3 --service ec2
# force refresh of cache for fresh results
$ trivy aws --region us-east-1 --update-cache
```
### 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
--skip-service strings Skip selected AWS Service(s) specified with this flag. Can specify multiple services using --skip-service A --skip-service B etc.
-t, --template string output template
--tf-vars strings specify paths to override the Terraform tfvars files
--trace enable more verbose trace output for custom queries
--update-cache Update the cache for the applicable cloud provider instead of using cached results.
```
### Options inherited from parent commands
```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
--generate-default-config write the default config to trivy-default.yaml
--insecure allow insecure server connections
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```
### SEE ALSO
* [trivy](trivy.md) - Unified security scanner

View File

@@ -0,0 +1,67 @@
## trivy config
Scan config files for misconfigurations
```
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.
```
### Options inherited from parent commands
```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
--generate-default-config write the default config to trivy-default.yaml
--insecure allow insecure server connections
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```
### SEE ALSO
* [trivy](trivy.md) - Unified security scanner

View File

@@ -0,0 +1,52 @@
## trivy convert
Convert Trivy JSON report into a different format
```
trivy convert [flags] RESULT_JSON
```
### Examples
```
# report conversion
$ trivy image --format json --output result.json --list-all-pkgs debian:11
$ trivy convert --format cyclonedx --output result.cdx result.json
```
### Options
```
--compliance string compliance report to generate
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--exit-code int specify exit code when any security issues are found
--exit-on-eol int exit with the specified code when the OS reaches end of service/life
-f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
-h, --help help for convert
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignorefile string specify .trivyignore file (default ".trivyignore")
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
-o, --output string output file name
--report string specify a report format for the output. (all,summary) (default "all")
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
-t, --template string output template
```
### Options inherited from parent commands
```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
--generate-default-config write the default config to trivy-default.yaml
--insecure allow insecure server connections
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```
### SEE ALSO
* [trivy](trivy.md) - Unified security scanner

View File

@@ -0,0 +1,103 @@
## trivy filesystem
Scan local filesystem
```
trivy filesystem [flags] PATH
```
### Examples
```
# Scan a local project including language-specific files
$ trivy fs /path/to/your_project
# Scan a single file
$ trivy fs ./trivy-ci-test/Pipfile.lock
```
### 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-dev-deps include development dependencies in the report (supported: npm)
--include-non-failures include successes and exceptions, available with '--scanners config'
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--license-confidence-level float specify license classifier's confidence level (default 0.9)
--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])
```
### Options inherited from parent commands
```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
--generate-default-config write the default config to trivy-default.yaml
--insecure allow insecure server connections
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```
### SEE ALSO
* [trivy](trivy.md) - Unified security scanner

View File

@@ -0,0 +1,124 @@
## trivy image
Scan a container image
```
trivy image [flags] IMAGE_NAME
```
### Examples
```
# Scan a container image
$ trivy image python:3.4-alpine
# Scan a container image from a tar archive
$ trivy image --input ruby-3.1.tar
# Filter by severities
$ trivy image --severity HIGH,CRITICAL alpine:3.15
# Ignore unfixed/unpatched vulnerabilities
$ trivy image --ignore-unfixed alpine:3.15
# Scan a container image in client mode
$ trivy image --server http://127.0.0.1:4954 alpine:latest
# Generate json result
$ trivy image --format json --output result.json alpine:3.15
# Generate a report in the CycloneDX format
$ trivy image --format cyclonedx --output result.cdx alpine:3.15
```
### 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])
```
### Options inherited from parent commands
```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
--generate-default-config write the default config to trivy-default.yaml
--insecure allow insecure server connections
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```
### SEE ALSO
* [trivy](trivy.md) - Unified security scanner

View File

@@ -0,0 +1,112 @@
## trivy kubernetes
[EXPERIMENTAL] Scan kubernetes cluster
```
trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg: pods, pod/NAME }
```
### Examples
```
# cluster scanning
$ trivy k8s --report summary cluster
# namespace scanning:
$ trivy k8s -n kube-system --report summary all
# resources scanning:
$ trivy k8s --report=summary deploy
$ trivy k8s --namespace=kube-system --report=summary deploy,configmaps
# resource scanning:
$ trivy k8s deployment/orion
```
### Options
```
-A, --all-namespaces fetch resources from all cluster namespaces
--cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
--cache-ttl duration cache TTL when using redis as cache backend
--clear-cache clear image caches without scanning
--compliance string compliance report to generate (k8s-nsa,k8s-cis, k8s-pss-baseline, k8s-pss-restricted)
--components strings specify which components to scan (default [workload,infra])
--config-data strings specify paths from which data for the Rego policies will be recursively loaded
--config-policy strings specify paths to the Rego policy files directory, applying config files
--context string specify a context to scan
--db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
--dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
--download-db-only download/update vulnerability database but don't run a scan
--download-java-db-only download/update Java index database but don't run a scan
--exclude-nodes strings indicate the node labels that the node-collector job should exclude from scanning (example: kubernetes.io/arch:arm64,team:dev)
--exit-code int specify exit code when any security issues are found
--file-patterns strings specify config file patterns
-f, --format string format (table, json, cyclonedx) (default "table")
--helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--helm-values strings specify paths to override the Helm values.yaml files
-h, --help help for kubernetes
--ignore-policy string specify the Rego file path to evaluate each vulnerability
--ignore-unfixed display only fixed vulnerabilities
--ignorefile string specify .trivyignore file (default ".trivyignore")
--image-src strings image source(s) to use, in priority order (docker,containerd,podman,remote) (default [docker,containerd,podman,remote])
--include-non-failures include successes and exceptions, available with '--scanners config'
--java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
--k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
--kubeconfig string specify the kubeconfig file path to use
--list-all-pkgs enabling the option will output all packages regardless of vulnerability
-n, --namespace string specify a namespace to scan
--no-progress suppress progress bar
--node-collector-namespace string specify the namespace in which the node-collector job should be deployed (default "trivy-temp")
--offline-scan do not issue API requests to identify dependencies
-o, --output string output file name
--parallel int number (between 1-20) of goroutines enabled for parallel scanning (default 5)
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
--policy-namespaces strings Rego namespaces
--redis-ca string redis ca file location, if using redis as cache backend
--redis-cert string redis certificate file location, if using redis as cache backend
--redis-key string redis key file location, if using redis as cache backend
--redis-tls enable redis TLS with public certificates, if using redis as cache backend
--registry-token string registry token
--rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
--report string specify a report format for the output. (all,summary) (default "all")
--reset remove all caches and database
--reset-policy-bundle remove policy bundle
--sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
--scanners string comma-separated list of what security issues to detect (vuln,config,secret,license) (default "vuln,config,secret,rbac")
--secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
-s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
--skip-db-update skip updating vulnerability database
--skip-dirs strings specify the directories where the traversal is skipped
--skip-files strings specify the file paths to skip traversal
--skip-java-db-update skip updating Java index database
--skip-policy-update skip fetching rego policy updates
--slow scan over time with lower CPU and memory utilization
-t, --template string output template
--tf-vars strings specify paths to override the Terraform tfvars files
--tolerations strings specify node-collector job tolerations (example: key1=value1:NoExecute,key2=value2:NoSchedule)
--trace enable more verbose trace output for custom queries
--username strings username. Comma-separated usernames allowed.
--vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
```
### Options inherited from parent commands
```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
--generate-default-config write the default config to trivy-default.yaml
--insecure allow insecure server connections
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```
### SEE ALSO
* [trivy](trivy.md) - Unified security scanner

View File

@@ -0,0 +1,31 @@
## trivy module
Manage modules
### Options
```
--enable-modules strings [EXPERIMENTAL] module names to enable
-h, --help help for module
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
```
### Options inherited from parent commands
```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
--generate-default-config write the default config to trivy-default.yaml
--insecure allow insecure server connections
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```
### SEE ALSO
* [trivy](trivy.md) - Unified security scanner
* [trivy module install](trivy_module_install.md) - Install a module
* [trivy module uninstall](trivy_module_uninstall.md) - Uninstall a module

View File

@@ -0,0 +1,33 @@
## trivy module install
Install a module
```
trivy module install [flags] REPOSITORY
```
### Options
```
-h, --help help for install
```
### Options inherited from parent commands
```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
--enable-modules strings [EXPERIMENTAL] module names to enable
--generate-default-config write the default config to trivy-default.yaml
--insecure allow insecure server connections
--module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules")
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```
### SEE ALSO
* [trivy module](trivy_module.md) - Manage modules

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