assayhq 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.
- assayhq-0.1.0/LICENSE +201 -0
- assayhq-0.1.0/PKG-INFO +273 -0
- assayhq-0.1.0/README.md +249 -0
- assayhq-0.1.0/pyproject.toml +53 -0
- assayhq-0.1.0/pyproject.toml.orig +45 -0
- assayhq-0.1.0/src/assay/__init__.py +3 -0
- assayhq-0.1.0/src/assay/agent/__init__.py +46 -0
- assayhq-0.1.0/src/assay/agent/anthropic.py +194 -0
- assayhq-0.1.0/src/assay/agent/base.py +31 -0
- assayhq-0.1.0/src/assay/agent/driver.py +96 -0
- assayhq-0.1.0/src/assay/agent/openai_compat.py +241 -0
- assayhq-0.1.0/src/assay/agent/records.py +155 -0
- assayhq-0.1.0/src/assay/agent/tasks.py +15 -0
- assayhq-0.1.0/src/assay/agent/tools.py +216 -0
- assayhq-0.1.0/src/assay/agent/transport.py +33 -0
- assayhq-0.1.0/src/assay/bundle/__init__.py +41 -0
- assayhq-0.1.0/src/assay/bundle/build.py +147 -0
- assayhq-0.1.0/src/assay/bundle/records.py +324 -0
- assayhq-0.1.0/src/assay/bundle/sign.py +186 -0
- assayhq-0.1.0/src/assay/canonical.py +11 -0
- assayhq-0.1.0/src/assay/capture/__init__.py +31 -0
- assayhq-0.1.0/src/assay/capture/capture.py +186 -0
- assayhq-0.1.0/src/assay/capture/diff.py +180 -0
- assayhq-0.1.0/src/assay/capture/records.py +227 -0
- assayhq-0.1.0/src/assay/capture/store.py +54 -0
- assayhq-0.1.0/src/assay/cli/__init__.py +5 -0
- assayhq-0.1.0/src/assay/cli/main.py +403 -0
- assayhq-0.1.0/src/assay/cli/output.py +348 -0
- assayhq-0.1.0/src/assay/cli/requirements.py +47 -0
- assayhq-0.1.0/src/assay/corpus/__init__.py +18 -0
- assayhq-0.1.0/src/assay/corpus/metrics.py +216 -0
- assayhq-0.1.0/src/assay/corpus/records.py +244 -0
- assayhq-0.1.0/src/assay/ingest/__init__.py +22 -0
- assayhq-0.1.0/src/assay/ingest/base.py +12 -0
- assayhq-0.1.0/src/assay/ingest/claude.py +338 -0
- assayhq-0.1.0/src/assay/ingest/cursor.py +108 -0
- assayhq-0.1.0/src/assay/ingest/records.py +102 -0
- assayhq-0.1.0/src/assay/sandbox/__init__.py +25 -0
- assayhq-0.1.0/src/assay/sandbox/base.py +34 -0
- assayhq-0.1.0/src/assay/sandbox/config.py +112 -0
- assayhq-0.1.0/src/assay/sandbox/denials.py +81 -0
- assayhq-0.1.0/src/assay/sandbox/records.py +53 -0
- assayhq-0.1.0/src/assay/sandbox/seatbelt.py +185 -0
- assayhq-0.1.0/src/assay/triage/__init__.py +5 -0
- assayhq-0.1.0/src/assay/triage/triage.py +127 -0
- assayhq-0.1.0/src/assay/verdict/__init__.py +33 -0
- assayhq-0.1.0/src/assay/verdict/assess.py +318 -0
- assayhq-0.1.0/src/assay/verdict/policy.py +52 -0
- assayhq-0.1.0/src/assay/verdict/records.py +191 -0
assayhq-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including the
|
|
49
|
+
original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing
|
|
141
|
+
the origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 haqaliz
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
assayhq-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: assayhq
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Execution-grounded security verifier for AI agent skills
|
|
5
|
+
Keywords: ai-agents,security,sandbox,agent-skills,verification
|
|
6
|
+
Author: Ali Haqiqi
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Security
|
|
17
|
+
Requires-Dist: pyyaml>=6
|
|
18
|
+
Requires-Python: >=3.12
|
|
19
|
+
Project-URL: Homepage, https://github.com/haqaliz/assay
|
|
20
|
+
Project-URL: Repository, https://github.com/haqaliz/assay
|
|
21
|
+
Project-URL: Issues, https://github.com/haqaliz/assay/issues
|
|
22
|
+
Project-URL: Changelog, https://github.com/haqaliz/assay/blob/master/CHANGELOG.md
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# Assay
|
|
26
|
+
|
|
27
|
+
**Execution-grounded security verifier for AI agent skills.** Runs a skill in a sandbox against a
|
|
28
|
+
real agent, captures what it actually did, and checks that against what it claims to do.
|
|
29
|
+
|
|
30
|
+
[](docs/ROADMAP.md)
|
|
31
|
+
[](https://github.com/haqaliz/assay/actions/workflows/ci.yml)
|
|
32
|
+
[](LICENSE)
|
|
33
|
+
|
|
34
|
+
[Vision](VISION.md) · [Roadmap](docs/ROADMAP.md) · [Architecture](docs/technical/ARCHITECTURE.md) · [Capabilities](docs/technical/CAPABILITY_ROADMAP.md)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
Sandboxed checks require macOS. Install the CLI with `uv` or `pip`:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
uv tool install assayhq
|
|
44
|
+
# or
|
|
45
|
+
pip install assayhq
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
From a checkout, `uv sync --dev` then `uv run assay ...` works too.
|
|
49
|
+
|
|
50
|
+
## Status
|
|
51
|
+
|
|
52
|
+
**A1–A7 exist, plus two A8 adapters (OpenClaw/ClawHub and Cursor rules) and the A10 static
|
|
53
|
+
pre-filter; the engine has a verdict, a portable record and a measured benchmark.** What is built and
|
|
54
|
+
tested, all offline (the bundle tests run a local `ssh-keygen`; the benchmark makes no model or
|
|
55
|
+
network call):
|
|
56
|
+
|
|
57
|
+
- **Ingest** (`src/assay/ingest/`) — parses a Claude Code `SKILL.md`, an OpenClaw/ClawHub
|
|
58
|
+
`SKILL.md` (format plus `metadata.openclaw` requirements), and a Cursor project rule (`.mdc`,
|
|
59
|
+
`globs`/`alwaysApply` as file scope) into a frozen `Skill` record with a tri-state declared scope
|
|
60
|
+
(undeclared vs declared none) and a named refusal for malformed input. A declared
|
|
61
|
+
`env`/`config`/`os` requirement the jail cannot satisfy, or a missing required binary, is refused
|
|
62
|
+
before a run with `UNVERIFIED/REQUIREMENTS_UNMET`.
|
|
63
|
+
- **Sandbox** (`src/assay/sandbox/`) — runs a command under a macOS Seatbelt jail: writes confined
|
|
64
|
+
to a run root, network deny-by-default with a port-scoped allowlist, a scrubbed environment,
|
|
65
|
+
CPU/wall limits, and a capture channel the child cannot rewrite.
|
|
66
|
+
- **Agent driver** (`src/assay/agent/`) — a bounded BYOK loop: the model runs outside the jail, every
|
|
67
|
+
tool call runs inside it, with cost, step, action and wall caps and a named stop cause.
|
|
68
|
+
- **Capture and diff** (`src/assay/capture/`) — turns a run into a canonical, content-addressed
|
|
69
|
+
trace of file, network, shell and instruction events and diffs it against the declared scope.
|
|
70
|
+
- **Verdict and strictness** (`src/assay/verdict/`) — turns that diff into one `Assessment` with a
|
|
71
|
+
`CLEAN/FLAGGED/MALICIOUS/UNVERIFIED` verdict, findings with evidence, a named cause when
|
|
72
|
+
undecidable, and a `blocked` flag. The four-class severity floor cannot be lowered.
|
|
73
|
+
- **CLI** (`src/assay/cli/`) — `assay check <skill>` composes A1–A5, saves the trace, prints a
|
|
74
|
+
human or canonical JSON report, and exits `0` only on `CLEAN`.
|
|
75
|
+
- **Signed bundle** (`src/assay/bundle/`) — turns a saved trace and its `SKILL.md` into one
|
|
76
|
+
canonical record with the exact skill source, the observed trace, the sandbox config hashes and
|
|
77
|
+
the verdict, signed with `ssh-keygen`. `assay verify` checks the hashes and the signature offline,
|
|
78
|
+
re-parses the embedded source and re-runs the shipped verdict layer; a signed assessment that does
|
|
79
|
+
not follow from the record is refused. The bundle proves the record is intact, who attested it,
|
|
80
|
+
and that the verdict follows from the recorded inputs. It does not prove the run happened or that
|
|
81
|
+
the skill is safe.
|
|
82
|
+
- **Labeled corpus and benchmark** (`src/assay/corpus/`, `corpus/`) — 20 labeled cases (18 synthetic,
|
|
83
|
+
2 local-model) scored offline by `assay corpus`, with precision and recall, explicit denominators,
|
|
84
|
+
the ids of any false `MALICIOUS` on clean cases, and `UNVERIFIED` coverage by cause. Single labeler
|
|
85
|
+
and synthetic-dominated: a regression measurement, not a population estimate. A separate 8-case
|
|
86
|
+
real-world control (`corpus/real/`) holds one local-model run of each of the maintainer's own
|
|
87
|
+
Plumb skills, all labeled clean; it is a private false-positive and coverage control, not a
|
|
88
|
+
benchmark.
|
|
89
|
+
- **Static pre-filter** (`src/assay/triage/`, `assay triage`) — ranks a skill for a run from its
|
|
90
|
+
text; it emits `priority` and `signals` only, with no verdict, findings, trace or run. It is a
|
|
91
|
+
queue heuristic, not a detector, and the sandboxed run remains the verdict.
|
|
92
|
+
- **Audit gate** ([`ETHICS.md`](ETHICS.md), [`docs/audit/`](docs/audit/)) — the rules and protocol
|
|
93
|
+
for third-party audits: evidence, three private runs, two-person review, a disclosure window,
|
|
94
|
+
publication limits and corrections. **No third-party audit has been run or published.** A private
|
|
95
|
+
own-skill runner dry run was executed on 2026-11-06; it is unreviewed and unpublished. The
|
|
96
|
+
maintainer is the only reviewer today; a public finding waits for a second reviewer and the
|
|
97
|
+
disclosure steps.
|
|
98
|
+
|
|
99
|
+
The pattern lists are now measured on that corpus; run `assay corpus corpus/` for the current
|
|
100
|
+
numbers and read `corpus/README.md` for the limits. The first real Anthropic-keyed run has not
|
|
101
|
+
happened (the Phase 0 gate used a local model). Read `CLAUDE.md` before writing any code here; do not
|
|
102
|
+
describe capability that is not in `git log`.
|
|
103
|
+
|
|
104
|
+
## Usage
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
ANTHROPIC_API_KEY=... uv run assay check path/to/SKILL.md \
|
|
108
|
+
--model claude-sonnet-4-5 --input-price 3 --output-price 15 --max-cost 0.50
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
A local model needs no key at all. With Ollama running:
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
uv run assay check path/to/SKILL.md \
|
|
115
|
+
--provider openai-compatible --base-url http://127.0.0.1:11434/v1 \
|
|
116
|
+
--model qwen3-coder:30b --input-price 0 --output-price 0 --max-cost 0.01
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`<skill>` may be the `SKILL.md` file or its directory. `--model`, `--input-price`,
|
|
120
|
+
`--output-price` and `--max-cost` are required, with env fallbacks `ASSAY_MODEL`,
|
|
121
|
+
`ASSAY_INPUT_PRICE`, `ASSAY_OUTPUT_PRICE` and `ASSAY_MAX_COST`; the OpenAI-compatible provider also
|
|
122
|
+
reads `ASSAY_API_KEY`, but only for a non-local base URL (local URLs need no key, and a non-local URL
|
|
123
|
+
must be https). Prices are USD per million tokens. Traces are written to
|
|
124
|
+
`./.assay/traces/<sha256>.json` unless `--out` says otherwise, and `--json` prints one canonical
|
|
125
|
+
line for CI. Exit `0` only on `CLEAN`; `1` on `FLAGGED`, `MALICIOUS` or `UNVERIFIED` (including a
|
|
126
|
+
sandbox that cannot start, or a declared requirement the jail cannot satisfy); `2` on a usage or
|
|
127
|
+
config error. The suite injects a scripted model and fake sandbox; a real Anthropic-keyed run is
|
|
128
|
+
still the maintainer's.
|
|
129
|
+
|
|
130
|
+
Claude Code, OpenClaw/ClawHub `SKILL.md` files, and Cursor project rules (`.mdc`) are accepted; the
|
|
131
|
+
report's `format` and `requirements` fields say which and what it declares. An OpenClaw skill whose
|
|
132
|
+
requirements cannot be met in the jail (`requires.env`, `requires.config`, a mismatched `os`, or a
|
|
133
|
+
required binary absent from the jail PATH) is refused before any run with
|
|
134
|
+
`UNVERIFIED/REQUIREMENTS_UNMET` and the exact missing item. A satisfiable skill runs normally. Most
|
|
135
|
+
OpenClaw skills declare no file/network/tool scope, so the run stays
|
|
136
|
+
`UNVERIFIED/NO_DECLARED_SCOPE` unless `metadata.assay` adds one.
|
|
137
|
+
|
|
138
|
+
A Cursor rule's `globs` (or `alwaysApply: true`) becomes its file scope; the format declares no
|
|
139
|
+
tools or network, so a run with no findings stays `UNVERIFIED/NO_DECLARED_SCOPE`, and a write outside
|
|
140
|
+
the globs is `FLAGGED`. Pass the `.mdc` file itself, not its directory. `AGENTS.md`, `.cursorrules`,
|
|
141
|
+
and Cursor user/team rules are not project-rule files and are out of scope.
|
|
142
|
+
|
|
143
|
+
### Attesting a run
|
|
144
|
+
|
|
145
|
+
A bundle binds one saved trace to the `SKILL.md` that produced it. Use a dedicated, unencrypted
|
|
146
|
+
attestation key:
|
|
147
|
+
|
|
148
|
+
```sh
|
|
149
|
+
ssh-keygen -t ed25519 -N '' -C assay-attest -f ~/.ssh/assay-attest
|
|
150
|
+
uv run assay bundle .assay/traces/<sha256>.json \
|
|
151
|
+
--skill path/to/SKILL.md --key ~/.ssh/assay-attest
|
|
152
|
+
uv run assay verify .assay/traces/<sha256>.bundle.json \
|
|
153
|
+
--public-key ~/.ssh/assay-attest.pub
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
`bundle` writes `<trace-stem>.bundle.json` next to the trace unless `--out` says otherwise, and
|
|
157
|
+
exits `0` only when it wrote the file. `verify` exits `0` only when the record is canonical, every
|
|
158
|
+
hash agrees, and the signature verifies against the public key you supply; `1` on any failure, `2`
|
|
159
|
+
on a usage error. Both accept `--json`. The bundle embeds the trace, so a verifier needs only the
|
|
160
|
+
bundle and the public key — never the private key, the model, or the sandbox. A bundle embeds the
|
|
161
|
+
trace's event excerpts, so read it before publishing. Pass the same `--strictness` you checked
|
|
162
|
+
with (the default is `standard`); the bundle records the level it used. `verify` checks the
|
|
163
|
+
signature and then replays the verdict: it re-parses the embedded `SKILL.md`, re-runs the shipped
|
|
164
|
+
verdict layer at the recorded strictness, and refuses unless the result matches (`replay: verified`).
|
|
165
|
+
A valid signature over a false verdict therefore fails with `replay-mismatch`. Replay proves the
|
|
166
|
+
verdict follows from the recorded inputs, not that the run was captured honestly or that the skill
|
|
167
|
+
is safe; the skill hash covers `SKILL.md` only, not the rest of the skill directory. `CLEAN` still
|
|
168
|
+
means "matched declared scope in this run".
|
|
169
|
+
|
|
170
|
+
### Measuring the verdict
|
|
171
|
+
|
|
172
|
+
The repo ships a labeled corpus and an offline benchmark:
|
|
173
|
+
|
|
174
|
+
```sh
|
|
175
|
+
uv run assay corpus corpus/
|
|
176
|
+
uv run assay corpus corpus/ --json
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
It verifies every case's skill and trace hash, re-runs the verdict layer, and prints precision and
|
|
180
|
+
recall with explicit denominators, `UNVERIFIED` counts by cause, and the ids of any false
|
|
181
|
+
`MALICIOUS` on clean cases. Exit `0` means the report was computed, not that the numbers passed a
|
|
182
|
+
threshold. The corpus is small, single-labeled and synthetic-dominated; `corpus/README.md` states
|
|
183
|
+
the limits, and the numbers are a regression signal, not a population estimate.
|
|
184
|
+
|
|
185
|
+
### Triaging a collection
|
|
186
|
+
|
|
187
|
+
`assay triage <skill>` ranks a skill from its text before you spend a run:
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
uv run assay triage path/to/SKILL.md
|
|
191
|
+
uv run assay triage path/to/SKILL.md --json
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
It prints `priority` (`low`/`medium`/`high`) and the `signals` that produced it (credentials,
|
|
195
|
+
network, shell, install, persistence, prompt injection, destructive, privilege, filesystem). It is a
|
|
196
|
+
pre-filter: no verdict, no findings, no trace, no model and no sandbox. A high priority is not
|
|
197
|
+
`MALICIOUS`, and a low priority is not safe; run `assay check` for an observed verdict.
|
|
198
|
+
|
|
199
|
+
## What Assay is
|
|
200
|
+
|
|
201
|
+
Point Assay at a skill — a Claude Code or OpenClaw/ClawHub `SKILL.md`, or a Cursor project rule
|
|
202
|
+
today. MCP server verification is a separate, deferred capability: a server is a long-lived program,
|
|
203
|
+
not a file. It runs the skill in an isolated sandbox against a real
|
|
204
|
+
agent, captures every file access, network call, shell command, and injected instruction it
|
|
205
|
+
produced, and diffs that against what the skill declares about itself. The verdict is backed by
|
|
206
|
+
a captured record of the run, which can be signed into a bundle a third party verifies offline.
|
|
207
|
+
|
|
208
|
+
## What Assay is not
|
|
209
|
+
|
|
210
|
+
- Not a static pattern scanner as a verdict. Those exist (NVIDIA's SkillSpector) and are a cheap
|
|
211
|
+
pre-filter; `assay triage` is our queue heuristic, and it never decides. Only the sandboxed run
|
|
212
|
+
assigns a verdict.
|
|
213
|
+
- Not an antivirus signature match. Assay observes novel behavior, not known hashes.
|
|
214
|
+
- Not an MCP server verifier yet. A manifest says how to start a server, not what it does; MCP needs
|
|
215
|
+
a sandbox session and a client, so it is a separate, deferred capability (see
|
|
216
|
+
[`docs/planning/mcp-design/prd.md`](docs/planning/mcp-design/prd.md)).
|
|
217
|
+
- Not a claim that a `CLEAN` skill is safe forever — only that this run's observed behavior
|
|
218
|
+
matched its declared scope.
|
|
219
|
+
|
|
220
|
+
## The verdict
|
|
221
|
+
|
|
222
|
+
| Verdict | Meaning |
|
|
223
|
+
|---|---|
|
|
224
|
+
| `CLEAN` | No findings, all three dimensions declared, and at least one captured behavior event |
|
|
225
|
+
| `FLAGGED` | At least one finding, none of them `HIGH` |
|
|
226
|
+
| `MALICIOUS` | At least one `HIGH` finding from a captured `OK`/`DENIED` action — never inferred from text alone |
|
|
227
|
+
| `UNVERIFIED` | Could not decide; carries `NO_TRIGGER`, `NO_DECLARED_SCOPE`, `AGENT_FAILED`, `BUDGET_LIMIT` or `COST_CAPPED` |
|
|
228
|
+
|
|
229
|
+
Strictness (`baseline`/`standard`/`strict`) decides only whether a run is `blocked`; it never
|
|
230
|
+
changes the verdict. The severity floor for the four finding classes is fixed and cannot be
|
|
231
|
+
lowered. An instruction-pattern match is a candidate capped at `REVIEW`: it can make a run
|
|
232
|
+
`FLAGGED`, never `MALICIOUS`. The shell and instruction pattern lists are deliberately short. The A7
|
|
233
|
+
corpus measures them on 20 labeled cases; the shell list was calibrated on a separate 8-case
|
|
234
|
+
held-out set, adding four `HIGH` patterns (`dd` to a device, `pty.spawn`, `/dev/tcp/`, `socat ...
|
|
235
|
+
EXEC:/bin/sh`) and taking strict malicious recall from 0/4 to 4/4 with 0 false `MALICIOUS` on four
|
|
236
|
+
clean guards. The instruction list was calibrated on its own 8-case held-out set: five patterns were
|
|
237
|
+
added (`ignore the above`, `disregard previous`, `forget your instructions`, `keep this between us`,
|
|
238
|
+
`do not reveal this`) and two narrowed (`override your`, `system prompt`), taking detection from 0/4
|
|
239
|
+
to 4/4 and clean review from 2/4 to 0/4 with 0 false `MALICIOUS`. Both sets are small and synthetic;
|
|
240
|
+
those numbers are a regression/calibration signal, not a population estimate. Instruction findings
|
|
241
|
+
remain capped at `REVIEW` — `FLAGGED` is a review, never an accusation — so strict malicious recall
|
|
242
|
+
stays 0/4 by design.
|
|
243
|
+
|
|
244
|
+
A static scan or model may flag a candidate; the sandboxed, observed run assigns the verdict.
|
|
245
|
+
|
|
246
|
+
## Development
|
|
247
|
+
|
|
248
|
+
macOS is required for the Seatbelt sandbox; the suite is offline (no model or network call).
|
|
249
|
+
|
|
250
|
+
```sh
|
|
251
|
+
uv sync --dev
|
|
252
|
+
uv run pytest
|
|
253
|
+
uv run assay --version
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
CI runs the same suite on `macos-latest`.
|
|
257
|
+
|
|
258
|
+
## Docs
|
|
259
|
+
|
|
260
|
+
- [`VISION.md`](VISION.md) — the thesis, the moat, non-goals.
|
|
261
|
+
- [`CLAUDE.md`](CLAUDE.md) — guardrails and the verdict contract.
|
|
262
|
+
- [`ETHICS.md`](ETHICS.md) — the audit ethics, disclosure and correction policy.
|
|
263
|
+
- [`docs/audit/PROTOCOL.md`](docs/audit/PROTOCOL.md) — the audit protocol and checklist.
|
|
264
|
+
- [`docs/ROADMAP.md`](docs/ROADMAP.md) — phased plan and risk register.
|
|
265
|
+
- [`docs/technical/CAPABILITY_ROADMAP.md`](docs/technical/CAPABILITY_ROADMAP.md) — A1..A10 capabilities in build order.
|
|
266
|
+
- [`docs/technical/ARCHITECTURE.md`](docs/technical/ARCHITECTURE.md) — the design.
|
|
267
|
+
|
|
268
|
+
## Lineage
|
|
269
|
+
|
|
270
|
+
Assay is one of three siblings scaffolded together on 2026-10-22 (with [Tenon](../tenon) and
|
|
271
|
+
[Pry](../pry)), out of a market-demand research pass, sharing house DNA with
|
|
272
|
+
[Belay](../belay), [Plumb](../plumb), and [Whetstone](../whetstone). Standalone by design — no
|
|
273
|
+
code dependency on sibling projects yet.
|