Teppei Fukuda
329f245283
fix: replace containers/image with google/go-containerregistry ( #456 )
...
* chore(mod): update dependencies
* fix(internal): remove cleanup
* fix: use only diff_id
* fix: use string instead of digest
* fix: replace LayerID with Layer
* test(integration): negotiate API version
* feat(conf): add TRIVY_NONSSL
* test(integration): update golden files
* test(integration): fix the error message
* chore(debian): add comments
* chore(mod): update dependencies
2020-04-14 13:31:13 +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
18b80e3781
feat(cache): based on JSON ( #398 )
...
* refactor(docker_conf): rename and remove unnecessary options
* feat(rpc): define new API
* fix(cli): change default timeout
* fix(import): fix package names
* refactor(vulnerability): remove old mock
* refactor(utils): remove un-needed functions
* feat(cache): implement cache communicating with a server
* refactor(scan): separate scan function as local scanner
* test(scanner): add tests for ScanImage
* refactor(scan): remove unused options
* test(vulnerability): generate mock
* refactor(server): split a file
* feat(server): implement new RPC server
* feat(client): implement new RPC client
* fix(cache): use new cache interface
* fix(standalone): use new scanner
* fix(client): use new scanner
* fix(server): pass cache
* test(integration): make sure an error is not nil before calling the method
* fix(mod): update dependencies
* test(integration): ensure the image load finishes
* feat(docker): support DOCKER_HOST and DOCKER_CERT_PATH
* chore(mod): update dependencies
* refactor(rpc): remove old client
* feat(server): support old API for backward compatibility
* fix(server): check a schema version of JSON cache
* fix(rpc): add a version to packages
* feat(rpc): add PutImage
* test: rename expectations
* refactor(cache): rename LayerCache to ImageCache
* refactor: rename ImageInfo to ImageReference
* fix(applier): pass image_id to ApplyLayer
* feat(cache): handle image cache
* chore(mod): update dependencies
* refactor(server): pass only config
* feat(cli): add -removed-pkgs option
* refactor(err): wrap errors
2020-02-27 23:17:55 +02:00
Teppei Fukuda
4189855fc1
fix(cache): specify a directory to store image cache ( #341 )
...
* chore(mod): update dependencies
* fix(scanner): make scanner take a cache client as the argument
* refactor: sort imports
* refactor(cache): create a struct to clear cache
* fix(cache): use a struct to clear cache
* fix(wire): update constructor to take cache struct
* fix(cache): use the constructor generated by wire
* docs(cli): update the option description
* fix(cache): use the cache struct
* fix(cache): split Reset into ClearDB and ClearImages
2019-12-26 16:08:08 +02:00
Teppei Fukuda
823374b578
feat(client/server): add --token-headers option ( #326 )
...
* feat(option): add token-header
* feat(client): add token header
* feat(server): add token header
* test(token): fix tests
* test(token): add integration tests
* feat(client): add --custom-headers
2019-12-24 16:49:56 +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