Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
emilwareus committed Nov 9, 2023
1 parent 3f07b86 commit b198989
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/fingerprint/fingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@ func inMemFingerprintingCompressedContent(filename string, exclusions []string)
fingerprints := []FileFingerprint{}

for _, f := range r.File {
longFileName := filepath.Join(filename, f.Name) // Use filepath.Join for compatibility
if filepath.IsAbs(f.Name) || strings.HasPrefix(f.Name, "..") {
continue
}
longFileName := filepath.Join(filename, f.Name) // #nosec

if !shouldProcessFile(f.FileInfo(), exclusions, longFileName) {
continue
Expand All @@ -318,6 +321,7 @@ func inMemFingerprintingCompressedContent(filename string, exclusions []string)
_, err = io.Copy(hasher, rc) // #nosec
if err != nil {
rc.Close()

return nil, err
}

Expand Down

0 comments on commit b198989

Please sign in to comment.