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>
0 lines
0 B
Python
0 lines
0 B
Python
The file is empty.