feat(cacert): externalize CACert verification network (CEN-V) + offline verifier#23624
feat(cacert): externalize CACert verification network (CEN-V) + offline verifier#23624BrianCLong 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 5 minutes and 31 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 (12)
✨ 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: be0c272eab
ℹ️ 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".
| const admissibility_status: CACertVerdict = | ||
| valid_signature && evidence_integrity && cert.verdict === 'PASS' ? 'PASS' : 'FAIL'; |
There was a problem hiding this comment.
Fail admissibility when cert is expired or not yet valid
The admissibility decision does not incorporate validity-window failures: EXPIRED_CERT_REPLAY and NOT_YET_VALID are recorded in reasons, but admissibility_status is still computed only from signature, evidence integrity, and cert.verdict. In practice, a correctly signed PASS cert outside its validity window can still return admissibility_status: "PASS", which defeats replay/expiry protection for consumers that key off status.
Useful? React with 👍 / 👎.
| if (request.now && cert.expires_at < request.now) { | ||
| reasons.push('EXPIRED_CERT_REPLAY'); | ||
| } | ||
|
|
||
| if (request.now && cert.issued_at > request.now) { |
There was a problem hiding this comment.
Compare validity timestamps as parsed dates, not strings
The validity checks use direct string comparison (cert.expires_at < request.now / cert.issued_at > request.now). RFC3339 date-time strings are not guaranteed to be lexicographically ordered across all valid representations (for example, timezone offsets), so this can misclassify expired or not-yet-valid certs. Parse both values to numeric instants before comparing to avoid false PASS/FAIL outcomes.
Useful? React with 👍 / 👎.
Motivation
Description
2.0form with stablecert_id, signer identity (key_id), validity window, evidence manifest and canonicalization helpers inpackages/cacert/src/cacert.ts.verifyCACertinpackages/cacert/src/verification.tsthat validates signatures (Ed25519), checks trust anchors/revocation, verifies evidence hashes and decision-trace linkage, and emits structured reason codes.cacert-verifyatpackages/cacert/tools/cacert-verify.mjs(CLI:--cert <path> --request <path> [--output <path>]) that returns non-zero on FAIL for air-gapped consumers.CACertand verification contracts atpackages/cacert/schema/*and expose the verifier via packagebinandverifyscript inpackages/cacert/package.json.packages/cacert/tests/cacert.test.ts(forged signature, tampered evidence, revoked key/replay, missing evidence, trace mismatch) and wire this surface into GA docs (docs/ga/CACERT_VERIFICATION_NETWORK.md) anddocs/ga/verification-map.json.Testing
pnpm --filter @summit/cacert test, which executed the package tests and passed (all tests OK: positive path + forged/tamper/replay/missing-evidence/trace mismatch cases).node scripts/check-boundaries.cjsand it reported no parallelization/boundary violations.make ga-verify(repo GA verification sweep), which surfaced unrelated GA fixture issues (a demo evidence keyword mismatch, malformed/mergedagent-contract.jsonmarkers, and pilot doc token mismatch) and therefore the GA sweep failed; these failures are external to the CACert verification logic.pnpm --filter @summit/cacert buildinitially reported TypeScript / local environment type issues in this environment (missing local dev typings / node_modules setup), but tests run viatsxsucceeded; build/CI in a normal dev environment with dependencies installed should succeed.Codex Task