-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: Make sanitizers no longer block taint inside an object #2919
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
18 commits
Select commit
Hold shift + click to select a range
8da0584
JS: Add test
asgerf 83606e7
JS: Dont use data label in taint-tracking configs
asgerf a195429
JS: Add test with non-guard sanitizer
asgerf ad2b150
JS: Add change note
asgerf 08ad4f7
JS: Tweak other parts of change note for consistency
asgerf 4e75fe3
JS: Update some qldoc comments
asgerf 0edb765
JS: Split test case function in two
asgerf de7fbce
JS: Adjust whitespace in change notes
asgerf a9901a4
JS: Update TaintBarriers/isBarrier test
asgerf 18eea96
JS: Autoformat
asgerf 3e68072
JS: Accept test case change
asgerf a7e337a
JS: Add some lines in test case
asgerf 0280221
JS: Add variant of test that passes
asgerf 506ddaf
JS: Add explanation for test failure
asgerf 7393844
JS: Update some queries that used data as source
asgerf b6ca4fb
JS: Add getDefaultSourceLabel()
asgerf 3ae33e3
JS: Update prototype pollution query
asgerf 4f42675
JS: Autformat
asgerf 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
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
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
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
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
88 changes: 45 additions & 43 deletions
88
javascript/ql/test/library-tests/TaintBarriers/isBarrier.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,43 +1,45 @@ | ||
| tst.js:6:14:6:14 | v | ExampleConfiguration | | ||
| tst.js:14:14:14:14 | v | ExampleConfiguration | | ||
| tst.js:24:14:24:14 | v | ExampleConfiguration | | ||
| tst.js:36:14:36:14 | v | ExampleConfiguration | | ||
| tst.js:50:14:50:14 | v | ExampleConfiguration | | ||
| tst.js:56:14:56:14 | v | ExampleConfiguration | | ||
| tst.js:60:14:60:14 | v | ExampleConfiguration | | ||
| tst.js:74:14:74:14 | v | ExampleConfiguration | | ||
| tst.js:80:14:80:14 | v | ExampleConfiguration | | ||
| tst.js:84:14:84:14 | v | ExampleConfiguration | | ||
| tst.js:96:14:96:14 | v | ExampleConfiguration | | ||
| tst.js:108:14:108:14 | v | ExampleConfiguration | | ||
| tst.js:120:14:120:14 | v | ExampleConfiguration | | ||
| tst.js:132:14:132:14 | v | ExampleConfiguration | | ||
| tst.js:134:14:134:16 | v.p | ExampleConfiguration | | ||
| tst.js:136:14:136:18 | v.p.q | ExampleConfiguration | | ||
| tst.js:148:9:148:27 | v | ExampleConfiguration | | ||
| tst.js:149:14:149:14 | v | ExampleConfiguration | | ||
| tst.js:154:9:154:27 | v | ExampleConfiguration | | ||
| tst.js:157:14:157:14 | v | ExampleConfiguration | | ||
| tst.js:160:9:160:30 | v | ExampleConfiguration | | ||
| tst.js:160:35:160:56 | v | ExampleConfiguration | | ||
| tst.js:167:14:167:14 | v | ExampleConfiguration | | ||
| tst.js:176:18:176:18 | v | ExampleConfiguration | | ||
| tst.js:185:14:185:14 | v | ExampleConfiguration | | ||
| tst.js:193:14:193:14 | v | ExampleConfiguration | | ||
| tst.js:205:14:205:14 | v | ExampleConfiguration | | ||
| tst.js:209:14:209:14 | v | ExampleConfiguration | | ||
| tst.js:217:14:217:14 | v | ExampleConfiguration | | ||
| tst.js:221:14:221:14 | v | ExampleConfiguration | | ||
| tst.js:229:14:229:14 | v | ExampleConfiguration | | ||
| tst.js:237:14:237:14 | v | ExampleConfiguration | | ||
| tst.js:241:14:241:14 | v | ExampleConfiguration | | ||
| tst.js:255:14:255:14 | v | ExampleConfiguration | | ||
| tst.js:265:14:265:14 | v | ExampleConfiguration | | ||
| tst.js:284:14:284:14 | v | ExampleConfiguration | | ||
| tst.js:331:14:331:14 | v | ExampleConfiguration | | ||
| tst.js:350:14:350:14 | v | ExampleConfiguration | | ||
| tst.js:356:16:356:27 | x10 | ExampleConfiguration | | ||
| tst.js:356:32:356:34 | x10 | ExampleConfiguration | | ||
| tst.js:361:14:361:14 | v | ExampleConfiguration | | ||
| tst.js:371:14:371:16 | o.p | ExampleConfiguration | | ||
| tst.js:378:14:378:17 | o[p] | ExampleConfiguration | | ||
isBarrier | ||
isLabeledBarrier | ||
| ExampleConfiguration | tst.js:6:14:6:14 | v | taint | | ||
| ExampleConfiguration | tst.js:14:14:14:14 | v | taint | | ||
| ExampleConfiguration | tst.js:24:14:24:14 | v | taint | | ||
| ExampleConfiguration | tst.js:36:14:36:14 | v | taint | | ||
| ExampleConfiguration | tst.js:50:14:50:14 | v | taint | | ||
| ExampleConfiguration | tst.js:56:14:56:14 | v | taint | | ||
| ExampleConfiguration | tst.js:60:14:60:14 | v | taint | | ||
| ExampleConfiguration | tst.js:74:14:74:14 | v | taint | | ||
| ExampleConfiguration | tst.js:80:14:80:14 | v | taint | | ||
| ExampleConfiguration | tst.js:84:14:84:14 | v | taint | | ||
| ExampleConfiguration | tst.js:96:14:96:14 | v | taint | | ||
| ExampleConfiguration | tst.js:108:14:108:14 | v | taint | | ||
| ExampleConfiguration | tst.js:120:14:120:14 | v | taint | | ||
| ExampleConfiguration | tst.js:132:14:132:14 | v | taint | | ||
| ExampleConfiguration | tst.js:134:14:134:16 | v.p | taint | | ||
| ExampleConfiguration | tst.js:136:14:136:18 | v.p.q | taint | | ||
| ExampleConfiguration | tst.js:148:9:148:27 | v | taint | | ||
| ExampleConfiguration | tst.js:149:14:149:14 | v | taint | | ||
| ExampleConfiguration | tst.js:154:9:154:27 | v | taint | | ||
| ExampleConfiguration | tst.js:157:14:157:14 | v | taint | | ||
| ExampleConfiguration | tst.js:160:9:160:30 | v | taint | | ||
| ExampleConfiguration | tst.js:160:35:160:56 | v | taint | | ||
| ExampleConfiguration | tst.js:167:14:167:14 | v | taint | | ||
| ExampleConfiguration | tst.js:176:18:176:18 | v | taint | | ||
| ExampleConfiguration | tst.js:185:14:185:14 | v | taint | | ||
| ExampleConfiguration | tst.js:193:14:193:14 | v | taint | | ||
| ExampleConfiguration | tst.js:205:14:205:14 | v | taint | | ||
| ExampleConfiguration | tst.js:209:14:209:14 | v | taint | | ||
| ExampleConfiguration | tst.js:217:14:217:14 | v | taint | | ||
| ExampleConfiguration | tst.js:221:14:221:14 | v | taint | | ||
| ExampleConfiguration | tst.js:229:14:229:14 | v | taint | | ||
| ExampleConfiguration | tst.js:237:14:237:14 | v | taint | | ||
| ExampleConfiguration | tst.js:241:14:241:14 | v | taint | | ||
| ExampleConfiguration | tst.js:255:14:255:14 | v | taint | | ||
| ExampleConfiguration | tst.js:265:14:265:14 | v | taint | | ||
| ExampleConfiguration | tst.js:284:14:284:14 | v | taint | | ||
| ExampleConfiguration | tst.js:331:14:331:14 | v | taint | | ||
| ExampleConfiguration | tst.js:350:14:350:14 | v | taint | | ||
| ExampleConfiguration | tst.js:356:16:356:27 | x10 | taint | | ||
| ExampleConfiguration | tst.js:356:32:356:34 | x10 | taint | | ||
| ExampleConfiguration | tst.js:361:14:361:14 | v | taint | | ||
| ExampleConfiguration | tst.js:371:14:371:16 | o.p | taint | | ||
| ExampleConfiguration | tst.js:378:14:378:17 | o[p] | taint | |
10 changes: 7 additions & 3 deletions
10
javascript/ql/test/library-tests/TaintBarriers/isBarrier.ql
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,6 +1,10 @@ | ||
import javascript | ||
import ExampleConfiguration | ||
|
||
from ExampleConfiguration cfg, DataFlow::Node n | ||
where cfg.isBarrier(n) | ||
select n, cfg | ||
query predicate isBarrier(ExampleConfiguration cfg, DataFlow::Node n) { cfg.isBarrier(n) } | ||
|
||
query predicate isLabeledBarrier( | ||
ExampleConfiguration cfg, DataFlow::Node n, DataFlow::FlowLabel label | ||
) { | ||
cfg.isLabeledBarrier(n, label) | ||
} |
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
Oops, something went wrong.
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.