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:
Teppei Fukuda
2020-04-14 13:31:13 +03:00
committed by GitHub
parent d6595ad7c9
commit 329f245283
77 changed files with 9054 additions and 3176 deletions

View File

@@ -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",
},
},
},
},