Repository navigation
security: independently validate GitHub reviewer approval before STEP_UP permit - #86
Conversation
…and live PR head before post-step-up authority
… live API proof before reauthorization
…nt GitHub history proof vectors
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 503d16e2c5
ℹ️ 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".
| const [history, pr] = await Promise.all([ | ||
| readJson(base + "/actions/runs/" + claim.workflowRunId + "/approvals"), | ||
| readJson(base + "/pulls/" + match[2]) | ||
| ]) |
There was a problem hiding this comment.
Bind the approved workflow run to the requested PR revision
When the verifier token is configured, an authenticated caller can supply an already-approved run ID from another PR or an older revision, obtain a fresh STEP_UP receipt using that ID, and reauthorize the current PR without a new human approval. These lookups independently verify that the run has an approval and that the PR matches the claimed head, but never establish that the approved run belongs to that PR revision. The prior-receipt checks only preserve the caller-supplied association. Fetch and validate authoritative run/event metadata linking the approval to the requested PR revision before returning a verified proof; include a negative fixture with an approved run unrelated to the otherwise matching PR.
Useful? React with 👍 / 👎.
…tinguish live review from fixtures
…reviewer verification
CFAV P0 follow-on: remove unsafe authority reliance on caller-provided
approval.approved=true.GITHUB_APPROVAL_VERIFY_TOKEN.protected-executionenvironment, not be PR author or invoking actor; require current PR repo, SHA, and branch match signed authorization context.External source: GitHub REST
GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals.