SKY-D351 · CI/CD pipelines
AI agent action's write-access check switched off
claude-code-action and codex-action refuse to run when the account that started the workflow has no write access to the repository. A "*" in allowed_non_write_users, allowed_bots or allow-users switches that check off, so anyone who can open an issue or comment can start the agent.
- Languages
- GitHub Actions workflows
- Quality gate
- counted toward the gate limits; a CRITICAL finding fails the gate on its own (full and diff scans).
skylos cicd risk-reviewalso marks a new HIGH or CRITICAL finding of this rule as "CI weakened", which needs a human approval. - Finding type
- review
- Catalog name
- GitHub Actions AI agent write-access check widened
Why it matters
The wildcard is often added so a triage bot can answer new issues. The issue author then controls text the agent reads, and a crafted issue can make the agent use its tools, its API key and the job's write token for the attacker.
What Skylos flags
name: Issue triageon: issues: types: [opened]permissions: contents: read issues: writejobs: triage: runs-on: ubuntu-latest steps: - uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} github_token: ${{ secrets.GITHUB_TOKEN }} allowed_non_write_users: "*" prompt: "Add area and priority labels to #${{ github.event.issue.number }}." claude_args: >- --allowedTools "Bash(gh issue view:*),Bash(gh issue edit:*)"What Skylos leaves alone
name: Issue triageon: issues: types: [opened]permissions: contents: read issues: writejobs: triage: runs-on: ubuntu-latest steps: - uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} allowed_non_write_users: "*" prompt: "Add area and priority labels to #${{ github.event.issue.number }}." claude_args: >- --allowedTools "Bash(gh issue view:*),Bash(gh issue edit:*)"Why Skylos leaves it alone
claude-code-action honours allowed_non_write_users only when a github_token is passed to it. Without one, as here, the action still refuses accounts without write access, so the wildcard has no effect.
How Skylos decides
- Reads workflow files under
.github/workflowsand finds steps that useanthropics/claude-code-actionoropenai/codex-action, the agent actions with a built-in write-access check. - Looks for an exact
"*":allowed_non_write_users(claude-code-action v1 and later, and only together withgithub_token),allowed_bots(any GitHub App), or codex-action'sallow-users. A list of named accounts is not reported. - For each trigger an outsider can cause (as for SKY-D350) that the action would normally check, evaluates the job's
if:, itsneeds:jobs and earlier steps. If none of them checks the account either, the wildcard is what lets the outsider in. - Needs the same two things as SKY-D350: a way for the outsider's text to reach the agent (the prompt, an earlier step, a tool such as
gh issue viewwith a prompt about the issue, or a checkout of the pull request), and something to steal (a secret, a write permission,id-token: write, or nopermissions:at all). An agent with no tools is not reported. - Reports once per agent step, on the line of the first widened setting. The inline marker must be a YAML comment.
How to fix it
Name the accounts that may start the agent instead of using "*", or remove the setting. The action then refuses everyone else. Any wildcard combined with an API key secret and tools stays reported, graded by what the tools can do.
name: Issue triageon: issues: types: [opened]permissions: contents: read issues: writejobs: triage: runs-on: ubuntu-latest steps: - uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} github_token: ${{ secrets.GITHUB_TOKEN }}Removed: allowed_non_write_users: "*"Added: allowed_non_write_users: "docs-bot,release-helper" prompt: "Add area and priority labels to #${{ github.event.issue.number }}." claude_args: >- --allowedTools "Bash(gh issue view:*),Bash(gh issue edit:*)"When it can be wrong
- A job protected by an environment with required reviewers is still reported (at most HIGH): Skylos cannot see the reviewers.
allowed_bots: "*"is reported even when only your own GitHub Apps comment in practice: any installed App can trigger the job.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
Put a YAML comment with exactly one rule on the reported line or on its own line directly above it.
YAML # skylos: ignore[SKY-D351] label-only job, no secrets but the API keyallowed_non_write_users: "*"[tool.skylos] ignore = ["SKY-D351"]turns the rule off for the whole project. A baseline also works, but it records the absolute file path and the line.