fix(ci): run policy gate for release PRs - #76
Conversation
|
Warning Review limit reachedNext included review available in 41 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
The changes correctly implement the migration from pull_request_target to pull_request context for the repository policy gate, improving security by ensuring external fork PRs run with read-only permissions. The new test adequately validates the workflow configuration requirements. No blocking issues identified.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c543324cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # This gate reads changed-file metadata through GitHub's API and never checks | ||
| # out PR code. `pull_request` keeps the token read-only for external forks | ||
| # and permits release-please's GitHub App PRs to run without approval. | ||
| pull_request: |
There was a problem hiding this comment.
Keep the policy gate outside the untrusted merge ref
For an external PR that edits repository-policy.yml, the pull_request event executes the workflow definition from the PR's merge ref, so the contributor can remove the changed-file rejection or replace it with a successful step while still producing the required Repository Policy / gate check. This defeats the external control-plane protection enforced below; keep this enforcement in a trusted base-branch context such as pull_request_target, or use another policy mechanism that the PR cannot modify.
Useful? React with 👍 / 👎.



Summary
pull_requestcontextValidation
actionlint .github/workflows/*.ymltox -e py313(804 passed)