Files
realmarauderandClaude Opus 4.7 cc0f56f51e Add pickle-deserializer rule (CWE-502) + RES4LYF Base64ToConditioning entry
Adds PICKLE_DESERIALIZER_NODES registry and _check_pickle_deserializers().
A literal payload in a registered node's pickle input field is CRITICAL (the
exact CWE-502 attack pattern from RES4LYF#252); a connection from outside the
trusted-producers set is MEDIUM.

Also fixes a vacuous-truth bug in _extract_nodes where UI-format workflows
with {"nodes": [...]} were silently misclassified as API-format and crashed
the connection builder. UI-format detection now runs first.

Tests in tests/test_pickle_deserializers.py cover:
- Literal base64 payload -> CRITICAL
- ConditioningToBase64 -> Base64ToConditioning (trusted) -> no finding
- TextInput -> Base64ToConditioning (untrusted) -> MEDIUM
- No pickle node -> no finding
- UI-format widget_0 payload -> CRITICAL
- Empty data field -> no finding

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 16:45:28 -05:00

0 lines
0 B
Python