Rules / General
SHIELD-GEN-002
Security-sensitive TODO/FIXME comment
What it detects
TODO or FIXME comments mentioning security topics indicate unresolved security debt.
How to fix
Resolve the identified security issue before shipping to production.
Vulnerable — Shield flags thisexport.py
@app.route("/admin/export")
def export_report():
# TODO: add auth check before this ships to production
rows = load_all_orders()
return render_csv(rows)
Fixed — scans cleanexport.py
@app.route("/admin/export")
@require_role("admin")
def export_report():
rows = load_all_orders()
return render_csv(rows)
Both snippets are verified against the shipped scanner: the vulnerable one triggers SHIELD-GEN-002, the fixed one does not.