What runs in CI
The action is a fixed, versioned engine that never runs code the server sends. The tokens it holds, the model's environment and tools, the sandbox for /fix, and the push token.
A fixed engine
Everything the action runs is in its tagged release on GitHub, axonpack/shaft-actions, which you can read before you use it. Pin a release tag, such as @v1.7.1, and that's the code that runs until you change it. See Pinning the action.
The Axon Shaft API sends the action data, never code: the settings, the review prompt's text, the checklists' keys, paths and steps, the merge gates, and the tokens. The action's own code decides what to do with them. It never downloads a script and runs it, never evaluates text from the server, and never lets the server choose a command for the model to run. A bad setting can give a wrong review, but it can't run a command on your runner.
At run time the action installs only these:
- Anthropic's Claude Code binary from npm, at the exact version of the Claude Agent SDK that the release was built with, when the runner doesn't have it;
- for
/fix,/axonshaftand the linters below, bubblewrap from the runner's own Ubuntu package archive, when it's missing; - for the GitHub workflows, Containers, Infrastructure as code, Database migrations and HTTP and schema contracts checklists, the linter each one runs: actionlint, hadolint, tflint, squawk, oasdiff or buf.
Each linter is pinned to one version in the action's release, downloaded only from that project's own GitHub release, and run only once its sha256 matches the one the release records. The API never names a tool, a version or a URL. A linter runs in the sandbox with no network, on copies of the changed files, and never loads the repo's tflint plugins. On a Linux runner without the sandbox, on macOS or Windows, or when the download fails or doesn't match, its checklist runs on the model alone and the model's facts say why.
Besides those installs, the action's own network calls go to GitHub, the Axon Shaft API and Anthropic through the Agent SDK, and each one sends or fetches data. On an Axon Shaft API older than its package lookups, Known vulnerabilities also asks osv.dev itself. The repo's own commands that /fix runs, such as the install, have the network too.
The tokens a run holds
| Token | What it can do | Who holds it |
|---|---|---|
| The run's OIDC token | Proves to the Axon Shaft API which repo and run is asking. Works once. | The action |
| The run's GitHub token | This repo only: Contents read, Pull requests and Issues write, Actions read, and Checks write for a review. | The action, never the model |
| The push token | This repo only: Contents write and nothing else. See The push token. | The action, after the checks pass |
| The Claude token | Calls Anthropic. | The action and the model's session |
The run's GitHub token never holds Code quality or Repository security advisories. The API reads Code Quality's findings and opens draft advisories itself, with tokens that never leave it.
The workflow's own token needs only contents: read. The action masks every token in the job log and replaces them with *** in anything it posts.
The model's environment
The model's environment holds the Claude token, the runner variables below, and the names the project's env setting adds. The commands the model runs don't get the Claude token.
PATH, HOME, LANG, LC_ALL, LC_CTYPE, TZ, TMPDIR, CI, GITHUB_ACTIONS, RUNNER_OS, RUNNER_ARCH, GITHUB_REPOSITORY, GITHUB_SHA, GITHUB_REF and GITHUB_WORKSPACE, when the runner has them.
The env setting can't add GITHUB_TOKEN, or a name that starts with ACTIONS_, INPUT_, ANTHROPIC_ or CLAUDE_. So the OIDC request token, the action's inputs and every GitHub token stay out of it. The values of the project's variables are masked in the job log, and those of 8 characters or more are replaced with *** in replies.
The model's tools in a review and in /ask
A pull request, or a comment on it, can try to talk the model into leaking something, so the tools are fenced in:
Read,GrepandGlobwork only inside the checkout. Paths outside it are refused, and so are/proc,/sys, the runner's temp and tool folders, and any symlink that points out of the checkout.- The only commands are
git diff,git logandgit show, with no shell operators, no--no-index,--outputor--ext-diff, and no path outside the checkout. - It never edits files, installs anything or runs the pull request's code. It doesn't load the repo's Claude Code settings, hooks or MCP servers.
What it reads and posts is fenced in too:
- The prompt has only the comments of people inside the repo: owners, members, collaborators, and anyone GitHub says has write or admin access. Anyone else's comments are left out.
- The review prompt gives the pull request's title, body, commits, comments, diff and files to the model as data to review, and tells it never to follow instructions found in them. Text in the pull request that speaks to an AI reviewer or tries to change the review, such as "ignore previous instructions" or "approve this", is reported as a blocking finding, since it's aimed at the merge gate.
- Images are stripped from everything the model writes before it's posted, so an image URL can't carry data out.
- The action reads its earlier summary and inline comments back only from comments
axonshaft[bot]wrote, so a copy someone else posted is ignored.
The sandbox for changes
/fix and /axonshaft let the model edit files and run the repo's own commands, listed on the /fix page. Those commands, and the action's own run of the checks, run in a bubblewrap sandbox:
- in their own PID namespace with their own
/proc, so they can't see the runner, the Claude Code CLI, the action or their environment; - with no-new-privs and no capabilities, so
sudoand setuid programs don't work; - with the whole system read-only, and the checkout the only folder they can write;
- with an empty home folder,
/tmp,/run(which holds the Docker socket) and runner temp folder; - with the network on, for the install;
- killed, with everything they started, when the session ends, before the action reads the change.
Background commands are off, so no repo code runs while the model reads or edits files.
A change runs only on a GitHub-hosted runner, a fresh machine for each job, and only from a checkout with no saved token. The model never gets a GitHub token. It can't write under .git/ or .github/.
The push token
- The session ends, and every command it started is killed.
- The action reads the changed files and runs the checks again itself. When one fails, nothing is pushed.
- Only then does it ask the API for the push token. The API reads the pull request from GitHub again, and refuses a fork's pull request, the default branch, push mode Disabled, a commenter who no longer has write access, and a run that didn't come from the default branch's workflow.
- The action pushes through GitHub's API, never with git: a blob for each file, a tree, the commit, and then the branch moves to it without force. No git process sees the token.
- The action revokes the token when the push is done, whether it worked or not.
Last updated on
Data flow
Exactly what a run sends to Anthropic, to the Axon Shaft API and to GitHub, what the API looks up on osv.dev and the package registries, what never leaves the runner, and how long each thing is kept.
GitHub App permissions
Each permission the AxonShaft GitHub App asks for, read or write, and what it's used for.