yo-h
eedc385b37
Java 15: adjust test options
2020-11-26 00:14:24 -05:00
james
f85f99c6c2
update ql-language-reference links
2020-11-05 14:54:14 +00:00
james
e5fff6445a
rename ql-handbook -> ql-language-reference
2020-11-05 14:43:39 +00:00
james
d749b839fa
ql lang spec: update links
2020-11-05 14:40:45 +00:00
james
21cdf896bb
first pass through files and links
2020-11-05 14:36:35 +00:00
james
6ed290f2bd
rename rst files
2020-11-05 09:43:40 +00:00
Calum Grant
4259c81061
Merge pull request #4599 from github/calumgrant/catchup-1.26
...
Catchup 1.26
2020-11-03 17:16:05 +00:00
yoff
104ff5d217
Merge pull request #4596 from RasmusWL/python-import-customizations
...
Python: Import Customizations into python
2020-11-03 11:49:51 +01:00
Jonas Jensen
76fd710946
Merge pull request #4571 from MathiasVP/better-syntax-for-false-positives-and-negatives-inline-expectation
...
C++/Python: Better syntax for false positives and negatives in inline expectations
2020-11-03 11:05:21 +01:00
Rasmus Wriedt Larsen
cac336d053
Python: Import Customizations into python
...
Using the pattern from JS and Java to make this the _first_ import in `<lang>.qll`
2020-11-03 10:23:05 +01:00
Jonas Jensen
5680b2df13
Merge remote-tracking branch 'upstream/main' into better-syntax-for-false-positives-and-negatives-inline-expectation
...
Required fixing up semantic conflicts in tests.
Conflicts:
python/ql/test/experimental/library-tests/frameworks/stdlib/Decoding.py
2020-11-03 09:47:26 +01:00
Anders Schack-Mulligen
89361a3b75
Merge pull request #3812 from luchua-bc/java-android-remote-source
...
Java: Add remote source of Android intent extra
2020-11-03 09:35:40 +01:00
Taus
82f37e97c8
Merge pull request #4595 from tausbn/python-promote-dataflow-libraries
...
Python: Promote experimental data-flow libraries
2020-11-02 23:55:05 +01:00
Taus Brock-Nannestad
69d2d714a2
Python: Update identical-files.json
2020-11-02 23:25:58 +01:00
Taus Brock-Nannestad
5dadb0f476
Python: Fix imports in tests
2020-11-02 23:02:29 +01:00
Taus Brock-Nannestad
8752b1af1e
Python: Fix up remaining data-flow library copies
2020-11-02 23:02:04 +01:00
Taus Brock-Nannestad
b7773849d7
Python: Fix up some comments
2020-11-02 22:57:40 +01:00
Taus Brock-Nannestad
d8c554ed4f
Python: Add redirects to old data-flow libraries
2020-11-02 22:20:16 +01:00
Taus Brock-Nannestad
a5121babc8
Python: The one with changes that don't look like renames anymore
2020-11-02 22:19:15 +01:00
Taus Brock-Nannestad
fb6a02e060
Python: More import fixups
2020-11-02 22:17:42 +01:00
Taus Brock-Nannestad
5156bf756d
Python: Promote data-flow libraries
...
Step 1: Moving stuff around. Also includes a bit of import renaming.
2020-11-02 22:15:38 +01:00
Taus
25e88ed585
Merge pull request #4588 from yoff/python-pep-249
...
Python: Model PEP 249
2020-11-02 18:57:15 +01:00
yoff
1535ce1f5d
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-11-02 18:26:37 +01:00
Rasmus Lerchedahl Petersen
ea74c7f12b
Python: add tests
2020-11-02 17:59:51 +01:00
Rasmus Lerchedahl Petersen
cb47b57440
Python: fix typos
2020-11-02 17:22:01 +01:00
yoff
222a2f7f5d
Update python/ql/src/experimental/semmle/python/frameworks/PEP249.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-11-02 17:19:21 +01:00
yoff
ca34219ec5
Update python/ql/src/experimental/semmle/python/frameworks/PEP249.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-11-02 17:19:10 +01:00
yoff
1c83d67513
Update python/ql/src/experimental/semmle/python/frameworks/PEP249.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-11-02 17:18:18 +01:00
Rasmus Lerchedahl Petersen
6a81987284
Python: Rename and add docs
2020-11-02 17:17:12 +01:00
Taus
2dfffdbab8
Merge pull request #4590 from RasmusWL/python-model-base64
...
Python: Model encoding/decoding with base64 module
2020-11-02 17:00:21 +01:00
Rasmus Lerchedahl Petersen
6d850b2e0c
Merge branch 'main' of github.com:github/codeql into python-pep-249
2020-11-02 16:58:31 +01:00
yoff
ac85a77ac5
Update python/ql/src/experimental/semmle/python/Frameworks.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-11-02 16:40:22 +01:00
Calum Grant
cb527cae73
Merge pull request #4583 from tausbn/python-test-2
...
Python: Promote experimental queries
2020-11-02 14:42:27 +00:00
luchua-bc
864411b4b9
Updates to Android stub classes
2020-11-02 14:06:44 +00:00
Rasmus Wriedt Larsen
247fd4f5f3
Python: Make encoding/decoding preserve taint automatically
...
With the way we have set things up, there is no way to opt out of this behavior.
2020-11-02 14:53:30 +01:00
Rasmus Lerchedahl Petersen
36e364d6ef
Python: Django use PEP 249
2020-11-02 14:49:34 +01:00
Rasmus Wriedt Larsen
66f5d0d9d5
Python: Model encoding/decoding with base64 module
2020-11-02 14:44:53 +01:00
Rasmus Wriedt Larsen
eff244db71
Python: Add Encoding concept
...
I wasn't able to find a good opposite of "parsing", so left that out of the list
of intended purposes.
2020-11-02 14:19:20 +01:00
Taus Brock-Nannestad
8147ad4e0b
Python: Remove irrelevant files
2020-11-02 14:08:59 +01:00
Taus Brock-Nannestad
f84ab2fa99
Python: Remove old data-flow tests
2020-11-02 14:07:04 +01:00
Taus Brock-Nannestad
9d6c07c8df
Python: Add copy of old queries
2020-11-02 13:35:20 +01:00
luchua-bc
8da9b9d3ea
Add documentation to new library method and use the singular form
2020-11-02 10:53:46 +00:00
Taus Brock-Nannestad
b620b9b7c6
Python: Fixup CWE-022 tests
...
This was a bit of a mess, since there was crosstalk between the
TarSlip and PathInjection queries. (Also one of these needs the
`options` file to be in one way, and the other not). To fix this, I
split these out into separate directories.
2020-11-02 11:46:28 +01:00
Taus Brock-Nannestad
af7626a6b3
Python: Fixup CWE-079 tests
2020-11-02 11:46:02 +01:00
Taus Brock-Nannestad
57b51090ef
Python: Fixup CWE-094 tests
2020-11-02 11:45:44 +01:00
Taus Brock-Nannestad
ebb593466d
Python: Fixup CWE-089 tests
2020-11-02 11:45:14 +01:00
Taus Brock-Nannestad
7a395bf7c8
Python: Fixup CWE-078 tests.
2020-11-02 11:44:42 +01:00
Taus Brock-Nannestad
52dc905037
Python: Fixup CWE-502 tests.
2020-11-02 11:44:00 +01:00
Rasmus Lerchedahl Petersen
d35bf8f446
Python: Update comments on PEP 249 module
2020-11-02 11:22:51 +01:00
Tom Hvitved
b78234fe83
Merge pull request #4586 from hvitved/csharp/dataflow/common-sub-type-join-fix
...
C#: Fix bad join-order in `commonSubTypeGeneral/2`
2020-11-02 09:40:54 +01:00
Tom Hvitved
e89a463b25
C#: Fix bad join-order in commonSubTypeGeneral/2
2020-11-01 20:08:14 +01:00
Rasmus Lerchedahl Petersen
0240670d62
Python: import frameworks
2020-11-01 18:02:36 +01:00
Rasmus Lerchedahl Petersen
babcf7acd9
Python: add two implementations of PEP249
2020-11-01 16:01:05 +01:00
Mathias Vorreiter Pedersen
6d0783a3bd
Python: Make sure that expected values with tag mimetype is wrapped in quotes if the value contains a space.
2020-10-31 18:13:12 +01:00
Mathias Vorreiter Pedersen
fc80ef2ed8
C++: Sync identical file.
2020-10-31 18:02:12 +01:00
Mathias Vorreiter Pedersen
870ed0039b
Python: Allow single quote strings and accept test changes.
2020-10-31 18:01:55 +01:00
Mathias Vorreiter Pedersen
0bc4d52d66
Python: Update more tests annotations. It looks like we need to allow single-quote strings to support the existing Python use-cases, but let's do that in the next commit.
2020-10-31 17:40:19 +01:00
Mathias Vorreiter Pedersen
ed9ad8b5e3
Merge branch 'main' into better-syntax-for-false-positives-and-negatives-inline-expectation
2020-10-31 16:52:16 +01:00
luchua-bc
7ac3fb41d5
Clean up query and test files
2020-10-31 13:37:36 +00:00
Taus
ce00d58329
Merge pull request #4584 from yoff/python-subclass-pattern
...
Python: Use subclass pattern for Models
2020-10-31 00:16:22 +01:00
Rasmus Lerchedahl Petersen
ae3227fc33
Python: initial sketch
2020-10-31 00:10:49 +01:00
Rasmus Lerchedahl Petersen
63cbc01c32
Python: Use subclass pattern for Models
2020-10-30 22:29:38 +01:00
CodeQL CI
4a59e69722
Merge pull request #4564 from asgerf/js/react-hooks
...
Approved by esbena
2020-10-30 21:00:31 +00:00
Taus Brock-Nannestad
f903e4ffbe
Python: Promote experimental queries
...
DO NOT MERGE
Also adds performance fix to `python.qll`.
2020-10-30 19:40:56 +01:00
Taus
ecc52a1bb9
Merge pull request #4541 from RasmusWL/python-port-reflected-xss
...
Python: Port reflected XSS query
2020-10-30 19:17:33 +01:00
Rasmus Lerchedahl Petersen
80360450de
Merge branch 'main' of github.com:github/codeql into RasmusWL-python-port-reflected-xss
2020-10-30 17:56:36 +01:00
Taus
146787bb55
Merge pull request #4539 from yoff/python-port-path-injection
...
Python: port path injection
2020-10-30 17:46:51 +01:00
Rasmus Lerchedahl Petersen
ef9999a4a1
Python: fix test annotation
2020-10-30 17:43:56 +01:00
Rasmus Lerchedahl Petersen
37ad59a92a
Python: subclas of known subclasses
2020-10-30 17:37:54 +01:00
yoff
a3cc9b6982
Update python/ql/src/experimental/semmle/python/frameworks/Flask.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-30 17:29:35 +01:00
Cornelius Riemenschneider
310975bf8d
Merge pull request #4581 from criemen/printast-stmtpexpr
...
C++: Add support for StmtExpr to Print AST.
2020-10-30 17:29:23 +01:00
Asger Feldthaus
c7667d372e
JS: Address review comments
2020-10-30 16:25:30 +00:00
Mathias Vorreiter Pedersen
45b24a9bc8
Python: Update inline-expectation tests
2020-10-30 16:53:33 +01:00
Mathias Vorreiter Pedersen
6ac740a490
Python: Sync identical file
2020-10-30 16:53:17 +01:00
Mathias Vorreiter Pedersen
ee77e988b2
C++: Allow strings in inline-expectation tests
2020-10-30 16:49:14 +01:00
Cornelius Riemenschneider
e7d995313e
C++: Address review.
2020-10-30 16:30:57 +01:00
Cornelius Riemenschneider
84fe7ba199
C++: Add support for StmtExpr to Print AST.
2020-10-30 15:53:54 +01:00
Cornelius Riemenschneider
d3631d8f2e
Merge pull request #4562 from criemen/printast-labels
...
C++: Change PrintAST to provide the predicates that can be used to traverse the AST.
2020-10-30 15:48:46 +01:00
Dave Bartolomeo
36b27add24
Simplify ordering of children with conversions using rank
...
In `getChild(int childIndex)`, the actual values of `childIndex` don't matter, as long as they are in the correct order. Rather than doing complicated math to compute the indices for the synthesized `.getFullyConverted()` children, just use the `rank` aggregate to order all children first by whether or not the child is a conversion, then by the original child index.
2020-10-30 10:00:23 -04:00
Rasmus Lerchedahl Petersen
e7c9bc388b
Python: support some custom subclasses
2020-10-30 14:16:48 +01:00
Rasmus Lerchedahl Petersen
e69349791a
Python: django.http.response.HttpRequest.write
2020-10-30 12:51:23 +01:00
Cornelius Riemenschneider
cf8f802310
C++: Rename predicate.
2020-10-30 12:51:19 +01:00
Cornelius Riemenschneider
ab42ddb0dc
C++: Adjust code for the conversions PR, provide correct childIndexes for the new nodes.
2020-10-30 12:48:53 +01:00
Rasmus Lerchedahl Petersen
ffe10d1b7c
Python: test HttpResponse.write
2020-10-30 12:16:12 +01:00
Rasmus Lerchedahl Petersen
fa3a7e6686
Python: Known subclasses of HttpResponse
2020-10-30 11:53:24 +01:00
Rasmus Lerchedahl Petersen
c962377ef4
Python: test for subclasses
2020-10-30 10:37:40 +01:00
Asger Feldthaus
6ab7846e81
JS: Restrict getAContextInput
2020-10-30 09:28:06 +00:00
Jonas Jensen
ba41417d61
Merge pull request #4553 from geoffw0/samateregtests
...
C++: Additional pointer tests for DefaultTaintTracking.
2020-10-30 10:02:11 +01:00
Tom Hvitved
54e2741064
Merge pull request #4580 from hvitved/csharp/1.26-change-notes
...
C#: Convert 1.26 change notes
2020-10-30 09:17:52 +01:00
Tom Hvitved
91d72945d7
Merge pull request #4568 from hvitved/csharp/cfg/multi-asserts
...
C#: Fix CFG for assertions with multiple assertion arguments
2020-10-30 09:13:38 +01:00
Rasmus Lerchedahl Petersen
08af839757
Python: django.http.response.HttpResponseRedirect
2020-10-30 01:29:49 +01:00
Rasmus Lerchedahl Petersen
52be896666
Python: django.http.response.JsonResponse
...
It s possible this class is not relevant to XSS
2020-10-30 01:05:36 +01:00
Rasmus Lerchedahl Petersen
0f9b8595d1
Python: rename functions by vulnerability
2020-10-30 00:51:09 +01:00
Rasmus Lerchedahl Petersen
97153b56ad
Python: add false negatives to test
2020-10-30 00:48:19 +01:00
Rasmus Lerchedahl Petersen
262b249e10
Merge branch 'main' of github.com:github/codeql into RasmusWL-python-port-reflected-xss
2020-10-30 00:40:39 +01:00
Rasmus Lerchedahl Petersen
2ca86f5ea7
Python: django.http.response.HttpResponse
2020-10-30 00:22:53 +01:00
Dave Bartolomeo
71531af343
Merge pull request #4577 from dbartol/extension-fix/work
...
Fix path transformer handling of extensionless files
2020-10-29 18:10:30 -04:00
Tom Hvitved
0111f140de
C#: Convert 1.26 change notes
2020-10-29 20:23:07 +01:00
Mathias Vorreiter Pedersen
b5234f9245
C++: Update IR inline-expectation tests
2020-10-29 19:11:54 +01:00
Mathias Vorreiter Pedersen
acf6ffb990
Python: Sync identical file
2020-10-29 19:07:10 +01:00
yo-h
5ac8475523
Merge pull request #4578 from aschackmull/java/changenotes
...
Java: Add missing change notes for 1.26
2020-10-29 13:32:28 -04:00
Anders Schack-Mulligen
5687b7c158
Java: Move existing change note to new format.
2020-10-29 16:35:27 +01:00
Anders Schack-Mulligen
a9e0f61860
Java: Add change note for https://github.com/github/codeql/pull/4287
2020-10-29 16:33:09 +01:00
Anders Schack-Mulligen
4cd77175ab
Java: Add change note for https://github.com/github/codeql/pull/3542
2020-10-29 16:27:51 +01:00
Anders Schack-Mulligen
eddd1ef29c
Java: Add change note for https://github.com/github/codeql/pull/4081
2020-10-29 16:25:11 +01:00
Anders Schack-Mulligen
e671b463dc
Java: Add change note for https://github.com/github/codeql/pull/4123
2020-10-29 16:20:35 +01:00
Anders Schack-Mulligen
d6f595f6af
Java: Add change note for https://github.com/github/codeql/pull/3543
2020-10-29 16:14:56 +01:00
Anders Schack-Mulligen
8b6c3ab9d2
Java: Add change note for https://github.com/github/codeql/pull/4088
2020-10-29 16:11:26 +01:00
Anders Schack-Mulligen
1efb377465
Java: Add change note for https://github.com/github/codeql/pull/3855
2020-10-29 16:09:01 +01:00
Anders Schack-Mulligen
d9cef5bd48
Java: Add change note for https://github.com/github/codeql/pull/4044
2020-10-29 16:05:43 +01:00
Anders Schack-Mulligen
4677eb649e
Java: Add change note for https://github.com/github/codeql/pull/3938
2020-10-29 16:02:34 +01:00
Anders Schack-Mulligen
9dbfc835fe
Java: Add change note for https://github.com/github/codeql/pull/3881
2020-10-29 15:54:25 +01:00
Tom Hvitved
51f71d4e1d
C#: Fix CFG for assertions with multiple assertion arguments
2020-10-29 15:44:13 +01:00
Tom Hvitved
5cd707f17e
C#: Add CFG test for assertion with multiple assertion arguments
2020-10-29 15:44:13 +01:00
Anders Schack-Mulligen
b3fe333957
Merge pull request #4576 from aschackmull/java/adjust-beanvalidation-qhelp
...
Java: Tweak qhelp to make it markdown-compatible.
2020-10-29 15:43:40 +01:00
Anders Schack-Mulligen
1beb3bdccd
Java: Add change note for extensible security queries.
...
This covers #3928 , #3968 , and #4172 , among others.
2020-10-29 15:37:35 +01:00
Anders Schack-Mulligen
e3ba05937f
Java: Add change note for https://github.com/github/codeql/pull/3948
2020-10-29 15:30:09 +01:00
Anders Schack-Mulligen
7f9713956f
Java: Add change note for https://github.com/github/codeql/pull/4312 .
2020-10-29 15:24:28 +01:00
Dave Bartolomeo
4189567b8c
Fix PR feedback
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2020-10-29 10:15:45 -04:00
Dave Bartolomeo
42e075dfb8
Fix path transformer handling of extensionless files
2020-10-29 10:02:55 -04:00
Rasmus Lerchedahl Petersen
96e79a2702
Python: restrict to python files
2020-10-29 15:00:47 +01:00
Cornelius Riemenschneider
4276d1f3e5
C++: Add missing comment and update test results.
2020-10-29 14:49:06 +01:00
Cornelius Riemenschneider
7e667b9bec
C++: Add comment to FunctionNode.
2020-10-29 14:49:06 +01:00
Cornelius Riemenschneider
668764ce40
C++: Make new predicates private.
2020-10-29 14:49:06 +01:00
Cornelius Riemenschneider
8c925a20a7
C++: Provide the predicates that can be used to traverse the AST as metadata.
2020-10-29 14:48:47 +01:00
Anders Schack-Mulligen
0d926dcf70
Java: Tweak qhelp to make it markdown-compatible.
2020-10-29 14:39:01 +01:00
luchua-bc
b1d6bc5ba9
Use getDeclaringType() for getIntent() method call
2020-10-29 12:55:03 +00:00
Jonas Jensen
fa344d216f
Merge pull request #4493 from criemen/fix-4278-printast-conversions
...
Fix C++ Print AST handling of Conversions
2020-10-29 13:48:15 +01:00
Rasmus Lerchedahl Petersen
6658ee9dc8
Merge branch 'python-port-reflected-xss' of https://github.com/RasmusWL/codeql into RasmusWL-python-port-reflected-xss
2020-10-29 12:46:44 +01:00
CodeQL CI
7856e784e1
Merge pull request #4566 from asgerf/js/classnames
...
Approved by erik-krogh
2020-10-29 11:00:06 +00:00
Cornelius Riemenschneider
59dd892748
C++: Address review, fix bug related to Conversions.
2020-10-29 11:40:31 +01:00
Asger Feldthaus
fee944ac2a
Merge branch 'js/react-hooks' of github.com:asgerf/codeql into js/react-hooks
2020-10-29 10:38:21 +00:00
Asger Feldthaus
a4a6e3beb3
JS: Update dataflow tests
2020-10-29 10:38:09 +00:00
Jonas Jensen
0af62b8431
Merge pull request #4515 from geoffw0/modelchanges1
...
C++: Changes to models library.
2020-10-29 11:21:56 +01:00
Tamás Vajk
64dcfbd7fc
Merge pull request #4484 from tamasvajk/feature/custom-assert-methods
...
C#: Add support for custom assert methods (DoesNotReturnIfAttribute)
2020-10-29 09:10:09 +01:00
Mathias Vorreiter Pedersen
4be02a9463
C++: Use new syntax in field-flow tests
2020-10-29 08:48:37 +01:00
luchua-bc
2ee9a45e69
Use proper class inheritance
2020-10-28 22:05:30 +00:00
Mathias Vorreiter Pedersen
176522d011
C++: Update terminology in strings and QLDoc.
2020-10-28 22:28:07 +01:00
Mathias Vorreiter Pedersen
dfb373bae3
C++: Modify the syntax of inline expectation comments. The syntax is now $ tag1,tag2=value MISSING: tag3=value3 SPURIOUS: tag4=value4.
2020-10-28 22:27:15 +01:00
Asger Feldthaus
4343fbff0e
Merge branch 'js/classnames' of github.com:asgerf/codeql into js/classnames
2020-10-28 17:00:14 +00:00
Asger Feldthaus
469767d279
JS: Fix test output
2020-10-28 17:00:05 +00:00
Geoffrey White
ae84d1383e
Merge pull request #4565 from MathiasVP/instruction-tag-for-this-addr-and-load-fix
...
C++: Fix spelling in getInstructionTagId
2020-10-28 16:53:55 +00:00
Asger F
581441d585
Update javascript/ql/src/semmle/javascript/frameworks/React.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-10-28 16:29:15 +00:00
Asger F
43336ff5a9
Update change-notes/1.26/analysis-javascript.md
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-10-28 16:29:07 +00:00
Asger Feldthaus
f99db23e7b
JS: Add test and fix for contextType
2020-10-28 16:23:36 +00:00
Asger F
056ce38dad
Update javascript/ql/src/semmle/javascript/frameworks/Classnames.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-10-28 14:35:37 +00:00
Tamas Vajk
410af42d2b
C#: Adjust PR feedback on assertion methods
2020-10-28 15:09:50 +01:00
Asger Feldthaus
081017ea8a
JS: Autoformat
2020-10-28 13:58:02 +00:00
Asger Feldthaus
3c437d319a
JS: Change note
2020-10-28 13:56:35 +00:00
Asger Feldthaus
3d86e855f3
JS: Add model of classnames and clsx
2020-10-28 13:56:35 +00:00
Tamás Vajk
59d9be48a7
Merge pull request #4438 from tamasvajk/feature/ast-fixes
...
C#: Fixes for AST printing
2020-10-28 14:52:24 +01:00
Rasmus Lerchedahl Petersen
cf97a56844
Merge remote-tracking branch 'upstream/main' into python-port-path-injection
2020-10-28 14:43:33 +01:00
Asger Feldthaus
7ee3846142
JS: Add missing qldoc
2020-10-28 12:43:48 +00:00
yoff
c8bb0509e5
Merge pull request #4563 from tausbn/python-remove-refersto-from-regex-libs
...
Python: Remove `refersTo` from `regex.qll`
2020-10-28 13:37:14 +01:00
Mathias Vorreiter Pedersen
614e2ba851
C++: Fix spelling
2020-10-28 13:05:37 +01:00
Mathias Vorreiter Pedersen
8c9f09195d
Merge pull request #4561 from criemen/varargs-hierarchy
...
C++: Make BuiltInVarArgs* classes subclasses of VarArgsExpr.
2020-10-28 13:03:57 +01:00
Asger Feldthaus
7a3f0095f6
JS: Autoformat
2020-10-28 11:57:23 +00:00
Asger Feldthaus
c03532edfb
JS: Change note
2020-10-28 11:57:11 +00:00
Asger Feldthaus
d116b424f4
JS: Add model of react hooks and react-router
2020-10-28 11:57:11 +00:00
Asger Feldthaus
42c03ab2fd
JS: Add flow steps through dynamic imports
2020-10-28 11:57:08 +00:00
Tom Hvitved
2fea6f05f1
Merge pull request #4489 from hvitved/csharp/cil-to-string
...
C#: Simplify `toString()` for CIL entities
2020-10-28 12:56:10 +01:00
CodeQL CI
8e57f57643
Merge pull request #4559 from erik-krogh/redis
...
Approved by asgerf
2020-10-28 11:47:12 +00:00
Taus Brock-Nannestad
1503c5ea16
Python: Remove refersTo from regex.qll
...
This was causing the old `Object` API stuff to be evaluated when using
our new library models (specifically the Django model).
2020-10-28 12:41:17 +01:00
Tamas Vajk
1830eea50a
C#: Cleanup TypeMentions in AST printing
2020-10-28 12:34:12 +01:00
Tamas Vajk
444b100c51
Minor fix in definitions.qll
2020-10-28 12:23:12 +01:00
Tamas Vajk
a9e93e5681
C#: Fix GenericType locations in jump-to-definition
2020-10-28 12:07:27 +01:00
Anders Schack-Mulligen
f3e2bd0fd9
Merge pull request #3141 from pwntester/InsecureBeanValidation
...
Insecure Bean Validation query
2020-10-28 12:04:12 +01:00
Erik Krogh Kristensen
75d996a0f9
make promisify smaller
2020-10-28 11:59:21 +01:00
Erik Krogh Kristensen
bce06d3194
add test that promisify is not imprecise
2020-10-28 11:59:03 +01:00
Erik Krogh Kristensen
c49d5081cc
Update javascript/ql/src/semmle/javascript/frameworks/NoSQL.qll
...
Co-authored-by: Asger F <asgerf@github.com >
2020-10-28 11:45:58 +01:00
Tamas Vajk
64b584b4a3
C#: Fix PR review findings in NamespaceDeclaration
2020-10-28 11:30:17 +01:00
Tamas Vajk
9cc7424cd0
C#: Simplify TypeMentions in PrintAST
2020-10-28 11:28:06 +01:00
Tamas Vajk
c2e8d3fb3b
C#: Minor fix in TypeMention
2020-10-28 11:28:06 +01:00
Asger Feldthaus
a9adb2912a
JS: Improve lodash model
2020-10-28 10:09:41 +00:00
Asger Feldthaus
9fc5c0bdb8
JS: Update ComposedFunctions
2020-10-28 10:09:40 +00:00
Tom Hvitved
92461d41e0
C#: Add change note
2020-10-28 11:02:12 +01:00
Tom Hvitved
28607927ee
C#: Update CIL tests
2020-10-28 10:57:01 +01:00
Cornelius Riemenschneider
f1f64fb7df
C++: Make BuiltInVarArgs* classes subclasses of VarArgsExpr.
2020-10-28 10:48:00 +01:00
Tamás Vajk
7c3964a388
Merge pull request #4543 from tamasvajk/feature/configureawait
...
C#: Add flow summary for 'Task.ConfigureAwait()'
2020-10-28 10:42:44 +01:00
Rasmus Lerchedahl Petersen
9fd1bf60fa
Merge branch 'main' of github.com:github/codeql into python-port-path-injection
2020-10-28 10:24:23 +01:00
Geoffrey White
09372f5c81
C++: Remove misleading comment.
2020-10-28 09:04:10 +00:00
Erik Krogh Kristensen
2e514c4d7b
add model for Node Redis
2020-10-28 09:52:54 +01:00
Anders Schack-Mulligen
34ae6e0576
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-28 09:15:08 +01:00
Tom Hvitved
02ca8fe3b7
Merge pull request #4556 from hvitved/csharp/dataflow/tuple-perf
...
C#: Fix bad join-order in `System.Tuple` flow-summaries
2020-10-28 08:50:37 +01:00
Tamas Vajk
7a1e1996e4
C#: Remove unneded class from CompilerServices.qll
2020-10-28 08:42:20 +01:00
Dave Bartolomeo
27ad7bc297
Merge pull request #4560 from MathiasVP/instruction-tag-for-this-addr-and-load
...
C++: Make sure getInstructionTagId has a result for `this` related IPA branches
2020-10-27 21:01:09 -04:00
luchua-bc
3cc3fe9d37
Switch to TaintPreservingCallable and add test cases
2020-10-28 00:33:07 +00:00
Mathias Vorreiter Pedersen
ad9e7b7343
C++: Give getInstructionTagId a result when tag is ThisAddressTag or ThisLoadTag
2020-10-27 22:16:01 +01:00
Alvaro Muñoz
77b551b693
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:12:17 +01:00
Alvaro Muñoz
b9c75ea462
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:12:00 +01:00
Alvaro Muñoz
ac116da0dc
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:11:48 +01:00
Alvaro Muñoz
d5b470ea0c
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:11:27 +01:00
Alvaro Muñoz
9785013c29
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:11:15 +01:00
Alvaro Muñoz
d221930c81
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:10:56 +01:00
Alvaro Muñoz
a9ea63b976
Update java/change-notes/2020-10-27-insecure-bean-validation.md
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:10:46 +01:00
Tom Hvitved
de4ed59f62
C#: Simplify toString() for CIL entities
2020-10-27 20:58:40 +01:00
Alvaro Muñoz
1fdf0556d2
more fixes to make qlhelp linter happy
2020-10-27 17:05:00 +01:00
Alvaro Muñoz
aa981caea5
more fixes to make qlhelp linter happy
2020-10-27 16:32:13 +01:00
Alvaro Muñoz
8974f252ac
fix format and qlhelp errors blocking the merge
2020-10-27 16:19:39 +01:00
Alvaro Muñoz
11e57bd2f8
add change note for new Insecure Bean Validation query
2020-10-27 16:11:51 +01:00
Alvaro Muñoz
3378dd526e
remove compiled classes from stubs
2020-10-27 15:56:26 +01:00
Alvaro Muñoz
99044fc6ab
remove experimental query forr bean validation
2020-10-27 15:55:19 +01:00
Alvaro Muñoz
40a2007497
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-10-27 15:52:25 +01:00
Alvaro Muñoz
8b5aed2fe1
move md links to <a>
2020-10-27 15:52:25 +01:00
Alvaro Muñoz
8904411fe6
address review comments
2020-10-27 15:52:24 +01:00
Alvaro Muñoz
debfc686d1
Insecure Bean Validation query
2020-10-27 15:52:24 +01:00
Alvaro Muñoz
7d7933a054
move query out of experimental
2020-10-27 15:52:20 +01:00
Alvaro Muñoz
d990f7a470
move md links to <a>
2020-10-27 15:51:40 +01:00
Alvaro Muñoz
65d01f5c9e
address review comments
2020-10-27 15:51:36 +01:00
Alvaro Muñoz
f85778e9c7
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
6ca28a8bc6
move md links to <a>
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
27bd9044e7
address review comments
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
73fc9fda77
Insecure Bean Validation query
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
a36970f306
Add beanValidation remote source
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
3dcd8acf97
add expected results
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
671ea2f6c6
add test and stubs
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
a274a1516a
move source to FlowSources.qll
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
2bab9d22e9
move query out of experimental
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
df4164f2c0
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
c1decf4d0d
move md links to <a>
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
0bf3895327
address review comments
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
3b23cd5be3
Insecure Bean Validation query
2020-10-27 15:47:54 +01:00
Tom Hvitved
090ea01249
C#: Fix bad join-order in System.Tuple flow-summaries
2020-10-27 14:51:11 +01:00
Geoffrey White
c8783b5ea3
Revert "C++: Create a module for models of things in Std."
...
This reverts commit ddc5150080 .
2020-10-27 13:31:16 +00:00
Chris Smowton
3f298f3dc8
Add basic tests for Android intents as flow sources
2020-10-27 12:03:05 +00:00
Chris Smowton
54c1480fd6
Replace explicit extra step with TaintPreservingCallable
2020-10-27 12:02:29 +00:00
Chris Smowton
60e8910330
Follow taint across getExtras without qualifier
2020-10-27 12:01:30 +00:00
Rasmus Lerchedahl Petersen
164acf4055
Python: test that aliasing is not a problem
2020-10-27 11:25:58 +01:00
Geoffrey White
0b35b34288
C++: Add pointer tests.
2020-10-27 09:47:10 +00:00
Tom Hvitved
03a36760b8
C#: Add data-flow test for ConfigureAwait()
2020-10-27 10:23:39 +01:00
Tamas Vajk
342a711296
C#: Add flow summary for 'Task.ConfigureAwait()'
2020-10-27 10:23:39 +01:00
Asger Feldthaus
7345df63c0
JS: Include DataFlow::AdditionalFlowStep in TaintSteps metric
2020-10-27 08:41:50 +00:00
Jonas Jensen
8f6dbe982e
Merge pull request #4468 from github/rdmarsh2/cpp/output-iterators-2
...
C++: flow through output iterators with user-defined operator= and operator*
2020-10-27 08:36:14 +01:00
Rasmus Lerchedahl Petersen
2baed20067
Python: Test false negative from review
2020-10-27 08:30:16 +01:00
Rasmus Lerchedahl Petersen
b6313dddb9
Python: Add concept tests
2020-10-27 08:26:00 +01:00
Jonas Jensen
45cd47ea77
Merge pull request #4535 from criemen/jump-to-def
...
C++: Extend jump-to-def support to template instantiations.
2020-10-27 08:16:57 +01:00
Rasmus Lerchedahl Petersen
8350d64763
Python: Add concept test definitions
2020-10-27 08:00:53 +01:00
Geoffrey White
12233e5874
Merge pull request #4533 from MathiasVP/mathiasvp/fix-broken-qhelp
...
C++: Fix broken qhelp links
2020-10-26 14:40:52 +00:00
Mathias Vorreiter Pedersen
9db66a1b94
Delete the msdn reference in NestedLoopSameVar
...
It was a Visual Basic reference anyway, and it doesn't seem to provide more information than the link we have already.
2020-10-26 15:27:24 +01:00
Rasmus Lerchedahl Petersen
601a803ee2
Python: DataFlow/TaintTrackin 3/4
2020-10-26 14:42:18 +01:00
Cornelius Riemenschneider
1b88ca1e81
C++: Simplify code, add comment explaining the logic.
2020-10-26 14:39:12 +01:00
Cornelius Riemenschneider
447ba205b4
C++: Move Conversions in PrintAST to the side.
2020-10-26 13:49:02 +01:00
Tom Hvitved
212b49f3dc
Merge pull request #4416 from hvitved/csharp/dataflow/tuples
...
C#: Add flow summaries for `System.[Value]Tuple`
2020-10-26 13:48:24 +01:00
Cornelius Riemenschneider
0e5c44e5c4
C++: Add new test for conversions.
2020-10-26 13:25:17 +01:00
CodeQL CI
e825af2791
Merge pull request #4548 from asgerf/js/handle-empty-package-json
...
Approved by erik-krogh
2020-10-26 11:51:12 +00:00
Chris Smowton
68876b02fe
Merge pull request #4519 from smowton/smowton/cleanup/loggertype-dead-code
...
C#: Remove dead LoggerType class
2020-10-26 11:19:27 +00:00
Mathias Vorreiter Pedersen
02bcb6d971
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2020-10-26 11:39:54 +01:00
Joe Farebrother
2050f82553
Merge pull request #4383 from joefarebrother/guava-strings
...
Java: Add modelling for Guava
2020-10-26 10:16:55 +00:00
Asger Feldthaus
c353f61091
JS: Add test case
2020-10-26 09:58:37 +00:00
Asger Feldthaus
f6c0972523
JS: Guard other uses of Gson.fromJson
2020-10-26 09:54:55 +00:00
Asger Feldthaus
fc12b0bb5e
JS: Do not crash on empty package.json file
2020-10-26 09:54:51 +00:00
Tom Hvitved
492b1141ef
Merge pull request #4445 from hvitved/csharp/sign-analysis-cfg
...
C#: Use CFG nodes instead of AST nodes in sign/modulus analysis
2020-10-26 09:45:38 +01:00
Cornelius Riemenschneider
07452c0159
C++: Add comment, explaining where this query is used.
2020-10-26 09:28:24 +01:00
Cornelius Riemenschneider
fca141146b
C++: Address review.
2020-10-26 09:27:29 +01:00
luchua-bc
9ae5689af6
Use AndroidIntentInput source
2020-10-24 11:55:00 +00:00
Rasmus Lerchedahl Petersen
d89e985246
Python: Test showing chaining FP
2020-10-24 09:20:30 +02:00
Rasmus Lerchedahl Petersen
022cf0b2cc
Python: Add test from tracking issue
...
All tests pass, but there are spurious paths
due to configuration chaining.
2020-10-24 09:07:43 +02:00
Robert Marsh
aab9797c2f
Merge branch 'main' into rdmarsh2/cpp/output-iterators-2
...
Resolve merge conflict in tests
2020-10-23 13:50:15 -07:00
Rasmus Lerchedahl Petersen
c4d1affaf8
Python: Suggestions from reviewer
2020-10-23 16:57:11 +02:00
yoff
15167753c6
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-23 16:52:13 +02:00
Rasmus Lerchedahl Petersen
d6e9b351e5
Python: Add qldocs
2020-10-23 16:39:38 +02:00
Rasmus Lerchedahl Petersen
821b0c918a
Python: Additional taintstep for normpath
...
Is it ok to have this in general?
2020-10-23 16:35:10 +02:00
CodeQL CI
6218a48e88
Merge pull request #4545 from RasmusWL/python-model-django-v1
...
Approved by tausbn
2020-10-23 15:27:42 +01:00
Rasmus Lerchedahl Petersen
6317db1622
Python: Reword explanation (slightly)
2020-10-23 15:54:52 +02:00
Rasmus Wriedt Larsen
aa9f15af76
Python: Fix typo
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-23 15:39:38 +02:00
Cornelius Riemenschneider
a82cf74161
C++: Improve performance of definitions.qll.
2020-10-23 15:16:53 +02:00
Rasmus Lerchedahl Petersen
9eda84debb
Python: PathCheck -> Path::SafeAccessCheck
2020-10-23 15:01:43 +02:00
Rasmus Lerchedahl Petersen
cf8462fa58
Python: Simplify chained configs
2020-10-23 14:52:47 +02:00
Rasmus Lerchedahl Petersen
f87845b1ec
Python: Copy old test
2020-10-23 14:52:07 +02:00
Rasmus Wriedt Larsen
7993a83750
Merge pull request #4544 from tausbn/python-fix-bad-join-in-use-use-ssa
...
Python: Fix bad join order in `adjacentUseUseSameVar`
2020-10-23 14:37:27 +02:00
Rasmus Wriedt Larsen
d295c64ccd
Python: Add example of flask response .set_data
2020-10-23 14:31:36 +02:00
Rasmus Wriedt Larsen
eb545204ec
Python: Show that reflected XSS works now
...
Also did autoformatting, but the important part is the change to the .expected file
2020-10-23 14:31:35 +02:00
Rasmus Wriedt Larsen
d2cfa91155
Python: Add some tricky tests of return in flask route handler
...
In these cases the `return` might end up creating a new HTTP response, so they
need to be modeled as such.
Initially I created a very naive solution that didn't handle either
tricky_return1 or tricky_return2.
The interaction in tricky_return2/helper highlighted for me that to handle this
properly, due to the fact that the flow is across functions, we either need to
use a global dataflow/taint-tracking configuration, or some clever use of
type-trackers.
In the end, this extra effort for not modeling all returns in a flask route
handler as a creation of a HTTP response doesn't really seem to be worth it (at
least not right now). Sicne we use it with taint-tracking for the Reflected XSS
query, and use a HTTP response _creation_ as the sink (without propagating taint
to the HTTP response), we won't get into trouble where we report a path to BOTH
`make_response(...)` and the `return`
```
resp = make_response(...)
return resp
```
If we change this setup in the future, we will probably need to do something to
avoid this double-path reporting.
2020-10-23 14:31:35 +02:00
Rasmus Wriedt Larsen
d60221b168
Python: Model return from flask handler as HTTP response
...
When dealing with
```
resp = make_response(...)
return resp
```
ideally we don't want to mark the return as a creation of a HTTP response. I'll
deal with this in a second commit, to show off how annoying it looks in the
tests right now :D
2020-10-23 14:31:34 +02:00
Rasmus Wriedt Larsen
44ba3469db
Python: Model response_class attribute of Flask class
2020-10-23 14:31:34 +02:00
Rasmus Wriedt Larsen
082e35c2c7
Python: Model mimetype instead of content-type for HTTP Response
...
Since that's really what we're after (at least for now)
2020-10-23 14:31:33 +02:00
Rasmus Wriedt Larsen
81a42b73a8
Python: Model flask.Response
...
I think I'll rework how we model content-type, since what we _actually_ want to
know is the mimetype
2020-10-23 14:31:32 +02:00
Rasmus Wriedt Larsen
1f99bbf744
Python: Model flask.Response
...
I kept `Response::instance()` predicate even though we don't need it for
anything right now, I thought it could be nice to keep for the future.
2020-10-23 14:31:32 +02:00
Rasmus Wriedt Larsen
7894d01248
Python: Add test for mimetype/headers priority
2020-10-23 14:31:31 +02:00
Rasmus Wriedt Larsen
35334cf630
Python: Remove status code modeling
...
I'm not even trying to model it properly right now, and don't have a specific
use-case for it RIGHT NOW. I think we could want this in the future, but I think
it's probably better to model it when we know what we want to use it for.
2020-10-23 14:31:31 +02:00
Rasmus Wriedt Larsen
19dc04de3c
Python: Handle make_response on flask app
2020-10-23 14:31:30 +02:00
Rasmus Wriedt Larsen
e38ac18e46
Python: Add (only) basic $HttpResponse tag to other tests files
...
This seems really nice to me, but you might disagree
2020-10-23 14:31:30 +02:00
Rasmus Wriedt Larsen
8b0b87ae62
Python: Model flask.make_response
2020-10-23 14:31:29 +02:00
Rasmus Wriedt Larsen
e93c20a7a8
Python: You can supply defaults for HTTP Response properties
2020-10-23 14:31:28 +02:00
Rasmus Wriedt Larsen
87f31a96d7
Python: Add flask_attr helper
2020-10-23 14:31:28 +02:00
Rasmus Wriedt Larsen
bfc29bb349
Python: Add annotations for flask response tests
...
The fact that we need to add routeSetup and routeHandler annotations is sort of
annoying :|
2020-10-23 14:31:27 +02:00
Rasmus Wriedt Larsen
47dcc09992
Python: Add tests for creating HTTP responses in flask
...
Which is runnable, if you have flask installed locally
2020-10-23 14:31:26 +02:00
Rasmus Wriedt Larsen
8aaa36bd99
Python: Port ReflectedXss query (and tests)
2020-10-23 14:31:25 +02:00
Rasmus Wriedt Larsen
df6fd53a7e
Python: Add HttpResponse concept
...
We might need to rework this a bit when we also start to handle redirects. I
could see a world where we simply allow http redirects to be subclasses of http
responses, and need to manually exclude them from queries (or create
HttpContentResponse to model the HttpResponses that will contain a body). Let us
see where the wind will take us.
I looked through JS and Go libraries, but I didn't feel their modeling would map
very well to Python.
2020-10-23 14:31:25 +02:00
Rasmus Wriedt Larsen
0d6165883c
Python: Fix spelling for Server::RouteSetup documentation
2020-10-23 14:31:24 +02:00
CodeQL CI
bbda22c769
Merge pull request #4534 from RasmusWL/python-update-flask-modeling
...
Approved by tausbn
2020-10-23 13:28:19 +01:00
Rasmus Wriedt Larsen
b3e53f8d0a
Python: Model django.conf.urls.url (v 1.x)
2020-10-23 14:26:37 +02:00
Taus Brock-Nannestad
6d81ca12c4
Python: Fix bad join order in adjacentUseUseSameVar
2020-10-23 14:08:45 +02:00
Rasmus Wriedt Larsen
ed0fe29d7d
Python: Fix grammar
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-23 13:53:16 +02:00
Rasmus Wriedt Larsen
be166d9c02
Python: Expand Django 2/3 routing tests with 1.x way
...
Added it to the `testapp` so it's easy to run the server to SEE that it works.
Added it to `routing_test` so it's obvious this is supported by our modeling
when we _know_ it's running Django 2/3.
2020-10-23 13:43:27 +02:00
yoff
462e839a83
Update python/ql/src/experimental/Security-new-dataflow/CWE-022/PathInjection.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-23 13:35:13 +02:00
luchua-bc
f5f7259937
Revamp the query to implement AdditionalTaintStep
2020-10-23 12:00:36 +01:00
luchua-bc
3c5c8494b1
Refine the query to check intents coming from outside only
2020-10-23 11:58:16 +01:00
luchua-bc
f86413a9b5
text changes
2020-10-23 11:58:12 +01:00
Bt2018
2ddeb0b169
Add method access qualifier as source
2020-10-23 11:57:02 +01:00
luchua-bc
f5ca459795
Add remote source of Android intent extra
2020-10-23 11:57:01 +01:00
Jonas Jensen
08bf464437
Merge pull request #4540 from criemen/printast-performance
...
C++: Improve PrintAST performance if only individual files are printed
2020-10-23 12:46:34 +02:00
Rasmus Wriedt Larsen
ae60ac211b
Python: Annotate django v1 routing tests
...
Again need to remove trailing $, since inline-expectation tests still don't
handle $
2020-10-23 12:05:05 +02:00
Rasmus Wriedt Larsen
78ab637b54
Python: Port django v1 tests
2020-10-23 12:00:27 +02:00
Rasmus Lerchedahl Petersen
f88cc3c98e
Python: Use custom PathGraph
2020-10-23 01:10:21 +02:00
Rasmus Wriedt Larsen
41ec4f8166
Python: Use FlaskModel as workaround name
...
As suggested by Taus 👍
2020-10-22 19:13:26 +02:00
Cornelius Riemenschneider
6b072686ab
C++: Improve PrintAST performance.
...
This improves the performance of the printAst.ql query by excluding a lot of string concatenations that happen in files unrelated to the one the user is interested in printing.
This is supposed to help the performance of the AST Viewer on bigger databases.
2020-10-22 16:38:52 +02:00
Mathias Vorreiter Pedersen
a1b59e2d6c
Merge pull request #4538 from geoffw0/taintbug
...
C++: Add taint test for memcpy-ing into a vector
2020-10-22 16:05:56 +02:00
Mathias Vorreiter Pedersen
90c027f291
Merge pull request #4532 from geoffw0/wrongtypeformaterr
...
C++: Harden queries against ErroneousType
2020-10-22 14:21:14 +02:00
Geoffrey White
ceea947f5e
C++: Add another test case.
2020-10-22 12:41:23 +01:00
Mathias Vorreiter Pedersen
d0dd71ba10
Apply suggestions from code review
...
Co-authored-by: hubwriter <54933897+hubwriter@users.noreply.github.com >
2020-10-22 12:53:35 +02:00
Rasmus Lerchedahl Petersen
8ce5f41366
Python: Fix source of second part of path
2020-10-22 12:20:50 +02:00
Rasmus Lerchedahl Petersen
8549c9cfde
Python: Rewrite logic to split on nomalization
2020-10-22 11:35:55 +02:00
Rasmus Lerchedahl Petersen
391925532d
Python: PathCheck StartswithCall
...
Should this use `Value::named`?
2020-10-22 11:34:07 +02:00
Rasmus Lerchedahl Petersen
6e361c7793
Python: Make PathCheck a BarrierGuard
2020-10-22 11:32:18 +02:00
Calum Grant
7544bc872a
Merge pull request #3974 from owen-mc/docs/query-classification-and-display
...
Docs: Query classification and display
2020-10-22 10:01:19 +01:00
Geoffrey White
3cca8443f8
C++: Add memcpy(vector test.
2020-10-22 09:46:07 +01:00
Geoffrey White
227bf91626
C++: Correct test annotation.
2020-10-22 09:45:09 +01:00
Erik Krogh Kristensen
e89e99deaa
Merge pull request #4461 from erik-krogh/pyPrint
...
Python: implement printAst for Python
2020-10-22 09:37:10 +02:00
Rasmus Lerchedahl Petersen
f8dba85e0f
Python: PathNormalization os.path.normpath
2020-10-21 22:21:40 +02:00
Rasmus Lerchedahl Petersen
17273dd27e
Python: Add FileSystemAccess open
2020-10-21 22:01:49 +02:00
Rasmus Lerchedahl Petersen
4570c29a11
Python: port query
2020-10-21 21:40:42 +02:00
Rasmus Lerchedahl Petersen
eb5ed23354
Python: Add TaintTracking2
2020-10-21 21:39:50 +02:00
Rasmus Lerchedahl Petersen
da77cbb3d0
Python: concepts PathCheck and PathNormalization
...
Should they be in a module?
2020-10-21 21:37:43 +02:00
Cornelius Riemenschneider
9388448053
C++: Extend jump-to-def support to template instantiations.
...
This commit extends developers ability to use jump-to-def in C/C++ files opened in the VSCode extension.
Before, jump-to-def starting with code in a template instantiation did not work.
Furthermore, this fixes a bug, as the list of all references of a location did not include template instantiations.
2020-10-21 21:35:38 +02:00
Rasmus Wriedt Larsen
278c071fe6
Python: Modernise werkzeug FileStorage modeling
2020-10-21 20:36:40 +02:00
Rasmus Wriedt Larsen
d0fdb542e5
Python: Modernise werkzeug MultiDict modeling
2020-10-21 20:30:20 +02:00
Rasmus Wriedt Larsen
b6bd70a5da
Python: Modernise flask library modeling
...
Two interesting things happened while doing this:
1. I found out that you can't use the same name to define a submodule as any
parent module. So we need give unique names to the top-level module, and the
module for modeling the `flask.Flask` class. I randomly choose a new name for
the top-level module to get things moving (and not be stuck in bikeshedding
forever).
2. With this new setup, I wanted to expose the `route` and `add_url_rule`
methods on instances of `flask.Flask`. It wasn't quite obvious how to do so. I
simply lumped them next to `classRef()` and `instance()`, without too much
care. I did consider putting them inside a `instance` module, which would allow
you to access them by `flask::Flask::instance::route()`, but I wasn't quite
sure, and just did something easy to get moving.
2020-10-21 20:30:14 +02:00
Rasmus Wriedt Larsen
62d665ecb3
Python: Fix shared QLDoc for InstanceSource
2020-10-21 19:55:40 +02:00
Rasmus Wriedt Larsen
047a326183
Python: Remove reference to old PR
...
These have been added to internal tracking issue instead
2020-10-21 19:53:25 +02:00
Rasmus Lerchedahl Petersen
2e8cbbd866
Python: Add concept FileSystemAccess
2020-10-21 17:35:21 +02:00
Mathias Vorreiter Pedersen
056a553976
C++: Fix broken qhelp links
2020-10-21 17:26:46 +02:00
Aditya Sharad
9ff5142529
Merge pull request #4525 from adityasharad/js/autobuild-github-hidden-folder
...
JavaScript: Include .github hidden folders in autobuild
2020-10-21 07:10:42 -07:00
Rasmus Wriedt Larsen
a6abee9b3a
Merge pull request #4476 from yoff/python-port-sql-injection
...
Python: Port SqlInjection
2020-10-21 15:55:19 +02:00
Geoffrey White
678e769553
C++: Change note.
2020-10-21 14:52:43 +01:00
Geoffrey White
d97f03c2be
C++: Exclude error types from NonPortablePrintf.
2020-10-21 14:51:52 +01:00
yoff
ea4ea6b3e6
Merge pull request #4529 from tausbn/python-remove-cartesian-product-in-tkwoverflownode
...
Python: Remove bad join in `getCallableScope`
2020-10-21 15:36:38 +02:00
Rasmus Lerchedahl Petersen
060481053a
Python: Add note about incompleteness
...
I was going to do this in an issue, but it makes sense
to have it in the code. We could still add an issue as well.
2020-10-21 15:15:19 +02:00
Rasmus Lerchedahl Petersen
c57c798bfa
Python: Add TODO
2020-10-21 15:10:40 +02:00
yoff
ee5221abb4
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-21 15:08:16 +02:00
Jonas Jensen
2479402a9d
Merge pull request #4522 from geoffw0/odasa704
...
C++: Non-constant format string test case
2020-10-21 14:58:02 +02:00
Jonas Jensen
6a80f3380e
Merge pull request #4527 from geoffw0/odasa3940
...
C++: Improve SizeCheck queries
2020-10-21 14:55:57 +02:00
Taus Brock-Nannestad
31c169daac
Python: Remove bad join in getCallableScope
...
Clause timing report had this suspicious entry
```
CommandInjection.ql-12:DataFlowPublic::Node::getCallableScope#bbf .................. 7.2s
(4 evaluations with max 6.4s in DataFlowPublic::Node::getCallableScope#bbf/3@i3#119d7b)
```
which indeed was a bad join:
```
Tuple counts for DataFlowPublic::Node::getCallableScope#bbf:
293509 ~2% {3} r1 = JOIN DataFlowPublic::Node::getCallableScope#bbf#prev_delta AS L WITH DataFlowPublic::TNode#f AS R ON FIRST 1 OUTPUT L.<1>, L.<0>, L.<2>
22337162 ~0% {3} r2 = JOIN r1 WITH Scope::Scope::getEnclosingScope_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r1.<1>, r1.<2>, R.<1>
22337162 ~0% {3} r3 = r2 AND NOT DataFlowPublic::Node::getCallableScope#bbf#prev AS R(r2.<0>, r2.<2>, r2.<1>)
22337162 ~0% {3} r4 = SCAN r3 OUTPUT r3.<0>, r3.<2>, r3.<1>
722 ~1% {3} r5 = JOIN r4 WITH m#DataFlowPublic::Node::getCallableScope#bbf AS R ON FIRST 2 OUTPUT r4.<0>, r4.<1>, r4.<2>
722 ~1% {3} r6 = JOIN r5 WITH m#DataFlowPublic::Node::getCallableScope#bbf AS R ON FIRST 2 OUTPUT r5.<0>, r5.<2>, r5.<1>
722 ~1% {3} r7 = r6 AND NOT project#DataFlowPrivate::DataFlowCallable::getScope_dispred#ff AS R(r6.<2>)
722 ~1% {3} r8 = SCAN r7 OUTPUT r7.<0>, r7.<2>, r7.<1>
return r8
```
In this case, the join went away by simply moving the helper predicate
out of the class it was situated in (and since it doesn't mention
`this`, it didn't really belong there in the first place).
Result:
```
DataFlowPublic.qll-8:DataFlowPublic::getCallableScope#ff ........................... 26ms
(4 evaluations with max 15ms in DataFlowPublic::getCallableScope#ff/2@i3#709a9e)
```
2020-10-21 14:45:05 +02:00
yoff
9bd808c924
Merge pull request #4528 from tausbn/python-remove-cartesian-product-in-tkwoverflownode
...
Python: Prevent early join on `argName` in `getArg`
2020-10-21 14:43:39 +02:00
Rasmus Lerchedahl Petersen
53ff1a32c1
Merge branch 'main' of github.com:github/codeql into python-port-sql-injection
2020-10-21 14:38:02 +02:00
Geoffrey White
ac1e0692bb
C++: Exclude error types from WrongTypeFormatArguments.
2020-10-21 13:25:57 +01:00
Rasmus Lerchedahl Petersen
77d4cbc0df
Python: Only allow unsafe positional args to extra
2020-10-21 14:21:36 +02:00
Rasmus Lerchedahl Petersen
3a416bce2d
Python: Move test annotation
2020-10-21 14:18:16 +02:00
Rasmus Lerchedahl Petersen
4571b3188c
Python: Fix false negative
2020-10-21 14:16:35 +02:00
Rasmus Lerchedahl Petersen
03c62fd267
Python: Fix typo in test case
2020-10-21 14:03:46 +02:00
yoff
75357727c4
Merge pull request #4490 from RasmusWL/python-model-django-sources
...
Python: model Django HttpRequest as RemoteFlowSource
2020-10-21 13:46:51 +02:00
Rasmus Lerchedahl Petersen
7087522ed9
Python: Move doc reference
2020-10-21 13:30:38 +02:00
Rasmus Lerchedahl Petersen
e49c7d64bd
Python: test for keyword arguments to extra
2020-10-21 13:28:12 +02:00
Rasmus Lerchedahl Petersen
d249b51a5e
Python: Add test-case for indirect RawSQL
2020-10-21 13:23:19 +02:00
Taus Brock-Nannestad
eb3333c0ce
Python: Prevent early join on argName in getArg
2020-10-21 13:23:09 +02:00
Rasmus Lerchedahl Petersen
e51543ea79
Python: allow any positional argument in annotate
2020-10-21 13:17:20 +02:00
Rasmus Lerchedahl Petersen
2c855c739b
Python: Ignore relatively safe arguments of extra
2020-10-21 13:15:46 +02:00
Rasmus Lerchedahl Petersen
6805fb63cc
Python: Use modern pattern for RawSQL class
2020-10-21 13:14:32 +02:00
Rasmus Lerchedahl Petersen
e44247bb00
Python: Add links to function docs
2020-10-21 13:03:14 +02:00
yoff
8e7e107365
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-21 12:55:38 +02:00
Geoffrey White
ba29591b83
C++: Change note.
2020-10-21 11:21:53 +01:00
CodeQL CI
da58306f2d
Merge pull request #4506 from asgerf/js/separate-jquery-config
...
Approved by esbena
2020-10-21 03:13:42 -07:00
Rasmus Wriedt Larsen
5874a7b422
Merge pull request #4488 from yoff/SharedDataflow_ArgumentPassingTests
...
Python: Shared dataflow, argument passing tests
2020-10-21 12:01:37 +02:00
Geoffrey White
6d91d55669
C++: Use the AllocationExpr model.
2020-10-21 11:00:15 +01:00
CodeQL CI
9faf675f1f
Merge pull request #4486 from erik-krogh/lessTokens
...
Approved by asgerf
2020-10-21 02:56:38 -07:00
Tamas Vajk
14938f3872
C#: Add change notes for AST printing improvements
2020-10-21 11:19:51 +02:00
Mathias Vorreiter Pedersen
3fe2a17933
Merge pull request #4509 from geoffw0/intmultlong
...
C++: Add IntMultToLong test cases.
2020-10-21 11:03:13 +02:00
CodeQL CI
eaed93fa7d
Merge pull request #4513 from RasmusWL/python-model-fabric
...
Approved by yoff
2020-10-21 01:58:19 -07:00
Tamas Vajk
6d8abd8b51
C#: Add change note for
2020-10-21 10:56:39 +02:00
Rasmus Lerchedahl Petersen
9ee5a01d7e
Python: Reword comment on isBarrierIn
2020-10-21 10:30:40 +02:00
Rasmus Wriedt Larsen
ba9caacee1
Merge pull request #4524 from tausbn/python-remove-cartesian-product-in-tkwoverflownode
...
Python: Remove cartesian product in `TKwOverflowNode`
2020-10-21 10:22:45 +02:00
Rasmus Wriedt Larsen
b0af0b94d0
Python: Fix grammar
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-10-21 09:58:37 +02:00
Erik Krogh Kristensen
e18cf08d99
documentation changes based on review
2020-10-21 09:45:16 +02:00
Erik Krogh Kristensen
c1dba2ee9f
add a few shouldPrint calls to improve performance
2020-10-21 09:37:53 +02:00
CodeQL CI
897d8de65a
Merge pull request #4523 from erik-krogh/optionalPromise
...
Approved by asgerf
2020-10-21 00:34:12 -07:00
Rasmus Lerchedahl Petersen
90d0cff384
Python: Use flask routing
2020-10-21 00:30:16 +02:00
Robert Marsh
413c845e97
Merge branch 'main' into rdmarsh2/cpp/output-iterators-2
...
Accept test changes for unnamed elements
2020-10-20 15:22:08 -07:00
Rasmus Lerchedahl Petersen
383d846396
Python: address review
...
- smooth out future merge
- keyword argument for execute
2020-10-21 00:15:05 +02:00
Rasmus Lerchedahl Petersen
e1dfbc0486
Python: address review
2020-10-20 23:59:44 +02:00
Erik Krogh Kristensen
3306b59a14
Update python/ql/src/semmle/python/PrintAst.qll
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-10-20 23:19:47 +02:00
Aditya Sharad
f7bd835dd8
JavaScript: Include .github hidden folders in autobuild
...
These folders are likely to contain GitHub-specific YAML files, such as Actions workflow configurations.
Including them by default allows analysis of such code without further configuration.
User-configured exclusions will still be respected for these folders.
2020-10-20 12:56:07 -07:00
yoff
01845d1278
Update python/ql/src/experimental/semmle/python/frameworks/Django.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-20 21:43:15 +02:00
Erik Krogh Kristensen
996488511c
Merge pull request #4520 from erik-krogh/LessTests
...
JS: Aggregate tests cases
2020-10-20 19:03:47 +02:00
Geoffrey White
17ff34267a
C++: Resolve the overlap.
2020-10-20 17:47:49 +01:00
Geoffrey White
7db2b2ce37
C++: Make the two queries more alike.
2020-10-20 17:46:47 +01:00
Geoffrey White
4630c69950
C++: Add a test case resembling the example from ODASA-3940.
2020-10-20 17:39:32 +01:00
Geoffrey White
857a4d8a3f
C++: Merge the two tests, so that overlaps are obvious.
2020-10-20 17:33:15 +01:00
Rasmus Wriedt Larsen
6053157b09
Python: Fix QLDoc to not mention sudo method on fabric Group
2020-10-20 17:30:09 +02:00
Taus Brock-Nannestad
0e2ec0dfb4
Python: Remove cartesian product in TKwOverflowNode
...
With CP:
(0s) Tuple counts for dom#DataFlowPublic::TKwOverflowNode#ff:
1209 ~0% {2} r1 = JOIN project#AstGenerated::Function_::getKwarg_dispred#ff AS L WITH ObjectAPI::CallableValue::getScope_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, L.<0>
4329 ~0% {3} r2 = JOIN r1 WITH DataFlowPrivate::ArgumentPassing::connects#bb_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r1.<1>, r1.<0>
7819 ~2% {4} r3 = JOIN r2 WITH Flow::CallNode::getArgByName_dispred#fff AS R ON FIRST 1 OUTPUT r2.<1>, r2.<2>, r2.<0>, R.<1>
7114 ~1% {4} r4 = r3 AND NOT Function::Function::getArgByName_dispred#fff_01#antijoin_rhs AS R(r3.<0>, r3.<3>)
7114 ~76% {2} r5 = SCAN r4 OUTPUT r4.<2>, r4.<1>
1123 ~0% {1} r6 = JOIN project#Exprs::Call::getKwargs_dispred#ff AS L WITH py_flow_bb_node_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>
1123 ~0% {1} r7 = JOIN r6 WITH Flow::CallNode#class#f AS R ON FIRST 1 OUTPUT r6.<0>
1357707 ~0% {2} r8 = JOIN r7 WITH project#AstGenerated::Function_::getKwarg_dispred#ff AS R CARTESIAN PRODUCT OUTPUT R.<0>, r7.<0>
1357707 ~0% {2} r9 = JOIN r8 WITH ObjectAPI::CallableValue::getScope_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r8.<1>, R.<1>
1364821 ~0% {2} r10 = r5 \/ r9
return r10
Without CP:
(13s) Tuple counts for dom#DataFlowPublic::TKwOverflowNode#ff:
1209 ~0% {2} r1 = JOIN project#AstGenerated::Function_::getKwarg_dispred#ff AS L WITH ObjectAPI::CallableValue::getScope_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, L.<0>
19175 ~4% {3} r2 = JOIN r1 WITH DataFlowPrivate::ArgumentPassing::connects#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r1.<1>, r1.<0>
7819 ~2% {4} r3 = JOIN r2 WITH Flow::CallNode::getArgByName_dispred#fff AS R ON FIRST 1 OUTPUT r2.<1>, r2.<2>, r2.<0>, R.<1>
7114 ~1% {4} r4 = r3 AND NOT Function::Function::getArgByName_dispred#fff_01#antijoin_rhs AS R(r3.<0>, r3.<3>)
7114 ~76% {2} r5 = SCAN r4 OUTPUT r4.<2>, r4.<1>
1123 ~0% {1} r6 = JOIN project#Exprs::Call::getKwargs_dispred#ff AS L WITH py_flow_bb_node_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>
574 ~0% {2} r7 = JOIN r6 WITH DataFlowPrivate::ArgumentPassing::connects#ff AS R ON FIRST 1 OUTPUT R.<1>, r6.<0>
524 ~1% {3} r8 = JOIN r7 WITH ObjectAPI::CallableValue::getScope_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r7.<1>, r7.<0>
291 ~0% {2} r9 = JOIN r8 WITH project#AstGenerated::Function_::getKwarg_dispred#ff AS R ON FIRST 1 OUTPUT r8.<1>, r8.<2>
7405 ~72% {2} r10 = r5 \/ r9
return r10
2020-10-20 17:29:26 +02:00
Rasmus Wriedt Larsen
cd116fc5f2
Python: Fix grammar in QLDoc
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-10-20 17:26:33 +02:00
Geoffrey White
a372578571
C++: Move the SizeCheck*.ql tests to the standard location.
2020-10-20 16:02:54 +01:00
Erik Krogh Kristensen
bdbc8f5c91
add support for OptionalUse in js/missing-await
2020-10-20 16:52:57 +02:00
Geoffrey White
8198b96eb2
C++: Add test cases.
2020-10-20 15:33:57 +01:00
Geoffrey White
540af7866c
C++: Test spacing.
2020-10-20 15:23:15 +01:00
CodeQL CI
7ea8652f49
Merge pull request #4521 from erik-krogh/moreMiddle
...
Approved by asgerf
2020-10-20 07:14:14 -07:00
Geoffrey White
cbf55ce51a
Merge branch 'main' into intmultlong
2020-10-20 14:55:53 +01:00
Asger Feldthaus
5436bb154a
JS: Mention Xss.ql in change note
2020-10-20 14:49:20 +01:00
Rasmus Wriedt Larsen
6920f3012c
Python: Django route handlers in different file now works
...
Fixed by https://github.com/github/codeql/pull/4514
2020-10-20 15:41:14 +02:00
Rasmus Wriedt Larsen
c8441dc4fb
Merge branch 'main' into python-model-django-sources
2020-10-20 15:38:20 +02:00
Erik Krogh Kristensen
e061c6a006
add support for more custom CSRF checking middlewares
2020-10-20 15:16:14 +02:00
yoff
17155b64f5
Merge pull request #4514 from tausbn/python-add-module-boundary-flow-steps
...
Python: Add module boundary flow steps
2020-10-20 14:36:10 +02:00
Chris Smowton
af6da85ec9
Remove dead LoggerType class
...
This appears to have been factored into Loggers.qll but left lying around.
2020-10-20 13:32:11 +01:00
Erik Krogh Kristensen
05d4858d4f
autoformat
2020-10-20 14:27:09 +02:00
CodeQL CI
d2282fc474
Merge pull request #4517 from erik-krogh/logAssign
...
Approved by esbena
2020-10-20 05:24:49 -07:00
Erik Krogh Kristensen
1096cb0708
aggregate the tests in library-tests/InterProceduralFlow into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
234cb5c67a
aggregate the tests in library-tests/JSLint into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
6b86b53a2c
aggregate the tests in library-tests/LocalObjects into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
3e3e9de45f
aggregate the tests in library-tests/TaintBarriers into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
f8d38227e8
aggregate the tests in library-tests/TypeInference/AnalyzedModule into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
036187cd70
aggregate the tests in library-tests/Util into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
90bb38b522
aggregate the tests in library-tests/variables into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
2707531ddd
aggregate the tests in library-tests/Closure into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
15fe0bc38a
aggregate the tests in library-tests/Comprehensions into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
0ac55bd521
aggregate the tests in library-tests/Flow into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
b43e21a4c7
aggregate the tests in library-tests/HTML/HTMLElementAndHTMLAttribute into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
003854ebe7
aggregate the tests in library-tests/SensitiveActions into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
d678cc17ba
aggregate the tests in library-tests/Templates into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
ad7844a6ac
aggregate the tests in library-tests/ClassNode into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
5d401f98a3
aggregate the tests in library-tests/Externs into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
e461c92708
aggregate the tests in library-tests/JSX into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
0c65eee120
aggregate the tests in library-tests/YAML into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
55f130fe62
aggregate the tests in library-tests/AMD into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
10f41878a7
aggregate the tests in library-tests/frameworks/Concepts into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
aece1717aa
aggregate the tests in library-tests/frameworks/xUnit into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
771cab233e
aggregate the tests in library-tests/frameworks/Firebase into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
a3e6054ee5
aggregate the tests in library-tests/frameworks/Electron into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
ed77e055ed
aggregate some of the tests in library-tests/frameworks/HTTP-heuristics into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
1e537db103
aggregate the tests in library-tests/frameworks/Vue into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
26a5d62a87
aggregate the tests in library-tests/NPM into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
bc5ed100a0
aggregate the tests in library-tests/Patterns into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
a47b8c30d1
aggregate the tests in library-tests/TypeScript/ImportEquals into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
778fbe6f61
aggregate the tests in library-tests/TypeScript/ArrayTypes into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
41b940de69
aggregate the tests in library-tests/TypeScript/ExternalTypes into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
7817ee7611
aggregate the tests in library-tests/TypeScript/BigInts into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
a588f438b6
aggregate the tests in library-tests/TypeScript/LocalTypeResolution into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
deedc8c2d7
aggregate the tests in library-tests/TypeScript/TypeParameters into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
c9a0179f42
aggregate the tests in library-tests/TypeScript/Enums into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
fcee5fa960
aggregate the tests in library-tests/TypeScript/Modifiers into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
1e76471791
aggregate the tests in library-tests/TypeScript/TypeVariableTypes into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
a667b69d91
aggregate the tests in library-tests/NodeJS into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
c8af1d15ab
aggregate the tests in library-tests/TypeScript/Types into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
69093629e9
aggregate the tests in library-tests/XML into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
4f28b6ddd8
aggregate the tests in frameworks/UrlLibraries into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
3e532c235b
aggregate the tests in library-tests/DataFlow into a single .ql file
2020-10-20 14:08:53 +02:00
Rasmus Wriedt Larsen
80adbdfbc1
Python: Mark unhandled django route handlers with f-:
...
That is playing more nicely with the expected usage of the inline-tests.
2020-10-20 13:44:34 +02:00
Taus Brock-Nannestad
a21c29507c
Python: Fix false negative
...
I'm slightly suspicious of this fix -- it seems to work, but it makes
me wonder if we're potentially missing other kinds of flow, by not
handling other kinds of definitions.
Also, I feel like this should really be attached to an appropriate
post-update node of the given argument. As it is written now, the flow
will go from the argument _before_ the call, which obviously misses a
step if the argument is modified by the call. In practice, I would
expect this to be rather rare.
2020-10-20 13:16:54 +02:00
Taus Brock-Nannestad
860cafed4d
Python: Mark failing test as false negative
2020-10-20 13:11:06 +02:00
Asger Feldthaus
c91cdb5194
JS: Address review comments
2020-10-20 12:00:02 +01:00
Taus
802a725260
Merge pull request #2 from RasmusWL/python-tricky-import-ssa-filter-definition
...
Python: Add test for tricky module member for type-tracking
2020-10-20 12:51:45 +02:00
CodeQL CI
8b084ffe22
Merge pull request #4518 from asgerf/js/fix-oom
...
Approved by erik-krogh
2020-10-20 03:37:00 -07:00
Rasmus Wriedt Larsen
045a6c3cb5
Python: Add test for tricky module member for type-tracking
...
Local testing shows that the `getDefinition` result for this is a `SSA filter definition`,
and not an `AssignmentDefinition`.
2020-10-20 12:20:35 +02:00
Mathias Vorreiter Pedersen
528afc55ab
Merge pull request #3788 from geoffw0/callderef
...
C++: Add bcopy to models and use it.
2020-10-20 12:15:23 +02:00
Asger Feldthaus
8779b7c1ce
JS: Update expected output after rebase
2020-10-20 11:10:30 +01:00
Asger Feldthaus
aee970bee7
JS: Change note
2020-10-20 10:54:02 +01:00
Asger Feldthaus
28a73c1e18
JS: Add test case
2020-10-20 10:53:15 +01:00
Asger Feldthaus
6aac353777
JS: Update test output
2020-10-20 10:53:12 +01:00
Asger Feldthaus
50a015c73e
JS: Move $() sink into separate dataflow config
2020-10-20 10:52:33 +01:00
CodeQL CI
4cc7138784
Merge pull request #4507 from erik-krogh/template
...
Approved by asgerf
2020-10-20 02:45:00 -07:00
Erik Krogh Kristensen
8c8cf4fc01
autoformat
2020-10-20 11:17:06 +02:00
Erik Krogh Kristensen
7d87699e42
add test for modern compound assignment in js/implicit-operand-conversion
2020-10-20 10:50:20 +02:00
Erik Krogh Kristensen
eb786078cb
support modern compund-assignment in js/implicit-operand-conversion
2020-10-20 10:40:47 +02:00
Erik Krogh Kristensen
f47fb5ebd8
switch extends around to match @assignlogandexpr and @assignlogorexpr correctly
2020-10-20 10:38:45 +02:00
Geoffrey White
f9987cff64
C++: Update QLDoc comment.
2020-10-20 09:36:33 +01:00
Asger Feldthaus
78c85775e3
JS: Do not extend AdditionalTaintStep in the ldap library
2020-10-20 09:07:12 +01:00
Tamas Vajk
5d0c30db66
C#: Fix nullable reference type handling in type mention extraction
2020-10-20 08:23:57 +02:00
Tamas Vajk
dad5166bca
C#: Print full name of type mentions in AST
2020-10-20 08:23:57 +02:00
Tamas Vajk
7929d8a982
C#: Fix generic type name location in AST
2020-10-20 08:23:56 +02:00
Tamas Vajk
037907e442
C#: Fix qualified name type mention extraction
2020-10-20 08:23:56 +02:00
Tamas Vajk
238ed2e643
C#: Make array and pointer type mentions symmetrical
2020-10-20 08:23:56 +02:00
Tamas Vajk
a87343dd69
C#: Add more type test cases to cover type mentions
2020-10-20 08:23:56 +02:00
Tamas Vajk
f0a40f6e5e
C#: Fix type mention for stackalloc to span assignment
2020-10-20 08:23:56 +02:00
Tamas Vajk
7cb4d6d7a0
C#: Fix type mentions for stackalloc arrays
2020-10-20 08:23:56 +02:00
Tamas Vajk
ca6ecb3f1e
C#: Extract type mention for array creation
2020-10-20 08:23:56 +02:00
Tamas Vajk
7066568813
C#: Change type access and expression order in casts for AST printing
2020-10-20 08:23:56 +02:00
Tamas Vajk
6c48eb8c12
C#: Add type mentions to AST
2020-10-20 08:23:56 +02:00
Rasmus Lerchedahl Petersen
5990241c8f
Python: Support django models (with some caveats)
2020-10-20 03:20:00 +02:00
Taus
f5ec548e68
Python: Fix typo in QLDoc
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-10-19 23:51:38 +02:00
Rasmus Lerchedahl Petersen
d7308bddf2
Python: Add django sink with concept test
2020-10-19 21:34:55 +02:00
Dave Bartolomeo
3587235b4f
Merge pull request #4471 from github/igfoo/unnamed
...
C++: Be more consistent about unnamed entities
2020-10-19 15:18:34 -04:00
Ian Lynagh
987c16ed53
Merge remote-tracking branch 'upstream/main' into igfoo/unnamed
2020-10-19 19:09:41 +01:00
Geoffrey White
a426412b4e
Merge pull request #4497 from vadi2/patch-1
...
Add modern C++ variant
2020-10-19 19:09:23 +01:00
Geoffrey White
b68f98b332
C++: More use of [, ].
2020-10-19 19:05:29 +01:00
CodeQL CI
4c5ecb4093
Merge pull request #4478 from erik-krogh/homegrownCsrf
...
Approved by asgerf
2020-10-19 11:04:10 -07:00
CodeQL CI
502faa7d1c
Merge pull request #4494 from erik-krogh/callLimit
...
Approved by asgerf
2020-10-19 11:03:25 -07:00
Geoffrey White
658dbf45d2
C++: getParameter(_) is considered an anti-pattern.
2020-10-19 18:42:33 +01:00
Robert Marsh
5d9f54e797
Merge pull request #4502 from dbartol/dbartol/PrintLoadStoreTargets
...
C++: Print target variable name for `Load` and `Store`, if known
2020-10-19 13:30:39 -04:00
Geoffrey White
ddc5150080
C++: Create a module for models of things in Std.
2020-10-19 18:27:20 +01:00
Geoffrey White
3fad597bbf
C++: Make function models private (except ones we anticipate users accessing).
2020-10-19 18:25:23 +01:00
Taus Brock-Nannestad
7755993dd3
Python: Add jump steps for module attribute reads.
...
This is the quick-and-dirty solution, as discussed.
An even quicker-and-dirtier solution would have used
`ModuleValue::attr` and take the `getOrigin` of that as the source of
the jump step. However, this turns out to be a bad choice, since
`attr` might fail to have a value for the given attribute (for a
variety of reasons). Thus, we instead appeal to a helper predicate
that keeps track of which names are defined by which right-hand-sides
in a given module. (Observe that type tracking works correctly for `x`
in `mymodule.py`, even though `x` is never assigned a value in the
eyes of the Value API.)
This means that points-to is only used to actually figure out if the
object we're looking an attribute up on is a module or not. This is
the next thing to replace in order to eliminate the dependence on
points-to, but this will require some care to ensure that all module
lookups are handled correctly.
Only two test files needed to be changed for the tests to pass. The
first was the fixed false negative in the type tracker, and the other
was a bunch of missing flow in the regression test. I have manually
removed the `# Flow not found` annotations to make them consistent
with the output. Pay particular attention to the annotation on line
117 -- I believe it was misplaced and should have been on line 106
instead (where, indeed, we now have flow where none appeared before).
2020-10-19 19:13:32 +02:00
Robert Marsh
aad6d43423
C++: autoformat
2020-10-19 10:12:16 -07:00
Geoffrey White
8646d5c811
C++: Fix test failure (we no longer have taint flow from the size parameter).
2020-10-19 17:37:11 +01:00
Geoffrey White
541a449bc4
Merge branch 'main' into callderef
2020-10-19 17:15:33 +01:00
Rasmus Wriedt Larsen
98691fe8ec
Python: Model fabric Group execution (version 2.x)
...
This required some thought for how to model that we're interested in subclasses
of `fabric.group.Group`, and not so much that class itself. Some thoughts:
---
After initially using this in `module Group`
/** A reference to a subclass of `fabric.group.Group` */
abstract class SubclassRef extends DataFlow::Node { }
private class SubclassInstantiation extends SubclassInstanceSource, DataFlow::CfgNode {
override CallNode node;
SubclassInstantiation() { node.getFunction() = any(SubclassRef ref).asCfgNode() }
}
with this in `module SerialGroup` and `module ThreadingGroup`:
class ClassRef extends DataFlow::Node, fabric::group::Group::SubclassRef {
ClassRef() { this = classRef(DataFlow::TypeTracker::end()) }
}
I wasn't too much of fan of that approach. Since we probably need the `SubclassInstanceSource` anyway, and don't really have a specific use for `SubclassRef`, I just went with concrete (QL) subclasses of `SubclassInstanceSource` in each of the modules for the Python subclasses.
I really don't know what the best approach is, so I'm very open to suggestions. I think we'll really have to flesh this out for handling Django responses, since we're interested in the fact that some subclasses provide default values for the content-type, and keeping track of that is important for XSS (since there is no XSS if response is `text/plain`)
2020-10-19 18:09:11 +02:00
Rasmus Wriedt Larsen
f10456e35f
Python: Model fabric task decorator (version 2.x)
2020-10-19 18:03:03 +02:00
Rasmus Wriedt Larsen
c671017252
Python: Model fabric Connection (version 2.x)
2020-10-19 18:03:02 +02:00
Rasmus Wriedt Larsen
f7502386e7
Python: Model fabric package (version 1.x)
2020-10-19 18:03:01 +02:00
Vadim Peretokin
aa578ed334
Update cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.cpp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2020-10-19 16:58:17 +02:00
Geoffrey White
460fbea253
C++: Add some more cases.
2020-10-19 15:54:42 +01:00
Geoffrey White
6280b7d5d4
C++: Add the example code for IntMultToLong to the test.
2020-10-19 15:45:31 +01:00
Anders Schack-Mulligen
4ce41854a4
Merge pull request #4508 from smowton/smowton/fix/droid-webview-test-data
...
Fix test data for WebView experimental query
2020-10-19 16:29:20 +02:00
CodeQL CI
5ead4244fe
Merge pull request #4450 from asgerf/js/angular
...
Approved by erik-krogh
2020-10-19 07:25:59 -07:00
Owen Mansel-Chan
77312a2859
List precision options more accurately
2020-10-19 15:08:19 +01:00
Chris Smowton
4fa2a79b41
Fix test data for WebView experimental query
2020-10-19 14:57:18 +01:00
Erik Krogh Kristensen
ce95676130
add express.csrf as an CSRF protecting middleware
2020-10-19 15:39:02 +02:00
Rasmus Wriedt Larsen
6b30198d59
Python: Port old fabric tests
...
For v1 tests, just extended with explicit calls that use keyword arguments.
For v2 tests, rewrote pretty much everything to what it 100% explicit what we support
2020-10-19 14:34:22 +02:00
CodeQL CI
d644a30b19
Merge pull request #4434 from erik-krogh/printAST
...
Approved by asgerf
2020-10-19 04:42:42 -07:00
Joe Farebrother
980fdd8dea
Java: Update Guava version in test stubs and change note
2020-10-19 11:56:28 +01:00
Vadim Peretokin
f403c9d02c
Update cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.cpp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2020-10-19 12:49:32 +02:00
Erik Krogh Kristensen
ca0870da53
update expected output from InterfaceDefinition -> InterfaceDeclaration change
2020-10-19 12:36:48 +02:00
Joe Farebrother
227092e2ae
Java: Minor corrections to comments
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-10-19 11:16:33 +01:00
CodeQL CI
2e52cbeb4a
Merge pull request #4499 from max-schaefer/js/module_compile
...
Approved by asgerf
2020-10-19 03:06:21 -07:00
Erik Krogh Kristensen
8f6165cd5f
print synthetic constructors in PrintAst.ql
2020-10-19 11:10:14 +02:00
Erik Krogh Kristensen
5b1ed97d68
Update javascript/ql/src/semmle/javascript/TypeScript.qll
...
Co-authored-by: Asger F <asgerf@github.com >
2020-10-19 11:01:06 +02:00
Rasmus Lerchedahl Petersen
646ced2a1d
Python: Add concept test scaffold
2020-10-19 10:58:57 +02:00
Rasmus Lerchedahl Petersen
f17720f587
Python: Add test and fix filename
2020-10-19 10:58:57 +02:00
Rasmus Lerchedahl Petersen
d76b2c0023
Python: Add concept and port query
2020-10-19 10:58:57 +02:00
Erik Krogh Kristensen
8c44392638
add local dataflow to js/template-syntax-in-string-literal
2020-10-19 10:58:40 +02:00
Max Schaefer
e1d90e90ad
JavaScript: Add modelling for Module.prototype._compile.
2020-10-19 09:42:17 +01:00
Chris Smowton
3e03db178f
Merge pull request #4483 from smowton/smowton/admin/droid-webview-pr-rebase
...
Rebase of #3706
2020-10-19 09:29:04 +01:00
Mathias Vorreiter Pedersen
7942d7332a
Merge pull request #4501 from dbartol/dbartol/PrintPartialFlow
...
C++: Annotate IR with partial flow info
2020-10-18 17:48:54 +02:00
Dave Bartolomeo
a80c6fbf97
C++: Print target variable name for Load and Store, if known
...
Now that we've started printing the targets of `Call` instructions in the IR dumps, I figured I might as well print the names of the variable being loaded or stored as well. We could potentially extend this to match fields, array elements, etc., but that's quite a bit more work.
2020-10-17 14:21:27 -04:00
Dave Bartolomeo
100f13f202
C++: Annotate IR with partial flow info
...
I've added one more property to the annotations provided by `PrintIRLocalFlow.qll`: The `pflow` property will now be emitted for any operand or instruction for which `configuration.hasPartialFlow` determines that there is partial flow to that node. This requires that partial flow be enabled via overriding `Configuration::explorationLimit()` in order to display. Otherwise, you'll still just get the local flow info as before.
2020-10-17 13:17:08 -04:00
Robert Marsh
4766492e39
C++: respond to PR comments on output iterators
2020-10-16 13:47:20 -07:00
Robert Marsh
7f2aa81d0b
Merge pull request #4498 from dbartol/dbartol/PrintCallTargets
...
C++: Print static call target for `Call` instruction in dumps
2020-10-16 16:46:33 -04:00
Robert Marsh
1f8167b47b
C++: fix test annotations
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-10-16 16:16:27 -04:00
Asger Feldthaus
f0034138ce
JS: Fix DefaultFlowLabels test
2020-10-16 18:13:13 +01:00
Asger Feldthaus
4137d3f971
JS: Split CWE-079 tests into their own folders
2020-10-16 17:32:36 +01:00
Dave Bartolomeo
6a6eadcf50
C++: Print static call target for Call instruction in dumps
2020-10-16 11:53:27 -04:00
Chris Smowton
5a480bfb13
Give query an id and PathGraph query predicates
2020-10-16 16:19:58 +01:00
Vadim Peretokin
8933bbd672
Add modern C++ variant
2020-10-16 17:11:41 +02:00
Erik Krogh Kristensen
8cf21e3b2b
autoformat
2020-10-16 16:56:35 +02:00
Anders Schack-Mulligen
a806a4f086
Merge pull request #4312 from JLLeitschuh/feat/JLL/java/jhipster_CVE-2019-16303
...
Java: QL Query Detector for JHipster Generated CVE-2019-16303
2020-10-16 15:47:09 +02:00
Tom Hvitved
d91ea55f0c
Merge pull request #4440 from aschackmull/dataflow/adaptive-field-precision
...
Dataflow: Adaptive field flow precision
2020-10-16 15:08:56 +02:00
Erik Krogh Kristensen
27a2cd310d
inline value in nodeLeadingToCsrfWrite
2020-10-16 14:21:49 +02:00
Erik Krogh Kristensen
017c73dce3
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2020-10-16 14:20:40 +02:00
Erik Krogh Kristensen
c2338b218f
Update javascript/ql/src/semmle/javascript/dataflow/Nodes.qll
...
Co-authored-by: Asger F <asgerf@github.com >
2020-10-16 14:12:36 +02:00
CodeQL CI
1d9b0ce059
Merge pull request #4460 from max-schaefer/js/unsafe-shell-command-construction-infeasible-paths
...
Approved by asgerf
2020-10-16 05:05:29 -07:00
Anders Schack-Mulligen
2b19a48030
Merge pull request #3880 from hvitved/dataflow/precise-aps
...
Data flow: Precise access paths
2020-10-16 13:54:35 +02:00
Anders Schack-Mulligen
b352605d12
Dataflow: Code review fixes.
2020-10-16 13:45:51 +02:00
Erik Krogh Kristensen
7598d31fc1
add change note
2020-10-16 13:35:31 +02:00
Erik Krogh Kristensen
b3d5f9c4dd
support throttle like calls as partial calls
2020-10-16 13:33:02 +02:00
Joe Farebrother
3ef9498d53
Java: Modify privateness of a couple imports for Guava
2020-10-16 12:09:39 +01:00
Anders Schack-Mulligen
664f04020f
Revert "Dataflow: Count callables instead of nodes for fieldFlowBranchLimit."
...
This reverts commit 1501a40de8 .
2020-10-16 12:51:50 +02:00
Anders Schack-Mulligen
1501a40de8
Dataflow: Count callables instead of nodes for fieldFlowBranchLimit.
2020-10-16 12:51:17 +02:00
Anders Schack-Mulligen
6aae51fa4f
Dataflow: Sync.
2020-10-16 12:51:17 +02:00
Anders Schack-Mulligen
8f055f56b8
Dataflow: Adaptive field flow precision.
2020-10-16 12:51:17 +02:00
Anders Schack-Mulligen
b0f0f89dbc
Dataflow: Minor pruning improvements.
2020-10-16 12:51:17 +02:00
Tamas Vajk
52bdd8bf99
C#: Add support for custom assert methods ([DoesNotReturnIf(true/false)])
2020-10-16 12:25:03 +02:00
Joe Farebrother
8cd00cf05f
Java: Add change note for Guava
2020-10-16 11:08:45 +01:00
Taus Brock-Nannestad
60fcb5e7d5
Python: Add PEP-328 test example
...
Based on https://www.python.org/dev/peps/pep-0328/#guido-s-decision
Original "code" is in the Public Domain.
2020-10-16 12:03:43 +02:00
Joe Farebrother
4b160b9aaf
Java: Merge Guava definitions for string utilities into one file
2020-10-16 10:46:27 +01:00
Joe Farebrother
adad75bd86
Java: Update Guava modelling to use new refactor
2020-10-16 10:39:18 +01:00
Joe Farebrother
8834a8fed6
Java: Make tests less noisy
2020-10-16 10:22:41 +01:00
Joe
f58ebad756
Java: Fix QLDoc
2020-10-16 10:22:41 +01:00
Joe
fc4d7c3161
Java: Make Guava stuff private
2020-10-16 10:22:41 +01:00
Joe
28647b20e2
Java: Add tests
2020-10-16 10:22:41 +01:00
Joe
e196c75b4e
Java: Add modelling for Guava Strings, Splitter, and Joiner
2020-10-16 10:22:30 +01:00
Rasmus Wriedt Larsen
86798063a3
Python: Model tainted attributes of django HttpRequest
2020-10-16 11:12:20 +02:00
Rasmus Wriedt Larsen
a3cdbf2052
Python: Basic modeling of Django HttpRequest
2020-10-16 11:12:19 +02:00
Rasmus Wriedt Larsen
f547b6010b
Python: Implement routed parameter for django.urls.re_path
2020-10-16 11:12:17 +02:00
Rasmus Wriedt Larsen
ff8708df67
Python: Implement routed parameter for django.urls.path
...
Matching current implementation in
f07a7bf8cf/python/ql/src/semmle/python/web/django/General.qll (L125-L133)
2020-10-16 11:12:16 +02:00
Rasmus Wriedt Larsen
8803fb2778
Python: Refactor RouteSetup with default impl for getUrlPattern
...
Having multiple copies of the StrConst data-flow tracking code means that if we
need to update this to be more sophisticated, we could easily forget to do it
somewhere :|
Until we have a proper `.getAPossibleStringValue` helper, this refactoring
should be nice :)
2020-10-16 11:12:15 +02:00
Rasmus Wriedt Larsen
44683f2959
Python: Identify route handlers for django
...
Not including class based handlers
2020-10-16 11:12:14 +02:00
Rasmus Wriedt Larsen
c0d71f767a
Python: Add taint test for django v2/v3
2020-10-16 11:12:13 +02:00
Rasmus Wriedt Larsen
09a2a6cdfd
Python: Fix django re_path kwarg test
...
Since it was using the wrong keyword argument name before :D
2020-10-16 11:12:12 +02:00
Rasmus Wriedt Larsen
b28d022be9
Python: Add simpel model of a django path/re_path route setup
...
Also had to change the annotation to not include the `r` prefix for the
raw-string... not sure why that isn't replicated, but ¯\_(ツ)_/¯
2020-10-16 11:12:11 +02:00
Rasmus Wriedt Larsen
979dc471ac
Python: Port old routing tests
2020-10-16 11:12:09 +02:00
Rasmus Wriedt Larsen
ca60132e24
Python: Django test: Add simple route handler and annotations
2020-10-16 11:12:09 +02:00
Rasmus Wriedt Larsen
44b9b7f084
Python: Django test: Enable app
...
and add a bits of use docs
2020-10-16 11:12:08 +02:00
Rasmus Wriedt Larsen
6506e5d646
Python: Django test: Add testapp
2020-10-16 11:12:07 +02:00
Rasmus Wriedt Larsen
c71c41b759
Python: Django test: Disable DB (for now)
2020-10-16 11:12:06 +02:00
Rasmus Wriedt Larsen
f704c566b9
Python: Add real django 3.1 project as base of tests
2020-10-16 11:12:05 +02:00
Rasmus Lerchedahl Petersen
cced335284
Python: Switch tests to path queries
2020-10-16 09:59:30 +02:00
Tamas Vajk
ffc2a64750
C#: do not discard duplicate trapfiles for compilation parameter extraction
2020-10-16 09:52:21 +02:00
Tom Hvitved
27fc610c0d
Python: Update expected test output
2020-10-16 09:09:06 +02:00
Tom Hvitved
5f01fda1ef
Data flow: Sync files
2020-10-16 09:05:02 +02:00
Tom Hvitved
82e56d4ebb
Data flow: Simplify pathStep and pathIntoCallable
2020-10-16 09:05:02 +02:00
Anders Schack-Mulligen
94f110f739
Sync.
2020-10-16 09:05:01 +02:00
Anders Schack-Mulligen
b4ecfaeda3
Dataflow: Remove inconsistent AccessPath.getType().
2020-10-16 09:05:01 +02:00
Anders Schack-Mulligen
d88c551f64
Dataflow: qldoc fix
2020-10-16 09:05:01 +02:00
Anders Schack-Mulligen
98f10b29b8
Dataflow: Simplify SCC: remove some apa params.
2020-10-16 09:05:01 +02:00
Anders Schack-Mulligen
4e2f786040
Dataflow: Precalculate AccessPath to avoid massive recursion.
2020-10-16 09:05:01 +02:00
Mathias Vorreiter Pedersen
ca534ccb03
C++: Update inline expectation comments
2020-10-16 09:05:01 +02:00
Tom Hvitved
570b624eb7
C++: Update expected test output
2020-10-16 09:05:01 +02:00
Tom Hvitved
d48a6a5555
C#: Update expected test output
2020-10-16 09:04:58 +02:00
Tom Hvitved
d608138c0c
Data flow: Sync files
2020-10-16 09:03:13 +02:00
Tom Hvitved
a35a178080
Data flow: Precise access paths
2020-10-16 09:03:13 +02:00
Tom Hvitved
0dc066c515
Data flow: Rename AccessPath to AccessPathApprox
2020-10-16 09:03:13 +02:00
Rasmus Lerchedahl Petersen
41b8877579
Python: Improve test configuration
2020-10-16 08:32:05 +02:00
Asger Feldthaus
287ec0cbbb
JS: Add test for default flow labels
2020-10-16 07:16:02 +01:00
Asger Feldthaus
583f3d7fd9
JS: Also materialize labels in ZipSlip
2020-10-16 07:12:30 +01:00
Asger Feldthaus
4337c5adaf
JS: Workaround ascii PR check
2020-10-16 07:12:29 +01:00
Asger Feldthaus
b3d8b95433
JS: Autoformat
2020-10-16 07:12:29 +01:00
Asger Feldthaus
ca6cd187b7
JS: Change note
2020-10-16 07:12:29 +01:00
Asger Feldthaus
42fc4ff78c
JS: Don't create new flow labels in *Customizations.qll files
2020-10-16 07:12:29 +01:00
Asger Feldthaus
28b449226c
JS: Do not import UrlConcatenation from customizations libraries
2020-10-16 07:12:29 +01:00
Asger Feldthaus
afd82e202d
JS: Add Angular2 model
2020-10-16 07:12:29 +01:00
Erik Krogh Kristensen
9112d417e4
avoid using getFirstToken for sorting
2020-10-15 20:57:29 +02:00
Aditya Sharad
a92a701c35
Merge pull request #4479 from github/lgtm.com
...
Merge lgtm.com back into main
2020-10-15 10:19:25 -07:00
Mathias Vorreiter Pedersen
da9e33a72c
Merge pull request #4477 from dbartol/dbartol/PrintIRLocalFlow
...
C++: Add ability to dump local dataflow info in IR dumps
2020-10-15 17:38:16 +02:00
Rasmus Wriedt Larsen
5142bfaf01
Merge pull request #4453 from yoff/python-port-unsafe-deserialization
...
Python: port unsafe deserialization
2020-10-15 17:26:31 +02:00
Rasmus Wriedt Larsen
58baec5b06
Merge pull request #4364 from yoff/SharedDataflow_ArgumentPassing
...
Python: Shared dataflow, argument passing
2020-10-15 17:10:59 +02:00
Joe Farebrother
388f60f818
Merge pull request #4430 from joefarebrother/tainttrackingutils-refactor
...
Java: Refactor part of TaintTrackingUtil.qll
2020-10-15 16:05:38 +01:00
Rasmus Lerchedahl Petersen
89f5352324
Python: fix QL format
2020-10-15 16:41:41 +02:00
Dave Bartolomeo
f32a7be874
Fix formatting
2020-10-15 10:16:13 -04:00
luchua-bc
b359802dd4
Replace non-ASCII apostrophe in Java stub classes
2020-10-15 14:53:32 +01:00
luchua-bc
6f6ec9d51a
Change the source class type and simplify the data-flow step
2020-10-15 14:53:32 +01:00
luchua-bc
f5e9690594
Update the doc comments
2020-10-15 14:53:32 +01:00
luchua-bc
c7750fd8c2
Fine tune the query
2020-10-15 14:53:32 +01:00
luchua-bc
5338332648
Enhance the query and add more test cases
2020-10-15 14:53:31 +01:00
luchua-bc
55af37312b
Text changes to the help file
2020-10-15 14:53:31 +01:00
luchua-bc
ebc2bd9a58
Text changes to the help file
2020-10-15 14:53:31 +01:00
luchua-bc
bd0c577ffd
Unsafe resource loading in Android webview
2020-10-15 14:53:30 +01:00
Rasmus Lerchedahl Petersen
ef32488596
Merge branch 'main' of github.com:github/codeql into python-port-unsafe-deserialization
2020-10-15 15:45:35 +02:00
James Fletcher
b05cc2eafd
Merge pull request #4475 from github/banner-template
...
[CodeQL docs] Update footer in Sphinx template
2020-10-15 14:39:52 +01:00
James Fletcher
fb05f02489
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-15 14:24:28 +01:00
CodeQL CI
ab7d28b3fb
Merge pull request #4482 from RasmusWL/promote-script
...
Approved by tausbn
2020-10-15 06:15:55 -07:00
Jonathan Leitschuh
a9c5551284
Fix formatting in Lang.qll
2020-10-15 08:52:02 -04:00
Erik Krogh Kristensen
ff054b985b
add change note
2020-10-15 14:51:02 +02:00
Erik Krogh Kristensen
8206933e85
add test for home grown CSRF protection
2020-10-15 14:51:02 +02:00
Erik Krogh Kristensen
4d1a9740f0
add support for home made CSRF protection middlewares in js/missing-token-validation
2020-10-15 14:50:59 +02:00
Geoffrey White
1b8d14077a
Merge pull request #4481 from rvermeulen/patch-1
...
C++: Fix qldoc for getIncludeText
2020-10-15 13:00:33 +01:00
Erik Krogh Kristensen
1d2ca42d49
update expected output
2020-10-15 13:42:13 +02:00
Erik Krogh Kristensen
d629eea54e
aggregate the arguments of a call into a synthetic node
2020-10-15 13:35:19 +02:00
Erik Krogh Kristensen
5770d0256f
fixing printing of NameConstants
2020-10-15 13:32:22 +02:00
Rasmus Wriedt Larsen
43cee8567c
Python: Add script to promote experimental security queries
2020-10-15 13:25:01 +02:00
Erik Krogh Kristensen
2a5dd2c8a3
fix pretty-printing of number literals
2020-10-15 13:04:52 +02:00
Rasmus Lerchedahl Petersen
cc7d32c27c
Merge branch 'python-port-unsafe-deserialization' of github.com:yoff/codeql into python-port-unsafe-deserialization
2020-10-15 13:01:38 +02:00
Erik Krogh Kristensen
1d4a605517
remove location for synthetic nodes
2020-10-15 12:57:46 +02:00
Erik Krogh Kristensen
9da8c23717
change the order of the children from FunctionDef
2020-10-15 12:57:17 +02:00
Rasmus Lerchedahl Petersen
172e058438
Python: unsafe -> mayExecuteInput
2020-10-15 12:56:29 +02:00
Rasmus Lerchedahl Petersen
00566f0eee
Python: Extend DataFlow::CfgNode when appropriate
2020-10-15 12:40:16 +02:00
yoff
c36ad7dd9b
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-15 12:35:21 +02:00
Tamás Vajk
e62c9b1382
Merge pull request #4472 from tamasvajk/feature/cleanup-3
...
C#: Change public fields to properties
2020-10-15 12:16:53 +02:00
Erik Krogh Kristensen
11ee7c7946
update expected output
2020-10-15 12:06:17 +02:00
Erik Krogh Kristensen
f9f29f53cf
remove locations where we have no exact location
2020-10-15 11:59:51 +02:00
Tom Hvitved
36f6e97cad
Merge pull request #4371 from hvitved/csharp/library-flow-refactor
...
C#: Reimplement flow-summary compilation
2020-10-15 11:56:32 +02:00
Erik Krogh Kristensen
2bb8b78a29
remove "</>" from the end when printing HTML
2020-10-15 11:56:00 +02:00
Remco Vermeulen
7848c5f54d
Fix qldoc for getIncludeText
...
The '<' was HTML encoded for some reason.
2020-10-15 11:49:18 +02:00
Erik Krogh Kristensen
a019312953
improve printing of JS object literals
2020-10-15 11:47:45 +02:00
Rasmus Lerchedahl Petersen
9c8e968cba
Python: Fix bad merge
2020-10-15 11:47:34 +02:00
Erik Krogh Kristensen
ab7542c0d2
improve printing of JSON values
2020-10-15 11:05:22 +02:00
Taus
c8b93148a2
Merge pull request #4424 from RasmusWL/python-model-python2-specific-command-execution
...
Python: model Python 2 specific command execution
2020-10-15 10:52:43 +02:00
Erik Krogh Kristensen
1ebd49b0eb
remove location from "mapping i" print node
2020-10-15 10:51:34 +02:00
Erik Krogh Kristensen
3e2d266343
improve YAMLMapping printing
2020-10-15 10:49:37 +02:00
Anders Schack-Mulligen
60ce02ac18
Merge pull request #4469 from JLLeitschuh/additional-file-taint
...
Java: Track taint through java.io.File::toPath & java.nio.file.Path::toFile
2020-10-15 10:46:35 +02:00
Erik Krogh Kristensen
1b908ce030
improve printing of DeclStmt, and remove escaped whitespace chars from printed output
2020-10-15 10:43:32 +02:00
Tom Hvitved
8728017328
C#: Increase fieldFlowBranchLimit in test
...
68014fd3bf means that more accessors are properly
extracted, and consequently the calls to `get_Item` in the test have more dispatch
targets. Increasing `fieldFlowBranchLimit` makes the test pass again.
2020-10-15 10:40:19 +02:00
Rasmus Wriedt Larsen
c5810d623b
Merge pull request #4474 from tausbn/python-fix-tostring-divergence
...
Python: Fix divergence in tuple/subscripted type `toString`
2020-10-15 10:29:33 +02:00
Erik Krogh Kristensen
c033ae9b7f
add one more case to getAPrimaryQlClass
2020-10-15 10:05:07 +02:00
Arthur Baars
a10c0138e9
Merge commit '78c58c24158e3ee4fd78318194d56591af90da69' into lgtm.com
2020-10-15 10:00:43 +02:00
Rasmus Wriedt Larsen
ce967e1249
Merge branch 'main' into python-model-python2-specific-command-execution
2020-10-15 10:00:02 +02:00
Erik Krogh Kristensen
ab10c28cc4
change the default sorting order for print children to be location based
2020-10-15 09:53:52 +02:00
Rasmus Lerchedahl Petersen
0766eef49b
Merge branch 'main' of github.com:github/codeql into SharedDataflow_ArgumentPassing
2020-10-15 09:49:21 +02:00
Erik Krogh Kristensen
74243d39aa
remove location for arguments/parameters print node
2020-10-15 09:48:55 +02:00
Robert Marsh
fade75b0fb
C++: add operator-- tests for insert iterators
2020-10-14 15:54:34 -07:00
Dave Bartolomeo
dfb687fd47
C++: Add ability to dump local dataflow info in IR dumps
...
This change adds a new module, `PrintIRLocalFlow.qll`, which can be imported into any query that uses both `PrintIR.qll` and the IR dataflow library. The IR dump printed by `PrintIR.qll` will be annotated with information about how each operand and instruction participates in dataflow.
For each operand and instruction, the following propeties are displayed:
- `flow`: Which local operands/instructions have flow to this node, and which local operands/instruction this node has flow to.
- `source`: `true` if this node is a source
- `sink`: `true` if this node is a sink
- `barrier`: Lists which kinds of barrier this node is. Can be zero or more of `full`, `in`, `out`, and `guard`. If the node is a guard barrier, the IR of the guarding instruction is also printed.
We already had a way to print additional properties for instructions and blocks, but not for operands. I added support for operand properties to `IRPropertyProvider`. These are now printed in a curly-brace-enclosed list immediately after the corresponding operand.
When printing flow, instructions are identified by their result ID (e.g., `m128`). Operands are identified by both the result ID of their instruction and their kind (e.g., `r145.left`). For flow from an operand to its use instruction, it just prints `result` at the operand, and prints only the operand kind on the instruction.
Example output:
```
# 344| m344_34(vector<int, allocator<int>>) = Chi : total:m344_20{flow:def->@, @->result}, partial:m344_33{flow:def->@, @->result}
# 344| flow = total->@, partial->@, +m344_33->@, @->+r347_3, @->v347_7.side_effect, @->m347_9.total, @->m344_20.1
```
The `+` annotations indicate when the flow came from `isAdditionalFlowStep()`, rather than built-in local flow.
2020-10-14 18:09:54 -04:00
Robert Marsh
126615a7ee
C++: add prefix operator++ in inserter tests
2020-10-14 13:33:50 -07:00
Robert Marsh
fbe9bc8587
C++: add comments in new iterator models
2020-10-14 13:13:16 -07:00
Robert Marsh
a1a441d759
C++: output iterator flow through operator= models
2020-10-14 13:06:11 -07:00
Robert Marsh
f3843b8a40
Revert "C++: output iterator flow with user-defined operators"
...
This reverts commit 28fa26629c .
2020-10-14 13:01:37 -07:00
james
98d8ec488e
add banner to sphinx template
2020-10-14 20:09:19 +01:00
Geoffrey White
09d4b3eb6d
Merge branch 'main' into callderef
2020-10-14 17:41:14 +01:00
Rasmus Lerchedahl Petersen
d2b90662a3
Python: implement ToString on mappings
2020-10-14 17:31:13 +02:00
Taus
466c22f4a8
Merge pull request #4435 from RasmusWL/python-port-code-injection
...
Python: port code injection query
2020-10-14 16:41:42 +02:00
Rasmus Lerchedahl Petersen
6a3aed337f
Python self -> range
2020-10-14 16:35:43 +02:00
Rasmus Lerchedahl Petersen
352418cb5d
Python: track safe loaders
2020-10-14 16:33:55 +02:00
Taus Brock-Nannestad
f8190feef2
Python: Fix divergence in tuple/subscripted type toString
...
A slightly more complicated version of the situation in
https://github.com/github/codeql/pull/2507 could cause the `toString`
calculation to diverge. Although the previous PR took tuples nested
inside tuples into account (and subscripted types cannot be nested
inside each other in our modelling), it did not account for having
this nesting be interleaved, and this is what caused the divergence.
I have not done the usual "test case first to show the problem
exists", since this would also diverge and take forever to fail. The
instance observed in `scipy` was likely caused by something akin to
```python
x = ()
while True:
x = x[(x,)]
```
Finally, to prevent this from happening with other types, I went
through and checked each instance where the string representation of
an `ObjectInternal` might potentially contain a reference to
itself (and thus explode). I encapsulated this in a
`bounded_toString` helper predicate, and used this in all the cases
where I was able to determine that the above _could_ happen.
2020-10-14 16:13:03 +02:00
yoff
5f6f85c998
Merge pull request #4465 from tausbn/python-remove-essa-flow
...
Python: Remove flow between ESSA variables
2020-10-14 15:37:39 +02:00
Rasmus Lerchedahl Petersen
b8cba381cf
Merge branch 'main' of github.com:github/codeql into python-port-unsafe-deserialization
2020-10-14 15:01:30 +02:00
Tamas Vajk
5a91736b7a
C#: Change public fields to properties
2020-10-14 14:44:01 +02:00
Rasmus Lerchedahl Petersen
3a281a1bd6
Python: Adjust comments and tests
2020-10-14 14:40:11 +02:00
Rasmus Wriedt Larsen
5db4f906d0
Merge branch 'main' into python-port-code-injection
2020-10-14 14:22:02 +02:00
Tom Hvitved
91806da2fa
C#: Address review comments
2020-10-14 14:15:34 +02:00
Tom Hvitved
5d1a5920c7
C#: Reimplement flow-summary compilation
2020-10-14 14:15:34 +02:00
Tom Hvitved
444e607338
C#: Add missing flow through library code using params arguments
2020-10-14 14:15:34 +02:00
Tom Hvitved
f2dc2d912a
C#: Add inter-procedural data-flow test for StringBuilder
2020-10-14 14:15:34 +02:00
yoff
ffe79f688d
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-14 14:08:16 +02:00
Ian Lynagh
9e518d2555
C++: Accept test change for p#n -> (unnamed parameter n)
2020-10-14 12:59:47 +01:00
Tom Hvitved
2af7e1c213
C#: Use CFG nodes instead of AST nodes in sign/modulus analysis
2020-10-14 13:39:44 +02:00
Taus
92ccb795fd
Merge pull request #4415 from RasmusWL/python-flask-routed-parameter
...
Python: Add support for routed parameters in flask
2020-10-14 13:29:51 +02:00
Tamas Vajk
1094d192ab
C#: Change extraction of NamespaceDeclarations to have ID based on the location
2020-10-14 13:26:01 +02:00
Rasmus Wriedt Larsen
1fde477a8f
Python: Refactor argument matching
2020-10-14 13:22:35 +02:00
Rasmus Wriedt Larsen
680a6eb2a6
Python: Refactor argument matching (more)
2020-10-14 13:21:04 +02:00
Rasmus Wriedt Larsen
61ecec7d17
Merge pull request #4467 from tausbn/python-fix-import-type-tracking
...
Python: Fix unwanted module type tracking
2020-10-14 13:08:57 +02:00
Tamas Vajk
5fae440a58
C#: Reverse assignment child nodes in AST
2020-10-14 12:49:08 +02:00
Tamas Vajk
ee9a40e16d
C#: Remove location from base types in the AST
2020-10-14 12:49:08 +02:00
yoff
27f474f0e9
Merge pull request #4429 from RasmusWL/python-model-invoke
...
Python: model invoke library
2020-10-14 12:13:35 +02:00
Rasmus Lerchedahl Petersen
dc7e7890f0
Python: Clearer naming and comments (I hope)
2020-10-14 12:03:05 +02:00
Taus Brock-Nannestad
f3c07e3849
Python: Fix up import helper tests
2020-10-14 11:58:14 +02:00
Max Schaefer
4100ab2919
JavaScript: Add another test to show that flow through functions still works.
2020-10-14 10:03:27 +01:00
Max Schaefer
1c04c07f07
JavaScript: Eliminate source of false positives in UnsafeShellCommandConstruction.
2020-10-14 10:03:04 +01:00
Tamás Vajk
8127d9b93e
Merge pull request #4404 from tamasvajk/feature/cleanup-2
...
C# extractor code cleanup
2020-10-14 11:02:40 +02:00
Rasmus Wriedt Larsen
b0cfa1d92d
Python: Make "..Call" modeling classes extend DataFlow::CfgNode
2020-10-14 10:53:18 +02:00
Rasmus Wriedt Larsen
bfa5d18476
Python: Use new importNode
2020-10-14 10:49:38 +02:00
Rasmus Wriedt Larsen
7d600e4e8e
Merge branch 'main' into python-port-code-injection
2020-10-14 10:48:38 +02:00
Rasmus Wriedt Larsen
4d9d2155fc
Python: Make "..Call" modeling classes extend DataFlow::CfgNode
2020-10-14 10:44:58 +02:00
Rasmus Wriedt Larsen
b0e79890e6
Python: Use new importNode
2020-10-14 10:43:22 +02:00
Rasmus Wriedt Larsen
4597ba64d0
Merge branch 'main' into python-model-invoke
2020-10-14 10:41:37 +02:00
Rasmus Wriedt Larsen
eff47457bf
Python: Refactor argument matching
2020-10-14 10:37:38 +02:00
Rasmus Wriedt Larsen
2ea71f574c
Python: Make "..Call" modeling classes extend DataFlow::CfgNode
2020-10-14 10:37:37 +02:00
Rasmus Wriedt Larsen
2e30f58aa2
Python: Use new importNode
2020-10-14 10:37:36 +02:00
Rasmus Wriedt Larsen
ecf70c5f30
Merge branch 'main' into python-model-python2-specific-command-execution
2020-10-14 10:36:43 +02:00
Tom Hvitved
952b2da7d4
C#: Add copy of ControlFlowReachability.qll to be used by sign/modulus analysis
2020-10-14 10:28:08 +02:00
Tom Hvitved
c32242ed50
C#: Simplify ControlFlowReachability.qll
2020-10-14 10:28:07 +02:00
Rasmus Wriedt Larsen
74bd045488
Python: Make "..Call" modeling classes extend DataFlow::CfgNode
2020-10-14 10:24:46 +02:00
Rasmus Wriedt Larsen
ba158f3317
Python: Use new importNode
2020-10-14 10:17:35 +02:00
Rasmus Wriedt Larsen
49d2e68d12
Merge branch 'main' into python-flask-routed-parameter
2020-10-14 10:16:00 +02:00
Rasmus Lerchedahl Petersen
b0ebb5b6d1
Python: Adjust tag format
2020-10-14 09:51:24 +02:00
Rasmus Lerchedahl Petersen
93383747bd
Python: Use more common name for concept
2020-10-14 09:28:58 +02:00
Rasmus Lerchedahl Petersen
a76d276b48
Python: Adjust getARelevantTag
2020-10-14 08:44:04 +02:00
yoff
3b9ea3a958
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-14 08:24:26 +02:00
Jonathan Leitschuh
fc71ca747d
Java: Track taint through java.io.File::toPath & java.nio.file.Path::toFile
2020-10-13 21:15:09 -04:00
Robert Marsh
28fa26629c
C++: output iterator flow with user-defined operators
2020-10-13 16:30:47 -07:00
Robert Marsh
6552499545
C++: add model for iter-returning functions
2020-10-13 16:19:15 -07:00
Robert Marsh
4b6ecfb0b1
C++: remove some constexprs in qltest
2020-10-13 16:19:15 -07:00
Robert Marsh
45a27d3296
C++: add tests for back_inserter iterator flow
2020-10-13 16:19:15 -07:00
Robert Marsh
108cc9ea47
C++: fix assignment to *iter++
2020-10-13 16:19:15 -07:00
Robert Marsh
f39195e339
C++: add tests for assignments to *iter++
2020-10-13 16:19:15 -07:00
Ian Lynagh
9238503bc3
C++: Make unnamed parameters follow the "(unnamed ...)" naming
2020-10-14 00:10:56 +01:00
Ian Lynagh
7680080701
C++: Accept unnamed-function changes to tests
2020-10-13 23:52:33 +01:00
Taus Brock-Nannestad
7d86b53b71
Python: Fix unwanted module type tracking
2020-10-13 22:47:57 +02:00
Taus Brock-Nannestad
76e5b59dab
Python: Add test case for unwanted module type tracking
2020-10-13 22:47:03 +02:00
Robert Marsh
b49aa677d0
Merge pull request #4459 from geoffw0/setex
...
C++: Additional taint flows through std::set
2020-10-13 15:17:54 -04:00
yoff
1f2390455c
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-13 19:15:33 +02:00
Rasmus Lerchedahl Petersen
5d66c485d5
Python: IPA type for arguemnt mappings
...
Not sure how arg2 in line 118 is achieved
2020-10-13 19:12:52 +02:00
Taus
83937bacae
Merge pull request #4448 from RasmusWL/python-simplify-import-modeling
...
Python: simplify import modeling
2020-10-13 18:08:07 +02:00
Rasmus Wriedt Larsen
2c5996f694
Python: Refactor subprocess_attr type-tracker
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-13 17:21:21 +02:00
Taus Brock-Nannestad
fdb489fc93
Python: Remove flow between ESSA variables
...
This required a minor change in the type tracker implementation, but
apart from that no other changes appear to be needed. Seems to clean
up the test output quite a bit.
2020-10-13 16:35:41 +02:00
yoff
05b744701e
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-13 15:31:50 +02:00
Rasmus Wriedt Larsen
b895641a83
Merge pull request #4464 from tausbn/python-remove-dataflowcfgnode
...
Python: Get rid of `DataFlowCfgNode`
2020-10-13 15:08:28 +02:00
Rasmus Wriedt Larsen
76c9b8c49f
Python: Expose importNode instead of importModule/importMember
...
Since predicate name `import` is not allowed, I adopted `importNode` as it sort
of matches what `exprNode` does.
---
Due to only using `importMember` in `os_attr` we previously didn't handle
`import os.path as alias` :|
I did creat a hotfix for this (https://github.com/github/codeql/pull/4446 ), but
in doing so I realized the core of the problem: We're exposing ourselves to
making these kinds of mistakes by having BOTH importModule and importMember, and
we don't really gain anything from doing this!
We do loose the ability to easily only modeling `from mod import val` and not
`import mod.val`, but I don't think that will ever be relevant.
This change will also make us to recognize some invalid code, for example in
import os.system as runtime_error
we would now model that `runtime_error` is a reference to the `os.system`
function (although the actual import would result in a runtime error).
Overall these are tradeoffs I'm willing to make, as it does makes things simpler
from a QL modeling point of view, and THAT sounds nice 👍
2020-10-13 15:03:22 +02:00
Tamas Vajk
ce9624e61d
C#: Remove unneeded vscode settings from settings.json
2020-10-13 14:50:46 +02:00
Rasmus Wriedt Larsen
4bfd55f1af
Python: Show problem with os.path modeling
...
This is not a very good test for showing that we don't handle direct imports,
but it was the best I had available without inventing something new. It's very
fragile, since any of these would propagate taint (due to handling all `join`
calls as if the qualifier was a string):
ospath_alias.join(ts)
ospath_alias.join(ts, "foo", "bar")
But this test DOES serve the purpose of illustrating that my fix works :D
2020-10-13 14:50:00 +02:00
Tamas Vajk
ce793c357f
C#: Adjust parameters of DefinitionField ctor
2020-10-13 14:45:38 +02:00
Tamas Vajk
ea53ea0994
C#: Prefer keywords over type names
2020-10-13 14:45:38 +02:00
Tamas Vajk
8afac25120
C#: Add params modifier on override
2020-10-13 14:45:38 +02:00
Tamas Vajk
63e173198d
C#: Make static member on generic class private
2020-10-13 14:45:38 +02:00
Tamas Vajk
6cf20d569d
C#: Remove overrides that do nothing
2020-10-13 14:45:38 +02:00
Tamas Vajk
9b349eb844
C#: Use Contains instead of IndexOf
2020-10-13 14:45:38 +02:00
Tamas Vajk
5b33f43b78
C#: Use nameof
2020-10-13 14:45:38 +02:00
Tamas Vajk
f84669904b
C#: Fix typo
2020-10-13 14:45:38 +02:00
Tamas Vajk
7075c6f8ca
C#: Fix public property naming
2020-10-13 14:45:38 +02:00
Tamas Vajk
a4fec39c11
C#: Move fields to locals where possible
2020-10-13 14:45:38 +02:00
Tamas Vajk
b07aceff6b
C#: Fix exception throwing
2020-10-13 14:45:37 +02:00
Tamas Vajk
6dfe90e479
C#: Change array-returning properties
2020-10-13 14:45:37 +02:00
Tamas Vajk
7721c7bba7
C#: Remove redundant conditions
2020-10-13 14:45:37 +02:00
Tamas Vajk
cbdd13127e
C#: Convert publicly visible fields to properties
2020-10-13 14:45:37 +02:00
Tamas Vajk
d5382f2cfd
C#: Fix modifier orders
2020-10-13 14:45:37 +02:00
Tamas Vajk
fbc128fcc7
C#: Fix type parameter names
2020-10-13 14:45:37 +02:00
Tamas Vajk
2e350caf9f
C#: Fix private field and local variable naming
2020-10-13 14:45:37 +02:00
Tamas Vajk
ecb29a267b
C#: Add editor config naming rules
2020-10-13 14:45:37 +02:00
Tamas Vajk
baf6f59bfc
C#: Add braces to multiline block statements
2020-10-13 14:45:37 +02:00
Tamas Vajk
28694513a1
C#: Use pattern matching
2020-10-13 14:45:37 +02:00
Tamas Vajk
155453d9cb
C#: Format single line if statements
2020-10-13 14:45:37 +02:00
Tamas Vajk
aec4481cfb
C#: Use var everywhere
2020-10-13 14:45:37 +02:00
Tamas Vajk
7d544e34af
C#: Add declaration visibility modifiers
2020-10-13 14:45:37 +02:00
Tamas Vajk
466e0cf085
C#: Remove naming styles from editor config, add IDE diagnostic severities
2020-10-13 13:27:46 +02:00
Tamas Vajk
ec6ed90c49
C#: Add final new line to files
2020-10-13 13:27:46 +02:00
Tamas Vajk
2e21564032
C#: Fix formatting with 'dotnet format'
2020-10-13 13:27:46 +02:00
Tamas Vajk
7f86768a49
C#: Reformat LINQ extension method call-chains
2020-10-13 13:27:46 +02:00
Tamas Vajk
115a216ea9
C#: Format nested ternary operators
2020-10-13 13:27:46 +02:00
Tamas Vajk
c38bf5ee5b
C#: Reduce nesting and fix some formatting
2020-10-13 13:27:46 +02:00
Tamas Vajk
e73ced2275
C#: Add sealed modifier to classes to fix dispose-pattern, remove explicit IDisposable implementations
2020-10-13 13:27:46 +02:00
Tamas Vajk
397be7e98f
C#: Change constructor visibility to protected in abstract classes
2020-10-13 13:27:46 +02:00
Tamas Vajk
71faa51270
C#: Dispose IDisposables
2020-10-13 13:27:46 +02:00
Tamas Vajk
e208f3d21d
C#: Simplify null checks with pattern matching, ??, and ?:
2020-10-13 13:27:46 +02:00
Tamas Vajk
504f56adeb
C#: Simplify object initialization
2020-10-13 13:27:46 +02:00
Tamas Vajk
b793af571e
C#: Remove unnecessary usings
2020-10-13 13:27:45 +02:00
Tamas Vajk
ec63acfb0c
C#: Inline out variable declarations
2020-10-13 13:27:45 +02:00
Tamas Vajk
f2e6b42aa4
C#: Add type parameter in/out
2020-10-13 13:27:45 +02:00
Tamas Vajk
33672a4058
C#: Simplify using statements
2020-10-13 13:27:45 +02:00
Tamas Vajk
412b87c5c7
C#: Fix loop that iterates only once
2020-10-13 13:27:45 +02:00
Tamas Vajk
79eff06828
C#: Remove unused out argument
2020-10-13 13:27:45 +02:00
Tamas Vajk
921d3eeaec
C#: Mark members static (remove unused members)
2020-10-13 13:27:45 +02:00
Tamas Vajk
68a45e7e9d
C: Remove unused fields
2020-10-13 13:27:45 +02:00
Tamas Vajk
0c9aaa3dce
C#: Remove unused parameters
2020-10-13 13:27:45 +02:00
Tamas Vajk
93c6d5ea58
C#: Fix empty array creation
2020-10-13 13:27:45 +02:00
Tamas Vajk
2d3985742f
C#: Fix length/emptiness checks
2020-10-13 13:27:45 +02:00
Rasmus Lerchedahl Petersen
b7e8b48e9e
Python: Move concept tests out
...
These tests should be fleshed out at some point, but currently
they test all that we model.
2020-10-13 13:06:47 +02:00
Taus Brock-Nannestad
1829126230
Python: Get rid of DataFlowCfgNode
...
Should make modelling data flow nodes that are also specific
subclasses of `ControlFlowNode` a bit smoother.
2020-10-13 13:04:59 +02:00
Erik Krogh Kristensen
83d6d6041a
Merge pull request #4462 from erik-krogh/strayTodo
...
JS: remove stray todo
2020-10-13 12:50:00 +02:00
Joe Farebrother
b2a2412f1d
Java: Clean up the constructor flow steps
2020-10-13 11:30:02 +01:00
Rasmus Lerchedahl Petersen
4685f2d5f2
Python: Address many review comments
...
still need to move concept tests
2020-10-13 12:03:23 +02:00
Rasmus Wriedt Larsen
662235bad8
Python: Use classRef instead of class_
...
Discussed offline with Taus
2020-10-13 11:56:37 +02:00
CodeQL CI
d3f8fb5e53
Merge pull request #4423 from tausbn/python-add-attribute-access-interface
...
Approved by RasmusWL
2020-10-13 02:56:21 -07:00
Erik Krogh Kristensen
96db3459d0
remove stray todo
2020-10-13 11:48:06 +02:00
Rasmus Wriedt Larsen
dcd103ea73
Python: Fix grammar
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-13 10:31:35 +02:00
Rasmus Wriedt Larsen
ce85ac3ce1
Python: Remove solved TODO
2020-10-13 10:15:03 +02:00
Rasmus Wriedt Larsen
2e430325be
Python: Refactor argument matching to use set literals
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-13 10:05:35 +02:00
Erik Krogh Kristensen
9604705f64
remove pretty printing of bytes (unstable between minor versions)
2020-10-12 22:32:37 +02:00
Erik Krogh Kristensen
9b7c59f4b4
implement printAst for Python
2020-10-12 21:17:46 +02:00
CodeQL CI
e2b0c60627
Merge pull request #4449 from max-schaefer/js/api-graphs-type-handling-improvements
...
Approved by erik-krogh
2020-10-12 11:41:21 -07:00
Robert Marsh
3b7cf7fd27
Merge pull request #4439 from geoffw0/mapex
...
C++: Additional taint flows through std::map
2020-10-12 14:17:17 -04:00
Max Schaefer
9ac70e3044
JavaScript: Clarify the relationship between MkCanonicalName{Def,Use} with an upper-case M and mkCanonicalName{Def,Use} with a lower-case m.
2020-10-12 16:29:11 +01:00
Jonathan Leitschuh
48f4b6c058
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-10-12 11:16:21 -04:00
Jonathan Leitschuh
895f4d0ea6
JHipster Vuln: Add GOOD/BAD & release note links
2020-10-12 11:00:05 -04:00
Joe Farebrother
aa8bacb724
Java: Update test output
2020-10-12 15:50:47 +01:00
Joe Farebrother
3416911ac6
Java: Refector out StringBuilder and Number taint preserving callables
2020-10-12 15:50:47 +01:00
Joe Farebrother
eafde05a55
Java: Expand flow step refactoring to Callables
...
Also add some missing flow steps for StringBuilder
2020-10-12 15:50:47 +01:00
Joe Farebrother
7e2c49fadd
Java: Fix a couple of flow step issues
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-10-12 15:50:47 +01:00
Joe Farebrother
4a8b7f64e8
Java: Rename returnsTaint to returnsTaintFrom
2020-10-12 15:50:47 +01:00
Joe Farebrother
ca9038350c
Java: Add this. and fix mistake
2020-10-12 15:50:46 +01:00
Joe Farebrother
5d487b97da
Java: Merge TaintPreservingMethod with TaintTransferringMethod
2020-10-12 15:50:46 +01:00
Joe Farebrother
a510f58865
Java: Implement code review changes
2020-10-12 15:50:46 +01:00
Joe Farebrother
91ce02aad4
Java: Fix bug involving varadic parameters
2020-10-12 15:50:46 +01:00
Joe Farebrother
79209af9c0
Java: Refactor out flow steps for more frameworks.
2020-10-12 15:50:41 +01:00
Joe Farebrother
92fd8c4128
Java: Move new definitions to new file
2020-10-12 15:48:43 +01:00
Joe Farebrother
60a7666105
Java: Refactor Android SQLite flow steps
2020-10-12 15:48:43 +01:00
Joe Farebrother
ca60f2cc18
Java: Fix failing tests
2020-10-12 15:48:43 +01:00
Joe Farebrother
ff6c5c219c
Java: Start TaintTrackingUtils refactor
2020-10-12 15:48:43 +01:00
Joe Farebrother
551d86c6ea
Java: Define classes for taint propagation methods
2020-10-12 15:48:43 +01:00
Arthur Baars
fc4a3426ac
Merge pull request #4457 from daniel-beck/file-taint
...
Java: Track taint through java.io.File constructor and #toURI; URI#toURL
2020-10-12 16:42:11 +02:00
Taus Brock-Nannestad
3288cf1a75
Python: Hopefully final changes to documentation.
2020-10-12 16:38:21 +02:00
Max Schaefer
cd33d358aa
JavaScript: Add a test showing a false positive from UnsafeShellCommandConstruction due to infeasible paths.
...
The path from the API entry point to the sink contains a "return" step. A client of the library cannot match that step, resulting in an infeasible path.
2020-10-12 14:50:47 +01:00
Jonas Jensen
24da4cc344
Merge pull request #4421 from jbj/SimpleRangeAnalysis-guard-overflow
...
C++: Demonstrate overflowing guard bounds
2020-10-12 15:38:13 +02:00
yoff
433a36225b
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-12 15:26:53 +02:00
Jonas Jensen
0459248b9f
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-guard-overflow
2020-10-12 14:32:29 +02:00
CodeQL CI
8eb84b2599
Merge pull request #4391 from max-schaefer/js/api-graph-reexport
...
Approved by asgerf
2020-10-12 05:26:53 -07:00
CodeQL CI
6d1634ef8f
Merge pull request #4329 from erik-krogh/DVSA
...
Approved by esbena
2020-10-12 05:23:29 -07:00
Taus Brock-Nannestad
b07c7abacc
Python: Clear up attribute name access QLDoc
2020-10-12 13:49:08 +02:00
Tom Hvitved
35985a9189
Merge pull request #4452 from hvitved/csharp/ssa/overlapping-captured-defs
...
C#: Avoid overlapping SSA definitions for `ref`/`out` captured variables
2020-10-12 13:01:39 +02:00
Geoffrey White
6440db786d
Merge pull request #4420 from jbj/SimpleRangeAnalysis-widen-Expr
...
C++: SimpleRangeAnalysis: widen recursive *, +, -
2020-10-12 11:20:09 +01:00
Geoffrey White
58727cb8ad
C++: Update change note.
2020-10-12 11:01:09 +01:00
Geoffrey White
4363f08b45
C++: Model std::set::emplace and emplace_hint.
2020-10-12 11:01:09 +01:00
Jonas Jensen
30b9d13a45
C++: Correct annotation in test
2020-10-12 11:25:38 +02:00
Geoffrey White
5d87117dc7
C++: Model std::set::lower_bound, upper_bound, equal_range.
2020-10-12 10:10:40 +01:00
Jonas Jensen
9b12ceae8d
C++: SimpleRangeAnalysis: widen recursive *, +, -
...
The number of candidate bounds during the main `SimpleRangeAnalysis`
recursion was in principle always exponential in the size of the
program, but in practice it did not get out of hand when only `+` and
`-` operations were supported. Now that `*` is also supported, the range
analysis started timing out on the SinaMostafanejad/OpenRDM project. The
problematic expressions in that project are of the form
a*x*x*x + b*x*x + c*x + d
where most of the variables involved are recursive definitions and are
therefore likely to have a large number of candidate bounds.
The fix here is to identify those few binary operations that are most
likely to cause an explosion in the number of bounds and apply widening
to them. Previously, widening was only applied at definitions.
2020-10-12 11:09:01 +02:00
Jonas Jensen
bbeea452e1
C++: Add test with widening of binary Expr
2020-10-12 11:08:41 +02:00
Geoffrey White
fc19bba0bd
C++: Model std::set::merge and correct test annotations.
2020-10-12 10:01:57 +01:00
Tom Hvitved
9d1f64d35d
C#: Avoid overlapping SSA definitions for ref/out captured variables
2020-10-12 10:52:40 +02:00
Anders Schack-Mulligen
725194a3b8
Merge pull request #4447 from aschackmull/dataflow/postupdate-flow-consistency
...
Dataflow: Introduce consistency check for flow targeting PostUpdateNodes
2020-10-12 08:56:19 +02:00
Daniel Beck
0c70be145f
Track taint through java.io.File constructor and #toURI; URI#toURL
2020-10-10 20:54:55 +02:00
Geoffrey White
c63f7cb409
C++: Taint through emplace from qualifier to return value.
2020-10-09 17:41:24 +01:00
Geoffrey White
270517d379
C++: Revise model of emplace and emplace_hint. Note that 2 of the 3 taint regressions we shouldn't be getting because we don't yet do taint through keys.
2020-10-09 17:27:18 +01:00
Geoffrey White
49c121d370
C++: More test cases covering other std::pair constructors.
2020-10-09 17:22:29 +01:00
Anders Schack-Mulligen
091e3a2931
Dataflow: Adjust test output.
2020-10-09 16:25:14 +02:00
Rasmus Lerchedahl Petersen
4bd56fdbe4
Python: Implement framework sinks
2020-10-09 16:13:47 +02:00
Rasmus Lerchedahl Petersen
0d8bd01e10
Python: Port query and add test
2020-10-09 16:11:37 +02:00
Tom Hvitved
723699a584
C#: Add SSA test for overlapping captured variable definitions
2020-10-09 16:01:19 +02:00
James Fletcher
c8cacb9fee
Merge pull request #4451 from github/jf205-patch-2
...
Fix typo in CodeQL docs template
2020-10-09 14:47:39 +01:00
Geoffrey White
61a78e28ac
C++: Fix map::merge.
2020-10-09 14:46:23 +01:00
James Fletcher
42ee136306
Update layout.html
2020-10-09 14:33:45 +01:00
Erik Krogh Kristensen
a0cbeb6093
add change note
2020-10-09 14:54:34 +02:00
Erik Krogh Kristensen
2fb19f0b11
refactor into a single regular expression with two capture groups
2020-10-09 14:50:16 +02:00
Erik Krogh Kristensen
f6f8bbd1d8
Update javascript/ql/src/semmle/javascript/frameworks/ServerLess.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-10-09 14:46:31 +02:00
Anders Schack-Mulligen
1c043447e8
Dataflow: Introduce consistency check for flow targeting PostUpdateNodes.
2020-10-09 14:29:52 +02:00
Tom Hvitved
29fb23e6a4
C#: Add flow summaries for System.[Value]Tuple
2020-10-09 13:38:30 +02:00
Jonas Jensen
4c9ffcec27
Merge pull request #4396 from geoffw0/stringsets
...
C++: Use [, ...] syntax more widely.
2020-10-09 13:30:05 +02:00
James Fletcher
2436c56258
Merge pull request #4444 from github/codeql-style-updates
...
[CodeQL docs] First pass at style updates for docs microsite
2020-10-09 11:40:47 +01:00
Alexander Eyers-Taylor
b0d01cfe8d
Merge pull request #4370 from jbj/range-analysis-mega-change-note
...
C++: Change note for several range-analysis PRs
2020-10-09 10:45:11 +01:00
james
6d78c7b46e
fix path to primer.css in template
2020-10-09 10:04:39 +01:00
Geoffrey White
1f1be3bf9a
C++: Block try_emplace arg 0.
2020-10-09 10:04:22 +01:00
james
de42906785
hide header text on small screens and fix body width
2020-10-09 10:03:13 +01:00
james
2fe986eb79
add local primer.css
2020-10-09 10:03:13 +01:00
Geoffrey White
8786fe1ab8
C++: Add test missing test case involving tainted key.
2020-10-09 10:00:22 +01:00
Tom Hvitved
412524103c
Merge pull request #4437 from hvitved/csharp/cfg/compiler-generated-array-lengths
...
C#: Include compiler-generated array lengths in the CFG
2020-10-09 10:54:56 +02:00
CodeQL CI
3894ecf779
Merge pull request #4441 from max-schaefer/js/add-negative-api-graphs-test
...
Approved by erik-krogh
2020-10-09 00:37:38 -07:00
Erik Krogh Kristensen
3b328baaef
changes based on review
2020-10-08 21:54:23 +02:00
Erik Krogh Kristensen
65b90c411c
Update javascript/ql/src/semmle/javascript/security/dataflow/CodeInjectionCustomizations.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-10-08 21:28:50 +02:00
Erik Krogh Kristensen
d3e3c11fa6
add printAst query for printing JS/TS/JSON/YAML/HTML
2020-10-08 21:20:28 +02:00
Max Schaefer
4bf6f6ac7c
JavaScript: Add a negative test for API graphs.
...
The test ensures that flow summarization won't label property `f` of the first parameter of `assertNotNull` as a sink, which would be very imprecise.
2020-10-08 19:53:23 +01:00
Geoffrey White
493b80c44d
C++: Fix incorrect translations to hasQualifiedName.
2020-10-08 17:56:57 +01:00
Tamás Vajk
f42cbcbeae
Merge pull request #4428 from tamasvajk/feature/force-nuget-single-restore
...
C#: Add '-DisableParallelProcessing' flag to nuget restore in Autobuilder
2020-10-08 18:23:12 +02:00
Taus
60eec7b136
Python: Update python/ql/src/experimental/dataflow/internal/Attributes.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-08 18:14:20 +02:00
Taus Brock-Nannestad
d46453caaa
Python: Support named imports as attribute reads
...
Required a small change in `DataFlow::importModule` to get the desired
behaviour (cf. the type trackers defined in `moduleattr.ql`, but this
should be harmless. The node that is added doesn't have any flow
anywhere.
2020-10-08 18:08:55 +02:00
Geoffrey White
c555cfa22a
C++: Replace isParameterDeref(_).
2020-10-08 16:55:45 +01:00
Tamas Vajk
f3f908383b
C#: Adjust autobuilder tests for added nuget.exe flag
2020-10-08 17:07:40 +02:00
Tamas Vajk
522f41377f
C#: Add '-DisableParallelProcessing' flag to nuget restore in Autobuilder
2020-10-08 17:02:14 +02:00
Geoffrey White
e01e4b5bde
C++: Fix QLDoc comments.
2020-10-08 14:29:08 +01:00
Geoffrey White
5c1a510e4a
C++: Model map::lower_bound, upper_bound and equal_range.
2020-10-08 14:22:43 +01:00
Geoffrey White
ef9a7c8cdb
C++: Model map::merge.
2020-10-08 14:22:43 +01:00
Geoffrey White
b7ab89c892
C++: Model map::emplace, emplace_hint and map::try_emplace.
2020-10-08 14:22:43 +01:00
Jonas Jensen
b409cf6cea
Merge pull request #4389 from gsingh93/bitwise-and
...
Improve range analysis for bitwise and
2020-10-08 15:18:15 +02:00
Geoffrey White
6394b1b478
C++: Additional test cases for emplace.
2020-10-08 14:11:24 +01:00
Taus Brock-Nannestad
df447c0af9
Python: Remove flow from getAttributeName
2020-10-08 15:01:24 +02:00
Taus Brock-Nannestad
ceb249680e
Python: Reuse existing node fields
...
Also changes `x = TCfgNode(y)` to `x.asCfgNode() = y` where applicable.
2020-10-08 15:00:14 +02:00
Taus Brock-Nannestad
31596ef569
Python: Clean up and extend built-in call node classes
2020-10-08 14:57:39 +02:00
Taus Brock-Nannestad
e9ecc00b37
Python: Implement and use mayHaveAttributeName
2020-10-08 14:53:54 +02:00
Geoffrey White
61d5372d07
C++: Test spacing.
2020-10-08 13:43:49 +01:00
Geoffrey White
4c4dd0c959
C++: Fix a bug in the tests.
2020-10-08 12:57:30 +01:00
CodeQL CI
f179e7ebf4
Merge pull request #4291 from asgerf/js/lean-dependency-installation-plainjava
...
Approved by erik-krogh
2020-10-08 03:09:38 -07:00
Rasmus Wriedt Larsen
0b0763953e
Python: Update description of CodeInjection
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-10-08 11:15:36 +02:00
yoff
7d086b23ff
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-08 10:53:52 +02:00
Tom Hvitved
ca4e5014ae
C#: Include compiler-generated array lengths in the CFG
2020-10-08 10:35:50 +02:00
Rasmus Lerchedahl Petersen
19796a4c9c
Python: Improve tests and make validTest happy
2020-10-08 10:35:01 +02:00
Tom Hvitved
ce8567c64a
Merge pull request #4293 from hvitved/csharp/cfg/assertions
...
C#: Model assertions in the CFG
2020-10-08 10:32:13 +02:00
Rasmus Lerchedahl Petersen
cc0661bce1
Python: More/better comments
2020-10-08 10:11:00 +02:00
Tom Hvitved
b70f5bc954
Merge pull request #4433 from hvitved/csharp/dataflow/switch-expr
...
C#: Add missing data-flow for switch expressions
2020-10-08 09:13:43 +02:00
Anders Schack-Mulligen
cb00f8bcc4
Merge pull request #4362 from tamasvajk/feature/sign-analysis-cleanup
...
Sign analysis cleanup
2020-10-08 09:10:04 +02:00
Gulshan Singh
662736eb2d
Fix compiler error after removing getLOp/getROp
2020-10-07 12:45:08 -07:00
Tamás Vajk
06f1c898dc
Merge pull request #4349 from tamasvajk/feature/modulus-analysis
...
ModulusAnalysis shared between C# and Java
2020-10-07 21:21:20 +02:00
Rasmus Wriedt Larsen
46ec7fbf6e
Python: Make builtin compile function additional taint step
2020-10-07 21:17:39 +02:00
Rasmus Wriedt Larsen
c69a61bac5
Python: Model exec and eval calls as CodeExecution
2020-10-07 21:14:19 +02:00
Rasmus Wriedt Larsen
73971cff76
Python: Model exec statement (Python 2 only) as CodeExecution
2020-10-07 21:12:35 +02:00
Rasmus Wriedt Larsen
453c391bb0
Python: Add CodeExecution tests for stdlib
2020-10-07 21:12:31 +02:00
Tom Hvitved
a9bb7b526c
Merge pull request #4413 from hvitved/csharp/indexer-explicit-interface
...
C#: Fix extraction of library indexers with explicit interface implementations
2020-10-07 18:49:30 +02:00
Rasmus Wriedt Larsen
0af86cba50
Python: Port CodeInjection query
...
and the dummy test-case we already have
2020-10-07 18:47:23 +02:00
Rasmus Wriedt Larsen
5f6e4d47ca
Python: Add CodeExecution concept
2020-10-07 18:22:45 +02:00
james
9fc6ae82d3
update template for sphinx codeql docs
2020-10-07 16:15:25 +01:00
james
b04962b5b9
small changes to conf.py
2020-10-07 16:14:58 +01:00
james
439f0a030e
tidy up custom css
2020-10-07 16:14:35 +01:00
Tom Hvitved
31816af11e
C#: Add missing data-flow for switch expressions
2020-10-07 17:10:29 +02:00
Tom Hvitved
9c503c1591
C#: Add more data/control-flow tests
2020-10-07 17:10:01 +02:00
Tamas Vajk
4df6a41616
ModulusAnalysis shared between C# and Java
2020-10-07 16:12:24 +02:00
Tamás Vajk
cec6bbea57
Merge pull request #4418 from tamasvajk/feature/reenable-test
...
C#: Reenable disabled test on OSX
2020-10-07 16:03:27 +02:00
Rasmus Lerchedahl Petersen
8196cfd21a
Python: Attempt at clearer naming of parameters
2020-10-07 15:56:35 +02:00
yoff
35b0b6b472
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-07 15:48:44 +02:00
Rasmus Lerchedahl Petersen
27a75c0bd1
Merge branch 'main' of github.com:github/codeql into SharedDataflow_ArgumentPassing
2020-10-07 15:43:31 +02:00
james
239ea80975
add new css styles
2020-10-07 14:37:35 +01:00
Tom Hvitved
af36718dc6
C#: QL doc adjustments
2020-10-07 15:15:18 +02:00
yoff
7e6f0b0bc3
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-07 15:11:15 +02:00
Tom Hvitved
68014fd3bf
C#: Fix extraction of library indexers with explicit interface implementations
2020-10-07 15:02:55 +02:00
Rasmus Wriedt Larsen
bec33b745e
Python: Use range instead of self for ::Range pattern
...
Following the suggestions from https://github.com/github/codeql/pull/4357
2020-10-07 14:54:51 +02:00
Tom Hvitved
a4ce9417bc
C#: Add test for missing accessors
2020-10-07 14:53:51 +02:00
Tom Hvitved
88575799e9
Merge pull request #4417 from hvitved/csharp/named-tuple-tests
...
C#: Add test for named tuple types
2020-10-07 13:26:49 +02:00
Rasmus Wriedt Larsen
c09695af7d
Python: Properly handle invoke.task decorator
2020-10-07 12:29:19 +02:00
Rasmus Wriedt Larsen
67c5c590d2
Python: Expose getParameter on ParameterNode
2020-10-07 12:28:35 +02:00
Rasmus Wriedt Larsen
6d7f4a048b
Python: Attempt to model invoke.task decorator
2020-10-07 12:26:49 +02:00
Rasmus Wriedt Larsen
c9219b3744
Clean module imports
2020-10-07 12:21:30 +02:00
Rasmus Wriedt Larsen
ebff1794fc
Python: Model invoke.context.Context
2020-10-07 12:16:53 +02:00
Rasmus Wriedt Larsen
4ef5202382
Python: Add simple model for invoke.run and invoke.sudo
...
and I sorted the list in Frameworks.qll, that kinda makes sense :)
2020-10-07 12:13:59 +02:00
Rasmus Wriedt Larsen
300a8cdf7d
Python: Add tests for the 'invoke' package
2020-10-07 11:55:26 +02:00
Tamas Vajk
d2d8d009eb
Sync Bound between C# and Java
2020-10-07 11:43:30 +02:00
Tamas Vajk
40a7f5aa1f
Java: Minor fix to modulus analysis to handle constant expressions and not only compile time constants
2020-10-07 11:42:42 +02:00
Tamas Vajk
5688210249
Java: add test for modulus analysis
2020-10-07 11:41:55 +02:00
Rasmus Wriedt Larsen
7721db206e
Python: Don't double report paths for platform.popen and popen2.*
...
I was a bit surprised that we hadn't double reported for popen2, but it turns
out that the implementation (at least on unix) looks like:
```
def popen2(cmd, bufsize=-1, mode='t'):
... = Popen3(cmd, False, bufsize)
...
```
but since the modeling I did only considers calls to `Popen3` only if it has
been imported from the `popen2` module, we don't consider that call as a sink.
2020-10-07 10:57:31 +02:00
Tamas Vajk
94dc11c45a
Revert getNonIntegerValue unification
2020-10-07 10:56:01 +02:00
Rasmus Wriedt Larsen
36812af2c2
Python: Add test for Python2 specific command injection
2020-10-07 10:54:03 +02:00
Rasmus Wriedt Larsen
737b2b896f
Python: Fix QLDoc for popen2 module
2020-10-07 10:49:22 +02:00
Rasmus Wriedt Larsen
d8a9eacd02
Python: Remove TODO comment for popen2 module
2020-10-07 10:47:28 +02:00
Gulshan Singh
7233ffa50f
Address review comments
2020-10-07 00:21:06 -07:00
Erik Krogh Kristensen
1ed026fcce
add a RemoteFlowSource for serverless handlers
2020-10-06 22:36:21 +02:00
Erik Krogh Kristensen
050ed97d9c
add node-serialize as a js/code-injection sink
2020-10-06 22:35:38 +02:00
Tom Hvitved
6ddda1fa1d
Merge pull request #4330 from tamasvajk/feature/upgrade-to-dotnet31
...
C#: Upgrade to .net core app 3.1
2020-10-06 20:59:00 +02:00
Rasmus Wriedt Larsen
6c4fd7c1ff
Python: Model Python 2 only platform.popen command execution
2020-10-06 20:25:03 +02:00
Rasmus Wriedt Larsen
12e4e07cae
Python: Model Python 2 only module popen2
2020-10-06 20:25:02 +02:00
Rasmus Wriedt Larsen
8c2f55fbd0
Python: Model Python 2 only os.popen2, popen3, popen4 functions
2020-10-06 20:25:01 +02:00
Rasmus Wriedt Larsen
6ec7ab2fd9
Python: Add test of Python 2 specific SystemCommandExecution
2020-10-06 20:25:00 +02:00
Taus Brock-Nannestad
b905a3d5e3
Python: Attribute access API
2020-10-06 16:36:29 +02:00
Max Schaefer
98ab38a630
JavaScript: Add yet another API-graph test with re-exports.
2020-10-06 15:32:21 +01:00
Tamas Vajk
4f56a97244
C#: Adjust expected files for .net 3.1 upgrade
2020-10-06 16:01:14 +02:00
Tamas Vajk
56604e005a
C#: Upgrade to .net core app 3.1
2020-10-06 16:01:14 +02:00
Jonas Jensen
984194d308
Merge pull request #4406 from geoffw0/set
...
C++: Models for std::set and std::unordered_set
2020-10-06 15:43:12 +02:00
Jonas Jensen
1d9acbfca9
C++: Demonstrate overflowing guard bounds
2020-10-06 15:31:34 +02:00
Max Schaefer
1d8051eee0
JavaScript: Further improve handling of re-exports in API graphs.
2020-10-06 14:22:55 +01:00
Max Schaefer
d054206004
JavaScript: Improve handling of re-exports in API graphs.
2020-10-06 14:22:51 +01:00
Max Schaefer
96bf82e1ca
JavaScript: Make new source-node classes in API graphs more general and more useful.
2020-10-06 14:21:36 +01:00
Max Schaefer
95b6b16b57
JavaScript: Add another API-graph test with re-exports.
2020-10-06 14:20:41 +01:00
CodeQL CI
4e116ba0db
Merge pull request #4419 from erik-krogh/jsxFactory
...
Approved by asgerf
2020-10-06 06:13:21 -07:00
CodeQL CI
0753c8a31b
Merge pull request #4247 from erik-krogh/CVE760-reexport
...
Approved by asgerf
2020-10-06 06:10:21 -07:00
CodeQL CI
ef703e72d8
Merge pull request #4401 from asgerf/js/angular-prerequisites
...
Approved by erik-krogh
2020-10-06 06:09:48 -07:00
Asger Feldthaus
396f353397
JS: Reapply fixed to javadoc
2020-10-06 14:06:10 +01:00
CodeQL CI
5bc7e19c44
Merge pull request #4414 from yoff/SharedDataflow_Conditionals
...
Approved by RasmusWL
2020-10-06 05:46:24 -07:00
Anders Schack-Mulligen
021435292b
Merge pull request #4341 from joefarebrother/location-tostring
...
Java: Include column numbers in Location.toString
2020-10-06 14:42:35 +02:00
Rasmus Lerchedahl Petersen
f9c5b864bb
Python: Fix test of parenthesized form
2020-10-06 13:12:12 +02:00
CodeQL CI
7e6fa7b4be
Merge pull request #4392 from erik-krogh/flask
...
Approved by asgerf
2020-10-06 03:41:36 -07:00
Arthur Baars
3c41548aa6
Merge pull request #4336 from aibaars/android-database
...
Java: add Android database taint and SQL injection sinks
2020-10-06 12:31:17 +02:00
Erik Krogh Kristensen
f7f82ffe4e
Merge branch 'main' into CVE760-reexport
2020-10-06 12:28:44 +02:00
CodeQL CI
bc1d3de8fe
Merge pull request #4376 from erik-krogh/simpParam
...
Approved by asgerf
2020-10-06 03:24:43 -07:00
Erik Krogh Kristensen
99213b94f5
detect uses of jsxFactory and jsxFragmentFactory in js/unused-local-variable
2020-10-06 12:23:15 +02:00
Joe
8e82687ab6
Java: Include column numbers in Location.toString
2020-10-06 11:16:06 +01:00
CodeQL CI
75d55c87b3
Merge pull request #4412 from RasmusWL/python-typetracking-across-modules
...
Approved by yoff
2020-10-06 03:15:12 -07:00
Asger Feldthaus
5374b66029
JS: Make CachedOperation private
2020-10-06 11:13:04 +01:00
Asger F
433e3e7e4e
JS: Expand doc string in installFromTarballurl
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-10-06 11:13:04 +01:00
Asger F
4e2b990d14
Add doc string to semVerToken
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-10-06 11:13:04 +01:00
Asger Feldthaus
0ddd825ea6
JS: Address some more review comments
2020-10-06 11:13:04 +01:00
Asger Feldthaus
b1bd612232
JS: Undo unused export
2020-10-06 11:13:04 +01:00
Asger Feldthaus
26b7d57a94
JS: Parse preferred version directly
2020-10-06 11:13:04 +01:00
Asger Feldthaus
85224aad34
JS: Address some review comments
2020-10-06 11:13:04 +01:00
Asger Feldthaus
57a588ceb6
JS: Share extraction results via symlinks
2020-10-06 11:13:03 +01:00
Asger Feldthaus
c84e43d95b
JS: Replace yarn with manual dependency resolution
2020-10-06 11:13:03 +01:00
Asger Feldthaus
f5c3aa3d39
JS: Handle types/typings fields in package.json
2020-10-06 11:13:03 +01:00
Asger Feldthaus
0220ab6784
JS: Move some TypeScript classes into .ts.extractor
2020-10-06 11:13:03 +01:00
Tamás Vajk
8d09885ae6
Merge pull request #4378 from tamasvajk/feature/flow-summary-nullable
...
Flow summary nullable
2020-10-06 11:45:41 +02:00
Tom Hvitved
e15758ba7f
C#: Add test for named tuple types
2020-10-06 11:42:11 +02:00
Tamas Vajk
36ddbcdd71
C#: Reenable disabled test on OSX
2020-10-06 11:41:48 +02:00
Rasmus Wriedt Larsen
d26a89b95e
Python: Fix QLDoc for RouteSetup
2020-10-06 11:35:18 +02:00
Rasmus Wriedt Larsen
b82727d0b8
Python: Consider routed parameter if URL pattern unknown
2020-10-06 11:03:25 +02:00
Asger Feldthaus
a962a8a3bd
JS: Autoformat
2020-10-06 10:01:36 +01:00
Asger Feldthaus
c31cdaacb2
JS: Add test for getFieldTypeAnnotation
2020-10-06 10:01:04 +01:00
Rasmus Wriedt Larsen
16bad003a0
Python: Add test for routed params with unknown url pattern
2020-10-06 10:58:46 +02:00
Rasmus Lerchedahl Petersen
0f077f5d7d
Python: Add flow inside IfExprNodes
2020-10-06 10:54:23 +02:00
Rasmus Lerchedahl Petersen
8f13d586b7
Python: More tests of conditonals
...
Also use better formatter
(better because comments are close to what they comment)
2020-10-06 10:49:15 +02:00
Arthur Baars
89710928c8
Merge branch 'main' into android-database
2020-10-06 10:48:22 +02:00
CodeQL CI
eece3ad352
Merge pull request #4411 from github/asgerf/exclude-js-tests
...
Approved by esbena
2020-10-06 01:48:21 -07:00
Tom Hvitved
6bd355784a
Merge pull request #4353 from hvitved/csharp/dataflow/task-precise
...
C#: Precise data-flow for `System.Threading.Tasks`
2020-10-06 10:45:19 +02:00
Max Schaefer
0109805ab0
JavaScript: Use new API in NoSQL models.
2020-10-06 09:45:03 +01:00
Max Schaefer
8277d5c08f
JavaScript: Introduce convenience predicate for working with typed API-graph nodes.
2020-10-06 09:25:35 +01:00
Max Schaefer
9206549a38
JavaScript: Make integration of TypeScript canonical names with modules in API graphs more consistent.
...
Previously, canonical names were direct successors of module definitions/uses, now they are successors of exports/imports.
2020-10-06 09:25:35 +01:00
Asger F
dd5fb6ce12
Exclude JS tests from code scanning
2020-10-06 08:46:43 +01:00
Tamas Vajk
576085af50
Add extra information to nullable conversion test file
2020-10-06 09:03:49 +02:00
Tamas Vajk
faf663a334
C#: Flow summary for Nullable<T>
2020-10-06 09:03:49 +02:00
Tamás Vajk
77abff7c90
Merge pull request #4405 from tamasvajk/feature/lazy-flow
...
C#: Improve data flow summary for System.Lazy<>
2020-10-06 09:01:48 +02:00
Rasmus Wriedt Larsen
fbe115c046
Python: Show TypeTracking doesn't work for module members
2020-10-06 03:12:39 +02:00
Rasmus Wriedt Larsen
f03a8a838b
Python: Make any routed parameter a RemoteFlowSource
...
I'm not 100% sure whether this approach makes everything too magic, but I like
the fact that you can't _forget_ to make routed params remove-flow sources.
2020-10-06 03:03:14 +02:00
Rasmus Wriedt Larsen
b78c665f34
Python: Model RouteSetup for flask
2020-10-06 03:03:13 +02:00
Rasmus Wriedt Larsen
d27e6955b4
Python: Add test setup for HTTP::Server::RouteSetup
2020-10-06 03:03:06 +02:00
Rasmus Wriedt Larsen
ebc3d32ff1
Python: Add concept for HTTP server modeling
...
If we want to separate out into a file, we can always do this with
```
import experimental.semmle.python.HTTP as HTTP
```
2020-10-06 03:02:32 +02:00
Rasmus Wriedt Larsen
9f1aa8ca0c
Python: Expose getParameter on ParameterNode
2020-10-06 03:02:31 +02:00
Rasmus Wriedt Larsen
d7526c40ba
Python: Copy old flask tests to new dataflow setup
2020-10-06 03:02:30 +02:00
Erik Krogh Kristensen
d6dc4bb655
allow flask url_for urls in TargetBlank.ql
2020-10-05 21:40:24 +02:00
Erik Krogh Kristensen
7d8bb339b6
add support for destructuring object exports in getAnExportedValue
2020-10-05 21:38:31 +02:00
CodeQL CI
339c0721c5
Merge pull request #4344 from esbena/js/fixup-cwe-20-to-cwe-020
...
Approved by erik-krogh
2020-10-05 12:30:53 -07:00
CodeQL CI
e95b665556
Merge pull request #4363 from erik-krogh/nosql-api
...
Approved by max-schaefer
2020-10-05 12:01:34 -07:00
Jonathan Leitschuh
8272d591b6
Apply suggestions from code review
...
https://github.com/github/codeql/pull/4312
Co-authored-by: Felicity Chapman <felicitymay@github.com >
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-10-05 14:12:03 -04:00
Jonas Jensen
6b2ae5d1ad
Merge pull request #4393 from MathiasVP/no-more-flow-into-read-side-effect
...
C++: No more flow into ReadSideEffect instructions
2020-10-05 19:46:32 +02:00
Robert Marsh
b7dcd5c557
Merge pull request #4395 from geoffw0/modelbeginend
...
C++: Merge StdSequenceContainerBeginEnd into the general BeginOrEndFunction
2020-10-05 12:22:27 -04:00
Tom Hvitved
c39bca5240
C#: Model data-flow for System.Threading.Tasks.Task<T>.GetAwaiter()
2020-10-05 17:15:54 +02:00
Erik Krogh Kristensen
c1b5357e74
remove stray todo
2020-10-05 16:53:05 +02:00
Geoffrey White
4db964fca9
Merge branch 'main' into set
2020-10-05 15:16:42 +01:00
Geoffrey White
d93b37d5c5
C++: Autoformat some more files.
2020-10-05 15:11:23 +01:00
Jonas Jensen
297f1c75e4
Merge pull request #4345 from geoffw0/map
...
C++: Models for std::pair, std::map and std::unordered_map
2020-10-05 15:28:10 +02:00
Mathias Vorreiter Pedersen
a6d7b1f9d9
Update cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-10-05 15:21:15 +02:00
Mathias Vorreiter Pedersen
e95aefe0b2
C++: Now that PrimaryArgumentNode is an OperandNode we want a specialized toString on it
2020-10-05 15:13:33 +02:00
Erik Krogh Kristensen
2753a4f379
Apply suggestions from code review
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-10-05 15:11:04 +02:00
Tom Hvitved
4ec14b1b02
Merge pull request #4399 from hvitved/csharp/error-type-population
...
C#: Handle population of error types
2020-10-05 15:04:50 +02:00
CodeQL CI
48fa8aacd5
Merge pull request #4403 from asgerf/js/remove-tslint-dependency
...
Approved by erik-krogh
2020-10-05 05:58:48 -07:00
Tamas Vajk
3b70064606
C#: Improve data flow summary for System.Lazy<>
2020-10-05 14:45:14 +02:00
Mathias Vorreiter Pedersen
d162c3d8c6
C++: Accept more test changes
2020-10-05 14:29:57 +02:00
Geoffrey White
855d2b50d7
C++: Correct test comments.
2020-10-05 13:00:51 +01:00
Anders Schack-Mulligen
30f29e0ba7
Merge pull request #4320 from aibaars/multipart-request
...
Java: add Spring::MultipartRequest as taint source
2020-10-05 13:45:06 +02:00
Geoffrey White
c757813d65
Merge branch 'main' into map
2020-10-05 12:32:49 +01:00
Anders Schack-Mulligen
e660ac54da
Merge pull request #4358 from joefarebrother/format-taint
...
Java: Add taint steps through string formatting methods
2020-10-05 13:25:54 +02:00
Geoffrey White
591c17d7cf
C++: Rearrange comments.
2020-10-05 12:22:08 +01:00
Mathias Vorreiter Pedersen
6c87b08c69
C++: Respond to review comments:
...
- ArgumentNode is now abstract
- PrimaryArgumentNode is now an OperandNode.
- ArgumentIndirectionNode is now merged into SideEffectArgumentNode.
2020-10-05 12:54:11 +02:00
Asger Feldthaus
fee99105da
JS: Remove tslint dependency
2020-10-05 11:53:58 +01:00
Rasmus Lerchedahl Petersen
478cfd7310
Python: Small clean-up
2020-10-05 12:43:30 +02:00
CodeQL CI
43b2c90538
Merge pull request #4400 from max-schaefer/js/api-graph-classrefs
...
Approved by asgerf
2020-10-05 03:12:23 -07:00
Geoffrey White
488a55b9dd
C++: Autoformat.
2020-10-05 10:39:32 +01:00
Rasmus Lerchedahl Petersen
f449da2fdb
Python: Write explanatory examples.
2020-10-05 11:39:18 +02:00
Mathias Vorreiter Pedersen
4c14f5dbb7
Merge branch 'main' into no-more-flow-into-read-side-effect
2020-10-05 11:03:42 +02:00
Asger Feldthaus
8689a9b3b9
JS: Fix a bad join order in barrierGuardBlocksNode
2020-10-05 09:55:22 +01:00
Asger Feldthaus
790d2ba0fc
JS: Fix FPs from ParameterFieldAsPropWrite.getPropertyNameExpr
2020-10-05 09:55:22 +01:00
Asger Feldthaus
cad259fb83
JS: Use more types in DOM model
2020-10-05 09:55:22 +01:00
Asger Feldthaus
3dabff6b17
JS: Recognize field types in untyped code
2020-10-05 09:55:22 +01:00
Tom Hvitved
4d62033a15
C#: Handle population of error types
2020-10-05 10:14:13 +02:00
Mathias Vorreiter Pedersen
d38121f54a
Merge pull request #4394 from geoffw0/oddsends2
...
C++: Clean up and add to taint tests
2020-10-05 09:16:50 +02:00
Rasmus Lerchedahl Petersen
8e27904f65
Python: Add explanatory comment.
2020-10-04 15:34:25 +02:00
Rasmus Lerchedahl Petersen
3463889010
Python: Add comments
2020-10-04 09:40:06 +02:00
Rasmus Lerchedahl Petersen
385e213fcf
Python: Fix comments
2020-10-04 09:33:30 +02:00
Rasmus Lerchedahl Petersen
ce18bff274
Python: Support method calls
2020-10-03 23:34:39 +02:00
Erik Krogh Kristensen
856ad07694
join-order improvement in NoSQL.qll
2020-10-03 22:07:34 +02:00
Tom Hvitved
c0b251ad9e
C#: Precise data-flow for System.Threading.Tasks
2020-10-03 11:13:45 +02:00
Tom Hvitved
26544f322a
C#: Update data-flow tests for System.Threading.Tasks
2020-10-03 11:13:45 +02:00
Arthur Baars
78c58c2415
Merge pull request #4384 from tausbn/python-fix-package-locations
...
Python: Fix `hasLocationInfo` for packages
2020-10-02 20:48:43 +02:00
Alexander Eyers-Taylor
754d82c325
Merge pull request #4382 from github/alexet-patch-1
...
Fix the name of the vscode extension recommendation
2020-10-02 18:33:36 +01:00
Alexander Eyers-Taylor
30ed6a0dac
Merge pull request #4385 from aibaars/drop-queries
...
Drop 'tech-inventory' and 'code duplication' queries from the standard query suites
2020-10-02 18:31:25 +01:00
Geoffrey White
3536d84bdf
C++: Use [, ...] syntax more widely.
2020-10-02 18:04:03 +01:00
Geoffrey White
1efe461a98
C++: Move the rest of of StdSequenceContainerBeginEnd into BeginOrEndFunction.
2020-10-02 18:03:46 +01:00
Geoffrey White
8d5bd2289b
C++: Remove parts of StdSequenceContainerBeginEnd in favour of BeginOrEndFunction.
2020-10-02 18:03:46 +01:00
Geoffrey White
8d5febf9c4
C++: Add a couple more test cases that have been discussed.
2020-10-02 18:03:07 +01:00
Geoffrey White
cc170bd513
C++: Test layout.
2020-10-02 18:03:07 +01:00
Tom Hvitved
1a93090778
C#: Improve guards SSA logic in the context of control-flow splitting
2020-10-02 18:00:34 +02:00
Tom Hvitved
f1d6f7cd0c
C#: Model assertions in the CFG
2020-10-02 17:56:41 +02:00
Geoffrey White
2dc8fba7fe
C++: Remove StdMapBeginEnd as we now have a general model BeginOrEndFunction in main.
2020-10-02 16:39:23 +01:00
Geoffrey White
0d6bd6facb
Merge branch 'main' into map
2020-10-02 16:24:03 +01:00
Geoffrey White
d4a1acedde
C++: Remove StdSetBeginEnd as we now have a general model BeginOrEndFunction in main.
2020-10-02 16:23:48 +01:00
Arthur Baars
daa1bcc06e
Also mark 'tech inventory' queries as deprecated
2020-10-02 17:23:11 +02:00
Arthur Baars
fc45b6cd3c
Drop 'tech-inventory' and 'code duplication' queries from the standard query suites
2020-10-02 17:22:04 +02:00
Geoffrey White
88a93964a7
Merge branch 'main' into set
2020-10-02 16:17:48 +01:00
Geoffrey White
28ab092e9f
C++: Add 'tainted' markers to standalone_iterators.cpp test.
2020-10-02 15:54:26 +01:00
Taus
fce76e2799
Merge pull request #4354 from RasmusWL/python-command-execution-modeling
...
Python: Better command execution modeling
2020-10-02 16:14:34 +02:00
Taus
2e4a61428d
Merge pull request #4346 from RasmusWL/python-add-implicit-init-test
...
Python: add test for implicit __init__.py files
2020-10-02 16:13:25 +02:00
Mathias Vorreiter Pedersen
072e1967c1
C++: Accept more tests
2020-10-02 15:51:29 +02:00
Tom Hvitved
17f0ac4b20
C#: Add more CFG assertion tests
2020-10-02 15:35:33 +02:00
Tom Hvitved
55d25d90fa
Merge pull request #4386 from hvitved/csharp/remove-deprecated-queries
...
C#: Remove deprecated external queries
2020-10-02 15:12:33 +02:00
Rasmus Wriedt Larsen
e5b9ac8d9c
Python: Use getCommand as tag in ConceptsTest
2020-10-02 14:12:41 +02:00
Rasmus Wriedt Larsen
eb67986916
Python: Exlucde only command injection sinks in os and subprocess
2020-10-02 14:11:07 +02:00
Mathias Vorreiter Pedersen
48902c07a4
C++: Accept test changes
2020-10-02 14:10:58 +02:00
Mathias Vorreiter Pedersen
8f4982d3f5
C++: Remove flow into ReadSideEffect instructions in simpleInstructionLocalFlowStep
2020-10-02 14:10:28 +02:00
Rasmus Wriedt Larsen
68eacef23c
Python: Refactor OsExecCall and friends for better readability
2020-10-02 13:38:54 +02:00
Rasmus Wriedt Larsen
de07d9e5d9
Python: Highlight that os.popen is not only problem for extra alerts
2020-10-02 13:34:33 +02:00
Taus Brock-Nannestad
b5d05f99c9
Python: Fix test output
2020-10-02 12:04:43 +02:00
Geoffrey White
4b0e9a4fb1
C++: Remove the model of make_pair.
2020-10-02 10:55:13 +01:00
Geoffrey White
0b6096ebfe
C++: Define make_pair and declare std::forward in the test.
2020-10-02 10:51:34 +01:00
Erik Krogh Kristensen
6acb199074
improve precision using getAnImmediateUse to check parameter names
2020-10-02 11:09:50 +02:00
Erik Krogh Kristensen
abdbe92720
refactor the NoSQL model to use API graphs
2020-10-02 10:42:49 +02:00
Max Schaefer
98e93a7b9d
JavaScript: Improve API-graph support for function-style classes.
2020-10-02 09:25:51 +01:00
Rasmus Lerchedahl Petersen
bd32faf934
Python: annotate new test
2020-10-02 10:06:54 +02:00
Rasmus Lerchedahl Petersen
2a4d21a989
Python: Test method call
2020-10-02 10:02:29 +02:00
Chris Smowton
aa707e9370
Merge pull request #4381 from smowton/smowton/admin/fix-owasp-broken-links
...
Fix OWASP broken links
2020-10-02 08:51:36 +01:00
Tamas Vajk
1cf3196b61
Fix additional PR review findings
2020-10-02 09:12:13 +02:00
Tamas Vajk
01de550ef8
Make predicates private
2020-10-02 09:12:13 +02:00
Tamas Vajk
f52cf264ec
Refactor specificSubExprSign
2020-10-02 09:12:13 +02:00
Tamas Vajk
f03146d12f
Refactor fieldSign
2020-10-02 09:12:13 +02:00
Tamas Vajk
21ff1a0445
Address some of the PR review findings
2020-10-02 09:12:13 +02:00
Tamas Vajk
638d0399a8
Java, C#: Refactor explicitSsaDefSign in sign analysis
2020-10-02 09:09:23 +02:00
Tamas Vajk
7545fe74e3
Java, C#: Refactor implicitSsaDefSign in sign analysis
2020-10-02 09:09:23 +02:00
Tamas Vajk
37fc1d6f0f
Java, C#: cleanup sign analysis
...
Add missing QL doc, improve readability
2020-10-02 09:09:23 +02:00
Gulshan Singh
f026d3a1e6
C++: Improve bitwise and range analysis
2020-10-01 23:30:51 -07:00
Gulshan Singh
78625b764d
C++: Add test for bitwise and ranges
2020-10-01 23:30:48 -07:00
Jonathan Leitschuh
ab3772eaeb
Update JHipster CodeQL query from code review
2020-10-01 15:38:56 -04:00
Tom Hvitved
bc68578c8b
C#: Remove deprecated external queries
2020-10-01 21:11:47 +02:00
Jonas Jensen
48c6f34f91
Merge pull request #4372 from matt-gretton-dann/cpp20-constinit
...
Add support for Variable.is_constinit()
2020-10-01 20:19:56 +02:00
Aditya Sharad
f7f05476a2
Merge pull request #4375 from adityasharad/javascript/client-side-url-redirect-regexp
...
JavaScript: Track taint through RegExp.prototype.exec for URL redirection
2020-10-01 09:55:19 -07:00
Geoffrey White
ad9f306352
C++: Model taint flow only when the second component of a pair would be tainted.
2020-10-01 17:38:09 +01:00
Ian Lynagh
e555b6b2a8
Merge pull request #4380 from github/igfoo/unnamed
...
C++: Accept test changes in unnamed entity naming
2020-10-01 17:16:20 +01:00
Taus Brock-Nannestad
75f4051cb5
Python: Fix hasLocationInfo for packages
2020-10-01 17:21:53 +02:00
Joe
ca4781eb78
Java: Remove use of StringFormatMethod in TaintTrackingUtils
2020-10-01 15:58:32 +01:00
Rasmus Lerchedahl Petersen
0841e92a6b
Python: Test for method call
2020-10-01 16:26:12 +02:00
Alexander Eyers-Taylor
5ce0974eb2
Fix the name of the vscode extension recommendation
...
The name is case sensitive so it didn't work before.
2020-10-01 14:40:45 +01:00
Rasmus Lerchedahl Petersen
5326125b70
Python: Handle positional construtor arguments
2020-10-01 15:28:26 +02:00
Anders Schack-Mulligen
c027f3bd2b
Merge pull request #4324 from tamasvajk/feature/unsigned-sign-analysis
...
Handle unsigned types in sign analysis (C# and Java)
2020-10-01 15:11:49 +02:00
CodeQL CI
36450a8998
Merge pull request #4338 from erik-krogh/nodejs-server-request-data
...
Approved by asgerf
2020-10-01 06:00:17 -07:00
Erik Krogh Kristensen
d54a057457
Merge pull request #4377 from erik-krogh/babelCrash
...
JS: prevent crash when TemplateLiteral is used in import
2020-10-01 14:58:45 +02:00
Chris Smowton
578ea1ae43
Fix OWASP broken links
2020-10-01 13:09:52 +01:00
Erik Krogh Kristensen
18f7f2b559
autoformat
2020-10-01 13:49:31 +02:00
Erik Krogh Kristensen
4dec2171da
add http request server data as a RemoteFlowSource
2020-10-01 13:21:56 +02:00
Rasmus Wriedt Larsen
3247b300ae
Python: Fix problem with missing use-use flow
2020-10-01 12:55:11 +02:00
Rasmus Wriedt Larsen
9b3509f0ba
Python: Highlight problem with missing use-use flow
2020-10-01 12:51:44 +02:00
Rasmus Lerchedahl Petersen
2187389da1
Python: Show constructor keyword arg problem
...
Also make tests runnable
2020-10-01 12:48:38 +02:00
CodeQL CI
0158e2ffef
Merge pull request #4374 from max-schaefer/js/api-graph
...
Approved by erik-krogh
2020-10-01 03:33:45 -07:00
Rasmus Lerchedahl Petersen
db23dad6ec
Python: Allow callables to connect to calls freely
2020-10-01 12:33:42 +02:00
Max Schaefer
7f075202c6
Merge pull request #4367 from erik-krogh/sql-api
...
JS: Fixing an API-graph gotcha in `SQL.qll`
2020-10-01 11:33:01 +01:00
Geoffrey White
084e6f6d9b
C++: Add change note.
2020-10-01 11:04:40 +01:00
Geoffrey White
fb9a3b323d
C++: Modernize MemcpyFunction.
2020-10-01 10:53:18 +01:00
Geoffrey White
ce9abe071d
C++: Remove taint flow from size parameter.
2020-10-01 10:51:01 +01:00
Geoffrey White
ed5c3b321f
C++: Repair callDereferences for failing test.
2020-10-01 10:38:12 +01:00
Erik Krogh Kristensen
fbd62abd64
prevent crash when TemplateLiteral is used in import
2020-10-01 11:26:49 +02:00
Erik Krogh Kristensen
75b9237b81
use Parameter instead of SimpleParameter in the AngularJS model
2020-10-01 10:44:10 +02:00
Erik Krogh Kristensen
c675d72629
use Parameter instead of SimpleParameter in remaining route-handler models
2020-10-01 10:44:10 +02:00
Erik Krogh Kristensen
f65ba11485
use Parameter instead of SimpleParameter in AMD.qll
2020-10-01 10:44:05 +02:00
Geoffrey White
ff78f50a03
Merge branch 'main' into callderef
2020-10-01 09:40:36 +01:00
Rasmus Lerchedahl Petersen
b092df48a5
Python: Location and toString for KwUnpacked
2020-10-01 10:15:19 +02:00
Aditya Sharad
e712d16e7e
JavaScript: Track taint through RegExp.prototype.exec for URL redirection
...
Regexp literals are currently handled, but not `RegExp` objects.
2020-09-30 15:13:02 -07:00
Rasmus Lerchedahl Petersen
29a162bc9c
Python: Proper flow **arg -> **param
2020-09-30 23:55:02 +02:00
Geoffrey White
cafd320953
C++: Add set/map constructor models.
2020-09-30 17:41:06 +01:00
Geoffrey White
6520f9d0fb
C++: Add basic std::set models.
2020-09-30 17:23:56 +01:00
Geoffrey White
5bc7d3a9b2
C++: Add tests for std::set and std::unordered_set.
2020-09-30 17:23:56 +01:00
Rasmus Wriedt Larsen
428c2a3fda
Merge branch 'main' into python-command-execution-modeling
2020-09-30 17:38:59 +02:00
Matthew Gretton-Dann
e0ca4dafb8
Add support for Variable.is_constinit()
2020-09-30 16:31:45 +01:00
Rasmus Wriedt Larsen
c4a2e1d6d1
Python: Rewrite attribute lookup helpers for better performance
...
Not that they actually had a huge problem right now, just that using the old
pattern HAS lead to bad performance in the past. See
https://github.com/github/codeql/pull/4361
2020-09-30 17:31:20 +02:00
Geoffrey White
952cc89c2a
C++: Improve make_pair in stl.h (using remove_reference).
2020-09-30 16:17:06 +01:00
Geoffrey White
7ecd229ce7
C++: Improve make_pair in stl.h (jbj solution).
2020-09-30 16:16:53 +01:00
Geoffrey White
282d3e8f7e
Merge pull request #4322 from jbj/range-analysis-custom-defs
...
C++: Support custom defs in SimpleRangeAnalysis
2020-09-30 15:43:32 +01:00
Taus
32bf7d6bdf
Merge pull request #4256 from fatenhealy/Noblowfish
...
CWE-327 BrokenCryptoAlgorithm recommendation to AES instead of Blowfish
2020-09-30 16:15:46 +02:00
Rasmus Lerchedahl Petersen
b0ed7af897
Python: Approximate **arg -> **param
2020-09-30 15:54:12 +02:00
Rasmus Lerchedahl Petersen
4ae422ce16
Python: Add test for extraneous overflow arguments
2020-09-30 15:28:29 +02:00
Erik Krogh Kristensen
bfb653a34a
rename getAReference to getAnImmediateUse
2020-09-30 15:15:49 +02:00
Erik Krogh Kristensen
eb973b39fe
Update javascript/ql/src/semmle/javascript/frameworks/SQL.qll
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-09-30 15:12:17 +02:00
Arthur Baars
cf6036f9b4
Java: fix some android database sinks
2020-09-30 14:42:19 +02:00
Faten Healy
03d8fc7296
changed to AES
2020-09-30 22:18:36 +10:00
Jonas Jensen
3af3d87ecd
C++: Change note for several range-analysis PRs
2020-09-30 13:52:23 +02:00
Erik Krogh Kristensen
d316cb512e
deprecate exports and replace uses with the new getAnExportedValue
2020-09-30 13:46:28 +02:00
Rasmus Wriedt Larsen
4adc26eb62
Python: Fix command injection example code
...
`subprocess.Popen(["ls", "-la"], shell=True)` correspond to running `sh -c "ls" -la`
So it doesn't follow the pattern of the rest of the test file.
2020-09-30 13:38:37 +02:00
Taus
d694777894
Merge pull request #4369 from RasmusWL/python-ospathjoin-taintstep
...
Python: Add taint-step for os.path.join
2020-09-30 13:35:16 +02:00
Erik Krogh Kristensen
b24e959033
add getAnInvocation to the ApiGraphs API
2020-09-30 13:33:36 +02:00
Rasmus Wriedt Larsen
9c1253c8af
Python: Remove flow out of CommandInjection sinks
2020-09-30 13:29:40 +02:00
Erik Krogh Kristensen
b720bfdd11
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2020-09-30 13:26:51 +02:00
Rasmus Lerchedahl Petersen
00966bba0d
Python: update test expectations
2020-09-30 13:11:23 +02:00
Rasmus Wriedt Larsen
a2d12f0440
Python: Update CommandInjection.expected
2020-09-30 13:00:10 +02:00
Jonas Jensen
b1c826e5c0
Merge pull request #4135 from rdmarsh2/rdmarsh2/cpp/output-iterators-1
...
C++: Output iterators in AST taint tracking
2020-09-30 12:54:55 +02:00
Arthur Baars
061c2a754f
Java: tests for android database flow steps
2020-09-30 12:42:19 +02:00
Arthur Baars
a13e845127
Java: tests for android database sinks
2020-09-30 12:42:19 +02:00
Arthur Baars
39f5284dcc
Java: add stubs for some android database classes
2020-09-30 12:33:33 +02:00
Arthur Baars
449fb24ef6
Java: android add taint and SQL sink for ContentProvider/Resolver
2020-09-30 12:33:32 +02:00
Arthur Baars
efd5b6ff66
Java: SQLite: make classes private
2020-09-30 12:32:27 +02:00
Arthur Baars
28c965765b
Move query sinks into SQLite.qll
2020-09-30 12:32:27 +02:00
Arthur Baars
b3aae276ba
Add types to SQLite.qll
2020-09-30 12:32:24 +02:00
Arthur Baars
6db4f839cb
Java: add Android database taint and SQL injection sinks
2020-09-30 12:31:11 +02:00
Rasmus Lerchedahl Petersen
30d048f9d4
Python: Support unpacking of keyword arguments.
2020-09-30 11:55:27 +02:00
Rasmus Lerchedahl Petersen
e02cfbf6b0
Python: Support keyword overflow arguments
2020-09-30 11:55:27 +02:00
Rasmus Lerchedahl Petersen
27af9bbae8
Python: Support overflow positional arguments
...
Currently ignoring starred arguments
2020-09-30 11:55:26 +02:00
Rasmus Lerchedahl Petersen
8f2ef94b3e
Python: Hook up keyword arguments
2020-09-30 11:55:26 +02:00
Rasmus Lerchedahl Petersen
f5244aab8c
Python: Add testfiles
2020-09-30 11:54:40 +02:00
Rasmus Wriedt Larsen
1595fed2d6
Python: Add preliminary taint tests for pathlib
2020-09-30 11:44:37 +02:00
Rasmus Wriedt Larsen
0542c3b91e
Python: Model os.path.join and add taint-step
2020-09-30 11:42:36 +02:00
Rasmus Wriedt Larsen
efa2484718
Python: Add taint test for os.path.join
...
Surprisingly the first two just worked, due to our very general handling of any
`join` methods :D
2020-09-30 11:35:21 +02:00
Rasmus Wriedt Larsen
aa6fad558c
Python: Minor cleanup in taint-step tests
2020-09-30 11:15:53 +02:00
Erik Krogh Kristensen
e0b25798ff
remove type-tracking from getAReference, and rewrite qldocs
2020-09-30 10:36:08 +02:00
Rasmus Wriedt Larsen
b3efa28277
Merge branch 'main' into python-command-execution-modeling
2020-09-30 10:24:11 +02:00
Jonas Jensen
68f6d93325
C++: Autoformat fixup
2020-09-30 09:49:56 +02:00
Anders Schack-Mulligen
8d4f7e2db7
Merge pull request #4366 from joefarebrother/field-rvalue-lvalue
...
Java: Make `FieldRead` and `FieldWrite` extend `RValue` and `LValue`
2020-09-30 07:55:24 +02:00
Ian Lynagh
d5f8cbc50c
C++: Accept test changes in unnamed entity naming
2020-09-29 17:30:33 +01:00
Erik Krogh Kristensen
65441705ef
renamings based on review
2020-09-29 18:23:10 +02:00
Erik Krogh Kristensen
c3f5a6dcac
introduce API::Node::getACall()
2020-09-29 18:23:10 +02:00
Erik Krogh Kristensen
69f4ac25c4
renamings based on review
2020-09-29 18:23:10 +02:00
Erik Krogh Kristensen
1596436f7e
rename getASourceUse to getAReference
2020-09-29 18:23:10 +02:00
Erik Krogh Kristensen
adc05022f3
update comment in test case
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-09-29 18:21:41 +02:00
Joe
be07d27a4c
Java: Improve tests
2020-09-29 16:36:34 +01:00
Erik Krogh Kristensen
3857331657
avoid .getReturn().getAUse().(DataFlow::InvokeNode) in the SQL model
2020-09-29 17:08:09 +02:00
Erik Krogh Kristensen
deae9256dd
add convenience method to API graphs
2020-09-29 17:08:00 +02:00
Joe
efc3a25237
Java: Don't pass taint through the format methods of Console
2020-09-29 16:02:51 +01:00
Joe Farebrother
eccfa5d26a
Fix documentation typo
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-09-29 15:34:05 +01:00
Joe
d184aa7c06
Make FieldRead and FieldWrite extend LValue and RValue
2020-09-29 15:24:51 +01:00
yoff
60c310d1bf
Merge pull request #4361 from RasmusWL/python-new-flask-perf-fix
...
Python: Hotfix performance problem with flask methods
2020-09-29 15:41:14 +02:00
CodeQL CI
d7add29dc2
Merge pull request #4359 from erik-krogh/cookieWrites
...
Approved by esbena
2020-09-29 06:32:01 -07:00
CodeQL CI
910c19e613
Merge pull request #4348 from erik-krogh/needle
...
Approved by esbena
2020-09-29 02:57:32 -07:00
Erik Krogh Kristensen
51f1f03f5f
add change note for js/missing-token-validation
2020-09-29 11:56:10 +02:00
CodeQL CI
11f39a9d88
Merge pull request #4342 from erik-krogh/track-where-prop
...
Approved by asgerf
2020-09-29 02:09:53 -07:00
Rasmus Wriedt Larsen
fee279f952
Python: Hotfix performance problem with flask methods
...
This improves runtime for command injection query on
https://lgtm.com/projects/g/alibaba/funcraft from +200 seconds (I did not care
to wait more) down to ~55 seconds on my machine.
This type of tracking predicate with string as additional argument apparently
causes trouble :|
2020-09-29 11:00:57 +02:00
Erik Krogh Kristensen
89195d7ada
add change note for needle
2020-09-29 10:13:48 +02:00
Erik Krogh Kristensen
52d94f6177
use getABoundCallbackParameter instead of getCallback and getParameter.
2020-09-29 10:12:46 +02:00
CodeQL CI
060c19a063
Merge pull request #4352 from erik-krogh/destructing-redirect
...
Approved by esbena
2020-09-28 12:31:42 -07:00
Erik Krogh Kristensen
e04404b713
also recognize cookie writes are leading to cookie access
2020-09-28 21:17:25 +02:00
Max Schaefer
dfc4436012
JavaScript: Teach API graphs to recognise arguments supplied in partial function applications.
2020-09-28 17:52:57 +01:00
Geoffrey White
6de29a6dd3
C++: Provide std::pair constructor initializers.
2020-09-28 17:52:33 +01:00
Ian Lynagh
8a76195f04
Merge pull request #4356 from github/igfoo/front_end
...
C++: accept test changes from extractor frontend upgrade
2020-09-28 17:27:37 +01:00
Geoffrey White
8059230bbc
Update cpp/ql/src/semmle/code/cpp/models/implementations/StdPair.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-09-28 16:59:28 +01:00
Geoffrey White
773bc48a91
C++: Use a more modern make_pair.
2020-09-28 16:54:41 +01:00
Geoffrey White
759324ca1b
Update cpp/ql/src/semmle/code/cpp/models/implementations/StdPair.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-09-28 16:51:21 +01:00
Joe
bea38fcd07
Java: Add taint modelling for string format methods
2020-09-28 16:25:45 +01:00
Tom Hvitved
93edaa75eb
Merge pull request #4309 from tamasvajk/feature/enum-value-init
...
Extract constant value of enum member equal clauses
2020-09-28 16:18:10 +02:00
Tamas Vajk
2bbaa4e173
Handle unsigned types in sign analysis (C# and Java)
2020-09-28 14:46:32 +02:00
Esben Sparre Andreasen
c0a67a8d7b
JS: another CWE-20 -> CWE-020
2020-09-28 14:27:10 +02:00
CodeQL CI
75262ddace
Merge pull request #4328 from erik-krogh/indirect-fix2
...
Approved by esbena
2020-09-28 04:55:19 -07:00
Jonas Jensen
165779ea09
Merge pull request #4343 from rdmarsh2/rdmarsh2/cpp/ir-construction-qldoc
...
C++: Add some IR QLDoc
2020-09-28 13:37:12 +02:00
Nick Rolfe
7609ce2d47
C++: accept test changes from extractor frontend upgrade
2020-09-28 12:23:26 +01:00
CodeQL CI
18bdc054cd
Merge pull request #4347 from max-schaefer/js/handle-empty-pkgjson
...
Approved by asgerf
2020-09-28 02:42:21 -07:00
Rasmus Wriedt Larsen
6cb2ca63a6
Python: tests to show modeling is very syntactical
2020-09-28 11:23:06 +02:00
Joe Farebrother
274147c87a
Merge pull request #4339 from joefarebrother/printAST-java-var-decls
...
Java: Add synthetic nodes for `LocalVariableDeclExpr`s in the AST view
2020-09-28 10:21:25 +01:00
Rasmus Wriedt Larsen
3af5c720cc
Python: Add test of more indirect command injection sinks
2020-09-28 11:16:52 +02:00
Rasmus Wriedt Larsen
f7f6564189
Python: Model subprocess.Popen (and helpers)
2020-09-28 11:13:04 +02:00
Rasmus Wriedt Larsen
62dc0dd263
Python: Model os.exec* os.spawn* and os.posix_spawn*
...
I also had to exclude the inline expectation tests from files outside the test
repo.
2020-09-28 11:05:33 +02:00
Rasmus Wriedt Larsen
c440fd0c09
Python: Adjust expectations for system command executions
...
I mostly did this to show my reviewers that the tests actually run and do
something ;)
2020-09-28 11:05:33 +02:00
Rasmus Wriedt Larsen
060720aae7
Python: Add tests for all SystemCommandExecution from stdlib
...
Overall idea is that `test/experimental/meta/ConceptsTest.qll` will set up
inline expectation tests for all the classes defined in `Concepts.qll`, so any
time you model a new instance of Concepts, you simply just import that
file. That makes the tests a little verbose, but allows us to share test-setup
between all the different frameworks we model.
Note that since the definitions of SystemCommandExecution subclasses are
scattered across multieple framework modeling qll files, it think it makes the
most sense to have the tests for each framework in one location.
I'm not 100% convinced about if this is the right choice or not (especially when
we want to write tests for sanitizers), but for now I'm going to try it out at
least.
2020-09-28 11:05:32 +02:00
Tamas Vajk
a635503be0
Add test cases to UselessCastToSelf
2020-09-28 11:04:22 +02:00
Tamas Vajk
3577b27f49
Fix to not report on enum member initialization
2020-09-28 11:04:22 +02:00
Tamas Vajk
77bb1b2cd9
C#: Extract constant value of enum member equal clauses
2020-09-28 11:04:22 +02:00
Tamas Vajk
a6b62a3838
C#: Add enum init value test
2020-09-28 10:56:50 +02:00
Geoffrey White
11587c930b
C++: Autoformat.
2020-09-28 09:19:35 +01:00
Tamás Vajk
20c4d94ccc
Merge pull request #4318 from tamasvajk/feature/pointer-cast
...
C#: Add implicit cast from array to pointer
2020-09-28 09:34:54 +02:00
Erik Krogh Kristensen
664342dd0f
change SimpleParameter to Parameter in the express model to support destructuring parameters
2020-09-26 21:31:06 +02:00
Robert Marsh
27dc49ff7a
C++: Fix performance issue in PartialDefinition
2020-09-25 19:08:07 -07:00
Robert Marsh
713bdae77a
C++: sync identical files
2020-09-25 13:54:58 -07:00
Robert Marsh
9240256a9f
C++: fix QLDoc
2020-09-25 11:55:39 -07:00
Rasmus Wriedt Larsen
2acfd4cdb1
Python: Show we're able to handle example with __init__.py files
2020-09-25 18:28:31 +02:00
Taus
fc84286b56
Merge pull request #3830 from yoff/SharedDataflow_FieldFlow
...
Python: Shared dataflow: Field flow
2020-09-25 14:53:57 +02:00
CodeQL CI
ea5feb2b0a
Merge pull request #4331 from erik-krogh/DVNA-files
...
Approved by esbena
2020-09-25 05:21:03 -07:00
Erik Krogh Kristensen
6b9aea82ca
model method calls in the needle library
2020-09-25 14:13:31 +02:00
Erik Krogh Kristensen
a22ddb145b
model calls to needle
2020-09-25 13:53:22 +02:00
Rasmus Lerchedahl Petersen
4621e6d8c0
Python: fix QL format
2020-09-25 13:37:39 +02:00
Rasmus Lerchedahl Petersen
88bba46698
Python: Modify tests based on review
...
The extra hist in `test.py` seen in `globalStep.expected`
are due to the removal of manual filtering code.
(That code was from when dataflow had many strange things in it.)
2020-09-25 13:35:30 +02:00
Max Schaefer
0ccbaf9e88
JavaScript: Handle empty package.json files gracefully.
2020-09-25 12:12:39 +01:00
Joe
5256c0ba39
Java: Improve PrintAst tests and rename things
...
Add tests for `EnhcancedForStmt`s and `InstanceOfExpr`s.
Rename LocalVarDeclParent to SingleLocalVarDeclParent
2020-09-25 11:31:56 +01:00
yoff
c56ff986d4
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-09-25 11:56:50 +02:00
Rasmus Wriedt Larsen
85607fe2d5
Python: Adjust location for .expected output
2020-09-25 11:56:45 +02:00
Rasmus Wriedt Larsen
3d5511221e
Python: Add test for implicit __init__.py files
2020-09-25 11:48:38 +02:00
Rasmus Wriedt Larsen
120a569c6f
Python: Explain how CallGraph test.py even works
...
Also remove options file, since it did nothing at all (and blocked
experimental/library-tests/options from taking effect)
2020-09-25 11:42:59 +02:00
Geoffrey White
09b5fb6753
C++: Fix comments.
2020-09-25 10:41:25 +01:00
CodeQL CI
4deb43f361
Merge pull request #4323 from RasmusWL/python-new-command-injection-query
...
Approved by tausbn
2020-09-25 02:39:46 -07:00
Geoffrey White
6fd1bf89c1
C++: Change note.
2020-09-25 10:33:40 +01:00
Esben Sparre Andreasen
ba0a2e1665
JS: tag consistency: replace cwe-20 with cwe-020
2020-09-25 10:28:05 +02:00
CodeQL CI
7b1dbb4364
Merge pull request #4337 from max-schaefer/js/fix-indirect-command-injection
...
Approved by asgerf
2020-09-25 00:18:55 -07:00
Robert Marsh
1445b31864
C++: QLDoc for Operand
2020-09-24 16:34:16 -07:00
Robert Marsh
e51b9215e4
C++: QLDoc for Overlap in IR construction
2020-09-24 15:56:29 -07:00
Robert Marsh
e9b1d817c7
C++: QLDoc for VirtualVariable in IR construction
2020-09-24 15:55:57 -07:00
Robert Marsh
46ff4d524f
C++: autoformat
2020-09-24 14:54:31 -07:00
Erik Krogh Kristensen
b8154d41b1
type-track objects where the "$where" property has been written
2020-09-24 20:55:25 +02:00
Robert Marsh
ca06637de0
C++: add qldoc comment
2020-09-24 10:40:45 -07:00
Geoffrey White
ec3c1568d2
C++: Model erase.
2020-09-24 18:38:29 +01:00
Geoffrey White
8b91d5077d
C++: Model find.
2020-09-24 18:38:29 +01:00
Geoffrey White
d550741c0c
C++: Model insert_or_assign.
2020-09-24 18:38:28 +01:00
Geoffrey White
c51294e423
C++: Model operator[] and at.
2020-09-24 18:38:28 +01:00
Geoffrey White
13b15d9bcd
C++: Model swap.
2020-09-24 18:38:27 +01:00
Geoffrey White
6119bf3430
C++: Model begin and end.
2020-09-24 18:38:27 +01:00
Geoffrey White
25e0c680c6
C++: Model insert.
2020-09-24 18:38:27 +01:00
Robert Marsh
094b06ec2a
C++: remove unneeded predicate
2020-09-24 10:37:38 -07:00
CodeQL CI
19316930cd
Merge pull request #4310 from asgerf/js/extract-xml-with-codeql
...
Approved by aibaars, esbena
2020-09-24 10:14:46 -07:00
Geoffrey White
0dca7f81bc
C++: Model std::swap.
2020-09-24 15:49:33 +01:00
Jonas Jensen
e012dce755
Merge pull request #4334 from github/faster-skip-copy-value-instructions
...
C++: Manual recursion in `skipCopyValueInstructions`
2020-09-24 16:43:25 +02:00
Geoffrey White
49f9a76c54
C++: Add tests for std::map and std::unordered_map.
2020-09-24 15:19:39 +01:00
Anders Schack-Mulligen
3ef3e6e140
Merge pull request #4319 from hvitved/python-java-block-precedes-var
...
Java/Python: Reduce size of `blockPrecedesVar`
2020-09-24 16:07:49 +02:00
Joe
9c8a468237
Java: PrintAst: Add synthetic nodes for other declarations
2020-09-24 14:31:24 +01:00
Joe
3e960c1e0b
Java: PrintAst: Refactor exceptions to the usual AST of expressions and statements using dispatch
2020-09-24 14:31:24 +01:00
Joe
1f99607624
Java: PrintAst: Improve test
2020-09-24 14:31:24 +01:00
Joe
45651cf123
Java: PrintAst: Add a synthetic node for the initialisers of for statements
2020-09-24 14:31:24 +01:00
Anders Schack-Mulligen
d4d4c0f3f9
Merge pull request #4325 from aibaars/hibernate-changenote
...
Java: change note for Hiberate ORM improvements
2020-09-24 12:58:45 +02:00
Erik Krogh Kristensen
6163e6cf5f
adjust test case for XML entity expansion
2020-09-24 09:53:06 +02:00
Mathias Vorreiter Pedersen
780a07e89c
Merge pull request #4332 from jbj/ExtendedRangeAnalysis-stub
...
C++: ExtendedRangeAnalysis stub implementation
2020-09-24 09:01:06 +02:00
Tom Hvitved
7970fef3e4
Merge pull request #4315 from hvitved/merge-rc-1.25
...
Merge rc/1.25 into main
2020-09-24 08:27:01 +02:00
Robert Marsh
89332ca303
C++: autoformat
2020-09-23 15:29:51 -07:00
Robert Marsh
774dcc7c52
C++: New model class for iterator op* and op[]
2020-09-23 15:29:37 -07:00
Jonathan Leitschuh
17603c8091
Update java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNG.qhelp
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-09-23 13:59:49 -04:00
Geoffrey White
71a605b7d9
C++: Add tests for std::pair.
2020-09-23 18:43:28 +01:00
Tamas Vajk
48bf6d55aa
C#: Add implicit cast from array to pointer
2020-09-23 17:21:38 +02:00
Mathias Vorreiter Pedersen
f794eaa670
C++: Manual recursion in skipCopyValueInstructions instead of transitive closure
2020-09-23 16:26:40 +02:00
Erik Krogh Kristensen
83f0514475
add req.files as a RequestInputAccess in the Express model
2020-09-23 15:50:59 +02:00
Jonas Jensen
b7d0939f4a
C++: ExtendedRangeAnalysis stub implementation
...
Just to demonstrate how things fit together, I've created
`SubtractSelf.qll` that adds a (hopefully sound) version of the test
extension that was already used in `extensibility.ql`.
2020-09-23 15:50:07 +02:00
Arthur Baars
5894263671
Java: improve change note
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-09-23 15:37:55 +02:00
Max Schaefer
dc7b447895
JavaScript: Make alert locations for command injection more precise.
2020-09-23 14:07:36 +01:00
Max Schaefer
439aadf0b6
JavaScript: Do even more type tracking in command injection.
2020-09-23 14:07:36 +01:00
Max Schaefer
ef18b39124
JavaScript: Fix use of type backtracker in IndirectCommandArgument.qll.
2020-09-23 14:07:36 +01:00
Max Schaefer
825fc2228b
JavaScript: Add two new command-injection tests.
2020-09-23 14:07:36 +01:00
Rasmus Wriedt Larsen
66815c9d3d
Python: Suppress unused variable warnings in DataFlowPrivate
2020-09-23 14:33:10 +02:00
Tamás Vajk
9b14a70eef
Merge pull request #4316 from tamasvajk/feature/local-functions
...
C#: Change TrapStackBehaviour of local functions
2020-09-23 14:12:07 +02:00
Tamas Vajk
2868d5bf34
C#: Add pointer cast test cases
2020-09-23 12:20:51 +02:00
Rasmus Wriedt Larsen
6aec2ec673
Python: Fix os.popen modeling
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-09-23 11:18:32 +02:00
Rasmus Wriedt Larsen
624cdd339a
Python: Fix grammar
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-09-23 11:18:12 +02:00
Tom Hvitved
d652b95b21
Merge pull request #4011 from hvitved/csharp/asp-extraction-pre-finalize
...
C#: Move ASP extraction from auto builder to `pre-finalize.{sh,cmd}`
2020-09-23 09:11:11 +02:00
Tamás Vajk
03e20eed05
Merge pull request #4314 from tamasvajk/feature/switch-case-expr
...
C#: Fix switch case expression types
2020-09-23 08:57:32 +02:00
Rasmus Lerchedahl Petersen
ef4461ce54
Python: Address review comments
2020-09-22 23:48:28 +02:00
Tamás Vajk
5ab5e75b85
Merge pull request #4255 from fatenhealy/IncreaseInsufficientKeySizeValue
...
Increase insufficient key size value from 1024 to 2048
2020-09-22 23:06:12 +02:00
yoff
aece0ff652
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-09-22 22:33:46 +02:00
Jonathan Leitschuh
645d7c8831
Fix documentation in apache/Lang.qll
2020-09-22 15:04:06 -04:00
Erik Krogh Kristensen
ec2b3f0b6c
better join-order fix in HTTP
2020-09-22 21:02:26 +02:00
Jonathan Leitschuh
8578bc5cf0
Update java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNG.qhelp
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-09-22 15:02:00 -04:00
Robert Marsh
e28a45b8e6
Merge branch 'main' into rdmarsh2/cpp/output-iterators-1
...
Resolve test output conflicts from IR model improvements
2020-09-22 11:17:38 -07:00
Jonathan Leitschuh
24fe3d0663
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-09-22 13:11:11 -04:00
Arthur Baars
252f8aa89d
Java: add Spring::MultipartRequest as taint source
2020-09-22 19:01:10 +02:00
Arthur Baars
b382711f14
Java: change note for Hiberate ORM improvements
2020-09-22 18:55:07 +02:00
CodeQL CI
475519c9ee
Merge pull request #4267 from asgerf/js/log-typescript-memory
...
Approved by esbena
2020-09-22 08:51:51 -07:00
Jonas Jensen
4faeede5cd
C++: Remove unnecessary comment on import
2020-09-22 16:55:25 +02:00
Rasmus Wriedt Larsen
71a75ce596
Python: Handle bound methods in flask modeling
2020-09-22 16:33:35 +02:00
Rasmus Wriedt Larsen
5709189c2a
Python: Expand flask test
2020-09-22 16:33:34 +02:00
Rasmus Wriedt Larsen
e614365963
Python: Adopt new approach in flask modeling
...
Removed all the dict-like stuff, not sure that is how we should do things.
2020-09-22 16:33:33 +02:00
Rasmus Wriedt Larsen
a82fa04d8a
Python: Add worked example of taint step modeling of external libs
...
This can't be seen on the example, but I went through quite a lot of iterations
before arriving at this fairly simple solution.
2020-09-22 16:28:26 +02:00
Rasmus Wriedt Larsen
00ea0cebc3
Python: More Flask modeling kinda works
...
It "kinda" works now, but it really is not a pretty solution. Adding all these
"tracked" objects is SUPER annoying... it _would_ be possible to skip them, but
that seems like it will give the wrong edges for dataflow/taintflow queries :|
A good chunk of it should be able to be removed with access-paths like C# does
for library modeling. Some of it could be solved by better type-tracking API
like API Graphs... but it seems like we generally are just lacking the
nice-to-have features like `.getAMemberCall` and the like. See
https://github.com/github/codeql/pull/4082/files#diff-9aa94c4d713ef9d8da73918ff53db774L33
2020-09-22 16:28:25 +02:00
Rasmus Wriedt Larsen
3c08590ee4
Python: Expand flask tests a bit
2020-09-22 16:28:24 +02:00
Rasmus Wriedt Larsen
2bdd0284dc
Python: Port py-command-line-injection with new dataflow
2020-09-22 16:28:23 +02:00
Rasmus Wriedt Larsen
7c205dd3fc
Python: First attempt at modeling Flask
2020-09-22 16:28:21 +02:00
Rasmus Wriedt Larsen
cdc5ca7aec
Python: Model os.system and os.popen
2020-09-22 16:28:20 +02:00
Rasmus Wriedt Larsen
0265f26301
Python: Add importModule and importMember DataFlow helpers
2020-09-22 16:28:19 +02:00
Rasmus Wriedt Larsen
2551173156
Python: Update example in QLDoc for TypeTracker
2020-09-22 16:28:18 +02:00
Jonas Jensen
9fd8b0431a
C++: Add a SimpleRangeAnalysisDefinition test def
2020-09-22 15:54:54 +02:00
Jonas Jensen
826632d6a9
C++: Add a test of def overrides
...
The def used in this test is not overridden yet.
2020-09-22 15:54:54 +02:00
Jonas Jensen
d1f453be36
C++: import SimpleRangeAnalysisInternal
...
This ensures that `getFullyConverted{Lower,Upper}Bounds` are available
where they need to be called.
2020-09-22 15:54:54 +02:00
Jonas Jensen
8065bf15ad
C++: Per-variable overrides
...
Without these changes, there was no way to tell which variables were
overridden by a given instance of `SimpleRangeAnalysisDefinition`. All
four overrides are needed because they fit into different mutual
recursions of the `SimpleRangeAnalysis` implementation.
2020-09-22 15:53:22 +02:00
Jonas Jensen
7dce4d0a6e
C++: Rename: name the file the same as the class
2020-09-22 15:48:36 +02:00
Tamás Vajk
54c35748f0
Merge pull request #4193 from tamasvajk/feature/sign-analysis
...
C#: Sign analysis
2020-09-22 15:33:33 +02:00
Anders Schack-Mulligen
66e2ed9b65
Merge pull request #4031 from aibaars/hibernate
...
Add additional Hibernate SQL sinks
2020-09-22 15:29:40 +02:00
Rasmus Lerchedahl Petersen
131cf8d2ec
Python: Fix compilation error
2020-09-22 15:02:31 +02:00
CodeQL CI
036a36a474
Merge pull request #4317 from max-schaefer/js/api-node-depth
...
Approved by asgerf
2020-09-22 05:58:48 -07:00
Mathias Vorreiter Pedersen
535c8cc87e
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-22 13:46:19 +01:00
Erik Krogh Kristensen
717ea2369c
Merge pull request #4311 from erik-krogh/indirect-fix
...
JS: improve join-order for HTTP::isDecoratedCall
2020-09-22 14:35:50 +02:00
CodeQL CI
9a306866c5
Merge pull request #4282 from erik-krogh/es2021
...
Approved by esbena
2020-09-22 05:34:35 -07:00
Geoffrey White
e836bae20f
C++: Tidy up test stl.h a little.
2020-09-22 13:21:50 +01:00
Rasmus Lerchedahl Petersen
b065d8724e
Python: Fixup comments after merge
2020-09-22 13:52:30 +02:00
Rasmus Lerchedahl Petersen
3e2331c87f
Merge branch 'main' of github.com:github/codeql into SharedDataflow_FieldFlow
2020-09-22 13:32:36 +02:00
Jonas Jensen
ee211b02fb
Merge remote-tracking branch 'lcartey/cpp/range-analysis-custom-defs' into range-analysis-custom-defs
2020-09-22 13:27:56 +02:00
Tamas Vajk
5f96c37b28
C#: Fix switch case expression types
2020-09-22 13:16:31 +02:00
Anders Schack-Mulligen
47506a859e
Merge pull request #4287 from joefarebrother/exectainted-array
...
Java: Improve the ExecTainted query
2020-09-22 13:16:05 +02:00
Jonas Jensen
269b7101c0
Merge pull request #4273 from lcartey/cpp/custom-range-analysis-override
...
C++: Support overriding existing simple range analysis bounds
2020-09-22 13:15:05 +02:00
Tamas Vajk
a89d13a5ee
C#: Add change notes for increased required key size in 'cs/insufficient-key-size'
2020-09-22 13:00:45 +02:00
Tom Hvitved
8de57c7d19
C#: Move ASP extraction from auto builder to pre-finalize.{sh,cmd}
2020-09-22 11:55:02 +02:00
Jonas Jensen
e86bc0c6ac
C++: Autoformat fixup
2020-09-22 11:53:05 +02:00
Asger Feldthaus
d34bd51f61
JS: Call codeql.exe instead of codeql.cmd
2020-09-22 10:28:40 +01:00
Asger Feldthaus
bc09bc45bc
JS: Concatenate paths properly
2020-09-22 10:17:30 +01:00
Faten Healy
c35a5d120a
C#: Increasing required size of RSA key to 2048
2020-09-22 11:09:49 +02:00
Tamas Vajk
cc979d0b5f
C#: Add switch case expression type test
2020-09-22 11:04:44 +02:00
Tom Hvitved
71da9045e5
Java/Python: Reduce size of blockPrecedesVar
2020-09-22 11:00:26 +02:00
Erik Krogh Kristensen
32b0f1b480
add code example to isDecoratedCall
2020-09-22 10:42:49 +02:00
Max Schaefer
dafd45f0f4
JavaScript: Add a few metric queries for API graphs.
2020-09-22 09:30:19 +01:00
Max Schaefer
46ba4a1fa8
JavaScript: Expose another useful predicate on API-graph nodes.
2020-09-22 09:30:12 +01:00
Jonas Jensen
5cbf498a2d
Merge pull request #4302 from MathiasVP/fix-field-conflation-after-4230
...
C++: Fix field conflation after #4230
2020-09-22 10:23:17 +02:00
Erik Krogh Kristensen
ec49c444ef
Apply suggestions from code review
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-09-22 10:15:30 +02:00
Tamas Vajk
d8176bc00d
C#: Change TrapStackBehaviour of local functions
2020-09-22 09:53:35 +02:00
Tom Hvitved
b6d93ae81d
Merge remote-tracking branch 'upstream/rc/1.25' into merge-rc-1.25
2020-09-22 09:35:39 +02:00
Jonas Jensen
c56d5eb90e
Merge pull request #4295 from rdmarsh2/rdmarsh2/cpp/ir-qualifier-flow
...
C++: Improved qualifier flow in IR taint tracking
2020-09-22 09:23:10 +02:00
Tom Hvitved
83340e2a62
Merge pull request #4212 from hvitved/csharp/path-transformers
...
C#: Implement support for path transformers
2020-09-22 09:20:53 +02:00
Robert Marsh
772a51508f
C++: Update test comment
2020-09-21 16:19:41 -07:00
Robert Marsh
9e3bfe1968
C++: Fix iterator flow context sensitivity
2020-09-21 16:17:16 -07:00
Robert Marsh
913881b17b
C++: Add test for iterator false positive
2020-09-21 16:15:24 -07:00
Jonathan Leitschuh
ab618dcf2f
Java: QL Query Detector for JHipster Generated CVE-2019-16303
2020-09-21 18:46:13 -04:00
Erik Krogh Kristensen
4243504c8b
improve join-order for HTTP::isDecoratedCall
2020-09-21 23:20:16 +02:00
Robert Marsh
947ad02db9
C++: autoformat
2020-09-21 11:38:57 -07:00
Asger Feldthaus
e70bb20f34
JS: Support XML extraction when run with codeql
2020-09-21 17:21:54 +01:00
Rasmus Lerchedahl Petersen
08b51e67c4
Python: Update test annotation
2020-09-21 17:44:36 +02:00
Rasmus Lerchedahl Petersen
73d2d9b1f8
Python: Make constructor calls post-update nodes
2020-09-21 17:32:22 +02:00
Taus
724baaf26a
Merge pull request #4308 from RasmusWL/python-private-import-of-DataFlowPrivate
...
Python: Make import of DataFlowPrivate private
2020-09-21 17:13:48 +02:00
Tom Hvitved
06dbec78f7
C#: Add Guard::controlsBasicBlock() and simplify Guard::isEquality()
2020-09-21 16:15:12 +02:00
Tamas Vajk
8bf4a4209c
C#: Sign analysis
...
Synced between Java and C# through `identical-files.json`.
2020-09-21 16:15:12 +02:00
Rasmus Wriedt Larsen
2f9f51dbd8
Python: Fix tests that use DataFlowPrivate
2020-09-21 16:08:17 +02:00
yoff
557db3381d
Merge pull request #4265 from tausbn/python-add-global-flow-steps
...
Python: Add `ModuleVariableNode` to keep track of global reads and writes
2020-09-21 15:51:19 +02:00
Tom Hvitved
d3ea20cd2c
Merge pull request #4271 from github/matt-gretton-dann/csharp-dont-trace-macos-pkill
...
Don't trace through pkill or pgrep on macOS.
2020-09-21 15:44:48 +02:00
Tamas Vajk
441fbe3215
Add Java test file for sign analysis
2020-09-21 15:07:09 +02:00
Mathias Vorreiter Pedersen
873e871620
C++: Handle more cases in arrayReadStep.
2020-09-21 14:35:37 +02:00
Mathias Vorreiter Pedersen
73cd5ceb80
C++: Accept tests. Due to the removal of overlap between the reads steps there are fewer repeated edges in path explanations.
2020-09-21 14:17:49 +02:00
Rasmus Wriedt Larsen
6aca82fa82
Python: Make import of DataFlowPrivate private
...
Otherwise you are able to use `DataFlow::isExpressionNode` where
`isExpressionNode` is defined in `DataFlowPrivate.qll`.
2020-09-21 13:52:58 +02:00
Taus
9d7a2d2b5d
Merge branch 'main' into python-add-global-flow-steps
2020-09-21 13:50:20 +02:00
Anders Schack-Mulligen
4a3118b13e
Merge pull request #4246 from RasmusWL/java-fix-ssa-varBlockReaches
...
Java: Minor fixup for SSA AdjacentUsesImpl::varBlockReaches
2020-09-21 13:28:20 +02:00
CodeQL CI
016e6d2001
Merge pull request #4275 from erik-krogh/CVE760-indirect
...
Approved by esbena
2020-09-21 04:09:51 -07:00
Mathias Vorreiter Pedersen
62d42f20d9
C++: use(x) is no longer an array read.
2020-09-21 12:46:03 +02:00
Rasmus Wriedt Larsen
233dd43635
Java: Port varBlockReaches fix to BaseSSA.qll
2020-09-21 12:11:25 +02:00
Taus Brock-Nannestad
1d6558b4e8
Python: Add a bit more documentation to ModuleVariableNode
2020-09-21 11:46:18 +02:00
Mathias Vorreiter Pedersen
c560c7584c
C++: Add QLDoc for BufferMayWriteSideEffectFieldStoreQualifierNode
2020-09-21 11:08:06 +02:00
Mathias Vorreiter Pedersen
49dd576352
C++: Add more tests
2020-09-21 10:59:16 +02:00
Erik Krogh Kristensen
4571ba38a5
add change-note for es2021
2020-09-21 10:51:36 +02:00
Erik Krogh Kristensen
4bc91c4439
add support for Promise.any
2020-09-21 10:50:06 +02:00
Erik Krogh Kristensen
9f1b3d61b9
add test for numeric separators
2020-09-21 10:50:06 +02:00
Erik Krogh Kristensen
b09015380a
add support for String.prototype.replaceAll
2020-09-21 10:50:04 +02:00
Erik Krogh Kristensen
0dbdbfa659
bump extractor version
2020-09-21 10:49:50 +02:00
Erik Krogh Kristensen
87d4e13584
added support for ES2021 assignment operators
2020-09-21 10:49:50 +02:00
Erik Krogh Kristensen
9e7a1934ea
add express and HTTP to change-notes
2020-09-21 10:45:43 +02:00
Erik Krogh Kristensen
4dfc0680e2
support non SourceNode receiver for partialInvoke in routeHandlerStep
2020-09-21 10:42:19 +02:00
Erik Krogh Kristensen
4cde48cfb8
change comma to dot in qldoc
2020-09-21 10:23:21 +02:00
Erik Krogh Kristensen
edebbd640e
revert change to return-type
2020-09-21 10:18:22 +02:00
Mathias Vorreiter Pedersen
6dd7675a97
Update cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-09-21 09:31:30 +02:00
Erik Krogh Kristensen
6c050d3160
revert change of return-type
2020-09-20 22:21:42 +02:00
Erik Krogh Kristensen
ae228cb5b2
move new predicates to a more fitting location
2020-09-20 22:15:03 +02:00
Erik Krogh Kristensen
5fd4c7a422
use PartialInvokeNode
2020-09-20 22:06:48 +02:00
Erik Krogh Kristensen
bef09254ee
rename forwardingCall to isAForwardingRouteHandlerCall
2020-09-20 21:59:33 +02:00
Erik Krogh Kristensen
62332121b2
remove getNumParameter constraint
2020-09-20 21:57:55 +02:00
Erik Krogh Kristensen
3aaa2d11a7
rename decoratedRouteHandler to isDecoratedCall
2020-09-20 21:54:56 +02:00
Rasmus Lerchedahl Petersen
9aa0cfb35c
Python: class callable -> class call
...
Only have one type of callable, but have an extra type of call.
A constructor call directs to an init callable
(should also handle `call` overrides at some point).
2020-09-19 22:27:11 +02:00
Rasmus Lerchedahl Petersen
b2f1c435a8
Python: update test expectations
2020-09-19 22:27:11 +02:00
Rasmus Lerchedahl Petersen
e132361736
Python: Add missing .expected file
2020-09-19 22:27:11 +02:00
Rasmus Lerchedahl Petersen
e50b66554d
Python: Add explorative test
2020-09-19 22:27:10 +02:00
Rasmus Lerchedahl Petersen
aa28167177
Python: Add malloc nodes
2020-09-19 22:27:10 +02:00
Rasmus Lerchedahl Petersen
27b25565ca
Python: Implement field-stores, -reads, and -content
2020-09-19 22:27:10 +02:00
Rasmus Lerchedahl Petersen
a2d006fe47
Python: Tests for field flow
2020-09-19 22:27:10 +02:00
Robert Marsh
6b3557ec58
C++: cache localAdditionalTaintStep
2020-09-18 15:42:14 -07:00
Robert Marsh
bc3e74f7d6
Merge branch 'main' into rdmarsh2/cpp/ir-qualifier-flow
...
Fix test conflicts
2020-09-18 15:40:43 -07:00
Robert Marsh
12be90a6af
C++: remove unneeded cast
2020-09-18 15:00:01 -07:00
Robert Marsh
c179a07fc7
C++: fix constructor models
2020-09-18 14:43:39 -07:00
Robert Marsh
bd7f5a41d1
C++: autoformat
2020-09-18 14:19:29 -07:00
Robert Marsh
b84bf5e9bb
C++: QLDoc for IteratorPartialDefinitionNode
2020-09-18 14:18:38 -07:00
Robert Marsh
107e9770da
C++: remove accidentally committed test code
2020-09-18 14:12:33 -07:00
Tom Hvitved
d867172d27
Merge pull request #4300 from hvitved/csharp/runtime-checks-bypass-bad-magic
...
C#: Avoid bad magic in `RuntimeChecksBypass.ql`
2020-09-18 19:40:34 +02:00
Taus Brock-Nannestad
11c85f0fb5
Python: Clean up various jump/local data flow steps
...
Removes steps from `ModuleVariableNode`s from `essaFlowStep`, and
instead puts them only in `jumpStep`. This cleans up the logic a bit.
This slightly broke the type tracker implementation (as it relied on
`essaFlowStep` being fairly liberal), so I have rewritten it to
explicitly rely on just familiar predicates for local and jump steps.
Additionally, we disallow Essa-to-Essa steps where exactly one of the
two nodes corresponds to a global variable (i.e. only local-local and
global-global steps).
2020-09-18 18:14:47 +02:00
Mathias Vorreiter Pedersen
53da751b15
C++: Accept tests
2020-09-18 17:12:27 +02:00
Mathias Vorreiter Pedersen
b6b17fe95e
C++: Add a read and store step that replace ArrayContent with FieldContent when we realize that the target of a store is a field.
2020-09-18 17:12:09 +02:00
Joe
9baf2b9eff
Fix cartesian product
2020-09-18 15:42:03 +01:00
Tom Hvitved
dff9f8264b
Merge pull request #4296 from hvitved/csharp/useless-upcast-nomagic
...
C#: Avoid bad magic in `UselessUpcast.ql`
2020-09-18 16:24:20 +02:00
Joe
abb1731be7
Java: Simplify the implementation of ExecTainted
2020-09-18 15:21:03 +01:00
Anders Schack-Mulligen
b3bf570fb7
Merge pull request #4301 from lcartey/java/update-cwe-claims
...
Java: Update some CWE claims
2020-09-18 16:08:40 +02:00
Joe
3cc38feebc
Fix a couple of typos in QLDoc comments
2020-09-18 14:51:38 +01:00
Mathias Vorreiter Pedersen
b4edbe4773
Merge pull request #4298 from MathiasVP/field-conflation-with-array-content
...
C++: Add test demonstrating field conflation after merging #4230
2020-09-18 15:16:33 +02:00
Anders Schack-Mulligen
4f9d2f118d
Merge pull request #4288 from joefarebrother/printAST-java
...
Java: Add a container node for Imports in the PrintAst view
2020-09-18 14:17:26 +02:00
Tom Hvitved
aac2e0ebfb
C#: Avoid bad magic in RuntimeChecksBypass.ql
...
Before:
```
[2020-09-18 14:03:57] (2587s) Tuple counts for RuntimeChecksBypass::uncheckedWrite#bbf#antijoin_rhs#1:
1270 ~8% {2} r1 = SCAN RuntimeChecksBypass::uncheckedWrite#bbf#shared AS I OUTPUT I.<1>, I.<0>
188197390 ~0% {3} r2 = JOIN r1 WITH #Callable::Callable::calls_dispred#bfPlus AS R ON FIRST 1 OUTPUT R.<1>, r1.<1>, r1.<0>
2425784042 ~1% {3} r3 = JOIN r2 WITH Expr::Expr::getEnclosingCallable_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r2.<1>, R.<1>, r2.<2>
58 ~9% {2} r4 = JOIN r3 WITH project#RuntimeChecksBypass::checkedWrite#bfff AS R ON FIRST 2 OUTPUT r3.<0>, r3.<2>
return r4
```
After:
```
[2020-09-18 14:08:48] (5s) Tuple counts for RuntimeChecksBypass::uncheckedWrite#fff#antijoin_rhs:
24704473 ~2% {2} r1 = SCAN DataFlowPublic::localExprFlow#ff AS I OUTPUT I.<1>, I.<0>
23784154 ~6% {4} r2 = JOIN r1 WITH Expr::Expr::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT r1.<1>, 28, R.<0>, R.<1>
201391 ~2% {2} r3 = JOIN r2 WITH expressions AS R ON FIRST 2 OUTPUT r2.<2>, r2.<3>
23784154 ~0% {3} r4 = JOIN r1 WITH Expr::Expr::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT r1.<1>, R.<0>, R.<1>
1065242 ~20% {2} r5 = JOIN r4 WITH expr_value AS R ON FIRST 1 OUTPUT r4.<1>, r4.<2>
1266633 ~16% {2} r6 = r3 \/ r5
return r6
```
2020-09-18 14:15:30 +02:00
Jonas Jensen
6463a94258
Merge pull request #4297 from github/igfoo/compileTimeConstantInt
...
C++: Improve `compileTimeConstantInt`
2020-09-18 13:58:16 +02:00
lcartey@github.com
2c6f587ee9
Java: Add coverage claim for CWE 193 (off by one)
2020-09-18 12:51:24 +01:00
lcartey@github.com
39200566c3
Java: Update CWE claims for XXE.
...
This matches the claims in the C# equivalent.
2020-09-18 12:30:52 +01:00
Mathias Vorreiter Pedersen
b40941b89c
C++: Add test demonstrating field conflation after merging #4230
2020-09-18 13:23:23 +02:00
Tom Hvitved
4090859207
C#: Avoid bad magic in UselessUpcast.ql
2020-09-18 12:14:52 +02:00
Joe
3258134098
Java: Remove superfluous conjunct
2020-09-18 10:41:06 +01:00
lcartey@github.com
32f43a84be
Java: Add CWE 564 (SQL Injection: Hibernate)
2020-09-18 10:20:21 +01:00
Jonas Jensen
c67605f15c
Merge pull request #4230 from MathiasVP/mathiasvp/array-field-flow
...
C++: Replace `field -> object` taint rule with `ArrayContent` dataflow
2020-09-18 10:56:51 +02:00
Mathias Vorreiter Pedersen
8c615ece8a
Merge pull request #4292 from MathiasVP/mathiasvp/cache-simpleLocalFlowStep
...
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-18 10:18:21 +02:00
Mathias Vorreiter Pedersen
3ef6e8a580
Merge pull request #4283 from geoffw0/stringstream4
...
C++: Model getline
2020-09-18 10:17:47 +02:00
Erik Krogh Kristensen
0b16f81f8b
improve performance by using RouteHandlerCandidate
2020-09-18 09:29:13 +02:00
Erik Krogh Kristensen
b4e75bf567
update expected output
2020-09-18 09:29:13 +02:00
Erik Krogh Kristensen
1f95311342
further loosen the RouteHandlerCandidate heuristic
2020-09-18 09:29:13 +02:00
Erik Krogh Kristensen
3eaa56ed60
support containers with decorated route handlers
2020-09-18 09:29:08 +02:00
Erik Krogh Kristensen
c087e94d47
add additional indirect route-handler steps
2020-09-18 09:26:33 +02:00
Erik Krogh Kristensen
02c1d689e4
support indirect route-handlers for NodeJS
2020-09-18 09:26:33 +02:00
Erik Krogh Kristensen
dafcd59148
add another indirect route-handler test
2020-09-18 09:26:33 +02:00
Erik Krogh Kristensen
43e5c0212c
add basic support for indirect route handlers
2020-09-18 09:26:33 +02:00
Robert Marsh
3a83cc71fe
C++: use qualifier flow in more models
2020-09-17 18:03:02 -07:00
Robert Marsh
556ace004f
C++: use qualifiers in string constructor model
2020-09-17 17:39:50 -07:00
Robert Marsh
6b7b64d7be
C++: IR data and taint flow through qualifiers
2020-09-17 17:10:11 -07:00
Robert Marsh
f73ff988e0
C++: improve cast and ptr handling in taint test
2020-09-17 16:55:36 -07:00
Mathias Vorreiter Pedersen
c6ff805a07
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-17 21:13:02 +02:00
Robert Marsh
3d07ba9d0b
Merge pull request #4290 from MathiasVP/mathiasvp/fix-join-order-in-single-field-flow
...
C++: Fix bad join order introduced by #4270
2020-09-17 14:52:59 -04:00
Mathias Vorreiter Pedersen
8e1d9e0996
C++: Fix bad join order introduced by #4270
2020-09-17 19:23:01 +02:00
Joe
9c643ec1cd
Java: Fix formatting
2020-09-17 17:46:05 +01:00
Joe
69fd579dfd
Java: Fix QLDoc
2020-09-17 17:37:16 +01:00
Joe
2da6234317
Java: Fix QLDoc
2020-09-17 17:31:24 +01:00
Joe
6d0df7cb3a
Java: Add a container node for Imports in the PrintAst view
2020-09-17 17:29:36 +01:00
Joe
810baad63f
Java: Fix formatting
2020-09-17 17:13:55 +01:00
Joe
fcfc836720
Java: Add tests for ExecTainted
2020-09-17 16:47:55 +01:00
Joe
b6cf1cce20
Java: Make the equivalent changes to ExecTaintedLocal
2020-09-17 15:53:04 +01:00
Joe
6bfc0afaeb
Java: Improve the ExecTainted query
2020-09-17 15:39:35 +01:00
Ian Lynagh
c7b6374e55
C++: Improve compileTimeConstantInt
...
It is possible for the frontend to make
(bool)e
where e has a constant value 0, but the (implicit) cast has no constant
value. This was causing us to not understand assume(0) correctly.
Now compileTimeConstantInt will handle casts itself if necessary.
2020-09-17 14:51:50 +01:00
Geoffrey White
5cc11f1c44
C++: Additional model for 'this' flow through chains.
2020-09-17 14:12:30 +01:00
Geoffrey White
73399cb5f7
C++: Model GetLine.
2020-09-17 14:05:43 +01:00
Geoffrey White
2c15e6f934
C++: Add test cases.
2020-09-17 13:43:07 +01:00
Mathias Vorreiter Pedersen
63afe1da78
Merge pull request #4276 from geoffw0/stringstream3
...
C++: More stringstream models.
2020-09-17 14:19:52 +02:00
Taus Brock-Nannestad
f93c44a688
Python: Fix typo
2020-09-17 13:26:55 +02:00
Taus Brock-Nannestad
1d462ae156
Python: Fix misnamed variable.
2020-09-17 13:22:27 +02:00
Taus Brock-Nannestad
797ac23db7
Python: Clean up global flow test
2020-09-17 13:20:58 +02:00
Geoffrey White
4d6125841d
C++: Clean up multiply defined functions.
2020-09-17 11:48:26 +01:00
Geoffrey White
c17ae3ad6c
C++: Correct dataflow for return (*this).
2020-09-17 11:34:10 +01:00
Taus Brock-Nannestad
9458861b18
Python: Add missing global flow test
2020-09-17 12:04:30 +02:00
Robert Marsh
691d0f3fb2
Merge branch 'main' into rdmarsh2/cpp/output-iterators-1
...
Fix merge conflict in test expectations
2020-09-16 13:52:59 -07:00
Robert Marsh
44c5233459
C++: accept test output
2020-09-16 12:49:15 -07:00
Robert Marsh
086d074a26
C++: make PartialDefinition abstract
2020-09-16 12:48:38 -07:00
Robert Marsh
fa0e27b2de
C++: move interprocedural iterator flow to taint
2020-09-16 12:34:52 -07:00
Taus Brock-Nannestad
ee76d9b33d
Python: Clean up tests
2020-09-16 19:04:27 +02:00
Taus
e179df7c43
Python: Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-09-16 18:21:50 +02:00
Geoffrey White
86404af501
Merge pull request #4270 from MathiasVP/mathiasvp/single-field-flow-fix-cwe190test
...
C++: Use underlying type when checking whether a type is a single-field struct.
2020-09-16 17:21:07 +01:00
Geoffrey White
f1a9547b38
C++: Split off putback.
2020-09-16 16:44:39 +01:00
Taus
4b423feef9
Merge pull request #4245 from RasmusWL/python-dataflow-dynamic-tuple-tests
...
Python: Add dataflow tests for dynamic tuple creation
2020-09-16 15:19:41 +02:00
CodeQL CI
c2175b678c
Merge pull request #4263 from erik-krogh/importScripts
...
Approved by esbena
2020-09-16 06:01:35 -07:00
Mathias Vorreiter Pedersen
3520b86771
C++: Accept test changes.
2020-09-16 14:51:11 +02:00
Taus Brock-Nannestad
2d3e23ebb0
Python: Cleanup, docs, and an extra test case
2020-09-16 14:46:04 +02:00
Geoffrey White
eedbe839b5
C++: Update change note.
2020-09-16 13:45:05 +01:00
Geoffrey White
c4de071a4c
C++: Flow through swap.
2020-09-16 13:39:07 +01:00
Geoffrey White
eb7bd6e176
C++: Flow through putback.
2020-09-16 13:39:07 +01:00
Geoffrey White
7cc60a30a6
C++: Flow through get, peek, read, readsome.
2020-09-16 13:36:41 +01:00
Geoffrey White
56390c1aef
C++: Flow through operator>>.
2020-09-16 13:32:13 +01:00
Mathias Vorreiter Pedersen
3026eb4b85
Revert "C++: Remove the same rule in TaintTrackingUtil.qll as 78b24b76a0 removed from DefaultTaintTracking.qll"
...
This reverts commit 0b97a4a182 .
2020-09-16 14:26:01 +02:00
Mathias Vorreiter Pedersen
92d81edae6
Revert "C++: Remove the problematic taint tracking rule. It seems like we get the flows from dataflow already now."
...
This reverts commit 78b24b76a0 .
2020-09-16 14:25:42 +02:00
Tamás Vajk
5079deb92a
Merge pull request #4268 from tamasvajk/feature/java-range-analysis-fn
...
Java: Fix range analysis false negative
2020-09-16 11:08:33 +02:00
Mathias Vorreiter Pedersen
0b97a4a182
C++: Remove the same rule in TaintTrackingUtil.qll as 78b24b76a0 removed from DefaultTaintTracking.qll
2020-09-16 10:54:23 +02:00
Joe Farebrother
4f70af500c
Merge pull request #4261 from joefarebrother/printAST-java
...
Java: Add PrintAst
2020-09-16 09:46:19 +01:00
Mathias Vorreiter Pedersen
7b456d6162
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-16 10:45:31 +02:00
Rasmus Wriedt Larsen
d828bc5f3a
Merge pull request #4251 from yoff/SharedDataflow_BarrierGuards
...
Python: Implement `BarrierGuard`
2020-09-16 10:00:26 +02:00
Mathias Vorreiter Pedersen
c8a3baf356
Merge pull request #4272 from jbj/dataflow-partial-access
...
C++: Add AST flow through arrays
2020-09-16 09:29:39 +02:00
Rasmus Lerchedahl Petersen
e46ae9b98d
Python: Move some query predicates to debug
2020-09-15 21:45:47 +02:00
Matthew Gretton-Dann
17bd678699
Merge pull request #4140 from github/matt-gretton-dann/fix-deleted-constructors
...
Update tests for extractor changes with ctors
2020-09-15 19:34:42 +01:00
Matthew Gretton-Dann
795bf0d93c
Update tests for extractor changes with ctors
2020-09-15 17:58:37 +01:00
Matthew Gretton-Dann
9296a12a91
Merge pull request #4260 from github/igfoo/coroutines
...
C++: Add coroutines* tables
2020-09-15 17:39:38 +01:00
Taus Brock-Nannestad
7cdd290b90
Python: Disregard module-time reads.
2020-09-15 18:25:24 +02:00
Joe
7e9b1a2975
Java: PrintAst: Fix more formatting issues
2020-09-15 17:15:00 +01:00
Ian Lynagh
a912a328a2
C++: Add an upgrade script
2020-09-15 15:36:19 +01:00
Ian Lynagh
56388b57bd
C++: Update stats for new coroutines* tables
2020-09-15 15:36:19 +01:00
Ian Lynagh
99c4bc5175
C++: Add coroutine metadata tables
2020-09-15 15:36:19 +01:00
lcartey@github.com
eaea860d3e
C++: Test for overriding existing simple range analysis ranges.
2020-09-15 15:34:48 +01:00
Jonas Jensen
78560833a1
C++: Add a test distilled from real code
...
Author: @rvermeulen.
The consistency warnings go away because `sink` is defined with a body
in this file.
2020-09-15 16:24:37 +02:00
Joe
3be8fa5155
Java: PrintAst: Fix formatting
2020-09-15 15:10:56 +01:00
Mathias Vorreiter Pedersen
50ad4cfec4
C++: Add comments to {Array,Pointer}StoreNode and arrayStoreStepChi.
2020-09-15 16:03:21 +02:00
Joe
28338eb32e
Java: PrintAst: Various minor fixes of typos
...
Fix references to C#
Fix getAPrimaryQlClass for JavadocTag
Fix typo for Import
Update test outputs
2020-09-15 15:02:56 +01:00
Jonas Jensen
b3c50aed5e
Merge pull request #4262 from github/igfoo/location
...
C++: Deprecate Location subclasses
2020-09-15 15:49:36 +02:00
Joe
53ab8dac06
Java: PrintAst: Fix failing tests
2020-09-15 14:45:48 +01:00
Joe
112b6d28a1
Java: PrintAst: Handle multiple javadocs in one element correctly
2020-09-15 14:45:48 +01:00
Joe
e38b583ec4
Java: PrintAst: Add tests
2020-09-15 14:45:48 +01:00
Joe
b73e7d8390
Java: PrintAST: Support Javadoc
2020-09-15 14:45:48 +01:00
Joe
c3320eeb3c
Java: Improve getAPrimaryQlClass
...
Implement it for more types
Fix typos
2020-09-15 14:45:48 +01:00
Joe
908f025888
Java: PrintAst: Fix a couple of issues related to Annotations
2020-09-15 14:45:48 +01:00
Joe
c20f802666
Java: PrintAst: Supprt generic parameters
2020-09-15 14:45:48 +01:00
Joe
19af3e5e30
Java: Add PrintAST
2020-09-15 14:45:48 +01:00
lcartey@github.com
084992d40b
C++: Support overriding existing range bounds
...
The current support only allows the user to supply bounds for previously
unsupported expressions or for variable accesses. This commit allows
SimpleRangeAnalysisExprs to override built-in range definitions.
2020-09-15 14:43:34 +01:00
Anders Schack-Mulligen
159353d545
Merge pull request #4269 from joefarebrother/PrintAST-java-rename
...
Java: Rename PrintAst.qll to PrettyPrintAst.qll
2020-09-15 15:43:24 +02:00
Jonas Jensen
bdce24735c
C++: Add flow through arrays
...
This works by adding data-flow edges to skip over array expressions when
reading from arrays. On the post-update side, there was already code to
skip over array expressions when storing to arrays. That happens in
`valueToUpdate` in `AddressFlow.qll`, which needed just a small tweak to
support assignments with non-field expressions at the top-level LHS,
like `*a = ...` or `a[0] = ...`.
The new code in `AddressFlow.qll` is copy-pasted from `EscapesTree.qll`,
and there is already a note in these files saying that they share a lot
of code and must be maintained in sync.
2020-09-15 14:46:11 +02:00
Matthew Gretton-Dann
99fd323ded
Don't trace through pkill or pgrep on macOS.
2020-09-15 13:37:22 +01:00
Taus Brock-Nannestad
2e737eda1e
Python: Add a few function-local import tests
2020-09-15 14:25:26 +02:00
Taus Brock-Nannestad
d5e9f36747
Python: Add "enclosing callable" for ModuleVariableNode
...
I've named this `DataFlowModuleScope` since it's not really a
callable (and all of the relevant methods are empty anyway).
2020-09-15 14:23:20 +02:00
Jonas Jensen
27b8dc2b13
C++: Add tests for flow through arrays
2020-09-15 14:19:34 +02:00
Mathias Vorreiter Pedersen
3005f252ca
C++: Fix annotation
2020-09-15 13:34:50 +02:00
Mathias Vorreiter Pedersen
0ba72c6685
C++: Accept changes.
2020-09-15 12:49:22 +02:00
Mathias Vorreiter Pedersen
265a641d06
C++: Use the underlying type to check whether a type is a single-field struct.
2020-09-15 12:49:16 +02:00
CodeQL CI
951e3093d2
Merge pull request #4231 from erik-krogh/CVE767
...
Approved by asgerf
2020-09-15 03:47:40 -07:00
Mathias Vorreiter Pedersen
d18dd5ab09
C++: Add testcase demonstrating the underlying problem in 6ca9c449af.
2020-09-15 12:32:15 +02:00
Joe
efe3ac0a37
Java: Rename the existing file called PrintAst.qll
2020-09-15 11:30:56 +01:00
Erik Krogh Kristensen
2de94abe9f
Merge pull request #4244 from erik-krogh/badJQueryJoin
...
JS: Fix Bad join orders in UnsafeJQueryPlugin
2020-09-15 12:29:25 +02:00
Erik Krogh Kristensen
fa255f3534
add test for self.importScripts(..)
2020-09-15 12:23:48 +02:00
Jonas Jensen
25412da845
Merge pull request #4253 from geoffw0/stringstream2
...
C++: Model more stringstream features
2020-09-15 12:19:26 +02:00
Erik Krogh Kristensen
cc5109d693
Update change-notes/1.26/analysis-javascript.md
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-09-15 12:14:51 +02:00
Tamas Vajk
23a9d0764e
Java: Fix range analysis false negative
2020-09-15 12:09:05 +02:00
Mathias Vorreiter Pedersen
1fbb0fbf54
Merge pull request #4266 from geoffw0/cwe190tests
...
C++: CWE-190 Tests.
2020-09-15 12:08:00 +02:00
Tamas Vajk
c66473cb8a
Java: Add test for range analysis
2020-09-15 12:07:30 +02:00
Asger Feldthaus
d728c3948c
JS: Log the amount of memory passed to TypeScript process
2020-09-15 09:17:42 +01:00
Tom Hvitved
d095d6b56b
Merge pull request #4139 from hvitved/csharp/cfg/foreach-loop-empty
...
C#: Skip `foreach` loop bodies in the CFG when the iteration expression is empty
2020-09-15 09:30:29 +02:00
Robert Marsh
5f2cafc4f5
C++: Interprocedural iterator flow
2020-09-14 14:36:19 -07:00
Erik Krogh Kristensen
c5b5a4fd55
improve performance of NodeJS::NodeModule::exports
2020-09-14 23:28:35 +02:00
Erik Krogh Kristensen
c1cb19abd7
add level PreCallGrapSteps to the callgraph
2020-09-14 23:28:35 +02:00
Erik Krogh Kristensen
f2ecb63e5a
add a direct Export step as a PreCallGraphStep
2020-09-14 23:28:35 +02:00
Erik Krogh Kristensen
29457c52dc
add reexported test to PackageExports test
2020-09-14 23:28:35 +02:00
Erik Krogh Kristensen
61f6580d1e
add API in PackageExports.qll for getting a value exported under a name
2020-09-14 23:28:35 +02:00
Erik Krogh Kristensen
d3653b3030
add support for re-exports using the spread operator for NodeJS exports
2020-09-14 23:28:35 +02:00
Mathias Vorreiter Pedersen
0c14e2b69a
C++: Fix annotations in taint.cpp
2020-09-14 23:08:50 +02:00
Mathias Vorreiter Pedersen
3e56db7f83
C++: Make fieldReadStep private
2020-09-14 20:52:55 +02:00
Mathias Vorreiter Pedersen
7cd6137b34
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-14 20:45:06 +02:00
Geoffrey White
6ca9c449af
C++: Add a test demonstrating the recent regression.
2020-09-14 17:55:20 +01:00
Rasmus Lerchedahl Petersen
839cd829ce
Python: Fix formatting
2020-09-14 18:48:55 +02:00
Taus Brock-Nannestad
3727c48227
Python: Record test changes
...
Some of the places where flow has disappeared look a bit suspect, so I
don't consider this to be the final word on these tests.
2020-09-14 18:12:20 +02:00
Taus Brock-Nannestad
0bb726f21c
Python: Fix up merge weirdness
2020-09-14 17:57:45 +02:00
yoff
5efc06da2c
Update python/ql/src/experimental/dataflow/internal/DataFlowPublic.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-09-14 17:08:39 +02:00
Rasmus Lerchedahl Petersen
4c02852358
Python: add missing * (and a rename)
2020-09-14 16:56:46 +02:00
Erik Krogh Kristensen
03a3c4f4b2
update expected output
2020-09-14 16:50:47 +02:00
Erik Krogh Kristensen
f4f96ce04d
use new source in client-side-url-redirect test
2020-09-14 16:50:47 +02:00
Erik Krogh Kristensen
cb7de2714a
add onmessage handlers registered using global property as PostMessageEventHandler
2020-09-14 16:50:45 +02:00
Asger F
c106b6777c
Merge pull request #4254 from asgerf/js/bump-extractor-version-string
...
JS: Bump extractor version string
2020-09-14 15:17:29 +01:00
Erik Krogh Kristensen
283be19201
add change-note for importScripts
2020-09-14 16:02:34 +02:00
Erik Krogh Kristensen
6e84ac8e6c
add test for importScripts
2020-09-14 16:02:34 +02:00
Erik Krogh Kristensen
2e3df74dce
add importScripts as a sink for js/client-side-unvalidated-url-redirection
2020-09-14 16:02:34 +02:00
Geoffrey White
22097a9e13
C++: Add some CWE-190 tests I had lying around.
2020-09-14 14:39:02 +01:00
Rasmus Lerchedahl Petersen
ecc5a4a1f6
Python: testIsTrue -> branch
2020-09-14 15:32:03 +02:00
yoff
2a4e28db16
Apply suggestions from code review
...
Will make the same renames in the changed code also..
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-09-14 15:28:01 +02:00
Rasmus Lerchedahl Petersen
033529e85e
Python: avoid creating big predicate
2020-09-14 15:24:46 +02:00
Taus Brock-Nannestad
e197f52b6d
Merge branch 'main' into python-add-global-flow-steps
2020-09-14 15:13:07 +02:00
Taus Brock-Nannestad
0b641c5ce9
Python: Update type tracking and strange-essaflow tests
2020-09-14 15:05:16 +02:00
Taus Brock-Nannestad
5fb33c90bc
Python: Add ModuleVariableNode to dataflow
2020-09-14 14:57:32 +02:00
Rasmus Lerchedahl Petersen
543876f980
Python: Fix getAGuardedNode
2020-09-14 14:46:15 +02:00
Ian Lynagh
826c40fcac
C++: Deprecate Location subclasses
...
The main Location class should always be used.
2020-09-14 13:14:18 +01:00
Tamás Vajk
d21c101c0d
Merge pull request #4041 from tamasvajk/feature/update-roslyn
...
C#: upgrade Roslyn dependencies to version 3.7
2020-09-14 13:57:36 +02:00
Tamás Vajk
f5f4b8e25b
C#: Enable nullability of Semmle.Extraction.CSharp.Standalone ( #4115 )
2020-09-14 13:43:57 +02:00
Rasmus Wriedt Larsen
637ea4ad6f
Merge pull request #4226 from RasmusWL/python-missing-1.25-change-notes
...
Python: Add missing 1.25 change notes
2020-09-14 13:18:24 +02:00
Tom Hvitved
0fb9dc5bac
C#: Adjust caching of tuple types
2020-09-14 11:24:46 +02:00
Geoffrey White
6b035df660
C++: Repair taint flow from previous.
2020-09-14 10:21:43 +01:00
Tom Hvitved
e549377561
C#: Construct File::TransformedPathLazy lazily
...
This avoids calling the path transformer for `GeneratedFile`s.
2020-09-14 11:03:00 +02:00
Tom Hvitved
19746023d9
C#: Tidy code for constructing underlying tuple structs
2020-09-14 10:08:58 +02:00
Erik Krogh Kristensen
6fb534f178
fix catastrophic join order in UnsafeJQueryPlugin
2020-09-14 09:59:48 +02:00
Erik Krogh Kristensen
9502869e3c
improve join-order for aliasPropertyPresenceStep
2020-09-14 09:59:22 +02:00
Jonas Jensen
021aa647c1
Merge pull request #4142 from MathiasVP/mathiasvp/read-step-without-memory-operands
...
C++: Use IR alias analysis for field flow
2020-09-14 09:37:27 +02:00
Mathias Vorreiter Pedersen
78b24b76a0
C++: Remove the problematic taint tracking rule. It seems like we get the flows from dataflow already now.
2020-09-14 09:26:41 +02:00
Mathias Vorreiter Pedersen
34a57e2bd4
Merge pull request #4252 from jbj/normalize-bounds
...
C++: SimpleRangeAnalysis: Always normalize bounds after a computation
2020-09-14 09:16:32 +02:00
Faten Healy
6f20516f84
Update broken_crypto.py to AES instead of Blowfish
2020-09-13 21:07:28 +10:00
Faten Healy
826fc0a630
Update BrokenCryptoAlgorithm - Blowfish to AES
2020-09-13 21:04:07 +10:00
Asger Feldthaus
1d92cbb655
JS: Bump extractor version string
2020-09-12 09:22:12 +01:00
Taus Brock-Nannestad
e0f5b208da
Python: Fix broken test of global typetracker flow
...
The missing `global g` annotation meant `g = x` was interpreted as a
local assignment.
2020-09-11 18:17:25 +02:00
lcartey@github.com
eb5782d908
C++: Support customizable ranges for RangeSsaDefinitions.
2020-09-11 17:12:10 +01:00
Geoffrey White
b404a339a4
C++: Correct isQualifierObject -> isQualifierAddress.
2020-09-11 16:15:47 +01:00
Jonas Jensen
fee7ce6c7f
Merge pull request #4221 from rajivshah3/fix/cpp-av-32-include
...
C++: Allow .inc files to be included
2020-09-11 16:53:43 +02:00
Geoffrey White
d3ca140eeb
C++: Account for pointer / reference parameters to operator<<.
2020-09-11 15:20:54 +01:00
Rasmus Lerchedahl Petersen
0eb8b6c7b0
Python: Address review
2020-09-11 14:24:49 +02:00
Calum Grant
3414063f2e
Update change-notes/1.25/analysis-python.md
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswl@github.com >
2020-09-11 13:16:26 +01:00
CodeQL CI
903bc007b8
Merge pull request #4082 from max-schaefer/js/api-graph
...
Approved by asgerf
2020-09-11 04:41:38 -07:00
Jonas Jensen
172becd67f
Merge pull request #4250 from lcartey/cpp/expose-getdefbounds
...
C++: Expose getDef(Upper|Lower)Bound as an internal predicate.
2020-09-11 13:26:08 +02:00
Mathias Vorreiter Pedersen
2d57abdcbe
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-11 12:47:29 +02:00
Geoffrey White
d648150322
C++: Autoformat.
2020-09-11 11:14:58 +01:00
Geoffrey White
dd53e3fe65
C++: Fix data flow to return value.
2020-09-11 11:14:58 +01:00
Geoffrey White
597757d76f
C++: Model std::stringstream put and write.
2020-09-11 11:14:57 +01:00
Geoffrey White
66a5c38eef
C++: Model std::stringstream constructor.
2020-09-11 11:14:57 +01:00
Jonas Jensen
ad11f76ec6
C++: Always normalize bounds after a computation
...
This stops some cases of `-0.0` from propagating through the range
analysis, fixing a false positive on arvidn/libtorrent.
There seems to be no need for a corresponding change in the caller of
`getDefLowerBoundsImpl` since that predicate only contains computations
that cannot introduce negative zero.
2020-09-11 11:59:00 +02:00
Rasmus Lerchedahl Petersen
5dbb4af5b5
Python: Implement BarrierGuard
2020-09-11 11:55:51 +02:00
Jonas Jensen
0c8e06ba68
C++: Tests for -0.0 in range analysis
2020-09-11 11:52:39 +02:00
Tom Hvitved
6c5b30d2a4
C#: Update CIL consistency test
2020-09-11 11:49:07 +02:00
Tom Hvitved
f225a17639
C#: Even more reflection for retrieving meta data handle
2020-09-11 11:49:07 +02:00
lcartey@github.com
65d48a32b8
C++: Expose getDef(Upper|Lower)Bound as an internal predicate.
2020-09-11 09:49:18 +01:00
Tamas Vajk
d60b7c7297
C#: Improve empty collection check to not report on collections with property writes
2020-09-11 10:46:34 +02:00
Mathias Vorreiter Pedersen
ff09104089
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-11 09:25:50 +02:00
Mathias Vorreiter Pedersen
399da6837a
Merge pull request #4227 from jbj/SimpleRangeAnalysis-NotExpr
...
C++: Support `(bool)x` and `!x` in SimpleRangeAnalysis
2020-09-11 08:59:03 +02:00
Bas van Schaik
31495b876e
Python script to generate lists of code scanning queries in CSV format ( #4177 )
...
* Create a PowerShell script that can be used to report on the set of queries inside of a particular QL Suite.
* Translate PowerShell script into Python
* support running this script from anywhere within the CodeQL git repo
* print non-fatal error if metadata is not available
* make sure warning about missing pack is printed to stderr
* only run on pushes against main and rcs
* detect repo by checking remote, rather than first SHA
* specify full sha of dsaltares/fetch-gh-release-asset
* trigger workflow on PR that modifies paths of interest
Co-authored-by: Justin Hutchings <jhutchings1@users.noreply.github.com >
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com >
2020-09-10 12:25:02 -07:00
Rasmus Wriedt Larsen
52d8f7d395
Merge pull request #4235 from yoff/SharedDataflow_UseUseFlow
...
Python: Port use-use implementation from Java
2020-09-10 16:12:28 +02:00
Rasmus Lerchedahl Petersen
92e7a5676d
Python: Address review comments
2020-09-10 15:17:30 +02:00
yoff
3a19b1e7fd
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-09-10 15:06:06 +02:00
Tom Hvitved
2cc635f7e0
C#: Add DB upgrade script
2020-09-10 14:09:40 +02:00
Tom Hvitved
01e766c745
C#: Disable uniqueness constraint from explicitly_implements
...
The documentation on `ExplicitInterfaceImplementations` says "Properties
imported from metadata can explicitly implement more than one property", so
the constraint appears to be invalid.
2020-09-10 14:05:37 +02:00
Tamas Vajk
643a8b57c3
C#: Explicitly handle underlying tuple types
2020-09-10 14:05:37 +02:00
Tamas Vajk
221b92de04
C#: upgrade Roslyn dependencies to version 3.7
2020-09-10 13:53:39 +02:00
Rasmus Wriedt Larsen
fb3060dc3d
Java: Minor fixup for SSA AdjacentUsesImpl::varBlockReaches
...
This should not change anything in regards to correctness overall -- what we
really care about is `varBlockStep`, and that checks `varOccursInBlock(v, b2)`.
However, the comment is a bit easier to read together with the code
now (and probably also gives slightly smaller predicate result size).
2020-09-10 13:47:36 +02:00
Rasmus Wriedt Larsen
949b81b07c
Python: Add dataflow tests for dynamic tuple creation
...
Inspired by the FP-report in https://github.com/github/codeql/issues/4239
2020-09-10 13:44:48 +02:00
Rasmus Wriedt Larsen
f716f9690b
Merge pull request #4132 from yoff/SharedDataflow_NestedComprehensions
...
Python: Shared dataflow, nested comprehensions
2020-09-10 13:28:04 +02:00
Tom Hvitved
a9f322e6c3
Merge pull request #4241 from hvitved/csharp/autobuild-cmd-exit-code
...
C#: Correctly propagate exit code in `autobuild.cmd`
2020-09-10 12:43:43 +02:00
Tom Hvitved
2a3d0072d2
Merge pull request #4242 from hvitved/csharp/fix-failing-windows-tests
...
C#: Fix broken auto-builder tests on Windows
2020-09-10 12:39:01 +02:00
Geoffrey White
fed973f9c4
Merge pull request #4229 from MathiasVP/mathiasvp/make_shared_make_unique-models
...
C++: Add taint models for std::make_unique and std::make_shared
2020-09-10 10:46:30 +01:00
Geoffrey White
34a03ec523
Merge pull request #4213 from rdmarsh2/rdmarsh2/cpp/explicit-conversion-perf
...
C++: Improve performance of getExplicitlyConverted
2020-09-10 10:33:16 +01:00
Tom Hvitved
9629f1c2f4
C#: Also propagate exit code in pre-finalize.cmd
2020-09-10 11:09:38 +02:00
Rasmus Lerchedahl Petersen
2eb8ea85fb
Python: update test expectations
2020-09-10 10:59:26 +02:00
Rasmus Lerchedahl Petersen
deb1a4ceb9
Merge branch 'main' of github.com:github/codeql into SharedDataflow_UseUseFlow
2020-09-10 10:55:34 +02:00
Tom Hvitved
fcf39eaac1
C#: Fix broken auto-builder tests on Windows
2020-09-10 10:46:39 +02:00
Erik Krogh Kristensen
88bbc2f1f4
add change note
2020-09-10 10:39:04 +02:00
Tom Hvitved
a32db3de4b
Simplify exit code logic
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-09-10 10:22:02 +02:00
Rasmus Lerchedahl Petersen
50cc5d58e9
Merge branch 'main' of github.com:github/codeql into SharedDataflow_NestedComprehensions
2020-09-10 10:20:55 +02:00
Tom Hvitved
4cc1e4d1f1
C#: Correctly propagate exit code in autobuild.cmd
2020-09-10 10:01:43 +02:00
Max Schaefer
b71a8e2ad0
JavaScript: Expose an API-graph predicate that is useful for flow summaries.
2020-09-10 08:44:06 +01:00
Tom Hvitved
c45743588c
Merge pull request #4237 from hvitved/csharp/autobuilder/nuget
...
C#: Download nuget.exe in auto-builder if it does not exist
2020-09-10 08:43:39 +02:00
Rasmus Lerchedahl Petersen
7b10a3a546
Python: fix comment and source uses
2020-09-10 08:36:00 +02:00
Robert Marsh
10633019a6
C++: autoformat
2020-09-09 12:45:17 -07:00
Robert Marsh
2e187a51ae
C++: test for interprocedurl iterator flow
2020-09-09 12:45:06 -07:00
Mathias Vorreiter Pedersen
bb9cf72a31
Merge branch 'main' into mathiasvp/make_shared_make_unique-models
2020-09-09 20:51:56 +02:00
Robert Marsh
2c0157553f
C++: accept test improvement from conversions
...
Duplicate results were due to a mishandling of implicit array-to-pointer
conversions.
2020-09-09 11:49:37 -07:00
Geoffrey White
46a07fa9b2
C++: Model std::stringstream::str.
2020-09-09 18:22:06 +01:00
Taus
f4f47bd5ed
Merge pull request #4236 from RasmusWL/python-experimental-taint-sanitizers
...
Python: Expand on taint sanitizer tests
2020-09-09 17:51:24 +02:00
Tom Hvitved
1ce3ac74a1
Address review comments
2020-09-09 16:35:37 +02:00
Taus
17ccc137ae
Merge pull request #4238 from RasmusWL/dataflow-small-fix-for-naming
...
Dataflow: small fixes for naming in taint tracking
2020-09-09 16:26:36 +02:00
Mathias Vorreiter Pedersen
ad602b892b
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-09 16:17:23 +02:00
Tamás Vajk
dfb8761bdc
C#: Add flag to Standalone extractor to use the self contained .Net framework ( #4233 )
2020-09-09 16:12:48 +02:00
Rasmus Wriedt Larsen
b8e057f7ad
Python: isSanitizerGuard test is future work
2020-09-09 15:57:53 +02:00
Rasmus Lerchedahl Petersen
b1567827a0
Python: Repair flow out of post-update nodes
2020-09-09 15:52:07 +02:00
Mathias Vorreiter Pedersen
e91d321d28
Merge pull request #4234 from geoffw0/stringstream
...
C++: Tests and initial models for taint through std::stringstream / std::ostream.
2020-09-09 15:31:46 +02:00
Mathias Vorreiter Pedersen
17867f25a7
C++: Accept more test changes
2020-09-09 15:27:56 +02:00
Jonas Jensen
ceb198f65d
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-NotExpr
2020-09-09 14:50:00 +02:00
Rasmus Wriedt Larsen
2172fb6e65
Dataflow: s/data flow/taint propagation/ in QLDoc for sanitizers
2020-09-09 14:30:33 +02:00
Geoffrey White
d8bb49b9a0
C++: We get a few additional results for DefaultTaintTracking as well.
2020-09-09 13:18:07 +01:00
Rasmus Wriedt Larsen
d90f0be2c4
Dataflow: defaultTaintBarrier => defaultTaintSanitizer
...
Just keeping things a bit more consistent :)
2020-09-09 14:11:56 +02:00
Tom Hvitved
947040aafe
C#: Download nuget.exe in auto-builder if it does not exist
2020-09-09 14:09:41 +02:00
Rasmus Wriedt Larsen
ab8cc23ce7
Python: Expand on taint sanitizer tests
...
Most interesting to look at the custom sanitizers. Once we have use-use flow, we
should handle this case:
```
s = TAINTED_STRING
emulated_authentication_check(s)
ensure_not_tainted(s)
```
2020-09-09 13:57:25 +02:00
Rasmus Lerchedahl Petersen
9e59d79a72
Python: Repair flow from pre-update nodes
2020-09-09 13:51:24 +02:00
Rasmus Lerchedahl Petersen
ce7f82ddc6
Python: Add def-use jump-steps
2020-09-09 13:27:14 +02:00
Mathias Vorreiter Pedersen
8b23461eb5
C++: Update change note.
2020-09-09 12:22:53 +02:00
Mathias Vorreiter Pedersen
8226515138
C++: Add a taint model for std::{shared, unique}_ptr<T>::get
2020-09-09 12:22:29 +02:00
Mathias Vorreiter Pedersen
417424ab75
C++: Add QLDoc and fix comment in isArray (review comments)
2020-09-09 12:21:09 +02:00
Rasmus Lerchedahl Petersen
c661f43316
Python: Port use-use implementation from Java
2020-09-09 12:19:40 +02:00
Geoffrey White
db3f81a98f
C++: Correct QLDoc.
2020-09-09 11:16:14 +01:00
Geoffrey White
3013ef54ef
C++: Change note.
2020-09-09 11:09:47 +01:00
CodeQL CI
a1cec12377
Merge pull request #4220 from erik-krogh/colonCmd
...
Approved by esbena
2020-09-09 10:13:14 +01:00
Rasmus Wriedt Larsen
038688a55c
Python: Minor updates to 1.25 change notes
...
backporting fixes from `@sj`
2020-09-09 10:34:40 +02:00
Mathias Vorreiter Pedersen
9de1fb7c18
Merge pull request #4222 from jbj/BlockStmt
...
C++/Java/JS: Rename Block -> BlockStmt
2020-09-09 10:02:37 +02:00
Erik Krogh Kristensen
cffe573d06
add taint-steps for underscore methods
2020-09-09 09:57:53 +02:00
Erik Krogh Kristensen
eb80705e99
add a taint-step for require("bluebird").mapSeries()
2020-09-09 09:57:53 +02:00
Erik Krogh Kristensen
b97c09a319
use tuples to simplify arrayFunctionTaintStep
2020-09-09 09:57:53 +02:00
Erik Krogh Kristensen
bb97829e1d
add a model for the ClientRequest new require("net").Socket()
2020-09-09 09:57:53 +02:00
Erik Krogh Kristensen
d5097d820d
support direct callbacks to require("net").createServer
2020-09-09 09:46:17 +02:00
Erik Krogh Kristensen
efe3fd7f1e
Update change-notes/1.26/analysis-javascript.md
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-09-09 09:41:15 +02:00
Robert Marsh
30b5975274
C++: autoformat
2020-09-08 14:51:08 -07:00
Robert Marsh
eab1557e27
C++: output iterator flow via FlowVar
2020-09-08 14:09:57 -07:00
Robert Marsh
13c45b6664
C++: remove unnecessary parameter in FlowVar.qll
2020-09-08 13:51:58 -07:00
Robert Marsh
c8cdf68bf9
C++: Remove StdStringBeginEnd
2020-09-08 13:49:57 -07:00
Robert Marsh
703db0b9a6
C++: noisy output iterators in AST taint tracking
2020-09-08 13:45:23 -07:00
Robert Marsh
983f54f11a
C++: simple tests for vector output iterators
2020-09-08 13:27:41 -07:00
Mathias Vorreiter Pedersen
9659afdf09
C++: Accept more test changes
2020-09-08 22:25:33 +02:00
Robert Marsh
44bdf98217
C++: simplify and explain getExplicitlyConverted
2020-09-08 13:02:51 -07:00
Robert Marsh
65cc9888d5
Merge branch 'main' into rdmarsh2/cpp/explicit-conversion-perf
2020-09-08 12:29:34 -07:00
Robert Marsh
083a4b2abc
C++: handle non-casts in hasExplicitConversion
2020-09-08 12:28:16 -07:00
Mathias Vorreiter Pedersen
f025d09bf0
C++: Accept test changes
2020-09-08 19:12:00 +02:00
Mathias Vorreiter Pedersen
978b74f235
C++: Implement taint model for make_shared and make_unique
2020-09-08 19:11:48 +02:00
Mathias Vorreiter Pedersen
7ac5e84925
C++: Add make_shared and make_unique test cases
2020-09-08 19:03:54 +02:00
Geoffrey White
90c7a79272
C++: Fix the object/refs up.
2020-09-08 16:49:11 +01:00
Geoffrey White
5a3d41879a
C++: Change some of the taint flows to data flows.
2020-09-08 16:49:11 +01:00
Geoffrey White
8a143bec3a
C++: Reverse taint through operator<<.
2020-09-08 16:49:10 +01:00
Geoffrey White
b73ff8da63
C++: Flow through operator<<.
2020-09-08 16:49:10 +01:00
Jonas Jensen
911dec6f86
C++: SimpleRangeAnalysis (bool)x and !x support
2020-09-08 16:59:35 +02:00
Jonas Jensen
1b6da062cf
C++: RangeAnalysis tests for bool conversions
2020-09-08 16:58:35 +02:00
Arthur Baars
1f4028f4a0
Java: Add new SQL sinks for Hibernate versions 4 and 6
2020-09-08 16:26:13 +02:00
Erik Krogh Kristensen
4515d27ad2
Merge branch 'main' of https://github.com/github/codeql into pr/erik-krogh/4220
2020-09-08 14:10:15 +00:00
Erik Krogh Kristensen
38679b6d92
add change note
2020-09-08 14:04:40 +00:00
CodeQL CI
9879c6c204
Merge pull request #4184 from aschackmull/java/cleanup-queryinjection
...
Approved by aibaars
2020-09-08 14:52:17 +01:00
Anders Schack-Mulligen
442de2e2d2
Java: Add qldoc.
2020-09-08 15:09:39 +02:00
Mathias Vorreiter Pedersen
5d14688848
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-08 14:38:58 +02:00
Mathias Vorreiter Pedersen
41147d245d
C++: Accept test changes
2020-09-08 14:35:22 +02:00
Mathias Vorreiter Pedersen
faae2e782a
C++: Implement field flow for operator[] writes and pointer deref writes.
2020-09-08 14:35:09 +02:00
Rasmus Wriedt Larsen
2979f9813e
Python: Add missing change notes
...
I looked through PRs between rc/1.24 and rc/1.25 and added missing change notes for:
- https://github.com/github/codeql/pull/3314
- https://github.com/github/codeql/pull/3302
- https://github.com/github/codeql/pull/3212
- https://github.com/github/codeql/pull/3453
- https://github.com/github/codeql/pull/3407
- https://github.com/github/codeql/pull/3563
```
git log --grep="Merge pull request" --format=oneline rc/1.24..rc/1.25 -- python/
```
2020-09-08 14:27:12 +02:00
Jonas Jensen
f92f84e3d4
Merge remote-tracking branch 'upstream/main' into BlockStmt
2020-09-08 14:09:46 +02:00
Nick Rolfe
075ce6edbf
Merge pull request #4178 from github/igfoo/48-coroutine-support-3
...
C++: Add initial support for coroutines operators
2020-09-08 12:44:24 +01:00
Tom Hvitved
4d0a1ee857
Address review comments
2020-09-08 12:54:12 +02:00
Jonas Jensen
0935d1e155
JS: Deprecate the Block class alias
2020-09-08 08:40:20 +02:00
Jonas Jensen
464d3630a2
Java: Rename Block -> BlockStmt
2020-09-08 08:40:20 +02:00
Jonas Jensen
ab90f06ddf
C++: Rename Block -> BlockStmt
2020-09-08 08:40:20 +02:00
Rajiv Shah
f168356181
C++: Allow .inc files to be included
2020-09-07 18:09:21 -04:00
Ian Lynagh
d49bc4ccda
C++: Tweak qldoc for coroutines
2020-09-07 20:39:11 +01:00
Ian Lynagh
4bf545548b
C++: Tweak to make qlformat happy
2020-09-07 20:37:01 +01:00
Ian Lynagh
86c58afa48
C++: Update stats for co_await/co_yield/co_return
2020-09-07 20:37:01 +01:00
Ian Lynagh
49f7baf5a9
C++: Add an upgrade script
2020-09-07 20:37:01 +01:00
Ian Lynagh
cca276be84
C++: Remove co_await range-based-for support for now
...
Initial impl won't support it
2020-09-07 20:37:01 +01:00
Ian Lynagh
78b522722c
C++: Split CoReturnStmt.getExpr into CoReturnStmt.{getOperand,getExpr}
2020-09-07 20:37:01 +01:00
Matthew Gretton-Dann
8b8b9d6fe3
Actually sort add Statement support
...
This commit fixes the previous one.
2020-09-07 20:37:01 +01:00
Matthew Gretton-Dann
5df5e6dfce
Add initial QL support classes for coroutines
...
Add classes for expressions co_yield and co_await.
Adds classes for statements co_return and `for co_await`.
2020-09-07 20:37:01 +01:00
Matthew Gretton-Dann
8199b3a230
C++: Add DB schema support for coroutines
2020-09-07 20:37:01 +01:00
Geoffrey White
6ef67af743
C++: Add models for stringstream methods.
2020-09-07 18:27:42 +01:00
Geoffrey White
fafd2f0a7c
C++: Add test cases for stringstream / ostream.
2020-09-07 18:27:42 +01:00
CodeQL CI
22b3b0a5f1
Merge pull request #3953 from RasmusWL/python-more-call-graph-tracing
...
Approved by tausbn
2020-09-07 17:34:14 +01:00
Max Schaefer
b8a492473b
JavaScript: Stop tracking canonical function names in API graphs.
...
This blows up on the TypeScript compiler, and is likely to be much less useful than tracking type names and namespaces, which we still do.
2020-09-07 16:47:45 +01:00
Asger F
d3f19721e6
Merge pull request #4153 from erik-krogh/snake_case_pr
...
JS: rename dbscheme predicates to consistently use snake_case in dbscheme
2020-09-07 16:21:32 +01:00
Mathias Vorreiter Pedersen
9c1837e3b3
C++: Rename getField to getAField following review comments.
2020-09-07 16:52:04 +02:00
Jonas Jensen
3493c93d7b
Merge pull request #4218 from MathiasVP/mathiasvp/fix-fp-av82
...
C++: Add cases for conditional and comma operator in AV Rule 82
2020-09-07 15:27:07 +02:00
Tom Hvitved
6c716331d9
C#: Skip foreach loop bodies in the CFG when the iteration expression is empty
2020-09-07 15:26:28 +02:00
Tom Hvitved
9e240b7397
C#: Add more CFG loop unrolling tests
2020-09-07 15:26:25 +02:00
Rasmus Wriedt Larsen
61998afc56
Python: Remove unnecessary comment
...
Was introduced in 5d031d7abe when I actually fixed
the loop variable capture problem.
2020-09-07 15:06:07 +02:00
Tom Hvitved
37f1ce3122
C#: Implement support for path transformers
2020-09-07 15:02:50 +02:00
Max Schaefer
423d87b812
JavaScript: Rename TNode to TApiNode.
...
This prevents spurious recomputation of a cached stage.
2020-09-07 14:02:37 +01:00
Rasmus Wriedt Larsen
fb37330f5e
Python: Fix grammar
...
Co-authored-by: Taus <tausbn@github.com >
2020-09-07 14:59:07 +02:00
Erik Krogh Kristensen
55b79f445c
recognize commands with slash and underscore
2020-09-07 14:28:28 +02:00
Jonas Jensen
3a7bf2a15a
Merge pull request #3933 from MathiasVP/alternative-instruction-operand-flow
...
C++: Alternate instruction -> operand flow
2020-09-07 13:37:20 +02:00
Erik Krogh Kristensen
320879bc1e
recognize colon in command-prefixes
2020-09-07 13:12:38 +02:00
Jonas Jensen
0fe5d75375
Merge pull request #4196 from MathiasVP/mathiasvp/field-to-object-taint-tests
...
C++: Add field to object taint tests
2020-09-07 13:02:22 +02:00
CodeQL CI
85f6388a19
Merge pull request #4206 from erik-krogh/consistentJquery
...
Approved by esbena
2020-09-07 11:23:23 +01:00
Tom Hvitved
68f421f9c3
Merge pull request #4205 from tamasvajk/feature/printast-accessor
...
C#: Add stable order for generated accessors in printed AST
2020-09-07 11:25:46 +02:00
Erik Krogh Kristensen
8ada928b16
Merge branch 'main' into snake_case_pr
2020-09-07 11:12:57 +02:00
Erik Krogh Kristensen
4175637631
add change note for unsafe-jquery
2020-09-07 11:08:21 +02:00
Erik Krogh Kristensen
61e2e5647c
autoformat
2020-09-07 11:05:56 +02:00
CodeQL CI
b5872fe848
Merge pull request #3873 from asger-semmle/js/type-qualified-name-fallback
...
Approved by erik-krogh
2020-09-07 09:48:05 +01:00
yoff
2a70da4da6
Merge pull request #4210 from tausbn/python-remove-spurious-global-flow
...
Python: Remove implicit uses from `essaFlowStep`
2020-09-07 10:16:18 +02:00
yoff
ae9f58489d
Merge pull request #4159 from RasmusWL/python-port-dataflow-tests
...
Python: port dataflow tests
2020-09-07 09:54:12 +02:00
Tom Hvitved
14567f5314
C#: Support wild-cards in file patterns
...
Implements the specification at https://wiki.semmle.com/display/SDmaster/project-layout+format
by compiling file path specifications to regular expressions.
2020-09-07 09:03:56 +02:00
Mathias Vorreiter Pedersen
b3d18ef610
C++: Add cases for conditional and comma operator in AV RUle 82
2020-09-07 08:59:08 +02:00
Mathias Vorreiter Pedersen
a5ac8ebc2f
C++: Don't import internals.
2020-09-05 11:47:22 +02:00
Robert Marsh
4be138d790
C++: Improve performance of getExplicitlyConverted
2020-09-04 14:17:56 -07:00
Mathias Vorreiter Pedersen
a4890ef99c
C++: Add annotations describing whether the flow is an instance of field-to-object flow
2020-09-04 18:32:28 +02:00
Mathias Vorreiter Pedersen
cfd606a4e0
Merge branch 'main' into alternative-instruction-operand-flow
2020-09-04 18:26:38 +02:00
Mathias Vorreiter Pedersen
208b85c7fc
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-04 18:04:15 +02:00
Jonas Jensen
eea893483d
Merge pull request #4209 from geoffw0/taintbits
...
C++: Fix a few remaining holes in taint through std::string
2020-09-04 17:52:48 +02:00
Jonas Jensen
f92139d2b0
Merge pull request #4202 from geoffw0/localhidesparam
...
C++: Improve handling of template functions in cpp/declaration-hides-parameter
2020-09-04 17:52:35 +02:00
Mathias Vorreiter Pedersen
ed7e499b02
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-04 17:25:36 +02:00
Mathias Vorreiter Pedersen
c67951682a
C++: Fix two bad join orders in readStep and storeStep. And use a min aggregate to guarentee that a FieldContent's toString has at most one result.
2020-09-04 17:12:30 +02:00
Taus Brock-Nannestad
266365d0b6
Python: Update strange-essaflow test
2020-09-04 16:38:59 +02:00
Taus Brock-Nannestad
260763a748
Python: Update consistency test results
2020-09-04 16:35:49 +02:00
Taus Brock-Nannestad
df1448cfb2
Merge branch 'main' into python-remove-spurious-global-flow
2020-09-04 16:28:03 +02:00
Geoffrey White
156a174cf4
C++: Add explanation.
2020-09-04 14:55:55 +01:00
Geoffrey White
96098c5244
C++: Simplify getConstructedFrom.
2020-09-04 14:52:01 +01:00
Taus
5ffc959e32
Merge pull request #4211 from RasmusWL/python-strange-essaflow
...
Python: Add example of strange DataFlow::jumpStep
2020-09-04 15:47:22 +02:00
Geoffrey White
2472b40b31
C++: Fix test comments.
2020-09-04 14:37:23 +01:00
Geoffrey White
43d8e83258
Merge branch 'main' into taintbits
2020-09-04 14:26:42 +01:00
Rasmus Wriedt Larsen
720e8c432e
Python: Update comment for validTest expectations
2020-09-04 15:08:57 +02:00
Geoffrey White
5d1c2a3689
Merge pull request #4204 from jbj/SimpleRangeAnalysis-NEExpr
...
C++: Support `!= constant` in range analysis
2020-09-04 13:47:59 +01:00
Rasmus Wriedt Larsen
cf57afd102
Python: Add example of strange DataFlow::jumpStep
...
The example code is just copied from command injection tests, that is not too
important. The important part is that `jumpStep` says there is flow from the
import of `os` to `app.route()` :O
2020-09-04 14:39:16 +02:00
Taus
59c7907ee4
Merge pull request #4207 from RasmusWL/python-typetracker-small-fixes
...
Python: Small fixes for TypeTracker
2020-09-04 14:30:10 +02:00
Taus Brock-Nannestad
98266ad5da
Python: Remove implicit uses from essaFlowStep
2020-09-04 14:22:43 +02:00
Erik Krogh Kristensen
f13a4f5771
require that the plugin and sink are in the same toplevel
2020-09-04 13:59:16 +02:00
Rasmus Wriedt Larsen
6aae75799e
Python: Fix import in type tracking test
...
Fixes 7855576a6
2020-09-04 13:36:25 +02:00
CodeQL CI
fd715a5b66
Merge pull request #4179 from RasmusWL/python-tainttracking-ala-go
...
Approved by tausbn, yoff
2020-09-04 12:20:12 +01:00
Erik Krogh Kristensen
d47c852767
autoformat
2020-09-04 12:44:18 +02:00
Jonas Jensen
958f89905d
Merge pull request #4197 from github/aeisenberg/devcontainer-settings
...
Update devcontainer memory settings
2020-09-04 12:42:34 +02:00
Max Schaefer
cfc91cc5f1
JavaScript: Drop "feature" terminology.
...
It turned out to be more confusing than helpful, so we're back with plain old API-graph "nodes".
2020-09-04 10:57:21 +01:00
Erik Krogh Kristensen
9ed9ecd333
copied updated dbscheme to upgrade folder
2020-09-04 11:55:39 +02:00
Erik Krogh Kristensen
6e54cf426c
autoformat
2020-09-04 11:55:39 +02:00
Erik Krogh Kristensen
5a159abd75
renamed "interfacedefinition" to "interface_definition"
2020-09-04 11:55:33 +02:00
Erik Krogh Kristensen
3785a10ee8
renamed "classdefinition" to "class_definition"
2020-09-04 11:55:32 +02:00
Erik Krogh Kristensen
5467efe117
renamed "typeassertion" to "type_assertion"
2020-09-04 11:55:31 +02:00
Erik Krogh Kristensen
4af9508506
renamed "importspecifier" to "import_specifier"
2020-09-04 11:55:30 +02:00
Erik Krogh Kristensen
35caaf5c93
renamed "comprehensionblock" to "comprehension_block"
2020-09-04 11:55:30 +02:00
Erik Krogh Kristensen
273ae710b0
renamed "comprehensionexpr" to "comprehension_expr"
2020-09-04 11:55:29 +02:00
Erik Krogh Kristensen
586a823ce7
renamed "exprparent" to "expr_parent"
2020-09-04 11:55:28 +02:00
Erik Krogh Kristensen
b28cbf310e
renamed "typedefinition" to "type_definition"
2020-09-04 11:55:28 +02:00
Erik Krogh Kristensen
bcbd1f045f
renamed "namespacedefinition" to "namespace_definition"
2020-09-04 11:55:27 +02:00
Erik Krogh Kristensen
8c812dcdfb
renamed "exportdeclaration" to "export_declaration"
2020-09-04 11:55:26 +02:00
Erik Krogh Kristensen
4f8d2156c0
renamed "declstmt" to "decl_stmt"
2020-09-04 11:55:26 +02:00
Erik Krogh Kristensen
5e58d34e19
renamed "exportasnamespacedeclaration" to "export_as_namespace_declaration"
2020-09-04 11:55:25 +02:00
Erik Krogh Kristensen
723a1b8483
renamed "enumdeclaration" to "enum_declaration"
2020-09-04 11:55:24 +02:00
Erik Krogh Kristensen
0d5db155e6
renamed "typealiasdeclaration" to "type_alias_declaration"
2020-09-04 11:55:23 +02:00
Erik Krogh Kristensen
232dbe9fd1
renamed "interfacedeclaration" to "interface_declaration"
2020-09-04 11:55:23 +02:00
Erik Krogh Kristensen
7b94cf7d8e
renamed "doccomment" to "doc_comment"
2020-09-04 11:55:22 +02:00
Erik Krogh Kristensen
9a66f3a721
renamed "slashstarcomment" to "slashstar_comment"
2020-09-04 11:55:21 +02:00
Erik Krogh Kristensen
13a593c7b4
renamed "slashslashcomment" to "slashslash_comment"
2020-09-04 11:55:21 +02:00
Erik Krogh Kristensen
132d6d0068
renamed "htmlcommentstart" to "html_comment_start"
2020-09-04 11:55:20 +02:00
Erik Krogh Kristensen
6be328b400
renamed "blockcomment" to "block_comment"
2020-09-04 11:55:19 +02:00
Erik Krogh Kristensen
03617fe18b
renamed "linecomment" to "line_comment"
2020-09-04 11:55:18 +02:00
Erik Krogh Kristensen
136345d745
renamed "htmlcomment" to "html_comment"
2020-09-04 11:55:17 +02:00
Erik Krogh Kristensen
db0747876e
renamed "booleanliteraltype" to "boolean_literal_type"
2020-09-04 11:55:16 +02:00
Erik Krogh Kristensen
5ea08b9c0c
renamed "bigintliteraltype" to "bigint_literal_type"
2020-09-04 11:55:16 +02:00
Erik Krogh Kristensen
a35e0f9306
renamed "biginttype" to "bigint_type"
2020-09-04 11:55:15 +02:00
Erik Krogh Kristensen
0c0abefe5a
renamed "unknowntype" to "unknown_type"
2020-09-04 11:55:14 +02:00
Erik Krogh Kristensen
2481775af5
renamed "stringliteraltype" to "string_literal_type"
2020-09-04 11:55:13 +02:00
Erik Krogh Kristensen
bd3ab9d599
renamed "numberliteraltype" to "number_literal_type"
2020-09-04 11:55:12 +02:00
Erik Krogh Kristensen
6f277a7435
renamed "thistype" to "this_type"
2020-09-04 11:55:11 +02:00
Erik Krogh Kristensen
27540e77b1
renamed "lexicaltypevariabletype" to "lexical_type_variable_type"
2020-09-04 11:55:10 +02:00
Erik Krogh Kristensen
9bab197a80
renamed "tupletype" to "tuple_type"
2020-09-04 11:55:09 +02:00
Erik Krogh Kristensen
38d033644c
renamed "intersectiontype" to "intersection_type"
2020-09-04 11:55:08 +02:00
Erik Krogh Kristensen
2b3e8869c6
renamed "objectkeywordtype" to "objectkeyword_type"
2020-09-04 11:55:07 +02:00
Erik Krogh Kristensen
174afbc0df
renamed "uniquesymboltype" to "unique_symbol_type"
2020-09-04 11:55:06 +02:00
Erik Krogh Kristensen
a1daf0a428
renamed "plainsymboltype" to "plain_symbol_type"
2020-09-04 11:55:06 +02:00
Erik Krogh Kristensen
b1812b1be2
renamed "nevertype" to "never_type"
2020-09-04 11:55:05 +02:00
Erik Krogh Kristensen
8b2769953f
renamed "nulltype" to "null_type"
2020-09-04 11:55:04 +02:00
Erik Krogh Kristensen
1891a3fb49
renamed "undefinedtype" to "undefined_type"
2020-09-04 11:55:03 +02:00
Erik Krogh Kristensen
d95fc64f87
renamed "voidtype" to "void_type"
2020-09-04 11:55:02 +02:00
Erik Krogh Kristensen
37bdea4011
renamed "typeoftype" to "typeof_type"
2020-09-04 11:55:01 +02:00
Erik Krogh Kristensen
11214b574e
renamed "canonicaltypevariabletype" to "canonical_type_variable_type"
2020-09-04 11:55:00 +02:00
Erik Krogh Kristensen
1d9dd92389
renamed "objecttype" to "object_type"
2020-09-04 11:54:59 +02:00
Erik Krogh Kristensen
b72daf6559
renamed "typereference" to "type_reference"
2020-09-04 11:54:58 +02:00
Erik Krogh Kristensen
01e3888c36
renamed "falsetype" to "false_type"
2020-09-04 11:54:57 +02:00
Erik Krogh Kristensen
b3c3069c24
renamed "truetype" to "true_type"
2020-09-04 11:54:57 +02:00
Erik Krogh Kristensen
2a7b6310ad
renamed "uniontype" to "union_type"
2020-09-04 11:54:56 +02:00
Erik Krogh Kristensen
0475e9e93c
renamed "numbertype" to "number_type"
2020-09-04 11:54:55 +02:00
Erik Krogh Kristensen
e0880c8cb1
renamed "stringtype" to "string_type"
2020-09-04 11:54:55 +02:00
Erik Krogh Kristensen
579d4e0d75
renamed "anytype" to "any_type"
2020-09-04 11:54:54 +02:00
Erik Krogh Kristensen
62afd50d71
renamed "typeidentifier" to "type_identifier"
2020-09-04 11:54:53 +02:00
Erik Krogh Kristensen
e2e10c3a75
renamed "conditionaltypescope" to "conditional_type_scope"
2020-09-04 11:54:52 +02:00
Erik Krogh Kristensen
3553fe8ed8
renamed "externalmodulescope" to "external_module_scope"
2020-09-04 11:54:52 +02:00
Erik Krogh Kristensen
602f627e14
renamed "enumscope" to "enum_scope"
2020-09-04 11:54:51 +02:00
Erik Krogh Kristensen
4fe2b9dcda
renamed "mappedtypescope" to "mapped_type_scope"
2020-09-04 11:54:50 +02:00
Erik Krogh Kristensen
8b09f1dcb2
renamed "typealiasscope" to "type_alias_scope"
2020-09-04 11:54:50 +02:00
Erik Krogh Kristensen
f76329c9e3
renamed "interfacescope" to "interface_scope"
2020-09-04 11:54:49 +02:00
Erik Krogh Kristensen
24f0b20c3a
renamed "classdeclscope" to "class_decl_scope"
2020-09-04 11:54:48 +02:00
Erik Krogh Kristensen
07cef9ec36
renamed "namespacescope" to "namespace_scope"
2020-09-04 11:54:47 +02:00
Erik Krogh Kristensen
345b1ee188
renamed "classexprscope" to "class_expr_scope"
2020-09-04 11:54:47 +02:00
Erik Krogh Kristensen
8370573df0
renamed "comprehensionblockscope" to "comprehension_block_scope"
2020-09-04 11:54:46 +02:00
Erik Krogh Kristensen
9be0740b93
renamed "forinscope" to "for_in_scope"
2020-09-04 11:54:45 +02:00
Erik Krogh Kristensen
310f9708ea
renamed "forscope" to "for_scope"
2020-09-04 11:54:44 +02:00
Erik Krogh Kristensen
a45103d07d
renamed "blockscope" to "block_scope"
2020-09-04 11:54:44 +02:00
Erik Krogh Kristensen
93aa812744
renamed "modulescope" to "module_scope"
2020-09-04 11:54:43 +02:00
Erik Krogh Kristensen
5f06bf05bd
renamed "catchscope" to "catch_scope"
2020-09-04 11:54:42 +02:00
Erik Krogh Kristensen
a871963481
renamed "functionscope" to "function_scope"
2020-09-04 11:54:41 +02:00
Erik Krogh Kristensen
1341f4beb4
renamed "globalscope" to "global_scope"
2020-09-04 11:54:41 +02:00
Erik Krogh Kristensen
05e0d1a02d
renamed "importmetaexpr" to "import_meta_expr"
2020-09-04 11:54:40 +02:00
Erik Krogh Kristensen
ef5e1b0862
renamed "nullishcoalescingexpr" to "nullishcoalescing_expr"
2020-09-04 11:54:39 +02:00
Erik Krogh Kristensen
b2f28cab27
renamed "bigintliteral" to "bigint_literal"
2020-09-04 11:54:38 +02:00
Erik Krogh Kristensen
56c440b577
renamed "astypeassertion" to "as_type_assertion"
2020-09-04 11:54:37 +02:00
Erik Krogh Kristensen
ccdfe25f88
renamed "prefixtypeassertion" to "prefix_type_assertion"
2020-09-04 11:54:37 +02:00
Erik Krogh Kristensen
27a017671d
renamed "dynamicimport" to "dynamic_import"
2020-09-04 11:54:36 +02:00
Erik Krogh Kristensen
94b5645de2
renamed "externalmodulereference" to "external_module_reference"
2020-09-04 11:54:35 +02:00
Erik Krogh Kristensen
dec030558a
renamed "bindexpr" to "bind_expr"
2020-09-04 11:54:35 +02:00
Erik Krogh Kristensen
1fa3e4d2f1
renamed "exportnamespacespecifier" to "export_namespace_specifier"
2020-09-04 11:54:34 +02:00
Erik Krogh Kristensen
004ea10f2c
renamed "exportdefaultspecifier" to "export_default_specifier"
2020-09-04 11:54:33 +02:00
Erik Krogh Kristensen
4b99d056d2
renamed "functionsentexpr" to "function_sent_expr"
2020-09-04 11:54:32 +02:00
Erik Krogh Kristensen
45e6797a27
renamed "awaitexpr" to "await_expr"
2020-09-04 11:54:32 +02:00
Erik Krogh Kristensen
0785b9b81d
renamed "jsxelement" to "jsx_element"
2020-09-04 11:54:31 +02:00
Erik Krogh Kristensen
cdc97bf1f4
renamed "assignexpexpr" to "assign_exp_expr"
2020-09-04 11:54:30 +02:00
Erik Krogh Kristensen
5d06fe37e7
renamed "expexpr" to "exp_expr"
2020-09-04 11:54:29 +02:00
Erik Krogh Kristensen
144c064e93
renamed "namedexportspecifier" to "named_export_specifier"
2020-09-04 11:54:29 +02:00
Erik Krogh Kristensen
0cf6cca676
renamed "importnamespacespecifier" to "import_namespace_specifier"
2020-09-04 11:54:28 +02:00
Erik Krogh Kristensen
bc287ba472
renamed "importdefaultspecifier" to "import_default_specifier"
2020-09-04 11:54:27 +02:00
Erik Krogh Kristensen
ae32211080
renamed "namedimportspecifier" to "named_import_specifier"
2020-09-04 11:54:27 +02:00
Erik Krogh Kristensen
2e0d886d2b
renamed "newtargetexpr" to "newtarget_expr"
2020-09-04 11:54:26 +02:00
Erik Krogh Kristensen
a3f2c8f234
renamed "superexpr" to "super_expr"
2020-09-04 11:54:25 +02:00
Erik Krogh Kristensen
2efb2a2392
renamed "classexpr" to "class_expr"
2020-09-04 11:54:24 +02:00
Erik Krogh Kristensen
b34a471235
renamed "vardecl" to "var_decl"
2020-09-04 11:54:24 +02:00
Erik Krogh Kristensen
fa14369816
renamed "forofcomprehensionblock" to "for_of_comprehension_block"
2020-09-04 11:54:23 +02:00
Erik Krogh Kristensen
013b7f19b9
renamed "forincomprehensionblock" to "for_in_comprehension_block"
2020-09-04 11:54:22 +02:00
Erik Krogh Kristensen
e8ceed247b
renamed "generatorexpr" to "generator_expr"
2020-09-04 11:54:21 +02:00
Erik Krogh Kristensen
840bd90c02
renamed "arraycomprehensionexpr" to "array_comprehension_expr"
2020-09-04 11:54:20 +02:00
Erik Krogh Kristensen
cd879a6445
renamed "templateelement" to "template_element"
2020-09-04 11:54:20 +02:00
Erik Krogh Kristensen
2edf0b248b
renamed "templateliteral" to "template_literal"
2020-09-04 11:54:19 +02:00
Erik Krogh Kristensen
16a79a2f03
renamed "taggedtemplateexpr" to "tagged_template_expr"
2020-09-04 11:54:18 +02:00
Erik Krogh Kristensen
6372819684
renamed "yieldexpr" to "yield_expr"
2020-09-04 11:54:17 +02:00
Erik Krogh Kristensen
a4b2c9a114
renamed "objectpattern" to "object_pattern"
2020-09-04 11:54:17 +02:00
Erik Krogh Kristensen
79a8dcada3
renamed "arraypattern" to "array_pattern"
2020-09-04 11:54:16 +02:00
Erik Krogh Kristensen
fdd25ef5f8
renamed "spreadelement" to "spread_element"
2020-09-04 11:54:15 +02:00
Erik Krogh Kristensen
7944ab2324
renamed "vardeclarator" to "var_declarator"
2020-09-04 11:54:14 +02:00
Erik Krogh Kristensen
5d47248878
renamed "parexpr" to "par_expr"
2020-09-04 11:54:14 +02:00
Erik Krogh Kristensen
fb7b0eb629
renamed "postdecexpr" to "postdec_expr"
2020-09-04 11:54:13 +02:00
Erik Krogh Kristensen
68d6b3f236
renamed "predecexpr" to "predec_expr"
2020-09-04 11:54:12 +02:00
Erik Krogh Kristensen
ff70caf2a0
renamed "postincexpr" to "postinc_expr"
2020-09-04 11:54:11 +02:00
Erik Krogh Kristensen
bb8a8eeb77
renamed "preincexpr" to "preinc_expr"
2020-09-04 11:54:11 +02:00
Erik Krogh Kristensen
7a1c751062
renamed "assignandexpr" to "assign_and_expr"
2020-09-04 11:54:10 +02:00
Erik Krogh Kristensen
01b0a53d48
renamed "assignxorexpr" to "assign_xor_expr"
2020-09-04 11:54:09 +02:00
Erik Krogh Kristensen
8a5a25bdc3
renamed "assignorexpr" to "assign_or_expr"
2020-09-04 11:54:08 +02:00
Erik Krogh Kristensen
0cece7f7d7
renamed "assignurshiftexpr" to "assign_urshift_expr"
2020-09-04 11:54:08 +02:00
Erik Krogh Kristensen
f0fc6b3d7a
renamed "assignrshiftexpr" to "assign_rshift_expr"
2020-09-04 11:54:07 +02:00
Erik Krogh Kristensen
dae29372cf
renamed "assignlshiftexpr" to "assign_lshift_expr"
2020-09-04 11:54:06 +02:00
Erik Krogh Kristensen
7e05a721f8
renamed "assignmodexpr" to "assign_mod_expr"
2020-09-04 11:54:05 +02:00
Erik Krogh Kristensen
a9eefac985
renamed "assigndivexpr" to "assign_div_expr"
2020-09-04 11:54:04 +02:00
Erik Krogh Kristensen
aadee91def
renamed "assignmulexpr" to "assign_mul_expr"
2020-09-04 11:54:03 +02:00
Erik Krogh Kristensen
e9e7097edb
renamed "assignsubexpr" to "assign_sub_expr"
2020-09-04 11:54:02 +02:00
Erik Krogh Kristensen
1833464d23
renamed "assignaddexpr" to "assign_add_expr"
2020-09-04 11:54:01 +02:00
Erik Krogh Kristensen
f32c89b652
renamed "assignexpr" to "assign_expr"
2020-09-04 11:54:01 +02:00
Erik Krogh Kristensen
10a412175d
renamed "logorexpr" to "logor_expr"
2020-09-04 11:54:00 +02:00
Erik Krogh Kristensen
cabe2af8e3
renamed "logandexpr" to "logand_expr"
2020-09-04 11:53:59 +02:00
Erik Krogh Kristensen
ae4593f942
renamed "instanceofexpr" to "instanceof_expr"
2020-09-04 11:53:58 +02:00
Erik Krogh Kristensen
416d2bd609
renamed "inexpr" to "in_expr"
2020-09-04 11:53:57 +02:00
Erik Krogh Kristensen
006ba2e0bf
renamed "bitandexpr" to "bitand_expr"
2020-09-04 11:53:57 +02:00
Erik Krogh Kristensen
b0fce918c6
renamed "xorexpr" to "xor_expr"
2020-09-04 11:53:56 +02:00
Erik Krogh Kristensen
c0a8e3ff90
renamed "bitorexpr" to "bitor_expr"
2020-09-04 11:53:55 +02:00
Erik Krogh Kristensen
335406d212
renamed "modexpr" to "mod_expr"
2020-09-04 11:53:55 +02:00
Erik Krogh Kristensen
a0b75a3606
renamed "divexpr" to "div_expr"
2020-09-04 11:53:54 +02:00
Erik Krogh Kristensen
df85a37f6e
renamed "mulexpr" to "mul_expr"
2020-09-04 11:53:53 +02:00
Erik Krogh Kristensen
3d03974d8e
renamed "subexpr" to "sub_expr"
2020-09-04 11:53:52 +02:00
Erik Krogh Kristensen
3af0cad6aa
renamed "addexpr" to "add_expr"
2020-09-04 11:53:52 +02:00
Erik Krogh Kristensen
11f7fabba8
renamed "urshiftexpr" to "urshift_expr"
2020-09-04 11:53:51 +02:00
Erik Krogh Kristensen
6b38ed0e1e
renamed "rshiftexpr" to "rshift_expr"
2020-09-04 11:53:50 +02:00
Erik Krogh Kristensen
b7c441e514
renamed "lshiftexpr" to "lshift_expr"
2020-09-04 11:53:49 +02:00
Erik Krogh Kristensen
1f07e6afc1
renamed "geexpr" to "ge_expr"
2020-09-04 11:53:49 +02:00
Erik Krogh Kristensen
4b625e7ac7
renamed "gtexpr" to "gt_expr"
2020-09-04 11:53:48 +02:00
Erik Krogh Kristensen
ce0eabf998
renamed "leexpr" to "le_expr"
2020-09-04 11:53:47 +02:00
Erik Krogh Kristensen
2744a37dbb
renamed "ltexpr" to "lt_expr"
2020-09-04 11:53:46 +02:00
Erik Krogh Kristensen
17705100d4
renamed "neqqexpr" to "neqq_expr"
2020-09-04 11:53:46 +02:00
Erik Krogh Kristensen
c634f274ee
renamed "eqqexpr" to "eqq_expr"
2020-09-04 11:53:45 +02:00
Erik Krogh Kristensen
428e599cd2
renamed "neqexpr" to "neq_expr"
2020-09-04 11:53:44 +02:00
Erik Krogh Kristensen
51abeebb66
renamed "eqexpr" to "eq_expr"
2020-09-04 11:53:43 +02:00
Erik Krogh Kristensen
3b1f3f85bb
renamed "deleteexpr" to "delete_expr"
2020-09-04 11:53:43 +02:00
Erik Krogh Kristensen
82c049c713
renamed "voidexpr" to "void_expr"
2020-09-04 11:53:42 +02:00
Erik Krogh Kristensen
f4c1719440
renamed "typeofexpr" to "typeof_expr"
2020-09-04 11:53:41 +02:00
Erik Krogh Kristensen
5dfbcdc32c
renamed "bitnotexpr" to "bit_not_expr"
2020-09-04 11:53:40 +02:00
Erik Krogh Kristensen
d1f9d03d2c
renamed "lognotexpr" to "log_not_expr"
2020-09-04 11:53:40 +02:00
Erik Krogh Kristensen
7752eabccb
renamed "plusexpr" to "plus_expr"
2020-09-04 11:53:39 +02:00
Erik Krogh Kristensen
3604535270
renamed "negexpr" to "neg_expr"
2020-09-04 11:53:38 +02:00
Erik Krogh Kristensen
e7ef992944
renamed "indexexpr" to "index_expr"
2020-09-04 11:53:37 +02:00
Erik Krogh Kristensen
6c47f7eaba
renamed "dotexpr" to "dot_expr"
2020-09-04 11:53:37 +02:00
Erik Krogh Kristensen
f5e40ac727
renamed "callexpr" to "call_expr"
2020-09-04 11:53:36 +02:00
Erik Krogh Kristensen
3e8f9a1549
renamed "newexpr" to "new_expr"
2020-09-04 11:53:35 +02:00
Erik Krogh Kristensen
d58ae72072
renamed "conditionalexpr" to "conditional_expr"
2020-09-04 11:53:34 +02:00
Erik Krogh Kristensen
4c8245036e
renamed "seqexpr" to "seq_expr"
2020-09-04 11:53:34 +02:00
Erik Krogh Kristensen
05fbb2902e
renamed "objexpr" to "obj_expr"
2020-09-04 11:53:33 +02:00
Erik Krogh Kristensen
7317ee9992
renamed "arrayexpr" to "array_expr"
2020-09-04 11:53:32 +02:00
Erik Krogh Kristensen
29b03aebd9
renamed "thisexpr" to "this_expr"
2020-09-04 11:53:32 +02:00
Erik Krogh Kristensen
fa8ae793f2
renamed "regexpliteral" to "regexp_literal"
2020-09-04 11:53:31 +02:00
Erik Krogh Kristensen
91c3e51503
renamed "stringliteral" to "string_literal"
2020-09-04 11:53:30 +02:00
Erik Krogh Kristensen
960576438c
renamed "numberliteral" to "number_literal"
2020-09-04 11:53:29 +02:00
Erik Krogh Kristensen
f212e85426
renamed "booleanliteral" to "boolean_literal"
2020-09-04 11:53:29 +02:00
Erik Krogh Kristensen
6beaec0c71
renamed "nullliteral" to "null_literal"
2020-09-04 11:53:28 +02:00
Erik Krogh Kristensen
612e12c5a5
renamed "exportassigndeclaration" to "export_assign_declaration"
2020-09-04 11:53:27 +02:00
Erik Krogh Kristensen
3c04b4982c
renamed "importequalsdeclaration" to "import_equals_declaration"
2020-09-04 11:53:26 +02:00
Erik Krogh Kristensen
ec1f538503
renamed "exportnameddeclaration" to "export_named_declaration"
2020-09-04 11:53:26 +02:00
Erik Krogh Kristensen
8eacd32f8e
renamed "exportdefaultdeclaration" to "export_default_declaration"
2020-09-04 11:53:25 +02:00
Erik Krogh Kristensen
5c3b69f323
renamed "exportalldeclaration" to "export_all_declaration"
2020-09-04 11:53:24 +02:00
Erik Krogh Kristensen
bdfeecdee1
renamed "importdeclaration" to "import_declaration"
2020-09-04 11:53:23 +02:00
Erik Krogh Kristensen
1da7021340
renamed "classdeclstmt" to "class_decl_stmt"
2020-09-04 11:53:23 +02:00
Erik Krogh Kristensen
893b743b57
renamed "foreachstmt" to "for_each_stmt"
2020-09-04 11:53:22 +02:00
Erik Krogh Kristensen
442d3e5f70
renamed "legacy_letstmt" to "legacy_let_stmt"
2020-09-04 11:53:21 +02:00
Erik Krogh Kristensen
945e2c7fe0
renamed "letstmt" to "let_stmt"
2020-09-04 11:53:20 +02:00
Erik Krogh Kristensen
38c902f43b
renamed "constdeclstmt" to "const_decl_stmt"
2020-09-04 11:53:19 +02:00
Erik Krogh Kristensen
231583a3f8
renamed "forofstmt" to "for_of_stmt"
2020-09-04 11:53:19 +02:00
Erik Krogh Kristensen
c56746929d
renamed "catchclause" to "catch_clause"
2020-09-04 11:53:18 +02:00
Erik Krogh Kristensen
d0e4748def
renamed "vardeclstmt" to "var_decl_stmt"
2020-09-04 11:53:17 +02:00
Erik Krogh Kristensen
6f667a6e82
renamed "functiondeclstmt" to "function_decl_stmt"
2020-09-04 11:53:16 +02:00
Erik Krogh Kristensen
3ef8fb72cd
renamed "debuggerstmt" to "debugger_stmt"
2020-09-04 11:53:16 +02:00
Erik Krogh Kristensen
454893d234
renamed "forinstmt" to "for_in_stmt"
2020-09-04 11:53:15 +02:00
Erik Krogh Kristensen
712a6dfccd
renamed "forstmt" to "for_stmt"
2020-09-04 11:53:14 +02:00
Erik Krogh Kristensen
4c24e2d8ba
renamed "dowhilestmt" to "do_while_stmt"
2020-09-04 11:53:13 +02:00
Erik Krogh Kristensen
ed585de1a0
renamed "whilestmt" to "while_stmt"
2020-09-04 11:53:13 +02:00
Erik Krogh Kristensen
f749d46fe8
renamed "trystmt" to "try_stmt"
2020-09-04 11:53:12 +02:00
Erik Krogh Kristensen
4762c9eac8
renamed "throwstmt" to "throw_stmt"
2020-09-04 11:53:11 +02:00
Erik Krogh Kristensen
5e2c25eacd
renamed "returnstmt" to "return_stmt"
2020-09-04 11:53:10 +02:00
Erik Krogh Kristensen
b3746efec8
renamed "switchstmt" to "switch_stmt"
2020-09-04 11:53:10 +02:00
Erik Krogh Kristensen
3f47afa595
renamed "withstmt" to "with_stmt"
2020-09-04 11:53:09 +02:00
Erik Krogh Kristensen
569c5f19cb
renamed "continuestmt" to "continue_stmt"
2020-09-04 11:53:08 +02:00
Erik Krogh Kristensen
4a44f0ee23
renamed "breakstmt" to "break_stmt"
2020-09-04 11:53:07 +02:00
Erik Krogh Kristensen
ded939468e
renamed "labeledstmt" to "labeled_stmt"
2020-09-04 11:53:07 +02:00
Erik Krogh Kristensen
90b45c4052
renamed "ifstmt" to "if_stmt"
2020-09-04 11:53:06 +02:00
Erik Krogh Kristensen
a752ef79a2
renamed "exprstmt" to "expr_stmt"
2020-09-04 11:53:05 +02:00
Erik Krogh Kristensen
03c8eb87d2
renamed "blockstmt" to "block_stmt"
2020-09-04 11:53:04 +02:00
Erik Krogh Kristensen
54edbca268
renamed "emptystmt" to "empty_stmt"
2020-09-04 11:53:04 +02:00
Erik Krogh Kristensen
fe121fb2ba
renamed "globalaugmentationdeclaration" to "global_augmentation_declaration"
2020-09-04 11:53:03 +02:00
Erik Krogh Kristensen
b4ccf4eb60
renamed "externalmoduledeclaration" to "external_module_declaration"
2020-09-04 11:53:02 +02:00
Erik Krogh Kristensen
f7cce51152
renamed "namespacedeclaration" to "namespace_declaration"
2020-09-04 11:53:01 +02:00
Erik Krogh Kristensen
5f9ae889e0
renamed "functionexpr" to "function_expr"
2020-09-04 11:53:00 +02:00
Erik Krogh Kristensen
868214dfff
renamed "arrowfunctionexpr" to "arrow_function_expr"
2020-09-04 11:52:59 +02:00
Erik Krogh Kristensen
42084b55cc
renamed "stmtparent" to "stmt_parent"
2020-09-04 11:52:58 +02:00
Erik Krogh Kristensen
05deebbe9e
renamed "jsxemptyexpr" to "jsx_empty_expr"
2020-09-04 11:52:58 +02:00
Erik Krogh Kristensen
e5e8951b20
renamed "expressionwithtypearguments" to "expression_with_type_arguments"
2020-09-04 11:52:57 +02:00
Erik Krogh Kristensen
334bbd83a8
renamed "jsxqualifiedname" to "jsx_qualified_name"
2020-09-04 11:52:56 +02:00
Erik Krogh Kristensen
61cf752e67
renamed "equalitytest" to "equality_test"
2020-09-04 11:52:55 +02:00
Erik Krogh Kristensen
7bff2a18f0
renamed "declarablenode" to "declarable_node"
2020-09-04 11:52:55 +02:00
Erik Krogh Kristensen
1a979f52ab
renamed "classorinterface" to "class_or_interface"
2020-09-04 11:52:54 +02:00
Erik Krogh Kristensen
5efa551c80
renamed "literaltype" to "literal_type"
2020-09-04 11:52:53 +02:00
Erik Krogh Kristensen
906865b057
renamed "typevariabletype" to "typevariable_type"
2020-09-04 11:52:52 +02:00
Erik Krogh Kristensen
fea92773bd
renamed "unionorintersectiontype" to "union_or_intersection_type"
2020-09-04 11:52:51 +02:00
Erik Krogh Kristensen
5355e23c1a
renamed "symboltype" to "symbol_type"
2020-09-04 11:52:51 +02:00
Erik Krogh Kristensen
cdcf9e87fd
renamed "functiontypeexpr" to "function_typeexpr"
2020-09-04 11:52:50 +02:00
Erik Krogh Kristensen
910b328022
renamed "importtypeexpr" to "import_typeexpr"
2020-09-04 11:52:49 +02:00
Erik Krogh Kristensen
95aa5a171a
renamed "namespaceaccess" to "namespace_access"
2020-09-04 11:52:48 +02:00
Erik Krogh Kristensen
a7bfca6fea
renamed "literaltypeexpr" to "literal_typeexpr"
2020-09-04 11:52:47 +02:00
Erik Krogh Kristensen
a46f1cd070
renamed "readonlytypeexpr" to "readonly_typeexpr"
2020-09-04 11:52:46 +02:00
Erik Krogh Kristensen
28fc1d8267
renamed "bigintliteraltypeexpr" to "bigint_literal_typeexpr"
2020-09-04 11:52:45 +02:00
Erik Krogh Kristensen
bb78c3e759
renamed "resttypeexpr" to "rest_typeexpr"
2020-09-04 11:52:45 +02:00
Erik Krogh Kristensen
584901e8af
renamed "optionaltypeexpr" to "optional_typeexpr"
2020-09-04 11:52:44 +02:00
Erik Krogh Kristensen
f784579c4b
renamed "importvartypeaccess" to "import_var_type_access"
2020-09-04 11:52:43 +02:00
Erik Krogh Kristensen
cb0080ab07
renamed "importnamespaceaccess" to "import_namespace_access"
2020-09-04 11:52:42 +02:00
Erik Krogh Kristensen
fe4f3d3656
renamed "importtypeaccess" to "import_type_access"
2020-09-04 11:52:42 +02:00
Erik Krogh Kristensen
27af8f0a42
renamed "infertypeexpr" to "infer_typeexpr"
2020-09-04 11:52:41 +02:00
Erik Krogh Kristensen
a04f99b24d
renamed "conditionaltypeexpr" to "conditional_typeexpr"
2020-09-04 11:52:40 +02:00
Erik Krogh Kristensen
8ca7f3aa5c
renamed "mappedtypeexpr" to "mapped_typeexpr"
2020-09-04 11:52:40 +02:00
Erik Krogh Kristensen
9535fb4045
renamed "qualifiednamespaceaccess" to "qualified_namespace_access"
2020-09-04 11:52:39 +02:00
Erik Krogh Kristensen
a88d520866
renamed "localnamespaceaccess" to "local_namespace_access"
2020-09-04 11:52:38 +02:00
Erik Krogh Kristensen
d91ba5ac54
renamed "constructortypeexpr" to "constructor_typeexpr"
2020-09-04 11:52:37 +02:00
Erik Krogh Kristensen
bdb08156b4
renamed "plainfunctiontypeexpr" to "plain_function_typeexpr"
2020-09-04 11:52:37 +02:00
Erik Krogh Kristensen
7dd107c2be
renamed "typeparameter" to "type_parameter"
2020-09-04 11:52:36 +02:00
Erik Krogh Kristensen
b3fa43ab1d
renamed "interfacetypeexpr" to "interface_typeexpr"
2020-09-04 11:52:35 +02:00
Erik Krogh Kristensen
8ee4f79727
renamed "predicatetypeexpr" to "predicate_typeexpr"
2020-09-04 11:52:34 +02:00
Erik Krogh Kristensen
224290c861
renamed "thisvartypeaccess" to "this_var_type_access"
2020-09-04 11:52:33 +02:00
Erik Krogh Kristensen
0e4ff33652
renamed "qualifiedvartypeaccess" to "qualified_var_type_access"
2020-09-04 11:52:33 +02:00
Erik Krogh Kristensen
0f02263d83
renamed "localvartypeaccess" to "local_var_type_access"
2020-09-04 11:52:32 +02:00
Erik Krogh Kristensen
ac4a2ae6e0
renamed "typeoftypeexpr" to "typeof_typeexpr"
2020-09-04 11:52:31 +02:00
Erik Krogh Kristensen
2b2fb83cdc
renamed "typelabel" to "type_label"
2020-09-04 11:52:30 +02:00
Erik Krogh Kristensen
2ba01ec13c
renamed "generictypeexpr" to "generic_typeexpr"
2020-09-04 11:52:30 +02:00
Erik Krogh Kristensen
3caf5c9258
renamed "qualifiedtypeaccess" to "qualified_type_access"
2020-09-04 11:52:29 +02:00
Erik Krogh Kristensen
af56939703
renamed "keyoftypeexpr" to "keyof_typeexpr"
2020-09-04 11:52:28 +02:00
Erik Krogh Kristensen
30500fcf9b
renamed "tupletypeexpr" to "tuple_typeexpr"
2020-09-04 11:52:27 +02:00
Erik Krogh Kristensen
3591c22d82
renamed "parenthesizedtypeexpr" to "parenthesized_typeexpr"
2020-09-04 11:52:26 +02:00
Erik Krogh Kristensen
36e76c1146
renamed "intersectiontypeexpr" to "intersection_typeexpr"
2020-09-04 11:52:26 +02:00
Erik Krogh Kristensen
0c1b1fd836
renamed "indexedaccesstypeexpr" to "indexed_access_typeexpr"
2020-09-04 11:52:25 +02:00
Erik Krogh Kristensen
52c6ce057d
renamed "uniontypeexpr" to "union_typeexpr"
2020-09-04 11:52:24 +02:00
Erik Krogh Kristensen
2b822a56ff
renamed "arraytypeexpr" to "array_typeexpr"
2020-09-04 11:52:23 +02:00
Erik Krogh Kristensen
8b7d37ef9d
renamed "booleanliteraltypeexpr" to "boolean_literal_typeexpr"
2020-09-04 11:52:23 +02:00
Erik Krogh Kristensen
31d66dd1cd
renamed "numberliteraltypeexpr" to "number_literal_typeexpr"
2020-09-04 11:52:22 +02:00
Erik Krogh Kristensen
d72dd3253e
renamed "stringliteraltypeexpr" to "string_literal_typeexpr"
2020-09-04 11:52:21 +02:00
Erik Krogh Kristensen
d6391b4830
renamed "keywordtypeexpr" to "keyword_typeexpr"
2020-09-04 11:52:20 +02:00
Erik Krogh Kristensen
edae1a7ad3
renamed "typedecl" to "type_decl"
2020-09-04 11:52:19 +02:00
Erik Krogh Kristensen
54bd914477
renamed "localtypeaccess" to "local_type_access"
2020-09-04 11:52:19 +02:00
Erik Krogh Kristensen
81909b58dc
renamed "exprortype" to "expr_or_type"
2020-09-04 11:52:18 +02:00
Erik Krogh Kristensen
d7553461b0
renamed "exprorstmt" to "expr_or_stmt"
2020-09-04 11:52:17 +02:00
Erik Krogh Kristensen
22bce641b7
renamed "isAsync" to "is_async"
2020-09-04 11:52:16 +02:00
Erik Krogh Kristensen
ba645b555f
renamed "hasRestParameter" to "has_rest_parameter"
2020-09-04 11:52:15 +02:00
Erik Krogh Kristensen
b3f7c26669
renamed "isGenerator" to "is_generator"
2020-09-04 11:52:14 +02:00
Erik Krogh Kristensen
a57f93b41e
renamed "unicodePropertyEscapeValue" to "unicode_property_escapevalue"
2020-09-04 11:52:13 +02:00
Erik Krogh Kristensen
3ed310fb7b
renamed "unicodePropertyEscapeName" to "unicode_property_escapename"
2020-09-04 11:52:12 +02:00
Erik Krogh Kristensen
acc13ddd04
renamed "namedBackref" to "named_backref"
2020-09-04 11:52:12 +02:00
Erik Krogh Kristensen
23127cb4af
renamed "charClassEscape" to "char_class_escape"
2020-09-04 11:52:11 +02:00
Erik Krogh Kristensen
21733afc32
renamed "regexpConstValue" to "regexp_const_value"
2020-09-04 11:52:10 +02:00
Erik Krogh Kristensen
9a1a439c76
renamed "isInverted" to "is_inverted"
2020-09-04 11:52:09 +02:00
Erik Krogh Kristensen
fbcd3dd893
renamed "isNamedCapture" to "is_named_capture"
2020-09-04 11:52:08 +02:00
Erik Krogh Kristensen
2dc9022aa6
renamed "isCapture" to "is_capture"
2020-09-04 11:52:08 +02:00
Erik Krogh Kristensen
35b5b660c5
renamed "rangeQuantifierUpperBound" to "range_quantifier_upper_bound"
2020-09-04 11:52:07 +02:00
Erik Krogh Kristensen
defbee2567
renamed "rangeQuantifierLowerBound" to "range_quantifier_lower_bound"
2020-09-04 11:52:06 +02:00
Erik Krogh Kristensen
0962af51d2
renamed "isGreedy" to "is_greedy"
2020-09-04 11:52:05 +02:00
Erik Krogh Kristensen
37432232b8
renamed "regexpParseErrors" to "regexp_parse_errors"
2020-09-04 11:52:05 +02:00
Erik Krogh Kristensen
fdb615fb91
renamed "jsParseErrors" to "js_parse_errors"
2020-09-04 11:52:04 +02:00
Erik Krogh Kristensen
b5d6cbd5b3
renamed "hasAssertsKeyword" to "has_asserts_keyword"
2020-09-04 11:52:03 +02:00
Erik Krogh Kristensen
fc7f024147
renamed "isOptionalParameterDeclaration" to "is_optional_parameter_declaration"
2020-09-04 11:52:02 +02:00
Erik Krogh Kristensen
3f3b4d65bd
renamed "hasDefiniteAssignmentAssertion" to "has_definite_assignment_assertion"
2020-09-04 11:52:01 +02:00
Erik Krogh Kristensen
8ae48bbf8b
renamed "isOptionalMember" to "is_optional_member"
2020-09-04 11:52:01 +02:00
Erik Krogh Kristensen
8c969f0539
renamed "hasTypeKeyword" to "has_type_keyword"
2020-09-04 11:52:00 +02:00
Erik Krogh Kristensen
007447b0ad
renamed "hasReadonlyKeyword" to "has_readonly_keyword"
2020-09-04 11:51:59 +02:00
Erik Krogh Kristensen
4b74c1d4b3
renamed "hasProtectedKeyword" to "has_protected_keyword"
2020-09-04 11:51:58 +02:00
Erik Krogh Kristensen
719c0d2030
renamed "hasPrivateKeyword" to "has_private_keyword"
2020-09-04 11:51:58 +02:00
Erik Krogh Kristensen
82ddbc3b47
renamed "hasPublicKeyword" to "has_public_keyword"
2020-09-04 11:51:57 +02:00
Erik Krogh Kristensen
29e5bdb4d7
renamed "isAbstractClass" to "is_abstract_class"
2020-09-04 11:51:56 +02:00
Erik Krogh Kristensen
a0afcaa3a8
renamed "isConstEnum" to "is_const_enum"
2020-09-04 11:51:55 +02:00
Erik Krogh Kristensen
ac345fbecd
renamed "isAbstractMember" to "is_abstract_member"
2020-09-04 11:51:54 +02:00
Erik Krogh Kristensen
2c3b3e7173
renamed "isStatic" to "is_static"
2020-09-04 11:51:54 +02:00
Erik Krogh Kristensen
10439fb522
renamed "isMethod" to "is_method"
2020-09-04 11:51:53 +02:00
Erik Krogh Kristensen
6382f6d202
renamed "isComputed" to "is_computed"
2020-09-04 11:51:52 +02:00
Erik Krogh Kristensen
2204b1e92d
renamed "isArgumentsObject" to "is_arguments_object"
2020-09-04 11:51:51 +02:00
Erik Krogh Kristensen
3fb561d72b
renamed "isDelegating" to "is_delegating"
2020-09-04 11:51:50 +02:00
Erik Krogh Kristensen
ba600acd5e
renamed "arraySize" to "array_size"
2020-09-04 11:51:50 +02:00
Erik Krogh Kristensen
83b89fa52d
renamed "exprContainers" to "expr_containers"
2020-09-04 11:51:49 +02:00
Erik Krogh Kristensen
30ba7d29a1
renamed "enclosingStmt" to "enclosing_stmt"
2020-09-04 11:51:48 +02:00
Erik Krogh Kristensen
99f8887844
renamed "isForAwaitOf" to "is_for_await_of"
2020-09-04 11:51:47 +02:00
Erik Krogh Kristensen
621e702e99
renamed "hasDeclareKeyword" to "has_declare_keyword"
2020-09-04 11:51:46 +02:00
Erik Krogh Kristensen
49b71d515c
renamed "isInstantiated" to "is_instantiated"
2020-09-04 11:51:45 +02:00
Erik Krogh Kristensen
76f728aacd
renamed "jumpTargets" to "jump_targets"
2020-09-04 11:51:45 +02:00
Erik Krogh Kristensen
059d72858a
renamed "stmtContainers" to "stmt_containers"
2020-09-04 11:51:44 +02:00
Erik Krogh Kristensen
07fd747069
renamed "isClosureModule" to "is_closure_module"
2020-09-04 11:51:43 +02:00
Erik Krogh Kristensen
2a2901f6ae
renamed "isES2015Module" to "is_es2015_module"
2020-09-04 11:51:42 +02:00
Erik Krogh Kristensen
8782c2b8e0
renamed "isNodejs" to "is_nodejs"
2020-09-04 11:51:41 +02:00
Erik Krogh Kristensen
4fb6d6060c
renamed "isModule" to "is_module"
2020-09-04 11:51:40 +02:00
Erik Krogh Kristensen
39ff727ec7
renamed "isExterns" to "is_externs"
2020-09-04 11:51:39 +02:00
Erik Krogh Kristensen
05c38da2cb
add section to Aliases.qll for deprecated dbscheme relations
2020-09-04 11:51:38 +02:00
Erik Krogh Kristensen
41eed43aa4
create upgrade folder for renamings
2020-09-04 11:51:38 +02:00
Asger Feldthaus
961554eb6f
JS: Autoformat
2020-09-04 10:42:26 +01:00
yoff
7a00fbc654
Merge pull request #4154 from RasmusWL/python-more-complete-dataflow-tests
...
Python more complete dataflow tests
2020-09-04 11:35:24 +02:00
Rasmus Wriedt Larsen
2f480597ef
Merge pull request #4157 from RasmusWL/add-labeler-action
...
Enable labeler action again
2020-09-04 11:15:15 +02:00
Rasmus Wriedt Larsen
f12fa52e22
Python: Update inline example for TypeTracker usage
2020-09-04 11:11:30 +02:00
Rasmus Wriedt Larsen
189c94f9e3
Python: Add TypeTracker::end()
...
Copied from JS
2020-09-04 11:10:10 +02:00
Rasmus Wriedt Larsen
7855576a69
Python: TypeTracker only exposes its own interface
...
This is especially important if the TypeTracker needs to be publicly imported by
DataFlowPublic.
2020-09-04 10:58:20 +02:00
Geoffrey White
6c40e22f45
C++: Support further reverse taint flows on things that return *this.
2020-09-04 09:45:10 +01:00
Geoffrey White
018b0a5abf
C++: Model std::string front, back and push_back.
2020-09-04 09:45:07 +01:00
Geoffrey White
6e734a894f
C++: Additional test cases for std::string.
2020-09-04 09:44:58 +01:00
Tamas Vajk
e2c205deb4
C#: Add stable order for generated accessors in printed AST
2020-09-04 10:39:01 +02:00
Erik Krogh Kristensen
fd05156298
clarifying comment on the last jQuery inconsistency
2020-09-04 10:30:42 +02:00
Erik Krogh Kristensen
b18f51806c
regain the lost property presence result
2020-09-04 10:30:38 +02:00
Asger F
0704be4d41
Update javascript/ql/src/semmle/javascript/TypeScript.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-04 08:55:31 +01:00
Max Schaefer
252902d245
JavaScript: Restructure API-graph tests.
...
With the old test runner we cannot have `VerifyAssertions.qlref`s for each individual test that reference a shared `VerifyAssertions.ql` in the parent directory, since it doesn't like nested tests.
Instead, we have to turn `VerifyAssertions.ql` into `VerifyAssertions.qll`, and each `VerifyAsssertions.qlref` into a `VerifyAssertions.ql` that imports it.
But then that doesn't work with our old directory structure, since the import path would have to contain the invalid identifier `library-tests`. As a workaround, I have moved the API graph tests into a directory without dashes in its path.
2020-09-04 08:43:15 +01:00
Erik Krogh Kristensen
6fccf5aa70
use isLikelyIntentionalHtmlSink in the sink instead of in the where clause
2020-09-04 09:26:03 +02:00
CodeQL CI
58f51899c9
Merge pull request #4173 from erik-krogh/targetBlankFP
...
Approved by esbena
2020-09-04 08:21:22 +01:00
Tom Hvitved
7f18c3377e
Merge pull request #4017 from hvitved/csharp/unqualify-trap-ids3
...
C#: Remove assembly prefixes from TRAP labels
2020-09-04 09:20:39 +02:00
Jonas Jensen
fbe42fb64c
C++: Support != constant in range analysis
2020-09-04 09:20:23 +02:00
Jonas Jensen
d061b09fe0
C++: Test showing no support for != and !
2020-09-04 09:02:42 +02:00
Max Schaefer
cb433a0c0f
JavaScript: Add test for custom API-graph entry points.
2020-09-03 22:28:09 +01:00
Max Schaefer
58702e4c52
JavaScript: Rename EntryPoint.getADef to getARhs.
2020-09-03 22:28:09 +01:00
Max Schaefer
f3173ca968
JavaScript: Add a few unit tests for API graphs.
2020-09-03 22:28:09 +01:00
Max Schaefer
985399f4cf
JavaScript: Move ApiGraphs library to semmle.javascript and import it from javascript.qll.
2020-09-03 22:28:09 +01:00
Max Schaefer
aaa70e4ad3
JavaScript: Make API-graph edge labels accessible outside ApiGraphs.qll.
2020-09-03 22:28:09 +01:00
Max Schaefer
7239f1fb6f
JavaScript: Distinguish more carefully between def and use nodes in API graphs.
...
In particular, we now have two different kinds of module features: module definitions and module uses.
For the most part, `API::Definition`s correspond to right-hand sides in the data-flow graph, and `API::Use`s correspond to references. However, module definitions can have references (via the CommonJS `module` variable), and so can their exports (via `module.exports` or `exports`). Note that this is different from references to uses of the module, which are simply imports.
2020-09-03 22:28:09 +01:00
Mathias Vorreiter Pedersen
b7774b2a82
Merge pull request #4201 from geoffw0/insert
...
C++: Model iterator versions of string and vector methods
2020-09-03 21:45:36 +02:00
Geoffrey White
1d04c89927
C++: Autoformat.
2020-09-03 18:54:36 +01:00
Geoffrey White
5124660831
C++: Change note.
2020-09-03 18:54:27 +01:00
Geoffrey White
2d7552358b
C++: Put in a better fix.
2020-09-03 18:51:57 +01:00
Geoffrey White
a1c7fd8fec
C++: Remove the workaround for CPP-331.
2020-09-03 18:51:21 +01:00
Geoffrey White
5150bf30e7
C++: Add another test case inspired by CPP-331.
2020-09-03 18:50:11 +01:00
Geoffrey White
1483306c4c
C++: Add more tests.
2020-09-03 18:39:50 +01:00
CodeQL CI
f180497554
Merge pull request #4192 from max-schaefer/js/ssa__implicitinit
...
Approved by asgerf
2020-09-03 16:46:56 +01:00
Max Schaefer
d8fbf60cbf
JavaScript: Weaken a few types to stay under BDD node limit.
...
`SourceNode` in cached layers seems particularly problematic.
2020-09-03 14:29:04 +01:00
Max Schaefer
e77948103f
JavaScript: Remove AdditionalFeature from ApiGraphs.
...
I ended up not using it for flow summaries, so at this point it is purely speculative generality. We can reintroduce it later if we need to.
2020-09-03 14:29:04 +01:00
Max Schaefer
924ef6ae5d
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-03 14:04:23 +01:00
Rasmus Wriedt Larsen
29bf98ad26
Python: Fix CUSTOM_SOURCE dataflow regression test
2020-09-03 15:03:53 +02:00
Asger Feldthaus
c05f5c1bc2
JS: Change note
2020-09-03 14:02:08 +01:00
Asger Feldthaus
393db73d0a
JS: Update test
2020-09-03 14:01:40 +01:00
Asger Feldthaus
bfcc434a61
JS: Use both local and global names in hasQualifiedName
2020-09-03 14:01:13 +01:00
Asger Feldthaus
f7552a77c3
JS: Add metric for number of types with qualified names
2020-09-03 14:01:13 +01:00
Rasmus Wriedt Larsen
febbe1229a
Merge branch 'main' into python-more-complete-dataflow-tests
2020-09-03 14:58:20 +02:00
CodeQL CI
c8ffde20f4
Merge pull request #4195 from RasmusWL/python-taint-default-sanitizer
...
Approved by tausbn
2020-09-03 13:55:32 +01:00
Erik Krogh Kristensen
ed54fdcb06
Merge pull request #4118 from dellalibera/js/ldap
...
[javascript] CodeQL to detect LDAP Injection
2020-09-03 14:50:03 +02:00
Erik Krogh Kristensen
d56ea22018
Merge pull request #4200 from erik-krogh/typeaheadInconsistencyComment
...
JS: adjust comment about inconsistency for XSS in typeahead
2020-09-03 13:56:40 +02:00
Erik Krogh Kristensen
d946a61d6e
update expected output
2020-09-03 13:32:54 +02:00
Nick Rolfe
b8ae87470d
Merge pull request #4182 from github/igfoo/cfg
...
C++: Remove some remnants of the extractor CFG
2020-09-03 12:22:04 +01:00
Geoffrey White
50d9a85143
C++: Update change note.
2020-09-03 10:52:27 +01:00
Geoffrey White
d4cbb25e09
C++: Model std::string constructors and container constructors that use iterators.
2020-09-03 10:52:27 +01:00
Geoffrey White
1ac0aa169d
C++: Add a few more test cases.
2020-09-03 10:52:26 +01:00
Geoffrey White
1ad404c605
C++: Extend model to include std::forward_list::insert_after.
2020-09-03 10:52:26 +01:00
Geoffrey White
fcacb22cad
C++: Use [] in std::string begin model.
2020-09-03 10:52:26 +01:00
Geoffrey White
95ca4b674d
C++: Add model for std::vector::insert.
2020-09-03 10:52:25 +01:00
Geoffrey White
f61c7ffc1a
C++: Add support for iterator parameters to std::vector::assign.
2020-09-03 10:52:25 +01:00
Geoffrey White
8e9faac363
C++: Add support for std::vector begin and end.
2020-09-03 10:52:24 +01:00
Geoffrey White
4d47eaa08d
C++: Add support for iterator parameters to std::string::assign.
2020-09-03 10:52:24 +01:00
Geoffrey White
98f84646d6
C++: Result changes due to iterators PR, which adds support for std::string begin and end, and iterator parameters to std::string::insert and some similar functions.
2020-09-03 10:52:24 +01:00
Geoffrey White
7917dff843
C++: Add test cases for std::string and std::vector using iterator methods.
2020-09-03 10:52:23 +01:00
Geoffrey White
fcdbe0f512
C++: Add a const conversion constructor to std::iterator in the tests.
2020-09-03 10:52:23 +01:00
Rasmus Wriedt Larsen
9a821bf449
Merge pull request #4 from yoff/RasmusWL-python-more-complete-dataflow-tests
...
Python: Annotate test file
2020-09-03 11:28:42 +02:00
Rasmus Lerchedahl Petersen
aad51af4ce
Python: use concrete iterable source
2020-09-03 11:25:41 +02:00
yoff
8997799e4d
Merge pull request #1 from RasmusWL/RasmusWL-python-more-complete-dataflow-tests
...
Small fixups to your PR to my PR
2020-09-03 11:14:52 +02:00
Rasmus Wriedt Larsen
b958c3b833
Python: Update comment for test8
2020-09-03 11:13:32 +02:00
CodeQL CI
aa4237c27c
Merge pull request #4191 from erik-krogh/v8Syntax
...
Approved by esbena
2020-09-03 09:57:00 +01:00
Erik Krogh Kristensen
3952553953
adjust comment about inconsistency for XSS in typeahead
2020-09-03 10:50:40 +02:00
Alessio Della Libera
116e7d006d
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-03 10:32:18 +02:00
Alessio Della Libera
bfae0ef5d5
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-03 10:32:08 +02:00
CodeQL CI
2ba84be565
Merge pull request #4185 from erik-krogh/unusedArrDestruct
...
Approved by esbena
2020-09-03 09:18:15 +01:00
Erik Krogh Kristensen
4fdd2cd794
add change note
2020-09-03 10:06:52 +02:00
Erik Krogh Kristensen
1f9749fbfe
revert mailto: change in TargetBlank.ql
2020-09-03 09:39:01 +02:00
Erik Krogh Kristensen
d7a96d685a
simplify implementation of getDelimiterMatchingRegexp
2020-09-03 09:37:43 +02:00
Erik Krogh Kristensen
87d39db95f
add change note
2020-09-03 08:58:33 +02:00
Erik Krogh Kristensen
ec21236bba
update docstring for isNonLastDestructedArrayElement
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-09-03 08:51:10 +02:00
Erik Krogh Kristensen
fb3148a7a8
autoformat
2020-09-03 08:17:08 +02:00
Mathias Vorreiter Pedersen
0fed7c0745
C++/C#: Sync identical files
2020-09-02 22:53:45 +02:00
Max Schaefer
ec3c1f114c
JavaScript: Simplify steps through promises.
2020-09-02 21:40:34 +01:00
Mathias Vorreiter Pedersen
fa26eed3e2
Update cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll
...
Co-authored-by: Dave Bartolomeo <dbartol@github.com >
2020-09-02 22:29:38 +02:00
Mathias Vorreiter Pedersen
428bcc5e03
Update cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll
...
Co-authored-by: Dave Bartolomeo <dbartol@github.com >
2020-09-02 22:29:28 +02:00
Arthur Baars
00668b536a
Merge pull request #4188 from aibaars/csharp-buildless
...
C#: autobuild: fix buildless mode for CodeQL
2020-09-02 21:04:39 +02:00
Andrew Eisenberg
d2a91970f3
Update devcontainer memory settings
...
CodeQL CLI needs a minimum of 2G of memory. By default, the memory used is slightly less than that, leading to poor performance.
2020-09-02 12:04:34 -07:00
Max Schaefer
702192c316
JavaScript: Make implicit inits of module and exports source nodes.
...
This is instead of making every access to those variables source nodes, and fixes a regression in `DeadStoreOfProperty`.
2020-09-02 19:52:13 +01:00
Max Schaefer
9840a7ddfb
JavaScript: Add utility predicate SSA::implicitInit.
2020-09-02 19:46:59 +01:00
Max Schaefer
d81d80430e
JavaScript: Add a regression test for DeadStoreOfProperty.
2020-09-02 19:45:27 +01:00
Max Schaefer
df49818152
JavaScript: Address review comments.
2020-09-02 19:45:27 +01:00
Ian Lynagh
8c7431c4ae
C++: Put {true,false}cond_base back as deprecated predicates for now
2020-09-02 19:10:36 +01:00
Ian Lynagh
c980ccf7c5
C++: Add an upgrade script
2020-09-02 19:05:05 +01:00
Ian Lynagh
8ce1edbed3
C++: Update stats now CFG tables have been removed
2020-09-02 19:05:05 +01:00
Tom Hvitved
26639a113e
C#: Rename Layout.Condition to FilePattern and move to separate file
2020-09-02 19:41:22 +02:00
Max Schaefer
82d92dc726
JavaScript: Avoid bad join order.
...
The optimiser decided that it would be a great idea to start the pipeline with `getReturn().getAUse().(DataFlow::InvokeNode)`. It's not.
2020-09-02 17:42:33 +01:00
Max Schaefer
500f7bd8fa
JavaScript: Reduce complexity of SystemCommandExecutors charpred.
2020-09-02 17:42:32 +01:00
Max Schaefer
e3a9906071
JavaScript: Switch MissingRateLimiting.qll to API graphs.
...
The added test shows how this helps us avoid false positives.
2020-09-02 17:35:47 +01:00
Max Schaefer
e34a821cc6
JavaScript: Switch system-command executor modelling from source nodes to API graphs.
2020-09-02 17:35:47 +01:00
Max Schaefer
6d68036d85
JavaScript: Add test demonstrating more SQL flow.
2020-09-02 17:35:47 +01:00
Max Schaefer
68b3ccdc65
JavaScript: Switch SQL modelling from source nodes to API graphs.
2020-09-02 17:35:47 +01:00
Max Schaefer
f3e9104be4
JavaScript: Add implementation of API graphs.
2020-09-02 17:35:47 +01:00
Arthur Baars
babe69d6e9
Update unit tests
2020-09-02 17:59:56 +02:00
Mathias Vorreiter Pedersen
3cbc4cf0b9
C++: Add field to object taint tests
2020-09-02 17:32:46 +02:00
Rasmus Wriedt Larsen
bf34b07605
Python: Add a few taint tests for default sanitizer
...
specifically the ones removes from dataflow tests in https://github.com/yoff/codeql/pull/1
2020-09-02 16:56:05 +02:00
Taus
8e86d56bce
Merge pull request #4189 from RasmusWL/python-experimental-file-structure
...
Python: Move files in experimental dirs to be consistent
2020-09-02 16:34:35 +02:00
Arthur Baars
90f013d74f
Merge pull request #4176 from aibaars/missing-qhelp
...
Add missing QHelp files
2020-09-02 16:12:42 +02:00
Asger F
2c0e9f0c86
Merge pull request #4186 from github/rc/1.25
...
Mergeback: 1.25 -> main
2020-09-02 15:12:25 +01:00
Mathias Vorreiter Pedersen
7f5f6b15f7
C++: Make FieldContent private again
2020-09-02 16:05:40 +02:00
Rasmus Wriedt Larsen
4387d106aa
Python: Fix formatting (last time, promise)
2020-09-02 15:36:50 +02:00
Rasmus Wriedt Larsen
8aab0c8be7
Python: Fix .qlref for experimental security tests
2020-09-02 15:35:50 +02:00
Max Schaefer
cd64ce7b1a
JavaScript: Add utility predicate SSA::implicitInit.
2020-09-02 14:34:52 +01:00
CodeQL CI
c017308505
Merge pull request #4134 from erik-krogh/genCalls
...
Approved by asgerf
2020-09-02 14:23:39 +01:00
Alessio Della Libera
785f335ab8
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-02 15:22:33 +02:00
Alessio Della Libera
548cb65a64
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-02 15:22:23 +02:00
Alessio Della Libera
26046a4847
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-02 15:22:07 +02:00
Alessio Della Libera
6ad88bf93f
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-02 15:21:55 +02:00
Arthur Baars
3ed6465716
Address comments
2020-09-02 15:18:31 +02:00
Jonas Jensen
5760213490
Merge pull request #4190 from lcartey/cpp/range-analysis-extensible-assign-ops
...
C++: Support `AssignOperation`s with `SimpleRangeAnalysisExpr`s
2020-09-02 15:16:35 +02:00
Anders Schack-Mulligen
ed6c1798e2
Java: Fix reference to Unit.
2020-09-02 14:47:01 +02:00
Anders Schack-Mulligen
ca8fd6197a
Merge pull request #4187 from RasmusWL/java-experimental-file-structure
...
Java: Move files in experiemntal dirs to be consistent
2020-09-02 14:41:26 +02:00
Mathias Vorreiter Pedersen
69c1eadfdc
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-02 14:21:23 +02:00
Erik Krogh Kristensen
bb0e5d5718
give V8 build-ins their correct name
2020-09-02 14:05:59 +02:00
Rasmus Wriedt Larsen
bf3a266f58
Python: dataflow regression tests: remove taint tracking tests
...
they will be reintroduced in an other PR
2020-09-02 13:51:00 +02:00
Mathias Vorreiter Pedersen
5546830af7
C++: Fix a join order in readStep using the unbindInt predicate from the shared dataflow library. This is the tuple counts on ChakraCore before the fix:
...
(5539s) Tuple counts for DataFlowPrivate::readStep#fff:
3208924 ~0% {2} r1 = SCAN Operand::NonPhiMemoryOperand::getAnyDef_dispred#3#ff AS I OUTPUT I.<1>, I.<0>
3208924 ~2% {2} r2 = JOIN r1 WITH DataFlowUtil::TInstructionNode#ff AS R ON FIRST 1 OUTPUT r1.<1>, R.<1>
751306 ~8% {2} r3 = JOIN r2 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r2.<1>
751306 ~0% {3} r4 = JOIN r3 WITH DataFlowUtil::TInstructionNode#ff AS R ON FIRST 1 OUTPUT r3.<0>, r3.<1>, R.<1>
751306 ~0% {4} r5 = JOIN r4 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r4.<1>, r4.<0>, r4.<2>
751306 ~2% {4} r6 = JOIN r5 WITH Operand::NonPhiMemoryOperand::getAnyDef_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r5.<1>, r5.<2>, r5.<3>
209341 ~0% {4} r7 = JOIN r6 WITH Instruction::Instruction::getResultType_dispred#fb AS R ON FIRST 1 OUTPUT R.<1>, r6.<1>, r6.<2>, r6.<3>
7115323 ~1% {6} r8 = JOIN r7 WITH DataFlowPrivate::FieldContent#class#ffff_1023#join_rhs AS R ON FIRST 1 OUTPUT R.<2>, R.<3>, r7.<1>, r7.<2>, r7.<3>, R.<1>
81341188413 ~0% {5} r9 = JOIN r8 WITH SSAConstruction::Cached::getUsedInterval#fff_120#join_rhs AS R ON FIRST 2 OUTPUT r8.<3>, R.<2>, r8.<2>, r8.<4>, r8.<5>
137684 ~7% {3} r10 = JOIN r9 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff AS R ON FIRST 2 OUTPUT r9.<2>, r9.<4>, r9.<3>
751306 ~0% {3} r11 = JOIN r4 WITH Instruction::LoadInstruction::getSourceAddress_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r4.<1>, r4.<2>
94306 ~0% {3} r12 = JOIN r11 WITH Instruction::FieldInstruction::getField_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r11.<1>, r11.<2>
152363 ~6% {3} r13 = JOIN r12 WITH DataFlowPrivate::FieldContent::getField_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r12.<1>, R.<1>, r12.<2>
290047 ~22% {3} r14 = r10 \/ r13
return r14
and after:
(851s) Tuple counts for DataFlowPrivate::readStep#fff:
3208924 ~0% {2} r1 = SCAN Operand::NonPhiMemoryOperand::getAnyDef_dispred#3#ff AS I OUTPUT I.<1>, I.<0>
3208924 ~2% {2} r2 = JOIN r1 WITH DataFlowUtil::TInstructionNode#ff AS R ON FIRST 1 OUTPUT r1.<1>, R.<1>
751306 ~8% {2} r3 = JOIN r2 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r2.<1>
751306 ~0% {3} r4 = JOIN r3 WITH DataFlowUtil::TInstructionNode#ff AS R ON FIRST 1 OUTPUT r3.<0>, r3.<1>, R.<1>
751306 ~0% {4} r5 = JOIN r4 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff AS R ON FIRST 1 OUTPUT r4.<0>, r4.<1>, r4.<2>, R.<1>
751306 ~0% {5} r6 = JOIN r5 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r5.<1>, r5.<0>, r5.<2>, r5.<3>
751306 ~0% {5} r7 = JOIN r6 WITH Operand::NonPhiMemoryOperand::getAnyDef_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r6.<1>, r6.<2>, r6.<3>, r6.<4>
209341 ~1% {5} r8 = JOIN r7 WITH Instruction::Instruction::getResultType_dispred#fb AS R ON FIRST 1 OUTPUT R.<1>, r7.<1>, r7.<2>, r7.<3>, r7.<4>
7115323 ~0% {7} r9 = JOIN r8 WITH DataFlowPrivate::FieldContent#class#ffff_1023#join_rhs AS R ON FIRST 1 OUTPUT r8.<4>, r8.<1>, r8.<2>, r8.<3>, R.<1>, R.<2>, R.<3>
7116087 ~0% {9} r10 = JOIN r9 WITH SSAConstruction::Cached::getUsedInterval#fff@staged_ext AS R ON FIRST 1 OUTPUT r9.<1>, r9.<2>, r9.<3>, r9.<0>, r9.<4>, r9.<5>, r9.<6>, R.<1>, R.<2>
449879 ~4% {9} r11 = SELECT r10 ON r10.<5> <= r10.<7>
193804 ~1% {9} r12 = SELECT r11 ON r11.<5> >= r11.<7>
154980 ~0% {9} r13 = SELECT r12 ON r12.<6> <= r12.<8>
137684 ~0% {9} r14 = SELECT r13 ON r13.<6> >= r13.<8>
137684 ~7% {3} r15 = SCAN r14 OUTPUT r14.<0>, r14.<4>, r14.<2>
751306 ~0% {3} r16 = JOIN r4 WITH Instruction::LoadInstruction::getSourceAddress_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r4.<1>, r4.<2>
94306 ~0% {3} r17 = JOIN r16 WITH Instruction::FieldInstruction::getField_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r16.<1>, r16.<2>
152363 ~6% {3} r18 = JOIN r17 WITH DataFlowPrivate::FieldContent::getField_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r17.<1>, R.<1>, r17.<2>
290047 ~22% {3} r19 = r15 \/ r18
return r19
2020-09-02 13:50:55 +02:00
Rasmus Wriedt Larsen
552637a446
Python: dataflow regression tests: fix flow_in_iteration
2020-09-02 13:50:24 +02:00
Rasmus Wriedt Larsen
4977790617
Python: dataflow regression tests: fix source2
2020-09-02 13:49:56 +02:00
Mathias Vorreiter Pedersen
7d00b49d05
C++: Accept test changes
2020-09-02 13:42:35 +02:00
Rasmus Wriedt Larsen
34c5da563e
Python: Move files in experiemntal dirs to be consistent
...
Except for dataflow (where we have a lot of changes, and I don't want to
introduce lots of merge conflicts right now).
2020-09-02 13:39:01 +02:00
Rasmus Wriedt Larsen
9c8b829d65
Python: Fix formatting
2020-09-02 13:27:35 +02:00
Arthur Baars
223d94219e
C#: autobuild: fix buildless mode for CodeQL
2020-09-02 13:23:23 +02:00
lcartey@github.com
fdfa75f3ec
C++: Range analysis, allow extensible assign operations
...
- defDependsOnDef supporting all analyzable AssignOperations
- getDef(Upper|Lower)Bound supporting all analyzable AssignOperations
2020-09-02 12:22:14 +01:00
Rasmus Wriedt Larsen
7a54d0b493
Java: Move files in experiemntal dirs to be consistent
2020-09-02 13:19:21 +02:00
Erik Krogh Kristensen
a24db09418
only flag unused array-destructs if it is the last variable
2020-09-02 11:40:35 +02:00
CodeQL CI
48a1ee6233
Merge pull request #4130 from erik-krogh/bbFix
...
Approved by asgerf
2020-09-02 10:38:50 +01:00
Anders Schack-Mulligen
89829e870d
Java: Clean up SqlInjectionLib.
2020-09-02 11:17:56 +02:00
Tom Hvitved
701e189c1b
C#: Add change note
2020-09-02 10:52:22 +02:00
Tom Hvitved
1b769ebac9
C#: Address more review comments
2020-09-02 10:52:05 +02:00
Tom Hvitved
51dc1515ab
C#: Address review comments
2020-09-02 10:52:05 +02:00
Tom Hvitved
92bf830a8a
C#: Avoid bad magic in UselessUpcast.ql
2020-09-02 10:52:05 +02:00
Tom Hvitved
c7f776984f
C#: Add CFG tests for callables with multiple implementations
2020-09-02 10:52:05 +02:00
Tom Hvitved
8a0355720a
C#: Make Callable::get[Expression|Statement]Body() return all possible implementations
...
Previosly, we returned only the body belonging to "the most likely" implementation,
based on a CFG size heuristics. However, now that more callables are mapped to the
same entity, it makes more sense to treat such callables (to some extent) like
partial methods. This means, for instance, that data flow will branch out to all possible
implementations, much like we do for virtual dispatch.
2020-09-02 10:52:05 +02:00
Tom Hvitved
afbbafe132
C#: Simplify TypeRef.qll
2020-09-02 10:52:05 +02:00
Tom Hvitved
d17f88bbcd
C#: Remove assembly prefix from all extractor IDs
2020-09-02 10:52:04 +02:00
Calum Grant
7628caa2db
C#: Avoid typerefs for constructed types.
2020-09-02 10:52:04 +02:00
Calum Grant
aa99269015
C#: Fix merge conflicts. Unfortunately, the type of symbolEntityCache needed to be the same as objectEntityCache to fix nullability warnings.
2020-09-02 10:52:04 +02:00
Calum Grant
0cfe424fc2
C#: Address review comments.
2020-09-02 10:52:04 +02:00
Calum Grant
9a51192d86
C#: Move TypeRefs into a separate file and import it privately. Reorder imports into alphabetical order.
2020-09-02 10:52:04 +02:00
Calum Grant
4740b47f5d
C#: Minor edits
2020-09-02 10:52:04 +02:00
Calum Grant
f4b1594461
C#: Unqualify method names and nested types.
2020-09-02 10:52:04 +02:00
Calum Grant
f61fdc6891
C#: Only resolve a single, canonical type for each typeref.
2020-09-02 10:52:04 +02:00
Calum Grant
90517580a5
C#: Address review comment: Make dictionary type more specific.
2020-09-02 10:52:04 +02:00
Calum Grant
cd51a67c0d
C#: Take nullability into account when creating symbol entities. Otherwise, an entity with the wrong (cached) nullability could be created.
2020-09-02 10:52:04 +02:00
Calum Grant
d1cde2a815
C#: Address review comment.
2020-09-02 10:52:03 +02:00
Calum Grant
4657ddcb7c
C#: Avoid qualifying explicit interface implementations.
2020-09-02 10:52:03 +02:00
Calum Grant
6649d72a2d
C#: Qualify type parameters with the entity that declares them
2020-09-02 10:52:03 +02:00
Calum Grant
6e5c2ef0e7
C#: Remove assembly qualifier from some trap-ids.
2020-09-02 10:52:03 +02:00
Calum Grant
29b3759655
Merge pull request #3961 from tausbn/python-add-typetracker
...
Python: Add type tracker and step summary implementation.
2020-09-02 09:42:14 +01:00
Mathias Vorreiter Pedersen
9887d8b7eb
C++: Remove redundant rules
2020-09-02 10:33:12 +02:00
Erik Krogh Kristensen
f0a0f41c3c
allow urls that are prefixed with # or ? in js/unsafe-external-link
2020-09-02 10:19:42 +02:00
Jonas Jensen
db45b29806
Merge pull request #4102 from rdmarsh2/rdmarsh2/cpp/input-iterators-1
...
C++: Basic input iterator models
2020-09-02 07:57:35 +02:00
ubuntu
042d07161c
Rename getQueryCall to getQueryCallSink
2020-09-01 22:43:31 +02:00
ubuntu
15562e4814
Update LdapjsSearchOptions
2020-09-01 22:28:58 +02:00
ubuntu
e2e55455c1
Update LdapjsSearchOptions and getQueryCall
2020-09-01 22:23:07 +02:00
Robert Marsh
015bf6e879
C++: Add reverse flow when this ptr is returned
2020-09-01 13:08:44 -07:00
Robert Marsh
2a57fa22e3
C++: handle reference args to iterator operators
2020-09-01 12:52:01 -07:00
Alessio Della Libera
8f00acd4e2
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 21:00:49 +02:00
Alessio Della Libera
78ebcee570
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 21:00:38 +02:00
Alessio Della Libera
b86b9ba510
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 21:00:21 +02:00
Alessio Della Libera
28729915d7
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 20:56:25 +02:00
Alessio Della Libera
1b50477fae
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 20:55:44 +02:00
Alessio Della Libera
44e728016b
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 20:54:58 +02:00
Erik Krogh Kristensen
6cbdc7ad8f
autoformat
2020-09-01 20:16:49 +02:00
Mathias Vorreiter Pedersen
d4293ad9c3
C++: Fix code after review comments.
2020-09-01 18:25:46 +02:00
Anders Schack-Mulligen
cc61e6117e
Merge pull request #3542 from porcupineyhairs/mongoJava
...
Java : add MongoDB injection sinks
2020-09-01 16:19:17 +02:00
CodeQL CI
311e62f21d
Merge pull request #4081 from aschackmull/java/dispatch-ctx-this-param
...
Approved by aibaars
2020-09-01 15:06:47 +01:00
Ian Lynagh
1cba09dde2
C++: Remove some remnants of the extractor CFG
2020-09-01 14:49:36 +01:00
Rasmus Wriedt Larsen
ab06c459f4
Python: Make validTest error on empty output again
...
I accidentially disabled that when introducing the ability to handle more than
one OK.
2020-09-01 14:42:11 +02:00
yoff
caa680c72e
Merge pull request #4149 from RasmusWL/python-more-additional-taint-steps
...
Python: more additional taint steps
2020-09-01 14:38:33 +02:00
Rasmus Wriedt Larsen
0cc018fec0
Python: Taint tracking setup alá Go
...
\## TaintFlow sources
The class `RemoteFlowSource` is very similarly defined as the other languages [C++](ac22e7950c/cpp/ql/src/semmle/code/cpp/security/FlowSources.qll ), [Java](6de612a566/java/ql/src/semmle/code/java/dataflow/FlowSources.qll ), [C#](fddbce0b7b/csharp/ql/src/semmle/code/csharp/security/dataflow/flowsources/Remote.qll ), [JS](78334af354/javascript/ql/src/semmle/javascript/security/dataflow/RemoteFlowSources.qll ), and [Go](24b3133e0c/ql/src/semmle/go/security/FlowSources.qll ). There are some minor differences:
- Java/C++ defines the class in `FlowSources.qll`
- C# uses `csharp/ql/src/semmle/code/csharp/security/dataflow/flowsources/Remote.qll`, and provide `StoredFlowSource` and `LocalFlowSource` in separate classes.
- JS uses `RemoteFlowSources.qll`.
- JS defines additional predicate `RemoteFlowSource.isUserControlledObject`
- Go uses the class name `UntrustedFlowSource`, but still defined in `ql/src/semmle/go/security/FlowSources.qll`
- Go uses the `::Range` pattern to allow both extensibility and refinement
The big difference is how a RemoteFlowSource is specified:
- Java and C# have all subclasses of `RemoteFlowSource` defined in the same file
- Go and JS defines subclasses for frameworks in the actual framework `.qll` file, and all frameworks are transitively imported by `import go` or `import javascript` (so subclasses are always in scope).
- C++ uses class `RemoteFlowFunction` to do all the heavy lifting (and its subclasses are transitively imported).
\### What we will do
Use file `RemoteFlowSource.qll`, define subclasses in framework library classes.
_Why? Personally I really like it, Go/JS is already doing it, and Tom expressed a preference for doing the same for C# (although that is not what they are doing today)._
Jonas gave this advice:
> Whether you split the definitions between multiple files or keep them all in one file, the property you want is that all definitions are included when the abstract class is included. Otherwise you can get unexpected results via transitive includes.
We will make imports of all frameworks in the same file that defines `RemoteFlowSource`, as it seems to be the least intrusive change. If that turns out to be a problem, we can also move them to `python.qll` (the other way is not so easy).
\## TaintFlow sinks
[JS](473787a426/javascript/ql/src/semmle/javascript/Concepts.qll ) and [Go](ecff1e6a16/ql/src/semmle/go/Concepts.qll ) defines abstract base classes for interesting sinks in `Concepts.qll` (and all uses the `::Range` pattern in Go).
I really like this idea, since it allows multiple queries to reuse the same sink definitions, and it makes it _easy_ to discover what default sinks are available.
Personally I'm not 100% on board with the naming, but I don't have any good reason to change the naming convention.
\## Framework modeling
Following the model from Go ([example](https://github.com/github/codeql-go/blob/main/ql/src/semmle/go/frameworks/Gin.qll )), I propose that we make every definition in a framework modeling `private`. This allows some greater flexibility in changing our modeling, since we don't need to think about keeping deprecated versions around for a whole year.
It _does_ have the downside that someone writing a query can't reuse the classes/predicates for a framework, but it didn't seem to be too big of a concern. If we need to provide access, we can always make the definitions non-private (the other way is not so easy).
\## Customizations
Also introduced `Customizations.qll` like in JS/Java/Go (to replace `site.qll`)
2020-09-01 14:37:11 +02:00
Taus Brock-Nannestad
6a96c53d15
Python: Add missing getNode invocation
2020-09-01 14:04:31 +02:00
Taus Brock-Nannestad
26d14aba98
Python: Use nodeFrom/nodeTo instead of pred/succ
2020-09-01 14:00:30 +02:00
CodeQL CI
b9a6183ec2
Merge pull request #4175 from aschackmull/java/adjust-cwe-089-qltest
...
Approved by aibaars
2020-09-01 12:43:56 +01:00
Erik Krogh Kristensen
2628c05e43
split out comment over multiple lines
2020-09-01 13:12:44 +02:00
Erik Krogh Kristensen
c6947320ea
use isAsyncOrGenerator instead of isOrdinary
2020-09-01 13:11:44 +02:00
Arthur Baars
2729d109a5
Merge pull request #4123 from aschackmull/java/records-dataflow
...
Java: Add data flow for record getters.
2020-09-01 13:02:24 +02:00
Anders Schack-Mulligen
e5d7208c12
Java: Adjust a few qltests.
2020-09-01 12:49:09 +02:00
Arthur Baars
aedfa47cb4
Add missing QHelp files
2020-09-01 12:46:57 +02:00
Rasmus Wriedt Larsen
c5e3333d10
Python: Update expected tests after last commit
...
I'm pushing too fast it seems
2020-09-01 12:01:34 +02:00
Rasmus Wriedt Larsen
e0cfe8123e
Python: Update comments for new taint tests
...
I see I didn't keep them up to date as I implemented things
2020-09-01 11:58:26 +02:00
Rasmus Wriedt Larsen
cda88a5e64
Python: Refactor: use DataFlow::Node.asExpr()
2020-09-01 11:53:06 +02:00
Rasmus Wriedt Larsen
ddc55a18cf
Python: Fix taint handling of copy.deepcopy
...
(test results didn't change)
Thanks @yoff 👍
2020-09-01 11:50:46 +02:00
Rasmus Wriedt Larsen
e5a361c230
Python: Better taint tests for copy.deepcopy
2020-09-01 11:50:33 +02:00
Mathias Vorreiter Pedersen
aa3b268525
Merge pull request #4162 from jbj/ssa-ref-parameters
...
C++: SSA and range analysis for reference parameters
2020-09-01 11:48:41 +02:00
Anders Schack-Mulligen
82692876d8
Java: Add some test cases.
2020-09-01 11:24:30 +02:00
Mathias Vorreiter Pedersen
472363b86e
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-01 11:08:52 +02:00
Anders Schack-Mulligen
c25dd4be8c
Merge pull request #3363 from ggolawski/xslt-injection
...
CodeQL query to detect XSLT injections
2020-09-01 11:03:19 +02:00
Anders Schack-Mulligen
1dae99e4a5
Merge pull request #3543 from porcupineyhairs/WebsocketReadAsSource
...
Java: add websocket reads as remote flow source.
2020-09-01 10:58:02 +02:00
Mathias Vorreiter Pedersen
91a23096bb
C#: Sync identical files
2020-09-01 10:54:54 +02:00
Mathias Vorreiter Pedersen
3cca74e654
C++: Accept test changes
2020-09-01 10:54:46 +02:00
Mathias Vorreiter Pedersen
9de570b300
C++: Use the newly added predicates in field flow. This commit also adds a Class column to the FieldContent branch so FieldContent has a pretty toString implementation again.
2020-09-01 10:54:09 +02:00
Mathias Vorreiter Pedersen
1e13a39932
C++: Add getUpdatedInterval predicate to ChiInstructions, and getUsedInterval predicate to NonPhiMemoryOperands.
2020-09-01 10:53:48 +02:00
Anders Schack-Mulligen
beca44ec2f
Merge pull request #4172 from rvermeulen/java/xss-sink-extensible
...
Java: Customizable XSS analysis
2020-09-01 09:27:50 +02:00
Robert Marsh
87b657054f
C++: reverse flow for iterator operator qualifiers
2020-08-31 14:53:05 -07:00
Robert Marsh
d4cf92e374
C++: Improve non-member iterator operator detection
2020-08-31 14:52:29 -07:00
Robert Marsh
10005dd199
Merge branch 'main' into rdmarsh2/cpp/input-iterators-1Merge changes to input/output models for functions that return thisand resolve conflicting changes to taint tests.
2020-08-31 14:49:01 -07:00
Remco Vermeulen
2bdd3d7712
Apply qldoc suggestions
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-08-31 17:28:51 +02:00
Taus Brock-Nannestad
ec64606d5a
Python: Remove CopyStep branch type
2020-08-31 17:23:02 +02:00
Taus Brock-Nannestad
eb6443df21
Merge branch 'python-add-typetracker' of github.com:tausbn/ql into python-add-typetracker
2020-08-31 17:22:13 +02:00
Taus
8e1f99af99
Python: Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-08-31 17:20:12 +02:00
Taus Brock-Nannestad
3547c70d35
Python: Add tests with redefinition of fields/variables
2020-08-31 17:17:37 +02:00
Taus Brock-Nannestad
06103f4ff2
Python: Consistently use attribute/attr
2020-08-31 17:16:31 +02:00
CodeQL CI
35494ab97c
Merge pull request #4171 from max-schaefer/js/promise-flow-public
...
Approved by erik-krogh
2020-08-31 15:15:27 +01:00
CodeQL CI
79e87a6c3d
Merge pull request #4088 from aschackmull/java/string-formatted
...
Approved by aibaars
2020-08-31 15:02:49 +01:00
Erik Krogh Kristensen
f7edf28d0d
allow mailto links in js/unsafe-external-link
2020-08-31 16:01:28 +02:00
Rasmus Wriedt Larsen
cf2eacd7a6
Python: Adjust additional taint after PostUpdateNode addition
...
Still no results though :(
2020-08-31 14:59:29 +02:00
Rasmus Wriedt Larsen
4e73abc254
Merge branch 'main' into python-more-additional-taint-steps
2020-08-31 14:34:42 +02:00
Tom Hvitved
4e963a8a8e
Merge pull request #4165 from hvitved/csharp/foreach-guard
...
C#: Fix bug in guards logic for `foreach` loops
2020-08-31 14:32:09 +02:00
CodeQL CI
dc9cc20fdd
Merge pull request #4161 from yoff/SharedDataflow_PostUpdateNodes
...
Approved by RasmusWL, aschackmull, hvitved, jbj
2020-08-31 11:57:44 +01:00
Max Schaefer
22ccae6006
JavaScript: Make PromiseFlow module public.
2020-08-31 11:55:10 +01:00
CodeQL CI
9d6b2e7684
Merge pull request #4042 from aschackmull/java/xsssink-extensible
...
Approved by aibaars
2020-08-31 11:54:25 +01:00
Anders Schack-Mulligen
b89a22b583
Merge pull request #4170 from aibaars/drop-inefficient-toarray
...
Java: remove InefficientToArray.ql
2020-08-31 12:45:06 +02:00
Arthur Baars
66d39bb5f6
Java: remove InefficientToArray.ql
...
This query was deprecated 4 years ago.
Fixes : #4167
2020-08-31 10:39:03 +02:00
Rasmus Lerchedahl Petersen
5f3eda0a22
Python: Annotate test file
...
Also add test of custom flow
2020-08-31 09:06:13 +02:00
Grzegorz Golawski
0f555d42ed
Fix test
2020-08-30 22:55:17 +02:00
Porcupiney Hairs
441825919c
Java : add MongoDB injection sinks
2020-08-31 02:24:23 +05:30
Grzegorz Golawski
5e462a897d
Merge branch 'main' into xslt-injection
2020-08-30 22:45:31 +02:00
Grzegorz Golawski
37f4410764
Fix test
2020-08-30 22:32:57 +02:00
Porcupiney Hairs
4f07733b06
remove U+200B
2020-08-30 04:54:02 +05:30
ubuntu
104c9b5dac
Move sinks into separate classes
2020-08-29 11:24:58 +02:00
Alessio Della Libera
8f98723822
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-29 11:18:41 +02:00
Taus Brock-Nannestad
7108d28395
Python: Remove failing non-inline test
...
It is subsumed by `tracked.ql` anyway.
2020-08-28 21:21:29 +02:00
Taus Brock-Nannestad
5d853e840a
Merge branch 'main' into python-add-typetracker
2020-08-28 19:59:58 +02:00
Taus Brock-Nannestad
8b78b6b1dc
Python: Add inline tests
...
Nodes to which we track type tracking flow from the source (any
identifier named `tracked`) are indicated with a `$tracked` tag, and
`$tracked=attr_name` if the attribute is for the specified attribute
of the given node.
For nodes that do have flow from `tracked`, I indicate this in one of
two ways:
- If it's expected due to the design of type tracking, I omit the
`$tracked tag.
- If it's flow that _ought_ to be there, I indicate it as a false
negative: `$f-:tracked`
Currently, only an instance of global flow is in the latter category.
2020-08-28 19:55:52 +02:00
Taus Brock-Nannestad
fbe8b64dd4
Python: Add support for attribute reads and writes
2020-08-28 19:55:14 +02:00
Jonas Jensen
023f2e97c1
C++: Really accept test results this time
2020-08-28 16:50:23 +02:00
Tom Hvitved
b205702853
C#: Fix bug in guards logic for foreach loops
2020-08-28 15:19:11 +02:00
Tom Hvitved
ddb33c914b
C#: Add test that demonstrates issue with guards logic for foreach statements
2020-08-28 15:13:18 +02:00
Asger F
813d14791d
Merge pull request #4043 from erik-krogh/ts4
...
JS: Add support for TypeScript 4
2020-08-28 14:02:08 +01:00
Rasmus Lerchedahl Petersen
750735c70c
Dataflow: Update test expectations
2020-08-28 15:00:01 +02:00
Jonas Jensen
2c613a72b9
C++: Autoformat
2020-08-28 14:56:19 +02:00
Jonas Jensen
a25cc2d9c7
C++: Accept range-analysis test results
2020-08-28 14:54:44 +02:00
lcartey@github.com
a4cb774932
C++: Support dereferenced variables in simple range analysis
...
- Support inference of guards on reference variables
- Support type bounds for reference variables
- Support reference variables when widening
- Support reference variables when determining arithmetic assignment
2020-08-28 14:52:36 +02:00
Jonas Jensen
027f22d8e7
C++: Test that range analysis ignores references
2020-08-28 14:41:57 +02:00
Jonas Jensen
a3a3423db2
C++: Treat reference parameters as non-references
2020-08-28 14:33:01 +02:00
Rasmus Lerchedahl Petersen
6b8d9f2a77
Merge branch 'main' of github.com:github/codeql into SharedDataflow_PostUpdateNodes
2020-08-28 13:01:14 +02:00
Rasmus Lerchedahl Petersen
9503c5d8bb
Python: Add post-update nodes
2020-08-28 12:59:11 +02:00
Erik Krogh Kristensen
f4060723bb
add stats for new properties
2020-08-28 12:43:26 +02:00
Calum Grant
93e0bd9d85
Merge pull request #4126 from tamasvajk/feature/array-index
...
C#: Fix computed sizes for implicitly sized array creation
2020-08-28 11:21:39 +01:00
Tom Hvitved
6eca97bc32
Merge pull request #4113 from tamasvajk/feature/nullability-extraction-cil
...
Enable nullability checks on Semmle.Extraction.CIL
2020-08-28 12:06:54 +02:00
Tom Hvitved
647ed03a2b
Merge pull request #4136 from tamasvajk/feature/qldocs
...
C#: Add missing QlDocs
2020-08-28 12:03:03 +02:00
Taus
8caaf8f17c
Merge pull request #4158 from RasmusWL/python-reformualte-js-team-comment
...
Python: Reformualte explanation of experience from JS
2020-08-28 11:33:00 +02:00
Rasmus Wriedt Larsen
2d2b036b8c
Python: Fix expected output for moved taint tests
2020-08-28 11:25:46 +02:00
Rasmus Wriedt Larsen
7213da195c
Python: Use standard naming scheme for taint flow tests
...
We got into problems since using `string.py` would shadow the string module from
the standard library. By some reason I adopted a pattern of `_` as suffix, but
let us just use the standard pattern of `test_` prefix like a normal testing
framework like pytest does.
2020-08-28 11:22:42 +02:00
Rasmus Wriedt Larsen
621e3f6c3c
Python: Add dataflow test of deep call graph
2020-08-28 11:17:23 +02:00
Rasmus Wriedt Larsen
45ab723423
Python: Add dataflow test for a,b = b,a
...
Also enables a single test to output more than one OK
2020-08-28 11:12:25 +02:00
Rasmus Wriedt Larsen
496d856c48
Python: Reformualte explanation of experience from JS
2020-08-28 10:49:33 +02:00
Erik Krogh Kristensen
038cca814a
Merge branch 'main' into ts4
2020-08-28 10:27:49 +02:00
Taus
afe234dade
Merge pull request #4156 from RasmusWL/python-fix-changenote-fstring-taint
...
Python: fstring taint change note should be for 1.26
2020-08-28 10:23:06 +02:00
Jonas Jensen
55d7ac88f9
Merge pull request #4148 from geoffw0/vecextra
...
C++: Improvements to string and vector models.
2020-08-28 10:05:42 +02:00
CodeQL CI
80cb8be405
Merge pull request #4155 from asger-semmle/js/lower-duplicate-element-id-precision
...
Approved by esbena
2020-08-28 08:52:58 +01:00
Rasmus Wriedt Larsen
7e6ebfd636
Enable labeler action again
...
This time using `pull_request_target`, so it will work properly with forks. See
https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
This reverts commit d5d6093e75 .
2020-08-28 09:31:46 +02:00
CodeQL CI
ac94869978
Merge pull request #3978 from dellalibera/js/insecure-cookies
...
Approved by esbena
2020-08-28 08:31:38 +01:00
Rasmus Wriedt Larsen
deff36e9af
Python: fstring taint change note should be for 1.26
...
This fixes problem introduced in https://github.com/github/codeql/pull/4127
2020-08-28 09:00:07 +02:00
Tamas Vajk
29eaacdeaf
Fix typos and comment styling
2020-08-28 08:41:46 +02:00
Mathias Vorreiter Pedersen
ceddc2497a
Merge pull request #4151 from geoffw0/reftaint
...
C++: Taint tests for array and reference assignments.
2020-08-27 20:00:13 +02:00
Robert Marsh
2a6c624407
C++: fix up some iterator taint flows
2020-08-27 10:27:53 -07:00
Taus
1206ff5889
Merge pull request #4150 from RasmusWL/python-dataflow-private-import
...
Python: Make import of python private in shared dataflow
2020-08-27 18:05:55 +02:00
Geoffrey White
9b3da1f6c7
C++: Autoformat.
2020-08-27 16:55:45 +01:00
Geoffrey White
208cd4c888
C++: Fix assign in the test stl.h.
2020-08-27 16:52:22 +01:00
Rasmus Wriedt Larsen
f12d29de07
Python: Add taint test of more colleciton methods
2020-08-27 17:36:10 +02:00
Taus Brock-Nannestad
7112aa2e9a
Merge branch 'main' into python-add-typetracker
2020-08-27 17:05:26 +02:00
Asger Feldthaus
e7a0bc6be6
JS: Lower precision of ambiguous HTML ID attribute
2020-08-27 15:51:34 +01:00
Geoffrey White
927a4faa58
C++: Remove the non-reference case that we shouldn't need.
2020-08-27 15:42:40 +01:00
Rasmus Wriedt Larsen
654c4f39ac
Python: Add missing module.py to consistency/regression tests
2020-08-27 16:32:26 +02:00
Geoffrey White
071b303ea0
C++: Make the other versions consistent with this.
2020-08-27 15:24:48 +01:00
Rasmus Wriedt Larsen
36ac111659
Merge pull request #4152 from tausbn/python-sync-inline-test-expectations-files
...
Python: Sync InlineExpectationsTest.qll between Python and C++
2020-08-27 16:23:08 +02:00
Rasmus Wriedt Larsen
f1e11f1efd
Python: updated expected output from new shared dataflow tests
...
I did not verify whether these changes are OK or not, simply ran and accepted
the tests.
2020-08-27 16:17:12 +02:00
Geoffrey White
865d91de80
C++: Fix getAValueTypeParameterIndex().
2020-08-27 15:08:58 +01:00
Rasmus Wriedt Larsen
b11b5784b2
Python: Adtop more complete tests from old dataflow impl
...
The ones in test/experimental/dataflow/[consistency,regression]/test.py was a
copy from test/library-tests/taint/dataflow/test.py.
However, test/library-tests/taint/dataflow/test.py only contains a subset of
test/library-tests/taint/config/test.py, that only contains a subset of
test/library-tests/taint/general/test.py
This commit updates the experimental dataflow tests to be a copy of the
test/library-tests/taint/general/test.py file.
There seems to have been a few changes to the file after it being copied, in
`test_truth` and `test_early_exit`. I have no reproduced those changes.
2020-08-27 16:08:51 +02:00
Jonas Jensen
c507b337f2
Merge pull request #3921 from catenacyber/NullCheckParam
...
C++: Adds another redundant null check rule
2020-08-27 16:07:13 +02:00
Geoffrey White
816b8abd7c
C++: Add a test case using a const int *.
2020-08-27 15:05:23 +01:00
Tamas Vajk
7e2cf9a858
Adjust code review findings
2020-08-27 15:11:55 +02:00
Tamas Vajk
fcd426210f
C#: Add missing QlDoc for code duplication
2020-08-27 14:43:16 +02:00
Taus Brock-Nannestad
797e290a67
Python+CPP: Change values to value
2020-08-27 14:12:40 +02:00
Taus Brock-Nannestad
dccbcc15b3
Python: Sync InlineExpectationsTest.qll between Python and C++
...
Also changes `valuesasas` to `values` in the test example.
2020-08-27 13:37:26 +02:00
Rasmus Wriedt Larsen
9da6da6106
Python: Fix imports in shraed dataflow tests
2020-08-27 13:29:41 +02:00
Taus
e7322d114f
Merge pull request #4077 from yoff/MagicMethods
...
Python: Add support for magic methods
2020-08-27 13:20:56 +02:00
Taus
d3175a7899
Merge pull request #4110 from yoff/SharedDataflow_ParsimoniousFlowNodes
...
Python: Shared dataflow, parsimonious flow nodes
2020-08-27 13:19:23 +02:00
CodeQL CI
30ac2f9c84
Merge pull request #4143 from tausbn/python-add-inline-test-expectations-library
...
Approved by RasmusWL
2020-08-27 12:18:41 +01:00
Taus
a750252c07
Merge pull request #4147 from RasmusWL/python-remove-symlink
...
Python: Remove symlink from experimental test
2020-08-27 13:16:07 +02:00
Geoffrey White
a5a3078b58
C++: Add a test case using a typedef int.
2020-08-27 12:11:56 +01:00
Tom Hvitved
35e1c04b93
Merge pull request #4144 from hvitved/csharp/autobuilder/vsdevcmd
...
C#: Teach autobuilder about `VsDevCmd.bat`
2020-08-27 12:38:49 +02:00
Geoffrey White
6f62803e1f
C++: Taint tests for array and reference assignments.
2020-08-27 11:26:25 +01:00
Rasmus Wriedt Larsen
909bff2313
Python: Make import of python private in shared dataflow
2020-08-27 11:48:56 +02:00
Rasmus Wriedt Larsen
627363d6ea
Python: Test taint step for string augmented assignment
...
Apprently it just works 😕 :magic:
2020-08-27 11:37:56 +02:00
Geoffrey White
111da4c352
C++: Add a model of std::vector::assign.
2020-08-27 10:22:31 +01:00
Rasmus Wriedt Larsen
569e54e7bb
Python: Remove symlink from experimental test
2020-08-27 11:19:55 +02:00
Geoffrey White
0952fb9777
C++: Minor correction in one of the string models.
2020-08-27 10:13:12 +01:00
Geoffrey White
fbac4ce44f
C++: Split StdStringCStr and allow reverse flow on data.
2020-08-27 10:11:03 +01:00
Geoffrey White
fbff44ea45
C++: Add reverse taint as well.
2020-08-27 10:09:51 +01:00
Geoffrey White
6ae96baaf6
C++: Model std::vector::data.
2020-08-27 10:08:58 +01:00
Geoffrey White
2235c19593
C++: Add test cases for 'assign' and extra cases for 'data'.
2020-08-27 10:08:42 +01:00
Rasmus Wriedt Larsen
d0081dfbfa
Python: Attempt at taint step for list.append/set.add
2020-08-27 10:57:07 +02:00
Rasmus Wriedt Larsen
af20c3e082
Python: Make new taint tracking tests runnable again
...
since the files was called `collection`, that conflicted with import system :|
2020-08-27 10:44:14 +02:00
Esben Sparre Andreasen
9aa1404646
JS: fix formatting of InsecureCookie.qll
2020-08-27 09:44:45 +02:00
Tom Hvitved
2ac732c50a
C#: Teach autobuilder about VsDevCmd.bat
2020-08-27 09:05:37 +02:00
Rasmus Lerchedahl Petersen
09025c2198
Python: Fix test, update results and annotations
2020-08-27 08:40:13 +02:00
Esben Sparre Andreasen
67278d9c93
Merge pull request #4141 from esbena/js/clarify-sanitization
...
JS: make sanitization a "common" technique rather than "important"
2020-08-27 08:08:17 +02:00
ubuntu
736f76b685
Simplify getQueryCall
2020-08-27 02:12:17 +02:00
ubuntu
30e7f958a8
Highlight API call
2020-08-27 01:42:16 +02:00
Robert Marsh
c0edc08315
C++: Simplify non-member iterator operator models
2020-08-26 16:19:03 -07:00
Robert Marsh
994e845ab0
C++: use set literals in iterator models
2020-08-26 16:08:39 -07:00
ubuntu
7eeec0d765
Correct typo example
2020-08-27 01:07:13 +02:00
ubuntu
cbe879ae73
Correct typo examples
2020-08-27 01:05:49 +02:00
Robert Marsh
6f0cc16979
C++: remove non-existent operators from model
2020-08-26 15:52:53 -07:00
ubuntu
68ff480892
Update .qhelp
2020-08-27 00:51:08 +02:00
ubuntu
13f443d2c3
Update getLdapjsClientDNMethodName
2020-08-27 00:48:29 +02:00
Alessio Della Libera
616113aeff
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-27 00:47:29 +02:00
ubuntu
94bd9c6d3e
Rename LdapjsDN to LdapjsDNArgument and add it as Sink
2020-08-27 00:43:38 +02:00
ubuntu
7d36b3b4d2
Correct typo
2020-08-27 00:26:54 +02:00
ubuntu
2305a642eb
Correct typo
2020-08-27 00:24:50 +02:00
Alessio Della Libera
23287aacee
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-27 00:17:55 +02:00
Alessio Della Libera
f12ac8ca60
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-27 00:17:33 +02:00
ubuntu
cd1d50b637
Update expected output
2020-08-26 23:50:15 +02:00
Alessio Della Libera
dcf51c75e9
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.ql
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-26 23:33:52 +02:00
Porcupiney Hairs
3f6eef8437
Java: add websocket reads as remote flow source.
...
Currently, JAX-WS reads are considered as untrusted. However, `java.net.http.WebSocket` reads are not marked as such.
This PR adds support for the same.
2020-08-27 02:45:59 +05:30
Rasmus Wriedt Larsen
bd21fc5601
Python: Autoformat
2020-08-26 20:37:48 +02:00
Rasmus Wriedt Larsen
c24e3452f5
Python: Add more expected collection taint steps
2020-08-26 20:28:33 +02:00
Rasmus Wriedt Larsen
423139bc22
Python: Add additional taint steps for iterable-unpacking
2020-08-26 20:21:15 +02:00
Esben Sparre Andreasen
d27442e846
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-08-26 20:18:54 +02:00
Rasmus Wriedt Larsen
afb160fbbb
Python: Add additional taint steps for for-iteration
2020-08-26 20:18:31 +02:00
Rasmus Wriedt Larsen
e2a89aa296
Python: Add additional taint steps for copy
...
deepcopy was already handled somehow, don't really know how :D
2020-08-26 19:39:38 +02:00
Rasmus Wriedt Larsen
b974dadca1
Python: Add additional taint steps for containers
2020-08-26 19:39:37 +02:00
Rasmus Wriedt Larsen
b6049765a8
Python: Add a few more collection taint tests
2020-08-26 19:39:36 +02:00
Rasmus Wriedt Larsen
32f9d30136
Python: Add syntactic taint steps for json methods
2020-08-26 19:39:36 +02:00
Rasmus Wriedt Larsen
41e24ae93f
Python: Add non-syntactical test for taint of json methods
2020-08-26 19:39:35 +02:00
Rasmus Wriedt Larsen
5f9aa4c3b9
Python: Restructure defaultAdditionalTaintStep tests
...
This makes it easier to add a new test-case, and makes it easier to work with
the existing files. It does have a downside on making it a bit more annoying
looking at TestTaint.expected, and possible longer runtime, but I think it's
still worth it.
2020-08-26 19:39:33 +02:00
Rasmus Wriedt Larsen
a1ada62596
Python: Remodel taint tests for shared lib
...
I took the bits from ql/test/library-tests/taint/ that seemed easy to port. I
left out namedtuple for now, but it is part of internal tracking ticket, so
won't be forgotten.
2020-08-26 19:39:32 +02:00
Mathias Vorreiter Pedersen
1221165792
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-08-26 19:13:54 +02:00
Dave Bartolomeo
01a61469d3
Merge pull request #4137 from tausbn/python-cpp-make-inline-test-libs-language-agnostic
...
CPP: Make inline expectation test library language agnostic.
2020-08-26 13:00:19 -04:00
Mathias Vorreiter Pedersen
d900a70738
C++: Accept test changes in query tests
2020-08-26 18:10:21 +02:00
Rasmus Lerchedahl Petersen
dcabd37974
Python: Update test expectations
2020-08-26 17:58:35 +02:00
Rasmus Lerchedahl Petersen
bf6211f639
Merge branch 'main' of github.com:github/codeql into SharedDataflow_ParsimoniousFlowNodes
2020-08-26 17:50:17 +02:00
Rasmus Lerchedahl Petersen
6c173047e6
Merge branch 'MagicMethods' of github.com:yoff/codeql into MagicMethods
2020-08-26 17:43:27 +02:00
Rasmus Lerchedahl Petersen
47e35c530d
Merge branch 'main' of github.com:github/codeql into MagicMethods
2020-08-26 17:42:44 +02:00
Taus Brock-Nannestad
0f221ccfa2
Merge branch 'main' into python-cpp-make-inline-test-libs-language-agnostic
2020-08-26 17:23:25 +02:00
Mathias Vorreiter Pedersen
dd8984dfc5
C++: Keep ExplicitFieldStoreQualifierNode private
2020-08-26 16:14:58 +02:00
Taus Brock-Nannestad
e193e12b3f
Python: Add support for inline test expectations library
2020-08-26 16:10:04 +02:00
Taus
b1946c60dd
Merge pull request #4127 from RasmusWL/python-tainttracking-fstring
...
Python: Handle f-strings in (current) taint tracking
2020-08-26 16:06:01 +02:00
Taus Brock-Nannestad
a824d75e4f
C++: Add documentation for the LineComment class
2020-08-26 16:02:26 +02:00
Tamas Vajk
18c65e9f73
Fix typo in change notes
2020-08-26 15:57:41 +02:00
Mathias Vorreiter Pedersen
e4807c0181
C++: Accept test changes
2020-08-26 15:51:09 +02:00
Mathias Vorreiter Pedersen
9d9c78c9f6
C++: Use the information provided by the IR alias analysis to detect dataflow read and store steps.
2020-08-26 15:51:03 +02:00
Mathias Vorreiter Pedersen
2a8ee90828
C++: Demonstrate lack of flow when taking the address of a field and loading it afterwards
2020-08-26 15:50:57 +02:00
Esben Sparre Andreasen
89305865d0
JS: make sanitization a "common" technique rather than "important"
2020-08-26 15:41:54 +02:00
Tamas Vajk
3f54e5d310
Add change note
2020-08-26 15:12:11 +02:00
Jonas Jensen
f60abd8cf9
Merge pull request #4125 from geoffw0/oparray2
...
C++: Model operator[]
2020-08-26 13:44:02 +02:00
Nick Rolfe
00316dca8b
Merge pull request #4120 from github/igfoo/global_vars
...
C++: Give fewer types to global variables
2020-08-26 12:29:41 +01:00
Taus Brock-Nannestad
f8ba4c1579
CPP: Make inline expectation test library language agnostic.
...
In preparation for adding this to Python, I have split out the
definition of the comment class in a separate file (which will be
specific to each language).
2020-08-26 13:06:24 +02:00
Tamás Vajk
9ef827641f
C#: Add .editorconfig file ( #4129 )
2020-08-26 12:41:00 +02:00
Tamas Vajk
8a4754f8d7
C#: Add missing QlDoc for frameworks
2020-08-26 11:48:02 +02:00
Tamas Vajk
4be15af06a
C#: Add missing QlDoc for various predicates
2020-08-26 11:34:20 +02:00
Tamas Vajk
ce68e458e0
C#: Add QlDoc for predicates in Helpers
2020-08-26 11:21:44 +02:00
Tamas Vajk
048428a6fa
C#: Add missinq QlDoc for Serialization classes, remove unused DangerousCallable
2020-08-26 11:21:44 +02:00
Geoffrey White
3f04530d84
C++: Autoformat.
2020-08-26 09:34:06 +01:00
Tamas Vajk
36a9e47178
C#: Add missing QlDoc for dotnet base constructs
2020-08-26 09:13:01 +02:00
Erik Krogh Kristensen
61427393be
add qldoc to Generators.qll file
2020-08-26 09:11:39 +02:00
Alessio Della Libera
57f3c73d3d
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-26 02:08:31 +02:00
Alessio Della Libera
6979c394fe
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-26 02:08:18 +02:00
Alessio Della Libera
355c7bc3b5
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-26 02:08:08 +02:00
Alessio Della Libera
e027c8cc13
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-26 01:48:05 +02:00
Alessio Della Libera
a1f64e26cf
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-26 01:47:52 +02:00
Alessio Della Libera
3bd7615a75
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-26 01:47:37 +02:00
Alessio Della Libera
57cf447188
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-26 01:46:59 +02:00
Robert Marsh
28d3343e2b
Merge pull request #4122 from jbj/constexpr-const-test
...
C++: Demonstrate that constexpr implies const
2020-08-25 19:36:13 -04:00
Robert Marsh
83260740ff
C++: QLDoc for StdStringBeginEnd
2020-08-25 13:28:13 -07:00
Robert Marsh
c3a65148bc
C++: add some missing QLDoc
2020-08-25 13:24:54 -07:00
Robert Marsh
34ddbc0dc2
C++: add std::string::end to model
2020-08-25 13:22:00 -07:00
Rasmus Lerchedahl Petersen
fae915bbb5
Python: QL doc
2020-08-25 21:02:17 +02:00
Erik Krogh Kristensen
e6bfffaed3
update basic-block on ExceptionalFunctionReturnNode and FunctionReturnNode
2020-08-25 20:09:41 +02:00
Erik Krogh Kristensen
840f30f7bc
add basic-block test to dataflow tests
2020-08-25 20:09:36 +02:00
Erik Krogh Kristensen
90422fe705
add support for delegating yield
2020-08-25 20:05:53 +02:00
Erik Krogh Kristensen
6a07e1e82b
add more passing tests
2020-08-25 20:04:35 +02:00
Erik Krogh Kristensen
afaaea8922
support basic generators
2020-08-25 20:04:30 +02:00
Geoffrey White
fdf45f02f1
C++: Autoformat.
2020-08-25 18:53:19 +01:00
Geoffrey White
c083c6235d
C++: Explicitly model data flow in through reference return values.
2020-08-25 16:20:12 +01:00
Tamas Vajk
997388b075
Fix first set of code review comments
2020-08-25 17:11:34 +02:00
Rasmus Lerchedahl Petersen
551ae42fb9
Merge branch 'main' of github.com:github/codeql into SharedDataflow_NestedComprehensions
2020-08-25 15:45:20 +02:00
Rasmus Lerchedahl Petersen
d67f57a0bb
Python: Remove dead code
2020-08-25 15:39:37 +02:00
Taus
000fa33d54
Merge pull request #4013 from yoff/SharedDataflow_SequenceFlow
...
Python: Shared dataflow: Content flow
2020-08-25 15:38:14 +02:00
Rasmus Lerchedahl Petersen
56b78a664e
Python: Store step for generators
2020-08-25 15:36:26 +02:00
Rasmus Lerchedahl Petersen
ecf3928ed1
Python: Handle comprehensions with multiple fors
2020-08-25 15:21:08 +02:00
CodeQL CI
92c97b1778
Merge pull request #4124 from RasmusWL/python-taint-tracking-string-methods
...
Approved by yoff
2020-08-25 14:14:47 +01:00
Erik Krogh Kristensen
592ed8a3a1
remove ordinary return flow from generator functions
2020-08-25 14:02:57 +02:00
Geoffrey White
76a07f7292
C++: Use [, ...] syntax.
2020-08-25 12:30:06 +01:00
Geoffrey White
d31987d496
C++: Additional QLDoc.
2020-08-25 12:21:06 +01:00
Geoffrey White
23a792b8c6
C++: Add tests of nested vectors.
2020-08-25 12:13:32 +01:00
Rasmus Wriedt Larsen
2dbf83b579
Python: TaintTracking: Move tests of py3 string methods
2020-08-25 13:06:27 +02:00
Rasmus Wriedt Larsen
cf121cc4d0
Python: TaintTracking: stringMethods => stringManipualtion
2020-08-25 13:05:27 +02:00
Rasmus Lerchedahl Petersen
1cdb6be531
Merge branch 'main' of github.com:github/codeql into SharedDataflow_NestedComprehensions
2020-08-25 13:05:13 +02:00
Rasmus Wriedt Larsen
238e0845aa
Python: Minor refactoring
2020-08-25 12:50:41 +02:00
Rasmus Wriedt Larsen
0439b83c60
Python: Taint when using unicode
2020-08-25 12:50:32 +02:00
Rasmus Wriedt Larsen
2a29e26687
Python: Fix grammar
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-08-25 12:41:53 +02:00
Tamás Vajk
74db25d80c
C#: Enable nullability on Semmle.Extraction.CIL.Driver ( #4114 )
2020-08-25 11:44:08 +02:00
CodeQL CI
722b1a24f6
Merge pull request #4087 from erik-krogh/thisJsx
...
Approved by asgerf
2020-08-25 10:20:32 +01:00
CodeQL CI
844abc51e8
Merge pull request #4108 from erik-krogh/packType
...
Approved by asgerf
2020-08-25 10:17:28 +01:00
Rasmus Wriedt Larsen
483bd0e863
Python: Fix shared taint tracking tests
...
Since there was a .ql file, qltest tried to run a test in
test/experimental/dataflow/taintracking/ which failed since there was no code.
2020-08-25 11:15:11 +02:00
yoff
3140b43db2
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-25 10:48:01 +02:00
Tamás Vajk
dc62cd166c
C#: Enable nullability checks in Semmle.Extraction.Tests ( #4112 )
2020-08-25 08:40:30 +02:00
Robert Marsh
9aa3735165
C++: add tests for non-std:: iterators
2020-08-24 14:19:34 -07:00
Tamas Vajk
66e3739e72
Fix failing PrintAst test
2020-08-24 22:41:08 +02:00
Erik Krogh Kristensen
b0d4e79653
split out trap tests to avoid "package.json" naming conflict in trap test
2020-08-24 21:36:34 +02:00
Geoffrey White
adbfad21ef
C++: Correct the localFlow test.
2020-08-24 18:05:30 +01:00
ubuntu
22f5ae4ad4
Format code
2020-08-24 18:53:37 +02:00
Geoffrey White
c0aaed2fac
Merge branch 'main' into oparray2
2020-08-24 17:36:18 +01:00
Geoffrey White
ae807f7f33
C++: Autoformat.
2020-08-24 17:36:07 +01:00
Rasmus Wriedt Larsen
13148b42d3
Python: Handle taint of f-strings
2020-08-24 17:23:10 +02:00
Rasmus Wriedt Larsen
2f090df6d3
Python: Transform comments to QLDoc for security.strings.Basic
2020-08-24 17:20:04 +02:00
Rasmus Lerchedahl Petersen
2608509fa7
Merge branch 'main' of github.com:github/codeql into SharedDataflow_SequenceFlow
2020-08-24 17:16:33 +02:00
Rasmus Lerchedahl Petersen
e91581e9fa
Python: Experiments with nested comprhensions
2020-08-24 17:15:31 +02:00
Rasmus Wriedt Larsen
be2acc00db
Python: Add test for tainted f-string
2020-08-24 17:14:51 +02:00
CodeQL CI
e2c6a01c00
Merge pull request #4097 from erik-krogh/createRequire
...
Approved by esbena
2020-08-24 15:57:10 +01:00
Rasmus Wriedt Larsen
d96ef73033
Python: Handle taint for f-strings
...
Which we seem to not handle in the current taint tracking :O
f-strings needs to be Python 3 only, so enabled that test setup. I really liked
the idea for having the version specific tests right next to the normal tests,
so you don't have to look in
test/experimental/3/dataflow/i/will/forget/to/look/here.
2020-08-24 16:46:00 +02:00
Tamas Vajk
3dea6b3218
C#: Change implicitly sized array test input
2020-08-24 16:14:00 +02:00
Tamas Vajk
7516825b5f
C#: Fix computed sizes for implicitly sized array creation
2020-08-24 16:14:00 +02:00
Geoffrey White
1c38a4d5d6
Update cpp/ql/src/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-24 14:33:51 +01:00
Tamas Vajk
699cafa890
C#: Add implicitly sized array creations to tests
2020-08-24 15:27:35 +02:00
Geoffrey White
d3c8ffb995
C++: Clean up, comment, and restrict the new flow to the post-update node of the returned reference.
2020-08-24 14:07:06 +01:00
Geoffrey White
f2caa8a2b0
C++: Reverse taint through function models returning a reference.
2020-08-24 14:05:04 +01:00
Geoffrey White
f25ef26c37
C++: Permit taint flow to the left side of an assignment.
2020-08-24 14:01:49 +01:00
Geoffrey White
1da78ada14
C++: Model 'operator[]' and 'at' for std::string, std::vector and other containers.
2020-08-24 13:58:43 +01:00
Rasmus Wriedt Larsen
cb4b4e91ab
Python: Taint for string multiplication
2020-08-24 14:54:06 +02:00
Rasmus Wriedt Larsen
b688fe68d6
Python: Add options file to shared dataflow tests
...
Since there isn't one in top-level of experimental, making a single import made
tests go really slow :|
2020-08-24 14:54:05 +02:00
Rasmus Wriedt Larsen
5125c7a55c
Python: Add taint tests for encode/decode functions
2020-08-24 14:54:04 +02:00
Geoffrey White
f6770c5b88
C++: Add tests for std::string 'operator[]' and 'at()'.
2020-08-24 13:49:39 +01:00
Rasmus Wriedt Larsen
31b398937a
Python: Handle taint from bytes(obj)
2020-08-24 14:17:59 +02:00
Rasmus Wriedt Larsen
1e447c5ca2
Python: Handle taint for % formatting
2020-08-24 14:15:27 +02:00
Rasmus Wriedt Larsen
80745e8881
Python: Model string methods in shared taint tracking library
2020-08-24 13:58:42 +02:00
Rasmus Wriedt Larsen
a77f118b62
Python: Shared taint tracking: Handle string concat + subcript
2020-08-24 13:58:41 +02:00
Rasmus Wriedt Larsen
61f89ca3c3
Python: Add tests for shared taint tracking for strings
...
I adopted the TestTaint testing setup that I made for the "old" taint tracking
tests. This time around we should figure out if we can use .qlref or similar so
it doesn't end up in multiple copies that are not kept up to date :|
The `repr` predicate could probably be placed somewhere better. For now I just
wanted something that could help me. I considered just expanding the `repr`
predicate in `ql/src/semmle/python/strings.qll`, but since it's currently used
by queries, I didn't want to do anything about it.
Anyway, the output it gives is much more useful than seeing this ;)
```
| test.py:20 | ok | str_operations | test.py:20:9:20:10 | ts |
| test.py:21 | fail | str_operations | test.py:21:9:21:18 | BinaryExpr |
| test.py:22 | fail | str_operations | test.py:22:9:22:18 | BinaryExpr |
| test.py:23 | fail | str_operations | test.py:23:9:23:21 | Subscript |
| test.py:24 | fail | str_operations | test.py:24:9:24:13 | Subscript |
| test.py:25 | fail | str_operations | test.py:25:9:25:18 | Subscript |
| test.py:26 | fail | str_operations | test.py:26:9:26:13 | Subscript |
| test.py:27 | fail | str_operations | test.py:27:9:27:15 | str() |
| test.py:35 | fail | str_methods | test.py:35:9:35:23 | Attribute() |
| test.py:36 | fail | str_methods | test.py:36:9:36:21 | Attribute() |
| test.py:37 | fail | str_methods | test.py:37:9:37:22 | Attribute() |
| test.py:38 | fail | str_methods | test.py:38:9:38:23 | Attribute() |
| test.py:40 | fail | str_methods | test.py:40:9:40:19 | Attribute() |
| test.py:41 | fail | str_methods | test.py:41:9:41:23 | Attribute() |
| test.py:42 | fail | str_methods | test.py:42:9:42:36 | Attribute() |
| test.py:44 | fail | str_methods | test.py:44:9:44:25 | Attribute() |
| test.py:45 | fail | str_methods | test.py:45:9:45:45 | Attribute() |
| test.py:47 | fail | str_methods | test.py:47:9:47:21 | Attribute() |
| test.py:48 | fail | str_methods | test.py:48:9:48:19 | Attribute() |
| test.py:49 | fail | str_methods | test.py:49:9:49:18 | Attribute() |
| test.py:51 | fail | str_methods | test.py:51:9:51:32 | Attribute() |
| test.py:52 | fail | str_methods | test.py:52:9:52:34 | Attribute() |
| test.py:54 | fail | str_methods | test.py:54:9:54:21 | Attribute() |
| test.py:55 | fail | str_methods | test.py:55:9:55:19 | Attribute() |
| test.py:56 | fail | str_methods | test.py:56:9:56:18 | Attribute() |
| test.py:57 | fail | str_methods | test.py:57:9:57:21 | Attribute() |
| test.py:58 | fail | str_methods | test.py:58:9:58:18 | Attribute() |
| test.py:59 | fail | str_methods | test.py:59:9:59:18 | Attribute() |
| test.py:60 | fail | str_methods | test.py:60:9:60:21 | Attribute() |
| test.py:62 | fail | str_methods | test.py:62:9:62:26 | Attribute() |
| test.py:63 | fail | str_methods | test.py:63:9:63:42 | Attribute() |
| test.py:65 | fail | str_methods | test.py:65:9:65:26 | Attribute() |
| test.py:66 | fail | str_methods | test.py:66:9:66:42 | Attribute() |
| test.py:69 | fail | str_methods | test.py:69:9:69:25 | Attribute() |
| test.py:70 | fail | str_methods | test.py:70:9:70:26 | Attribute() |
| test.py:71 | fail | str_methods | test.py:71:9:71:22 | Attribute() |
| test.py:72 | fail | str_methods | test.py:72:9:72:21 | Attribute() |
| test.py:73 | fail | str_methods | test.py:73:9:73:23 | Attribute() |
| test.py:78 | ok | str_methods | test.py:78:9:78:39 | Attribute() |
```
2020-08-24 13:58:39 +02:00
Jonas Jensen
b2cd98a98f
C++: Confirm correct behaviour on C++20
...
Making `constexpr` imply `const` was correct for C++11 and was a correct
emulation of a GCC bug on GCC < 5.0. This test confirms that the problem
isn't there in C++20.
2020-08-24 13:42:40 +02:00
Philippe Antoine
07610e0899
Format document
2020-08-24 13:12:54 +02:00
Ian Lynagh
3ead154c9a
C++: Add VariableDeclarationEntry test to library-tests/variables/global
2020-08-24 11:51:52 +01:00
Erik Krogh Kristensen
309346841a
Merge branch 'main' into packType
2020-08-24 12:44:24 +02:00
Erik Krogh Kristensen
5acfd92e0f
bump the extractor version
2020-08-24 12:42:19 +02:00
Erik Krogh Kristensen
d633410e3c
make the extractor not crash on invalid "package.json" files
2020-08-24 12:42:08 +02:00
Erik Krogh Kristensen
eb84f97e7f
Merge branch 'main' into ts4
2020-08-24 12:20:48 +02:00
CodeQL CI
765c40ef03
Merge pull request #4019 from erik-krogh/asyncCalls
...
Approved by asgerf
2020-08-24 11:18:42 +01:00
Anders Schack-Mulligen
d82fee11b1
Java: Add data flow for record getters.
2020-08-24 11:51:04 +02:00
Jonas Jensen
cd8e9a1ece
C++: Demonstrate that constexpr implies const
...
This test shows that a member function declared `constexpr` also gets a
`const` specifier.
2020-08-24 11:39:41 +02:00
Taus
b8d6f76749
Merge pull request #4056 from yoff/SharedDataflow_ParameterTests
...
Python: Shared dataflow, parameter routing tests
2020-08-24 11:36:30 +02:00
Ian Lynagh
fb62ce6d25
C++: Give fewer types to global variables
...
Follows change in the extractor.
2020-08-24 00:49:33 +01:00
Mathias Vorreiter Pedersen
6f750dac88
Merge remote-tracking branch 'origin/main' into alternative-instruction-operand-flow
2020-08-23 18:46:07 +02:00
ubuntu
3e97ec85b2
Add CodeQL to detect LDAP Injection in JS
2020-08-23 15:24:29 +02:00
Robert Marsh
bc0d21879d
Merge branch 'main' into rdmarsh2/cpp/input-iterators-1
...
Resolve test conflict
2020-08-21 14:36:27 -07:00
Robert Marsh
141d240813
C++: autoformat
2020-08-21 14:22:44 -07:00
Robert Marsh
4c82753e8d
C++: remove constexpr in stl.h temporarily
2020-08-21 14:22:32 -07:00
Robert Marsh
94d4e05c25
C++: Fix iterator taint flow
2020-08-21 14:04:45 -07:00
Robert Marsh
656340f5c6
C++: more tests for string iterator flow
2020-08-21 13:48:36 -07:00
Erik Krogh Kristensen
db57f3661e
Merge branch 'main' into ts4
2020-08-21 15:08:30 +02:00
Erik Krogh Kristensen
65a1769d43
Merge branch 'main' into asyncCalls
2020-08-21 14:58:27 +02:00
Erik Krogh Kristensen
1b655f9046
use threadsafe cache stored in ExtractorState
2020-08-21 14:45:24 +02:00
Erik Krogh Kristensen
7aca84cd45
search directly for "package.json" instead of iterating through the files in a folder
2020-08-21 14:31:49 +02:00
Erik Krogh Kristensen
3f0f2c796c
pass extension instead of locationManager to isAlways*Module
2020-08-21 14:27:47 +02:00
Erik Krogh Kristensen
bbbb0a2c5e
specialize module.createRequire support to ES2015 modules
2020-08-21 14:14:05 +02:00
Calum Grant
a93a84fb2e
Merge pull request #4065 from hvitved/csharp/dataflow-type-restriction
...
C#: Restrict `DataFlowType` to types belonging to `Node`s
2020-08-21 11:57:29 +01:00
yoff
d05954e5cc
Merge pull request #4109 from RasmusWL/python-basic-taint-tracking
...
Python: Basic taint tracking with shared library
2020-08-21 12:20:22 +02:00
Rasmus Lerchedahl Petersen
e1343c7f1e
Python: Support set literals.
2020-08-21 11:15:04 +02:00
Rasmus Lerchedahl Petersen
ccff84d546
Python: Test flow into conprehension
2020-08-21 10:40:22 +02:00
Rasmus Lerchedahl Petersen
f9b1c5e4bd
Python: Fix bug pointed out by reviewer
2020-08-21 10:04:27 +02:00
Erik Krogh Kristensen
e00951edf0
update TypeScript to 4.0.2
2020-08-21 09:50:27 +02:00
yoff
bfd9c0860f
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-08-21 09:43:29 +02:00
yoff
8e2b2540fa
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-08-21 09:39:00 +02:00
Tom Hvitved
86b91cec8a
Merge pull request #4111 from tamasvajk/feature/nullability-extraction
...
C#: Fix nullability warning in Semmle.Extraction
2020-08-21 09:22:05 +02:00
Tom Hvitved
ea77828a6a
Merge pull request #4116 from hvitved/csharp/print-ast-order-top-level
...
C#: Order top-level elements by location in `PrintAst.qll`
2020-08-21 09:09:20 +02:00
Tom Hvitved
b8cde180b9
C#: Order top-level elements by location in PrintAst.qll
2020-08-21 06:17:37 +02:00
CodeQL CI
29183fa0a1
Merge pull request #4067 from erik-krogh/noBin
...
Approved by esbena
2020-08-20 23:07:02 +01:00
CodeQL CI
508ade29f4
Merge pull request #4106 from erik-krogh/depTracked
...
Approved by esbena
2020-08-20 21:23:24 +01:00
Tamas Vajk
9cdee63ed7
C#: Enable nullability checks on Semmle.Extraction.CIL
2020-08-20 16:46:42 +02:00
Tamas Vajk
b9e3b327d6
C#: Fix nullability warning in Semmle.Extraction
2020-08-20 16:33:02 +02:00
Erik Krogh Kristensen
cef681d009
bump extractor version (again)
2020-08-20 15:58:44 +02:00
Erik Krogh Kristensen
68f7942820
Merge branch 'main' into noBin
2020-08-20 15:58:15 +02:00
Jonas Jensen
d56a03389c
Merge pull request #4107 from geoffw0/vecmethods
...
C++: Initial models for std::vector
2020-08-20 15:53:35 +02:00
Anders Schack-Mulligen
bcad18f490
Java: Use the instance argument type in call contexts.
2020-08-20 15:17:04 +02:00
Rasmus Lerchedahl Petersen
94e6fd9199
Python: Convenience methods
...
asVar, asCfgNode, and asExpr
2020-08-20 15:16:23 +02:00
Erik Krogh Kristensen
fa8edeed6a
change StoredXss example to use TypeTracking
2020-08-20 15:05:38 +02:00
Erik Krogh Kristensen
906705f84c
add SourceNode example to the TrackedNode deprecation description
2020-08-20 15:01:40 +02:00
Rasmus Lerchedahl Petersen
5a734730de
Python: Control flow nodes are dataflow nodes
...
iff they are expression nodes
We could refine this later, but it seems to work for now...
2020-08-20 15:00:42 +02:00
Rasmus Wriedt Larsen
7fb8e0e277
Python: Add basic shared taint tracking test
2020-08-20 14:49:17 +02:00
Rasmus Wriedt Larsen
0baac8fd54
Python: Adjust shared taint tracking skeleton
...
So it fits the setup from Java/Go, with AdditionalTaintStep class.
2020-08-20 14:49:09 +02:00
Geoffrey White
3d171f358a
Merge remote-tracking branch 'upstream/main' into vecmethods
2020-08-20 13:29:28 +01:00
Erik Krogh Kristensen
372e1a3d84
support the "type" field on package.json files while extracting
2020-08-20 14:26:15 +02:00
Tamás Vajk
2a8ff8785a
C#: Add AST printing ( #4038 )
2020-08-20 14:24:43 +02:00
Geoffrey White
258b61c5f8
Update cpp/ql/src/semmle/code/cpp/models/implementations/StdContainer.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-08-20 12:53:23 +01:00
Geoffrey White
689c637d48
C++: Rename things.
2020-08-20 12:52:40 +01:00
Anders Schack-Mulligen
ec7a65777b
Merge pull request #3855 from JLLeitschuh/feat/JLL/jOOQ_SQL_injection
...
Add jOOQ methods as SQL Injection Sinks
2020-08-20 13:17:07 +02:00
Erik Krogh Kristensen
bf88c81f78
bump extractor version
2020-08-20 12:57:48 +02:00
Erik Krogh Kristensen
a347569385
inline StandardCharsets.UTF_8
2020-08-20 12:57:05 +02:00
Erik Krogh Kristensen
410ef8fe0e
exit early if the default encoding is not UTF-8
2020-08-20 12:50:43 +02:00
Erik Krogh Kristensen
fe41521e0c
add tutorial for how to get around TrackedNodes deprecation
2020-08-20 12:46:17 +02:00
Geoffrey White
61158e759b
C++: Improve StdContainerConstructor model.
2020-08-20 11:04:59 +01:00
Geoffrey White
acd1437103
C++: Change note.
2020-08-20 10:46:12 +01:00
Geoffrey White
f2ac4fa94a
C++: Autoformat.
2020-08-20 10:44:54 +01:00
Geoffrey White
cda9fd250b
C++: Model vector methods.
2020-08-20 10:30:01 +01:00
Geoffrey White
620126d38c
C++: Add vector taint cases to test.
2020-08-20 10:27:25 +01:00
Erik Krogh Kristensen
8f68f512df
deprecate TrackedNodes.qll
2020-08-20 11:26:22 +02:00
Geoffrey White
43c8efdf63
C++: Repair the range based for test.
2020-08-20 10:19:54 +01:00
CodeQL CI
6adedac337
Merge pull request #4096 from erik-krogh/qlMod
...
Approved by esbena
2020-08-20 10:05:30 +01:00
Geoffrey White
8afa92d881
C++: Add more detail to the vector class in the test stl.h.
2020-08-20 09:39:35 +01:00
Tom Hvitved
65b4d35add
Merge pull request #4055 from tamasvajk/feature/partial-methods
...
C#: Add body to partial methods
2020-08-20 10:14:56 +02:00
Tom Hvitved
6dc1244410
Merge pull request #4064 from hvitved/csharp/gvn-speedup
...
C#: Speed up `Implements.qll` and `Unification.qll`
2020-08-20 10:11:36 +02:00
Mathias Vorreiter Pedersen
aa522b54c1
Merge pull request #4098 from jbj/SimpleRangeAnalysis-mul-constant
...
C++: Support multiplication by constants in range analysis
2020-08-20 09:22:05 +02:00
Erik Krogh Kristensen
5b42e242af
add change note for supporting ".cjs" files
2020-08-20 09:18:26 +02:00
Jonas Jensen
b1c0e6f626
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-mul-constant
2020-08-20 08:20:31 +02:00
Robert Marsh
6b1243e8b4
C++: respond to PR comments on Iterator.qll
2020-08-19 16:23:00 -07:00
Robert Marsh
20188b7bc2
C++: input iterator models
2020-08-19 12:11:36 -07:00
Robert Marsh
d32d6c9d8d
WIP: more iterator cases
2020-08-19 11:51:41 -07:00
Robert Marsh
d50dd090be
C++: rename to Iterator*Operator
2020-08-19 11:51:41 -07:00
Robert Marsh
85af74eb06
C++: Models for bidirectional input iterators
2020-08-19 11:51:41 -07:00
Robert Marsh
a457d54ad1
Merge pull request #4078 from jbj/SimpleRangeAnalysis-AssignMulExpr
...
C++: Range analysis for unsigned AssignMulExpr
2020-08-19 14:42:04 -04:00
Rasmus Lerchedahl Petersen
18e946d4aa
Python: Small rearrangement
2020-08-19 17:56:02 +02:00
Jonas Jensen
b14bc42756
Merge pull request #4090 from geoffw0/strmethods
...
C++: Model taint through many more methods in std::string
2020-08-19 16:40:46 +02:00
Tom Hvitved
a23bb6d5ec
Merge pull request #4095 from hvitved/csharp/dataflow/ap5
...
C#: Increase `accessPathLimit` from 3 to 5
2020-08-19 16:12:22 +02:00
Jonas Jensen
21d16d13fc
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-AssignMulExpr
2020-08-19 14:50:40 +02:00
Anders Schack-Mulligen
e7709f73e9
Merge pull request #4099 from hvitved/java/dataflow/unique-encl-callable
...
Java: Use `unique` aggregate in `Node::getEnclosingCallable()`
2020-08-19 13:30:01 +02:00
Anders Schack-Mulligen
28578fd572
Java: Autoformat.
2020-08-19 13:12:24 +02:00
Jonas Jensen
83884c0dc5
Merge pull request #4089 from jbj/jbj/printFloat-precise
...
C++: Accept float.toString changes in tests
2020-08-19 12:58:27 +02:00
Rasmus Lerchedahl Petersen
bd53a711d3
Merge branch 'main' of github.com:github/codeql into SharedDataflow_SequenceFlow
2020-08-19 11:42:41 +02:00
Mathias Vorreiter Pedersen
eed6fe96ae
Merge branch 'main' into alternative-instruction-operand-flow
2020-08-19 11:18:51 +02:00
Erik Krogh Kristensen
3d5c1560e4
basic support for .cjs files
2020-08-19 10:53:57 +02:00
Erik Krogh Kristensen
103f739d16
add test for types of modules
2020-08-19 10:52:38 +02:00
Jonas Jensen
3e8f62fa5f
Merge pull request #4100 from nickrolfe/ssa_errors
...
C++: fix compilation errors in ssa.cpp
2020-08-19 09:58:49 +02:00
CodeQL CI
2319c289aa
Merge pull request #4092 from erik-krogh/strictExtractor
...
Approved by esbena
2020-08-19 08:47:07 +01:00
Rasmus Lerchedahl Petersen
176aa06fad
Python: Address review comments
2020-08-19 09:21:16 +02:00
yoff
5e84754f73
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-08-19 08:03:47 +02:00
yoff
06bd436aea
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-08-19 08:02:53 +02:00
yoff
8fbb447f4c
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-19 08:02:29 +02:00
yoff
1c3b945e55
Update python/ql/src/experimental/dataflow/internal/DataFlowPublic.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-19 08:01:54 +02:00
yoff
43a5e74c65
Update python/ql/src/experimental/dataflow/internal/DataFlowPublic.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-19 08:01:42 +02:00
Nick Rolfe
d7849bc13f
C++: fix compilation errors in ssa.cpp
2020-08-18 18:39:00 +01:00
Jonathan Leitschuh
341ab2ee0e
Fix formatting on jOOQ.qll
2020-08-18 13:20:56 -04:00
Jonas Jensen
01a226bdcf
C++: Rename multipliesBy->effectivelyMultipliesBy
...
From code review of #4098 .
2020-08-18 16:53:29 +02:00
Jonas Jensen
b65f82210f
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-mul-constant
2020-08-18 16:51:56 +02:00
Jonas Jensen
f79c140dc1
C++: Cosmetic: use [0, 1] instead of [0 .. 1]
2020-08-18 16:48:23 +02:00
Jonas Jensen
fd0937eb01
C++: Accept improved IntegerOverflowTainted test
2020-08-18 16:47:29 +02:00
Jonas Jensen
dd5b561f08
C++: Use getValue(e) instead of e.getValue()
2020-08-18 16:45:24 +02:00
Rasmus Lerchedahl Petersen
de1c75c279
Python: QL format
2020-08-18 16:34:04 +02:00
Tom Hvitved
13577967f3
Data flow: Document Node::getEnclosingCallable()
2020-08-18 15:16:00 +02:00
Rasmus Lerchedahl Petersen
f8364dc74b
Python: QL doc
2020-08-18 15:11:20 +02:00
Tom Hvitved
129e528e1c
Java: Use unique aggregate in Node::getEnclosingCallable()
...
I noticed while running tuple stats on JDK that the functionality of `Node::getEnclosingCallable()`
is not know to the QL compiler (possibly because it is defined recursively).
Here is an example pipeline before:
```
[2020-08-18 14:45:03] (29s) Starting to evaluate predicate DataFlowImpl::flowFwdIn#ffffffff#cur_delta/8[93]@efe539 (iteration 93)
[2020-08-18 14:45:04] (30s) Tuple counts for DataFlowImpl::flowFwdIn#ffffffff#cur_delta:
4034 ~4% {6} r1 = SCAN DataFlowImpl::flowFwd#ffffff#prev_delta AS I OUTPUT I.<0>, I.<5>, I.<1>, I.<2>, I.<3>, I.<4>
11410 ~4% {7} r2 = JOIN r1 WITH DataFlowImpl::flowIntoCallNodeCand2#ffffff_1502#join_rhs AS R ON FIRST 2 OUTPUT r1.<5>, r1.<2>, r1.<3>, r1.<4>, r1.<1>, R.<2>, R.<3>
11095 ~2% {7} r3 = JOIN r2 WITH DataFlowImpl::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r2.<1>, r2.<2>, r2.<3>, r2.<0>, r2.<4>, r2.<5>, r2.<6>
11661 ~0% {10} r4 = JOIN r1 WITH DataFlowImpl::flowIntoCallNodeCand2#ffffff_150234#join_rhs AS R ON FIRST 2 OUTPUT r1.<0>, r1.<2>, r1.<3>, r1.<4>, r1.<5>, r1.<1>, R.<2>, R.<3>, R.<4>, R.<5>
1489 ~0% {10} r5 = SELECT r4 ON r4.<9> = true
1489 ~16% {7} r6 = SCAN r5 OUTPUT r5.<1>, r5.<2>, r5.<3>, r5.<4>, r5.<5>, r5.<6>, r5.<7>
12584 ~14% {7} r7 = r3 \/ r6
4966 ~6% {8} r8 = JOIN r7 WITH DataFlowImplCommon::Cached::TSpecificCall#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r7.<5>, R.<1>, r7.<0>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<6>
1115 ~6% {8} r9 = JOIN r8 WITH DataFlowImplCommon::Cached::DispatchWithCallContext::reducedViableImplInCallContext#fff_02#join_rhs AS R ON FIRST 2 OUTPUT r8.<0>, r8.<1>, r8.<2>, r8.<3>, r8.<4>, r8.<5>, r8.<6>, r8.<7>
1652 ~11% {8} r10 = JOIN r9 WITH DataFlowImplCommon::Cached::DispatchWithCallContext::prunedViableImplInCallContext#fff@staged_ext AS R ON FIRST 2 OUTPUT r9.<7>, R.<2>, r9.<2>, r9.<3>, r9.<4>, r9.<5>, r9.<6>, r9.<0>
4966 ~0% {8} r11 = JOIN r7 WITH DataFlowImplCommon::Cached::TSpecificCall#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r7.<0>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<5>, r7.<6>, R.<1>
3851 ~0% {8} r12 = r11 AND NOT DataFlowImplCommon::Cached::DispatchWithCallContext::reducedViableImplInCallContext#fff_02#join_rhs AS R(r11.<5>, r11.<7>)
3851 ~7% {7} r13 = SCAN r12 OUTPUT r12.<5>, r12.<0>, r12.<1>, r12.<2>, r12.<3>, r12.<4>, r12.<6>
3763916 ~0% {8} r14 = JOIN r13 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 1 OUTPUT r13.<6>, R.<1>, r13.<1>, r13.<2>, r13.<3>, r13.<4>, r13.<5>, r13.<0>
3765568 ~0% {8} r15 = r10 \/ r14
4604 ~20% {7} r16 = JOIN r7 WITH DataFlowImplCommon::Cached::TSomeCall#f@staged_ext AS R ON FIRST 1 OUTPUT r7.<5>, r7.<0>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<6>
1383356 ~0% {8} r17 = JOIN r16 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 1 OUTPUT r16.<6>, R.<1>, r16.<1>, r16.<2>, r16.<3>, r16.<4>, r16.<5>, r16.<0>
5148924 ~0% {8} r18 = r15 \/ r17
1076 ~20% {7} r19 = JOIN r7 WITH DataFlowImplCommon::Cached::TAnyCallContext#f@staged_ext AS R ON FIRST 1 OUTPUT r7.<5>, r7.<0>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<6>
660959 ~3% {8} r20 = JOIN r19 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 1 OUTPUT r19.<6>, R.<1>, r19.<1>, r19.<2>, r19.<3>, r19.<4>, r19.<5>, r19.<0>
5809883 ~0% {8} r21 = r18 \/ r20
1938 ~2% {7} r22 = JOIN r7 WITH DataFlowImplCommon::Cached::TReturn#fff_2#join_rhs AS R ON FIRST 1 OUTPUT r7.<5>, r7.<0>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<6>
1184996 ~5% {8} r23 = JOIN r22 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 1 OUTPUT r22.<6>, R.<1>, r22.<1>, r22.<2>, r22.<3>, r22.<4>, r22.<5>, r22.<0>
6994879 ~0% {8} r24 = r21 \/ r23
11590 ~18% {8} r25 = JOIN r24 WITH DataFlowUtil::Node::getEnclosingCallable#ff AS R ON FIRST 2 OUTPUT r24.<0>, r24.<2>, r24.<3>, r24.<4>, r24.<5>, r24.<6>, r24.<7>, r24.<1>
11378 ~10% {9} r26 = JOIN r25 WITH project#DataFlowImpl::flowCand#fffff#10 AS R ON FIRST 1 OUTPUT r25.<1>, r25.<2>, r25.<3>, r25.<4>, r25.<5>, r25.<6>, r25.<0>, r25.<7>, R.<1>
11378 ~10% {9} r27 = SELECT r26 ON r26.<8> >= r26.<4>
11378 ~10% {9} r28 = SELECT r27 ON r27.<8> <= r27.<4>
11378 ~13% {8} r29 = SCAN r28 OUTPUT r28.<5>, r28.<7>, r28.<0>, r28.<1>, r28.<2>, r28.<3>, r28.<4>, r28.<6>
149 ~43% {7} r30 = JOIN r29 WITH DataFlowImplCommon::Cached::recordDataFlowCallSite#ff@staged_ext AS R ON FIRST 2 OUTPUT r29.<0>, r29.<2>, r29.<3>, r29.<4>, r29.<5>, r29.<6>, r29.<7>
149 ~45% {8} r31 = JOIN r30 WITH DataFlowImplCommon::Cached::TSpecificCall#ff@staged_ext AS R ON FIRST 1 OUTPUT r30.<1>, r30.<2>, r30.<3>, r30.<4>, r30.<5>, r30.<0>, r30.<6>, R.<1>
11378 ~10% {8} r32 = SCAN r28 OUTPUT r28.<0>, r28.<1>, r28.<2>, r28.<3>, r28.<4>, r28.<5>, r28.<6>, r28.<7>
11229 ~9% {8} r33 = r32 AND NOT DataFlowImplCommon::Cached::recordDataFlowCallSite#ff@staged_ext AS R(r32.<5>, r32.<7>)
11229 ~17% {7} r34 = SCAN r33 OUTPUT r33.<0>, r33.<1>, r33.<2>, r33.<3>, r33.<4>, r33.<5>, r33.<6>
11229 ~11% {8} r35 = JOIN r34 WITH DataFlowImplCommon::Cached::TSomeCall#f@staged_ext AS R CARTESIAN PRODUCT OUTPUT r34.<0>, r34.<1>, r34.<2>, r34.<3>, r34.<4>, r34.<5>, r34.<6>, R.<0>
11378 ~11% {8} r36 = r31 \/ r35
11378 ~11% {8} r37 = r36 AND NOT DataFlowImpl::flowFwdIn#ffffffff#prev AS R(r36.<5>, r36.<6>, r36.<0>, r36.<7>, r36.<1>, r36.<2>, r36.<3>, r36.<4>)
11378 ~9% {8} r38 = SCAN r37 OUTPUT r37.<5>, r37.<6>, r37.<0>, r37.<7>, r37.<1>, r37.<2>, r37.<3>, r37.<4>
return r38
```
And after:
```
[2020-08-18 15:02:55] (121s) Starting to evaluate predicate DataFlowImpl::flowFwdIn#ffffffff#cur_delta/8[93]@5ed760 (iteration 93)
[2020-08-18 15:02:55] (121s) Tuple counts for DataFlowImpl::flowFwdIn#ffffffff#cur_delta:
3918 ~2% {6} r1 = SCAN DataFlowImpl::flowFwd#ffffff#prev_delta AS I OUTPUT I.<0>, I.<5>, I.<1>, I.<2>, I.<3>, I.<4>
16820 ~0% {7} r2 = JOIN r1 WITH DataFlowImpl::flowIntoCallNodeCand2#fffff_1402#join_rhs AS R ON FIRST 2 OUTPUT r1.<5>, r1.<2>, r1.<3>, r1.<4>, r1.<1>, R.<2>, R.<3>
16525 ~1% {7} r3 = JOIN r2 WITH DataFlowImpl::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r2.<6>, r2.<1>, r2.<2>, r2.<3>, r2.<0>, r2.<4>, r2.<5>
16820 ~0% {9} r4 = JOIN r1 WITH DataFlowImpl::flowIntoCallNodeCand2#fffff_14023#join_rhs AS R ON FIRST 2 OUTPUT r1.<0>, r1.<2>, r1.<3>, r1.<4>, r1.<5>, r1.<1>, R.<2>, R.<3>, R.<4>
1211 ~0% {9} r5 = SELECT r4 ON r4.<8> = true
1211 ~0% {7} r6 = SCAN r5 OUTPUT r5.<7>, r5.<1>, r5.<2>, r5.<3>, r5.<4>, r5.<5>, r5.<6>
17736 ~6% {7} r7 = r3 \/ r6
17736 ~4% {8} r8 = JOIN r7 WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<5>, r7.<6>, r7.<0>, R.<1>
6757 ~3% {9} r9 = JOIN r8 WITH DataFlowImplCommon::Cached::TSpecificCall#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r8.<5>, R.<1>, r8.<7>, r8.<0>, r8.<1>, r8.<2>, r8.<3>, r8.<4>, r8.<6>
112 ~62% {9} r10 = JOIN r9 WITH DataFlowImplCommon::Cached::DispatchWithCallContext::prunedViableImplInCallContext#fff@staged_ext AS R ON FIRST 3 OUTPUT r9.<0>, r9.<1>, r9.<3>, r9.<4>, r9.<5>, r9.<6>, r9.<7>, r9.<8>, r9.<2>
112 ~62% {8} r11 = JOIN r10 WITH DataFlowImplCommon::Cached::DispatchWithCallContext::reducedViableImplInCallContext#fff_02#join_rhs AS R ON FIRST 2 OUTPUT r10.<7>, r10.<2>, r10.<3>, r10.<4>, r10.<5>, r10.<6>, r10.<0>, r10.<8>
6757 ~0% {9} r12 = JOIN r8 WITH DataFlowImplCommon::Cached::TSpecificCall#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r8.<5>, r8.<7>, r8.<0>, r8.<1>, r8.<2>, r8.<3>, r8.<4>, r8.<6>, R.<1>
6757 ~0% {9} r13 = JOIN r12 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 2 OUTPUT r12.<2>, r12.<3>, r12.<4>, r12.<5>, r12.<6>, r12.<0>, r12.<7>, r12.<1>, r12.<8>
4945 ~0% {9} r14 = r13 AND NOT DataFlowImplCommon::Cached::DispatchWithCallContext::reducedViableImplInCallContext#fff_02#join_rhs AS R(r13.<5>, r13.<8>)
4945 ~4% {8} r15 = SCAN r14 OUTPUT r14.<6>, r14.<0>, r14.<1>, r14.<2>, r14.<3>, r14.<4>, r14.<5>, r14.<7>
5057 ~5% {8} r16 = r11 \/ r15
7628 ~12% {8} r17 = JOIN r8 WITH DataFlowImplCommon::Cached::TSomeCall#f@staged_ext AS R ON FIRST 1 OUTPUT r8.<5>, r8.<7>, r8.<0>, r8.<1>, r8.<2>, r8.<3>, r8.<4>, r8.<6>
7628 ~9% {8} r18 = JOIN r17 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 2 OUTPUT r17.<7>, r17.<2>, r17.<3>, r17.<4>, r17.<5>, r17.<6>, r17.<0>, r17.<1>
12685 ~14% {8} r19 = r16 \/ r18
1411 ~10% {8} r20 = JOIN r8 WITH DataFlowImplCommon::Cached::TAnyCallContext#f@staged_ext AS R ON FIRST 1 OUTPUT r8.<5>, r8.<7>, r8.<0>, r8.<1>, r8.<2>, r8.<3>, r8.<4>, r8.<6>
1411 ~11% {8} r21 = JOIN r20 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 2 OUTPUT r20.<7>, r20.<2>, r20.<3>, r20.<4>, r20.<5>, r20.<6>, r20.<0>, r20.<1>
14096 ~14% {8} r22 = r19 \/ r21
17736 ~10% {8} r23 = JOIN r7 WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT r7.<6>, R.<1>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<5>, r7.<0>
17736 ~4% {8} r24 = JOIN r23 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 2 OUTPUT r23.<2>, r23.<3>, r23.<4>, r23.<5>, r23.<6>, r23.<0>, r23.<7>, r23.<1>
1940 ~0% {8} r25 = JOIN r24 WITH DataFlowImplCommon::Cached::TReturn#fff_2#join_rhs AS R ON FIRST 1 OUTPUT r24.<6>, r24.<0>, r24.<1>, r24.<2>, r24.<3>, r24.<4>, r24.<5>, r24.<7>
16036 ~13% {8} r26 = r22 \/ r25
14256 ~8% {9} r27 = JOIN r26 WITH project#DataFlowImpl::flowCand#fffff#10 AS R ON FIRST 1 OUTPUT r26.<1>, r26.<2>, r26.<3>, r26.<4>, r26.<5>, r26.<6>, r26.<0>, r26.<7>, R.<1>
14256 ~8% {9} r28 = SELECT r27 ON r27.<8> >= r27.<4>
14256 ~8% {9} r29 = SELECT r28 ON r28.<8> <= r28.<4>
14256 ~9% {8} r30 = SCAN r29 OUTPUT r29.<5>, r29.<7>, r29.<0>, r29.<1>, r29.<2>, r29.<3>, r29.<4>, r29.<6>
122 ~28% {7} r31 = JOIN r30 WITH DataFlowImplCommon::Cached::recordDataFlowCallSite#ff@staged_ext AS R ON FIRST 2 OUTPUT r30.<0>, r30.<2>, r30.<3>, r30.<4>, r30.<5>, r30.<6>, r30.<7>
122 ~30% {8} r32 = JOIN r31 WITH DataFlowImplCommon::Cached::TSpecificCall#ff@staged_ext AS R ON FIRST 1 OUTPUT r31.<1>, r31.<2>, r31.<3>, r31.<4>, r31.<5>, r31.<0>, r31.<6>, R.<1>
14256 ~3% {8} r33 = SCAN r29 OUTPUT r29.<0>, r29.<1>, r29.<2>, r29.<3>, r29.<4>, r29.<5>, r29.<6>, r29.<7>
14134 ~3% {8} r34 = r33 AND NOT DataFlowImplCommon::Cached::recordDataFlowCallSite#ff@staged_ext AS R(r33.<5>, r33.<7>)
14134 ~12% {7} r35 = SCAN r34 OUTPUT r34.<0>, r34.<1>, r34.<2>, r34.<3>, r34.<4>, r34.<5>, r34.<6>
14134 ~7% {8} r36 = JOIN r35 WITH DataFlowImplCommon::Cached::TSomeCall#f@staged_ext AS R CARTESIAN PRODUCT OUTPUT r35.<0>, r35.<1>, r35.<2>, r35.<3>, r35.<4>, r35.<5>, r35.<6>, R.<0>
14256 ~7% {8} r37 = r32 \/ r36
14256 ~7% {8} r38 = r37 AND NOT DataFlowImpl::flowFwdIn#ffffffff#prev AS R(r37.<5>, r37.<6>, r37.<0>, r37.<7>, r37.<1>, r37.<2>, r37.<3>, r37.<4>)
14256 ~9% {8} r39 = SCAN r38 OUTPUT r38.<5>, r38.<6>, r38.<0>, r38.<7>, r38.<1>, r38.<2>, r38.<3>, r38.<4>
return r39
```
2020-08-18 15:09:08 +02:00
Jonas Jensen
a72d05ccdb
C++: Change note for *= and constant *
2020-08-18 15:07:35 +02:00
Jonas Jensen
b316644ac2
C++: SimpleRangeAnalysis for *= by constant
2020-08-18 15:07:20 +02:00
Erik Krogh Kristensen
1e65ed2228
support module.createRequire
2020-08-18 14:43:03 +02:00
Rasmus Lerchedahl Petersen
aab603d261
Python: QL doc
2020-08-18 14:37:59 +02:00
Tom Hvitved
bc77916246
Merge pull request #4093 from tamasvajk/feature/change-notes
...
C#: Add change notes for C# analysis
2020-08-18 14:35:01 +02:00
Rasmus Lerchedahl Petersen
d0eaa13974
Python: Magic -> Special and reaarange classes
2020-08-18 14:14:38 +02:00
Jonas Jensen
ca1f5317b3
Merge pull request #4068 from geoffw0/uncontrolled-alloc-size
...
C++: Downgrade `cpp/uncontrolled-allocation-size` query precision.
2020-08-18 13:59:53 +02:00
Tom Hvitved
f761a604f3
Merge pull request #4094 from tamasvajk/feature/comp-gen-array-size
...
C# Compiler generated flag for length arguments of implicitly sized arrays
2020-08-18 13:43:02 +02:00
Tom Hvitved
acb08287ab
C#: Rename isComplete() to isFullyConstructed()
2020-08-18 13:38:46 +02:00
Tom Hvitved
bdf4ae5f27
C#: Increase accessPathLimit from 3 to 5
2020-08-18 13:30:16 +02:00
Anders Schack-Mulligen
f75f5ab125
Merge pull request #3838 from hvitved/dataflow/flow-fwd-ctx
...
Data flow: Use precise call contexts in `flowFwd()`
2020-08-18 13:06:11 +02:00
yoff
b9bf11adb4
Update python/ql/src/semmle/python/Magic.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-18 12:59:57 +02:00
yoff
571520602d
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-18 12:59:20 +02:00
yoff
59cee284b5
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-18 12:59:04 +02:00
Rasmus Lerchedahl Petersen
bbf925fcc4
Python: Magic subscript and format
...
(this in preparation for addressing reviews)
2020-08-18 12:56:15 +02:00
Erik Krogh Kristensen
246d9b8c70
update expected trap files
2020-08-18 12:51:36 +02:00
Tamas Vajk
0cf4c99986
C#: Change compiler generated flag for length arguments of implicitly sized arrays
2020-08-18 12:06:01 +02:00
Tamas Vajk
99e62ceee6
C#: Add test for length argument of implicitly sized arrays
2020-08-18 11:44:24 +02:00
Jonas Jensen
b6b72729f6
C++: SimpleRangeAnalysis for MulExpr by constant
2020-08-18 11:37:59 +02:00
Erik Krogh Kristensen
03cb95c82b
bump extractor version
2020-08-18 11:20:04 +02:00
Tamas Vajk
6ae53b1865
C#: Add change notes for C# analysis
2020-08-18 11:10:04 +02:00
Jonas Jensen
2e2f99cabf
C++: Correctly classify the MulExpr rounding bugs
2020-08-18 10:39:57 +02:00
Jonas Jensen
a7d9715fd9
C++: BinaryOperation.hasOperands
...
QLDoc borrowed from JavaScript. Implementation borrowed from Java.
Parameter names changed.
2020-08-18 10:28:59 +02:00
Tamas Vajk
beeadea48f
Add extra tests for partial methods
2020-08-18 10:26:31 +02:00
Erik Krogh Kristensen
d1b3963e2d
correctly treat ES2015 modules as being in strict-mode in the extractor
2020-08-18 10:13:20 +02:00
Jonas Jensen
27345c64f3
C++: Also accept PointlessComparison test changes
2020-08-18 09:32:05 +02:00
Tamas Vajk
eba2c4331f
Add launch.json to gitignore
2020-08-18 09:23:38 +02:00
Erik Krogh Kristensen
61d4648893
update expected output of trap test
2020-08-17 22:53:16 +02:00
Erik Krogh Kristensen
eb5dfe8438
autoformat
2020-08-17 22:46:20 +02:00
Geoffrey White
5d485859af
Merge remote-tracking branch 'upstream/main' into
...
uncontrolled-alloc-size
2020-08-17 20:49:35 +01:00
Geoffrey White
be91cec7ad
C++: Add change note.
2020-08-17 20:45:49 +01:00
Geoffrey White
d76b25ec22
C++: Change note.
2020-08-17 17:55:52 +01:00
Geoffrey White
390af0d7d2
C++: Autoformat.
2020-08-17 17:55:52 +01:00
Geoffrey White
0234bca6ca
C++: Fix a hole in StdStringAppend and clarify comments.
2020-08-17 17:55:44 +01:00
Robert Marsh
9decb47bf0
Merge pull request #4076 from jbj/SimpleRangeAnalysis-AssignOperation
...
C++: Fix SimpleRangeAnalysis for AssignOperation
2020-08-17 12:55:26 -04:00
Geoffrey White
a11ca06189
C++: Implement more std::string models.
2020-08-17 17:33:09 +01:00
Geoffrey White
9204940830
C++: Add test cases for std::string methods.
2020-08-17 17:31:26 +01:00
Geoffrey White
789e781eb7
C++: Add prototypes for std::string methods to test.
2020-08-17 16:01:25 +01:00
Rasmus Lerchedahl Petersen
ca7c045d31
Python: bad re match made the tests fail..
2020-08-17 16:24:00 +02:00
Mathias Vorreiter Pedersen
bb3254d4ab
Merge branch 'main' into alternative-instruction-operand-flow
2020-08-17 16:21:10 +02:00
Erik Krogh Kristensen
73d1fac88e
support named tuples where not all tuple elements are named
2020-08-17 16:20:26 +02:00
Geoffrey White
4b4b8a9faa
Merge pull request #4074 from jbj/SimpleRangeAnalysis-extensible
...
C++: extensible range analysis
2020-08-17 14:46:57 +01:00
Tom Hvitved
a2fc92b9db
Data flow: Address review comments
2020-08-17 15:46:43 +02:00
Erik Krogh Kristensen
83ed41b247
move indices comment into plain comment
2020-08-17 15:43:52 +02:00
Erik Krogh Kristensen
0f87a89fd1
use typeLabel instead of typeDecl
...
Co-authored-by: Asger F <asgerf@github.com >
2020-08-17 15:31:41 +02:00
Erik Krogh Kristensen
c28889225a
skip binary files when extracting JavaScript
2020-08-17 15:21:15 +02:00
Jonas Jensen
e03fe81ce7
C++: Accept float.toString changes in tests
2020-08-17 15:07:00 +02:00
Anders Schack-Mulligen
a5701db3fa
Java: Support String.formatted in the format string queries.
2020-08-17 15:01:48 +02:00
CodeQL CI
c917cd02bd
Merge pull request #4054 from erik-krogh/urlIncludes
...
Approved by esbena
2020-08-17 13:54:25 +01:00
Erik Krogh Kristensen
6f28ddf1f8
proper support for this inside a JSX-name
2020-08-17 14:23:42 +02:00
Rasmus Lerchedahl Petersen
8eacef3467
Python: Add QL doc
2020-08-17 12:01:36 +02:00
Rasmus Lerchedahl Petersen
676690acb2
Merge branch 'main' of github.com:github/codeql into SharedDataflow_ParsimoniousFlowNodes
2020-08-17 11:42:45 +02:00
Remco Vermeulen
894b3f2cd4
Add or change qldocs
2020-08-17 11:40:08 +02:00
Rasmus Lerchedahl Petersen
bfdb580206
Python: Experiemntal cleanup strategy
2020-08-17 11:37:52 +02:00
Jonas Jensen
edc5e5fbcf
C++: Simplify defDependsOnDef for AssignOperation
...
These cases were unnecessarily transitive. There is no need for
`defDependsOnDef` to be transitive since that's handled in
`defDependsOnDefTransitively`.
The dependency information from the LHS of an `AssignmentOperation` is
now deduced the say way as the information from the RHS: by calling
`exprDependsOnDef`. This should effectively give us the same information
and recursion structure as if the operation (`x += e`) were desugared
(`x = x + e`).
2020-08-17 11:06:39 +02:00
Remco Vermeulen
8db5c4f2e2
Abstract additional taint step
2020-08-17 10:41:27 +02:00
Tom Hvitved
8876dd51c7
Merge pull request #4079 from hvitved/csharp/xml-data-flow-config
...
C#: Use `DataFlow3` instead of `DataFlow2` in `Xml.qll` to avoid overlap
2020-08-17 10:36:56 +02:00
Remco Vermeulen
518459c0f7
Abstract Xss sanitizer
...
Turn the Xss sanitizer into an abstract class to support customizations
and provide a default implementation.
2020-08-17 10:31:44 +02:00
Tom Hvitved
28a7656813
Merge pull request #4073 from aschackmull/java/move-test
...
Java: Temporarily move a qltest.
2020-08-17 09:08:44 +02:00
ubuntu
8ec91ef0c6
Change polarity predicate isInsecure
2020-08-16 15:23:29 +02:00
ubuntu
5d6e6be4e4
Add query-tests
2020-08-16 15:02:52 +02:00
ubuntu
3e9142bf71
Remove examples
2020-08-16 14:58:37 +02:00
ubuntu
2a322976c6
Changed .qhelp
2020-08-16 14:57:04 +02:00
ubuntu
91d44854c0
Replace class and module name
2020-08-16 14:53:31 +02:00
ubuntu
d4b231b867
Replace regex
2020-08-16 14:48:26 +02:00
ubuntu
e2908026c5
Remove redundancy
2020-08-16 14:41:55 +02:00
Alessio Della Libera
1ba39e4130
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:34:19 +02:00
Alessio Della Libera
05ffd672d7
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:33:38 +02:00
Alessio Della Libera
ab20beba56
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:32:51 +02:00
Alessio Della Libera
bfef84e1b5
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:32:05 +02:00
Alessio Della Libera
a2e9456450
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:31:21 +02:00
Alessio Della Libera
14c8e4ce76
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:30:45 +02:00
Alessio Della Libera
275b8dfda2
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:29:36 +02:00
Alessio Della Libera
9292e3b80e
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:28:39 +02:00
Alessio Della Libera
ab128f7172
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:27:26 +02:00
Alessio Della Libera
40e101de5a
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:26:15 +02:00
Alessio Della Libera
97f039af3a
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:25:11 +02:00
Alessio Della Libera
fb3ffb895a
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:23:17 +02:00
Alessio Della Libera
e463014759
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:21:56 +02:00
Alessio Della Libera
5cae3005f3
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:20:22 +02:00
Alessio Della Libera
10bd745740
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:18:54 +02:00
Alessio Della Libera
8d26b810ee
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:17:16 +02:00
Alessio Della Libera
0c121062b6
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:13:54 +02:00
Alessio Della Libera
67fccac8a9
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:13:03 +02:00
Jonas Jensen
768e5190a1
Merge pull request #4080 from geoffw0/split
...
C++: Split test file stl.cpp
2020-08-14 15:59:46 +02:00
Geoffrey White
89c2b6dc4b
Merge remote-tracking branch 'upstream/master' into split
2020-08-14 14:03:34 +01:00
Rasmus Lerchedahl Petersen
7ea3fc04c8
Python: adjust test annotation (for after feature)
2020-08-14 14:46:39 +02:00
Rasmus Lerchedahl Petersen
4bc04486cb
Python: Annotate tests (as before the new feature)
2020-08-14 14:41:35 +02:00
Tom Hvitved
357109a410
C#: Use DataFlow3 instead of DataFlow2 in Xml.qll to avoid overlap
...
`semmle.code.csharp.frameworks.system.Xml` is imported in `LibraryTypeDataFlow.qll`,
and therefore part of the default namespace. This means that the use of `DataFlow2`
inside `Xml.qll` overlaps with some queries. Bumping to `DataFlow3` resolves the issue.
2020-08-14 14:33:12 +02:00
Rasmus Lerchedahl Petersen
2817602a97
Merge branch 'master' of github.com:github/codeql into SharedDataflow_ParameterTests
2020-08-14 14:27:57 +02:00
Jonas Jensen
fe72b559d3
C++: Range analysis for unsigned AssignMulExpr
...
This is essentially a copy-paste job of `AssignAddExpr`, together with
the math from the `UnsignedMulExpr` support.
2020-08-14 14:19:54 +02:00
Rasmus Lerchedahl Petersen
e808d3033a
Python: Add magic to DataFlowCall
2020-08-14 14:19:18 +02:00
CodeQL CI
e9a36b2524
Merge pull request #4062 from tausbn/python-fix-unknown-import-star
...
Approved by yoff
2020-08-14 13:17:45 +01:00
Jonas Jensen
f90d779122
C++: Fix SimpleRangeAnalysis for AssignOperation
...
The range analysis wasn't producing useful bounds for `AssignOperation`s
(`+=`, `-=`) unless their RHS involved a variable. This is because a
shortcut was made in the `analyzableDef` predicate, which used to
specify that an analyzable definition was one for which we'd specified
the dependencies. But we can't distinguish between having _no
dependencies_ and having _no specification of the dependencies_.
The fix is to be more explicit about which definitions are analyzable.
To avoid too much repetition I'm still calling out to `analyzableExpr`
in the new code.
2020-08-14 14:15:58 +02:00
Rasmus Lerchedahl Petersen
4211f7f346
Merge branch 'master' of github.com:github/codeql into MagicMethods
2020-08-14 13:26:27 +02:00
Rasmus Lerchedahl Petersen
360ddc6314
Python: better charPred
2020-08-14 13:25:17 +02:00
Taus
8cbd4974ae
Merge pull request #3981 from yoff/SharedDataflow_Classes
...
Python: Dataflow, test magic methods
2020-08-14 12:45:55 +02:00
Jonas Jensen
e01e702f46
Merge pull request #4060 from bgianfo/patch-1
...
C++: Detect GoogleTest tests cases in FNumberOfTests.ql
2020-08-14 12:42:12 +02:00
Jonas Jensen
f7273b8665
C++: Add custom modeling to extensibility.ql
2020-08-14 12:27:30 +02:00
Jonas Jensen
ee3312503e
C++: Add test for extensible range analysis
...
This commit demonstrates that the range is too wide before custom
modeling has been added to the test.
2020-08-14 12:27:30 +02:00
Jonas Jensen
bf7732ec9d
C++: Silence QL compiler errors
2020-08-14 12:27:30 +02:00
Jonas Jensen
1deb1e6429
C++: Add SimpleRangeAnalysisExpr.dependsOnChild
2020-08-14 12:27:30 +02:00
Jonas Jensen
1b5b374a8e
C++: Move getFullyConverted{Upper,Lower}Bounds
...
Rather than being public, these internal predicates are now exposed
through a `SimpleRangeAnalysisInternal` module so it's clear that they
are not for general use.
2020-08-14 12:27:30 +02:00
Jonas Jensen
18ba562c25
C++: Fix: remember to bind e
2020-08-14 12:27:30 +02:00
Jonas Jensen
1c0e83a374
C++: Autoformat fixup
2020-08-14 12:27:30 +02:00
Jonas Jensen
aa78c6e750
C++: Move to experimental
...
And rename to `SimpleRangeAnalysisExpr` to clarify which of our range
analysis libraries this belongs to.
2020-08-14 12:27:30 +02:00
Jonas Jensen
cdddf5fd40
Merge remote-tracking branch 'upstream/master' into SimpleRangeAnalysis-extensible-base
2020-08-14 12:26:59 +02:00
Rasmus Lerchedahl Petersen
9556937840
Python: address review comments
2020-08-14 11:29:58 +02:00
Rasmus Lerchedahl Petersen
5ed3107045
Python: Start scaffold for magic methods
2020-08-14 11:12:23 +02:00
Tom Hvitved
e518cbabd6
Python: Sync data flow files
2020-08-14 11:04:45 +02:00
Tom Hvitved
9ebf8d1d58
Data flow: Sync files
2020-08-14 11:04:45 +02:00
Tom Hvitved
2d29fa1d15
Data flow: Use precise call contexts in flowFwd()
2020-08-14 11:04:45 +02:00
yoff
8d49ad7325
Update python/ql/test/experimental/dataflow/coverage/datamodel.py
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-14 10:53:37 +02:00
yoff
4b336e9b01
Update python/ql/test/experimental/dataflow/coverage/classes.py
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-14 10:53:10 +02:00
CodeQL CI
82f9826966
Merge pull request #4044 from aschackmull/java/xsssink-printwriter-format
...
Approved by aibaars
2020-08-14 08:34:48 +01:00
Anders Schack-Mulligen
4947e1d817
Java: Temporarily move a qltest.
2020-08-14 09:25:32 +02:00
Robert Marsh
ed06604b46
Merge pull request #4045 from geoffw0/plus
...
C++: Model more of std::string in models.
2020-08-13 16:59:47 -04:00
Brian Gianforcaro
a6bcbe7974
C++: Detect GoogleTest tests cases in FNumberOfTests.ql
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-08-13 12:06:00 -07:00
Geoffrey White
498b350add
Merge remote-tracking branch 'upstream/master' into plus
2020-08-13 18:21:28 +01:00
Geoffrey White
a839f1fae5
C++: Split off stringstream.cpp.
2020-08-13 18:17:24 +01:00
Geoffrey White
49d2f66ddb
C++: Tidy up sources and sinks.
2020-08-13 18:08:58 +01:00
Geoffrey White
f343eb9143
C++: Split stl.cpp into string.cpp and vector.cpp.
2020-08-13 18:04:46 +01:00
Geoffrey White
5d7f771933
C++: Split off stl.h from stl.cpp.
2020-08-13 18:04:45 +01:00
Robert Marsh
de87f8fc42
Merge pull request #4057 from geoffw0/sal
...
C++: SAL.qll QLDoc and cleanup
2020-08-13 12:33:52 -04:00
Geoffrey White
93f95b1c22
Merge pull request #4053 from jbj/SimpleRangeAnalysis-mul
...
C++: SimpleRangeAnalysis: unsigned multiplication
2020-08-13 16:59:31 +01:00
Geoffrey White
3d60756d40
C++: Downgrade the query precision.
2020-08-13 15:45:57 +01:00
Anders Schack-Mulligen
ecbbcc2f61
Merge pull request #4066 from Marcono1234/marcono1234/simplify-VarAccess-isLValue
...
[Java] Simplify VarAccess.isLValue()
2020-08-13 16:40:28 +02:00
Geoffrey White
7349333006
C++: Taint through char append.
2020-08-13 15:13:47 +01:00
Geoffrey White
3c0e7a709f
C++: Add a test of append with CharT.
2020-08-13 14:52:34 +01:00
Geoffrey White
732a8fa4c9
C++: Add another member function.
2020-08-13 14:52:34 +01:00
CodeQL CI
6c60589dbd
Merge pull request #4063 from erik-krogh/noJsMsg
...
Approved by esbena
2020-08-13 14:02:18 +01:00
Anders Schack-Mulligen
3469ad7ca6
Merge pull request #3600 from luchua-bc/java-sensitive-log4j2-logging
...
Add Log4J 2 and a new search string secret
2020-08-13 13:35:52 +02:00
Tom Hvitved
46f10fc032
C#: Restrict DataFlowType to types belonging to Nodes
2020-08-13 13:16:10 +02:00
Marcono1234
cca2d9d825
Simplify VarAccess.isLValue()
2020-08-13 13:12:57 +02:00
Tom Hvitved
dcccdee227
C#: Speed up Implements.qll and Unification.qll
...
Restrict constructed GVN types to those that are complete, and reduce
intermediate string construction in `toString()` computations.
2020-08-13 13:11:04 +02:00
Erik Krogh Kristensen
15a74493e0
more permissive path elements in js/incomplete-url-substring-sanitization
2020-08-13 11:46:13 +02:00
Erik Krogh Kristensen
3fb9c28806
adjust comment about slash position
2020-08-13 11:46:13 +02:00
Erik Krogh Kristensen
dc6943b739
Update change-notes/1.26/analysis-javascript.md
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-13 11:34:53 +02:00
Erik Krogh Kristensen
2c7bb8c51f
adjust error message when files have been found while extracting
2020-08-13 11:18:27 +02:00
Taus Brock-Nannestad
a1a1218f95
Python: Ignore from foo import * when foo is absent.
2020-08-13 10:50:28 +02:00
Taus Brock-Nannestad
dc5c0f8e7a
Python: Add test case for missing modules
2020-08-13 10:49:11 +02:00
Geoffrey White
f5abf74e0f
Update cpp/ql/src/Microsoft/SAL.qll
...
Co-authored-by: Robert Marsh <rdmarsh2@gmail.com >
2020-08-13 09:05:22 +01:00
Anders Schack-Mulligen
8891ae70b6
Merge pull request #3938 from lcartey/java/untrusted-data-to-external-api
...
Java: Untrusted data used in external APIs
2020-08-13 09:53:57 +02:00
Erik Krogh Kristensen
d35d3f4271
add test for catch with type unknown
2020-08-13 09:37:55 +02:00
Erik Krogh Kristensen
d95d427c5b
better support for the &&=, ||=, and ??= operators
2020-08-13 09:22:32 +02:00
Jonas Jensen
5e5a112c36
C++: Change note
2020-08-13 08:37:13 +02:00
Rasmus Lerchedahl Petersen
3f2fcbf0ae
Python: Remove most noise in the query output
...
Just a quick change, the query should probably be rewritten
2020-08-13 08:23:12 +02:00
Rasmus Lerchedahl Petersen
2cc7712d40
Python: Annotate test cases
2020-08-13 08:02:42 +02:00
Geoffrey White
2655616a0a
C++: Autoformat.
2020-08-12 16:59:15 +01:00
Geoffrey White
9719da8643
C++: Move a class that looks like it's intended to be public (and is used outside of the library) above the 'Implementation details' threshold.
2020-08-12 16:58:50 +01:00
Geoffrey White
d444778535
C++: Make a few things in SAL.qll private where it looks like that was intended (and they're not used outside the file).
2020-08-12 16:57:43 +01:00
Geoffrey White
aa6cb51bba
C++: QLDoc SAL.qll.
2020-08-12 16:55:26 +01:00
Rasmus Lerchedahl Petersen
6dfa2ea9d5
Python: update test expectation
2020-08-12 16:59:06 +02:00
Erik Krogh Kristensen
fd9eb1d40b
use Identifier instead of just a plain string when getting tuple-element-names
2020-08-12 16:55:55 +02:00
Rasmus Lerchedahl Petersen
20ffb3fd4c
Python: tests for argument routing
...
Needs annotations
2020-08-12 15:43:07 +02:00
Tamas Vajk
def1d888c6
C#: Add body of partial methods
2020-08-12 15:22:14 +02:00
lcartey@github.com
6f83c55ebd
Java: Switch to low as a precision
...
Code Scanning doesn't support "very-low"
2020-08-12 13:48:59 +01:00
CodeQL CI
66541f260b
Merge pull request #4012 from erik-krogh/getId
...
Approved by asgerf, esbena
2020-08-12 13:28:18 +01:00
Erik Krogh Kristensen
dc55ce2bf0
add change note
2020-08-12 14:27:33 +02:00
Erik Krogh Kristensen
1d111c3e1f
expand what urls are detected by js/incomplete-url-substring-sanitization
2020-08-12 14:25:35 +02:00
Luke Cartey
56ff8cf084
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-08-12 13:12:06 +01:00
CodeQL CI
aa9dfa0d6f
Merge pull request #4039 from intrigus-lgtm/patch-3
...
Approved by erik-krogh
2020-08-12 13:07:22 +01:00
Geoffrey White
b99ca60154
C++: Address review comments.
2020-08-12 12:56:28 +01:00
Erik Krogh Kristensen
a7a016c5df
update expected output
2020-08-12 13:29:43 +02:00
Jonas Jensen
b4679cb8cf
C++: Autoformat fixup
2020-08-12 13:09:23 +02:00
Jonas Jensen
93d8d8eb1d
C++: Demonstrate range analysis MulExpr bugs
...
Unless these issues can be reproduced in far less contrived code, I
don't think they will cause problems in practice.
2020-08-12 12:10:23 +02:00
Erik Krogh Kristensen
0e33eae960
add dbscheme upgrade script
2020-08-12 11:50:32 +02:00
Erik Krogh Kristensen
26dcd2faae
add support for getting the name from named tuple elements
2020-08-12 10:33:49 +02:00
lcartey@github.com
6b6172fa5b
Java: ExternalAPIs: Further review comments
...
- Extra qldoc
- Remove unnecessary module
2020-08-12 09:21:14 +01:00
Jonas Jensen
1ee96a4b4f
C++: SimpleRangeAnalysis: unsigned multiplication
2020-08-12 10:03:04 +02:00
Erik Krogh Kristensen
211ef61039
add change note
2020-08-12 09:29:34 +02:00
Erik Krogh Kristensen
b101305248
autoformat
2020-08-12 09:27:43 +02:00
Robert Marsh
e80cc63219
Merge pull request #3861 from dilanbhalla/privatedata
...
C++: Private Data File/Buffer Writes
2020-08-11 15:49:31 -04:00
Erik Krogh Kristensen
e1ecc4662c
fix typo
...
Co-authored-by: Asger F <asgerf@github.com >
2020-08-11 20:00:22 +02:00
Geoffrey White
a655124213
C++: I think this is more correct.
2020-08-11 17:28:31 +01:00
Geoffrey White
50558257fc
C++: Change note.
2020-08-11 17:05:49 +01:00
Geoffrey White
128b8328b9
C++: Autoformat.
2020-08-11 17:03:03 +01:00
Geoffrey White
f62ad75048
C++: Taint through std::string operator+=.
2020-08-11 17:03:02 +01:00
Geoffrey White
cf6f530823
C++: Taint through std::string operator+.
2020-08-11 16:58:55 +01:00
Geoffrey White
a57dfd6b67
C++: Taint through std::string append.
2020-08-11 16:54:39 +01:00
Geoffrey White
f824a893ca
C++: Add test cases for appending strings.
2020-08-11 16:50:52 +01:00
Geoffrey White
030ab4f626
C++: Add string append operators to the test (changes layout).
2020-08-11 16:47:56 +01:00
Jonas Jensen
2ea25b9d90
C++: Precise printing of integer bounds
...
The pretty-printing of a QL `float` didn't include enough digits to tell
whether a large number had accurate bounds. The `toString` value of a
float appears to be more precise.
2020-08-11 16:48:01 +02:00
lcartey@github.com
e1d4b98923
Java: Add further missing </p> to qhelp
2020-08-11 15:28:55 +01:00
lcartey@github.com
8a65dd2cd6
Java: Address review comments
2020-08-11 15:28:06 +01:00
Erik Krogh Kristensen
656ff9c441
autoformat
2020-08-11 15:40:30 +02:00
Anders Schack-Mulligen
21246624b4
Java: Add PrintWriter.format as XSS sink.
2020-08-11 15:15:39 +02:00
Rasmus Lerchedahl Petersen
dd4d00293d
Python: remaining class tests
2020-08-11 14:16:02 +02:00
Erik Krogh Kristensen
d2c87d0a2e
add support for the new assign expression in TypeScript 4
2020-08-11 13:57:11 +02:00
Erik Krogh Kristensen
2f34990ae6
add another test for spread elements in tuple types
2020-08-11 13:57:11 +02:00
Erik Krogh Kristensen
ea583fe862
add basic support for named tuple elements
2020-08-11 13:57:11 +02:00
Erik Krogh Kristensen
2612e0c5dd
add test for spread in tuple in non-last position
2020-08-11 13:57:11 +02:00
Erik Krogh Kristensen
b602a36a24
add test for generic spreads in a tuple
2020-08-11 13:57:11 +02:00
Erik Krogh Kristensen
08c017eb09
change where tuples elements are loaded from to match TS 4.0
2020-08-11 13:57:10 +02:00
Erik Krogh Kristensen
ba2d19c70f
upgrade ts version in package.json
2020-08-11 13:57:10 +02:00
Anders Schack-Mulligen
99c9524639
Java: Make XssSink extensible.
2020-08-11 13:09:27 +02:00
Rasmus Lerchedahl Petersen
394991164f
Python: Update test expectations
2020-08-11 13:05:35 +02:00
Rasmus Lerchedahl Petersen
f834d71bab
Python: split out data model tests
2020-08-11 11:22:11 +02:00
Rasmus Lerchedahl Petersen
2c5de7f50e
Python: fix r/l confusion
2020-08-11 10:48:23 +02:00
Jonas Jensen
0476b97f63
Merge pull request #3789 from dilanbhalla/cpp
...
C++ Memory Unsafe Functions
2020-08-11 10:09:37 +02:00
Rasmus Lerchedahl Petersen
12dfc4afd9
Python: clean up validity check code
2020-08-11 08:16:49 +02:00
Rasmus Lerchedahl Petersen
3929e01350
Python: tests for async iterators/context managers
2020-08-11 08:10:46 +02:00
Rasmus Lerchedahl Petersen
681657f070
Merge branch 'master' of github.com:github/codeql into SharedDataflow_Classes
2020-08-11 07:24:17 +02:00
intrigus-lgtm
5a3acc231e
Fix typo
2020-08-11 01:01:53 +02:00
dilanbhalla
7bd5464b01
Update cpp/ql/src/experimental/Security/CWE/CWE-120/MemoryUnsafeFunctionScan.qhelp
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-10 15:43:16 -07:00
dilanbhalla
4dcaa7be57
pr fixes
2020-08-10 15:30:09 -07:00
dilanbhalla
dcfbb86674
pr fixes
2020-08-10 15:14:12 -07:00
Rasmus Lerchedahl Petersen
5da37f5cf4
Python: Update test expectations
2020-08-10 17:07:00 +02:00
Erik Krogh Kristensen
dc5167bbe7
autoformat
2020-08-10 11:52:45 +00:00
Erik Krogh Kristensen
34778578db
fill in docstring
2020-08-10 13:34:36 +02:00
Erik Krogh Kristensen
9bcac10d9e
summarize exceptions thrown by immidiatly awaited function calls
2020-08-10 13:28:25 +02:00
Jonas Jensen
1f432dc45f
Merge pull request #4023 from geoffw0/loopdir
...
C++: Exclude decrementing unsigned counters from inconsistentLoopDirection.ql
2020-08-10 12:10:29 +02:00
Rasmus Lerchedahl Petersen
a963f15100
Python: format strings are unnecessary and mess up
...
For some reason, we got no results when format strings were present.
2020-08-10 11:54:24 +02:00
Erik Krogh Kristensen
85de5aa16b
add deprecated modifier
...
Co-authored-by: Asger F <asgerf@github.com >
2020-08-10 10:51:21 +02:00
Rasmus Lerchedahl Petersen
959c6315c4
Python: update reference to fix tests
2020-08-10 09:24:45 +02:00
Erik Krogh Kristensen
410b696562
add deprecated aliases getId() forwarding to getIdentifier()
2020-08-10 09:11:38 +02:00
Rasmus Lerchedahl Petersen
639d914a47
Python: test Awaitable, framework for async test
2020-08-10 09:03:28 +02:00
CodeQL CI
7c4e10df17
Merge pull request #4014 from erik-krogh/stringify
...
Approved by esbena
2020-08-10 07:50:21 +01:00
Rasmus Lerchedahl Petersen
02478774c3
Python: tests for context managers
2020-08-10 08:11:25 +02:00
Erik Krogh Kristensen
30dc77e538
update expected output
2020-08-08 21:26:45 +02:00
Erik Krogh Kristensen
244052f419
autoformat
2020-08-08 21:20:20 +02:00
Rasmus Lerchedahl Petersen
5b7c7f933c
Python: tests for numeric classes
2020-08-08 00:31:29 +02:00
Rasmus Lerchedahl Petersen
f6d6f91a42
Python: tests for containers
2020-08-07 23:39:42 +02:00
Rasmus Lerchedahl Petersen
aff4535965
Python: fix tests for descriptors
2020-08-07 23:07:58 +02:00
Arthur Baars
5874ecc28b
Merge pull request #3976 from luchua-bc/java-unsecure-basic-auth
...
Java: Insecure basic authentication
2020-08-07 21:39:23 +02:00
Rasmus Lerchedahl Petersen
d84294df3d
Python: Check that tests are valid
2020-08-07 20:07:02 +02:00
Erik Krogh Kristensen
2680afcdc9
deduplicate some implementation in storeStep and loadStep
2020-08-07 19:16:28 +02:00
Geoffrey White
3cf11eca2a
C++: And more test cases.
2020-08-07 17:30:07 +01:00
Erik Krogh Kristensen
aab2e6f803
update name of test file
2020-08-07 18:20:22 +02:00
Erik Krogh Kristensen
7670e7da97
retarget change-note for 1.26
2020-08-07 18:17:46 +02:00
Geoffrey White
7d491afaeb
C++: More test cases.
2020-08-07 17:05:13 +01:00
Erik Krogh Kristensen
54fd7d97c0
share implementation instead of copy-pasting
2020-08-07 18:00:10 +02:00
Erik Krogh Kristensen
94cf3a8ddb
correct copy-paste note after refactorings
2020-08-07 17:48:55 +02:00
Erik Krogh Kristensen
8f06e9651f
update expected output
2020-08-07 17:40:58 +02:00
Erik Krogh Kristensen
b9a98f51ea
update existing tests to work with FunctionReturnNode
2020-08-07 17:40:02 +02:00
Erik Krogh Kristensen
0edb46c20d
improve precision for load/store steps with async functions
2020-08-07 17:39:59 +02:00
Erik Krogh Kristensen
26ef2f34da
add precise return-flow for async functions
2020-08-07 17:33:26 +02:00
Erik Krogh Kristensen
cc94c5ec60
remove imprecise return-flow from async functions
2020-08-07 17:33:24 +02:00
Erik Krogh Kristensen
0004c28fe8
introduce and use FunctionReturnNode
2020-08-07 17:32:25 +02:00
Geoffrey White
b7d2e0ca63
C++: Make all the tests meaningful.
2020-08-07 14:18:28 +01:00
CodeQL CI
1b0cfc96b3
Merge pull request #4015 from erik-krogh/nonAbstract
...
Approved by asgerf
2020-08-07 13:44:23 +01:00
Geoffrey White
0ba59210fc
Merge pull request #4020 from jbj/taint-range-based-for-ast
...
C++: Taint through RangeBasedForStmt (AST only)
2020-08-07 13:41:49 +01:00
lcartey@github.com
bdcf4198e6
Add additional Hibernate SQL sinks
2020-08-07 14:03:24 +02:00
Anders Schack-Mulligen
e3a12c5fea
Merge pull request #4004 from Marcono1234/patch-2
...
[Java] Clarify Wildcard.hasUpperBound() doc
2020-08-07 13:06:13 +02:00
Tom Hvitved
c20d763490
Merge pull request #3951 from raulgarciamsft/users/raulgarciamsft/dataset_serialization
...
C#: DataSet serialization
2020-08-07 12:54:10 +02:00
Jonas Jensen
c8911ab973
C++: Test range-based-for with std::vector too
2020-08-07 12:40:00 +02:00
Anders Schack-Mulligen
77db87efb7
Merge pull request #3968 from rvermeulen/java-importable-cwe-090
...
Java: Move LDAP injection sinks, sanitizers, and additional taint steps to importable location
2020-08-07 11:57:51 +02:00
Arthur Baars
c177eff3d8
Merge pull request #4027 from aschackmull/java/weak-crypto-precision
...
Java: Update precision of java/weak-cryptographic-algorithm.
2020-08-07 10:31:38 +02:00
Anders Schack-Mulligen
f9de8eb3b4
Java: Update precision of java/weak-cryptographic-algorithm.
2020-08-07 09:40:21 +02:00
Anders Schack-Mulligen
05e956b374
Merge pull request #4022 from aibaars/int-to-long
...
Java: remove security tag from java/integer-multiplication-cast-to-long
2020-08-07 09:32:43 +02:00
Marcono1234
0e54b498b7
Clarify Wildcard.hasTypeBound() doc
2020-08-06 23:15:25 +02:00
Marcono1234
f477e09190
Clarify Wildcard.hasUpperBound() doc
2020-08-06 23:15:16 +02:00
Remco Vermeulen
3ae3a879d2
Fix qldoc grammar and style mistakes
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-06 23:00:03 +02:00
Raul Garcia
3682a902de
Update csharp/ql/src/experimental/Security Features/Serialization/DataSetSerialization.qhelp
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2020-08-06 12:09:02 -07:00
Geoffrey White
6e18be43f3
C++: Change note.
2020-08-06 19:27:12 +01:00
Geoffrey White
0281456948
C++: Add a 1.26 change note file (what happened to the templates?)
2020-08-06 19:21:06 +01:00
Geoffrey White
0534c69c76
C++: Autoformat.
2020-08-06 19:11:46 +01:00
Geoffrey White
0b5b7fa095
C++: Fix another edge case.
2020-08-06 19:06:42 +01:00
Geoffrey White
b3f3f6d95a
C++: Fix edge case.
2020-08-06 19:03:43 +01:00
Geoffrey White
cbf30e37ed
C++: Fix the issue.
2020-08-06 18:50:18 +01:00
Geoffrey White
a7564c9e0e
C++: Add a test of unsigned count-down loops.
2020-08-06 18:44:22 +01:00
Arthur Baars
f16c263393
Java: remove security tag from java/integer-multiplication-cast-to-long
2020-08-06 17:42:01 +02:00
Rasmus Lerchedahl Petersen
3db1ceeb70
Python: format ql
2020-08-06 15:42:14 +02:00
Rasmus Lerchedahl Petersen
614103c3b6
Python: Test calls rather than flows
2020-08-06 15:40:41 +02:00
Jonas Jensen
7cc877cbbb
C++: Taint through RangeBasedForStmt (AST only)
2020-08-06 15:37:41 +02:00
Rasmus Lerchedahl Petersen
ce86a8b72e
Python: format ql
2020-08-06 14:42:56 +02:00
Rasmus Lerchedahl Petersen
e77ceaf4b8
Python: Track dictionary keys
...
Also, less hacky comprehension,
but I think we still want to fix the extractor
2020-08-06 13:31:54 +02:00
Remco Vermeulen
408db412dc
Add missing predicate qldoc
2020-08-06 13:29:02 +02:00
Remco Vermeulen
5a819422c1
Reuse Unit class from TaintTracking
2020-08-06 12:02:34 +02:00
Remco Vermeulen
7f7ad88dea
Limit LdapAdditionalTaintStep to Ldap configuration
2020-08-06 11:35:03 +02:00
Anders Schack-Mulligen
205dd1aead
Merge pull request #3881 from intrigus-lgtm/more-pathcreations
...
Java: Centralize and model additional path creations.
2020-08-06 11:21:39 +02:00
luchua-bc
b821f918e5
Address issues with matching empty host and host in a concatenated string
2020-08-06 01:53:29 +00:00
luchua-bc
9a8eed8440
Enhance address match
2020-08-05 19:57:31 +00:00
intrigus
1011325cf7
Accept test changes.
2020-08-05 21:45:41 +02:00
Rasmus Lerchedahl Petersen
7c235597de
Python: More precise dataflow for tuples
...
(and dictionaries, but that is not fleshed out)
2020-08-05 19:22:54 +02:00
Remco Vermeulen
a1411407c1
Consolidate sanitizers into default sanitizer
2020-08-05 17:07:05 +02:00
Remco Vermeulen
0c09d66d43
Consolidate different sinks into a default sink.
2020-08-05 16:53:50 +02:00
Erik Krogh Kristensen
f1dc36244c
update tests and queries that used getId()
2020-08-05 14:32:09 +00:00
yoff
e642808a75
Update python/ql/test/experimental/dataflow/coverage/classes.py
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-05 15:12:27 +02:00
Jonas Jensen
5f635aca36
Merge pull request #3768 from geoffw0/copymove
...
C++: Clean up ConversionConstructor.
2020-08-05 14:35:05 +02:00
Rasmus Lerchedahl Petersen
a89624698d
Python: format ql
2020-08-05 14:28:28 +02:00
Rasmus Lerchedahl Petersen
2639e68a0d
Python: format ql
2020-08-05 14:16:50 +02:00
Rasmus Lerchedahl Petersen
81ad4552c9
Python: full list of magic methods to be tested
2020-08-05 13:30:30 +02:00
Erik Krogh Kristensen
cc5ef4d5e1
rename JsonSerializeCall to JsonStringifyCall
2020-08-05 13:22:41 +02:00
Erik Krogh Kristensen
b43d410ab1
add change log for JSON serializers
2020-08-05 12:14:56 +02:00
Erik Krogh Kristensen
f70cb2e7b3
add test for new JSON serializers
2020-08-05 12:14:56 +02:00
Erik Krogh Kristensen
5a3f67a682
introduce model for JSON.stringify and similar libraries
2020-08-05 12:14:51 +02:00
Anders Schack-Mulligen
9e78341e43
Merge pull request #3928 from rvermeulen/java-importable-cwe-113
...
Java: Move `HeaderSplittingSink` and `WhitelistedSource` into importable library
2020-08-05 10:16:00 +02:00
Erik Krogh Kristensen
67c4320287
make JumpStmt non abstract
2020-08-05 10:03:46 +02:00
Erik Krogh Kristensen
016bdc1614
make ControlStmt non abstract
2020-08-05 09:59:30 +02:00
Anders Schack-Mulligen
32d9d270fc
Merge pull request #3948 from aibaars/java-3941
...
Java: stack trace exposure: address false positives
2020-08-05 09:31:01 +02:00
Jonas Jensen
ea0896c78b
Merge pull request #3999 from MathiasVP/mathiasvp/range-based-for-loop-taint-tests
...
C++: Add tests for taint through range-based for loops
2020-08-05 09:11:53 +02:00
Raul Garcia (MSFT)
aa27eaf7e0
Addrssing the comments from https://github.com/github/codeql/pull/3951#discussion_r464894547 that I missed previously
2020-08-04 15:50:58 -07:00
Geoffrey White
9f5c37ccaa
Merge branch 'master' into copymove
2020-08-04 15:41:27 +01:00
Erik Krogh Kristensen
5727e6f9f8
make CompoundAssignExpr non-abstract
2020-08-04 16:17:08 +02:00
Erik Krogh Kristensen
cf3f275aa1
make DestructuringPattern non-abstract
2020-08-04 16:02:32 +02:00
Rasmus Lerchedahl Petersen
d7c08f732d
Merge branch 'master' of github.com:github/codeql into SharedDataflow_Classes
2020-08-04 16:01:42 +02:00
Rasmus Lerchedahl Petersen
9312b42e79
Python: More easy-to-get content flow
...
There are some things that should be rewritten, though,
but it may involve the extractor
2020-08-04 13:54:50 +02:00
Erik Krogh Kristensen
0867c5567e
rename getId() to getIdentifier()
2020-08-04 13:22:19 +02:00
Luke Cartey
5a96ee1a7b
Remove parameter names from signatures
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-08-04 09:41:40 +01:00
Luke Cartey
368572f1f0
Update java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.qhelp
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-08-04 09:40:59 +01:00
Luke Cartey
7928a02424
Add missing full stop.
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-08-04 09:40:51 +01:00
Luke Cartey
e0c081a2af
Add missing </p> tag
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-08-04 09:40:28 +01:00
Raul Garcia (MSFT)
c52064af78
Fixing problems based on CR feedback.
...
https://github.com/github/codeql/pull/3951#pullrequestreview-458987208
2020-08-03 16:39:41 -07:00
Rasmus Lerchedahl Petersen
9d09b4c811
Python: Comprehension stores
2020-08-03 08:53:22 +02:00
Rasmus Lerchedahl Petersen
f21777c6ce
Python: Simplyfy sequence stores
2020-08-03 08:16:43 +02:00
Rasmus Lerchedahl Petersen
4a8d532a71
Python: update test expectations and annotations
2020-08-03 07:25:06 +02:00
Rasmus Lerchedahl Petersen
6debc48e79
Merge branch 'master' of github.com:github/codeql into SharedDataflow_SequenceFlow
2020-08-03 07:05:34 +02:00
luchua-bc
ff0dacf1d7
Optimize the TaintTracking
2020-08-03 00:52:47 +00:00
luchua-bc
b65a033302
Shorten the regex private domain match
2020-08-01 03:42:13 +00:00
luchua-bc
ff58abb7d3
Revamp the sink code
2020-08-01 03:25:02 +00:00
Rasmus Lerchedahl Petersen
b21da86ac1
Python: Field flow for sequence elements
...
only from displays so far
2020-07-31 15:45:20 +02:00
Mathias Vorreiter Pedersen
4990d00498
C++: Add taint tests demonstrating lack of taint through range based for loops
2020-07-31 09:57:35 +02:00
Mathias Vorreiter Pedersen
b88ef56cb4
C++: Add basic iterator definition that matches STL
2020-07-31 09:45:32 +02:00
Raul Garcia (MSFT)
a5dab4e768
removing a redundant line
2020-07-30 17:05:42 -07:00
luchua-bc
81de1b14d9
Revamp the source of path query
2020-07-30 19:16:48 +00:00
Raul Garcia (MSFT)
64f4613a3f
Removing the options file as requested
2020-07-30 10:25:15 -07:00
Raul Garcia (MSFT)
9e74c183fe
Fixing expected results after adding comments to the unit test .cs file
2020-07-30 10:24:24 -07:00
Raul Garcia (MSFT)
6f845b0044
Using CodeQL AutoFormat
2020-07-29 18:01:46 -07:00
Raul Garcia (MSFT)
7923c480af
Fixing queries based on suggestions/comments.
...
TODO: Auto-formatting is still pending (need guidance on how to enable it on my environment). Thanks
2020-07-29 17:14:37 -07:00
Raul Garcia
83e9d052d9
Update csharp/ql/src/experimental/Security Features/Serialization/DataSetSerialization.qll
...
Co-authored-by: Jaroslav Lobačevski <novaisas@gmail.com >
2020-07-29 16:24:13 -07:00
Rasmus Lerchedahl Petersen
d32e2772a0
Python: some doc, a generator, and a corotuine
2020-07-29 15:52:56 +02:00
Rasmus Lerchedahl Petersen
488a7f4d01
Python: update test expectations
2020-07-28 21:46:45 +02:00
Rasmus Lerchedahl Petersen
eab64f125b
Python: Dataflow, start on test for classes
2020-07-28 20:32:12 +02:00
luchua-bc
5520504658
Update expected results
2020-07-28 15:41:23 +00:00
luchua-bc
a91cc9b7ec
Convert the query to path-problem
2020-07-28 15:36:12 +00:00
luchua-bc
7f911f00ee
Rename to insecure basic auth
2020-07-28 11:40:21 +00:00
luchua-bc
248628b11e
Enhance basic auth string search with a recursive method
2020-07-27 20:31:07 +00:00
luchua-bc
3a23451395
Enhance the query
2020-07-27 18:50:47 +00:00
Rasmus Lerchedahl Petersen
38acea633f
Python: Dataflow, expand callable to classes
2020-07-27 17:58:21 +02:00
Owen Mansel-Chan
6dbed5e848
Address review comments
2020-07-27 10:19:48 +01:00
Owen Mansel-Chan
4094fa9db3
Docs: Query classification and display
...
Converted from Semmle wiki
2020-07-27 10:06:16 +01:00
ubuntu
8dee3da4fe
Update .qhelp
2020-07-26 23:50:22 +02:00
ubuntu
ac7c511d86
Update .qhelp
2020-07-26 23:47:53 +02:00
ubuntu
2cec8f7e9d
Update .qhelp
2020-07-26 23:23:56 +02:00
ubuntu
c469f71957
Add Codeql query to detect if cookies are sent without the flag being set
2020-07-26 22:56:36 +02:00
luchua-bc
01fb51829c
Unsecure basic authentication
2020-07-24 20:35:09 +00:00
Rasmus Wriedt Larsen
e0016f6c52
Python: CG trace: Mention adding projects in README
2020-07-24 20:08:39 +02:00
Rasmus Wriedt Larsen
aca703e131
Python: CG trace: Add support for flask
2020-07-24 20:06:53 +02:00
Rasmus Wriedt Larsen
bb80635dc3
Python: CG trace: Updated README
2020-07-24 19:35:06 +02:00
Rasmus Wriedt Larsen
ecafc760e8
Python: CG trace: Improved debugging queries a bit
2020-07-24 19:34:51 +02:00
Rasmus Wriedt Larsen
2407c8b07e
Python: CG trace: Better handling of builtins without __module__
...
Not 100% perfect, but better
2020-07-24 19:13:53 +02:00
Rasmus Wriedt Larsen
9c76618d8b
Python: CG trace: Make ./helper.sh show help again
2020-07-24 18:59:29 +02:00
Rasmus Wriedt Larsen
8057e11fe4
Python: CG trace: Add ./helper.sh metrics command
2020-07-24 18:38:12 +02:00
Rasmus Wriedt Larsen
779a82ee07
Python: CG trace: Minor cleanup in helper.sh
2020-07-24 18:37:48 +02:00
Rasmus Wriedt Larsen
4c689434c3
Python: CG trace: Restructure QL code
2020-07-24 17:00:13 +02:00
Rasmus Wriedt Larsen
321d5104f0
Python: CG trace: Autogenerate BytecodeExpr.qll
...
Some code I had lying around, just hadn't comitted.
Not that useful since most of these have been disabled in 55404ae98 for now.
2020-07-24 16:51:14 +02:00
Rasmus Wriedt Larsen
a7bc9544b6
Python: CG trace: Metrics, number of recorded calls not ignored
...
turned out to be useful after all :P
2020-07-24 16:49:54 +02:00
Rasmus Wriedt Larsen
367a49803b
Python: CG trace: handle class instantiation properly in points-to
2020-07-24 11:19:11 +02:00
Rasmus Wriedt Larsen
3ead2e3dc7
Python: CG trace: Improve performance by only logging when needed
...
Seems like a 2x performance overall
wcwidth:
- DEBUG=True 5.78 seconds
- DEBUG=False 2.70 seconds
youtube-dl
- DEBUG=True 238.90 seconds
- DEBUG=False 120.70 seconds
2020-07-23 20:14:49 +02:00
Rasmus Wriedt Larsen
fbd939133e
Python: CG trace: More caching
...
Improves runtime of tracing youtube-dl from 296.19 seconds to 224.50 seconds.
Better, but still not that amazing :|
2020-07-23 18:07:55 +02:00
Rasmus Wriedt Larsen
ce42221cf7
Python: CG trace: Fix some printing in helper.sh
2020-07-23 17:57:52 +02:00
Rasmus Wriedt Larsen
55404ae980
Python: CG trace: Experiment with disabling some opcodes
...
Currently not supported in the QL code, so no reason to pay performance to
record them right now :P
2020-07-23 17:39:43 +02:00
Rasmus Wriedt Larsen
14c51eb3c7
Python: CG trace: XML exporter will tell what file it wrote to
2020-07-23 17:38:54 +02:00
Rasmus Wriedt Larsen
c45cc2aa2f
Python: CG trace: Add helper.sh to run tracing against real projects
2020-07-23 17:37:01 +02:00
Rasmus Wriedt Larsen
5d031d7abe
Python: CG trace: Fix sorting of ExternalCallee
...
Also exposed that the better_compare_for_dataclass was exposed to bad loop
variable capture :|
2020-07-23 17:36:31 +02:00
Rasmus Wriedt Larsen
da518ed0d5
Python: CG trace: Remove Python 3.8 only f"{var=}" usage
2020-07-23 14:01:29 +02:00
Rasmus Wriedt Larsen
bb4b8dceaa
Python: CG trace: More robust logging setup
2020-07-23 14:01:29 +02:00
Rasmus Wriedt Larsen
9157385571
Python: CG trace: XML can export list of dataclass
2020-07-22 17:40:59 +02:00
Remco Vermeulen
3320061178
Add and adjust QL docs for classes and predicates
2020-07-22 16:04:55 +02:00
Remco Vermeulen
2c42d3cca5
Extract additional taint steps
...
This is done for logical cohesion. We already have the capability of
extending additional taint steps by extending
`TaintTracking::AdditionalTaintStep`.
2020-07-22 16:04:55 +02:00
Remco Vermeulen
57e7411c0a
Extract Ldap injection sanitizers to importable lib
...
This includes a new abstract class that represents all the Ldap injection
santizers and can be used to add additional santizers through
extension.
2020-07-22 16:04:55 +02:00
Remco Vermeulen
0d5f9113a3
Extract ldap injection sink into importable library
2020-07-22 16:04:55 +02:00
Rasmus Wriedt Larsen
746c577d72
Python: CG trace: Update naming and add QLDoc
2020-07-22 15:49:11 +02:00
Rasmus Wriedt Larsen
67b45164eb
Python: CG trace: Partial matching of BytecodeExpr and AST not safe
2020-07-22 15:19:57 +02:00
Rasmus Wriedt Larsen
1e89388f2b
Python: CG trace: Don't abuse example dir
2020-07-22 14:22:04 +02:00
Rasmus Wriedt Larsen
ad2e336ead
Python: CG trace: Autoformat
2020-07-22 13:53:22 +02:00
Rasmus Wriedt Larsen
ccffa7d99d
Python: CG trace: Ignore some calls for call-grahp metrics
...
and provide some internal metrics as well
2020-07-22 13:12:52 +02:00
Rasmus Wriedt Larsen
b227a7ec90
Python: CG trace: Add overall metrics query
2020-07-22 00:55:53 +02:00
Rasmus Wriedt Larsen
278ab4b883
Python: CG trace: Much improved toString for QL
2020-07-22 00:55:53 +02:00
Rasmus Wriedt Larsen
a5838b66ed
Python: CG trace: Small improvements to QL code
2020-07-22 00:00:17 +02:00
Rasmus Wriedt Larsen
b86ca19264
Python: CG trace: Apply better_compare_for_dataclass to all
2020-07-21 23:37:33 +02:00
Rasmus Wriedt Larsen
9bff615fad
Python: CG trace: Handle BUILD_LIST
2020-07-21 23:08:33 +02:00
Rasmus Wriedt Larsen
8c8656ccca
Python: CG trace: Handle BUILD_TUPLE
2020-07-21 23:05:49 +02:00
Rasmus Wriedt Larsen
0d05d96b50
Python: CG trace: Handle CALL_FUNCTION_EX
2020-07-21 22:54:45 +02:00
Rasmus Wriedt Larsen
3539798c22
Python: CG trace: ignore with statement for now
2020-07-21 22:54:19 +02:00
Rasmus Wriedt Larsen
4843d29ad6
Python: CG trace: Cache calls seen
...
This improved runtime from ~10 seconds to 1 seconds when running one of the
tests fo wcwidth
2020-07-21 22:54:10 +02:00
Rasmus Wriedt Larsen
ebbea0cd61
Python: CG trace: Ignore IMPORT_NAME
2020-07-21 22:17:17 +02:00
Rasmus Wriedt Larsen
6830804112
Python: CG trace: More logging
2020-07-21 22:08:15 +02:00
Rasmus Wriedt Larsen
3752a25665
Python: CG trace: Handle LOAD_DEREF
2020-07-21 22:02:25 +02:00
Rasmus Wriedt Larsen
61b1d3eef3
Python: CG trace: Handle subscript
2020-07-21 21:45:53 +02:00
Rasmus Wriedt Larsen
79c2c682d7
Python: CG trace: Nicer logging
2020-07-21 21:34:20 +02:00
Rasmus Wriedt Larsen
0a7e6a9938
Python: CG trace: Avoid handling jumps for now
2020-07-21 20:07:33 +02:00
Rasmus Wriedt Larsen
4e3ae98ddf
Python: CG trace: Handle list-comprehension and iteration
...
Which relies on LOAD_CONST and MAKE_FUNCTION
2020-07-21 19:54:59 +02:00
Rasmus Wriedt Larsen
58f11194a8
Python: CG trace: Refactoring
2020-07-21 19:53:05 +02:00
Rasmus Wriedt Larsen
290eb638f9
Python: CG trace: Handle SystemExit
...
otherwise, with-exit would end the tracer without producing any output :|
2020-07-21 19:40:58 +02:00
Rasmus Wriedt Larsen
296d7d1725
Python: CG trace: Allow tracing modules
...
As would normally be invoked by `python -m <module-name>` now works with
`cg-trace --module <module-name>`.
This is useful for tracing invocations of `pytest`.
2020-07-21 19:39:51 +02:00
Rasmus Wriedt Larsen
89e8202d11
Python: CG trace: Add some tests using classes
2020-07-21 11:16:52 +02:00
Rasmus Wriedt Larsen
eeeadad359
Python: CG trace: Don't commit examples traces all the time
2020-07-21 11:14:07 +02:00
Rasmus Wriedt Larsen
38af1930fe
Python: CG trace: Rename ValidRecordedCall to IdentifiedRecordedCall
2020-07-21 10:19:47 +02:00
Raul Garcia (MSFT)
55473c65f1
Improving documentation
2020-07-20 13:54:23 -07:00
Raul Garcia (MSFT)
9d7d6b39cb
Small fixes based on feedback
2020-07-20 11:14:59 -07:00
Remco Vermeulen
c2733ad22e
Apply grammar suggestions
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-07-20 14:55:00 +02:00
Rasmus Wriedt Larsen
bbfea44db0
Python: CG trace: Handle multiple calls to same func on same line
...
Such as
```
one(); one()
```
Now there are no InvalidRecordedCall in the current examples.
2020-07-20 14:54:05 +02:00
Rasmus Wriedt Larsen
cb98f4433d
Python: CG trace: Handle multiple calls on one line
...
Reduced number of InvalidRecordedCall from 16 to 2. This is the calls
```
one(); one()
```
since they are not distinguishable from the expression.
2020-07-20 14:07:09 +02:00
Rasmus Wriedt Larsen
a1c1ab080b
Python: CG trace: Add examples of multiple calls on one line
...
There are currently 16 InvalidRecordedCall
2020-07-20 14:03:37 +02:00
Rasmus Wriedt Larsen
49a90c058d
Python: CG trace: minor adjustment to recreate-dh.sh
2020-07-20 13:00:47 +02:00
Rasmus Wriedt Larsen
5ef817012a
Python: CG trace: restructure QL for new XML format
2020-07-20 13:00:07 +02:00
Rasmus Wriedt Larsen
c2748bf7cf
Python: CG trace: reconstruct call expr from bytecode
...
So we can differentiate multiple calls in one line.
2020-07-20 11:28:05 +02:00
Rasmus Wriedt Larsen
d46b410111
Python: CG trace: Proper exception handling
2020-07-20 01:22:33 +02:00
intrigus
f94055fa2c
Move tainted path ad-hoc guard back.
2020-07-19 00:19:29 +02:00
intrigus
33526f61a8
Make path creation subclasses private.
2020-07-19 00:11:04 +02:00
intrigus
b705f7f3e9
Improve "PathCreation" Test.
2020-07-19 00:10:39 +02:00
intrigus
4570444c7e
Rename to getAnInput and clarify doc.
2020-07-19 00:10:13 +02:00
Rasmus Wriedt Larsen
10ec1e078a
Python: CG trace: Better type hints
2020-07-18 17:56:56 +02:00
Rasmus Wriedt Larsen
8b6de17461
Python: CG trace: Use logging module for debuging
2020-07-18 17:56:10 +02:00
Rasmus Wriedt Larsen
acc5f70d4a
Python: CG trace: Python 3.7 is minimal version
2020-07-18 17:10:53 +02:00
Taus Brock-Nannestad
cec3694c89
Python: Add type tracker and step summary implementation.
2020-07-17 16:36:56 +02:00
Rasmus Wriedt Larsen
6c60881cbe
Python: CG trace: Move code to src/
...
As recommended in https://blog.ionelmc.ro/2014/05/25/python-packaging/ and
following pattern of black and pytest
2020-07-17 14:41:49 +02:00
Rasmus Wriedt Larsen
0a0c24f3c5
Python: CG trace: Make code modular
2020-07-17 14:40:54 +02:00
Rasmus Wriedt Larsen
94a03d73a3
Python: CG trace: blackify
...
And make code pass flake8 tests
2020-07-17 13:49:25 +02:00
Raul Garcia (MSFT)
5387294168
Moving to experimental as requested
2020-07-16 09:32:17 -07:00
Rasmus Wriedt Larsen
1c2e259970
Python: CG trace: Handle builtins
2020-07-16 18:04:04 +02:00
Rasmus Wriedt Larsen
92e8e1622c
Python: CG trace: move traces to own dir
2020-07-16 16:47:23 +02:00
Geoffrey White
c4940aaa86
Merge branch 'master' into copymove
2020-07-15 15:01:01 +01:00
Rasmus Wriedt Larsen
abcc76baec
Python: CG trace: use lxml to pretty-print xml
2020-07-15 14:48:58 +02:00
Rasmus Wriedt Larsen
7ac4ea9bf1
Python: CG trace: use standardized etree import
...
makes it easy to switch out XML library.
2020-07-15 14:41:39 +02:00
Rasmus Wriedt Larsen
ba4207fc90
Python: CG trace: sort output before writing/printing
...
Allows comparing output of one run with another
2020-07-15 14:37:41 +02:00
Rasmus Wriedt Larsen
e6873956ca
Python: CG trace: add canonic_filename helper
2020-07-15 14:25:42 +02:00
Raul Garcia (MSFT)
3e0481b889
Queries to help on the detection based on misuse of DataSet and DataTable serialization that could lead to security problems.
...
https://go.microsoft.com/fwlink/?linkid=2132227
2020-07-14 17:54:54 -07:00
Raul Garcia (MSFT)
896cdf9b12
Merge branch 'master' of https://github.com/github/codeql
2020-07-14 11:16:51 -07:00
Geoffrey White
37158f46ed
C++: Remove deprecated class from test.
2020-07-14 15:36:48 +01:00
Geoffrey White
3f6d8490e0
C++: Autoformat.
2020-07-14 15:09:12 +01:00
Geoffrey White
646efe2a20
C++: Deprecate ConversionConstructor.
2020-07-13 15:04:39 +01:00
Arthur Baars
c585b2e483
Java: stack trace exposure: address false positives
2020-07-13 15:26:55 +02:00
Geoffrey White
61178c5330
Merge branch 'master' into copymove
2020-07-13 14:11:12 +01:00
dilanbhalla
48e540fa9a
minor fixes
2020-07-13 01:25:42 -07:00
dilanbhalla
db6d5c329f
file/buffer write dataflow queries complete
2020-07-13 00:57:05 -07:00
Jonathan Leitschuh
1f6615b3b8
Merge branch 'master' into feat/JLL/jOOQ_SQL_injection
...
* master: (485 commits)
C++: Remove @stmt_while from the TConditionalStmt union type.
C++: Remove abstract classes from Stmt.qll
Drop Map.merge as taint step
Add the printAst.ql contextual query for C++
Fix modelling of Stack.push
C#: Sync identical files
C++: Replace getResultType() with getResultIRType() in IR dataflow
C++: Replace getResultType() with getResultIRType() in IR range analysis
C++: Introduce isSigned() and isUnsigned() predicates on IRIntegerType to mirror IntegralType
Add missing java import
Add missing java import
Mark ServletUrlRedirectSink private
Java: model Object.clone
Add file-level qldoc
Optimize imports
Join ServletUrlRedirectSink with UrlRedirectSink
Extend UrlRedirectSink from DataFlow::Node
Remove superfluous imports
Java: ContainerFlow add comments
Generalize QueryInjectionSink
...
2020-07-10 14:37:41 -04:00
Philippe Antoine
bf7e3a004e
Reverting to enclosing block logic
2020-07-10 14:58:00 +02:00
Philippe Antoine
50b2b12ce2
put back missing condition
2020-07-10 14:41:35 +02:00
Philippe Antoine
3117c67a66
Updates result message to be more precise
2020-07-10 14:26:09 +02:00
Mathias Vorreiter Pedersen
2e9c0fc6a5
C++: Cache the TIRDataFlowNode newtype
2020-07-10 11:10:41 +02:00
Remco Vermeulen
c739c733fe
Update class qldocs
...
Change the ql docs to meet the style-guide points 1 and 3 for
classes.
2020-07-09 17:31:37 +02:00
Philippe Antoine
50f2f69f5f
indent comments
2020-07-09 16:14:26 +02:00
Remco Vermeulen
b3bb4cbf54
Rename and update qldoc of default safe header splitting source
2020-07-09 16:14:21 +02:00
Philippe Antoine
06c8a0bf20
move to experimental
2020-07-09 16:09:57 +02:00
Philippe Antoine
d2763e8149
Comments taken into account
2020-07-09 16:05:24 +02:00
Remco Vermeulen
b147be6fea
Restrict SafeHeaderSplittingSource to RemoteFlowSource
2020-07-09 15:13:18 +02:00
Remco Vermeulen
782573ed43
Add and format qldocs according to the style guide.
2020-07-09 14:58:53 +02:00
Remco Vermeulen
4ad6357cd7
Add missing Java import
2020-07-09 14:54:46 +02:00
Remco Vermeulen
7435dac3d2
Move source and sink into importable library
2020-07-09 14:53:59 +02:00
intrigus
641c5df79f
Centralize and model additional path creations.
2020-07-09 14:48:47 +02:00
Remco Vermeulen
b66f391c31
Extend source and sink from DataFlow::Node instead of DataFlow::exprNode
2020-07-09 14:39:08 +02:00
Remco Vermeulen
fed506a12f
Rename TrustedSource to SafeHeaderSplittingSource
2020-07-09 14:36:23 +02:00
Mathias Vorreiter Pedersen
834263f72a
C++: Alternate instruction -> operand flow
2020-07-09 11:36:54 +02:00
Philippe Antoine
5eff8d3165
Performance improvements suggested
2020-07-09 11:31:47 +02:00
lcartey@github.com
0638b512bc
C++: Support custom range expression modeling for variable accesses
2020-07-08 17:56:31 +01:00
dilanbhalla
6e6921b11e
implemented pr fixes
2020-07-08 09:23:52 -07:00
dilanbhalla
05a4798b5e
working on implementing pr fixes
2020-07-08 09:19:46 -07:00
Remco Vermeulen
5f560e0465
Extract HeaderSplittingSink and WhitelistedSource
...
- Extract `HeaderSplittingSink` and `WhitelistedSource` into an
importable library.
- Rename the existing `HeaderSplittingSink` implementation to
`ServletHeaderSplittingSink`.
2020-07-08 17:17:24 +02:00
lcartey@github.com
b4929dbb97
C++: Adopt range analysis interface in the SimpleRangeAnalysis library
2020-07-08 16:00:44 +01:00
lcartey@github.com
5c1275ec5d
C++: Add an interface for exprs that can contribute to range analysis
2020-07-08 16:00:07 +01:00
dilanbhalla
3b9daa2db2
added pr fixes
2020-07-07 11:05:39 -07:00
dilanbhalla
d201c4ba8a
fixed pr suggestions for tags/formatting
2020-07-07 09:34:04 -07:00
Philippe Antoine
8f7ff1a537
Adds another redundant null check rule
2020-07-06 21:45:54 +02:00
luchua-bc
d6e9b07a9e
Add JBoss BasicLogger and SciJava Logger
2020-07-03 22:34:48 +00:00
lcartey@github.com
b242a61701
Java: Untrusted data used in external APIs
...
This commit adds two queries for identifying external APIs which are
used with untrusted data.
These queries are intended to facilitate a security review of the
application, and will report any external API which is called with
untrusted data. The purpose of this is to:
- review how untrusted data flows through this application
- identify opportunities to improve taint modeling of sinks and taint
steps.
As a result this is not suitable for integration into a developer
workflow, as it will likely have high false positive rate, but it may
help identify false negatives for other queries.
2020-07-03 17:32:08 +01:00
luchua-bc
6d329bce6e
Add Apache Commons Logging and debugv method
2020-07-03 01:13:11 +00:00
dilanbhalla
263f00784f
formatting
2020-07-01 09:25:09 -07:00
dilanbhalla
25bfc3a168
fixed references and used autoformat
2020-07-01 09:23:36 -07:00
dilanbhalla
259654b1a4
moved library to experimental
2020-06-30 18:04:41 -07:00
dilanbhalla
e1130a2bfa
moved privatedata to experimental
2020-06-30 17:58:24 -07:00
dilanbhalla
3fdd11a9b5
scanf fixes, still need to update qhelp file
2020-06-30 17:22:29 -07:00
dilanbhalla
f462156cdf
private data file/buffer write
2020-06-30 12:09:50 -07:00
Jonathan Leitschuh
fa8b278332
Add jOOQ methods as SQL Injection Sinks
2020-06-30 11:57:17 -04:00
Geoffrey White
3016798101
Merge branch 'master' into copymove
2020-06-30 16:20:41 +01:00
Geoffrey White
c57c016ced
C++: Go the other way.
2020-06-30 16:16:00 +01:00
Geoffrey White
edc5d5d128
C++: Add a test of MissingNullTest.
2020-06-25 11:04:06 +01:00
dilanbhalla
0552f9b0cc
memory unsafe scan functions
2020-06-24 11:47:34 -07:00
Geoffrey White
7af79abdbc
C++: Use the ArrayFunction model in Dereferenced.qll.
2020-06-24 19:06:05 +01:00
Geoffrey White
d258aaff26
C++: Extend the memcpy model to include 'bcopy'.
2020-06-24 19:05:38 +01:00
Geoffrey White
dd19ee47a1
C++: Clean up ConversionConstructor.
2020-06-23 11:22:59 +01:00
luchua-bc
9affa157b6
Add Log4J 2 and a new search string secret
2020-06-02 03:21:27 +00:00
Grzegorz Golawski
14ce049fc6
Add support for Saxon
2020-05-15 00:12:08 +02:00
Raul Garcia (MSFT)
f051f46ee9
Merge branch 'master' of https://github.com/semmle/ql
2020-05-05 13:37:03 -07:00
Grzegorz Golawski
d590f3fba8
CodeQL query to detect XSLT injections
2020-04-27 22:35:35 +02:00
Raul Garcia (MSFT)
908d789f1b
Merge branch 'master' of https://github.com/semmle/ql
2019-11-22 13:25:22 -08:00
Raul Garcia
e44229435c
Merge pull request #6 from Semmle/master
...
Merge
2019-10-26 19:05:58 -07:00