Tom Hvitved
29e690e159
Merge remote-tracking branch 'upstream/master' into csharp/vsvars-unset-platform
2020-04-21 09:00:26 +02:00
Tom Hvitved
7d86cce658
Merge pull request #2814 from calumgrant/cs/unqualify-trap-ids
...
C#: Improve db consistency by removing assembly id
2020-04-21 08:58:34 +02:00
Dave Bartolomeo
1428811f75
C++: IR translation for binary conditional operator
...
IR generation was not handling the special two-operand flavor of the `?:` operator that GCC supports as an extension. The extractor doesn't quite give us enough information to do this correctly (see github/codeql-c-extractor-team#67 ), but we can get pretty close.
About half of the code could be shared between the two-operand and three-operand flavors. The main differences for the two-operand flavor are:
1. The "then" operand isn't a child of the `ConditionalExpr`. Instead, we just reuse the original value of the "condition" operand, skipping any implicit cast to `bool` (see comment for rationale).
2. For the three-operand flavor, we generate the condition as control flow rather than the computation of a `bool` value, to avoid creating unnecessarily complicated branching. For the two-operand version, we just compute the value, since we have to reuse that value in the "then" branch anyway.
I've added IR tests for these new cases. I've also updated the expectations for `SignAnalysis.ql` based on the fix. @rdmarsh2, can you please double-check that these diffs look correct? I believe they do, but you're the range/sign analysis expert.
2020-04-21 02:05:21 -04:00
Robert Marsh
d0bb5ad4e2
C++: rename and add description to hasFlowSource
2020-04-20 13:25:31 -07:00
Robert Marsh
e6630a8fba
Apply suggestions from code review
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2020-04-20 10:14:13 -07:00
Jonas Jensen
4259904c5e
Merge pull request #3301 from Semmle/felicitymay-124-fix-typo
...
Fix error in 3287
2020-04-20 17:36:45 +02:00
Asger Feldthaus
883846dfb6
JS: Fix extraction of negative number literal types
2020-04-20 16:17:15 +01:00
Jonas Jensen
875daae84b
Merge pull request #3151 from dbartol/dbartol/floats
...
C++: Better support for complex numbers in IR and AST
2020-04-20 16:27:20 +02:00
Asger Feldthaus
4fc79e38ec
JS: Also fix typo in test case
2020-04-20 15:24:51 +01:00
Felicity Chapman
dc83ac61b5
Fix error in 3287
...
@jbj - apologies for the over-eager merge of #3287 . This should fix the error you highlighted.
2020-04-20 15:12:43 +01:00
Asger Feldthaus
d4978905f8
JS: Use SendCallback/ReceiveCallback in getAck
2020-04-20 15:12:04 +01:00
Rasmus Wriedt Larsen
43bc7c6619
Python: Autoformat
...
I'm not particularly happy about this one, but I don't care to fight about it today.
2020-04-20 16:08:53 +02:00
Rasmus Wriedt Larsen
b7145af447
Python: Handle all methods in StringKind.getTaintOfMethodResult
2020-04-20 16:07:30 +02:00
Calum Grant
41d8d32764
C#: Address review comment: Make dictionary type more specific.
2020-04-20 15:06:42 +01:00
Asger Feldthaus
ca60e8264e
JS: Autoformat
2020-04-20 14:42:41 +01:00
Jonas Jensen
9b61650cba
Merge pull request #3298 from MathiasVP/no-inline-std-string-constructor
...
C++: Add pragma[noinline] to StdStringConstructor
2020-04-20 15:10:05 +02:00
Rasmus Wriedt Larsen
a5d3966cb3
Python: Refactor StringKind.getTaintOfMethodResult
...
no need to match on ControlFlowNodes manually anymore 🎉
2020-04-20 15:01:40 +02:00
Rasmus Wriedt Larsen
10b36bb7a8
Python: Taint of string method reference isn't handled
2020-04-20 15:01:40 +02:00
Rasmus Wriedt Larsen
1631787336
Python: Fix points-to regressions Test.ql
...
Only being able to debug missing pointsTo for NameNode was quite limiting ...
2020-04-20 14:41:55 +02:00
Rasmus Wriedt Larsen
8746876377
Python: Add points-to regression for uncalled function
2020-04-20 14:41:45 +02:00
Mathias Vorreiter Pedersen
8be1bfe8d0
C++: Add comments and accept expected dataflow sanity failures
2020-04-20 14:13:12 +02:00
Mathias Vorreiter Pedersen
7ba4526f50
C++: Add noinline to StdString constructor
2020-04-20 13:36:41 +02:00
Erik Krogh Kristensen
9fc29ee0f8
update qhelp
2020-04-20 13:29:00 +02:00
Erik Krogh Kristensen
73b0aa4004
add more attributes potentially vulnerable to xss-through-dom
2020-04-20 13:29:00 +02:00
Erik Krogh Kristensen
12f4ce8111
merge two cases of jQuery method calls
2020-04-20 13:28:55 +02:00
Erik Krogh Kristensen
aee7cc117d
add change-note
2020-04-20 13:08:51 +02:00
Erik Krogh Kristensen
8b254f7b49
Merge remote-tracking branch 'upstream/master' into Maps
2020-04-20 13:00:39 +02:00
semmle-qlci
e965e5c73e
Merge pull request #3094 from erik-krogh/Mispelled
...
Approved by esbena
2020-04-20 11:41:23 +01:00
Calum Grant
eb1474acee
Merge pull request #3276 from hvitved/csharp/dataflow/array-tests
...
C#: Add data-flow test for collections
2020-04-20 11:36:17 +01:00
Calum Grant
ead916702a
C#: Take nullability into account when creating symbol entities. Otherwise, an entity with the wrong (cached) nullability could be created.
2020-04-20 11:29:31 +01:00
Asger Feldthaus
bccc27f1e7
JS: Rephrase flowsTo to avoid redundant SourceNode::Range check
2020-04-20 10:57:52 +01:00
Erik Krogh Kristensen
2d3e42e6d6
update qhelp for xss-through-dom
...
Co-Authored-By: Asger F <asgerf@github.com >
2020-04-20 11:50:46 +02:00
Mathias Vorreiter Pedersen
e0cd595d54
C++: Reduce intermediate tuple counts
2020-04-20 11:46:10 +02:00
Erik Krogh Kristensen
c713ba7bfe
fix typo
2020-04-20 10:51:42 +02:00
Sauyon Lee
ae21ac23c1
Merge pull request #105 from max-schaefer/fail-tests-with-errors
...
Add consistency query flagging tests with unexpected frontend errors
2020-04-20 01:31:43 -07:00
Felicity Chapman
962f13ee13
Merge pull request #3287 from felicitymay/1.24/SD-61-Cpp-finalize-notes
...
1.24 release: finalize change notes for C/C++
2020-04-20 09:07:58 +01:00
Felicity Chapman
3bfcd618c0
Merge pull request #3286 from felicitymay/1.24/SD-61-JS-finalize-notes
...
1.24 release: finalize change notes for JavaScript
2020-04-20 09:07:47 +01:00
Tom Hvitved
e186c9ddd1
C#: Update data-flow collection test method names
2020-04-20 09:29:51 +02:00
Tom Hvitved
161093bd57
C#: Rename arrays data-flow test to collections
2020-04-20 09:20:42 +02:00
Max Schaefer
97b1d3a57c
Fix extraction of error positions for paths containing colon.
2020-04-20 08:04:16 +01:00
Mathias Vorreiter Pedersen
a6e619ce5b
C++: Add field flow through single-field structs and accept tests
2020-04-20 08:52:46 +02:00
Mathias Vorreiter Pedersen
6fca23bc8b
C++: Demonstrate lack of flow through single-field structs
2020-04-20 08:50:31 +02:00
Asger Feldthaus
bb9fea5a27
JS: Refactor isAmbient computation
2020-04-19 22:45:19 +01:00
Grzegorz Golawski
40fcd4cbe5
Fix references
2020-04-19 20:49:07 +02:00
Grzegorz Golawski
457e2eaf59
CodeQL query to detect OGNL injections
2020-04-19 20:31:57 +02:00
Erik Krogh Kristensen
2632699397
Merge branch 'master' of git.semmle.com:Semmle/ql into Mispelled
2020-04-18 17:58:57 +02:00
Dave Bartolomeo
8041b74f1c
C++: Fix formatting
2020-04-18 09:56:38 -04:00
Dave Bartolomeo
de5abdb29a
C++/C#: Add missing QLDoc
2020-04-18 09:55:35 -04:00
semmle-qlci
243dea706e
Merge pull request #3269 from erik-krogh/Promisify
...
Approved by esbena
2020-04-18 13:02:42 +01:00
yo-h
26f624d2d4
Merge pull request #3285 from felicitymay/1.24/SD-61-Java-finalize-notes
...
1.24 release: finalize change notes for Java
2020-04-17 17:04:38 -04:00