Repository navigation
Python: Model new binascii codecs - #22747
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new models use format identifiers inconsistent with the existing equivalent codec models.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds Python 3.15 binascii codec models and corresponding tests.
Changes:
- Models Base32, Base85, and Ascii85 encoding/decoding.
- Tests aliases, custom alphabets, and taint propagation.
- Adds a change note.
| File | Description |
|---|---|
python/ql/lib/semmle/python/frameworks/Stdlib.qll |
Adds codec models. |
python/ql/test/library-tests/frameworks/stdlib/test_binascii.py |
Adds model and taint tests. |
python/ql/lib/change-notes/2026-09-22-python315-binascii.md |
Documents the new modeling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Adds models for various kinds of codecs introduced in Python 3.15. See the change note for more details.
644fde3 to
3272fd5
Compare
geoffw0
left a comment
There was a problem hiding this comment.
LGTM.
Does Python support models-as-data? I can see these classes fit into the Encoding and Decoding hierarchy, but I was surprised not to see MaD rows.
We do, and have for a long time. Unfortunately, there's never been enough capacity to go back and reimplement all of these models (to the extent that it's possible) using models-as-data. Maybe I should get an LLM to do it for me... |

Adds models for various kinds of codecs introduced in Python 3.15. See the change note for more details.