tiferet
7162f28641
Subsample negative training samples down to 10%
2022-10-03 16:34:48 -07:00
Harry Maclean
42a97b26bb
Merge pull request #10316 from hmac/hmac/actionview
...
Ruby: Model ActionView
2022-10-04 08:16:16 +13:00
Robert Marsh
98f4caf76f
Merge pull request #10645 from MathiasVP/add-more-range-analysis-tests
...
C++: Port SimpleRangeAnalysis tests to the new range-analysis
2022-10-03 14:34:56 -04:00
Robert Marsh
8d1817bc48
Merge pull request #10635 from MathiasVP/add-heuristic-allocation-class
...
C++: Recognize allocation functions heuristically
2022-10-03 14:34:09 -04:00
Mathias Vorreiter Pedersen
872615bd58
Merge pull request #10536 from karimhamdanali/ecbmode
...
Swift: check for using ECB encryption mode
2022-10-03 17:53:10 +01:00
Tony Torralba
a589d8f647
Merge pull request #10662 from atorralba/atorralba/fix-stub-generator
...
Java: Fix stub generator
2022-10-03 16:59:10 +02:00
Aditya Sharad
f7d455efc5
Merge pull request #10612 from adityasharad/docs/system-requirements
...
Docs: Add CodeQL system requirements page
2022-10-03 07:50:44 -07:00
Tony Torralba
ba9eb8c73c
Fix stub generator
...
Add line break after all stubbed annotations to avoid malformed code
See https://github.com/github/codeql/pull/8695\#discussion_r985674245
2022-10-03 14:43:58 +02:00
Tom Hvitved
d52d3d7b75
Merge pull request #10644 from hvitved/ruby/prevent-reevaluation
...
Ruby: Prevent reevaluation of expensive predicates
2022-10-03 13:10:39 +02:00
Tony Torralba
9942dfff21
Merge pull request #8695 from atorralba/atorralba/stub-generator-annotation-types
...
Java: Add support for Annotation types stub generation
2022-10-03 12:54:20 +02:00
Karim Ali
d44f6b0f41
fix formatting issue raised by ql-format
2022-10-03 12:18:01 +02:00
Rasmus Wriedt Larsen
a0fcd4a9bf
Merge pull request #10631 from RasmusWL/cleanup-options-files
...
Python: Remove last `-p ../lib/` in `options` files
2022-10-03 11:09:59 +02:00
Tony Torralba
f860ae8c82
Apply review suggestions
2022-10-03 10:38:35 +02:00
Tony Torralba
2036453176
Add stub generation tests
2022-10-03 10:31:14 +02:00
Tony Torralba
0645f62a0d
Use monotonicAggregates to avoid non-monotonic recursions
2022-10-03 10:31:14 +02:00
Tony Torralba
66e6f4d25e
Use empty string as default value for string annotation values
2022-10-03 10:31:14 +02:00
Tony Torralba
8a3ed6bdcf
Apply code review suggestions
2022-10-03 10:31:14 +02:00
Tony Torralba
6f7b7c9efe
If an annotation value is an array, order its elements by index
2022-10-03 10:31:14 +02:00
Tony Torralba
6f1124d7e7
Handle more annotation element value types
2022-10-03 10:31:13 +02:00
Tony Torralba
1ece12efd7
Add annotation element names
2022-10-03 10:31:13 +02:00
Tony Torralba
d4499a10d2
Fix typo
2022-10-03 10:31:13 +02:00
Tony Torralba
ee7507386c
Fix annotation vs interface keyword stubbing
2022-10-03 10:31:13 +02:00
Tony Torralba
eda676df3e
Add support for Annotation types stub generation
2022-10-03 10:31:13 +02:00
Erik Krogh Kristensen
3d00a61dac
Merge pull request #10528 from erik-krogh/java-followMsg
...
Java: Update the alert messages to better follow the style guide
2022-10-03 09:49:47 +02:00
Asger F
47e5623b90
Merge pull request #10639 from hvitved/ruby/dataflow/known-element-no-floats-complexs
...
Ruby: Do not attempt to track precise hash indices for floats and complex numbers
2022-10-03 09:23:33 +02:00
Tony Torralba
683cacb8b5
Merge pull request #10640 from atorralba/atorralba/fix-cartesian-product
...
Java: Fix cartesian product
2022-10-03 08:56:47 +02:00
Harry Maclean
e48665ad9f
Fix doc
2022-10-03 14:13:12 +13:00
Harry Maclean
ba83b7c6c7
Merge pull request #10599 from hmac/hmac/actioncontroller-datastreaming
...
Ruby: Model send_file
2022-10-03 09:44:05 +13:00
erik-krogh
39ffa558f1
make a few more queries consistent with the other languages
2022-10-02 22:38:25 +02:00
Alex Ford
5c32c8badf
Merge pull request #10560 from alexrford/ruby/yaml-load_file
...
Ruby: treat `Psych` and `YAML` as aliases for rb/unsafe-deserialization
2022-10-02 20:19:10 +01:00
Karim Ali
9e3d5f49c5
add interprocedural cases to the tests
2022-10-02 15:54:39 +02:00
Karim Ali
72ba77d900
Add rule that checks for using the insecure ECB block mode for encryption
2022-10-02 15:53:39 +02:00
Karim Ali
5e189b8c75
update qhelp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-10-02 15:50:26 +02:00
Karim Ali
677946d19d
update typos to address requested changes
2022-10-02 15:50:26 +02:00
Karim Ali
dbc86b2cd8
update qhelp to adjust for US spelling + improved readability
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-10-02 15:50:26 +02:00
Karim Ali
a23e17a370
fix typo in qhelp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-10-02 15:50:26 +02:00
Karim Ali
2409ba2c05
update query description
2022-10-02 15:50:26 +02:00
Karim Ali
2080f0dd36
address style violation in generated alerts
2022-10-02 15:50:26 +02:00
Karim Ali
f060f056c2
rename ECBEncryption to please the codeql formatter
2022-10-02 15:50:26 +02:00
Karim Ali
fe024ef91e
change TaintTracking::Configuration to DataFlow::Configuration
2022-10-02 15:50:25 +02:00
Karim Ali
21d5e417d1
add interprocedural cases to the tests
2022-10-02 15:50:25 +02:00
Karim Ali
9576e4c008
update qhelp to include a description for the accompanying example
2022-10-02 15:50:25 +02:00
Karim Ali
746f535ee5
Add rule that checks for using the insecure ECB block mode for encryption
2022-10-02 15:50:25 +02:00
erik-krogh
2f673efc67
autoformat
2022-10-01 13:21:20 +02:00
erik-krogh
129cda00db
get a few more queries in sync with other languages
2022-10-01 11:17:48 +02:00
erik-krogh
acfcc4bfe2
update two more queries to better follow the style-guide
2022-10-01 10:59:59 +02:00
erik-krogh
7d643e41f3
Merge branch 'main' into java-followMsg
2022-10-01 10:48:06 +02:00
Erik Krogh Kristensen
17e6b2af37
Merge pull request #10557 from erik-krogh/csharp-followMsg
...
C#: Update the alert messages to better follow the style guide
2022-10-01 10:47:43 +02:00
Aditya Sharad
fdd71d4647
Docs: Address review feedback on system requirements
2022-09-30 14:11:47 -07:00
erik-krogh
e2fe63f94a
autoformat
2022-09-30 23:11:43 +02:00
Tom Hvitved
292bc67125
Merge pull request #10620 from hvitved/ruby/call-graph-protected-methods
...
Ruby: Account for `protected` methods in call graph
2022-09-30 19:31:36 +02:00
Mathias Vorreiter Pedersen
cd65e73ade
C++: Fix database inconsistency issue from ODR violation.
2022-09-30 17:04:23 +01:00
Tom Hvitved
dd7458acc8
Ruby: Add more call graph tests for protected methods
2022-09-30 16:24:34 +02:00
Tom Hvitved
32d002ed60
Merge pull request #10627 from hvitved/ruby/synthesis-reduce-non-linear-rec
...
Ruby: Reduce size of input predicate for non-linear recursion
2022-09-30 15:36:21 +02:00
Mathias Vorreiter Pedersen
56b5010f6b
C++: Convert the SimpleRangeAnalysis test to an InlineExpectationsTest.
2022-09-30 14:23:18 +01:00
Mathias Vorreiter Pedersen
d14b2c2880
C++: Put quotes around expectation comments with spaces.
2022-09-30 14:23:18 +01:00
Mathias Vorreiter Pedersen
c4c7c95db2
C++: Add SimpleRangeAnalysis test file to the new range-analysis library test directory.
2022-09-30 14:23:14 +01:00
Tamás Vajk
5017b21579
Merge pull request #10617 from tamasvajk/kotlin-op-calls
...
Kotlin: extract operator expression when operator is in method call form
2022-09-30 15:19:03 +02:00
Arthur Baars
d54a3059b4
Merge pull request #10642 from github/aibaars-patch-2
...
Run QLHelp preview for all languages
2022-09-30 15:13:48 +02:00
Tom Hvitved
3ec43dbd16
Ruby: Do not attempt to track precise hash indices for floats and complex numbers
2022-09-30 14:57:50 +02:00
Tom Hvitved
dc432c7774
Sync shared files
2022-09-30 14:56:56 +02:00
Tom Hvitved
e5d884a905
Ruby: Cache predicates in ApiGraphModels::ModelOutput
2022-09-30 14:56:55 +02:00
Tom Hvitved
299339f817
Ruby: Expose relevant predicates from internal/Module.qll and make sure they are cached
2022-09-30 14:56:55 +02:00
erik-krogh
318718c428
update expected output
2022-09-30 14:51:41 +02:00
Asger F
6e1914ad01
Merge pull request #10375 from asgerf/rb/summarize-loads-v2
...
Ruby: type-tracking and API edges through simple library callables
2022-09-30 14:25:17 +02:00
Tamas Vajk
121a5645b8
Kotlin: extract operator expression when operator is in method call form
2022-09-30 13:48:53 +02:00
Tamas Vajk
0f9b6d4a8b
Kotlin: Add test cases for operators being called by name
2022-09-30 13:46:57 +02:00
erik-krogh
7098e7b102
change more queries to start with "This "
2022-09-30 13:29:18 +02:00
Nick Rolfe
ef8ec0878a
Merge pull request #10641 from github/nickrolfe/a_an
...
JS/Python/Ruby: s/a HTML/an HTML/
2022-09-30 12:17:15 +01:00
CodeQL CI
b66e5c5aee
Merge pull request #10634 from yoff/python/rewrite-typetrackers
...
Approved by tausbn
2022-09-30 03:55:35 -07:00
Mathias Vorreiter Pedersen
fa12bd3cdf
C++: Fix spelling.
2022-09-30 11:22:26 +01:00
Arthur Baars
c7b01975c1
Run QLHelp preview for all languages
2022-09-30 12:08:05 +02:00
Tamás Vajk
ee59bdab25
Merge pull request #10624 from tamasvajk/kotlin-java-fn-equivalence-remove
...
Kotlin: find java-kotlin equivalent functions by erased parameter types
2022-09-30 12:00:46 +02:00
Ian Lynagh
9be2ca2f1e
Merge pull request #10630 from igfoo/igfoo/ver0
...
Kotlin: Make newerThan symmetric
2022-09-30 10:52:42 +01:00
Nick Rolfe
ed74e0aad1
JS/Python/Ruby: s/a HTML/an HTML/
2022-09-30 10:37:52 +01:00
Mathias Vorreiter Pedersen
483ff58c39
C++: Replace the giant list of predicate parameters with a module signature.
2022-09-30 10:36:03 +01:00
Henti Smith
476960e699
Merge pull request #10625 from github/henti/ql_jobrunson
...
Added job.getRunsOn
2022-09-30 10:19:14 +01:00
Mathias Vorreiter Pedersen
b0af4cba30
C++: Fix Code Scanning alert.
2022-09-30 10:05:45 +01:00
Mathias Vorreiter Pedersen
6d5de66e6a
C++: Add QLDoc to the parameterized module components in 'Allocation.qll'.
2022-09-30 10:04:57 +01:00
Tony Torralba
585cbe2b95
Fix cartesian product
2022-09-30 10:47:22 +02:00
Erik Krogh Kristensen
06ea829537
Merge pull request #10636 from erik-krogh/fixHardcoded
...
JS: recognize another kind of dummy passwords to fix an FP in hardcoded-credentials
2022-09-30 10:42:01 +02:00
Henti Smith
074fac8f2f
Ran autoformatter on Actions.qll
2022-09-30 09:24:12 +01:00
Michael Nebel
82294c1349
Merge pull request #10622 from michaelnebel/ruby/postupdateassignexpr
...
Ruby: Postupdate notes for assignment expressions.
2022-09-30 10:00:02 +02:00
Michael Nebel
c867f2ba5b
Merge pull request #10594 from michaelnebel/csharp/postupdatenotes
...
C#: Postupdate notes for ternary expressions.
2022-09-30 09:56:21 +02:00
Harry Maclean
4a39bc8f47
Merge pull request #10598 from hmac/hmac/actioncontroller-metal
...
Ruby: Identify ActionController::Metal controllers
2022-09-30 13:07:03 +13:00
erik-krogh
9f2d7dfb29
update expected output
2022-09-29 22:48:41 +02:00
erik-krogh
0a5ff1b79a
recognize another kind of dummy passwords to fix an FP in hardcoded-credentials
2022-09-29 21:25:40 +02:00
yoff
8ab5617b51
Merge pull request #10539 from yoff/python/improve-API-graphs
...
Python: add subscript to API graphs
2022-09-29 21:05:22 +02:00
Mathias Vorreiter Pedersen
2a514d60d4
C++: Add 'isBarrierIn' to prevent path duplication.
2022-09-29 19:55:58 +01:00
Mathias Vorreiter Pedersen
d12a76559a
C++: Use the new class in 'cpp/invalid-pointer-deref'.
2022-09-29 19:54:03 +01:00
Mathias Vorreiter Pedersen
a9710453f4
C++: Add class with heuristics to detect allocations.
2022-09-29 19:54:03 +01:00
Rasmus Lerchedahl Petersen
84ab860600
python: rewrite type tracker for ldap operations
...
There are several other clean ups I would like to do in this file,
but this can wait until we promote the query.
2022-09-29 20:32:19 +02:00
Rasmus Lerchedahl Petersen
0654e39e72
python: rewrite type tracker for compiled regexes
...
we have the option to use `regex.getAValueReachingSink`
rather than `regex.asSink`, but it will likely be used as a
sink for data flow.
2022-09-29 20:30:29 +02:00
James Fletcher
7ffbc738fb
Merge pull request #10632 from jf205/lgtm-updates
...
Remove a mentions of LGTM.com from the README and style guides
2022-09-29 19:29:32 +01:00
Henry Mercer
35e9e7d233
Merge pull request #10613 from github/henrymercer/atm-update-expected-output
...
ATM: Update expected test output
2022-09-29 17:57:51 +01:00
James Fletcher
8f6de12785
Merge branch 'main' into lgtm-updates
2022-09-29 17:37:54 +01:00
james
d75b1e399d
remove a few mentions of LGTM.com
2022-09-29 17:29:03 +01:00
Rasmus Wriedt Larsen
ea27f4e20f
Python: Remove last -p ../lib/ in options files
...
These were only needed for points-to.
If they only contained `--max-import-depth`, I've removed the `options`
file entirely.
2022-09-29 18:05:51 +02:00
Ian Lynagh
66a8bc5a96
Kotlin: Make newerThan symmetric
...
"0.0 last-modified 0" and "0.0 last-modified 123" were giving
different comparisons depending on which way round they were.
2022-09-29 16:55:03 +01:00
Robert Marsh
9b03e1c0b1
Merge pull request #10609 from MathiasVP/overrun-write-only-flag-overrunning-write
...
C++: Make `OverrunWriteProductFlow` raise alerts on overflows
2022-09-29 10:03:05 -04:00
Tom Hvitved
a5fbe751f1
Ruby: Reduce size of input predicate for non-linear recursion
...
Before, we would be recursive in all of `MethodCall::getMethodName`:
```
Evaluated named local Synthesis#d9ff06b1::AssignOperationDesugar::SetterAssignOperation::getCallKind#ffff#shared#3@Synthesi in 9803ms on iteration 14 (size: 31006941).
Evaluated relational algebra for predicate Synthesis#d9ff06b1::AssignOperationDesugar::SetterAssignOperation::getCallKind#ffff#shared#3@Synthesi on iteration 14 running pipeline main with tuple counts:
256419 ~1% {2} r1 = SCAN Call#841c84e8::MethodCall::getMethodName#0#dispred#ff#prev_delta OUTPUT In.1, In.0
31006941 ~8% {4} r2 = JOIN r1 WITH Synthesis#d9ff06b1::MethodCallKind#ffff#prev ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Rhs.2, Rhs.3
return r2
```
Now, we have restricted that to only the relevant method names.
2022-09-29 15:59:11 +02:00
Asger F
ed36f1983b
Python: sync TypeTracker.qll
2022-09-29 15:57:09 +02:00
Asger F
ae60b0ae6d
Ruby: ensure pruning works with startInContent
2022-09-29 15:54:51 +02:00
Henti Smith
700eaf5e41
Added JobRunson
2022-09-29 14:19:02 +01:00
Mathias Vorreiter Pedersen
4e3b445515
C++: Accept test changes.
2022-09-29 13:35:23 +01:00
Mathias Vorreiter Pedersen
70837dbd93
C++: Use range analysis to properly deduce the initial 'state2' instead of traversing the AST. Also fix state-passing related to negative states.
2022-09-29 13:32:39 +01:00
Mathias Vorreiter Pedersen
6537c817ef
C++: Add more CWE-199 tests that allocates memory based on the result of a SubExpr.
2022-09-29 13:31:34 +01:00
Tamas Vajk
b79c10c419
Kotlin: find java-kotlin equivalent functions by erased parameter types
2022-09-29 14:29:22 +02:00
Tamas Vajk
64c953bee0
Kotlin: add test for not found equivalent of MutableList.remove
2022-09-29 14:24:09 +02:00
Michael Nebel
dd0f19d0b0
Ruby: Update expected test output.
2022-09-29 14:12:20 +02:00
Michael Nebel
999eb19c3d
Ruby: Support postupdate notes for assignment expressions.
2022-09-29 14:12:20 +02:00
Asger F
f1de5a2ffd
Ruby: Restrict summaries and type trackers to relevant contents
2022-09-29 14:10:09 +02:00
Tom Hvitved
1fcd22b0f6
Merge pull request #10621 from hvitved/ruby/fix-bad-join
...
Ruby: Fix bad join-order
2022-09-29 13:56:18 +02:00
Michael Nebel
af4db77046
Ruby: Update expected test output.
2022-09-29 13:54:59 +02:00
Michael Nebel
9ee831a378
Ruby: Add (failing) test case for flow out via assignment expression.
2022-09-29 13:54:32 +02:00
erik-krogh
77eeabe8e5
changed to address review
2022-09-29 13:39:59 +02:00
erik-krogh
3129f0fc8c
add change-note
2022-09-29 13:02:25 +02:00
Asger F
dc03557aea
Merge branch 'main' into rb/summarize-loads-v2
2022-09-29 12:07:30 +02:00
Tom Hvitved
2bf087677f
Ruby: Fix bad join-order
...
Before
```
Evaluated relational algebra for predicate DataFlowDispatch#36b84300::mayBenefitFromCallContext1#6#ffffff@ba617c9q with tuple counts:
1066626 ~2% {3} r1 = SCAN project#Module#fe82a56b::Cached::lookupMethod#2 OUTPUT In.0, In.0, In.1
931393128 ~0% {4} r2 = JOIN r1 WITH DataFlowDispatch#36b84300::isInstanceLocalMustFlow#3#fff_102#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1, Rhs.2
298573 ~0% {6} r3 = JOIN r2 WITH DataFlowDispatch#36b84300::mayBenefitFromCallContext0#5#fffff_14023#join_rhs ON FIRST 2 OUTPUT Rhs.2, Rhs.3, Rhs.4, Lhs.2, Lhs.3, Lhs.1
return r3
```
After
```
Evaluated relational algebra for predicate DataFlowDispatch#36b84300::mayBenefitFromCallContext1#6#ffffff@f68de4dn with tuple counts:
583298 ~1% {5} r1 = SCAN DataFlowDispatch#36b84300::mayBenefitFromCallContext0#5#fffff OUTPUT In.1, In.0, In.2, In.3, In.4
583298 ~1% {5} r2 = JOIN r1 WITH DataFlowPrivate#462ff392::ArgumentNode#class#f ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4
442278 ~0% {6} r3 = JOIN r2 WITH DataFlowDispatch#36b84300::isInstanceLocalMustFlow#3#fff ON FIRST 1 OUTPUT Rhs.1, Lhs.4, Lhs.1, Lhs.2, Lhs.3, Rhs.2
298573 ~0% {6} r4 = JOIN r3 WITH project#Module#fe82a56b::Cached::lookupMethod#2 ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.4, Lhs.0, Lhs.5, Lhs.1
return r4
```
2022-09-29 12:00:26 +02:00
Tom Hvitved
e9b96c19b8
Ruby: Account for protected methods in call graph
2022-09-29 11:58:04 +02:00
Asger F
296c0a7925
Merge pull request #10603 from asgerf/type-model-api-node
...
Add TypeModel.getAnApiNode
2022-09-29 11:39:09 +02:00
Tom Hvitved
58b7556bdf
Ruby: Add call graph tests for protected methods
2022-09-29 11:37:35 +02:00
Michael Nebel
95488bf133
C#: Update expected test output.
2022-09-29 11:35:35 +02:00
Michael Nebel
903abd0f3e
C#: Exhaustive validation of postupdate notes in conditional expression example.
2022-09-29 11:35:35 +02:00
Michael Nebel
131a6ac492
C#: Update expected test output.
2022-09-29 11:35:35 +02:00
Michael Nebel
e06afb69cc
C#: Support postupdate notes for assignment expressions.
2022-09-29 11:35:35 +02:00
Michael Nebel
9ced3956d6
C#: Add assignment expression example.
2022-09-29 11:35:35 +02:00
Michael Nebel
e1ea1a464d
C#: Update expected test output.
2022-09-29 11:35:35 +02:00
Michael Nebel
3d971d239f
C#: Support postupdate notes for suppress nullable warning expressions.
2022-09-29 11:35:35 +02:00
Michael Nebel
58bf283023
C#: Add suppress nullable warning expressions example.
2022-09-29 11:35:35 +02:00
Michael Nebel
940e925c31
C#: Update expected test output.
2022-09-29 11:35:35 +02:00
Michael Nebel
b24fd13946
C#: Add postupdate note support for switch expressions.
2022-09-29 11:35:35 +02:00
Michael Nebel
d54406d599
C#: Add switch example.
2022-09-29 11:35:35 +02:00
Michael Nebel
65b32b665d
C#: Update test expected output.
2022-09-29 11:35:35 +02:00
Michael Nebel
6b74e433ee
C#: Support postupdate notes for NullCoalescing expressions.
2022-09-29 11:35:35 +02:00
Michael Nebel
11d67744f7
C#: Add NullCoalescing example.
2022-09-29 11:35:35 +02:00
Michael Nebel
2e5fc19e38
C#: Update expected test output.
2022-09-29 11:35:35 +02:00
Michael Nebel
3c6f538d5c
C#: Support Cast expressions to have post update notes.
2022-09-29 11:35:35 +02:00
Michael Nebel
ba4794790e
C#: Add Cast example.
2022-09-29 11:35:35 +02:00
Michael Nebel
d3530b0083
C#: Re-factor nested exists into a single exists.
2022-09-29 11:35:35 +02:00
Michael Nebel
c49a16c840
C#: Update expected test output for the local flow testcases.
2022-09-29 11:35:21 +02:00
Mathias Vorreiter Pedersen
cda05ed3ea
Merge pull request #10616 from erik-krogh/ql-consistencies
...
QL: adjust the consistency query to not be noisy on parameterised modules
2022-09-29 08:46:49 +01:00
erik-krogh
2046ece2de
adjust the consistency query to not be noisy on parameterised modules
2022-09-29 09:09:23 +02:00
Tamás Vajk
229c95a765
Merge pull request #10607 from tamasvajk/kotlin-fix-nested-class-lookup
...
Kotlin: Fix class/field lookup for Android synthetic classes
2022-09-29 08:36:05 +02:00
Harry Maclean
fa2d84c38c
Merge pull request #10338 from hmac/hmac/ar-model-create
...
Ruby: Treat ActiveRecord::Base.create as a model instantiation
2022-09-29 15:16:21 +13:00
Alex Ford
4ed4d31efd
Delete 2022-09-23-yaml-load-file.md
2022-09-28 21:44:58 +01:00
Harry Maclean
0e5aa97c46
Fix changenote month
2022-09-29 09:24:42 +13:00
Harry Maclean
76cfd44478
Add change note
2022-09-29 09:24:42 +13:00
Harry Maclean
4217a50900
Treat ActiveRecord.create as a model instantiation
2022-09-29 09:24:42 +13:00
Harry Maclean
424f31a24a
Add test for AR Model.create instantiations
...
These currently aren't recognised.
2022-09-29 09:24:42 +13:00
Harry Maclean
63309150e0
Make some space
2022-09-29 09:24:37 +13:00
Harry Maclean
e7d19e849f
Merge pull request #10090 from hmac/hmac/activestorage
...
Ruby: Model Activestorage
2022-09-29 09:16:25 +13:00
Harry Maclean
0ce0ada4df
Merge pull request #10002 from hmac/hmac/protected-methods
...
Ruby: Model protected methods
2022-09-29 08:39:29 +13:00
Henry Mercer
e3b54efb68
ATM: Update expected test output
...
Update the expected test output given some changes to the JavaScript
libraries which reclassified one of the test endpoints.
2022-09-28 20:00:40 +01:00
Aditya Sharad
c187ae04f4
Docs: Add CodeQL system requirements page
...
Add a table of platform requirements (OS, OS version, CPU architecture).
Add a list of additional language-specific software requirements.
2022-09-28 11:55:53 -07:00
Andrew Eisenberg
ffd58861f0
Merge pull request #10459 from github/aeisenberg/update-analyzing-databases
...
Update the analyze databases article
2022-09-28 10:14:08 -07:00
Andrew Eisenberg
e8a0d07217
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
...
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com >
2022-09-28 09:59:22 -07:00
Tom Hvitved
470908f53e
Merge pull request #10606 from hvitved/csharp/unsupported-api-meta-query
...
C#: Add meta query for reporting calls to unsupported library methods
2022-09-28 18:52:07 +02:00
Tom Hvitved
3af3772041
Ruby: Include With(out)Element in isElementBody
2022-09-28 16:51:20 +02:00
Mathias Vorreiter Pedersen
4ab676774e
C++: Add qhelp to new query.
2022-09-28 15:17:08 +01:00
Mathias Vorreiter Pedersen
769ff5c6f3
C++: Add 'isAdditionalFlowStep' predicates for both configurations in the product dataflow library and use them to fix missing results in the 'cpp/overrun-write' query.
2022-09-28 15:17:04 +01:00
Mathias Vorreiter Pedersen
ccbbb5754e
C++: Use range analysis in 'cpp/overrun-write' and accept test changes.
2022-09-28 15:14:29 +01:00
Mathias Vorreiter Pedersen
51758aa928
C++: Add tests to 'cpp/overrun-write'.
2022-09-28 15:14:29 +01:00
Rasmus Lerchedahl Petersen
a11948bea0
Python: make toString follow member predicate name
2022-09-28 16:13:04 +02:00
Rasmus Lerchedahl Petersen
d122a64e74
Python: do not commit to CfgNode
2022-09-28 16:12:29 +02:00
Tom Hvitved
ac85741da8
C#: Add meta query for reporting calls to unsupported library methods
2022-09-28 15:28:00 +02:00
Asger F
76cab235d9
Ruby: reuse argumentPositionMatch
2022-09-28 15:24:48 +02:00
Tamas Vajk
375698f975
Kotlin: Fix field lookup in Android synthetic classes
2022-09-28 15:23:34 +02:00
Asger F
8704ccee77
Ruby: mention TNoContentSet is only used by type-tracking
2022-09-28 15:18:09 +02:00
Tamás Vajk
f761e57365
Merge pull request #10591 from tamasvajk/kotlin-unbound-symbol
...
Kotlin: Log error when unbound symbol is found
2022-09-28 14:45:13 +02:00
Michael Nebel
a36bba94f1
C#: Base the getAPostUpdateNote predicate purely on cfg.
2022-09-28 14:35:49 +02:00
Michael Nebel
c07c10a808
C#: Address review comments.
2022-09-28 14:35:09 +02:00
Michael Nebel
2d0a377b7a
C#: Update dataflow consistency queries to cater for non unique post and pre unique update notes for conditional branches.
2022-09-28 14:35:09 +02:00
Michael Nebel
e8fd2bfc78
C#: Update expected test output.
2022-09-28 14:35:09 +02:00
Michael Nebel
e5711380f8
C#: Make postupdate notes for conditional branches.
2022-09-28 14:35:09 +02:00
Michael Nebel
7b6e684eaf
C#: Update test expected output (no new flow is identified).
2022-09-28 14:35:09 +02:00
Michael Nebel
51daae01f1
C#: Add test case.
2022-09-28 14:35:09 +02:00
Tamas Vajk
d3c3f3bed9
Kotlin: Fix class lookup for nested Android synthetic classes
2022-09-28 14:23:39 +02:00
Erik Krogh Kristensen
e0c68c3a27
Merge pull request #10605 from erik-krogh/allow-getURL
...
QL: allow getURL as an acronym
2022-09-28 13:34:48 +02:00
Jami
b448206c19
Merge pull request #10580 from jcogs33/remove-stubs-android
...
Java: remove `stubs/android` directory
2022-09-28 07:23:52 -04:00
erik-krogh
2b316471c5
bump typos to 0.0.2
2022-09-28 13:19:32 +02:00
Anders Schack-Mulligen
b48b5d45ef
Merge pull request #10498 from Marcono1234/marcono1234/compilation-unit-simple-name-type
...
Java: Add `CompilationUnit.getATypeInScope()`
2022-09-28 13:18:29 +02:00
erik-krogh
a10a2c2b01
QL: allow getURL as an acronym
2022-09-28 13:14:48 +02:00
Asger F
65de5d014c
Ruby: add test case
2022-09-28 12:23:58 +02:00
Asger F
24f2a3cdff
Sync ApiGraphModels.qll
2022-09-28 12:17:44 +02:00
Asger F
c8162f80bf
Ruby: add TypeModel.getAnApiNode
2022-09-28 12:17:10 +02:00
Rasmus Lerchedahl Petersen
05102f9007
Python: add change note
2022-09-28 12:06:05 +02:00
Asger F
a48b893ed6
Merge pull request #10588 from asgerf/rb/rbi-instantiated-type
...
Ruby: add RbiInstantiatedType
2022-09-28 11:51:20 +02:00
Joe Farebrother
6cb26d5129
Merge pull request #10241 from joefarebrother/android-webview-dubugging
...
Java: Add query for WebView debugging enabled
2022-09-28 10:50:51 +01:00
Rasmus Lerchedahl Petersen
b1ae3bfdb2
Python: less eager tracking of flow
2022-09-28 11:46:26 +02:00
Asger F
fea47c85f3
Ruby: expand on type-tracking test a bit
2022-09-28 11:40:55 +02:00
Rasmus Lerchedahl Petersen
63ee51a4e2
Python: inline mongoCollectionMethod
2022-09-28 11:40:06 +02:00
yoff
70d47f313e
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-09-28 11:33:00 +02:00
Asger F
971657245d
Ruby: update API graph inline test to match output
2022-09-28 11:17:13 +02:00
Tom Hvitved
99b2df0605
Ruby: Make get(Explicit)VisibilityModifier private
2022-09-28 11:16:13 +02:00
Asger F
ce1c258273
Ruby: Update TypeTracker.expected
2022-09-28 11:15:25 +02:00
Asger F
ee7dea1ab6
Merge branch 'main' into rb/summarize-loads-v2
...
This only fixes superficial conflicts with
https://github.com/github/codeql/pull/10574
semantic conflicts will be addressed in later commits
2022-09-28 11:11:44 +02:00
Tom Hvitved
22946b176f
Merge pull request #10574 from hvitved/ruby/reverse-known-stores
...
Ruby: Fix spurious flow through reverse stores
2022-09-28 11:02:17 +02:00
Asger F
e56630a485
Ruby: add missing qldoc
2022-09-28 10:49:34 +02:00
Asger F
e1dfed0fcb
Ruby: move OptionalContentSet to TypeTrackerSpecific.qll
2022-09-28 10:49:34 +02:00
Asger F
14e384aaa2
Ruby: remove unneeded import
2022-09-28 10:49:34 +02:00
Asger F
ce3665d50e
Ruby: remove unneeded qualified AST import
2022-09-28 10:49:34 +02:00
Asger F
665ee81967
Ruby: revert trackUseNode to idiomatic type-tracking
...
The optimizations done here now seem to backfire and cause more problems than they fix.
2022-09-28 10:49:34 +02:00
Asger F
032847f331
Ruby: inline getContents
2022-09-28 10:49:34 +02:00
Asger F
e09a5e87dd
Ruby: clarify what getAnElement() does
2022-09-28 10:49:34 +02:00
Asger F
588b31d15d
Ruby: fix another typo
2022-09-28 10:49:34 +02:00
Asger F
a7b92295a2
Ruby: fix a typo
2022-09-28 10:49:34 +02:00
Asger F
7dfa58b50d
Remove Content::NoContent
2022-09-28 10:49:34 +02:00
Asger F
9c93ad904f
Python: sync
2022-09-28 10:49:34 +02:00
Asger F
dd23e125e5
Rename TypeTrackerContentSet -> TypeTrackerContent
2022-09-28 10:49:34 +02:00
Asger F
6abf77d40d
Factor comparison into compatibleContents
2022-09-28 10:49:34 +02:00
Asger F
85d0c63ec7
Ruby: store a ContentSet on type tracker instances
2022-09-28 10:49:34 +02:00
Asger F
a5ed3d791b
Ruby: expand test case to reveal mismatching forward/backward flow
2022-09-28 10:49:34 +02:00
Asger F
e47deaffbf
Ruby: More QLDoc police
2022-09-28 10:49:34 +02:00
Asger F
7737e75427
Update some QLDoc comments
2022-09-28 10:49:34 +02:00
Asger F
576e320bf5
Python: sync
2022-09-28 10:49:34 +02:00
Asger F
cbf16579ed
Ruby: tweak pipeline a bit
2022-09-28 10:49:33 +02:00
Asger F
b13b2ce319
Ruby: fix join order when building append relation
2022-09-28 10:49:33 +02:00
Asger F
3498a04b89
Ruby: associate ContentSets with store/load edges in type tracker
2022-09-28 10:49:33 +02:00
Asger F
497258eda5
Ruby: reuse Content type
2022-09-28 10:49:33 +02:00
Asger F
ac1b7eb0b9
Remove SetterMethodCall in MkAttribute
2022-09-28 10:49:33 +02:00
Asger F
a64f7cd146
Ruby: simplify getSetterCallAttributeName
2022-09-28 10:49:33 +02:00
Asger F
a51a540582
Ruby: add content edges to API graph
...
Fixes
2022-09-28 10:49:33 +02:00
Asger F
d5e2b93554
Ruby: add API graph label for content
2022-09-28 10:49:33 +02:00
Asger F
e104b65106
Python: sync TypeTracker.qll and adapt accordingly
...
fixup python
2022-09-28 10:49:33 +02:00
Asger F
cd9cddf45a
Ruby: generate type-tracking steps from simple summary specs
2022-09-28 10:49:33 +02:00
Asger F
f1b99e867c
Ruby: use IPA type for type tracker contents
...
fixup qldoc in OptionalTypeTrckerContent
2022-09-28 10:49:33 +02:00
Asger F
53ef054c53
Ruby: Add getACallSimple and use it for arrays and hashes
2022-09-28 10:49:24 +02:00
Asger F
182d7d38a8
Update ruby/ql/lib/codeql/ruby/experimental/Rbi.qll
...
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com >
2022-09-28 10:36:09 +02:00
Tamas Vajk
463173eae4
Accept integration test changes
2022-09-28 10:26:58 +02:00
Geoffrey White
9780dffa79
Merge pull request #10596 from geoffw0/swifturl
...
Swift: URL is a struct, not a class
2022-09-28 09:15:29 +01:00
Tamas Vajk
13fb032b1c
Kotlin: Remove unbound symbol owner lookup
2022-09-28 09:47:10 +02:00
Tom Hvitved
92a38b30cf
Data flow: Update documentation on array flow modeling
2022-09-28 09:32:52 +02:00
Harry Maclean
adb8368e07
Add change note
2022-09-28 12:16:12 +13:00
Harry Maclean
24a10aa5ff
Recognise send_file as a FileSystemAccess
...
This method is available in ActionController actions, and sends the file
at the given path to the client.
2022-09-28 12:14:22 +13:00
Harry Maclean
eada74a15c
Add change note
2022-09-28 11:43:31 +13:00
Robert Marsh
82bbe67267
Merge pull request #10593 from MathiasVP/fix-fp-on-cwe-193
...
C++: Fix FPs on `cpp/invalid-pointer-deref`
2022-09-27 17:38:17 -04:00
Jami Cogswell
61e24a888f
remove stubs/android directory and update options files
2022-09-27 14:55:08 -04:00
Tom Hvitved
31806b84ba
Ruby: Add more flow summaries tests
...
The tests highlight the differences between `(With|Without)?Element[1]` and
`(With|Without)?Element[1!]`.
2022-09-27 20:16:31 +02:00
Tom Hvitved
2351c0288a
Ruby: Fix spurious flow through reverse stores
2022-09-27 20:16:31 +02:00
Harry Maclean
28a23209a5
Ruby: Identify ActionController::Metal controllers
...
Subclasses of `ActionController::Metal` are stripped-down controllers.
We want to recognise them as ActionController controllers.
There are some common ActionController methods that are not available in
Metal, but these are not likely to be used anyway as they would throw an
exception, so I don't think there's much harm in including them in the
modelling.
2022-09-28 07:10:09 +13:00
Tom Hvitved
fea1e47daa
Ruby: Add data-flow test for spurious flow through a reverse store
2022-09-27 20:05:35 +02:00
Tom Hvitved
df2b586e7c
Merge pull request #10577 from hvitved/dataflow/get-a-read-content-fan-in
...
Data flow: Fix bad join-order when getAReadContent has large fan-in
2022-09-27 20:04:58 +02:00
Geoffrey White
3ffb2a3ee6
Swift: Fix.
2022-09-27 18:39:03 +01:00
Geoffrey White
286fcb672c
Swift: Additional test results.
2022-09-27 18:31:43 +01:00
Geoffrey White
d2c74913c8
Swift: Repair UnsafeWebViewFetch query via taint summary.
2022-09-27 18:25:32 +01:00
Geoffrey White
13b2b1f304
Swift: Repair CleartextTransmission query.
2022-09-27 18:25:32 +01:00
Geoffrey White
62aa5de781
Swift: URL is a struct not a class.
2022-09-27 18:25:31 +01:00
Harry Maclean
6e60a6ff2e
Apply suggestions from code review
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-09-28 05:51:28 +13:00
Jami
56e3334c6d
Merge pull request #10479 from jcogs33/android-service-sources
...
Java: add Android service sources
2022-09-27 12:40:18 -04:00
Andrew Eisenberg
aefd51601c
Re-order query suite descriptions
...
Add a pull quote and apply some suggestions from code review.
2022-09-27 09:22:46 -07:00
Mathias Vorreiter Pedersen
549eca1b17
C++: Fix 'implicit use of this'.
2022-09-27 16:29:30 +01:00
Mathias Vorreiter Pedersen
e4305948ef
C++: Fix FP on CWE-193 by blocking flow through back-edges of phi nodes.
2022-09-27 16:28:03 +01:00
Jami Cogswell
7e0c61de2c
switch to hasName
2022-09-27 10:45:52 -04:00
Tamas Vajk
847a64c03b
Kotlin: extract call target even if it's unbound
2022-09-27 15:30:38 +02:00
Tony Torralba
be9509ceb9
Merge pull request #9199 from luchua-bc/java/unsafe-url-forward-dispatch-load
...
Java: CWE-552 Query to detect unsafe resource loading in Java Spring applications
2022-09-27 15:27:51 +02:00
Asger F
52b6dd5bec
Ruby: update test expectation
2022-09-27 14:41:59 +02:00
Erik Krogh Kristensen
162edd6883
Merge pull request #10586 from erik-krogh/pyRegFix
...
ReDoS: fix RegExpEscape::getValue having multiple results for some escapes
2022-09-27 14:41:18 +02:00
Erik Krogh Kristensen
b9937269b9
Merge pull request #10584 from erik-krogh/csharp-unqueryable
...
C#: deprecate/delete some unused code
2022-09-27 14:26:59 +02:00
Tom Hvitved
335e1a8233
Address review comments
2022-09-27 13:36:52 +02:00
Tony Torralba
7ff82bbed3
Update java/ql/src/experimental/Security/CWE/CWE-552/UnsafeUrlForward.qll
2022-09-27 13:26:21 +02:00
erik-krogh
7675571daa
fix RegExpEscape::getValue having multiple results for some escapes
2022-09-27 13:25:23 +02:00
Tamás Vajk
9358070ae9
Merge pull request #10506 from tamasvajk/kotlin-enum-type-access
...
Kotlin: Fix type access expressions in enum constructor calls
2022-09-27 12:42:30 +02:00
Tamás Vajk
8a6d56a57d
Merge pull request #10520 from tamasvajk/kotlin-fix-anonymous-object-comment
...
Kotlin: Fix comment extraction for anonymous objects
2022-09-27 12:42:05 +02:00
erik-krogh
ae6dd05249
deprecate unused class in query specific file
2022-09-27 12:40:05 +02:00
erik-krogh
d23b128457
delete unused code in an internal file
2022-09-27 12:31:58 +02:00
Mathias Vorreiter Pedersen
0c79c2836c
Merge pull request #10573 from erik-krogh/cpp-unqueryable
...
C: deprecate/delete some unused code
2022-09-27 10:13:24 +01:00
Asger F
ea4ba27297
Ruby: add RbiInstantiatedType
2022-09-27 10:51:29 +02:00
Anders Schack-Mulligen
9f1bbf2bbd
Merge pull request #10575 from aschackmull/dataflow/cleanup-module
...
Dataflow: Minor visibility cleanup
2022-09-27 10:10:53 +02:00
Harry Maclean
9709aa87fb
Fix changenote month
2022-09-27 15:23:12 +13:00
Harry Maclean
cb8865f3ff
Add missing doc
2022-09-27 11:23:08 +13:00
Harry Maclean
6803d96000
Add change note
2022-09-27 10:43:41 +13:00
Harry Maclean
49572a5218
Remove redundant import
2022-09-27 10:35:39 +13:00
Tom Hvitved
3717cb30eb
Ruby: Fix two join orders
...
`getExplicitVisibilityModifier`
Before
[2022-08-17 09:03:16] (186s) Tuple counts for quick_eval#ff/2@2005f7ku after 113ms:
39910 ~0% {2} r1 = SCAN Method#8b49e67f::Method#ff OUTPUT 0, In.0 'this'
39910 ~0% {2} r2 = STREAM DEDUP r1
135 ~2% {2} r3 = JOIN r2 WITH Call#ee92d596::CallImpl::getArgumentImpl#dispred#fbb_120#join_rhs ON FIRST 2 OUTPUT Rhs.2 'result', Lhs.1 'this'
134 ~0% {2} r4 = JOIN r3 WITH Method#8b49e67f::VisibilityModifier#f ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.0 'result'
39910 ~0% {1} r5 = SCAN Method#8b49e67f::Method#ff OUTPUT In.0 'this'
39910 ~0% {1} r6 = STREAM DEDUP r5
39910 ~0% {2} r7 = JOIN r6 WITH Method#8b49e67f::Method::getName#dispred#ff ON FIRST 1 OUTPUT Lhs.0 'this', Rhs.1
39770 ~1% {3} r8 = JOIN r7 WITH AST#a6718388::AstNode::getEnclosingModule#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'this', Lhs.1
1859722 ~0% {3} r9 = JOIN r8 WITH project#Method#8b49e67f::isDeclaredIn#fff#2_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.1 'this', Lhs.2
11757 ~0% {4} r10 = JOIN r9 WITH Method#8b49e67f::VisibilityModifier::getMethodArgument#dispred#bf ON FIRST 1 OUTPUT Lhs.2, Lhs.1 'this', Lhs.0 'result', Rhs.1
24206 ~0% {4} r11 = JOIN r10 WITH Constant#54e8b051::ConstantValue::getStringlikeValue#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.1 'this', Lhs.2 'result'
292 ~0% {2} r12 = JOIN r11 WITH Expr#6fb2af19::Expr::getConstantValue#dispred#ff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.3 'result'
426 ~0% {2} r13 = r4 UNION r12
return r13
After
[2022-08-17 09:30:31] (0s) Tuple counts for quick_eval#ff/2@e014fd45 after 5ms:
39910 ~0% {1} r1 = SCAN Method#8b49e67f::Method#ff OUTPUT In.0 'this'
39910 ~0% {1} r2 = STREAM DEDUP r1
134 ~1% {2} r3 = JOIN r2 WITH Method#8b49e67f::VisibilityModifier::getMethodArgument#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0 'this', Rhs.1 'result'
37225 ~1% {3} r4 = JOIN r2 WITH project#Method#8b49e67f::methodIsDeclaredIn#ffff ON FIRST 1 OUTPUT Rhs.1, Rhs.2, Lhs.0 'this'
382 ~1% {2} r5 = JOIN r4 WITH Method#8b49e67f::modifiesIn#fff_120#join_rhs ON FIRST 2 OUTPUT Lhs.2 'this', Rhs.2 'result'
516 ~0% {2} r6 = r3 UNION r5
return r6
`getVisibilityModifier()`
Before
[2022-08-17 09:16:18] (1s) Tuple counts for quick_eval#ff/2@0e9b6ctl after 52ms:
39910 ~0% {1} r1 = SCAN Method#8b49e67f::Method#ff OUTPUT In.0 'this'
39910 ~0% {1} r2 = STREAM DEDUP r1
424 ~0% {2} r3 = JOIN r2 WITH Method#8b49e67f::Method::getExplicitVisibilityModifier#dispred#ff ON FIRST 1 OUTPUT Lhs.0 'this', Rhs.1 'result'
34953 ~0% {3} r4 = JOIN quick_eval#ff#shared WITH Method#8b49e67f::isDeclaredIn#fff ON FIRST 1 OUTPUT Rhs.1, Rhs.2, Lhs.0 'this'
2338 ~0% {2} r5 = JOIN r4 WITH quick_eval#ff#join_rhs ON FIRST 2 OUTPUT Lhs.2 'this', Rhs.2 'result'
3861 ~0% {1} r6 = SCAN Method#8b49e67f::SingletonMethod#ff OUTPUT In.0 'this'
3861 ~0% {1} r7 = STREAM DEDUP r6
3859 ~6% {2} r8 = JOIN r7 WITH AST#a6718388::AstNode::getEnclosingModule#dispred#ff ON FIRST 1 OUTPUT Lhs.0 'this', Rhs.1
3859 ~6% {2} r9 = JOIN r8 WITH Method#8b49e67f::SingletonMethod#ff ON FIRST 1 OUTPUT Lhs.0 'this', Lhs.1
0 ~0% {3} r10 = JOIN r9 WITH Method#8b49e67f::VisibilityModifier::getMethodArgument#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.1, Lhs.0 'this'
3859 ~0% {3} r11 = JOIN r9 WITH Method#8b49e67f::SingletonMethod::getName#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'this', Lhs.1
7731 ~0% {3} r12 = JOIN r11 WITH Constant#54e8b051::ConstantValue::getStringlikeValue#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'this', Lhs.2
1343055 ~1% {3} r13 = JOIN r12 WITH Expr#6fb2af19::Expr::getConstantValue#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'this', Lhs.2
6546 ~2% {3} r14 = JOIN r13 WITH Method#8b49e67f::VisibilityModifier::getMethodArgument#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.2, Lhs.1 'this'
6546 ~2% {3} r15 = r10 UNION r14
120 ~2% {2} r16 = JOIN r15 WITH AST#a6718388::AstNode::getEnclosingModule#dispred#ff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'result'
2458 ~0% {2} r17 = r5 UNION r16
2882 ~0% {2} r18 = r3 UNION r17
return r18
After
[2022-08-17 09:29:42] (2s) Tuple counts for quick_eval#ff/2@77b18cdg after 5ms:
39910 ~0% {1} r1 = SCAN Method#8b49e67f::Method#ff OUTPUT In.0 'this'
39910 ~0% {1} r2 = STREAM DEDUP r1
516 ~0% {2} r3 = JOIN r2 WITH Method#8b49e67f::Method::getExplicitVisibilityModifier#dispred#ff ON FIRST 1 OUTPUT Lhs.0 'this', Rhs.1 'result'
3861 ~0% {1} r4 = SCAN Method#8b49e67f::SingletonMethod#ff OUTPUT In.0 'this'
3861 ~0% {1} r5 = STREAM DEDUP r4
0 ~0% {2} r6 = JOIN r5 WITH Method#8b49e67f::VisibilityModifier::getMethodArgument#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0 'this', Rhs.1 'result'
516 ~0% {2} r7 = r3 UNION r6
36845 ~0% {3} r8 = JOIN quick_eval#ff#shared WITH Method#8b49e67f::isDeclaredIn#fff ON FIRST 1 OUTPUT Rhs.1, Rhs.2, Lhs.0 'this'
2421 ~0% {2} r9 = JOIN r8 WITH quick_eval#ff#join_rhs ON FIRST 2 OUTPUT Lhs.2 'this', Rhs.2 'result'
2584 ~0% {3} r10 = JOIN r5 WITH project#Method#8b49e67f::methodIsDeclaredIn#ffff ON FIRST 1 OUTPUT Rhs.1, Rhs.2, Lhs.0 'this'
39 ~0% {2} r11 = JOIN r10 WITH Method#8b49e67f::modifiesIn#fff_120#join_rhs ON FIRST 2 OUTPUT Lhs.2 'this', Rhs.2 'result'
2460 ~1% {2} r12 = r9 UNION r11
2976 ~0% {2} r13 = r7 UNION r12
return r13
2022-09-27 10:29:06 +13:00
Harry Maclean
92715bac3a
Attempt to fix bad join candidates
2022-09-27 10:29:06 +13:00
Harry Maclean
5cdaae7378
Update tests
2022-09-27 10:29:04 +13:00
Harry Maclean
4df7fd248e
Ruby: Ensure explicit modifiers take priority
...
In Ruby, "explicit" visibility modifiers override "implicit" ones. For
example, in the following:
```rb
class C
private
def m1
end
public m2
end
def m3
end
public :m3
end
```
`m1` is private whereas `m2` and `m3` are public.
2022-09-27 10:28:23 +13:00
Harry Maclean
d90257fd50
Add change note
2022-09-27 10:22:54 +13:00
Harry Maclean
bda4cfbe5d
Ruby: Update test
2022-09-27 10:22:53 +13:00
Harry Maclean
79abb36faf
Ruby: Remove MethodModifier
2022-09-27 10:21:06 +13:00
Harry Maclean
97e9eab7fc
Fix QL4QL error
2022-09-27 10:21:06 +13:00
Harry Maclean
d7f40c41c5
Ruby: protected_class_method does not exist
2022-09-27 10:21:06 +13:00
Harry Maclean
5e9196e51c
Ruby: Add test for protected methods
2022-09-27 10:21:04 +13:00
Harry Maclean
494fb4c966
Ruby: Make room for new test cases
2022-09-27 10:18:43 +13:00
Harry Maclean
1d728b234f
Ruby: Add test for protected method visibility
2022-09-27 10:16:09 +13:00
Harry Maclean
58dd521ee9
Ruby: further refactor to method visibility
2022-09-27 10:13:23 +13:00
Harry Maclean
c5f36613da
Ruby: Refactor method visibility modeling
2022-09-27 10:13:21 +13:00
Harry Maclean
3beed54e35
Ruby: Fix imports in test
2022-09-27 10:09:26 +13:00
Harry Maclean
dea5036912
Ruby: Update for Http concept changes
2022-09-27 10:03:17 +13:00
Tom Hvitved
45fc62f16b
Data flow: Sync files
2022-09-26 20:39:48 +02:00
Tom Hvitved
1273db5a22
Data flow: Fix bad join-order when getAReadContent has large fan-in
...
Before (terminated before completion)
```
Evaluated relational algebra for predicate DataFlowImplForHttpClientLibraries#c536b619::store#5#fffff@e5ef07bh with tuple counts:
151500 ~0% {4} r1 = SCAN DataFlowImplCommon#4f8df883::Cached::store#4#ffff OUTPUT In.1, In.0, In.2, In.3
150500 ~0% {5} r2 = JOIN r1 WITH DataFlowImplCommon#4f8df883::Cached::MkTypedContent#fff_20#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.2, Lhs.3, Rhs.1
149500 ~0% {5} r3 = JOIN r2 WITH num#DataFlowImplForHttpClientLibraries#c536b619::TNodeNormal#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Lhs.3, Lhs.4, Rhs.1
148500 ~0% {5} r4 = JOIN r3 WITH num#DataFlowImplForHttpClientLibraries#c536b619::TNodeNormal#ff ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.2, Lhs.4, Rhs.1
2003849000 ~0% {5} r5 = JOIN r4 WITH DataFlowPublic#e1781e31::ContentSet::getAReadContent#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4
105066500 ~9036% {5} r6 = JOIN r5 WITH project#DataFlowImplForHttpClientLibraries#c536b619::readSet#4#ffff ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.4, Lhs.2, Rhs.1
return r6
```
After
```
Evaluated relational algebra for predicate DataFlowImplForHttpClientLibraries#c536b619::readProj#2#ff@302620cn with tuple counts:
1461867 ~0% {2} r1 = SCAN DataFlowPrivate#462ff392::Cached::TContent#f OUTPUT In.0, In.0
3549054 ~1% {2} r2 = JOIN r1 WITH DataFlowPublic#e1781e31::ContentSet::getAReadContent#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
5772824 ~5% {2} r3 = JOIN r2 WITH project#DataFlowImplForHttpClientLibraries#c536b619::readSet#4#ffff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
return r3
Evaluated relational algebra for predicate DataFlowImplForHttpClientLibraries#c536b619::store#5#fffff@016cd9o1 with tuple counts:
267905 ~0% {4} r1 = SCAN DataFlowImplCommon#4f8df883::Cached::store#4#ffff OUTPUT In.1, In.0, In.2, In.3
267905 ~0% {5} r2 = JOIN r1 WITH DataFlowImplCommon#4f8df883::Cached::MkTypedContent#fff_20#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.2, Lhs.3, Rhs.1
267905 ~0% {5} r3 = JOIN r2 WITH num#DataFlowImplForHttpClientLibraries#c536b619::TNodeNormal#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Lhs.3, Lhs.4, Rhs.1
267905 ~0% {5} r4 = JOIN r3 WITH num#DataFlowImplForHttpClientLibraries#c536b619::TNodeNormal#ff ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.2, Lhs.4, Rhs.1
2109240 ~0% {5} r5 = JOIN r4 WITH DataFlowImplForHttpClientLibraries#c536b619::readProj#2#ff ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.4, Lhs.2, Rhs.1
return r5
```
2022-09-26 20:37:53 +02:00
erik-krogh
0f1a8a6f5b
deleted unused internal code
2022-09-26 20:20:52 +02:00
erik-krogh
b83ca08854
deprecate class documented as deprecated
2022-09-26 20:09:54 +02:00
Tom Hvitved
88baf0883a
Merge pull request #10358 from hvitved/ruby/dataflow/call-ctx
...
Ruby: Context sensitive instance method resolution
2022-09-26 19:55:10 +02:00
Mathias Vorreiter Pedersen
11b2a12392
Merge pull request #10572 from MathiasVP/add-cwe-193-fp
...
C++: Add FP test for `CWE-193`
2022-09-26 17:22:47 +01:00
Michael Nebel
40a75fdd12
Merge pull request #9406 from JarLob/controller
...
Extend aspnetcore controller definition
2022-09-26 16:34:39 +02:00
Anders Schack-Mulligen
1687d08587
Dataflow: Sync.
2022-09-26 16:10:03 +02:00
Anders Schack-Mulligen
17dba00264
Dataflow: Minor visibility cleanup.
2022-09-26 16:09:42 +02:00
Rasmus Lerchedahl Petersen
441fc1bb28
Python: type trackers to API graph
...
base on new subscript in the API graph
There are a few more uses of type tracking
through `SubscriptNode`s, but these start
from an instance given by a data flow node.
2022-09-26 15:05:50 +02:00
Jaroslav Lobačevski
57fcfd5e7d
Apply suggestions from code review
2022-09-26 14:55:29 +02:00
Jaroslav Lobačevski
fa503ec3f2
Create 2022-08-24-aps-net-core-controllers.md
2022-09-26 14:55:29 +02:00
Michael Nebel
37795226a4
C#: Exclude stub implementation in test results.
2022-09-26 14:55:29 +02:00
Michael Nebel
29639a0ad5
C#: ControllerBase should still be considered a controller as we need Redirect methods to be considered sinks.
2022-09-26 14:55:29 +02:00
Michael Nebel
85eee886ac
C#: Auto-format AspNetCore.ql.
2022-09-26 14:55:28 +02:00
Michael Nebel
f2ada3d547
C#: Also use using namespace as a hint to indicate that ASP.NET Core is in scope.
2022-09-26 14:55:28 +02:00
Michael Nebel
a7011e11c4
C#: Minor refactoring to avoid introducing name variable.
2022-09-26 14:55:28 +02:00
Michael Nebel
72429cb9e8
C#: Generic classes should not be considered controllers.
2022-09-26 14:55:28 +02:00
Jaroslav Lobačevski
eed04696a9
Add tests
2022-09-26 14:55:28 +02:00
Octokit
f05d4b8410
failing tests
2022-09-26 14:55:28 +02:00
Octokit
fc10212e68
Add ApiController support
2022-09-26 14:55:28 +02:00
Octokit
c96b938e7d
Controller is public, non-abstract, not generic class
2022-09-26 14:55:28 +02:00
Jaroslav Lobačevski
853a80bdbc
filter out Controller suffixed class in non asp.net projects
2022-09-26 14:55:28 +02:00
Jaroslav Lobačevski
3d281fbb71
fix suffix match
2022-09-26 14:55:28 +02:00
Jaroslav Lobačevski
56055bd76a
Add qldoc comments
2022-09-26 14:55:28 +02:00
Jaroslav Lobačevski
f27b5d5588
Fix code style warnings
2022-09-26 14:55:28 +02:00
Jaroslav Lobačevski
105462a1fc
Extend aspnetcore controller definition
2022-09-26 14:55:27 +02:00
Joe Farebrother
af41f2b903
Remove 'here'.
2022-09-26 13:36:14 +01:00
erik-krogh
326666ac85
update the alert-messages of csharp queries
2022-09-26 14:01:39 +02:00
Rasmus Lerchedahl Petersen
9b1ec03d70
Python: type tracking to API graph
...
using the new subscript node
2022-09-26 13:39:59 +02:00
Rasmus Lerchedahl Petersen
bc963b2386
Python: subscript on API::Node
2022-09-26 13:39:59 +02:00
Rasmus Lerchedahl Petersen
6114d71d3d
Python: subscript on local source nodes
...
and adjust comment on awaited
2022-09-26 13:39:59 +02:00
Rasmus Lerchedahl Petersen
7f610405a0
Python: move code and harmonize comments
2022-09-26 13:39:59 +02:00
Rasmus Lerchedahl Petersen
69640f3c20
Python: refactor awaited
2022-09-26 13:39:59 +02:00
Michael Nebel
0581b91c32
Merge pull request #10554 from michaelnebel/csharp/datetime-sanitizer
...
C#: Consider DateTime as simple type sanitizer.
2022-09-26 13:21:36 +02:00
Mathias Vorreiter Pedersen
1c55bbe2e8
C++: Add FP for CWE-193.
2022-09-26 11:53:03 +01:00
Alex Ford
b018706afd
Ruby: update rb/unsafe-deserialization tests
2022-09-26 11:28:24 +01:00
Alex Ford
06e435fd84
Ruby: remove YAML.load_file arg0 as an unsafe deserialization sink
2022-09-26 11:26:30 +01:00
erik-krogh
46b5bf32f9
update alert-messsages of java queries
2022-09-26 12:15:25 +02:00
Marcono1234
c40b6285a2
Java: Adjust ImpossibleJavadocThrows.ql
2022-09-26 12:08:43 +02:00
Anders Schack-Mulligen
f4ef4342c2
Merge pull request #10558 from aschackmull/java/static-init-vector-perf
...
Java: Improve performance of StaticInitializationVector.
2022-09-26 10:50:49 +02:00
Tom Hvitved
257bcefaf9
Merge pull request #10548 from hvitved/ruby/call-graph-tests
...
Ruby: Add call graph tests for unsupported constructs
2022-09-26 10:47:23 +02:00
Harry Maclean
fa20a476a6
Add test code
2022-09-26 20:56:11 +13:00
Harry Maclean
9f234e9f5a
Ruby: Merge duplicate tests
2022-09-26 20:56:11 +13:00
Harry Maclean
7b9519fe7c
Ruby: Fix import
2022-09-26 20:56:11 +13:00
Harry Maclean
7d3f9580ff
Ruby: QLDoc fix
2022-09-26 20:56:11 +13:00
Harry Maclean
9f99a3ca1f
Ruby: Model sanitize ActionView helper
2022-09-26 20:56:11 +13:00
Harry Maclean
9e625acd3d
Ruby: QLDoc fix
2022-09-26 20:56:11 +13:00
Harry Maclean
1d693d336f
Ruby: Model javascript_include_tag and friends
2022-09-26 20:56:09 +13:00
Harry Maclean
35a05f6dea
Ruby: Add summaries for ActiveSupport::SafeBuffer
2022-09-26 20:55:05 +13:00
Harry Maclean
ed0c85e3af
Ruby: Model ActionView helper XSS sinks
2022-09-26 20:55:04 +13:00
Chris Smowton
f9ba190812
Merge pull request #9830 from smowton/smowton/fix/kotlin-annotation-class-accessors
...
Kotlin: annotation properties should be java.lang.Class not KClass
2022-09-26 08:34:30 +01:00
Chris Smowton
2a2b939078
Lint
2022-09-25 16:48:10 +01:00
Marcono1234
fd99ae78b3
Java: Rename predicate to getATypeInScope
2022-09-25 14:44:16 +02:00
Chris Smowton
f774467892
Kotlin: annotation properties should be java.lang.Class not KClass
...
As documented at https://kotlinlang.org/docs/annotations.html#constructors , annotation properties of type KClass get rewritten when targeting the JVM.
2022-09-25 11:53:50 +01:00
Chris Smowton
a8197b27aa
Merge pull request #10561 from github/henrymercer/go-consistent-query-id
...
Go: Use a consistent query identifier for successfully extracted files
2022-09-24 17:22:56 +01:00
Chris Smowton
9aebe87c67
Merge pull request #10523 from smowton/smowton/admin/jdk18-extractor-test-changes
...
Java: Disable Kotlin element of test re: database inconsistency exposed by JDK18 extractor upgrade
2022-09-24 17:00:10 +01:00
Chris Smowton
8ce176f2dc
Merge pull request #10545 from github/dependabot/github_actions/actions/upload-artifact-3
...
Bump actions/upload-artifact from 2 to 3
2022-09-24 16:57:31 +01:00
Chris Smowton
60f6772f9e
Merge pull request #10542 from github/smowton/fix/kotlin-unit-testing-plugin-version
...
Kotlin unit tests: use best plugin version compatible with environment kotlinc
2022-09-24 16:42:59 +01:00
Erik Krogh Kristensen
c2b5c39436
Merge pull request #10507 from erik-krogh/cpp-followMsg
...
CPP: Make more alert-messages follow the style guide
2022-09-24 17:26:11 +02:00
Jami Cogswell
9b4201f880
update FileService
2022-09-23 22:46:55 -04:00
Jami Cogswell
1e01657577
add onBind to FileService to see if it fixes Java Language Tests failure
2022-09-23 18:59:27 -04:00
Jami Cogswell
9acda05dbd
update Service stub
2022-09-23 18:59:27 -04:00
Jami Cogswell
65f3ae9829
clean up files
2022-09-23 18:59:27 -04:00
Jami Cogswell
7e13610d24
minor qldoc update
2022-09-23 18:59:27 -04:00
Jami Cogswell
24b34cd32f
add a few more tests, and some clean-up
2022-09-23 18:59:27 -04:00
Jami Cogswell
7a96727c59
add tests
2022-09-23 18:59:27 -04:00
Jami Cogswell
367c31bf17
add change note
2022-09-23 18:59:27 -04:00
Jami Cogswell
decba39c09
add service flow sources
2022-09-23 18:59:27 -04:00
Dave Bartolomeo
3bd456e52d
Merge pull request #10565 from github/post-release-prep/codeql-cli-2.11.0
...
Post-release preparation for codeql-cli-2.11.0
2022-09-23 18:13:59 -04:00
Mathias Vorreiter Pedersen
79c0178a7c
Merge pull request #10564 from geoffw0/swiftregression
2022-09-23 22:05:46 +01:00
github-actions[bot]
6cef0af5df
Post-release preparation for codeql-cli-2.11.0
2022-09-23 21:01:40 +00:00
Geoffrey White
ed3d3e4ff0
Swift: fix regression.
2022-09-23 21:01:25 +01:00
Felicity Chapman
e96377572e
Merge pull request #10553 from github/8032-python-2-deprecation
...
Minor updates to reflect recommendations for Python support
2022-09-23 19:09:01 +01:00
Felicity Chapman
8920d73f38
Fix typo in footnote reference
2022-09-23 18:40:01 +01:00
Felicity Chapman
a7f23b9cc7
Minor updates to reflect recommendations for Python support
2022-09-23 18:40:01 +01:00
Alex Ford
d94b196843
Ruby: fix documentation
2022-09-23 16:56:33 +01:00
Mathias Vorreiter Pedersen
73f279d6e7
Merge pull request #10555 from MathiasVP/testcase-for-php-cve
...
C++: Fix missing bounds in range analysis
2022-09-23 16:55:51 +01:00
Robert Marsh
c2dfbd47a3
Merge pull request #10398 from MathiasVP/further-work-on-buffer-over-queries
...
C++: Further work on buffer-overflow queries
2022-09-23 11:06:32 -04:00
Henry Mercer
8f9dafcce9
Go: Use a consistent query identifier for successfully extracted files
...
Update the query identifier for
`Diagnostics/SuccessfullyExtractedFiles.ql` to be consistent with other
languages.
2022-09-23 16:02:36 +01:00
Alex Ford
364bc883ba
Ruby: add YAML.load_file as an unsafe deserialization sink
2022-09-23 15:54:15 +01:00
Ian Lynagh
8c13738199
Merge pull request #10556 from igfoo/igfoo/memo
...
Kotlin: Simplify trapFilePathForDecl
2022-09-23 14:59:20 +01:00
Dave Bartolomeo
87cc0481a0
Merge pull request #10543 from github/release-prep/2.11.0
...
Release preparation for version 2.11.0
2022-09-23 09:38:18 -04:00
Stephan Brandauer
33d30a0802
Merge pull request #10018 from github/new-atm-features-rebased
...
New atm features rebased
2022-09-23 15:29:50 +02:00
Dave Bartolomeo
55b1d89fd3
More relevant change note
2022-09-23 09:29:09 -04:00
Dave Bartolomeo
e695630822
More relevant change note
2022-09-23 09:28:50 -04:00
Dave Bartolomeo
85bfc1d79e
More relevant change note
2022-09-23 09:27:47 -04:00
Dave Bartolomeo
a792a7005b
More relevant change note
2022-09-23 09:27:19 -04:00
Michael Nebel
c3c90dd1b4
C#: Add change-note.
2022-09-23 14:56:33 +02:00
erik-krogh
96b46de7c8
update alert-messages based on review feedback
2022-09-23 14:53:54 +02:00
Mathias Vorreiter Pedersen
0a7be0bbb3
Merge pull request #10551 from erik-krogh/swift-followMsg
...
Swift: Add full stop at the end of alert-messages
2022-09-23 13:50:44 +01:00
erik-krogh
edd03020c2
fix the casing in the alert-message of cpp/unclear-array-index-validation
2022-09-23 14:48:01 +02:00
Mathias Vorreiter Pedersen
639aaff9c7
C++: Add more metadata.
2022-09-23 13:47:02 +01:00
erik-krogh
9e4843d53e
update the alert-message of cpp/file-may-not-be-closed based on feedback
2022-09-23 14:46:00 +02:00
erik-krogh
2351884352
update some alert-messages based on review feedback
2022-09-23 14:45:59 +02:00
erik-krogh
a3c051bf96
add change-note
2022-09-23 14:45:59 +02:00
erik-krogh
40bea78186
remove more instances of the alert-loc being repeated as a link
2022-09-23 14:45:59 +02:00
erik-krogh
d55993a37b
autoformat
2022-09-23 14:45:59 +02:00
erik-krogh
33165f4f55
CPP: update expected output
2022-09-23 14:45:59 +02:00
erik-krogh
a30c38f38c
CPP: make more alert messages follow the style-guide
2022-09-23 14:45:59 +02:00
luchua-bc
8effbff817
Remove unused code and update qldoc
2022-09-23 12:43:39 +00:00
Tamás Vajk
43ec5dcc9a
Merge pull request #10549 from tamasvajk/kotlin-fix-local-class-extraction
...
Kotlin: Fix non-nested local class extraction
2022-09-23 14:40:59 +02:00
Anders Schack-Mulligen
dcc3f9e0a2
Java: Improve performance of StaticInitializationVector.
2022-09-23 14:39:32 +02:00
luchua-bc
e33d786745
Add test cases and reduce FPs
2022-09-23 12:31:16 +00:00
luchua-bc
251f67dcf3
Use the new CSV model
2022-09-23 12:31:16 +00:00
luchua-bc
b3572747f0
Simplify test case and minor update to the query
2022-09-23 12:31:15 +00:00
luchua-bc
311c9e4719
Query to detect unsafe resource loading in Java Spring applications
2022-09-23 12:31:15 +00:00
Mathias Vorreiter Pedersen
ce3654c6ec
C++: Make ql-for-ql happy.
2022-09-23 13:07:07 +01:00
Mathias Vorreiter Pedersen
f3212fe01c
C++: Autoformat.
2022-09-23 13:00:22 +01:00
Mathias Vorreiter Pedersen
162ec2884e
C++: Also fix 'OverrunWriteProductFlow.ql'
2022-09-23 12:59:27 +01:00
Ian Lynagh
70dae17d2f
Kotlin: Simplify trapFilePathForDecl
2022-09-23 12:41:41 +01:00
Michael Nebel
342c8764ce
Merge pull request #10433 from michaelnebel/csharp/fix-joinorder-interpretedcallable
...
C#: Fix join order in InterpretedCallable characteristic predicate.
2022-09-23 13:37:49 +02:00
Mathias Vorreiter Pedersen
8056131901
C++: Autoformat.
2022-09-23 12:26:37 +01:00
Mathias Vorreiter Pedersen
494afdde96
C++: Accept test changes.
2022-09-23 12:21:31 +01:00
Mathias Vorreiter Pedersen
ac03242cfc
C++: Add an SSAVariable for pointer-arithmetic expressions in guards.
2022-09-23 12:21:31 +01:00
Michael Nebel
4963835772
Merge pull request #10540 from michaelnebel/csharp/dotnet-run-validate
...
C# Integration test validations for `dotnet run`.
2022-09-23 13:10:06 +02:00
Michael Nebel
9ace52114c
C#: Update expected test output.
2022-09-23 13:06:48 +02:00
Michael Nebel
6d4f1ebcc6
C#: Consider datetime expressions as simple sanitizers.
2022-09-23 13:04:47 +02:00
Michael Nebel
7c74cc6420
C#: Update expected test output - including false positive.
2022-09-23 13:04:04 +02:00
Michael Nebel
e45e06b675
C#: Add LogForging testcase based on ASP.NET.
2022-09-23 13:02:42 +02:00
Michael Nebel
39402b842e
C#: Add ASP.NET Core stubs to LogForging tests.
2022-09-23 12:59:15 +02:00
Michael Nebel
96a46a007f
C#: Use stubs in the CWE-117 LogForging test.
2022-09-23 12:49:12 +02:00
Mathias Vorreiter Pedersen
6d06234048
C++: Add testcase demonstrating missing result for 'cpp/invalid-pointer-deref' query.
2022-09-23 11:41:16 +01:00
erik-krogh
1fe76ecc0a
update expected output
2022-09-23 12:27:06 +02:00
erik-krogh
6c3ed6cd0e
update alert-messages to follow the style-guide
2022-09-23 12:23:40 +02:00
Rasmus Wriedt Larsen
71da217b82
Merge pull request #10535 from RasmusWL/flask-jsonify
...
Python: Model `flask.jsonify`
2022-09-23 12:18:27 +02:00
Asger F
11ba0f0bbe
Merge pull request #10253 from asgerf/js/type-defs-squashed
...
JS: Add generated typings to SQL models
2022-09-23 11:34:01 +02:00
Tamas Vajk
d6e31af985
Kotlin: Fix non-nested local class extraction
2022-09-23 11:23:21 +02:00
Tamas Vajk
b4eb4ec837
Kotlin: Add test case for top level local class extraction
2022-09-23 11:19:09 +02:00
Michael Nebel
1b25d23531
C#: Align comments and actual test case.
2022-09-23 11:05:29 +02:00
Tom Hvitved
f8d2e0e6a8
Ruby: Improve QL doc for Module::getASubClass
2022-09-23 10:40:38 +02:00
Tom Hvitved
8b424d181a
Merge pull request #10505 from hvitved/dataflow/viable-impl-in-ctx-consistency
...
Data flow: Guard against `viableImplInCallContext` not being a subset of `viableCallable`
2022-09-23 10:38:48 +02:00
Tom Hvitved
fa6da788dc
Ruby: Add call graph test for unsupported constructs
2022-09-23 10:24:43 +02:00
Stephan Brandauer
1bb781ad94
Merge branch 'main' into new-atm-features-rebased
2022-09-23 09:55:29 +02:00
Asger F
d1e19a313b
JS: Update test case to clarify choice of sinks
2022-09-23 09:18:15 +02:00
dependabot[bot]
5aecf0e31d
Bump actions/upload-artifact from 2 to 3
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-09-23 04:05:06 +00:00
github-actions[bot]
f5cf8cffa3
Release preparation for version 2.11.0
2022-09-22 20:14:12 +00:00
Chris Smowton
3fe1550943
Kotlin unit tests: use best plugin version compatible with environment kotlinc
2022-09-22 21:11:47 +01:00
Chris Smowton
cea90d535d
Disable Kotlin element of test library-tests/frameworks/android/widget
...
This is disabled for now because Kotlin doesn't extract java.lang.CharSequence.toString, even though that interface redeclares toString, and JDK18 points a call (syntactically to Editable.toString) that previous JDKs pointed at
Object.toString. This produces a database inconsistency that should be fixed Kotlin-side.
2022-09-22 20:44:37 +01:00
Dave Bartolomeo
cee0e8e137
Merge pull request #10532 from github/henrymercer/3.7-mergeback
...
Final mergeback from `rc/3.7`
2022-09-22 13:42:59 -04:00
Michael Nebel
faf33efeb8
C#: Improve join ordering further for InterpretedCallable.
2022-09-22 19:10:14 +02:00
Michael Nebel
d4f1fc7900
C#: Add some integration tests for 'dotnet run' and do some minor validation of the output.
2022-09-22 18:42:50 +02:00
Michael Nebel
c978798308
C#: Update test program to print a default message to standard out.
2022-09-22 18:41:46 +02:00
Mathias Vorreiter Pedersen
c4afb3a2b5
Merge branch 'main' into further-work-on-buffer-over-queries
2022-09-22 16:35:52 +01:00
Andrew Eisenberg
b58653eadc
Merge pull request #10458 from github/aeisenberg/qlpack-properties
...
Update qlpack properties descriptions
2022-09-22 07:54:17 -07:00
Tom Hvitved
9937ae8ef9
Ruby: Call sensitive instance method resolution
2022-09-22 16:22:31 +02:00
Mathias Vorreiter Pedersen
7272ca79fd
Merge pull request #10529 from erik-krogh/even-more-alerts
...
QL: A few more improvements to `ql/alert-message-style-violation`
2022-09-22 15:16:30 +01:00
Asger F
718649d505
Merge pull request #10490 from asgerf/js/remove-old-docs
...
JS: Remove old Portal-based flow summary implementation
2022-09-22 16:01:30 +02:00
Tom Hvitved
64978b0138
Ruby: Add data-flow test that demonstrates spurious flow
2022-09-22 15:18:42 +02:00
Tom Hvitved
914c711940
C#: Fix broken viableImplInCallContext implementation
2022-09-22 15:01:40 +02:00
Tom Hvitved
f4b82cb2e8
Python: Update expected test output
2022-09-22 15:01:40 +02:00
Tom Hvitved
7a694d5da5
C++: Update expected test output
2022-09-22 15:01:40 +02:00
Tom Hvitved
ad6b870f94
Data flow: Sync files
2022-09-22 15:01:33 +02:00
Rasmus Wriedt Larsen
d3f811cab3
Python: Accept any arg to flask.jsonify
...
Thanks @tausbn 👍
2022-09-22 14:59:06 +02:00
Erik Krogh Kristensen
2fe6d1f562
Merge pull request #10470 from erik-krogh/flowParse
...
JS: Try to parse files without using our parser extensions before enabling the extensions
2022-09-22 14:58:43 +02:00
Alex Ford
140458b7cc
Merge pull request #9932 from alexrford/ruby/rbi-typegraph-fixes
...
Ruby: RBI library changes to support models-as-data model generation
2022-09-22 13:55:33 +01:00
Rasmus Wriedt Larsen
8174120916
Python: Model flask.jsonify
2022-09-22 14:43:39 +02:00
erik-krogh
609ed709e2
use GVN to find detect when the alert-location is used as a link
2022-09-22 14:42:08 +02:00
erik-krogh
afdd7b0994
don't compute GVN for string constants of length more than 50, as this results in a infinite loop 😕
2022-09-22 14:41:21 +02:00
Rasmus Wriedt Larsen
078d3d0062
Python: Add stacktrace exposure example
2022-09-22 14:27:49 +02:00
Erik Krogh Kristensen
6e6880bbe4
Merge pull request #10486 from erik-krogh/java-unqueryable
...
Java: Delete some unused code
2022-09-22 14:21:39 +02:00
Michael Nebel
3d5767e723
C#: Make sure that dotnet clean also removes the bin and obj folders.
2022-09-22 14:01:53 +02:00
erik-krogh
a8929b6400
deprecate RegExpFlags::getFlags instead of deleting it
2022-09-22 13:43:42 +02:00
erik-krogh
b61bd56d70
un-deprecate guardControls_v2
2022-09-22 13:42:50 +02:00
Tom Hvitved
e4e9a2e1f9
Data flow: Guard against viableImplInCallContext not being a subset ofviableCallable
2022-09-22 13:37:59 +02:00
Tom Hvitved
f0f4fe7286
Merge pull request #10444 from hvitved/ruby/stmt-sequence-post-update
...
Ruby: Add post-update nodes for compound arguments
2022-09-22 13:18:51 +02:00
Henry Mercer
f8f99af8b7
Bump the minor version of packs we regularly release
2022-09-22 12:14:19 +01:00
erik-krogh
f404f1ddce
add change-note
2022-09-22 13:11:49 +02:00
Nick Rolfe
7d0bfe8f98
Merge pull request #10531 from github/nickrolfe/title-case
...
Ruby: use consistent capitalization with `import ... as`
2022-09-22 12:05:44 +01:00
Tom Hvitved
ad489155c4
Merge pull request #10469 from hvitved/csharp/dotnet-run-tracer-fix
...
C#: Prepend `-p:UseSharedCompilation=false` instead of append for `dotnet run`
2022-09-22 12:59:33 +02:00
Chris Smowton
adf5f18c03
Merge pull request #10530 from github/smowton/admin/kotlin-tolerate-beta-versions
...
Kotlin: Tolerate kotlinc versions like 1.7.20-Beta
2022-09-22 11:55:02 +01:00
James Fletcher
40f77b25d1
remove duplicated anchor to fix failing tests
2022-09-22 11:15:11 +01:00
Nick Rolfe
df8a182ac2
Ruby: use consistent capitalization with import ... as
2022-09-22 11:13:41 +01:00
Nick Rolfe
ee34ac5394
Merge pull request #10512 from github/nickrolfe/hash_from_trusted_xml
...
Ruby: add Hash.from_trusted_xml as an unsafe deserialization sink
2022-09-22 10:59:49 +01:00
Tom Hvitved
ac594842c8
Merge pull request #10504 from hvitved/ruby/private-methods
...
Ruby: Two fixes for `private` methods
2022-09-22 11:54:28 +02:00
AlexDenisov
26cf2b3bb1
Merge pull request #10522 from github/alexdenisov/switch-to-swift-5.7
...
Swift: update Swift frontend to 5.7
2022-09-22 11:53:04 +02:00
Tom Hvitved
10a584ffb9
Merge pull request #10517 from hvitved/ruby/regexp-debug
...
Ruby: Add query for debugging regexp flow
2022-09-22 11:50:50 +02:00
Henry Mercer
da272efe2d
Merge pull request #10527 from github/dependabot/github_actions/actions/stale-6
...
Bump actions/stale from 5 to 6
2022-09-22 10:31:17 +01:00
Asger F
df44076435
JS: Remove Portal-based flow summary implementation
2022-09-22 11:28:31 +02:00
Chris Smowton
c2656dd55f
Kotlin: Tolerate kotlinc versions like 1.7.20-Beta
2022-09-22 10:23:29 +01:00
Alex Denisov
b3ea537553
Swift: switch to python db schema
2022-09-22 11:17:14 +02:00
Alex Denisov
e4731fd41f
Swift: redirect more artfacts
2022-09-22 11:17:07 +02:00
Alex Denisov
d9cfd06a88
Swift: do not skip newly supported CLI args
2022-09-22 11:17:07 +02:00
Alex Denisov
44f4ff18dd
Swift: accept regression
2022-09-22 11:17:07 +02:00
Alex Denisov
ecb5708b66
Swift: fix static assert?
2022-09-22 11:17:07 +02:00
Alex Denisov
6a08b8dcfb
Swift: getSequence was renamed
2022-09-22 11:17:07 +02:00
Alex Denisov
b364647d76
Swift: add stubs for new exprs
2022-09-22 11:17:07 +02:00
Alex Denisov
d937234f83
Swift: add stubs for new types
2022-09-22 11:17:07 +02:00
Alex Denisov
13fe02edfa
Swift: NestedArchetypeType was removed
2022-09-22 11:17:04 +02:00
Alex Denisov
61d5cdc421
Swift: update Swift package to 5.7
2022-09-22 11:16:56 +02:00
Paolo Tranquilli
f3cc6ae5df
Merge pull request #10516 from github/redsun82/swift-python-schema
...
Swift: express the schema in Python
2022-09-22 11:12:27 +02:00
erik-krogh
1fbfcc1e91
add TODOs in the ql/alert-message-style-violation query
2022-09-22 07:02:38 +02:00
erik-krogh
76fef28c32
don't repeat the alert-location as a link
2022-09-22 07:02:36 +02:00
erik-krogh
88439fc61c
only report alert-message style-violations on problem/path-problem queries
2022-09-22 07:02:33 +02:00
dependabot[bot]
f63381b98a
Bump actions/stale from 5 to 6
...
Bumps [actions/stale](https://github.com/actions/stale ) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases )
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/stale/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: actions/stale
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-09-22 03:58:17 +00:00
Andrew Eisenberg
a09e27f863
Merge branch 'main' into aeisenberg/update-analyzing-databases
2022-09-21 14:40:27 -07:00
Andrew Eisenberg
48f938ef26
Merge pull request #10500 from github/aeisenberg/query-spec-path
...
Update section on query specifiers
2022-09-21 13:02:30 -07:00
Andrew Eisenberg
6fb3574c5c
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
2022-09-21 12:48:17 -07:00
Tom Hvitved
659f1cc6c7
C#: Add integration tests for dotnet run
2022-09-21 19:43:04 +02:00
Tom Hvitved
cc09a79cfa
C#: Prepend -p:UseSharedCompilation=false instead of append for dotnet run
2022-09-21 19:42:58 +02:00
Tom Hvitved
47411e3548
Ruby: Add query for debugging regexp flow
2022-09-21 19:22:10 +02:00
Erik Krogh Kristensen
0cae6deb27
Merge pull request #10513 from erik-krogh/more-alert-style
...
QL: improve the `ql/alert-message-style-violation` query.
2022-09-21 19:08:19 +02:00
Robert Marsh
32ab636c77
C++: adjust test so size flows from malloc to field
2022-09-21 12:43:44 -04:00
Robert Marsh
fcd0bb13b3
C++: add paths to ArrayAccessProductFlow
2022-09-21 12:37:31 -04:00
Erik Krogh Kristensen
1bdb6b45f8
fix typo
...
Co-authored-by: Taus <tausbn@github.com >
2022-09-21 18:14:00 +02:00
Andrew Eisenberg
260a3004f4
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
2022-09-21 09:04:07 -07:00
Paolo Tranquilli
3983c36cb2
Swift: avoid inheriting annotations
2022-09-21 18:02:09 +02:00
Paolo Tranquilli
a67341c53b
Revert "Swift: make unknown entity type check more solid"
...
This reverts commit b52a4e19c1 .
2022-09-21 18:01:59 +02:00
Joe Farebrother
2414239e50
Fix qhelp formatting
2022-09-21 16:36:20 +01:00
erik-krogh
41c1e1a4c6
get the message, and not just the second select expression
2022-09-21 17:23:59 +02:00
erik-krogh
b61e094a86
recognize @kinds with a dash
2022-09-21 17:23:25 +02:00
Andrew Eisenberg
7607e67d59
Apply suggestions from code review
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-09-21 08:20:54 -07:00
Tamas Vajk
633f99df6c
Kotlin: Fix comment extraction for anonymous objects
2022-09-21 17:15:11 +02:00
Tamas Vajk
7927e1dcd4
Kotlin: Add test case for comment on an anonymous object
2022-09-21 17:12:19 +02:00
Andrew Eisenberg
99e8cb78b0
Merge pull request #10496 from aeisenberg/aeisenberg/merge-rc3.7-into-main
...
Aeisenberg/merge rc3.7 into main
2022-09-21 08:09:47 -07:00
Paolo Tranquilli
b52a4e19c1
Swift: make unknown entity type check more solid
2022-09-21 16:44:34 +02:00
Paolo Tranquilli
fd63bab054
Swift: autopep8 test_schema.py
2022-09-21 16:15:52 +02:00
Paolo Tranquilli
163d1717d7
Swift: autopep8
2022-09-21 16:11:40 +02:00
Paolo Tranquilli
28a2aade21
Swift: undo double newlines in schema.py
2022-09-21 16:03:37 +02:00
Paolo Tranquilli
96897a0cdc
Swift: implement python schema
...
The information that was contained in `schema.yml` is now in
`swift/schema.py`, which allows a more integrated IDE experience
for writing and navigating it.
Another minor change is that `schema.Class` now has a `str` `group`
field instead of a `pathlib.Path` `dir` one.
2022-09-21 15:53:09 +02:00
Paolo Tranquilli
caaf9e7ff3
Swift: reorganize schema lib files
2022-09-21 15:50:26 +02:00
Paolo Tranquilli
b0e7dfcbdf
Swift: python schema mock-up
2022-09-21 15:39:18 +02:00
Alex Ford
260db1aea2
Ruby: drop getAQualifiedName predicate from ConstantAccess
2022-09-21 14:28:43 +01:00
Joe Farebrother
eb3655da1c
Remove type check from the barrier predicate
2022-09-21 13:57:32 +01:00
Joe Farebrother
ed8ec89497
Reword suggestion on using debug flags
2022-09-21 13:57:31 +01:00
Joe Farebrother
44bd038339
Apply docs suggestions from code review
...
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com >
2022-09-21 13:57:31 +01:00
Joe Farebrother
a6a500ade2
Apply suggestions from code review - doc improvements, simplification
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-09-21 13:57:31 +01:00
Joe Farebrother
6014a75e0e
Fix qhelp
2022-09-21 13:57:30 +01:00
Joe Farebrother
eed2df0fb3
Fix qhelp & ql-for-ql errors
2022-09-21 13:57:30 +01:00
Joe Farebrother
414e0b20b3
Add change note
2022-09-21 13:57:30 +01:00
Joe Farebrother
f934554143
Add docs + add an additional case
2022-09-21 13:57:29 +01:00
Joe Farebrother
b3d9d08750
Add tests
2022-09-21 13:57:29 +01:00
Joe Farebrother
d32540469b
Moved existing tests to subdirectory
2022-09-21 13:57:28 +01:00
Joe Farebrother
20b2956322
Add webview debugging query
2022-09-21 13:57:28 +01:00
Alex Ford
3bbb166642
Ruby: handle block param types more neatly
2022-09-21 13:52:19 +01:00
Tamás Vajk
82c3e53694
Merge pull request #10473 from tamasvajk/kotlin-suspend
...
Kotlin: Extract `suspend` functions
2022-09-21 14:22:44 +02:00
Mathias Vorreiter Pedersen
25d1098b4d
Merge pull request #10511 from github/redsun82/swift-ifconfigdecl-ql
...
Swift: fix `IfConfigDecl` in QL libraries
2022-09-21 13:15:27 +01:00
Ian Lynagh
46a23e107b
Merge pull request #10495 from igfoo/igfoo/traplocker
...
Kotlin: Tidy up TrapLocker
2022-09-21 13:05:58 +01:00
Ian Lynagh
aaa3fc0b5c
Merge pull request #10353 from tamasvajk/kotlin-fix-not-implemented
...
Kotlin: Catch exception thrown by kotlinc
2022-09-21 13:05:41 +01:00
erik-krogh
362ee71f6a
recognize alert messages defined in the where clause
2022-09-21 14:03:16 +02:00
erik-krogh
84aee871fe
find more cases of alert messages starting with a lower-case letter, or not ending with a full stop
2022-09-21 14:03:14 +02:00
erik-krogh
b87befcc36
add check for double-whitespace in alert-messages
2022-09-21 14:03:10 +02:00
Nick Rolfe
2edbc16829
Ruby: add Hash.from_trusted_xml as an unsafe deserialization sink
2022-09-21 13:01:21 +01:00
Tom Hvitved
61e9c6f658
Ruby: Fix call graph for overridden private methods
2022-09-21 14:00:17 +02:00
Tom Hvitved
e7649fc61a
Ruby: Fix ModuleBase::get(A)Method for private methods
2022-09-21 14:00:17 +02:00
Tom Hvitved
37a2b7d0b3
Ruby: Add more call graph tests for private methods
2022-09-21 14:00:17 +02:00
Paolo Tranquilli
935d5d9619
Merge branch 'main' into redsun82/swift-ifconfigdecl-ql
2022-09-21 13:21:08 +02:00
Paolo Tranquilli
86895393e0
Merge pull request #10488 from github/alexdenisov/skip-another-cli-arg
...
Swift: skip one more unsupported CLI arg
2022-09-21 13:20:03 +02:00
Tom Hvitved
a9f2e5272f
Merge pull request #10376 from hvitved/ruby/no-ast-by-default
...
Ruby: Do not expose AST layer through `ruby.qll`
2022-09-21 13:15:30 +02:00
Michael Nebel
e53382cffa
Merge pull request #10465 from michaelnebel/csharp/integration-tests
...
C#: Integration test(s)
2022-09-21 12:24:54 +02:00
Paolo Tranquilli
76dfcad26e
Merge pull request #10508 from github/redsun82/swift-early-toposort
...
Swift: move toposort in `schema.py`
2022-09-21 12:17:53 +02:00
Paolo Tranquilli
239ec74c3a
Revert accidental file change
2022-09-21 12:16:57 +02:00
Paolo Tranquilli
69dfdf5a34
Swift: fix IfConfigDecl in QL libraries
...
This fixes `IfConfigDecl` for both the AST printer and control flow
libraries.
It turns out that the active lements of an `IfConfigDecl` are already
listed in the enclosing scope (like a `BraceStmt`), so they should not
be listed as children, and `IfConfigDecl` can be jsut a leaf in the
control flow.
2022-09-21 12:12:55 +02:00
Geoffrey White
ce979d82d9
Merge pull request #10300 from geoffw0/cleartext-perf
...
C++: Multiple minor improvements to the cpp/cleartext-* queries
2022-09-21 11:07:51 +01:00
Tom Hvitved
0064451ff0
Merge pull request #10491 from hvitved/ruby/fix-bad-join
...
Ruby: Fix bad join-order
2022-09-21 11:13:09 +02:00
Michael Nebel
d29bc683dc
C#: Integration test for 'dotnet test'.
2022-09-21 11:03:45 +02:00
Michael Nebel
a5034c5109
C#: Integration test for 'dotnet pack'.
2022-09-21 11:03:45 +02:00
Michael Nebel
5572a039b1
C#: Integration test for 'dotnet publish'.
2022-09-21 11:03:45 +02:00
Tom Hvitved
07f8b35af0
Data flow: Update documentation
2022-09-21 11:02:24 +02:00
Tom Hvitved
db8b6ac69a
Data flow: Sync files
2022-09-21 11:02:24 +02:00
Tom Hvitved
59caa977d0
Ruby: Add post-update nodes for compound arguments
2022-09-21 11:02:24 +02:00
Paolo Tranquilli
a50f3f752b
Swift: move toposort in schema.py
...
This makes the result of code generation independent of the order
in which classes are defined in the schema, and makes additional
topological sorting not required.
Being independent from schema order will be important for reviewing the
move to a pure python schema, as generated code will be left untouched.
2022-09-21 10:49:12 +02:00
Erik Krogh Kristensen
5af739d920
Merge pull request #10413 from erik-krogh/go-followMsg
...
GO: make the alert messages of taint-tracking queries more consistent
2022-09-21 10:39:27 +02:00
Tom Hvitved
1f4573cf25
Ruby: Add more field flow tests
2022-09-21 10:32:38 +02:00
Tamas Vajk
01a2d16974
Kotlin: Fix type access expressions in enum constructor calls
2022-09-21 10:32:27 +02:00
Tony Torralba
9979fa3f36
Merge pull request #10501 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-09-21 09:10:09 +02:00
github-actions[bot]
84159317ee
Add changed framework coverage reports
2022-09-21 00:22:14 +00:00
Andrew Eisenberg
4faf71a966
Update section on query specifiers
2022-09-20 15:55:06 -07:00
Marcono1234
431aa2cb79
Java: Add CompilationUnit.getATypeAvailableBySimpleName()
...
This predicate is mainly helpful for Javadoc queries and for queries which
check whether the name of an element shadows another type.
2022-09-20 23:15:50 +02:00
Erik Krogh Kristensen
7e17a919ae
Merge pull request #10304 from erik-krogh/rb-followMsg
...
RB: make the alert messages of taint-tracking queries more consistent
2022-09-20 22:58:31 +02:00
erik-krogh
175d3acf4d
reword alert-message go/user-controlled-bypass to avoid using "here"
2022-09-20 22:51:35 +02:00
erik-krogh
83bedc0320
be more specific about what the source is in go/suspicious-character-in-regex, which also avoids using "here" in the alert-message
2022-09-20 22:51:35 +02:00
erik-krogh
1be14962a0
use "depends to" for a taint-tracking query
2022-09-20 22:51:35 +02:00
erik-krogh
c241185c21
avoid more instances of "this location" and "here" in alert-messages
2022-09-20 22:51:35 +02:00
erik-krogh
2602a38d94
update expected test output
2022-09-20 22:51:35 +02:00
erik-krogh
3cf5516df6
make the alert messages of taint-tracking queries more consistent
2022-09-20 22:51:35 +02:00
erik-krogh
e2a41cf49f
fix most ql/alert-message-style-violation
2022-09-20 22:51:35 +02:00
Andrew Eisenberg
58e4861b45
Merge branch 'main' into rc/3.7
2022-09-20 12:43:20 -07:00
yoff
18a8a3332d
Merge pull request #10494 from RasmusWL/tarslip-test-imports
...
Python: Fix imports for tarslip tests
2022-09-20 20:04:14 +02:00
yoff
6b589c5d5d
Merge pull request #10387 from RasmusWL/getStarArg-always-first
...
Python: `getStarArg` gives first `*args` argument
2022-09-20 20:01:07 +02:00
Geoffrey White
9ddb485405
Merge branch 'main' into cleartext-perf
2022-09-20 17:56:18 +01:00
Rasmus Wriedt Larsen
253d9cf39f
Python: Fix imports for tarslip tests
...
This doesn't change results, but makes the test-code more valid
2022-09-20 17:25:46 +02:00
Mathias Vorreiter Pedersen
b49487cf42
Merge pull request #10386 from github/redsun82/swift-do-not-extract-inactive-ifconfig-clauses
...
Swift: do not extract unresolved things from `IfConfigDecl`
2022-09-20 15:57:47 +01:00
Harry Maclean
d9487a07b1
Ruby: Make helper predicate private
2022-09-20 15:55:35 +01:00
Harry Maclean
6d3f87f610
Ruby: Small fixes
2022-09-20 15:55:35 +01:00
Harry Maclean
bc1723c0ee
Fix typos
2022-09-20 15:55:35 +01:00
Harry Maclean
cdc640b544
Revert "Ruby: Allow custom edges in API graph EntryPoints"
...
This reverts commit ab061fb1e1d21877fc817c4c66b48fb2d3650fa8.
2022-09-20 15:55:35 +01:00
Harry Maclean
d5ef853343
Ruby: Remove ActiveStorage entry points
2022-09-20 15:55:35 +01:00
Harry Maclean
54b05e48a9
Ruby: Add change note
2022-09-20 15:55:35 +01:00
Harry Maclean
d68674a660
Ruby: disable problematic MaD path
2022-09-20 15:55:35 +01:00
Harry Maclean
ba5cd08a09
Update ActionController fixture
2022-09-20 15:55:35 +01:00
Harry Maclean
c97fadd7a3
Fix version number.
2022-09-20 15:55:35 +01:00
Harry Maclean
24b582d77a
Add missing QLDoc
2022-09-20 15:55:34 +01:00
Harry Maclean
96a34c3690
QL4QL fix
2022-09-20 15:55:34 +01:00
Harry Maclean
53a34174b9
Model ActiveStorage
2022-09-20 15:55:34 +01:00
Harry Maclean
39a1cf5bd8
Ruby: Allow custom edges in API graph EntryPoints
2022-09-20 15:55:34 +01:00
Paolo Tranquilli
0f74674319
Merge pull request #10492 from github/redsun82/bazel-codeowners
...
Bazel: add some bazel files to `CODEOWNERS`
2022-09-20 16:50:37 +02:00
Mathias Vorreiter Pedersen
9d50fc6aa3
Merge pull request #10487 from MathiasVP/fix-identical-files-for-cpp
...
C++: Add shared files in `experimental` to `identical-files.json`.
2022-09-20 15:43:43 +01:00
Paolo Tranquilli
5df4ca808f
Bazel: add some bazel files to CODEOWNERS
2022-09-20 16:31:05 +02:00
Tom Hvitved
2677ab6b19
Ruby: Fix bad join-order
...
Before
```
Evaluated relational algebra for predicate Module#fe82a56b::lookupMethodOrConst0#2#fff#antijoin_rhs@e23c32nf with tuple counts:
118006 ~0% {3} r1 = SCAN Module#fe82a56b::getMethodOrConst#2#fff OUTPUT In.1, In.0, In.2
35267848 ~3% {4} r2 = JOIN r1 WITH project#Module#fe82a56b::getMethodOrConst#2#fff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.2, Rhs.1
21883 ~0% {5} r3 = JOIN r2 WITH Module#fe82a56b::Cached::getAPrependedModule#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.3, Lhs.0, Lhs.1, Lhs.2
7 ~16% {3} r4 = JOIN r3 WITH Module#fe82a56b::getAncestors#1#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.4
return r4
```
After
```
Evaluated relational algebra for predicate Module#fe82a56b::lookupMethodOrConst0#2#fff#antijoin_rhs@839f6a1k with tuple counts:
118006 ~1% {3} r1 = SCAN Module#fe82a56b::getMethodOrConst#2#fff OUTPUT In.0, In.2, In.1
151 ~0% {4} r2 = JOIN r1 WITH Module#fe82a56b::Cached::getAPrependedModule#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2
155 ~1% {4} r3 = JOIN r2 WITH Module#fe82a56b::getAncestors#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.3, Lhs.1, Lhs.2
7 ~0% {3} r4 = JOIN r3 WITH project#Module#fe82a56b::getMethodOrConst#2#fff ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.1
return r4
```
2022-09-20 16:24:39 +02:00
Ian Lynagh
6e249dad7f
Kotlin: TrapLocker: Pass the TRAP file to be opened
...
We already know what it is, as we've just locked it.
2022-09-20 15:12:58 +01:00
Erik Krogh Kristensen
0720fa75df
Merge pull request #10286 from erik-krogh/js-followMsg
...
JS: change alert messages of path queries to use the same template
2022-09-20 16:12:45 +02:00
Tony Torralba
cbb64cc8c1
Merge pull request #10352 from atorralba/atorralba/promote-template-injection
...
Java: Promote Server-side template injection from experimental
2022-09-20 16:11:58 +02:00
Ian Lynagh
2731740c67
Kotlin: TrapLocker: Remove unused isNonSourceTrapFile
2022-09-20 15:07:35 +01:00
Paolo Tranquilli
b4df557c5a
Merge branch 'main' into redsun82/swift-do-not-extract-inactive-ifconfig-clauses
2022-09-20 15:41:34 +02:00
Paolo Tranquilli
3fd8136dc7
Swift: accept test results
2022-09-20 15:37:09 +02:00
AlexDenisov
4614074d01
Merge pull request #10452 from github/alexdenisov/remove-swift-vfs
...
Swift: remove (dead) VFS related code
2022-09-20 15:36:58 +02:00
Paolo Tranquilli
d0e3edf7ad
Merge pull request #10482 from github/redsun82/swift-action-triggers
...
Swift: trigger workflows on bazel changes
2022-09-20 15:33:33 +02:00
Tom Hvitved
647397759e
Merge pull request #10336 from hvitved/ruby/call-graph-rework
...
Ruby: Rework call graph implementation
2022-09-20 15:29:40 +02:00
Paolo Tranquilli
250965b140
Swift: update extractor for TypeRepr changes
2022-09-20 15:24:51 +02:00
Mathias Vorreiter Pedersen
90f24d3e82
Merge pull request #10430 from geoffw0/cleartextmissing
...
Swift: Fix missing results in swift/cleartext-storage-database
2022-09-20 14:23:29 +01:00
Paolo Tranquilli
dfc91bb0f0
Swift: make type non optional in TypeRepr
2022-09-20 15:23:27 +02:00
Paolo Tranquilli
72a4bd3f1e
Swift: group unresolved elements and remove their tests
2022-09-20 15:22:20 +02:00
Nick Rolfe
30b54b2abe
Merge pull request #10450 from github/nickrolfe/filesystemresolver
...
Ruby: model ActionView::FileSystemResolver as a FileSystemAccess
2022-09-20 14:21:28 +01:00
Paolo Tranquilli
0e62d6f123
Swift: update extractor to new IfConfigDecl
2022-09-20 15:12:37 +02:00
Paolo Tranquilli
7ae68fcc03
Swift: rework IfConfigDecl schema
2022-09-20 15:11:58 +02:00
Alex Denisov
c020bee529
Swift: remove VFS related code
2022-09-20 15:06:25 +02:00
Alex Denisov
dafa9d24f1
Swift: skip one more unsupported CLI arg
2022-09-20 15:04:54 +02:00
Mathias Vorreiter Pedersen
74ccec75c8
C++: Sync identical files.
2022-09-20 13:37:54 +01:00
Mathias Vorreiter Pedersen
351e517786
Update config/identical-files.json
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-09-20 13:34:31 +01:00
Paolo Tranquilli
9fb4ff70b4
Merge branch 'main' into redsun82/swift-action-triggers
2022-09-20 14:23:22 +02:00
Asger F
0294444054
JS: Remove docs for the old portal-based flow summaries
2022-09-20 14:20:46 +02:00
yoff
ea743173d5
Merge pull request #8781 from yoff/python-dataflow/flow-summaries-from-scratch
...
Python dataflow: flow summaries restart
2022-09-20 14:08:31 +02:00
Mathias Vorreiter Pedersen
79654d978d
C++: Sync identical files.
2022-09-20 12:57:21 +01:00
Mathias Vorreiter Pedersen
e661c981e4
C++: Add shared files in experimental to 'identical-files.json'.
2022-09-20 12:53:43 +01:00
AlexDenisov
805aa94799
Merge pull request #10485 from github/redsun82/swift-fix-version-in-integration-tests
...
Swift: fix version in integration tests
2022-09-20 13:44:50 +02:00
Rasmus Lerchedahl Petersen
318e3290f2
Python: use "extracted" instead of "source"
...
The precedence for the use of "source" to denote elements of source code
is found in `EssaVariable::getSourceVariable` as well as in the Ruby
code base. But it clashes with the many uses of source to mean
"source of flow" found in the data flow library.
2022-09-20 13:26:04 +02:00
Erik Krogh Kristensen
38b23f1bc1
Merge pull request #10471 from erik-krogh/tooRacy
...
JS: filter out "file read after existence check" from js/file-system-race
2022-09-20 13:22:06 +02:00
Erik Krogh Kristensen
72d326126a
Merge pull request #10476 from erik-krogh/ruby-unqueryable
...
ruby: remove unused predicate from NfaUtilsSpecific
2022-09-20 13:21:44 +02:00
Geoffrey White
3573dd6728
Swift: Address review comments.
2022-09-20 12:17:21 +01:00
Paolo Tranquilli
45fc1d5cdf
Swift: fix version in integration tests
2022-09-20 12:51:48 +02:00
Chris Smowton
f826342112
Merge pull request #6246 from Marcono1234/marcono1234/annotation-improvements
...
Java: Improve and add predicates and classes for annotations
2022-09-20 11:48:29 +01:00
Rasmus Lerchedahl Petersen
9a7afa9d8d
Python: more idiomatic cartesian product
2022-09-20 12:47:56 +02:00
erik-krogh
70eced62b6
delete unused predicate that couldn't be imported from outside the folder
2022-09-20 12:40:39 +02:00
erik-krogh
8eefa4c1b0
deprecate internal predicate that was never used
2022-09-20 12:39:41 +02:00
erik-krogh
bec381a1dc
remove unused predicate from NfaUtilsSpecific.qll
2022-09-20 12:38:34 +02:00
Erik Krogh Kristensen
91f9e89e95
Merge pull request #10405 from erik-krogh/styleGuide
...
update the style guide on alert-messages
2022-09-20 12:13:32 +02:00
Erik Krogh Kristensen
cd71546915
Merge pull request #10475 from erik-krogh/go-unqueryable
...
Go: Fix source/sanitizer class that were never used
2022-09-20 12:12:33 +02:00
Erik Krogh Kristensen
d1e662dff4
Merge pull request #10472 from erik-krogh/rename
...
JS: don't mention classes that don't exist in TaintTracking.qll
2022-09-20 12:08:15 +02:00
Tony Torralba
4af29e6abf
Update java/ql/src/Security/CWE/CWE-094/TemplateInjection.qhelp
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-09-20 11:48:40 +02:00
Tony Torralba
4997f36f05
Apply suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-09-20 11:48:18 +02:00
Asger F
51618b46a8
Sync ApiGraphModels.qll
2022-09-20 11:47:37 +02:00
Chris Smowton
6b9d546eaf
Merge pull request #10457 from github/smowton/fix/java-really-unique-fixedHasLocation
...
Java: really return a unique location for non-source entities
2022-09-20 10:46:45 +01:00
Mathias Vorreiter Pedersen
7c41219376
Merge pull request #10438 from MathiasVP/invalid-pointer-deref-query
...
C++: Add a `cpp/invalid-pointer-deref` query to experimental
2022-09-20 10:41:31 +01:00
Asger F
2fc5961b10
JS: Restrict where sub path edges are computed
2022-09-20 11:40:17 +02:00
Asger F
2c3d1de2c7
JS: Add change note
2022-09-20 11:40:17 +02:00
Asger F
0ec8c2f035
JS: fix spanner test
2022-09-20 11:40:17 +02:00
Asger F
b545bbb477
JS: Update NodeOfType test
2022-09-20 11:40:17 +02:00
Asger F
baa559e696
JS: Fix a hole in the sequelize-typescript typings
2022-09-20 11:40:17 +02:00
Asger F
47f1d62569
JS: Add generated typings to SQL models
2022-09-20 11:40:16 +02:00
Chris Smowton
14fa6d4487
Avoid deprecated Annotation.getAValue
2022-09-20 10:15:23 +01:00
AlexDenisov
addab0964f
Merge pull request #10447 from github/alexdenisov/open-interception
...
Swift: open(2) interception
2022-09-20 10:47:58 +02:00
Paolo Tranquilli
9d3039f2b1
Swift: trigger workflows on bazel changes
...
The `*.bazel*` trigger currently matches
* `.bazelrc`
* `.bazelversion`
* `WORKSPACE.bazel`
* `BUILD.bazel`
It will match `MODULE.bazel` as well when we add that.
2022-09-20 10:44:16 +02:00
Michael Nebel
eefe457c4b
Merge pull request #10238 from michaelnebel/csharp/theoremsforfree
...
C#: Theorems for Free - Model generation
2022-09-20 09:30:10 +02:00
Alex Denisov
9401eda8da
Swift: use http_archive instead of new_git_repository since it's faster
2022-09-20 08:38:27 +02:00
Alex Ford
52305da5a3
Ruby: move string getAQualifiedName() up to ConstantAccess
2022-09-19 21:03:05 +01:00
Alex Ford
d00c9ea2c8
Ruby: RBI library improvements, mostly for parameter types
2022-09-19 21:03:05 +01:00
Alex Ford
8d264e7e65
Ruby: add ConstanReadAcess#getAQualifiedName() predicate
2022-09-19 21:03:05 +01:00
Andrew Eisenberg
714e95ea57
Merge pull request #10468 from github/aeisenberg/docs-redirect
2022-09-19 12:27:04 -07:00
Tom Hvitved
01a043ddbd
Merge pull request #10464 from michaelnebel/csharp/remove-dotnet-run-support
...
C#: Remove `dotnet run` support in LUA tracer.
2022-09-19 20:25:54 +02:00
Michael Nebel
6e3bc38acf
C#: Fix minor issues in QL doc.
2022-09-19 16:03:50 +02:00
erik-krogh
0645b11cb1
ruby: remove unused predicate from NfaUtilsSpecific
2022-09-19 15:25:00 +02:00
erik-krogh
49d1e584a8
deprecate a source class that wasn't used anywhere
2022-09-19 15:07:18 +02:00
erik-krogh
f6ada6e022
use sanitizer class in the insecure-randomness query
2022-09-19 15:07:00 +02:00
Rasmus Wriedt Larsen
556e93ae68
Merge pull request #10384 from RasmusWL/callnode-getargbyname
...
Python: Allow `CallNode.getArgByName` for keyword args after `**kwargs`
2022-09-19 15:05:59 +02:00
yoff
f7cbcb2fef
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-09-19 14:52:18 +02:00
Rasmus Lerchedahl Petersen
6377e6c575
Python: move summary to Stdlib.qll
2022-09-19 14:36:36 +02:00
Rasmus Lerchedahl Petersen
f560719a88
Python: expand comment on flow summaries
2022-09-19 14:30:53 +02:00
Tom Hvitved
bb08e6f0fd
Ruby: Three call graph fixes for singleton methods
2022-09-19 14:20:12 +02:00
Tom Hvitved
d13332cff1
Ruby: Add more call graph tests
2022-09-19 14:19:25 +02:00
Rasmus Lerchedahl Petersen
da39c14e46
Python: comment out SummarizedCallableFromModel
2022-09-19 14:06:21 +02:00
Rasmus Lerchedahl Petersen
37fb27fa1c
Python: change type of LibraryCallable::getACall
...
The other callables return control flow nodes,
so it is slightly inconsistent for this to return a
data flow node, but it does make models based
on API graphs nicer.
2022-09-19 14:02:52 +02:00
Tamas Vajk
9a6b17df0e
Kotlin: Add async-await dataflow test case
2022-09-19 13:38:48 +02:00
Tamas Vajk
85d883c647
Kotlin: add test to show suspend function inconsistency between source and bytecode extraction
2022-09-19 13:38:43 +02:00
erik-krogh
58851aefd6
don't mention classes that don't exist in TaintTracking.qll
2022-09-19 13:37:06 +02:00
Tamas Vajk
a6e44ed1cf
Kotlin: extract suspend modifier and handle suspend SAM conversions
2022-09-19 13:36:28 +02:00
Tamas Vajk
3e58605e8e
Kotlin: Add tests with suspend functions
2022-09-19 13:28:20 +02:00
erik-krogh
fb5a04a71d
filter out "file read after existence check" from js/file-system-race
2022-09-19 13:26:10 +02:00
Tamas Vajk
aae8f393fe
Kotlin: Adjust test to reduce overhead of listing modifiers of lambdas
2022-09-19 13:22:00 +02:00
erik-krogh
ccae0933c7
try to parse JS files without using the supported extensions
2022-09-19 12:20:20 +02:00
erik-krogh
a16233aa7d
add failing parse test
2022-09-19 12:16:45 +02:00
Michael Nebel
d0c6837a79
C#: Do not recognize 'run' as supported dotnet command for tracing.
2022-09-19 11:37:46 +02:00
Erik Krogh Kristensen
a4cd913aea
Merge pull request #10312 from erik-krogh/fix-caseDiff
...
ensure consistent casing of names
2022-09-19 10:43:12 +02:00
Alex Denisov
3c12644ab1
Swift: add a guard around hashing to aboid use-after-destructor
2022-09-19 10:37:26 +02:00
CodeQL CI
b48808778f
Merge pull request #10264 from yoff/python/port-RaisesTuple
...
Approved by tausbn
2022-09-19 00:51:29 -07:00
CodeQL CI
ed4b64b1c4
Merge pull request #10265 from yoff/python/port-UnguardedNextInGenerator
...
Approved by tausbn
2022-09-19 00:50:52 -07:00
CodeQL CI
36f8b0554d
Merge pull request #10266 from yoff/python/port-CatchingBaseException
...
Approved by tausbn
2022-09-19 00:50:05 -07:00
Asger F
ab296d4d62
Merge pull request #10396 from asgerf/js/regexp-always-matches-fp
...
JS: Fix FP in js/regexp/always-matches
2022-09-19 09:32:00 +02:00
Andrew Eisenberg
e6eaf37e22
Add redirect for removed 'About QL packs' article
...
Note that sphinx gives an error if you have a document to build that
is not part of a toctree. In order to avoid this error and not show
the document in any toctree that users will see, I added a hidden
toctree to the redirect article.
2022-09-18 10:45:59 -07:00
Tom Hvitved
a8cc669251
Ruby: Address review comments
2022-09-18 19:34:54 +02:00
Tom Hvitved
9004e82820
Ruby: Add another call graph test
2022-09-18 19:34:00 +02:00
Mathias Vorreiter Pedersen
02076074ff
C++: Add more comments.
2022-09-18 12:48:13 +01:00
Mathias Vorreiter Pedersen
3e6576bfaf
C++: Add example of missing result.
2022-09-18 12:18:04 +01:00
Mathias Vorreiter Pedersen
d1cf688abf
C++: Fix test function naming.
2022-09-18 12:17:46 +01:00
Mathias Vorreiter Pedersen
78535dc70b
C++: Autoformat.
2022-09-18 12:02:32 +01:00
Michael Nebel
a464e5be72
C#: Address review comments.
2022-09-17 13:51:03 +02:00
Andrew Eisenberg
13d4c4a5b9
Merge pull request #10460 from github/aeisenberg/lang-spec-packs
...
Updates the library path section of the CodeQL spec
2022-09-16 15:01:43 -07:00
Andrew Eisenberg
867e31693d
Updates the library path section of the CodeQL spec
...
- Remove references to `queries.xml`. It is still supported, but we
don't want people using it.
- Add reference to `codeql-pack.yml`. It is just an alias for
`qlpack.yml` and not being used.
- Remove reference to `libraryPathDependencies` and use `dependencies`
instead.
Note that this section does not give a complete description of library
paths. That will be a part of the "Developing a codeql pack" article
that is forthcoming.
2022-09-16 14:31:17 -07:00
Andrew Eisenberg
027365c246
Update the analyze databases article
...
This change updates the analyze databases article to clarify examples.
It reorganizes to put packs examples first and rearranges a few
paragraphs.
2022-09-16 14:05:28 -07:00
Andrew Eisenberg
bbf09c8f8a
Update qlpack properties descriptions
...
Makes table easier to read.
2022-09-16 12:53:27 -07:00
Tom Hvitved
29bfb4d185
Ruby: Revert changes to isLocalSourceNode and localFlowStepTypeTracker
...
Instead, use small-step type tracking, as suggested by @rasmuswl offline.
2022-09-16 19:38:26 +02:00
Chris Smowton
3fa1f17b83
Java: really return a unique location for non-source entities
...
This was always supposed to pick one of several candidate non-source locations (usually for a generic type instantiation), but since `getFile().toString()` just produces the basename of the class file actually the results would almost always tie and all of the candidate locations would be returned. Use the full class file path as a tiebreaker instead.
2022-09-16 18:23:31 +01:00
Ian Lynagh
4a4cd8a770
Merge pull request #10456 from github/post-release-prep/codeql-cli-2.10.5
...
Post-release preparation for codeql-cli-2.10.5
2022-09-16 17:18:05 +01:00
Mathias Vorreiter Pedersen
dc00643ad1
C++: More QLDoc.
2022-09-16 17:14:29 +01:00
Mathias Vorreiter Pedersen
031f20a0eb
C++: Respond to review comments.
2022-09-16 16:19:06 +01:00
Chris Smowton
0ab5d466f6
Update test expectations now that the Java extractor's nested annotation handling has been fixed
2022-09-16 15:50:54 +01:00
Anders Schack-Mulligen
1945f185ed
Apply suggestions from code review
...
Autoformat
2022-09-16 15:49:16 +01:00
Marcono1234
c8b922937b
Java: Extend AnnotationType.isATargetType documentation
2022-09-16 15:49:16 +01:00
Marcono1234
37b18914ac
Java: Add annotation tests
2022-09-16 15:49:16 +01:00
Marcono1234
8c9bdeb3be
Java: Address Annotation review comments and add change note
2022-09-16 15:49:16 +01:00
Marcono1234
659a3a7925
Java: Deprecate RetentionAnnotation.getRetentionPolicyExpression()
2022-09-16 15:49:16 +01:00
Marcono1234
90a9364b00
Java: Rename Annotation.getAnArrayValue with index
...
As mentioned by smowton during review, the predicate only has a single result
due to being restricted by the index and therefore its name should not start
with "getA...".
Also remove deprecated `getAValue(string, int)` because it never existed on
the `main` branch.
2022-09-16 15:49:16 +01:00
Marcono1234
4ef2d156c4
Java: Deprecate error-prone and rarely used annotation predicates
2022-09-16 15:49:16 +01:00
Marcono1234
e3c1b96830
Java: Fix incorrect annotation handling for SpringControllerRequestMappingGetMethod
2022-09-16 15:49:16 +01:00
Marcono1234
998aa95eae
Java: Add convenience array value Annotation predicates
2022-09-16 15:49:16 +01:00
Marcono1234
47e38952d1
Java: Improve Annotation.getAnAssociatedAnnotation
...
As suggested by smowton during review.
2022-09-16 15:49:16 +01:00
Marcono1234
fd5fdd89d9
Java: Rename Annotation.getAValue predicates for array values
...
Predicate name could lead to confusion with non-array predicate getAValue()
2022-09-16 15:49:16 +01:00
Marcono1234
b96061aa7e
Java: Rename Annotation value predicates
2022-09-16 15:49:16 +01:00
Marcono1234
c226758889
Java: Add classes and predicates for @Repeatable
2022-09-16 15:49:16 +01:00
Marcono1234
02c8fe9346
Java: Add convenience predicates for AnnotationType
2022-09-16 15:49:16 +01:00
Marcono1234
f69b6eef7a
Java: Clarify that Annotatable predicates consider inherited annotations
...
Additionally changes `hasAnnotation()` to consider inherited annotations
for consistency.
2022-09-16 15:49:16 +01:00
Marcono1234
afb7462052
Java: Clarify that Annotation value predicates have default value as result
2022-09-16 15:49:15 +01:00
Marcono1234
536f5c7f89
Java: Add Annotation value convenience predicates
2022-09-16 15:49:15 +01:00
Chris Smowton
3165babc88
Merge pull request #10445 from smowton/smowton/fix/annotaton-array-trap-label
...
Java: Add test for annotations with annotation-array-typed fields
2022-09-16 15:45:36 +01:00
github-actions[bot]
67ce442674
Post-release preparation for codeql-cli-2.10.5
2022-09-16 14:23:44 +00:00
Mathias Vorreiter Pedersen
f14df6426e
Merge pull request #10455 from geoffw0/cleartexttest
...
Swift: Update test for swift/cleartext-transmission
2022-09-16 14:59:30 +01:00
yoff
0703b88f92
Merge pull request #10404 from RasmusWL/update-range-pattern
...
Docs: Use `instanceof` in `::Range` pattern description
2022-09-16 15:18:35 +02:00
Tony Torralba
e140f04881
Merge pull request #10393 from zbazztian/uri-constructor-flow
...
Java: Model taint flow for java.net.URI constructors in tainted path queries
2022-09-16 15:10:40 +02:00
Tony Torralba
3141fdae72
Address review comments re: flow states
2022-09-16 14:48:30 +02:00
Geoffrey White
213cd94047
Swift: Update the test.
2022-09-16 13:24:37 +01:00
Anders Schack-Mulligen
e6d4e87458
Merge pull request #10416 from aschackmull/java/dispatch-confidence
...
Java: Remove low confidence dispatch for which we have a manual summary.
2022-09-16 13:36:04 +02:00
Alex Denisov
d6d8480b2a
Swift: fix internal builds
2022-09-16 12:59:43 +02:00
Chris Smowton
80968eef47
Add test for annotations with annotation-array-typed fields
2022-09-16 11:30:16 +01:00
James Fletcher
bc93a22e7d
Merge pull request #10449 from github/jf205-patch-1
...
Correct link to API docs for 'Get a CodeQL database for a repository'
2022-09-16 11:13:20 +01:00
Alex Denisov
c638789f3e
Swift: open(2) interception
2022-09-16 12:02:16 +02:00
erik-krogh
abb5c38bcd
move the guides on link-texts into a new subsection
2022-09-16 11:56:52 +02:00
erik-krogh
e3990e824d
add a line about link texts
2022-09-16 11:52:27 +02:00
Erik Krogh Kristensen
9e56128498
apply suggestions from doc review
...
Co-authored-by: hubwriter <hubwriter@github.com >
2022-09-16 11:46:06 +02:00
Anders Schack-Mulligen
9714497268
Java: Add change note.
2022-09-16 11:14:44 +02:00
Sebastian Bauersfeld
8c35803749
Add more details to change note.
2022-09-16 16:11:34 +07:00
Anders Schack-Mulligen
726772220c
Merge pull request #10191 from smowton/smowton/admin/java-implicit-this-type-tests
...
Java: Add test regarding the type of an implicit `this` expression
2022-09-16 10:58:48 +02:00
Tony Torralba
fdc8453a59
Introduce TaintedPathAdditionalTaintStep
...
Use separate configurations for tainted path and tainted path local again.
2022-09-16 10:42:15 +02:00
Nick Rolfe
b5d648a6b0
Ruby: model ActionView::FileSystemResolver as a FileSystemAccess
2022-09-16 09:24:14 +01:00
James Fletcher
8e30754356
Update download-github-database.rst
2022-09-16 09:22:32 +01:00
Tom Hvitved
ac4d4ff613
Ruby: Rework call graph implementation
2022-09-16 10:22:26 +02:00
Tom Hvitved
41c45c26bc
Ruby: Add more call graph tests, and make calls.rb interpretable by irb
2022-09-16 10:22:20 +02:00
AlexDenisov
d8b000fae3
Merge pull request #10448 from github/alexdenisov/swift-xcode-14
...
Swift: skip more unsupported CLI args (new in Xcode 14)
2022-09-16 10:08:21 +02:00
Sebastian Bauersfeld
95478f1af6
Address review comments.
2022-09-16 14:35:30 +07:00
Alex Denisov
2b12aece63
Swift: skip more unsupported CLI args (new in Xcode 14)
2022-09-16 09:24:20 +02:00
Anders Schack-Mulligen
142d9eb6ef
Merge pull request #10446 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-09-16 09:00:33 +02:00
github-actions[bot]
0e1aca547b
Add changed framework coverage reports
2022-09-16 00:23:05 +00:00
Erik Krogh Kristensen
f648dd4a2e
Merge pull request #10443 from erik-krogh/moreNames
...
QL: recognize the names from all VarDefs
2022-09-15 22:34:17 +02:00
erik-krogh
af045a025d
Merge branch 'main' into moreNames
2022-09-15 21:04:49 +02:00
Philip Ginsbach
87e782560c
Merge pull request #10439 from github/ginsbach/JavascriptUpperCaseVariables
...
JavaScript: remove upper-case variable names
2022-09-15 20:03:20 +01:00
erik-krogh
ac91b30ed0
recognize the names from all VarDefs
2022-09-15 20:48:12 +02:00
Tamás Vajk
d958c04a79
Merge pull request #9693 from raulgarciamsft/Token_validation
...
Token validation
2022-09-15 20:18:33 +02:00
Tony Torralba
c0762dfdb0
Merge pull request #10437 from github/atorralba/fix-0.3.4-changenote
...
Java: Fix wrong packages in minor analysis change note
2022-09-15 19:12:57 +02:00
Philip Ginsbach
d1df2aa457
remove upper-case variable names
2022-09-15 18:08:50 +01:00
Philip Ginsbach
0a2d0f7f68
Merge pull request #10440 from github/ginsbach/JavaUpperCaseVariables
...
Java: remove upper-case variable name
2022-09-15 18:07:51 +01:00
Mathias Vorreiter Pedersen
4482669d7e
C++: Add a new 'InvalidPointerDeref' query to experimental.
2022-09-15 17:47:15 +01:00
Mathias Vorreiter Pedersen
b8a5aa5d85
C++: Fix a couple of range analysis issues:
...
1. The new query is expecting pointer arithmetic operations to generate
range-analysis bounds, but this wasn't true on main.
2. The bounds generated by `boundFlowCond` was incorrectly inferred as
non-strict when comparing a pointers (unlike when comparing values of
integral types). This gave FPs in the new query.
This also fixes a couple of missing results in existing queries that
use the new range-analysis library.
2022-09-15 17:46:52 +01:00
Philip Ginsbach
c2bdb69476
remove upper-case variable name
2022-09-15 16:32:16 +01:00
Mathias Vorreiter Pedersen
d981f898e4
C++: Add flow states to the product dataflow library.
2022-09-15 15:54:09 +01:00
Jeroen Ketema
8b292351b7
Merge pull request #10435 from github/ginsbach/RemoveEvenMoreUpperCaseVariables
...
C++: remove more upper-case variable names
2022-09-15 16:43:50 +02:00
Chris Smowton
88644b6e76
Add change note
2022-09-15 15:35:52 +01:00
Tony Torralba
62b1091c17
Fix wrong packages in minor analysis change
2022-09-15 16:30:12 +02:00
Philip Ginsbach
26099d6ab7
remove more upper-case variable names
2022-09-15 14:36:02 +01:00
Rasmus Wriedt Larsen
0e3821d3e3
Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-09-15 15:13:08 +02:00
Tony Torralba
df5178d7ee
Merge pull request #10330 from atorralba/atorralba/implicit-pendingintents-compat-sinks
...
Java: Add Implicit PendingIntents sinks for Compat classes
2022-09-15 14:39:19 +02:00
Tony Torralba
714b37e77b
Merge pull request #10318 from atorralba/atorralba/notificationcompat-steps
...
Java: Add summaries for NotificationCompat and its inner classes
2022-09-15 14:38:39 +02:00
Geoffrey White
6b21563018
C++: Update change note.
2022-09-15 13:37:20 +01:00
Anders Schack-Mulligen
a4ae9a09f9
Java: Use MaD summaries for java.util.Hashtable.
2022-09-15 13:55:44 +02:00
Chris Smowton
5a56bb97fc
deprecated-call query: notice calls to methods of specialised generic classes
2022-09-15 12:49:12 +01:00
AlexDenisov
b8bc7fb926
Merge pull request #10434 from github/redsun82/fix-c-compilation
...
Bazel: only pass `-std=c++17` for C++ compilation
2022-09-15 13:00:07 +02:00
Paolo Tranquilli
ce6109547b
Bazel: only pass -std=c++17 for C++ compilation
2022-09-15 12:30:30 +02:00
Tom Hvitved
40241acbfc
Merge pull request #10425 from hvitved/ruby/bad-join-fix
...
Ruby: Fix bad join-order in DB upgrade script
2022-09-15 12:09:14 +02:00
Ian Lynagh
a939156ade
Merge pull request #10419 from igfoo/igfoo/unused
...
Kotlin: Remove an unused method
2022-09-15 10:57:58 +01:00
Ian Lynagh
618a5b9b8c
Merge pull request #10427 from igfoo/igfoo/werror
...
Kotlin: Compile with -Werror, and fix warnings
2022-09-15 10:57:45 +01:00
Jeroen Ketema
a20b41685e
Merge pull request #10420 from github/ginsbach/RemoveMoreUpperCaseVariables
...
remove several upper-case `NamedExpression` variable names
2022-09-15 11:50:02 +02:00
Sebastian Bauersfeld
20d78972f5
Address review comments.
2022-09-15 16:44:36 +07:00
Michael Nebel
32816fa68f
C#: Improve join in the InterpretedCallable characteristic predicate.
2022-09-15 10:54:27 +02:00
Chris Smowton
b926bc9efa
Fix and add test for java/subtle-inherited-call involving inheritence from generic types
2022-09-14 22:17:19 +01:00
Chris Smowton
da04673cb0
Fix query java/internal-representation-exposure regarding generic callees, and add a test
2022-09-14 22:17:19 +01:00
Chris Smowton
c149754c6b
Fix java/iterator-remove-failure to handle calls to specialised generic functions
2022-09-14 22:17:19 +01:00
Chris Smowton
3bdccb38b6
Adapt inner-class-could-be-static query now that specialised methods are callable via an implicit this qualifier.
...
Previously such a call always targeted the unbound method, so we checked for an inherited method that could be a specialisation thereof; now we expect it should be directly inherited.
2022-09-14 22:17:19 +01:00
Chris Smowton
25b4d485b4
Java: Add test regarding the type of an implicit this expression
2022-09-14 22:17:19 +01:00
Geoffrey White
c3c86a79ee
Swift: Update comment.
2022-09-14 21:08:52 +01:00
James Fletcher
2503a13ddd
Merge pull request #10428 from jf205/download-db-vs-code-release
...
Cherry-pick changes from #10270 onto rc/3.7
2022-09-14 21:06:57 +01:00
James Fletcher
cdbc839f40
Update docs/codeql/codeql-cli/getting-started-with-the-codeql-cli.rst
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2022-09-14 20:52:01 +01:00
james
c383701677
add link and remove todo
2022-09-14 20:52:01 +01:00
James Fletcher
625e18aa05
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-14 20:52:01 +01:00
james
8f29c5b8b6
fix broken anchor
2022-09-14 20:52:01 +01:00
james
d18bc13f02
fix indentation
2022-09-14 20:52:01 +01:00
james
c7ec6fc2c3
mention compatibility with CLI used by GHES
2022-09-14 20:52:01 +01:00
james
72bc7ae20d
address review comments
2022-09-14 20:52:01 +01:00
James Fletcher
efd4853532
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-14 20:52:00 +01:00
james
ff98805832
delete unused reusable note
2022-09-14 20:52:00 +01:00
james
60dbfd2b2d
delete old note that refers to lgtm
2022-09-14 20:52:00 +01:00
james
9b74b8f8b9
remove link to deleted file
2022-09-14 20:52:00 +01:00
james
3321c52b6c
Add section about using the API to download dbs
2022-09-14 20:52:00 +01:00
james
c3b2d2bb5e
new screenshot
2022-09-14 20:51:53 +01:00
james
8ce4ed587e
update info about downloading dbs in vs code
2022-09-14 20:51:15 +01:00
james
64ea959c59
new screenshot
2022-09-14 20:51:03 +01:00
james
c17af8c354
update info about downloading dbs in vs code
2022-09-14 20:51:03 +01:00
Geoffrey White
dc47771937
Swift: Fix locationless results.
2022-09-14 20:43:24 +01:00
Geoffrey White
25840996f6
Swift: Use a slightly different approach to fix false positive.
2022-09-14 20:43:23 +01:00
Geoffrey White
7b96cb071a
Swift: Remove the original sink cases as they are no longer required.
2022-09-14 20:43:22 +01:00
Geoffrey White
e0100d7b98
Swift: Expand sinks and fix issue with post-update notes to catch the missing test results.
2022-09-14 20:43:22 +01:00
Geoffrey White
eb2a0af4cc
Swift: Additional test case.
2022-09-14 20:43:21 +01:00
James Fletcher
8e0a006665
Merge pull request #10270 from jf205/download-db-vs-code
...
Update documentation about downloading CodeQL databases using the VS Code extension
2022-09-14 20:35:18 +01:00
James Fletcher
b427e8aba6
Merge branch 'main' into download-db-vs-code
2022-09-14 20:22:03 +01:00
Raul Garcia
0125ecf2a8
Merge branch 'main' into Token_validation
2022-09-14 11:04:52 -07:00
Tom Hvitved
c6cd2d66f8
Update ruby/ql/lib/change-notes/2022-09-14-ruby-qll.md
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-09-14 20:00:34 +02:00
Tom Hvitved
5cfed75e4c
Ruby: Fix bad join-order in DB upgrade script
...
Before
```
Evaluated relational algebra for predicate #select#query#ffffff@3e1dedi5 with tuple counts:
30411461 ~0% {6} r1 = locations_default AND NOT #select#query#ffffff#antijoin_rhs(Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5)
30840645 ~4% {2} r2 = SCAN #select#query#ffff OUTPUT In.0, In.3
515559 ~1% {3} r3 = JOIN r2 WITH #select#query#ffffff#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1
515559 ~0% {5} r4 = JOIN r3 WITH locations_default ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Rhs.4, Rhs.5
2397708060 ~0% {9} r5 = JOIN r4 WITH locations_default_1023#join_rhs ON FIRST 1 OUTPUT Lhs.1, 0, Rhs.1, Lhs.2, Lhs.0, Lhs.3, Lhs.4, Rhs.2, Rhs.3
515559 ~4% {6} r6 = JOIN r5 WITH query#f0820431::body_statement#3#bff ON FIRST 3 OUTPUT Lhs.3, Lhs.4, Lhs.7, Lhs.8, Lhs.5, Lhs.6
30927020 ~0% {6} r7 = r1 UNION r6
return
```
After
```
Evaluated relational algebra for predicate #select#query#ffffff@8810e071 with tuple counts:
30411461 ~0% {6} r1 = #select#query#ffffff#shared AND NOT #select#query#ffffff#antijoin_rhs(Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5)
30840645 ~4% {2} r2 = SCAN #select#query#ffff OUTPUT In.0, In.3
515559 ~1% {3} r3 = JOIN r2 WITH #select#query#ffffff#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1
515559 ~0% {6} r4 = JOIN r3 WITH locations_default ON FIRST 1 OUTPUT Lhs.1, 0, Lhs.2, Rhs.1, Rhs.4, Rhs.5
515559 ~0% {5} r5 = JOIN r4 WITH query#f0820431::body_statement#3#bff ON FIRST 2 OUTPUT Rhs.2, Lhs.3, Lhs.2, Lhs.4, Lhs.5
515559 ~0% {6} r6 = JOIN r5 WITH locations_default ON FIRST 2 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.2, Rhs.3
515559 ~4% {6} r7 = JOIN r6 WITH files ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.4, Lhs.5, Lhs.2, Lhs.3
30927020 ~0% {6} r8 = r1 UNION r7
return r8
```
2022-09-14 19:27:49 +02:00
Ian Lynagh
8a5bc3b635
Kotlin: Don't use hasQuestionMark
...
1.7.0 warns:
'hasQuestionMark: Boolean' is deprecated. hasQuestionMark has
ambiguous meaning. Use isNullable() or isMarkedNullable() instead
2022-09-14 17:56:27 +01:00
Dave Bartolomeo
6a0e4805dc
Merge pull request #10418 from dbartol/dbartol/swift-fail/work
...
Add lock files for Swift packs
2022-09-14 12:01:05 -04:00
Ian Lynagh
fce111bebe
Kotlin: Compile with -Werror, and fix warnings
2022-09-14 16:42:57 +01:00
Philip Ginsbach
c5703898b0
remove upper-case NamedExpression variable names
2022-09-14 16:35:24 +01:00
Ian Lynagh
8f2a718787
Kotlin: Remove an unused method
2022-09-14 16:31:11 +01:00
James Fletcher
f3a4ba39a8
Update docs/codeql/codeql-cli/getting-started-with-the-codeql-cli.rst
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2022-09-14 16:20:07 +01:00
Andrew Eisenberg
3102a444bb
Merge pull request #10389 from github/aeisenberg/suites-docs
...
Tweak the query suites documentation
2022-09-14 08:15:28 -07:00
Jeroen Ketema
6e74c32dc6
Merge pull request #10417 from github/ginsbach/RemoveUpperCaseVariable
...
remove upper-case variable name from `HubClasses`
2022-09-14 16:50:43 +02:00
Dave Bartolomeo
c5622135a6
Add lock files for Swift packs
2022-09-14 10:21:40 -04:00
Andrew Eisenberg
3c1f67d7de
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-14 07:15:23 -07:00
Chris Smowton
1478f61897
Merge pull request #10407 from RasmusWL/go-instanceof
...
Go: Rewrite `::Range` patterns to use `instanceof`
2022-09-14 15:06:30 +01:00
Philip Ginsbach
8f7f631211
upper-case variable names are deprecated
2022-09-14 14:50:26 +01:00
Rasmus Wriedt Larsen
3d0f786247
docs: grammar fix
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-09-14 15:39:48 +02:00
Tom Hvitved
7ecfe8daba
Address review comments
2022-09-14 15:30:51 +02:00
Tamás Vajk
e4a712c9d6
Merge pull request #10402 from tamasvajk/kotlin-comp-args
...
Kotlin: Add integration test for compiler argument extraction
2022-09-14 15:27:18 +02:00
Tamas Vajk
16836de02b
Code quality improvment to simplify test QL
2022-09-14 15:15:06 +02:00
Tom Hvitved
40e77a0c67
Merge pull request #10415 from hvitved/code-block-fix
...
Change two ```codeql to ```ql
2022-09-14 15:07:55 +02:00
Ian Lynagh
b3b1efb1a1
Merge pull request #10414 from igfoo/igfoo/getQualifiedName
...
Java: Tweak Member.getQualifiedName()
2022-09-14 13:30:22 +01:00
Tom Hvitved
4ea1c0050b
Change two ``codeql to ``ql
2022-09-14 13:53:34 +02:00
Anders Schack-Mulligen
ba3ebeec2c
Java: Remove low confidence dispatch for which we have a manual summary.
2022-09-14 13:39:31 +02:00
Anders Schack-Mulligen
d713910714
Merge pull request #10334 from aschackmull/java/uniontypeflow
...
Java: Implement union type flow and replace ad-hoc variable tracking in dispatch
2022-09-14 13:34:28 +02:00
Tamas Vajk
a68b61f50a
Kotlin: adjust expected test results after fixing compiler argument interception
2022-09-14 13:15:29 +02:00
Tamas Vajk
6eccb5e99c
Kotlin: Add integration test to show missing compiler arguments
2022-09-14 13:15:29 +02:00
Ian Lynagh
4ac0ecbc61
Java: Mark the getQualifiedName change as breaking
2022-09-14 12:10:50 +01:00
Ian Lynagh
d735b9e6f2
Java: Format QL
2022-09-14 11:56:13 +01:00
Rasmus Lerchedahl Petersen
33b508d6e6
Python: undo change to --max-import-depth
...
This is not necessary as long as `LibraryCall` only
includes unresolved calls.
2022-09-14 12:52:27 +02:00
Ian Lynagh
fec6c35f21
Java: Accept test output for getQualifiedName change
2022-09-14 10:52:43 +01:00
Erik Krogh Kristensen
2ece9773be
Merge pull request #10410 from erik-krogh/nonAsciiRange
...
JS: don't report every non-ascii range in js/overly-large-range
2022-09-14 11:51:22 +02:00
erik-krogh
8b3ba38887
changes based on review
2022-09-14 11:49:26 +02:00
Rasmus Lerchedahl Petersen
245baa51a3
Python: rename summary map -> list_map,
...
since map resolves to a class call
also fix test expectation
2022-09-14 11:21:16 +02:00
Michael Nebel
b05a1f4f39
C#: Support for type based model generation via python script.
2022-09-14 11:16:22 +02:00
Paolo Tranquilli
d7cdeb8ac0
Merge pull request #10412 from github/revert-10399-redsun82/swift-macos-arm
...
Revert "Swift: print a helpful message on macOS ARM"
2022-09-14 11:08:24 +02:00
Michael Nebel
4e57b40c2a
C#: Update test expected output.
2022-09-14 11:06:24 +02:00
Michael Nebel
0f22828cb6
C#: Add test cases corresponding to the System.Linq.Enumerable extensions methods.
2022-09-14 11:06:23 +02:00
Michael Nebel
cdb892da43
C#: Update test expected output.
2022-09-14 11:06:23 +02:00
Michael Nebel
20cb5daeb1
C#: Add testcase for implicit set.
2022-09-14 11:06:23 +02:00
Michael Nebel
262c28b77a
C#: Update expected test output.
2022-09-14 11:06:23 +02:00
Michael Nebel
001d3571ec
C#: Restructure test cases.
2022-09-14 11:06:23 +02:00
Michael Nebel
c5949fad75
C#/Java: Rename to Typed based summary model generation.
2022-09-14 11:06:23 +02:00
Michael Nebel
5f161dfaad
C#: Update expected test output with further models.
2022-09-14 11:06:23 +02:00
Michael Nebel
055072b1c0
C#: Add more test examples.
2022-09-14 11:06:23 +02:00
Michael Nebel
1b7339aa1e
C#: Rewrite the typed based model generator.
2022-09-14 11:06:23 +02:00
Michael Nebel
2d57b7d56a
Java: Sync files.
2022-09-14 11:06:23 +02:00
Michael Nebel
d580a8a078
C#: Update expected test output.
2022-09-14 11:06:23 +02:00
Michael Nebel
372a6107d6
C#: Use typeparameter index to generate synthetic field names in summaries.
2022-09-14 11:06:23 +02:00
Michael Nebel
f6e9013435
C#: Update expected output of tests.
2022-09-14 11:06:23 +02:00
Michael Nebel
e66dce1524
C#: Update test relevant test cases.
2022-09-14 11:06:23 +02:00
Michael Nebel
bb65485497
C#: Address some review comments.
2022-09-14 11:06:23 +02:00
Michael Nebel
13a802e260
Java: Sync files and make adjusting changes.
2022-09-14 11:06:23 +02:00
Michael Nebel
dd44d71757
C#: Add Type based summary test cases and move dataflow model generation test cases.
2022-09-14 11:06:22 +02:00
Michael Nebel
c2da2a8b16
C#: Initial implementation of Type based summarymodel generation.
2022-09-14 11:06:22 +02:00
Anders Schack-Mulligen
64e2f4164d
Java: Add test for disjunctive type in call context.
2022-09-14 10:38:10 +02:00
Paolo Tranquilli
dad0e4decc
Revert "Swift: print a helpful message on macOS ARM"
2022-09-14 10:34:46 +02:00
Rasmus Lerchedahl Petersen
f83158ff8b
Python: do not stake out too much territory
2022-09-14 10:28:11 +02:00
Anders Schack-Mulligen
9f200633ca
Java: convert test to inline expectation
2022-09-14 10:17:31 +02:00
Anders Schack-Mulligen
83e7bf71d7
Java: Adjust qldoc.
2022-09-14 10:16:09 +02:00
James Fletcher
572ecf0944
Merge branch 'main' into download-db-vs-code
2022-09-14 08:58:35 +01:00
james
22eb23e95a
add link and remove todo
2022-09-14 08:48:20 +01:00
Mathias Vorreiter Pedersen
6074f22d3f
Merge pull request #10335 from github/redsun82/swift-weak-hashing-phase-1
...
Swift: first version of query targeting weak hashing
2022-09-14 08:29:47 +01:00
Tom Hvitved
5472210a92
Ruby: Add change note
2022-09-14 09:14:41 +02:00
Paolo Tranquilli
c3320a3afe
Apply suggestions from code review
...
Co-authored-by: hubwriter <hubwriter@github.com >
2022-09-14 08:21:58 +02:00
erik-krogh
88f1d2ae38
add qldocs to the ql/alert-message-style-violation query
2022-09-13 22:28:50 +02:00
Erik Krogh Kristensen
59c1ac2e8d
Apply suggestions from code review
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-09-13 22:17:33 +02:00
erik-krogh
252394666c
sync files
2022-09-13 20:44:05 +02:00
erik-krogh
e7aef17d30
don't report every non-ascii range in js/overly-large-range
2022-09-13 20:43:52 +02:00
James Fletcher
6debbc0d3e
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-13 19:22:15 +01:00
Tom Hvitved
74eb6b2b98
Merge pull request #10400 from hvitved/ruby/singleton-class-object-scope
...
Ruby: Adjust the scope of singleton class targets
2022-09-13 20:01:21 +02:00
Tom Hvitved
fe7d01ecbe
Ruby: Update docs to reflect that import ruby is no longer used
2022-09-13 20:00:22 +02:00
Tom Hvitved
b477a4cc81
Ruby: Add missing QL docs
2022-09-13 20:00:22 +02:00
Tom Hvitved
007ab2b7ce
Ruby: Do not expose AST layer through ruby.qll
2022-09-13 19:59:56 +02:00
Raul Garcia
7572414623
Merge branch 'main' into Token_validation
2022-09-13 10:47:26 -07:00
Ian Lynagh
f807b801ce
Merge pull request #10401 from igfoo/igfoo/throw
...
Kotlin: Remove a throw statement
2022-09-13 17:41:31 +01:00
Raul Garcia
a27c427a4e
Merge branch 'main' into Token_validation
2022-09-13 09:16:32 -07:00
Andrew Eisenberg
dbd5195fec
Merge pull request #10344 from github/aeisenberg/registries-in-workspace
...
Add information about the `registries` block in `codeql-workspace.yml`
2022-09-13 08:54:30 -07:00
Tony Torralba
4708052741
Merge pull request #10408 from giper45/patch-1
...
Updated vulnerable XSS.java version
2022-09-13 17:50:47 +02:00
Raul Garcia
c63240d62c
D:\Code\tokenv2\csharp\ql\src\experimental\Security Features\JsonWebTokenHandler\JsonWebTokenHandlerLib.qll
2022-09-13 08:48:53 -07:00
Raul Garcia
1c10456e65
Merge branch 'main' into Token_validation
2022-09-13 08:44:19 -07:00
Henry Mercer
af25cf8be2
Merge pull request #10409 from github/codeql-ci/js/ml-powered-pack-release-0.3.3
...
JS: Bump version numbers of ML-powered packs after 0.3.3 release
2022-09-13 16:23:37 +01:00
Tamás Vajk
84bd8f179b
Merge pull request #10403 from tamasvajk/kotlin-rework-cast
...
Kotlin: Code quality improvements: refactor a cast
2022-09-13 17:09:13 +02:00
Andrew Eisenberg
996695dc6f
Merge pull request #10367 from github/aeisenberg/packs-docs-changes-3.7
...
Port Pack Docs changes to 3.7
2022-09-13 08:06:34 -07:00
Ian Lynagh
6a63b86f8a
Java: Member.getQualifiedName() tweaked
...
It now includes the qualified name of the declaring type.
2022-09-13 16:05:51 +01:00
Ian Lynagh
fc445736b2
Java: Use hasQualifiedName rather than getQualifiedName in ExternalAPIs
...
It's more efficient, as it doesn't require building intermediate
strings.
2022-09-13 15:58:00 +01:00
Rasmus Wriedt Larsen
2e95e25afb
Merge pull request #10406 from RasmusWL/ruby-instanceof
...
Ruby: Rewrite a few `::Range` uses to `instanceof`
2022-09-13 16:57:13 +02:00
Tony Torralba
ac46a38b9d
Update java/ql/src/Security/CWE/CWE-079/XSS.java
2022-09-13 16:49:20 +02:00
Tony Torralba
2b027709e4
Update XSS qhelp
2022-09-13 16:39:48 +02:00
AlexDenisov
aacc368228
Merge pull request #10399 from github/redsun82/swift-macos-arm
...
Swift: print a helpful message on macOS ARM
2022-09-13 16:24:38 +02:00
Henry Mercer
bc2de7ed4b
Merge branch 'main' into codeql-ci/js/ml-powered-pack-release-0.3.3
2022-09-13 15:15:56 +01:00
github-actions[bot]
b40def71b9
JS: Bump version of ML-powered library and query packs to 0.3.4
2022-09-13 14:11:16 +00:00
github-actions[bot]
e08e22ac32
JS: Bump patch version of ML-powered library and query packs
2022-09-13 14:06:57 +00:00
james
d782e6c37c
fix broken anchor
2022-09-13 15:01:16 +01:00
gx1
1c4488e7c8
Updated vulnerable XSS.java version
2022-09-13 15:58:25 +02:00
Rasmus Wriedt Larsen
ca66a29b18
Go: Rewrite ::Range patterns to use instanceof
2022-09-13 15:48:17 +02:00
Tamas Vajk
2c757c714d
Kotlin: Code quality improvements: refactor a cast
2022-09-13 15:44:54 +02:00
Rasmus Wriedt Larsen
511030df48
Ruby: Rewrite a few ::Range uses to instanceof
2022-09-13 15:44:29 +02:00
Rasmus Wriedt Larsen
6f5701f9c7
Go: Rewrite concepts to use extends ... instanceof ...
2022-09-13 15:36:16 +02:00
james
ff4b1ce913
fix indentation
2022-09-13 14:34:06 +01:00
erik-krogh
93a67101e7
add a QL-for-QL query highlighting some issues with alert-texts
2022-09-13 15:24:15 +02:00
erik-krogh
338aead8cc
add more guidance to the style-guide about alert messages
2022-09-13 15:22:43 +02:00
james
4e582debfc
mention compatibility with CLI used by GHES
2022-09-13 14:21:41 +01:00
Rasmus Wriedt Larsen
24d28e0482
Docs: Use instanceof in ::Range pattern description
...
Had to change the example away from Go, since their libs have not been
updated to use `instanceof` yet (but I'll make a PR from them shortly)
2022-09-13 15:21:15 +02:00
james
1fceeed32c
address review comments
2022-09-13 13:53:05 +01:00
Ian Lynagh
2f8151d8d2
Kotlin: Remove a throw statement
...
We have a way to carry on here, so we may as well do so
2022-09-13 13:51:00 +01:00
Erik Krogh Kristensen
46751e515c
Merge pull request #10388 from erik-krogh/exportNew
...
JS: recognize returning an instance of a class as exporting that class
2022-09-13 13:45:16 +02:00
Anders Schack-Mulligen
b8a1818422
Java: Fix test expectation.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
0e376b32d2
Java: extend typeflow tests to cover union types.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
d0f7052de2
Java: Support instanceof disjunction in union type flow.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
686e03e1cc
Java: Fix perf issue.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
c8b93e0910
Java: Replace uses of deprecated variableTrack.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
a8eedce8ab
Java: Replace ad-hoc variable tracking with union type flow in dispatch.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
6f06267892
Java: Implement union type flow.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
7692a9e2e7
Java: Minor TypeFlow tweaks.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
85d4742a01
Java: Add dispatch test showing lack of union types.
2022-09-13 13:30:40 +02:00
Mathias Vorreiter Pedersen
c7ccff2e20
C++: Accept test changes.
2022-09-13 12:11:22 +01:00
Asger F
d3d47a261c
JS: Accept test output again
2022-09-13 11:56:51 +02:00
Tom Hvitved
4247843a27
Ruby: Adjust the scope of singleton class targets
...
In
```rb
class << x
...
end
```
the scope of `x` is not the singleton class itself, but rather the outer scope.
2022-09-13 11:39:38 +02:00
Tom Hvitved
87db5fc6b1
Ruby: Add tests for getEnclosing{Method,Module}
2022-09-13 11:39:15 +02:00
Erik Krogh Kristensen
2739b9cfd8
Merge pull request #10390 from erik-krogh/unmentionedGuard
...
QL: add unmentioned guard class query
2022-09-13 11:04:13 +02:00
Paolo Tranquilli
9227203336
Swift: print a helpful message on macOS ARM
...
Also remove the tentative way compilation was expected to be fixed on
macOS ARM without really working.
In the future we will create universal binaries (which requires
compiling our prebuilt package for ARM as well), but until then we must
require the developer to pass `--cpu=darwin_x86_64` to the build
command when building on an ARM macOS platform like the M1. This will be
printed out explicitly now if it's not the case.
2022-09-13 11:00:47 +02:00
Erik Krogh Kristensen
86417cec34
Merge pull request #10381 from erik-krogh/protoList
...
JS: recognize a list of bad strings as a sanitizer for `js/prototype-polluting-assignment`
2022-09-13 11:00:29 +02:00
Asger F
87ab16a7af
JS: Update test expectations
2022-09-13 10:59:12 +02:00
erik-krogh
063c76b6d1
apply suggestions from review
2022-09-13 10:52:23 +02:00
Mathias Vorreiter Pedersen
4130616ab1
C++: Use experimental dataflow for the product flow library.
2022-09-13 09:41:03 +01:00
Robert Marsh
ededfaa40b
C++: use-use flow in ArrayAccessProductFlow
2022-09-13 09:39:39 +01:00
Robert Marsh
0fcfe5772f
C++: query-specific model for ffmpeg allocator
2022-09-13 09:39:31 +01:00
Robert Marsh
61017a7997
C++: prevent a bad join order
2022-09-13 09:39:11 +01:00
Mathias Vorreiter Pedersen
7f6b400b78
Merge pull request #10366 from MathiasVP/use-use-flow-in-experimental
...
C++: Use-use flow in `experimental`
2022-09-13 09:30:48 +01:00
Asger F
eca2632a3e
JS: Add change note
2022-09-13 10:17:34 +02:00
Asger F
f411798101
JS: Fix typo in alert message
2022-09-13 10:13:34 +02:00
Asger F
b4e6fb781a
JS: Consider empty regexp to be obviously empty
2022-09-13 10:13:03 +02:00
Rasmus Lerchedahl Petersen
58cfac27d2
Python: adjust expectations to new spelling
2022-09-13 10:10:17 +02:00
erik-krogh
03a325ca31
autoformat
2022-09-13 10:06:35 +02:00
Erik Krogh Kristensen
dd5da79e46
recognize setters and getters of a class as exported
...
Co-authored-by: Asger F <asgerf@github.com >
2022-09-13 10:04:02 +02:00
Rasmus Lerchedahl Petersen
c1ab66181b
Python: format
2022-09-13 08:08:04 +02:00
erik-krogh
dd5db2e6d7
add to isSanitizerGuard
2022-09-13 07:27:51 +02:00
erik-krogh
3eb7675292
rename to DenyListInclusionGuard
2022-09-13 07:27:31 +02:00
Sebastian Bauersfeld
f95663cdfb
Java: Added change note.
2022-09-13 11:38:15 +07:00
Sebastian Bauersfeld
0468b3a361
Java: Track taint through constructor arguments of java.net.URI.
2022-09-13 11:35:04 +07:00
Raul Garcia
0df2b64355
Merge branch 'main' into Token_validation
2022-09-12 18:31:00 -07:00
Raul Garcia
9e63a3d30b
Fixing a couple of bug from PR comments
2022-09-12 18:22:13 -07:00
Rasmus Lerchedahl Petersen
03c243175b
Python: fix QL alerts
2022-09-12 23:53:42 +02:00
Andrew Eisenberg
68f0505c39
Apply suggestions from code review
2022-09-12 14:49:41 -07:00
Rasmus Lerchedahl Petersen
2e9c60de6c
Python: remove ressurected file
2022-09-12 23:38:44 +02:00
Rasmus Lerchedahl Petersen
56dcfc2161
Python: --max-import-depth=0
...
to avoid nodes in the extracted stdlib
Was there a reason for this depth to be 1?
2022-09-12 23:25:48 +02:00
Rasmus Lerchedahl Petersen
bf16e220a0
Python: adjust expectations
2022-09-12 22:43:03 +02:00
erik-krogh
a567c132c1
fix all ql/unmentioned-guard
2022-09-12 22:42:46 +02:00
erik-krogh
9446cad32e
add ql/unmentioned-guard class
2022-09-12 22:39:20 +02:00
Andrew Eisenberg
a9202b5c37
Tweak the query suites documentation
...
- Add examples to filter on `@id`
- Add examples that include regexes
- Add examples that include both lists and single elements
- Add some `import` examples
- Remove mention of `eval` since it is not a user-facing instruction
2022-09-12 13:07:32 -07:00
Rasmus Lerchedahl Petersen
e3280c8a3e
Python: handle TODO
...
although this is not actually tested,
so we may have to adjust once we use it.
But the _very_ generic implementation is modeled on the Ruby code.
2022-09-12 21:03:56 +02:00
Rasmus Lerchedahl Petersen
78d4dc3123
Python: sync files
2022-09-12 21:01:57 +02:00
Rasmus Lerchedahl Petersen
203481ad3e
Python: rearrange to minimize diff
...
also fix typo
2022-09-12 20:07:32 +02:00
Rasmus Lerchedahl Petersen
efc5cfb852
Merge branch 'main' of github.com:github/codeql into python-dataflow/flow-summaries-from-scratch
2022-09-12 19:56:16 +02:00
Arthur Baars
e07e6c9053
Merge pull request #10382 from RasmusWL/ruby-typo-fix
...
Ruby: Fix typo in QLDoc
2022-09-12 19:04:37 +02:00
Tony Torralba
f412f433bf
Add thymeleaf steps
2022-09-12 17:52:38 +02:00
Erik Krogh Kristensen
bb3753a682
Merge pull request #10317 from erik-krogh/py-unqueryable
...
PY: deprecate a bunch of unused code
2022-09-12 17:44:59 +02:00
erik-krogh
ceda5f69fc
recognize returning an instanceof of a class as exporting that class
2022-09-12 17:31:51 +02:00
Mathias Vorreiter Pedersen
6e4b3c242f
Merge pull request #10377 from geoffw0/deprecate-pointsto
...
C++: Put a warning on the PointsTo library.
2022-09-12 16:25:40 +01:00
Andrew Eisenberg
abdc79b009
Update the example codeql-workspace.yml
...
Add a better example for `registries`.
2022-09-12 08:22:51 -07:00
Andrew Eisenberg
361dba17de
Add information about the registries block in codeql-workspace.yml
2022-09-12 08:22:51 -07:00
Edward Minnix III
eadb8a3988
Merge pull request #10106 from egregius313/egregius313/android-backup-allowed
...
Java: Query to detect Android backup allowed
2022-09-12 11:14:03 -04:00
Rasmus Wriedt Larsen
41ce1c2016
Python: getStarArg gives first *args argument
...
I couldn't see any reason that we should give up altogether if there are
multiple `*args` arguments. Including the first one looks like a win to
me!
2022-09-12 17:02:31 +02:00
Mathias Vorreiter Pedersen
d2b150eaf5
C++: Fix QLDoc on the model predicates used by the new experimental use-use code.
2022-09-12 16:00:49 +01:00
Mathias Vorreiter Pedersen
bb1c088fe0
C++: Undo changes to iterator models.
2022-09-12 15:58:49 +01:00
James Fletcher
47480acba5
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-12 15:53:54 +01:00
Paolo Tranquilli
43e5abac39
Swift: do not extract unresolved things from IfConfigDecl
...
This avoids extracting things that are unresolved within an
`IfConfigDecl` instance:
* all conditions
* all inactive code blocks
This is meant to test out the hypothesis that this should solve some
extractor issues. If going through with it we should definitely change
the schema model for this.
Also, tests have not been updated and are expected to fail.
2022-09-12 16:34:28 +02:00
Cornelius Riemenschneider
a8a7909d33
Merge pull request #10364 from github/criemen/remove-legacy-tracing-specs
...
Go: Remove the legacy tracer configuration files.
2022-09-12 15:55:12 +02:00
Tamás Vajk
4569b9585f
Merge pull request #10313 from tamasvajk/kotlin-fix-vararg
...
Kotlin: Fix `vararg` extraction outside of method call
2022-09-12 15:54:50 +02:00
Tamás Vajk
ed772e54d1
Merge pull request #10328 from tamasvajk/kotlin-kfunction-fix
...
Kotlin: fix `KFunctionX.invoke` extraction
2022-09-12 15:54:33 +02:00
erik-krogh
05ef76cbca
add change-note
2022-09-12 15:41:28 +02:00
erik-krogh
87fb01d55b
apply another suggestion from doc review
2022-09-12 15:36:02 +02:00
Geoffrey White
842af4bf74
C++: Specifically suggest DataFlow as an alternative.
2022-09-12 14:25:45 +01:00
AlexDenisov
be21b26d46
Merge pull request #10045 from github/alexdenisov/swift-cwe-757
...
Swift: CWE-757: insecure TLS configuration
2022-09-12 15:25:15 +02:00
Erik Krogh Kristensen
818601b612
Merge pull request #10285 from erik-krogh/paramClass
...
ReDoS: convert RelevantState to a class in the PrefixConstruction module
2022-09-12 15:23:19 +02:00
Rasmus Lerchedahl Petersen
0f95992b2f
Python: remove NonLibraryDataFlowCallable
...
this required managing parameters and their pre-update nodes a bit
2022-09-12 15:17:29 +02:00
Rasmus Wriedt Larsen
4296ac1ac0
Python: Allow CallNode.getArgByName for keyword args after **kwargs
2022-09-12 15:03:13 +02:00
Rasmus Wriedt Larsen
03cc4a2f7a
Ruby: Fix typo in QLDoc
2022-09-12 14:35:20 +02:00
Tony Torralba
79a32f1a3e
Tainting the freemarker dataModel isn't exploitable
2022-09-12 14:22:06 +02:00
AlexDenisov
568eb3a118
Update swift/ql/src/queries/Security/CWE-757/InsecureTLS.qhelp
...
Co-authored-by: hubwriter <hubwriter@github.com >
2022-09-12 14:00:29 +02:00
erik-krogh
98243118b2
recognize a list of bad strings as a sanitizer for js/prototype-polluting-assignment
2022-09-12 13:41:07 +02:00
erik-krogh
afcb767f8d
Merge branch 'main' into js-followMsg
2022-09-12 13:21:16 +02:00
erik-krogh
6ec03d4738
apply suggestions from doc review
2022-09-12 13:16:39 +02:00
erik-krogh
bae4490620
add change-note
2022-09-12 12:12:18 +02:00
erik-krogh
80158f8035
fix some python uses of renamed features
2022-09-12 12:08:30 +02:00
Erik Krogh Kristensen
c9ea10b1ef
revise some Python names
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-09-12 12:00:57 +02:00
Tony Torralba
dd6257c757
Add security-severity
2022-09-12 11:59:01 +02:00
Tony Torralba
409a123490
Tainting the velocity context isn't exploitable
2022-09-12 11:38:29 +02:00
Erik Krogh Kristensen
3384521fb6
Merge pull request #10357 from erik-krogh/typos
...
make a shared library of the typo database
2022-09-12 11:24:03 +02:00
Erik Krogh Kristensen
cb95e8f263
Merge pull request #10351 from erik-krogh/moreMains
...
JS: find a main module in more cases
2022-09-12 11:01:17 +02:00
Arthur Baars
7ca2e4c51f
Merge pull request #9953 from aibaars/update-grammar
...
Update tree-sitter-ruby
2022-09-12 10:51:37 +02:00
Paolo Tranquilli
776df33f55
Swift: fix typos and comments in testCrypto.swift
2022-09-12 08:47:43 +02:00
Rasmus Lerchedahl Petersen
fa2da2f3ec
Python: remove NonLibraryNormalCall
...
it is not necessary to distinguish these calls,
so we remove the class from the hierarchy.
2022-09-11 22:25:29 +02:00
Mathias Vorreiter Pedersen
c988547e9c
C++: Accept test changes.
2022-09-11 18:31:53 +01:00
Rasmus Lerchedahl Petersen
895f5480c2
Python: Added recursion guard
...
to ensure that the call graph seen by type tracking
does not include summary calls resolved by type tracking.
(I tried inserting a similar test into the Ruby codebase,
and it still compiled)
To get this to compile, I had to move the resolution of summary calls
out of the data flow nodes and into the `viableCallable` predicate.
This means that we now have a potential summary call for each
cfg call node. (I tried using the base class, `DataFlowCall`, for this
but calls to `map` got identified as class calls and would no longer
be associated with a summary.)
It is possible that the "NonLIbrary"-layers the were inserted into the
hierarchy can be removed again.
2022-09-09 22:47:47 +02:00
Geoffrey White
8ac3e10896
C++: Put a warning on the PointsTo library.
2022-09-09 18:03:23 +01:00
Andrew Eisenberg
ed66388551
Port Pack Docs changes to 3.7
...
This moves the following three PRs to the 3.7 branch:
- https://github.com/github/codeql/pull/10182
- https://github.com/github/codeql/pull/10146
- https://github.com/github/codeql/pull/10105
2022-09-09 09:33:25 -07:00
Mathias Vorreiter Pedersen
6dcfe0348b
C++: Copy over the required changes to non-experimental libraries.
2022-09-09 17:26:58 +01:00
james
0e5df6c08a
delete unused reusable note
2022-09-09 17:14:26 +01:00
james
869833a95a
delete old note that refers to lgtm
2022-09-09 17:11:54 +01:00
Mathias Vorreiter Pedersen
5509562fe6
C++: Repair a few broken models that were incorrectly a pointer
...
as tainted (instead of the pointee), or vice versa. Because of
existing dataflow pointer/pointee conflation we never noticed that,
but since this PR removes those imprecisions we now need to update
these models.
2022-09-09 17:04:36 +01:00
Ed Minnix
817f12cae6
Updated expectations file with new message
...
The warning message for the `android:allowBackup` query was updated.
This updates the message in the expectations file.
2022-09-09 11:35:48 -04:00
james
f717dd6c0f
remove link to deleted file
2022-09-09 16:10:35 +01:00
james
b3a97f742d
Merge branch 'main' into download-db-vs-code
2022-09-09 16:08:08 +01:00
Ian Lynagh
c7e3051edd
Merge pull request #10239 from tamasvajk/kotlin-fix-declaration-stack
...
Kotlin: Fix declaration stack
2022-09-09 16:03:31 +01:00
james
356ca78032
Merge branch 'download-db-vs-code' of github.com:jf205/ql into download-db-vs-code
2022-09-09 15:48:22 +01:00
james
fc86347b0f
Add section about using the API to download dbs
2022-09-09 15:46:35 +01:00
james
faf1d0a5d9
new screenshot
2022-09-09 15:46:06 +01:00
james
49220a4f19
update info about downloading dbs in vs code
2022-09-09 15:46:06 +01:00
James Fletcher
f17f48d2b3
Merge branch 'main' into download-db-vs-code
2022-09-09 15:44:59 +01:00
Tamás Vajk
05fcbdd9e3
Merge pull request #10365 from tamasvajk/kotlin-fix-isUnspecialised-2
...
Kotlin: Fix `isUnspecialised` to handle generic classes inside generic methods
2022-09-09 16:27:19 +02:00
Edward Minnix III
08a17b355e
allowBackup documentation updates
...
Make error messages and descriptions clearer about application backups not being disabled, rather than focusing on `android:allowBackup` specifically.
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-09-09 09:30:49 -04:00
Mathias Vorreiter Pedersen
6d313ace2d
C++: Copy the new use-use flow code to experimental.
2022-09-09 14:20:10 +01:00
Rasmus Wriedt Larsen
89a331f186
Merge pull request #10359 from tausbn/python-clean-up-import-resolution
...
Python: Clean up module resolution
2022-09-09 15:09:43 +02:00
Tamas Vajk
b8b0fd8a74
Kotlin: Fix isUnspecialised to handle generic classes inside generic methods
2022-09-09 14:32:38 +02:00
Tony Torralba
569fad667a
Merge pull request #10360 from atorralba/atorralba/fix-taint-implicit-reads
...
Dataflow: Fix implicit reads in taint tracking when FlowStates are used
2022-09-09 14:28:39 +02:00
erik-krogh
5010f89683
move resolveMainPath into a separate helper predicate
2022-09-09 14:26:07 +02:00
Geoffrey White
6011ae9ecc
Merge branch 'main' into cleartext-perf
2022-09-09 11:40:47 +01:00
erik-krogh
6a2fa2e37d
add -dev to the codeql/typos version
2022-09-09 12:33:43 +02:00
Geoffrey White
edefda9213
C++: Make QL-for-QL happy.
2022-09-09 11:26:42 +01:00
Geoffrey White
813d166ad7
C++: Restore results in cpp/cleartext-storage-database using .
2022-09-09 11:03:29 +01:00
Cornelius Riemenschneider
bc7fcaa06f
Go: Remove the legacy tracer configuration files.
2022-09-09 11:13:01 +02:00
Tamas Vajk
3267d7c96e
Kotlin: Add test case with various nested generics
2022-09-09 11:09:50 +02:00
Paolo Tranquilli
a8a34addde
Merge branch 'main' into redsun82/swift-weak-hashing-phase-1
2022-09-09 11:07:41 +02:00
Michael Nebel
15db520a58
Merge pull request #10362 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-09-09 11:06:09 +02:00
Paolo Tranquilli
6223103bbd
Swift: add more testing to WeakSensitiveDataHashing
2022-09-09 11:02:08 +02:00
Paolo Tranquilli
fccf07c5bc
Swift: tweak qhelp file for WeakSensitiveDataHashing
2022-09-09 11:01:24 +02:00
Paolo Tranquilli
c739bbb051
Swift: bake in isProbablySafe in SensitiveExpr
...
Also restructured the code a bit in the weak hashing query.
2022-09-09 11:00:02 +02:00
erik-krogh
26d8553f6e
ensure consistent casing of names
2022-09-09 10:34:14 +02:00
Tony Torralba
1078cf091e
Add change notes for all languages
2022-09-09 10:28:36 +02:00
Tony Torralba
d748fb5648
Fix bad models, add tests for those
2022-09-09 10:08:52 +02:00
Erik Krogh Kristensen
9893650f7c
Merge pull request #8604 from erik-krogh/httpNode
...
JS: refactor most library models away from AST nodes
2022-09-09 10:04:17 +02:00
Erik Krogh Kristensen
25b988d179
Merge pull request #10356 from erik-krogh/selRandom
...
JS: add taint-step in js/insecure-randomness for selecting a random element
2022-09-09 09:59:25 +02:00
erik-krogh
1ec77136ec
depend on an explicit version of the typo database
2022-09-09 08:37:38 +02:00
github-actions[bot]
ea1cdf90a1
Add changed framework coverage reports
2022-09-09 00:21:07 +00:00
Taus
5ce60d028d
Python: Remove ImportStar import.
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-09-08 22:01:58 +02:00
Edward Minnix III
83c8e22225
Apply suggestions from documentation review
...
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com >
2022-09-08 15:55:00 -04:00
erik-krogh
aee72357b8
find a main module in more cases
2022-09-08 20:21:31 +02:00
Tony Torralba
6413de6c20
Add change note
2022-09-08 17:38:26 +02:00
Tony Torralba
fb13e7f307
Docs changes
2022-09-08 17:38:25 +02:00
Tony Torralba
e311155acd
Use InlineExpectationsTest
2022-09-08 17:38:25 +02:00
Tony Torralba
b68e6669b8
Refactor TemplateInjection libraries
2022-09-08 17:38:25 +02:00
Tony Torralba
c9728098ef
Generate stubs, adapt tests
2022-09-08 17:38:21 +02:00
Tony Torralba
7db1eb98f5
Sync files
2022-09-08 17:32:03 +02:00
Tony Torralba
1b87167d96
Add implicit reads for FlowState sinks and steps
2022-09-08 17:26:59 +02:00
Tony Torralba
d5f101d7e6
Add implicit read FlowState test
2022-09-08 17:19:39 +02:00
Robert Marsh
0feeafd0ac
Merge pull request #10339 from MathiasVP/dont-use-get-unique-id-in-range-analysis
...
C++: Don't use `getUniqueId` in range analysis
2022-09-08 11:13:43 -04:00
Taus
366c574308
Python: Move import logic into its own module
2022-09-08 14:52:08 +00:00
Ed Minnix
59909751ae
Change allowBackup tests to use qlref test format
...
Due to some limitations of comments in XML, it is simpler to implement
the `android:allowBackup` tests using the qlref/expectations test format.
2022-09-08 10:34:17 -04:00
Ed Minnix
e69a8269ad
Move CleartextStorage test files into separate dir
...
Move the files for the CleartextStorage tests into their own directory
to avoid issues with extraction
2022-09-08 10:33:05 -04:00
Mathias Vorreiter Pedersen
594c40a375
Merge pull request #10355 from MathiasVP/fix-unequalIntegralSsa-standard-order
...
C++: Avoid bad standard order in range analysis
2022-09-08 14:58:44 +01:00
erik-krogh
88f295fbb1
make a shared library of the typo database
2022-09-08 15:49:43 +02:00
Tom Hvitved
b3653cc3d0
Merge pull request #10216 from hvitved/ssa/shared-lib
...
SSA: Create a new `codeql/shared-ssa` library pack and move implementation there
2022-09-08 15:39:29 +02:00
Tom Hvitved
e3948e6683
Merge pull request #10354 from hvitved/ruby/convert-flow-test
...
Ruby: Convert data-flow test to use inline test expectations
2022-09-08 15:20:58 +02:00
erik-krogh
a21a4275f3
add taint-step in js/insecure-randomness for selecting a random element
2022-09-08 15:00:00 +02:00
Mathias Vorreiter Pedersen
f119b50c2f
C++: Predicate factoring to prevent a bad standard order.
2022-09-08 13:55:27 +01:00
Ian Lynagh
12ca801ecf
Merge pull request #10350 from github/release-prep/2.10.5
...
Release preparation for version 2.10.5
2022-09-08 13:38:47 +01:00
Tom Hvitved
46127f9f59
Ruby: Convert data-flow test to use inline test expectations
2022-09-08 14:32:21 +02:00
Tamas Vajk
824ba6ed2a
Kotlin: Catch exception thrown by kotlinc
2022-09-08 14:09:18 +02:00
github-actions[bot]
a9d80a5a48
Release preparation for version 2.10.5
2022-09-08 11:35:54 +00:00
erik-krogh
a35fe1ffab
Merge branch 'main' into js-followMsg
2022-09-08 13:09:15 +02:00
Taus
8b8e74cc9a
Merge pull request #10314 from RasmusWL/revert-alert-msgs-change
2022-09-08 13:00:47 +02:00
Asger F
df90b99b67
Merge pull request #10348 from RasmusWL/ruby-fix
...
Ruby: Fix ActiveResource HTTP client request modeling
2022-09-08 12:59:27 +02:00
Erik Krogh Kristensen
57bf92a70c
Merge pull request #10347 from erik-krogh/mermaid
...
JS: add a markdown step through the `mermaid` library
2022-09-08 12:41:58 +02:00
Rasmus Wriedt Larsen
978c165cf4
Ruby: Fix ActiveResource HTTP client request modeling
...
This was a conflict between the merge of
https://github.com/github/codeql/pull/9974 and
https://github.com/github/codeql/pull/10114
2022-09-08 12:14:18 +02:00
Rasmus Wriedt Larsen
1d834799a2
Merge pull request #10114 from RasmusWL/shared-http-client-request
...
Ruby/Python: Shared HTTP client request concept
2022-09-08 11:58:06 +02:00
Jeroen Ketema
9a923d8239
Merge pull request #10311 from jketema/more-builtins
...
C++: Support more builtin operations
2022-09-08 11:55:22 +02:00
Ian Lynagh
b62193d4bf
Merge pull request #10333 from igfoo/igfoo/extractStaticInitializer2
...
Kotlin: Remove a cast from extractStaticInitializer
2022-09-08 10:51:36 +01:00
Tamas Vajk
56ef1739a3
Kotlin: fix KFunctionX.invoke extraction
2022-09-08 10:49:10 +02:00
Tamas Vajk
fdf3488500
Kotlin: Add test with extraction error due to missing base class of KFunctionX
2022-09-08 10:49:01 +02:00
Alex Denisov
a8a2c9e212
Swift: CWE-757: update severity
2022-09-08 10:40:16 +02:00
Alex Denisov
d455a557be
Swift: CWE-757: update docs and user facing text
2022-09-08 10:31:23 +02:00
Tom Hvitved
ac307137ad
Merge pull request #10341 from hvitved/ruby/inline-getavaluereachablefromsource
...
Ruby: Inline `getAValueReachableFromSource`
2022-09-08 10:20:43 +02:00
Jeroen Ketema
6330be3902
C++: Update DB scheme stats file
2022-09-08 10:06:57 +02:00
Jeroen Ketema
04000be050
C++: Add DB scheme upgrade and downgrade scripts
2022-09-08 10:06:57 +02:00
Jeroen Ketema
1140d27bda
C++: Add tests for newly supported builtin operations
2022-09-08 10:06:57 +02:00
Jeroen Ketema
2410321acf
C++: Add change note for newly supported builtin operations
2022-09-08 10:06:57 +02:00
Jeroen Ketema
23b9b07f28
C++: Support more builtin operations
2022-09-08 10:06:57 +02:00
Alex Denisov
d18ad665b6
Swift: CWE-757: Insecure TLS configuration
2022-09-08 09:34:04 +02:00
Michael Nebel
e265b07a93
Merge pull request #10127 from michaelnebel/csharp/clearscontent
...
C#: Replace clears content with CSV summaries.
2022-09-08 09:26:08 +02:00
Erik Krogh Kristensen
9534f31eac
Merge pull request #10343 from erik-krogh/spreadFunction
...
JS: recognize calls to `Function` when spread arguments are used
2022-09-08 09:25:10 +02:00
erik-krogh
0407198dd2
add a markdown step through the mermaid library
2022-09-08 09:23:45 +02:00
Tony Torralba
2681b3d032
Merge pull request #10345 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-09-08 09:15:21 +02:00
Asger F
ada72b865f
Merge pull request #10332 from asgerf/js/type-confusion-bugfix
...
JS: bugfixes in TypeThroughThroughParameterTampering
2022-09-08 09:02:16 +02:00
Harry Maclean
30c9bea8b3
Merge pull request #9974 from hmac/hmac/active-resource
...
Ruby: Model ActiveResource
2022-09-08 07:44:59 +01:00
github-actions[bot]
7e72f53631
Add changed framework coverage reports
2022-09-08 00:21:30 +00:00
Mathias Vorreiter Pedersen
417b2152d8
Merge pull request #10319 from geoffw0/cleartextbarrier
2022-09-08 00:30:57 +01:00
erik-krogh
6447234428
recognize calls to Function where spread arguments are used
2022-09-07 22:55:51 +02:00
erik-krogh
e829387cdb
add failing test for call the Function with a spread argument
2022-09-07 22:54:21 +02:00
Mathias Vorreiter Pedersen
7062263885
C++: Accept test changes.
2022-09-07 21:11:52 +01:00
Tom Hvitved
0070662072
Ruby: Inline getAValueReachableFromSource
2022-09-07 20:28:38 +02:00
Mathias Vorreiter Pedersen
a052614dbf
C++: Two fixes to ensure we don't use getUniqueId in the new range analysis library. (1) don't use it to rank basic blocks, and (2) don't use it in 'toString' on bounds.
2022-09-07 18:45:43 +01:00
Ed Minnix
09b723fc6d
Formatting fixes for allowBackup tests
2022-09-07 13:30:19 -04:00
Andrew Eisenberg
144a0455d8
Merge pull request #10146 from github/aeisenberg/remove-db-upgrades-doc
...
Remove upgrade database docs
2022-09-07 09:49:26 -07:00
Mathias Vorreiter Pedersen
76d433d4ee
Merge pull request #9997 from rdmarsh2/rdmarsh2/cpp/product-flow
...
C++: Experimental product flow library
2022-09-07 17:34:39 +01:00
Ed Minnix
c69a2be976
Moved allowBackup query logic to allowsBackup pred
2022-09-07 12:08:25 -04:00
Ed Minnix
5206c792b0
Additional Unit tests for the allowBackup query
2022-09-07 12:07:48 -04:00
Andrew Eisenberg
fb8a0fc36f
Merge pull request #10182 from github/aeisenberg/codeql-workspace-docs
...
Add docs for codeql workspaces
2022-09-07 08:46:56 -07:00
Mathias Vorreiter Pedersen
e37848ec6d
C++: Remove 'IRConfiguration' since we no longer generate bad IR for range analysis.
2022-09-07 16:39:45 +01:00
Mathias Vorreiter Pedersen
86259ced97
Merge branch 'main' into rdmarsh2/cpp/product-flow
2022-09-07 16:38:42 +01:00
Robert Marsh
55a10d99b4
Merge pull request #10305 from MathiasVP/ql-workaround-for-missing-decl-entries
...
C++: Synthesize `DeclarationEntry`s for IR construction
2022-09-07 11:34:28 -04:00
Tamás Vajk
b129c4098d
Merge pull request #10278 from tamasvajk/kotlin-reified-enum
...
Kotlin: Extract error expression for `enumValues<T>` calls
2022-09-07 17:33:08 +02:00
Mathias Vorreiter Pedersen
7833de19b5
Merge branch 'main' into rdmarsh2/cpp/product-flow
2022-09-07 16:00:43 +01:00
Paolo Tranquilli
a5233c0d01
Swift: fix @id
2022-09-07 16:17:45 +02:00
Paolo Tranquilli
19b13ee4e3
Swift: first draft of query targeting weak hashing
2022-09-07 15:58:35 +02:00
Mathias Vorreiter Pedersen
011d15aca3
C++: Accept test changes.
2022-09-07 14:56:08 +01:00
Edward Minnix III
f6c8144eed
Update java/ql/src/Security/CWE/CWE-312/AllowBackupAttributeEnabled.ql
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-09-07 09:46:36 -04:00
Edward Minnix III
9ddfcf935b
Update java/ql/src/change-notes/2022-08-18-android-allowbackup-query.md
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-09-07 09:46:16 -04:00
Dave Bartolomeo
950445500a
Merge pull request #10321 from MathiasVP/speedup-using-expired-stack-address-2
...
C++: Speedup 'cpp/using-expired-stack-address' by avoiding a large ne…
2022-09-07 09:33:20 -04:00
Tamas Vajk
2728517c7f
Improve error handling
2022-09-07 15:31:23 +02:00
Tamas Vajk
0f967060e5
Fix merge conflict
2022-09-07 15:24:25 +02:00
Tamas Vajk
acac5fe4fd
Improve code quality
2022-09-07 15:21:12 +02:00
Tamas Vajk
7f7cb2c579
Kotlin: refactor declaration stack to handle file as declaration parent
2022-09-07 15:21:11 +02:00
Tamas Vajk
25977778a2
Kotlin: Fix duplicate field entry in declaration stack
2022-09-07 15:21:11 +02:00
Tamas Vajk
0c257a1b78
Kotlin: add test for incorrect declaration stack
2022-09-07 15:21:10 +02:00
Asger F
6806bc1da4
JS: Expand test case
2022-09-07 14:18:01 +02:00
Tamas Vajk
f84e62e16b
Add todo comment based on PR review
2022-09-07 13:47:28 +02:00
Ian Lynagh
b2c83ae69b
Kotlin: Remove a cast from extractStaticInitializer
2022-09-07 12:46:26 +01:00
Asger F
5c12780b1c
JS: Change note
2022-09-07 13:45:38 +02:00
Asger F
d31b59e61d
JS: Call super in isBarrier() override
2022-09-07 13:40:30 +02:00
Asger F
e3c84eefc1
JS: Correctly recognize Array.isArray calls
2022-09-07 13:39:52 +02:00
Asger F
3184ddb38a
JS: Fix test case
2022-09-07 13:39:51 +02:00
Tony Torralba
cd61bd0606
Move files from experimental
2022-09-07 13:13:40 +02:00
erik-krogh
79a048968e
make the alert messages of taint-tracking queries more consistent
2022-09-07 12:22:50 +02:00
Rasmus Lerchedahl Petersen
1649ec7cd7
Python: Describe current naming scheme
...
In the hope that this will enable a better one.
It looks like
- type tracking should currently be mutually recursive with data flow
(this needs investigation)
- type tracking already supports special methods
(we should probably have a test for this)
2022-09-07 12:18:42 +02:00
Mathias Vorreiter Pedersen
e0a5d18d7d
C++: Respond to Schack feedback.
2022-09-07 11:16:35 +01:00
Mathias Vorreiter Pedersen
5ce47d97b2
Merge branch 'main' into rdmarsh2/cpp/product-flow
2022-09-07 11:14:42 +01:00
Tony Torralba
8e0b4892ee
Add Implicit PendingIntents sinks for Compat classes
2022-09-07 11:04:22 +02:00
Tamas Vajk
07038d0b3a
Fix QL formatting
2022-09-07 10:48:22 +02:00
Rasmus Lerchedahl Petersen
565378031d
Python: remember to import the new framework
...
I think it should perhaps not be mentioned in `frameworks.rst`
2022-09-07 10:24:58 +02:00
Rasmus Lerchedahl Petersen
0cfb49102b
Python: fix non-US spelling
2022-09-07 09:30:42 +02:00
erik-krogh
283c711de9
deprecate unused predicate inside the essa module
2022-09-07 07:40:04 +02:00
erik-krogh
1cbf28358c
deprecate unused code inside the points-to library
2022-09-07 07:39:16 +02:00
erik-krogh
46b7aa92ae
deprecate predicates in protocols.qll that were only retained for backwards compatibility
2022-09-07 07:37:51 +02:00
Rasmus Lerchedahl Petersen
b2fbbc6ac5
Python: add a flow summary
...
we could consider adding non-value-preserving flow from input to output
2022-09-06 21:29:58 +02:00
Ed Minnix
dca4cd221a
Documentation cleanup for allowBackup query
2022-09-06 14:35:11 -04:00
Ed Minnix
0a83cedeb7
Unit tests for android:allowBackup query
2022-09-06 13:52:43 -04:00
Rasmus Lerchedahl Petersen
f6d807aec0
Python: Add summary test append_to_list
2022-09-06 18:42:32 +02:00
Rasmus Lerchedahl Petersen
744fbf0c1b
Python: qldoc for inject
2022-09-06 17:46:14 +02:00
Rasmus Lerchedahl Petersen
67710eaed7
Python: Comment to highlight convention
2022-09-06 17:43:34 +02:00
Rasmus Lerchedahl Petersen
a496d10126
Python: qldoc to highlight source code aspect
2022-09-06 17:39:20 +02:00
Rasmus Lerchedahl Petersen
e7400e90e5
Python: add qldoc
2022-09-06 17:29:27 +02:00
Rasmus Lerchedahl Petersen
4cd41c24c7
Python: remove comments and start design document
2022-09-06 17:23:40 +02:00
Rasmus Lerchedahl Petersen
67c3a9b2f4
Python: resolve library calls in the CFG
...
rather than in the AST
2022-09-06 17:00:28 +02:00
Mathias Vorreiter Pedersen
d6b8f25312
C++: Add more tests.
2022-09-06 15:22:10 +01:00
Mathias Vorreiter Pedersen
9745073024
C++: Speedup 'cpp/using-expired-stack-address' by avoiding a large negation.
2022-09-06 14:33:33 +01:00
Geoffrey White
d0cda04909
Swift: Clearer, possibly more efficient implementation.
2022-09-06 13:48:04 +01:00
Tony Torralba
b745b5ab71
Add models for androidx.core.app.NotificationCompat
2022-09-06 14:43:13 +02:00
Geoffrey White
0741266cea
Swift: Switch from isSanitizerIn to isSanitizer.
2022-09-06 13:37:49 +01:00
Geoffrey White
8281d92e71
Swift: Add barriers for encryption.
2022-09-06 13:37:49 +01:00
Geoffrey White
9683a95162
Swift: Add a few more test cases.
2022-09-06 13:37:48 +01:00
Rasmus Lerchedahl Petersen
e5f087518e
Python: stay in control flow layer
2022-09-06 14:16:48 +02:00
erik-krogh
24f2e3cc07
update alert-messages of the sensitive data queries to match #10314
2022-09-06 12:25:36 +02:00
Rasmus Wriedt Larsen
5f6e3dcc2e
Python: Revert changes to sensitive data query alert messages
...
This partly reverts the changes from https://github.com/github/codeql/pull/10252
Although consistency is nice, the new messages didn't sound as natural.
New alert message would read
> Insecure hashing algorithm (md5) depends on sensitive data (password). (...)
I'm not sure what it means that a hashing algorithm depends on data. So
for me, the original text below is much easier to understand.
> Sensitive data (password) is used in a hashing algorithm (md5) that is insecure (...)
Same goes for the other sensitive data queries.
2022-09-06 12:01:24 +02:00
Mathias Vorreiter Pedersen
02c18e714b
C++: Mention 'range-based for-loops' in the QLDoc for 'IRDeclarationEntry'.
2022-09-06 10:40:13 +01:00
Mathias Vorreiter Pedersen
10f962f341
C++: Rename 'PseudoDeclarationEntry' to 'IRDeclarationEntry'.
2022-09-06 10:36:38 +01:00
Tamas Vajk
826bbdf834
Kotlin: Fix vararg extraction outside of method call
2022-09-06 11:32:32 +02:00
Tamas Vajk
cb3c53dee7
Kotlin: Add test case for unexpected vararg extraction error
2022-09-06 11:32:24 +02:00
Mathias Vorreiter Pedersen
ed3fff0eba
Update cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-09-06 10:32:16 +01:00
Rasmus Wriedt Larsen
7895a5859d
Ruby: Autoformat
2022-09-06 11:01:06 +02:00
Rasmus Wriedt Larsen
a9e1e72196
Merge branch 'main' into shared-http-client-request
2022-09-06 10:52:27 +02:00
Rasmus Wriedt Larsen
528ef0eeaa
Ruby: Use separate dataflow copy for HTTP client libs
...
As discussed with @hvitved offline. This helps out to ensrue we don't
needlessly evaluate dataflow for configurations that are not needed
anyway. That is, if other library modeling also used the same dataflow
configuration, which ends up being used in query A, then dataflow for
all the `DataFlowImplForLibraries` configurations would be computeted at
once. When we get to evaluate the query `RequestWithoutValidation.ql`
these results mgith have been forgotten since the predicates are not
cached, and everything will have to be computeted again.
In principle we could be added a dataflow copy for each framework.
However, since we know that the `disablesCertificateValidation`
member-predicates for all the HTTP client libraries will all be used at
the same time, and only for the one query, we only add ONE additional
copy.
Note that the only use of `DataFlowImplForLibraries` before this PR is
using `tainttrackingforlibraries.TaintTrackingImpl` (based on
DataFlowImplForLibraries) for regex computation.
c904ba1d16/ruby/ql/lib/codeql/ruby/Regexp.qll (L153)
Since this is currently transitively imported from Frameworks.qll
(through Core.qll, and core/String.qll), the previous approach didn't
actually violate the assumption about all configurations always being in
scope, but it might have been more by accident, than by purpose.
2022-09-06 10:43:36 +02:00
Rasmus Wriedt Larsen
25d09cd6d6
Ruby: Simplify getKeywordArgumentIncludeHashArgument
...
As suggested by @hvitved in review
2022-09-06 10:24:22 +02:00
Michael Nebel
0e52d2c9d3
C#: Add missing bi-directional imports.
2022-09-06 09:34:13 +02:00
Mathias Vorreiter Pedersen
885bf427bd
C++: Accept test changes.
2022-09-05 23:26:03 +01:00
Mathias Vorreiter Pedersen
f6654e3d69
C++: As a bonus we now no longer need the 'TTranslatedRangeBasedForVariableDeclaration' IPA branch. This previously existed only to account for the missing 'DeclarationEntry's happening in range-based for loops. But these are now also handled by 'PseudoDeclarationEntry's.
2022-09-05 22:18:41 +01:00
Mathias Vorreiter Pedersen
fc85ef76ed
C++: Introduce 'PseudoDeclarationEntry's to handle missing 'DeclarationEntry's during IR construction.
2022-09-05 22:17:14 +01:00
Rasmus Lerchedahl Petersen
af08c6eb08
Python: remove repeated test file
2022-09-05 20:44:55 +02:00
Mathias Vorreiter Pedersen
2da46ad691
C++: Add two testcases demonstrating malformed IR from missing declaration entries from decl stmts.
2022-09-05 17:49:20 +01:00
Geoffrey White
b6d5b6731a
C++: Make QLDoc meet style guide.
2022-09-05 17:17:57 +01:00
Geoffrey White
234da636a4
C++: Change note.
2022-09-05 17:01:25 +01:00
Geoffrey White
008d583da8
C++: Modernize cpp/cleartext-storage-database.
2022-09-05 16:47:14 +01:00
Rasmus Lerchedahl Petersen
d31d763328
Python: adjust test expectations
...
We now locate a `DataFlow::Node` rather than an 'AstNode`.
2022-09-05 16:45:43 +02:00
Erik Krogh Kristensen
4e14177614
fix typo in change-note
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
54eb0414cb
rename an upper-cased acronym
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
90bc8a5038
run the explicit-this patch on javascript/
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
b398f968e2
expand change-note to mention classes that have a changed basetype
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
e64f96c1ce
rewrite the change-note to emphasise that the change is potentially breaking
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
26f5643f3e
update the deprecation notice of RouteExpr such that it points to public APIs
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
e387ebaedd
add domNode.innerHTML += sink as a DOM sink
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
74a79f8622
simplify int check
...
Co-authored-by: Asger F <asgerf@github.com >
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
73a936104a
fix typo in qldoc
...
Co-authored-by: Asger F <asgerf@github.com >
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
833480d5c5
add change note
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
5b61db9fd3
refactor miscellaneous expression uses to dataflow nodes
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
6697dd1396
rewrite some expression based predicates in TaintTracking.qll
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
b4968eb645
refactor the SensitiveExpr to be a dataflow node
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
0c4f08c841
refactor the CredentialsExpr to be a dataflow node
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
c5b1588096
update the SQL/NoSQL models to use dataflow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
4d0534352e
refactor a use of MethodCallExpr in ClientSideUrlRedirectCustomizations.qll
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
e0e8085b95
update the cryptoLibraries to use dataflow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
5ebea8c75a
fix express in the POI test
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
aa9261f1b1
convert the AngularJS model to use DataFlow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
9bea110d24
convert the DOM model to use DataFlow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
2f429e7d29
convert some leftovers to use dataflow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
136124fbaa
convert the remaining Koa models to DataFlow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
fc54ba823b
update the existing expression based Express models
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
8266b083d7
update the predicates on Express::RouteHandler to use dataflow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
4cfbf15d18
deprecate RouteHandlerExpr and make RouteHandlerNode instead
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
3da34ca7a0
update Express::RouteExpr to a DataFlow::Node
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
3eb486610b
update Express::RouterDefinition to a DataFlow::InvokeNode
2022-09-05 16:11:51 +02:00
Erik Krogh Kristensen
92240384a9
update the tests to reflect the extra DataFlow::Nodes
2022-09-05 15:47:38 +02:00
Erik Krogh Kristensen
dfb7782be0
replace getA?RouteHandlerExpr with getA?RouteHandlerNode
2022-09-05 15:46:27 +02:00
Erik Krogh Kristensen
288230d7cf
update tests to reflect the extra DataFlow::Nodes from ResponseNode and RequestNode
2022-09-05 15:46:27 +02:00
Erik Krogh Kristensen
30d929909c
deprecate RequestExpr and ResponseExpr and use ResponseNode and RequestNode instead
2022-09-05 15:46:25 +02:00
Erik Krogh Kristensen
9cb7522bc1
change RouteSetup to a DataFlow::Node
2022-09-05 15:45:31 +02:00
Erik Krogh Kristensen
d98028be1a
change ServerDefinition to a DataFlow::Node
2022-09-05 15:44:56 +02:00
Geoffrey White
946456acc2
C++: Apply the sanitizer improvement from cpp/cleartext-storage-buffer in cpp/cleartext-storage-file and cpp/cleartext-transmission.
2022-09-05 14:44:33 +01:00
Erik Krogh Kristensen
ced4843dd7
change CookieDefinition to a DataFlow::Node
2022-09-05 15:44:13 +02:00
Erik Krogh Kristensen
24b845589d
change ResponseBody to a DataFlow::Node
2022-09-05 15:44:13 +02:00
Erik Krogh Kristensen
19e808186d
refactor definesExplicitly to use DataFlow::Node
2022-09-05 15:44:13 +02:00
Erik Krogh Kristensen
ce0175a046
don't use astNode in StandardHeaderDefinition
2022-09-05 15:44:13 +02:00
Erik Krogh Kristensen
d4ccc75ce1
refactor RedirectInvocation to a DataFlow::Node
2022-09-05 15:44:13 +02:00
Erik Krogh Kristensen
a03e6a800d
deprecate the HTTP flowsTo predicates to avoid confusion with SourceNode::flowsTo
2022-09-05 15:44:12 +02:00
James Fletcher
d787d94fbd
Merge branch 'main' into download-db-vs-code
2022-09-05 13:55:17 +01:00
erik-krogh
aa56ca37ae
make the alert messages of taint-tracking queries more consistent
2022-09-05 14:04:52 +02:00
Rasmus Lerchedahl Petersen
5fc1bbc8c5
Python: Only alert on Python 2 code
...
since
- Python 3 is ok from 3.7 onwards
- support for Python 3.6 was just dropped
- we do not actually know the minor version of the analysed code
(only of the extractor)
2022-09-05 13:38:14 +02:00
erik-krogh
a86a940df7
add getRepr() and toString() on RelevantState
2022-09-05 13:27:34 +02:00
James Fletcher
45182c2f46
Merge branch 'main' into download-db-vs-code
2022-09-05 10:24:55 +01:00
erik-krogh
3f1cb04f3e
sync files
2022-09-05 11:22:34 +02:00
Erik Krogh Kristensen
0162bc3c77
use RelevantState inside the lastStartState predicate
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-09-05 11:22:12 +02:00
Tom Hvitved
9ebabd1e1f
SSA: Strip shared from namespace and qlpack name
2022-09-05 11:17:30 +02:00
Rasmus Lerchedahl Petersen
afb50212a0
Python: update version check
...
doc said 3.5 experience says 3.7
2022-09-05 10:50:53 +02:00
Tamas Vajk
37500d274a
Accept failing consistency test
2022-09-05 08:58:38 +02:00
Rasmus Lerchedahl Petersen
a8a042db57
python: remove illegal option
2022-09-03 20:33:48 +02:00
erik-krogh
c38062ce93
convert RelevantState to a class in the PrefixConstruction module
2022-09-02 20:26:31 +02:00
Raul Garcia
1bfe335d93
Merge branch 'main' into Token_validation
2022-09-02 09:00:55 -07:00
Tamas Vajk
71cce9cf28
Kotlin: Extract error expression for enumValues<T> calls
2022-09-02 15:42:05 +02:00
Tamas Vajk
fd0d2ad767
Kotlin: Add test for enumValues call with type parameter
2022-09-02 15:40:03 +02:00
Michael Nebel
9c5a6dd031
C#: Add WithElement summary for Reverse and update expected test output.
2022-09-02 15:17:24 +02:00
Michael Nebel
e7e78dcab3
C#: Add with element example and update existing line numbers in testcase.
2022-09-02 15:17:24 +02:00
Michael Nebel
022cbfa009
C#: Support 'WithElement'.
2022-09-02 15:17:24 +02:00
Michael Nebel
5511bc8e28
Java/Ruby/Swift: Sync files.
2022-09-02 15:17:24 +02:00
Michael Nebel
ecce30ed5a
C#: Remove clearsContent predicate from the framework code.
2022-09-02 15:17:24 +02:00
Michael Nebel
19da00a51a
C#: Delete clears content test case.
2022-09-02 15:17:23 +02:00
Michael Nebel
2ae2008453
C#: Update flow summaries test expected output.
2022-09-02 15:17:23 +02:00
Michael Nebel
f43feac324
C#: Add models as data models for Clear.
2022-09-02 15:17:23 +02:00
Michael Nebel
80f89282b7
C#: Add summary for System.Text.StringBuilder.Clear.
2022-09-02 15:17:23 +02:00
Michael Nebel
e3bfc4bd82
C#: CSV Printing of WithoutElement content.
2022-09-02 15:17:23 +02:00
Michael Nebel
8234a508b3
C#: Parsing of WithoutElement.
2022-09-02 15:17:23 +02:00
Tom Hvitved
ba62b9e822
Address review comments
2022-09-02 13:07:27 +02:00
james
c0b9be0ecb
new screenshot
2022-09-02 10:43:36 +01:00
james
0c971bcc8c
update info about downloading dbs in vs code
2022-09-02 10:36:02 +01:00
Harry Maclean
637e92d990
Ruby: Fix typos
2022-09-02 13:16:14 +12:00
Harry Maclean
6fff02817d
Ruby: Fix bug in disablesCertificateValidation
2022-09-02 13:15:02 +12:00
Harry Maclean
570a03a08f
Ruby: Test disablesCertificateValidation
2022-09-02 13:00:29 +12:00
Rasmus Lerchedahl Petersen
0599e8ac35
python: add version check
...
and attempt to set version for tests
2022-09-01 23:47:07 +02:00
Robert Marsh
ca2694ae1d
C++: exclude end pointers in iterator-style loops
2022-09-01 17:42:19 -04:00
Rasmus Lerchedahl Petersen
d102a84e02
python: replace points-to with API graph
2022-09-01 22:58:46 +02:00
Rasmus Lerchedahl Petersen
163bfc4f71
python: replace points-to with API graph
...
- values are identified via `API::builtin`
- `points-to` is approximated by `getAValueReachableFromSource`
2022-09-01 22:47:32 +02:00
Rasmus Lerchedahl Petersen
93fcaf24c1
python: RaisingTuple.ql to not use poins-to
...
Use local dataflow instead and simply check for tuple literals.
2022-09-01 21:45:57 +02:00
Tom Hvitved
6b728acd9e
Use specific codeql/shared-ssa pack for the SSA library
2022-09-01 21:23:33 +02:00
Raul Garcia
0b0777addf
Fixing the @id fields
2022-09-01 09:45:11 -07:00
Robert Marsh
35701373ee
C++: more semantic range analysis perf tweaks
2022-09-01 10:49:54 -04:00
Robert Marsh
b1de54e9aa
C++: rewrite ProductFlow recursion for performance
2022-09-01 10:49:12 -04:00
Stephan Brandauer
81d02cc963
optimize performance of a helper-predicate
2022-09-01 16:05:36 +02:00
Stephan Brandauer
cdbab187ca
remove unused code
2022-09-01 16:05:36 +02:00
Stephan Brandauer
f59c48ebb9
autoformatter
2022-09-01 16:05:36 +02:00
Stephan Brandauer
caf39592d4
better documentation
2022-09-01 16:05:36 +02:00
Stephan Brandauer
b9cb60c2cb
Review comments
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-09-01 16:05:36 +02:00
Stephan Brandauer
ac097d5f2a
fix now-broken tests
2022-09-01 16:05:35 +02:00
Stephan Brandauer
068a948c05
fix ql-for-ql warnings
2022-09-01 16:05:35 +02:00
Stephan Brandauer
3aa4e29dae
remove obsolete features
2022-09-01 16:05:35 +02:00
Stephan Brandauer
ed75080072
add stringConcatenatedWith feature to help the model learn that string concatenation leaves are usually not sinks
2022-09-01 16:05:35 +02:00
Stephan Brandauer
9468f62620
add assignedToPropName feature to let the model improve number of false positives for XSS query
2022-09-01 16:05:35 +02:00
Stephan Brandauer
db73a62bc2
fix bug in InputArgumentIndex feature
2022-09-01 16:05:34 +02:00
Stephan Brandauer
67500f85ba
performance fixes
2022-09-01 16:05:34 +02:00
Stephan Brandauer
96919eea80
use ? for unknown parameternames
2022-09-01 16:05:34 +02:00
Stephan Brandauer
f8b3c27210
add documentations and rename a feature
2022-09-01 16:05:34 +02:00
Stephan Brandauer
3422bdee92
add functionInterfacesInFile and surroundingFunctionParameters features
2022-09-01 16:05:34 +02:00
Stephan Brandauer
3e860762e7
documentation for calleeImports ATM feature
2022-09-01 16:05:33 +02:00
Stephan Brandauer
93aa279b31
documentation for new feature
2022-09-01 16:05:33 +02:00
Stephan Brandauer
25db666087
ATM: new feature to list all imports in an endpoint's file
2022-09-01 16:05:33 +02:00
Esben Sparre Andreasen
d0faf71113
use proper import instead of inlining
2022-09-01 16:05:33 +02:00
Esben Sparre Andreasen
82069cfb75
remove Input_ArgumentIndexAndAccessPathFromCallee
2022-09-01 16:05:33 +02:00
Esben Sparre Andreasen
095beb3c71
add docstring examples
2022-09-01 16:05:32 +02:00
Esben Sparre Andreasen
548f0286f3
address review comments
2022-09-01 16:05:32 +02:00
Esben Sparre Andreasen
57041aad7c
Apply suggestions from code review
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-09-01 16:05:32 +02:00
Esben Sparre Andreasen
5ac608d503
fix semantic merge conflict
2022-09-01 16:05:32 +02:00
Esben Sparre Andreasen
c95ab031ef
rename new features
2022-09-01 16:05:32 +02:00
Esben Sparre Andreasen
6533260614
add more features
2022-09-01 16:05:31 +02:00
Esben Sparre Andreasen
c4c4d288cb
improve feature documentation
2022-09-01 16:05:31 +02:00
Esben Sparre Andreasen
a8c3cb29ec
improve feature tests with more cases
2022-09-01 16:05:31 +02:00
Esben Sparre Andreasen
86b2b79b43
improve access path strings
2022-09-01 16:05:31 +02:00
Esben Sparre Andreasen
e0870e0b96
support import in getSimpleAccessPath
2022-09-01 16:05:31 +02:00
Esben Sparre Andreasen
e7de6cb4a7
support await in getSimpleAccessPath
2022-09-01 16:05:30 +02:00
Esben Sparre Andreasen
1db2117be4
avoid using new feautes by default
2022-09-01 16:05:30 +02:00
Esben Sparre Andreasen
7c2bfef253
add CompareFeatures.ql
2022-09-01 16:05:30 +02:00
Esben Sparre Andreasen
41b35eaa49
add generic tests for features
2022-09-01 16:05:30 +02:00
Esben Sparre Andreasen
f3cdb12dcf
Document EndpointFeatures.qll
2022-09-01 16:05:30 +02:00
Esben Sparre Andreasen
482d169667
add ParameterAccessPathSimpleFromArgumentTraversal
2022-09-01 16:05:29 +02:00
Esben Sparre Andreasen
dbc89fd9ab
improve getSimpleAccessPath
2022-09-01 16:05:29 +02:00
Esben Sparre Andreasen
0db7c39c34
refactor calleeAccessPath feature to class
2022-09-01 16:05:29 +02:00
Stephan Brandauer
aa41bbb96c
refactor getACallBasedTokenFeature to class-use
2022-09-01 16:05:29 +02:00
Esben Sparre Andreasen
5204346e1f
Add CalleeAccessPathSimpleFromArgumentTraversal
2022-09-01 16:05:28 +02:00
Esben Sparre Andreasen
e1a38bd4d6
refactor EndpointFeatures.ql to use classes
2022-09-01 16:05:28 +02:00
Taus
623ad6bab0
Python: Add getADefiningWrite
2022-09-01 09:10:06 +00:00
Tom Hvitved
c6807f5c05
Update two Actions workflows
2022-09-01 09:36:50 +02:00
Tom Hvitved
5f30d4ca21
SSA: Add missing QL doc
2022-09-01 09:36:50 +02:00
Tom Hvitved
8e5d6ba4f9
SSA: Create a new shared library pack and move implementation there
2022-09-01 09:36:49 +02:00
Raul Garcia
476562ec62
Fixes based on the PR comments
2022-08-31 12:32:47 -07:00
Ed Minnix
6485e73cd3
Added documentation for providesMainIntent pred
2022-08-30 13:00:44 -04:00
Ed Minnix
500a6f3b86
Add check for files which provide the app launcher
...
Adds support for filtering which applications include the
`android.intent.action.MAIN` intent.
2022-08-30 12:54:26 -04:00
Ed Minnix
b5c54f5a3b
Add check for android:allowBackup explicitly set
...
`android:allowBackup` has a default value of `true`. So we want to flag
any file which explicitly sets it.
2022-08-30 12:53:12 -04:00
Harry Maclean
5d356df300
QLDoc fixes
2022-08-29 14:24:37 +12:00
Harry Maclean
9651fa1573
Ruby: Add ActiveResource change note
2022-08-29 14:24:37 +12:00
Harry Maclean
ec58107439
QlDoc fix
2022-08-29 14:24:37 +12:00
Harry Maclean
dcc0123023
Fix QL4QL alert
2022-08-29 14:24:37 +12:00
Harry Maclean
06c95ba457
Ruby: QLDoc
2022-08-29 14:24:37 +12:00
Harry Maclean
75e1497fbf
Ruby: Import ActiveResource by default
2022-08-29 14:24:37 +12:00
Harry Maclean
aa6edb0edb
Ruby: Model ActiveResource
2022-08-29 14:24:37 +12:00
Harry Maclean
09ad1c29bd
Ruby: Add SelfVariableAccessCfgNode
2022-08-29 14:24:37 +12:00
Raul Garcia
b51c6d6651
Fixes based on PR feedback
2022-08-25 16:40:50 -07:00
Arthur Baars
24526108d3
Ruby: update dbscheme stats
2022-08-25 17:48:28 +02:00
Arthur Baars
f77c2ac3d0
Update tests
2022-08-25 17:40:52 +02:00
Arthur Baars
ed005077fa
Ruby: upgrade/downgrade scripts
2022-08-25 17:40:52 +02:00
Arthur Baars
59773eb743
Ruby: update tree-sitter grammar
2022-08-25 17:21:29 +02:00
yoff
9aa8b46cbf
Python: remove redundant code
2022-08-25 12:48:08 +00:00
yoff
6b4716485b
Python: rename file
2022-08-25 12:23:09 +00:00
yoff
54dde41329
Python: remove example code
2022-08-25 12:19:12 +00:00
yoff
800165d63c
python: udate deprecated call
2022-08-25 09:49:46 +00:00
yoff
d9444d8b08
Python: update synced file FlowSummaryImpl.qll
2022-08-25 09:31:45 +00:00
yoff
0b5d4c59dd
Merge branch 'main' of https://github.com/github/codeql into python-dataflow/flow-summaries-from-scratch
...
synced files have changed
2022-08-25 09:24:05 +00:00
yoff
4a5fa5993d
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-08-25 10:47:16 +02:00
Edward Minnix III
e6a1b1fab9
Rename allowBackup query id
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-08-24 15:54:13 -04:00
Ed Minnix
de36372d1c
Refactor android:backupAllowed query
...
Refactor the query to check for the nonexistence of the
`android:allowBackup` attribute being set to false.
The default value is true, so we need to check for it being explicitly
marked false.
2022-08-24 15:54:13 -04:00
Ed Minnix
a036639ecd
Added change notes
2022-08-24 15:54:13 -04:00
Ed Minnix
dad4a403db
Add support for android:allowBackup default value
...
The default value of `android:allowBackup` is `true`. Added support for
detecting if the default value is used.
2022-08-24 15:54:13 -04:00
Ed Minnix
6509426fb3
android:allowBackup query documentation
2022-08-24 15:54:13 -04:00
Ed Minnix
44b0a2b8af
Android allowBackup query
2022-08-24 15:54:13 -04:00
Ed Minnix
7d15af6caa
Add allowBackup check to AndroidManifest
2022-08-24 15:54:13 -04:00
Ed Minnix
dac64eeca7
Query test files
2022-08-24 15:54:13 -04:00
Rasmus Wriedt Larsen
eccc7d6d6f
Ruby: Remove redundant .getExpr()
2022-08-23 15:42:21 +02:00
Rasmus Wriedt Larsen
717a355913
Ruby: Accept grammar fix
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-08-23 15:36:45 +02:00
Rasmus Wriedt Larsen
d832298e40
Ruby: Accept grammar fix
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-08-23 15:36:37 +02:00
Rasmus Wriedt Larsen
61bf2154cd
Merge branch 'main' into shared-http-client-request
2022-08-22 12:05:37 +02:00
Rasmus Wriedt Larsen
9790594984
Ruby: Bugfix after HTTP::Client::Request change
...
I guess this is not 100% accurate any longer since the base class is
only a `DataFlow::Node` now... I guess we could make it a
`DataFlow::CallNode` in the Concept definition.
2022-08-19 16:25:47 +02:00
Rasmus Wriedt Larsen
9eda630965
Ruby: Add CallNode.getKeywordArgumentIncludeHashArgument
2022-08-19 15:54:15 +02:00
Rasmus Wriedt Larsen
10968bf115
Ruby: Fix alert-msg logic for RequestWithoutValidation.ql
...
This really surprised me, but as shown on the results, it does actually
make a difference in the alert-message.
2022-08-19 15:50:09 +02:00
Rasmus Wriedt Larsen
0ac3624342
Ruby: Implement new disablesCertificateValidation for all HTTP client models
...
Sadly most alert text changed, but the two important changes are:
1. The request on RestClient.rb:19 now has an expanded alert text,
highlighting where the origin of the value that disables certificate
validation comes from. (in this case, it's trivial since it's the
line right above)
2. We handle passing `false`/`OpenSSL::SSL::VERIFY_NONE` the same in the
argument passing examples in Faraday.rb
2022-08-19 15:46:22 +02:00
Rasmus Wriedt Larsen
1f028ac206
Ruby: Implement new disablesCertificateValidation for RestClient
2022-08-19 15:43:19 +02:00
Rasmus Wriedt Larsen
07d95918f2
Ruby: Add more RequestWithoutValidation.ql tests
...
Added:
- one where the value is not directly used when disabling certificate
validation.
- one with argument passing, Faraday, where it is only the passing of
`OpenSSL::SSL::VERIFY_NONE` that is recognized.
2022-08-19 15:42:50 +02:00
Rasmus Wriedt Larsen
47c9c5bddd
Ruby: Update RequestWithoutValidation.ql to match Python version
...
No library modeling currently has support for the new disablesCertificateValidation/2, so only the alert text has changed
(removed an import from Python so the queries would ACTUALLY match)
2022-08-18 14:32:41 +02:00
Rasmus Wriedt Larsen
4a82025087
Ruby: Base HTTP::Client::Request on shared concept
...
Fixing up deprecation errors in next commit
2022-08-18 13:42:53 +02:00
Rasmus Wriedt Larsen
e2b78df5ad
Ruby: Change HTTP::Client::Request to have DataFlow::Node as base class
...
Although this is a breaking change, as explained in the change-note, it
should onyl affect peopel that have created their own HTTP client
request modeling, which I assume is none.
The alternative would have been to keep the old class/module as
deprecated, and introduce a `HTTP::Client::Requestv2` class/module that
is based on `DataFlow::Node` instead. The old class could then be
deprecated in 1 year, and we could do a rename from
`HTTP::Client::Requestv2` -> `HTTP::Client::Request` at the same time.
(and then wait 1 more year before being able to delete
`HTTP::Client::Requestv2`)
All in all, I think this is the right tradeoff, given that CodeQL Ruby
is still in beta.
2022-08-18 13:42:52 +02:00
Rasmus Wriedt Larsen
e6b4d12f94
Sync ConceptsShared
2022-08-18 13:42:52 +02:00
Rasmus Wriedt Larsen
635fd1902d
Python: Move HTTP::Client::Request to shared concepts
...
New shared concepts uses correct casing of HTTP according to our
style-guide.
2022-08-18 13:42:52 +02:00
Rasmus Wriedt Larsen
9d96b73b8b
Ruby: Fixup test annotation
2022-08-18 13:42:49 +02:00
Robert Marsh
56eacce320
C++: restrict to end-of-allocation pointers
2022-08-16 17:52:06 -04:00
Robert Marsh
93de8e2308
C++: fix missing bounds in exp range analysis
2022-08-16 17:44:51 -04:00
Robert Marsh
c306ba4d77
C++: one more PR comment
2022-08-16 17:44:50 -04:00
Robert Marsh
66ce9158a3
C++: respond to easy comments on ProducFlow.qll
2022-08-16 17:44:48 -04:00
Robert Marsh
0ebd7d0de5
C++: respond to PR comments
2022-08-16 17:44:47 -04:00
Robert Marsh
e4d0e7431c
C++: some experimental product flow queries
2022-08-16 17:44:46 -04:00
Robert Marsh
d0f4c2f823
C++: product flow prototype
2022-08-16 17:44:45 -04:00
Raul Garcia
e5f5d461f4
addressing feedback from PR review
2022-08-12 10:16:10 -07:00
Raul Garcia
39e53a2932
Updates based on PR feedback. 1 pending change
2022-08-11 17:59:57 -07:00
Raul Garcia
0805b49914
Update csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2022-08-11 17:35:10 -07:00
Raul Garcia
6070e4f312
Update csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2022-08-11 17:31:12 -07:00
yoff
b8931d36ca
python: give InterpretNode empty charpred
...
InterpreNode is going away, but we need a dummy implementation.
However, we do not need any instances, and some tests get confused.
2022-08-10 10:57:30 +00:00
yoff
75ac24a847
Merge branch 'main' into python-dataflow/flow-summaries-from-scratch
2022-08-10 10:57:59 +02:00
Raul Garcia
5a7b6532a9
Updated to handle lambda statements (previously false negatives) + a couple of bug fixes.
2022-07-29 13:47:53 -07:00
Raul Garcia
9b79668ed2
Addressing some of the feedback. Work still pending
2022-07-20 10:58:01 -07:00
Raul Garcia
7f725137e5
Addressing some of the feedback. Work pending.
2022-07-20 10:56:44 -07:00
Raul Garcia
97d9fd9846
Update security-validation-disabled.ql
2022-07-05 15:18:56 -07:00
Raul Garcia
fcb01ef28d
Merge branch 'github:main' into Token_validation
2022-07-01 17:37:05 -07:00
Raul Garcia
62c28571c6
making changes based on feedback during PR
2022-07-01 17:35:02 -07:00
yoff
f52d792b36
Merge branch 'main' of https://github.com/github/codeql into python-dataflow/flow-summaries-from-scratch
2022-07-01 12:01:07 +00:00
yoff
61523bd330
python: better names
...
- "Normal" instead of "NonSpecial"
- "NonLibrary" instead of "2"
I could not find a good replacement for "NonLibrary", nor for "Source",
but I added QLDocs in a few places to help the reading.
2022-07-01 11:55:20 +00:00
yoff
a0db438799
python: rename getACall2 -> getANonLibraryCall
2022-07-01 10:29:03 +00:00
yoff
f6af24894d
python: recover isPackageUsed
...
- add `unknownAttribute` to pre-compute negation
- add `Node`-less formulation of "is imported"
2022-07-01 09:39:07 +00:00
yoff
71583bf6be
python: fix import of AccessPathSyntax
2022-07-01 08:48:55 +00:00
yoff
3a80baf39c
python: concession to get the code to compile
...
`isPackageUsed` now does no filtering
2022-07-01 07:06:09 +00:00
yoff
e54ada175d
python: rewrite not away
...
A `LocalSourceNode` is either a `ModuleVariableNode`
or an `ExprNode`.
2022-07-01 07:03:14 +00:00
Raul Garcia
13464e8015
Changing @Severity tag to error
2022-06-23 09:07:28 -07:00
Raul Garcia
202a0916a3
IdentityModel_tokenvalidation
2022-06-23 09:03:16 -07:00
yoff
5042c804dd
python: sync files and fix many small things
...
- but now we have non-monotonic recursion again...
2022-06-23 14:57:06 +00:00
yoff
a2851baa9f
python: fix import of "merge moved" file
2022-06-23 12:05:55 +00:00
yoff
1e20cca913
Merge branch 'main' of https://github.com/github/codeql into python-dataflow/flow-summaries-from-scratch
2022-06-23 09:14:02 +00:00
yoff
140dc1a61e
merge in main
2022-06-23 09:05:32 +00:00
yoff
8bf60301da
python: we have hidden isParameterOf
...
but now allow a clear alternative
2022-06-23 08:57:50 +00:00
yoff
fe0c5d8ee5
python: make ArgumentNode publicly usable
...
- add `getCall`
2022-06-23 08:48:55 +00:00
yoff
b22de69ab2
python: update qldoc now predicates may be empty
2022-06-23 08:41:28 +00:00
yoff
cedf9ef538
python: make DataFlowCall "publicly usable"
...
- add `getCallable`, `getArg` and `getNode`
- these are `none` for summary calls
- revert "external" uses (they had been changed to `DataFlowSourceCall`)
2022-06-23 08:32:23 +00:00
yoff
dd69100dcd
python: ParameterNode -> SourceParameterNode
2022-06-21 12:55:22 +00:00
yoff
2c2395ffd7
python: ParameterNode is the one used publicly
...
- it contains also synthesized nodes, but getParameter returns none for these.
- hide isParameterOf
2022-06-21 12:38:40 +00:00
yoff
8a2125353d
Python: fix definition of LocalSourceNode
...
and typo
2022-06-20 08:48:33 +00:00
yoff
8b9915e372
Python: Let the user help us identifying callbacks
2022-05-23 11:07:47 +00:00
yoff
dac1b6867a
python: Avoid abstract class in public interface
...
use construction from Ruby with `ParameterNodeImpl`
2022-05-16 09:12:06 +00:00
yoff
a7a646960d
python: sync other file
2022-05-16 08:15:16 +00:00
yoff
5794e64940
python: sync file
2022-05-16 08:12:25 +00:00
yoff
2822ed9594
Merge remote-tracking branch 'upstream/main' into python-dataflow/flow-summaries-from-scratch
2022-05-16 08:10:15 +00:00
yoff
0778d90ac1
python: fix implementation of lambdaCreation
...
- still identifying summarized callables by name.
I think ther shoudl perhaps be a `getAUse` next to `getACall`.
- also fix tests, adding a standard taint configuration
2022-05-12 11:35:57 +00:00
yoff
92c4c87058
python: sync file
2022-05-11 12:36:02 +00:00
yoff
4445cf152a
python: various fixes
...
- compilation
- alerts
- some review comments
2022-05-11 12:28:58 +00:00
yoff
f67be52b99
python: fix compilation
...
by making client code use the "new" class.
Really, this part of the split class should have the old name,
to minimise disruptions to clients.
Same goes for the other split classes.
2022-05-10 12:53:13 +00:00
yoff
db008f1939
python: summaries may allowParameterReturnInSelf
2022-05-10 12:48:42 +00:00
yoff
238c578f5a
python: Add LocalSourceParameterNode
...
This can be used when one wants to consider a
(source) parameter node as a local source.
2022-05-10 12:48:42 +00:00
yoff
28b239a9a4
python: add qldoc
2022-05-10 12:48:42 +00:00
yoff
da3634188d
python: variaous fixes
...
- sync summary files
- format files
- fix compilation
2022-05-10 12:48:42 +00:00
yoff
f14ee0e794
python: Flow summaries based on type tracking
...
Two classes have been inserted into the hierarchies:
- `NonLibraryDataFlowCallable` with a method `getACall2`.
This method implements "get a call, not considering flow summaries".
For `NonLibraryDataFlowCallable`s, `getACall` will defer to `getACall2`.
While you could have a synthesised call to such a callable,
it would not correspond to a `CallNode`.
- `NonLibraryDataFlowSourceCall` with methods
`getArg2` and `getCallable2`. These also refer to a call graph that
does not consider flow summaries.
`getArg2` is used to synthesise pre-update nodes for arguments.
`getCallable2` is used in `connects` to compute argument passing.
This is used to define data flow nodes for overflow arguments.
`getACall2` ensures that `LibraryCallableValue::getACall` is not called
when the charpred of `FunctionCall` is evaluated.
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
506efcf051
python: refactor TDataFlowCall
...
- Branch predicates are made simple. In particular, they do not try to detect library calls.
- All branches based on `CallNode`s are gathered into one.
- That branch has been given a class `NonSpecialCall`, which is the new parent of call classes based on `CallNode`s. (Those classes now have more involved charpreds.)
- A new such class, 'LambdaCall` has been split out from `FunctionCall` to allow the latter to replace its
general `CallNode` field with a specific `FunctionValue` one.
- `NonSpecialCall` is not an abstract class, but it has some abstract overrides. Therefor, it is not
considered a resolved call in the test `UnresolvedCalls.qll`.
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
d85844bb89
python: type tracking uses source nodes
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
81ca479ca9
Python: local flow for type tracking
...
summary flow is excluded from the local flow relation used for
typetracking, but included in the one used for global data flow.
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
177dea5307
python: use new syntax for flow summaries
...
also convert to inline tests
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
4024ce4777
python: some summary flows
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
8c263b349f
python: add summary flow steps
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
828db3a392
python: Add summary nodes
...
allowing more `OutNode`s (not restricting to `CallNode`s),
gives more flow in the `classesCallGraph` test
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
80175a9af5
Python: Compiles and mostly pass tests
...
- add flowsummaries shared files
- register in indentical files
- fix initial non-monotonic recursions
- add DataFlowSourceCall
- add resolvedCall
- add SourceParameterNode
failing tests:
- 3/library-tests/with/test.ql
2022-05-10 12:48:42 +00:00