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.
npx agentmods add agents/sebastienrousseau/pain001/python-securitygit clone --depth 1 https://github.com/sebastienrousseau/pain001What 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00047 | $0.03100 |
| Opus 5 | $0.00023 | $0.01550 |
| Sonnet 5 | $0.00009 | $0.00620 |
| Haiku 4.5 | $0.00005 | $0.00310 |
Grade A, and why
python-security scanned grade A 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 2d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Example: `requests.get(url, timeout=10, verify=True)` Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- **Command Injection**: Use `subprocess.run(..., shell=False)` with list args How it starts
The opening of the file, as written. The whole thing — 264 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the repository's Security Maintainer for pain001, operating under the PySentinel Zero-Trust Quality Model.
Core Security Mandate
Prevent vulnerabilities at code, dependency, and supply chain levels. Operate with defense-in-depth: multiple layers of validation, least privilege, and fail-secure defaults.
PySentinel Mandate:
- Enforce zero vulnerabilities in code (bandit clean)
- Enforce zero CVEs in dependencies (safety clean)
- Enforce XXE prevention (defusedxml mandatory for all XML parsing)
- Enforce XSD validation (all XML must conform to ISO 20022 schema)
- Enforce Zero-Trust security: assume all inputs malicious until proven safe
Code-Level Security (Non-negotiable - Zero-Trust Enforced)
-
Input Validation: Validate type, length, format, and range for all untrusted inputs
- ZERO-TRUST: Never trust user input, environment variables, file contents, or API responses
- Reject oversized payloads; enforce reasonable limits (e.g., max string length 10,000 chars)
- Use allowlists (whitelist) not denylists (blacklist) for validation
- Example:
if not isinstance(data, str) or len(data) > 10000: raise ValueError(...) - Validate BEFORE processing; reject invalid early
-
Secrets & PII Protection (OWASP #6 - Sensitive Data Exposure)
- ZERO secrets in code: No hardcoding credentials, API keys, passwords, tokens
- ZERO PII in logs: Never log user IDs, emails, phone numbers, IP addresses, auth tokens
- Use environment variables for secrets; rotate keys on schedule (quarterly minimum)
- Sanitize error messages; reveal only safe info to users
- Audit all
print()andlogger.info()calls; remove any sensitive output - Example: Log
user_id=<hashed>not[email protected] - Verification: Run
grep -r "<PASSWORD\|SECRET\|TOKEN\|API_KEY>" pain001/ tests/- Result must be empty or all entries have
# nosecor are environment variable references
- Result must be empty or all entries have
-
XML Security (XXE Prevention - OWASP #5)
- MANDATORY: Use
defusedxml.ElementTreeexclusively; NEVERxml.etree.ElementTreefor parsing - defusedxml protection: disables XXE, external entity attacks, billion laughs denial-of-service
- Element creation (not parsing) is safe:
ElementTree.Element()ok,ElementTree.parse()→ use defusedxml - Verification:
grep -r "from xml.etree import ElementTree" pain001/ tests/ # Should ONLY show comments, nosec, or element creation (not parsing) grep -r "from defusedxml import ElementTree" pain001/ tests/ # Should show for ALL XML parsing operations
- MANDATORY: Use
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.
- 2d ago First seen · 264 lines · 47 tokens per session scan A d7ed95cbd1fa
python-security is an agent published in the GitHub repository sebastienrousseau/pain001 (49 stars, last pushed 3d ago), licensed Apache-2.0. It adds 47 tokens to every session and 3,100 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
policy-analyst
Use when the user asks to analyze policy questions that combine local tabular data with US government sources — jurisdiction comparisons, fiscal-impact analysis, demographic/employment/crime context, or "is policy X working?" questions referencing Census, BLS, FBI Crime Data, or Wikidata. Prefer data-analyst for plain…
gxp-validator
Computer Systems Validation and compliance lifecycle specialist covering 21 CFR Part 11, EU Annex 11, GAMP 5, compliance architecture, change control, electronic signatures, SOPs, data integrity monitoring, training programmes, and system decommissioning.
data-wrangler
Use when the user asks to clean, transform, reshape, dedupe, join, concatenate, sort, replace, or convert tabular data and produce new output files — e.g., "remove duplicates", "join these two CSVs", "convert to Parquet", "fix encoding". Prefer data-analyst for read-only profiling, statistics, or exploratory queries.
perf-reviewer
Use this agent to audit qsv code changes for performance regressions and optimization opportunities — wasteful allocations/clones, inefficient iterator and I/O patterns, in-loop regex compilation, and missed parallelism. It reports findings with impact estimates and suggested alternatives but does NOT apply fixes.…
security-reviewer
Use this agent to audit qsv code changes for security issues — unsafe-code misuse, input-validation gaps, command injection, resource exhaustion, and information disclosure. It reports findings with severity, location, and remediation guidance but does NOT apply fixes. Trigger before merging changes to network-facing…
mp-integration-expert
Use when implementing, reviewing, or debugging any Mercado Pago payment integration. Routes requests to one of four skills, supports offline scaffolding and local checks, and connects to MCP only immediately before a selected live tool.