Repository navigation
fix(p5): isolation suite and static guards after Codex review (DRF-70) - #73
Merged
Merged
Conversation
Suite (tests/isolation/run.sh): - network and T07 probes run as Jobs (VPC CNI ignores ownerless Pods); only TIMEOUT is a network deny, refused/DNS/job errors fail - eks needs NET_PHASE=control|enforced; enforced checks the control JSON and waits for a PolicyEndpoint per Git NetworkPolicy - T07: only STS AccessDenied is a deny; missing annotation/IRSA is an error - P4 wrapper requires exit 0 and the full case set, platform included - admission names the denying policy, webhook failure is an error; can-i non yes/no is an error; workload SA cases; T03 foreign kind - evidence scrubbed; exit trap removes and verifies suite objects check.sh: egress peers and ports, tenant label scope, tenant group bound only in its namespace, DB CIDRs match Terraform vpc_cidr; 6 guard cases. SPEC P5-T4.2: suspend Argo self-heal before removing guardrails, Audit to Deny by commit, CIDR pre-flight. NetworkPolicy header: T10, T06. Kind (Claude, 24/11): 38 cases, 32 PASS, 0 FAIL, 6 SKIPPED_NEEDS_EKS; one policy in Audit exits 1; guards 71/71. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- control: NetworkPolicy list must succeed and be empty, else stop before probing; enforced accepts only a fully passing control receipt of RUN_ID-control for the same sandbox (fixed result codes) - job(): read a RESULT line only when the Job is Complete=True; a failed Job is job-failed even if it logged RESULT TIMEOUT - cleanup: failed lists are unverified, not empty; cleanup is a recorded case before RESULT; trap still cleans on abnormal exit - RBAC by SubjectAccessReview (evaluationError is an error, not a deny) - T03: failed Deployment or namespace list is an error - T07 apply errors and control-file values kept off the output; observed is scrubbed too - check.sh: each tenant's egress is exactly DNS 53, DB 5432, HTTPS 443 outside the VPC, app 8080 in-tenant; 3 guard cases Kind (Claude, 24/11): 39 cases, 33 PASS, 0 FAIL, 6 SKIPPED_NEEDS_EKS; Audit self-test exits 1; Job and cleanup harness pass; guards 74/74. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Third Codex pass on PR #73 at 1035cbc: - job(): the kubectl logs read must succeed before a RESULT line is parsed; a failed read is job-log-error - cleanup also deletes and waits for window.sh probe Pods (zdr-probe) in tenant-a, tenant-b and zdr-platform, then counts them - scrub loops so adjacent 12-digit IDs are all replaced - check.sh: egress keyed by the policy podSelector (Egress policyTypes only); ports must be int with TCP/UDP; 2 guard cases Kind (Claude, 24/11): 39 cases, 33 PASS, 0 FAIL, 6 SKIPPED_NEEDS_EKS; Audit self-test exits 1; harness: failing log read -> job-log-error, leftover zdr-probe Pod removed before verified-empty; guards 76/76. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex approved PR #73 at ae20196 with two non-blocking should-fix items: - check.sh: a NetworkPolicy without policyTypes counts its egress rules (Kubernetes adds Egress when egress rules exist); guard case for an extra egress policy without policyTypes - run.sh exports PROBE_RUN; window.sh labels probe Pods with rag.zero-drift.io/probe-run when it is set (unchanged otherwise); cleanup deletes and counts only this run's probes Kind (Claude, 24/11): 39 cases, 33 PASS, 0 FAIL, 6 SKIPPED_NEEDS_EKS; Audit self-test exits 1; this run's probe removed, another run's probe kept; guards 77/77. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Codex REQUEST CHANGES review of the P5 code at
340558c(DRF-70, SPEC-P5 P5-T4.1/T4.2).Blockers
TIMEOUTcounts as a network deny; refused, DNS and job errors areerror:*and fail. eks mode needsNET_PHASE=control|enforced: control refuses to run while a tenant NetworkPolicy exists and expects every path open; enforced checks the control JSON and waits for a PolicyEndpoint per Git NetworkPolicy.AccessDeniedis a deny; an empty role annotation, missing IRSA env or other errors fail. The ARN is never printed.window.sh probemust exit 0 and print its full case set (platformincluded); a missing case orSKIPfails.Should-fix
deny:kyverno:<policy>); an uncallable webhook iserror:webhook.can-ianswers other than yes/no are errors; workload ServiceAccount cases added.gitops/lab) and checks nothing was created.gitops/check.sh: egress peers and ports, tenant label only on tenant namespaces, tenant group bound only in its own namespace, DB CIDRs match Terraformvpc_cidr; 6 new guard cases.Verification (Claude, throwaway kind cluster, 24/11)
MODE=kindwith KyvernoDenyand Argo CD: 38 cases, 32 PASS, 0 FAIL, 6SKIPPED_NEEDS_EKS, exit 0, no suite object left.zdr-image-digestinAudit: FAIL on T14-tag, T14-registry, T15; exit 1.gitops/tests/check_guards.sh: 71/71;gitops/check.sh: PASS.Not verified: eks control/enforced phases, T07 and P4 probes on a real cluster (L3 window, separate approval).
🤖 Generated with Claude Code