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

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
G
GRAHAM CLULEY
Spread Privacy
Spread Privacy
Last Week in AI
Last Week in AI
腾讯CDC
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Security Archives - TechRepublic
Security Archives - TechRepublic
博客园 - 司徒正美
爱范儿
爱范儿
雷峰网
雷峰网
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
博客园 - 聂微东
T
Tor Project blog
I
Intezer
大猫的无限游戏
大猫的无限游戏
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Schneier on Security
Schneier on Security
T
Tenable Blog
Google Online Security Blog
Google Online Security Blog
S
Schneier on Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Help Net Security
Help Net Security
O
OpenAI News
博客园 - 【当耐特】
博客园 - Franky
AWS News Blog
AWS News Blog
罗磊的独立博客
J
Java Code Geeks
Know Your Adversary
Know Your Adversary
A
Arctic Wolf
小众软件
小众软件
量子位
SecWiki News
SecWiki News
S
Security Affairs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
N
News and Events Feed by Topic
Apple Machine Learning Research
Apple Machine Learning Research
H
Heimdal Security Blog
Google DeepMind News
Google DeepMind News
IT之家
IT之家

Show HN

GitHub - steveking-gh/firmion: Firmion is DSL and engine for firmware image generation. GitHub - villagesql/villagesql-skills: Agent skills for VillageSQL - gemini-cli-extension; claude-code-plugin GitHub - flightdeckhq/flightdeck: Observability and control plane for AI agents. CSP Radar GitHub - Light-Heart-Labs/DreamServer: Turn your PC, Mac, or Linux box into an AI server. LLM inference, chat UI, voice, agents, workflows, RAG, and image generation. GitHub - Diplomat-ai/diplomat-agent-ts: What can your TypeScript AI agent do to the real world? Scan your code. See which tool calls have zero checks Code Block Selector - Visual Studio Marketplace Prometheus dependency graph — interactive showcase | Riftmap Show HN: I made a vi-like modal keyboard plugin for Figma GitHub - run-llama/liteparse: A fast, helpful, and open-source document parser GitHub - dalemyers/Roar: A macOS CLI tool for notifications GitHub - district-solutions/open-agent-tools-coder: Enables small-to-large self-hosted ai models to use local source code when running tool-calling agentic workloads. We actively data mine 20,900+ (2+ TB) popular github repos using large and small ai models to create reuseable: json, markdown and parquet files for local-first tool-calling models. GitHub - progapandist/stripeek: A local TUI proxy for real-time Stripe API debugging, built for navigating complex payloads fast. GitHub - sir1st/hermes-desktop: All-in-one cross-platform desktop app for Hermes Agent — bundles Python + hermes-agent + hermes-web-ui GitHub - astefanutti/shaderbang: Shebang for Shaders Show HN: Generate Claude Code Workflows using Spec Driven Development approach GitHub - nixys/nxs-universal-chart: The Helm chart you can use to install any of your applications into Kubernetes/OpenShift Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code. GitHub - tamerh/enju: Coordinating Humans, AI Agents, and Compute as Peers on a Shared Workflow Graph Show HN: Continuity-auth – Respect-weighted rate limits for the open web GitHub - luml-ai/luml: AI lifecycle platform where engineers and agents track experiments, train models, and ship to production. GitHub - mrdanielcasper/CoreTex: A UNIX-inspired, biomimetic, flat-file AI harness and knowledge engine. GitHub - clemg/pierre-github: Pierre's diffs.com and trees.software for Github GitHub - lyriks-io/unspaghettit: Behavior-driven AI development without prompt spaghetti. GitHub - sofumel/claude-handoff-revive: Resume Claude Code work after rate/usage/context limits without replaying the prior transcript. Auto-saves at 90%/95% usage. Plugin-installable, 10 languages. GitHub - dotexorg/saferpc: Typed, end-to-end encrypted RPC over any bidirectional channel. GitHub - BeeZeeAgent/beezee: Agent harness orchestration Legato Next.js Boilerplate for Internal Tools · CoreUI GitHub - clark-labs-inc/clark-hash: Clark Hash, 32x smaller searchable sketches for embeddings GitHub - ZeroPointRepo/youtube-mcp: The fastest YouTube transcript + YouTube search MCP for AI agents. Try for free. Typing Mastery — climb toward 100+ WPM, deliberately GitHub - Andebugulin/Awareen GitHub - fayzan123/claude-workflow-composer: Visual desktop app for composing multi-agent coding workflows. Drag agents, attach skills and MCPs, wire handoffs, export to .claude/ GitHub - harshaneel/humanize: Best static AI text humanizer. Two research-grounded skills that work in any LLM (Claude, ChatGPT, Gemini, Codex): humanize beats perplexity-based detectors, ai-check produces forensic scoring with evidence-quoted flags. Nine levers, 50+ peer-reviewed sources, 2024-2026 detection literature. GitHub - StackOneHQ/stack-nudge GitHub - nodes-app/swift-markdown-engine: A native AppKit Markdown editor for macOS, built on TextKit 2 and bridged to SwiftUI. We hardened an LLM agent. Each defense we added made it more exploitable. GitHub - alkait/WhatsKept: Agent-queryable WhatsApp history from an iOS backup — a single Go binary. GitHub - octelium/cordium: Open-source, general-purpose sandbox platform for devs and AI agents that provides identity-based secure access to infrastructure without credentials. WAR.GOV/UFO Microfilm5 GitHub - scosman/videowright: Build animated explainer videos with your coding agent GitHub - dipankar/dscode: The code editor you can take apart. GitHub - zoharbabin/web-researcher-mcp: MCP server (Go) for AI assistants: web search, content extraction, academic/patent/news research. Multi-provider routing, 4-tier scraping, search lenses. Works with Claude, Cursor, and any MCP client. GitHub - ruvnet/RuView: π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video. GitHub - scanaislop/aislop: Catch the slop AI coding agents leave in your code: narrative comments, swallowed exceptions, as-any casts, dead code, oversized functions. 50+ rules across 7 languages (TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP). Sub-second, deterministic, no LLM at runtime. MIT-licensed. GitHub - kouhxp/cheap-im: CPU-only voice agent approximating Thinking Machines' Interaction Models demo GitHub - unprovable/OrchidMantis: Orchid Mantis — standalone framework for Zero-Knowledge Proofs of eXploit (ZKPoX). GitHub - MarcellM01/TinySearch: Shrink the web for your local LLMs! GitHub - TangibleResearch/Halgorithem: A Algo designed to detect AI Hallucitions GitHub - DO-SAY-GO/freelang: I love freelang GitHub - CarpseDeam/Aura-IDE: An AI coding harness that shaped itself - Planner/Worker agents, repo awareness, surgical edits, validation, recovery, and safe diff approvals. GitHub - chojs23/concord: A feature-rich TUI client for Discord GitHub - tommyjepsen/awesome-ux-skills: UX & AI Product designs skills you can use today in Claude Code GitHub - aerf-spec/aerf: Agent Evidence Receipt Format (AERF) — an open specification for tamper-evident, independently verifiable records of AI agent actions. GitHub - kklimuk/docx-cli: CLI for AI agents (Claude, Codex) to read, edit, and comment on .docx files with full format fidelity. GitHub - Jwrede/tokentoll: Catch LLM cost changes in code review. Infracost for LLM spend. GitHub - samchon/ttsc: A `typescript-go` toolchain for compiler-powered plugins and type-safe execution + 500x faster lint integrated into compiler GitHub - Higangssh/homebutler: 🏠 Manage your homelab from chat. Single binary, zero dependencies. GitHub - olalie/tapmap: See where your computer connects and what stands out on a live world map. GitHub - Diplomat-ai/diplomat-agent: What can your AI agent do to the real world? Scan your code. See which tool calls have zero checks GitHub - Bajusz15/beacon: Open-source agent for secure remote access, monitoring, and deploys across home-lab and self-hosted machines like Raspberry Pi, N100, or any Linux server. Open web based TTY or tunnel Home Assistant and other local services securely without opening ports. BigTech AI News - Chrome 应用商店 GitHub - vinhnx/VTCode: VT Code is an open-source coding agent with LLM-native code understanding and robust shell safety. Supports multiple LLM providers with automatic failover and efficient context management. GitHub - michaelaz774/decision-engine: A decision operating system for startup founders, powered by Claude Code. Synthesizes wisdom from 25+ legendary founders and investors into interactive AI-driven decision frameworks. GitHub - Chrilleweb/dotenv-diff: Validate environment variable usage in your codebase GitHub - Lumen-Labs/brainapi2: BrainAPI is a knowledge graph–powered AI memory layer that transforms unstructured data into structured knowledge, enabling intelligent search, recommendations, and contextual memory for AI agents and applications. GitHub - familiar-software/familiar: Let AI watch you work. Familiar lets your AI update its memory, skills, and knowledge by watching your screen. GitHub - skorotkiewicz/rudo: A small, elegant dock for Wayland GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. make sidebar/address bar rounded corner toggleable
Co-authored-by is a Lie: Cryptographic Provenance for AI Coding Agents | Ryan Duffy - Building with AI
Ryan Duffy · 2026-06-12 · via 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