-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Python: Fix or disable CPs introduced by #2700 and #2875. #2973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,19 +223,19 @@ class UrlsplitUrlparseTempSanitizer extends Sanitizer { | |
or | ||
full_use.(AttrNode).getObject() = test.getInput().getAUse() | ||
| | ||
clears_taint(_, full_use, test.getTest(), test.getSense()) | ||
clears_taint(full_use, test.getTest(), test.getSense()) | ||
) | ||
} | ||
|
||
private predicate clears_taint(ControlFlowNode final_test, ControlFlowNode tainted, ControlFlowNode test, boolean sense) { | ||
test_equality_with_const(final_test, tainted, sense) | ||
private predicate clears_taint(ControlFlowNode tainted, ControlFlowNode test, boolean sense) { | ||
test_equality_with_const(test, tainted, sense) | ||
or | ||
test_in_const_seq(final_test, tainted, sense) | ||
test_in_const_seq(test, tainted, sense) | ||
or | ||
test.(UnaryExprNode).getNode().getOp() instanceof Not and | ||
exists(ControlFlowNode nested_test | | ||
nested_test = test.(UnaryExprNode).getOperand() and | ||
clears_taint(final_test, tainted, nested_test, sense.booleanNot()) | ||
clears_taint(tainted, nested_test, sense.booleanNot()) | ||
) | ||
} | ||
Comment on lines
-230
to
240
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking over this code again, I'm so confused about |
||
|
||
|
14 changes: 7 additions & 7 deletions
14
python/ql/test/3/library-tests/taint/unpacking/TestTaint.expected
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
| test.py:11 | extended_unpacking | first | externally controlled string | | ||
| test.py:11 | extended_unpacking | last | externally controlled string | | ||
| test.py:11 | extended_unpacking | rest | [externally controlled string] | | ||
| test.py:16 | also_allowed | a | [externally controlled string] | | ||
| test.py:11 | extended_unpacking | first | NO TAINT | | ||
| test.py:11 | extended_unpacking | last | NO TAINT | | ||
| test.py:11 | extended_unpacking | rest | NO TAINT | | ||
| test.py:16 | also_allowed | a | NO TAINT | | ||
| test.py:24 | also_allowed | b | NO TAINT | | ||
| test.py:24 | also_allowed | c | NO TAINT | | ||
| test.py:31 | nested | x | externally controlled string | | ||
| test.py:31 | nested | xs | [externally controlled string] | | ||
| test.py:31 | nested | ys | [externally controlled string] | | ||
| test.py:31 | nested | x | NO TAINT | | ||
| test.py:31 | nested | xs | NO TAINT | | ||
| test.py:31 | nested | ys | NO TAINT | |
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
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
2 changes: 1 addition & 1 deletion
2
python/ql/test/library-tests/taint/namedtuple/TestTaint.expected
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
27 changes: 0 additions & 27 deletions
27
python/ql/test/library-tests/taint/unpacking/TestStep.expected
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
54 changes: 27 additions & 27 deletions
54
python/ql/test/library-tests/taint/unpacking/TestTaint.expected
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
| test.py:8 | unpacking | a | externally controlled string | | ||
| test.py:8 | unpacking | b | externally controlled string | | ||
| test.py:8 | unpacking | c | externally controlled string | | ||
| test.py:14 | unpacking_to_list | a | externally controlled string | | ||
| test.py:14 | unpacking_to_list | b | externally controlled string | | ||
| test.py:14 | unpacking_to_list | c | externally controlled string | | ||
| test.py:23 | nested | a1 | externally controlled string | | ||
| test.py:23 | nested | a2 | externally controlled string | | ||
| test.py:23 | nested | a3 | externally controlled string | | ||
| test.py:23 | nested | b | [externally controlled string] | | ||
| test.py:23 | nested | c | [externally controlled string] | | ||
| test.py:27 | nested | a1 | externally controlled string | | ||
| test.py:27 | nested | a2 | externally controlled string | | ||
| test.py:27 | nested | a3 | externally controlled string | | ||
| test.py:27 | nested | b | [externally controlled string] | | ||
| test.py:27 | nested | c | [externally controlled string] | | ||
| test.py:31 | nested | a1 | externally controlled string | | ||
| test.py:31 | nested | a2 | externally controlled string | | ||
| test.py:31 | nested | a3 | externally controlled string | | ||
| test.py:31 | nested | b | [externally controlled string] | | ||
| test.py:31 | nested | c | [externally controlled string] | | ||
| test.py:8 | unpacking | a | NO TAINT | | ||
| test.py:8 | unpacking | b | NO TAINT | | ||
| test.py:8 | unpacking | c | NO TAINT | | ||
| test.py:14 | unpacking_to_list | a | NO TAINT | | ||
| test.py:14 | unpacking_to_list | b | NO TAINT | | ||
| test.py:14 | unpacking_to_list | c | NO TAINT | | ||
| test.py:23 | nested | a1 | NO TAINT | | ||
| test.py:23 | nested | a2 | NO TAINT | | ||
| test.py:23 | nested | a3 | NO TAINT | | ||
| test.py:23 | nested | b | NO TAINT | | ||
| test.py:23 | nested | c | NO TAINT | | ||
| test.py:27 | nested | a1 | NO TAINT | | ||
| test.py:27 | nested | a2 | NO TAINT | | ||
| test.py:27 | nested | a3 | NO TAINT | | ||
| test.py:27 | nested | b | NO TAINT | | ||
| test.py:27 | nested | c | NO TAINT | | ||
| test.py:31 | nested | a1 | NO TAINT | | ||
| test.py:31 | nested | a2 | NO TAINT | | ||
| test.py:31 | nested | a3 | NO TAINT | | ||
| test.py:31 | nested | b | NO TAINT | | ||
| test.py:31 | nested | c | NO TAINT | | ||
| test.py:38 | unpack_from_set | a | NO TAINT | | ||
| test.py:38 | unpack_from_set | b | NO TAINT | | ||
| test.py:38 | unpack_from_set | c | NO TAINT | | ||
| test.py:48 | contrived_1 | a | externally controlled string | | ||
| test.py:48 | contrived_1 | b | externally controlled string | | ||
| test.py:48 | contrived_1 | c | externally controlled string | | ||
| test.py:48 | contrived_1 | d | externally controlled string | | ||
| test.py:48 | contrived_1 | e | externally controlled string | | ||
| test.py:48 | contrived_1 | f | externally controlled string | | ||
| test.py:48 | contrived_1 | a | NO TAINT | | ||
| test.py:48 | contrived_1 | b | NO TAINT | | ||
| test.py:48 | contrived_1 | c | NO TAINT | | ||
| test.py:48 | contrived_1 | d | NO TAINT | | ||
| test.py:48 | contrived_1 | e | NO TAINT | | ||
| test.py:48 | contrived_1 | f | NO TAINT | | ||
| test.py:56 | contrived_2 | a | NO TAINT | | ||
| test.py:56 | contrived_2 | b | NO TAINT | | ||
| test.py:56 | contrived_2 | c | NO TAINT | |
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.
Uh oh!
There was an error while loading. Please reload this page.