feat: add evidence-driven admissibility gate (CI → K8s)#22317
feat: add evidence-driven admissibility gate (CI → K8s)#22317BrianCLong wants to merge 1 commit intomainfrom
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 5 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78302b3373
ℹ️ 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".
| image: node:20-alpine | ||
| command: | ||
| - sh | ||
| - -c | ||
| - | | ||
| node scripts/ci/build_evidence_bundle.mjs | ||
| npx tsx scripts/verify-admissibility.ts |
There was a problem hiding this comment.
Use a runnable image for the PreSync admissibility hook
The PreSync job executes node scripts/ci/build_evidence_bundle.mjs and npx tsx scripts/verify-admissibility.ts, but it runs in node:20-alpine, which does not contain this repository’s scripts or the evidence inputs that build_evidence_bundle.mjs expects (evidence/sbom.spdx.json, evidence/provenance.json, evidence/signature.verify.json, see scripts/ci/build_evidence_bundle.mjs lines 21–27). In a real ArgoCD sync this hook will fail before app resources are applied (missing files/module or guaranteed FAIL verdict), effectively blocking deployments; the hook needs an image/artifact that includes these files or explicit steps to fetch/generate them first.
Useful? React with 👍 / 👎.
|
Superseded by #22309. The admissibility gate is being converged on the golden-path branch instead of a separate CI-to-K8s lane. |
Motivation
Description
lib/admissibility.tsexposingevaluateAdmissibility(evidenceBundle) -> PASS|FAILwith structured failure reasons and machine-friendly checks for signature, SBOM, provenance, and prohibited dependencies.scripts/verify-admissibility.tsand wiredverify:admissibilityinpackage.jsonthat emitsevidence/admissibility-verdict.jsonand exits non-zero onFAILfor CI/Enforcement integration.scripts/ci/build_evidence_bundle.mjswhich writesevidence/bundle.json,evidence/report.json,evidence/metrics.json(deterministic) andevidence/stamp.json(non-deterministic metadata)..github/workflows/admissibility-gate.ymlthat builds an artifact, generates SBOM withsyft, signs/verifies withcosign, creates provenance, composes the evidence bundle and runs the admissibility check, then uploads evidence artifacts.k8s/policy/kyverno/admissibility-enforcement.yamlto requireadmissibility.summit.ai/status=PASSlabel and attestations, ArgoCD pre-sync jobk8s/argocd/admissibility-presync-job.yamlwhich runs the verifier before sync, and updatedk8s/server-deployment.yamlto include theadmissibility.summit.ai/status: PASSlabel.tests/admissibility/admissibility.test.tscovering missing SBOM, invalid/tampered signature, partial provenance, and prohibited-dependency detection.Testing
npx prettier --write, final style check passed for modified files.npx tsx --test tests/admissibility/admissibility.test.tsand all tests passed (4/4).evidence/bundle.jsonvianpx tsx scripts/verify-admissibility.tswhich returned aPASSverdict for the valid sample bundle.node scripts/ci/build_evidence_bundle.mjsand the verifier; the verification step exits non-zero onFAILas expected.Codex Task