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 skills add UnboundCompute/security-agent-skills --skill hunting-python-unsafe-deserializationgit clone --depth 1 https://github.com/UnboundCompute/security-agent-skillsWrote 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.
[](https://agentmods.dev/skills/unboundcompute/security-agent-skills/hunting-python-unsafe-deserialization)<a href="https://agentmods.dev/skills/unboundcompute/security-agent-skills/hunting-python-unsafe-deserialization"><img src="https://agentmods.dev/badge/skills/unboundcompute/security-agent-skills/hunting-python-unsafe-deserialization/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/unboundcompute/security-agent-skills/hunting-python-unsafe-deserialization"><img src="https://agentmods.dev/badge/skills/unboundcompute/security-agent-skills/hunting-python-unsafe-deserialization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00153 | $0.01927 |
| Opus 5.5 | $0.00061 | $0.00771 |
| Sonnet 5.5 | $0.00031 | $0.00385 |
| Haiku 4.5 | $0.00015 | $0.00193 |
Grade A, and why
hunting-python-unsafe-deserialization scanned grade A with 0 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 1mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hunting Python unsafe deserialization: when loading data calls a function
Several Python serialization formats are not data formats at all; they are programs. pickle invokes
__reduce__ during load, which names a callable and its arguments and runs them, so a pickled blob can
call any importable function on reconstruction. YAML's full loader instantiates arbitrary Python objects
from tags. marshal, dill, jsonpickle, and the model and dataframe loaders that wrap pickle inherit
the same property. The vulnerability is not a bug in these libraries; it is using them on data an
attacker controls. You find it by locating every loader that reconstructs objects rather than parsing
data, and asking whether untrusted bytes reach it.
When to use
- A service loads serialized Python objects from a request, a cookie, a cache, a queue, or a file.
- The loader in use reconstructs arbitrary objects: pickle, unsafe YAML, marshal, dill, or jsonpickle.
- A model, dataframe, or checkpoint file from an untrusted source is loaded through a pickling loader.
Scope check
Test deserialization only against services you own or are authorized to assess, on non-production data. A confirming payload runs code on load, so treat every proof as a live intrusion inside the authorized scope. If you can't name the authorization, stop.
The loop
-
Establish the reconstructing loaders first. Inventory every call that reconstructs objects rather than parsing data:
pickle.loads/load,yaml.loadwithout a safe loader,marshal.loads,dill,jsonpickle.decode, and model or dataframe loaders that unpickle internally. This is the false-positive killer: ajson.loadsor ayaml.safe_loadparses data and cannot construct arbitrary objects. Name the reconstructing sinks first. -
Trace untrusted bytes into each loader. Follow request bodies, cookies, headers, cache entries, queue messages, and uploaded or downloaded files into the loader. A model checkpoint or a dataframe pulled from an untrusted registry, a shared bucket, or a user upload is attacker-influenced the moment its provenance is not controlled. Confirm the bytes crossing the boundary are not internal-only.
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.
- 1mo ago First seen · 131 lines · 153 tokens per session scan A 49ad7c153f43
hunting-python-unsafe-deserialization is a skill published in the GitHub repository UnboundCompute/security-agent-skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 153 tokens to every session and 1,927 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
Other skills, from other repositories
python-code
Make sure to ALWAYS use this skill when working with python code! Help designing, structuring, and maintaining Python projects, including virtualenvs, packaging, SQLite (sql3) usage, documentation of bug fixes, and clear commenting practices.
claude-code-test
A development rule for a FastAPI and SQLite project that requires tests to run with `pytest -v`, then requires failures to be fixed and tests rerun until coverage reaches 100%. FastAPI is a Python web framework, and pytest is a Python testing tool.
prodcheck-review
Review this codebase against the prodcheck pre-production checklists — security, performance, scale, integrations and post-launch readiness. Use when asked to check whether a project is ready to ship, to audit an area before launch, or to work through a specific checklist. Produces evidence with file:line citations…
swiftui-expert-skill
Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, macOS-specific APIs, and iOS 26+ Liquid Glass adoption. Use when building new SwiftUI features, refactoring existing views, reviewing code quality, or adopting modern SwiftUI patterns.
sast-bandit
Python security vulnerability detection using Bandit SAST with CWE and OWASP mapping. Use when: (1) Scanning Python code for security vulnerabilities and anti-patterns, (2) Identifying hardcoded secrets, SQL injection, command injection, and insecure APIs, (3) Generating security reports with severity classifications…
swiftui-expert-skill
Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, macOS-specific APIs, and iOS 26+ Liquid Glass adoption. Use when building new SwiftUI features, refactoring existing views, reviewing code quality, or adopting modern SwiftUI patterns.