fix(analyzer): stop E4 matching session tokens and split words #1237
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.60) × (1 − Review Confidence (0.58)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 237 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.327
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #1237"
general
weight: 0.35
rng1995
Fixes #1236.
Two
E4(Context Leakage, HIGH) patterns instatic_patterns_data_exfiltration.pymatched text that is not conversation context:history|context|logoptional, sosessionon its own matched: "send the session token", "upload the session cookie", "record the session ID". It also had no leading\b, sostatus.logfollowed by asessionentry in a directory tree matched aslog\n session, and "backlog chat" matched aslog chat.\bafterto, so "send the session token" matched assend the session to.Change
sessionnow needshistory,contextorlogafter it. The noun stays optional afterconversation,chatanddialog, which only ever mean a conversation."send the session to https://...", "transmit the session data to ...", "upload the session log to ..." and "send the full conversation to ..." are still reported.
Testing
tests/nodes/analyzers/test_static_patterns.py: five false positives from the issue (all fail onmain) and six real leaks that must still be detected.ruff checkandruff format --checkon both files pass.pytest -m "not integration and not provider" tests/: the branch passes the 11 new tests and has the same set of failing tests asmainon my machine (Windows; 568 failures and errors that also fail without this change, none in the data-exfiltration analyzer).status.log/sessiondirectory tree). Both now have no E4 findings.AI assistance was used to find and write this. I reproduced the false positives and checked the fix and test results myself.