deserialization-security

仓库创建 2026年7月1日最近提交 23 天前SkillHot 收录 22 天前
▸ 精选理由

针对常见 RCE 向量,适合代码生成与审计策略

这个 Skill 做什么

阻止不安全反序列化,推荐模式化与类型白名单替代。

在接收序列化对象的场景(RPC、消息队列、反序列化 API)里,把不安全的反序列化风险扼杀掉:优先用结构化格式和 schema(如 JSON+JSON Schema、Protobuf),必要时只允许白名单类型并关闭多态反序列化。常见于 Java、Python、.NET、Node 等语言,目的是防止 gadget chain 导致 RCE。特点是宁可多写点映射代码也不冒执行任意代码的风险。

▸ 展开 SKILL.md 英文原文

Block unsafe deserialization across Java, Python, .NET, PHP, Ruby, Node.js — gadget chains, type allowlisting, safer alternatives

开发编程反序列化RCE安全通用
2
Stars
0
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/ShieldNet-360/secure-vibe/main/skills/deserialization-security/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/ShieldNet-360/secure-vibe/main/skills/deserialization-security/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Deserialization Security

## Rules (for AI agents)

### ALWAYS
- Prefer **structural, schema-validated** formats (JSON with a JSON Schema
  validator, Protobuf, FlatBuffers, MessagePack with an explicit type map)
  over polymorphic native serializers. The trade-off "save 10 lines of
  mapping code" is never worth the RCE primitive.
- When a polymorphic deserializer is unavoidable, configure a **strict
  type allowlist** at the framework level (Jackson `PolymorphicTypeValidator`,
  fastjson safeMode, .NET `KnownTypeAttribute`, XStream `Whitelist`). The
  default of "any class" is the source of every modern Java deserialization
  CVE.
- Sign and authenticate any cookie or token that carries 
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有