Skip to content

security: independently validate GitHub reviewer approval before STEP_UP permit - #86

Merged
blocksifrdev merged 6 commits into
mainfrom
security/independent-github-approval-20261102
Nov 2, 2026
Merged

blocksifrdev merged 6 commits into
mainfrom
security/independent-github-approval-20261102

Conversation

@blocksifrdev

Copy link
Copy Markdown
Collaborator

CFAV P0 follow-on: remove unsafe authority reliance on caller-provided approval.approved=true.

  • Independently fetch official GitHub workflow-run environment approval history and the current pull request using a separate staging-only GITHUB_APPROVAL_VERIFY_TOKEN.
  • Require the named reviewer to have approved the specific protected-execution environment, not be PR author or invoking actor; require current PR repo, SHA, and branch match signed authorization context.
  • Deny all approval claims when GitHub verifier token is missing, API is unavailable or data differs.
  • Reject in-process reuse of the same STEP_UP receipt for multiple permits, while documenting that multi-node durability remains external P0.
  • CI runs real localhost authority-service positive/negative tests plus independent synthetic GitHub response fixtures. No production credentials are committed.
  • Live GitHub reviewer acceptance remains blocked until operator provisions credentials. Do not interpret green ordinary CI as live governed-execution proof.

External source: GitHub REST GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T23:37:42.551477Z 503d16e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +70 to +73
const [history, pr] = await Promise.all([
readJson(base + "/actions/runs/" + claim.workflowRunId + "/approvals"),
readJson(base + "/pulls/" + match[2])
])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@blocksifrdev
blocksifrdev merged commit bb4c1c8 into main Nov 2, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant