Repository navigation
feat(runtime): correlate live sensor traffic with threat-model entry points - #213
Conversation
|
Thanks, and welcome! The correlation is clean:
The re-run button reuses the dashboard's existing background-run pattern behind the Origin check. Small notes, none blocking:
Once a maintainer approves the workflow run and CI is green, this is ready to merge. |
|
|
||
| routes = [str(r["route"]) for r in corr.unmodeled_routes] | ||
| if not routes: | ||
| return RedirectResponse(f"/projects/{project_id}", status_code=303) |
| shutil.rmtree(note_dir, ignore_errors=True) | ||
|
|
||
| threading.Thread(target=_run_and_cleanup, daemon=True).start() | ||
| return RedirectResponse(f"/projects/{project_id}?tm_rerun=started", status_code=303) |
|
Merged, thank you, and congratulations on your first contribution to secfoo! 🎉 The threat model and live traffic now meet: entry points, unmodeled routes and "seen in production" markers, which closes #70. I merged current |
Leaderboard update
SriRamkunamsetty now has 10 points (rank #9). 15 more to reach Bronze. |
Fixes #70
Summary
THREAT_MODELING_OUTPUT_CONTRACT(## 2. Scope & Assets) insrc/secfoo/skills/renderer.pyto include theEnEntry Points table cross-referencingBntrust boundaries.extract_entry_points()andextract_trust_boundaries()insrc/secfoo/report/architecture.py(gracefully returning[]/{}on older reports without the table).src/secfoo/runtime/correlation.py):match_route()supporting exact routes, optional HTTP methods, templated segments ({id},<id>,:id), and prefix wildcards (*).correlate_project_traffic()mapping observed sensor request routes inruntime_evidenceagainstEnentry points, identifying live entry points, flagging unmodeled routes (threat-model drift), marking threats on live boundariesseen_in_production, and prioritizing live-boundaryGapthreats first.Seen in productionmarkers on the Threat Modeling run page (run_detail.html), project page (project.html, including a re-run threat-modeling trigger passing unmodeled routes as context), and Threat Modeling dashboard (threat_modeling_dashboard.html).Reached via E1 (B1: Internet -> API)) on SCA findings (sca_vulnerabilities_list.htmlandsca_vulnerability_detail.html).tests/test_web/test_threat_model_correlation.py.Verification
ruff check .— 0 errorsbandit -c .bandit -ll -r src/secfoo— 0 medium/high issuespytest tests/test_web/test_threat_model_correlation.py tests/test_web/test_threat_modeling_dashboard.py tests/test_web/test_widget_info_tips.py tests/test_web/test_sca_vulnerability_route.py tests/test_web/test_no_inline_scripts.py tests/test_web/test_run_ui.py tests/test_web/test_routes.py tests/test_docs_consistency.py -q— 109 passed