48 Commits

Author SHA1 Message Date
Teppei Fukuda
cbad9ca3a8 feat(report): add fingerprint generation for vulnerabilities (#9794)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2025-11-17 07:23:43 +00:00
Teppei Fukuda
6fb3fde916 feat(report): switch ReportID from UUIDv4 to UUIDv7 (#9749) 2025-11-05 09:42:14 +00:00
Teppei Fukuda
a6010c3eda test: improve golden file management in integration tests (#9699) 2025-10-24 07:49:29 +00:00
Teppei Fukuda
a9a3031675 feat(image): add RepoTags support for Docker archives (#9690)
Co-authored-by: knqyf263 <knqyf263@users.noreply.github.com>
2025-10-22 06:50:13 +00:00
Teppei Fukuda
cd7c595e4a test: include integration tests in linting and fix all issues (#9060) 2025-06-24 13:09:15 +00:00
Teppei Fukuda
3f41ffa5b8 chore(deps): update Docker to v28.2.2 and fix compatibility issues (#9037) 2025-06-19 07:44:06 +00:00
simar7
3b2a3976ac feat(misconf): Add support for Minimum Trivy Version (#8880)
Signed-off-by: Simar <simar@linux.com>
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
Co-authored-by: nikpivkin <nikita.pivkin@smartforce.io>
2025-05-28 21:22:21 +00:00
DmitriyLewen
6aff7b0c4f refactor(db): change logic to detect wrong DB (#8864) 2025-05-19 05:01:50 +00:00
DmitriyLewen
a95cab0eab feat(image): save layers metadata into report (#8394)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2025-04-23 16:31:43 +00:00
DmitriyLewen
0d3d934f76 test: change branch in spdx schema link to check in integration tests (#7935) 2024-11-18 06:25:58 +00:00
afdesk
5dd94ebc1f fix(sbom): export bom-ref when converting a package to a component (#7340)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: amf <amf@macbook.local>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2024-09-19 05:17:42 +00:00
Teppei Fukuda
88ba46047c feat(vex): VEX Repository support (#7206)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
2024-07-25 12:18:37 +00:00
Teppei Fukuda
fc6b3a760b refactor: pass DB dir to trivy-db (#7057)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2024-07-02 04:32:46 +00:00
Teppei Fukuda
e493fc931a refactor: delete db mock (#6940)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2024-06-20 04:51:57 +00:00
Matthieu MOREL
bbaf5952bc ci(deps): enable require-error rule from testifylint linter (#6718)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-05-20 07:12:43 +00:00
Teppei Fukuda
998f750432 feat: introduce package UIDs for improved vulnerability mapping (#6583)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2024-05-03 11:14:34 +00:00
Teppei Fukuda
59e54334d1 fix(cli): inconsistent behavior across CLI flags, environment variables, and config files (#5843)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2024-02-01 03:25:30 +00:00
Teppei Fukuda
da597c479c refactor: propagate time through context values (#5858)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
2024-01-03 09:43:45 +00:00
Y.Horie
f4dd062f58 feat(report): Add CreatedAt to the JSON report. (#5542) (#5549)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-11-15 04:11:09 +00:00
Nikita Pivkin
9ebc25d88b test: validate SPDX with the JSON schema (#5124)
* test: validate SPDX with the JSON schema

* use the SPDX schema version based on the document version

* additionally validate the document using spdx
2023-09-14 06:10:09 +00:00
DmitriyLewen
c04f234fa4 fix(sbom): cyclonedx advisory should omit null value (#5041)
* return nil for advisories, if len of refs == 0
add marshal test

* add integration test for cyclonedx with vulns

* use existing testcase

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

* test(integration): add sorting cyclonedx vulns
2023-08-31 10:16:34 +00:00
Nikita Pivkin
d442176405 feat(server): add version endpoint (#4869)
* feat(server): add version endpoint

* fix panic and test

* move version.go

* move version variable

* add docs about endpoints

* move testdata

* refactor

* update build command

* refactor
2023-08-20 06:12:31 +00:00
Teppei Fukuda
d3a34e409c test: validate CycloneDX with the JSON schema (#4956)
* test: validate CycloneDX with the JSON schema

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

* use license.Name instead of Expression

* update tests

* test: add uuid package

* test: compare UUID

---------

Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
2023-08-08 12:51:10 +00:00
Teppei Fukuda
d19c7d9f29 feat(repo): support local repositories (#4890)
* feat(repo): support local repositories

* fix tests

* test: fix client/server tests

* docs: update

* test: add fs tests

* test: do not update golden files if overridden

* docs: remove a comment about fs deprecation
2023-07-31 11:27:36 +00:00
DmitriyLewen
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
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
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
DmitriyLewen
12b563b974 BREAKING: use normalized trivy-java-db (#3583)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2023-02-10 02:16:37 +02:00
Teppei Fukuda
60bddae64c fix(test): sort cyclonedx components (#3468) 2023-01-22 14:21:20 +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
Masahiro331
22d92e4ad6 feat: add virtual machine scan command (#2910)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
2022-11-27 11:45:00 +02: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
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
Teppei Fukuda
7cecade3a1 feat: add support for WASM modules (#2195) 2022-06-15 15:23:00 +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
Teppei Fukuda
11f4f81123 refactor: move result structs under types (#1696) 2022-02-09 19:31:12 +02:00
Teppei Fukuda
e65274e0ef BREAKING: Trivy DB from GHCR (#1539) 2022-01-06 20:08:40 +02:00
Teppei Fukuda
8b2a799721 test(integration): use fixtures (#1532) 2021-12-30 20:53:03 +02:00
Teppei Fukuda
b37f682ee2 BREAKING(report): migrate to new json schema (#1265) 2021-10-04 10:22:24 +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
a0e5c3a2e2 feat: support config scanning (#931) 2021-07-09 08:18:53 +03: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
Simarpreet Singh
2ac672a663 Use StoreMetadata from trivy-db (#509)
* db_test: Remove cruft

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

* db: Add StoreMetadata from trivy-db.

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

* mod: Update trivy-db dependency

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

* mod: Bump trivy-db version

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

* db: Eliminate metadata.Store

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

* db: Add a TODO to move things into trivy-db repo

Signed-off-by: Simarpreet Singh <simar@linux.com>
2020-06-22 14:29:38 -07:00
Simarpreet Singh
78b7529172 Add image subcommand (#493)
* config_test: Add missing assertions for TestNew

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

* integration: Add integration tests for image subcommand.

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

* refactor: bump up urfave/cli to v2.0

* refactor: apply DIY to image flags

* refactor: reorder sub commands

* feat: set hidden to global image options

* test(integration): insert --cache-dir before sub command

* README: update readme to reflect new usage

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

* chore(README): add image subcommand

* fix(flags): define aliases according to urfave/cli v2.0 style

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2020-05-25 12:06:15 +03:00
Teppei Fukuda
ac5f313129 feat(db): store metadata as a file (#464)
* refactor: wrap errors

* feat(db): add the metadata file

* test(db): re-generate mocks

* fix(app): read metadata from the file in showVersion

* fix: open the database after downloading it

* fix(operation): use UpdateMetadata

* chore(mod): update dependency

* test(integration): fix tests

* fix(conf): rename TRIVY_NONSSL to TRIVY_NON_SSL
2020-04-15 16:07:42 +03:00
Teppei Fukuda
aca31dffb3 detector: Add LayerID to detect vulns (#419)
* detector/alpine: Add LayerID to detect vulns

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

* amazon: Add LayerID to DetectedVulns

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

* debian: Add LayerID to DetectVulns + tests

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

* oracle: Add LayerID to DetectVulns + tests

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

* photon: Add LayerID to DetectVulns + tests

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

* redhat: Add LayerID to DetectVulns + tests

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

* suse: Add LayerID to DetectVulns + tests

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

* ubuntu: Add LayerID to DetectVulns + tests

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

* integration: Fix integration tests to include LayerID

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

* fix(rpc): add layer_id

* fix(rpc): insert layer_id to the struct

* fix(extractor): add cleanup function

* fix(library): add layer ID to detected vulnerabilities

* test: update mocks

* chore(mod): point to the feature branch of fanal

* mod: Point to fanal/master

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

* scan_test: Include LayerID as part of the assertion

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

* docker_engine_test.go: Update an error message to conform with fanal/master.

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

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2020-03-04 19:55:16 +02:00
Teppei Fukuda
74717b888e feat: support client/server mode (#295)
* chore(app): change dir

* feat(rpc): add a proto file and auto-generated files

* chore(dep): add dependencies

* fix(app): fix import path

* fix(integration): fix import path

* fix(protoc): use enum for severity

* chore(Makefile): add fmt andd protoc

* chore(clang): add .clang-format

* refactor: split functions for client/server (#296)

* refactor(db): split db.Download

* refactor(standalone): create a different package

* refactor(vulnerability): split FillAndFilter

* fix(protoc): use enum for severity

* chore(Makefile): add fmt andd protoc

* chore(clang): add .clang-format

* fix(db): remove an unused variable

* fix(db): expose the github client as an argument of constructor

* refactor(vulnerability): add the detail message

* feat(rpc): add rpc client (#302)

* fix(protoc): use enum for severity

* chore(Makefile): add fmt andd protoc

* chore(clang): add .clang-format

* feat(rpc): convert types

* feat(rpc): add rpc client

* token: Refactor to handle bad headers being set

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

* feat(rpc): add rpc server (#303)

* feat(rpc): add rpc server

* feat(utils): add CopyFile

* feat(server/config): add config struct

* feat(detector): add detector

* feat(scanner): delegate procedures to detector

* fix(scanner): fix the interface

* test(mock): add mocks

* test(rpc/server): add tests

* test(rpc/ospkg/server): add tests

* tets(os/detector): add tests

* refactor(library): move directories

* chore(dependency): add google/wire

* refactor(library): introduce google/wire

* refactor(ospkg/detector): move directory

* feat(rpc): add eosl

* refactor(ospkg): introduce google/wire

* refactor(wire): bind an interface

* refactor(client): use wire.Struct

* chore(Makefile): fix wire

* test(server): add AssertExpectations

* test(server): add AssertExpectations

* refactor(server): remove debug log

* refactor(error): add more context messages

* test(server): fix error message

* refactor(test): create a constructor of mock

* refactor(config): remove an unused variable

* test(config): add an assertion to test the config struct

* feat(client/server): add sub commands (#304)

* feat(rpc): add rpc server

* feat(utils): add CopyFile

* feat(server/config): add config struct

* feat(detector): add detector

* feat(scanner): delegate procedures to detector

* fix(scanner): fix the interface

* feat(client/server): add sub commands

* merge(server3)

* test(scan): remove an unused mock

* refactor(client): generate the constructor by wire

* fix(cli): change the default port

* fix(server): use auto-generated constructor

* feat(ospkg): return eosl

* test(integration): add integration tests for client/server (#306)

* fix(server): remove unnecessary options

* test(integration): add integration tests for client/server

* fix(server): wrap an error

* fix(server): change the update interval

* fix(server): display the error detail

* test(config): add an assertion to test the config struct

* fix(client): returns an error when failing to initizlie a logger

* test(ospkg/server): add eosl

* Squashed commit of the following:

* test(server): refactor and add tests (#307)

* test(github): create a mock

* test(db): create a mock

* test(server): add tests for DB hot update

* chore(db): add a log message

* refactor(db): introduce google/wire

* refactor(rpc): move directory

* refactor(injector): fix import name

* refactor(import): remove new lines

* fix(server): display the error detail

* fix(server): change the update interval

* fix(server): wrap an error

* test(integration): add integration tests for client/server

* fix(server): remove unnecessary options

* refactor(server): return an error when failing to initialize a logger

* refactor(server): remove unused error

* fix(client/server): fix default port

* chore(README): add client/server

* chore(README): update
2019-12-13 15:00:11 +02:00