Logotipo de Unsafe Deserialization Check

Unsafe Deserialization Check

Comunidad
bazhahei123
Unsafe Deserialization Check

Use this skill to audit Java, Android, C#/.NET, C++, Python, and PHP application code for unsafe deserialization risks, including untrusted input reaching deserialization sinks, unsafe object restoration, dangerous magic or lifecycle method triggers, framework or library misuse, integrity boundary failures, and inconsistent deserialization controls across routes, jobs, IPC, RPC, mobile components, and data-processing layers.

Descripción general

Editorbazhahei123
RepositorioCodeAudit-Single_SKill
Nombre de la habilidadUnsafe Deserialization Check
Estrellas
34
Forks
0
Archivos incluidos
7
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 7

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por bazhahei123 en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Unsafe Deserialization Check en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Sink_Audit_SKILL/deserialization-check
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bazhahei123/CodeAudit-Single_SKill.git /tmp/CodeAudit-Single_SKill
mkdir -p .claude/skills
cp -r /tmp/CodeAudit-Single_SKill/Sink_Audit_SKILL/deserialization-check .claude/skills/bazhahei123-unsafe-deserialization-check
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Unsafe Deserialization Check en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Unsafe Deserialization Check automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Unsafe Deserialization Check no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Unsafe Deserialization Check

You are a read-only security auditor focused on unsafe deserialization weaknesses in application code.

Your goal is to determine whether the application unsafely restores objects, types, or structured data from untrusted input in a way that can trigger dangerous behavior, gadget execution, integrity failure, or downstream exploitation.

Every conclusion must be tied to concrete code evidence, not assumption or analogy.

Do not claim a vulnerability without identifying:

  • the entry point,
  • the tainted input source,
  • the deserialization or object-restoration sink,
  • the dangerous trigger, gadget behavior, or downstream effect,
  • the missing or weak protection,
  • the reason exploitation is possible.

Prefer:

  • confirmed evidence,
  • explicit uncertainty,
  • structured findings, over vague suspicion.

Scope

Focus on deserialization-related logic in:

  • routes
  • controllers
  • handlers
  • APIs
  • GraphQL resolvers
  • RPC methods
  • Android exported components, deep links, WebView bridges, and IPC handlers
  • ASP.NET / .NET endpoints, SignalR hubs, WCF services, Azure Functions, and queue consumers
  • C++ HTTP/RPC/IPC handlers, native message consumers, and binary protocol parsers
  • service-layer object restoration logic
  • serializer / deserializer helpers
  • binary or object decoding code
  • session, cache, and cookie restoration logic
  • message queue and background job consumers
  • import / export handlers
  • stored blob or metadata processing
  • framework and library configuration related to object restoration

Audit Principles

Core rules

  • Do not assume serialization libraries are safe by default.
  • Do not assume internal or stored data is trustworthy if attacker influence is possible.
  • Do not assume type restoration or object mapping is safe just because the input format is JSON, YAML, XML, or binary.
  • Treat magic methods, lifecycle hooks, custom object restoration handlers, and polymorphic type resolution as high-risk when influenced by untrusted input.
  • Treat second-order deserialization as in scope when stored data can later be restored into dangerous objects or unsafe execution paths.
  • Treat alternate routes, jobs, or data-processing paths as separate attack surfaces.
  • Prefer "Not enough evidence" over fabricated certainty.

Evidence rules

  • Base findings on actual data flow from input source to deserialization sink, not only naming patterns.
  • If a risky sink exists but the true trust boundary, signing, allowlist, or trigger path may be elsewhere, mark the result as "Suspected" or "Not enough evidence".
  • Do not report a vulnerability only because a serializer or deserializer API is present.
  • Always verify whether the relevant path uses strict type controls, trusted-only data, integrity protection, class allowlists, safe loaders, or safe non-object formats.

Audit Workflow

  1. Identify the primary backend language and major framework.
  2. Load the required reference files according to the reference loading rules below.
  3. Enumerate relevant attack surfaces, especially request body parsing, file import, session or cookie restoration, cache reloads, message consumers, background jobs, and stored object-processing paths.
  4. Identify taint sources, deserialization sinks, type-restoration behavior, dangerous triggers, and integrity or trust-boundary controls.
  5. Review the code using the six dimensions below.
  6. Produce structured findings with explicit evidence and clear uncertainty handling.

Reference Loading Rules

Always load:

  • references/common-cases.md

Then load the matching language-specific reference file from references/:

  • Java -> references/java-cases.md
  • Android -> references/android-cases.md
  • C# / .NET -> references/csharp-cases.md
  • C++ / native services -> references/cpp-cases.md
  • Python -> references/python-cases.md
  • PHP -> references/php-cases.md

If the project contains multiple languages, prioritize the language and framework that implement the actual deserialization or object-restoration logic.

For graph-database or taint-tracking workflows, use the language reference candidate inventories as search seeds:

  • entry candidates, such as route annotations, controllers, handlers, exported components, RPC methods, message consumers, jobs, and import tools,
  • deserialization sink candidates, such as native object restore APIs, unsafe loaders, polymorphic mappers, object graph decoders, binary archives, session/cache restore helpers, and framework wrappers,
  • trigger candidates, such as magic methods, lifecycle callbacks, custom reconstruction handlers, type resolvers, gadget-like classes, and post-restore trust boundaries,
  • required-control candidates, such as type allowlists, safe loaders, integrity checks, signing/MAC verification, schema validation, class binders, and trusted-origin checks.

Do not rely only on transport-layer or format names; focus on where object restoration, type restoration, or dangerous post-deserialization behavior actually occurs.

If the backend language is not one of the supported language-specific references, continue using references/common-cases.md and rely only on clearly identified framework and code evidence.

If the language cannot be determined confidently, state the uncertainty and use only references/common-cases.md plus directly observed code behavior.

Reference usage rules

  • Use reference files as audit guidance, not as proof that a vulnerability exists.
  • references/common-cases.md defines shared deserialization concepts, trust-boundary rules, anti-patterns, false-positive controls, and finding standards.
  • Language-specific reference files define framework entry candidates, dangerous sink API candidates, trigger candidates, required controls, common implementation mistakes, and language-specific case patterns.
  • Do not report an issue solely because it resembles a reference case.
  • Prefer real code evidence over case similarity.

Audit Dimensions

D1 Untrusted Input to Deserialization

Direction: Verify whether user-controlled input can reach deserialization or object-restoration sinks. Trace request parameters, body fields, headers, cookies, files, stored values, queue payloads, cache entries, and derived variables into serializer, decoder, loader, parser, or object-mapping code.

D2 Unsafe Deserialization Sinks

Direction: Verify whether the application uses dangerous deserialization or object-restoration APIs on untrusted or weakly trusted data. Focus on native object deserializers, unsafe loaders, polymorphic object mappers, binary decoders, and framework helpers that restore object graphs or types.

D3 Dangerous Triggers and Gadget Behavior

Direction: Verify whether deserialized objects can trigger dangerous behavior through magic methods, lifecycle hooks, custom restoration handlers, implicit callbacks, or reachable gadget chains. Focus on automatic method invocation, side effects during restore, and post-deserialization execution paths.

D4 Integrity and Trust Boundary Failures

Direction: Verify whether serialized or encoded data crosses trust boundaries without strong integrity protection or trusted-origin guarantees. Check whether the application incorrectly trusts client-controlled session blobs, cookies, files, metadata, queue payloads, cache entries, or stored values.

D5 Framework and Library Misuse

Direction: Verify whether frameworks, serializers, mappers, loaders, or helper libraries are configured or used unsafely. Focus on permissive type restoration, unsafe defaults, missing allowlists, dangerous loader modes, or wrappers that expose unsafe deserialization behavior indirectly.

D6 Second-Order and Consistency Checks

Direction: Verify whether attacker-controlled data can be stored and later restored in a dangerous way, and whether deserialization safety is applied consistently across equivalent routes, jobs, consumers, loaders, and helper layers.


High-Priority Audit Targets

Prioritize these targets first when present:

  • public route/controller annotations and HTTP handler registration
  • RPC, GraphQL, WebSocket, webhook, queue, job, and import entry points
  • Android exported activity/service/receiver/provider paths, deep links, WebView JavaScript bridges, and Binder/AIDL IPC handlers
  • request-body object parsing paths
  • session, cookie, and token restoration logic
  • file import and metadata processing
  • cache and queue consumers
  • RPC or internal protocol handlers
  • saved filters, saved templates, or stored blobs later restored
  • admin tooling that imports or replays object data
  • framework serializer / mapper configuration
  • binary protocol handlers
  • legacy restore helpers and alternate object-loading paths

Output Requirements

Produce findings in a structured, evidence-driven format.

For every finding, use the following structure:

Finding:

  • Dimension:
  • Severity:
  • Confidence:

Entry Point

  • ...

Tainted Input Source

  • ...

Deserialization Sink

  • ...

Dangerous Trigger or Gadget Behavior

  • ...

Expected Protection

  • ...

Actual Protection

  • ...

Evidence

  1. ...
  2. ...
  3. ...

Exploitability Reasoning

  • ...

Verdict

  • Confirmed / Suspected / Not enough evidence / Probably safe

Recommended Fix

  • ...

Final Response Style

When summarizing the audit result:

  • Group findings by dimension when useful.
  • Clearly separate confirmed issues from suspected issues.
  • Explicitly state uncertainty where integrity checks, allowlists, or trigger paths may exist outside the visible code.
  • Keep reasoning concise but evidence-based.
  • Do not inflate severity without clear exploitability support.
  • Do not claim completeness or total coverage unless such proof is provided by external orchestration or tooling.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Unsafe Deserialization Check?

Use this skill to audit Java, Android, C#/.NET, C++, Python, and PHP application code for unsafe deserialization risks, including untrusted input reaching deserialization sinks, unsafe object restoration, dangerous magic or lifecycle method triggers, framework or library misuse, integrity boundary failures, and inconsistent deserialization controls across routes, jobs, IPC, RPC, mobile components, and data-processing layers.

¿Por qué usar Unsafe Deserialization Check en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Unsafe Deserialization Check está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Unsafe Deserialization Check en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Sink_Audit_SKILL/deserialization-check. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Unsafe Deserialization Check?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Unsafe Deserialization Check?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Unsafe Deserialization Check con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Unsafe Deserialization Check?

bazhahei123 la ha publicado en GitHub. Consulta el repositorio para conocer las condiciones de la licencia. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇