Command#
| Command | What it does |
|---|---|
node index.js |
Scans now, then again every Scan interval until stopped |
node index.js --scan-once |
Scans once and exits |
npm start |
Same as node index.js |
npm run scan |
Same as node index.js --scan-once |
The scanner stops cleanly on SIGINT and SIGTERM. When a scan is still running at the next interval, that interval is skipped with a warning in the log.
Files it writes#
| File | Content |
|---|---|
scanner.log |
The log, when logToFile is on |
security-report.json |
The result of the last scan |
scan-history/scan-<time>.json |
A copy of each report, when keepHistory is on. The last 30 are kept by default. |
scanner-state.json |
The scan counter and which severities were already announced per server |
| Files in the quarantine folder | Copies or moved files, when quarantine is on. See Notifications and actions. |
The JSON report#
The report has scanDate, scanNumber, statistics and findings.
statistics holds totalServers, scannedServers, totalFiles, scannedFiles, infectedFiles and threats with a count for critical, high, medium and low.
A finding holds:
| Field | Meaning |
|---|---|
type |
malware, keyword or hash |
severity |
critical, high, medium or low |
category |
The check name, Suspicious Keyword or Known Malware |
file |
The full path of the file on the node |
line |
The line number (not for hashes) |
content |
The matching line, cut to 100 characters |
pattern or keyword |
The expression that matched |
server, serverUuid |
The server |
matches |
How many times the pattern matched on that line (malware checks) |
hash |
The MD5 and SHA256 (hash matches) |
timestamp, scanId |
When and in which scan |
Console output#
After each scan the console lists findings per severity, with up to 5 servers and 3 files per server. The full list is in the JSON report.