deserialization-security

deserialization-security is a skill for Claude Code, Codex from ShieldNet-360/secure-vibe. It costs 83 tokens per session (1,559 once invoked), scanned A, original, MIT.

Security guidance for safely turning incoming data into program objects, including Java, Python, .NET, PHP, Ruby, and XML parsers.

In plain words
What is it for?
Use it when handling untrusted cookies, sessions, queue messages, remote calls, serialized data, or XML, and when reviewing deserialization code.
Why use it?
It helps prevent attackers from making the application create dangerous objects, read local files, or send unwanted server requests through crafted data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when handling untrusted cookies, sessions, queue messages, remote calls, serialized data, or XML, and when reviewing deserialization code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shieldnet-360/secure-vibe/deserialization-security
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.

Any agent
npx skills add ShieldNet-360/secure-vibe --skill deserialization-security
Clone the repo
git clone --depth 1 https://github.com/ShieldNet-360/secure-vibe

Made for: Claude Code, Codex.

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 deserialization-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/deserialization-security/github.svg)](https://agentmods.dev/skills/shieldnet-360/secure-vibe/deserialization-security)
Your own site
<a href="https://agentmods.dev/skills/shieldnet-360/secure-vibe/deserialization-security"><img src="https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/deserialization-security/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.

agentmods 80×15 button for deserialization-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/shieldnet-360/secure-vibe/deserialization-security"><img src="https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/deserialization-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,559 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00083 $0.01559
Opus 5.5 $0.00033 $0.00624
Sonnet 5.5 $0.00017 $0.00312
Haiku 4.5 $0.00008 $0.00156

Measured 1mo ago against content hash 067062094a74, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deserialization-security 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.

skills/deserialization-security/SKILL.md · 117 lines

How it starts

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

Deserialization Security

Rules (for AI agents)

ALWAYS

  • Prefer data-only serialization formats — JSON, Protobuf, MessagePack with an explicit type map — over formats that reconstruct arbitrary runtime objects. What makes a format safe here is not schema validation; it is whether the parser can instantiate a class the payload names.
  • Constrain polymorphic type resolution to an explicit set of expected application types. Never let payload data choose the runtime class — that is the mechanism behind every gadget chain, whichever serializer is involved.
  • Treat an object-reconstructing deserializer crossing a trust boundary as high risk: pickle, ObjectInputStream, BinaryFormatter, unserialize, Marshal.load and their framework equivalents. Adding one to a request-handling path needs explicit review — check the platform reference for the exact API and the version behaviour before accepting or remediating a use.
  • Disable external entity resolution and DTD processing on every XML parser that receives untrusted input. A parser that resolves entities is a file-read and server-side request primitive before it is a parser; ssrf-prevention owns where the outbound request lands.
  • Where serialized state carries a signature or MAC, verify it before invoking the deserializer — and treat that as defense in depth, not a licence to keep an unsafe format. crypto-misuse owns the signing key, its algorithm and its rotation.
  • Apply parser and object-graph limits — type filters, graph depth, array length, stream size — as defense in depth. Where legacy native deserialization is unavoidable and execution isolation is genuinely required, isolate at the OS, process or container boundary: a deserializer filter constrains what may be constructed, never what the constructed code may then do.

NEVER

  • Deserialize attacker-controlled or unauthenticated bytes with a native, object-reconstructing format.
  • Assume a MAC, a signature, TLS, or a trusted network makes an unsafe serializer safe. Some serializers cannot be made safe at any level of authentication, and their own vendors say so.
  • Allow unrestricted class-name or type resolution from serialized input.
  • Treat a type or object-graph filter as a process sandbox.
  • Re-enable a serializer the platform vendor classifies as unsafe for compatibility alone. That needs a recorded legacy risk acceptance, strict filtering, a least-privilege execution boundary, and a migration plan — not a false-positive waiver.
  • Copy a framework-specific deserialization example without checking it against the installed library version. Defaults in this area have moved repeatedly, and an example that was correct three releases ago may name an API that no longer exists.

Read the full file on GitHub · 117 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 117 lines · 83 tokens per session scan A 067062094a74

Subscribe to this mod's changes

deserialization-security is a skill published in the GitHub repository ShieldNet-360/secure-vibe (22 stars, last pushed 2mo ago), licensed MIT. It adds 83 tokens to every session and 1,559 once invoked, about $0.0003 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-08-30.