MCPcopy Index your code
hub / github.com/MultSec/MultCheck / CheckMal

Function CheckMal

src/scan.go:112–133  ·  view source on GitHub ↗
(binaryPath string, conf map[string]string)

Source from the content-addressed store, hash-verified

110}
111
112func CheckMal(binaryPath string, conf map[string]string) (string, error) {
113 // Check for Detection
114 scanResult, err := scanFile(binaryPath, conf)
115 if err != nil {
116 return "", err
117 }
118
119 if !scanResult {
120 return "Not malicious", nil
121 }
122
123 static, err := checkStatic(binaryPath, conf)
124 if err != nil {
125 return "", err
126 }
127
128 if static != "" {
129 return static, nil
130 }
131
132 return "Whole file is malicious", nil
133}

Callers 1

mainFunction · 0.85

Calls 2

scanFileFunction · 0.85
checkStaticFunction · 0.85

Tested by

no test coverage detected