mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 23:26:39 -08:00
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
This commit is contained in:
@@ -18,7 +18,6 @@ import (
|
||||
"github.com/aquasecurity/trivy/pkg/report"
|
||||
"github.com/aquasecurity/trivy/pkg/types"
|
||||
"github.com/aquasecurity/trivy/rpc/scanner"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
)
|
||||
|
||||
type mockScanner struct {
|
||||
@@ -92,7 +91,7 @@ func TestScanner_Scan(t *testing.T) {
|
||||
}
|
||||
type args struct {
|
||||
target string
|
||||
imageID digest.Digest
|
||||
imageID string
|
||||
layerIDs []string
|
||||
options types.ScanOptions
|
||||
}
|
||||
@@ -153,6 +152,9 @@ func TestScanner_Scan(t *testing.T) {
|
||||
Description: "Denial os Service",
|
||||
Severity: common.Severity_CRITICAL,
|
||||
References: []string{"http://exammple.com"},
|
||||
Layer: &common.Layer{
|
||||
DiffId: "sha256:5216338b40a7b96416b8b9858974bbe4acc3096ee60acbc4dfb1ee02aecceb10",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -175,6 +177,9 @@ func TestScanner_Scan(t *testing.T) {
|
||||
Severity: "CRITICAL",
|
||||
References: []string{"http://exammple.com"},
|
||||
},
|
||||
Layer: ftypes.Layer{
|
||||
DiffID: "sha256:5216338b40a7b96416b8b9858974bbe4acc3096ee60acbc4dfb1ee02aecceb10",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user