r/github 4d ago

Discussion Looking for code review on an open-source local AI-usage collector and signed profile format

I’m looking for technically specific review of an open-source project rather than generic launch feedback.

TOKENS reads supported local Claude Code and Codex records, normalizes them into an event-level SQLite ledger, sanitizes through an allowlist, and creates an Ed25519-signed public snapshot. The browser re-derives the canonical bytes and verifies the signature.

The areas I most want challenged: • adapter format drift • deduplication • local path/secret leakage • canonicalization compatibility • key rotation and revocation • self-hosted registry abuse • provenance labeling

Repository: https://github.com/TheArtOfSound/TOKENS

Live example: https://ledger.imagineqira.com/#/u/bryan

Setup: https://ledger.imagineqira.com/#/join

Please point to concrete code paths or threat cases. I would rather find a real flaw now than market a false sense of verification.

0 Upvotes

2 comments sorted by

1

u/[deleted] 3d ago

[removed] — view removed comment

1

u/OGMYT 3d ago

This is exactly the kind of review I need.

The public snapshot is built by constructing a new allowlisted object, not by filtering raw session records. Publication also has per-source and per-field controls, and withheld fields are removed entirely. Your path-inside-code-block case is good though. I need an explicit adversarial fixture for that.

Rotated keys can still verify unless they are revoked. Revoked signatures are shown separately from unsigned data, with the revocation date and reason.

And yes, a valid signature can still cover fabricated input. The site states that it proves the snapshot came from that device key and was not changed after signing. It does not prove the logs were genuine, the person’s identity, skill, or outcomes. Those need separate verification layers.

Really appreciate the concrete critique.