Skip to content
Skillpedia
Agents35k · #5715

detecting-supply-chain-attacks-in-ci-cd

Helps your agent find security risks in CI/CD pipelines.

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.

Example of what to ask your AI

“Scan my GitHub Actions workflows for supply chain security risks.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-supply-chain-attacks-in-ci-cd/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-supply-chain-attacks-in-ci-cd/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
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.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill detecting-supply-chain-attacks-in-ci-cd

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/detecting-supply-chain-attacks-in-ci-cd/SKILL.md -o SKILL.md
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:

  1. Unpinned GitHub Actions (using @main instead of SHA)
  2. Script injection via ${{ github.event }} expressions
  3. Overly permissive GITHUB_TOKEN permissions
  4. Third-party actions with write access to repo
  5. 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. '

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#5715
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills