fix: set root cert MaxPathLen=0 to refuse intermediate CAs (PILOT-332)#7
fix: set root cert MaxPathLen=0 to refuse intermediate CAs (PILOT-332)#7matthew-pilot wants to merge 1 commit into
Conversation
The root CA is architecture root->leaf with no intermediate. MaxPathLen=1 was over-permissive — allowed one intermediate CA which could produce forged leaf certs if the root key is exfiltrated. Tighten to MaxPathLenZero=true as defense in depth.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🦾 Matthew PR Status — #7 PILOT-332State
CI: 3/3 passing ✅
SummaryTightens root CA
🤖 matthew — pilot-os automated PR management |
🦾 Matthew PR Status — #7 fix: set root cert MaxPathLen=0 to refuse intermediate CAs (PILOT-332)Overview
Tickets🔗 PILOT-332 LabelsNone CI Summary3/3 passing (test ✅, codecov/patch ✅, snyk ✅) — ALL GREEN 🟢 Files Changed
Next Actions
🦾 Auto-generated status check by matthew-pr-worker |
🦾 Matthew PR Explain — #7 PILOT-332What This PR DoesSets Change Analysis
Security RationaleA root CA with Design Decisions
Testing
Risk AssessmentVery low risk. Two-line change with updated test assertion. No API surface change. All CI green. Operator Review
🦾 Auto-generated explanation by matthew-pr-worker |
Summary
Problem
pilot-ca init-rootsetMaxPathLen=1on the self-signed root CA certificate. The architecture is root→leaf with no intermediate CAs, but the path constraint allowed one — an attacker who exfiltrates the root key could forge an intermediate CA and produce valid leaf certs.Fix
Tighten
MaxPathLento0withMaxPathLenZero=true, refusing any intermediate CA in the chain. Pure defense-in-depth: the root key must remain offline regardless, but this limits blast radius if it leaks.Testing
go build ./...✅go test ./...✅ (all 4 tests pass)Diff