mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 23:26:39 -08:00
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>
This commit is contained in:
@@ -126,7 +126,7 @@ func TestConvertFromRpcLibraries(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want []ptypes.Library
|
||||
want []ftypes.LibraryInfo
|
||||
}{
|
||||
{
|
||||
name: "happy path",
|
||||
@@ -136,9 +136,9 @@ func TestConvertFromRpcLibraries(t *testing.T) {
|
||||
{Name: "bar", Version: "4.5.6"},
|
||||
},
|
||||
},
|
||||
want: []ptypes.Library{
|
||||
{Name: "foo", Version: "1.2.3"},
|
||||
{Name: "bar", Version: "4.5.6"},
|
||||
want: []ftypes.LibraryInfo{
|
||||
{Library: ptypes.Library{Name: "foo", Version: "1.2.3"}},
|
||||
{Library: ptypes.Library{Name: "bar", Version: "4.5.6"}},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user