security-baseline: check all HTTP URLs in osps-br-03-02 #453
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.56) × (1 − Review Confidence (0.54)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.56 · 148 lines diff across 1 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.299
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.056
Real PR Conversation Timeline
1 comments
"Review active on #453"
general
weight: 0.35
dakshhhhh16
Summary
Fix
osps-br-03-02so that it checks every non-HTTPS URL found inREADME.md, rather than only inspecting the first regex match.The previous implementation used
regex.find_all_string_submatch_n(...)[0]. The[0]selects the submatch array for the first match, so subsequenthttp://URLs were ignored. Because the pattern captured the entire match, the first URL was also evaluated twice.This change uses
regex.find_n(..., -1), which returns all matching URLs directly.Regression test
Added Starlark tests covering:
The last case reproduces the bug: before the fix, only the first localhost match is inspected and the rule passes; after the fix, the later external HTTP URL is detected.
Testing
Addresses the
osps-br-03-02logic item in #451.