All skills
wshobson avatar

/signed-audit-trails-recipe

@8b957cd
by Seth Hobsonwshobson/agents40k stars
4,281

Step-by-step cookbook for setting up cryptographically signed audit trails on Claude Code tool calls. Use when explaining, evaluating, or demonstrating the pattern before committing to the protect-mcp runtime hooks. Covers Cedar policy, Ed25519 receipts, offline verification, tamper detection, CI/CD integration, and SLSA composition.

Use this Skill: https://skilld.dev/gh/wshobson/agents/signed-audit-trails-recipe

This session only. Nothing lands on disk.

referencesci-cd.md

≈550 tokens on demand. Your agent reads this file only when SKILL.md points to it.

CI/CD workflow for the signed audit trail recipe

The signing key is gitignored, so a CI job needs it from a secret. Create an environment named receipt-signing and limit its deployment branches to the default branch. Store the contents of ./protect-mcp.key as that environment's secret PROTECT_MCP_KEY, and store its publicKey value as the repository variable PROTECT_MCP_PUBLIC_KEY. The hooks sign receipts with the secret key while the agent runs, and the verify step checks them with the public key. Without the key, the receipts are unsigned and the verify step exits 1.

Run this job only on reviewed code, such as pushes to the default branch. Do not run it on pull requests, for two reasons:

  • GitHub does not pass secrets to a workflow run for a pull request from a fork, so the key is empty and the verify step fails.
  • On a pull request from a branch in the same repository, the job would run that branch's scripts/run_agent.py after it writes the key to disk. The branch could change the script to read the key and send it elsewhere.

The environment's branch limit is a second guard: if someone later adds a pull request trigger, jobs for other branches still cannot read the key.

# .github/workflows/verify-receipts.yml
name: Verify Decision Receipts
on:
  push:
    branches: [main]

jobs:
  verify:
    runs-on: ubuntu-latest
    environment: receipt-signing
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20' }
      - name: Install signing key
        env: { KEY: '${{ secrets.PROTECT_MCP_KEY }}' }
        run: umask 077 && printf '%s' "$KEY" > protect-mcp.key
      - name: Run governed agent
        run: python scripts/run_agent.py
      - name: Verify receipts
        env: { PUB: '${{ vars.PROTECT_MCP_PUBLIC_KEY }}' }
        run: npx @veritasacta/verify@0.9.2 --replay-chain receipts/receipts.jsonl --key "$PUB"
      - name: Upload receipts
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: decision-receipts
          path: receipts/

The upload step keeps the receipts after the job ends, including when the verify step fails.

Source: SKILL.md on GitHub

No alerts4d3 checks · Risk SAFE
  • Gen Agent Trust Hub4d

    The skill is a comprehensive guide for implementing cryptographically signed audit trails and policy-based governance for AI agent tool calls. It follows security best practices, including input validation and proper secret management, and utilizes well-known package registries for its tooling.

  • Socket4d

    No alerts

  • Snyk4d

    Risk: LOW · No issues

Signed by skilld at 8b957cd. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 5 days ago

README badge

README badge for wshobson/agents/signed-audit-trails-recipe