tenthlook-core
Signed, hash-chained receipts for automated checks, shared by Panel (policy checks on agent actions) and Tenthcheck (CI checks on diffs). Python, cryptography is the only dependency. Verification is offline: no network, no service.
pip install tenthlook-core # (not published yet: pip install -e .)
tenthlook keygen # key file in ~/.config/tenthlook/, mode 600, never inside a git repo, never overwritten
tenthlook verify-receipt receipt.json --pubkey <base64 public key>
tenthlook verify-chain receipts.db --pubkey <base64> [--expect-head <hash> --expect-count <n>]
# verify-chain also takes a JSON file holding a list of receipts, oldest first (e.g. `panel export-receipts`)
A receipt
{ "version": 1, "receipt_id": "...", "timestamp_utc": "2026-11-22T10:00:00.123456Z",
"subject_type": "mcp_tool_call | git_diff | sql_query",
"artifact_sha256": "...", "policy_sha256": "...", "checker": {"name": "...", "version": "..."},
"verdict": "ALLOWED | BLOCKED | NEEDS_CONSENT | Z3_VERIFIED | Z3_COUNTEREXAMPLE | NOT_CHECKABLE",
"reasons": ["..."], "trace_sha256": null, "prev_receipt_sha256": "<hash of the previous receipt, or 64 zeros>",
"pubkey": "<base64 Ed25519>", "signature": "<base64>" }
The signature covers every other field (canonical JSON). A receipt's identity in the chain is the SHA-256 of the whole receipt including its signature. store.Store is an append-only SQLite table; each new receipt must name the current head as its prev_receipt_sha256.
What a receipt proves
- Who checked: the holder of the private key for
pubkeysigned it (and you know who that is only if you pinned the public key,--pubkey; without that, anyone can sign with their own key). - What was checked: the artifact with hash
artifact_sha256, against the policy with hashpolicy_sha256, by the named checker and version. Given the original artifact and policy you can re-hash them and see they match. - What came out: the verdict and the reasons, as the checker reported them.
- That the record wasn't altered: editing any field breaks the signature; in a chain, deleting, editing or reordering a receipt that is followed by another breaks the links.
What it does NOT prove
- Not that the action or code is safe or correct.
ALLOWEDmeans the checker found nothing in its policy that forbids it. The checker can be wrong, the policy can be incomplete, andZ3_VERIFIEDis only as good as the model handed to Z3. - Not that the check was run honestly. A compromised signer, or a signer that skipped the check, still produces a valid signature. Nothing here attests the checker's execution environment.
- Not that the artifact was what was acted on. The receipt binds to a hash; nothing forces the agent or pipeline to use that exact artifact afterwards (check-then-swap).
- Not that nothing is missing. The chain detects removal of any receipt followed by another. Removing the newest receipts leaves a shorter, valid chain. Record
headand count somewhere else (--expect-head,--expect-count) to detect that. A signer can also keep several chains, or never record a check at all. - Not time.
timestamp_utcis the signer's own clock; no trusted timestamping. - Not tamper-proof storage. The SQLite triggers refuse UPDATE/DELETE through SQL, but anyone with file access can bypass them. The signatures and links are what reveal it afterwards.
- Not a compliance certification (SOC 2, ISO 27001, EU AI Act or anything else), and not an audit. It is evidence about a record, not an attestation about a system.
- Not revocation or key rotation. There is no revocation list; verify against the public key you pinned and rotate by publishing a new one.
Keys
No default keys; signing without one raises. A key is a base64 32-byte Ed25519 seed in a file (TENTHLOOK_KEY_FILE or --out) that must be outside any git work tree and not group/world readable, or in TENTHLOOK_SIGNING_KEY for CI secrets. tests/fixtures/conformance.json contains a public test-only seed for cross-language checks; never sign anything real with it.
Canonical JSON
crypto.canonical_json approximates RFC 8785 (JCS): sorted keys (by UTF-16 code unit, as JCS), no whitespace, UTF-8, minimal escaping. It differs by being stricter: floats, NaN/Infinity, integers beyond 2^53-1 and lone surrogates are rejected rather than formatted, because number formatting is where independent implementations stop agreeing. Anything it accepts is canonical under JCS; it does not accept everything JCS does. Put decimals in strings and money in minor units. A TypeScript port (Panel's signedReceipt.ts) is tested against tests/fixtures/conformance.json.
Tests
pip install -e '.[test]' && pytest
Metadata
Release files for tenthlook-core 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tenthlook_core-0.1.0.tar.gz | 18.4 kB | Without provenance | Details for tenthlook_core-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tenthlook_core-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for tenthlook_core-0.1.0-py3-none-any.whl |
Total release size: 32.9 kB
Release files / tenthlook_core-0.1.0.tar.gz
| Download URL | tenthlook_core-0.1.0.tar.gz |
|---|---|
| Size | 18.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac015d3ffdbaee15c28f948e55b6df8fd87e5364393655b2873acd37a29c14bb
|
|
BLAKE2b-256 checksum How to use checksums |
0f35593c68f859a909b160fdf4b973c1ebb1879b4eea95f7298130872adf5433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Release files / tenthlook_core-0.1.0-py3-none-any.whl
| Download URL | tenthlook_core-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b02c8466a6e299f48bdef7a58e615b589841c2be337f9853b05be7cd30caf31a
|
|
BLAKE2b-256 checksum How to use checksums |
c58bc8bc5abe73163b53728f6cbf503fd7977351c9211252f00450c16ba38029
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Security for tenthlook-core 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.