Commit Graph
2 Commits
Author SHA1 Message Date
Willie 07f70abf02 fix(audit): let profile presets set threshold when config has no explicit block_threshold
config.Load() normalized empty block_threshold to "CRITICAL", preventing
ResolvePolicy from applying profile-based thresholds (e.g. strict → HIGH).

Change: normalizeAuditBlockThreshold("") now returns "" instead of "CRITICAL".
All downstream callers (install, update, server) already use
audit.NormalizeThreshold() which handles empty → CRITICAL independently.

Also adds 4 integration tests for --profile, --dedupe, and config-based
profile resolution. Includes gofmt formatting fixes.
2026-03-03 16:08:11 +08:00
Willie 50e5e115c0 feat(audit): add dataflow taint tracking for cross-line exfiltration
Adds forward taint propagation analysis that detects multi-line data
exfiltration patterns where sensitive data flows through variables or
temp files before reaching a network sink.

Tracks three taint sources: credential file reads (~/.ssh, .env, etc.),
sensitive env var references ($TOKEN, $API_KEY, etc.), and command
substitution outputs. Propagates taint through variable assignments,
pipe chains, and temp file redirections. Generates HIGH-severity
dataflow-taint findings when tainted data reaches network commands.

- Add ScanShellDataflow for shell scripts and ScanMarkdownDataflow
  for fenced code blocks in markdown
- Add DeduplicateDataflow to avoid duplicate findings with existing
  per-line pattern rules
- Integrate into scanSkillImpl and ScanFileWithRules scan paths
- Can be disabled via audit-rules.yaml (id: dataflow-taint)
2026-03-02 23:01:30 +08:00