本文へスキップ
Skillpedia
エージェント35k · #7878

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

できること

このツールは、コードの自動化システム(CI/CD)に、ソフトウェアのサプライチェーン攻撃に悪用されうるセキュリティ上の欠陥がないかを確認します。安全でないアクション、コードインジェクション、機密情報の漏えいなどを探します。

使う場面

  • ✓サプライチェーン攻撃の疑いを調査するとき。
  • ✓自動化の仕組みのセキュリティを構築・強化するとき。
  • ✓セキュリティ監視ツールが既知のリスクをカバーしているかを確認するとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-supply-chain-attacks-in-ci-cd/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“GitHub Actionsのワークフローを確認して、サプライチェーンのセキュリティリスクをスキャンしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、自動化システムの設定ファイルを分析します。バージョンが固定されていないコードの利用や、悪意のあるコマンドが注入される可能性など、危険なパターンを探します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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]}")
よくある質問

ソフトウェアのサプライチェーン攻撃とは何ですか?

開発で使われるツールやライブラリなど、正規の部品を攻撃者が乗っ取り、それを経由してあなたのソフトウェアやシステムに感染させる攻撃のことです。

「unpinned actions」とはどういう意味ですか?

アクション(小さな自動化スクリプト)を、正確なバージョンを指定せずに使っている状態を指します。知らないうちに悪意のあるコードを含む更新が適用される危険があります。

「依存関係の混乱(dependency confusion)」とは何ですか?

社内パッケージと同じ名前の悪意あるパッケージを、攻撃者が公開リポジトリに登録する手口です。設定が適切でないと、正しいパッケージの代わりに悪意あるものがダウンロードされてしまうことがあります。

詳細

作者による元の説明

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

人気

GitHubのスター
35k
ランキング
#7878
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル