warrantkit 0.1.0__tar.gz

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.
Files changed (60) hide show
  1. warrantkit-0.1.0/LICENSE +85 -0
  2. warrantkit-0.1.0/PKG-INFO +394 -0
  3. warrantkit-0.1.0/README.md +375 -0
  4. warrantkit-0.1.0/agentcontain/__init__.py +90 -0
  5. warrantkit-0.1.0/agentcontain/__main__.py +3 -0
  6. warrantkit-0.1.0/agentcontain/cli.py +154 -0
  7. warrantkit-0.1.0/agentcontain/demo.py +124 -0
  8. warrantkit-0.1.0/agentcontain/engine.py +525 -0
  9. warrantkit-0.1.0/agentcontain/events.py +54 -0
  10. warrantkit-0.1.0/agentcontain/evidence.py +398 -0
  11. warrantkit-0.1.0/agentcontain/external_evidence.py +91 -0
  12. warrantkit-0.1.0/agentcontain/fleet.py +163 -0
  13. warrantkit-0.1.0/agentcontain/fleet_status.py +85 -0
  14. warrantkit-0.1.0/agentcontain/fleet_status_history.py +69 -0
  15. warrantkit-0.1.0/agentcontain/identity.py +47 -0
  16. warrantkit-0.1.0/agentcontain/incident.py +98 -0
  17. warrantkit-0.1.0/agentcontain/ingest.py +36 -0
  18. warrantkit-0.1.0/agentcontain/operator.py +182 -0
  19. warrantkit-0.1.0/agentcontain/policy.py +38 -0
  20. warrantkit-0.1.0/agentcontain/policy_assignment.py +111 -0
  21. warrantkit-0.1.0/agentcontain/policy_distribution.py +81 -0
  22. warrantkit-0.1.0/agentcontain/policy_reconciliation.py +191 -0
  23. warrantkit-0.1.0/agentcontain/policy_rollout.py +111 -0
  24. warrantkit-0.1.0/agentcontain/state.py +116 -0
  25. warrantkit-0.1.0/agentcontain/store.py +49 -0
  26. warrantkit-0.1.0/pyproject.toml +30 -0
  27. warrantkit-0.1.0/setup.cfg +4 -0
  28. warrantkit-0.1.0/tests/test_adversarial_security.py +159 -0
  29. warrantkit-0.1.0/tests/test_authority_lifecycle.py +92 -0
  30. warrantkit-0.1.0/tests/test_cli.py +206 -0
  31. warrantkit-0.1.0/tests/test_credential_lifecycle.py +73 -0
  32. warrantkit-0.1.0/tests/test_cross_repo_evidence_fixture.py +79 -0
  33. warrantkit-0.1.0/tests/test_demo.py +39 -0
  34. warrantkit-0.1.0/tests/test_engine_adapter.py +434 -0
  35. warrantkit-0.1.0/tests/test_event_semantics.py +38 -0
  36. warrantkit-0.1.0/tests/test_evidence.py +126 -0
  37. warrantkit-0.1.0/tests/test_external_evidence.py +151 -0
  38. warrantkit-0.1.0/tests/test_fleet.py +47 -0
  39. warrantkit-0.1.0/tests/test_fleet_identity.py +16 -0
  40. warrantkit-0.1.0/tests/test_fleet_status.py +99 -0
  41. warrantkit-0.1.0/tests/test_fleet_status_history.py +90 -0
  42. warrantkit-0.1.0/tests/test_incident.py +44 -0
  43. warrantkit-0.1.0/tests/test_ingest.py +38 -0
  44. warrantkit-0.1.0/tests/test_operator.py +76 -0
  45. warrantkit-0.1.0/tests/test_platform_primitives.py +50 -0
  46. warrantkit-0.1.0/tests/test_policy_assignment.py +49 -0
  47. warrantkit-0.1.0/tests/test_policy_distribution.py +16 -0
  48. warrantkit-0.1.0/tests/test_policy_distribution_primitives.py +39 -0
  49. warrantkit-0.1.0/tests/test_policy_reconciliation.py +86 -0
  50. warrantkit-0.1.0/tests/test_policy_rollout.py +53 -0
  51. warrantkit-0.1.0/tests/test_portable_runtime_verifier.py +61 -0
  52. warrantkit-0.1.0/tests/test_runtime_pinned_evidence.py +260 -0
  53. warrantkit-0.1.0/tests/test_runtime_pinned_interoperability.py +207 -0
  54. warrantkit-0.1.0/tests/test_state.py +62 -0
  55. warrantkit-0.1.0/tests/test_store.py +65 -0
  56. warrantkit-0.1.0/warrantkit.egg-info/PKG-INFO +394 -0
  57. warrantkit-0.1.0/warrantkit.egg-info/SOURCES.txt +58 -0
  58. warrantkit-0.1.0/warrantkit.egg-info/dependency_links.txt +1 -0
  59. warrantkit-0.1.0/warrantkit.egg-info/entry_points.txt +3 -0
  60. warrantkit-0.1.0/warrantkit.egg-info/top_level.txt +1 -0
@@ -0,0 +1,85 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Copyright 2026 Daniel Kissel
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
20
+
21
+ 1. Definitions.
22
+
23
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
24
+
25
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
26
+
27
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of that entity, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of fifty percent (50%) or more of the outstanding shares.
28
+
29
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
32
+
33
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on or derived from the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship.
38
+
39
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner.
40
+
41
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
42
+
43
+ 2. Grant of Copyright License.
44
+
45
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
46
+
47
+ 3. Grant of Patent License.
48
+
49
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work.
50
+
51
+ 4. Redistribution.
52
+
53
+ You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, provided that You meet the following conditions:
54
+
55
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
56
+
57
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
58
+
59
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
60
+
61
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or within a display generated by the Derivative Works, if and wherever such third-party notices normally appear.
62
+
63
+ (e) You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
64
+
65
+ 5. Submission of Contributions.
66
+
67
+ Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions.
68
+
69
+ 6. Trademarks.
70
+
71
+ This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
72
+
73
+ 7. Disclaimer of Warranty.
74
+
75
+ Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76
+
77
+ 8. Limitation of Liability.
78
+
79
+ In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law shall any Contributor be liable to You for damages arising from this License or out of the use or inability to use the Work.
80
+
81
+ 9. Accepting Warranty or Additional Liability.
82
+
83
+ While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor.
84
+
85
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,394 @@
1
+ Metadata-Version: 2.4
2
+ Name: warrantkit
3
+ Version: 0.1.0
4
+ Summary: Runtime enforcement and proof platform for autonomous AI agents
5
+ Author: Daniel Kissel
6
+ License: Apache-2.0
7
+ Project-URL: Repository, https://github.com/Therealdk8890/WarrantKit
8
+ Project-URL: Issues, https://github.com/Therealdk8890/WarrantKit/issues
9
+ Keywords: ai-agents,agent-security,agent-containment,ai-safety,runtime-security,policy-enforcement,cgroups,ebpf
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Requires-Python: >=3.11
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Dynamic: license-file
19
+
20
+ # WarrantKit
21
+
22
+ [![WarrantKit CI](https://github.com/Therealdk8890/WarrantKit/actions/workflows/ci.yml/badge.svg)](https://github.com/Therealdk8890/WarrantKit/actions/workflows/ci.yml)
23
+
24
+ **Runtime authorization, containment, and evidence platform for autonomous AI agents.**
25
+
26
+ > **Don't ask the agent to enforce its own boundaries. Enforce them from outside the agent trust boundary.**
27
+
28
+ WarrantKit is the platform/control layer around the AgentContainment enforcement engine. The repository currently ships local authorization, admission, runtime containment coordination, epoch fencing, recovery gating, evidence envelopes, fleet-governance primitives, and offline verification receipts. Hosted multi-tenant operations, centralized evidence retention, enterprise RBAC, and SIEM/SOAR integrations are not shipped here yet.
29
+
30
+ The practical question is: **what is an autonomous agent allowed to do, what happens when it crosses that boundary, how is its authority revoked, and what evidence can be independently checked afterward?**
31
+
32
+ ## The product
33
+
34
+ Autonomous agents can execute code, access data, call external services, and manage infrastructure. The operational problem is not only observing those actions; it is controlling them, responding when policy is violated, and producing evidence that the control actually operated.
35
+
36
+ WarrantKit is designed first as an enforcement system: define policy, establish execution identity, enforce boundaries outside the agent trust boundary, detect violations, revoke authority and credential/capability use, **forcibly terminate or fence the workload when policy requires it**, and require fresh authorization for recovery. The evidence architecture then independently records and evaluates what happened so the control is not merely asserted.
37
+
38
+ The core workflow is:
39
+
40
+ **Policy → Admit → Contain → Detect → Fence → Halt → Verify → Recover → Receipt**
41
+
42
+ This is the lifecycle used throughout the repository.
43
+
44
+ For enterprise security and governance teams, this translates into:
45
+
46
+ - **Authorization:** define the actions, resources, credentials, and execution conditions an agent is permitted to use.
47
+ - **Authority revocation:** invalidate stale or violated authority and revoke credential/capability use when policy requires it.
48
+ - **Containment:** limit what an agent workload can do at runtime, including process and egress controls where supported.
49
+ - **Hard-stop enforcement:** when policy is violated or recovery cannot safely proceed, the runtime enforcement layer can forcibly terminate and/or fence the workload rather than relying on the agent to cooperate.
50
+ - **Fail-closed response:** enforcement and recovery fail toward containment; the control plane does not treat an agent's willingness to stop as evidence of termination.
51
+ - **Auditability:** produce structured execution evidence and tamper-evident verification receipts.
52
+ - **Policy traceability:** bind executions to policy identity, policy digests, and execution identity.
53
+ - **Defense in depth:** complement existing containers, Kubernetes, gVisor, Kata, cgroups, and other isolation mechanisms.
54
+
55
+ WarrantKit can support security review and compliance evidence workflows, but it does not by itself make an organization compliant with SOC 2, HIPAA, or any other regulatory framework.
56
+
57
+ ## Platform components
58
+
59
+ WarrantKit is a platform built from components with distinct responsibilities and independently derived evidence. The architecture is intentionally separated so that observation, verification, provenance, authorization, and runtime enforcement do not collapse into one trust boundary or a single source of truth.
60
+
61
+ | Component | Platform role |
62
+ |---|---|
63
+ | **WarrantKit** | Runtime control layer — authorization, admission, execution identity, authority/credential lifecycle, containment coordination, recovery gating, fleet governance, and evidence correlation. It does not become the universal authority over independently produced facts. |
64
+ | **AgentContainment** | Runtime enforcement evidence — fencing, containment, recovery, epoch invalidation, and host/provider enforcement results. |
65
+ | **Warden** | Observation evidence — independently records agent activity and runtime state at its observation boundary. |
66
+ | **ClaimProofKit** | Verification evidence — independently evaluates whether supplied claims/actions are supported by supplied evidence under its verifier rules. |
67
+ | **DProvenanceKit** | Provenance evidence — independently records execution/reasoning provenance and produces verification-oriented proof artifacts and receipts. |
68
+ | **hermetic-sandbox** | Isolation support — constrained execution environments that complement runtime enforcement. |
69
+ | **cancelscope** | Cancellation support — structured cancellation and termination control. |
70
+ | **interleave-test** | Concurrency/regression support — deterministic interleavings and race-sensitive testing. |
71
+ | **pytest-flakedoctor** | Development/test support — flaky-test detection and diagnosis. |
72
+
73
+ The important boundary is **not** that WarrantKit replaces these components or appoints one of them as the authority over the facts. The four core evidence sources — Warden, DProvenanceKit, ClaimProofKit, and AgentContainment — produce independently derived evidence. WarrantKit correlates that evidence by execution identity, policy identity, epoch, and evidence integrity. Agreement increases confidence; disagreement becomes an explicit evidence conflict rather than being silently resolved.
74
+
75
+ A simplified platform flow is:
76
+
77
+ ```text
78
+ WarrantKit
79
+ │
80
+ ┌───────────────┼────────────────┐
81
+ │ │ │
82
+ Authorization Governance Evidence
83
+ │ │ │
84
+ ▼ ▼ ▼
85
+ AgentContainment Warden DProvenanceKit
86
+ │ │
87
+ │ ClaimProofKit
88
+ ▼ │
89
+ Runtime enforcement │
90
+ │ │
91
+ └──────────────┬───────────────┘
92
+ ▼
93
+ Audit / Operations
94
+ ```
95
+
96
+ The supporting components provide isolation, cancellation, concurrency testing, and test-reliability capabilities around that core.
97
+
98
+ **The agent is never the authority for its own actions — and it is not trusted to kill itself.** WarrantKit applies externally supplied policy and authorization controls; AgentContainment performs the security-critical runtime kill/fencing enforcement; the evidence and verification layers record and evaluate what happened.
99
+
100
+
101
+ ## The kill path is a first-class security control
102
+
103
+ WarrantKit is not an instruction to an agent to stop itself. **The security-critical enforcement action happens outside the agent trust boundary.** When a workload must be stopped, WarrantKit delegates the enforcement decision to the pinned AgentContainment engine, which provides the runtime kill/fencing mechanism and the corresponding enforcement evidence.
104
+
105
+ The intended control sequence is:
106
+
107
+ **Detect violation → Revoke authority → Invoke external enforcement → Kill/fence the runtime → Verify the workload is gone → Prove the enforcement event**
108
+
109
+ For the Linux cgroup-v2 path, the real-workload proof exercises a dedicated workload boundary, invokes the AgentContainment provider, independently checks that the cgroup is no longer populated, and verifies that the workload exited. This is the part of the system that turns **“the agent should stop”** into **“the runtime was actually stopped.”**
110
+
111
+ The distinction matters:
112
+
113
+ - **Warden observes.** It does not become the privileged hand that kills the workload.
114
+ - **WarrantKit authorizes and coordinates.** It revokes authority and decides when containment/recovery rules apply.
115
+ - **AgentContainment enforces.** It owns the security-critical runtime kill/fencing boundary.
116
+ - **The evidence layer proves.** It records and verifies what happened, including the relevant runtime epoch.
117
+
118
+ The platform therefore does not depend on an autonomous agent voluntarily honoring a stop instruction.
119
+
120
+ ## Real workload proof
121
+
122
+ The platform includes a Linux integration proof that exercises the full local path against a real workload:
123
+
124
+ 1. Create a dedicated cgroup-v2 workload boundary.
125
+ 2. Launch a real child process.
126
+ 3. Attach the child to that boundary.
127
+ 4. Bind the boundary to a WarrantKit execution identity.
128
+ 5. Invoke the pinned AgentContainment cgroup provider to **forcibly terminate the workload through the runtime enforcement boundary**.
129
+ 6. Independently verify the cgroup is no longer populated.
130
+ 7. Verify the workload exited.
131
+ 8. Bind the resulting containment evidence to an authenticated proof receipt.
132
+ 9. Verify that receipt with an offline verifier.
133
+
134
+ The proof is deliberately environment-gated because it requires Linux cgroup v2 and appropriate host privileges/delegation:
135
+
136
+ ```bash
137
+ AGENT_CONTAIN_RUN_REAL_CGROUP=1 pytest -q tests/integration/test_real_cgroup_execution.py
138
+ ```
139
+
140
+ A successful run is evidence from that tested Linux environment. It does not establish a universal host-security claim. The receipt is HMAC-authenticated and tamper-evident; it is not a non-repudiable attestation.
141
+
142
+
143
+ ## Implementation status
144
+
145
+ The table below distinguishes implemented platform capabilities from environment-gated proof and future product work. **Implemented** describes code present in the repository; **CI-tested** means the behavior is covered by automated CI; **Privileged integration-tested** means the proof requires a Linux host with the required kernel/cgroup privileges. A passing test is evidence for the tested environment, not a universal security guarantee.
146
+
147
+ | Capability | Current status | Evidence boundary |
148
+ |---|---|---|
149
+ | External authorization and admission | **Implemented · CI-tested** | Policy/admission and execution identity are enforced outside the agent runtime. |
150
+ | Runtime containment, kill, and fencing | **Implemented · CI-tested** | Delegated to the pinned AgentContainment engine; the enforcement boundary is external to the agent. |
151
+ | Epoch fencing / stale-authority invalidation | **Implemented · CI-tested** | End-to-end containment → recovery → evidence regression is green on `main`. |
152
+ | Fail-closed recovery | **Implemented · CI-tested** | Recovery is runtime-authoritative; failed recovery is compensated back to containment. |
153
+ | Evidence envelopes and epoch scoping | **Implemented · CI-tested** | Structured evidence rejects stale runtime proof and preserves prior epoch history separately. |
154
+ | HMAC-authenticated receipts | **Implemented · CI-tested** | Shared-secret authentication and tamper detection; not non-repudiable attestation. |
155
+ | Linux cgroup-v2 workload containment | **Implemented · privileged integration-tested** | Real-workload proof is environment-gated and requires Linux cgroup v2 plus host privileges/delegation. |
156
+ | Adversarial containment/security regression tests | **Implemented · CI-tested** | Tests exercise fail-closed behavior and stale-authority/escape conditions in the tested environment. |
157
+ | Local fleet governance primitives | **Implemented · CI-tested** | Inventory, assignments, rollout/reconciliation, and status-history primitives are local foundations. |
158
+ | Hosted multi-tenant control plane | **Planned** | Centralized orchestration, durable evidence retention, enterprise RBAC, and hosted operations are product-layer work. |
159
+ | Enterprise integrations | **Planned / integration-dependent** | SIEM/SOAR, identity, alerting, deployment automation, and supported production operations are not implied by the open foundation. |
160
+ | Non-repudiable host attestation | **Planned** | Current receipts are HMAC-authenticated; stronger asymmetric/host-anchored attestation is a future trust model. |
161
+
162
+ The security-critical AgentContainment engine is pinned as a submodule rather than treated as an unpinned dependency. Current WarrantKit CI validates the platform against that pinned engine revision. Warden, DProvenanceKit, and ClaimProofKit are part of the platform's evidence architecture through the cross-repo evidence contract and typed external-evidence references; they are deliberately not hard runtime dependencies. Provider-specific integrations remain subject to their own host, kernel, network, and deployment requirements.
163
+
164
+ ## Proof semantics
165
+
166
+ WarrantKit deliberately separates three different claims about an execution:
167
+
168
+ | State | What it means |
169
+ |---|---|
170
+ | **Observed** | An event or result was recorded. |
171
+ | **Verified** | The defined verification procedure and its required evidence checks succeeded. |
172
+ | **Authenticated receipt** | The resulting evidence was bound to a tamper-evident, HMAC-authenticated receipt. |
173
+
174
+ **Verified ≠ claim is true.**
175
+
176
+ Verification establishes that the specified procedure and evidence checks succeeded. It does not establish the truth of an arbitrary external claim, and an authenticated receipt is not a non-repudiable host attestation.
177
+
178
+ The lifecycle also distinguishes **detection** from **verification**: detection records an anomaly; verification records completion of the defined verification procedure. They are separate evidence events.
179
+
180
+ ## 30-second demo
181
+
182
+ The fastest way to see the shipped product surface is the no-root demonstration:
183
+
184
+ ```bash
185
+ git clone --recurse-submodules https://github.com/Therealdk8890/WarrantKit.git
186
+ cd WarrantKit
187
+ python -m pip install ./AgentContainment
188
+ python -m pip install .
189
+ warrantkit demo
190
+ ```
191
+
192
+ This path is intentionally simulated. It demonstrates the authorization/containment lifecycle, evidence envelope, verification state, and receipt semantics without claiming kernel-level enforcement.
193
+
194
+ For a real Linux workload proof, use the environment-gated cgroup-v2 integration described below.
195
+
196
+ ## How WarrantKit differs
197
+
198
+ WarrantKit is not a replacement for the runtime-security and isolation technologies it can work alongside.
199
+
200
+ | Technology | Primary boundary | What WarrantKit adds |
201
+ |---|---|---|
202
+ | **Tetragon** | Kernel-level runtime observability and policy enforcement, including event monitoring and enforcement actions such as signals/return-value overrides. | A higher-level authorization/evidence lifecycle around agent identity, policy, runtime epochs, recovery, and portable evidence verification. |
203
+ | **seccomp** | Linux system-call filtering for a process. | Agent-specific admission/authority lifecycle, runtime containment coordination, epoch fencing, recovery gating, and structured evidence/proof semantics around the enforcement event. |
204
+ | **gVisor** | Sandboxed application-kernel boundary for containers. | Control-plane authorization and runtime evidence that can sit above an isolation boundary rather than replacing the isolation mechanism. |
205
+
206
+ These are complementary rather than mutually exclusive. Tetragon already provides substantial runtime enforcement and observability; gVisor provides a sandboxed runtime boundary; seccomp restricts system calls. WarrantKit's narrower claim is that **agent authorization, runtime enforcement coordination, and independently verifiable evidence should remain explicit and separate from the agent itself**.
207
+
208
+ ## Current quick start
209
+
210
+ The project is **WarrantKit**; the project-facing CLI is **`warrantkit`**. The legacy **`agentcontain`** command remains as a compatibility alias.
211
+
212
+ The platform CLI is available as `warrantkit`; the legacy `agentcontain` command remains as a compatibility alias.
213
+
214
+ ### 1. Simulated demonstration — no host privileges
215
+
216
+ The command above is the intended first run. It demonstrates the lifecycle, evidence envelope, and receipt semantics without host privileges.
217
+
218
+ ### 2. Real runtime path — Linux
219
+
220
+ The real runtime adapter uses the pinned AgentContainment engine:
221
+
222
+ ```bash
223
+ warrantkit run --policy demo --agent-id demo-agent --contain
224
+ ```
225
+
226
+ The real path may require Linux, cgroup-v2 support, and the privileges/delegation required by the selected enforcement provider. The host-boundary proof above is the stronger path to use when evaluating actual workload containment.
227
+
228
+ ## Threat model and non-goals
229
+
230
+ The primary threat model is an autonomous agent that must be treated as untrusted. WarrantKit therefore keeps authorization, revocation, containment, and recovery outside the agent trust boundary and delegates security-critical runtime enforcement to AgentContainment.
231
+
232
+ The platform threat model is documented in [`docs/THREAT_MODEL.md`](docs/THREAT_MODEL.md). The lower-level AgentContainment security contract is documented in [`AgentContainment/docs/SECURITY_CONTRACT.md`](https://github.com/Therealdk8890/AgentContainment/blob/main/docs/SECURITY_CONTRACT.md). In particular, the project distinguishes controls that are implemented and tested from assumptions about the host, kernel, cgroup hierarchy, runtime, and external enforcement providers.
233
+
234
+ ### Current non-goals
235
+
236
+ - **Not a universal host-isolation guarantee.** The real workload proof covers the tested Linux environment; it does not establish security properties for every kernel, container runtime, namespace, or deployment topology.
237
+ - **Not agent-cooperative containment.** Telling an agent to stop is not treated as enforcement evidence.
238
+ - **Not reversal of completed side effects.** Revocation and containment prevent further authority where the enforcement boundary permits; they cannot undo effects that already escaped the boundary.
239
+ - **Not a secret manager.** The current credential primitive models runtime-scoped revocable authority; it does not automatically revoke arbitrary third-party cloud/API credentials.
240
+ - **Not formal verification or host attestation.** Passing the tests demonstrates the tested behavior and assumptions; HMAC receipts provide authentication/tamper evidence, not non-repudiation.
241
+
242
+ ### Open boundary: controller isolation
243
+
244
+ Controller isolation remains deployment-sensitive. The repository tests selected controller/agent IPC and host attack paths, but the controller, its IPC endpoint, the cgroup hierarchy, and the privileges used to enforce containment must still be protected by the deployment. The Python control plane alone is not claimed to be a kernel isolation boundary. The AgentContainment documentation describes the required host-side assumptions and current proof scope.
245
+
246
+ ## Shipped vs. planned
247
+
248
+ **Shipped in the open repository**
249
+
250
+ - External authorization and admission.
251
+ - Runtime containment, kill/fencing coordination through the pinned AgentContainment engine.
252
+ - Epoch fencing and stale-authority invalidation.
253
+ - Fail-closed recovery.
254
+ - Structured evidence envelopes and deterministic JSON export.
255
+ - HMAC-authenticated verification receipts.
256
+ - Local fleet inventory, policy assignment, rollout/reconciliation, and immutable status history.
257
+ - Portable evidence export and the independent-verifier boundary.
258
+
259
+ **Environment-gated**
260
+
261
+ - Real Linux cgroup-v2 workload containment and independent post-kill verification.
262
+
263
+ **Not shipped yet**
264
+
265
+ - Hosted multi-tenant control plane.
266
+ - Centralized/durable evidence retention service.
267
+ - Enterprise RBAC service.
268
+ - SIEM/SOAR and production deployment integrations.
269
+ - Non-repudiable/asymmetric host attestation.
270
+
271
+ The README intentionally does not present the unshipped items as current product capabilities.
272
+
273
+ ## Architecture
274
+
275
+ ```
276
+ WarrantKit
277
+ │
278
+ ├── Policy / Admission / Identity
279
+ │
280
+ ├── AgentContainment
281
+ │ ├── Admission
282
+ │ ├── Fencing
283
+ │ ├── Runtime enforcement
284
+ │ ├── Cgroup containment
285
+ │ └── Egress enforcement
286
+ │
287
+ ├── Detection
288
+ ├── Recovery
289
+ │ └── Fail-closed recovery
290
+ │
291
+ └── Proof
292
+ ├── Adversarial evidence
293
+ ├── Structured proof
294
+ └── Verification receipts
295
+ ```
296
+
297
+ The platform lifecycle is:
298
+
299
+ **Policy → Admit → Contain → Detect → Fence → Halt → Verify → Recover → Receipt**
300
+
301
+ ## Core engine
302
+
303
+ The current enforcement implementation lives in the companion repository. The broader evidence architecture spans independently derived evidence sources:
304
+
305
+ - **AgentContainment** — the runtime enforcement technology and security-critical enforcement source.
306
+ - **Warden** — the observation source.
307
+ - **DProvenanceKit** — the provenance/integrity source.
308
+ - **ClaimProofKit** — the claim/evidence verification source.
309
+ - **WarrantKit** — the correlation and control layer that relates those independent facts without turning any one source into a universal authority.
310
+
311
+ This repository pins the AgentContainment engine as a Git submodule so the security-critical implementation remains independently reviewable while the platform surface is developed here.
312
+
313
+ ## What the platform is designed to provide
314
+
315
+ - Runtime enforcement outside the agent trust boundary.
316
+ - External hard-stop / kill and fencing of contained workloads.
317
+ - Deterministic admission and policy control.
318
+ - Authority and credential/capability revocation after policy violations.
319
+ - Epoch fencing and stale-authority invalidation.
320
+ - Linux cgroup v2 process containment.
321
+ - Kernel-level egress enforcement integrations.
322
+ - Adversarial security testing.
323
+ - Structured execution evidence envelopes.
324
+ - Governance-bound execution evidence.
325
+ - Tamper-evident verification receipts.
326
+ - Fail-closed recovery.
327
+ - Fleet inventory, policy rollout, reconciliation, and status history.
328
+ - Portable evidence export for downstream systems.
329
+ - Integration with existing sandboxing and orchestration infrastructure.
330
+
331
+ ## Security posture
332
+
333
+ This project is **early-stage and actively developed toward a production 1.0 release**.
334
+
335
+ Passing an adversarial test demonstrates behavior in the tested environment. It is not a universal security guarantee, formal verification, or cryptographic attestation of the host.
336
+
337
+ Security-critical claims are documented in the AgentContainment security contract and backed by privileged integration tests where host/kernel behavior is required.
338
+
339
+ The project intentionally distinguishes:
340
+
341
+ - **Observed** — an event or result was recorded.
342
+ - **Verified** — the defined verification procedure succeeded.
343
+ - **Authenticated receipt** — evidence was bound to a tamper-evident, HMAC-authenticated receipt.
344
+ - **Verified ≠ claim is true** — verification establishes that the specified procedure and evidence checks succeeded; it does not establish the truth of an arbitrary external claim.
345
+
346
+ ## Fleet governance
347
+
348
+ WarrantKit includes local governance primitives for managing fleets above the enforcement engine. These primitives are deliberately separate from runtime authority: governance can describe desired state, rollout progress, and fleet status without weakening or replacing local enforcement.
349
+
350
+ Current platform primitives include:
351
+
352
+ - **Organization → Project → Runtime → Agent** inventory and immutable governance scope.
353
+ - **Policy assignments** carrying policy identity, version, digest, target, and explicit assignment state.
354
+ - **Deterministic policy rollouts** with draft, staged, rolling-out, paused, converged, and rejected states.
355
+ - **Deterministic reconciliation** that classifies target state such as converged, pending, drifted, missing, rejected, and superseded.
356
+ - **Fleet policy status** as a stable machine-readable aggregate.
357
+ - **Immutable status history** with monotonic snapshots, collision detection, and idempotent append behavior.
358
+
359
+ The design intentionally keeps rollout and fleet observation from becoming the security enforcement boundary. Local enforcement remains the final control point for accepting and enforcing policy, while WarrantKit controls the authorization lifecycle around it.
360
+
361
+ The open package provides these as **local governance primitives**. They do not constitute a hosted multi-tenant control plane, server-side RBAC system, or centralized enforcement authority.
362
+
363
+ ## Repository relationship
364
+
365
+ ```
366
+ WarrantKit
367
+ correlation / control layer
368
+ │
369
+ ┌────────────┼────────────┐
370
+ │ │ │
371
+ Warden DProvenanceKit ClaimProofKit
372
+ observation provenance verification
373
+ │ │ │
374
+ └────────────┼────────────┘
375
+ │
376
+ AgentContainment
377
+ runtime enforcement
378
+ ```
379
+
380
+ WarrantKit correlates independently derived evidence from these sources. The sources do not form a hierarchy of epistemic authority: each is responsible for facts within its own evidence boundary. Agreement is corroboration; disagreement is an evidence conflict that must remain visible. AgentContainment remains public and independently usable as the security-critical runtime enforcement engine.
381
+
382
+ ## License
383
+
384
+ Apache-2.0.
385
+
386
+ ## Evidence model
387
+
388
+ WarrantKit exposes a transport-neutral `EvidenceEnvelope` for machine-readable execution evidence. The current v2 envelope binds execution identity, ordered events, enforcement state, verification state, proof data, optional governance scope, provenance, and an optional authenticated receipt into one canonical representation.
389
+
390
+ The envelope validates execution identity, contiguous event sequencing, supported verification states, and receipt identity binding where present. It can be serialized to deterministic JSON for storage or transport and reconstructed offline.
391
+
392
+ Governance scope can be attached to execution evidence so downstream systems can associate an execution with its organization, project, runtime, and agent context without giving that governance layer authority over enforcement.
393
+
394
+ **Evidence is evidence, not authority:** a valid envelope or receipt records and verifies the defined evidence procedure; it does not by itself prove an arbitrary external claim is true.