Pipeline · Phase 3

Static Analysis — 15 regex rules on file content.

Triggered only on Write / Edit actions, where there's actual file content to scan. The same engine that powers /nio scan runs here against the about-to-be-written content, including a base64 decode-and-rescan pass.

PropertyValue
Latency<50ms
ScopeWrite / Edit only
EngineStaticAnalyser · 15 regex rules + base64 decode
Score weightscoring_weights.static — default 1.0
Short-circuitany CRITICAL finding → deny immediately

The 15 rules

Same set as the on-demand /nio scan. See /nio scan for full table; condensed here:

CategoryRulesSeverity
ExecutionSHELL_EXEC, AUTO_UPDATE, REMOTE_LOADERHIGH–CRIT
SecretsREAD_ENV_SECRETS, READ_SSH_KEYS, READ_KEYCHAIN, PRIVATE_KEY_PATTERNMED–CRIT
ExfiltrationNET_EXFIL_UNRESTRICTED, WEBHOOK_EXFILHIGH–CRIT
ObfuscationOBFUSCATION, PROMPT_INJECTIONHIGH–CRIT
Trojan / SETROJAN_DISTRIBUTION, SUSPICIOUS_PASTE_URL, SUSPICIOUS_IP, SOCIAL_ENGINEERINGMED–CRIT

Configuration that affects this phase

Add custom regexes to any rule module via guard.file_scan_rules. Modules: shell_exec, remote_loader, secrets, obfuscation, prompt_injection, exfiltration, trojan.

guard:
  file_scan_rules:
    shell_exec:
      - "my_unsafe_exec\\("
    secrets:
      - "INTERNAL_API_KEY"

Tune Phase 3's contribution to the final score with scoring_weights.static.

Example

// suspicious.js (about to be written)
eval(atob("Y3VybCBldmlsLi4u"))

matches: OBFUSCATION + SHELL_EXEC
score:   0.78