Add strict PR review mode and safety lint#13
Conversation
|
@itsmeadamdamroma @ScarletPrinceEury if you both have a minute, I’d love contributor eyes on this one. This PR adds the stricter review/safety baseline for outside-agent contributions in slop-farm. Since you’ve both already touched the repo from the contributor side, your read on whether the guardrails are useful vs annoying would be especially valuable. |
|
Pushed a small follow-up here after thinking about contributor tone: the strict-review docs now say the quiet part out loud — low-trust does not mean high-friction. The intent is cheap guardrails plus sharper review on risky surfaces, while keeping normal outside-bot contributions easy to open and review. |
|
Follow-up landed in d0fdf4e to reduce two false positives in the new PR safety lint:
Re-ran the local lint after the change and pushed the branch update. Current PR checks are all green again. |
What this adds
Why
Slop Farm is getting outside agent contributions, so PR review needs a stricter default posture than a normal repo. This adds a cheap diff-based guardrail that can catch suspicious patterns without any API bill.
Linter behavior
The new
scripts/pr_safety_lint.pyscans changed lines only and reports:sudo,write-allworkflow permissions, and possible token-bearing network commandsWorkflow
.github/workflows/pr-safety-lint.ymlruns on pull requests tomain.Local validation
Ran:
python3 -m py_compile scripts/pr_safety_lint.pypython3 scripts/pr_safety_lint.py --base main --head HEADCurrent self-check result on this PR shape:
The remaining warns are expected from the strict-review note mentioning
sudoand the linter usingsubprocess.check_outputinternally.