| # ADR-0007: Codex Security Preservation Policy | |
| **Status:** Accepted | |
| **Date:** 2026-08-18 | |
| --- | |
| ## Decision | |
| All modifications to the PAX-Coder security and provenance layer MUST: | |
| 1. **Read applicable ADRs first** β Understand architectural constraints | |
| 2. **Propose new ADR or update** β If changing security decisions | |
| 3. **Pass CI validation** β Commits that violate accepted ADRs are rejected | |
| 4. **Preserve existing artifacts** β No deletions without explicit ADR justification | |
| 5. **Document security claims clearly** β No unverifiable assertions | |
| ## ADR CI Gate | |
| Before accepting security-layer changes, CI validates: | |
| ``` | |
| β ADR syntax (valid YAML) | |
| β ADR IDs (no duplicates) | |
| β Status transitions (accepted/superseded/etc) | |
| β Required fields (context, decision, rules, consequences) | |
| β No private keys in commits | |
| β No embedded secrets | |
| β Prohibited patterns not in code | |
| β Verification artifacts present | |
| ``` | |
| Commits violating ADRs are rejected with: | |
| ``` | |
| COMMIT REJECTED: Violates ADR-0002 (Authorization Boundary) | |
| Violation: Authorization check is client-side conditional only | |
| See: docs/adr/0002-authorization-boundary.md | |
| To proceed: | |
| 1. Update the authorization implementation | |
| 2. Create/update ADR explaining the change | |
| 3. Resubmit | |
| ``` | |
| ## What Codex Must NOT Do | |
| - Delete existing security artifacts (proofs, kernels, manifests) | |
| - Implement authorization as removable Python conditionals | |
| - Embed private keys in code or binaries | |
| - Use silent corruption for security failures | |
| - Make unverifiable security claims | |
| - Bypass ADR constraints without new ADR | |
| ## What Codex Can Do | |
| - Implement new ADRs (with justification) | |
| - Update verification logic (if ADR-compliant) | |
| - Add authorization service integration (following ADR-0006) | |
| - Improve documentation (more precise, not weaker) | |
| - Refactor verification (same boundaries, clearer code) | |
| ## Process | |
| ``` | |
| Proposed Change | |
| β | |
| Does it modify security layer? | |
| ββ NO β Standard PR review | |
| ββ YES β Check ADRs | |
| β | |
| Does it align with accepted ADRs? | |
| ββ YES β CI validation | |
| β β | |
| β Pass CI β Approve | |
| ββ NO β New ADR required | |
| β | |
| Propose new ADR | |
| β | |
| ADR-0001/0002/etc conflict resolution | |
| β | |
| Accept new ADR or modify existing | |
| β | |
| Re-submit with updated ADR | |
| ``` | |
| ## Codex Authorization | |
| Codex is authorized to: | |
| - Create new ADRs for security features | |
| - Update ADRs to reflect agreed changes | |
| - Reject changes that violate accepted ADRs | |
| - Propose ADR supersessions with justification | |
| Codex is NOT authorized to: | |
| - Silently ignore violated ADRs | |
| - Implement unspecified security properties | |
| - Delete or rename ADRs | |
| - Bypass the ADR process | |
| --- | |
| **Related ADRs:** | |
| - All other ADRs in docs/adr/ | |