formatting

This commit is contained in:
Johannes Bülow 2025-07-25 12:40:54 +02:00
parent ad191a5393
commit 51dd4c31e1
Signed by: jmb
GPG key ID: B56971CF7B8F83A6

View file

@ -43,14 +43,14 @@ func scanFile(fileName string) ([]string, error) {
} }
fullPath, err := store.AbsPath(fileName) fullPath, err := store.AbsPath(fileName)
if err != nil { if err != nil {
slog.Error("Error in DiecScan", "file-uuid", fileName, "error", err) slog.Error("Error in Yara Scan", "file-uuid", fileName, "error", err)
return matched, err return matched, err
} }
cmd := exec.Command("/usr/local/bin/yr", "scan", "--output-format ndjson", "--print-namespace","--compiled-rules", outputPath, fullPath) cmd := exec.Command("/usr/local/bin/yr", "scan", "--output-format ndjson", "--print-namespace","--compiled-rules", outputPath, fullPath)
slog.Debug("Yara scan command", "cmd", cmd.String()) slog.Debug("Yara scan command", "cmd", cmd.String())
result, err := cmd.Output() result, err := cmd.Output()
if err != nil { if err != nil {
slog.Error("Error scanning file with yara", "error", err, "file-uuid", fileName,"result", string(result)) slog.Error("Error scanning file with yara", "error", err, "file-uuid", fileName, "result", string(result))
return matched, err return matched, err
} }