python-supply-chain

python-supply-chain is an agent for coding agents from sebastienrousseau/pain001. It costs 0 tokens per session (3,020 once invoked), scanned C, original, Apache-2.0.

A security checklist for Python project dependencies, which are the external packages your code uses, especially in payment software.

In plain words
What is it for?
It is for checking dependencies when adding or updating them, generating a software bill of materials, and running release or monthly security audits.
Why use it?
It helps detect malicious or fake packages, known security flaws, unsafe licenses, and changes that do not match verified checksums before they reach a release.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/sebastienrousseau/pain001/python-supply-chain
Clone the repo
git clone --depth 1 https://github.com/sebastienrousseau/pain001

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python-supply-chain

README.md
[![agentmods](https://agentmods.dev/badge/agents/sebastienrousseau/pain001/python-supply-chain.svg)](https://agentmods.dev/agents/sebastienrousseau/pain001/python-supply-chain)
Your own site
<a href="https://agentmods.dev/agents/sebastienrousseau/pain001/python-supply-chain"><img src="https://agentmods.dev/badge/agents/sebastienrousseau/pain001/python-supply-chain.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,020 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03020
Opus 5 $0.00000 $0.01510
Sonnet 5 $0.00000 $0.00604
Haiku 4.5 $0.00000 $0.00302

Measured 4d ago against content hash d13f7f821bf2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

python-supply-chain scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh
.github/agents/python-supply-chain.md · 395 lines

How it starts

The opening of the file, as written. The whole thing — 395 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Supply Chain Security Tollgate

Mission

Prevent supply chain attacks and ensure dependency integrity in payment processing.

Tollgate Objectives

  • Enforce SBOM (Software Bill of Materials) generation
  • Validate dependency licenses (no GPL, AGPL)
  • Check known CVEs in dependencies (zero tolerance)
  • Verify dependency signatures and checksums
  • Detect typosquatting and malicious packages

When This Tollgate Applies

  • Adding new dependencies to pyproject.toml
  • Updating existing dependencies
  • Before every release
  • Monthly security audits

Tollgate Checks

1. SBOM Generation (MANDATORY for Releases)

# Option 1: Use Syft (external CLI - no GPL dependencies)
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh
syft packages dir:. -o cyclonedx-json > sbom.json

# Option 2: Use pip-licenses for simple license audit
poetry run pip-licenses --format=json --with-urls > licenses.json

# Option 3: Use Trivy (Docker/GitHub Actions)
trivy fs --format cyclonedx --output sbom.json .

# Output: sbom.json (Software Bill of Materials)
# Contains: All dependencies, versions, licenses, checksums

Success Criteria:

  • SBOM generated successfully
  • All dependencies listed with versions
  • Licenses identified for all packages
  • Checksums present

Note: We use external SBOM tools instead of Python packages (e.g., cyclonedx-bom) to avoid GPL-licensed transitive dependencies (rfc3987). See Case Study below.

2. License Compliance (MANDATORY)

# Check all dependency licenses
poetry run pip-licenses --format=markdown --with-urls \
  --fail-on="GPL;AGPL;SSPL;Commons Clause"

# Allowed licenses:
# - MIT, Apache-2.0, BSD-3-Clause, BSD-2-Clause
# - ISC, PSF, MPL-2.0
# - LGPL (acceptable for library use - no linking restrictions for Python)
# - Multi-licensed (e.g., BSD/GPL/PSF - use non-copyleft option)

# Forbidden licenses:
# - GPL v2+, GPL v3+ (strong copyleft - incompatible with Apache 2.0)
# - AGPL (network copyleft - incompatible with Apache 2.0)
# - SSPL (non-OSI approved)
# - Commons Clause (restricts commercial use)

Read the full file on GitHub · 395 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 395 lines · 0 tokens per session scan C d13f7f821bf2

Subscribe to this mod's changes

python-supply-chain is an agent published in the GitHub repository sebastienrousseau/pain001 (49 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,020 tokens. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.