Skip to content

Commit

Permalink
(lint) remove unused func
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshvardhan Karn committed Nov 30, 2023
1 parent de5353c commit a6e9698
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions pkg/scan/process_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,6 @@ func ScanFilePath(s *Scanner, path string, iocs *[]output.IOCFound, layer string
return
}

func isExecutable(path string) (bool, error) {
fileInfo, err := os.Stat(path)
if err != nil {
return false, err
}
mode := fileInfo.Mode()
return mode&0111 != 0, nil
}

func isSharedLibrary(path string) bool {
return strings.HasSuffix(path, ".so") || strings.HasSuffix(path, ".a") || strings.HasSuffix(path, ".la")
}
Expand All @@ -203,10 +194,8 @@ func fileMimetypeCheck(filePath string, execMimeTypes []string) bool {
return false
}

// Determine the mimetype
mimetype := http.DetectContentType(buffer)

// Check if the mimetype is in the list of executable mimetypes
for _, execType := range execMimeTypes {
if strings.Contains(mimetype, execType) {
return true
Expand Down

0 comments on commit a6e9698

Please sign in to comment.