feat(sandbox): restack patch-validator image on current main - #407
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (72)
📝 WalkthroughWalkthrough패치 검증 이미지와 Docker 실행 API를 추가했다. Node.js 24.19.0 정적 Changes패치 검증 이미지와 워크플로
Estimated code review effort: 5 (Critical) | ~120 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
| IMAGE_PROFILE_FORBIDDEN_PREFIXES = ( | ||
| ".github/", | ||
| "patch-validator/", | ||
| "reviewer/", | ||
| ) |
There was a problem hiding this comment.
📝 Info: node_modules parity gap between host and image path filters
The mjs runtime forbids node_modules/ (patch-validator/validate-patch.mjs:63-69), but the Python host image profile omits it (reviewer/noema_reviewer/patch_image_validation.py:42-46), as does the base prefix list. A node_modules patch passes the host pre-filter yet the image runtime still rejects it via validateRepositoryPath/copySourceTree, so the outcome stays fail-closed but the two boundaries diverge from the documented parity.
Was this helpful? React with 👍 or 👎 to provide feedback.
| IMAGE_PROFILE_UNSUPPORTED_METADATA_PREFIXES = ( | ||
| "copy from ", | ||
| "copy to ", | ||
| "new mode ", | ||
| "old mode ", | ||
| "rename from ", | ||
| "rename to ", | ||
| ) |
There was a problem hiding this comment.
🔍 Unsupported-metadata prefix lists differ between host and runtime
The runtime rejects dissimilarity index metadata (patch-validator/validate-patch.mjs:70-79), but the host image profile prefix list omits it (reviewer/noema_reviewer/patch_image_validation.py:47-54). The base module's PERCENT_METADATA_PATTERN appears to cover it, so rejection is likely consistent; worth confirming both boundaries reject a dissimilarity-index patch identically.
Was this helpful? React with 👍 or 👎 to provide feedback.
| function verifyEmbeddedMatchArtifact(match, component, expectedIdentity) { | ||
| const artifact = requireRecord( | ||
| match.artifact, | ||
| `embedded runtime component ${component.key} match artifact`, | ||
| ); | ||
| requireCondition( | ||
| artifact.version === component.version, | ||
| `embedded runtime component ${component.key} match artifact version does not match the reviewed component`, | ||
| ); | ||
| if (artifact.name != null) { | ||
| requireCondition( | ||
| artifact.name === component.name, | ||
| `embedded runtime component ${component.key} match artifact name does not match the reviewed component`, | ||
| ); | ||
| } | ||
|
|
||
| if (expectedIdentity.startsWith("pkg:")) { | ||
| requireCondition( | ||
| artifact.name === component.name && artifact.purl === expectedIdentity, | ||
| `embedded runtime component ${component.key} match artifact identity does not match the reviewed PURL component`, | ||
| ); | ||
| return; | ||
| } | ||
|
|
||
| requireCondition( | ||
| Array.isArray(artifact.cpes) && | ||
| artifact.cpes.some((candidate) => artifactCpeValue(candidate) === expectedIdentity), | ||
| `embedded runtime component ${component.key} match artifact identity does not match the reviewed CPE component`, | ||
| ); | ||
| } |
There was a problem hiding this comment.
📝 Info: Real V8 match hard-errors instead of counting as blocking
verifyEmbeddedMatchArtifact requires each match artifact version to equal the component version (scripts/lib/patch-validator-static-runtime-evidence.mjs:226-255). For V8 the inventory version is 13.6.233.17-node.51 but Grype normalizes the CPE artifact to 13.6.233.17. Reviewed legacy CVEs are filtered out first, but any non-legacy V8 match throws a version-mismatch error rather than being counted as blocking. Still fail-closed, but the failure mode differs from other components.
Was this helpful? React with 👍 or 👎 to provide feedback.
| export GRYPE_DB_AUTO_UPDATE=false | ||
|
|
There was a problem hiding this comment.
📝 Info: Embedded scan relies on DB from an earlier step
The embedded-runtime step sets GRYPE_DB_AUTO_UPDATE=false and never runs grype db update (.github/workflows/patch-validator-image.yml:461-500), relying on the on-disk DB from the earlier binary step (line 380). This holds only because both steps share the runner and the DB persists on disk. Reordering or split runners would leave the embedded scan without a DB; the cross-component DB-identity checks still fail closed.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Canonical patch-validator image/runtime/supply-chain owner. Historical #67 remains frozen predecessor evidence only and must not be merged.
Current branch-integrity state
Protected
mainis47ba59ed972a0002a4446844bb385c08bbfdc31a, including #492 pilot-readiness future-date rejection. #407 was converged non-destructively onto that exact protected truth with two-parent commit871490009a65336003047a85b994581ed3e36b44; no force-push or destructive rebase was used.The convergence tree preserves the patch-validator feature slice, adopts the exact protected-main
scripts/lib/pilot-readiness.mjsandtest/pilot-readiness-future-date.test.tsblobs, and preserves both the protected pilot-readiness changelog entry and the patch-validator changelog entry. Fresh compare reports protected main as the exact merge base and behind 0; the remaining main-to-head delta contains only the patch-validator image/runtime/reviewer/supply-chain slice plus bounded changelog/package/vitest integration.Current repair lineage
The branch retains the exact-head patch-validator image pipeline, fully-static Node runtime, embedded-runtime inventory, exact image/SBOM/receipt binding, reviewed vulnerability identities, CPE applicability evidence, duplicate CycloneDX ImageID rejection, Noema-bound smoke receipts, receipt-path identity stability, valid-calendar/non-future scanner provenance validation, and whole-image/binary Grype database provenance binding.
RED
7f3472edde93d3b3a61691440c398f6738ac00f7reproduced acceptance of otherwise-valid whole-image/binary Grype evidence with no vulnerability-database provenance. Candidatec70acb2759635c5cac448d2ff3d1089e5da02b98binds whole-image/binary Grype database identity to the already strictly validated embedded-runtime Grype snapshot without weakening vulnerability thresholds or reviewed applicability.Preserved hardening
The slice keeps the fully-static numeric-non-root
scratchruntime, no-network/read-only/capability-dropped smoke path, checksum-pinned Trivy/Syft/Grype tools, reviewed bundled-runtime identities, frozen scanner DB behavior, raw scanner evidence, and the--fail-on mediumfail-closed vulnerability policy. Historical inline findings remain resolved.Current exact identity and evidence
Exact head:
871490009a65336003047a85b994581ed3e36b44.Live base:
47ba59ed972a0002a4446844bb385c08bbfdc31a, exact merge base, behind 0.Fresh same-head evidence is non-passing until terminal:
32619804074: in progress32619804030: in progress32619804069: queuedpatch-validator-image32619804032: pendingCentral read-only
.githubprotected source is23a776ed37027d8ab8ab2aefcf81fac586352e2f. Current Security Scan authority remains OSV/dependency-review hard where enforceable, Trivy repo-wide fixable MEDIUM/HIGH/CRITICAL hard, Scorecard soft.Merge boundary
Keep Draft until all four applicable checks on unchanged exact head
871490009a65...are terminal-success and zero valid unresolved findings remain. Immediately before Ready/merge classification, refetch exact head, protected live base, ancestry, reviews/threads, central.githubrevision, and Security Scan authority. #67 remains frozen until #407 reaches protected main and a final semantic comparison proves every valuable predecessor-only delta is preserved or intentionally rejected.Summary by CodeRabbit
새로운 기능
문서
테스트