detecting-supply-chain-attacks-in-ci-cd
What it does
This tool checks your code automation systems (CI/CD) for security flaws that could be used to attack your software supply chain. It looks for insecure actions, code injection, and sensitive information leaks.
When to use it
- ✓When investigating a potential supply chain attack.
- ✓When setting up or strengthening the security of your automation processes.
- ✓When verifying if your security monitoring tools cover known risks.
Skill link
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-supply-chain-attacks-in-ci-cd/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Scan my GitHub Actions workflows for supply chain security risks.”
5 new skills a week. 1 minute to read.
How it works
The tool analyzes the configuration files of your automation systems. It looks for risky patterns, such as using non-fixed versions of code or the possibility of injecting malicious commands.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Detecting Supply Chain Attacks in CI/CD
When to Use
- When investigating security incidents that require detecting supply chain attacks in ci cd
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Familiarity with security operations concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Instructions
Scan CI/CD workflow files for supply chain risks by parsing GitHub Actions YAML, checking for unpinned dependencies, script injection vectors, and secrets exposure.
import yaml
from pathlib import Path
for wf in Path(".github/workflows").glob("*.yml"):
with open(wf) as f:
workflow = yaml.safe_load(f)
for job_name, job in workflow.get("jobs", {}).items():
for step in job.get("steps", []):
uses = step.get("uses", "")
if uses and "@" in uses and not uses.split("@")[1].startswith("sha"):
print(f"Unpinned action: {uses} in {wf.name}")
Key supply chain risks:
- Unpinned GitHub Actions (using @main instead of SHA)
- Script injection via ${{ github.event }} expressions
- Overly permissive GITHUB_TOKEN permissions
- Third-party actions with write access to repo
- Dependency confusion via public/private package name collision
Examples
# Check for script injection in run steps
for step in job.get("steps", []):
run_cmd = step.get("run", "")
if "${{" in run_cmd and "github.event" in run_cmd:
print(f"Script injection risk: {run_cmd[:80]}")
FAQ
What is a software supply chain attack?
It's an attack where an attacker compromises a legitimate component (like a tool or library) that you use in your development to then infect your software or system.
What does 'unpinned actions' mean?
It means an action (a small automated script) is being used without specifying an exact version. This can be dangerous because the action could be updated with malicious code without you realizing it.
What is 'dependency confusion'?
It's a technique where an attacker creates a malicious package with the same name as an internal company package but publishes it to a public repository. If not configured carefully, your system might download the malicious version instead of the correct one.
Details
Original description by the author
Scans GitHub Actions workflows and CI/CD pipeline configurations for supply chain attack vectors including unpinned actions, script injection via expressions, dependency confusion, and secrets exposure. Uses PyGithub and YAML parsing for automated audit. Use when hardening CI/CD pipelines or investigating compromised build systems. '
Popularity
- GitHub stars
- 35k
- Ranking position
- #7878
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
35kGives your AI agent ready-made instructions for a specific task, so it does it better and faster.
abusing-shadow-credentials-for-privesc
35kTeaches your AI agent to write clear, well-structured text.
achieving-cmmc-level-2-compliance
35kHelps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
acquiring-disk-image-with-dd-and-dcfldd
35kHelps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.