agent-certify 0.6.0__tar.gz → 0.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. agent_certify-0.7.0/CHANGELOG.md +391 -0
  2. {agent_certify-0.6.0 → agent_certify-0.7.0}/MANIFEST.in +1 -1
  3. {agent_certify-0.6.0 → agent_certify-0.7.0}/PKG-INFO +289 -24
  4. {agent_certify-0.6.0 → agent_certify-0.7.0}/README.md +287 -22
  5. {agent_certify-0.6.0 → agent_certify-0.7.0}/SECURITY.md +54 -5
  6. agent_certify-0.7.0/examples/crewai_run.json +101 -0
  7. agent_certify-0.7.0/examples/langgraph_trace.jsonl +12 -0
  8. {agent_certify-0.6.0 → agent_certify-0.7.0}/pyproject.toml +1 -1
  9. agent_certify-0.7.0/scripts/benchmark.py +25 -0
  10. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/__init__.py +12 -2
  11. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/anomaly.py +156 -2
  12. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/baseline.py +113 -6
  13. agent_certify-0.7.0/src/agent_certify/benchmark/__init__.py +58 -0
  14. agent_certify-0.7.0/src/agent_certify/benchmark/__main__.py +79 -0
  15. agent_certify-0.7.0/src/agent_certify/benchmark/injector.py +405 -0
  16. agent_certify-0.7.0/src/agent_certify/benchmark/runner.py +247 -0
  17. agent_certify-0.7.0/src/agent_certify/benchmark/synthetic.py +106 -0
  18. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/blast.py +1 -4
  19. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/certificate.py +24 -3
  20. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/cli.py +100 -17
  21. agent_certify-0.7.0/src/agent_certify/domains.py +262 -0
  22. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/graph.py +46 -1
  23. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/mcp_server.py +2 -1
  24. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/otel.py +6 -3
  25. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/parser/__init__.py +4 -1
  26. agent_certify-0.7.0/src/agent_certify/parser/auto.py +199 -0
  27. agent_certify-0.7.0/src/agent_certify/parser/base.py +146 -0
  28. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/parser/claude_code.py +14 -0
  29. agent_certify-0.7.0/src/agent_certify/parser/crewai.py +331 -0
  30. agent_certify-0.7.0/src/agent_certify/parser/langgraph.py +442 -0
  31. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/parser/mcp_logs.py +5 -1
  32. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/scanner.py +15 -7
  33. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/viz.py +1 -1
  34. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/watcher.py +12 -10
  35. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify.egg-info/PKG-INFO +289 -24
  36. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify.egg-info/SOURCES.txt +16 -0
  37. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_auto_parser.py +66 -1
  38. agent_certify-0.7.0/tests/test_benchmark.py +396 -0
  39. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_cli_v05.py +21 -0
  40. agent_certify-0.7.0/tests/test_crewai_parser.py +239 -0
  41. agent_certify-0.7.0/tests/test_domains.py +396 -0
  42. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_hardening.py +23 -0
  43. agent_certify-0.7.0/tests/test_langgraph_parser.py +281 -0
  44. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_scanner.py +10 -0
  45. agent_certify-0.7.0/tests/test_volume.py +204 -0
  46. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_watcher.py +35 -0
  47. agent_certify-0.6.0/CHANGELOG.md +0 -171
  48. agent_certify-0.6.0/src/agent_certify/parser/auto.py +0 -118
  49. agent_certify-0.6.0/src/agent_certify/parser/base.py +0 -67
  50. {agent_certify-0.6.0 → agent_certify-0.7.0}/CONTRIBUTING.md +0 -0
  51. {agent_certify-0.6.0 → agent_certify-0.7.0}/LICENSE +0 -0
  52. {agent_certify-0.6.0 → agent_certify-0.7.0}/examples/scan_claude_session.py +0 -0
  53. {agent_certify-0.6.0 → agent_certify-0.7.0}/scripts/demo.py +0 -0
  54. {agent_certify-0.6.0 → agent_certify-0.7.0}/setup.cfg +0 -0
  55. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/parser/cursor_trace.py +0 -0
  56. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/paths.py +0 -0
  57. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify/policy.py +0 -0
  58. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify.egg-info/dependency_links.txt +0 -0
  59. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify.egg-info/entry_points.txt +0 -0
  60. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify.egg-info/requires.txt +0 -0
  61. {agent_certify-0.6.0 → agent_certify-0.7.0}/src/agent_certify.egg-info/top_level.txt +0 -0
  62. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/conftest.py +0 -0
  63. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_anomaly.py +0 -0
  64. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_baseline.py +0 -0
  65. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_baseline_overrides.py +0 -0
  66. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_blast.py +0 -0
  67. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_cert_by_type.py +0 -0
  68. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_certificate.py +0 -0
  69. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_cli.py +0 -0
  70. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_cli_v051.py +0 -0
  71. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_cursor_parser.py +0 -0
  72. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_mcp_parser.py +0 -0
  73. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_mcp_server.py +0 -0
  74. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_otel.py +0 -0
  75. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_parser_claude.py +0 -0
  76. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_perspective.py +0 -0
  77. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_policy.py +0 -0
  78. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_policy_gen.py +0 -0
  79. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_security_cert.py +0 -0
  80. {agent_certify-0.6.0 → agent_certify-0.7.0}/tests/test_security_mcp.py +0 -0
@@ -0,0 +1,391 @@
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.7.0] - 2026-11-03
10
+
11
+ The v0.6.1 benchmark measured one blind spot and reported it for a release
12
+ rather than hiding it. This closes it, and adds the question a topology cannot
13
+ answer on its own: not which tools ran, but **where they went**.
14
+
15
+ ### Added
16
+ - **Call volume detection** (`call_volume_spike`): a baseline now learns how
17
+ *much* each tool and each link is used — mean, deviation, maximum and the
18
+ number of sessions behind them — and a session is compared against it.
19
+ Warning past 3σ above the mean, critical past 5σ:
20
+ `Tool Bash called 487 times (baseline: 50 ± 1, 391.3σ)`
21
+ - Volume is learned **per link** as well as per tool, keyed by role like
22
+ `known_links`. A link spike replaces the tool-level one when it adds
23
+ something: a tool with several callers is reported as the link that spiked,
24
+ so the message names who is responsible, and an agent calling that tool its
25
+ usual number of times is not flagged because somebody else hammered it. A
26
+ tool with a single caller is reported as the tool, where the link would say
27
+ the same thing
28
+ - **Network destination monitoring**: `agent_certify.domains` reads the hosts a
29
+ session's tool calls pointed at, and two new checks compare them against the
30
+ baseline — `new_domain` (never seen, not accepted) and `rejected_domain`
31
+ (matches a rejected pattern), both critical:
32
+ `Network destination api.qwen.cn in tool call — not in baseline, matches rejected pattern *.cn`
33
+ - `agent-certify baseline accept --domain api.openai.com` and
34
+ `baseline reject --domain "*.cn"`, with `baseline show` listing both and the
35
+ destinations learned. Patterns follow the rules of the other decisions:
36
+ carried across re-learns, last write wins, and reject beats accept
37
+ - `AgentGraph.seen_domains`, `.record_domains()` and `.domain_callers()`;
38
+ `Baseline.known_domains`, `.accepted_domains`, `.rejected_domains`,
39
+ `.tool_call_volume`, `.link_call_volume` and `.volume(scope, key)`;
40
+ `baseline.link_volume()` and `link_key()`
41
+ - `AnomalyInjector.inject_foreign_domain()` and `.forbid_domain()`, so the
42
+ benchmark covers six fault types: **36/36 detected, no false positives**
43
+ - `AnomalyInjector.inject_shell_domain()`, the benchmark's one **blind spot**
44
+ injection: a host named inside a shell command argument
45
+ (`{"command": "curl -sS collector.example.net/x"}`) is read by no check, so
46
+ the expected outcome is silence and the fault is counted apart from the
47
+ detection rate. It is injected through the production extractor, so it starts
48
+ counting as a detection by itself — with no edit to the benchmark — the day
49
+ extraction reads shell commands
50
+ - `agent_certify.benchmark.BLIND_SPOTS`, the list of fault types this release
51
+ ships as uncovered, so a test can pin the claim
52
+ - `tests/test_volume.py` and `tests/test_domains.py` for the two features
53
+
54
+ ### Changed
55
+ - `agent-certify learn` reports the destinations it learned, and the Claude
56
+ Code, CrewAI, LangGraph and MCP-log parsers record them. `scan --format json`
57
+ carries them as `seen_domains`
58
+ - the injection benchmark's `volume_spike` is now an expected *detection*
59
+ rather than an expected miss; the row stays in the table
60
+
61
+ ### Fixed
62
+ - `extract_domains()` capped its result at `MAX_DOMAINS` across a payload but
63
+ not within a single string, so one argument holding hundreds of URLs could
64
+ return all of them
65
+
66
+ #### From the 2026-11-03 audit (33 findings: 3 high, 7 medium, the rest low or info)
67
+
68
+ Three groups mattered, and all three were places where a shipped text claimed
69
+ something the code did not do.
70
+
71
+ - **`SECURITY.md` described the wrong data perimeter** (DOC-001, high). It said
72
+ "prompts, tool inputs and tool outputs are never extracted" while v0.7.0
73
+ reads host names out of both and returns them to MCP clients in anomaly
74
+ messages. A new §6 now states what is read, what is kept, what reaches
75
+ `baseline.json` and what is transmitted — plus a review rule: a feature that
76
+ reads a new category of input data requires a `SECURITY.md` review in the
77
+ same change
78
+ - **The benchmark's blind-spot machinery was unreachable** (INV-001, high).
79
+ Every injection carried an expected category, so `expected_category` was
80
+ never None and the branches that report a blind spot could not run: "no blind
81
+ spots left" had become a property of the registry rather than a measurement.
82
+ `inject_shell_domain` arms it again against a real gap, and the tests now pin
83
+ the capability instead of the result
84
+ - **`benchmark/__init__.py` still said "no check reads call volume"** (INV-002,
85
+ high), contradicting the shipped check and the same file twelve lines above
86
+ - **Three ways a real network destination was silently dropped** (INV-003
87
+ cluster, medium) — the detector was not wrong, it was quiet:
88
+ - `AgentGraph.merge` set the per-node destination list by default instead of
89
+ unioning it, so when two sessions pointed the same tool at different hosts
90
+ the second host survived in `seen_domains` with no caller and the anomaly
91
+ degraded to "no caller recorded". On the path `scan <directory>` takes
92
+ (INV-004)
93
+ - `NOT_HOSTS` treated `zip`, `sh`, `so`, `md`, `py` and `rs` as file
94
+ extensions although all six are delegated TLDs, so `{"host":
95
+ "collector.zip"}` was dropped. Removed, and the rest of the list checked
96
+ against the root zone; a test keeps it that way (INV-005)
97
+ - `MAX_STRING_CHARS` was announced for "any one string" but applied only to
98
+ the URL search, not to the bare-host branch (INV-006)
99
+ - `new_domain` / `rejected_domain` said "HTTP call to X detected"; nothing is
100
+ observed, resolved or necessarily HTTP. Now "Network destination X in tool
101
+ call" (INV-007)
102
+ - LangGraph's `unattributed_errors` was incremented and read nowhere. Now in
103
+ the `graph` node's metadata and logged, like `transitions` (INV-008)
104
+ - `certify --key` with a file that is not a key raised a bare `ValueError`
105
+ traceback; it now exits with a message naming what was expected (COD-011)
106
+ - `watch` silenced three parser loggers by name, missing CrewAI and LangGraph;
107
+ it raises the parent `agent_certify.parser` logger instead, so every parser
108
+ is covered by inheritance (COD-010)
109
+ - Exactly 5.0σ of call volume was reported critical where all three texts
110
+ describing the check say warning; both bounds are now exclusive (DOC-017)
111
+ - A LangGraph node looping back to itself now increments its call count, as the
112
+ README said it did (DOC-005)
113
+ - `baseline accept|reject` did not expand `~` or environment variables in
114
+ `--baseline`, unlike every other path argument (MNT-001)
115
+ - `render_html` divided by zero on a graph whose edges all have weight 0,
116
+ reachable through `AgentGraph.from_dict` (COD-015)
117
+ - Dead code removed: `triangle_counts()`, `baseline.normalise_domain()`,
118
+ `STATUS_CODES["UNSET"]`, `BlastRadiusAnalyzer._get_neighbors()` and
119
+ `Baseline.version`'s stale `"0.2.0"` default; `TypeResult.note` is now
120
+ rendered by the benchmark table rather than carried unused (COD-014)
121
+ - `AgentFIScanner.structure` is declared in `__init__` (COD-016)
122
+ - Documentation corrected: the non-existent 5% skipped-record threshold
123
+ (DOC-002), `BUSL-1.1` in the v0.5.0 roadmap entry (DOC-003), two
124
+ contradictory v0.7.0 roadmap sections and shipped work filed under "Planned"
125
+ (DOC-004), the watcher's format list and module title (DOC-006), the coverage
126
+ badge against the CI floor (DOC-007), a misplaced field comment in `Baseline`
127
+ (DOC-008), what `learn` records (DOC-009), `NETWORK_KEYS` presented as
128
+ exhaustive (DOC-010), `node_classifications` labelled "Critical nodes"
129
+ (DOC-011), the trace id's dependence on a session id (DOC-012), the time
130
+ limit as per-request rather than per-tool-call (DOC-013), `--perspective
131
+ classic` and `watch --duration` missing from the usage lines (DOC-014), the
132
+ format-detection table's final row (DOC-015) and a resolved audit item still
133
+ listed as open (DOC-016)
134
+
135
+ Deferred, and recorded in `ROADMAP.md`: `MNT-003` (splitting `cli.py` and
136
+ `mcp_server.py`), `COD-012` (version-counter invalidation for the edge index,
137
+ documented on the attribute in the meantime) and dynamic coverage badges.
138
+
139
+ ### Notes
140
+ - **Destinations are patterns, never addresses.** Nothing is resolved in either
141
+ direction: a hostname is never turned into an IP, and a pattern is matched
142
+ against the name the agent used, which is the thing the operator decided
143
+ about. An IP literal the agent itself used is kept as the destination it is
144
+ - **A mention is not a destination.** A full URL counts wherever it appears in
145
+ a call's arguments; a bare host counts only as the value of a field that
146
+ names one (`url`, `endpoint`, `host`, `base_url`, …). A domain-looking word
147
+ anywhere else does not, and a tool's *result* is read only when that call's
148
+ own arguments carried a URL. So a `WebFetch` records its redirects while a
149
+ `Read` of a document full of links records nothing — without that
150
+ distinction, every grep for a domain would read as egress and bury the real
151
+ finding. The deliberate consequence: a destination that appears **only** in a
152
+ result of a non-network tool is not reported
153
+ - Per-tool volume counts only the sessions where a tool appeared. Including the
154
+ sessions it was absent from would put its mean near zero and fire every time
155
+ it ran at all
156
+ - Adding `seen_domains` to the graph does not change `graph_hash()`, which
157
+ covers node roles, kinds and links: **certificates issued before v0.7.0 still
158
+ verify**. Baselines and graphs written by 0.6.x load unchanged, with no
159
+ destinations and no volume statistics — until the next `learn`
160
+ - There is no `*` domain pattern. A host that is not in the baseline already
161
+ fires as `new_domain`, so deny-by-default needs no pattern; `*` would also
162
+ outrank every `accept`, since reject wins
163
+
164
+ ## [0.6.1] - 2026-11-03
165
+
166
+ Two frameworks more, and the first measurement of what the anomaly checks
167
+ actually catch — including one thing they do not.
168
+
169
+ ### Added
170
+ - **CrewAI parser** (`agent_certify.parser.CrewAIParser`): execution logs
171
+ (`Crew(output_log_file=...)`) and event-bus dumps, as a JSON array, JSONL, or
172
+ one object wrapping the entries. Agents become `agent:<role>`, tasks become
173
+ `crew → agent:<role>` invocations, tool calls `agent:<role> → tool:<name>`,
174
+ and delegation (`Delegate work to coworker`, `Ask question to coworker`)
175
+ becomes an `agent → agent` link — which is what gives a crew's graph
176
+ triangles, and so an FI below 1
177
+ - **LangGraph parser** (`agent_certify.parser.LangGraphParser`): three trace
178
+ shapes — the `astream_events` stream, `stream_mode="debug"`, and plain
179
+ `{"node": ..., "next": ...}` records. Each node becomes `agent:<node>`, state
180
+ transitions become `agent → agent` links (from `langgraph_triggers` when the
181
+ trace has them, then `next`/`to`, then the order the nodes ran in),
182
+ `__start__` is the orchestrator and `__end__` is dropped
183
+ - **Anomaly injection benchmark** (`agent_certify.benchmark`):
184
+ `AnomalyInjector` (`inject_new_tool`, `inject_error_spike`,
185
+ `inject_new_agent`, `inject_volume_spike`, `inject_forbidden_tool`),
186
+ `BenchmarkRunner` reporting detection rate, false positive rate, false
187
+ negative rate and blind spots per anomaly type, varied synthetic sessions to
188
+ run it on, and `learn_holdout()` for the train/test split
189
+ - `python -m agent_certify.benchmark` and `scripts/benchmark.py`
190
+ (`--sessions PATH` to benchmark real logs, `--format json` for CI)
191
+ - `examples/crewai_run.json` and `examples/langgraph_trace.jsonl`: scannable
192
+ samples of both formats
193
+ - `agent_certify.parser.base.read_records()` and `to_datetime()`: a JSON
194
+ document or JSONL file as one stream of records, and the timestamp spellings
195
+ the frameworks write (ISO 8601, a space separator, epoch seconds or
196
+ milliseconds)
197
+
198
+ ### Changed
199
+ - auto-detection covers the new formats and accepts `.json` as well as
200
+ `.jsonl`. The first 20 records of a file are probed and the first one a
201
+ parser claims decides the format; a file nothing claims is still read as a
202
+ Claude Code transcript. A directory scan picks up CrewAI and LangGraph logs
203
+ by content, so a `.json` that holds no records (`package.json`) is ignored
204
+ - `agent-certify scan`, `learn`, `watch` and `certify` take the new formats
205
+ through the same auto-detection, with no new flag. `watch` still finds the
206
+ *newest* session in a folder by `*.jsonl` only; point it at a CrewAI or
207
+ LangGraph file directly (a crew log is written once at the end of a run, so
208
+ there is nothing to tail)
209
+
210
+ ### Fixed
211
+ - a bridge between two nodes that invoke each other was counted twice, once per
212
+ direction, so the bridge count could exceed the link count. Claude Code and
213
+ Cursor graphs have no reciprocal edges, which is why this never showed;
214
+ LangGraph loops (`agent → tools → agent`) produce them in every trace
215
+ - a CrewAI record holding nothing but an agent name is no longer claimed by the
216
+ CrewAI parser (an empty join of its event fields read as truthy)
217
+
218
+ ### Notes
219
+ - **Measured blind spot**: no check reads call *volume*, so a session that calls
220
+ one tool ten times as often as the baseline ever saw is reported as clean.
221
+ The benchmark injects that case and counts it as a blind spot rather than
222
+ leaving it out of the suite. Volume-aware detection is a v0.7.0 candidate
223
+ - The benchmark's headline numbers (100% detection, 0% false positives over the
224
+ four covered types) come from synthetic sessions that are deliberately
225
+ regular; `--sessions` against real logs is what describes a real system
226
+ - Neither new parser imports the framework it reads: both work on logs alone,
227
+ on any machine, with `numpy` and `cryptography` as the only dependencies
228
+
229
+ ## [0.6.0] - 2026-11-03
230
+
231
+ Feedback from Reddit and LinkedIn: a baseline that can only be re-learned is a
232
+ baseline you cannot correct. Three decisions are now recorded in it, and
233
+ `learn` carries them forward instead of overwriting them.
234
+
235
+ ### Added
236
+ - `agent-certify baseline accept --tool NAME` — whitelist a tool without
237
+ re-learning. It stops being a `new_tool` anomaly and no statistic moves
238
+ - `agent-certify baseline reject --tool NAME` — a tool that must never become
239
+ normal. It fires **even after a re-learn that saw it in every session**, and
240
+ `suggest-policy` no longer drafts it as a `required_tool` rule
241
+ - `agent-certify baseline accept --link "agent:Build -> deploy_staging"` —
242
+ scoped acceptance: one caller, one target. A different agent calling the same
243
+ tool still fires, and the message names the callers no accepted link covers
244
+ (thanks to Rohan Ahmed on LinkedIn for the case)
245
+ - `agent-certify baseline show [--format json]` — the decisions on record
246
+ - `agent-certify learn --forget-overrides` — drop them deliberately
247
+ - `Baseline.accepted_tools`, `.rejected_tools`, `.accepted_links`,
248
+ `.has_overrides`, and `carry_overrides()`, `parse_link()`, `normalise_tool()`,
249
+ `normalise_endpoint()` in `agent_certify.baseline`
250
+
251
+ ### Changed
252
+ - `agent-certify learn` reads the baseline it is about to overwrite and carries
253
+ its accept/reject decisions onto the new one. A corrupt previous file loses
254
+ the decisions but does not block learning
255
+ - `--tool` and `--link` are repeatable; `--tool` takes `Bash` or `tool:Bash`
256
+ - accept and reject are last-write-wins on the same tool: "permanent" means it
257
+ survives a re-learn, not that it cannot be revised. Rejection beats a scoped
258
+ accepted link
259
+
260
+ ### Notes
261
+ - Baselines written by 0.5.1 and earlier load unchanged — the three fields are
262
+ defaulted and a pre-0.6 file simply has no decisions on record
263
+ - There is no `reject --link`: a link you never want is a policy FORBIDDEN rule,
264
+ where you write the message
265
+
266
+
267
+ ## [0.5.1] - 2026-10-27
268
+
269
+ ### Fixed
270
+ - A file with no readable records (empty, or nothing but malformed lines) now prints
271
+ `No readable records in <file>` and exits 1, instead of an empty report with FI 0.0000. A directory
272
+ scan leaves such files out and says how many; the MCP server reports it as a tool error
273
+ - Unreadable records produce a single warning per file,
274
+ `WARNING: <file>: N of M records unreadable, skipped` (the parser and the CLI each printed one);
275
+ M now counts every record read, sub-agent transcripts included
276
+
277
+ ### Changed
278
+ - `keygen` without an argument writes `agent-certify.key` (and `agent-certify.key.pub`)
279
+ - `verify` with its arguments reversed or missing prints
280
+ `Hint: usage is 'verify CERTIFICATE SESSION --public-key KEY'` and exits 2
281
+
282
+ ## [0.5.0] - 2026-10-27
283
+
284
+ Fixes for the security audit of 2026-10-27 (45 findings). Items marked
285
+ **breaking** change behaviour that scripts may rely on.
286
+
287
+ ### Security
288
+ - MCP server: path arguments are confined to `~/.claude/projects` and the working directory after
289
+ resolving symlinks and `..`; environment variables are never expanded; responses and errors no longer
290
+ contain resolved paths, file contents or exception text (SEC-001, SEC-005)
291
+ - MCP server: no machine-wide fallback when no session is named; only the current project (PRV-001, **breaking**)
292
+ - MCP server: 30 s limit per request; failures logged on stderr with a correlation id (SEC-006, OBS-001)
293
+ - `verify` requires `--public-key`; unsigned certificates fail unless `--allow-unsigned` (warns); the key
294
+ embedded in a certificate is never trusted (SEC-002, **breaking**)
295
+ - Certificates carry `not_before` / `not_after` (90 days by default, `--validity-days`) checked by `verify`
296
+ (`--ignore-expiry`), and can be bound to a system with `--expect-system-id` (SEC-004)
297
+ - Signed bytes are domain-separated (`agent-certify/cert/v1\0`) with a fixed-point `fi_score`; pre-v0.5
298
+ certificates still verify, reported as legacy (SEC-008)
299
+ - Strict type and range validation when loading certificates, baselines, policies and graphs; NaN and
300
+ Infinity rejected; generic error messages (SEC-007, SEC-005)
301
+ - `keygen` creates the private key atomically with mode 600 and never follows a symlink; `certify` warns
302
+ about a key readable by others (SEC-003)
303
+ - Parsers skip and count malformed, deeply nested (RecursionError) or oversized (> 10 MB) lines; directory
304
+ scans are bounded in depth (5) and file count (1,000) (SEC-006)
305
+ - HTML report escapes `<`, `>` and `&` in its embedded JSON (SEC-009)
306
+ - `scripts/demo.py` writes its certificate to an unpredictable temporary file (SEC-010)
307
+
308
+ ### Added
309
+ - `scan --fail-on critical|warning|never`: exit 2 on findings at or above the level; `critical` is the
310
+ default (FUN-001, **breaking**: previously always 0)
311
+ - Policy evaluated per session for directory scans in every format, with a VIOLATIONS column (FUN-002)
312
+ - `skipped_records` in graphs, scan results, JSON, OTel spans and certificates, with a warning above 5%
313
+ (OBS-002)
314
+ - `watch` reads every format the auto-detecting parser supports (FUN-005)
315
+ - CI: tests on Ubuntu and Windows × Python 3.10–3.12 with a 90% coverage floor, ruff (including the
316
+ flake8-bandit `S` rules), pip-audit, wheel build and install check
317
+ - Release workflow: tag `vX.Y.Z` → tests, PyPI Trusted Publishing with attestations (API token fallback),
318
+ GitHub Release with these notes; pre-release tags go to TestPyPI
319
+ - Issue templates, CONTRIBUTING, SECURITY (with a threat model), CODE_OF_CONDUCT, this changelog
320
+
321
+ ### Changed
322
+ - License switched from BUSL-1.1 to Apache-2.0 (open source)
323
+ - Scanner: articulation points by Tarjan's algorithm and FI per removed node computed incrementally; a
324
+ 3,000-node graph scans in under a second (the previous algorithm made one full graph copy and one dense
325
+ n×n matrix product per node), with identical results (PRF-001)
326
+ - Blast radius reuses the scan's triangle structure instead of a full scan per node (PRF-002)
327
+ - Graph edges indexed by (source, target) with adjacency sets (PRF-003)
328
+ - `verify` reports a reason whenever the topology hash differs, and detects nodes whose kind changed (FUN-003)
329
+ - Path handling centralised in `agent_certify.paths` (MNT-001); the version is defined once, in
330
+ `agent_certify.__version__` (MNT-002)
331
+ - MCP `scan_topology` accepts the `classic` perspective in its schema (COD-001)
332
+ - SPDX identifier `BUSL-1.1` in every source file and in `pyproject.toml`; LICENSE covers all versions
333
+ (LIC-002, LIC-003). The license itself is unchanged
334
+ - GitHub Actions pinned by commit SHA; CI tools pinned by version (CIC-002); TestPyPI installs never resolve
335
+ dependencies from TestPyPI (CIC-003)
336
+ - `.agent-certify/` is created with a `.gitignore`; `*.html` reports are ignored by this repository (PRV-002)
337
+
338
+ ### Known limitations
339
+ - `watch` re-parses the whole session on every change (PRF-004); incremental reading is planned
340
+ - Baselines and policies are not signed (ARC-001); private keys are stored unencrypted (see SECURITY.md)
341
+
342
+ ## [0.4.0] - 2026-10-27
343
+
344
+ ### Added
345
+ - MCP server: agent-certify exposes 5 tools via Model Context Protocol
346
+ - scan_topology, check_anomalies, blast_radius, check_policy, topology_summary
347
+ - Auto-detects current session via CLAUDE_CODE_SESSION_ID
348
+ - Setup: `claude mcp add agent-certify -- agent-certify mcp`
349
+ - OTel export: emit OpenTelemetry spans for scans and anomalies (`--otel`)
350
+ - Cursor agent-trace parser (provenance graph from .agent-trace files)
351
+ - Auto-detect input format from the content (Claude Code transcript, Cursor Agent Trace, MCP log)
352
+ - SPDX license headers on all source files
353
+
354
+ ## [0.3.0] - 2026-10-27
355
+
356
+ ### Added
357
+ - `agent-certify watch`: live monitoring of active sessions
358
+ - `agent-certify suggest-policy`: auto-generate policy from baseline
359
+ - Policy engine: FORBIDDEN (tool, link), REQUIRED, MAX_SUB_AGENTS rules
360
+ - MCP logs parser: enrich graphs with MCP server tool calls (`--include-mcp`)
361
+ - `learn --include-mcp` for MCP-aware baselines
362
+
363
+ ### Fixed
364
+ - Certificates now compare sub-agents by type, not by unique id
365
+
366
+ ## [0.2.0] - 2026-10-27
367
+
368
+ ### Added
369
+ - `agent-certify learn`: auto-generate statistical baseline from N sessions
370
+ - Anomaly detection: new tools, FI deviation, error rate, sub-agent count
371
+ - Perspective-based node classification (engineering, risk, compliance, monitoring)
372
+ - KEYSTONE / LOAD-BEARING / PERIPHERAL labels (engineering perspective)
373
+
374
+ ## [0.1.0] - 2026-10-27
375
+
376
+ ### Added
377
+ - Claude Code JSONL parser (sessions + sub-agents)
378
+ - AgentFIScanner: Fragility Index on agent communication graphs
379
+ - BlastRadiusAnalyzer: impact analysis per node
380
+ - AgentCertificate: Ed25519 signed structural baseline
381
+ - Drift detection (certify + verify)
382
+ - HTML visualization with interactive graph
383
+ - CLI: scan, blast, keygen, certify, verify
384
+
385
+ [Unreleased]: https://github.com/zeekmartin/agent-certify/compare/v0.5.1...HEAD
386
+ [0.5.1]: https://github.com/zeekmartin/agent-certify/compare/v0.5.0...v0.5.1
387
+ [0.5.0]: https://github.com/zeekmartin/agent-certify/compare/v0.4.0...v0.5.0
388
+ [0.4.0]: https://github.com/zeekmartin/agent-certify/compare/v0.3.0...v0.4.0
389
+ [0.3.0]: https://github.com/zeekmartin/agent-certify/compare/v0.2.0...v0.3.0
390
+ [0.2.0]: https://github.com/zeekmartin/agent-certify/compare/da44351...v0.2.0
391
+ [0.1.0]: https://github.com/zeekmartin/agent-certify/commit/da44351
@@ -2,5 +2,5 @@ include CHANGELOG.md
2
2
  include CONTRIBUTING.md
3
3
  include SECURITY.md
4
4
  recursive-include tests *.py
5
- recursive-include examples *.py
5
+ recursive-include examples *.py *.json *.jsonl
6
6
  recursive-include scripts *.py