Skip to content

Fix: [for cherry-picking] Updated body-policy.sh so ABOUT_THE_CONTROL f - #88

Closed
qodo-code-review[bot] wants to merge 1 commit into
ci/1747-public-repo-guard-body-scanfrom
fix/remediation-624d79bb-9b33b8
Closed

Fix: [for cherry-picking] Updated body-policy.sh so ABOUT_THE_CONTROL f#88
qodo-code-review[bot] wants to merge 1 commit into
ci/1747-public-repo-guard-body-scanfrom
fix/remediation-624d79bb-9b33b8

Conversation

@qodo-code-review

@qodo-code-review qodo-code-review Bot commented Aug 6, 2026

Copy link
Copy Markdown

Fixed Findings

  • Scope control allowlist to policy prose

Automated fix from agentic review of #87

Qodo Logo


Open in Devin Review

Review in cubic

@greptile-apps

greptile-apps Bot commented Aug 6, 2026

Copy link
Copy Markdown

PR author is in the excluded authors list.

@macroscopeapp

macroscopeapp Bot commented Aug 6, 2026

Copy link
Copy Markdown

Approvability

Verdict: Needs human review

Unable to check for correctness in 9962817. This PR modifies security policy enforcement logic in public-repo-guard/body-policy.sh, changing how the ABOUT_THE_CONTROL allowlist interacts with different rule types. Changes to security-related files require review by the designated code owners (wave-av/core-team).

You can customize Macroscope's approvability policy. Learn more.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines 56 to +59
matches="$(printf '%s' "$raw" \
| rg -vN -- 'guard:allow[[:space:]]+[^[:space:]]' \
| rg -vNiP -- "$ABOUT_THE_CONTROL" || true)"
| { if [[ "$allow_control_prose" == true ]]; then rg -vNiP -- "$ABOUT_THE_CONTROL"; else cat; fi; } \
|| true)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Existing fixture no longer covers the control-allowlist path it was written for

The fixture expect 0 'talking about the control' (scripts/public-repo-guard/tests/body-policy.test.sh:72-73) was written to prove that a line naming the gate is exempt. Its body ("body-policy blocks a private repo named next to a SECRET_TOKEN") contains no name from GUARD_PRIVATE_REPOS, so the private-repo-ops rule never matched it in the first place — it passes both before and after this change and now proves nothing about the narrowed allowlist. I ran the whole fixture suite (with a grep -P shim, since the local ripgrep is built without PCRE2) and all 21 cases pass, so the change is not test-breaking, but the new behavior is untested: there is no positive fixture asserting that e.g. an AWS key or Tailscale IP on a line that also says "public-repo-guard" now BLOCKS, and no negative fixture pinning that the prose rule still exempts it.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants