Skip to content

Python: Model new binascii codecs - #22747

Merged
tausbn merged 1 commit into
mainfrom
tausbn/python315-model-new-binascii-codecs
Oct 7, 2026
Merged

tausbn merged 1 commit into
mainfrom
tausbn/python315-model-new-binascii-codecs

Conversation

@tausbn

@tausbn tausbn commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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

@tausbn
tausbn marked this pull request as ready for review October 2, 2026 13:37
@tausbn
tausbn requested a review from a team as a code owner October 2, 2026 13:37
Copilot AI balanced review requested due to automatic review settings October 2, 2026 13:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new models use format identifiers inconsistent with the existing equivalent codec models.

Review effort: Balanced
Findings: 1 Medium severity

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.

Comment thread python/ql/lib/semmle/python/frameworks/Stdlib.qll Outdated
Adds models for various kinds of codecs introduced in Python 3.15. See
the change note for more details.
@tausbn
tausbn force-pushed the tausbn/python315-model-new-binascii-codecs branch from 644fde3 to 3272fd5 Compare October 2, 2026 13:54

@geoffw0 geoffw0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tausbn

tausbn commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

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...

@tausbn
tausbn merged commit 2222138 into main Oct 7, 2026
19 checks passed
@tausbn
tausbn deleted the tausbn/python315-model-new-binascii-codecs branch October 7, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants