mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
chore(image): skip symlinks and hardlinks from tar scan (#2634)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user