Skip to content

fix(egress): require headerless anonymous GitHub meta requests - #508

Merged
seonghobae merged 569 commits into
mainfrom
promote/pr-500-45991442
Aug 30, 2026
Merged

fix(egress): require headerless anonymous GitHub meta requests#508
seonghobae merged 569 commits into
mainfrom
promote/pr-500-45991442

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Scope

Follow-up hardening after #500 integrated into protected main. This PR now contains only the post-#500 successor delta: anonymous GET /meta must be bodyless and headerless, the cancellation regression verifies rejection before delayed body release, and the patch-validator contract binds the Node source URL and reviewed digest in the same download_exact invocation.

Current authority

  • protected base: main@d53897f28abb0aca6d3dd2c0295f0c4f4e81f076 (GitHub-signed squash integration of fix(egress): bound anonymous GitHub API authority #500);
  • predecessor source head: d51ef8ac0cf87fda183c7680c2f2b017e496d10b;
  • pre-convergence successor head: ef0d57ed25890479dc26c92c5ba0a49114d4c1f6, exactly 5 commits ahead of d51ef8... with four changed files;
  • current exact head: 738aa68ad7865ff2e4b9f57f175fa2201e66395c.

Protected main@d53897... has the same tree as predecessor d51ef8.... To preserve the successor bytes without destructive rebase or force push, current head 738aa68... is a two-parent convergence commit whose first parent is ef0d57..., whose second parent is protected main@d53897..., and whose tree is exactly the successor tree. Fresh comparison now resolves protected main as the merge base (behind=0).

Review lineage

The three concrete CodeRabbit findings on this successor were addressed before convergence:

  1. anonymous /meta requests now require hasNoHeaders(headers) and have a regression proving even a reviewed Accept header is rejected;
  2. caller cancellation is asserted before releasing the delayed response body;
  3. the static-runtime test binds the Node source URL and $NODE_SOURCE_SHA256 in one download_exact contract.

Observed review threads are resolved/outdated. Devin's latest predecessor-head review reported 0 new potential issues.

Exact-head evidence boundary

All checks from ef0d57... and earlier are predecessor evidence only. The ref convergence regenerated Application, reviewer-ci, required central Security Scan, and dedicated patch-validator image/runtime/SBOM/provenance workflows on exact head 738aa68...; pending/queued/in-progress evidence remains non-passing until terminal success on that unchanged head.

Do not merge if the exact head or protected base moves, any applicable gate is not terminal-clean, or a valid unresolved review finding appears. Never transfer predecessor evidence, bypass the ruleset, force-push, or self-approve.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

GitHub API 이그레스 검증, GitHub App 설치 ID discovery, 패치 검증 이미지 빌드, CI 진단 및 보안 지침이 변경되었습니다. 관련 테스트는 새 allowlist, abort, 설치 ID, dependency context 및 workflow 계약을 검증합니다.

Changes

GitHub API 이그레스 정책

Layer / File(s) Summary
이그레스 정책과 취소 처리
src/outbound-fetch-policy.ts
GitHub API allowlist와 reviewed-header 검증을 강화했습니다. transport 및 response body에서 caller abort reason을 보존하고 fail-closed 처리를 추가했습니다.
이그레스 정책 검증
test/outbound-fetch-*.test.ts, test/outbound-request-compartment.test.ts, test/installation-token-scope-policy.test.ts
헤더, 메서드, URL, 미디어 타입, malformed input, timeout 및 abort 경쟁 조건을 검증합니다.

GitHub App 설치 ID 확인

Layer / File(s) Summary
설치 ID discovery 검증
src/index.ts
설정된 설치 ID도 저장소 설치 조회 결과와 비교합니다. 불일치하면 ERR_GITHUB_INSTALLATION을 반환합니다.
설치 ID exchange 테스트
test/github-app-explicit-installation-id-validation.test.ts, test/github-api-*.test.ts, test/github-app-runtime-coverage.test.ts, test/github-installation-*.test.ts
설치 조회 mock을 추가하고 일치 및 불일치 token exchange 흐름을 검증합니다.

패치 검증 이미지와 CI

Layer / File(s) Summary
릴리스 증거와 보안 지침
.github/workflows/ci.yml, AGENTS.md, test/ci-release-evidence-order.test.ts, test/main-governance-audit.test.ts, test/acquisition-data-room-integrity.test.ts
릴리스 진단에 branch arm 정보를 추가했습니다. dependency license inventory 순서를 검증합니다. Security Scan 및 로컬 진단 지침을 갱신했습니다.
의존성 materialization과 스캐너 다운로드
.github/workflows/patch-validator-image.yml
스캐너 asset 다운로드를 재시도 가능한 helper로 통합했습니다. Node 24.19.0/npm 11.17.0으로 validator_deps BuildKit context를 생성합니다.
OpenSSL과 정적 Node 런타임
Dockerfile.patch-validator
OpenSSL 3.5.8을 checksum으로 고정해 빌드합니다. Node를 공유 OpenSSL에 연결하고 runtime에서 validator_deps를 복사합니다.
이미지 계약과 회귀 테스트
test/patch-validator-*.test.ts, test/workflow-concurrency-policy.test.ts
새 workflow 단계, checksum 다운로드, concurrency 정책, Dockerfile 단계 및 OpenSSL 보안 기준을 검증합니다.

Estimated code review effort: 5 (Critical) | ~90 minutes

Merge Risk: 🔵 Low · up to 45991

The egress policy currently allows anonymous metadata requests carrying headers, weakening the intended fail-closed request contract. This is a bounded security-hardening risk that should have explicit owner follow-up before or with merge; the other noted items do not introduce production impact.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 31 files. (4 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 outbound-fetch-policy 변경의 실제 내용인 익명 GitHub /meta 요청의 headerless 요구 사항을 정확히 설명합니다. 전체 변경 사항을 모두 포함하지는 않지만, 변경 사항의 유효한 핵심 측면을 명확히 나타냅니다.
Full details: Docstring Coverage

Explanation

Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 31 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch promote/pr-500-45991442

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration 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.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 0 potential issues.

Devin Review

coderabbitai[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration 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.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 0 new potential issues.

Devin Review

@devin-ai-integration devin-ai-integration 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.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 0 new potential issues.

Devin Review

@devin-ai-integration devin-ai-integration 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.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 0 new potential issues.

Devin Review

@devin-ai-integration devin-ai-integration 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.

Devin Review found 0 new potential issues.

Devin Review

@seonghobae seonghobae changed the title fix(egress): promote verified #500 merge result fix(egress): require headerless anonymous GitHub meta requests Aug 30, 2026
@seonghobae
seonghobae merged commit f954d74 into main Aug 30, 2026
18 checks passed
@seonghobae
seonghobae deleted the promote/pr-500-45991442 branch August 30, 2026 12:09
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