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

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 skills/shieldnet-360/secure-vibe/deserialization-security
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.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.svg" alt="Measured on agentmods" 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. 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.00083 $0.01559
Opus 5 $0.00042 $0.00779
Sonnet 5 $0.00017 $0.00312
Haiku 4.5 $0.00008 $0.00156

Measured 4d ago against content hash 067062094a74, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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. 4d 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 21d ago), licensed MIT. It adds 83 tokens to every session and 1,559 once invoked, about $0.0004 per session on Opus 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.

Related

Other skills, from other repositories

deno-sandbox

Use when building features that execute untrusted user code, AI-generated code, or need isolated code execution environments. Covers the @deno/sandbox SDK.

denoland/skills · 36 tokens

deno-frontend

Use when building a web frontend with Deno — running React, Vite, Astro, SvelteKit, Next.js, Nuxt or other npm frameworks under Deno, or working with Fresh, Deno's own island-architecture framework. Covers which path to pick, Fresh 2.x routes, handlers, islands, Preact signals, Tailwind, and Fresh 1.x to 2.x migration.

denoland/skills · 88 tokens

web-performance-reviewer

Review web frontends for performance issues by driving the rendered site through Chrome DevTools MCP — throttled performance traces, Core Web Vitals judged against thresholds, network waterfall analysis, and heap-snapshot leak checks for SPAs. Composes on top of web-static, web-sprinkles, or web-components. Strictly…

AdamBien/airails · 193 tokens

web-static

Build modern static websites using semantic HTML and CSS without external dependencies or build systems. Also owns the verification loop for such sites — drives the rendered pages through Chrome DevTools MCP (console, accessibility snapshot, viewport resize, dark/reduced-motion emulation, Lighthouse), executes the…

AdamBien/airails · 183 tokens

zcfg

Integrate zcfg (Zero Dependency Configuration Utility) into Java applications. Use when adding configuration loading, reading properties files, setting up application configuration, or integrating zcfg into a Java project. Triggers on "zcfg", "add configuration", "load properties", "application configuration with…

AdamBien/airails · 75 tokens

zcl

Add colored terminal output to Java applications using zcl (Zero-dependency Colour Logger). Use when adding colored console output, terminal logging with colors, ANSI color support, or integrating zcl into a Java project. Triggers on "zcl", "colored output", "colored logging", "terminal colors", "ANSI colors"…

AdamBien/airails · 85 tokens