Xpersona
S

supply-chain-advisory

CLAWHUB · Unverified

Audits dependency supply chains for bad versions, lockfile drift, and artifact integrity Skill: supply-chain-advisory Owner: athola Summary: Audits dependency supply chains for bad versions, lockfile drift, and artifact integrity Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:16:05.487Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:36:47.838Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:53:35.341Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:02:21.816Z | user Release v1.9.14 v1.9.13 |

62
Rank
84
Safety
1.6k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-leyline-supply-chain-advisory
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-leyline-supply-chain-advisory/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

97,955 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
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](https://github.com/athola/claude-night-market/tree/master/plugins/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

```json
{
  "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

```bash
# 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 

_meta.json

{
  "ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
  "slug": "nm-leyline-supply-chain-advisory",
  "version": "1.9.19",
  "publishedAt": 1787750165487
}

modules/incident-response.md

# Incident Response

## Triage Checklist

When a supply chain compromise is reported:

### 1. Scope Assessment (5 minutes)

- [ ] Identify affected package name and versions
- [ ] Search all lockfiles on machine: `rg "package.*version" --glob "uv.lock" ~` (or `grep -r --include="uv.lock"`)
- [ ] Check installed versions: `find ~ -path "*/.venv/*/METADATA" -exec rg Version {} +` (or `grep`)
- [ ] Search for malicious artifacts: `find ~ -name "indicator_file" 2>/dev/null`

### 2. Containment (if affected)

- [ ] Stop any running processes using the affected package
- [ ] Do NOT delete the virtualenv yet (preserve for forensics)
- [ ] Disconnect from sensitive services if credential theft suspected
- [ ] Capture current environment: `env > /tmp/env_snapshot_$(date +%s).txt`

### 3. Remediation

- [ ] Add version exclusions to `pyproject.toml`: `!=affected.version`
- [ ] Remove malicious artifacts from virtualenvs
- [ ] Regenerate lockfile: `uv lock`
- [ ] Reinstall: `uv sync`
- [ ] Rotate ALL credentials that were accessible to the process

### 4. Credential Rotation Priority

If a credential-stealing payload was present, rotate in this order:

1. **Cloud provider keys** (AWS, GCP, Azure): highest blast radius
2. **Database passwords**: data exfiltration risk
3. **SSH keys**: lateral movement risk
4. **API tokens**: service access
5. **Kubernetes tokens**: cluster compromise
6. **Environment variables**: may contain any of the above

### 5. Documentation

- [ ] Add incident to `docs/dependency-audit.md`
- [ ] Update `known-bad-versions.json` blocklist
- [ ] File GitHub issue linking to advisory
- [ ] Notify team members who may have affected environments

## Post-Incident Review

After containment, evaluate:

1. Why did existing tooling not catch this?
2. What detection layer would have caught it earliest?
3. Should scanning frequency be increased?
4. Are there similar packages in our dependency tree at risk?

modules/scanning-patterns.md

# Scanning Patterns

## Lockfile Audit

For each lockfile type, extract package names and versions, then compare
against the known-bad-versions blocklist.

### uv.lock

```python
import re
from pathlib import Path

def parse_uv_lock(path: Path) -> dict[str, str]:
    """Extract package->version mapping from uv.lock."""
    packages = {}
    content = path.read_text()
    for match in re.finditer(
        r'^name\s*=\s*"([^"]+)".*?^version\s*=\s*"([^"]+)"',
        content,
        re.MULTILINE | re.DOTALL,
    ):
        packages[match.group(1)] = match.group(2)
    return packages
```

### requirements.txt

```python
def parse_requirements(path: Path) -> dict[str, str]:
    """Extract package->version from pinned requirements."""
    packages = {}
    for line in path.read_text().splitlines():
        line = line.strip()
        if "==" in line and not line.startswith("#"):
            name, version = line.split("==", 1)
            packages[name.strip()] = version.strip()
    return packages
```

## Artifact Scanning

Search for known malicious file indicators across a directory tree:

```python
from pathlib import Path

def scan_for_artifacts(root: Path, indicators: list[str]) -> list[Path]:
    """Find known malicious artifacts in a directory tree."""
    found = []
    for indicator in indicators:
        found.extend(root.rglob(indicator))
    return found
```

## Version Matching

```python
def is_compromised(
    package: str,
    version: str,
    blocklist: dict,
) -> dict | None:
    """Check if a package version is in the known-bad blocklist."""
    entries = blocklist.get(package, [])
    for entry in entries:
        if version in entry["versions"]:
            return entry
    return None
```

skill-card.md

## Description:

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

This skill is ready for commercial/non-commercial use.

## Publisher:

[athola](https://clawhub.ai/user/athola)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and security engineers use this skill to audit Python dependency supply chains, check lockfiles and artifacts against known-bad versions, and guide incident response after a suspected package compromise.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The incident-response guidance includes an environment snapshot command that can expose credentials if written to a shared temporary directory.

Mitigation: Use a private evidence directory with restrictive permissions, redact secrets before sharing, and rotate credentials if sensitive values may have been captured.

Risk: The skill can activate for broad security and dependency topics where supply-chain incident guidance may not be the right workflow.

Mitigation: Use it for dependency supply-chain audits and suspected package compromise response, and route unrelated CVE triage, SAST, or license compliance work to dedicated tools.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/athola/skills/nm-leyline-supply-chain-advisory)
- [ClawHub metadata homepage](https://github.com/athola/claude-night-market/tree/master/plugins/leyline)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown with checklists, shell commands, configuration snippets, and Python examples]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Includes dependency audit steps, incident response checklists, blocklist update guidance, and scanning patterns.]

## Skill Version(s):

1.9.19 (source: server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to supply-chain-advisory and adjacent AI workflows.