Repository navigation
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Treat extractall members values that may be None like an omitted members argument, while retaining extraction filter checks. Fixes github#23153. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The production py/tarslip semantics change lacks final DCA results in the PR description, including an assessment of changed results and whether any unexpected regressions were found.
1 open issue
What changed in this PR
Updates Python’s py/tarslip query to detect whole-archive extraction when members may be None, addressing the detection gap in #23153.
Changes:
- Recognizes
Nonevalues, including those passed through variables and wrapper defaults. - Adds regression coverage while preserving extraction-filter checks and explicit member-list handling.
- Updates expected results and adds an analysis change note.
| File | Description |
|---|---|
python/ql/test/query-tests/Security/CWE-022-TarSlip/tarslip.py |
Adds None, wrapper-default, and safe-extraction test cases. |
python/ql/test/query-tests/Security/CWE-022-TarSlip/TarSlip.expected |
Records new alerts and data-flow paths. |
python/ql/lib/semmle/python/security/dataflow/TarSlipCustomizations.qll |
Treats members values reaching None like an omitted argument. |
python/ql/lib/change-notes/2026-11-19-tarslip-none-members.md |
Documents the expanded detection. |
Review effort: Max (adaptive)
Comment on lines
+99
to
+102
| ( | ||
| not exists(call.getParameter(1, "members")) | ||
| or | ||
| call.getParameter(1, "members").getAValueReachingSink().asExpr() instanceof None |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #23153.
Update
py/tarslipto treatmembers=Nonelike an omitted members argument, since both extract the entire archive. Preserve existing extraction-filter checks and handling of explicitly supplied member lists.DCA showed one extra alert and no significant performance change.