Unsafe Deserialization Guard
Scans bounded proposed source content after masking comments and quoted text, then blocks net-new calls to known unsafe deserializers across common languages.
Runs on
Scope
$npx @youdede/toolkit add unsafe-deserialization-guard --target claude-code
What it does
Block newly introduced executable or unsafe deserialization primitives.
When it fires
- implementation
- pre-commit
How it behaves
Block newly introduced executable or unsafe deserialization primitives.
It does not deserialize supplied data or execute parser code.
It does not replace a threat model for custom protocols.
It does not treat safe parser names inside documentation as executable calls.
Configuration
targets/claude-code/unsafe-deserialization-guard.mjs
- Version
- 1.0.0
- Requires
- node
- Licence
- RiskThis automatic gate blocks newly introduced executable or unsafe deserialization primitives; a false denial can interrupt legitimate work, but it does not execute the blocked action.
- Medium
- ModeHow it works: fixed rules, model instructions, or both.
- Deterministic only
- Behaviour
- Enforces, blocks on violation
- On failure
- Denies and blocks
- LatencyThe entrypoint handles one intercepted event to block newly introduced executable or unsafe deserialization primitives without deferred work.
- Immediate
- Data retentionWhether data remains after use and who manages its storage.
- Not retained
Often used with
All in Security