Skip to content

Commit 12456ff

Browse files
committed
ci: gate auto-approve behind SHADOW_AUTO_APPROVE (off by default)
Auto-approval now runs only where a maintainer has explicitly set the repo/org variable SHADOW_AUTO_APPROVE=true. Default is off, so the bot is comment-only unless deliberately enabled. Rationale: a bot APPROVE review can satisfy branch protection's required approving review. Making auto-approval opt-in keeps a human approval on the critical path by default, addressing the AppSec review finding that the bot could otherwise rubber-stamp a PR whose findings were suppressed via prompt injection. The event guard (pull_request / pull_request_target) is unchanged.
1 parent d8184e4 commit 12456ff

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/auto-approve.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ permissions:
1212
jobs:
1313
approve:
1414
runs-on: ubuntu-latest
15-
if: github.event.workflow_run.event == 'pull_request' || github.event.workflow_run.event == 'pull_request_target'
15+
# Off by default: auto-approval only runs where a maintainer has explicitly
16+
# set the repo/org variable SHADOW_AUTO_APPROVE=true. A bot approval can
17+
# otherwise satisfy branch protection's required review, so keeping it opt-in
18+
# means the bot stays comment-only unless a human deliberately enables it.
19+
if: >-
20+
vars.SHADOW_AUTO_APPROVE == 'true' &&
21+
(github.event.workflow_run.event == 'pull_request' || github.event.workflow_run.event == 'pull_request_target')
1622
timeout-minutes: 2
1723

1824
steps:

0 commit comments

Comments
 (0)