Skip to content

fix(ci): repair patch-validator cache and embedded-runtime evidence - #566

Merged
seonghobae merged 23 commits into
mainfrom
fix/patch-validator-gha-cache-auth
Sep 9, 2026
Merged

fix(ci): repair patch-validator cache and embedded-runtime evidence#566
seonghobae merged 23 commits into
mainfrom
fix/patch-validator-gha-cache-auth

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Reality RED → causal repair chain

This Draft remains the patch-validator image/cache/static-runtime receipt lane. It does not own scanner authority, quarantine/outbound policy, LLM provider routing, or release authority.

Protected main@be7df559ca8c1d81b61f68f68c36d1526c94e7f2 already contains #569's Vitest 4.1.11 and explicit WASI platform binding. #566 was ordinary/non-force reconverged onto that protected source and retained its original authenticated BuildKit GHA cache repair.

Authenticated cache proof

Current-base run 34327281657 / job 102387341214 proved the original cache defect repaired: exact-pinned docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 imported the authenticated type=gha manifest, reported the expensive Node/OpenSSL build stages CACHED, exported the cache, and completed the build-action step in about 10 seconds. Image build, static inspection, no-network/read-only/non-root smoke, SBOM and scanners then ran normally.

Secondary RED 1 — normalized V8 CPE artifact version

That run exposed the strict verifier's raw-version/CPE-version mismatch. eb546862d1d25bfe86410dd495a3885941c42cc5 and b1c33d1c0d3ff0dc6d3d5fae6d4d8dd1ea56270d repair it narrowly: PURL artifacts retain exact component versions; CPE artifacts must use the version encoded in the already reviewed exact CPE identity. Patched Node V8 13.6.233.17-node.51 therefore accepts only reviewed CPE/scanner version 13.6.233.17, while scanner target, name, identity and provenance remain exact and malformed CPEs fail closed.

Secondary RED 2 — actual vulnerable component versus scanner applicability

With that verifier repair active, exact b1c33d... run 34328891694 / job 102392538446 again proved cache import/hit/export, exact image/runtime/smoke/SBOM/scanner stages and then failed at final receipt verification. Retained artifact 10095371779, digest sha256:21d9d7a7403ae4be1af21b4a769baa23d77714b2239cbc4c7975ac498728c7b4, separates the findings:

  • c-ares 1.34.6 / CVE-2026-33630 is applicable. Upstream 1.34.7 is the security release and 1.34.8 retains the fix while restoring callback API compatibility. Current source uses official c-ares 1.34.8 (sha256:c222b6d681096f9444d2c4863d2c1174019e27cacca0a4a5c114d36dd7d7bf78) in Node 24.19.0's vendored integration and requires the built binary to report process.versions.ares === "1.34.8". The finding is repaired, not suppressed.
  • SQLite 3.53.3 was matched to BIT-sqlite-2024-0232, BIT-sqlite-2025-29088, and BIT-sqlite-2025-6965; reviewed affected ranges end at 3.43.1, 3.49.0, and 3.50.1 respectively. Exact 3.53.3/NVD-CPE matches are therefore derived applicability exclusions only; all other SQLite findings stay blocking.
  • GHSA-g857-hhfv-j68w is a ruby/zlib RubyGems Zlib::GzipReader advisory, not an upstream C-zlib advisory. The exact Node embedded C-zlib CPE may exclude only that finding with exact Grype/NVD-CPE provenance.
  • V8 CVE-2026-85046 is tied by the primary V8 fix to the inlined Array.prototype.sort reducers. The exact signed Node 24.19.0 release commit cdc1b38d40cb567b7ad0b39c86addf830a0af0ae contains neither affected reducer in its vendored V8 source. The generic V8 CPE result may therefore be excluded only for exact Node 24.19.0 / V8 13.6.233.17-node.51 / reviewed CPE / normalized scanner version / Grype 0.116.1 provenance. A version, component, scanner, CPE or finding mismatch remains blocking.

Secondary RED 3 — c-ares release payload lost Node's Linux build config

Fresh exact 19f74d217a19af03e95f8ee5eebff45e5defa549 run 34344126471 / job 102441610182 did not reach the receipt verifier. The retained BuildKit record artifact 10101340696 reproduces the actual compiler failure: Node's c-ares integration reaches deps/cares/src/lib/ares_setup.h and cannot include ares_config.h. Node 24.19.0's canonical deps/cares/cares.gyp requires config/linux and config/linux/ares_config.h; the source-replacement lane therefore had to preserve that Node-owned generated integration data rather than merely copy it into a possibly pre-existing release-tree config directory.

Test-first commit e8fb138d2b1167546d0d444cac40ce2635e0194e makes the Dockerfile contract require explicit replacement of the reviewed release tree's config path plus a post-install Linux-config assertion. Causal fix 772bfba546d75ed2495d57ce43d3d390230b85fe now removes /tmp/cares-reviewed/config, restores the exact Node-owned config atomically, installs the reviewed c-ares sources, and fails before compilation unless /usr/src/node/deps/cares/config/linux/ares_config.h exists. This repairs the integration input; it does not suppress c-ares scanning or weaken the final provenance verifier.

Fresh primary-source review additionally verified:

  • c-ares v1.34.8 was published 2026-07-07; its release notes explicitly revert the unintended callback-signature API break from 1.34.7, and the official c-ares-1.34.8.tar.gz release asset carries GitHub-published digest sha256:c222b6d681096f9444d2c4863d2c1174019e27cacca0a4a5c114d36dd7d7bf78;
  • Node v24.19.0's canonical deps/cares/cares.gyp requires config/linux/ares_config.h on Linux;
  • Node's tools/dep_updaters/update-c-ares.mjs derives the GYP source list from c-ares src/lib/Makefile.inc plus public headers;
  • c-ares v1.34.6 and v1.34.8 expose the same src/lib/Makefile.inc source/header list, so retaining the Node-generated GYP source list while replacing the reviewed source payload does not silently omit a new 1.34.8 compilation unit.

The applicability decisions and primary-source traceability remain in docs/doctoring/patch-validator-embedded-runtime-applicability-2026-09-09.md. Focused regressions exercise exact finding/component/CPE/scanner bounds and fail-closed mismatches.

Current exact-head acceptance

Current exact is 772bfba546d75ed2495d57ce43d3d390230b85fe, Draft on protected main@be7df559ca8c1d81b61f68f68c36d1526c94e7f2.

  • application CI 34347187052: SUCCESS
  • reviewer-ci 34347186941: SUCCESS
  • Security Scan 34347187127: SUCCESS
  • patch-validator-image 34347186922 / job 102451469711: IN_PROGRESS, assigned to GitHub-hosted ubuntu-24.04; checkout, stale-head refusal, dependency materialization and Buildx setup are GREEN; current step is Build exact-head patch-validator image with authenticated GitHub Actions cache.

No predecessor GREEN is transferred. Do not rerun unchanged source merely to alter queue/build time. Require the unchanged exact to obtain terminal patch-validator-image GREEN plus clean review/current-base verification before normal integration; Draft remains appropriate until then.

Summary by CodeRabbit

  • 개선 사항

    • 패치 검증기 이미지 빌드가 더욱 안정적인 캐시와 명확한 제한 시간을 사용하도록 개선되었습니다.
    • 검증기 런타임이 검토된 c-ares 소스를 사용하며, 해당 버전의 무결성 검사가 강화되었습니다.
    • 보안 스캔 결과에서 제품·버전과 일치하지 않는 오탐을 더 정확히 식별합니다.
    • 스캐너 아티팩트 버전 검증이 CPE와 PURL 형식에 맞게 처리됩니다.
  • 문서

    • 임베디드 런타임 보안 발견 사항의 적용 가능성 검토 기준과 처리 결과가 문서화되었습니다.
  • 테스트

    • 이미지 빌드, 런타임 소스, 보안 발견 필터링 및 버전 검증에 대한 자동화 테스트가 확대되었습니다.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 8ea849a6-e0f5-420b-adea-34d43b5e61da

📥 Commits

Reviewing files that changed from the base of the PR and between be7df55 and 772bfba.

📒 Files selected for processing (13)
  • .github/workflows/patch-validator-image.yml
  • Dockerfile.patch-validator
  • docs/doctoring/patch-validator-embedded-runtime-applicability-2026-09-09.md
  • scripts/lib/patch-validator-embedded-runtime-applicability.mjs
  • scripts/lib/patch-validator-static-runtime-evidence.mjs
  • test/patch-validator-cares-source-replacement.test.ts
  • test/patch-validator-image-build-cache.test.ts
  • test/patch-validator-image-build-regression.test.ts
  • test/patch-validator-image-contract.test.ts
  • test/patch-validator-image-timeout-contract.test.ts
  • test/patch-validator-reviewed-applicability.test.ts
  • test/patch-validator-scanner-artifact-version.test.ts
  • test/patch-validator-workflow.test.ts

📝 Walkthrough

Walkthrough

패치 검증기 이미지는 검증된 c-ares 1.34.8 소스를 사용합니다. 런타임 적용성 필터가 V8, SQLite, zlib 발견을 처리합니다. 이미지 빌드는 docker/build-push-action과 150분 제한을 사용합니다. 관련 계약 테스트가 갱신되었습니다.

Changes

패치 검증기 런타임 및 빌드

Layer / File(s) Summary
임베디드 런타임 적용성 필터링
scripts/lib/patch-validator-embedded-runtime-applicability.mjs, test/patch-validator-reviewed-applicability.test.ts, docs/doctoring/...
V8 Array Sort, SQLite, RubyGems zlib 발견을 정확한 버전, CPE, 컴포넌트 조건으로 필터링합니다. 적용성 검토 문서와 테스트를 추가했습니다.
스캐너 아티팩트 버전 정규화
scripts/lib/patch-validator-static-runtime-evidence.mjs, test/patch-validator-scanner-artifact-version.test.ts
PURL은 컴포넌트 버전을 사용하고 CPE는 정규화된 검토 버전을 사용합니다. 잘못된 CPE identity는 거부합니다.
c-ares 소스 교체와 런타임 검증
Dockerfile.patch-validator, test/patch-validator-cares-source-replacement.test.ts, test/patch-validator-image-build-regression.test.ts, docs/doctoring/...
c-ares 1.34.8 tarball을 체크섬 검증 후 Node의 vendored 트리와 교체합니다. Node 통합 파일을 보존하고 process.versions.ares를 검증합니다.
이미지 빌드 액션과 계약 테스트
.github/workflows/patch-validator-image.yml, test/patch-validator-image-*.test.ts, test/patch-validator-workflow.test.ts
인라인 docker buildx builddocker/build-push-action으로 교체합니다. validator_deps, 빌드 인자, 이미지 태그, GHA 캐시와 150분 제한을 검증합니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Workflow as patch-validator-image.yml
  participant Action as docker/build-push-action
  participant Dockerfile as Dockerfile.patch-validator
  participant Image as 패치 검증기 이미지
  Workflow->>Action: 이미지 빌드 입력과 150분 제한 전달
  Action->>Dockerfile: Dockerfile과 validator_deps 컨텍스트 사용
  Dockerfile->>Image: c-ares 1.34.8 소스 검증 및 Node 이미지 생성
  Image-->>Workflow: 로드된 이미지와 이미지 태그 반환
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/patch-validator-gha-cache-auth

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.

@seonghobae seonghobae changed the title fix(ci): authenticate patch-validator gha cache transport fix(ci): authenticate patch-validator cache and normalize CPE evidence Sep 9, 2026
@seonghobae seonghobae changed the title fix(ci): authenticate patch-validator cache and normalize CPE evidence fix(ci): repair patch-validator cache and embedded-runtime evidence Sep 9, 2026

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fresh security review found a source-provenance defect in the c-ares repair: extracting 1.34.8 over Node's existing deps/cares directory could retain files that existed only in the vendored 1.34.6 tree, yielding a mixed source tree despite the new tarball checksum. Test-first commit 6c84bc0dabc948241d593ae57514e12984b75626 adds a regression requiring full replacement before extraction; its hosted runs were cancelled by the subsequent source push under cancel-in-progress, but the pre-fix Dockerfile at that exact head demonstrably lacked both cleanup operations. Causal fix 050ab45ae9b28a1f8f043e3a62d3b97c86c24d73 now removes and recreates /usr/src/node/deps/cares before extracting the checksum-authenticated 1.34.8 tree. Require fresh exact-head four-GREEN; no earlier gate transfers.

@seonghobae
seonghobae marked this pull request as ready for review September 9, 2026 13:59
@seonghobae
seonghobae merged commit e19e8a6 into main Sep 9, 2026
17 of 18 checks passed
@seonghobae
seonghobae deleted the fix/patch-validator-gha-cache-auth branch September 9, 2026 13:59
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