Skip to content

Commit 9fab42b

Browse files
committed
fix: small syft fix
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
1 parent ed59b5a commit 9fab42b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

internal/syft/syft.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ func (s *Syft) ExecuteSyft(img kubernetes.ImageDigest) (string, error) {
3939
filePath := strings.ReplaceAll(img.Digest, "@", "/")
4040
filePath = strings.ReplaceAll(path.Join(s.GitWorkingTree, s.GitPath, filePath, fileName), ":", "_")
4141

42-
if util.PathExists(filePath) {
43-
logrus.Debugf("Skip image %s", img.Digest)
44-
return filePath, nil
45-
}
46-
4742
logrus.Debugf("Processing image %s", img.Digest)
4843

4944
workDir := "/tmp/" + util.RandStringBytes(10)
@@ -57,7 +52,7 @@ func (s *Syft) ExecuteSyft(img kubernetes.ImageDigest) (string, error) {
5752
return "", err
5853
}
5954

60-
src, cleanup, err := source.New(filepath.Join("oci-archive:", imagePath), nil, nil)
55+
src, cleanup, err := source.New(filepath.Join("file:", imagePath), nil, nil)
6156
if err != nil {
6257
logrus.WithError(fmt.Errorf("failed to construct source from input %s: %w", imagePath, err)).Error("Source-Creation failed")
6358
return "", err

0 commit comments

Comments
 (0)