Fix osps-ac-03 ruleset remediations #470
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 219 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.323
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #470"
general
weight: 0.35
evankanderson
Summary
The
osps-ac-03-01(prevent force push) andosps-ac-03-02(prevent branch deletion) remediations could never succeed. Both had two problems:1. Invalid JSON body: a trailing comma after the rule
typemade every remediation fail withcannot unmarshal body: invalid character '}' looking for beginning of object key string.2. Wrong HTTP method: they used
PUT /repos/{owner}/{repo}/rulesets, but creating a repository ruleset in the GitHub API is aPOST.This removes the trailing commas and switches both to
POST.Found while following the new-contributor path discussed in #minder on Slack (applying
security-baseline-level-1with remediation on to a fresh test repo).cc @shreyaabaranwal, who offered to review.
Testing
On a local Minder server, against a fresh public test repo with
security-baseline-level-1andremediate: "on":osps-qa-01-02) pass, and no duplicate rulesets are created.mindev test security-baselinepasses, andmindev ruletype lintpasses.One thing I noticed but have not changed: on one re-evaluation right after the rulesets were created,
osps-ac-03-01still failed once (the next evaluation passed). Remediation then tried to create the ruleset again, and GitHub rejected it withName must be unique, so no duplicate was created. This looks like a short delay before a new ruleset appears inGET /rules/branches/{branch}, but I could not confirm the cause.