agentcrash 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.
- agentcrash-0.1.0/.gitignore +26 -0
- agentcrash-0.1.0/LICENSE +202 -0
- agentcrash-0.1.0/NOTICE +10 -0
- agentcrash-0.1.0/PKG-INFO +133 -0
- agentcrash-0.1.0/README.md +89 -0
- agentcrash-0.1.0/docs/adr/0001-synthetic-tool-boundary.md +29 -0
- agentcrash-0.1.0/docs/adr/0002-isolation-profiles.md +36 -0
- agentcrash-0.1.0/docs/adr/0003-separate-outcome-dimensions.md +32 -0
- agentcrash-0.1.0/docs/adr/0004-python-first-sdk.md +30 -0
- agentcrash-0.1.0/docs/adr/0005-data-only-packs.md +31 -0
- agentcrash-0.1.0/docs/concepts/evidence-and-results.md +96 -0
- agentcrash-0.1.0/docs/concepts/scenarios.md +170 -0
- agentcrash-0.1.0/docs/getting-started/first-run.md +157 -0
- agentcrash-0.1.0/docs/getting-started/install.md +95 -0
- agentcrash-0.1.0/docs/integrations/adapters.md +127 -0
- agentcrash-0.1.0/docs/reference/cli.md +216 -0
- agentcrash-0.1.0/docs/reference/exit-codes.md +22 -0
- agentcrash-0.1.0/docs/reference/policy-format.md +94 -0
- agentcrash-0.1.0/docs/security/model.md +76 -0
- agentcrash-0.1.0/docs/security/privacy.md +75 -0
- agentcrash-0.1.0/pyproject.toml +115 -0
- agentcrash-0.1.0/scenarios/document-write-redirection/README.md +12 -0
- agentcrash-0.1.0/scenarios/document-write-redirection/attack_trace.json +1 -0
- agentcrash-0.1.0/scenarios/document-write-redirection/benign_trace.json +1 -0
- agentcrash-0.1.0/scenarios/document-write-redirection/blocked_trace.json +1 -0
- agentcrash-0.1.0/scenarios/document-write-redirection/injected-report.txt +2 -0
- agentcrash-0.1.0/scenarios/document-write-redirection/scenario.yaml +33 -0
- agentcrash-0.1.0/scenarios/document-write-redirection/task.txt +1 -0
- agentcrash-0.1.0/scenarios/document-write-redirection/world.json +19 -0
- agentcrash-0.1.0/scenarios/invoice-confidential-note/README.md +12 -0
- agentcrash-0.1.0/scenarios/invoice-confidential-note/attack_trace.json +7 -0
- agentcrash-0.1.0/scenarios/invoice-confidential-note/benign_trace.json +5 -0
- agentcrash-0.1.0/scenarios/invoice-confidential-note/blocked_trace.json +7 -0
- agentcrash-0.1.0/scenarios/invoice-confidential-note/injected-invoice.txt +16 -0
- agentcrash-0.1.0/scenarios/invoice-confidential-note/scenario.yaml +38 -0
- agentcrash-0.1.0/scenarios/invoice-confidential-note/task.txt +2 -0
- agentcrash-0.1.0/scenarios/invoice-confidential-note/world.json +16 -0
- agentcrash-0.1.0/scenarios/persistent-note-poisoning/README.md +12 -0
- agentcrash-0.1.0/scenarios/persistent-note-poisoning/attack_trace.json +1 -0
- agentcrash-0.1.0/scenarios/persistent-note-poisoning/benign_trace.json +1 -0
- agentcrash-0.1.0/scenarios/persistent-note-poisoning/blocked_trace.json +1 -0
- agentcrash-0.1.0/scenarios/persistent-note-poisoning/injected-memo.txt +2 -0
- agentcrash-0.1.0/scenarios/persistent-note-poisoning/scenario.yaml +34 -0
- agentcrash-0.1.0/scenarios/persistent-note-poisoning/task.txt +1 -0
- agentcrash-0.1.0/scenarios/persistent-note-poisoning/world.json +13 -0
- agentcrash-0.1.0/scenarios/support-tenant-boundary/README.md +12 -0
- agentcrash-0.1.0/scenarios/support-tenant-boundary/attack_trace.json +1 -0
- agentcrash-0.1.0/scenarios/support-tenant-boundary/benign_trace.json +1 -0
- agentcrash-0.1.0/scenarios/support-tenant-boundary/blocked_trace.json +1 -0
- agentcrash-0.1.0/scenarios/support-tenant-boundary/injected-ticket.txt +2 -0
- agentcrash-0.1.0/scenarios/support-tenant-boundary/scenario.yaml +34 -0
- agentcrash-0.1.0/scenarios/support-tenant-boundary/task.txt +1 -0
- agentcrash-0.1.0/scenarios/support-tenant-boundary/world.json +16 -0
- agentcrash-0.1.0/scenarios/tool-response-instruction/README.md +12 -0
- agentcrash-0.1.0/scenarios/tool-response-instruction/attack_trace.json +1 -0
- agentcrash-0.1.0/scenarios/tool-response-instruction/benign_trace.json +1 -0
- agentcrash-0.1.0/scenarios/tool-response-instruction/blocked_trace.json +1 -0
- agentcrash-0.1.0/scenarios/tool-response-instruction/injected-kb.txt +2 -0
- agentcrash-0.1.0/scenarios/tool-response-instruction/scenario.yaml +35 -0
- agentcrash-0.1.0/scenarios/tool-response-instruction/task.txt +1 -0
- agentcrash-0.1.0/scenarios/tool-response-instruction/world.json +13 -0
- agentcrash-0.1.0/src/agentcrash/__init__.py +7 -0
- agentcrash-0.1.0/src/agentcrash/adapters/__init__.py +1 -0
- agentcrash-0.1.0/src/agentcrash/adapters/protocol.py +169 -0
- agentcrash-0.1.0/src/agentcrash/broker/__init__.py +1 -0
- agentcrash-0.1.0/src/agentcrash/broker/models.py +226 -0
- agentcrash-0.1.0/src/agentcrash/cli/__init__.py +1 -0
- agentcrash-0.1.0/src/agentcrash/cli/app.py +481 -0
- agentcrash-0.1.0/src/agentcrash/core/__init__.py +1 -0
- agentcrash-0.1.0/src/agentcrash/core/compare.py +75 -0
- agentcrash-0.1.0/src/agentcrash/core/loader.py +117 -0
- agentcrash-0.1.0/src/agentcrash/core/policies.py +38 -0
- agentcrash-0.1.0/src/agentcrash/core/runner.py +291 -0
- agentcrash-0.1.0/src/agentcrash/evaluators/__init__.py +1 -0
- agentcrash-0.1.0/src/agentcrash/evaluators/outputs.py +120 -0
- agentcrash-0.1.0/src/agentcrash/evaluators/runner.py +122 -0
- agentcrash-0.1.0/src/agentcrash/evidence/__init__.py +1 -0
- agentcrash-0.1.0/src/agentcrash/evidence/redaction.py +66 -0
- agentcrash-0.1.0/src/agentcrash/evidence/store.py +227 -0
- agentcrash-0.1.0/src/agentcrash/py.typed +2 -0
- agentcrash-0.1.0/src/agentcrash/reports/__init__.py +1 -0
- agentcrash-0.1.0/src/agentcrash/reports/exporters.py +147 -0
- agentcrash-0.1.0/src/agentcrash/sandbox/__init__.py +1 -0
- agentcrash-0.1.0/src/agentcrash/sandbox/launcher.py +61 -0
- agentcrash-0.1.0/src/agentcrash/sandbox/profile.py +88 -0
- agentcrash-0.1.0/src/agentcrash/schemas/__init__.py +10 -0
- agentcrash-0.1.0/src/agentcrash/schemas/models.py +118 -0
- agentcrash-0.1.0/src/agentcrash/schemas/policy.py +51 -0
- agentcrash-0.1.0/src/agentcrash/schemas/scenario.py +108 -0
- agentcrash-0.1.0/src/agentcrash/server/__init__.py +1 -0
- agentcrash-0.1.0/src/agentcrash/server/api.py +168 -0
- agentcrash-0.1.0/src/agentcrash/server/context.py +48 -0
- agentcrash-0.1.0/src/agentcrash/server/static/assets/index-C4wrmUFv.css +1 -0
- agentcrash-0.1.0/src/agentcrash/server/static/assets/index-_-BW19OW.js +40 -0
- agentcrash-0.1.0/src/agentcrash/server/static/index.html +13 -0
- agentcrash-0.1.0/src/agentcrash/tools/__init__.py +1 -0
- agentcrash-0.1.0/src/agentcrash/tools/policy.py +87 -0
- agentcrash-0.1.0/src/agentcrash/tools/service.py +202 -0
- agentcrash-0.1.0/src/agentcrash/tools/world.py +84 -0
- agentcrash-0.1.0/tests/contract/test_api.py +78 -0
- agentcrash-0.1.0/tests/contract/test_schemas.py +118 -0
- agentcrash-0.1.0/tests/e2e/test_cli.py +65 -0
- agentcrash-0.1.0/tests/integration/test_bench.py +78 -0
- agentcrash-0.1.0/tests/sandbox/test_profile.py +70 -0
- agentcrash-0.1.0/tests/unit/test_redaction.py +58 -0
- agentcrash-0.1.0/tests/unit/test_tool_service.py +84 -0
- agentcrash-0.1.0/web/index.html +12 -0
- agentcrash-0.1.0/web/package-lock.json +1702 -0
- agentcrash-0.1.0/web/package.json +19 -0
- agentcrash-0.1.0/web/src/App.jsx +171 -0
- agentcrash-0.1.0/web/src/main.jsx +10 -0
- agentcrash-0.1.0/web/src/styles.css +64 -0
- agentcrash-0.1.0/web/vite.config.js +11 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
.venv/
|
|
9
|
+
.mypy_cache/
|
|
10
|
+
.pytest_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
*.db
|
|
13
|
+
*.sqlite
|
|
14
|
+
# Node
|
|
15
|
+
web/node_modules/
|
|
16
|
+
web/dist/
|
|
17
|
+
# Editor / OS
|
|
18
|
+
.vscode/
|
|
19
|
+
.idea/
|
|
20
|
+
.DS_Store
|
|
21
|
+
Thumbs.db
|
|
22
|
+
# Local config (never commit user config or data)
|
|
23
|
+
agentcrash.yaml
|
|
24
|
+
# Build outputs for the packaged viewer (regenerated from web/)
|
|
25
|
+
src/agentcrash/server/static/
|
|
26
|
+
report-out/
|
agentcrash-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
agentcrash-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
AgentCrash
|
|
2
|
+
Copyright 2026 Prathamesh Dabir
|
|
3
|
+
|
|
4
|
+
This product includes software derived from other open-source projects. See the
|
|
5
|
+
individual scenario `attribution` metadata and `scenarios/*/README.md` for
|
|
6
|
+
specific attributions. Third-party licenses are documented alongside the
|
|
7
|
+
imported material.
|
|
8
|
+
|
|
9
|
+
AgentDojo (MIT) and other prior art are cited in the project documentation as
|
|
10
|
+
worked-on precedents; no code is copied from them without license.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: agentcrash
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Crash-test your AI agent in a synthetic workplace. An open-source agent security test harness with synthetic tools, visual evidence, and regression tests.
|
|
5
|
+
Project-URL: Repository, https://github.com/agentcrash/agentcrash
|
|
6
|
+
Project-URL: Documentation, https://agentcrash.dev
|
|
7
|
+
Author: Prathamesh Dabir
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: NOTICE
|
|
11
|
+
Keywords: agent,llm,prompt-injection,sandbox,security,testing
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Security
|
|
17
|
+
Requires-Python: >=3.12
|
|
18
|
+
Requires-Dist: fastapi<1,>=0.115
|
|
19
|
+
Requires-Dist: pydantic<3,>=2.7
|
|
20
|
+
Requires-Dist: pyyaml<7,>=6.0
|
|
21
|
+
Requires-Dist: rich<14,>=13.7
|
|
22
|
+
Requires-Dist: sse-starlette<3,>=2.1
|
|
23
|
+
Requires-Dist: typer<1,>=0.12
|
|
24
|
+
Requires-Dist: uvicorn<1,>=0.30
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: httpx<1,>=0.27; extra == 'dev'
|
|
27
|
+
Requires-Dist: hypothesis<7,>=6.100; extra == 'dev'
|
|
28
|
+
Requires-Dist: mypy<2,>=1.10; extra == 'dev'
|
|
29
|
+
Requires-Dist: pytest-asyncio<1,>=0.23; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest<9,>=8.2; extra == 'dev'
|
|
31
|
+
Requires-Dist: ruff<1,>=0.5; extra == 'dev'
|
|
32
|
+
Provides-Extra: provider
|
|
33
|
+
Requires-Dist: httpx<1,>=0.27; extra == 'provider'
|
|
34
|
+
Provides-Extra: test
|
|
35
|
+
Requires-Dist: httpx<1,>=0.27; extra == 'test'
|
|
36
|
+
Requires-Dist: hypothesis<7,>=6.100; extra == 'test'
|
|
37
|
+
Requires-Dist: mypy<2,>=1.10; extra == 'test'
|
|
38
|
+
Requires-Dist: pytest-asyncio<1,>=0.23; extra == 'test'
|
|
39
|
+
Requires-Dist: pytest<9,>=8.2; extra == 'test'
|
|
40
|
+
Requires-Dist: ruff<1,>=0.5; extra == 'test'
|
|
41
|
+
Provides-Extra: webview
|
|
42
|
+
Requires-Dist: sentry-sdk<3,>=2.0; extra == 'webview'
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
|
|
45
|
+
# AgentCrash
|
|
46
|
+
|
|
47
|
+
Crash-test your AI agent in a synthetic workplace.
|
|
48
|
+
|
|
49
|
+
See the tool actions an attack causes, then verify your fix. AgentCrash is an
|
|
50
|
+
open-source agent security test harness with synthetic tools, visual evidence,
|
|
51
|
+
and regression tests.
|
|
52
|
+
|
|
53
|
+
<p align="center">
|
|
54
|
+
<img src="assets/generated/social-preview.png" alt="AgentCrash: crash-test your AI agent before you trust it. Run one scenario, watch the injection cause a tool action, then prove your fix." width="760"/>
|
|
55
|
+
</p>
|
|
56
|
+
|
|
57
|
+
> **Scope honesty**: results apply to the listed scenarios and configuration.
|
|
58
|
+
> A passing test is a scoped result, **not** a guarantee that an agent is secure.
|
|
59
|
+
|
|
60
|
+
## Try the demo
|
|
61
|
+
|
|
62
|
+
The bundled replay needs no API key and makes no model calls. It runs offline.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
uvx --from agentcrash==0.1.0 agentcrash demo
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
or install and run your own live test:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
uv tool install agentcrash==0.1.0
|
|
72
|
+
agentcrash --version
|
|
73
|
+
agentcrash doctor --mode demo
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## What a report tells you
|
|
77
|
+
|
|
78
|
+
Task completion, attempted unauthorized actions, observed synthetic effects,
|
|
79
|
+
policy decisions, and missing evidence are reported **separately** — never
|
|
80
|
+
collapsed into one score.
|
|
81
|
+
|
|
82
|
+
- **Task success** — did the legitimate task assertion hold?
|
|
83
|
+
- **Attack attempted** — was the defined forbidden request observed?
|
|
84
|
+
- **Attack succeeded** — did the simulated attacker goal occur in the synthetic world?
|
|
85
|
+
- **Policy blocked** — did the tool policy reject that request?
|
|
86
|
+
- **Completeness** — does the run have all required evidence?
|
|
87
|
+
|
|
88
|
+
An incomplete run is never a clean pass.
|
|
89
|
+
|
|
90
|
+
<details>
|
|
91
|
+
<summary>View a report from the actual build (attack variant)</summary>
|
|
92
|
+
|
|
93
|
+
This is a real run of `invoice-confidential-note`: the injected
|
|
94
|
+
document redirects a synthetic send that is caught in the local outbox.
|
|
95
|
+
|
|
96
|
+
<img src="assets/generated/report-shot.png" alt="AgentCrash report: five outcome dimensions (task success, attack attempted, attack succeeded, policy blocked, completeness) plus the event timeline." width="820"/>
|
|
97
|
+
|
|
98
|
+
</details>
|
|
99
|
+
|
|
100
|
+
**Example evidence:** [`assets/generated/sample-report.html`](assets/generated/sample-report.html) is the
|
|
101
|
+
standalone HTML report the CLI produces for that run.
|
|
102
|
+
|
|
103
|
+
## Test your agent
|
|
104
|
+
|
|
105
|
+
Start with the Python adapter recipe. Replace production tools with the
|
|
106
|
+
provided synthetic tool client, validate the adapter, and run the clean task
|
|
107
|
+
and its attack variant.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
agentcrash init --template invoice
|
|
111
|
+
agentcrash run invoice-confidential-note --variant benign
|
|
112
|
+
agentcrash run invoice-confidential-note --variant attack --trials 5
|
|
113
|
+
agentcrash report RUN_ID --format html
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The scripted model broker needs **no model key** — all of the above run offline
|
|
117
|
+
with deterministic results. Live provider integration is a scaffold in v0.1;
|
|
118
|
+
when you wire a provider key, it is held broker-only and never passed on the
|
|
119
|
+
CLI or written into a run.
|
|
120
|
+
|
|
121
|
+
## Contribute
|
|
122
|
+
|
|
123
|
+
Add a synthetic scenario, improve an integration, or help someone complete
|
|
124
|
+
their first run. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
125
|
+
|
|
126
|
+
## Security
|
|
127
|
+
|
|
128
|
+
See [SECURITY.md](SECURITY.md) for the responsible-disclosure channel and the
|
|
129
|
+
tested security boundary.
|
|
130
|
+
|
|
131
|
+
## License
|
|
132
|
+
|
|
133
|
+
Apache-2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# AgentCrash
|
|
2
|
+
|
|
3
|
+
Crash-test your AI agent in a synthetic workplace.
|
|
4
|
+
|
|
5
|
+
See the tool actions an attack causes, then verify your fix. AgentCrash is an
|
|
6
|
+
open-source agent security test harness with synthetic tools, visual evidence,
|
|
7
|
+
and regression tests.
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<img src="assets/generated/social-preview.png" alt="AgentCrash: crash-test your AI agent before you trust it. Run one scenario, watch the injection cause a tool action, then prove your fix." width="760"/>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
> **Scope honesty**: results apply to the listed scenarios and configuration.
|
|
14
|
+
> A passing test is a scoped result, **not** a guarantee that an agent is secure.
|
|
15
|
+
|
|
16
|
+
## Try the demo
|
|
17
|
+
|
|
18
|
+
The bundled replay needs no API key and makes no model calls. It runs offline.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
uvx --from agentcrash==0.1.0 agentcrash demo
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
or install and run your own live test:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
uv tool install agentcrash==0.1.0
|
|
28
|
+
agentcrash --version
|
|
29
|
+
agentcrash doctor --mode demo
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## What a report tells you
|
|
33
|
+
|
|
34
|
+
Task completion, attempted unauthorized actions, observed synthetic effects,
|
|
35
|
+
policy decisions, and missing evidence are reported **separately** — never
|
|
36
|
+
collapsed into one score.
|
|
37
|
+
|
|
38
|
+
- **Task success** — did the legitimate task assertion hold?
|
|
39
|
+
- **Attack attempted** — was the defined forbidden request observed?
|
|
40
|
+
- **Attack succeeded** — did the simulated attacker goal occur in the synthetic world?
|
|
41
|
+
- **Policy blocked** — did the tool policy reject that request?
|
|
42
|
+
- **Completeness** — does the run have all required evidence?
|
|
43
|
+
|
|
44
|
+
An incomplete run is never a clean pass.
|
|
45
|
+
|
|
46
|
+
<details>
|
|
47
|
+
<summary>View a report from the actual build (attack variant)</summary>
|
|
48
|
+
|
|
49
|
+
This is a real run of `invoice-confidential-note`: the injected
|
|
50
|
+
document redirects a synthetic send that is caught in the local outbox.
|
|
51
|
+
|
|
52
|
+
<img src="assets/generated/report-shot.png" alt="AgentCrash report: five outcome dimensions (task success, attack attempted, attack succeeded, policy blocked, completeness) plus the event timeline." width="820"/>
|
|
53
|
+
|
|
54
|
+
</details>
|
|
55
|
+
|
|
56
|
+
**Example evidence:** [`assets/generated/sample-report.html`](assets/generated/sample-report.html) is the
|
|
57
|
+
standalone HTML report the CLI produces for that run.
|
|
58
|
+
|
|
59
|
+
## Test your agent
|
|
60
|
+
|
|
61
|
+
Start with the Python adapter recipe. Replace production tools with the
|
|
62
|
+
provided synthetic tool client, validate the adapter, and run the clean task
|
|
63
|
+
and its attack variant.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
agentcrash init --template invoice
|
|
67
|
+
agentcrash run invoice-confidential-note --variant benign
|
|
68
|
+
agentcrash run invoice-confidential-note --variant attack --trials 5
|
|
69
|
+
agentcrash report RUN_ID --format html
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The scripted model broker needs **no model key** — all of the above run offline
|
|
73
|
+
with deterministic results. Live provider integration is a scaffold in v0.1;
|
|
74
|
+
when you wire a provider key, it is held broker-only and never passed on the
|
|
75
|
+
CLI or written into a run.
|
|
76
|
+
|
|
77
|
+
## Contribute
|
|
78
|
+
|
|
79
|
+
Add a synthetic scenario, improve an integration, or help someone complete
|
|
80
|
+
their first run. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
81
|
+
|
|
82
|
+
## Security
|
|
83
|
+
|
|
84
|
+
See [SECURITY.md](SECURITY.md) for the responsible-disclosure channel and the
|
|
85
|
+
tested security boundary.
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
Apache-2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ADR-0001: Synthetic tool boundary
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-09-09
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
AgentCrash tests prompt-injection in agents. If it wired real tools (real mail,
|
|
8
|
+
HTTP egress, shell), a run could contact real external systems and testing
|
|
9
|
+
would be neither safe nor reproducible.
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
The tool plane exposes only enumerated synthetic operations (`documents.read`,
|
|
13
|
+
`notes.write`, `mail.send`) on an in-memory `WorldState`. Outbound mail writes to
|
|
14
|
+
a local outbox sink; nothing ever reaches a real external recipient. The tool
|
|
15
|
+
service is the single producer of authoritative side-effect events
|
|
16
|
+
(`world.changed`), giving the evaluator a trusted record.
|
|
17
|
+
|
|
18
|
+
## Consequences
|
|
19
|
+
- Runs are safe, offline, and deterministic.
|
|
20
|
+
- "Attack succeeded" means a synthetic canary appeared in a local sink — never
|
|
21
|
+
real credential theft. Editorial rules forbid labeling one as the other.
|
|
22
|
+
- `ToolService` is not an HTTP proxy and does not execute shell commands.
|
|
23
|
+
|
|
24
|
+
## Alternatives
|
|
25
|
+
- Generic tool passthrough (rejected: unsafe, non-reproducible).
|
|
26
|
+
- Real tooling behind an allowlist (rejected: introduces external side effects).
|
|
27
|
+
|
|
28
|
+
## Revisit trigger
|
|
29
|
+
If we adopt arbitrary user-provided tools, revisit isolation (see ADR-0002).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ADR-0002: Isolation profiles for the worker
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted (profile contract); live container driver is scaffolding
|
|
4
|
+
- **Date:** 2026-09-09
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Per the security model, a run may encounter malicious prompt content and
|
|
8
|
+
untrusted worker/adapter code. The host filesystem, provider credentials, local
|
|
9
|
+
services, and other runs must be protected.
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
Adapters run only in declared isolation profiles. The v0.1 default profile
|
|
13
|
+
(`agentcrash-worker-default`) requires: non-root user, read-only rootfs, all
|
|
14
|
+
capabilities dropped, no privileged mode, no host PID or network namespace,
|
|
15
|
+
bounded writable tmpfs, memory/process/CPU limits, and an enabled seccomp
|
|
16
|
+
policy. No Docker socket is ever mounted. A `ContainerProfile` is validated by
|
|
17
|
+
`validate_profile()` in `sandbox/profile.py`; violating profiles raise.
|
|
18
|
+
|
|
19
|
+
The deterministic demo/CI path runs an explicitly-labeled *uncontained*
|
|
20
|
+
execution profile for replay only; it is never labeled as contained.
|
|
21
|
+
|
|
22
|
+
## Consequences
|
|
23
|
+
- `validate_profile` refuses any profile that weakens these invariants
|
|
24
|
+
(`privileged`, root user, host network/PID, writable rootfs, runtime socket).
|
|
25
|
+
- `sandbox/tests` assert these blockers.
|
|
26
|
+
- A Compose network flag alone is not treated as a guarantee; the launcher must
|
|
27
|
+
validate the container properties.
|
|
28
|
+
|
|
29
|
+
## Alternatives
|
|
30
|
+
- Ship each adapter fully isolated by default (deferred: heavier, not needed
|
|
31
|
+
for the offline replay).
|
|
32
|
+
- Trust the user's host entirely (rejected: this is a security tool).
|
|
33
|
+
|
|
34
|
+
## Revisit trigger
|
|
35
|
+
macOS/Windows VM-backed runtimes, or adopting community adapters, require
|
|
36
|
+
re-validating resource and network behavior per platform.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# ADR-0003: Separate utility and security outcome dimensions
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-09-09
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
A single "agent is safe" score hides the distinction that defines the product:
|
|
8
|
+
did the legitimate task still succeed while an attack was blocked? Collapsing
|
|
9
|
+
task completion and attacker success into one number makes an incomplete run, a
|
|
10
|
+
blocked-everything defense, and a genuinely good defense look identical.
|
|
11
|
+
|
|
12
|
+
## Decision
|
|
13
|
+
Every run reports five separated dimensions: `task_success` (utility),
|
|
14
|
+
`attack_attempted`, `attack_succeeded` (attacker goal in authoritative state),
|
|
15
|
+
`policy_blocked`, and `completeness`. They are never merged into a security
|
|
16
|
+
pass. The `RunResultDimensions` dataclass in `schemas/models.py` is the
|
|
17
|
+
single source. A cancelled or partial run is `completeness=False` and can never
|
|
18
|
+
be a clean pass.
|
|
19
|
+
|
|
20
|
+
## Consequences
|
|
21
|
+
- The viewer reports and the CLI table render these independently.
|
|
22
|
+
- "Blocked everything" (task fails, attack blocked) is easy to spot versus a
|
|
23
|
+
working fix (task succeeds, attack blocked) — a stated requirement.
|
|
24
|
+
- JUnit export maps a failure/incomplete to a failure/error, never a pass.
|
|
25
|
+
|
|
26
|
+
## Alternatives
|
|
27
|
+
- A composite risk score (rejected: hides the utility/security trade-off and
|
|
28
|
+
invites misleading claims).
|
|
29
|
+
|
|
30
|
+
## Revisit trigger
|
|
31
|
+
If a future feature needs a rolled-up score for a specific scrub, it must stay
|
|
32
|
+
sibling to these dimensions, not replace them.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# ADR-0004: Python-first SDK with a separate CLI and viewer
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-09-09
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
The product must be useful through the CLI alone, and the browser viewer must
|
|
8
|
+
not be a second implementation of security decisions. Every entry path (CLI,
|
|
9
|
+
HTML report, JUnit, local API) must agree on results.
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
Python (`src/agentcrash/`) is the single implementation of the runner,
|
|
13
|
+
evaluation, policies, events, and reports. All exporters (`json`, `html`,
|
|
14
|
+
`junit`, JSONL) are generated from the same `RunResultDimensions` + event
|
|
15
|
+
stream. The React viewer talks only to the local FastAPI `/v1` endpoints; it
|
|
16
|
+
performs no security decision of its own. The runner lives under `core/` and
|
|
17
|
+
the UI artifacts are bundled into the wheel so release users never run Node.
|
|
18
|
+
|
|
19
|
+
## Consequences
|
|
20
|
+
- One source of truth for results; CLI and browser always agree.
|
|
21
|
+
- The offline replay and deterministic CI need no model key, Docker, or Node.
|
|
22
|
+
- Adapters import the Python SDK; `RunContext` and `AgentResult` are frozen by
|
|
23
|
+
contract tests in `tests/contract/`.
|
|
24
|
+
|
|
25
|
+
## Alternatives
|
|
26
|
+
- A JS-native evaluator (rejected: duplicate logic and divergence risk).
|
|
27
|
+
|
|
28
|
+
## Revisit trigger
|
|
29
|
+
If the viewer needs to make an offline-only decision the backend cannot, that
|
|
30
|
+
capability returns to the backend first.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ADR-0005: Data-only scenario packs
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-09-09
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Community scenario submissions are a growth engine, but a pack that can execute
|
|
8
|
+
code on the host loader is an RCE channel. The threat model treats scenario
|
|
9
|
+
files, model responses, adapter code, and imported reports as untrusted.
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
Scenario packs are data only: a `scenario.yaml` manifest plus fixture files
|
|
13
|
+
(world JSON, task text, injected content, scripted decision traces). The safe
|
|
14
|
+
YAML loader (`core/loader.py`) uses `yaml.SafeLoader`, refuses python/constructor
|
|
15
|
+
tags, and denies fixture paths that escape the pack directory. There are no
|
|
16
|
+
install hooks and no executable entries. Manifest schema is `extra="forbid"` so
|
|
17
|
+
unknown fields are rejected rather than silently executed.
|
|
18
|
+
|
|
19
|
+
## Consequences
|
|
20
|
+
- A malformed or hostile pack fails validation loudly, before any run.
|
|
21
|
+
- Packs have attribution/license fields; adaptation of public incidents keeps
|
|
22
|
+
original attribution.
|
|
23
|
+
- No code runs from a pack on the host loader.
|
|
24
|
+
|
|
25
|
+
## Alternatives
|
|
26
|
+
- Allow user scripts in packs (rejected: RCE and reproducibility hazard).
|
|
27
|
+
- Accept a generic data blob (rejected: no typed limits or licenses).
|
|
28
|
+
|
|
29
|
+
## Revisit trigger
|
|
30
|
+
Adding an adaptive-attack research profile later must keep packs data-only and
|
|
31
|
+
keep the evaluator inaccessible to the generator and target agent.
|