Repository navigation
feat: resolve the reviewer identity from protected variables - #50
Merged
Merged
Conversation
Repositories whose content rules keep account identifiers out of public source can configure the reviewer through RISK_GATE_REVIEWER_APP_ID, RISK_GATE_REVIEWER_USER_ID and RISK_GATE_REVIEWER_LOGIN, matching the owner override. A partial set fails closed instead of falling back to the committed identity, and a policy may omit reviewer when the variables are set.
Contributor
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI assistance
Qoder agent (Claude) implemented the change and ran the checks below.
What changed
scripts/main.cjs: addconfiguredReviewer(), which readsGOVERNANCE_REVIEWER_APP_ID,GOVERNANCE_REVIEWER_USER_IDandGOVERNANCE_REVIEWER_LOGINand replacespolicy.reviewerwhen they are set. A partial or invalid set fails closed; an empty set falls back to the committed policy.templates/risk-gate.yml: pass the optionalvars.RISK_GATE_REVIEWER_*variables to the evaluate step.README.md: document the override next to the owner override.This lets a repository whose content rules forbid account identifiers in public source keep the reviewer identity in protected configuration without weakening the identity check: the gate still validates app id, user id and login before trusting a receipt.
How verified
node --test scripts/test-main.cjs(9 tests) covers override, policy-without-reviewer and partial-set failure.actionlintpasses on the updated template.