Audit: a tamper-evident, hash-chained, auto-populated record of every AI decision — verifiable offline. Evidence, not a compliance guarantee.
Project description
cendor-acttrace
A tamper-evident, append-only record of every AI decision — what model, what context, what it cost, which tools, and who signed off — mapped to control templates and exportable as an evidence pack. No database, no infra: integrity comes from a hash chain, not a server.
Audit-ready evidence in 5 lines — and verifiable offline.
·
pip install cendor-acttrace
from cendor.core import instrument
from cendor.acttrace import AuditLog
client = instrument(OpenAI())
audit = AuditLog(system="loan_triage", risk_tier="high", signing_key="…") # auto-subscribes
with audit.decision(input=application, actor="agent") as d:
resp = client.chat.completions.create(model="gpt-4o", messages=msgs) # auto-logged
d.record(model="gpt-4o", prompt_id="triage@v3") # cost/context captured for free
d.human_oversight(reviewer="ops@bank", action="approved")
audit.export("evidence_q3.jsonl", framework="eu_ai_act") # evidence pack (also nist_rmf)
acttrace verify evidence_q3.jsonl --key "…" # re-walks the chain + checks signatures; non-zero if broken
Highlights
- Auto-populating — construct an
AuditLogand it subscribes to the bus: every LLM/tool call, plus cost (tokenguard) and context decisions (contextkit) on the same stream, becomes an entry — no per-call wiring. - Tamper-evident hash chain —
verify()catches edits, reordering, and tail-truncation. The pack's_metahead+count catch truncation, but that header is only authenticated when the log is HMAC-signed and youverify(key=…)— the header itself is signed, so a rewritten_metafails. Without a key it's an unauthenticated in-file check, so pass an out-of-bandexpected_head=(captured fromlog.headat write time) for an authoritative completeness guarantee. Each entry is optionally HMAC-signed too. - Decisions & oversight —
decision()groups a unit of work;d.record(...)andd.human_oversight(reviewer, action)capture Art. 14-style sign-off. - Compliance evidence packs —
export(framework=…)annotates control IDs for EU AI Act, ISO/IEC 42001, GDPR, and NIST AI RMF (starting templates, not certified mappings), and a_meta.summary(counts of decisions, oversight, flags by action/severity) gives a reviewer the at-a-glance read first. PII redaction on by default (swap inredactor=). - Auto-flag on redaction — when the built-in redactor scrubs PII/secrets (
email,api_keyincl.sk-ant-/sk-proj-,aws_key,google_api_key,jwt,bearer_token) from an auto-captured entry, acttrace appends apolicy_flagrecording which category was removed — so "we removed PII" is in the hash chain, not silent (flag_on_redact=Trueby default; a customredactor=owns its own flagging). - Policy flags (validation) —
audit.flag(reason, action="blocked", …)records a tamper-evidentpolicy_flag(and returns the chained entry) when your pre-flight guard refuses input that shouldn't be processed — so the refusal is auditable, not just the calls that ran:
from cendor.core.instrument import add_interceptor, MISS
def guard(call): # your pre-flight policy guard
if my_policy_disallows(call): # YOUR rule
audit.flag("special-category data", action="blocked") # acttrace records the refusal
raise PolicyViolation("blocked") # your guard enforces it
return MISS
add_interceptor(guard) # the blocked call never reaches the bus — flag() is its only record
Produces evidence to support compliance — not legal advice, not a guarantee. Control mappings are starting templates for your compliance team.
See docs/acttrace.md · CHANGELOG. Part of the Cendor stack — github.com/cendorhq/Cendor. Powered by PowerAI Labs. Apache-2.0; provided "as is", without warranty — use at your own risk (LICENSE §7–8).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cendor_acttrace-1.0.0.tar.gz.
File metadata
- Download URL: cendor_acttrace-1.0.0.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d0ca3b10b46dd0e6285ab31ed5d7b1bc313cdd236d88dc884a873d27dc7dd7a
|
|
| MD5 |
fdfb9bb6a45a5ab0e80093972d655d54
|
|
| BLAKE2b-256 |
bf2b99f518be36a6369b4a17d76aa4ad543689207b1dadea1e763cbbc140bafb
|
Provenance
The following attestation bundles were made for cendor_acttrace-1.0.0.tar.gz:
Publisher:
release.yml on cendorhq/Cendor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cendor_acttrace-1.0.0.tar.gz -
Subject digest:
9d0ca3b10b46dd0e6285ab31ed5d7b1bc313cdd236d88dc884a873d27dc7dd7a - Sigstore transparency entry: 2063270736
- Sigstore integration time:
-
Permalink:
cendorhq/Cendor@1733d9d073230ac9448221f660fce4ab07a42c33 -
Branch / Tag:
refs/tags/acttrace-v1.0.0 - Owner: https://github.com/cendorhq
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1733d9d073230ac9448221f660fce4ab07a42c33 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cendor_acttrace-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cendor_acttrace-1.0.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f66664d77e8d24361576d29fb2e8bde9464d9e957c04c867e490fef0e2af709
|
|
| MD5 |
5c493decccb4e2a9abd747f356f26040
|
|
| BLAKE2b-256 |
bcd3413c2400cdca76547e2c242270b84be9c4bf01b70c6d41d8f07ff8e5e9eb
|
Provenance
The following attestation bundles were made for cendor_acttrace-1.0.0-py3-none-any.whl:
Publisher:
release.yml on cendorhq/Cendor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cendor_acttrace-1.0.0-py3-none-any.whl -
Subject digest:
1f66664d77e8d24361576d29fb2e8bde9464d9e957c04c867e490fef0e2af709 - Sigstore transparency entry: 2063270956
- Sigstore integration time:
-
Permalink:
cendorhq/Cendor@1733d9d073230ac9448221f660fce4ab07a42c33 -
Branch / Tag:
refs/tags/acttrace-v1.0.0 - Owner: https://github.com/cendorhq
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1733d9d073230ac9448221f660fce4ab07a42c33 -
Trigger Event:
push
-
Statement type: