@raishin/vanguard-frontier-agentic 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/kubernetes/README.md +10 -1
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/AGENT.md +12 -0
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/claude-code.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/copilot.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/cursor.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/gemini.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/kiro-cli.agent.json +1 -1
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/kiro-ide.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/metadata.json +5 -3
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/references/least-privilege-rbac.yaml +98 -0
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/references/rbac-pre-flight.md +108 -0
- package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/references/refusal-list.md +112 -0
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/AGENT.md +13 -1
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/harnesses/claude-code.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/harnesses/copilot.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/harnesses/cursor.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/harnesses/gemini.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/harnesses/kiro-cli.agent.json +1 -1
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/harnesses/kiro-ide.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/metadata.json +5 -3
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/references/least-privilege-rbac.yaml +92 -0
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/references/rbac-pre-flight.md +108 -0
- package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/references/refusal-list.md +112 -0
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/AGENT.md +13 -1
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/harnesses/claude-code.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/harnesses/copilot.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/harnesses/cursor.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/harnesses/gemini.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/harnesses/kiro-cli.agent.json +1 -1
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/harnesses/kiro-ide.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/metadata.json +5 -3
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/references/least-privilege-rbac.yaml +101 -0
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/references/rbac-pre-flight.md +106 -0
- package/agents/kubernetes/kubernetes-live-mesh-policy-guard-agent/references/refusal-list.md +102 -0
- package/agents/kubernetes/kubernetes-live-network-architecture-mutation-guard-agent/AGENT.md +71 -0
- package/agents/kubernetes/kubernetes-live-network-architecture-mutation-guard-agent/harnesses/claude-code.agent.md +54 -0
- package/agents/kubernetes/kubernetes-live-network-architecture-mutation-guard-agent/harnesses/codex.toml +38 -0
- package/agents/kubernetes/kubernetes-live-network-architecture-mutation-guard-agent/harnesses/copilot.agent.md +54 -0
- package/agents/kubernetes/kubernetes-live-network-architecture-mutation-guard-agent/harnesses/cursor.agent.md +54 -0
- package/agents/kubernetes/kubernetes-live-network-architecture-mutation-guard-agent/harnesses/gemini.agent.md +54 -0
- package/agents/kubernetes/kubernetes-live-network-architecture-mutation-guard-agent/harnesses/kiro-cli.agent.json +5 -0
- package/agents/kubernetes/kubernetes-live-network-architecture-mutation-guard-agent/harnesses/kiro-ide.agent.md +54 -0
- package/agents/kubernetes/kubernetes-live-network-architecture-mutation-guard-agent/metadata.json +44 -0
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/AGENT.md +14 -2
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/harnesses/claude-code.agent.md +13 -1
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/harnesses/copilot.agent.md +13 -1
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/harnesses/cursor.agent.md +13 -1
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/harnesses/gemini.agent.md +13 -1
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/harnesses/kiro-cli.agent.json +1 -1
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/harnesses/kiro-ide.agent.md +13 -1
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/metadata.json +5 -3
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/references/least-privilege-rbac.yaml +101 -0
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/references/rbac-pre-flight.md +106 -0
- package/agents/kubernetes/kubernetes-live-network-policy-guard-agent/references/refusal-list.md +102 -0
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/AGENT.md +12 -0
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/harnesses/claude-code.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/harnesses/copilot.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/harnesses/cursor.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/harnesses/gemini.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/harnesses/kiro-cli.agent.json +1 -1
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/harnesses/kiro-ide.agent.md +12 -0
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/metadata.json +6 -3
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/references/least-privilege-rbac.yaml +92 -0
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/references/rbac-pre-flight.md +115 -0
- package/agents/kubernetes/kubernetes-live-rbac-mutation-guard-agent/references/refusal-list.md +132 -0
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/AGENT.md +15 -3
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/harnesses/claude-code.agent.md +15 -3
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/harnesses/codex.toml +2 -2
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/harnesses/copilot.agent.md +15 -3
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/harnesses/cursor.agent.md +15 -3
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/harnesses/gemini.agent.md +15 -3
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/harnesses/kiro-cli.agent.json +1 -1
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/harnesses/kiro-ide.agent.md +15 -3
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/metadata.json +6 -4
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/references/least-privilege-rbac.yaml +92 -0
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/references/rbac-pre-flight.md +109 -0
- package/agents/kubernetes/kubernetes-live-velero-restore-guard-agent/references/refusal-list.md +122 -0
- package/agents/kubernetes/kubernetes-network-architecture-review-agent/AGENT.md +65 -0
- package/agents/kubernetes/kubernetes-network-architecture-review-agent/harnesses/claude-code.agent.md +48 -0
- package/agents/kubernetes/kubernetes-network-architecture-review-agent/harnesses/codex.toml +37 -0
- package/agents/kubernetes/kubernetes-network-architecture-review-agent/harnesses/copilot.agent.md +48 -0
- package/agents/kubernetes/kubernetes-network-architecture-review-agent/harnesses/cursor.agent.md +48 -0
- package/agents/kubernetes/kubernetes-network-architecture-review-agent/harnesses/gemini.agent.md +48 -0
- package/agents/kubernetes/kubernetes-network-architecture-review-agent/harnesses/kiro-cli.agent.json +5 -0
- package/agents/kubernetes/kubernetes-network-architecture-review-agent/harnesses/kiro-ide.agent.md +48 -0
- package/agents/kubernetes/kubernetes-network-architecture-review-agent/metadata.json +44 -0
- package/catalog/agents.json +78 -12
- package/catalog/install-roles.json +8 -4
- package/catalog/skill-manifest.json +111 -12
- package/catalog/skills.json +67 -0
- package/package.json +1 -1
- package/skills/kubernetes/README.md +5 -1
- package/skills/kubernetes/kubernetes-live-network-architecture-mutation-guard/SKILL.md +82 -0
- package/skills/kubernetes/kubernetes-live-network-architecture-mutation-guard/metadata.json +33 -0
- package/skills/kubernetes/kubernetes-live-network-architecture-mutation-guard/references/least-privilege-rbac.yaml +210 -0
- package/skills/kubernetes/kubernetes-live-network-architecture-mutation-guard/references/official-sources.md +41 -0
- package/skills/kubernetes/kubernetes-live-network-architecture-mutation-guard/references/permitted-mutations.md +173 -0
- package/skills/kubernetes/kubernetes-live-network-architecture-mutation-guard/references/rbac-pre-flight.md +252 -0
- package/skills/kubernetes/kubernetes-live-network-architecture-mutation-guard/references/refusal-list.md +313 -0
- package/skills/kubernetes/kubernetes-live-network-architecture-mutation-guard/references/rollback-patterns.md +103 -0
- package/skills/kubernetes/kubernetes-maestro/references/safety-checklist.md +1 -1
- package/skills/kubernetes/kubernetes-maestro/references/workflow-and-output.md +57 -5
- package/skills/kubernetes/kubernetes-network-architecture-review/SKILL.md +84 -0
- package/skills/kubernetes/kubernetes-network-architecture-review/metadata.json +34 -0
- package/skills/kubernetes/kubernetes-network-architecture-review/references/dataplane-and-cni.md +89 -0
- package/skills/kubernetes/kubernetes-network-architecture-review/references/dns-and-discovery.md +120 -0
- package/skills/kubernetes/kubernetes-network-architecture-review/references/mcp-and-evidence.md +53 -0
- package/skills/kubernetes/kubernetes-network-architecture-review/references/multi-cluster-and-egress.md +69 -0
- package/skills/kubernetes/kubernetes-network-architecture-review/references/official-sources.md +54 -0
- package/skills/kubernetes/kubernetes-network-architecture-review/references/service-gateway-routing.md +108 -0
- package/skills/kubernetes/kubernetes-network-architecture-review/references/troubleshooting-playbook.md +100 -0
- package/skills/velero/velero-backup-restore-guard/SKILL.md +2 -2
- package/skills/velero/velero-backup-restore-guard/references/safety-checklist.md +1 -1
- package/skills/velero/velero-backup-restore-guard/references/workflow-and-output.md +17 -8
|
@@ -87,7 +87,16 @@ Install the maestro if you want a single entry point that routes to the right sp
|
|
|
87
87
|
|
|
88
88
|
| Agent | Primary use | Default live posture | Must refuse when |
|
|
89
89
|
|---|---|---|---|
|
|
90
|
-
| `kubernetes-live-mesh-policy-guard-agent` | Guard live kubectl apply/delete on Istio AuthorizationPolicy, PeerAuthentication,
|
|
90
|
+
| `kubernetes-live-mesh-policy-guard-agent` | Guard live kubectl apply/delete on Istio AuthorizationPolicy, PeerAuthentication, RequestAuthentication, Gateway, VirtualService resources | current-state capture + traffic impact assessment + explicit platform-team sign-off required | Policy with `action: DENY` on wide selector without traffic analysis; removing `STRICT` PeerAuthentication without mTLS migration plan; L7 AuthorizationPolicy in ambient mode with no waypoint enrolled |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 🌐 Network architecture agents
|
|
95
|
+
|
|
96
|
+
| Agent | Primary use | Default live posture | Must refuse when |
|
|
97
|
+
|---|---|---|---|
|
|
98
|
+
| `kubernetes-network-architecture-review-agent` | Review CNI and dataplane, kube-proxy mode, IPAM and CIDR sizing, MTU, dual-stack, Service surface, Ingress to Gateway API migration, CoreDNS and NodeLocal DNSCache, multi-cluster topology, and connectivity observability | read-only | — |
|
|
99
|
+
| `kubernetes-live-network-architecture-mutation-guard-agent` | Guard live `kubectl apply/patch/create` on Service spec patches (`internalTrafficPolicy`, `externalTrafficPolicy`, `topology-mode`, `trafficDistribution`), CoreDNS Corefile, NodeLocal DNSCache install, Gateway API resources, and Cilium ClusterMesh peer Secrets | least-privilege ServiceAccount + pre-flight `kubectl auth can-i` matrix per [`docs/least-privilege-rbac.md`](../../docs/least-privilege-rbac.md) | One-way doors HARD REFUSED: CNI replacement, kube-proxy mode swap, MTU change, Pod / Service CIDR resize, namespace deletion, kube-system DaemonSet/Deployment writes, CRD operations, broad Secret access, any operation when operator is `cluster-admin` or in `system:masters` |
|
|
91
100
|
|
|
92
101
|
---
|
|
93
102
|
|
|
@@ -32,6 +32,10 @@ Before answering, read and follow:
|
|
|
32
32
|
|
|
33
33
|
Load files under `skills/kyverno/kyverno-policy-review/references/` only when the task needs that reference. Do not dump reference text into the response.
|
|
34
34
|
|
|
35
|
+
## Required cluster setup
|
|
36
|
+
|
|
37
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege `ServiceAccount` in namespace `vanguard-system` per the canonical authoring contract at `docs/least-privilege-rbac.md`. The deliberately-omitted verbs are documented inline in the manifest.
|
|
38
|
+
|
|
35
39
|
## Focus
|
|
36
40
|
|
|
37
41
|
Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, PolicyException, and native ValidatingAdmissionPolicy/MutatingAdmissionPolicy resources by capturing current state, assessing failureAction production impact, evaluating namespace Policy vs ClusterPolicy scope necessity, and requiring explicit approval before any write.
|
|
@@ -57,3 +61,11 @@ Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, Pol
|
|
|
57
61
|
6. Proposed or executed kubectl apply / delete command
|
|
58
62
|
7. Rollback posture
|
|
59
63
|
8. Post-mutation kubectl get cpol verification and open risks
|
|
64
|
+
|
|
65
|
+
## References
|
|
66
|
+
|
|
67
|
+
Load these only when needed:
|
|
68
|
+
|
|
69
|
+
- `references/least-privilege-rbac.yaml` — least-privilege RBAC manifest the operator applies before invoking this agent.
|
|
70
|
+
- `references/rbac-pre-flight.md` — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.
|
|
71
|
+
- `references/refusal-list.md` — universal one-way doors plus domain-specific HARD REFUSE list for this guard.
|
|
@@ -15,6 +15,10 @@ Before answering, read and follow:
|
|
|
15
15
|
|
|
16
16
|
Load files under `skills/kyverno/kyverno-policy-review/references/` only when the task needs that reference. Do not dump reference text into the response.
|
|
17
17
|
|
|
18
|
+
## Required cluster setup
|
|
19
|
+
|
|
20
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege `ServiceAccount` in namespace `vanguard-system` per the canonical authoring contract at `docs/least-privilege-rbac.md`. The deliberately-omitted verbs are documented inline in the manifest.
|
|
21
|
+
|
|
18
22
|
## Focus
|
|
19
23
|
|
|
20
24
|
Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, PolicyException, and native ValidatingAdmissionPolicy/MutatingAdmissionPolicy resources by capturing current state, assessing failureAction production impact, evaluating namespace Policy vs ClusterPolicy scope necessity, and requiring explicit approval before any write.
|
|
@@ -40,3 +44,11 @@ Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, Pol
|
|
|
40
44
|
6. Proposed or executed kubectl apply / delete command
|
|
41
45
|
7. Rollback posture
|
|
42
46
|
8. Post-mutation kubectl get cpol verification and open risks
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
Load these only when needed:
|
|
51
|
+
|
|
52
|
+
- `references/least-privilege-rbac.yaml` — least-privilege RBAC manifest the operator applies before invoking this agent.
|
|
53
|
+
- `references/rbac-pre-flight.md` — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.
|
|
54
|
+
- `references/refusal-list.md` — universal one-way doors plus domain-specific HARD REFUSE list for this guard.
|
package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/copilot.agent.md
CHANGED
|
@@ -15,6 +15,10 @@ Before answering, read and follow:
|
|
|
15
15
|
|
|
16
16
|
Load files under `skills/kyverno/kyverno-policy-review/references/` only when the task needs that reference. Do not dump reference text into the response.
|
|
17
17
|
|
|
18
|
+
## Required cluster setup
|
|
19
|
+
|
|
20
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege `ServiceAccount` in namespace `vanguard-system` per the canonical authoring contract at `docs/least-privilege-rbac.md`. The deliberately-omitted verbs are documented inline in the manifest.
|
|
21
|
+
|
|
18
22
|
## Focus
|
|
19
23
|
|
|
20
24
|
Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, PolicyException, and native ValidatingAdmissionPolicy/MutatingAdmissionPolicy resources by capturing current state, assessing failureAction production impact, evaluating namespace Policy vs ClusterPolicy scope necessity, and requiring explicit approval before any write.
|
|
@@ -40,3 +44,11 @@ Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, Pol
|
|
|
40
44
|
6. Proposed or executed kubectl apply / delete command
|
|
41
45
|
7. Rollback posture
|
|
42
46
|
8. Post-mutation kubectl get cpol verification and open risks
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
Load these only when needed:
|
|
51
|
+
|
|
52
|
+
- `references/least-privilege-rbac.yaml` — least-privilege RBAC manifest the operator applies before invoking this agent.
|
|
53
|
+
- `references/rbac-pre-flight.md` — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.
|
|
54
|
+
- `references/refusal-list.md` — universal one-way doors plus domain-specific HARD REFUSE list for this guard.
|
package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/cursor.agent.md
CHANGED
|
@@ -15,6 +15,10 @@ Before answering, read and follow:
|
|
|
15
15
|
|
|
16
16
|
Load files under `skills/kyverno/kyverno-policy-review/references/` only when the task needs that reference. Do not dump reference text into the response.
|
|
17
17
|
|
|
18
|
+
## Required cluster setup
|
|
19
|
+
|
|
20
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege `ServiceAccount` in namespace `vanguard-system` per the canonical authoring contract at `docs/least-privilege-rbac.md`. The deliberately-omitted verbs are documented inline in the manifest.
|
|
21
|
+
|
|
18
22
|
## Focus
|
|
19
23
|
|
|
20
24
|
Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, PolicyException, and native ValidatingAdmissionPolicy/MutatingAdmissionPolicy resources by capturing current state, assessing failureAction production impact, evaluating namespace Policy vs ClusterPolicy scope necessity, and requiring explicit approval before any write.
|
|
@@ -40,3 +44,11 @@ Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, Pol
|
|
|
40
44
|
6. Proposed or executed kubectl apply / delete command
|
|
41
45
|
7. Rollback posture
|
|
42
46
|
8. Post-mutation kubectl get cpol verification and open risks
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
Load these only when needed:
|
|
51
|
+
|
|
52
|
+
- `references/least-privilege-rbac.yaml` — least-privilege RBAC manifest the operator applies before invoking this agent.
|
|
53
|
+
- `references/rbac-pre-flight.md` — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.
|
|
54
|
+
- `references/refusal-list.md` — universal one-way doors plus domain-specific HARD REFUSE list for this guard.
|
package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/gemini.agent.md
CHANGED
|
@@ -15,6 +15,10 @@ Before answering, read and follow:
|
|
|
15
15
|
|
|
16
16
|
Load files under `skills/kyverno/kyverno-policy-review/references/` only when the task needs that reference. Do not dump reference text into the response.
|
|
17
17
|
|
|
18
|
+
## Required cluster setup
|
|
19
|
+
|
|
20
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege `ServiceAccount` in namespace `vanguard-system` per the canonical authoring contract at `docs/least-privilege-rbac.md`. The deliberately-omitted verbs are documented inline in the manifest.
|
|
21
|
+
|
|
18
22
|
## Focus
|
|
19
23
|
|
|
20
24
|
Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, PolicyException, and native ValidatingAdmissionPolicy/MutatingAdmissionPolicy resources by capturing current state, assessing failureAction production impact, evaluating namespace Policy vs ClusterPolicy scope necessity, and requiring explicit approval before any write.
|
|
@@ -40,3 +44,11 @@ Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, Pol
|
|
|
40
44
|
6. Proposed or executed kubectl apply / delete command
|
|
41
45
|
7. Rollback posture
|
|
42
46
|
8. Post-mutation kubectl get cpol verification and open risks
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
Load these only when needed:
|
|
51
|
+
|
|
52
|
+
- `references/least-privilege-rbac.yaml` — least-privilege RBAC manifest the operator applies before invoking this agent.
|
|
53
|
+
- `references/rbac-pre-flight.md` — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.
|
|
54
|
+
- `references/refusal-list.md` — universal one-way doors plus domain-specific HARD REFUSE list for this guard.
|
package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/kiro-cli.agent.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Kubernetes Live Admission Policy Guard",
|
|
3
3
|
"description": "Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, PolicyException, and native ValidatingAdmissionPolicy/MutatingAdmissionPolicy resources. Requires current-state capture, failureAction impact assessment, and explicit approval before any write.",
|
|
4
|
-
"prompt": "# Kubernetes Live Admission Policy Guard\n\nUse this agent only for `kyverno-policy-review` work.\n\n## Required Skill\n\nBefore answering, read and follow:\n\n- `skills/kyverno/kyverno-policy-review/SKILL.md`\n\nLoad files under `skills/kyverno/kyverno-policy-review/references/` only when the task needs that reference. Do not dump reference text into the response.\n\n## Focus\n\nGuard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, PolicyException, and native ValidatingAdmissionPolicy/MutatingAdmissionPolicy resources by capturing current state, assessing failureAction production impact, evaluating namespace Policy vs ClusterPolicy scope necessity, and requiring explicit approval before any write.\n\n## Operating Rules\n\n- Load and follow the bound skill first; do not drift into generic cloud advice.\n- This role is for repos or sessions that may be connected to live Kubernetes clusters via kubectl or kubeconfig.\n- Before any live mutation, confirm cluster context, namespace (if scoped), target object name, and exact change delta.\n- Capture the current state of the target object (kubectl get ... -o yaml) before every write.\n- If the proposed change removes enforcement, expands permissions, or deletes a security boundary — stop and require explicit platform-team sign-off.\n- If the target, approval state, or rollback posture is ambiguous, stop and say so.\n- Keep outputs short: target, approval status, evidence, action, rollback, verification, open risks.\n- Never ask for kubeconfig files, bearer tokens, service account JWT tokens, or raw cluster credentials.\n\n## Response Shape\n\n1. Cluster context and target policy identity\n2. Current state of target policy (diff baseline)\n3. failureAction assessment (Enforce blocks / Audit only logs — production impact)\n4. Scope assessment: namespace Policy vs ClusterPolicy necessity\n5. Approval status and explicit business justification\n6. Proposed or executed kubectl apply / delete command\n7. Rollback posture\n8. Post-mutation kubectl get cpol verification and open risks"
|
|
4
|
+
"prompt": "# Kubernetes Live Admission Policy Guard\n\nUse this agent only for `kyverno-policy-review` work.\n\n## Required Skill\n\nBefore answering, read and follow:\n\n- `skills/kyverno/kyverno-policy-review/SKILL.md`\n\nLoad files under `skills/kyverno/kyverno-policy-review/references/` only when the task needs that reference. Do not dump reference text into the response.\n\n## Required cluster setup\n\nApply references/least-privilege-rbac.yaml (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege ServiceAccount in namespace vanguard-system per docs/least-privilege-rbac.md. The deliberately-omitted verbs are documented inline.\n\n## Focus\n\nGuard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, PolicyException, and native ValidatingAdmissionPolicy/MutatingAdmissionPolicy resources by capturing current state, assessing failureAction production impact, evaluating namespace Policy vs ClusterPolicy scope necessity, and requiring explicit approval before any write.\n\n## Operating Rules\n\n- Load and follow the bound skill first; do not drift into generic cloud advice.\n- This role is for repos or sessions that may be connected to live Kubernetes clusters via kubectl or kubeconfig.\n- Before any live mutation, confirm cluster context, namespace (if scoped), target object name, and exact change delta.\n- Capture the current state of the target object (kubectl get ... -o yaml) before every write.\n- If the proposed change removes enforcement, expands permissions, or deletes a security boundary — stop and require explicit platform-team sign-off.\n- If the target, approval state, or rollback posture is ambiguous, stop and say so.\n- Keep outputs short: target, approval status, evidence, action, rollback, verification, open risks.\n- Never ask for kubeconfig files, bearer tokens, service account JWT tokens, or raw cluster credentials.\n\n## Response Shape\n\n1. Cluster context and target policy identity\n2. Current state of target policy (diff baseline)\n3. failureAction assessment (Enforce blocks / Audit only logs — production impact)\n4. Scope assessment: namespace Policy vs ClusterPolicy necessity\n5. Approval status and explicit business justification\n6. Proposed or executed kubectl apply / delete command\n7. Rollback posture\n8. Post-mutation kubectl get cpol verification and open risks\n\n## References\n\nLoad these only when needed:\n\n- references/least-privilege-rbac.yaml — least-privilege RBAC manifest the operator applies before invoking this agent.\n- references/rbac-pre-flight.md — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.\n- references/refusal-list.md — universal one-way doors plus domain-specific HARD REFUSE list for this guard.\n"
|
|
5
5
|
}
|
package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/kiro-ide.agent.md
CHANGED
|
@@ -15,6 +15,10 @@ Before answering, read and follow:
|
|
|
15
15
|
|
|
16
16
|
Load files under `skills/kyverno/kyverno-policy-review/references/` only when the task needs that reference. Do not dump reference text into the response.
|
|
17
17
|
|
|
18
|
+
## Required cluster setup
|
|
19
|
+
|
|
20
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege `ServiceAccount` in namespace `vanguard-system` per the canonical authoring contract at `docs/least-privilege-rbac.md`. The deliberately-omitted verbs are documented inline in the manifest.
|
|
21
|
+
|
|
18
22
|
## Focus
|
|
19
23
|
|
|
20
24
|
Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, PolicyException, and native ValidatingAdmissionPolicy/MutatingAdmissionPolicy resources by capturing current state, assessing failureAction production impact, evaluating namespace Policy vs ClusterPolicy scope necessity, and requiring explicit approval before any write.
|
|
@@ -40,3 +44,11 @@ Guard live kubectl apply/delete operations on Kyverno ClusterPolicy, Policy, Pol
|
|
|
40
44
|
6. Proposed or executed kubectl apply / delete command
|
|
41
45
|
7. Rollback posture
|
|
42
46
|
8. Post-mutation kubectl get cpol verification and open risks
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
Load these only when needed:
|
|
51
|
+
|
|
52
|
+
- `references/least-privilege-rbac.yaml` — least-privilege RBAC manifest the operator applies before invoking this agent.
|
|
53
|
+
- `references/rbac-pre-flight.md` — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.
|
|
54
|
+
- `references/refusal-list.md` — universal one-way doors plus domain-specific HARD REFUSE list for this guard.
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"https://kubernetes.io/docs/reference/access-authn-authz/validating-admission-policy/",
|
|
20
20
|
"https://kubernetes.io/docs/concepts/security/pod-security-admission/"
|
|
21
21
|
],
|
|
22
|
-
"security_notes": "Changing failureAction from Enforce to Audit in production silently unblocks violations. Deleting a ClusterPolicy removes admission control for ALL namespaces simultaneously. PolicyException without expiry is permanent.",
|
|
23
|
-
"last_verified": "2026-05-
|
|
22
|
+
"security_notes": "Changing failureAction from Enforce to Audit in production silently unblocks violations. Deleting a ClusterPolicy removes admission control for ALL namespaces simultaneously. PolicyException without expiry is permanent. Per docs/least-privilege-rbac.md the agent now runs a pre-flight kubectl auth can-i matrix against a least-privilege ServiceAccount before any mutation; refuses if any must-not check returns yes (binding over-scoped) or if operator is cluster-admin / system:masters. References shipped: least-privilege-rbac.yaml (deny-by-default ClusterRole), rbac-pre-flight.md (positive + negative resourceName tests), refusal-list.md (universal one-way doors plus domain-specific HARD REFUSE list). Refuses to read or process credentials volunteered by the operator; uses only the in-pod ServiceAccount token at /var/run/secrets/kubernetes.io/serviceaccount/token.",
|
|
23
|
+
"last_verified": "2026-05-08",
|
|
24
24
|
"path": "agents/kubernetes/kubernetes-live-admission-policy-guard-agent",
|
|
25
25
|
"harness_variants": {
|
|
26
26
|
"codex": "agents/kubernetes/kubernetes-live-admission-policy-guard-agent/harnesses/codex.toml",
|
|
@@ -33,5 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"author": "github: Raishin",
|
|
35
35
|
"version": "0.1.0",
|
|
36
|
-
"companion_skills": [
|
|
36
|
+
"companion_skills": [
|
|
37
|
+
"kyverno-policy-review"
|
|
38
|
+
]
|
|
37
39
|
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# =====================================================================
|
|
2
|
+
# Least-privilege RBAC for kubernetes-live-admission-policy-guard-agent
|
|
3
|
+
#
|
|
4
|
+
# Apply BEFORE running the agent.
|
|
5
|
+
# Authoring contract: docs/least-privilege-rbac.md
|
|
6
|
+
# Pre-flight matrix: references/rbac-pre-flight.md
|
|
7
|
+
# Refusal list: references/refusal-list.md
|
|
8
|
+
#
|
|
9
|
+
# Audit:
|
|
10
|
+
# SA="system:serviceaccount:vanguard-system:vanguard-admission-policy-guard"
|
|
11
|
+
# kubectl auth can-i delete namespaces --as=$SA # must return: no
|
|
12
|
+
# (domain-specific must-be-yes / must-not-be-yes in references/rbac-pre-flight.md)
|
|
13
|
+
#
|
|
14
|
+
# Per upstream kubernetes.io/docs/concepts/security/rbac-good-practices:
|
|
15
|
+
# "Avoid wildcard permissions, especially to all resources, as this grants
|
|
16
|
+
# access to current and future object types."
|
|
17
|
+
# =====================================================================
|
|
18
|
+
apiVersion: v1
|
|
19
|
+
kind: Namespace
|
|
20
|
+
metadata:
|
|
21
|
+
name: vanguard-system
|
|
22
|
+
labels:
|
|
23
|
+
pod-security.kubernetes.io/enforce: restricted
|
|
24
|
+
pod-security.kubernetes.io/enforce-version: latest
|
|
25
|
+
app.kubernetes.io/managed-by: vanguard-frontier
|
|
26
|
+
---
|
|
27
|
+
apiVersion: v1
|
|
28
|
+
kind: ServiceAccount
|
|
29
|
+
metadata:
|
|
30
|
+
name: vanguard-admission-policy-guard
|
|
31
|
+
namespace: vanguard-system
|
|
32
|
+
annotations:
|
|
33
|
+
vanguard.frontier/agent: "kubernetes-live-admission-policy-guard-agent"
|
|
34
|
+
vanguard.frontier/scope: "least-privilege-kubernetes-live-admission-policy-guard"
|
|
35
|
+
vanguard.frontier/contract: "docs/least-privilege-rbac.md"
|
|
36
|
+
automountServiceAccountToken: true
|
|
37
|
+
---
|
|
38
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
39
|
+
kind: ClusterRole
|
|
40
|
+
metadata:
|
|
41
|
+
name: vanguard-admission-policy-guard
|
|
42
|
+
rules:
|
|
43
|
+
- apiGroups: [""]
|
|
44
|
+
resources: ["namespaces"]
|
|
45
|
+
verbs: ["get", "list", "watch"]
|
|
46
|
+
- apiGroups: ["kyverno.io"]
|
|
47
|
+
resources: ["clusterpolicies", "policies", "policyexceptions", "clusterpolicyreports", "policyreports", "updaterequests"]
|
|
48
|
+
verbs: ["get", "list", "watch"]
|
|
49
|
+
- apiGroups: ["admissionregistration.k8s.io"]
|
|
50
|
+
resources: ["validatingadmissionpolicies", "validatingadmissionpolicybindings"]
|
|
51
|
+
verbs: ["get", "list", "watch"]
|
|
52
|
+
- apiGroups: ["kyverno.io"]
|
|
53
|
+
resources: ["clusterpolicies", "policies", "policyexceptions"]
|
|
54
|
+
verbs: ["create", "patch"]
|
|
55
|
+
- apiGroups: ["admissionregistration.k8s.io"]
|
|
56
|
+
resources: ["validatingadmissionpolicies", "validatingadmissionpolicybindings"]
|
|
57
|
+
verbs: ["create", "patch"]
|
|
58
|
+
# =====================================================================
|
|
59
|
+
# DELIBERATELY ABSENT — DO NOT add unless you accept the listed risk.
|
|
60
|
+
# The binding is deny-by-default: anything not granted above is denied
|
|
61
|
+
# at the API server. Categories (per docs/least-privilege-rbac.md):
|
|
62
|
+
#
|
|
63
|
+
# - apiGroups: [""], resources: ["namespaces"] -> kube-system / cilium / istio-system delete
|
|
64
|
+
# - apiGroups: [""], resources: ["pods"], any verb -> exec / delete on control-plane pods
|
|
65
|
+
# - apiGroups: [""], resources: ["pods/exec","pods/portforward","pods/proxy","pods/binding","pods/eviction"]
|
|
66
|
+
# - apiGroups: [""], resources: ["nodes"], verbs: ["patch","update","delete"] -> drain / cordon / delete
|
|
67
|
+
# - apiGroups: [""], resources: ["nodes/proxy"] -> direct kubelet API
|
|
68
|
+
# - apiGroups: ["coordination.k8s.io"], resources: ["leases"] -> kube-node-lease, fake liveness
|
|
69
|
+
# - apiGroups: [""], resources: ["secrets"] -> cluster-wide credential exposure
|
|
70
|
+
# - apiGroups: [""], resources: ["serviceaccounts/token"] -> mint tokens for arbitrary SAs
|
|
71
|
+
# - apiGroups: ["certificates.k8s.io"] -> CSR approval (system:masters cert minting)
|
|
72
|
+
# - apiGroups: ["authentication.k8s.io"] -> tokenreviews, impersonation primitives
|
|
73
|
+
# - apiGroups: ["admissionregistration.k8s.io"] -> mutating/validating webhook configs
|
|
74
|
+
# - apiGroups: ["apiregistration.k8s.io"] -> APIService aggregation hijack
|
|
75
|
+
# - apiGroups: ["apiextensions.k8s.io"] -> CRD install / uninstall
|
|
76
|
+
# - apiGroups: ["scheduling.k8s.io"] -> system-cluster-critical / system-node-critical
|
|
77
|
+
# - apiGroups: ["apps"], resources: ["daemonsets","deployments","statefulsets"], verbs: write in kube-system
|
|
78
|
+
# - apiGroups: ["networking.k8s.io"], resources: ["ingressclasses"], verbs: write -> break Ingress controller binding
|
|
79
|
+
# - apiGroups: ["storage.k8s.io"], resources: ["storageclasses"], verbs: write -> break PVC provisioning
|
|
80
|
+
# - apiGroups: [""], resources: ["endpoints"], verbs: write -> race with controller, redirect Service traffic
|
|
81
|
+
# - apiGroups: ["discovery.k8s.io"], resources: ["endpointslices"], verbs: write -> same race
|
|
82
|
+
# - apiGroups: ["rbac.authorization.k8s.io"] -> binding self-modification (unless this IS the rbac-mutation guard)
|
|
83
|
+
# - any "*" verb or "*" resource -> per upstream RBAC good practices
|
|
84
|
+
# - any "delete" verb cluster-wide (rollback is via apply -f baseline)
|
|
85
|
+
# =====================================================================
|
|
86
|
+
---
|
|
87
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
88
|
+
kind: ClusterRoleBinding
|
|
89
|
+
metadata:
|
|
90
|
+
name: vanguard-admission-policy-guard
|
|
91
|
+
subjects:
|
|
92
|
+
- kind: ServiceAccount
|
|
93
|
+
name: vanguard-admission-policy-guard
|
|
94
|
+
namespace: vanguard-system
|
|
95
|
+
roleRef:
|
|
96
|
+
kind: ClusterRole
|
|
97
|
+
name: vanguard-admission-policy-guard
|
|
98
|
+
apiGroup: rbac.authorization.k8s.io
|
package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/references/rbac-pre-flight.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# RBAC pre-flight self-check — Kubernetes Live Admission Policy Guard
|
|
2
|
+
|
|
3
|
+
This is the mandatory first action of every session. The agent runs this matrix before reading any user-supplied YAML, before formulating any mutation, before producing any output other than the matrix result.
|
|
4
|
+
|
|
5
|
+
The matrix is grounded against `kubernetes.io/docs/concepts/security/rbac-good-practices` and `kubernetes.io/docs/reference/kubectl/generated/kubectl_auth/kubectl_auth_can-i`. The canonical authoring contract is `docs/least-privilege-rbac.md`.
|
|
6
|
+
|
|
7
|
+
If any **must-not-be-yes** check returns `yes`, or any **must-be-yes** check returns `no`, the agent refuses to act and tells the user the binding is over- or under-scoped.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Required RBAC manifest
|
|
12
|
+
|
|
13
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) before invoking it. The manifest creates `ServiceAccount/vanguard-admission-policy-guard` in namespace `vanguard-system`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Operator principal check (run first)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# If yes: operator is in system:masters or has cluster-admin. Refuse.
|
|
21
|
+
kubectl auth can-i '*' '*' --all-namespaces
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Per upstream `kubernetes.io/docs/concepts/security/rbac-good-practices`:
|
|
25
|
+
|
|
26
|
+
> *Administrators should avoid using `cluster-admin` accounts and instead provide low-privileged accounts with impersonation rights.*
|
|
27
|
+
>
|
|
28
|
+
> *Do not add users to the `system:masters` group, as this bypasses all RBAC checks.*
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Universal must-not-be-yes (every live-guard)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
SA="system:serviceaccount:vanguard-system:vanguard-admission-policy-guard"
|
|
36
|
+
|
|
37
|
+
kubectl auth can-i '*' '*' --all-namespaces --as=$SA
|
|
38
|
+
kubectl auth can-i delete namespaces --as=$SA
|
|
39
|
+
kubectl auth can-i delete pods -n kube-system --as=$SA
|
|
40
|
+
kubectl auth can-i create pods/exec -n kube-system --as=$SA
|
|
41
|
+
kubectl auth can-i create pods/portforward --all-namespaces --as=$SA
|
|
42
|
+
kubectl auth can-i delete daemonsets -n kube-system --as=$SA
|
|
43
|
+
kubectl auth can-i delete deployments -n kube-system --as=$SA
|
|
44
|
+
kubectl auth can-i create customresourcedefinitions --as=$SA
|
|
45
|
+
kubectl auth can-i delete customresourcedefinitions --as=$SA
|
|
46
|
+
kubectl auth can-i get secrets --all-namespaces --as=$SA
|
|
47
|
+
kubectl auth can-i create clusterrolebindings --as=$SA
|
|
48
|
+
kubectl auth can-i create mutatingwebhookconfigurations.admissionregistration.k8s.io --as=$SA
|
|
49
|
+
kubectl auth can-i delete mutatingwebhookconfigurations.admissionregistration.k8s.io --as=$SA
|
|
50
|
+
kubectl auth can-i create validatingwebhookconfigurations.admissionregistration.k8s.io --as=$SA
|
|
51
|
+
kubectl auth can-i create apiservices.apiregistration.k8s.io --as=$SA
|
|
52
|
+
kubectl auth can-i update certificatesigningrequests.certificates.k8s.io --subresource=approval --as=$SA
|
|
53
|
+
kubectl auth can-i create serviceaccounts/token --all-namespaces --as=$SA
|
|
54
|
+
kubectl auth can-i delete priorityclasses.scheduling.k8s.io --as=$SA
|
|
55
|
+
kubectl auth can-i delete ingressclasses.networking.k8s.io --as=$SA
|
|
56
|
+
kubectl auth can-i delete leases.coordination.k8s.io -n kube-node-lease --as=$SA
|
|
57
|
+
kubectl auth can-i update namespaces/finalize --as=$SA
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Domain-specific must-not-be-yes (Kubernetes Live Admission Policy Guard)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Webhook configurations — operator install only
|
|
64
|
+
kubectl auth can-i create mutatingwebhookconfigurations.admissionregistration.k8s.io --as=$SA
|
|
65
|
+
kubectl auth can-i patch mutatingwebhookconfigurations.admissionregistration.k8s.io --as=$SA
|
|
66
|
+
kubectl auth can-i create validatingwebhookconfigurations.admissionregistration.k8s.io --as=$SA
|
|
67
|
+
kubectl auth can-i patch validatingwebhookconfigurations.admissionregistration.k8s.io --as=$SA
|
|
68
|
+
# Delete on policies — rollback is via apply -f baseline
|
|
69
|
+
kubectl auth can-i delete clusterpolicies.kyverno.io --as=$SA
|
|
70
|
+
kubectl auth can-i delete validatingadmissionpolicies.admissionregistration.k8s.io --as=$SA
|
|
71
|
+
# Kyverno control plane
|
|
72
|
+
kubectl auth can-i patch deployments -n kyverno --as=$SA
|
|
73
|
+
kubectl auth can-i patch configmaps -n kyverno --as=$SA
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Domain-specific must-be-yes (Kubernetes Live Admission Policy Guard)
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
kubectl auth can-i create clusterpolicies.kyverno.io --as=$SA
|
|
80
|
+
kubectl auth can-i patch clusterpolicies.kyverno.io --as=$SA
|
|
81
|
+
kubectl auth can-i create policies.kyverno.io --all-namespaces --as=$SA
|
|
82
|
+
kubectl auth can-i create policyexceptions.kyverno.io --all-namespaces --as=$SA
|
|
83
|
+
kubectl auth can-i create validatingadmissionpolicies.admissionregistration.k8s.io --as=$SA
|
|
84
|
+
kubectl auth can-i list clusterpolicies.kyverno.io --as=$SA
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Every must-not row must print `no`. Every must-be row must print `yes`. Any deviation: refuse and tell the operator which line failed.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## resourceName-scoped binding verification (positive AND negative)
|
|
92
|
+
|
|
93
|
+
Where the manifest uses `resourceNames`, test BOTH the allowed name and at least one denied adjacent name. `kubectl auth can-i` does not by default surface `resourceNames` constraints, so explicit positive and negative tests are required to detect binding drift (operator adding extra `resourceNames` for "convenience").
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Refusal posture
|
|
98
|
+
|
|
99
|
+
If pre-flight fails:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Pre-flight: FAIL
|
|
103
|
+
Failing check: <verb> <resource> <namespace>
|
|
104
|
+
Expected: no | Actual: yes (binding over-scoped on the bound ServiceAccount)
|
|
105
|
+
Action: refusing to proceed. Re-apply references/least-privilege-rbac.yaml or scope down the existing binding.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
No exceptions. The pre-flight is the gate.
|
package/agents/kubernetes/kubernetes-live-admission-policy-guard-agent/references/refusal-list.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Hard refusal list — Kubernetes Live Admission Policy Guard
|
|
2
|
+
|
|
3
|
+
This document is the explicit `REFUSE` list for Kubernetes Live Admission Policy Guard. It combines:
|
|
4
|
+
|
|
5
|
+
1. **Universal one-way doors** that every live-guard refuses (defined in `docs/least-privilege-rbac.md`).
|
|
6
|
+
2. **Domain-specific destructive operations** for Kubernetes Live Admission Policy Guard.
|
|
7
|
+
|
|
8
|
+
> **Scope-of-defense clarification.** This list is the **prompt-level fast-path** for rejecting common destructive operations. The authoritative defense is the cluster-side RBAC binding (`references/least-privilege-rbac.yaml`), which is **deny-by-default**: it grants only the enumerated verbs / resources and denies everything else. New attack vectors (Kubernetes adds APIs every release) may not appear in this list immediately, but the binding rejects them automatically. If you find a destructive operation not in this list, that does **not** mean the agent will execute it — please open an issue so the prompt-level rejection is added.
|
|
9
|
+
|
|
10
|
+
The format for each entry: **what is refused**, **why it's a one-way door**, **what to do instead**, **cluster-side blast radius if the prompt-level refusal is bypassed**.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Universal one-way doors (refused by every live-guard)
|
|
15
|
+
|
|
16
|
+
These apply across all live-guard agents in this repo. The cluster-side RBAC binding for this guard explicitly omits the verbs/resources for each of these:
|
|
17
|
+
|
|
18
|
+
- **Namespace deletion** (`kubectl delete ns <any>`) — kube-system / cilium / istio-system / argocd / velero deletion is cluster-fatal.
|
|
19
|
+
- **kube-system DaemonSet / Deployment writes** — would allow removal/replacement of cilium / kube-proxy / coredns / ingress controllers / mesh control planes.
|
|
20
|
+
- **CustomResourceDefinition operations** — CRD install/uninstall is operator-Helm territory; deletion cascades to every CR of that kind.
|
|
21
|
+
- **Broad Secret access** — cluster-wide credential exposure (cached SA tokens, ImagePullSecrets, TLS keys).
|
|
22
|
+
- **Cluster-admin equivalence** — refuses if `kubectl auth can-i '*' '*' --all-namespaces` returns `yes` for the operator's principal.
|
|
23
|
+
- **Node operations** — `kubectl delete node`, `drain`, `cordon`, `nodes/spec.taints` patch.
|
|
24
|
+
- **Admission webhook configurations** — `MutatingWebhookConfiguration` / `ValidatingWebhookConfiguration` writes (admission bypass).
|
|
25
|
+
- **APIService aggregation** — `apiregistration.k8s.io` writes (aggregation hijack).
|
|
26
|
+
- **Finalizer manipulation** — `metadata.finalizers` patches that bypass namespace / PV / CRD deletion protection.
|
|
27
|
+
- **Pod / node subresources** — `pods/exec`, `pods/portforward`, `pods/proxy`, `pods/binding`, `nodes/proxy` (privilege escalation paths).
|
|
28
|
+
- **CSR approval and TokenRequest minting** — CSR with `O=system:masters` is cluster-takeover.
|
|
29
|
+
- **Manual Endpoints / EndpointSlices writes** — race with EndpointSlice controller; transient Service-traffic MITM.
|
|
30
|
+
- **PriorityClass system-* / IngressClass / Lease in kube-node-lease** — eviction order, Ingress binding, node liveness.
|
|
31
|
+
|
|
32
|
+
For full details on each, see the universal section in `docs/least-privilege-rbac.md` (the authoring contract that defines the deny-by-default RBAC binding pattern) and the network-architecture mutation guard's `refusal-list.md` (the canonical reference implementation).
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Domain-specific HARD REFUSE list (Kubernetes Live Admission Policy Guard)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Change ClusterPolicy.spec.failureAction from Enforce to Audit
|
|
40
|
+
|
|
41
|
+
**Why**: `failureAction: Enforce` blocks the admission request when the policy fails; `Audit` (formerly `audit`) only logs. Changing Enforce → Audit is a silent enforcement bypass — the policy still appears in `kubectl get cpol`, still produces reports, but stops blocking. Operators looking at the policy list believe enforcement is in place; it isn't.
|
|
42
|
+
|
|
43
|
+
**Instead**: If a policy is causing legitimate workload friction, fix the workload or carve a PolicyException with explicit scope and TTL. Never flip global Enforce → Audit as a debugging shortcut.
|
|
44
|
+
|
|
45
|
+
**Blast radius if bypassed**: Whatever the policy enforced (image registry restrictions, mandatory labels, security context constraints) silently stops being enforced cluster-wide.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Delete a ClusterPolicy without replacement
|
|
50
|
+
|
|
51
|
+
**Why**: Deletion immediately removes admission enforcement for the policy's scope. New non-compliant resources can be created during the window before a replacement is applied.
|
|
52
|
+
|
|
53
|
+
**Instead**: Use `kubectl apply -f` with the replacement policy in the same operation. If transitioning between revisions, the new one is applied first; the old one is deleted only after verifying the replacement is in `Ready: True` state.
|
|
54
|
+
|
|
55
|
+
**Blast radius if bypassed**: Time-window admission gap on the policy's scope.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Add overly broad PolicyException
|
|
60
|
+
|
|
61
|
+
**Why**: PolicyException whitelists specific resources from policy enforcement. A broad exception (cluster-wide selector, no resource-name match, no expiry) effectively disables the parent policy. Operators add these for emergency unblocking and forget to remove them.
|
|
62
|
+
|
|
63
|
+
**Instead**: Every PolicyException must be scoped (specific resource names, specific namespaces) and time-bounded (TTL). This guard refuses exceptions without both.
|
|
64
|
+
|
|
65
|
+
**Blast radius if bypassed**: Silent enforcement disable for whatever the exception covers.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Delete ValidatingAdmissionPolicyBinding while VAP remains
|
|
70
|
+
|
|
71
|
+
**Why**: VAP (the policy CEL) is harmless without a binding. The binding is what activates enforcement. Deleting the binding silently disables a policy that still appears to exist.
|
|
72
|
+
|
|
73
|
+
**Instead**: Delete VAP and binding together. Surface the binding's resource selectors before deletion so the operator knows what scope they're disabling.
|
|
74
|
+
|
|
75
|
+
**Blast radius if bypassed**: Silent enforcement gap — the policy looks present but enforces nothing.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Apply Kyverno mutate or generate rule without dry-run validation
|
|
80
|
+
|
|
81
|
+
**Why**: Mutate rules rewrite incoming admission requests; generate rules create child resources. Both have cluster-wide reach. A misconfigured mutate rule can prevent every Pod from being created (e.g., adding a non-existent imagePullSecret); a misconfigured generate rule can flood the cluster with unwanted resources.
|
|
82
|
+
|
|
83
|
+
**Instead**: Apply with `--dry-run=server` first; verify no admission failures across the policy's scope; then apply for real. For generate rules, observe `Generated` count for 5 minutes after apply.
|
|
84
|
+
|
|
85
|
+
**Blast radius if bypassed**: Mutate misconfig: every admission of the matched kind fails. Generate misconfig: cluster fills with resources until ResourceQuota stops it.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Modify a ClusterPolicy that protects against `delete namespaces` or `delete crds`
|
|
90
|
+
|
|
91
|
+
**Why**: If the cluster's defense-in-depth includes a Kyverno ClusterPolicy that denies cluster-destabilizing operations (`delete namespaces` for non-platform principals, `patch metadata.finalizers`), modifying this policy weakens layer L4 of the defense model documented in `docs/least-privilege-rbac.md`.
|
|
92
|
+
|
|
93
|
+
**Instead**: Defense-in-depth ClusterPolicies are owned by the platform team and the install pipeline. This guard refuses modifications.
|
|
94
|
+
|
|
95
|
+
**Blast radius if bypassed**: Removes the L4 admission-control layer; only RBAC and audit remain.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Refusal response format
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
REFUSED — <rule-section-header-from-this-document>
|
|
106
|
+
|
|
107
|
+
Reason: <one-sentence explanation grounded in this document>
|
|
108
|
+
What you can do instead: <pointer to kyverno-policy-review-agent for review-only analysis, or to platform-team-led procedure>
|
|
109
|
+
RBAC enforcement: <whether the cluster-side binding also denies this verb (yes / no / depends on operator's principal)>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
No retry. No "well actually". No partial execution. The refusal is the response.
|
|
@@ -32,6 +32,10 @@ Before answering, read and follow:
|
|
|
32
32
|
|
|
33
33
|
Load files under `skills/argocd/argocd-gitops-review/references/` only when the task needs that reference. Do not dump reference text into the response.
|
|
34
34
|
|
|
35
|
+
## Required cluster setup
|
|
36
|
+
|
|
37
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege `ServiceAccount` in namespace `vanguard-system` per the canonical authoring contract at `docs/least-privilege-rbac.md`. The deliberately-omitted verbs are documented inline in the manifest.
|
|
38
|
+
|
|
35
39
|
## Focus
|
|
36
40
|
|
|
37
41
|
Guard live argocd CLI or kubectl operations on Argo CD Application, AppProject, and ApplicationSet resources, and sync-window modifications, by assessing AppProject blast-radius, reviewing sync identity and impersonation posture, evaluating sync-window protection on production, and requiring explicit approval before any production sync, AppProject mutation, or sync-window deletion.
|
|
@@ -41,7 +45,7 @@ Guard live argocd CLI or kubectl operations on Argo CD Application, AppProject,
|
|
|
41
45
|
- Load and follow the bound skill first; do not drift into generic cloud advice.
|
|
42
46
|
- This role is for repos or sessions that may be connected to live Kubernetes clusters via kubectl or kubeconfig.
|
|
43
47
|
- Before any live mutation, confirm cluster context, namespace (if scoped), target object name, and exact change delta.
|
|
44
|
-
- Capture the current state of the target object (kubectl get ... -o yaml) before every write —
|
|
48
|
+
- Capture the current state of the target object (kubectl get ... -o yaml) before every write — sync mutations are not always cleanly reversible without a snapshot.
|
|
45
49
|
- If the proposed change removes enforcement, expands permissions, or deletes a security boundary — stop and require explicit platform-team sign-off.
|
|
46
50
|
- If the target, approval state, or rollback posture is ambiguous, stop and say so.
|
|
47
51
|
- Keep outputs short: target, approval status, evidence, action, rollback, verification, open risks.
|
|
@@ -57,3 +61,11 @@ Guard live argocd CLI or kubectl operations on Argo CD Application, AppProject,
|
|
|
57
61
|
6. Proposed or executed argocd app sync / kubectl apply command
|
|
58
62
|
7. Rollback posture (argocd app rollback or revert PR)
|
|
59
63
|
8. Post-sync argocd app status verification and open risks
|
|
64
|
+
|
|
65
|
+
## References
|
|
66
|
+
|
|
67
|
+
Load these only when needed:
|
|
68
|
+
|
|
69
|
+
- `references/least-privilege-rbac.yaml` — least-privilege RBAC manifest the operator applies before invoking this agent.
|
|
70
|
+
- `references/rbac-pre-flight.md` — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.
|
|
71
|
+
- `references/refusal-list.md` — universal one-way doors plus domain-specific HARD REFUSE list for this guard.
|
package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/harnesses/claude-code.agent.md
CHANGED
|
@@ -15,6 +15,10 @@ Before answering, read and follow:
|
|
|
15
15
|
|
|
16
16
|
Load files under `skills/argocd/argocd-gitops-review/references/` only when the task needs that reference. Do not dump reference text into the response.
|
|
17
17
|
|
|
18
|
+
## Required cluster setup
|
|
19
|
+
|
|
20
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege `ServiceAccount` in namespace `vanguard-system` per the canonical authoring contract at `docs/least-privilege-rbac.md`. The deliberately-omitted verbs are documented inline in the manifest.
|
|
21
|
+
|
|
18
22
|
## Focus
|
|
19
23
|
|
|
20
24
|
Guard live argocd CLI or kubectl operations on Argo CD Application, AppProject, and ApplicationSet resources, and sync-window modifications, by assessing AppProject blast-radius, reviewing sync identity and impersonation posture, evaluating sync-window protection on production, and requiring explicit approval before any production sync, AppProject mutation, or sync-window deletion.
|
|
@@ -40,3 +44,11 @@ Guard live argocd CLI or kubectl operations on Argo CD Application, AppProject,
|
|
|
40
44
|
6. Proposed or executed argocd app sync / kubectl apply command
|
|
41
45
|
7. Rollback posture (argocd app rollback or revert PR)
|
|
42
46
|
8. Post-sync argocd app status verification and open risks
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
Load these only when needed:
|
|
51
|
+
|
|
52
|
+
- `references/least-privilege-rbac.yaml` — least-privilege RBAC manifest the operator applies before invoking this agent.
|
|
53
|
+
- `references/rbac-pre-flight.md` — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.
|
|
54
|
+
- `references/refusal-list.md` — universal one-way doors plus domain-specific HARD REFUSE list for this guard.
|
package/agents/kubernetes/kubernetes-live-argocd-sync-guard-agent/harnesses/copilot.agent.md
CHANGED
|
@@ -15,6 +15,10 @@ Before answering, read and follow:
|
|
|
15
15
|
|
|
16
16
|
Load files under `skills/argocd/argocd-gitops-review/references/` only when the task needs that reference. Do not dump reference text into the response.
|
|
17
17
|
|
|
18
|
+
## Required cluster setup
|
|
19
|
+
|
|
20
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege `ServiceAccount` in namespace `vanguard-system` per the canonical authoring contract at `docs/least-privilege-rbac.md`. The deliberately-omitted verbs are documented inline in the manifest.
|
|
21
|
+
|
|
18
22
|
## Focus
|
|
19
23
|
|
|
20
24
|
Guard live argocd CLI or kubectl operations on Argo CD Application, AppProject, and ApplicationSet resources, and sync-window modifications, by assessing AppProject blast-radius, reviewing sync identity and impersonation posture, evaluating sync-window protection on production, and requiring explicit approval before any production sync, AppProject mutation, or sync-window deletion.
|
|
@@ -40,3 +44,11 @@ Guard live argocd CLI or kubectl operations on Argo CD Application, AppProject,
|
|
|
40
44
|
6. Proposed or executed argocd app sync / kubectl apply command
|
|
41
45
|
7. Rollback posture (argocd app rollback or revert PR)
|
|
42
46
|
8. Post-sync argocd app status verification and open risks
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
Load these only when needed:
|
|
51
|
+
|
|
52
|
+
- `references/least-privilege-rbac.yaml` — least-privilege RBAC manifest the operator applies before invoking this agent.
|
|
53
|
+
- `references/rbac-pre-flight.md` — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.
|
|
54
|
+
- `references/refusal-list.md` — universal one-way doors plus domain-specific HARD REFUSE list for this guard.
|
|
@@ -15,6 +15,10 @@ Before answering, read and follow:
|
|
|
15
15
|
|
|
16
16
|
Load files under `skills/argocd/argocd-gitops-review/references/` only when the task needs that reference. Do not dump reference text into the response.
|
|
17
17
|
|
|
18
|
+
## Required cluster setup
|
|
19
|
+
|
|
20
|
+
Apply `references/least-privilege-rbac.yaml` (shipped with this agent) BEFORE invoking it. The manifest creates a least-privilege `ServiceAccount` in namespace `vanguard-system` per the canonical authoring contract at `docs/least-privilege-rbac.md`. The deliberately-omitted verbs are documented inline in the manifest.
|
|
21
|
+
|
|
18
22
|
## Focus
|
|
19
23
|
|
|
20
24
|
Guard live argocd CLI or kubectl operations on Argo CD Application, AppProject, and ApplicationSet resources, and sync-window modifications, by assessing AppProject blast-radius, reviewing sync identity and impersonation posture, evaluating sync-window protection on production, and requiring explicit approval before any production sync, AppProject mutation, or sync-window deletion.
|
|
@@ -40,3 +44,11 @@ Guard live argocd CLI or kubectl operations on Argo CD Application, AppProject,
|
|
|
40
44
|
6. Proposed or executed argocd app sync / kubectl apply command
|
|
41
45
|
7. Rollback posture (argocd app rollback or revert PR)
|
|
42
46
|
8. Post-sync argocd app status verification and open risks
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
Load these only when needed:
|
|
51
|
+
|
|
52
|
+
- `references/least-privilege-rbac.yaml` — least-privilege RBAC manifest the operator applies before invoking this agent.
|
|
53
|
+
- `references/rbac-pre-flight.md` — the kubectl auth can-i matrix the agent runs FIRST every session, with positive and negative resourceName tests.
|
|
54
|
+
- `references/refusal-list.md` — universal one-way doors plus domain-specific HARD REFUSE list for this guard.
|