Check a GitHub Actions workflow that runs an AI agent
Paste a workflow that runs Claude Code, Codex, Gemini CLI or Copilot, and see what text from outside reaches the agent, what it may run without asking, and what its token and secrets would let a steered agent do. Then copy the file back with the fixes you pick. Nothing leaves this page.
1Paste your workflow
Everything runs in this page and nothing you paste is sent anywhere. There is no share link on purpose: a workflow names your secrets and can hold a key someone pasted into it.
2What it lets through
- 5 risks
- 4 checks
- 2 tips
RiskOutside text runs as shell code
triage, step 2 · runGitHub pastes github.event.issue.title into the script before the shell runs it, so a title or comment with $(…) or a quote in it runs as a command. Pass it through env: and read it as a variable.
RiskAnyone can start the agent
triage: Triage with Claude · allowed_non_write_usersallowed_non_write_users: "*" lets every GitHub user start this agent, and on a public repository that includes strangers writing the prompt. Name the accounts you trust instead.
RiskAny shell command
triage: Triage with Claude · --allowedTools BashThis allows every shell command without a rule or a review deciding it, so text that steers the agent can run anything the job's token and secrets allow. Name the commands instead, such as Bash(gh pr comment:*).
RiskPermission checks off
triage: Triage with Claude · claude_argsclaude_args turns permission checks off, so every tool call runs without a rule or a review deciding it. Remove the flag and allow the commands the job needs with --allowedTools.
RiskOutside text in the prompt
triage: Triage with Claudegithub.event.issue.title, github.event.issue.body goes into the agent's input word for word, so whoever writes it is writing part of the instructions. Point the agent at the issue or pull request number and let it read the text as data, with tools limited to what the job needs.
CheckThe agent reads text other people write
on: issues, issue_commentissues, issue_comment hand the agent titles, bodies, comments or branch names that anyone can write, and hidden instructions in them are read like the task. claude-code-action only lets people with write access start it, but it still reads the issue or comment they point it at; include_comments_by_actor limits whose comments it sees. Keep its tools and token to what the job needs.
CheckThe token's scopes are left to the default
triage · permissionsWith no permissions: block the token gets the repository's default, which is read and write for repositories and organisations made before February 2023 that kept the old setting. Name the scopes the agent needs, starting from contents: read.
CheckWrites anywhere on the runner
triage: Triage with Claude · --allowedTools WriteWrite with nothing after it lets Claude write files outside the workspace too, which the action warns against in workflows that handle outside contributions.
CheckSecrets the agent can read
triage: Triage with Claude · envNPM_TOKEN sit in the environment the agent's commands run in, so any command it runs can read them. Give them to the step that needs them, after the agent, not to the job.
TipNo time limit
triage · timeout-minutesWith no timeout-minutes the job may run for 6 hours, and an agent stuck in a loop spends model credit and runner minutes the whole time.
TipAction not pinned to a commit
triage: Triage with Claude · anthropics/claude-code-action@v1A tag such as @v1 can be moved to new code without the workflow changing. Pin the action to a full commit SHA and let Dependabot propose updates.
The workflow, fixed
workflow.yml
Comments and the order of keys stay as you wrote them. Run the workflow once on a branch before you rely on it.
What the checker looks for
Each action’s inputs were read from its action.yml on 29 November 2026, with claude-code-action’s security notes, codex-action and run-gemini-cli, which starts Gemini CLI with --yolo. It sees the file you paste, not settings files it points to, reusable workflows or your repository’s default token setting, and no static check can tell whether a comment will steer an agent. A clean result is not proof.
| Option | For example | Why it matters |
|---|---|---|
| Outside text in the prompt | For example${{ github.event.issue.title }} or a comment body in a prompt or a run: script | Why it mattersWhoever writes the title writes part of the agent's instructions, and in a script a quote or $(…) runs as a command. |
| Who can start it | For exampleallowed_non_write_users: "*", allowed_bots: "*", allow-users: "*" | Why it mattersAnyone on GitHub, or any GitHub App, can start the agent with a prompt they wrote. |
| Safety defaults turned off | For example--dangerously-skip-permissions, safety-strategy: unsafe, sandbox: danger-full-access, run-gemini-cli without tools.core, restrict_untrusted_prs: false | Why it mattersThe checks each agent ships with are off, so nothing decides a tool call before it runs. |
| Tools that run anything | For exampleBash, Bash(git:*), Bash(curl:*), Write, copilot-allow-tools: "shell" | Why it mattersAny command, commands that start other programs, a way to send data out, and writes outside the workspace. |
| Pull request code with secrets | For examplepull_request_target or workflow_run with a checkout of the pull request's head | Why it mattersThe fork's author controls the files and scripts in a job that has the base repository's secrets. |
| The token and secrets | For exampleNo permissions: block, write-all, write scopes on events outsiders start, secrets in the job's env | Why it mattersWhat a steered agent could do with its token, and which secrets its commands can read. |
| Limits | For exampleNo timeout-minutes, an action on @v1 instead of a commit | Why it mattersAn agent in a loop runs for 6 hours, and a moved tag runs new code without the file changing. |
A person for the steps that matter
In CI there is nobody to answer a permission prompt. With VariantGate the agent asks before it pushes, comments or deploys, the job waits, and you answer from email, Slack or your phone. Free for one person and 100 requests a month, with no card.
Questions
Does the checker send my workflow anywhere?
No. The workflow is read in this page and nothing you paste is sent anywhere, and there is no share link. A workflow names your secrets and sometimes holds a key someone pasted into it; the checker says where a key is and never shows it elsewhere.
Which agents does it read?
anthropics/claude-code-action and claude-code-base-action, openai/codex-action, google-github-actions/run-gemini-cli, actions/ai-inference (Copilot CLI), and run: steps that start claude -p, codex exec, gemini -p, copilot -p, cursor-agent, opencode run or aider. Shell steps are checked in every workflow, with or without an agent.
Why is an issue number fine in a prompt but not its title?
Anyone can open an issue or write a comment, and GitHub pastes the title or body into the prompt word for word before the agent starts, so whoever writes it is writing part of the agent's instructions. An issue number is a number nobody can fill with words. Give the agent the number and let it read the issue with a tool, treating the text as data, with its tools and token limited to what the job needs.
Does a clean result mean the workflow is safe?
No. The checker reads the common ways these workflows are written and knows the inputs of the actions above as they were on 29 November 2026. It does not open settings files the workflow points to, reusable workflows or the repository's own default token setting, and no static check can tell whether text the agent reads will steer it. Keep tools and token scopes to the minimum either way.
How is this different from zizmor or agentic-actions-auditor?
zizmor is a command line auditor for GitHub Actions and covers far more general workflow problems than this page; Trail of Bits' agentic-actions-auditor is a Claude Code skill that reviews agent workflows. Both are installed and run on your machine. This checker runs in the page with nothing to install, looks only at workflows that run AI agents, and gives back the file with fixes you pick. Using zizmor as well is a good idea.
Where does an approval step help?
In a workflow there is no one to answer a permission prompt, so the agent either may do a thing or may not. VariantGate adds the third answer: the agent asks before it pushes, comments, publishes or deploys, and a person approves from email, Slack, Teams or a phone while the job waits. Pending, denied and expired all mean the step does not run.