Fiduciary
Guide

Run an AI agent in GitHub Actions without handing it your secrets

An agent that answers issues or reviews pull requests reads text anyone can write, with tools that can push, comment and read the job's secrets. A line in its prompt is not a control. fiduciary ci puts its MCP servers behind protected proxies for the length of the job.

What goes wrong

Public write-ups since late 2025 show the pattern working across several coding agents in GitHub Actions: text in an issue or a comment tells the agent what to do, and the agent prints secrets into a comment or edits a workflow file. The text came from someone outside the project, and the agent could not tell.

Add it to a workflow

- uses: crimsondevil0929/fiduciary@v1.22.1
  id: fiduciary
  with:
    step: start
    mcp-config: .github/agent-mcp.json
    secrets: GITHUB_TOKEN
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: anthropics/claude-code-action@v1
  with:
    claude_args: >-
      --mcp-config ${{ steps.fiduciary.outputs.mcp-config }}
      --disallowedTools Bash

- uses: crimsondevil0929/fiduciary@v1.22.1
  if: always()
  with:
    step: finish

The start step reads the secrets from its own environment and hands them to the proxy. The agent's step is given only the MCP file the proxy wrote: loopback addresses and a token that reaches the proxy and nothing else. The finish step writes the summary and uploads the bundles.

What it does for each call

  • Untrusted from the start. When the event holds text from anyone the repository does not trust (issue and pull request text, comments, reviews, branch names, or anything from a fork), every session is labeled untrusted before the agent reads a word. Owners, members and collaborators are trusted by default.
  • Secrets kept. The job's secrets live in the proxy's memory alone, and a call that carries one is refused, whole or encoded.
  • Workflow files refused. A call whose arguments point at a path under .github/workflows or .github/actions is refused before it runs.
  • Refuse and explain. Nobody approves in CI, so a call the mandate would hold is not made, and the job summary says which check stopped which call.
  • Proof. Each server's bundle is exported with its pinned keys and verified before it is uploaded.

What it does not do

  • It governs the tools behind the proxy. An agent with a shell reaches the network and the runner's files directly, so give it none: in Claude Code, --disallowedTools Bash. Tools the agent's action brings itself, such as its own comment tool, do not go through the proxy either.
  • A local MCP server keeps its token in its own environment, where any process running as the same user can read it. A remote server's token never leaves the proxy.
  • Approvals are not asked for in CI. A held call waits, and the job ends without it.

Step by step

  1. List the agent's MCP servers in a file. .github/agent-mcp.json
  2. Start the proxy before the agent. uses: crimsondevil0929/fiduciary (step: start)
  3. Give the agent the proxy's MCP file. --mcp-config <the start step's output>
  4. Finish after it, always. uses: crimsondevil0929/fiduciary (step: finish)

Questions

Which agents does it work with?

Any agent that reads an MCP file over HTTP: Claude Code and its GitHub Action, Codex and others. The proxy is the same for each.

Can it post the summary on the pull request?

Yes, with comment: refusals or always on the finish step, and permission to write issues or pull requests.

Does the job fail when a call is refused?

Not by default. Set fail-on: refused, or held, on the finish step.

Read the incident replays