feat(cicd): add offensive-claude-code-action by sushant-me · Pull Request #37 · SnailSploit/Claude-Red · GitHub
Skip to content

feat(cicd): add offensive-claude-code-action - #37

Open
sushant-me wants to merge 1 commit into
SnailSploit:mainfrom
sushant-me:add-claude-code-action-skill
Open

sushant-me wants to merge 1 commit into
SnailSploit:mainfrom
sushant-me:add-claude-code-action-skill

Conversation

@sushant-me

Copy link
Copy Markdown

Adds Skills/cicd/offensive-claude-code-action/SKILL.md — 393 lines, frontmatter name matching the folder, description 209 words.

Why a new skill rather than an edit

offensive-cicd-pipeline covers attacker text reaching a shell (expression injection into run: blocks, workflow_run abuse, GITHUB_TOKEN over-scoping). This covers attacker text reaching a model that then decides whether to produce the shell command. The controls are different — the action's guardrail prompt and its tool allowlist sit between you and execution — and so are the highest-value vectors: the context files (CLAUDE.md, AGENTS.md, .cursorrules) an agent loads by design are a cleaner injection path than smuggling instructions past a filter, and they need no injection framing at all.

Contents

Section Covers
1. Reconnaissance locating agent workflows, the permissions block, tool allowlist, bot identity, co-author trailers
2. Text surfaces issue/PR titles, bodies, comments, reviews, commit messages, branch names, context files, MCP tool descriptions — with who can reach each
3. Prompt injection establishing the guardrail by asking the agent to restate it; per-framing payload shapes; an execution-marker technique for reproducible proof
4. Tool allowlist what each allowlist entry actually grants, and where the secrets are
5. pull_request_target the dangerous shape with an untrusted checkout, and a four-step test order
6. Exfiltration agent reply, commits, branch names, PR bodies, logs, artifacts, HTTP, DNS, with visibility for each
7. Persistence workflow rewrites, CODEOWNERS, branch protection, release automation
8. OIDC id-token: write against a loosely scoped cloud trust policy
9. MCP tool poisoning, rug pulls, result injection, config read from the PR head
10. Availability cost amplification, framed as financial impact
Defender view what operators leave behind, plus a ten-point hardening checklist to verify rather than assume
Cheatsheet copy-paste recon and probe sequence, and a reporting checklist

Every code block is language-tagged, there are no emoji, and the checklist framing ("verify, not assume") is deliberate — most of these controls are commonly claimed and rarely checked.

Deliberately not included

I did not write specific AML.T#### ATLAS identifiers. I am not confident enough in the exact numbers to put them in a skill others will quote, and a wrong technique ID is worse than an omitted one. The skill points at the ATLAS matrix and says so explicitly. OWASP entries are given as LLM01:2025 / LLM06:2025 with a note that the IDs moved between the 2023 and 2025 editions, since reports citing the older numbering will otherwise disagree.

One thing to look at: a stale manifest on main

python3 tools/build_manifest.py (the documented step) registers offensive-netexec, which exists at Skills/active-directory/offensive-netexec/ on main but was absent from claude-skills.json — its skill_count was 78, now 80 with my skill. It is also not listed in the README's active-directory table.

So the manifest change in this PR is two skills, not one:

  • offensive-claude-code-action (this PR)
  • offensive-netexec (pre-existing omission, picked up by the generator)

I kept the generated output rather than hand-editing it to exclude offensive-netexec, because hand-editing a generated file means the next person to run the generator sees an unexplained diff. Happy to split the offensive-netexec registration into its own PR, or to add its missing README row, if you would rather keep this one to a single concern — say which and I will redo it.

Verification

  • Frontmatter parses; name matches the folder (offensive-claude-code-action); description is 209 words, within the stated 50–500.
  • 393 lines, inside the stated 200–800.
  • Body follows the documented structure: framing paragraph, Quick Workflow, numbered technique sections, Detection / Defender View, Engagement Cheatsheet, Key References.
  • README category count updated 2 → 3 and the skill added to the CI/CD table.
  • CHANGELOG updated under [Unreleased].
  • tools/build_manifest.py run; claude-skills.json regenerated.

CONTRIBUTING.md mentions ./tools/check-skill.sh, but that script is not in tools/ on main (only build_manifest.py), so I could not run it. If it lives somewhere else, point me at it and I will run it.

Adds Skills/cicd/offensive-claude-code-action/SKILL.md — methodology for
assessing AI coding agents wired into CI (anthropics/claude-code-action and the
Codex/Gemini/Copilot equivalents).

The existing offensive-cicd-pipeline skill covers attacker text reaching a
shell. This covers attacker text reaching a model that then decides whether to
produce the shell command, which is a different surface with different controls:
the action's guardrail prompt and the tool allowlist sit in the way, and the
highest-value injection vectors are context files (CLAUDE.md, AGENTS.md) that
the agent loads by design rather than text smuggled past a filter.

Contents: recon of agent workflows and their permissions block; the
attacker-controlled text surfaces and who can reach each; per-framing injection
shapes and an execution-marker technique for reproducible proof; tool-allowlist
abuse for Bash/Write/WebFetch/Read; pull_request_target with an untrusted
checkout; exfiltration through the agent's own reply, commits and PRs;
repository persistence by rewriting .github/workflows; OIDC trust-policy abuse;
MCP tool poisoning; denial-of-wallet; a defender view; and a ten-point hardening
checklist to verify rather than assume.

README updated (CI/CD count 2 -> 3, skill table) and CHANGELOG under
[Unreleased]. Note the manifest regeneration also registers
offensive-netexec, which exists in the tree on main but was absent from both
claude-skills.json and the README — see the PR description.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant