微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

supply-chain-advisory

supply-chain-advisory · v1.9.17
安全 unknown 级 作者 athola 公开目录收录
1.1k 下载 0 安装 2.6k 收藏 2 浏览

简介

supply-chain-advisory

原始描述

Audits dependency supply chains for bad versions, lockfile drift, and artifact integrity

通过你的 Agent 添加

安装目录:supply-chain-advisory/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/supply-chain-advisory/
Codex CLI~/.codex/skills/supply-chain-advisory/
DeepSeek Harness~/.agents/skills/supply-chain-advisory/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: supply-chain-advisory description: | Audits dependency supply chains for bad versions, lockfile drift, and artifact integrity version: 1.9.8 triggers:

  • security
  • supply-chain
  • dependencies
  • vulnerability
  • pypi
  • adding deps
  • handling incidents
  • or releasing a plugin metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/leyline", "emoji": "\ud83e\udd9e", "requires": {"config": ["night-market.error-patterns"]}}} source: claude-night-market source_plugin: leyline

Night Market Skill — ported from claude-night-market/leyline. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

Overview

Supply chain attacks bypass traditional code review by compromising upstream dependencies. This skill provides patterns for detecting, preventing, and responding to compromised packages in Python ecosystems.

When To Use

  • After a supply chain advisory is published
  • When auditing dependencies for a new or existing project
  • During incident response for a suspected compromise
  • When adding the SessionStart hook to a project

When NOT To Use

  • General CVE triage unrelated to dependency supply chain
  • Application-level vulnerability scanning (use a SAST tool)
  • License compliance audits (different concern)

Known-Bad Versions Blocklist

The blocklist is at ${CLAUDE_SKILL_DIR}/known-bad-versions.json. It is consumed by:

  1. SessionStart hook — warns per-session when compromised versions detected
  2. make supply-chain-scan — CI/local scanning target
  3. This skill — manual audit guidance

Blocklist Format

{
  "package_name": [{
    "versions": ["x.y.z"],
    "date": "YYYY-MM-DD",
    "description": "What the attack did",
    "indicators": ["files or patterns to search for"],
    "source": "advisory URL",
    "severity": "critical|high|medium"
  }]
}

Adding a New Entry

  1. Add the entry to ${CLAUDE_SKILL_DIR}/known-bad-versions.json
  2. Add version exclusions (!=x.y.z) to affected pyproject.toml files
  3. Document in docs/dependency-audit.md under Supply Chain Incidents
  4. Run make supply-chain-scan to verify detection works

Quick Scan Commands

Check all lockfiles on machine for known-bad versions

# Scan uv.lock files for a specific compromised version
grep -r "package_name.*version" --include="uv.lock" /path/to/projects

# Search for malicious artifacts
find /path/to/projects -name "suspicious_file.pth" 2>/dev/null

# Check installed versions in virtualenvs
find /path/to/projects -path "*/.venv/lib/*/PACKAGE*/METADATA" \
  -exec grep "^Version:" {} +

Verify lockfile hash integrity

uv.lock includes SHA256 hashes for every package. If a package is re-published with different content under the same version, uv sync will fail with a hash mismatch. This is your strongest automatic defense.

Defense Layers

Layer Tool Catches
Lockfile hashes uv.lock SHA256 Tampered re-published versions
Version exclusions pyproject.toml != Known-bad versions on fresh resolve
SessionStart hook sanctum hook Per-session warning for compromised deps
CI scanning OSV, Safety CVE database, and advisory matching
Artifact scanning make supply-chain-scan Malicious files (.pth, scripts)

Limitations

  • Zero-day supply chain attacks have no prior advisory — lockfile hashes are the only automatic defense during the attack window
  • Safety/CVE databases lag behind real-world compromises
  • OSV provides broader coverage but is still reactive

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill