diff --git a/pkg/lambda/check_digest.go b/pkg/lambda/check_digest.go index 1250e0a..e8658aa 100644 --- a/pkg/lambda/check_digest.go +++ b/pkg/lambda/check_digest.go @@ -54,7 +54,7 @@ func checkDigest(imageName string, resultPublicRepoTags *[]string, resultsFromEc if err != nil { return result, err } - match := (*resultsFromEcr)[imageName+":"+tag].hash == digest + match := (*resultsFromEcr)[imageName+":"+tag].hash == digest || digest == "" if !match { result = append(result, tag) diff --git a/pkg/lambda/check_digest_test.go b/pkg/lambda/check_digest_test.go index 82a847f..a77685d 100644 --- a/pkg/lambda/check_digest_test.go +++ b/pkg/lambda/check_digest_test.go @@ -91,8 +91,8 @@ func Test_checkDigest(t *testing.T) { }, }, }, - name: "checkV1ImageContinueOnErrAndAddToResult", - wantResult: []string{"v1.4.2"}, + name: "checkV1ImageContinueOnErr", + wantResult: nil, wantErr: false, }, }