SHA-256 매니페스트를 생성하고 의존성 버전 고정 상태를 감사하여 AI agent 플러그인과 의존성의 무결성을 검증합니다.
- GitHub 스타
- 41,038
- 파일
- 1
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- MIT
- 허용된 도구
- —
agent-supply-chain skill은 무엇을 하나요?
SHA-256 매니페스트를 생성하고 의존성 버전 고정 상태를 감사하여 AI agent 플러그인과 의존성의 무결성을 검증합니다.
skill의 SKILL.md에서 생성된 요약입니다.
agent-supply-chain skill 정보
이 SKILL은 AI agent 플러그인과 MCP server의 소프트웨어 공급망 보안을 강화합니다. 개발자와 보안 팀이 SHA-256 무결성 매니페스트를 생성할 수 있는 도구를 제공하여, 프로덕션 환경에서 실행되는 코드가 검토 및 승인된 코드와 정확히 일치하도록 보장합니다. 결정론적인 INTEGRITY.json 파일을 생성함으로써 플러그인 디렉토리 내의 수정, 누락 또는 추적되지 않은 파일을 탐지할 수 있습니다.
파일 무결성을 넘어, 이 SKILL은 package.json, requirements.txt 또는 pyproject.toml 파일에서 버전이 고정되지 않거나 유동적인 버전(floating versions) 사용으로 인한 리스크를 방지하기 위해 의존성 버전 고정 상태를 감사합니다. CI 워크플로우에 통합하거나 플러그인을 개발 환경에서 스테이징 및 프로덕션 환경으로 이동할 때 승인 게이트로 사용할 수 있습니다. 이 프로세스는 표준 프로비넌스 도구를 사용하기 어려운 현재의 agentic 생태계에서 중요한 공백을 메워 agent 구성 요소의 프로비넌스 체인을 구축하는 데 도움을 줍니다.
agent가 수행할 수 있는 작업
- 1플러그인 무결성 매니페스트 생성플러그인 디렉토리 내 모든 파일에 대한 SHA-256 해시를 포함하는 결정론적인 JSON 파일을 생성합니다.
- 2플러그인 파일 무결성 검증기존 매니페스트와 플러그인 디렉토리를 비교하여 변조되거나 누락된 파일을 식별합니다.
- 3플러그인 승인 게이트 자동화플러그인이 프로덕션 환경으로 이동할 준비가 되었는지 판단하기 위해 일련의 검사를 실행합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
agent-supply-chain skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.Claude Code에 agent-supply-chain skill 설치
~/.claude/skills/agent-supply-chain/SKILL.md
$ npx degit github/awesome-copilot/skills/agent-supply-chain ~/.claude/skills/agent-supply-chainClaude Code (project)에 agent-supply-chain skill 설치
.claude/skills/agent-supply-chain/SKILL.md
$ npx degit github/awesome-copilot/skills/agent-supply-chain .claude/skills/agent-supply-chainCodex에 agent-supply-chain skill 설치
~/.agents/skills/agent-supply-chain/SKILL.md
$ npx degit github/awesome-copilot/skills/agent-supply-chain ~/.agents/skills/agent-supply-chainGemini CLI에 agent-supply-chain skill 설치
~/.gemini/skills/agent-supply-chain/SKILL.md
$ npx degit github/awesome-copilot/skills/agent-supply-chain ~/.gemini/skills/agent-supply-chainClaude.ai에 agent-supply-chain skill 설치
npx degit github/awesome-copilot/skills/agent-supply-chain agent-supply-chain && zip -r agent-supply-chain.zip agent-supply-chain # claude.ai → Customize → Skills → + → Create skill → Upload a skill → agent-supply-chain.zip
자동 검사
2026년 11월 15일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식
- 소스 저장소 연결 및 접근 가능github/awesome-copilot/skills/agent-supply-chain is public and reachablegithub.com/github/awesome-copilot/tree/HEAD/skills/agent-sup ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-11github.com/github/awesome-copilot/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음No scripts in the skill folder통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/github/awesome-copilot/blob/HEAD/skills/agent-sup ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/github/awesome-copilot/blob/HEAD/skills/agent-sup ↗통과
- SKILL.md가 Agent Skills 형식을 따름Valid name and description; says when to use it; 340 linesgithub.com/github/awesome-copilot/blob/HEAD/skills/agent-sup ↗통과
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:
print("VERIFIED: All files match manifest")
else:
print(f"FAILED: {len(errors)} issue(s)")
for e in errors:
print(f" {e}")
Output on tampered plugin:
FAILED: 3 issue(s)
MODIFIED: skills/search/SKILL.md
MISSING: agency.json
UNTRACKED: backdoor.py
Pattern 3: Dependency Version Audit
Check that agent dependencies use pinned versions.
import re
def audit_versions(config_path: str) -> list[dict]:
"""Audit dependency version pinning in a config file."""
findings = []
path = Path(config_path)
content = path.read_text()
if path.name == "package.json":
data = json.loads(content)
for section in ("dependencies", "devDependencies"):
for pkg, ver in data.get(section, {}).items():
if ver.startswith("^") or ver.startswith("~") or ver == "*" or ver == "latest":
findings.append({
"package": pkg,
"version": ver,
"severity": "HIGH" if ver in ("*", "latest") else "MEDIUM",
"fix": f'Pin to exact: "{pkg}": "{ver.lstrip("^~")}"'
})
elif path.name in ("requirements.txt", "pyproject.toml"):
for line in content.splitlines():
line = line.strip()
if ">=" in line and "<" not in line:
findings.append({
"package": line.split(">=")[0].strip(),
"version": line,
"severity": "MEDIUM",
"fix": f"Add upper bound: {line},<next_major"
})
return findings
Pattern 4: Promotion Gate
Use integrity verification as a gate before promoting plugins.
def promotion_check(plugin_dir: str) -> dict:
"""Check if a plugin is ready for production promotion."""
checks = {}
# 1. Integrity manifest exists and verifies
passed, errors = verify_manifest(plugin_dir)
checks["integrity"] = {
"passed": passed,
"errors": errors
}
# 2. Required files exist
root = Path(plugin_dir)
required = ["README.md"]
missing = [f for f in required if not (root / f).exists()]
# Require at least one plugin manifest (supports both layouts)
manifest_paths = [
root / ".github/plugin/plugin.json",
root / ".claude-plugin/plugin.json",
]
if not any(p.exists() for p in manifest_paths):
missing.append(".github/plugin/plugin.json (or .claude-plugin/plugin.json)")
checks["required_files"] = {
"passed": len(missing) == 0,
"missing": missing
}
# 3. No unpinned dependencies
mcp_path = root / ".mcp.json"
if mcp_path.exists():
config = json.loads(mcp_path.read_text())
unpinned = []
for server in config.get("mcpServers", {}).values():
if isinstance(server, dict):
for arg in server.get("args", []):
if isinstance(arg, str) and "@latest" in arg:
unpinned.append(arg)
checks["pinned_deps"] = {
"passed": len(unpinned) == 0,
"unpinned": unpinned
}
# Overall
all_passed = all(c["passed"] for c in checks.values())
return {"ready": all_passed, "checks": checks}
result = promotion_check("my-plugin/")
if result["ready"]:
print("Plugin is ready for production promotion")
else:
print("Plugin NOT ready:")
for name, check in result["checks"].items():
if not check["passed"]:
print(f" FAILED: {name}")
CI Integration
Add to your GitHub Actions workflow:
- name: Verify plugin integrity
run: |
PLUGIN_DIR="${{ matrix.plugin || '.' }}"
cd "$PLUGIN_DIR"
python -c "
from pathlib import Path
import json, hashlib, sys
def hash_file(p):
h = hashlib.sha256()
with open(p, 'rb') as f:
for c in iter(lambda: f.read(8192), b''):
h.update(c)
return h.hexdigest()
manifest = json.loads(Path('INTEGRITY.json').read_text())
errors = []
for rel, expected in manifest['files'].items():
p = Path(rel)
if not p.exists():
errors.append(f'MISSING: {rel}')
elif hash_file(p) != expected:
errors.append(f'MODIFIED: {rel}')
if errors:
for e in errors:
print(f'::error::{e}')
sys.exit(1)
print(f'Verified {len(manifest[\"files\"])} files')
"
Best Practices
| Practice | Rationale |
|---|---|
| Generate manifest after code review | Ensures reviewed code matches production code |
| Include manifest in the PR | Reviewers can verify what was hashed |
| Verify in CI before deploy | Catches post-review modifications |
| Chain hash for tamper evidence | Single hash represents entire plugin state |
| Exclude build artifacts | Only hash source files — .git, pycache, node_modules excluded |
| Pin all dependency versions | Unpinned deps = different code on every install |
Related Resources
- OpenSSF SLSA — Supply-chain Levels for Software Artifacts
- npm Provenance — Sigstore-based package provenance
- Agent Governance Toolkit — Includes integrity verification and plugin signing
- OWASP ASI-09: Supply Chain Integrity
이 스킬의 파일
1agent-supply-chain skill 질문
Claude Code에 agent-supply-chain skill을 어떻게 설치하나요?
npx degit github/awesome-copilot/skills/agent-supply-chain ~/.claude/skills/agent-supply-chain를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
agent-supply-chain skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
agent 도구 디렉토리에서 이 SKILL로 무엇을 탐지할 수 있나요?
디렉토리 내에서 변조, 수정 또는 추적되지 않은 파일을 탐지할 수 있습니다.