본문으로 건너뛰기
Skillpedia
에이전트40k · #7045

agent-supply-chain

하는 일

이 도구는 AI 플러그인이나 도구의 파일이 허가 없이 변경되거나 수정되었는지 확인합니다. 파일과 디지털 서명(해시)의 ‘기록’(매니페스트)을 만든 다음, 그 기록을 현재 파일과 비교해 모든 것이 올바른지 확인합니다.

사용하는 경우

  • ✓새 플러그인이나 도구를 설치할 때.
  • ✓중요한 프로젝트에서 플러그인을 사용하기 전에.
  • ✓파일이 부적절하게 바뀌었다고 의심될 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/agent-supply-chain/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/agent-supply-chain/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“‘search-tool’ 플러그인의 무결성을 검증해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

먼저 이 도구는 모든 파일의 디지털 서명이 담긴 기록 파일을 만듭니다. 그다음 현재 파일의 서명을 기록 속 서명과 비교합니다. 차이가 있거나 누락된 것이 있으면 파일이 수정되었거나 무언가 빠졌다고 경고합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Agent Supply Chain Integrity

Generate and verify integrity manifests for AI agent plugins and tools. Detect tampering, enforce version pinning, and establish supply chain provenance.

Overview

Agent plugins and MCP servers have the same supply chain risks as npm packages or container images — except the ecosystem has no equivalent of npm provenance, Sigstore, or SLSA. This skill fills that gap.

Plugin Directory → Hash All Files (SHA-256) → Generate INTEGRITY.json
                                                    ↓
Later: Plugin Directory → Re-Hash Files → Compare Against INTEGRITY.json
                                                    ↓
                                          Match? VERIFIED : TAMPERED

When to Use

  • Before promoting a plugin from development to production
  • During code review of plugin PRs
  • As a CI step to verify no files were modified after review
  • When auditing third-party agent tools or MCP servers
  • Building a plugin marketplace with integrity requirements

Pattern 1: Generate Integrity Manifest

Create a deterministic INTEGRITY.json with SHA-256 hashes of all plugin files.

import hashlib
import json
from datetime import datetime, timezone
from pathlib import Path

EXCLUDE_DIRS = {".git", "__pycache__", "node_modules", ".venv", ".pytest_cache"}
EXCLUDE_FILES = {".DS_Store", "Thumbs.db", "INTEGRITY.json"}

def hash_file(path: Path) -> str:
    """Compute SHA-256 hex digest of a file."""
    h = hashlib.sha256()
    with open(path, "rb") as f:
        for chunk in iter(lambda: f.read(8192), b""):
            h.update(chunk)
    return h.hexdigest()

def generate_manifest(plugin_dir: str) -> dict:
    """Generate an integrity manifest for a plugin directory."""
    root = Path(plugin_dir)
    files = {}

    for path in sorted(root.rglob("*")):
        if not path.is_file():
            continue
        if path.name in EXCLUDE_FILES:
            continue
        if any(part in EXCLUDE_DIRS for part in path.relative_to(root).parts):
            continue
        rel = path.relative_to(root).as_posix()
        files[rel] = hash_file(path)

    # Chain hash: SHA-256 of all file hashes concatenated in sorted order
    chain = hashlib.sha256()
    for key in sorted(files.keys()):
        chain.update(files[key].encode("ascii"))

    manifest = {
        "plugin_name": root.name,
        "generated_at": datetime.now(timezone.utc).isoformat(),
        "algorithm": "sha256",
        "file_count": len(files),
        "files": files,
        "manifest_hash": chain.hexdigest(),
    }
    return manifest

# Generate and save
manifest = generate_manifest("my-plugin/")
Path("my-plugin/INTEGRITY.json").write_text(
    json.dumps(manifest, indent=2) + "\n"
)
print(f"Generated manifest: {manifest['file_count']} files, "
      f"hash: {manifest['manifest_hash'][:16]}...")

Output (INTEGRITY.json):

{
  "plugin_name": "my-plugin",
  "generated_at": "2026-04-01T03:00:00+00:00",
  "algorithm": "sha256",
  "file_count": 12,
  "files": {
    ".claude-plugin/plugin.json": "a1b2c3d4...",
    "README.md": "e5f6a7b8...",
    "skills/search/SKILL.md": "c9d0e1f2...",
    "agency.json": "3a4b5c6d..."
  },
  "manifest_hash": "7e8f9a0b1c2d3e4f..."
}

Pattern 2: Verify Integrity

Check that current files match the manifest.

# Requires: hash_file() and generate_manifest() from Pattern 1 above
import json
from pathlib import Path

def verify_manifest(plugin_dir: str) -> tuple[bool, list[str]]:
    """Verify plugin files against INTEGRITY.json."""
    root = Path(plugin_dir)
    manifest_path = root / "INTEGRITY.json"

    if not manifest_path.exists():
        return False, ["INTEGRITY.json not found"]

    manifest = json.loads(manifest_path.read_text())
    recorded = manifest.get("files", {})
    errors = []

    # Check recorded files
    for rel_path, expected_hash in recorded.items():
        full = root / rel_path
        if not full.exists():
            errors.append(f"MISSING: {rel_path}")
            continue
        actual = hash_file(full)
        if actual != expected_hash:
            errors.append(f"MODIFIED: {rel_path}")

    # Check for new untracked files
    current = generate_manifest(plugin_dir)
    for rel_path in current["files"]:
        if rel_path not in recorded:
            errors.append(f"UNTRACKED: {rel_path}")

    return len(errors) == 0, errors

# Verify
passed, errors = verify_manifest("my-plugin/")
if passed:

…
자주 묻는 질문

‘무결성 매니페스트’란 무엇인가요?

플러그인이나 도구의 모든 파일 목록과 각 파일의 고유한 ‘디지털 서명’(SHA-256 해시)이 들어 있는 파일입니다. 파일이 올바르고 변경되지 않았다는 증거 역할을 합니다.

파일이 수정되면 어떻게 되나요?

도구는 수정된 파일의 디지털 서명이 매니페스트에 기록된 서명과 더 이상 일치하지 않는다는 것을 감지합니다. 수정을 알리고, 파일이 변조되었을 수 있다고 알려 줍니다.

무결성을 확인하는 것이 왜 중요한가요?

사용하는 플러그인과 도구가 안전하고, 제3자가 악성 코드를 넣거나 원치 않게 기능을 바꾸지 않았다는 것을 보장하기 위해서입니다.

상세 정보

작성자의 원본 설명

Verify supply chain integrity for AI agent plugins, tools, and dependencies. Use this skill when: - Generating SHA-256 integrity manifests for agent plugins or tool packages - Verifying that installed plugins match their published manifests - Detecting tampered, modified, or untracked files in agent tool directories - Auditing dependency pinning and version policies for agent components - Building

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7045
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬