mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-23 15:37:50 -08:00
fix: handle a scratch/busybox/DockerSlim image gracefully (#476)
* fix: handle unknown OS and no package errors * chore(mod): update dependencies * integration: add busybox * update depdendencies and fix tests Signed-off-by: Simarpreet Singh <simar@linux.com> * chore(mod): use the latest trivy-db Co-authored-by: Simarpreet Singh <simar@linux.com>
This commit is contained in:
@@ -226,11 +226,17 @@ func TestRun_WithDockerEngine(t *testing.T) {
|
||||
expectedOutputFile: "testdata/photon-30.json.golden",
|
||||
testfile: "testdata/fixtures/photon-30.tar.gz",
|
||||
},
|
||||
{
|
||||
name: "buxybox with Cargo.lock integration",
|
||||
imageTag: "busy-cargo:latest",
|
||||
expectedOutputFile: "testdata/busybox-with-lockfile.json.golden",
|
||||
testfile: "testdata/fixtures/busybox-with-lockfile.tar.gz",
|
||||
},
|
||||
{
|
||||
name: "sad path, invalid image",
|
||||
invalidImage: true,
|
||||
testfile: "badimage:latest",
|
||||
expectedError: "unable to access the remote image (index.docker.io/library/badimage:latest)",
|
||||
expectedError: "unable to inspect the image (index.docker.io/library/badimage:latest): Error: No such image: index.docker.io/library/badimage:latest",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user