llm-security/scanners
Kjell Tore Guttormsen f031dd496f fix(llm-security): HIGH — entropy suppression keyed off the absolute path
Rule 4 in isFalsePositive ("test/fixture files intentionally contain
example secrets") matched /(test|spec|fixture|mock|__test__|__spec__)/i
against absPath — the ABSOLUTE path. Any directory name above the scan
root therefore silenced every entropy finding in the entire target: a
repo cloned to a CI workspace, checked out under a parent folder named
`testing`, or scanned from any path with one of those substrings
reported zero secrets and still exited status 'ok'. The failure is
silent — indistinguishable from a clean scan.

- isFalsePositive takes relPath and rule 4 keys off it. relPath was
  already computed and passed down to scanFileContent; only the
  suppression check was reading the wrong one.
- classifyFileContext keeps using absPath: it reads the basename
  extension only, so directory names above the root cannot affect it.
- Rules 1-3 and 5-13 are untouched.

Regression test drives scan() end-to-end against temp roots named
llmsec-test-*, llmsec-spec-*, llmsec-fixture-* and llmsec-mock-*, with a
neutral-root control proving the payload is detectable, plus two
guards that genuine suppression still works (a *.test.mjs file and a
file under a relative tests/ directory).

npm test: 1879/1879 green (1872 + 7 new).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcQyMTQfyrsAapaCMPxTtQ
2026-07-18 09:11:04 +02:00
..
lib docs(llm-security): document TRG/SIG/AST scanners and package knowledge/ 2026-06-20 09:46:14 +02:00
ai-bom-generator.mjs feat(scanner): add AI-BOM generator — CycloneDX 1.6 format for AI supply chain transparency 2026-04-10 13:29:30 +02:00
ast-taint-scanner.mjs feat(llm-security): add AST Python-taint scanner with python3 fallback 2026-06-20 09:38:36 +02:00
attack-simulator.mjs feat(red-team): 8 new evasion-arsenal scenarios for v7.2.0 (E1/E4/E5/E7/E16/E17) 2026-04-29 15:35:32 +02:00
auto-cleaner.mjs fix(llm-security): CRITICAL — command injection in auto-cleaner (v7.8.1) 2026-07-18 08:48:09 +02:00
content-extractor.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
dashboard-aggregator.mjs feat(llm-security): playground Fase 3 — v7.5.0 med 18 parsere/renderere 2026-05-05 22:15:47 +02:00
dep-auditor.mjs fix(dep): B7 — token-overlap typosquat heuristic alongside Levenshtein 2026-04-29 14:10:53 +02:00
entropy-scanner.mjs fix(llm-security): HIGH — entropy suppression keyed off the absolute path 2026-07-18 09:11:04 +02:00
git-forensics.mjs fix(llm-security): F-1 — eliminate shell-injection RCE in git-forensics scanner 2026-06-20 10:18:41 +02:00
ide-extension-scanner.mjs feat(llm-security): playground Fase 3 — v7.5.0 med 18 parsere/renderere 2026-05-05 22:15:47 +02:00
mcp-baseline-reset.mjs feat(commands): E14 part 3 — /security mcp-baseline-reset slash command 2026-04-30 16:49:01 +02:00
mcp-live-inspect.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
memory-poisoning-scanner.mjs fix(memory-poisoning): E15 — add .claude/agents/*.md to target glob 2026-04-29 14:13:01 +02:00
network-mapper.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
permission-mapper.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
posture-scanner.mjs feat(llm-security): playground Fase 3 — v7.5.0 med 18 parsere/renderere 2026-05-05 22:15:47 +02:00
reference-config-generator.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
scan-orchestrator.mjs docs(llm-security): document TRG/SIG/AST scanners and package knowledge/ 2026-06-20 09:46:14 +02:00
signature-scanner.mjs feat(llm-security): add SIG signature scanner with decode-pipeline matching 2026-06-20 09:28:52 +02:00
supply-chain-recheck-cli.mjs fix(scanners): use process.exitCode instead of process.exit() after stdout.write 2026-04-10 14:11:31 +02:00
supply-chain-recheck.mjs fix(dep): B7 — token-overlap typosquat heuristic alongside Levenshtein 2026-04-29 14:10:53 +02:00
taint-tracer.mjs fix(taint-tracer): B6 — recognize destructuring + spread + rest patterns 2026-04-29 14:05:34 +02:00
toxic-flow-analyzer.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
trigger-scanner.mjs feat(llm-security): add TRG trigger-abuse scanner 2026-06-20 09:19:54 +02:00
unicode-scanner.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
watch-cron.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
workflow-scanner.mjs feat(workflow-scanner): E11 part 2 — re-interpolation + auth-bypass + WFL prefix + orchestrator 2026-04-30 15:57:10 +02:00