chore(image): skip symlinks and hardlinks from tar scan (#2634)

This commit is contained in:
DmitriyLewen
2022-08-08 18:57:08 +06:00
committed by GitHub
parent 63c33bfa43
commit 390c256c38

View File

@@ -64,10 +64,11 @@ func (w LayerTar) Walk(layer io.Reader, analyzeFn WalkFunc) ([]string, []string,
skipDirs = append(skipDirs, filePath)
continue
}
case tar.TypeSymlink, tar.TypeLink, tar.TypeReg:
case tar.TypeReg:
if w.shouldSkipFile(filePath) {
continue
}
// symlinks and hardlinks have no content in reader, skip them
default:
continue
}