惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
美团技术团队
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
L
LangChain Blog
雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
腾讯CDC
Recent Announcements
Recent Announcements
The Register - Security
The Register - Security
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
博客园 - Franky
博客园 - 司徒正美
The Cloudflare Blog
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
C
Check Point Blog
小众软件
小众软件
V
Visual Studio Blog
V
V2EX
F
Full Disclosure
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
罗磊的独立博客
人人都是产品经理
人人都是产品经理
量子位
Apple Machine Learning Research
Apple Machine Learning Research
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
博客园_首页
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
Recorded Future
Recorded Future
G
Google Developers Blog
Vercel News
Vercel News
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
U
Unit 42
爱范儿
爱范儿
Jina AI
Jina AI

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店 GitHub - EdoardoBambini/Agent-Armor-Iaga: AI agents are getting tool access — shell, file system, databases, APIs, secrets. But **nobody is governing what they actually do with it**. Frameworks like LangChain, CrewAI, AutoGen, and Claude Code give agents the power to execute. Agent Armor gives you the power to control, audit, and approve every single action before it happens. HN Vibes — Week 15, Apr 7–13 2026 GitHub - chojs23/ec: Easy terminal-native 3-way git mergetool vim-like workflow GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - JakOb-dotcom/cloud-sandbox-security-analysis: Technical analysis and Proof of Concept (PoC) regarding environment variable exfiltration in containerized cloud sandboxes via side-channel data leaks. Springboards - Flint Alpha Show HN: A simpler coding agent harness GitHub - audiodude/sudomake-friends GitHub - 256thFission/mini-mythos: OSS clone of Anthropic’s Mythos harness to locate C/C++ memory vulnerabilities Show HN: OpenParallax: OS-level privilege separation for AI agent execution Hacker News Sorted - Chrome 应用商店 Show HN: How to Install Docker on Ubuntu 24.04 LTS: Complete 2026 Guide GitHub - himanshudongre/smriti GitHub - sverrirsig/claude-control: macOS desktop dashboard for monitoring and managing multiple Claude Code sessions GitHub - ory/dockertest: Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work. Chiral - Chrome 应用商店 Show HN: Two Claudes collaborating through shared memory on a $100 mini-PC GitHub - pmichaillat/latex-cv: Minimalist LaTeX template for academic CVs GitHub - oguzbilgic/posse: A web UI for Anthropic Managed Agents. GitHub - sshiraz/depsly: Dependency risk analysis tool for npm packages ABI Add safari/agent-harness — Safari browser automation via safari-mcp by achiya-automation · Pull Request #212 · HKUDS/CLI-Anything GitHub - Halfblood-Prince/trustcheck: Verify PyPI package attestations and improve Python supply-chain security GitHub - oguzbilgic/kern-ai: Agents that do the work and show it. GitHub - bruits/satteri: High-performance Markdown and MDX processing for the JavaScript ecosystem GitHub - tylergibbs1/feedstock: High-performance web crawler and scraper for TypeScript, powered by Bun and Playwright GitHub - Grimm67123/grimmbot: The self-improving sandboxed and open-source AI agent. With persistent memory and scheduling. GitHub - whitevanillaskies/whitebloom: Local whiteboard that blooms. GitHub - hwdsl2/docker-whisper: Docker image for a self-hosted Whisper speech-to-text server with speaker diarization and OpenAI-compatible transcription and translation APIs. Powered by faster-whisper. Supports all Whisper models, NVIDIA GPU (CUDA) acceleration, JSON/SRT/VTT output, SSE streaming, offline mode, and multi-arch (amd64, arm64). GitHub - yisding/reviewwiggum GitHub - MarwanAlsoltany/serrors: Structured errors for Go: sentinel hierarchies, typed data, custom formatting, and slog integration. GitHub - soatok/age-php GitHub - Luthiraa/markitme GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits GitHub - tombedor/excalicharts GitHub - wh1le/excalidraw-edit: Open and edit .excalidraw files from the terminal. Offline, auto-saves to disk. MalExt Sentry - Malicious Extension Scanner - Chrome 应用商店 GitHub - syi0808/asciianimesvg: Generate animated ASCII art SVGs from text. CLI, Rust library, WASM, and web editor. GitHub - zaina-ml/ml_forge: A visual-based graph node editor for training computer vision models. GitHub - anakin87/llm-rl-environments-lil-course: 🌱 A little course on Reinforcement Learning Environments for evaluating and training Language Models GitHub - takaakit/superpowers-uml: Superpowers-UML modifies Superpowers to ensure a software development workflow in which AI agents design through UML modeling. AdriByte Studio - Sviluppo Web e Soluzioni Digitali GitHub - chouligi/angel-copilot: Your personalized Angel Investment Advisor Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 GitHub - agenteractai/lodmem: Level Of Detail Context Management for Agents GitHub - ostefani/subnetlens: A fast, concurrent network scanner with a TUI and plain-text CLI, built in Go. It discovers live hosts on your network, scans their open ports, resolves hostnames, and fingerprints operating systems—delivered. Cyber Pulse: Agentic Intel - Apps on Google Play Whisper API: Self-Hostable Speech to Text Transcription The Agent-Web Protocol Stack: A Research Thesis GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Show HN: Provepy – A Python decorator that proves your code using Lean and LLMs Show HN: Pardonned.com – A searchable database of US Pardons GitHub - patrickdappollonio/dux: Dux is a terminal UI that lets you run multiple AI coding agents side by side, each in its own git worktree, with full companion terminals, macros, commit generation, and a command palette that knows more tricks than you do. kMC Crystal Simulator Show HN: HyperFlow – A self-improving agent framework built on LangGraph GitHub - stef41/vibescore: 🎵 Grade your vibe-coded project. One command, instant letter grade across security, quality, dependencies, and testing. GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. imgur.com GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. GitHub - nowork-studio/toprank: Open-source Claude Code skills for SEO, SEM, Google Ads GitHub - tacomanator/sash: Lightweight macOS menu bar app for reliably cycling through windows of the current application. Appents | Social Media Management for Product-First Teams GitHub - pnhoang/youtube-spam-blocker: Automatically detects and hides spam messages in YouTube Live chat. Set rate limits, keyword filters, and block repeat offenders. GitHub - decisionnode/DecisionNode: CLI + Local MCP - A shared structured memory store across Claude Code, Cursor, Windsurf, Antigravity, and every MCP client. Semantically queryable. GitHub - AvaCodeSolutions/django-email-learning: An open source Django app for creating email-based learning platforms with IMAP integration and React frontend components. The $100K Gap in Kubernetes Security Tooling Function Calling Harness: From 6.75% to 100%
Co-authored-by is a Lie: Cryptographic Provenance for AI Coding Agents | Ryan Duffy - Building with AI
Ryan Duffy · 2026-06-12 · via Hacker News: Show HN

Cryptographic provenance for AI agents: trusted agents sign with per-agent Secure Enclave keys and pass the verifier; an anonymous forger with no key is rejected.

Open almost any commit written by an AI coding agent and you’ll find a line like this at the bottom:

Co-authored-by: Claude <[email protected]>

It looks like attribution. It isn’t. It’s a string in the commit message — and a string is something any process can write. There’s nothing stopping a script, a compromised dependency, or a bored intern from stamping Co-authored-by: Claude onto a commit Claude never touched. The same goes for Co-authored-by: Copilot or any other agent. The line carries the appearance of provenance with none of the substance.

For a while that didn’t matter much. It matters now, because the attribution metadata is starting to be used to make trust decisions — and that turns a cosmetic line into an attack surface.

The line that got a reviewer to merge malicious code

In April 2026, researchers at Manifold Security demonstrated the problem with almost insulting simplicity. Using two git config commands — no exploits, no credentials — they set a commit’s author to a well-known, trusted industry figure. They then routed the commit through a Claude-powered GitHub Actions review workflow. The reviewer recognised the (forged) author as a “recognised industry legend” and auto-approved and merged a malicious payload. The Register covered it; the same structural exposure applies to any agent — Claude Code, Copilot, Gemini CLI, Codex — that’s configured to treat unverified git metadata as a trust signal.

This isn’t a git vulnerability. Commit metadata has always been trivial to fake unless signing is enforced. The bug is treating that metadata as identity. As more of our codebases get written by agents, “which model wrote this?” stops being trivia and becomes a software-supply-chain question.

So over a couple of evenings I built the missing half: a producer-attribution layer where attribution is backed by a hardware key, enforced automatically, and verifiable. This is what landed.

Two trust boundaries, not one

It helps to separate two different questions a platform has to answer about AI-generated content:

  • Input trust — can I trust the data flowing into an LLM? (Prompt injection, poisoned retrieval, untrusted documents.) On my platform this is handled by an earlier decision record on the LLM content-trust boundary.
  • Output trust — can I trust the claim about which agent produced a given artifact? (Commits, docs, ticket transitions.)

The provenance work — my architecture decision record ADR-061 — is the output half. It deliberately doesn’t try to solve input trust; it answers one question with evidence instead of assertion: who produced this? Four needs drove it: real audit (“which agent made this commit?”), future trust-routing (weight retrieval by verified producer), an IP boundary (separating human-authored from AI-assisted work — relevant when you have a day job), and model evaluation (correlating the signing principal with quality outcomes).

The build has three layers, each stronger than the last.

Layer 1 — plain-text attribution, everywhere

The foundation is still plain text, because it’s human-readable and free. The difference from a lone Co-authored-by line is coverage and structure. Every AI-produced commit gets a block of machine-readable trailers injected by a prepare-commit-msg git hook:

AI-Agent: claude-code
AI-Model: claude-sonnet-4-6
AI-Provider: anthropic
AI-Invocation: claude-code-session
AI-Account: [email protected]
Human-Owner: Ryan Duffy
Run-Id: <session-uuid>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>

The Run-Id is the interesting one: it’s the agent session ID, and it also goes into the Jira completion comment for the work. That gives a clean pivot — ticket → run_id → commits — so you can walk from a tracked task to the exact session that produced its code.

The same idea extends past commits. Vault documents get a provenance.chain[] block in their frontmatter. Jira issues created or transitioned by an agent get agent:<id> and model:<canonical> labels, so the tracker becomes filterable by producer (jql: labels = "agent:claude-code"). Even the spaCy-based entity tagger that auto-tags vault docs records its own step in the chain.

But everything in Layer 1 is still forgeable. That’s the point of Layer 2.

Layer 2 — sign it

Plain text can be typed by anyone. A cryptographic signature can only be produced by whoever holds the private key. So every commit is now signed with SSH commit signing, one key per agent principal, configured globally:

[commit]
    gpgsign = true
[gpg]
    format = ssh
[gpg "ssh"]
    defaultKeyCommand = ~/.config/provenance/sign-key-enclave.sh
    allowedSignersFile = ~/.config/provenance/allowed_signers
    program = ~/.config/provenance/ssh-keygen-secretive.sh

defaultKeyCommand resolves the currently active agent’s key at signing time. allowedSignersFile maps each principal — ryan-human, claude-bot, codex-bot, hermes-bot — to its public key, which is what verification checks against. GitLab and GitHub both render “Verified” badges once the keys are registered.

The same machinery signs vault documents. When a document is written, the hook takes the UTF-8 body (everything after the frontmatter), produces a detached signature with the active agent’s key, base64-encodes it, and embeds it in the chain step alongside the attribution. The commit and the doc are now both cryptographically attributable.

There’s one weakness left, though: if those signing keys live in a file on disk, a compromised agent — or anything running as my user — can read the key and sign as me. Software keys are extractable. That undermines most of the value.

Layer 3 — put the keys somewhere they can’t be stolen

The fix is hardware. Each agent’s private key is now generated inside the macOS Secure Enclave using Secretive. The Enclave is a separate security coprocessor; the private key material never leaves it. A compromised agent can ask the Enclave to sign something, but it can never obtain the key itself.

A few design details that mattered:

  • Algorithm: ECDSA P-256. That’s the Enclave’s native curve. ed25519 — my preference everywhere else — isn’t supported in the hardware, so the key type was dictated by the silicon.
  • One key per principal. ryan-human, claude-bot, codex-bot, and a slot for a future hermes-bot, each a distinct Enclave key.
  • Tiered Touch ID. My own human key requires a Touch ID tap on every use. The bot keys are no-auth so they can sign unattended inside commit hooks — the agents shouldn’t need me physically present to sign their own work.
  • Fail-open, always. If Secretive isn’t running, signing falls back to an ed25519 file key (and document stamping proceeds with a null signature rather than blocking). Provenance is a should-have on the write path, never a gate that can wedge a commit.

Two small wrapper scripts glue git to the Enclave. One (sign-key-enclave.sh) hands git the active agent’s public key. The other (ssh-keygen-secretive.sh) intercepts the signing call and points it at Secretive’s socket, while passing every other ssh-keygen operation straight through untouched — so normal SSH push and auth behaviour is unaffected.

Here’s the whole signing path:

flowchart TB
    A[Agent makes a commit
or writes a vault doc] --> B{Which agent?} B -->|CLAUDE_CODE_SESSION_ID| C[claude-bot identity] B -->|CODEX_THREAD_ID| D[codex-bot identity] C --> E[Hook resolves the principal's key] D --> E E --> F[Secure Enclave signs
ECDSA P-256 · non-exportable] F --> G[Signed commit + signed frontmatter] E -.->|Secretive unavailable| H[ed25519 file-key fallback] H --> G classDef gateway fill:#6b21a8,stroke:#a855f7,color:#fff classDef proc fill:#1e3a8a,stroke:#3b82f6,color:#fff classDef ok fill:#14532d,stroke:#22c55e,color:#fff class B gateway class C,D,E,F,H proc class G ok

The verifier is where it pays off

A signature on its own proves the holder of some key signed something. The piece that actually catches forgery is the cross-check. The provenance verify CLI does two things at once: it validates the SSH signature, and it checks that the signing principal matches the AI-Agent the artifact claims to be from. Agreement is a pass; disagreement is a forgery.

Running it against the current HEAD on my platform repo:

$ provenance verify HEAD
[63e32627] PASS — signed by [email protected] == AI-Agent: codex

That commit claims AI-Agent: codex, and it’s signed by codex-bot. Those agree, so it passes. If a commit claimed AI-Agent: claude-code but was signed by some other principal — or wasn’t signed at all — the verifier flags it. That’s the whole game:

flowchart TB
    A[provenance verify] --> B{SSH signature valid?}
    B -->|no| F[REJECT]
    B -->|yes| C{Signing principal ==
AI-Agent trailer?} C -->|mismatch| G[FORGERY] C -->|match| P[PASS · non-repudiable] classDef gateway fill:#6b21a8,stroke:#a855f7,color:#fff classDef proc fill:#1e3a8a,stroke:#3b82f6,color:#fff classDef ok fill:#14532d,stroke:#22c55e,color:#fff classDef bad fill:#7f1d1d,stroke:#ef4444,color:#fff class A proc class B,C gateway class P ok class F,G bad

AI-Agent: claude-code used to be an assertion anyone could type. Now it’s a claim backed by a signature that only the key registered to claude-bot could have produced. “Which model wrote this?” finally has a non-repudiable answer.

Enforced by hooks, not discipline

The most important property of the whole system is that I can’t forget to use it, and neither can an agent. It runs on hooks:

HookFires onDoes
prepare-commit-msgevery commitinjects the attribution trailers, resolves identity
PostToolUse stamperevery doc write (Write / apply_patch)stamps + signs the document
global git configevery signing oproutes signing through the Enclave

Two details earned their keep here.

First, identity resolution is environment-based, not guessed. An earlier version tried to infer the active agent from the working directory and the most recently modified session file — picking the newest *.jsonl under the current directory by mtime. With a single agent that’s fine. With Claude and Codex committing at the same time, “newest file by mtime” is a coin flip, and it cross-stamped their work. The fix was to read the authoritative session ID straight from the environment, and treat the mtime heuristic only as a last-resort fallback when no ID is exported:

def resolve_session(cwd):
    # 1. Authoritative: session id from the environment —
    #    correct even when Claude and Codex run concurrently.
    env_id = os.environ.get("CLAUDE_CODE_SESSION_ID", "").strip()
    if env_id and re.fullmatch(SESSION_ID_RE, env_id):
        return env_id, find_jsonl_by_id(env_id)

    # 2. Legacy fallback ONLY when no id is exported: the old
    #    cwd + newest-by-mtime heuristic — the source of the cross-stamps.
    if os.environ.get("CLAUDECODE") == "1":
        jsonl = find_active_session_jsonl(cwd)   # newest *.jsonl by mtime
        return (extract_session_id(jsonl), jsonl) if jsonl else (None, None)

    # 3. No Claude env markers → not a Claude commit; inject nothing.
    return None, None

(condensed from inject-commit-trailers.py) Codex resolves the same way through its own variables — $AI_AGENT plus its native $CODEX_THREAD_ID as the run ID. No more guessing from the filesystem.

Second, documents are stamped at write time, not in a Stop-sweep at the end of a turn. A sweep was tempting — simpler to bolt on — but it’s wrong for the same concurrency reason: a sweeper scanning a shared staging directory can’t know which agent wrote which file, and a file moved by an unrelated reorg between write and sweep gets stamped with the wrong context. Capturing identity from the hook’s environment at the moment of creation is the only thing that’s correct under concurrency.

And crucially, this isn’t Claude-only. Codex runs the same hooks — its scripts directory symlinks to the shared one, and it registers the same stamper with the same matchers. One enforcement path, every agent.

I also had a fresh-context reviewer agent — one with no knowledge of the implementation — try to break it. It found no forgery holes and no false-passes across roughly thirty test cases (including real cryptographic round-trips), and surfaced two real verifier bugs that got fixed (both in the war stories below). The creator-verifier split — separate context, separate bias — earns its place on anything security-shaped.

What broke along the way

Nothing about this was clean on the first try. The bugs worth passing on:

  • The signing wrapper nearly broke git push. The first version of the program wrapper pointed SSH_AUTH_SOCK at the Secure Enclave socket for every ssh-keygen call. That hijacked SSH authentication too, not just signing — so pushes started failing. The fix: switch the socket only for -Y sign operations, pass everything else through untouched, and only switch if the Enclave socket actually exists. Fail-open or you wedge your own remote access.
  • The verifier only checked the first signature. A document’s provenance.chain[] can hold several steps (generate, then a NER tagging step, …), each with its own signature. The first cut of verify validated step one and stopped — so a tampered later step would pass. Fix: iterate every step and report per-step.
  • The namespace check was too strict. Signatures are namespaced (-n provenance). The verifier compared the namespace string too literally and rejected validly-signed docs over trivial differences. Fix: normalize before comparing.
  • Server-side merge commits aren’t signed — and can’t be. Only commits born locally pass through the signing hook. A merge performed on GitLab or GitHub’s servers has no access to any agent’s Enclave key, so it carries no signature. A “Verified” badge therefore means “key registered and commit authored locally” — worth knowing before you wonder why a merge commit shows unverified.
  • Verification has to accept two key types at once. Migrating from file-based ed25519 keys to Enclave ECDSA P-256 keys meant old commits were signed one way and new commits another. So allowed_signers holds both public keys per principal — verification succeeds regardless of which key produced the signature, and the ed25519 keys stay valid as a fallback.

The thread running through all of these: never let provenance block work. Every failure mode above resolves toward “sign if you can, degrade quietly if you can’t” — a wedged commit or a broken push is a far worse outcome than a missing signature.

What’s next

The honest answer is that this is the macOS story. The Secure Enclave doesn’t exist in my K3s cluster, so in-cluster services will sign through a different path — I’m planning OpenBao’s Transit engine for that, gated on turning on secrets-encryption-at-rest in the cluster first. The file-based ed25519 keys stay as a fallback until Enclave adoption has run long enough to trust fully.

The layer I’m most interested in is the one the social version of this post drew the sharpest replies on: provenance as a quality engine, not just an audit trail. Once every commit and doc is signed by the model that produced it, you can start scoring quality per model — which one ships clean code, which one needs heavier review — and feed that back into how much you trust each agent’s output. Attribution stops being a compliance checkbox and becomes a feedback loop.

But that’s a future post. The foundation is the boring, essential part: plain-text attribution is table stakes, and a forgeable line of text was never going to carry the weight we’re starting to put on it. The cryptographic version — hardware-backed, hook-enforced, and verifiable — is the control everyone keeps calling “missing.” Now it isn’t.


Build it yourself

None of this is specific to my setup. It works on any agent harness that can fire two hooks — a commit hook and a post-write hook — which covers Claude Code, Codex, Hermes, and most others. Pick a key tier: portable SSH keys (software, works everywhere — my first iteration) or Secure Enclave keys (macOS, hardware-bound, non-exportable — strictly more secure, since a portable key can be copied off disk).

The method of procedure:

  1. Define principals — one identity per committer (me-human, claude-bot, codex-bot, …) in a small contract file alongside a model registry.
  2. Generate one signing key per principal.
    • Portable: ssh-keygen -t ed25519 -f ~/.config/provenance/keys/<principal>.
    • Hardware (macOS): create a non-exportable ECDSA P-256 key per principal in Secretive; require Touch ID for the human, no-auth for bots.
  3. Write allowed_signers mapping each principal → its public key (this is what verification checks against).
  4. Configure git for SSH commit signingcommit.gpgsign=true, gpg.format=ssh, allowedSignersFile, and a defaultKeyCommand that returns the active agent’s key. (Hardware tier: add a program wrapper that points SSH_AUTH_SOCK at the Enclave socket for sign operations only.)
  5. Add a prepare-commit-msg hook (via core.hooksPath) that resolves the active agent from its session env var — never from file mtimes — and injects AI-Agent / AI-Model / Run-Id trailers.
  6. Add a post-write hook (your harness’s post-tool / file-write event) that stamps a provenance block into each .md’s frontmatter and signs the body.
  7. Write a verifier that validates the signature and cross-checks the signing principal against the AI-Agent trailer — mismatch = forgery.
  8. Make every hook fail-open (exit 0 on error) so provenance never blocks a commit.

Or hand the spec to your own agent and let it build it. Paste this:

Set up cryptographic provenance for AI-authored git commits and docs on my machine.
Make every hook fail-open — never block a commit.

1. Principals: one identity per committer (me-human, claude-bot, codex-bot).
2. Keys (pick a tier):
   - Portable: an ed25519 SSH key per principal in ~/.config/provenance/keys/.
   - Hardware (macOS): a non-exportable ECDSA P-256 key per principal in Secretive;
     Touch ID for the human, no-auth for bots.
3. ~/.config/provenance/allowed_signers maps each principal to its public key.
4. Git SSH commit signing: commit.gpgsign=true, gpg.format=ssh, allowedSignersFile,
   and a gpg.ssh.defaultKeyCommand returning the ACTIVE agent's public key.
   Hardware tier: add a gpg.ssh.program wrapper that points SSH_AUTH_SOCK at the
   Secure Enclave socket for sign operations only.
5. prepare-commit-msg hook (via core.hooksPath): resolve the active agent from its
   session env var ($CLAUDE_CODE_SESSION_ID / $CODEX_THREAD_ID), NOT file mtimes;
   inject trailers AI-Agent, AI-Model, Run-Id, Co-authored-by.
6. post-write hook (your harness's post-tool/file-write event): for each .md written,
   append a provenance block to frontmatter and sign the body with the active
   principal's key (ssh-keygen -Y sign -n provenance); embed the base64 signature.
7. A `provenance verify` command: validate the signature AND cross-check the signing
   principal against the AI-Agent trailer; a mismatch is a FORGERY.
8. Every hook exits 0 on error.

Then make a test commit and run `provenance verify HEAD` to confirm.

Start on the portable tier — it’s harness-agnostic and gets you verifiable attribution in an afternoon. Move to the Enclave when you want the keys to be unstealable.


References

The vulnerability

The building blocks

Mentioned