fix(review): authorize private target PR lookup with Noema App - #85
Draft
seonghobae wants to merge 5 commits into
Draft
fix(review): authorize private target PR lookup with Noema App#85seonghobae wants to merge 5 commits into
seonghobae wants to merge 5 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
11 tasks
This was referenced Aug 9, 2026
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.
Purpose
Repair the central reviewer’s cross-repository trust bootstrap so private target repositories are supported without widening authority. GitHub documents the automatically generated
GITHUB_TOKENas repository-scoped to the repository containing the workflow; the previouscentral-review.ymlused that Noema-repository token for the first target PR lookup before minting the target-scoped Noema App token.Exact implementation
Freshly revalidated source identity:
main; live/base tip9adb784902cae19a150146a8fadd6a0491f67814.fix/private-target-review-auth.8d5d62437a944e8c1e9eda4a2b695edb3b5678e3.The evidence-collection job now orders the trust bootstrap as:
The target identifier step performs no target-state GitHub API request and has no
GH_TOKEN. The first liverepos/${TARGET_REPOSITORY}/pulls/${PR_NUMBER}read uses${{ steps.noema_read_app.outputs.token }}. Downstream evidence collection already uses the same scoped App token, so this removes a credential-scope inconsistency rather than introducing another credential family.No merge, release, deployment, contents-write, or broader publication authority is added.
Test-first lineage
01d4f69c0c98c8aa95c79afe0dd8ac8835a09769: test-only contract requiring target validation → repository-scoped App token → authenticated live PR binding → checkout. The pre-fix workflow visibly violated this ordering and used${{ github.token }}in the live target-binding step. GitHub-hostedci,reviewer-ci, andSecurity Scanremained queued without runner assignment and were cancelled by concurrency when the branch advanced, so no executed RED run is falsely claimed.a2084c9ce7c9c523227c5dad93162c1c8a4ba8f1: minimal workflow repair moving live target-state access behind the existing read-only target-scoped App token.575b840e08a33f4ee22815b97a0f5489fa0b66a4: APA 7 doctoring documenting GitHub token scope, failure behavior, and private-target acceptance.0b611e649878038828ff8c3dc8b39c9385455121: records the security/interoperability contract underCHANGELOG.md→## Unreleased.8d5d62437a944e8c1e9eda4a2b695edb3b5678e3: current exact head; adds regression assertions for the existing review-dependent-check exclusion set so the independent reviewer waits on every review-independent current-head check while excluding onlyopencode-reviewandmetadata-only gate evaluation. The exact comparison from0b611...changes onlyreviewer/tests/test_central_review_workflow.py(+20/-0); production workflow source is unchanged by this final commit.RCA and feasibility
Root cause: the first cross-repository API read used workflow-repository
GITHUB_TOKENauthority even though the product supports targets beyond the Noema repository. Public targets can hide the defect because their PR metadata is public; private targets cannot rely on that authority.Verified remediation path: the workflow already possesses a dedicated Noema GitHub App credential and already minted a repository-scoped read token for later target checkout/evidence reads. The narrow repair therefore performs only syntax validation before token creation, then uses that existing least-privilege token for the first live target read.
Rejected alternatives: broadening
GITHUB_TOKEN, adding PAT-like credentials, making the target repository public, skipping exact-head binding, widening the App installation token to the whole organization, or treating public-repository success as proof of private-target authority.Current exact-head evidence
For exact head
8d5d62437a944e8c1e9eda4a2b695edb3b5678e3:cirun31320482243: terminal failure. The application/repository tests and configured 100% coverage gates complete successfully before the unchanged repository-widenpm audit --audit-level=highboundary rejects inheritednanoid@3.3.16(GHSA-2v37-7h3g-55p8). The root dependency remediation is PR fix(security): update transitive nanoid for CVE-2026-67213 #76; duplicating it here is rejected.reviewer-cirun31320482244: terminal success.Security Scanrun31320482249: terminal success.The earlier queued-run symptom has recovered for this exact head; it is not counted as a source remedy and remains tracked as organization/control-plane RCA under #30. The current CI failure is a distinct inherited dependency boundary, not a private-target-auth implementation failure.
Documentation
docs/doctoring/private-target-review-auth.mdrecords the decision, failure/recovery behavior, acceptance contract, and current GitHub primary sources in APA 7 format.CHANGELOG.mdrecords the behavior change under## Unreleased.Required acceptance before Ready / merge
ci,reviewer-ci, andSecurity Scanon the unchanged exact head.Queued, pending, cancelled, absent, status-only, stale-head, predecessor-head, model-only, or synthetic evidence is never promoted to passing check, approval, or merge authority. No version bump or release is warranted for an unintegrated workflow repair.