[codex] Harden release security gates#177
Conversation
|
/agentic_review |
Code Review by Qodo
1. Gate accepts non-push runs
|
There was a problem hiding this comment.
Code Review
This pull request updates the release documentation and introduces a new security gate validation check (check_release_security_gates) in the test suite to enforce security invariants on the release workflow, such as blocking unsafe triggers and restricting id-token: write permissions. The review feedback correctly identifies critical security bypasses where the workflow-wide or job-level permissions could be set to the string "write-all", which implicitly grants write access and would bypass the current dictionary-based checks. Implementing the suggested checks for "write-all" will make the security gates more robust.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Review Summary by QodoHarden release security gates with OIDC and workflow validation
WalkthroughsDescription• Add comprehensive release security gate validation checks - Detect blocked triggers (pull_request_target, workflow_run) - Enforce id-token: write scoping to allowed jobs only - Validate release-gated workflow list in CI gate - Verify environment configuration for publishing jobs • Expand release CI gate to include actionlint.yml and zizmor.yml • Update documentation to reflect new security requirements Diagramflowchart LR
A["Release Workflow"] -->|"Validate triggers"| B["Security Gate Checks"]
B -->|"Check id-token scope"| C["Job Permissions"]
B -->|"Verify gated workflows"| D["CI Gate List"]
B -->|"Validate environments"| E["Publishing Jobs"]
D -->|"Include"| F["actionlint.yml + zizmor.yml"]
C -->|"Restrict to"| G["Allowed Signing/Publishing Jobs"]
File Changes1. tests/release_publish_invariants.py
|
|
Code review by qodo was updated up to the latest commit b5d1643 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5d1643b45
ℹ️ 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".
|
Remediated the scalar permissions bypass in What changed:
Validation:
|
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
8c054f9 to
71b7b5b
Compare
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
|
Addressed the remaining release-gate bot finding in What changed:
Validation:
|
Summary
actionlint.ymlandzizmor.ymlto be green for the release SHA before a tag can publishtests/release_publish_invariants.pypull_request_target,workflow_run) are addedid-token: writeis granted workflow-wide or outside known release signing/publishing jobspermissionsblocks such aspermissions: write-allRELEASING.mdBasis
Current crates.io/GitHub OIDC guidance treats trusted publishing as bound to owner/repo/workflow/environment claims and requires
id-token: writeonly for jobs that request OIDC tokens. crates.io also blockspull_request_targetandworkflow_runfor trusted publishing, so the repo-local release invariant now pins those constraints and rejects scalar permission shortcuts.Validation
bash tests/release_publish_invariants.shbash tests/release_signed_release_invariants.sh/tmp/ordvec-actionlint/actionlint .github/workflows/release.ymlpython3 -m py_compile tests/release_publish_invariants.pypermissions: write-allfails withworkflow permissions must be an explicit mappingpermissions: write-allfails withjobs.require-ci-green.permissions must be an explicit mappinggit diff --checkactionlint.ymlandzizmor.ymlare active workflows with recent successful push-to-main runsStacked on #176.