Views
No views yet
analyze_diff - Pattern pre-filter + LLM deep analysisgenerate_adversarial_tests - Exploit test generation with phantom-validation detectiontrigger_war_room - Auto-convene on score >= 7allow_pr - Merge gate after resolutionshadow_deploy - Isolated validation environmentrequiresAuth() from /admin/users:1- requiresAuth(),
2 async (req, res) => {| Metric | Before | After Training |
|---|---|---|
| Auth bypass caught | ~5% | ~70%+ |
| War Room triggered | -- | Auto on score >=7 |
| False positive rate | -- | ~14% |
| Action | Reward |
|---|---|
| Auth bypass caught | +70 |
| War Room triggered | +60 |
| Score < threshold (correct clear) | +40 |
| False War Room call | -20 |
gate2_security_reviewer/analyzer.py - Core diff analysis & LLM pipelinegate2_security_reviewer/war_room.py - War Room orchestrationgate2_security_reviewer/adversarial.py - Adversarial test generationgate2_security_reviewer/training.py - Synthetic data & training pipelinegate2_security_reviewer/evaluator.py - Novel pattern evaluationapp.py - Gradio demo interfacedemo_beat5.py - Standalone Beat 5 demotraining_data.jsonl - 1,200 synthetic training examples1from gate2_security_reviewer.analyzer import DiffAnalyzer
2from gate2_security_reviewer.war_room import WarRoomOrchestrator
3
4analyzer = DiffAnalyzer()
5review = analyzer.analyze_diff(diff_text, pr_id="PR-1042")
6
7war_room = WarRoomOrchestrator(threshold=7)
8event = war_room.evaluate(review)