Tamás Vajk
50f546043a
Merge pull request #7769 from github/release-prep/2.8.0
...
Release preparation for version 2.8.0
2022-01-27 13:36:59 +01:00
Tamás Vajk
3d2cc8890a
Update CHANGELOG.md
2022-01-27 11:50:13 +01:00
Tamás Vajk
cc4bb9b02f
Update 0.0.8.md
2022-01-27 11:49:29 +01:00
github-actions[bot]
634134f283
Release preparation for version 2.8.0
2022-01-27 10:40:20 +00:00
Tom Hvitved
ece952ae2d
Merge pull request #7759 from hvitved/csharp/more-debug-context
...
C#: Add more debug context to various error messages
2022-01-27 09:40:21 +01:00
Dave Bartolomeo
d069d91bf5
Merge pull request #6601 from dbartol/dbartol/side-effect-reorder/work
...
Fix order of IR call side effects
2022-01-26 17:02:02 -05:00
Tom Hvitved
32d1263810
Merge pull request #7755 from hvitved/csharp/qltest-stubs
...
C#: Restrict stub logic to QL test DBs
2022-01-26 20:08:33 +01:00
Mathias Vorreiter Pedersen
647d4d028e
Merge pull request #7758 from jketema/unnamed-variable-fix
...
C++: Do not report "Declaration hides variable" for unnamed variables
2022-01-26 15:36:04 +00:00
Jeroen Ketema
ee78cc731d
Add change note
2022-01-26 15:59:17 +01:00
Tom Hvitved
ef580aa8bc
C#: Add more debug context to various error messages
2022-01-26 15:50:26 +01:00
Tom Hvitved
baefd623c4
Merge pull request #7757 from hvitved/csharp/remove-stats
...
C#: Remove stats for removed relations
2022-01-26 15:22:59 +01:00
Jeroen Ketema
9194af9b15
Do not report "Declaration hides variable" for unnamed variables
2022-01-26 15:10:37 +01:00
Jeroen Ketema
10a94cfa45
Add test for structured binding declaration hiding variable
2022-01-26 15:08:50 +01:00
Jeroen Ketema
b380ba0d8f
Add semmle-extractor-options: -std=c++17 to test
2022-01-26 15:05:21 +01:00
Tom Hvitved
f38ee39cda
C#: Remove stats for removed relations
2022-01-26 14:20:41 +01:00
Tom Hvitved
6975ade0ff
C#: Restrict stub logic to QL test DBs
2022-01-26 13:59:24 +01:00
Tom Hvitved
6565242b67
Merge pull request #7751 from hvitved/csharp/qltest-file-extraction-mode
...
C#: Update expected test output after passing in `--qltest` in `codeql test run`
2022-01-26 13:32:34 +01:00
Chris Smowton
df87297c59
Merge pull request #7733 from pwntester/java_util_regex_qll
...
Java: Add models for java.util.regex.Pattern and Matcher
2022-01-26 12:04:56 +00:00
Alvaro Muñoz Sanchez
ba90fecc98
retab Test.java
2022-01-26 11:20:10 +01:00
Tom Hvitved
477f83cf9e
Merge pull request #7746 from hvitved/csharp/remove-legacy-relations
...
C#: Remove some unused legacy relations from the DB scheme
2022-01-26 10:40:55 +01:00
Tom Hvitved
99b9d4513b
C#: Update expected test output after passing in --qltest in codeql test run
2022-01-26 10:33:00 +01:00
Arthur Baars
948ebe4b4c
Merge pull request #7568 from aibaars/ruby-pattern-matching-taint
...
Ruby: taint steps for pattern matches
2022-01-26 10:27:47 +01:00
Stephan Brandauer
b7690e5e6b
Merge pull request #7734 from kaeluka/js-add-node-prefix-to-module-import
...
js: add support for the 'node:' prefix for importing internal modules
2022-01-26 10:15:08 +01:00
Tom Hvitved
28e03a8aae
Merge pull request #7738 from hvitved/ruby/action-controller-perf
...
Ruby: Fix bad join in `ActionControllerHelperMethod`
2022-01-26 09:48:21 +01:00
Tom Hvitved
2c27a07ead
Merge pull request #7726 from hvitved/ruby/any-array-element-content
...
Ruby: Introduce `TAnyArrayElementContent`
2022-01-26 09:48:01 +01:00
Tom Hvitved
51205d6ce5
C#: Add DB downgrade script
2022-01-26 08:44:37 +01:00
Tom Hvitved
83fb822115
C#: Add DB upgrade script
2022-01-26 08:43:24 +01:00
Tom Hvitved
4c16320e28
C#: Remove some unused legacy relations from the DB scheme
2022-01-26 08:35:08 +01:00
Arthur Baars
941f230c94
Merge pull request #7729 from github/hmac/bump-clap
...
Ruby extractor: bump clap
2022-01-26 08:12:47 +01:00
Dave Bartolomeo
4c42013836
Update test expectations
2022-01-25 15:22:13 -05:00
Henry Mercer
15aa09fb7a
Merge pull request #7744 from github/henrymercer/js-atm-tweak-query-help
...
JS: Move experimental notice to the bottom of the ML-powered query help
2022-01-25 17:44:27 +00:00
Edoardo Pirovano
662675ebf0
Merge pull request #7739 from github/edoardo/3.4-mergeback
...
Merge `rc/3.4` into `main`
2022-01-25 17:44:13 +00:00
Shati Patel
1c711e05be
Merge pull request #7661 from shati-patel/vscode-pack-commands
...
Docs: Mention packaging commands in CodeQL extension
2022-01-25 16:55:37 +00:00
Andrew Eisenberg
e722121be8
Merge pull request #7618 from github/aeisenberg/getting-started-docs
...
Docs: Simplify getting started docs
2022-01-25 08:30:06 -08:00
Edoardo Pirovano
1b539eb4dc
Merge branch rc/3.4 into main
2022-01-25 16:22:01 +00:00
Mathias Vorreiter Pedersen
5d0f7efe84
Merge pull request #7743 from jketema/doc-fixes
...
CodeQL documentation fixes
2022-01-25 16:11:08 +00:00
Henry Mercer
70f7535988
JS: Move experimental notice to the bottom of the ML-powered query help
...
The Code Scanning UI shows just the first paragraph of the query help
as a summary, until a user chooses to expand the help.
We decided it was more useful to display the standard query help in this
summary compared to the experimental query notice, since there is
already a notice about experimental queries on the alert show page.
2022-01-25 15:52:09 +00:00
Tom Hvitved
afd6f58fe8
Merge pull request #7741 from hvitved/csharp/compilation-args-exclude-extractor-args
...
C#: Exclude extractor arguments from `compilation_args` relation
2022-01-25 16:31:46 +01:00
Geoffrey White
63ff17b3c1
Merge pull request #7737 from geoffw0/clrtxt5
...
C++: Upgrade cpp/cleartext-storage-file
2022-01-25 15:09:13 +00:00
Jeroen Ketema
082c712843
Replace Block by BlockStmt in basic C/C++ query documentation
...
`Block` has be deprecated in favor of `BlockStmt`.
2022-01-25 15:21:34 +01:00
Jeroen Ketema
1cfd222770
Remove redundant can
2022-01-25 15:21:06 +01:00
Tom Hvitved
d7a91fdbe6
C#: Exclude extractor arguments from compilation_args relation
2022-01-25 15:09:29 +01:00
Stephan Brandauer
4ee290acd3
update test for 'node:' prefix
2022-01-25 14:25:44 +01:00
Stephan Brandauer
20ea825e4a
test for 'node:' prefix for importing node modules
2022-01-25 13:43:16 +01:00
shati-patel
1462565810
Clarify "download packs" usage
2022-01-25 12:37:17 +00:00
Erik Krogh Kristensen
cc527bdecd
Merge pull request #7721 from erik-krogh/CWE-1275
...
JS: add a js/samesite-none-cookie cookie
2022-01-25 13:28:08 +01:00
Shati Patel
9e1e2ba442
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-01-25 12:27:00 +00:00
Tom Hvitved
49488fa0a0
Ruby: Fix bad join in ActionControllerHelperMethod
...
```
[2022-01-25 12:35:14] (234s) Tuple counts for ActionController::ActionControllerHelperMethod#class#ff/2@ef816fil after 1.5s:
7685 ~0% {3} r1 = JOIN ActionController::ActionControllerContextCall#ff#shared WITH Method::Method::getName_dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'controllerClass', Lhs.0 'this'
13198 ~0% {3} r2 = JOIN r1 WITH Constant::ConstantValue::getStringOrSymbol_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'controllerClass', Lhs.2 'this', Rhs.1
15835365 ~4% {5} r3 = JOIN r2 WITH AST::AstNode::getEnclosingModule_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, "helper_method", Lhs.0 'controllerClass', Lhs.1 'this', Lhs.2
12943 ~1% {4} r4 = JOIN r3 WITH Call::MethodCall::getMethodName_dispred#ff ON FIRST 2 OUTPUT Lhs.4, Lhs.2 'controllerClass', Lhs.3 'this', Lhs.0
1146184 ~0% {4} r5 = JOIN r4 WITH Expr::Expr::getConstantValue_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.1 'controllerClass', Lhs.2 'this'
212 ~0% {2} r6 = JOIN r5 WITH project#Call::Call::getArgument_dispred#fff ON FIRST 2 OUTPUT Lhs.3 'this', Lhs.2 'controllerClass'
return r6
```
Joining on enclosing module and name simultaneously yields a much better join.
2022-01-25 13:00:13 +01:00
Alvaro Muñoz Sanchez
9ee967d6db
update test file
2022-01-25 12:42:41 +01:00
Erik Krogh Kristensen
caaee5e4e5
make a utility predicate for extracting sameSite values
2022-01-25 12:32:04 +01:00
Erik Krogh Kristensen
9f9dee5d18
apply documentation suggestions
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-25 12:14:16 +01:00
Tom Hvitved
67962cb93d
Ruby: Fix bad join in access predicate
...
Joining on variable name alone is a bad thing:
```
[2022-01-25 11:13:20] (228s) Tuple counts for Variable::Cached::access#ff#shared/3@868b54tu after 3m37s:
112554 ~0% {3} r1 = JOIN Variable::VariableReal::getNameImpl_dispred#ff WITH Variable::VariableReal::getDeclaringScopeImpl_dispred#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'arg2', Rhs.1 'arg1'
561015756 ~1% {3} r2 = JOIN r1 WITH Variable::variableName#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'arg0', Lhs.2 'arg1', Lhs.1 'arg2'
return r2
```
This change ensures that we join on name and scope simultaneously.
2022-01-25 11:37:38 +01:00
Michael Nebel
26d9848fca
Merge pull request #7730 from michaelnebel/csharp/csharp10-release-notes
...
C#: Add change notes for the already implemented C# 10 features.
2022-01-25 11:31:02 +01:00
Geoffrey White
d70b813949
Merge pull request #7732 from MathiasVP/security-severity-for-return-stack-allocated-memory
...
C++: Add security-severity to `cpp/return-stack-allocated-memory`
2022-01-25 10:13:49 +00:00
Stephan Brandauer
9825136e58
add support for the 'node:' prefix for importing internal modules
2022-01-25 10:55:34 +01:00
Alvaro Muñoz Sanchez
c49c7903a8
add java.util.regex models and tests
2022-01-25 10:50:39 +01:00
Tom Hvitved
0299b4603f
Merge pull request #7677 from hvitved/ruby/constant-value
...
Ruby: Replace `getValueText` with `getConstantValue`
2022-01-25 10:31:02 +01:00
Harry Maclean
962d0213b5
Ruby extractor: stop using deprecated function
2022-01-25 22:04:24 +13:00
Tony Torralba
82ad79f55f
Merge pull request #7728 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-25 09:53:12 +01:00
Mathias Vorreiter Pedersen
72241886bf
C++: Add security-severity to 'cpp/return-stack-allocated-memory'.
2022-01-25 08:49:00 +00:00
Michael Nebel
f6a8d50593
C#: Add change notes for the already implemented C# 10 features.
2022-01-25 09:46:57 +01:00
Stephan Brandauer
35cc5ff0e2
Merge pull request #7715 from kaeluka/recognize-fs-extra-path-args
...
JS: add a predicate to recognize path arguments in calls to the fs-extra lib
2022-01-25 09:36:59 +01:00
Tom Hvitved
06776d19ee
Merge pull request #4949 from luchua-bc/cs/hash-without-salt
...
C#: Query to detect hash without salt
2022-01-25 09:04:23 +01:00
Tom Hvitved
fdd787b89c
Merge pull request #7658 from hvitved/csharp/dataflow/no-negative-positions
...
C#: Get rid of negative parameter/argument data-flow positions
2022-01-25 09:01:44 +01:00
dependabot[bot]
6543b1a3a9
Update clap requirement from 2.33 to 3.0
...
Updates the requirements on [clap](https://github.com/clap-rs/clap ) to permit the latest version.
Apply this update in both the generator and extractor.
2022-01-25 16:53:39 +13:00
github-actions[bot]
1c2f4e79ff
Add changed framework coverage reports
2022-01-25 00:10:23 +00:00
Dave Bartolomeo
9183a4d7e7
Merge remote-tracking branch 'upstream/main' into dbartol/side-effect-reorder/work
2022-01-24 15:56:38 -05:00
CodeQL CI
8d1e22bc38
Merge pull request #7632 from erik-krogh/CWE-862
...
Approved by esbena, felicitymay
2022-01-24 12:47:16 -08:00
Erik Krogh Kristensen
d4bac887cf
add a js/samesite-none-cookie cookie
2022-01-24 21:39:41 +01:00
yo-h
364f07e3c5
Merge pull request #7725 from github/turbo-go-117-update
...
Update supported Go version
2022-01-24 15:23:00 -05:00
Robert Marsh
6d3381cb89
Merge pull request #7718 from MathiasVP/move-return-stack-allocated-memory-into-code-scanning
...
C++: Add `security` tag to `cpp/return-stack-allocated-memory`
2022-01-24 14:52:23 -05:00
Tom Hvitved
66a24c5c49
Ruby: Introduce TAnyArrayElementContent
2022-01-24 20:25:05 +01:00
Pierre
af0fc37f39
Update supported Go version
2022-01-24 20:20:04 +01:00
Andrew Eisenberg
f71217706a
Merge branch 'main' into aeisenberg/getting-started-docs
2022-01-24 11:16:13 -08:00
Rasmus Wriedt Larsen
301318020f
Merge pull request #7455 from haby0/py/add-shutil-module-path-injection-sinks
...
Python: Add shutil module sinks for path injection query
2022-01-24 20:06:36 +01:00
Tom Hvitved
e3afcb1b06
C#: Add missing severity and update expected test output
2022-01-24 20:00:25 +01:00
Tom Hvitved
65e1c0ebc1
Merge remote-tracking branch 'upstream/main' into cs/hash-without-salt
2022-01-24 19:57:07 +01:00
Geoffrey White
e42d3e540a
C++: Change note.
2022-01-24 18:32:17 +00:00
Geoffrey White
764f27f08e
C++: Upgrade to path-problem.
2022-01-24 18:32:05 +00:00
Geoffrey White
bbaac556e2
C++: Reveal the FP to be an issue with dataflow / model of strcpy.
2022-01-24 17:53:37 +00:00
Geoffrey White
11929378c7
C++: Upgrade cpp/cleartext-storage-file to full taint flow.
2022-01-24 17:48:45 +00:00
Andrew Eisenberg
497c87851c
Merge pull request #7571 from github/aeisenberg/remove-upgrades
...
Update docs on the output of `resolve qlpacks`
2022-01-24 09:02:02 -08:00
Erik Krogh Kristensen
75f389749a
Merge pull request #7719 from erik-krogh/cwe-219
...
JS: add CWE-219 to js/exposure-of-private-files
2022-01-24 17:06:09 +01:00
Tom Hvitved
cc712c20cb
Ruby: Use bitShiftLeft instead of pow in parseInteger
2022-01-24 16:06:35 +01:00
Erik Krogh Kristensen
bb786bc557
fix good/bad mixup in ClientExposedCookie qhelp
2022-01-24 15:34:30 +01:00
Tom Hvitved
6efa595478
Merge pull request #7688 from hvitved/dataflow/required-component-stack
...
Data flow: Restructure `RequiredSummaryComponentStack`
2022-01-24 15:10:08 +01:00
Tom Hvitved
2a972dc045
Address review comments
2022-01-24 14:27:42 +01:00
Tony Torralba
b59fd4070f
Merge pull request #7136 from atorralba/atorralba/promote-insecure-trustmanager
...
Java: Promote Insecure TrustManager from experimental
2022-01-24 14:05:14 +01:00
Erik Krogh Kristensen
148b0c33a9
update the empty-password-in-config-file qhelp
2022-01-24 13:39:54 +01:00
Erik Krogh Kristensen
ab0d67a573
update query name and description
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-01-24 13:37:25 +01:00
Erik Krogh Kristensen
b2dc02b831
Merge pull request #7717 from erik-krogh/cwe-80
...
JS: add CWE-80 to queries that detect bad HTML sanitizers
2022-01-24 13:34:57 +01:00
Tom Hvitved
64f19637d4
Address review comments
2022-01-24 13:33:18 +01:00
Erik Krogh Kristensen
823cadecd5
add CWE-219 to js/exposure-of-private-files
2022-01-24 13:22:06 +01:00
Edoardo Pirovano
413c0a8f4f
Merge pull request #7673 from github/post-release-prep/codeql-cli-2.7.6
...
Post-release preparation for codeql-cli-2.7.6
2022-01-24 11:59:51 +00:00
Mathias Vorreiter Pedersen
7db66055e5
C++: Add change note.
2022-01-24 11:57:25 +00:00
Mathias Vorreiter Pedersen
08379df613
C++: Add 'security' tag to 'cpp/return-stack-allocated-memory'.
2022-01-24 11:43:38 +00:00
Geoffrey White
4c99d39acf
Merge pull request #7701 from MathiasVP/remove-intentional-get-stack-pointer
...
C++: Remove FPs from `cpp/return-stack-allocated-memory`
2022-01-24 11:39:10 +00:00
Arthur Baars
78b4d7cbb5
Ruby: remove redundant cast
2022-01-24 11:27:31 +01:00
Arthur Baars
0cef887683
Ruby: address comments
2022-01-24 11:27:26 +01:00
Geoffrey White
683f909f7a
Merge pull request #7704 from geoffw0/clrtxt4
...
C++: Another improvement to cpp/cleartext-transmission
2022-01-24 10:11:11 +00:00
Erik Krogh Kristensen
ab1bc685bb
add CWE-80 to queries that detect bad HTML sanitizers
2022-01-24 11:01:17 +01:00
Stephan Brandauer
02db472209
consistent notation
2022-01-24 10:58:06 +01:00
Anders Schack-Mulligen
7af6dc7164
Merge pull request #7702 from atorralba/atorralba/fix-jndi-injection-sinks
...
Java: Remove some JNDI Injection sinks
2022-01-24 10:53:58 +01:00
Stephan Brandauer
8be58fe01e
Fix comment to avoid summarizing implementation
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-01-24 10:47:28 +01:00
Arthur Baars
5df1f7a0c3
Ruby: use CfgNodes classes to implement case value to pattern variable taint steps
2022-01-24 10:31:08 +01:00
Arthur Baars
7d7e9ba9e1
Ruby: add CasePattern classes to CfgNodes
2022-01-24 10:31:08 +01:00
Arthur Baars
e9a01f9e8f
Ruby: fix test case
2022-01-24 10:31:08 +01:00
Arthur Baars
634c8cd060
Ruby: Generalize CfgNodes::ChildMapping
2022-01-24 10:31:08 +01:00
Arthur Baars
fcec8a8388
Address comments
2022-01-24 10:31:08 +01:00
Arthur Baars
ab4935fe68
Ruby: fix some alerts
2022-01-24 10:31:08 +01:00
Arthur Baars
7630b277b8
Ruby: update AST and CFG test data
2022-01-24 10:31:08 +01:00
Arthur Baars
26a0167d6d
Ruby: add taint step test for hash patterns
2022-01-24 10:31:06 +01:00
Arthur Baars
49c452239e
Ruby: add taint steps from case value to variables in patterns
2022-01-24 10:10:22 +01:00
Arthur Baars
77a3e4bd61
Ruby: CFG: fix completion of AsPattern variable
2022-01-24 10:10:22 +01:00
Stephan Brandauer
b277731312
add a predicate to recognize path arguments in calls to the fs-extra lib
2022-01-24 09:40:22 +01:00
Tony Torralba
908b7c43f2
Fix stubs
2022-01-24 09:34:43 +01:00
Anders Schack-Mulligen
9bd2ac96ea
Merge pull request #7705 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-24 09:14:35 +01:00
Anders Schack-Mulligen
b4bf7a1561
Merge pull request #7698 from aschackmull/java/bitwise-assignop-guards
...
Java: Add support for bitwise compound assignments in Guards.
2022-01-24 09:11:53 +01:00
github-actions[bot]
020970ff4c
Add changed framework coverage reports
2022-01-24 00:09:45 +00:00
Andrew Eisenberg
aee9eb5203
Apply docs fixes
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-01-21 11:35:15 -08:00
Aditya Sharad
67e3f5edbc
Merge pull request #7685 from adityasharad/merge/3.3-3.4
...
Merge rc/3.3 into rc/3.4
2022-01-21 10:49:19 -08:00
Tom Hvitved
85e1cda81b
Ruby: Distinguish symbols from strings in ConstantValue
2022-01-21 19:16:12 +01:00
Harry Maclean
8e40899dfd
Merge pull request #7419 from github/hmac/const-get
2022-01-22 07:01:09 +13:00
Harry Maclean
2fa18801aa
Merge pull request #7665 from github/hmac/barrier-guard-array-const
2022-01-22 06:59:51 +13:00
Tony Torralba
78d7e538a5
Remove some JNDI Injection sinks
...
Add tests and stubs
2022-01-21 17:47:15 +01:00
Henry Mercer
c41de33156
Merge pull request #7700 from github/henrymercer/js-atm-fix-xss-results-pattern
...
JS: Fix copy/paste error in XSS ML-powered queries results patterns
2022-01-21 16:18:33 +00:00
Geoffrey White
0b98397e9b
C++: Catch another encryption clue.
2022-01-21 16:16:16 +00:00
Geoffrey White
97447d0b3a
C++: Expand tests.
2022-01-21 16:16:15 +00:00
Henry Mercer
84907f91f1
JS: Fix copy/paste error in XSS ML-powered queries results patterns
...
We didn’t catch this because our unit tests test only library code due
to the previous difficulty of running queries with an ML model (the ML
models in packs work should fix that), and because the end-to-end
evaluation runs separate queries that have different result patterns.
Going forward we should create unit tests for the queries themselves,
which will require using the ML model in tests. We should also be able
to catch this type of error using DCA.
2022-01-21 15:17:52 +00:00
Mathias Vorreiter Pedersen
48064c1c8f
C++: Fix false positive.
2022-01-21 15:16:02 +00:00
Mathias Vorreiter Pedersen
7c8c2090f7
C++: Add real-world false positive from the 'cpp/return-stack-allocated-memory' query.
2022-01-21 15:14:18 +00:00
Mathias Vorreiter Pedersen
117795c409
Merge pull request #7682 from MathiasVP/rewrite-return-stack-allocated-memory-to-use-ir
...
C++: Use the IR for `cpp/return-stack-allocated-memory`.
2022-01-21 14:57:30 +00:00
yoff
a77a6ec864
Merge pull request #7684 from erik-krogh/patches
...
small refactorizations across CodeQL
2022-01-21 15:04:14 +01:00
Tom Hvitved
9d89cace95
Merge pull request #7643 from michaelnebel/csharp/struct-improvements
...
C#: Struct (and to a minor extent anonymous types) improvements
2022-01-21 14:51:26 +01:00
Anders Schack-Mulligen
5f7ee337cd
Java: Use more set literal syntax.
2022-01-21 13:58:27 +01:00
Anders Schack-Mulligen
41d294229d
Java: Add support for bitwise compound assignments in Guards.
2022-01-21 13:56:07 +01:00
Tony Torralba
1eaa379bb7
Merge pull request #7681 from atorralba/atorralba/improve-android-implicit-intents-query
...
Java: Improvements to the Android query Use of implicit PendingIntents
2022-01-21 13:46:17 +01:00
Tony Torralba
c7e1df5689
Update java/ql/src/Security/CWE/CWE-927/ImplicitPendingIntents.qhelp
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-01-21 11:57:11 +01:00
Erik Krogh Kristensen
a235f8f023
remove redundant inline type casts
2022-01-21 11:46:33 +01:00
Erik Krogh Kristensen
b75c316c27
fix non-us spelling
2022-01-21 11:46:33 +01:00
Erik Krogh Kristensen
f500bccbe4
add explicit this to member call
2022-01-21 11:46:33 +01:00
Erik Krogh Kristensen
ddfc3bc00f
use set literals instead of big disjunctions
2022-01-21 11:46:33 +01:00
Benjamin Muskalla
830c2dc90a
Merge pull request #7603 from bmuskalla/commonsIoModel
...
Java: Replace Commons IO model
2022-01-21 11:42:27 +01:00
yoff
5b9ae9cede
Merge pull request #7659 from RasmusWL/move-regex-injection-files
...
Python: Move regex injection configuration files
2022-01-21 11:42:06 +01:00
Tony Torralba
0846d1f7b6
Merge pull request #7691 from atorralba/atorralba/fix-recursion-entrypointfieldstep
...
Java: Fix recursion in `entrypointFieldStep`
2022-01-21 11:37:58 +01:00
Tony Torralba
3f6e035016
Docs improvements
2022-01-21 11:37:02 +01:00
yoff
4fd0ada9a8
Merge pull request #7652 from RasmusWL/cleartext-remove-fps
...
Python: Remove usernames as sensitive source for cleartext queries
2022-01-21 11:30:40 +01:00
Erik Krogh Kristensen
f9d5cbf017
update qhelp
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-01-21 11:26:58 +01:00
Tony Torralba
d22632ef78
Fix recursion in entrypointFieldStep
...
When using local taint tracking to define a RemoteFlowSource, a recursion was created because entrypointFieldStep adds new RemoteFlowSources and was a local taint step. This is fixed by converting entrypointFieldStep into a defaultAdditionalTaintStep instead of a localAdditionalTaintStep, i.e. it will only affect global taint tracking from now on.
2022-01-21 10:48:13 +01:00
Tom Hvitved
f9b906d1e2
C#: Update uses of RequiredSummaryComponentStack
2022-01-21 09:42:16 +01:00
Tom Hvitved
cba733136c
Data flow: Sync
2022-01-21 09:42:16 +01:00
Tom Hvitved
f1a2b21e44
Data flow: Restructure RequiredSummaryComponentStack
2022-01-21 09:42:16 +01:00
Tom Hvitved
aa9cfebc65
Ruby: Replace getValueText with getConstantValue
2022-01-21 09:19:19 +01:00
CodeQL CI
b02f1c87a1
Merge pull request #7679 from erik-krogh/ql-doc-style
...
Approved by esbena
2022-01-20 23:43:44 -08:00
CodeQL CI
2287b6e549
Merge pull request #7675 from erik-krogh/move-url-sink-to-customizations
...
Approved by esbena
2022-01-20 23:43:15 -08:00
Aditya Sharad
ccc6291844
Merge rc/3.3 into rc/3.4
...
Conflicts in *-support.rst resolved in favour of rc/3.3, which has a new paragraph.
Enterprise version numbers updated to LGTM Enterprise 1.30 and CodeQL 2.7.6.
2022-01-20 15:49:10 -08:00
Erik Krogh Kristensen
15c1ce722a
Merge pull request #7678 from erik-krogh/use-set
...
JS: use more set literals
2022-01-20 21:03:48 +01:00
shati-patel
8fc429caf4
Emphasize use case for installing pack deps
2022-01-20 19:03:30 +00:00
Mathias Vorreiter Pedersen
bd1720f797
C++: Add change note.
2022-01-20 18:27:09 +00:00
Mathias Vorreiter Pedersen
e689f6bad2
C++: Use the IR for 'cpp/return-stack-allocated-memory'.
2022-01-20 18:22:49 +00:00
Tom Hvitved
cbea5eaeaa
C#: Simplify argument/parameter positions for captured variables
2022-01-20 17:08:12 +01:00
Tony Torralba
6fe0b78978
Remove PendingIntentAsField step and add SliceProviderLifecycle step
2022-01-20 16:52:07 +01:00
Andrew Eisenberg
534f8999b6
Update docs/codeql/codeql-cli/getting-started-with-the-codeql-cli.rst
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-01-20 07:09:34 -08:00
Erik Krogh Kristensen
2bffe56580
update expected output
2022-01-20 16:06:57 +01:00
Erik Krogh Kristensen
3155114e36
use more set literals
2022-01-20 16:06:34 +01:00
Anders Schack-Mulligen
fede7dd238
Merge pull request #7676 from aschackmull/java/instanceaccessnode
...
Java: Add data flow node encapsulating instance accesses.
2022-01-20 15:40:21 +01:00
Erik Krogh Kristensen
a77b2b0209
Merge pull request #7668 from erik-krogh/simplify-casts
...
simplify expressions that could be type-casts
2022-01-20 15:20:18 +01:00
Erik Krogh Kristensen
5780161b2c
fix most issues found by ql/class-doc-style in JS
2022-01-20 15:10:16 +01:00
Alex Ford
9613ff743b
Merge pull request #7611 from github/ruby/protect_from_forgery-without-exception
...
Ruby: flag up `protect_from_forgery` calls without an exception strategy
2022-01-20 13:45:30 +00:00
Tony Torralba
caab1c3332
Merge pull request #6963 from atorralba/atorralba/android-onactivityresult-source
...
Android: Add the Intent parameter of the `onActivityResult` method as a source
2022-01-20 14:27:30 +01:00
Tony Torralba
29e87b3abd
Merge pull request #6975 from atorralba/atorralba/android-intent-uri-permission-manipulation
...
Java: CWE-266 - Query to detect Intent URI Permission Manipulation in Android applications
2022-01-20 14:27:02 +01:00
Geoffrey White
b230681bc8
Merge pull request #7650 from geoffw0/clrtxt3
...
C++: Improve cpp/cleartext-transmission
2022-01-20 13:21:54 +00:00
Rasmus Wriedt Larsen
f53dce3a83
Python: Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2022-01-20 14:20:15 +01:00
Anders Schack-Mulligen
43da5aabbe
Java: Add dataflow node encapsulating instance accesses.
2022-01-20 14:12:33 +01:00
Erik Krogh Kristensen
7167e856fe
move electron sink to the customizations file
2022-01-20 14:07:23 +01:00
github-actions[bot]
ab218421da
Post-release preparation for codeql-cli-2.7.6
2022-01-20 12:59:20 +00:00
Tony Torralba
62f847a82e
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-01-20 13:44:10 +01:00
Tony Torralba
3957ebe880
Fix bitwiseLocalTaintStep
2022-01-20 13:34:32 +01:00
Tony Torralba
265f8a3b19
Make bitwise taintsteps specific for this query
2022-01-20 13:23:56 +01:00
Tony Torralba
4e9849e19d
Refactor IntentFlagsOrDataCheckedGuard to avoid footgun
2022-01-20 13:23:55 +01:00
Tony Torralba
62c21918b2
Add QLDoc to guard and sanitizer
2022-01-20 13:23:54 +01:00
Tony Torralba
58a0bcd70f
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-20 13:23:53 +01:00
Tony Torralba
8767d2db23
Don't capitalize the term content provider
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-20 13:23:52 +01:00
Tony Torralba
596cfd399e
Improve description
2022-01-20 13:23:52 +01:00
Tony Torralba
ab560234e3
Update java/change-notes/2021-10-27-android-intent-uri-permission-manipulation-query.md
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-20 13:23:51 +01:00
Tony Torralba
3405db31b8
Add qhelp
2022-01-20 13:23:51 +01:00
Tony Torralba
6152c8a989
Add change note
2022-01-20 13:23:48 +01:00
Tony Torralba
e1d30ebc09
Added severity
...
Removed duplicated code
2022-01-20 13:23:15 +01:00
Tony Torralba
ec8ffeed07
Add Intent URI Permission Manipulation query
2022-01-20 13:23:14 +01:00
Michael Nebel
e804922a2c
C#: Add flow test case for with expressions on anonymous types.
2022-01-20 13:14:06 +01:00
Michael Nebel
97d9985e0b
C#: Add support for flow via object initializer for anonymous types.
2022-01-20 13:12:19 +01:00
Tony Torralba
c09b6691e1
Merge pull request #6171 from atorralba/atorralba/promote-unsafe-certificate-trust
...
Java: Promote Unsafe certificate trust query from experimental
2022-01-20 12:07:03 +01:00
Felicity Chapman
e178626226
Merge pull request #7653 from github/felicitymay-patch-1
...
Port changes from main to rc/3.3 to avoid regression
2022-01-20 10:45:13 +00:00
Anders Schack-Mulligen
f154530141
Merge pull request #7662 from JLLeitschuh/patch-2
...
Fix typo in FileWritable
2022-01-20 11:13:59 +01:00
Benjamin Muskalla
8217873bae
Align files with new naming pattern
2022-01-20 11:02:53 +01:00
Anders Schack-Mulligen
4aa2661dc1
Merge pull request #7634 from bmuskalla/refactorLangModel
...
Refactor Apache Commons Lang model
2022-01-20 11:01:25 +01:00
Benjamin Muskalla
4cac35adad
Regnerate model to capture char[] APIs
2022-01-20 10:59:28 +01:00
Benjamin Muskalla
857c2778a6
Added missing model for ReadableByteChannel
...
This reveals more models for commons io
2022-01-20 10:59:28 +01:00
Benjamin Muskalla
b20b3ab480
Regenrate model to replace manual models
2022-01-20 10:59:27 +01:00
Benjamin Muskalla
93f6fde63c
Keep not-yet-covered models
2022-01-20 10:59:27 +01:00
Benjamin Muskalla
d07997699f
Introduce generated model for Commons IO
2022-01-20 10:59:24 +01:00
Geoffrey White
8bdbaf4b57
C++: Autoformat.
2022-01-20 09:52:24 +00:00
CodeQL CI
cfa670c123
Merge pull request #7651 from erik-krogh/CWE-471
...
Approved by asgerf, esbena
2022-01-20 01:47:39 -08:00
Tom Hvitved
a1cdf256ad
Merge pull request #7667 from github/release-prep/2.7.6
...
Release preparation for version 2.7.6
2022-01-20 10:45:17 +01:00
Erik Krogh Kristensen
4e8e3a7420
simplify expressions that could be type-casts
2022-01-20 10:41:35 +01:00
Benjamin Muskalla
2748bbffa3
Merge pull request #7656 from bmuskalla/excludeMainLoggingGenerator
...
Java: Exclude irrelevant rows from models
2022-01-20 10:40:51 +01:00
Tony Torralba
967308fbfd
Change InsecureTrustManagerConfiguration to DataFlow
2022-01-20 10:24:47 +01:00
mc
c105d71952
Update InsecureTrustManager.qhelp
...
Fixed typos and carried out and editorial review
2022-01-20 10:24:46 +01:00
Tony Torralba
7a1a45f5f9
QLDoc
2022-01-20 10:24:46 +01:00
Tony Torralba
77c2b43560
Add change note and severity score
2022-01-20 10:24:43 +01:00
Michael Nebel
76a0853f5b
C#: Add struct declaration and update line numbers for the existing test cases.
2022-01-20 10:23:57 +01:00
Tony Torralba
d58bb4753e
Refactor tests
2022-01-20 10:23:19 +01:00
Tony Torralba
ab4dc30f54
Refactor into libraries
2022-01-20 10:23:18 +01:00
Tony Torralba
7cd05fb685
Move from experimental
2022-01-20 10:23:18 +01:00
Michael Nebel
7d7ab58108
C#: Add flow test for record struct fields.
2022-01-20 09:58:02 +01:00
Michael Nebel
210bad6c29
C#: Add test case for with expressions for record structs, structs and anonymous types.
2022-01-20 09:58:02 +01:00
Michael Nebel
fc7f642734
C#: With expression examples for record structs, structs and anonymous types.
2022-01-20 09:58:02 +01:00
Michael Nebel
858aec3839
C#: Add test for source of the struct parameterless constructor(s).
2022-01-20 09:58:02 +01:00
Michael Nebel
073d2f2c75
C#: Add some example struct types, including one with a default constructor declarations.
2022-01-20 09:58:01 +01:00
Michael Nebel
547f492be0
Merge pull request #7577 from michaelnebel/csharp/line-pragma
...
C#: Make support for Line span pragma
2022-01-20 09:51:57 +01:00
github-actions[bot]
4ce8ccc52b
Release preparation for version 2.7.6
2022-01-20 08:21:18 +00:00
Harry Maclean
6bae03a7cc
Ruby: Update string const barrier guard
...
This change recognises guards like `FOO.include?`, where `FOO` is an array
constant.
2022-01-20 17:34:12 +13:00
Harry Maclean
13a0ece25c
Ruby: Add test case: array constant barrier guard
...
This guard isn't yet recognised as a `StringConstArrayInclusionCall`.
2022-01-20 17:07:01 +13:00
Andrew Eisenberg
95355b5854
Docs: Add back removed section on getting started
...
Adds a second getting started, specifically for checking out the
codeql repo as a way to get the core queries.
This ensures that people wanting to work in the traditional way still
have the old docs available.
2022-01-19 13:36:57 -08:00
Jonathan Leitschuh
23548c50e1
Fix typo in FileWritable
2022-01-19 16:14:38 -05:00
Tom Hvitved
70f4efb834
Merge pull request #7646 from hvitved/csharp/roslyn-tuple-elements-workaround
...
C#: Workaround Roslyn bug in `INamedTypeSymbol.TupleElements`
2022-01-19 19:54:29 +01:00
Tom Hvitved
128682b59e
C#: Replace Argument[-1] with Argument[Qualifier] in all flow summaries
2022-01-19 18:54:24 +01:00
shati-patel
dc71ecef83
Docs: Mention packaging commands in CodeQL extension
2022-01-19 16:36:01 +00:00
Rasmus Wriedt Larsen
b9ee2960e2
Python: Add change-note
2022-01-19 17:24:53 +01:00
Rasmus Wriedt Larsen
aa10ad6a8a
Python: Fix RegexInjection query, add old deprecated versions
2022-01-19 17:22:44 +01:00
Rasmus Wriedt Larsen
e82ea7ad17
Python: move regex injection configuration files
...
I did not notice that these went to the wrong location in
https://github.com/github/codeql/pull/6693 . They should be in the
dataflow folder with the rest of the data-flow configurations files, the
injection folder is for old points-to based modeling.
2022-01-19 17:21:46 +01:00
Tom Hvitved
0990a1b404
C#: Get rid of negative parameter/argument data-flow positions
2022-01-19 17:14:37 +01:00
Tony Torralba
695e77a219
Simplify isSslSocket predicate
2022-01-19 17:01:28 +01:00
Mathias Vorreiter Pedersen
40c8881575
Merge pull request #7472 from erik-krogh/redundant-aggregate
...
QL-for-QL: Add a could-be-cast query
2022-01-19 15:48:00 +00:00
Henry Mercer
58b1a6fd40
Merge pull request #7655 from github/henrymercer/bump-atm-query-pack-v0.0.6
...
JS: Bump ML-powered query packs to v0.0.6
2022-01-19 15:44:55 +00:00
Tony Torralba
e442e50e6b
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-01-19 16:43:48 +01:00
Tony Torralba
101ad777e3
Move things around after rebase
2022-01-19 16:43:48 +01:00
Tony Torralba
03020582af
Apply suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-19 16:43:47 +01:00
Tony Torralba
9ffc5ab183
Update java/ql/src/semmle/code/java/security/UnsafeCertTrustQuery.qll
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2022-01-19 16:43:47 +01:00
Tony Torralba
c16181dd2f
QLDocs
2022-01-19 16:43:46 +01:00
Tony Torralba
000a544729
Decouple UnsafeCertTrust.qll to reuse the taint tracking configuration
2022-01-19 16:43:43 +01:00
Tony Torralba
1e2a956a30
Remove unused stub
2022-01-19 16:43:02 +01:00
Tony Torralba
d9e98ceacc
Consider setSslContextFactory and fix tests
2022-01-19 16:43:01 +01:00
Tony Torralba
4d207101e2
Fix QLDoc
2022-01-19 16:43:00 +01:00
Tony Torralba
999acb0021
Improve qhelp references
2022-01-19 16:43:00 +01:00
Tony Torralba
e9712f04a4
Add missing QLDoc
2022-01-19 16:42:59 +01:00
Tony Torralba
698fd64f7f
Adjust test after rebase
2022-01-19 16:42:59 +01:00
Tony Torralba
68fe3dd9f4
Fix conflicts in experimental query
2022-01-19 16:42:58 +01:00
Tony Torralba
c24520cb75
Adjust qhelp after rebase
2022-01-19 16:42:58 +01:00
Tony Torralba
5997b874de
Add change note
2022-01-19 16:42:53 +01:00
Tony Torralba
9e93aecf75
Add spurious test case
2022-01-19 16:42:06 +01:00
Tony Torralba
19d1a780ca
Generalize sanitizer using local flow
2022-01-19 16:42:05 +01:00
Tony Torralba
64518bf91a
Handle a specific pass-by-reference flow issue
2022-01-19 16:42:04 +01:00
Tony Torralba
4508945f85
Fix assumption regarding when an SSLSocket does the TLS handhsake
2022-01-19 16:42:03 +01:00
Tony Torralba
e842acf9e0
Improve qhelp
2022-01-19 16:42:03 +01:00
Tony Torralba
5d4cd70f8c
Adjusted sources and sanitizer of UnsafeCertTrust taint tracking config
2022-01-19 16:42:02 +01:00
Tony Torralba
e43fff2d30
Use InlineExpectationsTest
2022-01-19 16:42:02 +01:00
Tony Torralba
02d0fa9188
Minor changes in QLDocs and a sanitizer's type
2022-01-19 16:42:01 +01:00
Tony Torralba
4313baf622
Big refactor:
...
- Move classes and predicates to appropriate libraries
- Overhaul the endpoint identification algorithm logic to use taint tracking
- Adapt tests
2022-01-19 16:42:00 +01:00
Tony Torralba
e0f4c73aed
Move from experimental
2022-01-19 16:42:00 +01:00
Tony Torralba
6096080156
Use all possible packages for Fragment classes
...
Also fix stub
2022-01-19 16:23:11 +01:00
Benjamin Muskalla
52406dc8df
Exclude logging sinks
...
Those sinks are too coarse grained to be exposed as sinks on any model.
2022-01-19 16:11:59 +01:00
Benjamin Muskalla
25d251c24f
Exclude main methods from models
2022-01-19 16:11:59 +01:00
Tony Torralba
3c9fac0c6e
Sync DataFlowImplForOnActivityResult.qll
2022-01-19 16:11:51 +01:00
Tony Torralba
6a4d2ee850
Apply code review suggestions
2022-01-19 16:08:31 +01:00
Tony Torralba
57ff13dd19
Sync DataFlowImplForOnActivityResult to latest changes
2022-01-19 16:08:31 +01:00
Tony Torralba
ea4ff80cc6
Add DataFlowImplForOnActivityResult to identical-files.json
2022-01-19 16:08:31 +01:00
Tony Torralba
37916a8368
Fix previous merge
2022-01-19 16:08:31 +01:00
Tony Torralba
d9d9ad7d63
Use dedicated instance of DataFlow
2022-01-19 16:08:31 +01:00
Tony Torralba
aef63f69b0
Formatting
2022-01-19 16:08:30 +01:00
Tony Torralba
4b3029564c
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-19 16:08:29 +01:00
Tony Torralba
c675028537
Add Fragment and Activity edge case
2022-01-19 16:08:28 +01:00
Tony Torralba
9ae1f1cf85
QLDoc
2022-01-19 16:08:27 +01:00
Tony Torralba
211cb9370f
Add the Intent parameter of onActivityResult as a source
2022-01-19 16:08:25 +01:00
Tony Torralba
520d8f5ec5
Add stubs
2022-01-19 16:06:23 +01:00
Tom Hvitved
7e3f3c6e2a
Merge pull request #7515 from hvitved/csharp/extraction-mode
...
C#: Introduce extractor mode to identify DBs created with `codeql test run`
2022-01-19 16:04:57 +01:00
Chris Smowton
162b3822dd
Merge pull request #7613 from github/smowton/admin/tag-random-used-once
...
Remove security-severity tag to java/random-used-once
2022-01-19 14:43:08 +00:00
Henry Mercer
c134e6c9ef
JS: Bump ML-powered query packs to v0.0.6
2022-01-19 14:40:42 +00:00
Felicity Chapman
51e8b4c7ed
Port changes from main to rc/3.3 to avoid regression
2022-01-19 14:26:52 +00:00
Rasmus Wriedt Larsen
e82e648ca1
Python: Remove usernames as sensitive source for cleartext queries
...
Closes #6363 , #6927 , #6726 , #7497 , #7116
2022-01-19 15:25:21 +01:00
Chris Smowton
c63fcb2c69
Add change note
2022-01-19 14:13:45 +00:00
Rasmus Wriedt Larsen
f3daff4e5a
Python: Add FP tests for cleartext logging
2022-01-19 15:13:06 +01:00
Chris Smowton
f0645a34b9
Remove security-severity tag instead
...
This leaves the Java query in the same state as its C# cousin.
2022-01-19 14:06:40 +00:00
Erik Krogh Kristensen
cb9e14f544
add cwe-471 to js/prototype-pollution
2022-01-19 14:54:57 +01:00
Alex Ford
0aab670b17
Ruby: add missing example rails action
2022-01-19 13:47:00 +00:00
Tom Hvitved
cb098df4ea
Merge pull request #7334 from github/hmac/regexp-interpolations
...
Ruby: Resolve simple string interpolations
2022-01-19 14:43:58 +01:00
Alex Ford
45ed5a806c
Ruby: changenote for rb/csrf-protection-disabled enhancement
2022-01-19 13:41:00 +00:00
Alex Ford
b27d315ff4
Ruby: add an example of protect_from_forgery with: :exception
2022-01-19 13:30:27 +00:00
Mathias Vorreiter Pedersen
dfbde23821
Merge pull request #7627 from geoffw0/nullterm5
...
C++: Fix branch related FPs in cpp/improper-null-termination.
2022-01-19 13:30:05 +00:00
Erik Krogh Kristensen
e4203a4109
add CWE-471 to the prototype-pollution queries
2022-01-19 14:26:34 +01:00
Tom Hvitved
dacb33d1dd
C#: Adjust Roslyn workaround
2022-01-19 14:12:21 +01:00
Geoffrey White
0230494799
C++: Expand QLDoc comment.
2022-01-19 13:07:55 +00:00
Henry Mercer
061b9badfe
Merge pull request #7649 from github/henrymercer/bump-atm-query-pack-v0.0.5
...
JS: Bump ML-powered query packs to v0.0.5
2022-01-19 13:00:41 +00:00
Geoffrey White
acfd593eb4
C++: Change note.
2022-01-19 13:00:36 +00:00
Geoffrey White
330b4c3704
C++: Generalize hasSocketInput a little to include fgets and friends.
2022-01-19 13:00:35 +00:00
Geoffrey White
9c2d961ae5
C++: Fix another expression of stdin / stdout we see in practice.
2022-01-19 13:00:34 +00:00
Michael Nebel
d7cd1cf0b9
C#: Address review comments.
2022-01-19 13:50:02 +01:00
Tom Hvitved
4f90b45dd7
C#: Address review comments
2022-01-19 13:46:22 +01:00
Tom Hvitved
c8509cc382
C#: Introduce extractor mode to identify DBs created with codeql test run
2022-01-19 13:46:22 +01:00
Geoffrey White
d77ba020f9
C++: Support more routines as proof-of-encryption in cpp/cleartext-transmission.
2022-01-19 12:40:32 +00:00
Geoffrey White
974a8b1a9a
C++: Add a test case.
2022-01-19 12:33:21 +00:00
Henry Mercer
d467725ccd
JS: Bump ML-powered query packs to v0.0.5
2022-01-19 12:08:33 +00:00
Michael Nebel
3df30545d3
Merge pull request #7628 from michaelnebel/csharp/issue-7609
...
C#: Fix false positive alert for shadowing on record types.
2022-01-19 12:24:57 +01:00
Tom Hvitved
71ddd00a6c
C#: Workaround Roslyn bug in INamedTypeSymbol.TupleElements
2022-01-19 11:33:03 +01:00
Michael Nebel
edafdc8fde
C#: Added change note.
2022-01-19 11:04:53 +01:00
Michael Nebel
194da454b1
C#: Add record deconstruct method as an exception from the bad practice rule.
2022-01-19 11:04:53 +01:00
Michael Nebel
2eea6ca5fd
C#: Example record type with autogenerated Deconstruct method.
2022-01-19 11:04:53 +01:00
Mathias Vorreiter Pedersen
bdfde88e99
Merge pull request #7630 from JarLob/patch-2
...
C++: Reduce FPs in IncorrectPrivilegeAssignment.ql
2022-01-19 09:49:43 +00:00
Erik Krogh Kristensen
ef2eacebce
add a js/empty-password-in-configuration-file query
2022-01-19 10:48:45 +01:00
Michael Nebel
55f787bcae
Merge pull request #7605 from michaelnebel/csharp/record-struct
...
C#: Support for record structs
2022-01-19 10:39:52 +01:00
Harry Maclean
994fcf54b5
Merge pull request #7126 from jeffgran/jg/graphql-ruby
...
Ruby: Add support for GraphQL
2022-01-19 22:19:30 +13:00
Harry Maclean
08d48b9375
Add top-level doc comment to GraphQL.qll
2022-01-19 21:42:46 +13:00
Tony Torralba
b2c7175ac5
Merge pull request #7641 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-19 09:34:01 +01:00
Tom Hvitved
f02aeafef1
Ruby: Move regex/non-regex split into TAstNode to convey disjointness
2022-01-19 09:22:01 +01:00
github-actions[bot]
f7240be136
Add changed framework coverage reports
2022-01-19 00:09:52 +00:00
Jaroslav Lobačevski
a1b0315d90
Update cpp/ql/src/experimental/Security/CWE/CWE-266/IncorrectPrivilegeAssignment.ql
2022-01-19 00:52:10 +01:00
Andrew Eisenberg
01b5881de6
Docs: Remove reference to checking out main branch
...
We are no longer including information about how to check out
github/codeql, so this paragraph doesn't fit any more.
2022-01-18 15:48:33 -08:00
Andrew Eisenberg
0cd6556964
Docs: Update analyzing databases docs
...
Add more information about running packs. Include the `--download` flag.
2022-01-18 15:03:08 -08:00
Andrew Eisenberg
7fcf567eda
Docs: Simplify getting started docs
...
It is no longer necessary to check out a version of `github/codeql` as
a sibling directory to the distribution. Instead, users can download
the required packs as needed. using the `pack download` command or
the `--download` option for `codeql database analyze`.
2022-01-18 15:03:08 -08:00
Harry Maclean
4f7f92490a
Distinguish regex components from strings
...
Create a set of classes for components of regex literals,
separate from those of string literals. This allows us to special-case
components of free-spacing regexes (ones with the /x flag) to not have a
`getValueText()`.
This in turn is useful because our regex parser can't handle free-spacing
regexes, so excluding them ensures that we don't generate erroneous
ReDoS alerts.
2022-01-19 11:23:40 +13:00
Jaroslav Lobačevski
3fa2516898
Update cpp/ql/src/experimental/Security/CWE/CWE-266/IncorrectPrivilegeAssignment.ql
2022-01-18 21:47:55 +01:00
Jaroslav Lobačevski
d1c89562b8
Apply suggestions from code review
2022-01-18 21:45:13 +01:00
Chris Smowton
84097468cc
Merge pull request #7286 from luchua-bc/java/unsafe-url-forward-dispatch
...
Java: CWE-552 Query to detect unsafe request dispatcher usage
2022-01-18 18:19:20 +00:00
Henry Mercer
63672ca394
Merge pull request #7616 from github/henrymercer/js-atm-add-query-help
...
JS: Add query help for ML-powered queries
2022-01-18 18:11:53 +00:00
Chris Smowton
1e32514600
Avoid using this for a non-extending supertype, and remove needless casts
2022-01-18 17:20:40 +00:00
Benjamin Muskalla
9e91b805d6
Sort Lang3 models
2022-01-18 18:10:37 +01:00
Benjamin Muskalla
e6800c877c
Merge Lang3 rows
2022-01-18 18:10:37 +01:00
Benjamin Muskalla
736e68820c
Split out Lang3 models
2022-01-18 18:10:37 +01:00
Benjamin Muskalla
67b60dcf78
Sort Lang2 rows
2022-01-18 18:10:36 +01:00
Benjamin Muskalla
82bda6d573
Merge Lang2 summary models
2022-01-18 18:10:36 +01:00
Benjamin Muskalla
8eb6743586
Split out Lang2 rows
2022-01-18 18:10:33 +01:00
Chris Smowton
d744cf9053
Clean up guard logic:
...
* Always sanitize after the second guard, not the first
* Only check basic-block dominance in one place
* One BarrierGuard extension per final guard
2022-01-18 17:10:06 +00:00
Chris Smowton
748008ad51
Remove dangling reference to UnsafeRequestPath.java
2022-01-18 17:08:38 +00:00
luchua-bc
a3d65a8ed0
Update recommendation in qldoc and make examples more comprehendible
2022-01-18 17:01:26 +00:00
Geoffrey White
982fb8f73a
C++: Add change note.
2022-01-18 16:38:44 +00:00
Robert Marsh
024bd27485
Merge pull request #7578 from MathiasVP/store-dest-should-not-be-use
...
C++: Store destinations should not be uses for dataflow SSA
2022-01-18 11:36:15 -05:00
Jeff Gran
47697f59c1
Ruby: Add classes for detecting user input from graphql-ruby
2022-01-18 09:13:58 -07:00
CodeQL CI
1912c56f82
Merge pull request #7631 from RasmusWL/sqlalchemy-scoped-session
...
Approved by tausbn
2022-01-18 14:31:49 +00:00
Rasmus Wriedt Larsen
95e935e9c1
Python: Support SQLAlchemy scoped_session
2022-01-18 14:34:31 +01:00
Erik Krogh Kristensen
30d896bdbb
QL: make the alert-message more precise when the type-cast is also redundant
2022-01-18 14:25:43 +01:00
Jaroslav Lobačevski
92f5a5f893
Reduce FPs in IncorrectPrivilegeAssignment.ql
...
Implements suggestions from https://github.com/github/codeql/pull/6949#issuecomment-976482965
2022-01-18 13:43:17 +01:00
Erik Krogh Kristensen
14d2f5fe02
QL: add a new ql/could-be-cast query
2022-01-18 13:37:32 +01:00
Erik Krogh Kristensen
a1f4c85dea
QL: update expected output for the printAst test
2022-01-18 13:37:04 +01:00
Erik Krogh Kristensen
1ec868eeae
QL: various improvements to Ast.qll
2022-01-18 13:23:33 +01:00
Erik Krogh Kristensen
95ae113994
QL: downgrade redundant-inline-cast to a warning query
2022-01-18 13:22:01 +01:00
Erik Krogh Kristensen
ea7945bac1
QL: show recommendation queries by default, and remove the MissingQLDoc query
2022-01-18 13:21:07 +01:00
Henry Mercer
be0c26f83d
Merge pull request #7617 from github/henrymercer/js-atm-update-alert-messages
...
JS: Update alert messages for ML-powered queries
2022-01-18 11:37:02 +00:00
Mathias Vorreiter Pedersen
cb0cc8d859
Merge pull request #7625 from geoffw0/nullterm4
...
C++: Fix some code duplication.
2022-01-18 11:18:06 +00:00
Tony Torralba
b16b0270d2
Merge pull request #6779 from atorralba/atorralba/android-implicit-pending-intents
...
Java: CWE-927 - Query to detect the use of implicit PendingIntents
2022-01-18 12:14:47 +01:00
Geoffrey White
548a62d1ab
C++: Fix branch related FPs in cpp/improper-null-termination.
2022-01-18 11:13:08 +00:00
Felicity Chapman
c3ed74d63c
Merge pull request #7604 from github/lgtm-1.29-docs
...
Update version numbers in CodeQL support notes for LGTM 1.29
2022-01-18 11:09:38 +00:00
Chris Smowton
9819752bdd
Merge pull request #7526 from smowton/smowton/fix/restore-nodes-edges-consistency
...
Don't include arg -> param edges in PathGraph::edges where arg is not reachable
2022-01-18 11:05:47 +00:00
Benjamin Muskalla
7e215a5193
Merge pull request #7599 from bmuskalla/modelWriter
...
Java: Model Appenable and Writer
2022-01-18 11:55:27 +01:00
Henry Mercer
1893b9f7a9
Merge pull request #7376 from github/henrymercer/js-atm-absent-features-optimization
...
JS: Update featurization for absent features optimization
2022-01-18 10:15:53 +00:00
Tony Torralba
f103d45340
Merge branch 'main' into atorralba/android-implicit-pending-intents
2022-01-18 10:50:49 +01:00
Mathias Vorreiter Pedersen
e1598aba5e
C++: Fix spelling.
2022-01-18 09:44:36 +00:00
Tony Torralba
3ff7710a18
Improve ExplicitIntent's QLDoc
2022-01-18 10:43:52 +01:00
Tony Torralba
fe2755c4a0
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-18 10:41:19 +01:00
Benjamin Muskalla
365a8d9bbd
Fix flow for fluent appendable api
2022-01-18 10:41:00 +01:00
Benjamin Muskalla
8e6a15640f
Model basic channel APIs
2022-01-18 10:40:39 +01:00
Anders Schack-Mulligen
fff3b5c5b4
Dataflow: Add qldoc.
2022-01-18 10:39:55 +01:00
Anders Schack-Mulligen
9479301485
Ruby: Accept qltest expected changes.
2022-01-18 10:36:52 +01:00
Anders Schack-Mulligen
5cfa3c7927
C++: Accept qltest expected changes.
2022-01-18 10:36:52 +01:00
Anders Schack-Mulligen
7b98ca9b0a
C#: Adjust qltest expected output.
2022-01-18 10:36:52 +01:00
Anders Schack-Mulligen
aa9912a699
Java: Fix expected output
2022-01-18 10:36:52 +01:00
Anders Schack-Mulligen
71e39353ca
Dataflow: Sync.
2022-01-18 10:36:52 +01:00
Anders Schack-Mulligen
b22c4e3c56
Dataflow: Bugfix: include subpaths ending at a sink.
2022-01-18 10:34:14 +01:00
Chris Smowton
f7d3892320
Update test expectations
2022-01-18 10:30:09 +01:00
Anders Schack-Mulligen
dfa79f6119
Dataflow: Sync.
2022-01-18 10:30:09 +01:00
Anders Schack-Mulligen
46736a137c
Dataflow: Don't include subpaths that can't reach a sink.
2022-01-18 10:30:09 +01:00
Chris Smowton
2c37885f6e
Sync dataflow
2022-01-18 10:30:09 +01:00
Chris Smowton
7c9b44b4cb
Don't include arg -> param edges in PathGraph::edges whose arg is not reachable
...
This avoids lots of missing-node warnings from `codeql bqrs interpret` as it discards the nodes that occur in the `edges` relation but not `nodes`. The problem arises because subpaths introduced two variants of `reach`, one of which is more restrictive than simply `reach(succ) and succ = pred.getASuccessor()`, so it no longer suffices to just check that the successor is reachable.
2022-01-18 10:30:09 +01:00
Michael Nebel
de3d62b3f4
C#: Update stats file for the new relations (they are unfortunately empty).
2022-01-18 09:33:40 +01:00
Michael Nebel
bf21026771
C#: Add downgrade scripts for the line span pragma.
2022-01-18 09:32:14 +01:00
Michael Nebel
8fd116fbd7
C#: Add upgrade scripts for the new tables requires for the line span pragma.
2022-01-18 09:32:14 +01:00
Michael Nebel
ac47c96f48
C#: Add Line span pragma test case.
2022-01-18 09:32:14 +01:00
Michael Nebel
8b048ca17e
C#: Add line span pragma example.
2022-01-18 09:32:14 +01:00
Michael Nebel
93255dfe13
C#: Add QL library support for the Line span directive.
2022-01-18 09:32:14 +01:00
Michael Nebel
7e264668d8
C#: Refator directive visitor to use expression body.
2022-01-18 09:32:14 +01:00
Michael Nebel
af380f846e
C#: Add support in the extractor for the LineSpanDirective.
2022-01-18 09:32:14 +01:00
Michael Nebel
195d40c04e
C#: Add new class needed for LineSpanDirective and modify existing implementation to use the new types.
2022-01-18 09:32:14 +01:00
Michael Nebel
a197befb5f
C#: Add shared base class for line and line span pragmas.
2022-01-18 09:32:14 +01:00
Michael Nebel
c9467d7e94
C#: Add new tables to the dbscheme line span pragma.
2022-01-18 09:32:14 +01:00
Anders Schack-Mulligen
c41ec1f8ec
Merge pull request #7619 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-18 09:17:40 +01:00
github-actions[bot]
b8959f7bdb
Add changed framework coverage reports
2022-01-18 00:10:52 +00:00
Alex Ford
c1a51d94a2
Ruby: add test for protect_from_forgery without exception strategy
2022-01-17 17:44:52 +00:00
Erik Krogh Kristensen
d63f4bfd94
Merge pull request #7615 from erik-krogh/super-charpred
...
QL: support this.method() calls in the charpred that references non-extending supertypes
2022-01-17 18:32:10 +01:00
Felicity Chapman
e0110bd25e
FIx typo in new note
2022-01-17 17:20:00 +00:00
Henry Mercer
ffa4135cbe
JS: Update alert messages for ML-powered queries
2022-01-17 17:19:49 +00:00
Erik Krogh Kristensen
a4cfb80b81
QL: update comment
2022-01-17 17:19:15 +00:00
Felicity Chapman
e7dde79d50
Add note and link to main CodeQL CLI docs
2022-01-17 17:14:58 +00:00
Erik Krogh Kristensen
85c273a413
QL: support this.method() calls in the charpred that references non-extending supertypes
2022-01-17 17:42:35 +01:00
Henry Mercer
e9128466d4
JS: Add query help for ML-powered queries
...
Query help is identical to the original query, except for a new
paragraph prepended to the overview explaining that the queries are
experimental.
We add Markdown query help since only Markdown query help is embedded in
SARIF via `--sarif-add-query-help`.
2022-01-17 16:34:50 +00:00
Henry Mercer
568d37e9b9
JS: Update definition of ATM query suite
...
It's simpler to just run all the queries in the pack instead of
specifying the IDs.
2022-01-17 16:34:50 +00:00
Geoffrey White
d475101286
C++: Fix some code duplication.
2022-01-17 16:26:22 +00:00
Owen Mansel-Chan
065043b311
Merge pull request #7588 from owen-mc/add-specific-needs-reference-predicates
...
Dataflow: Add language-specific NeedsReference predicates
2022-01-17 15:51:34 +00:00
Michael Nebel
b927aad6ed
C#: Address review comments related to record structs.
2022-01-17 16:16:18 +01:00
Michael Nebel
6c1bb4a3a9
C#: Add test case for record class and record structs.
2022-01-17 16:16:18 +01:00
Michael Nebel
746fd603d8
C#: Add flow summary test for record struct constructors.
2022-01-17 16:16:18 +01:00
Michael Nebel
9770f09839
C#: Deprecate Record and introduce RecordClass instead. Also make flow summary support for record struct constructors.
2022-01-17 16:16:18 +01:00
Michael Nebel
55cb2aa160
C#: Use modifier to decide, if a type is a record like type and implement support for record struct types.
2022-01-17 16:16:18 +01:00
Michael Nebel
dc76775d07
C#: Consider 'record' a type modifier in the extractor (it can be applied to both class and struct).
2022-01-17 16:16:18 +01:00
Michael Nebel
c17bd29640
C#: Rename C# code file and update test.
2022-01-17 16:16:18 +01:00
Tony Torralba
e967b8a9be
Merge pull request #6576 from atorralba/atorralba/android-cleartext-storage-filesystem
...
Java: Create new query Cleartext storage of sensitive information in Android filesystem
2022-01-17 14:02:38 +01:00
Tony Torralba
227929508f
Merge pull request #6923 from atorralba/atorralba/android-fragment-injection
...
Java: CWE-470 - Queries to detect Fragment Injection in Android applications
2022-01-17 14:02:15 +01:00
Tom Hvitved
3c837c322b
Merge pull request #7514 from github/post-release-prep/codeql-cli-2.7.5
...
Post-release preparation for codeql-cli-2.7.5
2022-01-17 12:40:33 +01:00
Tony Torralba
7beab7cb59
Apply code review suggestions
2022-01-17 12:02:27 +01:00
Mathias Vorreiter Pedersen
78642aaae2
Merge pull request #7593 from MathiasVP/fix-join-order-in-get-conversion-type
...
C++: Fix join order in 'getConversionType4'
2022-01-17 11:01:08 +00:00
Chris Smowton
16aa53a928
Add security tag to java/random-used-once
...
Raised in https://github.com/github/codeql/issues/7601 , this is one of the only .ql files that has a security-severity score but not the tag "security", including many other queries that live outside the `Security/` subdirectory.
Besides this the only other files with this security-severity-but-no-security-tag combination are:
```
java/ql/src/Frameworks/JavaEE/EJB/EjbContainerInterference.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbFileIO.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbNative.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbReflection.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbSecurityConfiguration.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbSerialization.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbSetSocketOrUrlFactory.ql
```
Given their location I'm assuming these queries are disabled by default and likely shouldn't changed?
2022-01-17 10:35:34 +00:00
Tony Torralba
a23b8a4a43
Update java/ql/src/Security/CWE/CWE-470/FragmentInjection.inc.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-17 11:20:39 +01:00
Tony Torralba
ba3a4fb717
Rename filesystemStore predicate after d9e6e5aa04
2022-01-17 11:13:41 +01:00
Tony Torralba
500deac12d
Change query description
2022-01-17 11:11:05 +01:00
Tony Torralba
d9e6e5aa04
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-17 11:11:05 +01:00
Tony Torralba
22aad17d0e
Apply review suggestions
...
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com >
2022-01-17 11:11:04 +01:00
Tony Torralba
9bbba3c96f
Adjust UnsupportedExternalAPIs test
2022-01-17 11:11:04 +01:00
Tony Torralba
1e4840e071
Fix predicate name
2022-01-17 11:11:03 +01:00
Tony Torralba
79ddbd6fe4
Fix QLDoc and the qhelp example
2022-01-17 11:11:03 +01:00
Tony Torralba
c1ac09a063
Added query for Cleartext Storage in Android Filesystem
2022-01-17 11:11:00 +01:00
Paolo Tranquilli
6a53b7b233
Merge pull request #7543 from github/rdmarsh2/cpp/hex-format-range-analysis
...
C++: Use range analysis for maximum lengths of `%x` formats
2022-01-17 08:32:34 +01:00
Alex Ford
d09f48ecb4
Ruby: flag up protect_from_forgery calls without an exception strategy
2022-01-16 20:56:13 +00:00
luchua-bc
4797fce48a
Update use cases and qldoc
2022-01-16 01:15:29 +00:00
luchua-bc
978ef1570a
Update method names
2022-01-16 01:11:25 +00:00
Tom Hvitved
2ecf0d3264
Merge pull request #7550 from michaelnebel/csharp/global-using
...
C#: Support for identifying whether a using directive is "global".
2022-01-14 20:03:18 +01:00
Robert Marsh
5df6bcf952
C++: change note for hex format range analysis
2022-01-14 13:18:58 -05:00
Dave Bartolomeo
bce2a810a3
Merge pull request #7400 from github/dbartol/change-note-instructions
...
Add instructions for creating change notes.
2022-01-14 13:10:44 -05:00
Robert Marsh
9de63b2812
Merge branch 'main' into rdmarsh2/cpp/hex-format-range-analysis
...
Accept test changes from query split
2022-01-14 12:53:52 -05:00
Andrew Eisenberg
fbb5d7196f
Merge branch 'main' into post-release-prep/codeql-cli-2.7.5
2022-01-14 08:23:43 -08:00
Tony Torralba
a2c98baf29
Reordering
2022-01-14 17:17:57 +01:00
Tony Torralba
eb1806c0a9
Split PathMatchGuard into three guards
2022-01-14 17:14:18 +01:00
Ian Lynagh
bba8e45e74
Merge pull request #7602 from igfoo/igfoo/typos
...
Fix a couple of typos: clases / clasess
2022-01-14 15:56:04 +00:00
Henry Mercer
ed28b7f174
Merge pull request #7575 from github/henrymercer/atm-remove-code-to-features
...
JS: Remove ATM `CodeToFeatures` library
2022-01-14 15:31:34 +00:00
Michael Nebel
e09009cd8e
Merge pull request #7118 from michaelnebel/csharp-primary-ql-class
...
C#: PrimaryQlClass
2022-01-14 16:14:28 +01:00
Felicity Chapman
fdf77ad2b9
Update version numbers for LGTM 1.29
2022-01-14 15:07:29 +00:00
Ian Lynagh
22dc24629f
Fix a couple of typos: clases / clasess
2022-01-14 14:28:29 +00:00
Tony Torralba
fb1287d577
Use dominance instead of getParent
...
Add clarification comments to PathMatchGuard
2022-01-14 15:28:02 +01:00
Mathias Vorreiter Pedersen
25253c7b8d
C++: Don't count write operations as uses for IR dataflow. Accept test changes.
2022-01-14 13:39:57 +00:00
Mathias Vorreiter Pedersen
e8afec413a
C++: Add testcase that demonstrates a FP caused by spurious flow through phi nodes in IR dataflow.
2022-01-14 13:34:27 +00:00
Tony Torralba
136fefbab5
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-14 13:38:17 +01:00
luchua-bc
877c52981f
Remove the deprecated library keyword
2022-01-14 12:13:41 +00:00
Tony Torralba
cde7a35c1f
QLDoc
2022-01-14 13:12:30 +01:00
Michael Nebel
8c6c8b0adb
C#: Remove un-needed ql doc comment.
2022-01-14 12:55:54 +01:00
Tony Torralba
6aac848015
Fix imports
2022-01-14 12:43:08 +01:00
Tony Torralba
9f616e7cbe
Refactor to use FlowState
...
Remove the auxiliary DataFlow configuration
2022-01-14 12:24:35 +01:00
Mathias Vorreiter Pedersen
b51c85597b
Merge pull request #7529 from erik-krogh/fixup-library-deps
...
QL: recognize dependecies of the form: libraryPathDependencies: library-name
2022-01-14 11:13:56 +00:00
Erik Krogh Kristensen
b02fecf125
Merge pull request #7600 from erik-krogh/ql-for-ql-team
...
QL: change reviewers of QL-for-QL to a newly created team
2022-01-14 11:45:40 +01:00
Erik Krogh Kristensen
47e56365c4
QL: change reviewers of QL-for-QL to a newly created team
2022-01-14 11:32:09 +01:00
Henry Mercer
d55e6d1ca7
Merge pull request #7594 from github/henrymercer/js-atm-rename-queries
...
JS: Update names, IDs, and tags for ML-powered queries
2022-01-14 10:28:24 +00:00
Benjamin Muskalla
a4429d01a3
Add tests for writer models
2022-01-14 11:12:35 +01:00
Benjamin Muskalla
37ca6a5e41
Model Appenable and Writer
...
This allows us to track taint carried through all kind of writers.
2022-01-14 11:12:35 +01:00
Mathias Vorreiter Pedersen
6d95d47467
Merge branch 'main' into fix-join-order-in-get-conversion-type
2022-01-14 09:53:17 +00:00
Michael Nebel
6009d71e9a
C#: Add getAPrimaryQlClass override to UnknownExpr.
2022-01-14 10:41:44 +01:00
Tony Torralba
df95317a58
Fix tests after stub change
2022-01-14 10:33:21 +01:00
Tony Torralba
6f06be9419
Update change note
2022-01-14 10:33:19 +01:00
Tony Torralba
bd4abf4fd0
Additional Notification models
2022-01-14 10:32:38 +01:00
Tony Torralba
a9757fbc83
Setting null Components is not a sanitizer
2022-01-14 10:32:37 +01:00
Tony Torralba
a59a4024a5
Update stubs
2022-01-14 10:32:36 +01:00
Tony Torralba
66794665f3
Remove unneeded implicit read step
2022-01-14 10:32:36 +01:00
Tony Torralba
a0a914466c
Rewording
2022-01-14 10:32:33 +01:00
Tony Torralba
9c12c5f8b8
Remove duplicated models
2022-01-14 10:32:01 +01:00
Tony Torralba
f963887c58
Change test to avoid collision with SensitiveCommunication.ql
2022-01-14 10:32:01 +01:00
Tony Torralba
48acff9262
Remove unneeded code
2022-01-14 10:32:00 +01:00
Tony Torralba
9e3594fcf1
Added more sinks
2022-01-14 10:32:00 +01:00
Tony Torralba
1e3e48132c
Rewording
2022-01-14 10:31:59 +01:00
Tony Torralba
47c851efaf
Consider more startService methods
2022-01-14 10:31:59 +01:00
Tony Torralba
12059a8a50
Update models to use synthetic fields
2022-01-14 10:31:58 +01:00
Tony Torralba
d49e52fb73
Add support for PendingIntents in Notifications
2022-01-14 10:31:58 +01:00
Tony Torralba
c73e4ebc48
Remove models after rebase
2022-01-14 10:31:58 +01:00
Tony Torralba
7f85dae63b
Add support for implicit field read flows
2022-01-14 10:31:57 +01:00
Tony Torralba
e58a8587db
Add support for Slices
2022-01-14 10:31:56 +01:00
Tony Torralba
d43242d09e
Added tests
2022-01-14 10:31:56 +01:00
Tony Torralba
d0077b8c12
Added query ImplicitPendingIntents
2022-01-14 10:31:53 +01:00
Mathias Vorreiter Pedersen
68385dfab5
Merge pull request #7386 from github/redsun82/cpp-overrunning-write-precision-split
...
C++: split `cpp/overrunning-write` into two
2022-01-14 09:11:39 +00:00
Tom Hvitved
6c20585fc7
C#: Eliminate bad magic optimization
...
```
[2022-01-14 08:57:14] (253s) Tuple counts for Stmt::getAChild#bbf/3@8dfbc66f after 1m53s:
4922010396 ~5% {3} r1 = JOIN ControlFlowElement::ControlFlowElement::getEnclosingCallable_dispred#ff_10#join_rhs WITH ControlFlowElement::ControlFlowElement::getEnclosingCallable_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'cfe', Rhs.1 'cfe', Lhs.0 'c'
1597068 ~2% {3} r2 = JOIN r1 WITH Element::Element::getAChild_dispred#ff ON FIRST 2 OUTPUT Lhs.0 'cfe', Lhs.2 'c', Lhs.1 'result'
return r2
```
2022-01-14 10:10:23 +01:00
Tom Hvitved
411d2b2876
C#: Update stats
2022-01-14 10:10:23 +01:00
Michael Nebel
f025db0371
C#: Add downgrade script for deleting using_global relation.
2022-01-14 10:10:23 +01:00
Michael Nebel
dcd6a6be40
C#: Add database upgrade script for adding the using_global relation.
2022-01-14 10:10:22 +01:00
Michael Nebel
a1eff1603a
C#: Add test for global using directive.
2022-01-14 10:10:22 +01:00
Michael Nebel
c118d9bf6f
C#: Add support for the global modifier for using directives.
2022-01-14 10:10:22 +01:00
Michael Nebel
e305a8a6c5
C#: Refactor Tuples to use expression body syntax.
2022-01-14 10:10:22 +01:00
Michael Nebel
6e72f6e2c4
C#: Refactor to re-use code to extract modifier tokens.
2022-01-14 10:10:13 +01:00
Edoardo Pirovano
f2818ebb5e
Merge pull request #7489 from edoardopirovano/fix-example
...
Fix example in JavaScript query
2022-01-14 08:58:28 +00:00
Tony Torralba
8f73772955
Merge pull request #7595 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-14 09:32:13 +01:00
Anders Schack-Mulligen
0b24af901d
Merge pull request #7349 from aschackmull/dataflow/state
...
Dataflow: Add support for flow state
2022-01-14 09:12:38 +01:00
github-actions[bot]
685336fa23
Add changed framework coverage reports
2022-01-14 00:10:33 +00:00
Henry Mercer
e9bb9f5294
JS: Update names, IDs, and tags for ML-powered queries
2022-01-13 17:45:40 +00:00
Henry Mercer
8e9d8c112d
JS: Improve comments in FunctionBodyFeatures.qll
2022-01-13 17:20:42 +00:00
Henry Mercer
2aea3257cb
JS: Improve documentation for getTokenizedAstNode
2022-01-13 17:20:41 +00:00
Andrew Eisenberg
4ffd8c62ac
Merge pull request #7579 from github/aeisenberg/changenote-upgrades-removal
...
Changenotes: Add changenotes for upgrades refactoring
2022-01-13 09:09:06 -08:00
Andrew Eisenberg
c6deccf863
Minor fixes to the getting started docs
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-01-13 09:02:10 -08:00
Henry Mercer
92d6fecc73
Optimize performance of body tokens
...
The refactoring to remove the `CodeToFeatures` AST reintroduced a
performance problem. This commit resolves it by pushing size
restrictions into intermediate predicates.
2022-01-13 16:29:04 +00:00
Michael Nebel
71baf32596
Update csharp/ql/consistency-queries/PrimaryQlClass.ql
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2022-01-13 16:36:31 +01:00
Owen Mansel-Chan
d41c55c69c
Add needed predicates for Ruby and C#
...
This was done manually.
2022-01-13 15:10:19 +00:00
Owen Mansel-Chan
2de6340ff5
Sync FlowSummaryImpl.qll
...
Done using sync-files.py
2022-01-13 15:09:25 +00:00
Owen Mansel-Chan
83a25698bb
Allow adding inputs and outputs needing reference
2022-01-13 15:09:17 +00:00
Tony Torralba
b6886b8e43
Move code to qll file
2022-01-13 15:28:57 +01:00
Tony Torralba
81feaaec02
Refactor PathMatchGuard
2022-01-13 15:24:41 +01:00
Anders Schack-Mulligen
c44cf29992
Merge pull request #7587 from owen-mc/add-default-taint-sanitizer-guard
...
Dataflow: Add default taint sanitizer guard
2022-01-13 14:44:55 +01:00
Tony Torralba
cd9a485c47
Refactor NullOrEmptyCheckGuard
2022-01-13 14:44:08 +01:00
Anders Schack-Mulligen
61490e74d8
Merge pull request #7561 from aschackmull/java/misc-perf
...
Java: A few perf fixes for getASupertype*().
2022-01-13 14:43:28 +01:00
Mathias Vorreiter Pedersen
6148af4621
C++: Fix join order in 'getConversionType4'.
2022-01-13 13:28:36 +00:00
Anders Schack-Mulligen
f7cf327e71
Dataflow: Sync
2022-01-13 13:28:43 +01:00
Anders Schack-Mulligen
a34c981209
Dataflow: Address comments.
2022-01-13 13:28:24 +01:00
Anders Schack-Mulligen
69973dadb3
Merge pull request #7548 from zbazztian/spring-taint-summaries
...
Java: Add Spring and Apache Common Langs taint flow steps
2022-01-13 13:00:41 +01:00
Paolo Tranquilli
e6763c858d
C++: add bindingset to private Printf predicate
...
That predicate turned out to create a lot of tuples, of which only a
minimal part was then used in the query.
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
64d15d6226
C++: fix inc.qhelp files and change notes
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
7b4300e4cf
C++: Apply suggestions in documentation
...
Co-authored-by: Sarah Edwards <skedwards88@github.com >
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
9d49ad9f20
C++: use includes in OverrunWrite qhelp files
...
Also added the relevant CERT C _and_ C++ standard references where they
were missing, and did some minor stylistic tweaks to
`OverrunWriteFloat.qhelp`.
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
c117a1e21f
C++: demote VeryLikelyOverrunWrite cast results
...
There were some false positives where something like
int x;
// ...
sprintf(buff, "%ld", (long)x);
was considered as if the parameter had a non-trivial range analysis only
because the range of `int` is smaller than the range for `long`, without
any non-trivial range analysis actually done on `x`.
These will now be reported by `OverrunWrite` instead.
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
630982cc31
C++: auto format Printf.qll
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
9f811b2439
C++: remove unused variables and fix tests
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
013216d5e6
C++: exclude widening from VeryLikelyOverrunWrite
...
This also restrict what we consider "non-trivial" range analysis, as we
now require both ends to be non-trivially bounded for signed integers.
This avoids false positives stemming from a non trivial upper bound but
no meaningful lower bound, for example.
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
aac029841a
C++: doc fixes to VeryLikelyOverrunWrite
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
c8741f6475
C++: update 2021-12-14-overruning-write-split.md
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
1e4861a944
C++: shorten VeryLikelyOverrunWrite @name
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
106400238a
C++: tweak overrunning write qhelp files
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
8ac34f3db5
C++: NoSpecifiedEstimateReason→Unspecified...
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
4a85b9b0cc
C++: add VeryLikelyOverrunWrite.ql to cwe-120
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
97f1a5bac0
C++: add VeryLikelyOverrunWrite.qhelp
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
10b62154a1
C++: add cpp/very-likely-overruning-write help
...
Also update the help of `cpp/overruning-write`, as the case shown there
will actually not be flagged by that query any more.
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
b979f02e5d
C++: fix OverrunWrite for backward compatibility
...
Rather than testing for `TypeBoundsAnalysis`, we test that the reason is
not `ValueFlowAnalysis` (which is reported by the new
`cpp/very-likely-overruning-write` query), so that if a client has
overridden `BufferWrite::getMaxData` the `NoSpecifiedEstimateReason` is
taken into account.
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
db6214fdff
C++: add change note for new overrun write query
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
a0059202db
C++: split cpp/overrunning-write into two
...
This splits the `cpp/overruning-write` into two separate queries based
off on the reason for the estimation. If the overrun is detected based
on non-trivial range analysis, the results are now marked by the new
`cpp/very-likely-overruning-write` high precision query. If it is based
on less precise, usually type based bounds, then it will still be marked
by `cpp/overruning-write` which remains at medium precision.
2022-01-13 11:59:47 +00:00
Michael Nebel
85fc127c0a
C#: Fix BDD limit issue (thank you @jbj).
2022-01-13 12:46:56 +01:00
Owen Mansel-Chan
7e42ccfbf1
Don't cache defaultTaintSanitizerGuard for java
2022-01-13 11:36:20 +00:00
Michael Nebel
7c11e2d7e9
C#: Add a consistency test for getAPrimaryQlClass
2022-01-13 12:20:42 +01:00
Michael Nebel
6b937a939b
C#: Add getAPrimaryQlClass overrides
2022-01-13 12:20:41 +01:00
Stephan Brandauer
40ad88ba53
Merge pull request #7474 from kaeluka/db-reads-as-taint-sources
...
JS: DB reads as taint sources
2022-01-13 12:06:48 +01:00
Michael Nebel
8583a4ffea
Merge pull request #7583 from michaelnebel/csharp/fix-broken-test
...
C#: Narrow string interpolation expressions to a specific single file in testcase.
2022-01-13 11:37:52 +01:00
Erik Krogh Kristensen
89bab6ae12
Merge pull request #7097 from erik-krogh/railsReDoS
...
JS/PY/RB: support a limited number of ranges for ReDoS analysis
2022-01-13 11:04:36 +01:00
Stephan Brandauer
93507a2d71
combine two implementations for database-accesses as remote flow sources
2022-01-13 10:53:58 +01:00
Michael Nebel
aacb03a74b
C#: Narrow string interpolation expressions to a specific single file in testcase.
2022-01-13 10:25:33 +01:00
Stephan Brandauer
63aaf24063
base implementation of Sequelize model on models-as-data
2022-01-13 09:41:25 +01:00
Anders Schack-Mulligen
da69886777
Merge pull request #7580 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-13 09:26:00 +01:00
Sebastian Bauersfeld
a6e4f29560
Java: Use the interface instead of the abstract class
2022-01-13 14:13:36 +07:00
Sebastian Bauersfeld
69f329ffec
Java: Add test cases for AbstractMessageSource.getMessage() methods
2022-01-13 14:13:27 +07:00
Sebastian Bauersfeld
39b6678b7d
Java: Add test case for StringEscapeUtils.escapeJson() taint step.
2022-01-13 11:18:37 +07:00
github-actions[bot]
625836a3be
Add changed framework coverage reports
2022-01-13 00:11:30 +00:00
Andrew Eisenberg
e435a3e9c3
Changenotes: Add changenotes for upgrades refactoring
2022-01-12 11:36:31 -08:00
Henry Mercer
1c3c9216f5
Merge pull request #7576 from github/henrymercer/js-bump-atm-versions
...
JS: Bump ATM pack versions to 0.0.4
2022-01-12 16:53:10 +00:00
Stephan Brandauer
09a28c428c
base implementation of Spanner model on models-as-data
2022-01-12 17:07:16 +01:00
Henry Mercer
9abc3411a4
JS: Bump ATM pack versions to 0.0.4
2022-01-12 15:19:13 +00:00
Robert Marsh
5031d6c4a3
Merge pull request #7566 from MathiasVP/smaller-join-in-reachesRefParameter
...
C++: Smaller join in `reachesRefParameter`
2022-01-12 10:04:35 -05:00
Owen Mansel-Chan
8e8278764b
Add predicate defaultTaintSanitizerGuard for each language
...
This was done manually, as these files are not synced by sync-files.py.
2022-01-12 14:44:56 +00:00
Owen Mansel-Chan
c112980b81
Sync TaintTrackingImpl.qll
...
Done automatically using sync-files.py
2022-01-12 14:44:55 +00:00
Owen Mansel-Chan
9ec3d7787c
Add option for default taint sanitizer guard
...
This allows languages to specify A sanitizer guard in all
global taint flow configurations but not in local taint.
2022-01-12 14:44:55 +00:00
github-actions[bot]
8a2d92badc
Post-release preparation for codeql-cli-2.7.5
2022-01-12 13:28:43 +00:00
Henry Mercer
7f61738a23
Use US English spelling
2022-01-12 13:07:09 +00:00
Henry Mercer
6e37a65e84
Remove CodeToFeatures AST library
2022-01-12 12:47:28 +00:00
Henry Mercer
957e34d8a7
Make function body features library independent of CodeToFeatures AST
2022-01-12 12:47:28 +00:00
Henry Mercer
9e50ce873d
Move function body features into their own file
2022-01-12 12:47:28 +00:00
Henry Mercer
865fb5d0ef
Migrate representative entity -> representative function
2022-01-12 12:47:27 +00:00
Henry Mercer
0e5b493d0e
Remove CodeToFeatures AST consistency checks
...
We no longer use the `CodeToFeatures` AST, therefore these checks are
defunct.
2022-01-12 12:47:27 +00:00
Henry Mercer
387829bbb4
Extract body tokens from the JS AST, not the CodeToFeatures AST
2022-01-12 12:47:25 +00:00
Henry Mercer
3ef69763a7
Merge pull request #7567 from github/henrymercer/atm-body-tokens-perf-opt
...
ATM: Optimize body tokens by pushing in size restriction
2022-01-12 12:45:27 +00:00
Tamás Vajk
9065a7f320
Merge pull request #7573 from tamasvajk/fix/java-field-decl-tostr
...
Java: Fix toString on field declarations with single field
2022-01-12 13:03:16 +01:00
Tony Torralba
8a80e02861
Merge pull request #7574 from pwntester/improve_strings_qll
...
Add models for AbstractStringBuilder.substring,subsequence,getChars
2022-01-12 12:01:28 +01:00
Tony Torralba
c2105e506b
Added test cases
2022-01-12 11:06:58 +01:00
Alvaro Muñoz Sanchez
715d372572
Add models for AbstractStringBuilder.substring,subsequence,getChars
2022-01-12 10:54:27 +01:00
Anders Schack-Mulligen
c6a9b2b6ff
Merge pull request #7572 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-12 09:39:14 +01:00
Mathias Vorreiter Pedersen
9e51908b02
Merge pull request #7551 from MathiasVP/fix-join-orders-in-unsigned-difference-expr-query
...
C++: Fix join orders in `cpp/unsigned-difference-expression-compared-zero`
2022-01-12 08:29:03 +00:00
Tamas Vajk
b9e0310aa2
Java: Fix toString on field declarations with single field
2022-01-12 09:22:16 +01:00
Michael Nebel
f17c110f51
Merge pull request #7562 from michaelnebel/csharp/record-seal-tostring
...
C#: Record types are allowed to seal ToString (test only).
2022-01-12 08:08:32 +01:00
luchua-bc
263dbd33f6
Optimize the query
2022-01-12 02:33:17 +00:00
github-actions[bot]
c79e8ab440
Add changed framework coverage reports
2022-01-12 00:10:48 +00:00
Andrew Eisenberg
e4eb2c2a59
Update docs on the output of resolve qlpacks
...
The output has changed and there are no more upgrades
packs. There are also other changes included here.
2022-01-11 15:54:53 -08:00
Andrew Eisenberg
da4f1d86aa
Merge pull request #7355 from github/aeisenberg/remove-upgrades
...
Move upgrades into standard library packs
2022-01-11 14:09:10 -08:00
Andrew Eisenberg
07228672df
Merge branch 'main' into aeisenberg/remove-upgrades
2022-01-11 11:25:27 -08:00
Mathias Vorreiter Pedersen
c45127fdd6
Merge pull request #7541 from github/rdmarsh2/dataflow-ipa-params
...
C++: Use an IPA type rather than negative indexes for argument/parameter matching in data flow
2022-01-11 16:52:13 +00:00
Tony Torralba
7b0d9ea525
Merge pull request #7054 from atorralba/atorralba/promote-log-injection
...
Java: Promote Log Injection from experimental
2022-01-11 17:26:18 +01:00
Henry Mercer
3f70476c87
ATM: Optimize body tokens by pushing in size limit
...
Pushing the restriction to 256 tokens into the `bodyTokens` predicate
means we avoid this predicate blowing up due to very large functions.
This results in a runtime improvement from 1800s+ to 294s as measured
on a problematic repo on my machine (I didn't wait for the query to
finish running).
2022-01-11 16:16:54 +00:00
Tony Torralba
1030ff7063
Update java/ql/src/Security/CWE/CWE-117/LogInjection.ql
2022-01-11 16:25:32 +01:00
Tony Torralba
4aacba8594
Merge pull request #6468 from atorralba/atorralba/promote-cleartext-sharedprefs
...
Java: Promote Cleartext storage of sensitive information using SharedPreferences from experimental
2022-01-11 16:23:53 +01:00
Tony Torralba
394c4a9ee0
Remove unused code
2022-01-11 14:50:48 +01:00
Mathias Vorreiter Pedersen
b3a7090068
C++: Fix join in reachesRefParameter by joining with 'getEnd' instead
...
of 'getANode'.
Before:
Tuple counts for FlowVar::FlowVar::reachesRefParameter_dispred#ff/2@956ac39i after 229ms:
24806 ~1% {2} r1 = JOIN FlowVar::FlowVar_internal::parameterIsNonConstReference#f WITH Parameter::Parameter::getFunction_dispred#ff ON FIRST 1 OUTPUT Lhs.0 'p', Rhs.1
56985 ~3% {3} r2 = JOIN r1 WITH num#FlowVar::FlowVar_internal::TBlockVar#fff_12#join_rhs ON FIRST 1 OUTPUT Rhs.1 'this', Lhs.0 'p', Lhs.1
2384489 ~4% {4} r3 = JOIN r2 WITH FlowVar::FlowVar_internal::getAReachedBlockVarSBB#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1 'p', Lhs.0 'this'
49457 ~0% {2} r4 = JOIN r3 WITH SubBasicBlocks::SubBasicBlock::getANode_dispred#fb ON FIRST 2 OUTPUT Lhs.3 'this', Lhs.2 'p'
return r4
After:
Tuple counts for FlowVar::FlowVar::reachesRefParameter_dispred#ff/2@46f8bfn7 after 32ms:
24806 ~1% {2} r1 = JOIN FlowVar::FlowVar_internal::parameterIsNonConstReference#f WITH Parameter::Parameter::getFunction_dispred#ff ON FIRST 1 OUTPUT Lhs.0 'p', Rhs.1
56985 ~1% {3} r2 = JOIN r1 WITH num#FlowVar::FlowVar_internal::TBlockVar#fff_12#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'p', Rhs.1 'this'
56985 ~1% {3} r3 = JOIN r2 WITH SubBasicBlocks::SubBasicBlock::getEnd_dispred#fb_10#join_rhs ON FIRST 1 OUTPUT Lhs.2 'this', Rhs.1, Lhs.1 'p'
49457 ~0% {2} r4 = JOIN r3 WITH FlowVar::FlowVar_internal::getAReachedBlockVarSBB#ff ON FIRST 2 OUTPUT Lhs.0 'this', Lhs.2 'p'
return r4
2022-01-11 13:48:20 +00:00
Michael Nebel
77763d7ee5
Merge pull request #7559 from michaelnebel/csharp/const-interpolatedstring
...
C#: Constant string interpolation (test only).
2022-01-11 14:01:55 +01:00
Michael Nebel
56bc3db46a
C#: Add test case for sealed ToString modifier on a record type.
2022-01-11 13:58:43 +01:00
Michael Nebel
ae5d3a1ccb
C#: Add example of sealing ToString on a record type.
2022-01-11 13:57:29 +01:00
Anders Schack-Mulligen
fdb4851521
Java: A few perf fixes for getASupertype*().
2022-01-11 13:33:54 +01:00
Tony Torralba
50caf7d8dc
Move change note to new location and remove import
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-01-11 12:24:44 +01:00
Tony Torralba
b9e32208ee
Move change note to new location
2022-01-11 12:23:16 +01:00
Michael Nebel
1d8f8f79bb
C#: Add const interpolated string test case.
2022-01-11 12:02:07 +01:00
Michael Nebel
5b89f0e0b8
C#: Add example of const interpolated string.
2022-01-11 12:01:40 +01:00
Stephan Brandauer
132e0bf4b7
add database accesses as additional (heuristic) remote flow sources
2022-01-11 11:38:41 +01:00
Sebastian Bauersfeld
e2a9ced691
Java: Pass taint through Apache's StringEscapeUtils.escapeJson() method.
2022-01-11 15:49:44 +07:00
Sebastian Bauersfeld
f36ee95128
Java: Pass taint through Spring's AbstractMessageSource.getMessage() methods.
2022-01-11 15:48:29 +07:00
Anders Schack-Mulligen
2a36744deb
Merge pull request #7552 from smowton/smowton/fix/local-parameterized-classes
...
Note that parameterizations of local classes are themselves local
2022-01-11 09:36:15 +01:00
Alex Ford
b9ed8ed416
Merge pull request #7553 from github/revert-7498-dependabot/cargo/ruby/generator/clap-3.0
...
Ruby: Revert "Update clap requirement from 2.33 to 3.0 in /ruby/generator"
2022-01-10 19:36:40 +00:00
Alex Ford
17e5b9cffa
Revert "Update clap requirement from 2.33 to 3.0 in /ruby/generator"
2022-01-10 18:21:04 +00:00
Chris Smowton
e352a4b994
Note that parameterizations of local classes are themselves local
...
Previously `LocalClass` itself would match `.isLocal()` whereas `LocalClass<Param>` would not. Rather than require each individual user to check for `.getSourceDeclaration().isLocal()`, let's note that the specializations themselves are local.
2022-01-10 18:19:31 +00:00
Robert Marsh
fe355a0bc9
C++: update test comments
2022-01-10 12:38:08 -05:00
Mathias Vorreiter Pedersen
2a02ce137a
C++: Fix join orders in 'exprIsSubLeftOrLess'.
...
Before:
Tuple counts for UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff/2@i3#a5071w3a after 24s:
304220 ~2% {2} r1 = JOIN UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff#prev_delta WITH Expr::BinaryOperation#class#f#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.0 'sub'
190061335 ~24% {2} r2 = JOIN r1 WITH DataFlowUtil::localFlowStep#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
3956 ~0% {2} r3 = JOIN r1 WITH DataFlowUtil::localFlowStep#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
407983 ~1% {2} r4 = JOIN Expr::BinaryOperation#class#f#join_rhs WITH UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff#prev ON FIRST 1 OUTPUT Rhs.1 'n', Lhs.0 'sub'
380823 ~0% {2} r5 = JOIN r4 WITH DataFlowUtil::TExprNode#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1
0 ~0% {2} r6 = JOIN r5 WITH UnsignedDifferenceExpressionComparedZero::isGuarded#fff#prev_delta ON FIRST 2 OUTPUT Rhs.2, Lhs.0 'sub'
0 ~0% {2} r7 = JOIN r6 WITH DataFlowUtil::TExprNode#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
3956 ~0% {2} r8 = r3 UNION r7
190065291 ~24% {2} r9 = r2 UNION r8
...
After:
Tuple counts for UnsignedDifferenceExpressionComparedZero::interestingSubExpr#f/1@654e29g3 after 228ms:
370 ~2% {2} r1 = ComparisonOperation::RelationalOperation::getGreaterOperand_dispred#fb AND NOT Exclusions::isFromMacroDefinition#b(Lhs.1 'sub')
370 ~0% {2} r2 = SCAN r1 OUTPUT In.1 'sub', In.0
370 ~3% {3} r3 = JOIN r2 WITH Expr::Expr::getFullyConverted_dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0 'sub'
210 ~1% {2} r4 = JOIN r3 WITH SimpleRangeAnalysis::SimpleRangeAnalysisCached::exprMightOverflowNegatively#f ON FIRST 1 OUTPUT Lhs.2 'sub', Lhs.1
210 ~0% {3} r5 = JOIN r4 WITH Expr::Expr::getFullyConverted_dispred#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'sub', Rhs.1
210 ~1% {3} r6 = JOIN r5 WITH ComparisonOperation::RelationalOperation::getLesserOperand_dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'sub', Lhs.2
59 ~2% {4} r7 = JOIN r6 WITH Expr::Expr::getValue_dispred#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Lhs.2, Rhs.1, toInt(Rhs.1)
17 ~0% {4} r8 = SELECT r7 ON In.3 = 0
17 ~0% {2} r9 = SCAN r8 OUTPUT In.1, In.0 'sub'
8 ~0% {2} r10 = JOIN r9 WITH Expr::Expr::getUnspecifiedType_dispred#bb ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'sub'
8 ~0% {1} r11 = JOIN r10 WITH Type::IntegralType::isUnsigned_dispred#f ON FIRST 1 OUTPUT Lhs.1 'sub'
return r11
Tuple counts for UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff/2@i2#61800weu after 1ms:
8 ~0% {2} r1 = JOIN UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff#prev_delta WITH UnsignedDifferenceExpressionComparedZero::interestingSubExpr#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'sub'
0 ~0% {2} r2 = JOIN r1 WITH DataFlowUtil::localFlowStep#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
1 ~0% {2} r3 = JOIN r1 WITH DataFlowUtil::localFlowStep#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
0 ~0% {3} r4 = JOIN UnsignedDifferenceExpressionComparedZero::isGuarded#fff#prev_delta WITH UnsignedDifferenceExpressionComparedZero::interestingSubExpr#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'sub', Lhs.2
0 ~0% {3} r5 = JOIN r4 WITH DataFlowUtil::TExprNode#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n', Lhs.2
0 ~0% {2} r6 = JOIN r5 WITH UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff#prev ON FIRST 2 OUTPUT Lhs.2, Lhs.0 'sub'
0 ~0% {2} r7 = JOIN r6 WITH DataFlowUtil::TExprNode#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
1 ~0% {2} r8 = r3 UNION r7
1 ~0% {2} r9 = r2 UNION r8
...
2022-01-10 17:28:14 +00:00
Mathias Vorreiter Pedersen
f2d6bcd767
C++: Fix join order in 'isGuarded'.
...
Before:
Tuple counts for UnsignedDifferenceExpressionComparedZero::isGuarded#bff/3@ec24001m after 1.7s:
97431 ~0% {2} r1 = JOIN UnsignedDifferenceExpressionComparedZero::isGuarded#bff#join_rhs WITH project#BasicBlocks::Cached::basic_block_member ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'sub'
11809769 ~1% {2} r2 = JOIN r1 WITH Guards::GuardCondition::controls_dispred#fff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1
11809769 ~0% {4} r3 = JOIN r2 WITH project#BasicBlocks::Cached::basic_block_member ON FIRST 1 OUTPUT Lhs.1, Rhs.1, false, Lhs.0 'sub'
629277 ~4% {7} r4 = JOIN r3 WITH Guards::GuardCondition::ensuresLt_dispred#ffffff_045123#join_rhs ON FIRST 3 OUTPUT Lhs.3 'sub', Lhs.0, Lhs.1, false, Rhs.3 'left', Rhs.4 'right', Rhs.5
628120 ~4% {7} r5 = SELECT r4 ON In.6 >= 0
628120 ~1% {3} r6 = SCAN r5 OUTPUT In.0 'sub', In.4 'left', In.5 'right'
return r6
After:
Tuple counts for UnsignedDifferenceExpressionComparedZero::isGuarded#fff/3@i2#a5071x3a after 392ms:
103763 ~0% {2} r1 = SCAN UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff#prev_delta OUTPUT In.0 'sub', 26
103763 ~0% {1} r2 = JOIN r1 WITH exprs ON FIRST 2 OUTPUT Lhs.0 'sub'
97431 ~0% {3} r3 = JOIN r2 WITH project#BasicBlocks::Cached::basic_block_member ON FIRST 1 OUTPUT Rhs.1, false, Lhs.0 'sub'
629277 ~0% {7} r4 = JOIN r3 WITH Guards::GuardCondition::ensuresLt_dispred#ffffff_450123#join_rhs ON FIRST 2 OUTPUT Lhs.2 'sub', Lhs.0, false, Rhs.2, Rhs.3 'left', Rhs.4 'right', Rhs.5
628120 ~0% {7} r5 = SELECT r4 ON In.6 >= 0
628120 ~1% {6} r6 = SCAN r5 OUTPUT In.0 'sub', In.1, In.3, In.4 'left', In.5 'right', In.6
628120 ~1% {6} r7 = r6 AND NOT UnsignedDifferenceExpressionComparedZero::isGuarded#fff#prev(Lhs.0 'sub', Lhs.3 'left', Lhs.4 'right')
628120 ~0% {5} r8 = SCAN r7 OUTPUT In.2, In.1, In.0 'sub', In.3 'left', In.4 'right'
628120 ~1% {3} r9 = JOIN r8 WITH Guards::GuardCondition::controls_dispred#fff ON FIRST 2 OUTPUT Lhs.2 'sub', Lhs.3 'left', Lhs.4 'right'
return r9
2022-01-10 17:03:40 +00:00
Tony Torralba
fbebf5e953
Move change note to new location
2022-01-10 17:27:02 +01:00
Tony Torralba
0e738622df
Merge branch 'main' into atorralba/promote-log-injection
2022-01-10 17:24:25 +01:00
Tony Torralba
cc92ce2754
Fix QLDoc
2022-01-10 17:13:13 +01:00
Tony Torralba
e1e5e78464
Apply suggestions from code review
...
- Update CleartextStorage library to latest refactor
- Move change note to new location
2022-01-10 17:10:55 +01:00
Tony Torralba
d17e973b6b
Apply suggestions from code review
...
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com >
2022-01-10 17:09:41 +01:00
Tony Torralba
ec8c234872
Fix predicate name
2022-01-10 17:09:41 +01:00
Tony Torralba
55dc783f28
Move from experimental and refactor
2022-01-10 17:09:37 +01:00
CodeQL CI
d912a98b02
Merge pull request #7171 from asgerf/js/mad
...
Approved by erik-krogh
2022-01-10 13:17:09 +00:00
Anders Schack-Mulligen
f590d2566e
DataFlow: Fix test.
2022-01-10 11:25:52 +01:00
Anders Schack-Mulligen
c8a6798c05
Ruby: Workaround for optimiser problem.
...
A size 1 DataFlowType causes misoptimisations.
2022-01-10 11:21:18 +01:00
Tom Hvitved
d2ebbe0819
Merge pull request #7469 from hvitved/csharp/promote-adhoc-consistency-checks
...
C#: Promote existing ad-hoc consistency checks to consistency queries
2022-01-10 11:10:25 +01:00
Michael Nebel
533fc7a912
Merge pull request #7532 from michaelnebel/csharp/file-scoped-namespace
...
C#: Make support for file scoped namespace declarations.
2022-01-10 09:02:18 +01:00
Mathias Vorreiter Pedersen
a5ccd6a23b
Merge pull request #7521 from rdmarsh2/rdmarsh2/cpp/use-guards-in-overflow
2022-01-09 14:09:04 +00:00
Robert Marsh
67fb48fcc1
C++: use range analysis for hex format lengths
...
The "new" result on line 189 is a tighter bound than was previously
established, not a newly introduced location.
2022-01-07 16:16:22 -05:00
Robert Marsh
fa9242befe
C++: Add tests for bounded hex format values
2022-01-07 16:08:53 -05:00
Robert Marsh
673399719e
C++: autoformat DataFlowPrivate
2022-01-07 15:23:24 -05:00
Felicity Chapman
3b0d55e2f9
Merge pull request #5893 from niroshan/patch-1
...
Update README.md
2022-01-07 19:33:41 +00:00
Robert Marsh
78b8d113bb
C++: PR comments on DataFlow Position
2022-01-07 14:21:56 -05:00
Robert Marsh
4322a39807
C++: fix typo in Overflow.qll abs handling
2022-01-07 14:09:47 -05:00
Erik Krogh Kristensen
cc5e9fea77
add test
2022-01-07 18:44:04 +01:00
Erik Krogh Kristensen
f7a63d5ea0
remove duplicated line
2022-01-07 18:38:02 +01:00
Erik Krogh Kristensen
c8d29a9cf1
sync files
2022-01-07 18:38:02 +01:00
Erik Krogh Kristensen
1a8b6d7414
recognize ranges without upper bounds
2022-01-07 18:38:01 +01:00
Erik Krogh Kristensen
acaf294bee
support a limited number of regexp ranges
2022-01-07 18:36:30 +01:00
Robert Marsh
a126154dfb
C++: use -1 for this in dataflow Position
2022-01-07 11:39:26 -05:00
Robert Marsh
1890a14026
C++: IPA for pointer arg instead of negative index
...
This takes advantage of the new ArgumentPosition and ParameterPosition
types in the shared DataFlow library interface to represent indirections
with an IPA type rather than the negative-index system in use previously
2022-01-07 11:39:26 -05:00
Robert Marsh
4f23cce63b
C++: Accept more test output
2022-01-07 11:27:45 -05:00
Michael Nebel
23b8444348
C#: Cleanup C# source code file and add a test case for namespace delcarations.
2022-01-07 16:04:43 +01:00
Michael Nebel
b8f6d17bc1
C#: Add test for file scoped namespace.
2022-01-07 16:04:43 +01:00
Michael Nebel
a6d847b532
C#: Make support for FileScoped namespace declaration in the extrator.
2022-01-07 16:04:43 +01:00
Erik Krogh Kristensen
bb94c42a35
explicit this
...
Co-authored-by: Taus <tausbn@github.com >
2022-01-07 15:22:21 +01:00
Mathias Vorreiter Pedersen
4ee653378e
Merge pull request #7517 from MathiasVP/avoid-self-joins-in-toctou-query
...
C++: Remove bad self joins in `cpp/toctou-race-condition`.
2022-01-07 13:08:30 +00:00
Michael Nebel
94c1a489e0
Merge pull request #7507 from michaelnebel/csharp-libdataflow-cleanup
...
C#: Refactor and cleanup LibraryTypeDataFlow
2022-01-07 13:16:08 +01:00
Michael Nebel
17219eff61
Merge pull request #7530 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-07 13:15:49 +01:00
Michael Nebel
929f6ca578
C#: Address review comments.
2022-01-07 10:26:33 +01:00
Michael Nebel
d3368dcc23
C#: Remove the LibraryTypeDataFlow file as the remaining code is dead.
2022-01-07 10:26:32 +01:00
Michael Nebel
9b47249f6a
C#: Migrate the legacy clearContent flow summaries to the new framework.
2022-01-07 10:26:32 +01:00
Michael Nebel
fd317c2e7b
C#: Move RecordConstructorFlow.
2022-01-07 10:26:32 +01:00
Michael Nebel
fb950848c7
C#: Remove unused case, when converting SummaryComponent stacks.
2022-01-07 10:26:32 +01:00
Michael Nebel
5a0e6ed8e6
C#: Remove unsued predicates in CallableFlowSource and subclasses.
2022-01-07 10:26:32 +01:00
Michael Nebel
19914aba89
C#: Remove CallableFlowSink.
2022-01-07 10:26:32 +01:00
Michael Nebel
ed4d09bc8b
C#: Remove unneeded imports.
2022-01-07 10:26:32 +01:00
Michael Nebel
d042c4b3e4
C#: Remove unsused type,class and module AccessPath.
2022-01-07 10:26:32 +01:00
Michael Nebel
d5768bf4ed
C#: Remove more empty predicates.
2022-01-07 10:26:31 +01:00
Michael Nebel
a6b79926b2
C#: Remove unused predicate toCallableFlowSink.
2022-01-07 10:26:31 +01:00
Michael Nebel
ecc9593f00
C#: Remove the unused predicate callable flow.
2022-01-07 10:26:31 +01:00
Michael Nebel
c52787c741
C#: Move the declaration of synthetic fields to where they are needed.
2022-01-07 10:26:31 +01:00
Michael Nebel
608aba7cff
C#: Delete empty predicate requiresAccessPath.
2022-01-07 10:26:31 +01:00
Felicity Chapman
ad82523b91
Apply suggestions from code review
2022-01-07 08:49:37 +00:00
Felicity Chapman
95c9f89b04
Merge branch 'main' into patch-1
2022-01-07 08:49:13 +00:00
github-actions[bot]
efb1cd4f3b
Add changed framework coverage reports
2022-01-07 00:10:30 +00:00
Erik Krogh Kristensen
9afd360731
QL: recognize dependecies of the form: libraryPathDependencies: library-name
2022-01-06 23:35:28 +01:00
Robert Marsh
c6da1f2be0
C++: re-add comment
2022-01-06 12:43:22 -05:00
Robert Marsh
355fc0ae63
C++: Use Guards library in Overflow.qll
...
Replaces the ad-hoc guard handling with the Guards library. Fixes an
observed false positive pattern, and (hopefully) means some pragmas are
no longer necessary for performance.
2022-01-06 12:15:37 -05:00
Robert Marsh
617bdbc5ba
C++: test for guard-by-return in Overflow.qll
2022-01-06 12:15:37 -05:00
Robert Marsh
d5682f157a
Merge pull request #7525 from MathiasVP/remove-rank-in-ssa-internals
...
C++: Remove `rank` aggregate in `SsaInternals`
2022-01-06 12:09:57 -05:00
Andrew Eisenberg
6d62227576
Merge pull request #7431 from aeisenberg/aeisenberg/solorigate-publish
...
Solorigate: Extract to separate qlpack
2022-01-06 08:53:32 -08:00
Mathias Vorreiter Pedersen
173cefd7e4
C++: Respond to PR reviews.
2022-01-06 15:39:40 +00:00
haby0
759ec31508
Delete shutil_path_injection.py file
2022-01-06 21:38:35 +08:00
Michael Nebel
b3cb250ece
Merge pull request #7516 from michaelnebel/csharp/improve-csv-validation
...
C#: Introduce Csv validation on kind.
2022-01-06 14:31:26 +01:00
Michael Nebel
9cafab1b4c
Merge pull request #7465 from michaelnebel/csharp-stringvalues-csv
...
C#: Introduce flow summaries for StringValues.
2022-01-06 14:30:29 +01:00
Rasmus Wriedt Larsen
3e1dcc3d11
Merge pull request #7518 from tausbn/python-extend-unreachable-statement-test
...
Python: Extend unreachable statement test
2022-01-06 14:07:29 +01:00
Mathias Vorreiter Pedersen
671954025d
C++: Fix qldoc.
2022-01-06 11:02:15 +00:00
Asger F
c9fcdb8261
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-01-06 11:51:27 +01:00
Mathias Vorreiter Pedersen
2f42054f8f
C++: Rename 'hasRankInBlock' to 'hasIndexInBlock' since it's not really a rank computation anymore.
2022-01-06 10:31:05 +00:00
Mathias Vorreiter Pedersen
fdb9fb588c
C++: Remove the rank aggregate from 'SsaInternals.qll'.
2022-01-06 10:30:31 +00:00
haby0
05b0daa0b7
Add the test of shutil module in FileSystemAccess.py
2022-01-06 14:14:42 +08:00
Harry Maclean
43ddc54f2b
Ruby: Add Module#const_get as a code execution
...
Module#const_get takes a single string argument and interprets it as the
name of a constant. It then looks up the constant and returns its value.
Object.const_get("Math::PI")
# => 3.141592653589793
By itself, this method is not as dangerous as e.g. eval, but if the
value returned is a class that is then instantiated, this can allow an
attacker to instantiate arbitrary Ruby classes.
As a result, I think it's safe to say that any remote input flowing into
this call is a potential vulnerability. A real-world example of this is
https://github.com/advisories/GHSA-52p9-v744-mwjj .
2022-01-06 13:03:41 +13:00
Tom Hvitved
ac9cac78bc
Ruby: Fix typo
2022-01-06 12:27:03 +13:00
Tom Hvitved
c3fd272f9b
Ruby: Simplify getValueText logic for StringlikeLiterals
2022-01-06 12:27:03 +13:00
Tom Hvitved
799ec23b0d
Ruby: Generalize ExprChildMapping logic to AstNodes
2022-01-06 12:27:03 +13:00
Tom Hvitved
322f8356dd
Ruby: Include StringComponents in the CFG
2022-01-06 12:27:03 +13:00
Tom Hvitved
301d0bbdf8
Ruby: Restructure test to avoid dead code
2022-01-06 12:27:03 +13:00
Harry Maclean
23f1352953
Add ReDoS test that uses string interpolation
...
This exercises the support for resolving string interpolations, and is
based on a real vulnerability:
https://github.com/advisories/GHSA-jxhc-q857-3j6g )
2022-01-06 12:27:03 +13:00
Harry Maclean
32c93e70e2
Include simple interpolations in getValueText
...
When calculating `StringlikeLiteral.getValueText`, include results from
interpolations where we can determine their string value. For example:
b = "b" # local variable
D = "d" # constant
"a#{b}c" # getValueText() = "abc"
"a#{b}c{D}" # getValueText() = "abcd"
/#a#{b}c{D}/ # getValueText() = "abcd"
2022-01-06 12:27:03 +13:00
Harry Maclean
3df3fb092b
Make room for new test code
...
This change is split over several commits so it is easier to see.
This change adds some extra lines, which will be populated in the next
commit.
2022-01-06 12:26:51 +13:00
Harry Maclean
b4b91e84a3
Ruby: Fix ConstantAccessCfgNode.getValueText
...
The superclass definition uses SSA, which doesn't track constants.
2022-01-06 12:25:19 +13:00
Andrew Eisenberg
0a2f23f6f9
Update pack references in solorigate tests
2022-01-05 10:37:15 -08:00
Taus
ea538a1ee8
Merge pull request #7416 from github/not-that-kind-of-experimental
...
Remove experimental tag from non-ATM queries
2022-01-05 18:08:15 +01:00
Taus
5d4db3af15
Python: Extend unreachable statement test
...
Adds a test demostrating the false positive observed by andersfugmann.
Note that this does not change the `.expected` file, and so the tests
will fail. This is expected.
2022-01-05 16:45:38 +00:00
Michael Nebel
53000cf9f0
C#: Update the XSS expected file.
2022-01-05 16:44:03 +01:00
Michael Nebel
7e6d88d959
C#: Only use stubs for XSS test.
2022-01-05 16:44:03 +01:00
Michael Nebel
24543a2245
C#: Update the UrlRedirect expected file.
2022-01-05 16:44:03 +01:00
Michael Nebel
47ab2061d8
C#: Replace StringValues stub from stubs.cs with the stub in Microsoft.Extensions.Primitives.
2022-01-05 16:44:03 +01:00
Michael Nebel
b3f3c2de24
C#: Convert and cleanup flow summaries for Microsoft.Extensions.Primitives.StringValues.
2022-01-05 16:41:30 +01:00
Michael Nebel
48651a6113
C#: Update flow summaries for StringValues.
2022-01-05 16:41:30 +01:00
Michael Nebel
c36bf3cebc
C#: Reduce the amount of trash flow summaries produced for StringValues.
2022-01-05 16:41:30 +01:00
Michael Nebel
9a355c1050
C#: Add stubs for Microsoft.Extensions.Primitives.
2022-01-05 16:41:30 +01:00
Michael Nebel
586fddb0ce
Merge pull request #7509 from hvitved/csharp/stubs-from-source
...
C#: Treat QL test stubs as not from source
2022-01-05 16:40:19 +01:00
Mathias Vorreiter Pedersen
f5062c7d80
C++: Remove a bunch of bad self joins from 'cpp/toctou-race-condition'.
2022-01-05 15:28:53 +00:00
Alex Ford
f935df9865
Merge pull request #7313 from github/ruby/rails-cookie-config
...
Ruby: Add `rb/weak-cookie-configuration` query
2022-01-05 15:20:40 +00:00
Michael Nebel
83c05f72d9
C#: Update the expected output from MinimalStubsFromSource as the stubs are now considered library code and thus produced as a part of the minimal stub.
2022-01-05 15:35:42 +01:00
Alex Ford
da8c745bd8
Ruby: Restrict Rails Setting nodes to SetterMethodCalls
2022-01-05 14:11:07 +00:00
Asger Feldthaus
a7698b8727
JS: Fix double space
2022-01-05 14:35:02 +01:00
Asger Feldthaus
486beda2fa
JS: Factor out common regexp in AccessPathToken
2022-01-05 14:35:02 +01:00
Asger Feldthaus
d33200ea83
JS: Add test for WithArity
2022-01-05 14:35:02 +01:00
Asger Feldthaus
21928bee6c
JS: Rename padded -> inversePad
2022-01-05 14:35:01 +01:00
Asger Feldthaus
1989d51942
JS: Update documentation in Impl.qll
2022-01-05 14:35:01 +01:00
Asger Feldthaus
3ced5c9269
JS: Resolve first N tokens instead of constructing each prefix
2022-01-05 14:35:01 +01:00
Asger Feldthaus
772681d249
JS: Initial support for models as data
2022-01-05 14:34:52 +01:00
Anders Schack-Mulligen
ef714f7328
Dataflow: Sync
2022-01-05 14:25:35 +01:00
Anders Schack-Mulligen
6b6a9df0eb
Dataflow: Remove abstract class
2022-01-05 14:13:26 +01:00
Tom Hvitved
433e373e41
C#: Remove restriction in CFG implementation to work with stubs
2022-01-05 14:12:17 +01:00
Michael Nebel
6fb112f8ec
C#: Update tests to comply with Csv validation rules for kind.
2022-01-05 13:44:47 +01:00
Michael Nebel
45469a4fe6
C#: Fix error message.
2022-01-05 13:44:47 +01:00
Michael Nebel
c88355ea13
C#: Introduce Csv validation for kind.
2022-01-05 12:48:24 +01:00
Arthur Baars
e96fcf8568
Merge pull request #7498 from github/dependabot/cargo/ruby/generator/clap-3.0
...
Update clap requirement from 2.33 to 3.0 in /ruby/generator
2022-01-05 12:24:42 +01:00
Mathias Vorreiter Pedersen
a48d5dcf48
Merge pull request #7459 from MathiasVP/promote-arithmetic-uncontrolled
...
C++: Increase precision of `cpp/arithmetic-uncontrolled` to `high`
2022-01-05 11:24:09 +00:00
Mathias Vorreiter Pedersen
23b8b776ab
C++: Add change-note.
2022-01-05 10:12:20 +00:00
Michael Nebel
9983c1cbfb
C#: Remove generated comment checks in stub files as these are not present in handwritten stubs.
2022-01-05 10:37:37 +01:00
Mathias Vorreiter Pedersen
37c72cae3e
Merge branch 'main' into promote-arithmetic-uncontrolled
2022-01-05 08:12:47 +00:00
Anders Schack-Mulligen
fdb3cd03ef
Merge pull request #7513 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-05 08:54:46 +01:00
github-actions[bot]
0aa1152899
Add changed framework coverage reports
2022-01-05 00:10:19 +00:00
Erik Krogh Kristensen
c7da8df03c
Merge pull request #7511 from erik-krogh/dedup-spaces
...
Python: remove duplicated spaces in qldoc
2022-01-04 21:39:15 +01:00
Erik Krogh Kristensen
fe1107ccac
remove duplicated spaces in qldoc
2022-01-04 21:03:06 +01:00
Dave Bartolomeo
83ceb822aa
Move upgrades into standard library packs
...
Move upgrade to new location
Remove incorrectly merged files
Fix upgrades section
2022-01-04 11:30:25 -08:00
Tom Hvitved
fd60c6e1ad
Merge pull request #7510 from github/release-prep/2.7.5
...
Release preparation for version 2.7.5
2022-01-04 18:57:43 +01:00
Alex Ford
712972cb82
Ruby: formatting
2022-01-04 16:41:23 +00:00
Alex Ford
36ea360b25
Ruby: behaviour -> behavior
2022-01-04 15:43:38 +00:00
Mathias Vorreiter Pedersen
8f843209a8
Merge pull request #7493 from MrAnno/relax-ambiguously-signed-bit-field
...
C++: relax ambiguously-signed-bit-field by allowing GLib's gboolean
2022-01-04 16:18:46 +01:00
github-actions[bot]
1dfcf427aa
Release preparation for version 2.7.5
2022-01-04 14:44:56 +00:00
Mathias Vorreiter Pedersen
e31185fea4
C++: add change-note for cpp/ambiguously-signed-bit-field.
2022-01-04 14:31:19 +00:00
László Várady
6496bf8c1d
C++: relax ambiguously-signed-bit-field by allowing GLib's gboolean
...
The gboolean type of GLib (a widely used C library) is a typedef to int.
It is meant to represent a simple true/false value.
Resolves #7491
2022-01-04 14:22:48 +00:00
Tom Hvitved
964915ee2e
C#: Treat QL test stubs as not from source
2022-01-04 14:53:28 +01:00
Tom Hvitved
bfb573c86a
Merge pull request #7508 from hvitved/python/change-note-typo2
...
Python: Fix another change note typo
2022-01-04 14:10:37 +01:00
Tom Hvitved
6b4eaf674f
Python: Fix another change note typo
2022-01-04 13:53:07 +01:00
Tom Hvitved
a1bbe58516
C#: More uses of PopulateArguments
2022-01-04 13:47:55 +01:00
Erik Krogh Kristensen
b9964799f3
Merge pull request #7458 from erik-krogh/modelling
...
QL: add "modelling/modeling" to `ql/non-us-spelling`
2022-01-04 13:33:54 +01:00
Anders Schack-Mulligen
6457f42497
Merge pull request #7500 from zbazztian/stringbuilder-reverse-taint
...
Propagate taint through AbstractStringBuilder.reverse()
2022-01-04 13:28:14 +01:00
Alex Ford
dadaf25262
Merge branch 'main' into ruby/rails-cookie-config
2022-01-04 12:04:44 +00:00
Geoffrey White
344e380fa3
Merge pull request #6949 from ihsinme/ihsinme-patch-073
...
CPP: Add query for CWE-266 Incorrect Privilege Assignment
2022-01-04 11:37:17 +00:00
Tom Hvitved
a2c1995b9b
Merge pull request #7506 from hvitved/python/change-note-typo
...
Python: Fix typo in change note
2022-01-04 11:47:48 +01:00
Anders Schack-Mulligen
f8380dabe0
Update java/ql/lib/semmle/code/java/frameworks/Strings.qll
2022-01-04 11:47:26 +01:00
Edoardo Pirovano
081765cbe8
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2022-01-04 10:07:34 +00:00
Tom Hvitved
23fb3455c0
Python: Fix typo in change note
2022-01-04 11:06:23 +01:00
Tom Hvitved
1f8a291d6f
Merge pull request #7198 from hvitved/ruby/dataflow/arrays
...
Ruby: Flow through arrays/enumerables
2022-01-04 10:37:08 +01:00
yoff
5ba70ff3b6
Merge pull request #7369 from RasmusWL/filter-tag-cwe
...
JS/Py/Ruby: Add more CWEs to bad-tag-filter queries
2022-01-04 10:11:03 +01:00
Michael Nebel
c3007ff713
Merge pull request #7468 from michaelnebel/csharp-foreach-dataflow
...
C#: Re-factor the ForEachCapture query to use MaD flow summaries.
2022-01-04 09:46:39 +01:00
Tom Hvitved
de1697ab39
Merge pull request #7503 from dbartol/dbartol/move-change-notes
...
Move change notes to correct location
2022-01-04 09:35:21 +01:00
Dave Bartolomeo
5f5af4a29e
Move change notes to correct location
...
A few change notes slipped through the cracks of my previous change. These are now in the proper locations: `old-change-notes` for older notes, and `<lang>\ql\[src|lib]\change-notes` for current change notes.
2022-01-03 18:21:16 -05:00
Dave Bartolomeo
ded3c52a34
Merge pull request #7407 from github/post-release-prep/codeql-cli-2.7.4
...
Post-release preparation for codeql-cli-2.7.4
2022-01-03 17:09:58 -05:00
github-actions[bot]
1334d207fa
Post-release version bumps
2022-01-03 20:11:15 +00:00
dependabot[bot]
b74af00b2b
Update clap requirement from 2.33 to 3.0 in /ruby/generator
...
Updates the requirements on [clap](https://github.com/clap-rs/clap ) to permit the latest version.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_generate-v3.0.0-rc.0...clap_complete-v3.0.0 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-01-03 16:12:45 +00:00
Taus
ec533c8465
Merge pull request #7502 from tausbn/ql-support-trailing-comma-in-set-literals
...
QL: Support trailing comma in set literals
2022-01-03 17:06:46 +01:00
Taus
8845529548
QL: Support trailing comma in set literals
...
See
725395405e
for the grammar changes and corresponding test.
2022-01-03 15:48:24 +00:00
Sebastian Bauersfeld
421bd1b970
Propagate taint through AbstractStringBuilder.reverse() and its overrides.
2022-01-03 10:38:27 +07:00
Edoardo Pirovano
a616059761
Fix example in JavaScript query
2021-12-29 12:01:09 +00:00
Tom Hvitved
882caf4011
Merge pull request #7470 from hvitved/csharp/dispatch-join-order
...
C#: Fix bad join-order in dispatch library
2021-12-22 19:11:33 +01:00
Alex Ford
7d3932dc8d
Merge remote-tracking branch 'origin/main' into ruby/rails-cookie-config
2021-12-22 17:54:03 +00:00
Alex Ford
7f01be7067
Ruby: use new changenote format for rb/weak-cookie-configuration
2021-12-22 17:47:44 +00:00
Alex Ford
d977e8a473
Ruby: remove unnecessary custom transitive version of getReceiver
2021-12-22 17:47:44 +00:00
Alex Ford
9821c4a06c
Ruby: behaviour -> behavior
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-12-22 17:47:44 +00:00
Alex Ford
2cd02157c9
Ruby: fix import
2021-12-22 17:47:44 +00:00
Alex Ford
db967bde89
Ruby: add a change note for rb/weak-cookie-configuration
2021-12-22 17:47:44 +00:00
Alex Ford
71c5711eb3
Ruby: add some rb/weak-cookie-configuration tests
2021-12-22 17:47:44 +00:00
Alex Ford
8976469d9b
Ruby: Model some Rails cookie configuration settings
2021-12-22 17:47:44 +00:00
Alex Ford
5ce6e63590
Ruby: Tidy Rails.qll to make adding new settings modeling easier
2021-12-22 17:47:44 +00:00
Alex Ford
737f7332bc
Ruby: add rb/weak-cookie-configuration query
2021-12-22 17:47:44 +00:00
Alex Ford
8a3d1fe174
Ruby: add CookieSecurityConfigurationSetting concept
2021-12-22 17:47:43 +00:00
Alex Ford
0cbf136e21
Merge pull request #7273 from github/ruby/crypto-algorithms
...
Ruby: add CryptoAlgorithms library
2021-12-22 17:42:59 +00:00
Alex Ford
69f1c18a39
Merge pull request #7446 from jeffgran/jg/constant-write-access
...
[Ruby] Bugfix: ConstantWriteAccess::getQualifiedName() returns wrong value in some cases
2021-12-22 17:07:49 +00:00
Alex Ford
3da98ecb73
Bump a date
2021-12-22 16:38:16 +00:00
Alex Ford
a2104de8a0
Move CryptoAlgorithms::AlgorithmsName into a separate internal/CryptoAlgorithmNames.qll
2021-12-22 16:38:15 +00:00
Alex Ford
f16d77615d
Remove unused isStrongBlockMode predicate from CryptoAlgorithms.qll
2021-12-22 16:38:15 +00:00
Alex Ford
df0da980ea
Update ruby/ql/lib/codeql/ruby/security/OpenSSL.qll
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-12-22 16:38:15 +00:00
Alex Ford
27a40fb5cf
Ruby: OpenSSL QLDoc fixes
2021-12-22 16:38:15 +00:00
Alex Ford
97c75de771
Ruby: OpenSSL and CryptoAlgorithms test update
2021-12-22 16:38:15 +00:00
Alex Ford
e6bc45ee3b
Ruby: Base OpenSSL supported algorithms on OpenSSL 1.1.1 and LibreSSL 3.4.1
2021-12-22 16:38:15 +00:00
Alex Ford
d3af687767
Add more encryption algorithms and modes to CryptoAlgorithms::AlgorithmNames
...
Strong encryption algorithms: ARIA, IDEA, SEED, SM4
Strong block modes: CBC, CFB, CTR, OFB
2021-12-22 16:38:15 +00:00
Alex Ford
bdb2d8ba16
Ruby: split OpenSSL parts from CryptoALgorithms.qll and sync with JS/Python version
2021-12-22 16:38:15 +00:00
Alex Ford
0303c279e2
Ruby: add empty ruby file to avoid DataFlowConsistency failure
2021-12-22 16:38:15 +00:00
Alex Ford
1156581b52
Ruby: add CryptoAlgorithms library
2021-12-22 16:38:15 +00:00
Jeff Gran
accfd482d4
autoformat file
2021-12-22 08:44:35 -07:00
Jeff Gran
6acb87d542
add change-notes
2021-12-22 08:42:07 -07:00
Jeff Gran
f21398ce84
changed the name of one of the constants for a better test case
2021-12-22 08:42:07 -07:00
Jeff Gran
445c420a3d
rerun test --learn with rebuilt ruby extractor
2021-12-22 08:42:04 -07:00
Jeff Gran
07c7de5cfd
run test --learn, add a few more constants to constant.rb test case
2021-12-22 08:36:07 -07:00
Jeff Gran
7c032f6cb4
fix docs, fix deprecations
2021-12-22 08:35:55 -07:00
Jeff Gran
f35e866799
Capitalize "Gets"
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2021-12-22 08:35:55 -07:00
Jeff Gran
0c698996aa
use resolveConstanteWriteAccess instead, add a few more test cases
2021-12-22 08:35:55 -07:00
Jeff Gran
3df7793803
add more test cases, fix bug by adding getFullName() predicate
2021-12-22 08:35:55 -07:00
Jeff Gran
8e46eeb88c
fix expectations to expect the correct values
2021-12-22 08:35:52 -07:00
Tom Hvitved
55492ef348
Ruby: Update expected test output after rebase
2021-12-22 15:56:20 +01:00
Tom Hvitved
118d0d9ff5
Ruby: Use "Receiver" instead of "Self" in flow summaries
...
Flow summaries use the "outside view", i.e., the call sites, so "receiver"
is better than "self", as the latter uses the "inside view", i.e. the callees.
2021-12-22 15:56:20 +01:00
Tom Hvitved
3a30f58f74
Address review comments
2021-12-22 15:56:20 +01:00
Tom Hvitved
400802c5ce
Ruby: Add flow summaries for Array/Enumerable methods
2021-12-22 15:56:20 +01:00
Michael Nebel
748b2d2507
C#: Simplify the ForEachCapture query.
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2021-12-22 15:47:24 +01:00
Michael Nebel
fef6770a21
C#: Remove the callableFlow for the Add method in subtypes of System.Collections.IEnumerable.
2021-12-22 15:47:24 +01:00
Michael Nebel
51e3c582de
C#: Re-write ForEachCapture test to avoid using LibraryTypeDataFlow and rely in MaD summaries instead.
2021-12-22 15:47:24 +01:00
Tom Hvitved
8c18aaae74
Ruby: Prepare for data flow through arrays
2021-12-22 15:35:34 +01:00
Tom Hvitved
27f786b41e
Merge pull request #7442 from hvitved/ruby/dataflow/keyword-params
...
Ruby: Data flow for keyword arguments/parameters
2021-12-22 15:23:22 +01:00
Tom Hvitved
8a62778e92
C#: Extract out/ref information in this(...) constructor calls
2021-12-22 13:05:58 +01:00
Tom Hvitved
a3b1fb603a
C#: Add missing tuple declarations to PatternExpr
...
`x` and `y` in `pair is var (x, y) ? x : null` are now correctly part of `PatternExpr`.
2021-12-22 13:05:58 +01:00
Tom Hvitved
915c0fdf9b
Shared SSA: Sync files
2021-12-22 13:05:58 +01:00
Tom Hvitved
05e37a7465
C#: Promote existing ad-hoc consistency checks to consistency queries
2021-12-22 13:05:58 +01:00
Tom Hvitved
4133eb15d5
Ruby: Reintroduce old Argument[_] restriction to avoid large Cartesian product
2021-12-22 11:37:38 +01:00
Tom Hvitved
d196c77b3d
Ruby: Remove some redundant overrides
2021-12-22 11:25:13 +01:00
Tom Hvitved
f5471e34f8
C#: Fix bad join-order in dispatch library
...
Before
```
[2021-12-22 09:46:31] (395s) Tuple counts for Dispatch::Internal::hasCallable#fff/3@258418l2 after 5m27s:
49000 ~0% {2} r1 = JOIN Declaration::Declaration::getUnboundDeclaration_dispred#ff_10#join_rhs WITH project#Dispatch::Internal::DispatchMethodOrAccessorCall::getAStaticTargetExt#ff ON FIRST 1 OUTPUT Lhs.1 'c', Rhs.0
31302 ~3% {3} r2 = JOIN r1 WITH Type::ValueOrRefType::getAMember_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0 'c', Lhs.1 'source', Rhs.1
299700 ~0% {3} r3 = JOIN r1 WITH Type::ValueOrRefType::hasOverriddenMember_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0 'c', Lhs.1 'source', Rhs.1
16650 ~1% {3} r4 = JOIN r1 WITH Property::Accessor::getDeclaration_dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'source', Lhs.0 'c'
15984 ~0% {3} r5 = JOIN r4 WITH Type::ValueOrRefType::getAMember_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.2 'c', Lhs.1 'source', Rhs.1
315684 ~1% {3} r6 = r3 UNION r5
346986 ~1% {3} r7 = r2 UNION r6
0 ~0% {3} r8 = JOIN r4 WITH Type::ValueOrRefType::hasOverriddenMember_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.2 'c', Lhs.1 'source', Rhs.1
666 ~0% {3} r9 = JOIN r1 WITH Type::hasNonOverriddenMember#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'source', Lhs.0 'c'
0 ~0% {3} r10 = JOIN r9 WITH boundedFastTC(Type::ValueOrRefType::getBaseClass_dispred#ff_10#join_rhs,Dispatch::Internal::hasCallable#fff#higher_order_body) ON FIRST 1 OUTPUT Lhs.2 'c', Lhs.1 'source', Rhs.1
0 ~0% {3} r11 = JOIN r4 WITH Type::hasNonOverriddenMember#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'source', Lhs.2 'c'
0 ~0% {3} r12 = JOIN r11 WITH boundedFastTC(Type::ValueOrRefType::getBaseClass_dispred#ff_10#join_rhs,Dispatch::Internal::hasCallable#fff#higher_order_body#1) ON FIRST 1 OUTPUT Lhs.2 'c', Lhs.1 'source', Rhs.1
0 ~0% {3} r13 = r10 UNION r12
0 ~0% {3} r14 = r8 UNION r13
346986 ~1% {3} r15 = r7 UNION r14
11963234000 ~2% {4} r16 = JOIN r15 WITH Dispatch::Internal::hasOverrider#ff ON FIRST 1 OUTPUT Lhs.2, Rhs.1 't', Lhs.1 'source', Lhs.0 'c'
207126 ~27% {3} r17 = JOIN r16 WITH Unification::Gvn::Cached::getGlobalValueNumber#ff ON FIRST 2 OUTPUT Lhs.2 'source', Lhs.1 't', Lhs.3 'c'
return r17
```
After
```
[2021-12-22 10:39:41] (0s) Tuple counts for Dispatch::Internal::hasCallable0#fff/3@82341e2h after 331ms:
93569 ~0% {2} r1 = JOIN Type::ValueOrRefType::getAMember_dispred#fb_10#join_rhs WITH OverridableCallable::OverridableCallable#f ON FIRST 1 OUTPUT Rhs.0 'c', Lhs.1
511767 ~0% {2} r2 = JOIN Type::ValueOrRefType::hasOverriddenMember_dispred#ff_10#join_rhs WITH OverridableCallable::OverridableCallable#f ON FIRST 1 OUTPUT Rhs.0 'c', Lhs.1
35659 ~0% {2} r3 = JOIN OverridableCallable::OverridableCallable#f WITH Property::Accessor::getDeclaration_dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'c'
35659 ~4% {2} r4 = JOIN r3 WITH Type::ValueOrRefType::getAMember_dispred#fb_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'c', Rhs.1
547426 ~0% {2} r5 = r2 UNION r4
640995 ~4% {2} r6 = r1 UNION r5
74835 ~4% {2} r7 = JOIN r3 WITH Type::ValueOrRefType::hasOverriddenMember_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'c', Rhs.1
32748 ~0% {2} r8 = JOIN Type::hasNonOverriddenMember#fb_10#join_rhs WITH OverridableCallable::OverridableCallable#f ON FIRST 1 OUTPUT Lhs.1, Rhs.0 'c'
171228 ~0% {2} r9 = JOIN r8 WITH boundedFastTC(Type::ValueOrRefType::getBaseClass_dispred#ff_10#join_rhs,Dispatch::Internal::hasCallable0#fff#higher_order_body) ON FIRST 1 OUTPUT Lhs.1 'c', Rhs.1
9056 ~0% {2} r10 = JOIN r3 WITH Type::hasNonOverriddenMember#fb_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'c'
23633 ~1% {2} r11 = JOIN r10 WITH boundedFastTC(Type::ValueOrRefType::getBaseClass_dispred#ff_10#join_rhs,Dispatch::Internal::hasCallable0#fff#higher_order_body#1) ON FIRST 1 OUTPUT Lhs.1 'c', Rhs.1
194861 ~0% {2} r12 = r9 UNION r11
269696 ~0% {2} r13 = r7 UNION r12
910691 ~4% {2} r14 = r6 UNION r13
910691 ~2% {3} r15 = JOIN r14 WITH Declaration::Declaration::getUnboundDeclaration_dispred#ff ON FIRST 1 OUTPUT Rhs.1 'source', Lhs.0 'c', Lhs.1
579872 ~2% {3} r16 = JOIN r15 WITH project#Dispatch::Internal::DispatchMethodOrAccessorCall::getAStaticTargetExt#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1 'c', Lhs.0 'source'
753465 ~41% {3} r17 = JOIN r16 WITH Unification::Gvn::Cached::getGlobalValueNumber#ff ON FIRST 1 OUTPUT Rhs.1 't', Lhs.1 'c', Lhs.2 'source'
return r17
[2021-12-22 10:39:41] (0s) Tuple counts for Dispatch::Internal::hasCallable#fff/3@e44e67tv after 24ms:
201843 ~0% {3} r1 = JOIN Dispatch::Internal::hasOverrider#ff WITH Dispatch::Internal::hasCallable0#fff ON FIRST 2 OUTPUT Lhs.0 't', Lhs.1 'c', Rhs.2 'source'
return r1
```
2021-12-22 10:45:51 +01:00
Tamás Vajk
43b5d502b8
Merge pull request #7466 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-12-22 09:05:15 +01:00
github-actions[bot]
ba7a10de68
Add changed framework coverage reports
2021-12-22 00:10:19 +00:00
Nick Rolfe
9e259b67bb
Merge pull request #7305 from github/nickrolfe/user-controlled-bypass
...
Ruby: query to find user-controlled bypass of sensitive actions
2021-12-21 17:20:20 +00:00
Arthur Baars
a7aff11140
Merge pull request #7394 from aibaars/ruby-cfg-expr-post
...
Ruby: CFG: make all expressions "post-order" nodes
2021-12-21 16:36:42 +01:00
Nick Rolfe
5765f3684c
Ruby: add missing qldoc comment
2021-12-21 15:29:16 +00:00
Nick Rolfe
5db80dac51
Merge remote-tracking branch 'origin/main' into nickrolfe/user-controlled-bypass
2021-12-21 15:26:08 +00:00
Michael Nebel
c138a2796f
Merge pull request #7424 from michaelnebel/csharp-flow-summary-csv
...
C#: Flow summaries in CSV format.
2021-12-21 16:11:22 +01:00
Michael Nebel
8250fb4cf7
C#: Fixed typo in namespace.
2021-12-21 15:00:05 +01:00
Arthur Baars
a86ba3b14e
Ruby: rename WhenExpr to WhenClause
2021-12-21 12:31:24 +01:00
Mathias Vorreiter Pedersen
dae5af6be8
Merge pull request #7392 from MathiasVP/fix-join-order-in-is-argument-for-parameter
...
C++: Fix join order in `isArgumentForParameter`
2021-12-21 09:29:32 +01:00
Mathias Vorreiter Pedersen
5a38f81e23
C++: Accept test changes.
2021-12-21 08:08:59 +01:00
Tom Hvitved
f66a08155b
Merge pull request #7460 from hvitved/ruby/cfg/nested-completion-non-linear-rec
...
Ruby: Reduce non-linear recursion in CFG completion library
2021-12-20 20:11:00 +01:00
Tom Hvitved
29cd346702
Ruby: Reduce non-linear recursion in CFG completion library
...
Before
```
noinline
incremental
Completion::nestedEnsureCompletion#ff(/* Completion::Completion */ Completion::TCompletion outer,
int nestLevel)
:-
(
(
Completion::TReturnCompletion#f(outer),
rec Completion::Completion#class#f(outer)
);
(
Completion::TBreakCompletion#f(outer),
rec Completion::Completion#class#f(outer)
);
(
Completion::TNextCompletion#f(outer),
rec Completion::Completion#class#f(outer)
);
(
Completion::TRedoCompletion#f(outer),
rec Completion::Completion#class#f(outer)
);
(
Completion::TRetryCompletion#f(outer),
rec Completion::Completion#class#f(outer)
);
(
Completion::TRaiseCompletion#f(outer),
rec Completion::Completion#class#f(outer)
);
(
Completion::TExitCompletion#f(outer),
rec Completion::Completion#class#f(outer)
)
),
exists(/* ControlFlowGraphImpl::Trees::BodyStmtTree */ cached dontcare AST::Cached::TAstNode _ |
ControlFlowGraphImpl::Trees::BodyStmtTree::getNestLevel_dispred#ff(_,
nestLevel)
)
| [base_case] false()
| [delta_order]
(
(
Completion::TReturnCompletion#f(outer),
delta previous rec Completion::Completion#class#f(outer)
);
(
Completion::TBreakCompletion#f(outer),
delta previous rec Completion::Completion#class#f(outer)
);
(
Completion::TNextCompletion#f(outer),
delta previous rec Completion::Completion#class#f(outer)
);
(
Completion::TRedoCompletion#f(outer),
delta previous rec Completion::Completion#class#f(outer)
);
(
Completion::TRetryCompletion#f(outer),
delta previous rec Completion::Completion#class#f(outer)
);
(
Completion::TRaiseCompletion#f(outer),
delta previous rec Completion::Completion#class#f(outer)
);
(
Completion::TExitCompletion#f(outer),
delta previous rec Completion::Completion#class#f(outer)
)
),
project#ControlFlowGraphImpl::Trees::BodyStmtTree::getNestLevel_dispred#ff(nestLevel),
not(previous rec Completion::nestedEnsureCompletion#ff(outer, nestLevel))
.
```
After
```
noinline
Completion::nestedEnsureCompletion#ff(Completion::TCompletion outer,
int nestLevel)
:-
(
Completion::TReturnCompletion#f(outer);
Completion::TBreakCompletion#f(outer);
Completion::TNextCompletion#f(outer);
Completion::TRedoCompletion#f(outer);
Completion::TRetryCompletion#f(outer);
Completion::TRaiseCompletion#f(outer);
Completion::TExitCompletion#f(outer)
),
project#ControlFlowGraphImpl::Trees::BodyStmtTree::getNestLevel_dispred#ff(nestLevel)
.
```
2021-12-20 19:22:47 +01:00
Arthur Baars
6c7114804e
Ruby: remove CaseExprChildMapping::getBranch
2021-12-20 19:21:36 +01:00
Arthur Baars
7644d60dae
Revert "Ruby: CFG: make WhenExpr post-order"
...
This reverts commit cff63fa7d7 .
2021-12-20 18:57:25 +01:00
Erik Krogh Kristensen
8019b52838
run the non-us patch with "modelled/modeled"
2021-12-20 17:47:15 +01:00
Erik Krogh Kristensen
4c1089fcf1
QL: add "modelled/modeled" to the ql/non-us-spelling query
2021-12-20 17:46:41 +01:00
Erik Krogh Kristensen
66c6a4d899
QL: move ql/non-us-spelling implementation to Query.qll file
2021-12-20 16:53:52 +01:00
Erik Krogh Kristensen
d17879e1f9
run the non-us patch
2021-12-20 16:24:41 +01:00
Mathias Vorreiter Pedersen
aa92fe8c90
Merge pull request #7338 from geoffw0/clrtxt2
...
C++: Improvements to cpp/cleartext-transmission
2021-12-20 16:05:12 +01:00
Michael Nebel
06b77eb4af
C#: Re-introduce callableFlow for Add as the test test/query-tests/Language Abuse/ForeachCapture/ForeachCapture.qlref needs to be re-written before it can be removed.
2021-12-20 16:00:59 +01:00
Tom Hvitved
06575efce9
Data flow: Fix bad join-order
2021-12-20 15:44:16 +01:00
Michael Nebel
d3f2894a8e
C#: Convert remaining missing parts of System.Collections.IEnumerable and sub types flow to CSV format (except for 'clearsContent').
2021-12-20 15:33:26 +01:00
Michael Nebel
0aefb1551e
C#: Convert at least System.Collection.[Generic.]ICollection flow to CSV format.
2021-12-20 15:33:26 +01:00
Michael Nebel
e9d4e38364
C#: Convert at least System.Collection.[Generic.]IList flow to CSV format.
2021-12-20 15:33:25 +01:00
Michael Nebel
44c1e3f28d
C#: Re-arrange framework imports.
2021-12-20 15:33:25 +01:00
Michael Nebel
aedfc428c2
C#: Convert at least the flow summaries for System.Collections[.Generic].IDictionary and subclasses.
2021-12-20 15:33:25 +01:00
Michael Nebel
b78ec4c693
C#: Add flow summary for System.Collections.IEnumerable in CSV format.
2021-12-20 15:33:25 +01:00
Michael Nebel
20637555b5
C#: Manual cleanup of previously added IEnumerable<>.GetEnumrator flow summaries.
2021-12-20 15:33:25 +01:00
Michael Nebel
ac5b2bfa41
C#: Add flow summary for IEnumerable<T>.GetEnumerator() and update tests.
2021-12-20 15:33:25 +01:00
Michael Nebel
f93c63aa60
C#: Convert flow summaries for extension methods for subtypes of System.Collection.IEnumerable to CSV format.
2021-12-20 15:33:25 +01:00
Michael Nebel
ec4d43fed2
C#: Add missing dataflow comment in CompilerServices.
2021-12-20 15:33:25 +01:00
Erik Krogh Kristensen
2f559696e4
QL: add "modelling/modeling" to ql/non-us-spelling
2021-12-20 15:30:46 +01:00
Tom Hvitved
aa9444b16c
Address review comment
2021-12-20 15:24:14 +01:00
Nick Rolfe
f18492e39b
Merge pull request #7443 from github/nickrolfe/behavior
...
QL4QL: catch behaviour/behavior in ql/non-us-spelling
2021-12-20 13:23:53 +00:00
Mathias Vorreiter Pedersen
bbb936154a
C++: Increase the precision of 'cpp/uncontrolled-arithmetic' to high.
2021-12-20 14:03:13 +01:00
Mathias Vorreiter Pedersen
95fa93b274
C++: Only recognize signed integers as sinks in 'cpp/uncontrolled-arithmetic' in the case of overflow.
2021-12-20 14:02:44 +01:00
Erik Krogh Kristensen
9ffdfb263f
Merge pull request #7441 from erik-krogh/ql-for-ql-next
...
QL-for-QL: Followup changes
2021-12-20 10:58:13 +01:00
Alex Ford
313e0c63fd
Merge pull request #7399 from github/ruby/stdlib-logger
...
Ruby: Model what is written to the log from stdlib `Logger` methods
2021-12-20 09:52:29 +00:00
Erik Krogh Kristensen
8b53cca3e8
QL: use environment instead of dynamic shell script construction
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-12-20 09:56:10 +01:00
haby0
fed1d88268
Add shutil module path injection sinks
2021-12-20 16:09:06 +08:00
Tom Hvitved
ed006d7283
Merge pull request #7231 from hvitved/csharp/dataflow/consistency-queries
...
C#: Enable data-flow consistency queries
2021-12-20 08:46:19 +01:00
Erik Krogh Kristensen
af47cba09a
QL: fix the remaining code-scanning errors for QL-for-QL
2021-12-17 21:34:13 +01:00
Andrew Eisenberg
7a38618e24
Solorigate: Post-release version bump
2021-12-17 12:30:09 -08:00
Erik Krogh Kristensen
30f8894854
QL: run the redundat inline cast patch
2021-12-17 20:50:15 +01:00
Erik Krogh Kristensen
571995c929
QL: run the implicit this patch
2021-12-17 20:49:32 +01:00
Erik Krogh Kristensen
31c8e4ed2a
QL: Fix the autobuilder (temporary bad fix)
2021-12-17 20:23:02 +01:00
Erik Krogh Kristensen
7a9e41c97d
QL: split out analysis of each CodeQL language
2021-12-17 20:22:59 +01:00
Erik Krogh Kristensen
f44f33788f
QL: cache the compiled extractor
2021-12-17 20:22:55 +01:00
Erik Krogh Kristensen
380d238c31
QL: run the QL-for-QL tests when a nested folder is changed
2021-12-17 20:22:30 +01:00
Erik Krogh Kristensen
8fbd056b4e
QL: add the QL-for-QL label automatically
2021-12-17 20:22:27 +01:00
Erik Krogh Kristensen
d612687ae7
QL: don't require change notes for QL-for-QL
2021-12-17 20:22:23 +01:00
Erik Krogh Kristensen
f7f9b4d3f4
QL: use erik-krogh/ql codeql-action
2021-12-17 20:22:20 +01:00
Erik Krogh Kristensen
ea1ee68fe1
QL: fix join order of ql/override-swapped-name
2021-12-17 20:22:20 +01:00
Erik Krogh Kristensen
5717a216d3
QL: fix bad join
2021-12-17 20:22:20 +01:00
Erik Krogh Kristensen
4d12d8dd5e
QL: update the stats file
2021-12-17 20:22:20 +01:00
Henry Mercer
144ec8c629
JS: Update featurization for absent features optimization
...
Absent features are now represented implicitly by the absence of a row
in the `tokenFeatures` relation, rather than explicitly by an empty
string. This leads to improved runtime performance. To enable this
implicit representation, we pass the set of supported token features to
the `scoreEndpoints` HOP. Requires CodeQL CLI v2.7.4.
2021-12-17 18:04:42 +00:00
Henry Mercer
bebf4ca8fc
Merge pull request #7357 from github/henrymercer/js-atm-only-featurize-with-flow
...
JS: Only featurize endpoints that are part of a flow path
2021-12-17 18:03:40 +00:00
Henry Mercer
d058d36b1f
Merge pull request #7445 from github/henrymercer/bump-atm-pack-version
...
Bump ATM pack version to 0.0.2
2021-12-17 17:54:50 +00:00
Henry Mercer
055432530f
Bump ATM pack version to 0.0.2
2021-12-17 16:49:59 +00:00
Henry Mercer
c1864531cd
JS: Push FeaturizationConfig context into more predicates
2021-12-17 16:31:56 +00:00
Henry Mercer
383437c571
JS: Only featurize endpoints that are part of a flow path
2021-12-17 16:31:56 +00:00
Nick Rolfe
dd12eab29b
Merge pull request #7444 from github/nickrolfe/ql-autobuilder
...
QL for QL: add autobuilder that respects LGTM_INDEX_FILTERS
2021-12-17 16:22:42 +00:00
Anders Schack-Mulligen
c03f189dec
Merge pull request #7434 from MathiasVP/fix-join-order-in-phi-node
...
C++: Fix join-order in `phi_node` predicate.
2021-12-17 17:06:57 +01:00
Nick Rolfe
e6c60ebd41
QL for QL: add autobuilder that respects LGTM_INDEX_FILTERS
2021-12-17 16:05:21 +00:00
Nick Rolfe
28912c508f
Fix non-US spelling of 'behavior'
2021-12-17 15:29:31 +00:00
CodeQL CI
5054d5b555
Merge pull request #7420 from RasmusWL/ssrf-new
...
Approved by yoff
2021-12-17 15:20:49 +00:00
Tom Hvitved
1e27ddf7c7
Ruby: Data flow for keyword arguments/parameters
2021-12-17 15:42:29 +01:00
Nick Rolfe
9ad9b81327
QL4QL: catch behaviour/behavior in ql/non-us-spelling
2021-12-17 14:30:33 +00:00
Rasmus Wriedt Larsen
83f87f0272
Python: Adjust .expected based on new comment
...
That was changed in 9866214
2021-12-17 15:29:41 +01:00
CodeQL CI
de4b655ddb
Merge pull request #7327 from asgerf/js/handlebars-more-raw-interpolation
...
Approved by erik-krogh
2021-12-17 14:07:57 +00:00
Mathias Vorreiter Pedersen
45753e519f
C++: Fully lock down the join order correctly.
2021-12-17 13:43:56 +00:00
Rasmus Wriedt Larsen
626009ea60
Python: Fix typo
2021-12-17 14:29:38 +01:00
yoff
9866214ebe
Update python/ql/test/query-tests/Security/CWE-918-ServerSideRequestForgery/full_partial_test.py
2021-12-17 14:26:43 +01:00
Arthur Baars
46144fe0a3
Ruby: InClause and WhenClause are no longer Expr
2021-12-17 14:04:25 +01:00
Arthur Baars
974ad070d1
Revert "Ruby: CFG make in-clause post-order"
...
This reverts commit 1343ed58a21eec2954876d8d42e877a382ba89c8.
2021-12-17 14:04:25 +01:00
Arthur Baars
560413f94a
Address comments
2021-12-17 14:04:25 +01:00
CodeQL CI
39ec7132af
Merge pull request #7049 from asgerf/js/routing-trees
...
Approved by erik-krogh
2021-12-17 12:26:38 +00:00
Tony Torralba
f3819e7b06
Merge pull request #7435 from github/atorralba/log4j-CVE-2021-45046
...
Java: New sinks for Log4j CloseableThreadContext
2021-12-17 13:19:51 +01:00
Tom Hvitved
77fcb8a18f
C#: Remove unused predicate
2021-12-17 13:14:11 +01:00
Tom Hvitved
e4d9f5f29e
Fix QL doc
2021-12-17 13:14:11 +01:00
Tom Hvitved
a0311609d0
C#: Add missing post-update nodes for reverse array stores a[i].f = x
2021-12-17 13:14:11 +01:00
Tom Hvitved
e47e824e16
C#: Restrict ExplicitParameterNode to those that belong to unbound callables
2021-12-17 13:14:11 +01:00
Tom Hvitved
4a331814a2
C#: Avoid overlap in getCSharpType
2021-12-17 13:14:11 +01:00
Tom Hvitved
f5a47126b1
C#: Fix DataFlow::Node::getEnclosingCallable for field initializer expressions
2021-12-17 13:14:11 +01:00
Tom Hvitved
5bdfcc8436
C#: Update QL doc
2021-12-17 13:14:11 +01:00
Tom Hvitved
c13d83ce40
C#: Restrict some call-back flow summaries
2021-12-17 13:14:08 +01:00
Tom Hvitved
0c9ca4546c
C#: Avoid overlap for () and System.ValueTuple in unification library
2021-12-17 13:13:36 +01:00
Tom Hvitved
7af9d75abc
C#: Add locations for more CIL methods
2021-12-17 13:13:36 +01:00
Tom Hvitved
ab2e0fdb18
Data flow: Sync files
2021-12-17 13:13:36 +01:00
Tom Hvitved
40043f13c6
C#: Enable data-flow consistency queries
2021-12-17 13:13:36 +01:00
Erik Krogh Kristensen
c70a2bebda
Merge pull request #7410 from erik-krogh/erik-krogh/publish-ql-for-ql
...
Add QL for QL
2021-12-17 12:55:25 +01:00
Mathias Vorreiter Pedersen
c1af8b93c2
C++: Better join-order fix.
2021-12-17 11:50:53 +00:00
Arthur Baars
83a8a60676
Ruby: CFG: consistency query to check that Expr nodes are post-order
2021-12-17 12:21:18 +01:00
Arthur Baars
ba89653dff
Ruby: CFG: make RescueClause post-order
2021-12-17 12:21:18 +01:00
Arthur Baars
db4b781fef
Ruby: CFG: make RescueModifier post-order
2021-12-17 12:21:18 +01:00
Arthur Baars
cff63fa7d7
Ruby: CFG: make WhenExpr post-order
2021-12-17 12:21:18 +01:00
Arthur Baars
a9286e897b
Ruby: CFG make in-clause post-order
2021-12-17 12:21:18 +01:00
Arthur Baars
f49605569b
Ruby: CFG make more expressions post-order
2021-12-17 12:21:18 +01:00
Arthur Baars
a4ea7129c2
Ruby: CFG: make 'case' a PostOrder node
2021-12-17 12:21:18 +01:00
Rasmus Wriedt Larsen
83f1b2ca5d
Python: Add SSRF qhelp
...
I included examples of both types in the qhelp of both queries, to
provide context of what each of them actually are.
2021-12-17 11:48:26 +01:00
Anders Schack-Mulligen
3adc0b57ed
Merge pull request #7426 from MathiasVP/fix-join-order-in-http-string-literal-charpred
...
C++: Fix join-order in `HttpStringLiteral` charpred
2021-12-17 11:21:38 +01:00
Arthur Baars
96aef9f63f
Merge pull request #7393 from aibaars/ruby-simple-parameter-not-expr
...
Ruby: SimpleParameter should not be an Expr
2021-12-17 10:41:43 +01:00
Asger Feldthaus
89775428b4
JS: Autoformat
2021-12-17 10:32:02 +01:00
Asger Feldthaus
3e6389cad6
JS: Bump extractor version string
2021-12-17 10:32:00 +01:00
Asger Feldthaus
95a93fe033
JS: Change note
2021-12-17 10:31:50 +01:00
Asger Feldthaus
e2c6dd7d56
JS: Recognize {{& ... }} as an XSS sink
2021-12-17 10:31:50 +01:00
Asger Feldthaus
61cc84ba69
JS: Recognize leading/trailing ~ and & in mustache-tags
2021-12-17 10:31:50 +01:00
Asger Feldthaus
ce68a6d1c5
JS: Remove unneeded qualifier in static field access
2021-12-17 10:31:50 +01:00
Rasmus Wriedt Larsen
e7abe43e3e
Python: Add SSRF change-note
2021-12-17 10:04:55 +01:00
Tom Hvitved
734bfbd7ae
Merge pull request #7433 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-12-17 09:52:36 +01:00
Rasmus Wriedt Larsen
e309d8227c
Python: Remove debug predicate
...
Accidentally committed :|
2021-12-17 09:44:35 +01:00
Tony Torralba
6f2d91a8ad
Sinks for CloseableThreadContext
2021-12-17 09:17:04 +01:00
Mathias Vorreiter Pedersen
d840796494
C++: Fix join-order in 'phi_node' predicate.
2021-12-17 07:50:04 +00:00
github-actions[bot]
6c57cbba2b
Add changed framework coverage reports
2021-12-17 00:09:41 +00:00
Andrew Eisenberg
50ee4ab330
Solorigate: Extract to separate qlpack
...
Extracts solorigate to separate qlpacks in preparation for
publishing them to the registry.
2021-12-16 16:09:20 -08:00
Rasmus Wriedt Larsen
1d00730753
Python: Allow http[s]:// prefix for SSRF
2021-12-17 00:27:18 +01:00
Rasmus Wriedt Larsen
8d9a797b75
Python: Add tricky .format SSRF tests
2021-12-17 00:24:51 +01:00
Rasmus Wriedt Larsen
6f297f4e9c
Python: Fix SSRF sanitizer tests
...
They were very misleading before, because a sanitizer that happened
early, would remove taint from the rest of the cases by use-use flow :|
2021-12-16 23:24:08 +01:00
Rasmus Wriedt Larsen
4b5599fe17
Python: Improve full/partial SSRF split
...
Now full-ssrf will only alert if **all** URL parts are fully
user-controlled.
2021-12-16 22:48:51 +01:00
Rasmus Wriedt Larsen
cb934e17b1
Python: Adjust SSRF location to request call
...
Since that might not be the same place where the vulnerable URL part is.
2021-12-16 22:48:51 +01:00
Rasmus Wriedt Larsen
b1bca85162
Python: Add interesting test-case
2021-12-16 22:48:51 +01:00
Rasmus Wriedt Larsen
5a7efd0fee
Python: Minor adjustments to QLDoc of HTTP::Client::Request
2021-12-16 22:48:51 +01:00
Erik Krogh Kristensen
2626b0b3dc
QL: fix test workflow
2021-12-16 22:26:42 +01:00
Erik Krogh Kristensen
be076dc2c8
add Erik and Taus as QL-for-QL reviewers
2021-12-16 21:47:42 +01:00
Mathias Vorreiter Pedersen
53a1f935b7
C++: Fix join-order in 'HttpStringLiteral' charpred.
2021-12-16 17:12:50 +00:00
Chris Gavin
8fabbd697e
Merge pull request #7422 from github/todo-comment-kind
...
Add `kind` metadata to example query.
2021-12-16 16:36:15 +00:00
Chris Smowton
e3b2eed2d2
Merge pull request #7423 from github/atorralba/log4j-CVE-2021-45046
...
Java: Cover CVE-2021-45046 in the Log4jJndiInjection query
2021-12-16 16:00:45 +00:00
Nick Rolfe
dba26a92e9
Merge remote-tracking branch 'origin/main' into nickrolfe/user-controlled-bypass
2021-12-16 15:05:01 +00:00
Erik Krogh Kristensen
8eda061d2f
add dbscheme and codeql version to query hash
2021-12-16 15:49:07 +01:00
Tom Hvitved
579b58b8fa
Merge pull request #7402 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-12-16 15:42:10 +01:00
Arthur Baars
3ef707e358
Address comment
2021-12-16 15:38:41 +01:00
Arthur Baars
cdbd8b27d3
Ruby: SimpleParameter is not an Expr
2021-12-16 15:38:40 +01:00
Rasmus Wriedt Larsen
6ce1524192
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-12-16 15:19:37 +01:00
Chris Gavin
4a1e2ed408
Add a severity and select the correct number of columns.
2021-12-16 14:02:36 +00:00
Tom Hvitved
e9ef53c31b
Merge pull request #7390 from hvitved/ruby/deprecate-pattern-classes
...
Ruby: Deprecate `Pattern` classes
2021-12-16 14:36:13 +01:00
Tony Torralba
7d6cba77a0
Add tests
2021-12-16 13:44:01 +01:00
Tony Torralba
2e0ca6ce2b
Add stubs
2021-12-16 13:44:01 +01:00
Tony Torralba
7d70b77141
Add new sinks and taint steps
2021-12-16 13:43:58 +01:00
Chris Gavin
407c265daf
Add kind metadata to example query.
2021-12-16 12:12:36 +00:00
Michael Nebel
95d175e9e0
Merge pull request #7406 from michaelnebel/csharp-system-threading-csv
...
C#: Convert more flow summaries to CSV format.
2021-12-16 12:56:44 +01:00
Michael Nebel
d777ba8a25
C#: Cleanup private imports in LibraryTypeDataFlow.
2021-12-16 11:24:24 +01:00
Michael Nebel
a26403b359
Convert System.Tuple and friends flow to CSV format.
2021-12-16 11:20:04 +01:00
Asger Feldthaus
0e9c2377e3
JS: Use a field in RouterHandlerParameter
2021-12-16 10:26:35 +01:00
Michael Nebel
348e3b74f3
C#: Convert System.Text.Encoding flow to CSV format.
2021-12-16 10:03:12 +01:00
CodeQL CI
f274f06d9b
Merge pull request #7409 from asgerf/js/track-functions-with-methods
...
Approved by erik-krogh
2021-12-16 09:01:42 +00:00
CodeQL CI
acbf7913b2
Merge pull request #7408 from asgerf/js/trusted-types-sinks
...
Approved by esbena
2021-12-16 08:59:51 +00:00
Michael Nebel
a5c055581e
C#: Convert System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>.ConfiguredTaskAwaiter flow to CSV format.
2021-12-16 09:36:39 +01:00
Michael Nebel
ddb7d722bc
C#: Convert System.Runtime.CompilerServices.TaskAwaiter<> flow to CSV format.
2021-12-16 09:36:39 +01:00
Michael Nebel
bdd44c1c46
C#: Convert System.Runtime.CompilerServices.ConfiguredTaskAwaitable flow to CSV format.
2021-12-16 09:36:39 +01:00
Michael Nebel
034d45ddc0
C#: Convert System.Threading.Tasks.TaskFactory flow to CSV format.
2021-12-16 09:36:39 +01:00
Michael Nebel
440976fe63
C#: Convert System.Threading.Tasks.Task<> flow to CSV format.
2021-12-16 09:36:39 +01:00
Michael Nebel
cde98c7799
C#: Convert System.Threading.Tasks.Task flow to CSV format.
2021-12-16 09:36:39 +01:00
Michael Nebel
90d7b94b8a
Merge pull request #7413 from hvitved/csharp/fix-test
...
C#: Fix broken `FlowSummariesFiltered` test
2021-12-16 09:31:33 +01:00
Rasmus Wriedt Larsen
1cc5e54357
Python: Add SSRF queries
...
I've added 2 queries:
- one that detects full SSRF, where an attacker can control the full URL,
which is always bad
- and one for partial SSRF, where an attacker can control parts of an
URL (such as the path, query parameters, or fragment), which is not a
big problem in many cases (but might still be exploitable)
full SSRF should run by default, and partial SSRF should not (but makes
it easy to see the other results).
Some elements of the full SSRF queries needs a bit more polishing, like
being able to detect `"https://" + user_input` is in fact controlling
the full URL.
2021-12-16 01:48:34 +01:00
github-actions[bot]
18489c0ded
Add changed framework coverage reports
2021-12-16 00:09:34 +00:00
Dave Bartolomeo
d5ef1cf28d
Update docs/change-notes.md
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-12-15 15:58:14 -05:00
Rasmus Wriedt Larsen
579de0c3f0
Python: Remove getResponse and do manual taint steps
2021-12-15 21:55:04 +01:00
Rasmus Wriedt Larsen
f8fc583af3
Python: client request: getUrl => getAUrlPart
...
I think `getUrl` is a bit too misleading, since from the name, I would
only ever expect ONE result for one request being made.
`getAUrlPart` captures that there could be multiple results, and that
they might not constitute a whole URl.
Which is the same naming I used when I tried to model this a long time ago
a80860cdc6/python/ql/lib/semmle/python/web/Http.qll (L102-L111)
2021-12-15 21:55:04 +01:00
Rasmus Wriedt Larsen
6f81685f48
Python: Add modeling of http.client.HTTPResponse
2021-12-15 21:55:04 +01:00
Rasmus Wriedt Larsen
a5bae30d81
Python: Add tests of http.client.HTTPResponse
2021-12-15 20:39:46 +01:00
Tom Hvitved
4ccf9bf67c
Address review comments
2021-12-15 19:57:27 +01:00
Tom Hvitved
8f1b2b3bb5
C#: Fix broken FlowSummariesFiltered test
2021-12-15 18:32:25 +01:00
Arthur Baars
b53e3499cb
Merge pull request #7249 from ShockwaveNN/patch-1
...
Fix ruby incorrect version in documentation
2021-12-15 18:32:24 +01:00
luchua-bc
29ce0e9ef1
Add sanitizer for virtual method calls
2021-12-15 16:19:50 +00:00
Sam Partington
db7b3bc136
Remove experimental tag from non-ATM queries
2021-12-15 16:17:14 +00:00
Asger Feldthaus
53b3581ed0
JS: Add test to stress flow through properties
2021-12-15 17:16:56 +01:00
Tony Torralba
6dfe0ce7c5
Adapt chage note to new format
2021-12-15 16:57:20 +01:00
Tony Torralba
f0e9b768f2
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-12-15 16:53:47 +01:00
Tony Torralba
65b6c16254
Fix stub after merge
2021-12-15 16:53:47 +01:00
Tony Torralba
6363ff3c08
QLDoc
2021-12-15 16:53:46 +01:00
Tony Torralba
7a1b854678
Add change note
2021-12-15 16:53:46 +01:00
Tony Torralba
85526d71da
Add Fragment injection in PreferenceActivity query
2021-12-15 16:53:46 +01:00
Tony Torralba
701d12fb5b
Add Fragment injection query
2021-12-15 16:53:45 +01:00
Tony Torralba
efb471687c
Add stubs
2021-12-15 16:53:42 +01:00
Asger F
784991cce5
Update javascript/ql/lib/semmle/javascript/Routing.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-12-15 16:38:38 +01:00
Asger Feldthaus
79e6dcaf68
JS: Rename getValueAtAccessPath->getValueImplicitlyStoredInAccessPath
2021-12-15 16:37:28 +01:00
Asger Feldthaus
8aa4d8227e
JS: Rename RouteHandlerInput->RouteHandlerParameter
2021-12-15 16:32:18 +01:00
Tom Hvitved
3bc6247ad8
Merge pull request #7378 from hvitved/ruby/module-infinite-loop
...
Ruby: Prevent infinite recursion in module resolution library
2021-12-15 16:27:36 +01:00
Asger Feldthaus
218b746f6f
JS: Rename getAUseSite -> getRouteInstallation
2021-12-15 16:21:41 +01:00
Asger Feldthaus
4d85799fc7
JS: Add test for fastify-rate-limit
2021-12-15 16:18:22 +01:00
Asger Feldthaus
615b2ec539
JS: Fix handling of fastify-plugin
2021-12-15 16:04:46 +01:00
Asger Feldthaus
b226f767ad
JS: Fix tracking of fastify server instance
2021-12-15 16:04:45 +01:00
Asger Feldthaus
0ca9feb854
JS: Always treat routers as resuming dispatch
2021-12-15 16:01:59 +01:00
Asger F
1b20506947
Update javascript/ql/lib/semmle/javascript/frameworks/Fastify.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-12-15 16:00:19 +01:00
Asger Feldthaus
995e33158f
JS: Add test for res.locals flow to template
2021-12-15 16:00:19 +01:00
Asger Feldthaus
04bdba85ea
JS: Shift line numbers in test expectations
2021-12-15 16:00:19 +01:00
Asger F
c1bb40f439
Update javascript/ql/lib/semmle/javascript/frameworks/Express.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-12-15 16:00:19 +01:00
Asger Feldthaus
b2016bddac
JS: Merge concepts of client/database in MongoDB model
2021-12-15 16:00:19 +01:00
Geoffrey White
b142a79a35
C++: Remove unnecessary additional taint step.
2021-12-15 14:35:54 +00:00
Tom Hvitved
c6696adfde
Ruby: Add test case that would make old module resolution library diverge
2021-12-15 15:18:42 +01:00
Tom Hvitved
2187994f5c
Ruby: Prevent infinite recursion in module resolution library
2021-12-15 15:15:19 +01:00
Geoffrey White
f82683cdf4
C++: Clean up QLDoc.
2021-12-15 14:08:43 +00:00
Geoffrey White
4891a649a2
C++: Newlines.
2021-12-15 13:52:47 +00:00
Arthur Baars
7ddfc00655
Merge branch 'main' into patch-1
2021-12-15 14:52:35 +01:00
Mathias Vorreiter Pedersen
8208f92f59
An alternative design for 'cpp/cleartext-transmission'.
2021-12-15 13:52:15 +00:00
Tony Torralba
7e644d8d7b
Merge pull request #6098 from atorralba/atorralba/entrypoint-field-steps
...
Java: Preserve taint on field-read-steps on entrypoint types
2021-12-15 14:51:38 +01:00
Erik Krogh Kristensen
76dcfd479e
more specific search path for dataset measure job
2021-12-15 14:36:43 +01:00
Erik Krogh Kristensen
133c496b94
Merge branch 'main' into erik-krogh/publish-ql-for-ql
2021-12-15 14:34:04 +01:00
Erik Krogh Kristensen
4beaceec68
QL: fix Buildins/Builtins typo
2021-12-15 14:26:58 +01:00
Erik Krogh Kristensen
fb979231f3
QL: merge the .codeqlmanifest.json file in the root
2021-12-15 14:22:40 +01:00
Erik Krogh Kristensen
0ac3e5c3ad
Merge QL for QL into github/codeql
2021-12-15 14:19:53 +01:00
Erik Krogh Kristensen
8d91ba2a6e
QL: fix Esbens workflow comments
2021-12-15 14:07:36 +01:00
Erik Krogh Kristensen
77cb822907
QL: fix search path for dataset measure
2021-12-15 13:34:33 +01:00
Tony Torralba
c1e4c05aa2
Update change note to new format
2021-12-15 13:08:34 +01:00
Tony Torralba
e2022f467c
Update java/ql/lib/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-12-15 13:00:16 +01:00
Tony Torralba
a3b25f0eb5
Don't consider subtypes of fields
2021-12-15 13:00:16 +01:00
Tony Torralba
47002a3bd7
Fix test
2021-12-15 13:00:16 +01:00
Tony Torralba
1426c5b406
Consider parameterized types
2021-12-15 13:00:16 +01:00
Tony Torralba
7ce9b04941
Add change note
2021-12-15 13:00:15 +01:00
Tony Torralba
5e80044f11
Preserve taint on field-read-steps on entrypoint types
2021-12-15 13:00:15 +01:00
Asger Feldthaus
e64a6dc12a
JS: Add qldoc
2021-12-15 12:47:23 +01:00
Erik Krogh Kristensen
faaa74b1cd
QL: move .git files into the ql/ folder
2021-12-15 12:25:08 +01:00
Erik Krogh Kristensen
24c2578540
QL: cache query compilation
2021-12-15 12:25:08 +01:00
Erik Krogh Kristensen
5d93309ada
QL: call the product QL for QL (because it rolls nicely).
...
and update the readme.
2021-12-15 12:25:06 +01:00
Erik Krogh Kristensen
d89c41bae4
QL: update the readme
2021-12-15 12:24:51 +01:00
Asger Feldthaus
43ec721a87
JS: Add link to MDN docs for trusted types
2021-12-15 11:52:58 +01:00
Geoffrey White
9363d64166
Merge pull request #7395 from MathiasVP/fix-fp-in-pointless-self-comparison
...
C++: Fix FP in `cpp/comparison-of-identical-expressions`
2021-12-15 10:47:57 +00:00
Mathias Vorreiter Pedersen
65c301c39f
Update cpp/ql/test/query-tests/Likely Bugs/Arithmetic/BadAdditionOverflowCheck/templates.cpp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-12-15 09:22:41 +00:00
Michael Nebel
0e7fdbeeab
Merge pull request #7384 from michaelnebel/csharp-mad-xml
...
C#: Convert XML related flow summaries to CSV and fix flow summaries test cases.
2021-12-15 09:51:20 +01:00
Harry Maclean
062f7fe390
Merge pull request #7340 from github/hmac/private-methods
...
Ruby: handle private module methods
2021-12-15 21:07:49 +13:00
Harry Maclean
a32711245f
Ruby: Further speed up private method modelling
2021-12-15 17:38:52 +13:00
Dave Bartolomeo
712d71856b
Merge pull request #7401 from github/release-prep/2.7.4
...
Release preparation for version 2.7.4
2021-12-14 16:42:33 -05:00
github-actions[bot]
59da2cdf69
Release preparation for version 2.7.4
2021-12-14 21:35:09 +00:00
Dave Bartolomeo
8b0c79d16f
Add link to change-notes.md from CONTRIBUTING.md.
2021-12-14 14:30:45 -05:00
Dave Bartolomeo
744d139daf
Add more examples
2021-12-14 14:24:39 -05:00
Dave Bartolomeo
97193f72b3
Update Adding change notes.md
...
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com >
2021-12-14 14:15:34 -05:00
Dave Bartolomeo
1a2899168f
Remove stray text
2021-12-14 14:15:00 -05:00
Dave Bartolomeo
e1c9bf2b30
Fix PR feedback
2021-12-14 14:13:07 -05:00
Tom Hvitved
15caaa7ad6
Merge pull request #7377 from hvitved/csharp/overriable-class
...
C#: Introduce class `Overridable`
2021-12-14 20:01:12 +01:00
Dave Bartolomeo
6664a3814a
Merge pull request #7398 from github/dbartol/fix-change-notes
...
Fix change notes
2021-12-14 13:53:08 -05:00
Dave Bartolomeo
a23fe04ccb
Add instructions for creating change notes.
2021-12-14 13:42:52 -05:00
Alex Ford
5fa6ecc5f1
Ruby: Model what is written to the log from stdlib Logger methods
2021-12-14 17:39:12 +00:00
Dave Bartolomeo
fa40d59332
Move older change notes to old-change-notes
...
Now that change notes are per-package, new change notes should be created in the `change-notes` folder under the affected pack (e.g., `cpp/ql/src/change-notes` for C++ query change notes. I've moved all of the change note files that were added before we started publishing them in packs to an `old-change-notes` directory under each language, to reduce the temptation to add new change notes there.
I'm working on a document to describe how and when to create change notes for packs separately.
2021-12-14 12:35:04 -05:00
Mathias Vorreiter Pedersen
310353060e
C++: Also fix the FP in 'cpp/comparison-canceling-subexpr'.
2021-12-14 17:08:10 +00:00
Dave Bartolomeo
a62f181d42
Move new change notes to appropriate packs
2021-12-14 12:05:15 -05:00
Mathias Vorreiter Pedersen
b2082cc3da
C++: Fix false positive in 'cpp/cpp/comparison-of-identical-expressions'.
2021-12-14 16:39:25 +00:00
Mathias Vorreiter Pedersen
9d14a85f3f
C++: Add false positive.
2021-12-14 16:38:19 +00:00
Erik Krogh Kristensen
dc9187778b
QL: simplify the build/analyze workflow into a single workflow
2021-12-14 17:29:35 +01:00
Alex Ford
861ae856b3
Merge pull request #7391 from github/ruby/callnode-more-predicates
...
Ruby: Add `getBlock` and `getNumberOfArguments` predicates to `DataFlow::CallNode`
2021-12-14 16:10:13 +00:00
Erik Krogh Kristensen
f5788b9441
QL: adjust remaining workflows to work in the QL folder
2021-12-14 17:03:26 +01:00
Michael Nebel
edf472b9ed
C#: Convert System.Xml.XmlReader flow to CSV format.
2021-12-14 16:01:40 +01:00
Erik Krogh Kristensen
fdb15d6073
QL: remove workflow that ran CodeQL with a published pack
2021-12-14 15:57:09 +01:00
Erik Krogh Kristensen
633597cc90
QL: remove the nightly ql-for-ql job
2021-12-14 15:57:09 +01:00
Erik Krogh Kristensen
b73b60d431
QL: remove the .devcontainer
2021-12-14 15:57:09 +01:00
Erik Krogh Kristensen
08b06422ff
QL: remove repo-tests
2021-12-14 15:57:09 +01:00
Michael Nebel
a04920f241
C#: Convert System.Xml.XmlDocument flow to CSV format.
2021-12-14 15:56:55 +01:00
Michael Nebel
4bf2a514ac
C#: XmlDocument only has instance Load methods.
2021-12-14 15:55:28 +01:00
Michael Nebel
376ee33707
C#: Convert System.Xml.XmlNode flow to CSV format.
2021-12-14 15:55:23 +01:00
Michael Nebel
4a71aa2165
C#: Update the flow summaries test expected output.
2021-12-14 15:53:16 +01:00
Michael Nebel
fc3299801b
C#: Fix issue with summary tests, such that the output is compatiable with flow summary interpreter.
2021-12-14 15:53:16 +01:00
Michael Nebel
2cac729598
C#: Convert System.Xml.XmlNamedNodeMap flow to CSV format.
2021-12-14 15:53:11 +01:00
Michael Nebel
c5728b2951
Merge pull request #7389 from michaelnebel/csharp-mad-io
...
C#: Convert flow summaries to CSV for System.IO.*
2021-12-14 15:49:08 +01:00
Bas van Schaik
80b9ccff2b
Merge pull request #7388 from github/sj-patch-log4j-query-description
...
Clarify Log4jJndiInjection.ql query name and help
2021-12-14 14:32:17 +00:00
Tom Hvitved
e882cdaca4
Ruby: Add missing getCallable() for nested destructured parameters
2021-12-14 15:04:40 +01:00
Tom Hvitved
10b2a0a54a
Ruby: Add test for nested destructured parameters
2021-12-14 15:04:40 +01:00
Tom Hvitved
9ea8b20e77
Ruby: Deprecate Pattern classes
2021-12-14 15:04:40 +01:00
Mathias Vorreiter Pedersen
dd6085f0a6
C++/C#: Sync identical files.
2021-12-14 13:56:39 +00:00
Mathias Vorreiter Pedersen
3da1c2bde1
C++: Fix join-order in 'isArgumentForParameter'.
2021-12-14 13:56:31 +00:00
Tony Torralba
68a0efaf0c
Formatting
2021-12-14 14:53:38 +01:00
Erik Krogh Kristensen
8eac1dcf15
QL: move .vscode folder inside the ql subfolder
2021-12-14 14:39:03 +01:00
Erik Krogh Kristensen
56a8cdb171
move files and folder, except dotfiles, into a ql subfolder
2021-12-14 14:34:53 +01:00
Erik Krogh Kristensen
d06ac78e4d
QL: move files and folder, except dotfiles, into a ql subfolder
2021-12-14 14:34:53 +01:00
Alex Ford
3262a14f22
Ruby: use DataFlow::CallNode#getBlock to remove a cast
2021-12-14 13:23:38 +00:00
Tom Hvitved
b524a6104d
Merge pull request #7368 from github/hvitved-patch-1
...
Update creating-codeql-databases.rst
2021-12-14 14:12:21 +01:00
Michael Nebel
b921fc62b8
C#: Some manual modifications to the System.IO flow summaries.
2021-12-14 14:02:25 +01:00
Alex Ford
f3dcccb64b
Ruby: Add getBlock and getNumberOfArguments predicates to DataFlow::CallNode
2021-12-14 12:58:15 +00:00
Michael Nebel
c1cf44b342
C#: Remove unneeded imports.
2021-12-14 13:47:57 +01:00
Michael Nebel
16bcb4ec86
C#: Convert System.IO.Path flow to CSV format.
2021-12-14 13:44:27 +01:00
Michael Nebel
ca5c6923da
C#: Convert System.IO.Compression flow to CSV format.
2021-12-14 13:37:08 +01:00
Bas van Schaik
d85ed9ea7a
Clarify Log4jJndiInjection.ql query help
2021-12-14 12:32:36 +00:00
Asger Feldthaus
7e947b2a65
JS: Use return value of trusted type policy callback as a sink
2021-12-14 13:28:46 +01:00
Michael Nebel
45e416b87b
C#: Convert System.IO.Stream flow to CSV format.
2021-12-14 13:28:25 +01:00
Michael Nebel
dd1ae0bbb5
C#: Convert System.IO.MemoryStream flow to CSV format.
2021-12-14 13:23:26 +01:00
Chris Smowton
85ff57bae6
Merge pull request #7354 from atorralba/atorralba/log4j-rce-experimental-query
...
Java: Experimental query for Log4j JNDI Injection
2021-12-14 11:32:13 +00:00
Tom Hvitved
a9c438924e
C#: Introduce class Overridable
...
The class `Overridable` generalizes the existing class `Virtualizable` by also
including accessors. This allows for quite a bit of code to be simplified.
2021-12-14 10:52:13 +01:00
Tom Hvitved
8d607e6251
Docs: Add paragraph about C# shared compilation
2021-12-14 10:40:07 +01:00
Tom Hvitved
37d76f5e49
Merge pull request #6791 from hvitved/csharp/update-nuget-packages
...
C#: Update nuget packages
2021-12-14 10:20:15 +01:00
Mathias Vorreiter Pedersen
6fda5e8f5b
Merge pull request #7272 from github/redsun82/cpp-overrunning-write-precision-split
...
C++: refactor buffer overwrite queries with estimate reasons
2021-12-14 08:50:30 +00:00
Ian Wright
1c79d1f985
Merge pull request #7352 from github/esbena/atm-endpoint-polish
...
ATM Endpoint filtering improvements
2021-12-14 08:19:23 +00:00
Paolo Tranquilli
0d7d60eebd
C++: add small docstring fix
2021-12-14 08:15:45 +00:00
Tamás Vajk
81dedfe22f
Merge pull request #7381 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-12-14 08:42:43 +01:00
Tony Torralba
aee617f911
Autoformat
2021-12-14 08:40:30 +01:00
github-actions[bot]
3c57602653
Add changed framework coverage reports
2021-12-14 00:09:54 +00:00
Harry Maclean
f21948d0ca
Ruby: Speed up private method modelling
2021-12-14 11:10:38 +13:00
Esben Sparre Andreasen
1949a4e59a
autoformat
2021-12-13 22:21:52 +01:00
Erik Krogh Kristensen
de4458346f
Merge pull request #7344 from SZFsir/main
...
JS: Improve inter-procedural type inference for FunctionExpr
2021-12-13 21:58:53 +01:00
Tony Torralba
1b761b3d12
Apply suggestions from code review
2021-12-13 20:38:06 +01:00
Tony Torralba
ff2f5a5f91
Apply suggestions from code review
...
Co-authored-by: Bas van Schaik <5082246+sj@users.noreply.github.com >
2021-12-13 19:44:38 +01:00
Tony Torralba
d2dc19900f
Apply suggestions from code review
...
Co-authored-by: Bas van Schaik <5082246+sj@users.noreply.github.com >
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-12-13 19:39:52 +01:00
Geoffrey White
041c2c77b3
C++: Separate two test cases slightly so that we get clearer test coverage of the interprocedural / multi-path cases.
2021-12-13 18:18:29 +00:00
Nick Rolfe
dc27089714
Merge pull request #7375 from github/nickrolfe/cargo_update
...
Ruby: update crate versions
2021-12-13 18:16:29 +00:00
Dave Bartolomeo
7732c0885f
Merge pull request #7374 from aeisenberg/aesenberg/upgrades-semver
...
Fix semver for upgrades references
2021-12-13 13:06:59 -05:00
Sergey
0f0bd34958
Update IncorrectPrivilegeAssignment.ql
2021-12-13 20:35:13 +03:00
Andrew Eisenberg
0669ef505e
Fix semver for upgrades references
...
Ensure the version range is flexible enough to handle
future version changes.
2021-12-13 09:03:33 -08:00
Aditya Sharad
372f099850
Merge pull request #7323 from adityasharad/atm/perf-debugging-std-lib
...
JS: Performance improvements to libraries using regex matching
2021-12-13 08:53:11 -08:00
Nick Rolfe
b18f7a9bd7
Ruby: update crate versions
2021-12-13 15:37:35 +00:00
Rasmus Wriedt Larsen
cf2ee0672f
Python: Model requests Responses
2021-12-13 15:09:46 +01:00
Michael Nebel
c0b61d7f73
Merge pull request #7370 from michaelnebel/csharp-mad-textreader
...
C#: Flow summaries for virtual members in abstract classes should also apply to overrides.
2021-12-13 15:00:54 +01:00
Rasmus Wriedt Larsen
35cba17642
Python: Consider taint of client http requests
2021-12-13 14:56:16 +01:00
Rasmus Wriedt Larsen
b68d280129
Python: Add modeling of requests
2021-12-13 14:56:16 +01:00
Alex Ford
124aac23c6
Merge pull request #7371 from github/ruby/comment-new-syntax
...
Ruby: use Ruby object instantiation syntax in a comment
2021-12-13 13:23:03 +00:00
Rasmus Wriedt Larsen
1ff56d5143
Python: Add tests of requests
...
Also adjusts test slightly. Writing
`clientRequestDisablesCertValidation=False` to mean that certificate
validation was disabled by the `False` expression is just confusing, as
it easily reads as _certificate validate was NOT disabled_ :|
The new one ties to each request that is being made, which seems like
the right setup.
2021-12-13 14:07:32 +01:00
Alex Ford
4ae92667e1
Ruby: use Ruby object instantiation syntax in a comment
2021-12-13 12:54:45 +00:00
Michael Nebel
ba23393c0d
C#: Update test as we now also implicitly gets flow summary for StreamReader.
2021-12-13 13:51:53 +01:00
Michael Nebel
a6eba04793
C#: Convert System.IO.TextReader flow to CSV format.
2021-12-13 13:51:18 +01:00
Esben Sparre Andreasen
c66d29998e
update test output for additional DatabaseAccesses
2021-12-13 13:42:28 +01:00
Michael Nebel
88bb8a2704
C#: Update flow summaries test cases.
2021-12-13 13:14:49 +01:00
Michael Nebel
d699ca9aa8
C#: Flow summaries should also apply for overides or virtual members in abstract classes.
2021-12-13 13:09:40 +01:00
Paolo Tranquilli
5ed7056707
C++: remove deprecation from getMaxData
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
3734e1ca4f
C++: auto format
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
06acaef43e
C++: fix deprecation comments in BufferWrite
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
a089898220
C++: remove reason from OverrunWrite output
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
85de6dd667
C++: make BufferWrite changes backward compatible
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
88d65b8fcb
C++: postpone change-notes addition
...
We can add it later when more consistent changes to the queries are made
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
2020786fb0
C++: fix format
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
b0242dc55b
C++: more idiomatic BufferWriteEstimationReason
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
160635ba3c
C++: add missing docs for a toString predicate
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
a6cbe6f94c
C++: add missing change note and docs
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
fb03561a31
C++: add docstrings to Printf and BufferWrite
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
aa68c51797
C++: preserve Printf and BufferWrite API
2021-12-13 11:28:02 +00:00
Paolo Tranquilli
598f283715
C++: add reason to buffer write estimations
2021-12-13 11:28:02 +00:00
Tamas Vajk
26194be8b6
Add workaround for equal lambda parameter symbols with different hashcodes
2021-12-13 11:59:24 +01:00
Michael Nebel
7ff2ee695d
Merge pull request #7348 from michaelnebel/csharp-mad-as-csv-json
...
C#: Convert flow summaries for JSon.NET
2021-12-13 11:57:55 +01:00
Rasmus Wriedt Larsen
7bf285a52e
Python: Alter disablesCertificateValidation to fit our needs
...
For the snippet below, our current query is able to show _why_ we
consider `var` to be a falsey value that would disable SSL/TLS
verification. I'm not sure we're going to need the part that Ruby did,
for being able to specify _where_ the verification was removed, but
we'll see.
```
requests.get(url, verify=var)
```
2021-12-13 11:37:12 +01:00
JrXnm
efc9e67ec2
Update javascript/ql/lib/semmle/javascript/dataflow/internal/InterProceduralTypeInference.qll
...
Fix multiple declare may mismatch issue
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-12-13 18:36:06 +08:00
JrXnm
fad95d8935
Update javascript/ql/lib/semmle/javascript/dataflow/internal/InterProceduralTypeInference.qll
...
Commit coding style suggestion
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-12-13 18:32:11 +08:00
Rasmus Wriedt Larsen
08f6d1ab80
Python: Clearer sourceType for client response body
2021-12-13 11:24:38 +01:00
Rasmus Wriedt Larsen
5de79b4ffe
Python: Add HTTP::Client::Request concept
...
Taken from Ruby, except that `getURL` member predicate was changed to
`getUrl` to keep consistency with the rest of our concepts, and stick
to our naming convention.
2021-12-13 11:09:09 +01:00
Michael Nebel
f32d464c0f
C#: Ensure bi-directional import for External flow.
2021-12-13 10:50:49 +01:00
Michael Nebel
327cf444f4
C#: Convert Newtonsoft.JSon.Linq.JObject and Newtonsoft.JSon.Linq.JToken flow to CSV format.
2021-12-13 10:50:49 +01:00
Michael Nebel
f3c0eadbce
C#: Fix the existing callableFlow for JObject to target the inherited ToString methods from JToken.
2021-12-13 10:50:49 +01:00
Michael Nebel
58f36e4b31
C#: Convert NewtonSoft.Json.JSonSerializer flow to CSV format.
2021-12-13 10:50:49 +01:00
Michael Nebel
90e49508a3
C#: Convert Newtonsoft.Json.JsonConvert flow to CSV format.
2021-12-13 10:50:48 +01:00
Michael Nebel
a4bea05fa7
Merge pull request #7342 from michaelnebel/csharp-mad-as-csv3
...
C#: More Flow summaries in CSV format.
2021-12-13 10:32:28 +01:00
Rasmus Wriedt Larsen
1e45fa9ed4
JS/Py/Ruby: Add more CWEs to bad-tag-filter queries
...
CWE-185: Incorrect Regular Expression
The software specifies a regular expression in a way that causes data to
be improperly matched or compared.
https://cwe.mitre.org/data/definitions/185.html
CWE-186: Overly Restrictive Regular Expression
> A regular expression is overly restrictive, which prevents dangerous values from being detected.
>
> (...) [this CWE] is about a regular expression that does not match all
> values that are intended. (...)
https://cwe.mitre.org/data/definitions/186.html
From my understanding,
CWE-625: Permissive Regular Expression, is not applicable. (since this
is about accepting a regex match where there should not be a match).
2021-12-13 10:23:24 +01:00
Tom Hvitved
6f65f22db6
Update creating-codeql-databases.rst
...
Always use `/p:UseSharedCompilation=false` for `msbuild` / `dotnet build`.
2021-12-13 10:15:42 +01:00
Michael Nebel
be1e75471e
C#: Ensure bi-directional import for external flow.
2021-12-13 09:23:11 +01:00
Michael Nebel
1cab177f8a
C#: Convert System.Web.HttpUtility flow to CSV format.
2021-12-13 09:19:41 +01:00
Michael Nebel
0e0c3e3937
C#: Convert System.Web.HttpServerUtility flow to CSV format.
2021-12-13 09:19:41 +01:00
Michael Nebel
6301e726ee
C#: Update HttpServerUtility stub with HtmlEncode method and update flow summaries test.
2021-12-13 09:19:41 +01:00
Michael Nebel
1cd37dddf5
C#: Convert System.Net.WebUtility flow to CSV format.
2021-12-13 09:19:41 +01:00
Michael Nebel
07a4f5f748
C#: Update FlowSummaries test as the bogus flow summaries for the KeyValuePair default constructor has been removed.
2021-12-13 09:19:41 +01:00
Michael Nebel
679aad138e
C#: Convert System.Collections.Generic.KeyValuePair flow to CSV format.
2021-12-13 09:19:36 +01:00
Michael Nebel
42bf866fb3
C#: Convert System.Web.UI.WebControls.Textbox flow to CSV format.
2021-12-13 09:18:34 +01:00
Michael Nebel
9604ed883c
C#: Convert System.NET.IPHostEntry flow to CSV format.
2021-12-13 09:17:27 +01:00
Michael Nebel
d804893a49
C#: Convert System.Net.Cookie flow to CSV format.
2021-12-13 09:16:05 +01:00
Michael Nebel
03fb244545
C#: Convert System.Web.HttpCookie flow to CSV format.
2021-12-13 09:13:14 +01:00
Michael Nebel
a6360215f3
Merge pull request #7304 from michaelnebel/csharp-mad-as-csv2
...
C#: Convert flow summaries to CSV format.
2021-12-13 08:56:06 +01:00
Harry Maclean
0ca9852cc8
Merge pull request #7325 from github/hmac/action-controller-private-methods
...
Ruby: Don't count private methods as Rails actions
2021-12-13 20:47:22 +13:00
Harry Maclean
6223b166c2
Update test fixtures
...
At the same time, rename some classes in `private.rb` so they don't
interact with identically-named modules in `calls.rb`.
2021-12-13 16:24:25 +13:00
Harry Maclean
e1d290d4c0
Ruby: Don't count private methods as Rails actions
...
Private instance methods on ActionController classes aren't valid
request handlers. Routing to them will raise an exception.
2021-12-13 15:36:55 +13:00
Aditya Sharad
1857de1f33
JS: Speed up detection of jQuery marker comments
...
Combine two regexes into a single one.
This saves up to 5s on large databases by reducing the number
of separate scans of the comments table before regex matching.
The combined regex is slightly more permissive than the
original two, since it allows a combination of the two
matched formats. A string that matches one of the original
regexes will match the combined regex.
2021-12-10 15:30:02 -08:00
Nick Rolfe
b80a84c156
Merge pull request #7341 from github/nickrolfe/cookies
2021-12-10 19:52:23 +00:00
Aditya Sharad
6a1aea740f
JS: Avoid scanning individual comment lines to find generated code markers
...
Some subclasses of GeneratedCodeMarkerComment regex match against `getLine(_)`.
When evaluated, this results in multiple scans (one per subclass that uses it)
of all comment lines in the database, before regex matching against those lines.
To make these scans smaller, regex match against the entire comment text
without splitting them into lines.
This is achieved using `?m` (multiline) and line boundaries in the regexes.
2021-12-10 11:41:54 -08:00
Aditya Sharad
c9a87234ef
JS: Factor helper predicate to improve SensitiveWrite performance
2021-12-10 11:41:53 -08:00
Andrew Eisenberg
66c1629974
Merge pull request #7285 from github/post-release-prep-2.7.3-ddd4ccbb
...
Post-release preparation 2.7.3
2021-12-10 09:59:45 -08:00
Tony Torralba
43a10457dd
[Java] Query for Log4j JNDI Injection
2021-12-10 17:37:43 +01:00
Nick Rolfe
b6c5b4d213
Ruby: define ActionViewCookiesCall
2021-12-10 16:36:26 +00:00
yoff
d8857c7ce8
Merge pull request #7246 from tausbn/python/import-star-flow
...
Python: Support flow through `import *`
2021-12-10 16:34:32 +01:00
Henry Mercer
a46787ea07
Merge pull request #7351 from github/henrymercer/js-atm-heuristic-sinks-improvements
...
JS: Improve handling of heuristic sinks in endpoint filters
2021-12-10 14:56:45 +00:00
Rasmus Wriedt Larsen
bd9b96e154
Merge pull request #7331 from tausbn/python-fix-bad-callsite-points-to-join
...
Python: Fix bad `callsite_points_to` join
2021-12-10 15:39:49 +01:00
Rasmus Wriedt Larsen
8ee020f79c
Merge pull request #7332 from tausbn/python-fix-bad-scope-entry-points-to-join
...
Python: Fix bad `scope_entry_points_to` join
2021-12-10 15:33:13 +01:00
Esben Sparre Andreasen
13288be7fc
make ATM anti sink model for dojo.require
2021-12-10 15:07:51 +01:00
Esben Sparre Andreasen
9ffc02944d
add file write model for express-fileupload mv
2021-12-10 15:05:34 +01:00
Esben Sparre Andreasen
cfd2dcffa0
recognize more modelled database accesses
2021-12-10 14:54:59 +01:00
Esben Sparre Andreasen
b0f6cf1491
expose more marsdb calls as database accesses
2021-12-10 13:46:19 +01:00
Esben Sparre Andreasen
9df1ac7f75
treat redis and ioredis usage as database access
2021-12-10 13:26:26 +01:00
Esben Sparre Andreasen
10498c3643
treat jQuery as fully modelled
2021-12-10 12:51:45 +01:00
Nick Rolfe
a4da528812
Ruby: query to find user-controlled bypass of sensitive actions
2021-12-10 11:41:09 +00:00
Esben Sparre Andreasen
a1ee900f50
treat Base64 manipulations as non-sinks
2021-12-10 12:37:44 +01:00
Henry Mercer
6e167040f5
Merge pull request #7307 from adityasharad/atm/perf-debugging
...
JS/ATM: Various compilation fixes and performance improvements
2021-12-10 11:00:27 +00:00
Anders Schack-Mulligen
464b9c3991
Dataflow: Sync.
2021-12-10 11:20:01 +01:00
Anders Schack-Mulligen
32cb8f362b
Dataflow: Add test for FlowState.
2021-12-10 11:20:01 +01:00
Anders Schack-Mulligen
219bf51ec2
Dataflow: Add support for flow state.
2021-12-10 11:20:01 +01:00
Tom Hvitved
657cd89286
Merge pull request #7347 from hvitved/cfg/more-consistency-tests
...
Shared CFG: Add two more consistency queries
2021-12-10 10:50:39 +01:00
Tamas Vajk
d2822c2acc
Rework semantic model caching
2021-12-10 10:42:30 +01:00
Tamas Vajk
704a5e4bbf
Revert "C#: Avoid NPE in Parameter.Populate"
...
This reverts commit 08eb7e207d1e12c9578e07ee0a1d79bf6b62f60f.
2021-12-10 10:42:30 +01:00
Tom Hvitved
8ccbcf1bf8
C#: Avoid NPE in Parameter.Populate
2021-12-10 10:42:29 +01:00
Tom Hvitved
563b771163
C#: Update expected test output
2021-12-10 10:42:29 +01:00
Tom Hvitved
0a0657ada1
C#: Adapt to new Roslyn representation of implicit Main methods
2021-12-10 10:42:29 +01:00
Tom Hvitved
1c230d0888
C#: Update nuget packages
2021-12-10 10:42:29 +01:00
Michael Nebel
afa58f5676
C#: Ensure bi-directional importing of external flow for System.Text.
2021-12-10 10:28:35 +01:00
Arthur Baars
13f7fd88f1
Merge pull request #7283 from aibaars/ruby-pattern-matching-cfg
...
Ruby: pattern matching: CFG
2021-12-10 10:24:38 +01:00
Anders Schack-Mulligen
634ed91904
Merge pull request #7346 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-12-10 10:12:23 +01:00
Tom Hvitved
cf42427f54
Merge pull request #7321 from hvitved/csharp/cil/unique-type
...
C#: Avoid CIL instructions with multiple types
2021-12-10 09:58:06 +01:00
Tom Hvitved
f7f3890b40
Merge pull request #7320 from hvitved/csharp/unknown-type
...
C#: Populate `UnknownType`
2021-12-10 09:57:55 +01:00
Tom Hvitved
70f76d06c7
Shared CFG: Add two more consistency queries
2021-12-10 09:56:50 +01:00
Tom Hvitved
45c0d4a3b2
Merge pull request #7343 from hvitved/cfg/consistency-test
...
Shared CFG: Add another consistency test
2021-12-10 09:49:05 +01:00
Asger Feldthaus
b336c29283
JS: Track functions with methods
2021-12-10 09:38:29 +01:00
Asger Feldthaus
4ef2a5f4f1
JS: Add test
2021-12-10 09:38:29 +01:00
github-actions[bot]
7e5bfa5aa0
Add changed framework coverage reports
2021-12-10 00:09:34 +00:00
Aditya Sharad
271b23ba8f
JS: Expand explanatory comment about version placeholders
2021-12-09 13:43:08 -08:00
Aditya Sharad
0c3daabc51
JS: Fix broken regex matching predicate
...
The receiver string and the regex were in the wrong order,
leading to test failures when looking for matching comments.
2021-12-09 13:42:33 -08:00
Chris Smowton
753d886b0d
Merge pull request #6319 from haby0/java/MyBatisSqlInjection
...
[Java] CWE-089 MyBatis Mapper Sql Injection
2021-12-09 19:57:18 +00:00
Taus
6d247bfdf9
Merge pull request #7330 from tausbn/python-fix-bad-adjacentuseuse-join
...
Python: Fix bad join in SSA
2021-12-09 20:55:45 +01:00
Erik Krogh Kristensen
e7209d1ee1
Merge pull request #7216 from erik-krogh/ts45
...
JS: Add support for TypeScript 4.5
2021-12-09 20:33:52 +01:00
Geoffrey White
23d4d035e5
C++: Different approach to sensitive exprs.
2021-12-09 18:33:50 +00:00
Geoffrey White
65f4ccce28
C++: Another test case.
2021-12-09 18:20:52 +00:00
Chris Smowton
75f3ebf051
Fix OTHER XML tag
2021-12-09 17:55:03 +00:00
Chris Smowton
9f69c75c50
Fix XML tag
2021-12-09 17:44:49 +00:00
Chris Smowton
2cd70b96cd
Fix doctype
2021-12-09 17:44:08 +00:00
JrXnm
1a1a7413c2
JS: Improv inter-procedural type inference for FunctionExpr
2021-12-10 01:09:49 +08:00
Michael Nebel
d60b90acd3
C#: Manual update of System.String and System.Convert flow summaries.
2021-12-09 16:34:42 +01:00
Michael Nebel
e879ca7a3b
C#: Convert System.Convert flow to CSV format.
2021-12-09 16:34:42 +01:00
Michael Nebel
15b4b218c8
C#: Convert System.Nullable<> flow to CSV format.
2021-12-09 16:34:42 +01:00
Michael Nebel
bbab0e582a
C#: Convert System.Lazy<> flow to CSV format.
2021-12-09 16:34:42 +01:00
Michael Nebel
9e61dfb41f
C#: Convert System.Text.StringBuilder flow to CSV format.
2021-12-09 16:34:41 +01:00
Michael Nebel
5a26346ba5
C#: Allow the use of pointer types in CSV validation.
2021-12-09 16:34:41 +01:00
Michael Nebel
5376eb89b3
C#: Convert System.String flow to CSV format.
2021-12-09 16:34:41 +01:00
Michael Nebel
df482a9603
Merge pull request #7314 from michaelnebel/csharp-stubs-dataflow-global
...
C#: Update tests dataflow/global tests to use stubs.
2021-12-09 16:31:39 +01:00
Chris Smowton
470256da85
Copyedit
2021-12-09 15:10:07 +00:00
Tony Torralba
8bba3eb2b6
Merge pull request #6823 from atorralba/atorralba/android-notification-models
...
Android: Add models for `android.app.Notification` builders
2021-12-09 16:01:44 +01:00
Henry Mercer
f08f07e19e
JS: Improve handling of heuristic sinks in endpoint filters
...
Previously heuristic sinks were always included, to avoid us filtering
them out due to not being an argument to an external library call.
In this commit we move the argument to an external library call
filtering to the query-specific endpoint filters.
This lets us filter out heuristic sinks if they match one of the other
endpoint filters, reducing FPs.
2021-12-09 15:00:54 +00:00
Chris Smowton
d0a19fffee
Copyedit
2021-12-09 14:58:29 +00:00
Tom Hvitved
7e99426141
C#: Address review comments
2021-12-09 15:51:54 +01:00
Tom Hvitved
2bf5966fe3
C#: Address review comment
2021-12-09 15:44:43 +01:00
Arthur Baars
fd4915a564
Ruby: CFG: add default implementation for getAnInnerCompatibleCompletion
2021-12-09 15:23:26 +01:00
Arthur Baars
9d288c90a5
Ruby: CFG: better return type for getAMatchingSuccessorType
2021-12-09 15:23:26 +01:00
Arthur Baars
a7b3f1370f
Ruby: CFG: add test case
2021-12-09 15:23:26 +01:00
Arthur Baars
d0aa307bd3
Ruby: CFG: fix multiple successors failure for default parameters
2021-12-09 15:23:26 +01:00
Tom Hvitved
b887165005
Ruby: Code review suggestions
2021-12-09 15:23:26 +01:00
Arthur Baars
3689481c18
Ruby: CFG: make Completion.isValidFor work for getSugared AST nodes
2021-12-09 15:23:26 +01:00
Arthur Baars
660e52f2bf
Ruby: CFG: make VariableReferencePattern a PreOrder node
2021-12-09 15:23:26 +01:00
Arthur Baars
e9e3ef3ea2
Ruby: 'self' is not really a local variable
2021-12-09 15:23:26 +01:00
Arthur Baars
799c945299
Ruby: fix CFG for AsPattern
2021-12-09 15:23:26 +01:00
Arthur Baars
95f8f85aa2
Ruby: fix allowed completions for desugared CasePatterns
2021-12-09 15:23:26 +01:00
Arthur Baars
aacba0b522
Ruby: CFG: add test cases for pattern matching
2021-12-09 15:23:26 +01:00
Arthur Baars
513fe09dbb
Treat class names in array/find/hash patterns as sub-patterns
2021-12-09 15:23:26 +01:00
Arthur Baars
d17c055139
CFG
2021-12-09 15:23:25 +01:00
Arthur Baars
44a615839d
Add test case with rest variable and no prefix elements
2021-12-09 15:23:25 +01:00
Arthur Baars
f08eb8e616
Revert "Temporarily allow CFG inconsistencies"
...
This reverts commit dca1e34cd8 .
2021-12-09 15:23:25 +01:00
Michael Nebel
69f42b9c74
C#: Update remaining tests.
2021-12-09 15:21:08 +01:00
Tony Torralba
38250b0821
Remove unnecessary implicit read step
2021-12-09 15:18:38 +01:00
Tom Hvitved
cbc96dba8a
Shared CFG: Add another consistency test
...
Finds nodes with multiple normal successors, where one is the special simple
successor. For example, this would flag a node that has both a "simple" and
a "true" successor.
2021-12-09 15:08:19 +01:00
Tony Torralba
522a4bb9fa
Propagate extras through build methods
2021-12-09 14:56:52 +01:00
yoff
8e11c2c476
Merge pull request #7259 from RasmusWL/even-more-path-injection-sinks
...
Python: Add more path-injection sinks from `os` and `tempfile` modules
2021-12-09 14:46:41 +01:00
Michael Nebel
992801b7cb
C#: Update GetAnOutNode test.
2021-12-09 13:55:04 +01:00
Tom Hvitved
9ffa236c51
Merge pull request #7288 from hvitved/cfg/enclosing-scope
...
Shared CFG: Include CFG scope in `TElementNode`
2021-12-09 13:39:48 +01:00
Tony Torralba
c0c40cc05b
Remove synthetic fields
2021-12-09 13:34:41 +01:00
Tony Torralba
3a3c7fc59e
Fix stub
2021-12-09 13:34:41 +01:00
Tony Torralba
f209ff4f76
Use synthetic fields to improve taint precision
2021-12-09 13:34:39 +01:00
Tony Torralba
b7f7c5ba20
Change format of fluent models to make review easier
2021-12-09 13:33:19 +01:00
Tony Torralba
f63ffb0630
Add models for Notification builders
2021-12-09 13:33:17 +01:00
Tom Hvitved
069cf9d17f
C#: Exclude stubs in GetAnOutNode.ql test
2021-12-09 13:33:14 +01:00
Tom Hvitved
cbd21edc99
C#: Override File::isFromSource in tests to exclude stubs
2021-12-09 13:33:14 +01:00
Michael Nebel
2f85735b6a
C#: Use stubs instead of dll's in the dataflow global tests.
2021-12-09 13:25:11 +01:00
Tom Hvitved
69ba2e6f8c
Merge pull request #7337 from michaelnebel/csharp-synthetic-field
...
C#: Introduce synthetic fields and use them in Task<>.
2021-12-09 13:18:44 +01:00
Nick Rolfe
d46564caa6
Ruby: treat ActionController#cookies as a remote flow source
2021-12-09 12:13:17 +00:00
Nick Rolfe
f6a8b9a7e5
Ruby: add cookies call to frameworks test
2021-12-09 12:07:04 +00:00
Taus
b871342e83
Python: A small further performance improvement
...
Unrolling the transitive closure had slightly better performance here.
Also, we exclude names of builtins, since those will be handled by a
separate case of `isDefinedLocally`.
2021-12-09 10:29:55 +00:00
Michael Nebel
13347cd102
C#: Add Ql docs to synthetic fields.
2021-12-09 10:34:31 +01:00
Michael Nebel
9f4b965202
C#: Update the flow summaries produced for Task<> after introduction of synthetic fields.
2021-12-09 10:11:49 +01:00
Michael Nebel
d70d1fbf81
C#: Add support for the use of synthetic fields in flow summary CSV.
2021-12-09 10:11:48 +01:00
Michael Nebel
a43704ab43
C#: Update dataflow/global tests based on synthetic fields.
2021-12-09 10:11:48 +01:00
Michael Nebel
063398f24d
C#: Use synthetic fields for Task instead of referring to private fields.
2021-12-09 10:11:48 +01:00
Michael Nebel
60f3ff8c33
C#: Introduce type for Synthetic fields.
2021-12-09 10:11:48 +01:00
Harry Maclean
8df5aaa797
Ruby: Model private class methods
...
`Module#private_class_method` takes a symbol representing the name of a
method in the current module scope and makes that module private. This
is similar to `private`, but applies only to class (singleton) methods.
Unlike `private`, it must be called with an argument, and does not
change the ambient visibility for any subsequent method definitions.
class Foo
def public
end
def private1
end
private_class_method :private1
# This alternate form works because method definition
# returns its name as a symbol:
private_class_method def private2
end
end
2021-12-09 18:15:25 +13:00
Harry Maclean
e811ba1150
Ruby: handle private module methods
...
`private` can be used in both classes and modules.
2021-12-09 18:13:29 +13:00
haby0
8bcbf8e30f
rename isMybatisCollectionTypeSqlInjection
2021-12-09 09:16:33 +08:00
Taus
8517eff0f7
Python: Fix bad performance
...
A few changes, all bundled together:
- We were getting a lot of magic applied to the predicates in the
`ImportStar` module, and this was causing needless re-evaluation.
To address this, the easiest solution was to simply cache the entire
module.
- In order to separate this from the dataflow analysis and make it
dependent only on control flow, `potentialImportStarBase` was changed
to return a `ControlFlowNode`.
- `isDefinedLocally` was defined on control flow nodes, which meant we
were duplicating a lot of tuples due to control flow splitting, to no
actual benefit.
Finally, there was a really bad join in `isDefinedLocally` that was
fixed by separating out a helper predicate. This is a case where we
could use a three-way join, since the join between the `Scope`, the
`name` string and the `Name` is big no matter what.
If we join `scope_defines_name` with `n.getId()`, we'll get `Name`s
belonging to irrelevant scopes.
If we join `scope_defines_name` with the enclosing scope of the `Name`
`n`, then we'll get this also for `Name`s that don't share their `getId`
with the local variable defined in the scope.
If we join `n.getId()` with `n.getScope()...` then we'll get all
enclosing scopes for each `Name`.
The last of these is what we currently have. It's not terrible, but not
great either. (Though thankfully it's rare to have lots of enclosing
scopes.)
2021-12-08 22:53:45 +00:00
Geoffrey White
0031ed39ec
C++: Additional test cases.
2021-12-08 17:45:51 +00:00
Tom Hvitved
b49ca6a24c
Merge pull request #7335 from hvitved/ruby/dataflow/hide-desugared-nodes
...
Ruby: Hide desugared nodes in data-flow paths
2021-12-08 17:39:48 +01:00
haby0
a18aad8536
Fix one
2021-12-08 21:03:17 +08:00
Anders Schack-Mulligen
38d0bb4a60
Merge pull request #7260 from hvitved/dataflow/argument-parameter-matching
...
Data flow: Introduce `ParameterPosition` and `ArgumentPosition`
2021-12-08 12:49:08 +01:00
haby0
1d321c692b
Refactor isMybatisXmlOrAnnotationSqlInjection
2021-12-08 18:59:55 +08:00
Alex Ford
ede1503cc6
Merge pull request #7328 from github/ruby/customizations
...
Ruby: add `Customizations.qll` file
2021-12-08 10:54:23 +00:00
Tom Hvitved
283173ad02
Address review comments
2021-12-08 11:26:44 +01:00
Erik Krogh Kristensen
3145e8f9b7
add upgrade script
2021-12-08 10:53:47 +01:00
Erik Krogh Kristensen
1956405d17
Merge pull request #7284 from erik-krogh/myApply-part1
...
JS: remove paths without unmatched returns from polynomial-redos
2021-12-08 10:46:03 +01:00
Tom Hvitved
5735bb698d
Ruby: Hide desugared nodes in data-flow paths
2021-12-08 09:00:16 +01:00
yoff
0e33f730b1
Merge pull request #7329 from tausbn/tausbn/python-fix-syntax-error-locations
...
Python: Fix syntax error locations
2021-12-07 22:45:35 +01:00
Geoffrey White
5ee9684435
C++: Change note.
2021-12-07 20:42:36 +00:00
Geoffrey White
122f6385e6
C++: Improve recognition of stdin, stdout etc.
2021-12-07 20:42:35 +00:00
Geoffrey White
6896b20dcd
C++: Redesign and fix results that appear to be encrypted.
2021-12-07 20:42:13 +00:00
Alex Ford
ea7063f3c6
Ruby: make Customizations import private
2021-12-07 19:43:08 +00:00
Tom Hvitved
490872173a
Data flow: Sync files
2021-12-07 20:29:18 +01:00
Tom Hvitved
07ca1c2ec0
Data flow: Adjust parameterMatch join-orders
2021-12-07 20:29:00 +01:00
Erik Krogh Kristensen
fe1a473f07
Merge pull request #138 from github/erik-krogh/bump-this
...
bump the severity of `ql/implicit-this`
2021-12-07 20:12:21 +01:00
Erik Krogh Kristensen
a722aeb5e3
QL: Merge pull request #138 from github/erik-krogh/bump-this
...
bump the severity of `ql/implicit-this`
2021-12-07 20:12:21 +01:00
Taus
e7c298d903
Python: Fix bad scope_entry_points_to join
...
From `pritomrajkhowa/LoopBound`:
```
Definitions.ql-7:PointsTo::PointsToInternal::scope_entry_points_to#ffff#antijoin_rhs#2 ........... 55.1s
```
specifically
```
(443s) Tuple counts for PointsTo::PointsToInternal::scope_entry_points_to#ffff#antijoin_rhs#2/3@74a7cart after 55.1s:
184070 ~0% {3} r1 = JOIN PointsTo::PointsToInternal::scope_entry_points_to#ffff#shared#1 WITH Variables::GlobalVariable#class#f ON FIRST 1 OUTPUT Lhs.0 'arg2', Lhs.1 'arg0', Lhs.2 'arg1'
184070 ~0% {3} r2 = STREAM DEDUP r1
919966523 ~2% {4} r3 = JOIN r2 WITH Essa::EssaDefinition::getSourceVariable_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'arg0', Lhs.2 'arg1', Lhs.0 'arg2'
4281779 ~2293% {3} r4 = JOIN r3 WITH Essa::EssaVariable::getScope_dispred#ff ON FIRST 2 OUTPUT Lhs.1 'arg0', Lhs.2 'arg1', Lhs.3 'arg2'
return r4
```
First, this is an `antijoin`, so there's likely some negation involved.
Also, there's mention of `GlobalVariable`, `getScope`, and
`getSourceVariable`, none of which appear in `scope_entry_points_to`, so
it's likely that something got inlined.
Taking a closer look at the predicates mentioned in the body, we spot
`undefined_variable` as a likely culprit.
Evaluating this predicate in isolation reveals that it's not terribly
big, so we could try just marking it with `pragma[noinline]` (I opted
for the slightly more solid `nomagic`) and see how that fares. I also
checked that `builtin_not_in_outer_scope` was similarly small, and
made that one un-inlineable as well.
The result? Well, I can't even show you. Both `scope_entry_points_to`
and `undefined_variable` are so fast that they don't appear in the
clause timing report (so they can at most take 3.5s each to evaluate, as
that is the smallest timing in the list).
2021-12-07 18:51:44 +00:00
Taus
b502ca1ea7
Python: Fix bad callsite_points_to join
...
From `pritomrajkhowa/LoopBound`:
```
Definitions.ql-7:PointsTo::InterProceduralPointsTo::callsite_points_to#ffff#join_rhs#3 ........... 5m53s
```
specifically
```
(767s) Tuple counts for PointsTo::InterProceduralPointsTo::callsite_points_to#ffff#join_rhs#3/3@f8f86764 after 5m53s:
832806293 ~0% {4} r1 = JOIN PointsTo::InterProceduralPointsTo::callsite_points_to#ffff#shared#1 WITH PointsTo::InterProceduralPointsTo::var_at_exit#fff ON FIRST 1 OUTPUT Lhs.0, Lhs.1 'arg1', Rhs.1 'arg2', Rhs.2 'arg0'
832806293 ~0% {3} r2 = JOIN r1 WITH Essa::TEssaNodeRefinement#ffff_03#join_rhs ON FIRST 2 OUTPUT Lhs.3 'arg0', Lhs.1 'arg1', Lhs.2 'arg2'
return r2
```
This one is a bit tricky to unpack. Where is this `shared#1` defined?
```
EVALUATE NONRECURSIVE RELATION:
SYNTHETIC PointsTo::InterProceduralPointsTo::callsite_points_to#ffff#shared#1(int arg0, numbered_tuple arg1) :-
SENTINEL PointsTo::InterProceduralPointsTo::callsite_points_to#ffff#shared
SENTINEL Definitions::EscapingAssignmentGlobalVariable#class#f
SENTINEL Essa::TEssaNodeRefinement#ffff_03#join_rhs
{2} r1 = JOIN PointsTo::InterProceduralPointsTo::callsite_points_to#ffff#shared WITH Definitions::EscapingAssignmentGlobalVariable#class#f ON FIRST 1 OUTPUT Lhs.0 'arg0', Lhs.1 'arg1'
{2} r2 = STREAM DEDUP r1
{2} r3 = JOIN r2 WITH Essa::TEssaNodeRefinement#ffff_03#join_rhs ON FIRST 2 OUTPUT Lhs.0 'arg0', Lhs.1 'arg1'
{2} r4 = STREAM DEDUP r3
return r4
```
Looking at `callsite_points_to`, we see a likely candidate in `srcvar`.
It is guarded with an `instanceof` check for
`EscapingAssignmentGlobalVariable` (which lines up nicely with the
sentinel on its charpred) and `getSourceVariable` is just a projection
of `TEssaNodeRefinement`.
So let's try unbinding `srcvar` to prevent an early join.
The timing is now:
```
Definitions.ql-7:PointsTo::InterProceduralPointsTo::callsite_points_to#ffff ...................... 31.3s (2554 evaluations with max 101ms in PointsTo::InterProceduralPointsTo::callsite_points_to#ffff/4@i516#581fap5w)
```
(Showing the tuple counts doesn't make sense here, since all of the
`shared` and `join_rhs` predicates have been smooshed around.)
2021-12-07 18:25:53 +00:00
Taus
a716482c1f
Python: Fix bad join in SSA
...
On `pritomrajkhowa/LoopBound`:
```
Definitions.ql-3:SsaCompute::SsaComputeImpl::AdjacentUsesImpl::adjacentUseUse#ff ................. 4m35s
```
specifically
```
(376s) Tuple counts for SsaCompute::SsaComputeImpl::AdjacentUsesImpl::adjacentUseUse#ff/2@be04e9kp after 4m58s:
388843 ~0% {4} r1 = JOIN Essa::TPhiFunction#fff_2#join_rhs WITH SsaCompute::SsaComputeImpl::AdjacentUsesImpl::definesAt#ffff ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Rhs.2, Rhs.3
3629812090 ~1% {7} r2 = JOIN r1 WITH SsaCompute::SsaComputeImpl::variableUse#ffff ON FIRST 1 OUTPUT Lhs.0, Rhs.2, Rhs.3, Lhs.2, Lhs.3, Lhs.1, Rhs.1 'use1'
0 ~0% {2} r3 = JOIN r2 WITH SsaCompute::SsaComputeImpl::AdjacentUsesImpl::adjacentVarRefs#fffff ON FIRST 5 OUTPUT Lhs.5, Lhs.6 'use1'
0 ~0% {2} r4 = JOIN r3 WITH SsaCompute::SsaComputeImpl::AdjacentUsesImpl::firstUse#ff ON FIRST 1 OUTPUT Lhs.1 'use1', Rhs.1 'use2'
897141 ~0% {2} r5 = SsaCompute::SsaComputeImpl::AdjacentUsesImpl::adjacentUseUseSameVar#ff UNION r4
return r5
```
Clearly we do not want to join on the variable so soon. So we unbind it
and get
```
(78s) Tuple counts for SsaCompute::SsaComputeImpl::AdjacentUsesImpl::adjacentUseUse#ff/2@40e0e6uv after 434ms:
3377959 ~2% {4} r1 = SCAN SsaCompute::SsaComputeImpl::variableUse#ffff OUTPUT In.0, In.2, In.3, In.1 'use1'
1026855 ~2% {4} r2 = JOIN r1 WITH SsaCompute::SsaComputeImpl::AdjacentUsesImpl::adjacentVarRefs#fffff ON FIRST 3 OUTPUT Lhs.0, Rhs.3, Rhs.4, Lhs.3 'use1'
129484 ~0% {2} r3 = JOIN r2 WITH SsaCompute::SsaComputeImpl::AdjacentUsesImpl::definesAt#ffff_1230#join_rhs ON FIRST 3 OUTPUT Rhs.3, Lhs.3 'use1'
0 ~0% {2} r4 = JOIN r3 WITH Essa::TPhiFunction#fff_2#join_rhs ON FIRST 1 OUTPUT Lhs.0, Lhs.1 'use1'
0 ~0% {2} r5 = JOIN r4 WITH SsaCompute::SsaComputeImpl::AdjacentUsesImpl::firstUse#ff ON FIRST 1 OUTPUT Lhs.1 'use1', Rhs.1 'use2'
897141 ~0% {2} r6 = SsaCompute::SsaComputeImpl::AdjacentUsesImpl::adjacentUseUseSameVar#ff UNION r5
return r6
```
2021-12-07 18:19:47 +00:00
Taus
59bac04d8f
Python: Fix Python 2 failures
2021-12-07 18:00:46 +00:00
Taus
ffc858e34d
Python: Add missing file
2021-12-07 17:29:35 +00:00
Alex Ford
bf0ecded04
Merge pull request #7326 from github/ginsbach/FixInstanceof
...
fix dependency cycle by removing superfluous classes
2021-12-07 17:05:26 +00:00
Taus
7437cd4d85
Python: Fix syntax error locations
2021-12-07 16:51:33 +00:00
Geoffrey White
511bee7a1a
C++: Fix results that flow to/from encryption routines.
2021-12-07 15:44:18 +00:00
Alex Ford
f85a47d41f
Ruby: add Customizations.qll file
2021-12-07 15:37:04 +00:00
Tom Hvitved
a2dc505c26
Merge pull request #7317 from hvitved/ruby/param-node-refactor
...
Ruby: Restructure `ParameterNode(Impl)`
2021-12-07 16:29:49 +01:00
Tom Hvitved
5183290439
Merge pull request #7315 from hvitved/ruby/inline-flow-test
...
Ruby: Add `InlineFlowTest.qll`
2021-12-07 16:29:34 +01:00
Henry Mercer
322e39446d
JS: Autoformat
2021-12-07 14:17:11 +00:00
Henry Mercer
016727d6b6
JS: Fix occasional duplicate body tokens
...
0e31439 introduces some occasional duplicate tokens due to duplicate AST
node attributes. The long-term fix is to update `CodeToFeatures.qll`,
but for the short-term, we update the concatenation to concatenate
unique (location, token) pairs.
2021-12-07 14:16:48 +00:00
Philip Ginsbach
b2c1b55c0c
rephrase extensions as aliases
2021-12-07 13:09:25 +00:00
Tom Hvitved
b17a93eaad
Merge pull request #7316 from hvitved/ruby/is-private-join
...
Ruby: Tweak `Method::isPrivate` join-orders
2021-12-07 13:58:19 +01:00
Tom Hvitved
4d797d6b3d
Merge pull request #7324 from github/hmac/empty-else-cfg
...
Ruby: Include empty StmtSequences in CFG
2021-12-07 13:19:15 +01:00
Philip Ginsbach
da43984ba4
fix dependency cycle by removing superfluous classes
2021-12-07 11:59:04 +00:00
Geoffrey White
b82425a35c
C++: Add various new test cases.
2021-12-07 11:58:56 +00:00
Geoffrey White
2d4a2e0d44
C++: Test spacing.
2021-12-07 11:58:06 +00:00
Rasmus Wriedt Larsen
ee23799a59
Merge pull request #7319 from RasmusWL/js-cwe-328
...
JS: Tag queries with CWE-328
2021-12-07 11:40:33 +01:00
Anders Schack-Mulligen
6c739b67fa
Merge pull request #7318 from RasmusWL/java-cwe-328
...
Java: Tag queries with CWE-328
2021-12-07 11:39:48 +01:00
Asger Feldthaus
23480b2d8f
JS: Remove stray TODO
2021-12-07 10:49:14 +01:00
Asger F
614c80706f
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-12-07 10:48:44 +01:00
Asger Feldthaus
5559681916
JS: Change note
2021-12-07 10:46:18 +01:00
Asger Feldthaus
635ac0a209
JS: Fix perf issue in data flow step generation
2021-12-07 10:46:18 +01:00
Asger Feldthaus
da8e67b7ee
JS: Use routing trees to detect deeply tainted req.body
2021-12-07 10:46:18 +01:00
Asger Feldthaus
7492293c5b
JS: Add test with route handler indirection
2021-12-07 10:46:18 +01:00
Asger Feldthaus
3cbe94ac0a
JS: Add consistency checks to TemplateObjectInjection test
2021-12-07 10:46:18 +01:00
Asger Feldthaus
64db70f3ac
JS: Add explicit body-parsers to TemplateObjectInjection test
2021-12-07 10:46:18 +01:00
Asger Feldthaus
8af430d40f
JS: Shift line numbers in TemplateObjectInjection test
2021-12-07 10:46:17 +01:00
Asger Feldthaus
5f8ea3965d
JS: Do not flag auth endpoints that are immune to Login CSRF
2021-12-07 10:46:17 +01:00
Asger Feldthaus
66b1612e5e
JS: Treat non-cookie based auth as CSRF preventer
2021-12-07 10:46:17 +01:00
Asger Feldthaus
b73219392b
JS: Improve precision of missing CSRF middleware
2021-12-07 10:46:17 +01:00
Asger Feldthaus
d0e94e655d
JS: Exclude error handling from auth calls
2021-12-07 10:46:17 +01:00
Asger Feldthaus
400bf10cc3
JS: Move fastify-specific route handler step into extension point
2021-12-07 10:46:17 +01:00
Asger Feldthaus
71820569e1
JS: Instantiate for Fastify
2021-12-07 10:46:15 +01:00
Asger Feldthaus
cfb9265f0a
JS: Add template steps for res.locals.x
2021-12-07 10:44:53 +01:00
Asger Feldthaus
5269933461
JS: Port missing rate limiting query
2021-12-07 10:44:19 +01:00
Asger Feldthaus
389a3c9073
JS: Port CSRF query
2021-12-07 10:43:06 +01:00
Asger Feldthaus
16fa066636
JS: Fix false negative in Mongo model
2021-12-07 10:43:05 +01:00
Asger Feldthaus
3dd5d4d7b4
JS: Instantiate for Express and add tests
2021-12-07 10:43:03 +01:00
Erik Krogh Kristensen
3ebf1e3c13
Add codeql-go sources ( 894102defd)
2021-12-07 10:42:38 +01:00
Erik Krogh Kristensen
a3d11c61a8
QL: Add codeql-go sources ( 894102defd)
2021-12-07 10:42:38 +01:00
Erik Krogh Kristensen
d852b28653
Add codeql sources ( 3c59aa319e)
2021-12-07 10:42:34 +01:00
Erik Krogh Kristensen
44c3787457
QL: Add codeql sources ( 3c59aa319e)
2021-12-07 10:42:34 +01:00
Asger Feldthaus
aae4260819
JS: Routing model
2021-12-07 10:41:55 +01:00
Asger Feldthaus
e9575c3df6
JS: Support AdditionalUseStep in API graphs
2021-12-07 10:41:52 +01:00
Erik Krogh Kristensen
3c59aa319e
Merge pull request #7245 from erik-krogh/explicit-this-all-the-places
...
All langs: apply the explicit-this patch to all remaining code
2021-12-07 10:40:26 +01:00
Taus
7cd9369d91
Python: Autoformat
2021-12-07 09:29:24 +00:00
Taus
33a9f86f54
Python: Change integer in trois.py
2021-12-07 08:54:07 +00:00
Taus
dd33f4f4d2
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-12-07 09:48:53 +01:00
Harry Maclean
6f42153eac
Ruby: Include empty StmtSequences in CFG
...
Empty StmtSequences appear, for example, in the `else` branch of `if`
statements like the following:
foo
if cond
bar
else
end
baz
Before this change, the CFG for this code would look like this:
foo
│
│
▼
cond
│
true │
▼
bar
│
│
▼
if
│
│
▼
baz
i.e. there is linear flow through the condition, the `then` branch, and
out of the if. This doesn't account for the possibility that the
condition is false and `bar` is not executed. After this change, the CFG
looks like this:
foo
│
│
▼
cond
│ │
true │ │ false
▼ │
bar │
│ │
│ │
▼ ▼
if
│
│
▼
baz
i.e. we correctly account for the `false` condition.
2021-12-07 16:01:50 +13:00
Geoffrey White
4e68a4670b
Merge pull request #7322 from MathiasVP/fix-performance-of-unused-static-functions
...
C++: Fix performance of 'cpp/unused-static-function'.
2021-12-06 17:30:51 +00:00
Mathias Vorreiter Pedersen
4765772725
C++: Fix performance of 'cpp/unused-static-function'.
2021-12-06 16:41:10 +00:00
Tom Hvitved
243b92b28c
C#: Avoid CIL instructions with multiple types
2021-12-06 14:42:41 +01:00
Tom Hvitved
60c0bcf8f7
C#: Include dup instructions in CIL ExprMissingType consistency test
2021-12-06 14:37:07 +01:00
Tom Hvitved
c39fe59a04
C#: Populate UnknownType
2021-12-06 14:09:17 +01:00
Rasmus Wriedt Larsen
7ae1047fda
JS: Tag queries with CWE-328
...
CWE-328: Use of Weak Hash, see https://cwe.mitre.org/data/definitions/328.html
2021-12-06 14:02:24 +01:00
Rasmus Wriedt Larsen
ff9ed0d4fb
Java: Tag queries with CWE-328
...
CWE-328: Use of Weak Hash, see https://cwe.mitre.org/data/definitions/328.html
Since weak hash functions (md5/sha1) are considered for the
`java/weak-cryptographic-algorithm` query. See
caeeebf572/java/ql/lib/semmle/code/java/security/Encryption.qll (L148)
To keep things consistent between `java/weak-cryptographic-algorithm`
and `java/potentially-weak-cryptographic-algorithm`, I also added the
tag to the latter.
2021-12-06 13:59:00 +01:00
Tom Hvitved
5dbbb86d46
Ruby: Restructure ParameterNode(Impl)
2021-12-06 13:43:19 +01:00
Tom Hvitved
728e3abee5
Ruby: Tweak Method::isPrivate join-orders
2021-12-06 13:36:48 +01:00
Tom Hvitved
36569f997f
Ruby: Add InlineFlowTest.qll
2021-12-06 13:35:07 +01:00
Mathias Vorreiter Pedersen
6b1ac73a46
Merge pull request #7177 from ihsinme/ihsinme-patch-6141
...
fix request for cpp exceptions
2021-12-06 09:24:59 +00:00
Anders Schack-Mulligen
de1269f18f
Merge pull request #7308 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-12-06 09:58:49 +01:00
github-actions[bot]
c46ede02e6
Add changed framework coverage reports
2021-12-06 00:09:47 +00:00
Alex Ford
6adfea2365
Merge pull request #7163 from github/ruby/file-reader-extend
...
Ruby: Extend `FileSystemReadAccess` to include more potential sources of input from the filesystem
2021-12-05 23:32:43 +00:00
haby0
daf6a4ce07
Partial modification 2
2021-12-04 17:45:02 +08:00
Aditya Sharad
f68a40f82b
JS: Simplify calculation of token features for endpoints
...
Use a `strictcount` to identify whether there is exactly one feature or not.
If so, we use it. If not, we use the empty string.
Add context to ensure we filter the set of data flow nodes down to only
the set of endpoint nodes.
This performance optimisation avoids calculating the Cartesian product
of data flow nodes and feature names, but it does not avoid calculating
the (slightly smaller) Cartesian product of endpoint nodes and feature names.
Product size = number of endpoint nodes * number of feature names.
At time of writing there are 8 feature names.
2021-12-03 14:20:27 -08:00
Aditya Sharad
fac2769d85
JS: Replace an exists+concat with an equivalent strictconcat
2021-12-03 14:20:26 -08:00
Aditya Sharad
0e31439b7e
JS: Simplify aggregation of tokens into entity strings
...
Change the cutoff logic from `count` to `strictcount`, since we know it only applies
to a non-empty set of results.
Use a single `strictconcat` aggregate to combine tokens in order of location,
instead of computing a `rank` followed by a `concat`.
Strictness introduces a slight change of behaviour because missing tokens will now result
in no results from the predicate rather than an empty feature string.
2021-12-03 14:20:26 -08:00
Aditya Sharad
2a3b5fc2b2
JS: Performance optimisation for matching framework libraries with their marker comments
...
The `matchMarkerComment` predicate performs badly on any codebase with
a moderately large number of comments, because the current implementation
has to first compute the Cartesian product between the set of comments
and the set of framework library comment regexes.
Instead, match first against a single regex:
the union of all framework library comment regexes.
This computes a more benign Cartesian product, the same size as the set of comments.
See inline comments for more details.
2021-12-03 14:20:26 -08:00
Aditya Sharad
d0840afb80
JS: Fix compilation errors in EndpointFeatures library
...
Use the LabelParameter API instead of manually constructing the edge label.
2021-12-03 14:20:17 -08:00
Arthur Baars
9f48ae656f
Merge pull request #7306 from aibaars/ruby-parenthesized-pattern
...
Ruby: parenthesized patterns
2021-12-03 19:18:09 +01:00
Arthur Baars
0805daaa56
Update ruby/ql/lib/codeql/ruby/ast/Pattern.qll
...
Add missing backticks
2021-12-03 18:44:21 +01:00
Arthur Baars
51998294ad
Ruby: add AST classes for parenthesized patterns
2021-12-03 18:13:53 +01:00
Tony Torralba
4ae99592a3
Merge pull request #6801 from atorralba/atorralba/android_slice_models
...
Android: Add `androidx.slice.builders` models
2021-12-03 17:44:09 +01:00
Arthur Baars
205233b42f
Add trivial upgrade
2021-12-03 17:04:00 +01:00
Arthur Baars
3e1ebb954f
Ruby: update generated dbscheme and library
2021-12-03 17:02:08 +01:00
Arthur Baars
0cec59e043
Ruby: update tree-sitter grammar
2021-12-03 17:01:12 +01:00
Tony Torralba
8ffa195538
Merge branch 'main' into atorralba/android_slice_models
2021-12-03 16:59:33 +01:00
Nick Rolfe
5a2ef8321c
Merge pull request #7120 from github/nickrolfe/regexp_g_anchor
...
Ruby/Python: parse anchors in regexes as special characters
2021-12-03 15:24:38 +00:00
Michael Nebel
4128f56aa9
Merge pull request #7289 from michaelnebel/csharp-mad-as-csv
...
C#: Convert some of the existing flow summaries to CSV
2021-12-03 15:09:36 +01:00
haby0
6c6113b85b
Partial modification
2021-12-03 18:59:24 +08:00
Arthur Baars
802faf1197
Merge pull request #7296 from intrigus-lgtm/patch-7
...
Fix QL Doc typo.
2021-12-03 11:54:22 +01:00
Michael Nebel
7ad52e1365
C#: Address review comments from hvitved.
2021-12-03 11:12:31 +01:00
Michael Nebel
f00b62df76
C#: Convert System.Uri flow to CSV format.
2021-12-03 11:10:24 +01:00
Michael Nebel
90baef83ee
C#: Add flow summaries for another TryParse method in System.Boolean.
2021-12-03 11:10:24 +01:00
Michael Nebel
8eb041c172
C#: Convert System.Boolean flow to CSV format.
2021-12-03 11:10:24 +01:00
Tom Hvitved
520f598d49
Merge pull request #7301 from hvitved/ruby/cfg-disjunct-test
...
Ruby: Add CFG test for `||`
2021-12-03 09:57:40 +01:00
Tom Hvitved
d9704d7b39
Ruby: Adapt to shared CFG changes
2021-12-03 09:37:41 +01:00
Tom Hvitved
42f6dfc197
Sync files
2021-12-03 09:37:41 +01:00
Tom Hvitved
404f4a81a7
C#: Include CFG scope in TElementNode
2021-12-03 09:37:41 +01:00
Tom Hvitved
50dd4e7ee7
Ruby: Add CFG test for ||
2021-12-03 09:16:11 +01:00
Arthur Baars
f2800abee4
Merge pull request #7299 from github/nickrolfe/clippy_fixes
...
Ruby: extractor: fix warnings from Clippy
2021-12-02 18:52:22 +01:00
Taus
7f44cebed7
Python: Add missing hidden flow
...
The easiest way to implement this was to change the definition of
`module_export` to account for chains of `import *`. We reuse the
machinery from `ImportStar.qll` for this, naturally.
2021-12-02 17:11:56 +00:00
Taus
4138296ec6
Python: Add test for "hidden" import * flow
...
TL;DR: We were missing out on flow in the following situation:
`mod1.py`:
```python
foo = SOURCE
```
`mod2.py`:
```python
from mod1 import *
```
`test.py`:
```python
from mod2 import foo
SINK(foo)
```
This is because there's no node at which a read of `foo` takes place
within `test.py`, and so the added reads make no difference.
Unfortunately, this means the previous test was a bit too simplistic,
since it only looks for module variable reads and writes. Because of
this, we change the test to be a more traditional "all flow" style
(though restricted to `CfgNode`s).
2021-12-02 17:05:54 +00:00
Nick Rolfe
991d659cb2
Ruby: use unwrap_or_else to construct object only when needed
2021-12-02 16:30:45 +00:00
Nick Rolfe
976faf97d1
Ruby: remove redundant closure
2021-12-02 16:29:59 +00:00
Michael Nebel
19c34be1ea
Merge pull request #7297 from michaelnebel/csharp-accessor-flow
...
C#: Make it possible to define flow for property backing methods.
2021-12-02 16:24:19 +01:00
Michael Nebel
102b5e05e1
Merge pull request #7290 from michaelnebel/csharp-modify-flow-summaries-test
...
C#: Modify printing of flow summaries in test.
2021-12-02 16:22:47 +01:00
Geoffrey White
2b349b3024
Merge pull request #7295 from geoffw0/cwe260
...
C++: Add CWE tags to some queries.
2021-12-02 14:41:34 +00:00
intrigus
2c4ccb79a1
Fix QL Doc typos.
2021-12-02 15:30:29 +01:00
Geoffrey White
3043ac850c
C++: Update security-severity tags.
2021-12-02 14:04:49 +00:00
Michael Nebel
f6c36b469a
C#: Include test case for override of property.
2021-12-02 15:04:01 +01:00
Michael Nebel
f190d60912
C#: Make it possible to describe flow for properties using their backing methods.
2021-12-02 15:02:22 +01:00
Geoffrey White
eccba57536
C++: Add CWE-327 tag to cpp/boost/use-of-deprecated-hardcoded-security-protocol.
2021-12-02 12:32:14 +00:00
Geoffrey White
7aa6c62050
C++: Add CWE-326 tag to cpp/boost/tls-settings-misconfiguration.
2021-12-02 12:29:42 +00:00
Nick Rolfe
05415768c9
Merge remote-tracking branch 'origin/main' into nickrolfe/regexp_g_anchor
2021-12-02 12:07:13 +00:00
yoff
f10f053c36
Merge pull request #7228 from RasmusWL/fastapi-improvements
...
Python: FastAPI improvements
2021-12-02 12:58:53 +01:00
Geoffrey White
913d8361ba
C++: Add CWE-260 tag to cpp/cleartext-storage-file.
2021-12-02 11:54:51 +00:00
yoff
4609b2060a
Merge pull request #7217 from RasmusWL/more-path-injection-fps
...
Python: Add `x in <var>` test for StringConstCompare
2021-12-02 12:35:33 +01:00
Michael Nebel
8f3be9fbfd
C#: Update flow summaries test according to new printing format.
2021-12-02 11:28:06 +01:00
Michael Nebel
edf7724579
C#: Remove trailing whitespace after comma, when priting callable in CSV format.
2021-12-02 11:24:42 +01:00
Michael Nebel
37644d30d2
Merge pull request #7281 from michaelnebel/csharp-flowsummaries-filtered
...
C#: Filtered flow summaries
2021-12-02 11:23:36 +01:00
Erik Krogh Kristensen
6327fced6f
remove paths without unmatched returns from polynomial-redos
2021-12-02 10:03:28 +01:00
Michael Nebel
ad281c0365
C#: Sync FlowSummaryImpl files.
2021-12-02 09:03:00 +01:00
Michael Nebel
a8f673ffa4
C#: Add a test that only prints 'base' flow summaries.
2021-12-02 09:03:00 +01:00
Michael Nebel
e08c734c40
C#: Refactoring to allow override of the flow summaries reported by a test.
2021-12-02 08:54:59 +01:00
Michael Nebel
55c17f453f
Merge pull request #7280 from michaelnebel/csharp-newtonsoft-flowsummary
...
C#: Include the NewtonSoft.JSon stubs in the flow summaries test.
2021-12-02 08:47:58 +01:00
luchua-bc
8bcffc2886
Query to detect unsafe request dispatcher usage
2021-12-02 04:00:29 +00:00
github-actions[bot]
87b968f337
Post-release preparation 2.7.3
2021-12-02 00:46:55 +00:00
Mathias Vorreiter Pedersen
9f8326a3fa
Merge pull request #7243 from geoffw0/sslquery2
...
C++: New query for SSL certificates not checked
2021-12-01 15:02:19 +00:00
Erik Krogh Kristensen
a077345227
Merge pull request #7180 from erik-krogh/apiLabel2
...
JS: Make the edges of API-graphs into IPA types
2021-12-01 15:33:04 +01:00
Erik Krogh Kristensen
73f2f52ed8
use the TYPE_ONLY_IMPORT context
2021-12-01 14:54:16 +01:00
Erik Krogh Kristensen
739906b60c
rename @import_or_export_declaration to @type_keyword_operand
2021-12-01 14:47:11 +01:00
Michael Nebel
9e10aee8a1
C#: Update the flow summaries test.
2021-12-01 14:34:32 +01:00
Michael Nebel
cc2914be3c
C#: Include NewtonSoft.Json stubs into the flow summaries test.
2021-12-01 14:34:04 +01:00
Erik Krogh Kristensen
de53727ab3
remove spurious whitespace
...
Co-authored-by: Asger F <asgerf@github.com >
2021-12-01 14:29:57 +01:00
Erik Krogh Kristensen
0a3d62c92a
rename mod -> module
2021-12-01 13:48:16 +01:00
Erik Krogh Kristensen
148da611c6
make the ApiLabel class non-abstract
2021-12-01 13:45:52 +01:00
Tom Hvitved
aad55ffbd6
Merge pull request #7279 from hvitved/csharp/json-net-fix-summaries
...
C#: Fix `Newtonsoft.Json.JsonSerializer.{Deserialize,Serialize}` summaries
2021-12-01 13:15:10 +01:00
Michael Nebel
75f9a947b3
Merge pull request #7257 from michaelnebel/csharp-nuget-packages
...
C#: Use .NET Core Nuget package stub i test
2021-12-01 13:04:24 +01:00
Michael Nebel
ed706d9bc1
Merge pull request #7269 from michaelnebel/chspar-nuget-stub-script
...
C#: Update the make_stubs_nuget script
2021-12-01 13:04:02 +01:00
Arthur Baars
e41cd810d3
Merge pull request #7154 from aibaars/ruby-pattern-matching
...
Ruby: pattern matching
2021-12-01 12:47:22 +01:00
Tom Hvitved
93e291cb3e
C#: Fix Newtonsoft.Json.JsonSerializer.{Deserialize,Serialize} summaries
2021-12-01 11:41:16 +01:00
Anders Schack-Mulligen
cde853c095
Merge pull request #7270 from aschackmull/dataflow/stage2-refactor
...
Dataflow: Stage 2 refactor
2021-12-01 11:09:08 +01:00
haby0
6742beae1b
use <code> tags
2021-12-01 16:24:46 +08:00
Tom Hvitved
31374b485c
Data flow: Update documentation
2021-12-01 09:01:06 +01:00
Tom Hvitved
e410244fe0
Python: Implement ParameterPosition et al
2021-12-01 08:51:22 +01:00
Tom Hvitved
bb8f4bb7c1
Ruby: Implement ParameterPosition et al
2021-12-01 08:51:22 +01:00
Tom Hvitved
ae6501d906
Java: Implement ParameterPosition et al
2021-12-01 08:51:22 +01:00
haby0
08be8edbce
Modify according to suggestions
2021-12-01 11:57:57 +08:00
Andrew Eisenberg
ddd4ccbb4b
Merge pull request #7274 from github/aeisenberg/add-version-policy
...
Add a version policy
2021-11-30 14:51:30 -08:00
Andrew Eisenberg
ff030534ff
Add a version policy
...
Handles the post release process.
2021-11-30 14:47:48 -08:00
Dave Bartolomeo
b42295801b
Merge pull request #7271 from github/release-prep/2.7.3
...
Release preparation for version 2.7.3
2021-11-30 17:29:46 -05:00
github-actions[bot]
337ce65fe5
Release preparation for version 2.7.3
2021-11-30 20:39:35 +00:00
Geoffrey White
4b221bd964
C++: Use guard.controls.
2021-11-30 15:44:48 +00:00
Michael Nebel
186ba428cf
C#: Remove workdir as error message when format fails.
2021-11-30 15:57:53 +01:00
Michael Nebel
1243d40bb2
Revert "C#: Update the stub for Microsoft.NETCore.App by creating as a dependency for NewtonSoft.JSon"
...
This reverts commit 8a6a8fc28a .
2021-11-30 15:49:31 +01:00
Tom Hvitved
35a67845cf
C++: Implement ParameterPosition et al
2021-11-30 15:34:16 +01:00
Michael Nebel
59b71df2d6
C#: Use stubs for the CWE-601 testcase.
2021-11-30 15:32:19 +01:00
Michael Nebel
0b4d0d2772
C#: Use stubs for the CWE-838 testcase
2021-11-30 15:32:19 +01:00
Michael Nebel
bab8cfb62a
C# Generate stubs for System.Data.SqlClient
2021-11-30 15:32:19 +01:00
Michael Nebel
a5b6889478
C# Update flow summaries test.
2021-11-30 15:32:19 +01:00
Michael Nebel
5dd2d20176
C#: Remove overlapping declaration of System.Web.HttpUtility
2021-11-30 15:32:18 +01:00
Michael Nebel
7d6664f14d
C#: Use NuGet package generated stubs for dependencies for flow summaries test
2021-11-30 15:32:18 +01:00
Tom Hvitved
540ecf3c21
Data flow: Sync files
2021-11-30 15:20:20 +01:00
Tom Hvitved
755085e9fe
C#: Introduce ParameterPosition and ArgumentPosition
2021-11-30 15:20:20 +01:00
Michael Nebel
2589034242
C#: Execute commands with the tempDir as the working directory
2021-11-30 14:42:21 +01:00
Arthur Baars
830908b5c8
Address comments
2021-11-30 13:57:18 +01:00
Anders Schack-Mulligen
3e914ef2ff
Dataflow: Sync.
2021-11-30 13:52:52 +01:00
Anders Schack-Mulligen
fc05825c73
Dataflow: Make stage 2 equal to stages 3 and 4.
2021-11-30 13:52:31 +01:00
Michael Nebel
8a6a8fc28a
C#: Update the stub for Microsoft.NETCore.App by creating as a dependency for NewtonSoft.JSon
2021-11-30 13:29:35 +01:00
Michael Nebel
0619453c2f
C#: Explicitly set .NET 5.0 as target framework in class lib and hardcode compilation to use version 5.0.402 of the SDK
2021-11-30 13:28:48 +01:00
Paolo Tranquilli
b40c77d419
Merge pull request #7267 from github/redsun82/cpp-overrunning-write-precision-split
...
C++: add some more range analysis tests
2021-11-30 12:54:48 +01:00
Paolo Tranquilli
3f218c903b
C++: add some more range analysis tests
...
Add more covering for integer conversions and some unsigned bit
manipulation.
2021-11-30 11:29:02 +00:00
Geoffrey White
8f270b665c
C++: Fix test comments.
2021-11-30 08:56:24 +00:00
Tony Torralba
c91b6f7ce9
Merge pull request #7266 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-11-30 09:07:09 +01:00
Mathias Vorreiter Pedersen
f4555ed1a2
Merge pull request #7242 from geoffw0/sslquery
2021-11-30 07:01:33 +00:00
github-actions[bot]
66e086f92f
Add changed framework coverage reports
2021-11-30 00:09:58 +00:00
Dave Bartolomeo
9f6c0991cf
Catch up with recent change notes
2021-11-29 16:41:18 -05:00
Dave Bartolomeo
5ed9029143
Move change notes to correct directories
2021-11-29 16:31:11 -05:00
Dave Bartolomeo
75fb47c76f
Ruby change notes
2021-11-29 16:17:19 -05:00
Dave Bartolomeo
cd8a10d0a5
Python change notes
2021-11-29 16:17:05 -05:00
Dave Bartolomeo
96deddf053
JavaScript change notes
2021-11-29 16:16:30 -05:00
Dave Bartolomeo
452685bb66
Fix change note path
2021-11-29 16:11:34 -05:00
Dave Bartolomeo
310ef79fbd
C++ change notes
2021-11-29 16:10:33 -05:00
Dave Bartolomeo
d0dac03bad
Manually bump versions
2021-11-29 14:21:08 -05:00
Dave Bartolomeo
2dfcd1dd9c
Add groups property
...
Also removed versions from test packs
2021-11-29 14:15:53 -05:00
Chris Smowton
27f40e08e5
Merge pull request #7007 from JLLeitschuh/feat/JLL/improve_ratpack_support
...
Java: Ratpack HTTP Framework Additional Modeling
2021-11-29 16:20:53 +00:00
Rasmus Wriedt Larsen
d557f6fd2e
Merge pull request #7101 from RasmusWL/python-ids
...
Python: Fix some query-ids
2021-11-29 16:12:57 +01:00
yoff
41b7922c7d
Merge pull request #7089 from RasmusWL/redos-cwe-1333
...
Python/C#: Add CWE-1333 to redos queries
2021-11-29 16:09:39 +01:00
yoff
19802ccb73
Merge pull request #7046 from RasmusWL/django-own-json-response
...
Python: Add test with custom django json response (FP)
2021-11-29 16:05:20 +01:00
Arthur Baars
1e026ef45e
AST: merge Case and CaseMatch classes
2021-11-29 16:00:17 +01:00
yoff
e63f9141e5
Merge pull request #7233 from RasmusWL/fix-cleartext-logging-cwes
...
JS/Py: Fix cleartext logging CWEs
2021-11-29 15:58:10 +01:00
Rasmus Wriedt Larsen
cbd7434a7e
Python: Add modeling of tempfile module
2021-11-29 15:08:36 +01:00
Rasmus Wriedt Larsen
b68538376c
Python: Add tests of tempfile module
2021-11-29 15:08:36 +01:00
Rasmus Wriedt Larsen
3bcf6d68ce
Python: Refactor os FileSystemAccess change-note
...
I think it's more readable to have only one to cover all of these
changes, even though they came in through different PRs.
2021-11-29 15:08:18 +01:00
Arthur Baars
f8a62c4c82
Address comments
2021-11-29 15:06:16 +01:00
Rasmus Wriedt Larsen
58f92764f7
Python: Model more file access from os module
2021-11-29 14:54:02 +01:00
Rasmus Wriedt Larsen
fd23fa94a5
Python: Remove dubious fstat* modeling
...
These operate on file descriptors, and not on paths. file descriptors
doesn't fit into the rest of our modeling, so I would rather remove them
than to make it look like it's properly handled.
I also did not include any of the functions that work on file
descriptors when looking through all of `os`. So this keeps everything
consistent at least ;)
2021-11-29 14:54:02 +01:00
Rasmus Wriedt Larsen
e79b8f3e23
Python: Treat os.exec*, os.spawn*, and os.posix_spawn* as FileSystemAccess
2021-11-29 14:54:02 +01:00
Rasmus Wriedt Larsen
d2d5cce787
Python: Recognize keyword arguments for os.*spawn* calls
2021-11-29 14:54:02 +01:00
Rasmus Wriedt Larsen
14590436f9
Python: Expand tests for os.exec*, os.spawn*, and os.posix_spawn*
2021-11-29 14:54:02 +01:00
Rasmus Wriedt Larsen
50d3592ad3
Python: Add more complete tests of os module
...
I went through https://docs.python.org/3.10/library/os.html in order,
and added all the functions that works on paths.
`lstat` and `statvfs` were already modeled, but did not have any tests.
2021-11-29 14:54:02 +01:00
Rasmus Wriedt Larsen
a91208fd2c
Python: Fix kwarg modeling for os.path.isdir
2021-11-29 14:54:02 +01:00
Rasmus Wriedt Larsen
36f14b31bc
Python: Add explicit tests for kwargs
...
I also renamed the arguments to match what the keyword argument is
called. It doesn't matter too much for these specific tests, but for the
tests I'm about to add, it makes things a lot easier to get an overview
of.
Oh, and a test failure :O
2021-11-29 14:54:02 +01:00
Rasmus Wriedt Larsen
82602014ad
Python: Minor refactor to use os.path.<func>
...
Since that's the idiomatic way to use this module
2021-11-29 14:54:02 +01:00
Geoffrey White
88fb1a18cb
C++: Correct the doc.
2021-11-29 13:09:12 +00:00
Erik Krogh Kristensen
fdcc144a98
add test for import assertions
2021-11-29 13:51:28 +01:00
Erik Krogh Kristensen
591aeff906
add TypeScript test for new private field syntax
2021-11-29 13:51:28 +01:00
Erik Krogh Kristensen
19bbe6d276
add JavaScript support for new private fields syntax
2021-11-29 13:51:25 +01:00
Erik Krogh Kristensen
d1a7feebc4
disable import resolution on type-only import specifiers
2021-11-29 13:49:10 +01:00
Erik Krogh Kristensen
d946802057
add support for type-only import specifiers
2021-11-29 13:49:10 +01:00
Erik Krogh Kristensen
57399b733e
add test for String types as Discriminants
2021-11-29 13:49:10 +01:00
Erik Krogh Kristensen
0e890fd788
add test for the Awaited type
2021-11-29 13:49:10 +01:00
Erik Krogh Kristensen
eef3905c46
update expected output. The TypeScript compiler now emits types in more cases
2021-11-29 13:49:10 +01:00
Erik Krogh Kristensen
9ce248c829
update to TypeScript 4.5.2
2021-11-29 13:49:10 +01:00
Erik Krogh Kristensen
c13cad7e87
Merge branch 'main' into apiLabel2
2021-11-29 13:43:11 +01:00
Geoffrey White
d79337774d
Update cpp/ql/src/Security/CWE/CWE-295/SSLResultNotChecked.qhelp
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-11-29 12:33:05 +00:00
Michael Nebel
e476cde985
Merge pull request #7255 from michaelnebel/csharp-effecpublic-flowsummary
...
C#: Only include effectively public declarations in flow summaries
2021-11-29 12:52:26 +01:00
Michael Nebel
e1539889ef
C#: Update flow summaries tests
2021-11-29 11:35:02 +01:00
Michael Nebel
e24b15bbe7
C#: Only create flow summaries for declarations that are effectively public
2021-11-29 11:34:21 +01:00
Erik Krogh Kristensen
8e1b4e3a58
bump the severity of ql/implicit-this
2021-11-29 10:55:59 +01:00
Erik Krogh Kristensen
da5c2fb415
QL: bump the severity of ql/implicit-this
2021-11-29 10:55:59 +01:00
Michael Nebel
9239d4042e
Merge pull request #7230 from michaelnebel/csharp-update-netcoreapp-stub
...
C#: Update the Microsoft.NETCore.App stub
2021-11-29 10:08:59 +01:00
Tom Hvitved
fdc94365b4
Merge pull request #7178 from michaelnebel/csharp-flowsummary-pp-csv
...
C#: Initial implementation of csv printing in FlowSummaries test
2021-11-29 09:59:33 +01:00
haby0
db04a0dadf
New model: SQL injection in MyBatis annotations
2021-11-28 14:43:57 +08:00
Pavel Lobashov
6d339e50a3
Fix ruby incorrect version in some readme files
...
There is no `ruby 3.02` version - there is `ruby 3.0.2`
2021-11-27 22:44:27 +03:00
Erik Krogh Kristensen
74158f1e3a
revert explicit-this that caused non-monotonic recursion
2021-11-26 21:37:46 +01:00
Taus
09a11f4166
Python: Update ImpliesDataflow test
...
Turns out that now we can resolve the convoluted imports. Hurray!
2021-11-26 14:47:25 +00:00
Michael Nebel
d4f3a6d4bb
C#: Review comments. Keep the TContent type pribate
2021-11-26 15:38:33 +01:00
Taus
6c3aabe1df
Python: Support flow through import *
...
Adds result for `ModuleVariableNode::getARead` corresponding to reads
that go through (chains of) `import *`.
This required a bit of a change to _which_ module variables we define.
Previously, we only included variables that were accessed elsewhere in
the same file, but now we must ensure to also include variables that may
be accessed through `import *`.
2021-11-26 13:49:08 +00:00
Taus
c3e495efe9
Python: Refactor built-ins and import * logic
...
Moves this from the API graphs implementation into separate files.
2021-11-26 13:49:08 +00:00
Taus
03b6ee3833
Python: Add import * test
...
This test shows off a few things:
- transitive chains of `import *`
- multiple modules exporting the same name (to test for cross-talk)
2021-11-26 13:49:08 +00:00
Erik Krogh Kristensen
6ff8d4de5c
add all remaining explicit this
2021-11-26 13:50:10 +01:00
Anders Schack-Mulligen
00ee34c0a0
Merge pull request #7237 from hvitved/dataflow/consistency-config
...
Data flow: Introduce `ConsistencyConfiguration` class
2021-11-26 12:49:25 +01:00
Anders Schack-Mulligen
57fd397cb3
Merge pull request #7239 from smowton/smowton/fix/useless-comparison-surrogates
...
Range analysis and useless-comparison query: don't treat all unicode surrogates as if they are U+FFFD
2021-11-26 09:00:36 +01:00
Chris Smowton
d3a4dadc7d
Merge pull request #7240 from smowton/smowton/admin/derecognise-xxe-secure-processing
...
Note that FEATURE_SECURE_PROCESSING isn't a sufficient defence against XXE
2021-11-25 19:31:06 +00:00
Henry Mercer
aa9a8a0e22
Merge pull request #7244 from github/henrymercer/atm-specify-ml-models-globs
...
JS: [Internal only] Add ML models specification to ATM query pack definition
2021-11-25 18:20:45 +00:00
Chris Smowton
36bb84d97f
Copyedit change note
2021-11-25 12:55:55 -05:00
Jonathan Leitschuh
1ddf5fb133
Java: Ratpack HTTP Framework Additional Modeling
...
Adds models for `ratpack.func.Pair`, and `ratpack.exec.Result`.
Improve moels for `ratpack.exec.Promise`.
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-11-25 12:55:32 -05:00
Henry Mercer
29eb66d772
JS: Add ML models to .gitignore
2021-11-25 17:06:37 +00:00
Henry Mercer
2af509595b
JS: Add ML models specification to ATM query pack definition
...
This will allow us to resolve the ATM machine learning models that will
be distributed within this pack.
2021-11-25 16:42:38 +00:00
Chris Smowton
7ac5791c49
Update charLiterals.expected
2021-11-25 16:13:06 +00:00
Geoffrey White
f96968975b
C++: Change note.
2021-11-25 15:49:41 +00:00
Geoffrey White
e98ab5d2c2
C++: Add security-severity tag and provisional precision.
2021-11-25 15:49:40 +00:00
Geoffrey White
e9ce29664e
C++: Qldoc.
2021-11-25 15:48:12 +00:00
Chris Smowton
ce63549425
Apply review comments
2021-11-25 15:20:35 +00:00
Chris Smowton
db39c0b8be
CharacterLiteral.getCodePointValue: fix handling of surrogates
2021-11-25 14:07:21 +00:00
Geoffrey White
1d358c5f77
C++: Change note.
2021-11-25 14:04:47 +00:00
Anders Schack-Mulligen
a06642944f
Merge pull request #7232 from aschackmull/dataflow/perf
...
Data flow: Performance tuning
2021-11-25 15:01:01 +01:00
Geoffrey White
f5b40731d6
C++: Add security-severity tag and provisional precision.
2021-11-25 13:59:21 +00:00
Arthur Baars
e801d9636a
Ruby: add ruby/ruby to the dataset-measure CI job
2021-11-25 14:10:15 +01:00
Tom Hvitved
dc0b0445ed
Merge pull request #7185 from hvitved/csharp/ssa/consistency-queries
...
C#: Enable SSA consistency queries
2021-11-25 14:04:01 +01:00
Chris Smowton
9540beeda9
Update java/ql/test/query-tests/security/CWE-611/DocumentBuilderTests.java
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-11-25 12:52:08 +00:00
Arthur Baars
8b0bc677f4
Remove PatternGuard class
2021-11-25 13:50:19 +01:00
Arthur Baars
dca1e34cd8
Temporarily allow CFG inconsistencies
2021-11-25 13:42:59 +01:00
Arthur Baars
16e1e97ff0
Add test data for case-in expressions
2021-11-25 13:25:33 +01:00
Arthur Baars
af4c3122ca
Test case for **nil parameter
2021-11-25 13:25:00 +01:00
Arthur Baars
078a2aa03b
Update AST library
2021-11-25 13:24:51 +01:00
Chris Smowton
9eb9eb606e
Note that FEATURE_SECURE_PROCESSING isn't a sufficient defence against XXE
2021-11-25 12:22:48 +00:00
Arthur Baars
ec0bd24b64
Update diagnostic tests
2021-11-25 12:55:50 +01:00
Arthur Baars
5b560b12e9
Create upgrade script
2021-11-25 12:55:43 +01:00
Anders Schack-Mulligen
609d6011a2
Merge pull request #7229 from smowton/smowton/admin/document-xxe-sanitisation-policy
...
Document XXE sanitisation policy
2021-11-25 10:55:25 +01:00
Tom Hvitved
6cb00992e8
Data flow: Introduce ConsistencyConfiguration class
2021-11-25 10:01:47 +01:00
haby0
04a3f76a8b
Eliminate false positives of Mybatis Configuration Variable
2021-11-25 15:47:37 +08:00
haby0
d36a7ed10e
add test case
2021-11-25 15:47:32 +08:00
haby0
99c8b291b2
add sink
2021-11-25 15:47:32 +08:00
haby0
b8732859de
Add isSanitizerGuard, verify file path
2021-11-25 15:47:31 +08:00
haby0
31400df0d4
Modify sink and improve SQL injection detection
2021-11-25 15:47:30 +08:00
haby0
69690a2509
Modify sinks
2021-11-25 15:47:30 +08:00
haby0
4438f8c58c
Add MyBatis Mapper Sql Injection
2021-11-25 15:47:29 +08:00
CodeQL CI
d3da790191
Merge pull request #6873 from erik-krogh/explicit-this
...
Approved by esbena
2021-11-24 15:23:35 -08:00
Chris Smowton
3c8f6e3c07
Merge pull request #6717 from luchua-bc/java/thread-resource-abuse
...
Java: CWE-400 - Query to detect uncontrolled thread resource consumption
2021-11-24 18:59:41 +00:00
Geoffrey White
4c5faaf985
C++: Autoformat result not checked query.
2021-11-24 18:26:39 +00:00
Geoffrey White
8abaf1247a
C++: Clean up result not checked query.
2021-11-24 18:26:39 +00:00
Geoffrey White
5ffbf563b8
C++: Add metadata for result not checked query.
2021-11-24 18:26:38 +00:00
Geoffrey White
72a03257e7
C++: Add qhelp for result not checked query.
2021-11-24 18:26:38 +00:00
Geoffrey White
5eb814fd8b
C++: Prototype SSL result not checked query.
2021-11-24 18:26:37 +00:00
Geoffrey White
7869733ab5
C++: Autoformat result conflation query.
2021-11-24 18:25:58 +00:00
Geoffrey White
88b6bd9478
C++: Switch result conflation query to a slightly simpler dataflow-only approach.
2021-11-24 18:25:57 +00:00
Geoffrey White
ce2b86b9e3
C++: Add metadata for result conflation query.
2021-11-24 18:25:57 +00:00
Geoffrey White
2eae6a3e9a
C++: Add qhelp for result conflation query.
2021-11-24 18:25:56 +00:00
Geoffrey White
6afcbce421
C++: Prototype SSL result conflation query.
2021-11-24 18:22:24 +00:00
Arthur Baars
5d0dfe8c04
Re-generate library and dbscheme
2021-11-24 17:18:04 +01:00
Arthur Baars
e7524dea69
Update tree-sitter-ruby
2021-11-24 17:18:03 +01:00
Arthur Baars
4b3b1d2a8b
Merge pull request #7222 from aibaars/ruby-ci-fix
...
Ruby: fix CI jobs after removal of `.codeql-manifest.json`
2021-11-24 17:16:52 +01:00
Erik Krogh Kristensen
1e752f305d
apply the explicit this patch to new code
2021-11-24 15:26:19 +01:00
Erik Krogh Kristensen
08ce03cd93
Merge branch 'main' into explicit-this
2021-11-24 15:24:58 +01:00
Erik Krogh Kristensen
3bab8c6d1d
Merge pull request #7173 from erik-krogh/getRubyInSync
...
JS/PY/RB: get ReDoSUtil in sync for ruby
2021-11-24 15:20:23 +01:00
Rasmus Wriedt Larsen
651a76c9ce
Python: Add CWE-532 to CleartextLogging
...
Relevant for this query:
CWE-532: Insertion of Sensitive Information into Log File
> While logging all information may be helpful during development
> stages, it is important that logging levels be set appropriately
> before a product ships so that sensitive user data and system
> information are not accidentally exposed to potential attackers.
See https://cwe.mitre.org/data/definitions/532.html
JS also did this recently: https://github.com/github/codeql/pull/7103
2021-11-24 14:59:52 +01:00
Rasmus Wriedt Larsen
c05ffd4d00
JS/PY: Remove CWE-315 form CleartextLogging
...
Since it is not relevant for this query:
CWE-315: Cleartext Storage of Sensitive Information in a Cookie
See https://cwe.mitre.org/data/definitions/315.html
2021-11-24 14:59:18 +01:00
Anders Schack-Mulligen
7ca3407c86
Dataflow: Sync.
2021-11-24 14:43:00 +01:00
Anders Schack-Mulligen
a7ec0fa900
Dataflow: Remove more disjunction-induced tuple duplication.
2021-11-24 14:39:49 +01:00
Michael Nebel
b9d0a60ce7
C#: Addressed review comments from hvitved
2021-11-24 14:35:52 +01:00
luchua-bc
b0031a0d85
Add local input test case and update qldoc
2021-11-24 13:30:50 +00:00
Tom Hvitved
1d1780b30f
C#: Fix bug in getEnclosingCallable
2021-11-24 14:24:01 +01:00
Rasmus Wriedt Larsen
7dde52ced2
Merge pull request #7131 from RasmusWL/wsgiref.simple_server
...
Python: Model `wsgiref.simple_server` applications
2021-11-24 14:22:23 +01:00
Anders Schack-Mulligen
4efdcc22a2
Dataflow: Improve barrier handling.
2021-11-24 14:17:05 +01:00
Tom Hvitved
f85fa87f69
C#: Add test that illustrates problem with getEnclosingCallable
2021-11-24 13:59:29 +01:00
Rasmus Wriedt Larsen
2a5e0a3b77
Merge pull request #7145 from RasmusWL/remove-owasp-tags
...
Python/Ruby: Remove owasp tags
2021-11-24 13:56:48 +01:00
Rasmus Wriedt Larsen
e2652591a5
Python: Change perf fix PoorMansFunctionResolution
...
Thanks @yoff, this leaves us with the following evaluation, which looks
very close to the one in the other fix (but with cleaner implementation)
-- both at 688k max tuples (although numbers are not exactly the same).
```
[2021-11-24 13:48:40] (14s) Tuple counts for PoorMansFunctionResolution::getSimpleMethodReferenceWithinClass#ff/2@e5f05asv after 74ms:
47493 ~3% {3} r1 = JOIN Class::Class::getAMethod_dispred#ff WITH py_Classes ON FIRST 1 OUTPUT Lhs.1, 0, Lhs.0
47335 ~0% {2} r2 = JOIN r1 WITH AstGenerated::Function_::getArg_dispred#fff ON FIRST 2 OUTPUT Rhs.2, Lhs.2
46683 ~0% {2} r3 = JOIN r2 WITH DataFlowPublic::ParameterNode::getParameter_dispred#fb_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
259968 ~4% {2} r4 = JOIN r3 WITH LocalSources::Cached::hasLocalSource#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
161985 ~0% {3} r5 = JOIN r4 WITH Attributes::AttrRef::accesses_dispred#bff_102#join_rhs ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.1, Rhs.2
161985 ~2% {3} r6 = JOIN r5 WITH Attributes::AttrRead#class#f ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Lhs.0 'result'
688766 ~0% {3} r7 = JOIN r6 WITH Function::Function::getName_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1 'func', Lhs.2 'result'
20928 ~0% {2} r8 = JOIN r7 WITH Class::Class::getAMethod_dispred#ff ON FIRST 2 OUTPUT Lhs.1 'func', Lhs.2 'result'
return r8
```
2021-11-24 13:52:05 +01:00
Rasmus Wriedt Larsen
1411804e58
Python: Allow custom fastapi.APIRouter subclasses
2021-11-24 13:46:38 +01:00
Tom Hvitved
1d654d1eac
C#: Restrict refReadBeforeWrite
2021-11-24 13:43:14 +01:00
Tom Hvitved
1739673202
C#: Enable SSA consistency queries
2021-11-24 13:43:14 +01:00
Chris Smowton
c74eac4930
Remove needless casts
2021-11-24 12:18:05 +00:00
Chris Smowton
cec91c4831
Update ThreadResourceAbuse.qhelp
2021-11-24 12:15:48 +00:00
Chris Smowton
5101a8e9f3
Fix qhelp test
2021-11-24 12:12:56 +00:00
Chris Smowton
136ecaf49a
Abbreviate qhelp example
2021-11-24 12:12:22 +00:00
Michael Nebel
c3996b00d5
C#: Update the Microsoft.NETCore.App stub
2021-11-24 13:09:06 +01:00
Chris Smowton
120f2045cd
Document XXE sanitisation policy
2021-11-24 12:03:28 +00:00
Mathias Vorreiter Pedersen
6d9cea90cb
Merge pull request #7226 from MathiasVP/shorter-ir-dataflow-paths
...
C++: Hide some IR dataflow nodes
2021-11-24 11:13:52 +00:00
Michael Nebel
a3ca9ad27d
C#: Sync flow summary implementation files and implement specific parts for ruby and java
2021-11-24 12:09:20 +01:00
Michael Nebel
e153a65216
C#: Update flow summaries test for EntityFramework to print results in CSV syntax
2021-11-24 12:09:20 +01:00
Michael Nebel
914d3d86af
C#: Update flow summaries test to print results in CSV syntax
2021-11-24 12:09:20 +01:00
Michael Nebel
3a7d51d2ee
C#: Don't throw away ReturnKind information, when printing flow summaries. Note that any non NormalReturnKind printed summary will not be in the flow summary CSV language
2021-11-24 12:09:20 +01:00
Michael Nebel
e607c51292
C#: Initial implementation of csv printing in FlowSummaries test
2021-11-24 12:09:20 +01:00
Rasmus Wriedt Larsen
47448d9efc
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-11-24 12:02:12 +01:00
Mathias Vorreiter Pedersen
6c7a01d3d5
C++: Add some comments to the two 'flowThrough' predicates.
2021-11-24 10:50:44 +00:00
Rasmus Wriedt Larsen
d493cfdf3a
Python: Model FastAPI FileResponse as FileSystemAccess
...
This was an oversight from our initial FastAPI modeling work.
2021-11-24 11:44:51 +01:00
yoff
f9729bccef
Merge pull request #7143 from RasmusWL/path-improvements
...
Python: Model `posixpath` and `os.stat`
2021-11-24 11:36:06 +01:00
Anders Schack-Mulligen
a3b263ee6e
Merge pull request #7181 from bmuskalla/coverageAsDiagnostics
...
Java: Add diagnostic query for framework coverage
2021-11-24 10:57:50 +01:00
Rasmus Wriedt Larsen
b2611fe198
Merge branch 'main' into redos-cwe-1333
2021-11-24 10:42:43 +01:00
Mathias Vorreiter Pedersen
2e7ddb479e
C++: Accept test changes.
2021-11-24 09:41:00 +00:00
Mathias Vorreiter Pedersen
4cbfc306ac
C++: Hide dataflow nodes if they're just used for flow-through for read steps or store steps.
2021-11-24 08:01:44 +00:00
Arthur Baars
133ec2e4af
Fix CI jobs
2021-11-23 22:03:01 +01:00
Erik Krogh Kristensen
87a1ccd428
Merge branch 'main' into getRubyInSync
2021-11-23 20:20:37 +01:00
luchua-bc
e56737e007
Use value step to optimize the taint step and add a test case for Apache file upload listener
2021-11-23 17:15:28 +00:00
Mathias Vorreiter Pedersen
8c9e817c0d
Merge pull request #7188 from github/redsun82/fix-operand-location
...
C++: take IR Operand locations from definitions
2021-11-23 16:32:06 +00:00
Nick Rolfe
bb38c4d6fd
Merge pull request #6978 from github/nickrolfe/regex_injection
...
Ruby: add regex injection query
2021-11-23 16:22:35 +00:00
Nick Rolfe
1a90b388a9
Merge remote-tracking branch 'origin/main' into nickrolfe/regex_injection
2021-11-23 15:42:05 +00:00
Paolo Tranquilli
055017de49
fix how non existing locations are accounted for
2021-11-23 15:28:16 +00:00
Paolo Tranquilli
9538ac73e4
account for non-existing locations
2021-11-23 15:28:16 +00:00
Paolo Tranquilli
d626745ab1
fix ThisArgumentOperand location
...
The correct check to do to choose between using `getAnyDef` and `getUse`
is to check whether the location is an instance of UknonwnLocation.
2021-11-23 15:28:16 +00:00
Paolo Tranquilli
e99a040884
implement review suggestions
2021-11-23 15:28:16 +00:00
Paolo Tranquilli
8b44d5c39e
sync files
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
30805d964c
add ThisArgumentOperand special case
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
9b818a04f2
sync
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
0bb11fa371
fix PrintAST test run
...
The refactored shouldDumpFunction was now rejecting functions without a
location. This is fixed now.
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
0547e4ccf2
update further test with new locations
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
d4e80c664e
replace shouldDump -> shouldDumpLocation
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
4498657384
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
28806fe5f4
update test results after operand location changes
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
6072ccd81d
auto-format
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
0ff9520575
...and syncing files again
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
b5165e3692
C++: more fine-grained Operand location change
...
Only RegisterOperands need the change, with the notable exception of
ThisArgumentOperand.
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
5202f963dd
C++: sync Operand source
2021-11-23 15:28:15 +00:00
Paolo Tranquilli
74c0197544
C++: take IR Operand locations from definitions
...
Previously Operand's getLocation would take it from the Operand use.
This lead to slightly confusing query results, where for example an
issue related to a call argument would highlight the function part of
the call instead of the parameter.
2021-11-23 15:28:15 +00:00
Tom Hvitved
83d204d7a8
Merge pull request #7218 from hvitved/ssa/fix-consistency-tests
...
Ruby: Fix SSA consistency tests + CFG bug
2021-11-23 16:24:41 +01:00
Tom Hvitved
4d918b5e5f
Ruby: Fix CFG splitting logic for ensure blocks with loops
2021-11-23 15:21:43 +01:00
Anders Schack-Mulligen
822890f2bd
Dataflow: Remove disjunction-induced tuple duplication.
2021-11-23 15:05:24 +01:00
Geoffrey White
3e1164f82e
Merge pull request #7109 from MathiasVP/remove-reference-to-as-load
...
C++: Don't interpret 'ReferenceToInstruction' as a load
2021-11-23 13:56:22 +00:00
Alex Ford
055641e684
Merge pull request #7062 from github/ruby/rails-csrf
...
Ruby: Add `rb/csrf-protection-disabled` query
2021-11-23 13:46:42 +00:00
Anders Schack-Mulligen
f5f67dd11a
Dataflow: Pull ccc.matchesCall(call) from the recursive loop.
2021-11-23 14:35:33 +01:00
Taus
8cccee6eba
Merge pull request #6972 from yoff/python/promote-redos
...
Python: Promote ReDoS queries
2021-11-23 14:02:09 +01:00
Tom Hvitved
0bd587b395
Shared SSA: Sync files
2021-11-23 13:30:37 +01:00
Tom Hvitved
e185e9080c
Shared SSA: Fix consistency tests
2021-11-23 13:30:23 +01:00
Erik Krogh Kristensen
b2e40ac603
fix typo in test
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-11-23 13:09:22 +01:00
Rasmus Wriedt Larsen
baafd9f8ba
Python: Add an other path injection FP
...
Along with the root cause, which is the `StringConstCompare`
BarrierGuard, that does only allows `in <iterable literal>` and not
`in <variable referencing iterable literal>`
2021-11-23 12:59:15 +01:00
Nick Rolfe
e5f473052d
Ruby: add Regexp.{compile,quote} to regex injection test
2021-11-23 11:05:41 +00:00
Anders Schack-Mulligen
e711ba9d18
Dataflow: Remove negation materialization.
2021-11-23 11:35:57 +01:00
Tom Hvitved
9d072a12ed
Merge pull request #7098 from github/ruby/desugar-for-1
...
Ruby: Desugar `for` loops as calls to `each`
2021-11-23 11:35:49 +01:00
Mathias Vorreiter Pedersen
672485ae38
Merge branch 'main' into remove-reference-to-as-load
2021-11-23 10:24:17 +00:00
James Fletcher
21aff99637
Merge pull request #7215 from github/jf205-patch-1
...
Fix link formatting
2021-11-23 10:03:40 +00:00
Tom Hvitved
dcca5d28bb
Merge pull request #7172 from hvitved/ruby/ensure-split-cp
...
Ruby: Remove CP in `EnsureSplitImpl::exit/3`
2021-11-23 11:02:23 +01:00
Benjamin Muskalla
50518b5622
Fix sum of rows
2021-11-23 10:42:24 +01:00
James Fletcher
b8e8ddf9ae
fix link
2021-11-23 08:38:39 +00:00
Anders Schack-Mulligen
a68b55b099
Merge pull request #7208 from hvitved/ruby/restrict-use-use
...
Ruby: Restrict use-use flow
2021-11-23 09:33:43 +01:00
ihsinme
88634b81bf
Update IncorrectPrivilegeAssignment.expected
2021-11-23 10:23:20 +03:00
ihsinme
6e8d56f044
Update IncorrectPrivilegeAssignment.ql
2021-11-23 10:22:26 +03:00
ihsinme
70081defdc
Update FindIncorrectlyUsedExceptions.expected
2021-11-23 09:56:02 +03:00
ihsinme
62ae702e07
Update FindIncorrectlyUsedExceptions.ql
2021-11-23 09:55:43 +03:00
luchua-bc
ed78d39d61
Move duplicate code to the shared library and update qldoc
2021-11-23 03:06:26 +00:00
Henry Mercer
245edd41ff
Merge pull request #7186 from github/henrymercer/rename-available-models-predicate
...
JS: [Internal only] Rename the available ML models external predicate
2021-11-22 18:26:46 +00:00
Nick Rolfe
13459c8afc
Ruby: add Regexp.compile as sink for regexp injection query
2021-11-22 17:43:55 +00:00
Nick Rolfe
4b42c4447b
Ruby: handle Regexp.quote wherever we handle Regexp.escape
2021-11-22 17:12:01 +00:00
Nick Rolfe
5b11cfe006
Ruby: fix up import path
2021-11-22 17:10:46 +00:00
Nick Rolfe
752b126862
Merge remote-tracking branch 'origin/main' into nickrolfe/regex_injection
2021-11-22 17:05:27 +00:00
Rasmus Wriedt Larsen
eaed870b31
Python: Fix performance problem in PoorMansFunctionResolution
...
Before these changes:
[2021-11-22 12:02:50] (8s) Tuple counts for PoorMansFunctionResolution::getSimpleMethodReferenceWithinClass#ff/2@cbddf257 after 8.6s:
387565 ~0% {3} r1 = JOIN Attributes::AttrRead#class#f WITH Attributes::AttrRef::accesses_dispred#bff ON FIRST 1 OUTPUT Rhs.2, Lhs.0 'result', Rhs.1
6548632 ~0% {3} r2 = JOIN r1 WITH Function::Function::getName_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'func', Lhs.1 'result', Lhs.2
5640480 ~0% {4} r3 = JOIN r2 WITH Class::Class::getAMethod_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'result', Lhs.2, Lhs.0 'func'
55660458 ~0% {5} r4 = JOIN r3 WITH Class::Class::getAMethod_dispred#ff ON FIRST 1 OUTPUT Rhs.1, 0, Lhs.1 'result', Lhs.2, Lhs.3 'func'
55621412 ~0% {4} r5 = JOIN r4 WITH AstGenerated::Function_::getArg_dispred#fff ON FIRST 2 OUTPUT Rhs.2, Lhs.2 'result', Lhs.3, Lhs.4 'func'
54467144 ~0% {4} r6 = JOIN r5 WITH DataFlowPublic::ParameterNode::getParameter_dispred#fb_10#join_rhs ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1 'result', Lhs.3 'func'
20928 ~0% {2} r7 = JOIN r6 WITH LocalSources::Cached::hasLocalSource#ff ON FIRST 2 OUTPUT Lhs.3 'func', Lhs.2 'result'
return r7
With these changes:
[2021-11-22 11:54:25] (415s) Tuple counts for PoorMansFunctionResolution::getSimpleMethodReferenceWithinClass_helper#fff/3@14db70a8 after 75ms:
388306 ~0% {2} r1 = JOIN Attributes::AttrRead#class#f WITH Attributes::AttrRef::getObject_dispred#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'read'
379420 ~4% {2} r2 = JOIN r1 WITH LocalSources::Cached::hasLocalSource#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'read'
175082 ~0% {2} r3 = JOIN r2 WITH DataFlowPublic::ParameterNode#class#fff ON FIRST 1 OUTPUT Rhs.2, Lhs.1 'read'
175082 ~2% {3} r4 = JOIN r3 WITH Essa::ParameterDefinition::getParameter_dispred#ff ON FIRST 1 OUTPUT 0, Rhs.1, Lhs.1 'read'
166798 ~0% {2} r5 = JOIN r4 WITH AstGenerated::Function_::getArg_dispred#fff_120#join_rhs ON FIRST 2 OUTPUT Rhs.2 'func', Lhs.2 'read'
162096 ~0% {3} r6 = JOIN r5 WITH Class::Class::getAMethod_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0 'func', Rhs.1 'cls', Lhs.1 'read'
return r6
[2021-11-22 11:54:25] (415s) Tuple counts for PoorMansFunctionResolution::getSimpleMethodReferenceWithinClass_helper2#ffff/4@2b60f0s9 after 63ms:
162046 ~0% {3} r1 = SCAN PoorMansFunctionResolution::getSimpleMethodReferenceWithinClass_helper#fff OUTPUT In.2 'read', In.0 'func', In.1 'cls'
162046 ~0% {3} r2 = JOIN r1 WITH Attributes::AttrRead#class#f ON FIRST 1 OUTPUT Lhs.1 'func', Lhs.2 'cls', Lhs.0 'read'
162046 ~1% {3} r3 = JOIN r2 WITH py_Functions ON FIRST 1 OUTPUT Lhs.1 'cls', Lhs.2 'read', Lhs.0 'func'
162046 ~0% {3} r4 = JOIN r3 WITH py_Classes ON FIRST 1 OUTPUT Lhs.1 'read', Lhs.2 'func', Lhs.0 'cls'
161935 ~5% {4} r5 = JOIN r4 WITH Attributes::AttrRef::getAttributeName_dispred#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'read', Lhs.1 'func', Lhs.2 'cls'
688526 ~1% {4} r6 = JOIN r5 WITH Function::Function::getName_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.2 'func', Lhs.3 'cls', Lhs.1 'read', Rhs.1 'readFunction'
return r6
[2021-11-22 11:54:25] (415s) Tuple counts for PoorMansFunctionResolution::getSimpleMethodReferenceWithinClass#ff/2@f73ae6dq after 58ms:
688526 ~0% {4} r1 = SCAN PoorMansFunctionResolution::getSimpleMethodReferenceWithinClass_helper2#ffff OUTPUT In.1, In.0, In.3 'func', In.2 'result'
688526 ~0% {3} r2 = JOIN r1 WITH Class::Class::getAMethod_dispred#ff ON FIRST 2 OUTPUT Rhs.0, Lhs.2 'func', Lhs.3 'result'
20913 ~0% {2} r3 = JOIN r2 WITH Class::Class::getAMethod_dispred#ff ON FIRST 2 OUTPUT Lhs.1 'func', Lhs.2 'result'
return r3
We need the `pragma[only_bind_into]` in getSimpleMethodReferenceWithinClass_helper2, otherwise the tuple counts would look like, which is needlessly big.
[2021-11-22 17:14:34] (2s) Tuple counts for PoorMansFunctionResolution::getSimpleMethodReferenceWithinClass_helper2#ffff/4@5f0505h7 after 711ms:
13570510 ~3% {2} r1 = JOIN Function::Function::getName_dispred#ff_10#join_rhs WITH Attributes::AttrRef::getAttributeName_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'read', Lhs.1 'readFunction'
688526 ~1% {4} r2 = JOIN r1 WITH PoorMansFunctionResolution::getSimpleMethodReferenceWithinClass_helper#fff_201#join_rhs ON FIRST 1 OUTPUT Rhs.1 'func', Rhs.2 'cls', Lhs.0 'read', Lhs.1 'readFunction'
return r2
2021-11-22 17:22:39 +01:00
Arthur Baars
f6baab6399
Merge pull request #7211 from dbartol/dbartol/ruby-workspace
...
Merge Ruby workspace into root workspace
2021-11-22 16:22:12 +01:00
Alex Ford
68c3c16ab3
Ruby: enable forgery protection checks for development environments
2021-11-22 15:00:32 +00:00
Dave Bartolomeo
186e3755c0
Remove unnecessary path options
2021-11-22 09:50:01 -05:00
Tom Hvitved
da39f15a9d
Ruby: Move localFlowStepCommon into LocalFlow and make localSsaFlowStep private
2021-11-22 15:24:24 +01:00
Dave Bartolomeo
522074940d
Merge Ruby workspace into root workspace
2021-11-22 09:10:59 -05:00
AlonaHlobina
b60fef88b5
Merge pull request #7206 from github/AlonaHlobina-patch-2
...
Update query-metadata-style-guide.md
2021-11-22 14:48:46 +01:00
Mathias Vorreiter Pedersen
21167f4b67
C++: Accept test changes.
2021-11-22 13:04:23 +00:00
Mathias Vorreiter Pedersen
f308be7382
C++: Restore the missing flow. This has a couple of side-effects: First, it gives us some new good flow (yay). Second, it causes some duplication of results that uses 'argv' as a taint source. The duplication isn't very bad, though. And since it is only for paths that start at 'argv', I think we can live with it for now.
2021-11-22 13:04:07 +00:00
Mathias Vorreiter Pedersen
74221f4aba
Merge pull request #7209 from geoffw0/experimental-tests
...
C++: Move experimental test.
2021-11-22 13:01:52 +00:00
Harry Maclean
6f22867af9
Merge pull request #7015 from github/hmac/ssrf
...
Ruby: Add Server-Side Request Forgery query
2021-11-22 12:41:39 +00:00
CodeQL CI
ddeb700fd6
Merge pull request #7207 from github/asgerf/document-template-language-extensions
...
Approved by esbena
2021-11-22 04:16:19 -08:00
Tom Hvitved
fc64faefcf
Ruby: Restrict use-use flow
2021-11-22 13:05:17 +01:00
Erik Krogh Kristensen
e9df860431
refactor implementation to make Label implementations private
2021-11-22 12:17:19 +01:00
Geoffrey White
6f2b528a32
C++: Move experimental test.
2021-11-22 11:02:06 +00:00
Asger F
8322a44379
JS: Mention .hbs, .ejs, and .njk file extensions
...
Also fixes a typo `.xhm` -> `.xhtm`
2021-11-22 11:53:55 +01:00
Rasmus Wriedt Larsen
f09f1c4c50
Python: Minor refactor in PoorMansFunctionResolution
2021-11-22 11:11:29 +01:00
Tom Hvitved
39e3254fe0
Merge pull request #7182 from hvitved/csharp/self-assignment-bad-magic
...
C#: Fix bad magic `Element::fromSource` in context of `SelfAssignment.ql`
2021-11-22 10:57:48 +01:00
AlonaHlobina
0de6511dff
Update query-metadata-style-guide.md
2021-11-22 10:17:57 +01:00
Erik Krogh Kristensen
6060f2e3e3
remove unused alias edge
2021-11-22 09:03:40 +01:00
Erik Krogh Kristensen
c369b28a2a
optimizations in global data flow
2021-11-22 09:03:40 +01:00
Erik Krogh Kristensen
f39872e649
cache more predicates
2021-11-22 09:03:36 +01:00
Erik Krogh Kristensen
089d030bc2
make ApiLabel into a IPA type, and cache the public API of ApiGraphs
2021-11-22 09:03:33 +01:00
Erik Krogh Kristensen
9f08acab7e
Merge pull request #7170 from erik-krogh/qldocStyle
...
Ruby: use A/An/The to start qlDoc for classes
2021-11-19 17:34:35 +01:00
Nick Rolfe
df6ba43cca
Python: treat \A, \Z, \b, \B as special chars, not escapes
2021-11-19 15:49:53 +00:00
Anders Schack-Mulligen
344f7bca5b
Merge pull request #7187 from aschackmull/java/dont-clear-in-summary-store
...
Java: Don't clear content in store steps in summaries.
2021-11-19 16:12:37 +01:00
Harry Maclean
06000781e9
Ruby: Document PairCfgNode::getKey/getValue
2021-11-19 14:54:06 +00:00
Nick Rolfe
f63c768d9f
Ruby: parse \G, \b, and \B anchors as special characters, not escapes
2021-11-19 14:20:51 +00:00
Anders Schack-Mulligen
fc43220864
Java: bugfix
2021-11-19 15:01:29 +01:00
ihsinme
6d27585b92
Update FindIncorrectlyUsedExceptions.ql
2021-11-19 16:59:00 +03:00
Anders Schack-Mulligen
2b1f34ed9b
Java: Don't clear content in store steps in summaries.
2021-11-19 14:22:28 +01:00
ihsinme
418adb824c
Update FindIncorrectlyUsedExceptions.ql
2021-11-19 16:04:04 +03:00
Henry Mercer
8ba864e897
JS: Rename the available ML models external predicate
2021-11-19 12:56:03 +00:00
Tom Hvitved
47fd64fc44
Merge pull request #7130 from hvitved/cfg/dead-end-consistency
...
Shared CFG: Add "dead end" consistency query
2021-11-19 13:49:53 +01:00
Tom Hvitved
2b2ff7717e
Merge pull request #7179 from hvitved/ruby/shared-ssa-consistency
...
Ruby: Move SSA consistency queries into shared SSA library
2021-11-19 13:49:25 +01:00
Erik Krogh Kristensen
e25f03fb56
Merge pull request #137 from github/erik-krogh/even-more-consistency
...
even more consistency
2021-11-19 13:39:36 +01:00
Erik Krogh Kristensen
172684ce6e
QL: Merge pull request #137 from github/erik-krogh/even-more-consistency
...
even more consistency
2021-11-19 13:39:36 +01:00
Erik Krogh Kristensen
75586b0cf6
Apply suggestions from code review
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-11-19 13:23:01 +01:00
Erik Krogh Kristensen
a86f2c3ed1
Add codeql sources ( 1f3f7e9ccc)
2021-11-19 13:15:06 +01:00
Erik Krogh Kristensen
70f6493d7a
QL: Add codeql sources ( 1f3f7e9ccc)
2021-11-19 13:15:06 +01:00
Tom Hvitved
a393bff6cb
C#: Fix bad magic Element::getLocation in context of SelfAssignment.ql
2021-11-19 12:44:07 +01:00
Harry Maclean
90a9688310
Ruby: update CFG fixture
2021-11-19 11:31:14 +00:00
Benjamin Muskalla
cd39d15b40
Simplify diagnostic query
2021-11-19 12:28:24 +01:00
Harry Maclean
8fc7e4be43
Ruby: Increase precision of SSRF query
2021-11-19 11:28:09 +00:00
Harry Maclean
c297a68acf
Model more of the RestClient API
...
We now handle this form:
RestClient::Request.execute(url: "http://example.com ")
2021-11-19 11:28:09 +00:00
Harry Maclean
e2ef780c55
Add base_uri note to HTTParty modelling
2021-11-19 11:28:09 +00:00
Harry Maclean
38ff584307
Model more Faraday behaviour
...
You can instantiate a Faraday connection by passing a URL as an keyword
argument:
conn = Faraday.new(url: "http://example.com ")
2021-11-19 11:28:09 +00:00
Harry Maclean
f933d24031
Fix comment
2021-11-19 11:28:09 +00:00
Harry Maclean
70efadac77
Add change note for Ruby SSRF query
2021-11-19 11:28:09 +00:00
Harry Maclean
e87a4531d8
Remove redundant imports
2021-11-19 11:28:08 +00:00
Harry Maclean
ac20eafecc
Add qhelp for Ruby SSRF
2021-11-19 11:28:08 +00:00
Harry Maclean
2bba31eb02
Update metadata of Ruby SSRF query
2021-11-19 11:28:08 +00:00
Harry Maclean
dc464879a2
Add a query for server-side request forgery
2021-11-19 11:28:08 +00:00
Harry Maclean
cd33e4d394
Make string interpolation sanitizer reusable
2021-11-19 11:28:08 +00:00
Harry Maclean
b6ce37b241
Add getURL to HTTP::Client::Request
...
This member predicate gets dataflow nodes which contribute to the URL of
the request.
Also consolidate the identical tests for each HTTP client.
2021-11-19 11:28:08 +00:00
Harry Maclean
8fd8c9b04d
Fix CallExprCfgNode.getKeywordArgument
...
This predicate now produces results.
2021-11-19 11:28:08 +00:00
Harry Maclean
0caea17118
Add a test for CallCfgNodes
...
This test shows that `CallCfgNode.getKeywordArgument(string keyword)`
doesn't return any results.
2021-11-19 11:28:07 +00:00
Tom Hvitved
34feafd4fa
C#: Do not pass in TSourceVariable IPA type into shared SSA library
2021-11-19 11:53:25 +01:00
Anders Schack-Mulligen
1f3f7e9ccc
Merge pull request #7169 from erik-krogh/useMatches
...
use matches instead of regexpMatch/prefix/suffix
2021-11-19 11:42:47 +01:00
Tom Hvitved
4068cc9c3a
Shared SSA: Sync files
2021-11-19 11:31:28 +01:00
Tom Hvitved
bc80c9b013
Ruby: Move SSA consistency queries into shared SSA library
2021-11-19 11:31:28 +01:00
ihsinme
21ab8b0f63
Update IncorrectPrivilegeAssignment.ql
2021-11-19 13:06:08 +03:00
Benjamin Muskalla
fb9b16325d
Add diagnostic query for framework coverage
2021-11-19 10:30:59 +01:00
Tom Hvitved
fd0e318eb1
C#: Document inconsistency in one test
2021-11-19 09:43:51 +01:00
Tom Hvitved
923ca134e8
Shared CFG: Add "dead end" consistency query
2021-11-19 09:14:38 +01:00
ihsinme
fd73f4094f
Update FindIncorrectlyUsedExceptions.ql
2021-11-19 10:54:02 +03:00
ihsinme
6168b15bbc
Update cpp/ql/src/experimental/Security/CWE/CWE-266/IncorrectPrivilegeAssignment.ql
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-11-19 08:56:21 +03:00
luchua-bc
b6a6ed5ba3
Add a recommendation category query for local user input and check Apache file upload
2021-11-19 04:23:19 +00:00
Erik Krogh Kristensen
62730e7a4b
Merge pull request #7174 from erik-krogh/fixCSharpImport
...
C#: move Linq/Helpers.qll to the lib folder
2021-11-18 19:40:53 +01:00
Tom Hvitved
a4538de3a3
Shared CFG: Rename TNode to TCfgNode
...
This is in order to avoid name clash with the often so-named IPA type for data-
flow nodes. The name clash is not problematic because they are both in scope,
but because (cached) IPA types with overlapping names are known to sometimes
result in re-evaluation of cached stages, when one of the IPA types gets an
internal `#2` suffix in one query run, and the other IPA type gets the suffix
in another run.
2021-11-18 19:15:36 +01:00
Tom Hvitved
2f7250a0b3
Merge pull request #7160 from hvitved/csharp/cfg/static-scope
...
C#: Extend `(Annotated)ExitNode` to also cover static fields
2021-11-18 19:15:06 +01:00
Erik Krogh Kristensen
1a0379a894
introduce type resolution consistency checks
2021-11-18 18:44:34 +01:00
Erik Krogh Kristensen
d89e430db2
QL: introduce type resolution consistency checks
2021-11-18 18:44:34 +01:00
Erik Krogh Kristensen
15b56585f9
update inefficientStringComparison, to avoid underscores
2021-11-18 18:43:54 +01:00
Erik Krogh Kristensen
37c2db240c
QL: update inefficientStringComparison, to avoid underscores
2021-11-18 18:43:54 +01:00
Erik Krogh Kristensen
63ecae5426
update imports
2021-11-18 17:31:17 +01:00
Erik Krogh Kristensen
2d78cce7a5
move Linq/Helpers to the lib folder
2021-11-18 16:59:34 +01:00
Erik Krogh Kristensen
ee858d840e
get ReDoSUtil in sync for ruby
2021-11-18 16:49:34 +01:00
Tom Hvitved
2218516685
Ruby: Remove CP in EnsureSplitImpl::exit/3
2021-11-18 16:05:09 +01:00
Henry Mercer
46958e5bff
Merge pull request #7168 from erik-krogh/useMinInsteadofRank1
...
ATM: use min() instead of rank[1]
2021-11-18 14:56:49 +00:00
Erik Krogh Kristensen
af55f172ae
use A/An/The to start qlDoc for classes
2021-11-18 15:42:45 +01:00
Erik Krogh Kristensen
011fc20963
use matches instead of regexpMatch
2021-11-18 15:41:25 +01:00
Alex Ford
1ec935dee6
Ruby: make documentation of IOReader and FileReader less ambiguous
2021-11-18 14:35:44 +00:00
Anders Schack-Mulligen
6815a13a00
Merge pull request #6931 from hvitved/dataflow/restrict-derived-summaries
...
Data flow: Restrict derived flow summaries
2021-11-18 15:31:55 +01:00
Alex Ford
bd940712de
Update ruby/ql/lib/codeql/ruby/frameworks/Files.qll
...
Co-authored-by: Harry Maclean <hmac@github.com >
2021-11-18 14:18:39 +00:00
Erik Krogh Kristensen
036d749378
Merge pull request #126 from github/erik-krogh/update-sources
...
update sources
2021-11-18 14:32:01 +01:00
Erik Krogh Kristensen
44ffc7e155
QL: Merge pull request #126 from github/erik-krogh/update-sources
...
update sources
2021-11-18 14:32:01 +01:00
Erik Krogh Kristensen
2af7817691
use min() instead of rank[1]
2021-11-18 14:26:55 +01:00
Erik Krogh Kristensen
a0bf13007c
remove codeql-ruby sources
2021-11-18 14:15:19 +01:00
Erik Krogh Kristensen
9a6c9c4d77
QL: remove codeql-ruby sources
2021-11-18 14:15:19 +01:00
Erik Krogh Kristensen
e3c0e190d9
Add codeql-go sources ( 4cae4b23fc)
2021-11-18 14:14:20 +01:00
Erik Krogh Kristensen
fe097783a7
QL: Add codeql-go sources ( 4cae4b23fc)
2021-11-18 14:14:20 +01:00
Erik Krogh Kristensen
61b71807df
Add codeql sources ( 6c2713dd8b)
2021-11-18 14:14:17 +01:00
Erik Krogh Kristensen
fa54855995
QL: Add codeql sources ( 6c2713dd8b)
2021-11-18 14:14:17 +01:00
Erik Krogh Kristensen
fb40b8a032
update import script
2021-11-18 14:13:47 +01:00
Erik Krogh Kristensen
c07d55325e
QL: update import script
2021-11-18 14:13:47 +01:00
Erik Krogh Kristensen
349b556c26
Merge pull request #129 from github/erik-krogh/cartesian
...
various new improvements and queries
2021-11-18 13:16:53 +01:00
Erik Krogh Kristensen
1b070f1dd8
QL: Merge pull request #129 from github/erik-krogh/cartesian
...
various new improvements and queries
2021-11-18 13:16:53 +01:00
Erik Krogh Kristensen
38b925b19c
rename "use matches" query, and refactor into Query.qll
2021-11-18 13:05:41 +01:00
Erik Krogh Kristensen
d64c7fc638
QL: rename "use matches" query, and refactor into Query.qll
2021-11-18 13:05:41 +01:00
Erik Krogh Kristensen
89604deb8d
add redundant inline cast query
2021-11-18 12:23:55 +01:00
Erik Krogh Kristensen
d8bf7ed6e0
QL: add redundant inline cast query
2021-11-18 12:23:55 +01:00
Erik Krogh Kristensen
97461d1f11
add var unused in disjunct query
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
12a3fa77f6
QL: add var unused in disjunct query
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
112cd9d29c
move use-set-literal implementation to Query.qll file
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
1cbacc41d7
QL: move use-set-literal implementation to Query.qll file
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
33d363eb94
move use-instanceof implementation to Query.qll, and rename the .ql file
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
f320414b1c
QL: move use-instanceof implementation to Query.qll, and rename the .ql file
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
45def1b124
move implementation of implicit-this to Query.qll file
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
28444c7e9c
QL: move implementation of implicit-this to Query.qll file
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
ac4476fa82
performance improvements
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
c3f362876b
QL: performance improvements
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
84d277dc94
add getLeft/getRight helper predicates to disjunction/conjunction
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
0154f4eba4
QL: add getLeft/getRight helper predicates to disjunction/conjunction
2021-11-18 12:23:09 +01:00
Erik Krogh Kristensen
9d308ba0bd
refactor away the ComparisonOp ast class
2021-11-18 12:23:07 +01:00
Erik Krogh Kristensen
7c82c5e378
QL: refactor away the ComparisonOp ast class
2021-11-18 12:23:07 +01:00
Geoffrey White
6c2713dd8b
Merge pull request #7159 from MathiasVP/pointers-are-always-iterators
...
C++: Always recognize pointers as iterators
2021-11-18 11:14:44 +00:00
Erik Krogh Kristensen
5a76e7d4f8
introduce FieldDecl in the ast
2021-11-18 12:08:28 +01:00
Erik Krogh Kristensen
1b19a3e320
QL: introduce FieldDecl in the ast
2021-11-18 12:08:28 +01:00
Tony Torralba
9d22ec88fd
Merge pull request #7165 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-11-18 10:37:34 +01:00
Erik Krogh Kristensen
1cca377e7d
Merge pull request #6561 from erik-krogh/htmlReg
...
JS/Py/Ruby: add a bad-tag-filter query
2021-11-18 09:39:13 +01:00
github-actions[bot]
ecdaeb0c10
Add changed framework coverage reports
2021-11-18 00:09:24 +00:00
Alex Ford
9a74f18ac5
Ruby: take File::try_convert as a potential file instance instantiation
2021-11-17 23:19:13 +00:00
Alex Ford
ce004e9c1e
Ruby: don't interpret File#try_convert as a method that reads from a file/IO
2021-11-17 23:01:19 +00:00
Alex Ford
12a3251649
Ruby: extend FileSystemReadAccess and restructure some Files.qll classes
2021-11-17 23:01:18 +00:00
Tom Hvitved
a89be2e3f8
C#: Extend (Annotated)ExitNode to also cover static fields
2021-11-17 20:50:38 +01:00
Mathias Vorreiter Pedersen
c998370c84
C++: Accept more test changes.
2021-11-17 15:22:17 +00:00
Mathias Vorreiter Pedersen
36585a7469
C++: Accept test changes.
2021-11-17 14:41:30 +00:00
Mathias Vorreiter Pedersen
6dc6a78293
C++: Add a 'IteratorByPointer' class so pointers are always iterators.
2021-11-17 14:41:19 +00:00
Alex Ford
08b6a17097
Merge pull request #7151 from github/ruby/methodcallnode
...
Ruby: add `getMethodName` predicate to `DataFlow::CallNode` class
2021-11-17 14:40:07 +00:00
Anders Schack-Mulligen
22ebe68b1b
Merge pull request #7132 from aschackmull/java/overrides
...
Java: Fix overrides to not be transitive.
2021-11-17 15:38:11 +01:00
Anders Schack-Mulligen
1645fcf79c
Merge pull request #7088 from aschackmull/java/parameterized-subtyping
...
Java: Improve algorithm for subtyping of parameterized types.
2021-11-17 15:28:28 +01:00
Tom Hvitved
de72a765e0
Ruby: Update expected CFG test output (reordering)
2021-11-17 13:44:55 +01:00
Tom Hvitved
9ff63b00d6
Ruby: Remove CFG dependency from AST stage
...
Commit 028ef6f27f had the unintended side-effect
that the AST and CFG stages got merged, because the AST stage's `isCapturedAccess`
now depends on `getCfgScopeImpl`, which belongs to the CFG stage.
The fix is to remove `getCfgScopeImpl` from the CFG stage, and instead let it
be part of the AST stage.
2021-11-17 13:15:55 +01:00
Arthur Baars
5ddfb37f29
Merge pull request #7155 from aibaars/ruby-qualified-import
...
Ruby: QL generator: use qualified imports
2021-11-17 12:40:14 +01:00
Arthur Baars
6f24947ec6
Merge pull request #7156 from aibaars/ruby-prepare-db-upgrade-fix
...
Ruby: Fix scripts/prepare-db-upgrade.sh
2021-11-17 12:39:55 +01:00
Benjamin Muskalla
3c3a65243f
Merge pull request #6664 from bmuskalla/bmuskalla/modelGenerator
...
Java: Initial CSV model generator
2021-11-17 12:30:45 +01:00
Arthur Baars
fbb3e8d780
Fix scripts/prepare-db-upgrade.sh
2021-11-17 12:11:20 +01:00
Geoffrey White
d232283647
Merge pull request #7149 from geoffw0/non-https-url2
...
C++: Minor improvements to 'Failure to use HTTPS URLs' query
2021-11-17 10:05:30 +00:00
Tom Hvitved
4eacbd1cbe
Ruby: Sync files
2021-11-17 10:49:51 +01:00
Tom Hvitved
6d58dd2823
Java: Update expected test output
2021-11-17 10:49:51 +01:00
Tom Hvitved
3da73b9001
C#: Update expected test output
2021-11-17 10:49:49 +01:00
Tom Hvitved
58dd75881c
C#: Update flow summary to avoid negative recursion
2021-11-17 10:39:13 +01:00
Tom Hvitved
ac41451798
Data flow: Sync files
2021-11-17 10:39:12 +01:00
Tom Hvitved
0c1285f5d9
Data flow: Restrict derived flow summaries
2021-11-17 10:39:12 +01:00
Arthur Baars
7c2841f058
Ruby: QL generator: use qualified imports
2021-11-17 10:37:44 +01:00
Erik Krogh Kristensen
474c808373
Merge pull request #7137 from erik-krogh/functionExport
...
JS: recognize library inputs when the library exports "through" a function
2021-11-17 09:49:02 +01:00
Tom Hvitved
08c778241d
Ruby: Adopt to changes after rebase
2021-11-17 09:17:32 +01:00
Anders Schack-Mulligen
69671ce90d
Java: cache overrides
2021-11-17 09:16:58 +01:00
Tom Hvitved
413375992d
Ruby: Flatten nested statements inside desugared for loops
2021-11-17 09:05:37 +01:00
Tom Hvitved
9125b85ff0
Ruby: Add missing QL doc
2021-11-17 09:05:37 +01:00
Tom Hvitved
92453bd2c5
Ruby: Rewrite break_ensure.rb CFG test to use while loops instead of for loops
2021-11-17 09:05:37 +01:00
Tom Hvitved
945bb7459a
Ruby: Update expected test output
2021-11-17 09:05:37 +01:00
Tom Hvitved
a62ad5000b
Ruby: Make isCapturedAccess work with synthesized scopes
2021-11-17 09:05:37 +01:00
Tom Hvitved
135ee0d0c1
Ruby: Add implicit writes for synthesized parameters
2021-11-17 09:05:37 +01:00
Tom Hvitved
028ef6f27f
Ruby: Handle synthesized scopes
2021-11-17 09:05:37 +01:00
Tom Hvitved
48e6bdb117
Ruby: Remove EmptinessCompletion
2021-11-17 09:05:36 +01:00
Tom Hvitved
db6f843641
Ruby: Hide SynthBlock from the public API
2021-11-17 09:05:36 +01:00
Alex Ford
8603609698
Update test output to account for for-loop -> each desugaring
2021-11-17 09:05:36 +01:00
Alex Ford
e468434b82
ruby: drop special handling of for-in loops in the CFG
2021-11-17 09:05:33 +01:00
Alex Ford
ddfcfc9b67
Desugar for loops as each calls
2021-11-17 09:04:29 +01:00
Alex Ford
f6d99dc00d
Define getBlockImpl for synthesized method calls
2021-11-17 09:04:29 +01:00
Alex Ford
a743067dc8
Support synthesis of blocks (without a new variable scope)
2021-11-17 09:04:29 +01:00
Alex Ford
04df56d1c0
Support synthesis of SimpleParameters
2021-11-17 09:04:29 +01:00
Tom Hvitved
7cfc696d62
Merge pull request #7141 from hvitved/ruby/synthesis-realnode-recursion
...
Ruby: Eliminate unnecessary recursion through `RealNode`
2021-11-17 09:03:30 +01:00
Pierre
f846915b58
Merge pull request #7069 from github/turbo-apple-silicon-requirements-1
...
Add requirements for Apple Silicon
2021-11-17 00:04:06 +01:00
Alex Ford
c8cdbfa352
ruby: push getMethodName into DataFlow::CallNode
2021-11-16 17:11:26 +00:00
Erik Krogh Kristensen
cc16fdecbb
Merge pull request #130 from github/erik-krogh/more-types
...
Better type resolution
2021-11-16 17:52:15 +01:00
Erik Krogh Kristensen
f54f70d707
QL: Merge pull request #130 from github/erik-krogh/more-types
...
Better type resolution
2021-11-16 17:52:15 +01:00
Benjamin Muskalla
b4eadefb92
Fix test
2021-11-16 17:28:01 +01:00
Benjamin Muskalla
063c8286c8
Merge pull request #7150 from bmuskalla/removeClassFile
...
Java: Remove class file
2021-11-16 17:27:31 +01:00
Benjamin Muskalla
55cdb7d755
Exclude .class files from git
2021-11-16 16:41:23 +01:00
Alex Ford
286c894f34
ruby: add DataFlow::MethodCallNode class
2021-11-16 15:39:47 +00:00
Benjamin Muskalla
3dbaa087d4
Remove class file
2021-11-16 16:36:27 +01:00
Paolo Tranquilli
2ce5b85db4
Merge pull request #7112 from github/redsun82/frontend-update
...
c++: update ir tests after frontend update
2021-11-16 16:30:34 +01:00
Chris Smowton
188915e597
Fix typos
2021-11-16 15:30:00 +00:00
Anders Schack-Mulligen
76606b5995
Java: Add more comments.
2021-11-16 16:11:14 +01:00
Taus
eed98bd76a
Merge pull request #5588 from jorgectf/jorgectf/python/jwt-queries
...
Python: Add JWT security-related queries
2021-11-16 15:40:45 +01:00
Geoffrey White
ea9640a39d
C++: Autoformat.
2021-11-16 14:26:42 +00:00
Chris Smowton
8d22db8089
Merge pull request #7140 from smowton/smowton/admin/merge-lgtm-com-cherry-pick
...
Merge lgtm.com into main
2021-11-16 14:13:27 +00:00
jorgectf
9ad8a85f4d
Delete redundant checks in verifiesSignature()
2021-11-16 15:08:18 +01:00
Anders Schack-Mulligen
c70d384d28
Merge pull request #7045 from aschackmull/dataflow/hidden-ret-subpaths
...
Data flow: Support hidden return nodes in subpaths predicate
2021-11-16 15:04:51 +01:00
jorgectf
3fe2a08376
Update .expected file
2021-11-16 15:03:49 +01:00
Jorge
a722631278
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-11-16 15:02:06 +01:00
Paolo Tranquilli
8d3cf7f5aa
C++: update ir tests after frontend update
...
After updating the frontend new intermediate objects appear in the AST
and raw dumps.
2021-11-16 13:25:32 +00:00
Anders Schack-Mulligen
d408105fad
Java: Fix bad join-order.
2021-11-16 14:25:19 +01:00
Geoffrey White
5ef71e6ef3
C++: Add a few more sinks.
2021-11-16 13:02:56 +00:00
Tom Hvitved
a65f5725d3
Merge pull request #7146 from hvitved/ruby/remove-ci-check
...
Ruby: Remove `Compile with previous CodeQL versions` CI check
2021-11-16 13:44:24 +01:00
Erik Krogh Kristensen
a7cd097ca2
Merge pull request #6756 from erik-krogh/extractBigReg
...
JS: extract regexp literals for string concatenations
2021-11-16 13:33:21 +01:00
Tom Hvitved
075c9d89b3
Ruby: Remove Compile with previous CodeQL versions CI check
2021-11-16 13:30:32 +01:00
Tom Hvitved
9e8e2e2b48
Ruby: Update CFG test output (some nodes have been reordered)
2021-11-16 12:45:24 +01:00
Tom Hvitved
e7b091086d
Ruby: Eliminate unnecessary recursion through RealNode
2021-11-16 12:24:17 +01:00
Geoffrey White
aafa5762ad
C++: Add a CWE tag associated with OWASP A8.
2021-11-16 11:21:25 +00:00
Rasmus Wriedt Larsen
98e6fc8a88
Python/Ruby: Remove owasp tags
...
These are no longer correct, since the A1 category changed from 2017 to
2021, see https://owasp.org/Top10/#whats-changed-in-the-top-10-for-2021
Since only a very few queries had these tags, I think we're much better
off having them removed.
2021-11-16 12:03:50 +01:00
Tom Hvitved
3a8e2db3ab
Merge pull request #7121 from hvitved/ruby/lookup-const-anti-join
2021-11-16 11:32:55 +01:00
Geoffrey White
ed3e5395d1
Merge pull request #7063 from MathiasVP/use-range-analysis-in-buffer-write
...
C++: Use `SimpleRangeAnalysis` in `Printf.qll`
2021-11-16 10:24:47 +00:00
Benjamin Muskalla
0e6bb28016
Only consider store steps
2021-11-16 10:46:24 +01:00
Rasmus Wriedt Larsen
a980f26fda
Python: Model os.stat (and friends)
2021-11-16 10:45:32 +01:00
Rasmus Wriedt Larsen
9f4107d211
Python: Model posixpath, ntpath, and genericpath modules
2021-11-16 10:45:14 +01:00
Mathias Vorreiter Pedersen
71c279f537
Merge branch 'main' into use-range-analysis-in-buffer-write
2021-11-16 09:14:02 +00:00
ihsinme
7f0a7bbec9
Update IncorrectPrivilegeAssignment.ql
2021-11-16 10:12:50 +03:00
Erik Krogh Kristensen
b9ea4a8709
recognize library inputs when the library exports "through" a function
2021-11-15 22:43:38 +01:00
Erik Krogh Kristensen
1a98079100
Merge pull request #7139 from erik-krogh/gotGet
...
JS: improve the got model
2021-11-15 22:42:03 +01:00
Erik Krogh Kristensen
12c24c07df
improve the got model
2021-11-15 21:52:12 +01:00
Tom Hvitved
f01b9005b1
Merge pull request #7122 from hvitved/csharp/expose-repr-perf
...
C#: Replace `localFlow` with `localFlowStep` in recursive predicate
2021-11-15 21:11:21 +01:00
Tom Hvitved
6599eca9fb
Merge pull request #7138 from hvitved/ruby/forward-param-cfg
...
Ruby: Add missing CFG entry for `ForwardParameter`
2021-11-15 19:28:31 +01:00
Chris Smowton
708e059e7f
Merge branch 'lgtm.com' of github.com:github/codeql into smowton/admin/merge-lgtm-com-cherry-pick
2021-11-15 18:18:28 +00:00
ihsinme
7832e8572b
Update cpp/ql/src/experimental/Security/CWE/CWE-266/IncorrectPrivilegeAssignment.cpp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-11-15 21:08:20 +03:00
ihsinme
0359c381e1
Update cpp/ql/src/experimental/Security/CWE/CWE-266/IncorrectPrivilegeAssignment.cpp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-11-15 21:08:11 +03:00
Tony Torralba
d97b130bdd
Merge pull request #7092 from atorralba/atorralba/android-asynctask-jumpstep
...
Java: Add AsyncTask additional value step
2021-11-15 16:59:56 +01:00
Benjamin Muskalla
fd9199c0c0
Simplify handling of tainting fields
2021-11-15 16:40:09 +01:00
Benjamin Muskalla
d7ed325b3f
Refactor content flow into predicate
2021-11-15 16:30:55 +01:00
Benjamin Muskalla
f4310898b3
Capture sources flowing into parameters
2021-11-15 16:28:28 +01:00
Tom Hvitved
03ae58830a
Ruby: Add missing CFG entry for ForwardParameter
2021-11-15 16:28:17 +01:00
Tom Hvitved
3ce41015bb
Ruby: Add CFG test for forward parameters
2021-11-15 16:25:06 +01:00
Tony Torralba
87ebcea913
Add AsyncTask value step
2021-11-15 16:13:36 +01:00
Anders Schack-Mulligen
a40a393b38
Merge pull request #7134 from aschackmull/java/additionalvaluestep
...
Java: Add support for adding additional value steps.
2021-11-15 16:07:30 +01:00
Anders Schack-Mulligen
1cd42ea668
Java: Fix test and some references.
2021-11-15 16:03:04 +01:00
Rasmus Wriedt Larsen
6b7abacc5f
Merge pull request #7135 from RasmusWL/b32hexencode
...
Python: Model `b32hexencode`/`b32hexdecode`
2021-11-15 15:51:46 +01:00
Benjamin Muskalla
8040d9cfcf
Only consider true return statements as sinks
2021-11-15 15:29:01 +01:00
Rasmus Wriedt Larsen
95dbe1383b
Merge pull request #7133 from RasmusWL/minor-3.10-fix
...
Python: Minor additions for 3.10
2021-11-15 15:25:34 +01:00
Rasmus Wriedt Larsen
39927fa613
Python: Model b32hexencode/b32hexdecode
...
New in Python 3.10
See
- https://devdocs.io/python~3.10/library/base64#base64.b32hexencode
- https://devdocs.io/python~3.10/library/base64#base64.b32hexdecode
2021-11-15 15:23:49 +01:00
Benjamin Muskalla
e6e52a3b32
190
2021-11-15 15:18:03 +01:00
Anders Schack-Mulligen
2fe6880d70
Java: Add support for adding additional value steps.
2021-11-15 15:05:48 +01:00
Rasmus Wriedt Larsen
cfdfcaa3e8
Python: Support Path.hardlink_to (new in 3.10)
...
See https://docs.python.org/3.10/library/pathlib.html#pathlib.Path.hardlink_to
2021-11-15 14:57:59 +01:00
Rasmus Wriedt Larsen
5d60975f65
Python: Support aiter and anext (new in 3.10)
...
See
- https://docs.python.org/3/whatsnew/3.10.html#other-language-changes
- https://docs.python.org/3.10/library/functions.html#aiter
- https://docs.python.org/3.10/library/functions.html#anext
2021-11-15 14:55:34 +01:00
Mathias Vorreiter Pedersen
3f0bfe1d75
C++: Remove the implicit assumption about the existence of a lower bound implying the existence of an upper bound (and vice veraa).
2021-11-15 13:39:15 +00:00
Mathias Vorreiter Pedersen
63f50a9eb7
C++: Cleanup the case for possibly-negative unsigned values.
2021-11-15 13:31:51 +00:00
Mathias Vorreiter Pedersen
9a9f7943aa
C++: Fix bug for exact powers of 10 and accept test changes.
2021-11-15 13:20:45 +00:00
Mathias Vorreiter Pedersen
53884915a5
C++: Add more tests (which demonstrate a couple of bugs in the implementation).
2021-11-15 13:18:30 +00:00
Anders Schack-Mulligen
c616f5784d
Java: Fix overrides to not be transitive.
2021-11-15 13:54:53 +01:00
Rasmus Wriedt Larsen
7c3b68b7f8
Merge pull request #7091 from RasmusWL/port-request-without-validation
...
Python: Port `py/request-without-cert-validation` to use API graphs
2021-11-15 13:51:57 +01:00
Erik Krogh Kristensen
0023b885f5
update expected output
2021-11-15 13:50:12 +01:00
Erik Krogh Kristensen
2163648b39
fix location off-by-ones with regexp parsing
2021-11-15 13:43:39 +01:00
Rasmus Wriedt Larsen
9e097f5430
Python: Improve PoorMansFunctionResolution
2021-11-15 13:40:19 +01:00
Rasmus Wriedt Larsen
0d4cb1e6ce
Python: Add test of PoorMansFunctionResolution
2021-11-15 13:34:39 +01:00
Rasmus Wriedt Larsen
6eb4525ab2
Python: Model wsgiref.simple_server applications
2021-11-15 13:34:39 +01:00
Rasmus Wriedt Larsen
e812029c03
Python: Add test for wsgiref.simple_server
2021-11-15 13:34:38 +01:00
Tom Hvitved
4bbfa514c9
Merge pull request #6535 from hvitved/csharp/consistency-queries
...
C#: Add consistency queries
2021-11-15 13:15:58 +01:00
CodeQL CI
c8b8a2874f
Merge pull request #7119 from github/max-schaefer/api-graphs-property-copies
...
Approved by asgerf
2021-11-15 04:09:16 -08:00
Benjamin Muskalla
dc022430ee
Remove superflous instanceof
2021-11-15 13:07:02 +01:00
Benjamin Muskalla
412bd32f45
Move more predicates into configuration
2021-11-15 13:04:23 +01:00
Benjamin Muskalla
b84c03672d
Prefer types to TargetAPI
2021-11-15 12:43:46 +01:00
Benjamin Muskalla
bca6cecd1c
Remove basic support for lambda flow
2021-11-15 12:38:30 +01:00
Taus
c17560f948
Merge pull request #7096 from tausbn/python-fix-more-bad-joins
...
Python: Fix a bunch of performance issues
2021-11-15 12:10:27 +01:00
Benjamin Muskalla
78e3906ea7
Exclude more JDK internals
2021-11-15 11:58:10 +01:00
Tom Hvitved
723ac818d9
Shared CFG: Update breakInvariant4 consistency test
2021-11-15 11:43:49 +01:00
Mathias Vorreiter Pedersen
c2e057def9
Merge pull request #7094 from geoffw0/non-https-url
...
C++: New query 'Failure to use HTTPS URLs'
2021-11-15 10:00:19 +00:00
Tom Hvitved
d323b3b17d
Merge pull request #7123 from hvitved/ruby/definitions-perf
...
Ruby: Fix performance problem in `Definitions.ql`
2021-11-15 10:58:03 +01:00
Benjamin Muskalla
cce3780481
Restrict param2return value features
2021-11-15 09:57:23 +01:00
ihsinme
f102fa1d33
Update IncorrectPrivilegeAssignment.ql
2021-11-14 12:17:01 +03:00
ihsinme
e383e44d36
Update IncorrectPrivilegeAssignment.ql
2021-11-14 11:57:40 +03:00
ihsinme
ea1d18ed60
Update IncorrectPrivilegeAssignment.cpp
2021-11-14 11:36:06 +03:00
Erik Krogh Kristensen
f0c5a80d1a
apply the explicit this patch to new code
2021-11-13 21:03:54 +01:00
Erik Krogh Kristensen
0ff36cd083
Merge branch 'main' into explicit-this
2021-11-13 21:01:25 +01:00
Tom Hvitved
b5d37ae0fe
C#: Update CFG consistency checks
2021-11-12 17:07:37 +01:00
Tom Hvitved
d1a09b62d3
Address review comments
2021-11-12 16:31:00 +01:00
Erik Krogh Kristensen
eef7709982
Merge pull request #7057 from erik-krogh/cwe598
...
JS: add js/sensitive-get-query query
2021-11-12 16:03:21 +01:00
yoff
5beb681580
Merge pull request #7087 from RasmusWL/path-injection-fp
...
Python: Add interesting path-injection FP
2021-11-12 15:20:19 +01:00
Tom Hvitved
3471e757f2
Ruby: Fix performance problem in Definitions.ql
2021-11-12 14:35:16 +01:00
yoff
9f614b1d98
Merge pull request #7016 from RasmusWL/django-rest-framework
...
Python: Model Django REST framework
2021-11-12 14:27:56 +01:00
Rasmus Wriedt Larsen
b11d11c0c9
Python: Add change-note
2021-11-12 14:27:01 +01:00
Tom Hvitved
19e6da517b
Ruby: Fix bad join-order in resolveConstant
...
```
[2021-11-09 11:35:47] (99s) Starting to evaluate predicate Module::Cached::resolveConstant#ff#antijoin_rhs/3@f6dcd6
[2021-11-09 11:35:58] (111s) Tuple counts for Module::Cached::resolveConstant#ff#antijoin_rhs/3@f6dcd6 after 11.5s:
165960683 ~0% {4} r1 = JOIN Module::Cached::resolveConstant#ff#shared WITH Module::constantDefinition0#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'arg1', Lhs.0 'arg0', Lhs.2 'arg2'
0 ~0% {3} r2 = JOIN r1 WITH Module::ClassDeclaration::getSuperclassExpr_dispred#ff ON FIRST 2 OUTPUT Lhs.2 'arg0', Lhs.1 'arg1', Lhs.3 'arg2'
0 ~0% {3} r3 = JOIN r1 WITH Constant::ConstantAccess::getScopeExpr_dispred#ff ON FIRST 2 OUTPUT Lhs.2 'arg0', Lhs.1 'arg1', Lhs.3 'arg2'
0 ~0% {3} r4 = r2 UNION r3
return r4
```
2021-11-12 14:08:11 +01:00
Tom Hvitved
9ee1c49bac
C#: Replace localFlow with localFlowStep in recursive predicate
2021-11-12 14:04:38 +01:00
Rasmus Wriedt Larsen
491f72bb2a
Python: Adjust generated code to be more familiar
2021-11-12 13:30:03 +01:00
Rasmus Wriedt Larsen
de69e4c645
Python: Expand on SubclassFinder implementation note
2021-11-12 13:29:03 +01:00
Rasmus Wriedt Larsen
f7b53321b9
Python: Remove copy-pasted comment
2021-11-12 13:19:20 +01:00
Tom Hvitved
67ebebbaeb
C#: Add consistency queries
2021-11-12 13:10:46 +01:00
Taus
55ea715ce9
Merge pull request #7033 from RasmusWL/flask-admin
2021-11-12 12:18:56 +01:00
Nick Rolfe
9034d74663
Ruby: add file-level qldoc
2021-11-12 11:12:27 +00:00
Rasmus Wriedt Larsen
860b1a5cc3
Python: Other minor QLDoc adjustment
2021-11-12 11:46:45 +01:00
Erik Krogh Kristensen
80919e39a2
Merge branch 'main' into extractBigReg
2021-11-12 11:45:49 +01:00
Rasmus Wriedt Larsen
99081ea7e0
Python: Minor adjustment in QLDoc
2021-11-12 11:42:36 +01:00
Rasmus Wriedt Larsen
5e4b866f2b
Python: Model rest_framework.exceptions.APIException
2021-11-12 11:37:54 +01:00
Rasmus Wriedt Larsen
62e58b534c
Python: SubclassFinder: reorder + comment
2021-11-12 11:11:13 +01:00
Rasmus Wriedt Larsen
f48ecb1dc8
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-11-12 10:57:56 +01:00
Benjamin Muskalla
a0b7f267ff
Only capture taint from own fields
...
Also exclude `Charset` as relevant taint-carrying type. This is generally
what we want to lets us avoid tracking arguments that lead to FP.
2021-11-12 10:15:15 +01:00
Benjamin Muskalla
0234e77d2f
Let sink node be pluggable in any call context
2021-11-12 09:43:05 +01:00
Benjamin Muskalla
b8809a20d8
Support propagating taint of inner object
2021-11-12 09:39:59 +01:00
Tom Hvitved
b5cf4c2f82
Merge pull request #7111 from michaelnebel/csharp-move-printast
...
Csharp move PrintAst query to test directory.
2021-11-12 09:19:13 +01:00
Rasmus Wriedt Larsen
06cae3dac2
Merge pull request #7104 from yoff/python/model-aiomysql
...
Python: model aiomysql
2021-11-11 16:58:01 +01:00
Tom Hvitved
004144bbef
Merge pull request #7028 from hvitved/ruby/api-graphs-prune
...
Ruby: Prune nodes before computing `trackUseNode`
2021-11-11 15:57:21 +01:00
Michael Nebel
9ea320c53c
Update all PrintAst.qlref to point to new location of PrintAst.ql
2021-11-11 15:19:15 +01:00
Mathias Vorreiter Pedersen
982de28b89
Update cpp/ql/lib/semmle/code/cpp/commons/Printf.qll
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-11-11 13:19:13 +00:00
Erik Krogh Kristensen
e09c12430d
Merge pull request #7105 from erik-krogh/flagJqueryUI
...
JS: have the aliasPropertyPresenceStep step over extend calls
2021-11-11 14:05:11 +01:00
Erik Krogh Kristensen
b639a8d183
update ruby example
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-11-11 14:04:38 +01:00
CodeQL CI
34cc61e51f
Merge pull request #7083 from asgerf/js/type-track-object-literals-with-methods
...
Approved by erik-krogh
2021-11-11 04:35:55 -08:00
Michael Nebel
5a4557f588
Move PrintAst.ql and update import statement
2021-11-11 13:27:12 +01:00
Rasmus Lerchedahl Petersen
e2a2a42d59
Python: Fix api references
2021-11-11 13:20:57 +01:00
Geoffrey White
ea580cd9c0
C++: Add explanatory comments.
2021-11-11 11:49:51 +00:00
Erik Krogh Kristensen
b513033e0f
Merge pull request #7021 from erik-krogh/cwe326
...
JS: Add insufficient key size query
2021-11-11 12:17:04 +01:00
Erik Krogh Kristensen
891694b50a
Merge pull request #5908 from erik-krogh/protoLib
...
JS: Add library input as source to js/prototype-polluting-assignment
2021-11-11 12:04:05 +01:00
Erik Krogh Kristensen
140a70f9df
Merge pull request #7029 from erik-krogh/cwe384
...
JS: add js/session-fixation query
2021-11-11 11:59:52 +01:00
Erik Krogh Kristensen
0bf055fbec
Merge pull request #7103 from erik-krogh/add-cwe532-to-cleartextlogging
...
JS: add CWE-532 to the js/clear-text-logging query
2021-11-11 11:59:16 +01:00
Erik Krogh Kristensen
9a11c13e11
update expected output
2021-11-11 11:56:30 +01:00
Mathias Vorreiter Pedersen
dbcd4d6d5d
C++: Remove 'ReferenceToInstruction' from the list of instructions we interpret as a load. This makes use lose a bunch of flow, and we'll restore this flow in the next commit.
2021-11-11 10:38:52 +00:00
Anders Schack-Mulligen
7ffd9b4f9e
Dataflow: Include read/store steps when finding non-hidden return.
2021-11-11 11:26:21 +01:00
Asger F
7d8284a41c
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-11-11 10:42:49 +01:00
Geoffrey White
901919f7ff
C++: Add tests expanding on the issue with (global) variables.
2021-11-11 09:40:03 +00:00
Geoffrey White
43ff3b1c80
C++: Address review comment.
2021-11-11 09:39:59 +00:00
Mathias Vorreiter Pedersen
bf9b8cfff0
Merge pull request #6947 from ihsinme/ihsinme-patch-077
...
CPP: Add query for CWE-377 Insecure Temporary File
2021-11-11 09:02:04 +00:00
Geoffrey White
9a1b98e1d9
C++: Fix qhelp example link.
2021-11-10 17:54:05 +00:00
Erik Krogh Kristensen
5d901ef728
move extend aliasing to getAnAliasedSourceNode
2021-11-10 18:08:50 +01:00
Geoffrey White
c29011a5cf
C++: Add more sinks.
2021-11-10 16:43:28 +00:00
Benjamin Muskalla
2d4176bec0
Ignore Number-derived types
2021-11-10 16:30:27 +01:00
Benjamin Muskalla
dbd393b77a
Support flow into field of referenced objects
2021-11-10 16:30:27 +01:00
Benjamin Muskalla
974c7b0898
Avoid cross-class flow for field writes
2021-11-10 16:30:26 +01:00
Benjamin Muskalla
74ac234f1c
Restrict field access to same type
2021-11-10 16:30:26 +01:00
Benjamin Muskalla
8740e879b4
Fix docs
2021-11-10 16:30:26 +01:00
Benjamin Muskalla
a546b38ee0
Restrict field access to corresponding type
2021-11-10 16:30:26 +01:00
Benjamin Muskalla
6960a7b97e
Remove extraneous last column
2021-11-10 16:30:25 +01:00
Benjamin Muskalla
ef972159a6
Fix bug when generating output in a subfolder
2021-11-10 16:30:25 +01:00
Benjamin Muskalla
4cfd978bfe
Support generating in respective folders
2021-11-10 16:30:25 +01:00
Benjamin Muskalla
b92758883b
Auto-format generated qll files
2021-11-10 16:30:25 +01:00
Benjamin Muskalla
e2bd792fc2
Consider bulk-like data for argument accessors
2021-11-10 16:30:25 +01:00
Benjamin Muskalla
739fe75194
Support flow for factory and strategy pattern
...
* Support models for factories that create
new instances of an object while tainting it with incoming data
* Support models to infer super types for
private implementations to expose the models
at the right level
2021-11-10 16:30:24 +01:00
Benjamin Muskalla
58de6d143f
Add docs to explain the models captured by the predicates
2021-11-10 16:30:24 +01:00
Benjamin Muskalla
747ab122c3
Restrict fluent api models to same type access
2021-11-10 16:30:24 +01:00
Benjamin Muskalla
8564c9001a
Fix naming for source nodes
2021-11-10 16:30:24 +01:00
Benjamin Muskalla
9500c9c8bc
Support lambda flow for source models
...
Also rely on public API to detect the source node
2021-11-10 16:30:24 +01:00
Benjamin Muskalla
35baa1c3df
Support bulkdata for boxed types as well
2021-11-10 16:30:23 +01:00
Benjamin Muskalla
83b4070f31
Fix bug to accept bulk data for char/byte arrays
2021-11-10 16:30:23 +01:00
Benjamin Muskalla
281f25403d
Match enclosing unit without casting to specific nodes
2021-11-10 16:30:23 +01:00
Benjamin Muskalla
bc10fd94cb
Support generating only specific models
2021-11-10 16:30:23 +01:00
Benjamin Muskalla
0e9fcc6c39
Only generate models for local supertypes
...
Avoid generating models for classes
implementing external SPI (e.g. `FileFilter`).
Keep `toString` models intact as they're
commonly used as taint-propagation method
(e.g. see `Joiner`).
2021-11-10 16:30:23 +01:00
Benjamin Muskalla
157f56f48a
Capture model for defining interface
...
Instead of modeling individual implementations, take a more general
approach of reuse dataflows for interfaces defined by a library. This allows
tracking flows across all implementations and aligns better with how we
manually model frameworks. This may have some FPs given all possible flows
are modeled for a specific interface but also covers more scenarios where
we don't know which implementation of an interface is used.
2021-11-10 16:30:22 +01:00
Benjamin Muskalla
f36bb8baaf
Exclude models for simpler types
...
Avoid generating models for types that can't really propagate taint
in a valuable way (e.g. primitivies, BigInt, ..). Keep tracking
bulk-like data (e.g. char[] or byte[]).
2021-11-10 16:30:22 +01:00
Benjamin Muskalla
842f617bc1
Order sinks and sources first
2021-11-10 16:30:22 +01:00
Benjamin Muskalla
be150f269b
Formatting
2021-11-10 16:30:22 +01:00
Benjamin Muskalla
2654e27123
Exclude known internal APIs from being modeled
2021-11-10 16:30:22 +01:00
Benjamin Muskalla
6b2460d4a1
Formatting
2021-11-10 16:30:21 +01:00
Benjamin Muskalla
060862ab3b
Avoid certain test sources in models
2021-11-10 16:30:21 +01:00
Benjamin Muskalla
e607953b9c
Simplify query
2021-11-10 16:30:21 +01:00
Benjamin Muskalla
9a859334d4
Formatting
2021-11-10 16:30:21 +01:00
Benjamin Muskalla
6c59333716
Remove workaround that accounted for missing flow
2021-11-10 16:30:21 +01:00
Benjamin Muskalla
7dae6122d9
Support CharSequence#toString
...
Given CharSequence is often used as an
alias for String, ensure taint through toString is flowing
2021-11-10 16:30:20 +01:00
Benjamin Muskalla
ca9d5439f0
Restrict source configuration to return nodes
2021-11-10 16:30:20 +01:00
Benjamin Muskalla
7a7ec06819
Simplify sink configuration
2021-11-10 16:30:20 +01:00
Benjamin Muskalla
1a4fd7bc7d
Allow camelcase names
2021-11-10 16:30:20 +01:00
Benjamin Muskalla
2b2ac82fb7
Fix bug in sink detection
2021-11-10 16:30:20 +01:00
Benjamin Muskalla
c616eb1473
Fix finding more sources
2021-11-10 16:30:19 +01:00
Benjamin Muskalla
38579ef25b
Add proper metadata to queries
2021-11-10 16:30:19 +01:00
Benjamin Muskalla
a80d50cbc0
Simplify field flow
2021-11-10 16:30:19 +01:00
Benjamin Muskalla
a1d8dfb524
Initial support for source models
2021-11-10 16:30:19 +01:00
Benjamin Muskalla
c844f5382f
Add script to generate flow models
2021-11-10 16:30:19 +01:00
Benjamin Muskalla
f9fea15a52
Initial support for capturing sink models
2021-11-10 16:30:18 +01:00
Benjamin Muskalla
364de55b8d
Support parameter->parameter flow
2021-11-10 16:30:18 +01:00
Benjamin Muskalla
cd11ef3bf6
Support outgoing taint flow from fields
2021-11-10 16:30:18 +01:00
Benjamin Muskalla
c3462be2c9
Capture argument->return value flows
2021-11-10 16:30:18 +01:00
Benjamin Muskalla
4ca006ba3d
Only expose visible innner classes
2021-11-10 16:30:18 +01:00
Benjamin Muskalla
88032afdc3
Add test for final class
2021-11-10 16:30:17 +01:00
Benjamin Muskalla
ec772fb6b2
Add support for qualifier flow
2021-11-10 16:30:17 +01:00
Benjamin Muskalla
32ef40c77b
Add scaffolding for summary model generator
2021-11-10 16:30:17 +01:00
Erik Krogh Kristensen
2d907f825e
have the aliasPropertyPresenceStep step over extend calls
2021-11-10 16:26:00 +01:00
Geoffrey White
ae622bd482
C++: Use hasGlobalOrStdName.
2021-11-10 14:57:07 +00:00
Tom Hvitved
198b321158
Java: Hide parameters of summarized callables
2021-11-10 15:13:32 +01:00
Tom Hvitved
34fdf11b4b
Ruby: Update expected test output
2021-11-10 15:11:13 +01:00
Tom Hvitved
82abab1510
C#: Hide parameters of summarized callables
2021-11-10 15:11:13 +01:00
Anders Schack-Mulligen
6d9fb3ca43
Dataflow: Sync.
2021-11-10 15:11:13 +01:00
Anders Schack-Mulligen
678a21e532
Dataflow: Support hidden return nodes in subpaths.
2021-11-10 15:11:13 +01:00
Mathias Vorreiter Pedersen
e0b876d2f6
Merge pull request #7102 from MathiasVP/fix-map-test
...
C++: Fix a testcase
2021-11-10 13:51:10 +00:00
yoff
d23a920ed4
Merge branch 'main' into python/model-aiomysql
2021-11-10 14:32:36 +01:00
Rasmus Lerchedahl Petersen
57e7bfbdba
Python: model aiomysql
2021-11-10 14:29:39 +01:00
Rasmus Lerchedahl Petersen
047cff0749
Python: test aiomysql
2021-11-10 14:24:45 +01:00
Mathias Vorreiter Pedersen
ccdaf49464
C++: Fix the same bug in the test for ordered maps.
2021-11-10 13:24:27 +00:00
Erik Krogh Kristensen
55434653f5
add CWE-532 to the clear-text-logging query
2021-11-10 14:15:49 +01:00
Erik Krogh Kristensen
98da532c46
dont extract regular expressions from strings that are leaves in a string concat
2021-11-10 14:11:48 +01:00
Mathias Vorreiter Pedersen
86d78b34aa
C++: Use the correct variable in the 'test'.
2021-11-10 13:04:48 +00:00
Rasmus Wriedt Larsen
de926dc2a1
Merge pull request #7085 from yoff/python/model-aiopg
...
Python: model aiopg
2021-11-10 13:10:30 +01:00
Rasmus Wriedt Larsen
1f90dcadf1
Python: Use backtracker for verify arg
2021-11-10 12:54:23 +01:00
Geoffrey White
2f39c64cc2
C++: Fix character in qhelp.
2021-11-10 11:23:57 +00:00
Benjamin Muskalla
0f086056a1
Merge pull request #7100 from bmuskalla/bmuskalla/ioAsFile
...
Java: Extract Commons IO into seperate file
2021-11-10 12:04:12 +01:00
Max Schaefer
a8c4455b20
Factor out an auxiliary predicate.
2021-11-10 10:17:59 +00:00
Rasmus Lerchedahl Petersen
92a7114b72
Python: Add API references
2021-11-10 11:06:58 +01:00
Rasmus Lerchedahl Petersen
c6d285dd2a
Python: Fix test
2021-11-10 11:06:45 +01:00
yoff
a856395d56
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-11-10 10:51:40 +01:00
Rasmus Wriedt Larsen
77099fe9d0
Python: Always use @id py/
...
The two queries in CWE-020 are used for manual evaluation (is my
understanding), and the two IDE queries should work based on their tags,
and not on the query-id.
2021-11-10 10:40:17 +01:00
Benjamin Muskalla
f9fa22c14d
Removed unused import
2021-11-10 10:21:54 +01:00
Benjamin Muskalla
1a751608de
Extract Commons IO into seperate file
2021-11-10 10:15:27 +01:00
Mathias Vorreiter Pedersen
e2ab1c8c5e
Merge branch 'main' into use-range-analysis-in-buffer-write
2021-11-10 08:28:43 +00:00
Tony Torralba
4da1dce811
Merge pull request #7099 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-11-10 08:54:11 +01:00
Erik Krogh Kristensen
ab5d9459c7
Update javascript/ql/src/Security/CWE-384/SessionFixation.qhelp
...
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com >
2021-11-10 08:24:46 +01:00
ihsinme
a0448240aa
Update InsecureTemporaryFile.expected
2021-11-10 09:23:51 +03:00
ihsinme
7514fe2b45
Update test.cpp
2021-11-10 09:22:58 +03:00
ihsinme
289d58745a
Update InsecureTemporaryFile.ql
2021-11-10 09:22:03 +03:00
github-actions[bot]
f5426336c3
Add changed framework coverage reports
2021-11-10 00:09:06 +00:00
Taus
33135e909a
Python: Add magic to named_argument_transfer
...
This predicate was materialised as a _big_, _cached_ relation:
```
(169s) Tuple counts for PointsTo::InterProceduralPointsTo::named_argument_transfer#ffff#join_rhs/4@38ce07 after 53.4s:
25212 ~4% {3} r1 = SCAN Function::Function::getArgByName_dispred#fff OUTPUT In.1, In.0 'arg1', In.2 'arg2'
159751200 ~0% {4} r2 = JOIN r1 WITH Flow::CallNode::getArgByName_dispred#fff_102#join_rhs ON FIRST 1 OUTPUT Rhs.1 'arg0', Lhs.1 'arg1', Lhs.2 'arg2', Rhs.2 'arg3'
return r2
```
... However it's only used in a single place (where it is immediately
joined with the points-to relation to relate the caller and argument),
none of these joins were ever larger than 2000 tuples. This made it
pretty clear that we could gain something by pushing in that points-to
join as a bit of manual magic.
However, doing so didn't actually fix anything, since the join-orderer
then decided to join `func.getArgByName(name)` with
`call.getArgByName(name)` on `name` as the first thing (which caused a
join of the same size as above).
Unbinding didn't work, since `name` would then be an unbound `string`,
so instead I factored out relating the function, parameter, and name
thereof into its own predicate. (I could also have done this with the
call, but I would expect there to be more calls than function
definitions in general.)
Overall, this resulted in going from
```
(709s)
Definitions.ql-7:PointsTo::InterProceduralPointsTo::named_argument_transfer#ffff#join_rhs ......... 53.5s
Definitions.ql-7:Instances::InstanceObject::initializer_dispred#fbf ............................... 35.3s (456 evaluations with max 136ms in Instances::InstanceObject::initializer_dispred#fbf/3@i110#0508e8)
Definitions.ql-10:DefinitionTracking::jump_to_defn_attribute#fbf .................................. 27s (100 evaluations with max 12.8s in DefinitionTracking::jump_to_defn_attribute#fbf/3@i1#fc1f7x)
Definitions.ql-7:PointsTo::PointsToInternal::pointsTo#ffff ........................................ 16.1s (681 evaluations with max 2.5s in PointsTo::PointsToInternal::pointsTo#ffff/4@i4#0508eg)
Definitions.ql-7:Constants::ConstantObjectInternal::attribute#ffff ................................ 13.4s (505 evaluations with max 50ms in Constants::ConstantObjectInternal::attribute#ffff/4@i153#0508e5)
Definitions.ql-10:DefinitionTracking::assignment_jump_to_defn_attribute#fbf ....................... 12.4s (99 evaluations with max 11.8s in DefinitionTracking::assignment_jump_to_defn_attribute#fbf/3@i2#fc1f
7z)
...
```
to
```
(668s)
Definitions.ql-7:Instances::InstanceObject::initializer_dispred#fbf ................... 35.4s (456 evaluations with max 140ms in Instances::InstanceObject::initializer_dispred#fbf/3@i110#bf4328)
Definitions.ql-10:DefinitionTracking::jump_to_defn_attribute#fbf ...................... 27.4s (100 evaluations with max 13.3s in DefinitionTracking::jump_to_defn_attribute#fbf/3@i1#679d7x)
Definitions.ql-7:PointsTo::PointsToInternal::pointsTo#ffff ............................ 16.1s (681 evaluations with max 2.5s in PointsTo::PointsToInternal::pointsTo#ffff/4@i4#bf432g)
Definitions.ql-7:Constants::ConstantObjectInternal::attribute#ffff .................... 14.4s (505 evaluations with max 51ms in Constants::ConstantObjectInternal::attribute#ffff/4@i140#bf4325)
Definitions.ql-10:DefinitionTracking::assignment_jump_to_defn_attribute#fbf ........... 12.3s (99 evaluations with max 11.7s in DefinitionTracking::assignment_jump_to_defn_attribute#fbf/3@i2#679d
7z)
...
```
2021-11-09 21:39:32 +00:00
Taus
e2f79d8516
Python: Fix several bad getScope joins
...
It seems the optimiser has started getting the wrong end of the stick
whenever we write `foo.getScope() = bar.getScope()` for some expressions
`foo` and `bar`.
This lead to things like
```
(196s) Tuple counts for Definitions::ModuleVariable::global_variable_callnode#ff/2@5ab278 after 2m33s:
2952757013 ~0% {2} r1 = JOIN Definitions::ModuleVariable::global_variable_callnode#ff#shared WITH Variables::Variable::getScope_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'this', Lhs.1 'result'
495693 ~0% {2} r2 = JOIN r1 WITH Variables::GlobalVariable#class#f ON FIRST 1 OUTPUT Lhs.0 'this', Lhs.1 'result'
453589 ~0% {2} r3 = JOIN r2 WITH Definitions::ModuleVariable#f ON FIRST 1 OUTPUT Lhs.0 'this', Lhs.1 'result'
return r3
```
and
```
(315s) Tuple counts for Definitions::SsaSourceVariable::getAUse_dispred#ff/2@a39328 after 1m57s:
...
1785275 ~3% {2} r24 = Definitions::ModuleVariable::global_variable_callnode#ff#shared UNION Definitions::SsaSourceVariable::getAUse_dispred#ff#shared
3008614987 ~0% {2} r25 = JOIN r24 WITH Variables::Variable::getScope_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'this', Lhs.1 'result'
127 ~1% {2} r26 = JOIN r25 WITH Definitions::NonLocalVariable#class#f ON FIRST 1 OUTPUT Lhs.0 'this', Lhs.1 'result'
127 ~1% {2} r27 = JOIN r26 WITH Variables::LocalVariable#f ON FIRST 1 OUTPUT Lhs.0 'this', Lhs.1 'result'
...
```
(Note the timings: 2m33s and 1m57s.)
Now we have the much more reasonable
```
(38s) Tuple counts for Definitions::ModuleVariable::global_variable_callnode#ff/2@c53031 after 42ms:
453589 ~0% {2} r1 = JOIN Definitions::ModuleVariable::global_variable_callnode#ff#shared WITH Definitions::ModuleVariable::scope_as_global_variable#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'this', Lhs.1 'result'
return r1
```
and
```
(46s) Tuple counts for Definitions::SsaSourceVariable::getAUse_dispred#ff/2@4b19de after 375ms:
...
```
2021-11-09 20:54:41 +00:00
Taus
24000a50e6
Python: Fix bad join in py/redundant-assignment
...
A minor thing, but still best avoided:
```
Tuple counts for RedundantAssignment::pyflakes_commented_line#bb/2@0477c7 after 14.2s:
160826 ~0% {2} r1 = SCAN py_comments OUTPUT In.2, In.1
160826 ~0% {3} r2 = JOIN r1 WITH project#Files::Location::hasLocationInfo_dispred#bfffff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Rhs.2 'result'
160826 ~3% {3} r3 = JOIN r2 WITH files_10#join_rhs ON FIRST 1 OUTPUT Lhs.2 'result', Lhs.1, Rhs.1 'file'
46672419 ~4% {4} r4 = JOIN r3 WITH Files::Location::getStartLine_dispred#bf_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.2 'file', Lhs.1, Lhs.0 'result'
3951 ~0% {4} r5 = JOIN r4 WITH Files::Location::getFile_dispred#bf ON FIRST 2 OUTPUT Lhs.2, Lhs.3 'result', Lhs.1 'file', toLower(Lhs.2)
0 ~0% {4} r6 = SELECT r5 ON In.3 contains "pyflakes"
0 ~0% {2} r7 = SCAN r6 OUTPUT In.2 'file', In.1 'result'
return r7
```
2021-11-09 20:31:44 +00:00
Geoffrey White
26e9adcc34
C++: Change note.
2021-11-09 19:39:21 +00:00
Geoffrey White
ef21d1b512
C++: Add a model for curl as well.
2021-11-09 19:32:43 +00:00
Geoffrey White
6388ac5f1d
C++: Add tests.
2021-11-09 18:41:57 +00:00
Geoffrey White
d2b18d952d
C++: Add qhelp.
2021-11-09 18:41:56 +00:00
Geoffrey White
bd1e708c5d
C++: First version of cpp/non-https-url.
2021-11-09 18:33:49 +00:00
Rasmus Wriedt Larsen
985cd1ebdb
Python: Port py/request-without-cert-validation to use API graphs
2021-11-09 16:37:50 +01:00
Rasmus Wriedt Larsen
59581690fd
Python: Add py/request-without-cert-validation tests
2021-11-09 16:29:57 +01:00
Rasmus Wriedt Larsen
9710aeecbf
Python/C#: Add CWE-1333 to redos queries
...
As is already done in JS and Ruby.
2021-11-09 16:10:38 +01:00
Anders Schack-Mulligen
1efe1e0d10
Java: Improve algorithm for subtyping of parameterized types.
2021-11-09 15:49:17 +01:00
Tom Hvitved
7178a98e45
Ruby: Rename pruneUseNode{Fwd,Rev}
2021-11-09 15:16:36 +01:00
Tom Hvitved
30251740e3
Ruby: Prune nodes before computing trackUseNode
2021-11-09 15:16:36 +01:00
Tom Hvitved
8195ebf4b3
Merge pull request #7059 from hvitved/ruby/basic-store-step-postupdate
...
Ruby: Fix `basicStoreStep`
2021-11-09 15:16:07 +01:00
Alex Ford
556cdbaa21
ruby: QL format
2021-11-09 14:09:11 +00:00
Alex Ford
37775407a9
ruby: drop a redundant bit of documentation
2021-11-09 14:07:00 +00:00
Alex Ford
340897f262
ruby: drop unnecessary variable
2021-11-09 14:06:21 +00:00
Alex Ford
a23750a9c7
ruby: inline some predicates
2021-11-09 14:06:21 +00:00
Benjamin Muskalla
40e47c0ea3
Merge pull request #7082 from bmuskalla/filterOutputStream
...
Java: Model taint for `FilterOutputStream`
2021-11-09 15:06:15 +01:00
Alex Ford
c65d1d9a50
ruby: CSRFProtectionDisabled.qhelp fixes
...
Co-authored-by: Harry Maclean <hmac@github.com >
2021-11-09 14:05:41 +00:00
Rasmus Wriedt Larsen
f70e4fea55
Python: Add interesting path-injection FP
2021-11-09 14:53:32 +01:00
Mathias Vorreiter Pedersen
10bca3544c
C++: Change 'annotate_path_to_sink' so that you now annotate a ir-path with the previous node (instead of its source). This gives a better overview of the path.
2021-11-09 13:49:12 +00:00
Benjamin Muskalla
bfe2e2e0b9
Model taint for FilterOutputStream
2021-11-09 14:21:50 +01:00
Rasmus Wriedt Larsen
1e31416049
Merge pull request #7031 from yoff/python/taint-through-with
...
Python: Taint through `async with`
2021-11-09 14:08:07 +01:00
Alex Ford
c708b6b76f
Merge pull request #7077 from github/ruby/downgrade-hardcoded-credentials
...
Ruby: Downgrade `rb/hardcoded-credentials` precision from high to medium
2021-11-09 12:08:10 +00:00
Rasmus Lerchedahl Petersen
ac5a46f24f
Python: split test as suggested in review
2021-11-09 13:04:52 +01:00
yoff
5f4aad40c1
Update python/ql/test/experimental/meta/InlineTaintTest.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-11-09 13:00:35 +01:00
Rasmus Lerchedahl Petersen
aa1541a5c3
Python: add changenote
2021-11-09 12:57:36 +01:00
Rasmus Lerchedahl Petersen
a58c47b07b
Python: model aiopg.sa
2021-11-09 12:49:57 +01:00
Rasmus Lerchedahl Petersen
f53314019a
Python: test aiopg.sa
2021-11-09 12:42:03 +01:00
CodeQL CI
d9d304fc13
Merge pull request #7076 from asgerf/js/tainted-path-regexp-guard2
...
Approved by erik-krogh
2021-11-09 03:40:37 -08:00
Rasmus Lerchedahl Petersen
cd332a75fc
Python: model aiopg
2021-11-09 12:32:21 +01:00
Erik Krogh Kristensen
56a7c8b163
fix typo in change note
...
Co-authored-by: Asger F <asgerf@github.com >
2021-11-09 12:06:29 +01:00
Asger F
4b82840e9d
Revert "JS: Skip files with unsupported file encoding"
2021-11-09 10:57:01 +00:00
Rasmus Lerchedahl Petersen
cb8f1b4593
Python: Add tests for aiopg
2021-11-09 11:49:31 +01:00
Geoffrey White
d9e02e83fe
Merge pull request #6825 from MathiasVP/use-shared-ssa-in-ir-dataflow
...
C++: Redesign IR dataflow using the shared SSA library
2021-11-09 10:19:50 +00:00
James Fletcher
1bacce487e
Merge pull request #7056 from jf205/sarif-query-help
...
Add new option to database analyze tutorial
2021-11-09 10:19:29 +00:00
CodeQL CI
954fd8d6f7
Merge pull request #7081 from github/revert-6924-js/skip-files-with-unsupported-encoding
...
Approved by esbena
2021-11-09 02:18:16 -08:00
Erik Krogh Kristensen
8727060ca7
add comment about modes of operation
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-11-09 11:15:12 +01:00
Asger Feldthaus
87aa39cef2
JS: Limited tracking of object literals with methods
2021-11-09 11:06:41 +01:00
Asger F
0c6680b2c0
Revert "JS: Skip files with unsupported file encoding"
2021-11-09 09:07:54 +00:00
ihsinme
55fe01018f
Update InsecureTemporaryFile.ql
2021-11-09 09:33:33 +03:00
Asger Feldthaus
f14f9449ee
JS: Use getAMatchedString instead of getConstantString
2021-11-08 15:35:35 +01:00
Asger Feldthaus
b3e64f1669
JS: Add test
2021-11-08 15:32:43 +01:00
Erik Krogh Kristensen
330c2c42b5
Merge pull request #7075 from erik-krogh/cwe297
...
JS: add cwe-297 to `js/disabling-certificate-validation`
2021-11-08 14:35:58 +01:00
Erik Krogh Kristensen
5cafb86c88
Merge pull request #7074 from erik-krogh/cwe942
...
JS: add cwe-942 to `js/cors-misconfiguration-for-credentials`
2021-11-08 14:35:53 +01:00
Rasmus Lerchedahl Petersen
3f4c2ba24e
Python: Support debugging inline taint tests
...
The module `Conf` is created so that it can be imported
without importing the query predicates from the same file.
2021-11-08 14:08:11 +01:00
Anders Schack-Mulligen
1e0eb2f6e4
Merge pull request #7072 from aschackmull/java/nomagic-synchsetunsynchget
...
Java: Fix bad magic in SynchSetUnsynchGet.
2021-11-08 13:48:22 +01:00
Alex Ford
2581efc18a
ruby: downgrade rb/hardcoded-credentials precision from high to medium
2021-11-08 12:32:38 +00:00
Erik Krogh Kristensen
a2175a3207
add cwe-297 to js/disabling-certificate-validation
2021-11-08 13:26:53 +01:00
Erik Krogh Kristensen
507c8addb2
add cwe-942 to js/cors-misconfiguration-for-credentials
2021-11-08 13:12:19 +01:00
Cornelius Riemenschneider
76d2665132
Merge pull request #7071 from github/criemen/simplify-csharp-tracing-config
...
C#: Remove macos compatibility stanzas from tracing config.
2021-11-08 13:11:44 +01:00
james
96ff2f5125
use correct type of link
2021-11-08 12:06:20 +00:00
james
dfe77f844f
fix errors in debugging-data-flow-queries-using-partial-flow.rst
2021-11-08 11:59:53 +00:00
Erik Krogh Kristensen
0ab510f543
add test that requires flowToExpr
2021-11-08 12:25:45 +01:00
james
c94bfc306a
improve links
2021-11-08 11:18:41 +00:00
Erik Krogh Kristensen
3d6a5263e0
improve qhelp
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-11-08 12:02:39 +01:00
Mathias Vorreiter Pedersen
8e496f7121
C++: Pull in the latest changes to 'SsaImplCommon'.
2021-11-08 10:46:54 +00:00
Mathias Vorreiter Pedersen
fff5d293ff
Merge branch 'main' into use-shared-ssa-in-ir-dataflow
2021-11-08 10:44:36 +00:00
Anders Schack-Mulligen
92fb7f555c
Java: Fix bad magic in SynchSetUnsynchGet.
2021-11-08 11:42:20 +01:00
Cornelius Riemenschneider
03ff2c622a
Remove macos compatibility stanzas from tracing config.
2021-11-08 11:30:31 +01:00
Anders Schack-Mulligen
613e971987
Merge pull request #7039 from github/turbo-js-java-lib-modeling-ghes-3-3-p-1
...
Add updated framework support for JS/Java
2021-11-08 11:08:34 +01:00
CodeQL CI
6f80387ac1
Merge pull request #6993 from asgerf/js/tainted-path-regexp-contains-check
...
Approved by erik-krogh
2021-11-08 01:52:28 -08:00
CodeQL CI
618d135b0a
Merge pull request #7060 from RasmusWL/hashlib-new-type-tracker
...
Approved by yoff
2021-11-08 01:31:40 -08:00
Tom Hvitved
77aca0a365
Merge pull request #7041 from hvitved/csharp/consistent-ids
...
C#: Use `cs/` prefix in all query IDs
2021-11-08 09:55:11 +01:00
Anders Schack-Mulligen
85fdbda16f
Merge pull request #7002 from aschackmull/java/field-node
...
Java: Add FieldValueNode to break up cartesian step relation.
2021-11-08 09:31:42 +01:00
Mathias Vorreiter Pedersen
021d9415b8
Merge branch 'main' into use-range-analysis-in-buffer-write
2021-11-08 08:22:49 +00:00
Anders Schack-Mulligen
e0b121cd90
Merge pull request #7047 from hvitved/csharp/ssa/dominance-frontier
...
Shared SSA: Improved dominance frontier calculation
2021-11-08 08:50:46 +01:00
Pierre
4af3775b72
Add requirements for Apple Silicon
2021-11-08 01:37:31 +01:00
Chris Smowton
b639e82d79
Merge pull request #7064 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-11-05 09:27:25 +00:00
ihsinme
cedc5fd743
Update InsecureTemporaryFile.ql
2021-11-05 09:42:06 +03:00
github-actions[bot]
d7bfaec0f5
Add changed framework coverage reports
2021-11-05 00:09:28 +00:00
Mathias Vorreiter Pedersen
34aa4981be
Merge pull request #7018 from geoffw0/nullterm3
...
C++: Further performance improvement for the null termination queries
2021-11-04 21:37:58 +00:00
Mathias Vorreiter Pedersen
a9b7fed537
C++: Accept test changes.
2021-11-04 21:25:37 +00:00
Mathias Vorreiter Pedersen
ac90259906
C++: Teach 'getMaxConvertedLength' to use 'SimpleRangeAnalysis'.
2021-11-04 21:25:28 +00:00
Mathias Vorreiter Pedersen
693baae1ba
C++: Add test cases with false positives due to missing range analysis in 'cpp/overrunning-write'.
2021-11-04 21:13:28 +00:00
Alex Ford
5f78bbbf52
add missing documentation
2021-11-04 21:07:54 +00:00
Ethan Palm
f1ac23eff5
Merge pull request #7040 from ethanpalm/extractor-options-docs
...
New docs for extractor options
2021-11-04 13:53:22 -07:00
Ethan P
fab3479f68
Fix numbered lists
2021-11-04 13:41:59 -07:00
Ethan P
457ece152a
Fix list formatting
2021-11-04 13:31:52 -07:00
Ethan P
5bfe0fff89
Test using dash for LIs
2021-11-04 13:20:00 -07:00
Ethan P
10e5a8b3e5
Adjust spacing
2021-11-04 13:18:37 -07:00
Alex Ford
543bd28b03
add a change note for rb/csrf-protection-disabled
2021-11-04 20:14:54 +00:00
Ethan P
ad2b068429
fix list formatting
2021-11-04 13:05:22 -07:00
Alex Ford
d324f9397c
qhelp for rb/csrf-protection-disabled
2021-11-04 19:56:56 +00:00
Alex Ford
25da904314
test cases for rb/csrf-protection-disabled
2021-11-04 19:56:56 +00:00
Alex Ford
4666024419
model some ways to configure Rails
2021-11-04 19:56:56 +00:00
Alex Ford
91f99ed2a1
model skip_forgery_protection calls in ActionController classes
2021-11-04 19:56:56 +00:00
Alex Ford
fad7e9489b
Add a query to detect instances of CSRF protection being disabled
2021-11-04 19:56:55 +00:00
Ethan P
f3fda42b83
Fix link
2021-11-04 12:53:03 -07:00
Ethan Palm
f41c4702c3
Apply suggestions from code review
...
Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com >
2021-11-04 12:41:07 -07:00
Alex Ford
8a412dc5fd
Add CSRFProtectionSetting concept
2021-11-04 18:18:29 +00:00
Rasmus Lerchedahl Petersen
624b794980
Python: separate taint sources in with
2021-11-04 17:06:36 +01:00
james
5ea93d6447
further imrpovements
2021-11-04 14:54:30 +00:00
Rasmus Wriedt Larsen
9e2bc41648
Python: Improve hashlib.new modeling
...
By using a backwards type-tracker to find possible hashing algorithm
names.
2021-11-04 15:36:32 +01:00
Rasmus Wriedt Larsen
9e91f3a341
Python: Highlight shortcomings of hashlib.new modeling
2021-11-04 15:29:40 +01:00
Ian Wright
95f21b5308
Merge pull request #7027 from github/z80coder/faster-callee-api-name-feature
...
more efficient implementation of calleeApiName
2021-11-04 14:23:13 +00:00
Tom Hvitved
3544c85445
Ruby: Make the target of basicStoreStep the post-update node
2021-11-04 14:21:22 +01:00
Tom Hvitved
1101b1054d
Ruby: Make target of basicStoreStep a normal data flow node
2021-11-04 14:20:07 +01:00
Tom Hvitved
a56a5e4e7d
Ruby: Add type tracker tests
2021-11-04 14:19:16 +01:00
james
7236f3b4b6
improve description of new option
2021-11-04 12:41:30 +00:00
james
af0f32fdb6
further changes for query help in sarif
2021-11-04 12:36:27 +00:00
Ian Wright
b8d7f52d3e
format code
2021-11-04 12:28:08 +00:00
Erik Krogh Kristensen
a19627c72f
optionally ignore everything after a dash
2021-11-04 13:19:44 +01:00
Erik Krogh Kristensen
02f500b9c2
Merge branch 'main' into htmlReg
2021-11-04 12:58:42 +01:00
Erik Krogh Kristensen
99f5f70345
Merge branch 'main' into protoLib
2021-11-04 12:53:53 +01:00
Erik Krogh Kristensen
bf5e36e9d4
fix docstring
...
Co-authored-by: Asger F <asgerf@github.com >
2021-11-04 12:46:24 +01:00
Mathias Vorreiter Pedersen
58f6058a63
Merge pull request #7051 from MathiasVP/better-paths-in-tests
...
C++: Better `InlineExpectation` tests for path-explanations
2021-11-04 11:35:10 +00:00
Erik Krogh Kristensen
4ba5ae09b0
add js/sensitive-get-query query
2021-11-04 12:30:44 +01:00
Arthur Baars
061fc16730
Merge pull request #7038 from aibaars/aibaars/merge-3.3-main
...
Merge rc/3.3 into main
2021-11-04 12:23:23 +01:00
Mathias Vorreiter Pedersen
0d1ff4d2ee
C++: Respond to review comments and accept test changes.
2021-11-04 11:13:23 +00:00
Arthur Baars
27bbddf035
Merge pull request #6995 from aibaars/aibaars/pr-qhelp-check
...
Rewrite qhelp-pr-preview.yml
2021-11-04 11:51:14 +01:00
CodeQL CI
2895428d5b
Merge pull request #6714 from valeria-meli/javascript/ssrf
...
Approved by asgerf
2021-11-04 03:10:27 -07:00
james
3bfa868105
add new option to database analyze tutorial
2021-11-04 09:53:32 +00:00
CodeQL CI
5515256e53
Merge pull request #7044 from asgerf/js/proto-pollution-fps
...
Approved by erik-krogh
2021-11-04 02:45:46 -07:00
Tony Torralba
f4704f1325
Merge pull request #6397 from atorralba/atorralba/android-intent-redirect-query
...
Java: Create new Android Intent Redirection query
2021-11-04 10:42:59 +01:00
Tony Torralba
fd92c4e435
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-11-04 10:08:53 +01:00
Tony Torralba
6613a98e02
Fix references to logging library
2021-11-04 09:15:57 +01:00
Tony Torralba
ea7e259cfc
Add change note
2021-11-04 08:51:13 +01:00
Tony Torralba
474bf576a7
Minor corrections in QLDoc, qhelp and example code
2021-11-04 08:46:23 +01:00
Mathias Vorreiter Pedersen
ae4b6c54bc
C++: Change the structure of the 'annotate_path_to_sink' tests to better test path-explanations.
2021-11-03 20:32:05 +00:00
Mathias Vorreiter Pedersen
e9b114630a
Merge pull request #6948 from ihsinme/ihsinme-patch-076
...
CPP: Add query for CWE-243 Creation of chroot Jail Without Changing Working Directory
2021-11-03 18:50:13 +00:00
ihsinme
aef0275b3c
Update IncorrectChangingWorkingDirectory.expected
2021-11-03 20:45:38 +03:00
Arthur Baars
7b4460edb7
Apply suggestions from code review
...
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com >
2021-11-03 18:42:49 +01:00
Tom Hvitved
d00196f6be
Merge pull request #7048 from hvitved/ruby/remove-node-predicates
...
Ruby: Remove `Node::getEnclosingCallable` and `ParameterNode::isParameterOf`
2021-11-03 17:46:16 +01:00
Tony Torralba
f1df542345
Add stubs & tests
...
Fix mistakes detected by the tests
2021-11-03 17:26:13 +01:00
Ethan P
0894e81ce4
add missing backtick
2021-11-03 09:21:24 -07:00
ihsinme
a9dd868348
Update IncorrectChangingWorkingDirectory.qhelp
2021-11-03 18:38:30 +03:00
ihsinme
c94b64cbca
Update IncorrectChangingWorkingDirectory.qhelp
2021-11-03 18:28:57 +03:00
Tom Hvitved
16d96d2ad3
Ruby: Remove Node::getEnclosingCallable and ParameterNode::isParameterOf
2021-11-03 15:59:29 +01:00
Arthur Baars
b9bf597044
Address comments
2021-11-03 15:15:36 +01:00
Erik Krogh Kristensen
523c15cd72
don't include mode-of-operation into the algorithm names
2021-11-03 14:54:50 +01:00
luciaromeroML
e50938588e
formatting qll file
2021-11-03 10:30:35 -03:00
Mathias Vorreiter Pedersen
4095c2012e
C++: Add comments on why 'ReferenceToInstruction' is interpreted like a 'LoadInstruction' at certain places.
2021-11-03 13:27:26 +00:00
Tom Hvitved
df6962143d
Shared SSA: Sync files
2021-11-03 14:21:50 +01:00
Tom Hvitved
5539b7ffed
Shared SSA: Improved dominance frontier calculation
2021-11-03 14:21:39 +01:00
Erik Krogh Kristensen
3638892d35
Merge pull request #6881 from erik-krogh/add-missing-noinline
...
JS: add pragma[noinline] to predicates where the qldoc mentions join-order
2021-11-03 14:21:27 +01:00
Mathias Vorreiter Pedersen
43a4795272
C++: Remove redundant conjunct.
2021-11-03 13:19:43 +00:00
Erik Krogh Kristensen
f01ee5914b
add a docstring, and rename rawString -> foldedString
2021-11-03 14:19:31 +01:00
Rasmus Wriedt Larsen
84b38b6c32
Python: Add test with custom django json response (FP)
2021-11-03 14:17:08 +01:00
Erik Krogh Kristensen
7b0ebd3f1a
use the context to determine whether or not a node is an operand of a binop
2021-11-03 14:09:44 +01:00
Arthur Baars
ddc9ad3187
Merge remote-tracking branch 'upstream/rc/3.3' into main
2021-11-03 14:01:51 +01:00
Arthur Baars
1327d7c8d5
Merge pull request #7043 from aibaars/fix-ql-tests-3.3
...
Ruby: Fix QL tests and Rust compilation error
2021-11-03 13:59:29 +01:00
Asger Feldthaus
712614a03c
JS: Block prototype pollution flow into this
2021-11-03 13:33:50 +01:00
Erik Krogh Kristensen
737c747dbb
early exit if string becomes too big
2021-11-03 13:28:03 +01:00
Erik Krogh Kristensen
1ba6f448cd
compute concatenated string and offset at the same time
2021-11-03 13:26:19 +01:00
Erik Krogh Kristensen
be46c1f679
remove unused import
2021-11-03 13:25:09 +01:00
Asger Feldthaus
08bc80ffdb
JS: Block prototype pollution assignment flows through .replace()
2021-11-03 13:24:29 +01:00
Mathias Vorreiter Pedersen
1f89b4987b
C++: Rename 'valueFlow' to 'conversionFlow' and add a QLDoc that explains its purpose.
2021-11-03 12:22:27 +00:00
Asger Feldthaus
76e841830f
JS: Check for labeled barriers in reachableFromInput
2021-11-03 13:10:20 +01:00
Erik Krogh Kristensen
9cf34f19bb
Merge branch 'main' into extractBigReg
2021-11-03 13:08:51 +01:00
Erik Krogh Kristensen
264f4ab5ab
add js/session-fixation query
2021-11-03 13:04:41 +01:00
Nick Rolfe
dd17271ec8
Merge remote-tracking branch 'origin/main' into nickrolfe/regex_injection
2021-11-03 11:55:42 +00:00
Arthur Baars
aab8c64973
Ruby: fix compilation error
2021-11-03 12:32:45 +01:00
Arthur Baars
2c5d5ecdd8
Ruby: QLTest: fix pack search path for upgrades
2021-11-03 12:14:58 +01:00
Arthur Baars
32765e9bc1
Ruby: trigger jobs on workflow change
2021-11-03 12:14:58 +01:00
Mathias Vorreiter Pedersen
dfbfbe4953
Merge branch 'main' into use-shared-ssa-in-ir-dataflow
2021-11-03 10:39:22 +00:00
Mathias Vorreiter Pedersen
ad5619ff07
Revert "C++: Don't count write operations as uses."
...
This reverts commit 092beb8b73 .
2021-11-03 10:37:32 +00:00
Tom Hvitved
ab37ae6613
Merge pull request #7036 from hvitved/ruby/truncate-get-value-text
...
Ruby: Truncate concatenated strings in `getValueText`
2021-11-03 10:57:43 +01:00
Rasmus Lerchedahl Petersen
05aa314ac9
Python: Add tests for non-async constructs
2021-11-03 10:54:36 +01:00
Tony Torralba
7d88f80fb9
Add tests for summaries
2021-11-03 10:35:38 +01:00
ihsinme
c175f0aa9d
Update IncorrectChangingWorkingDirectory.ql
2021-11-03 12:25:30 +03:00
Tom Hvitved
51f4f57617
C#: Use cs/ prefix in all query IDs
2021-11-03 10:25:21 +01:00
Anders Schack-Mulligen
e6145f04d2
Merge pull request #6966 from atorralba/atorralba/android-explicit-intent-sanitizer
...
Android: Add ExplicitIntentSanitizer and allowIntentExtrasImplicitRead
2021-11-03 10:20:09 +01:00
Erik Krogh Kristensen
ab4780c505
Merge pull request #7032 from erik-krogh/cwe497
...
JS: add CWE-497 to js/stack-trace-exposure
2021-11-03 08:55:49 +01:00
Ethan P
b9eb278380
Add new file to index
2021-11-02 21:55:25 -07:00
Ethan P
98eb848e22
add link to new article
2021-11-02 21:35:39 -07:00
Ethan P
06cacfdd83
Create extractor-options.rst
2021-11-02 21:21:31 -07:00
Pierre
cf5b317eb1
Add updated framework support for JS/Java
...
Release: https://github.com/github/releases/issues/1724
2021-11-02 22:02:05 +01:00
Mathias Vorreiter Pedersen
4a2894a707
Merge pull request #7025 from MathiasVP/nomagic-parameterCand
...
Dataflow: Replace a 'noinline' pragma with a 'nomagic' pragma
2021-11-02 20:40:44 +00:00
Arthur Baars
eb645ba963
Merge remote-tracking branch 'origin/rc/3.3' into 'main'
2021-11-02 21:10:41 +01:00
Tom Hvitved
8b287a7846
Ruby: Truncate concatenated strings in getValueText
2021-11-02 18:19:49 +01:00
Erik Krogh Kristensen
9d99ce12c4
add CWE-497 to js/stack-trace-exposure
2021-11-02 15:43:55 +01:00
Rasmus Wriedt Larsen
8cd9fdebf9
Python: Model flask_admin
2021-11-02 15:43:13 +01:00
Rasmus Wriedt Larsen
ab88d945e2
Python: Add flask_admin tests
2021-11-02 15:41:57 +01:00
Rasmus Wriedt Larsen
c2632cff3d
Python: Add RequestHandler meta query
2021-11-02 15:41:57 +01:00
Rasmus Lerchedahl Petersen
768932d7b3
Python: Add tainttracking step that was removed
...
when the correpsonding datadlow step was removed.
2021-11-02 15:01:47 +01:00
Rasmus Lerchedahl Petersen
07d5086b07
Python: support user defined taint source
2021-11-02 15:00:23 +01:00
Dave Bartolomeo
d828ab7fd2
Merge pull request #6955 from github/codeql-ruby-3.3
...
RC 3.3: merge codeql-ruby repository into github/codeql
2021-11-02 09:57:49 -04:00
Erik Krogh Kristensen
5975e19f53
sync identical files
2021-11-02 14:45:33 +01:00
Erik Krogh Kristensen
2a8807efe4
add change note
2021-11-02 14:45:33 +01:00
Erik Krogh Kristensen
076a3dca1f
add qhelp
2021-11-02 14:45:33 +01:00
Erik Krogh Kristensen
d9a214767b
add support for node-rsa
2021-11-02 14:45:33 +01:00
Erik Krogh Kristensen
49ea53f32b
move ExpressJwt that was inside the Hasha module
2021-11-02 14:45:33 +01:00
Erik Krogh Kristensen
2c013214f7
add Diffie-Hellman from the crypto library
2021-11-02 14:45:33 +01:00
Erik Krogh Kristensen
1df8ec2cae
add insufficient key size model for node-forge
2021-11-02 14:45:33 +01:00
Erik Krogh Kristensen
62039b866c
add cryptographic key model to the crypto-js library
2021-11-02 14:45:33 +01:00
Erik Krogh Kristensen
028799deb6
implement a simple InsufficientKeySize query
2021-11-02 14:45:30 +01:00
Erik Krogh Kristensen
7a9315f146
use set literal
2021-11-02 14:45:14 +01:00
yoff
97625d7c2c
Merge pull request #7023 from RasmusWL/toml
...
Python: Add modeling of `toml`
2021-11-02 14:42:06 +01:00
Rasmus Wriedt Larsen
cb6bcada4c
Merge branch 'main' into django-rest-framework
2021-11-02 14:33:16 +01:00
ihsinme
62b3c3c9a0
Update IncorrectChangingWorkingDirectory.ql
2021-11-02 16:16:17 +03:00
yoff
0240631510
Merge pull request #6782 from RasmusWL/fastapi
...
Python: Model FastAPI
2021-11-02 14:16:12 +01:00
ihsinme
738354b8e7
Update cpp/ql/src/experimental/Security/CWE/CWE-243/IncorrectChangingWorkingDirectory.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-11-02 16:13:34 +03:00
Asger Feldthaus
971f032b5f
JS: Autoformat
2021-11-02 14:12:05 +01:00
Asger Feldthaus
46bd3e58a3
JS: Switch to instanceof base type
2021-11-02 14:12:05 +01:00
Asger Feldthaus
5f4c1dd19b
JS: Support regexp-based path traversal check
2021-11-02 14:12:05 +01:00
Asger Feldthaus
83edcf515b
JS: Add test for regexp-based sanitizer
2021-11-02 14:12:04 +01:00
Mathias Vorreiter Pedersen
3e6ac74d73
C++: Add 'InheritanceConversionInstruction' to the list of instructions that set 'certain = false' in 'explicitWrite'.
2021-11-02 13:02:46 +00:00
Mathias Vorreiter Pedersen
56cabb8f46
C++: Add comments to some of the disjuncts in 'addressFlow'.
2021-11-02 12:52:11 +00:00
Rasmus Wriedt Larsen
c52e453342
Python: Minor rewrite
2021-11-02 13:37:50 +01:00
Erik Krogh Kristensen
54fba2d6a1
Merge pull request #6781 from erik-krogh/ldap
...
JS: Move LDAP injection out of experimental
2021-11-02 13:35:32 +01:00
Anders Schack-Mulligen
7d0152f3c0
Merge pull request #6932 from aschackmull/dataflow/flow-features
...
Dataflow: Add support for call context restrictions on sources/sinks.
2021-11-02 13:24:17 +01:00
Ian Wright
6fa9413f8b
more efficient implementation of calleeApiName
2021-11-02 12:05:33 +00:00
Nick Rolfe
6dd5dad4a9
Merge pull request #7026 from github/nickrolfe/rb-prefix
...
Ruby: use the `rb/` prefix in all query ids
2021-11-02 12:04:50 +00:00
Arthur Baars
18a47227b3
Remove redundant permissions block
2021-11-02 13:04:45 +01:00
Erik Krogh Kristensen
f7f315adbb
Merge pull request #7022 from erik-krogh/cwe319
...
JS: add cwe-319 to js/clear-text-cookie
2021-11-02 12:47:53 +01:00
Erik Krogh Kristensen
7a96b8e9e1
Merge branch 'main' into ldap
2021-11-02 12:47:28 +01:00
Nick Rolfe
898f5ec596
Ruby: use the rb/ prefix in all query ids
2021-11-02 11:42:02 +00:00
Mathias Vorreiter Pedersen
6f4107ff23
Dataflow: Replace a 'noinline' pragma with a 'nomagic' pragma.
2021-11-02 11:37:40 +00:00
Arthur Baars
53b03152f3
Use 'gh' command to download artifacts
2021-11-02 12:01:14 +01:00
Arthur Baars
501ff12abb
Use NUL character as separator
2021-11-02 12:01:13 +01:00
Arthur Baars
d1852af7b6
Add error messages
2021-11-02 12:00:11 +01:00
Mathias Vorreiter Pedersen
092beb8b73
C++: Don't count write operations as uses.
2021-11-02 10:59:34 +00:00
Rasmus Wriedt Larsen
8ee804a8c2
Python: Add toml modeling
2021-11-02 11:57:15 +01:00
Rasmus Wriedt Larsen
14bc297946
Python: Add toml encode/decode test
2021-11-02 11:57:06 +01:00
Geoffrey White
c1de4165a9
Update cpp/ql/lib/semmle/code/cpp/commons/NullTermination.qll
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-11-02 10:51:35 +00:00
Tom Hvitved
302373d154
Merge pull request #6858 from hvitved/python/type-tracker-changes
...
Python: Type tracker changes
2021-11-02 11:47:01 +01:00
CodeQL CI
d5e2026a26
Merge pull request #6934 from erik-krogh/more-instanceof
...
Approved by MathiasVP, esbena, yoff
2021-11-02 03:46:23 -07:00
CodeQL CI
5d62aa5b29
Merge pull request #6994 from erik-krogh/redundant-cast
...
Approved by RasmusWL, aschackmull, esbena, geoffw0, hvitved, nickrolfe
2021-11-02 03:45:48 -07:00
Tom Hvitved
fe80c4a17b
Ruby: Sync files
2021-11-02 11:16:46 +01:00
Tom Hvitved
1e64893742
Update python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll
...
Co-authored-by: Taus <tausbn@github.com >
2021-11-02 11:16:32 +01:00
Tom Hvitved
660398aa78
Python: Introduce TypeBackTracker::getACompatibleTypeTracker()
2021-11-02 11:16:32 +01:00
Tom Hvitved
73fd66cfed
Python: Cache TypeBackTracker::prepend
2021-11-02 11:16:32 +01:00
Erik Krogh Kristensen
41e7dea943
add cwe-319 "Cleartext Transmission of Sensitive Information" to js/clear-text-cookie
2021-11-02 11:11:38 +01:00
Rasmus Wriedt Larsen
83389be8e2
Python: Add some missing QLDocs
2021-11-02 11:02:51 +01:00
Rasmus Wriedt Larsen
5c2734c643
Python: Fix experimental Django.qll
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
fd12b144bc
Python: Add change-note
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
a7e4e5ef83
Python: Add rest_framework Response modeling
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
13815fe728
Python: Model known APIView subclasses
...
Added internal helper `.qll` file as well
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
62d30630aa
Python: Add rest_framework Request taint modeling
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
5d77e62f3a
Python: Add basic rest_framework Request modeling
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
57e13c6066
Python: rest_framework.decorators.api_view handling
...
Had to expose even more things, and had to make the `DjangoRouteHandler`
modeling more flexible so I could extend the char-pred in a different
file.
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
222db37c0d
Python: Add initial rest_framework modeling
...
I had to make the Django and PrivateDjango modeling non-private :O
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
a64e939d71
Python: Add note about .method
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
75e2555a8a
Python: Add rest_framework taint tests
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
095f896f95
Python: Add examples of class/function based views
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
9bbf08ddcf
Python: Add simple Django REST framework code
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
9d843153d4
Python: Set up test for Django REST framework
...
this is just pure Django project for now, (and very much a copy of the
one in `django-v2-v3`), to make it easier to see the changes needed to
set up Django REST framework.
2021-11-02 10:55:44 +01:00
Rasmus Wriedt Larsen
f1307b772a
Python: Add RequestHandler meta query
2021-11-02 10:55:44 +01:00
Tony Torralba
ebd6529469
WIP: add tests
2021-11-02 10:37:41 +01:00
Rasmus Wriedt Larsen
b7b9120724
Python: Better handling of Pydantic models
2021-11-02 10:29:17 +01:00
Rasmus Wriedt Larsen
c207580ed9
Python: Add extra FastAPI taint tests
2021-11-02 10:20:09 +01:00
Mathias Vorreiter Pedersen
e2cb53c65f
Merge pull request #7014 from jbj/isFromSystemMacroDefinition
...
C++: Add `isFromSystemMacroDefinition` predicate
2021-11-02 09:14:59 +00:00
Rasmus Wriedt Larsen
17da28118a
Python: Small refactor to use extends .. instanceof
2021-11-02 10:06:11 +01:00
Anders Schack-Mulligen
42a046edc6
Merge pull request #7004 from Marcono1234/marcono1234/deprecate-StringLiteral-getRepresentedString
...
Java: Deprecate `StringLiteral.getRepresentedString()`
2021-11-02 09:57:52 +01:00
Tamás Vajk
18b08060ae
Merge pull request #5110 from porcupineyhairs/ssrfCsharp
...
C# : Add query to detect SSRF
2021-11-02 09:50:28 +01:00
ihsinme
9b8b916199
Update IncorrectChangingWorkingDirectory.ql
2021-11-02 11:33:29 +03:00
Tony Torralba
5d7b09ac67
Merge pull request #7020 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-11-02 08:33:36 +01:00
github-actions[bot]
093be44258
Add changed framework coverage reports
2021-11-02 00:09:00 +00:00
Geoffrey White
dec7f93097
C++: Eliminate mutual recursion.
2021-11-01 17:32:38 +00:00
Geoffrey White
d6a714cf69
C++: Improve comments.
2021-11-01 17:32:37 +00:00
Marcono1234
668928045e
Merge branch 'main' into marcono1234/deprecate-StringLiteral-getRepresentedString
2021-11-01 16:32:57 +01:00
Anders Schack-Mulligen
e88bbfdd67
Merge pull request #7008 from JLLeitschuh/feat/JLL/java_optional_lambda_support
...
Java: Model java.util.Optional lambda methods
2021-11-01 13:49:21 +01:00
Anders Schack-Mulligen
64acd0288e
Merge pull request #6614 from Marcono1234/marcono1234/char-literal-codepoint
...
Java: Add `CharacterLiteral.getCodePointValue()`
2021-11-01 13:06:00 +01:00
Nick Rolfe
da5d10fd6b
Merge pull request #7012 from MalikIdreesHasanKhan/main
...
Fixed a typo. ( Minor PR)
2021-11-01 11:30:13 +00:00
Chris Smowton
b59f6665a2
Fix punctuation
2021-11-01 11:02:58 +00:00
Chris Smowton
9ff426cf23
Sort Optional models
2021-11-01 10:59:03 +00:00
CodeQL CI
dde493259a
Merge pull request #7003 from asgerf/js/mixed-this-fp
...
Approved by erik-krogh
2021-11-01 09:13:21 +00:00
Erik Krogh Kristensen
db40ccae81
add explicit this to all member calls
2021-11-01 09:51:15 +01:00
Anders Schack-Mulligen
301a907596
Update java/ql/lib/semmle/code/java/Expr.qll
2021-11-01 09:36:09 +01:00
Jonas Jensen
93dfee866a
C++: Add isFromSystemMacroDefinition predicate
2021-11-01 09:17:49 +01:00
MalikIdreesHasa
e44e982065
Fixed a typo.
2021-10-31 15:11:39 +00:00
ihsinme
3161d112d1
Update IncorrectChangingWorkingDirectory.ql
2021-10-30 13:47:22 +03:00
Mathias Vorreiter Pedersen
d34e731f1d
C++: Add a small QLDoc novel above the IPA type for 'TIRDataFlowNode'.
2021-10-30 11:29:07 +01:00
Mathias Vorreiter Pedersen
d624259eab
C++: Add QLDoc to 'flowOutOfAddressStep'.
2021-10-30 10:46:39 +01:00
Mathias Vorreiter Pedersen
a75f195df3
C++: Several readability fixes:
...
1. Added lots of QLDoc explanation about the role of StoreNodeOperand.
2. Renamed '{StoreNode,ReadNode}.getAPredecessor' to 'getInner' and
'{StoreNode,ReadNode}.getASuccessor' to 'getOuter'.
3. Be more explicit about which type of 'StoreNode' is used in various
places.
2021-10-30 10:24:06 +01:00
Mathias Vorreiter Pedersen
f334201fce
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-10-30 10:04:17 +01:00
Mathias Vorreiter Pedersen
cb4f10c609
C++: Move the union field check to the IPA branch of 'TFieldContent'.
2021-10-30 10:04:17 +01:00
Jonathan Leitschuh
c2a2a3a676
Java: Model java.util.Optional lambda methods
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-29 13:23:47 -04:00
Arthur Baars
9604cd5595
Revert "Don't use local actions"
...
This reverts commit b128c7ca00 .
2021-10-29 18:22:45 +02:00
Arthur Baars
a0903c377d
Use pull_request + workflow_run instead of pull_request_target
2021-10-29 18:18:06 +02:00
Tony Torralba
3ea1af3819
Refactor into separate libraries
2021-10-29 17:36:02 +02:00
Marcono1234
b284e727a9
Java: Add change note for StringLiteral.getRepresentedString() deprecation
2021-10-29 15:21:55 +02:00
Mathias Vorreiter Pedersen
8a569da370
C++: Fix comments.
2021-10-29 14:05:34 +01:00
Marcono1234
fe5115169f
Java: Describe CharacterLiteral.getValue() behavior for surrogates
2021-10-29 14:56:07 +02:00
Marcono1234
e1516b4e9d
Java: Describe StringLiteral.getValue() behavior for unpaired surrogates
2021-10-29 14:53:13 +02:00
Marcono1234
bfb9577d15
Java: Deprecate StringLiteral.getRepresentedString()
2021-10-29 14:50:15 +02:00
Erik Krogh Kristensen
f676fc00d3
revert a change in an identical file
2021-10-29 14:42:38 +02:00
Erik Krogh Kristensen
0897b004eb
revert removal of redundant inline casts in some python files
2021-10-29 14:40:27 +02:00
Erik Krogh Kristensen
d36c66cfca
remove redundant inline casts in arguments where the type is inferred by the call target
2021-10-29 14:37:56 +02:00
Marcono1234
4f59886a65
Java: Simplify CompileTimeConstantExpr.getIntValue()
...
The changed code previously also only covered IntegerLiteral:
- Restricted to Literal
- Integral type
- != "long"
- != "char"
So the only class left which matches all of these is IntegerLiteral.
2021-10-29 14:30:51 +02:00
Marcono1234
9730021641
Java: Add CharacterLiteral.getCodePointValue()
2021-10-29 14:30:50 +02:00
Anders Schack-Mulligen
35b6cbe549
Java: Fix compilation error.
2021-10-29 14:26:36 +02:00
Anders Schack-Mulligen
e51a10a816
Java: Fix tests.
2021-10-29 14:25:43 +02:00
Asger Feldthaus
d52b2bd863
JS: Fix FP in ˚MixedStaticInstanceThisAccess
2021-10-29 14:16:54 +02:00
Asger Feldthaus
afa6424d67
JS: Add test with FP
2021-10-29 14:16:54 +02:00
yoff
1c78c792ff
Merge pull request #6991 from RasmusWL/flask-blueprints
...
Python: Support `flask.blueprints.Blueprint`
2021-10-29 14:06:43 +02:00
Rasmus Wriedt Larsen
7e7c363e43
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-10-29 13:59:36 +02:00
Rasmus Wriedt Larsen
85f00fda19
Merge pull request #6776 from yoff/python/model-asyncpg
...
Python: Model `asyncpg`
2021-10-29 13:54:44 +02:00
Anders Schack-Mulligen
abf508eeeb
Java: Add FieldValueNode to break up cartesian step relation.
2021-10-29 13:45:56 +02:00
Nick Rolfe
fed0a06353
Ruby: add change note for rb/regexp-injection
2021-10-29 11:28:34 +01:00
Anders Schack-Mulligen
3a1836c9f6
Merge pull request #7000 from aschackmull/dataflow/interface-refactor
...
Dataflow: Refactor public references to DataFlowCallable
2021-10-29 12:21:13 +02:00
Max Schaefer
bc91f664ac
JavaScript: Teach API graphs to handle some forms of property copying.
...
In particular, copied promises are now handled better.
2021-10-29 11:19:54 +01:00
Edoardo Pirovano
513e0bbea9
Merge pull request #6965 from edoardopirovano/fix-lgtm-version
...
Fix LGTM version number in language reference
2021-10-29 10:50:53 +01:00
Anders Schack-Mulligen
bfacd23573
Dataflow: Adjust documentation.
2021-10-29 11:20:19 +02:00
Anders Schack-Mulligen
5951ae79b9
Dataflow: Add language specific predicates.
2021-10-29 11:11:35 +02:00
Anders Schack-Mulligen
00df6798b1
Dataflow: Sync
2021-10-29 11:00:23 +02:00
Anders Schack-Mulligen
2b4e3a7d9b
Dataflow: Refactor the getEnclosingCallable and ParameterNode interface.
2021-10-29 10:59:36 +02:00
Erik Krogh Kristensen
6fffdf6101
Merge pull request #6855 from erik-krogh/secCookie
...
JS: Move cookie queries out of experimental.
2021-10-29 10:23:48 +02:00
Tony Torralba
7f15177498
Move from experimental
2021-10-29 10:19:05 +02:00
Mathias Vorreiter Pedersen
e94b2b6113
Merge pull request #6915 from geoffw0/nullterm2
...
C++: Fix the two null termination queries and re-enable them.
2021-10-29 08:20:08 +01:00
ihsinme
635a668670
Update IncorrectChangingWorkingDirectory.ql
2021-10-29 10:08:41 +03:00
ihsinme
c8a4a8b965
Update InsecureTemporaryFile.ql
2021-10-29 09:44:43 +03:00
Ethan P
5f73fb21b8
Add new article to ref page
2021-10-28 10:55:44 -07:00
Rasmus Lerchedahl Petersen
0f2f68bcbb
Python: rename file
2021-10-28 19:14:02 +02:00
yoff
8f9741ae72
Update python/ql/lib/semmle/python/internal/Awaited.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-10-28 19:13:08 +02:00
Mathias Vorreiter Pedersen
490156d7db
C++: Remove the 'isIndirection' predicate on 'SourceVariable' and move the rootdef of 'getIRVariable' into the two subclasses.
2021-10-28 17:26:28 +01:00
Erik Krogh Kristensen
cfc5629435
apply all doc fixes
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-10-28 18:19:37 +02:00
Mathias Vorreiter Pedersen
05900cda87
C++: Rename 'Ssa' to 'SsaInternals' and move definitions from 'SSaImplSpecific' to 'SsaInternals'. Now we can avoid cyclic imports.
2021-10-28 17:10:48 +01:00
Erik Krogh Kristensen
15c90adec5
remove redundant cast where the type is enforced by an equality comparison
2021-10-28 18:08:20 +02:00
hubwriter
2096c0aab1
Merge pull request #6856 from github/hubwriter/typo-fix
...
Docs: Fix one-word typo
2021-10-28 17:05:17 +01:00
jorgectf
47b14f1adc
Polish Concepts.qll qldocs
2021-10-28 17:55:34 +02:00
jorgectf
b3ec82cd36
Merge branch 'jorgectf/python/jwt-queries' of https://github.com/jorgectf/codeql into jorgectf/python/jwt-queries
2021-10-28 17:40:33 +02:00
jorgectf
a6c285ad32
Apply getItem(_) and extend verifiesSignature readability
2021-10-28 17:40:27 +02:00
Jorge
f4d63cc5e7
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-10-28 17:34:11 +02:00
jorgectf
ef4a27ff8c
Apply code review suggestions
2021-10-28 17:31:52 +02:00
Erik Krogh Kristensen
e75448ebb0
remove redundant inline casts
2021-10-28 16:35:53 +02:00
Ian Lynagh
d425b3782e
Merge pull request #6992 from igfoo/igfoo/patterns
...
Java: instanceof pattern matching is no longer a preview feature
2021-10-28 15:05:53 +01:00
Erik Krogh Kristensen
c34b089bc5
autoformat
2021-10-28 16:02:36 +02:00
Mathias Vorreiter Pedersen
675e284c0e
C++: A 'LoadInstruction' in a store chain always sets 'certain = false'.
2021-10-28 14:52:57 +01:00
Ian Lynagh
246a515175
Java: instanceof pattern matching is no longer a preview feature
2021-10-28 14:19:30 +01:00
Mathias Vorreiter Pedersen
ee2541c3bc
C++: Fix QLDoc on 'getDestinationAddress'.
2021-10-28 14:12:22 +01:00
Mathias Vorreiter Pedersen
cde80ccf83
Replace 'hasLocationInfo' with 'getLocation'.
2021-10-28 14:09:26 +01:00
Mathias Vorreiter Pedersen
387c96d1e2
Rename 'SourceVariable.getVariable' to 'SourceVariable.getIRVariable' and replace 'Def.getVariable' to 'Def.getSourceVariable'.
2021-10-28 14:00:50 +01:00
Rasmus Lerchedahl Petersen
8c72cc0cdd
Python: update change note
2021-10-28 14:53:46 +02:00
Rasmus Lerchedahl Petersen
7201b3e116
Python: add changenote
2021-10-28 14:48:48 +02:00
Rasmus Lerchedahl Petersen
8536f5f5a2
Python: remember to update refs...
2021-10-28 14:32:53 +02:00
Erik Krogh Kristensen
4f6e5c903b
filter out writes to number indexes
2021-10-28 14:27:07 +02:00
yoff
beb0902db5
Merge pull request #6989 from RasmusWL/flask-file-sending-fixup
...
Python: Small fixup for `flask.send_from_directory`
2021-10-28 14:24:29 +02:00
Rasmus Lerchedahl Petersen
c92249525b
Python: update test expectations
2021-10-28 14:03:09 +02:00
Rasmus Wriedt Larsen
a33a8fd518
Python: Support flask.blueprints.Blueprint
...
Thanks to @haby0 who originally proposed this as part of
https://github.com/github/codeql/pull/6977
2021-10-28 14:02:03 +02:00
Nick Rolfe
f3977ea3d7
Merge pull request #6987 from github/nickrolfe/cleanup-ruby-docs
...
Ruby: clean up docs
2021-10-28 13:00:02 +01:00
Rasmus Lerchedahl Petersen
3abe3e43d0
Python: autoformat
2021-10-28 13:58:01 +02:00
Rasmus Wriedt Larsen
0acf6aaec8
Python: Add change-note
2021-10-28 13:45:34 +02:00
Rasmus Wriedt Larsen
8c3349f40f
Python: Properly model flask.send_from_directory
...
To not include `filename` as path-injection sink.
2021-10-28 13:41:39 +02:00
Mathias Vorreiter Pedersen
12e0185b0d
C++: Sync identical files.
2021-10-28 12:36:36 +01:00
Mathias Vorreiter Pedersen
7197216185
Add a copy of SsaImplCommon to the identical-files script.
2021-10-28 12:36:36 +01:00
Mathias Vorreiter Pedersen
fc3ff41d65
Merge branch 'main' into use-shared-ssa-in-ir-dataflow
2021-10-28 12:36:36 +01:00
Mathias Vorreiter Pedersen
2cd23e5ee0
Accept test changes.
2021-10-28 12:36:36 +01:00
Mathias Vorreiter Pedersen
8135dcefdd
Merge branch 'main' into use-shared-ssa-in-ir-dataflow
2021-10-28 12:36:25 +01:00
Rasmus Wriedt Larsen
228e9e973a
Python: Minor flask refactor
2021-10-28 13:36:03 +02:00
Mathias Vorreiter Pedersen
521d863429
C++: Autoformat.
2021-10-28 12:35:01 +01:00
Mathias Vorreiter Pedersen
2547a8d746
C++: Fix join orders in 'DataFlowDispatch.qll' and Ssa.qll.
2021-10-28 12:35:01 +01:00
Mathias Vorreiter Pedersen
21a1ee7758
C++: Add annoying case in SSA.qll related to 'NewExpr' and accept test changes.
2021-10-28 12:35:01 +01:00
Mathias Vorreiter Pedersen
3efe60fdd2
C++: Accept test changes.
2021-10-28 12:35:01 +01:00
Mathias Vorreiter Pedersen
5dbaea8b52
C++: Add a special dataflow step from InitializeIndirection instructions.
2021-10-28 12:35:01 +01:00
Mathias Vorreiter Pedersen
b1ea00fa85
C++: Remove the taintflow edges that gives performance problems.
2021-10-28 12:35:01 +01:00
Mathias Vorreiter Pedersen
710d0cfc3d
C++: Since we now no longer have flow from exact memory operands to LoadInstructions, we no longer have flow from PhiInstructions to LoadInstructions. We could allow flow in this particular case, but we might as well use the shared SSA library's phi edges.
2021-10-28 12:35:00 +01:00
Mathias Vorreiter Pedersen
8caff41138
C++: Throw away most of the usage of IR-computed def-use information. Instead, we rely on the shared SSA library's use-use edges.
2021-10-28 12:35:00 +01:00
Mathias Vorreiter Pedersen
3a488574e5
C++: Rewrite the PartialDefinitionNode classes to match the new StoreNodes.
2021-10-28 12:35:00 +01:00
Mathias Vorreiter Pedersen
8bef79502f
C++: Similarly to the previous commit, we throw away the old memory-edges based way of doing read steps. Instead, we use the shared SSA library to transfer flow into a new ReadNode IPA branch, perform the necessary read steps, and then use the shared SSA library to transfer flow out of the ReadNode again.
2021-10-28 12:35:00 +01:00
Mathias Vorreiter Pedersen
5ebefe2d30
C++: Throw away the old way of doing store steps using memory edges. Instead, we introduce a StoreNode IPA branch that does store steps and instead use the shared SSA library to transfer flow into these nodes before a store step, and out of them following a sequence of store steps.
2021-10-28 12:35:00 +01:00
Rasmus Wriedt Larsen
6648a695eb
Python: Add flask specific path-injection test
2021-10-28 13:34:18 +02:00
Rasmus Lerchedahl Petersen
b3ba75a00f
Python: Fix tests by managing local sources
...
`API::Node::getAwaited` is restriced to local sources
2021-10-28 13:22:59 +02:00
jorgectf
3dec222922
Merge remote-tracking branch 'origin/main' into jorgectf/python/jwt-queries
2021-10-28 13:11:46 +02:00
jorgectf
7069f45864
Polish documentation
2021-10-28 13:09:28 +02:00
Nick Rolfe
2059896882
Ruby: clean up docs
2021-10-28 12:04:48 +01:00
Rasmus Wriedt Larsen
436152a46d
Python: Refactor flask file sending tests
2021-10-28 12:37:07 +02:00
Geoffrey White
e8895686f8
Merge pull request #6980 from geoffw0/unusedqhelp
...
C++: Remove old and unused qhelp files
2021-10-28 10:55:31 +01:00
Mathias Vorreiter Pedersen
1842fed7a2
C++: Add shared SSA library and instantiate it with the IR.
2021-10-28 10:52:09 +01:00
Mathias Vorreiter Pedersen
13ce2569d7
C++/C#: Sync identical IR files·
2021-10-28 10:52:00 +01:00
Mathias Vorreiter Pedersen
bccd4e9e93
C++: Add 'getReturnAddress' and 'getReturnAddressOperand' predicates to 'ReturnValueInstruction'.
2021-10-28 10:51:49 +01:00
Nick Rolfe
bd92403b42
Ruby: fix qhelp
2021-10-28 10:42:56 +01:00
Rasmus Wriedt Larsen
6d09334cba
Merge pull request #6330 from porcupineyhairs/pyPathTraversal
...
Python : Add Flask sinks for path injection query
2021-10-28 11:39:40 +02:00
Rasmus Wriedt Larsen
3fa66519f5
Merge branch 'main' into fastapi
2021-10-28 11:37:40 +02:00
Rasmus Wriedt Larsen
d9e5d179d2
Python: Minor fix to QLDoc
...
and auto-formatting
2021-10-28 11:15:34 +02:00
Rasmus Wriedt Larsen
358663ffbb
Python: Fix tests
2021-10-28 11:14:41 +02:00
Erik Krogh Kristensen
12305aae42
extract regexp literals from string concatenations
2021-10-28 10:44:33 +02:00
yoff
9478faf040
Merge pull request #6967 from RasmusWL/ruamel.yaml
...
Python: Model `ruamel.yaml` PyPI package
2021-10-28 10:19:08 +02:00
Arthur Baars
3fb0139430
Protect against flag injection
2021-10-28 09:58:10 +02:00
ihsinme
2574aa8980
Update InsecureTemporaryFile.ql
2021-10-28 10:51:48 +03:00
Rasmus Lerchedahl Petersen
56dab252c9
Python: remove spurious dataflow step
2021-10-28 09:47:04 +02:00
Rasmus Lerchedahl Petersen
cca675a161
Python: Add test for async taint
...
(which we belive we have just broken)
2021-10-28 09:47:04 +02:00
ihsinme
432fc74455
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-10-28 10:37:01 +03:00
ihsinme
235a3ec232
Update InsecureTemporaryFile.qhelp
2021-10-28 10:34:42 +03:00
ihsinme
0addb2d1ea
Update IncorrectChangingWorkingDirectory.ql
2021-10-28 10:17:48 +03:00
ihsinme
c3b1d7e5c8
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-10-28 10:17:13 +03:00
Tony Torralba
cee80f766f
Merge pull request #6983 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-10-28 08:19:34 +02:00
github-actions[bot]
adfc725225
Add changed framework coverage reports
2021-10-28 00:08:41 +00:00
Porcuiney Hairs
4fd3f212f8
Python : Add Flask sinks for path injection query
2021-10-28 02:12:11 +05:30
Nick Rolfe
0d161bec7a
Merge pull request #6982 from github/nickrolfe/also-revert-cargo-lock
...
Ruby: also revert Cargo.lock
2021-10-27 20:33:07 +01:00
Erik Krogh Kristensen
96b6f670d9
filter away paths that start with libary inputs and end with a fixed-property write
2021-10-27 21:01:11 +02:00
Erik Krogh Kristensen
78371894f4
update import after rebasing on main
2021-10-27 20:47:06 +02:00
Erik Krogh Kristensen
a9a9e34265
recognize delete expresssions as a sink for js/prototype-polluting-assignment
2021-10-27 20:37:42 +02:00
Erik Krogh Kristensen
1243c736dd
use ConcatenationNode::isCoercion
2021-10-27 20:37:42 +02:00
Erik Krogh Kristensen
2dedfb302a
remove paths without unmatched returns from js/prototype-polluting-assignment
2021-10-27 20:37:42 +02:00
Erik Krogh Kristensen
0c9c9bbde7
detect library input when the arguments object is converted to an array
2021-10-27 20:37:41 +02:00
Erik Krogh Kristensen
fa9e9dd847
split out predicates in ClassifyFiles to avoid unnecessary computations
2021-10-27 20:35:38 +02:00
Erik Krogh Kristensen
3d124cf95e
add change-note
2021-10-27 20:35:38 +02:00
Erik Krogh Kristensen
d1238dfd8b
update alert message to distinguish between library input and remote flow
2021-10-27 20:35:38 +02:00
Erik Krogh Kristensen
6e183af383
ignore test files for the `prototypeLessObject' predicate
2021-10-27 20:35:37 +02:00
Erik Krogh Kristensen
e94b0f5913
recognize inclusion based sanitizers for js/prototype-polluting-assignment
2021-10-27 20:35:37 +02:00
Erik Krogh Kristensen
2a808b2cd6
track taint through string coercions for js/prototype-polluting-assignment
2021-10-27 20:35:37 +02:00
Erik Krogh Kristensen
2d65aa17db
recognize exported functions that use the arguments object
2021-10-27 20:35:37 +02:00
Erik Krogh Kristensen
78774233c7
add library input as source to js/prototype-polluting-assignment
2021-10-27 20:35:36 +02:00
Erik Krogh Kristensen
0372ccce02
simplify regexp
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-10-27 20:04:24 +02:00
Erik Krogh Kristensen
af64b319ee
update documentation strings
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-10-27 19:54:52 +02:00
Nick Rolfe
f557df6c4e
Revert "Ruby: update Cargo.lock"
...
This reverts commit 0a89028663 .
2021-10-27 18:38:22 +01:00
Nick Rolfe
f1229ff071
Revert "Ruby: update Cargo.lock"
...
This reverts commit 7a5e8f1756 .
2021-10-27 18:38:08 +01:00
Arthur Baars
5e2cab4fb1
Split workflow into separate jobs
2021-10-27 19:06:22 +02:00
Erik Krogh Kristensen
71cca6d644
Merge branch 'main' into ldap
2021-10-27 19:06:06 +02:00
Erik Krogh Kristensen
2e912ee28e
rename LDAP to Ldap
2021-10-27 19:05:56 +02:00
Erik Krogh Kristensen
c1ab49fe8a
rename LDapFilterStep to TaintPreservingLDapFilterStep
2021-10-27 19:05:00 +02:00
jorgectf
350cbb4c5d
Polish qhelp and libraries
2021-10-27 18:47:19 +02:00
Geoffrey White
e0e18c6587
C++: Drop the precision tags again, for now.
2021-10-27 17:24:46 +01:00
Shati Patel
c9b50f3c2f
Merge pull request #6981 from github/aibaars/ruby-lgtm-links
...
Ruby: update lgtm.com query console links
2021-10-27 17:18:08 +01:00
Arthur Baars
f496336a0d
Ruby: update lgtm.com query console links
2021-10-27 18:08:11 +02:00
Nick Rolfe
06303b103f
Merge pull request #6979 from github/nickrolfe/revert-crate-updates
...
Ruby: revert crate updates
2021-10-27 16:53:19 +01:00
Nick Rolfe
7a5e8f1756
Ruby: update Cargo.lock
2021-10-27 16:21:33 +01:00
Nick Rolfe
ff7826dd96
Revert "Update tracing-subscriber requirement from 0.2 to 0.3 in /ruby/generator"
...
This reverts commit 4cedb43a54 .
2021-10-27 16:21:33 +01:00
Nick Rolfe
fc1f874f92
Revert "Update tracing-subscriber requirement from 0.2 to 0.3 in /ruby/extractor"
...
This reverts commit e9da027539 .
2021-10-27 16:21:33 +01:00
Nick Rolfe
11154a9409
Ruby: add regex injection query
2021-10-27 15:58:12 +01:00
Geoffrey White
2182bb5c91
C++: Remove unused qhelp files.
2021-10-27 15:47:01 +01:00
Geoffrey White
d990e790e7
C++: Remove unused index.qhelp files.
2021-10-27 15:40:34 +01:00
Arthur Baars
aeedfd9987
Filter out non-qhelp files
2021-10-27 16:00:19 +02:00
Arthur Baars
b128c7ca00
Don't use local actions
2021-10-27 15:57:54 +02:00
Arthur Baars
19e010e6fe
fetch-codeql action: unzip in runner.temp
2021-10-27 15:57:54 +02:00
Anders Schack-Mulligen
6eabb610b4
Dataflow: Sync Ruby
2021-10-27 13:58:30 +02:00
Anders Schack-Mulligen
699630af54
Dataflow: Sync.
2021-10-27 13:57:44 +02:00
Anders Schack-Mulligen
92e4a1ed17
Dataflow: Review fixes.
2021-10-27 13:57:44 +02:00
Anders Schack-Mulligen
034c7f3538
Dataflow: Sync.
2021-10-27 13:57:44 +02:00
Anders Schack-Mulligen
51cebdce83
Dataflow: Add support for call context restrictions on sources/sinks.
2021-10-27 13:57:44 +02:00
Arthur Baars
dc24361f89
Merge pull request #6974 from github/nickrolfe/Cargo_lock
...
Ruby: update Cargo.lock
2021-10-27 13:47:22 +02:00
Arthur Baars
ce3a19458d
Set persist-credentials: false
2021-10-27 13:30:22 +02:00
Arthur Baars
54e946918a
QHelp preview: run if paths.txt is non-empty
2021-10-27 12:47:51 +02:00
Nick Rolfe
0a89028663
Ruby: update Cargo.lock
2021-10-27 11:43:09 +01:00
Arthur Baars
8077a49109
Switch qhelp-pr-preview.yml to pull_request_target
2021-10-27 12:38:52 +02:00
Rasmus Lerchedahl Petersen
06586a13a3
Python: merge tests files
2021-10-27 11:55:04 +02:00
Rasmus Lerchedahl Petersen
826f44d98e
Python: Share implementation of awaited
2021-10-27 11:41:18 +02:00
Rasmus Lerchedahl Petersen
01ad19b82b
Python: correct qldoc
2021-10-27 11:40:57 +02:00
yoff
c850554467
Update python/ql/lib/semmle/python/frameworks/SqlAlchemy.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-10-27 11:09:37 +02:00
Rasmus Lerchedahl Petersen
fed6a97eb8
Python: Promote ReDoS queries
2021-10-27 11:03:57 +02:00
Anders Schack-Mulligen
4a67ac5e0b
Merge pull request #4991 from JLLeitschuh/feat/JLL/early_ratpack_support
...
Java: Simple support for Ratpack HTTP Framework
2021-10-27 09:25:52 +02:00
Rasmus Wriedt Larsen
89e713a25c
Python: Update PyYAML comment with 6.0 release
2021-10-26 17:58:06 +02:00
Rasmus Wriedt Larsen
cd6d73d553
Python: Handle kwarg in PyYAML
...
Really surprised that we didn't already :|
2021-10-26 17:48:10 +02:00
Rasmus Wriedt Larsen
6c0083e584
Python: Add PoC for PyYAML code execution
2021-10-26 17:48:10 +02:00
Rasmus Wriedt Larsen
1ce09afa08
Python: Add modeling of ruamel.yaml PyPI package
2021-10-26 17:48:10 +02:00
Tony Torralba
6f7d0b62d7
Add ExplicitIntentSanitizer and allowIntentExtrasImplicitRead
2021-10-26 17:11:27 +02:00
Erik Krogh Kristensen
8a4b043cb1
fix imports
2021-10-26 15:39:45 +02:00
Rasmus Wriedt Larsen
29e3abc977
Python: FastAPI: Add HTTP header taint example
2021-10-26 15:34:16 +02:00
Erik Krogh Kristensen
62e729501c
make the RegExpEscape::getUnescaped predicate public in python
2021-10-26 15:25:14 +02:00
Erik Krogh Kristensen
97264b5dda
add the bad tag filter query to ruby
2021-10-26 15:25:12 +02:00
Edoardo Pirovano
fe39823942
Fix LGTM version number in language reference
2021-10-26 14:18:35 +01:00
Erik Krogh Kristensen
c15ddf6e92
update ReDoSUtil in ruby
2021-10-26 15:03:09 +02:00
Erik Krogh Kristensen
2ddf445caf
move ruby files to match file structure from js/py
2021-10-26 14:54:12 +02:00
Joe Farebrother
02b440b0ed
Merge pull request #6599 from joefarebrother/android-sensitive-communication
...
Java: Promote android sensitive broadcast query
2021-10-26 13:48:58 +01:00
Erik Krogh Kristensen
44afa34e37
Merge branch 'main' of github.com:github/codeql into htmlReg
2021-10-26 14:46:27 +02:00
CodeQL CI
e5e1046c81
Merge pull request #6962 from asgerf/js/template-db-constraint-err
...
Approved by erik-krogh
2021-10-26 13:43:57 +01:00
Jonathan Leitschuh
21aeee6378
Actually remove the last non-ascii quote from Promise
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-26 08:28:44 -04:00
Erik Krogh Kristensen
8ba545999e
add change-note
2021-10-26 14:13:56 +02:00
Alexander Eyers-Taylor
3bae95a93a
Merge pull request #6939 from edoardopirovano/bump-version
...
Fix version number in language reference
2021-10-26 13:11:30 +01:00
Anders Schack-Mulligen
90bebaa5a9
Merge pull request #6960 from erik-krogh/useSetLiteral
...
use set literal instead of big disjunction of literals
2021-10-26 14:06:05 +02:00
Anders Schack-Mulligen
ba95d46ec3
Apply suggestions from code review
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2021-10-26 14:04:13 +02:00
Erik Krogh Kristensen
090fb2df10
Merge pull request #6857 from erik-krogh/fixPipes
...
JS: skip pipes and other special files when determining which files to extract
2021-10-26 13:59:40 +02:00
Mathias Vorreiter Pedersen
4a58349fcd
Merge pull request #6961 from MathiasVP/fix-join-order-in-in-def-dominance-frontier
...
C#: Fix join order in `inDefDominanceFrontier`
2021-10-26 12:55:31 +01:00
Edoardo Pirovano
6a3de20e7a
Fix version number in language reference
2021-10-26 12:53:48 +01:00
Erik Krogh Kristensen
9c8a51bca6
cache SensitiveExpr
2021-10-26 13:47:28 +02:00
Erik Krogh Kristensen
038438edca
assume that setting the secure/httpOnly flag to some unknown value is good
2021-10-26 13:47:28 +02:00
Erik Krogh Kristensen
5228196f79
fix typos and update docs
2021-10-26 13:47:21 +02:00
Erik Krogh Kristensen
311df4d2b7
add test for the cookie npm package
2021-10-26 13:46:59 +02:00
Erik Krogh Kristensen
92d59aa11c
refactor most of the isSensitive predicates into a common helper predicate
2021-10-26 13:46:59 +02:00
Erik Krogh Kristensen
834d5ec6ad
add session{key,id} as sensitive info
2021-10-26 13:46:59 +02:00
Erik Krogh Kristensen
1e1e549847
update tests so it's clear which cookies are insecure
2021-10-26 13:46:58 +02:00
Erik Krogh Kristensen
283b8231cb
add more cookie models
2021-10-26 13:46:58 +02:00
Erik Krogh Kristensen
2cb3d2c53f
documentation overhaul on client-exposed-cookie (and restricting it to server-side)
2021-10-26 13:46:58 +02:00
Erik Krogh Kristensen
ab23ffff3d
documentation overhaul for clear-text-cookie
2021-10-26 13:46:58 +02:00
Erik Krogh Kristensen
f36accf3e6
only report clear-text cookies for sensitive cookies
2021-10-26 13:46:58 +02:00
Erik Krogh Kristensen
53b4337795
combine test files
2021-10-26 13:46:57 +02:00
Erik Krogh Kristensen
9193984f1b
delete the experimental query library for cookie queries
2021-10-26 13:46:57 +02:00
Erik Krogh Kristensen
6858acc6a9
port experimental cookie models to non-experimental
2021-10-26 13:46:57 +02:00
Erik Krogh Kristensen
26a24a3895
prepare move to non-experimental
2021-10-26 13:46:57 +02:00
Erik Krogh Kristensen
44db920f10
refactor, cleanup, and improvements in experimental cookie queries
2021-10-26 13:46:57 +02:00
Erik Krogh Kristensen
a3c55c2aec
use set literal instead of big disjunction of literals
2021-10-26 12:55:25 +02:00
Rasmus Lerchedahl Petersen
8a81d42e6f
Python: more logic adjustment
...
Not sure why the missing result is missing. There is
and edge with label `getAwaited` from `pkg.async_func` on line 22
to `coro` on line 23.
2021-10-26 10:57:27 +02:00
Rasmus Wriedt Larsen
2b9edd7ff6
Merge pull request #6952 from github/aibaars/generate-code-scanning-query-list
...
Add Ruby to generate-code-scanning-query-list.py and make the script faster
2021-10-26 10:49:24 +02:00
Rasmus Lerchedahl Petersen
f91e43c068
Python: Add more honest test for awaited
2021-10-26 10:43:06 +02:00
Mathias Vorreiter Pedersen
67fd38f328
C#/Ruby: Use a 'noinline' instead of a 'only_bind_into'.
2021-10-26 09:41:52 +01:00
Rasmus Lerchedahl Petersen
a8a181a32f
Python: adjust logic and add tests
...
Due to the way paths a re printed, the tests look surprising
2021-10-26 09:55:47 +02:00
Anders Schack-Mulligen
3d1b617101
Merge pull request #6959 from igfoo/igfoo/bbStmts
...
Java: Make a test output a bit more readable
2021-10-26 08:42:53 +02:00
Mathias Vorreiter Pedersen
4b137ede0e
Ruby: Sync identical files.
2021-10-25 22:03:44 +01:00
Mathias Vorreiter Pedersen
e2d3474563
Merge branch 'main' into fix-join-order-in-in-def-dominance-frontier
2021-10-25 22:02:35 +01:00
Mathias Vorreiter Pedersen
9145382660
C#: Sync identical files.
2021-10-25 21:55:28 +01:00
Mathias Vorreiter Pedersen
ff35100d52
C#: Fix join order in 'inDefDominanceFrontier'.
2021-10-25 21:55:09 +01:00
Henry Mercer
3284953192
Merge pull request #6958 from github/henrymercer/rename-atm-query-pack
...
JS: [Internal only] Rename ATM query pack for consistency with other packs
2021-10-25 20:16:40 +01:00
ihsinme
41e15cd497
Update IncorrectPrivilegeAssignment.cpp
2021-10-25 22:15:52 +03:00
Erik Krogh Kristensen
e117659dce
revert a thing for python
2021-10-25 20:50:18 +02:00
Ian Lynagh
f73f418a97
Java: Make a test output a bit more readable
...
Now the nodes are in index order, and the indices are aligned.
2021-10-25 18:48:19 +01:00
Erik Krogh Kristensen
f4a054ea01
apply range pattern patch to python
2021-10-25 19:38:10 +02:00
Erik Krogh Kristensen
d2d6b2ca7c
apply range pattern patch to cpp
2021-10-25 19:38:10 +02:00
Erik Krogh Kristensen
dbd1148bd6
apply range pattern patch to javascript
2021-10-25 19:38:00 +02:00
Henry Mercer
7e0e35f364
Rename ATM query pack for consistency with other packs
2021-10-25 17:32:25 +01:00
Jonathan Leitschuh
ebe2c26f4d
Remove the last non-ascii quote from Promise
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-25 11:30:12 -04:00
Arthur Baars
b79f8f1890
Fix CI jobs
2021-10-25 17:01:50 +02:00
shati-patel
8cd86ae8f5
Move queries.xml to src
2021-10-25 17:01:50 +02:00
shati-patel
b23b3c33f6
Add a queries.xml file (for CWE coverage) docs
2021-10-25 17:01:50 +02:00
Arthur Baars
de38570424
Merge identical-files.json
2021-10-25 17:01:44 +02:00
Nick Rolfe
db3c99d64d
Merge pull request #6954 from github/nickrolfe/ruby-labeler
...
Automatically label Ruby PRs
2021-10-25 15:44:30 +01:00
Arthur Baars
1bf4542c89
Remove github/codeql submodule
2021-10-25 16:42:45 +02:00
Arthur Baars
ddbba403f8
Update CodeSpaces configuration
2021-10-25 16:42:45 +02:00
Arthur Baars
aeb9ace694
Add ruby to CODEOWNERS
2021-10-25 16:42:45 +02:00
Arthur Baars
7741a72cc5
Merge remote-tracking branch 'codeql-ruby/rc/3.3' into codeql/rc/3.3
2021-10-25 16:41:36 +02:00
Nick Rolfe
096c207b3e
Automatically label Ruby PRs
2021-10-25 15:29:20 +01:00
CodeQL CI
3fc6e2b294
Merge pull request #6941 from RasmusWL/add-missing-noinline
...
Approved by tausbn
2021-10-25 15:23:37 +01:00
Arthur Baars
8ce7b287d1
Update dependabot config
2021-10-25 16:13:37 +02:00
Arthur Baars
3554e8d105
Drop LICENSE and CODE_OF_CONDUCT.md
2021-10-25 16:13:37 +02:00
Arthur Baars
2de757335f
Update Ruby workflows
2021-10-25 16:13:35 +02:00
Arthur Baars
068beeff56
Move create-extractor-pack Action
2021-10-25 16:12:08 +02:00
Arthur Baars
d2ea732539
Remove CodeSpaces configuration
2021-10-25 16:12:08 +02:00
Arthur Baars
ba32c54038
Move files to ruby subfolder
2021-10-25 16:11:59 +02:00
CodeQL CI
b5554da496
Merge pull request #6924 from asgerf/js/skip-files-with-unsupported-encoding
...
Approved by esbena
2021-10-25 14:48:38 +01:00
Nick Rolfe
7308f75b78
Merge pull request #6951 from github/nickrolfe/remove-workspace
...
Ruby: remove VS Code workspace
2021-10-25 14:29:06 +01:00
Rasmus Wriedt Larsen
7619d0fc33
Python: FastAPI: Model WebSocket usage
2021-10-25 15:23:33 +02:00
Rasmus Wriedt Larsen
b69977b37a
Python: FastAPI: Ignore scheme as tainted
...
reasoning highlighted in the comment
2021-10-25 15:23:33 +02:00
Rasmus Wriedt Larsen
bd8eec8475
Python: FastAPI: Add websocket test
2021-10-25 15:23:33 +02:00
Rasmus Wriedt Larsen
54ab5d4bc8
Python: Fix date for FastAPI change-note
2021-10-25 15:23:33 +02:00
Rasmus Wriedt Larsen
7e7a6464ec
Python: FastAPI: Model extra-taint for pydantic models
...
It feels a bit strange to add it to `frameworks.rst` since we only
support a little bit of it, but if I don't do it now, we will most
likely forget to do it later on (since it has already been added to
`frameworks.qll`).
2021-10-25 15:22:50 +02:00
Joe Farebrother
6dac86b9be
Fix unneeded import and spelling mistake
2021-10-25 14:11:00 +01:00
Arthur Baars
dcf71c4f9a
Ruby: update generate-code-scanning-query-list.py
2021-10-25 15:04:34 +02:00
Arthur Baars
a6ac2e73a1
Speed up generate-code-scanning-query-list.py
...
Use 'codeql execute cli-server' to avoid repeated JVM startup overhead
2021-10-25 15:03:28 +02:00
Nick Rolfe
779e24eb73
Ruby: remove VS Code workspace
2021-10-25 13:12:31 +01:00
Nick Rolfe
fb79886fe7
Merge pull request #6944 from github/dependabot/cargo/ruby/extractor/tracing-subscriber-0.3
...
Update tracing-subscriber requirement from 0.2 to 0.3 in /ruby/extractor
2021-10-25 12:50:48 +01:00
Nick Rolfe
b93be42421
Merge pull request #6943 from github/dependabot/cargo/ruby/generator/tracing-subscriber-0.3
...
Update tracing-subscriber requirement from 0.2 to 0.3 in /ruby/generator
2021-10-25 12:50:26 +01:00
Anders Schack-Mulligen
c48dd57d85
Merge pull request #6938 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-10-25 13:43:54 +02:00
Rasmus Lerchedahl Petersen
149b235c7a
Python: delete unused predicate
2021-10-25 13:41:29 +02:00
Rasmus Lerchedahl Petersen
cb61f87aa3
Python: rewrite "clever" reverse lookup
2021-10-25 13:40:45 +02:00
ihsinme
a33c076f5f
Add files via upload
2021-10-25 14:40:35 +03:00
ihsinme
6173b11274
Add files via upload
2021-10-25 14:39:43 +03:00
ihsinme
5d5d6bcc69
Add files via upload
2021-10-25 14:34:10 +03:00
ihsinme
baec186359
Add files via upload
2021-10-25 14:33:01 +03:00
Rasmus Lerchedahl Petersen
5a02b3880e
Python: use SqlConstruction in SqlAlchemy and
...
`SqlInjection`
2021-10-25 13:30:14 +02:00
ihsinme
3f3988ce1c
Add files via upload
2021-10-25 14:24:35 +03:00
ihsinme
8e8a324fa6
Add files via upload
2021-10-25 14:23:19 +03:00
Joe Farebrother
0c1af2411b
Write intent in lowercase consistently
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-10-25 12:22:49 +01:00
Anders Schack-Mulligen
5709365c0f
Merge pull request #6921 from igfoo/igfoo/types
...
Java: Replace @type with more specific types
2021-10-25 13:15:12 +02:00
Rasmus Lerchedahl Petersen
e5b68d68cb
Python: Use SqlConstruction in Asyncpg.qll
2021-10-25 13:15:09 +02:00
Rasmus Lerchedahl Petersen
03ada6e97a
Python: Add concept test for SqlConstruction
2021-10-25 13:09:43 +02:00
Rasmus Lerchedahl Petersen
ed5a386618
Python: add concept SqlCopnstruction
2021-10-25 12:48:24 +02:00
dependabot[bot]
e9da027539
Update tracing-subscriber requirement from 0.2 to 0.3 in /ruby/extractor
...
Updates the requirements on [tracing-subscriber](https://github.com/tokio-rs/tracing ) to permit the latest version.
- [Release notes](https://github.com/tokio-rs/tracing/releases )
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.0...tracing-subscriber-0.3.0 )
---
updated-dependencies:
- dependency-name: tracing-subscriber
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-10-25 10:40:34 +00:00
dependabot[bot]
4cedb43a54
Update tracing-subscriber requirement from 0.2 to 0.3 in /ruby/generator
...
Updates the requirements on [tracing-subscriber](https://github.com/tokio-rs/tracing ) to permit the latest version.
- [Release notes](https://github.com/tokio-rs/tracing/releases )
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.0...tracing-subscriber-0.3.0 )
---
updated-dependencies:
- dependency-name: tracing-subscriber
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-10-25 10:40:28 +00:00
Arthur Baars
afc7867c98
Merge pull request #6942 from github/aibaars/patch-10
...
Merge codeql-ruby into codeql
2021-10-25 12:33:34 +02:00
Asger Feldthaus
bfb1da55d6
JS: Bump extractor version string
2021-10-25 11:49:56 +02:00
Asger Feldthaus
f3e2b0b946
JS: Avoid using non-existent attribute as parent
2021-10-25 11:49:56 +02:00
Asger Feldthaus
ac62379b17
JS: Add TRAP test
2021-10-25 11:49:39 +02:00
Rasmus Wriedt Larsen
f5464b79e4
Merge branch 'main' into fastapi
2021-10-25 09:49:42 +02:00
github-actions[bot]
2257d0475a
Add changed framework coverage reports
2021-10-25 00:09:34 +00:00
Arthur Baars
4f79398342
Merge branch 'main' of github.com:github/codeql into 'main'
...
Conflicts:
docs/codeql/query-help/codeql-cwe-coverage.rst
2021-10-22 21:51:25 +02:00
Tom Hvitved
f020b2e437
Merge pull request #335 from github/hmac/self-flow
2021-10-22 19:14:20 +02:00
Jonathan Leitschuh
5eb28398f0
Remove non-ASCII characters from Promise.java
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-22 10:52:46 -04:00
Nick Rolfe
3851a27fc1
Merge pull request #358 from github/external-control-file-path
...
Add rb/path-injection query
2021-10-22 15:38:39 +01:00
Tom Hvitved
7648815f1f
Merge pull request #6936 from hvitved/csharp/delegate-conversion-join-order
...
C#: Improve join-order in `defaultDelegateConversion`
2021-10-22 15:10:20 +02:00
Tom Hvitved
61d7cdeec0
Data flow: Assign empty locations to summary nodes
2021-10-22 14:48:33 +02:00
Harry Maclean
87df3a0a99
Minor refactor
2021-10-22 11:44:38 +01:00
hubwriter
12e56ec9e6
Merge pull request #6887 from github/hubwriter/codeql-ruby-support
...
Docs: Updates for Ruby support
2021-10-22 11:21:49 +01:00
Nick Rolfe
d4cee73720
Add taint summaries for ActiveStorage::Filename
2021-10-22 11:15:42 +01:00
Henry Mercer
02b1fe27d2
Merge pull request #6907 from github/henrymercer/add-experimental-atm-libraries
...
JS: [Internal only] Add experimental libraries and queries for adaptive threat modeling
2021-10-22 11:02:09 +01:00
Harry Maclean
aa8607009b
Update test fixtures
2021-10-22 10:56:34 +01:00
Harry Maclean
336bd15d2f
Override isCapturedAccess for self variables
...
Many `self` reads are synthesised from method calls with an implicit
`self` receiver. Synthesised nodes have no `toGenerated` result, which
the default definition of `isCapturedAccess` uses to determine if a
variable's scope matches the access's scope.
Hence we override the definition to properly identify accesses like the
call `puts` (below) as captured reads of a `self` variable defined in a
parent scope.
In other words, `puts x` is short for `self.puts x` and the `self`
refers to its value in the scope of the module `Foo`.
```ruby
module Foo
MY_PROC = -> (x) { puts x }
end
```
We also have to update the SSA `SelfDefinition` to exclude captured
`self` variables.
2021-10-22 10:56:34 +01:00
Harry Maclean
f1add388a0
Synthesise writes to self for classes/modules
...
This requires changing the CFG trees for classes and modules from
post-order to pre-order so that we can place the writes at the root node
of the tree, to prevent them overlapping with reads in the body of the
class/module.
We need to do this because classes and modules don't define their own
basic block, but re-use the surrounding one. This problem doesn't occur
for `self` variables in methods because each method has its own basic
block and we can place the write on the entry node of the bock.
2021-10-22 10:56:34 +01:00
Joe Farebrother
c89178c0e8
Apply suggestions from code review
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2021-10-22 10:54:57 +01:00
Tony Torralba
1333f67a69
Merge pull request #6917 from JLLeitschuh/feat/JLL/jdk_lambda_collections_model_tracking
...
[Java] JDK Collection lambda models
2021-10-22 10:26:50 +02:00
Tom Hvitved
4e40337d02
C#: Improve join-order in defaultDelegateConversion
2021-10-22 10:12:18 +02:00
Porcuiney Hairs
f70d808e2f
fix testcases
2021-10-22 00:58:59 +05:30
Porcuiney Hairs
9fe822f41c
Include suggestions from review
2021-10-22 00:55:01 +05:30
Arthur Baars
4f72d0853a
Merge pull request #375 from github/rc/3.3
...
Merge rc/3.3 into main
2021-10-21 18:16:57 +02:00
Joe Farebrother
2d368a7d9a
Remove redundant imports from ExternalFlow
2021-10-21 16:48:53 +01:00
Joe Farebrother
a9dde419d2
Fix up test
2021-10-21 16:46:07 +01:00
Geoffrey White
9009dac9ea
Merge branch 'main' into nullterm2
2021-10-21 13:14:15 +01:00
Taus
562a57b75b
Merge pull request #6928 from RasmusWL/diagnostic-as-warning
...
Python: Improve SARIF severity level reporting of extractor diagnostics
2021-10-21 13:54:01 +02:00
Nick Rolfe
5734f51792
Merge remote-tracking branch 'origin/main' into external-control-file-path
2021-10-21 10:58:38 +01:00
Rasmus Wriedt Larsen
852e9875bd
Python: Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-10-21 10:24:34 +02:00
Edoardo Pirovano
1fe772a2ab
Merge pull request #6896 from edoardopirovano/fix-version-trailing
...
Language reference: Fix when trailing commas are allowed
2021-10-21 00:02:02 +01:00
Aditya Sharad
174df98762
Merge pull request #6929 from github/esbena-patch-5
...
Mention default JavaScript Autobuilder excludes
2021-10-20 15:47:51 -07:00
Esben Sparre Andreasen
a1ce81c3d7
Update creating-codeql-databases.rst
2021-10-20 23:00:46 +02:00
Arthur Baars
f9f0fab0d0
Merge pull request #374 from github/aibaars/sync-codeql
...
Sync with `github/codeql:main`
2021-10-20 22:38:46 +02:00
Ian Lynagh
830f81bfdb
Java: Autoformat
2021-10-20 17:45:01 +01:00
Joe Farebrother
3e3503a763
Fix failing checks
2021-10-20 17:25:38 +01:00
Joe Farebrother
b6c584cb70
Update docs
2021-10-20 17:09:59 +01:00
Joe Farebrother
447e06d92a
Rename from SensitiveBroadcast to SensitiveCommmunication
2021-10-20 17:09:59 +01:00
Joe Farebrother
54e9c49080
Remove SendBroadcastMethodAccess
2021-10-20 17:09:59 +01:00
Joe Farebrother
e02be6cf93
Add additional sinks
2021-10-20 17:09:59 +01:00
Joe Farebrother
e616122982
Rename parameter
2021-10-20 17:09:59 +01:00
Joe Farebrother
fede77a934
Rename some utility methods
2021-10-20 17:09:59 +01:00
Joe Farebrother
069d6627b5
Improve sanitizers
2021-10-20 17:09:59 +01:00
Joe Farebrother
174ac3d6c3
Move to correct directory
2021-10-20 17:09:59 +01:00
Joe Farebrother
c3d1165c5f
Revert change to argument handling
2021-10-20 17:09:58 +01:00
Joe Farebrother
6a2346ec33
Clean up sink definition
2021-10-20 17:09:58 +01:00
Joe Farebrother
daf6ac2584
Update tests to InlineFlowTest
2021-10-20 17:09:58 +01:00
Joe Farebrother
52ca6b93e3
Make things private where possible
2021-10-20 17:09:58 +01:00
Joe Farebrother
351e67c639
Fix qhelp
2021-10-20 17:09:58 +01:00
Joe Farebrother
06a30bf822
Add change note
2021-10-20 17:09:58 +01:00
Joe Farebrother
b112189530
Update docs
2021-10-20 17:09:58 +01:00
Joe Farebrother
224d679722
Add Sticky broadcast sinks
2021-10-20 17:09:57 +01:00
Joe Farebrother
ef7125e21a
Simplify sink definitions using local flow
2021-10-20 17:09:57 +01:00
Joe Farebrother
d7c7776495
Add additional models; fix up tests
2021-10-20 17:09:57 +01:00
Joe Farebrother
ae461bcfe4
Switch to inline expectations tests
2021-10-20 17:09:57 +01:00
Joe Farebrother
4012866c6f
Allow arbitrary read steps at the sink
2021-10-20 17:09:57 +01:00
Joe Farebrother
bae0da8851
Remove existing get methods
2021-10-20 17:09:57 +01:00
Joe Farebrother
1e8dd7ae40
Use subclasses of context for sinks
2021-10-20 17:09:57 +01:00
Joe Farebrother
143920efca
Movee query logic to a qll file
2021-10-20 17:09:57 +01:00
Joe Farebrother
c68a7077d7
Move query and tests out of experimental
2021-10-20 17:09:56 +01:00
Rasmus Wriedt Larsen
8167e83ae5
Python: Fix tests
2021-10-20 17:58:03 +02:00
Jonathan Leitschuh
cce3aad62e
Remove non-ASCII characters from Handler.java
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-20 11:34:59 -04:00
Geoffrey White
0e5cfd3469
C++: Rename the predicate and make it private.
2021-10-20 16:12:04 +01:00
Rasmus Wriedt Larsen
d0fd907582
Python: Add change-note
...
I reworded this slightly from what was done in C++, such that I can
completely stand behind what it says.
2021-10-20 17:03:55 +02:00
Rasmus Wriedt Larsen
8f28684d10
Python: Rename ExtractionErrors.ql -> ExtractionWarnings.ql
2021-10-20 17:01:33 +02:00
Rasmus Wriedt Larsen
605494c3d1
Python: Treat SyntaxErrors as warnings in diagnostics
...
Rename going to happen in second commit, so git doesn't get too confused
I don't actually recall where to lookup that warning is 1, and error is
2, but I took this from
https://github.com/github/codeql/pull/6830/files#diff-460fc20823ced3b074784db804f2d4d6cfcad4f23fe5d264dc7496c782629a2eR121-R123
2021-10-20 16:59:00 +02:00
Geoffrey White
5379b25146
C++: Add tests.
2021-10-20 15:44:56 +01:00
Geoffrey White
f17c06a37f
C++: Fix mistake in previous commit.
2021-10-20 15:40:14 +01:00
Arthur Baars
62d25b6e12
Merge pull request #373 from github/aibaars/warn-ruby-beta
...
Ruby: warn that Ruby is still in Beta
2021-10-20 16:14:29 +02:00
Arthur Baars
74ba532a8b
Ruby: warn that Ruby is still in Beta
2021-10-20 15:59:26 +02:00
Mathias Vorreiter Pedersen
7feab27bf4
Merge pull request #6926 from geoffw0/setliterals2
...
C++: Use set literals (more).
2021-10-20 14:58:06 +01:00
Arthur Baars
630ee17613
Ruby: sync-files and add allowParameterReturnInSelf()
2021-10-20 15:39:46 +02:00
Arthur Baars
0bec8987b6
Merge remote-tracking branch 'codeql/main' into 'main'
2021-10-20 15:38:59 +02:00
Geoffrey White
da412178ce
C++: Use set literals (more).
2021-10-20 14:18:27 +01:00
Taus
7214d70ee7
Merge pull request #135 from github/winfix
...
Fix create-extractor-pack.ps1
2021-10-20 14:51:06 +02:00
Taus
fff1f1248a
QL: Merge pull request #135 from github/winfix
...
Fix create-extractor-pack.ps1
2021-10-20 14:51:06 +02:00
Harry Maclean
356828cd51
Update stored XSS fixture
...
The change to `self` modelling finds more true positives in this query.
2021-10-20 13:30:51 +01:00
Nick Rolfe
16c62d22de
Add change-note for rb/path-injection
2021-10-20 13:19:49 +01:00
Geoffrey White
1f2b32fe87
Fix create-extractor-pack.ps1
2021-10-20 13:17:22 +01:00
Geoffrey White
3bc209ded8
QL: Fix create-extractor-pack.ps1
2021-10-20 13:17:22 +01:00
Nick Rolfe
e367832637
Import Frameworks.qll in Summaries module
2021-10-20 13:11:50 +01:00
hubwriter
8f15dc4bd0
Add 'requires glibc 2.17' in supported languages table
2021-10-20 12:48:20 +01:00
Nick Rolfe
86da3c2db3
Add rb/path-injection query
2021-10-20 12:31:16 +01:00
Tom Hvitved
19589bef27
Merge pull request #6777 from hvitved/dataflow/summary-clear-modelling
...
Data flow: Rework `SummarizedCallable::clearsContent/2`
2021-10-20 13:23:56 +02:00
Ian Lynagh
25b5601da9
Java: Add a changenote to RefType -> ClassOrInterface
2021-10-20 12:21:08 +01:00
Ian Lynagh
25fcae1c51
Java: Make some types more specific
...
Where we used to use RefType, we now use ClassOrInterface.
2021-10-20 12:18:20 +01:00
hubwriter
aaa5046533
Add beta note to page Calum added
2021-10-20 11:17:38 +01:00
Asger Feldthaus
fa0ce5380b
JS: Skip files with unsupported file encoding
2021-10-20 12:16:50 +02:00
Tom Hvitved
f9fb046e9f
C#: Update expected test output after rebase
2021-10-20 12:15:27 +02:00
Tom Hvitved
29cdc8a49a
Java: Update expected test output after rebase
2021-10-20 12:11:59 +02:00
hubwriter
dd31d5ffb3
Merge branch 'main' into hubwriter/codeql-ruby-support
2021-10-20 11:08:59 +01:00
Tom Hvitved
0bf5238f39
Update QL doc for allowParameterReturnInSelf
2021-10-20 12:08:58 +02:00
Tom Hvitved
53d4d72fe5
C#: Simplify SummarizedCallableDefaultClearsContent
2021-10-20 12:08:58 +02:00
Tom Hvitved
dd138b0429
Address review comments
2021-10-20 12:08:58 +02:00
Tom Hvitved
ec5d8ab2db
Java: Restrict use-use flow
2021-10-20 12:08:57 +02:00
Tom Hvitved
a1511e13d8
Data flow: Sync files
2021-10-20 12:08:57 +02:00
Tom Hvitved
1196d0c624
C#: Rework SummarizedCallable::clearsContent/2
2021-10-20 12:08:57 +02:00
Calum Grant
ed73d9bab4
Merge pull request #6860 from github/ruby-docs
...
Ruby documentation
2021-10-20 10:47:05 +01:00
Tom Hvitved
f1f7930529
Make all self nodes LocalSourceNodes
2021-10-20 11:43:50 +02:00
Tom Hvitved
94f0f8daf2
Make SelfVariableAccess a sub type of LocalVariableAccess
2021-10-20 11:43:44 +02:00
Harry Maclean
e0b2d88377
Remove redundant import
2021-10-20 10:41:17 +01:00
Harry Maclean
c437fd50a4
Update test fixtures
...
Some of these look a bit suspicious, so need to double check them before
merging.
2021-10-20 10:39:36 +01:00
Harry Maclean
c71f538a5a
Extend the scope of self variables
...
`self` variables are scoped to methods, modules, classes and the
top-level of the program. Prior to this change, they were treated as
being scoped just to methods.
This change means we (once again) correctly synthesise `self` receivers
for method calls in class bodies, module bodies and at the top-level.
2021-10-20 09:43:23 +01:00
Harry Maclean
647485acde
Don't omit self from uninitialized writes
...
We can safely create uninitialized writes for `self` variables, because
they appear at index -1 in the entry block of a method, and are
immediately overwritten by a write to `self` at index 0. As a result,
they are not live and will be pruned from the CFG.
2021-10-20 09:43:22 +01:00
Tom Hvitved
446eb13471
Minor adjustments to SSA library for self variables
2021-10-20 09:43:21 +01:00
Harry Maclean
0d39a15786
Model implicit reads of self variables
...
We already synthesise `self` nodes for method calls with no receiver.
This change creates read accesses for each of these synthesised nodes.
2021-10-20 09:43:20 +01:00
Harry Maclean
e7a3050fb2
Improve the modelling of self variables.
...
We model `self` variables by inserting a write at the start of every
method body. We then treat them as local variables that are alive for
the extent of the method body.
2021-10-20 09:43:19 +01:00
Tamás Vajk
9331b3538d
Merge pull request #6914 from tamasvajk/feature/improve-csv-pr-commenter
...
Introduce foldable region in CSV coverage PR comments
2021-10-20 08:45:55 +02:00
Ian Lynagh
9fbff1b4c1
Java: Add an upgrade script
2021-10-20 00:34:47 +01:00
Jonathan Leitschuh
d4b18fe6a3
[Java] JDK Collection lambda models
...
Adds support for data flow tracking through simple JDK collection
functional APIs.
- `Iterable::forEach`
- `Iterator::forEachRemaining`
- `Map::forEach`
Replaces #5871
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-19 15:57:58 -04:00
Ian Lynagh
90299033d1
Java: Replace @type with more specific types
2021-10-19 20:23:53 +01:00
Geoffrey White
f7bd74ea59
C++: Prototype nodeBefore predicate.
2021-10-19 20:08:55 +01:00
Geoffrey White
57fe4b9a31
C++: Also fix variableMustBeNullTerminated.
2021-10-19 18:06:11 +01:00
Jonathan Leitschuh
584c27a2f8
Move CollectionPassingTest to correct directory
2021-10-19 11:44:12 -04:00
Jonathan Leitschuh
8231907116
Ratpack code cleanup from code review
2021-10-19 11:42:35 -04:00
Calum Grant
112d408fb9
Address review comments.
2021-10-19 16:30:54 +01:00
Chris Smowton
233a3346a8
Merge pull request #6240 from haby0/java/UnsafeUrlForward
...
[Java] CWE-552: Unsafe url forward
2021-10-19 16:18:23 +01:00
Geoffrey White
b4b8392748
C++: New, behaviour preserving solution.
2021-10-19 16:16:05 +01:00
Jonas Jensen
7015be7cad
Merge pull request #6916 from geoffw0/fixnotbound
...
C++: Fix unbound variables in PrivateCleartextWrite.qll.
2021-10-19 16:46:42 +02:00
Geoffrey White
38257a58f0
C++: Fix unbound variables in PrivateCleartextWrite.qll.
2021-10-19 15:01:32 +01:00
Tom Hvitved
3f396ac10e
Merge pull request #371 from github/hvitved/dataflow/arg-sugar
...
Data flow: Fix bug for sugared call arguments
2021-10-19 15:48:21 +02:00
Chris Smowton
057d0fb7e0
Rewrite query to use shared StringPrefixes library
2021-10-19 14:45:38 +01:00
Tamás Vajk
12d7f0c9e2
Merge pull request #6913 from tamasvajk/feature/improve-stubbing
...
C#: Remove cartesian product in stubbing (GeneratedType::getStub)
2021-10-19 15:13:26 +02:00
Geoffrey White
e487832823
C++: Clean up QL.
2021-10-19 14:10:30 +01:00
Chris Smowton
8a4fa0a7e2
Copyedit
2021-10-19 12:50:17 +01:00
haby0
9d9a7abd06
Fix
2021-10-19 12:50:03 +01:00
haby0
283376eb19
Modify the model
2021-10-19 12:49:08 +01:00
haby0
679652e63a
Modify Sanitizer
2021-10-19 12:49:08 +01:00
haby0
952b34a163
Eliminate FP
2021-10-19 12:49:08 +01:00
haby0
d0eec1e381
Add CWE-552-UnsafeUrlForward
2021-10-19 12:49:07 +01:00
Tamas Vajk
70ffbae091
Introduce foldable region in CSV coverage PR comments
2021-10-19 13:34:25 +02:00
Anders Schack-Mulligen
662852bd1d
Merge pull request #6859 from smowton/smowton/admin/factor-string-prefix
...
Java: Factor out string prefix logic
2021-10-19 13:32:52 +02:00
Arthur Baars
db1be380ea
Merge pull request #372 from github/aibaars/codeqlmanifest
...
Add reference to nested .codeqlmanifest.json
2021-10-19 13:25:30 +02:00
Arthur Baars
c604825fdd
Add reference to nested .codeqlmanifest.json
2021-10-19 13:14:45 +02:00
Henry Mercer
548a344d34
JS: Implement suggestions from review
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2021-10-19 12:00:40 +01:00
Tamas Vajk
c7c35401e0
C#: Remove cartesian product in stubbing (GeneratedType::getStub)
2021-10-19 12:56:23 +02:00
Chris Smowton
d46b897492
Add explicit this
2021-10-19 11:32:24 +01:00
Chris Smowton
beaa1cffd2
Make import private
2021-10-19 11:28:56 +01:00
Chris Smowton
3bf9abb4ce
Avoid ambiguous term 'successor'.
2021-10-19 11:28:56 +01:00
Chris Smowton
0d66cebfba
Autoformat
2021-10-19 11:28:56 +01:00
Chris Smowton
3c25301593
Extend documentation
2021-10-19 11:28:55 +01:00
Chris Smowton
d0d17e3b84
Make import private
2021-10-19 11:28:55 +01:00
Chris Smowton
b71920209e
Factor out string prefix logic
2021-10-19 11:28:54 +01:00
Anders Schack-Mulligen
b975e12f41
Merge pull request #6912 from aschackmull/java/minor-perf-fix
...
Java: Fix bad join-order.
2021-10-19 12:13:26 +02:00
Rasmus Wriedt Larsen
386c7e3a12
Python: Add missing pragma[noinline]
2021-10-19 11:55:51 +02:00
Rasmus Wriedt Larsen
b0af805460
Merge pull request #6899 from thepurpleowl/patch-1
...
Python SignatureOverriddenMethod: Rmv duplicate condition
2021-10-19 11:24:01 +02:00
Anders Schack-Mulligen
90a50e7ca9
Java: Fix bad join-order.
2021-10-19 10:55:52 +02:00
Anders Schack-Mulligen
6508afe824
Merge pull request #6900 from Marcono1234/marcono1234/MemberRefExpr-receiver-type
...
Java: Add `MemberRefExpr.getReceiverType()`
2021-10-19 10:49:15 +02:00
hubwriter
6f34735f64
Update docs/codeql/writing-codeql-queries/creating-path-queries.rst
2021-10-19 09:27:54 +01:00
Arthur Baars
fc546d63ca
Merge remote-tracking branch 'codeql/rc/3.3' into 'rc/3.3'
2021-10-19 09:52:24 +02:00
Erik Krogh Kristensen
631a503e55
cleanup
2021-10-19 09:19:31 +02:00
Erik Krogh Kristensen
c00e18f4b0
QL: cleanup
2021-10-19 09:19:31 +02:00
Esben Sparre Andreasen
629605c075
Merge pull request #133 from github/esbena/update-readme
...
Update readme with alerts and actions information
2021-10-19 07:58:59 +02:00
Esben Sparre Andreasen
ac78e26672
QL: Merge pull request #133 from github/esbena/update-readme
...
Update readme with alerts and actions information
2021-10-19 07:58:59 +02:00
Esben Sparre Andreasen
0760c1c13f
Update readme with alerts and actions information
2021-10-19 07:58:22 +02:00
Esben Sparre Andreasen
769f787651
QL: Update readme with alerts and actions information
2021-10-19 07:58:22 +02:00
Esben Sparre Andreasen
3f420c442e
Update bleeding-codeql-analysis.yml
2021-10-18 21:51:56 +02:00
Esben Sparre Andreasen
5fa1c04e2a
QL: Update bleeding-codeql-analysis.yml
2021-10-18 21:51:56 +02:00
Esben Sparre Andreasen
b96ad387ef
Merge pull request #132 from github/esbena/fix-branch
...
change branch name
2021-10-18 21:18:16 +02:00
Esben Sparre Andreasen
032a0dc6ae
QL: Merge pull request #132 from github/esbena/fix-branch
...
change branch name
2021-10-18 21:18:16 +02:00
Esben Sparre Andreasen
e851ba2bfd
change code-scanning branch
2021-10-18 20:58:02 +02:00
Esben Sparre Andreasen
d49db9298c
QL: change code-scanning branch
2021-10-18 20:58:02 +02:00
Jonathan Leitschuh
db2892b9ea
Resove taint tracking issues from asMultimap
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-18 14:30:46 -04:00
Henry Mercer
4d7a8285ad
JS: Initial commit of Adaptive Threat Modeling
2021-10-18 17:24:24 +01:00
Jonathan Leitschuh
5a2bdc9a0f
Jackson taint tracking of elements
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-18 12:21:11 -04:00
Jonathan Leitschuh
8fecc158ff
Add support for Map.forEach
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-18 12:21:11 -04:00
Jonathan Leitschuh
23e60e2c52
Add full integration test for Ratpack example
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-18 12:21:11 -04:00
Jonathan Leitschuh
ebbbda70c0
Ratpack tests all passing
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-18 12:21:11 -04:00
Jonathan Leitschuh
fe374f5e9c
Ratpack: Add support for Promise::apply
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-18 12:21:10 -04:00
Jonathan Leitschuh
6562ac3680
Ratpack conversion to new lambda model
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-18 12:21:10 -04:00
Jonathan Leitschuh
4f90f0a748
Begin refactoring Ratpack to use functional taint tracking
...
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com >
2021-10-18 12:21:10 -04:00
Jonathan Leitschuh
6497a61c1d
Ratpack: Drop support for flatMap like methods
2021-10-18 12:21:10 -04:00
Jonathan Leitschuh
af90b00e63
Ratpack: Release note and typo fix
2021-10-18 12:21:10 -04:00
Jonathan Leitschuh
901631ceb8
Ratpack Promise add support for apply method
2021-10-18 12:21:10 -04:00
Jonathan Leitschuh
b9dc3d0cfe
Ratpack: Better support for Promise API
2021-10-18 12:21:09 -04:00
Jonathan Leitschuh
cdfdcc66bd
Ratpack fix formatting and non-ascii characters
2021-10-18 12:21:09 -04:00
Jonathan Leitschuh
a3b1736a73
Ratpack improve support for parsing types
2021-10-18 12:21:09 -04:00
Jonathan Leitschuh
ac185d9bd5
Remove RatpackGetRequestDataMethod
2021-10-18 12:21:09 -04:00
Jonathan Leitschuh
563e5690df
Refactor Ratpack to use CSV format
2021-10-18 12:21:09 -04:00
Jonathan Leitschuh
4f658df0ac
Apply suggestions from code review
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-10-18 12:21:09 -04:00
Jonathan Leitschuh
18c74c5030
Simplify Ratpack API using standard abstract classes
2021-10-18 12:21:08 -04:00
Jonathan Leitschuh
b2e3df29b3
Add support for Promise.value and Promise::flatMap
2021-10-18 12:21:08 -04:00
Jonathan Leitschuh
b2ad128beb
Refactors Ratpack lambda taint tracking to use generic API
2021-10-18 12:21:08 -04:00
Jonathan Leitschuh
170657b9a4
Add additional Ratpack test and improve Promise based dataflow tracking
2021-10-18 12:21:08 -04:00
Jonathan Leitschuh
dabf00e8b4
Add Tests to Ratpack Framework Support
2021-10-18 12:21:08 -04:00
Jonathan Leitschuh
f5c3723a99
Java: Simple support for Ratpack HTTP Framework
2021-10-18 12:21:08 -04:00
Marcono1234
86d53931aa
Java: Improve MemberRefExpr.getReceiverType() documentation
2021-10-18 18:20:22 +02:00
Geoffrey White
3f3c79f48f
Merge pull request #6884 from geoffw0/setliterals
...
Replace or chains with set literals.
2021-10-18 16:46:55 +01:00
Shati Patel
702c647556
Merge pull request #6904 from shati-patel/ruby-query-help
...
Docs: Add Ruby to query help pages
2021-10-18 16:13:50 +01:00
Anders Schack-Mulligen
b67032d1cc
Merge pull request #6891 from erik-krogh/fix-java-this
...
add explicit this qualifier on all of java
2021-10-18 17:13:37 +02:00
Tom Hvitved
c57b7c5b2b
Data flow: Restrict ExprReturnNode to nodes from the body of the callable
2021-10-18 17:01:30 +02:00
Tom Hvitved
a10bde5795
Merge pull request #6872 from hvitved/dataflow/path-into-callable0-join
...
Data flow: Performance tweaks
2021-10-18 16:25:10 +02:00
Tony Torralba
a5749a5eb1
Add ComponentName tests to existing Intent tests
2021-10-18 15:23:52 +02:00
Taus
8e68eae83d
Merge pull request #5463 from jorgectf/jorgectf/python/headerInjection
...
Python: Add Header Injection query
2021-10-18 15:16:14 +02:00
Tom Hvitved
e6954292aa
Address review comments
2021-10-18 14:09:44 +02:00
Anders Schack-Mulligen
91ea064980
Sync
2021-10-18 14:04:50 +02:00
Anders Schack-Mulligen
df9836cce0
Work around compiler bug.
2021-10-18 14:04:16 +02:00
Tom Hvitved
397b8345e0
Data flow: Fix bug for sugared call arguments
2021-10-18 13:48:11 +02:00
Tom Hvitved
0de27bbc7e
Data flow: Add ArgumentNode test
2021-10-18 13:47:50 +02:00
Jonas Jensen
493a37ba5e
Merge pull request #6903 from MathiasVP/remove-implicit-this-for-cpp
...
C++: Remove uses of implicit `this`
2021-10-18 13:41:30 +02:00
Ian Lynagh
9371737331
Merge pull request #6894 from igfoo/igfoo/exprs
...
Java: Don't use dbscheme tables in CloseType.qll
2021-10-18 12:04:11 +01:00
shati-patel
b9ede183b0
Docs: Add Ruby to query help pages
2021-10-18 11:48:24 +01:00
Nick Rolfe
51cab94cb0
Merge pull request #370 from github/shati-patel/ruby-docs
...
Move queries.xml to `src`
2021-10-18 11:35:36 +01:00
Esben Sparre Andreasen
a089e0ed3f
change branch name
2021-10-18 12:31:03 +02:00
Esben Sparre Andreasen
6cc14b16ba
QL: change branch name
2021-10-18 12:31:03 +02:00
Esben Sparre Andreasen
a9cef84b90
Merge pull request #131 from github/esbena/workflow-improvements
...
Misc. workflow improvements
2021-10-18 12:21:39 +02:00
Esben Sparre Andreasen
f29813b3f7
QL: Merge pull request #131 from github/esbena/workflow-improvements
...
Misc. workflow improvements
2021-10-18 12:21:39 +02:00
Tony Torralba
392e2eebeb
Add intent creation from a URI as a taint step
2021-10-18 12:18:07 +02:00
shati-patel
83a1260769
Move queries.xml to src
2021-10-18 11:18:00 +01:00
Esben Sparre Andreasen
eded7b8da1
add nightly-changes workflow
2021-10-18 12:03:16 +02:00
Esben Sparre Andreasen
dc715af18b
QL: add nightly-changes workflow
2021-10-18 12:03:16 +02:00
Esben Sparre Andreasen
c200ec38f5
use workflow_call in bleeding-codeql-analysis.yml
2021-10-18 12:03:16 +02:00
Esben Sparre Andreasen
7e2b00e62c
QL: use workflow_call in bleeding-codeql-analysis.yml
2021-10-18 12:03:16 +02:00
Tony Torralba
d1d2d61d7e
Add more sinks
...
Also, fix things after rebase
2021-10-18 12:00:07 +02:00
Ian Lynagh
54d2028920
Update java/ql/src/Likely Bugs/Resource Leaks/CloseType.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-10-18 10:12:01 +01:00
Tony Torralba
28ae4c211f
Update java/ql/src/Security/CWE/CWE-940/AndroidIntentRedirection.qhelp
...
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com >
2021-10-18 11:10:23 +02:00
Tony Torralba
e7983fb269
Add test and check for another edge case
2021-10-18 11:10:23 +02:00
Tony Torralba
bc6c13be69
Refactor to actually build the full flows from src to sink
...
Add more tests for edge cases
2021-10-18 11:10:22 +02:00
Tony Torralba
4dd9e7d6a0
Remove unnecessary import
...
Add comment
2021-10-18 11:10:22 +02:00
Tony Torralba
14963103aa
Add full path reconstruction from RemoteFlowSource to sink
2021-10-18 11:10:21 +02:00
Tony Torralba
445da1e71e
Move files to new location
2021-10-18 11:10:21 +02:00
Tony Torralba
8263524d70
Add tests for Intent and ComponentName summaries
2021-10-18 11:10:17 +02:00
Tony Torralba
2ab7a55545
Improve intermediate flow to add more potential sources
2021-10-18 11:09:52 +02:00
Tony Torralba
28369d1822
Apply suggestions from code review
...
Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com >
2021-10-18 11:09:31 +02:00
Tony Torralba
aa2cdb7a53
Add intermediate dataflow
...
Make sure that source intents are obtained from another intent's extras
2021-10-18 11:09:30 +02:00
Tony Torralba
f90220436f
Move sinks to security library
2021-10-18 11:09:28 +02:00
Tony Torralba
9a537f9c23
Add guard sanitizer for component name checks
2021-10-18 11:08:14 +02:00
Tony Torralba
21b70a009e
Use CSV models
2021-10-18 11:07:58 +02:00
Tony Torralba
9604f88ae0
Undo autoformatting
2021-10-18 11:07:28 +02:00
Tony Torralba
d7973592da
Update java/ql/src/semmle/code/java/security/AndroidIntentRedirection.qll
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-10-18 11:07:03 +02:00
Tony Torralba
5f0ce4d232
Add suggestions from code review
2021-10-18 11:07:01 +02:00
Tony Torralba
a6f2ebe820
Fix stubs
2021-10-18 11:06:43 +02:00
Tony Torralba
9eb4cda1af
Fix qhelp and formatting
2021-10-18 11:06:08 +02:00
Tony Torralba
031fa2199c
Fix stubs and tests
2021-10-18 11:06:06 +02:00
Tony Torralba
529a3d9d61
Added change note
2021-10-18 11:04:35 +02:00
Tony Torralba
5dfb0d4d64
Fix Android tests affected by changes in stubs
2021-10-18 11:04:33 +02:00
Tony Torralba
ef30ca211a
Fix stubs
2021-10-18 11:03:13 +02:00
Tony Torralba
7b949e8db2
QLDoc
2021-10-18 11:02:35 +02:00
Tony Torralba
fd8a128693
Renamed to AndroidIntentRedirection
...
Added qhelp
2021-10-18 11:02:34 +02:00
Tony Torralba
09d96e65b8
Added QLDoc
2021-10-18 11:02:32 +02:00
Tony Torralba
8c400d9b1b
Added tests and stubs
2021-10-18 11:02:10 +02:00
Tony Torralba
d006db9d20
First version of the query
2021-10-18 10:58:09 +02:00
Mathias Vorreiter Pedersen
ea67ca22a9
C++: Undo changes to shared dataflow files.
2021-10-18 09:00:00 +01:00
Tony Torralba
5216bbab93
Merge pull request #6835 from atorralba/atorralba/fix-local-and-remote-flow-tests
...
Java: Use InlineExpectationsTest for local and remote flow tests
2021-10-18 09:33:57 +02:00
Tony Torralba
9d50511ea4
Fix stubs
2021-10-18 09:27:53 +02:00
Tom Hvitved
47ae76fb7d
Merge pull request #6890 from hvitved/csharp/nullable-default-param
...
C#: Handle `Nullable<T>` default parameter values in assemblies
2021-10-18 08:55:02 +02:00
Tony Torralba
e3b46f25a5
Merge branch 'main' into atorralba/fix-local-and-remote-flow-tests
2021-10-18 08:52:37 +02:00
Tony Torralba
5deb996b33
Merge branch 'main' into atorralba/android_slice_models
2021-10-18 08:41:48 +02:00
Marcono1234
43b7bc52ca
Java: Add MemberRefExpr.getReceiverType()
2021-10-18 00:26:19 +02:00
Mathias Vorreiter Pedersen
af6a21f5d9
Merge pull request #6893 from geoffw0/nullterm
...
C++: Disable the two null termination queries enabled by 6794.
2021-10-17 22:14:10 +01:00
Erik Krogh Kristensen
509e77bbdb
add nonTotalGetParent to the list of empty consistency queries
2021-10-17 15:09:30 +02:00
Erik Krogh Kristensen
ef6ea195db
QL: add nonTotalGetParent to the list of empty consistency queries
2021-10-17 15:09:30 +02:00
Erik Krogh Kristensen
9a73c36389
add support for libraryPathDependencies in qlpacks
2021-10-17 14:51:00 +02:00
Erik Krogh Kristensen
9e4e42847b
QL: add support for libraryPathDependencies in qlpacks
2021-10-17 14:51:00 +02:00
Erik Krogh Kristensen
ade206184c
fix broken import in unused file
2021-10-17 14:44:41 +02:00
Erik Krogh Kristensen
b317d73c83
QL: fix broken import in unused file
2021-10-17 14:44:41 +02:00
Surya Prakash Sahu
2871bdb206
Python SignatureOverriddenMethod: Rmv duplicate condition
2021-10-17 18:04:20 +05:30
Erik Krogh Kristensen
09f60f20fc
fix code-scanning alert
2021-10-17 14:00:26 +02:00
Erik Krogh Kristensen
89979890ad
QL: fix code-scanning alert
2021-10-17 14:00:26 +02:00
Erik Krogh Kristensen
18eede5597
fix some inconsistencies related to primitive types
2021-10-17 13:38:40 +02:00
Erik Krogh Kristensen
48d4fcd064
QL: fix some inconsistencies related to primitive types
2021-10-17 13:38:40 +02:00
Erik Krogh Kristensen
9127fa533a
fix predicate resolution
2021-10-17 12:53:49 +02:00
Erik Krogh Kristensen
4db6702caa
QL: fix predicate resolution
2021-10-17 12:53:49 +02:00
Erik Krogh Kristensen
dc354f8fbf
add noResolvePredicateExpr to the list of empty consistency predicates
2021-10-17 11:59:51 +02:00
Erik Krogh Kristensen
9681119f68
QL: add noResolvePredicateExpr to the list of empty consistency predicates
2021-10-17 11:59:51 +02:00
Erik Krogh Kristensen
055937eefb
NewTypeBranches are Predicates
2021-10-17 11:58:00 +02:00
Erik Krogh Kristensen
6cec64466f
QL: NewTypeBranches are Predicates
2021-10-17 11:58:00 +02:00
Erik Krogh Kristensen
2af3fb5cca
add test for predicateExpr
2021-10-17 11:57:07 +02:00
Erik Krogh Kristensen
8ad5b34c07
QL: add test for predicateExpr
2021-10-17 11:57:07 +02:00
Erik Krogh Kristensen
9d9663d842
and consistency query that will highlight new consistency errors
2021-10-16 23:17:42 +02:00
Erik Krogh Kristensen
84d2cb84c1
QL: and consistency query that will highlight new consistency errors
2021-10-16 23:17:42 +02:00
Erik Krogh Kristensen
74b1c19a20
only resolve imports to qll files, and not e.g. dbschemes
2021-10-16 23:09:48 +02:00
Erik Krogh Kristensen
1b9793d928
QL: only resolve imports to qll files, and not e.g. dbschemes
2021-10-16 23:09:48 +02:00
Erik Krogh Kristensen
b31ea30e85
better support for getType on super
2021-10-16 22:22:52 +02:00
Erik Krogh Kristensen
a65289253e
QL: better support for getType on super
2021-10-16 22:22:52 +02:00
Erik Krogh Kristensen
f99ce113cb
resolve super-expressions when the super-type is explicitly mentioned
2021-10-16 21:55:36 +02:00
Erik Krogh Kristensen
928b91d975
QL: resolve super-expressions when the super-type is explicitly mentioned
2021-10-16 21:55:36 +02:00
Erik Krogh Kristensen
c43ff2f9d0
add test for super-types
2021-10-16 21:54:23 +02:00
Erik Krogh Kristensen
4c32b7e480
QL: add test for super-types
2021-10-16 21:54:23 +02:00
Erik Krogh Kristensen
c1b011d47c
better type resolution of add expressions
2021-10-16 21:35:02 +02:00
Erik Krogh Kristensen
34d4e55459
QL: better type resolution of add expressions
2021-10-16 21:35:02 +02:00
Erik Krogh Kristensen
2a5d567041
add test for type resolution
2021-10-16 21:32:25 +02:00
Erik Krogh Kristensen
e528c6ff90
QL: add test for type resolution
2021-10-16 21:32:25 +02:00
jorgectf
271e2e4c49
Update .expected
2021-10-16 13:12:33 +02:00
jorgectf
14c50e993b
Add django GET.get RFS
2021-10-16 13:10:48 +02:00
jorgectf
45146bc798
Merge branch 'main' into jorgectf/python/headerInjection
2021-10-16 12:46:57 +02:00
jorgectf
bf76d9cd8b
Fix django test
2021-10-16 10:45:25 +02:00
jorgectf
2db1ffef1e
Merge remote-tracking branch 'origin/main' into jorgectf/python/headerInjection
2021-10-16 10:40:52 +02:00
Edoardo Pirovano
0e01b91c7e
Language reference: Fix when trailing commas are allowed
2021-10-16 08:57:26 +01:00
Arthur Baars
e26cf7c354
Merge pull request #369 from github/rc/3.3
...
Merge 3.3 into main
2021-10-15 23:04:12 +02:00
Erik Krogh Kristensen
6004ecc3a4
Merge pull request #125 from github/erik-krogh/fix-my-own-mistake
...
fixing the callgraph
2021-10-15 22:15:29 +02:00
Erik Krogh Kristensen
efff86e47b
QL: Merge pull request #125 from github/erik-krogh/fix-my-own-mistake
...
fixing the callgraph
2021-10-15 22:15:29 +02:00
Erik Krogh Kristensen
f19a229e6f
find dbscheme files that are contained within a subfolder
2021-10-15 21:37:23 +02:00
Erik Krogh Kristensen
865e4f0441
QL: find dbscheme files that are contained within a subfolder
2021-10-15 21:37:23 +02:00
Erik Krogh Kristensen
3b1c04b71c
correctly resolve super calls in char preds
2021-10-15 21:28:19 +02:00
Erik Krogh Kristensen
e060708367
QL: correctly resolve super calls in char preds
2021-10-15 21:28:19 +02:00
Erik Krogh Kristensen
145efa4a1a
improve resolution of buildin predicates (and getAQlClass())
2021-10-15 21:23:18 +02:00
Erik Krogh Kristensen
3252c04c38
QL: improve resolution of buildin predicates (and getAQlClass())
2021-10-15 21:23:18 +02:00
Arthur Baars
9b88bbdd04
Merge pull request #367 from github/shati-patel/queriesxml
...
Add a queries.xml file (for CWE coverage docs)
2021-10-15 20:50:21 +02:00
shati-patel
c37cf71766
Add a queries.xml file (for CWE coverage) docs
2021-10-15 20:33:16 +02:00
Erik Krogh Kristensen
f8138c92c5
fix getEnclosingModule, which broke the callgraph
2021-10-15 19:48:47 +02:00
Erik Krogh Kristensen
1239b1aee1
QL: fix getEnclosingModule, which broke the callgraph
2021-10-15 19:48:47 +02:00
Erik Krogh Kristensen
7ce2750c8a
add missing getChild() relations
2021-10-15 19:48:47 +02:00
Erik Krogh Kristensen
c7aa89b1d8
QL: add missing getChild() relations
2021-10-15 19:48:47 +02:00
Erik Krogh Kristensen
535904e545
add failing callgraph test
2021-10-15 19:48:45 +02:00
Erik Krogh Kristensen
b40e30790a
QL: add failing callgraph test
2021-10-15 19:48:45 +02:00
Erik Krogh Kristensen
d0aa219652
add an consistency test for the totality of getParent()
2021-10-15 19:46:51 +02:00
Erik Krogh Kristensen
8391580301
QL: add an consistency test for the totality of getParent()
2021-10-15 19:46:51 +02:00
Ian Lynagh
e485a16993
Java: Don't use dbscheme tables in CloseType.qll
2021-10-15 18:39:42 +01:00
Taus
d950b59a4d
Merge pull request #124 from github/erik-krogh/fix-step-performance
...
fix performance of the transitive step query
2021-10-15 19:11:31 +02:00
Taus
9a02a223e3
QL: Merge pull request #124 from github/erik-krogh/fix-step-performance
...
fix performance of the transitive step query
2021-10-15 19:11:31 +02:00
Calum Grant
5861fcf443
Address review comment
2021-10-15 18:07:18 +01:00
Calum Grant
42c5af3cdf
Update docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-10-15 18:03:12 +01:00
Calum Grant
87adcc2e6b
Update docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-10-15 18:03:04 +01:00
Calum Grant
5265ed6b64
Update docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-10-15 18:02:54 +01:00
Calum Grant
bf5cc212e1
Update docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-10-15 18:02:40 +01:00
Calum Grant
48077a5757
Update docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-10-15 18:02:32 +01:00
Calum Grant
86c5b5d944
Update docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-10-15 18:02:20 +01:00
Calum Grant
579753b0fc
Update docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-10-15 18:02:09 +01:00
Calum Grant
2d61519ec6
Update docs/codeql/codeql-language-guides/basic-query-for-ruby-code.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-10-15 18:01:56 +01:00
Mathias Vorreiter Pedersen
299500fdaa
Merge pull request #109 from github/missing-nomagic
...
QL: Query for finding missing `nomagic` on cand predicates
2021-10-15 17:59:59 +01:00
Mathias Vorreiter Pedersen
24334e4a3a
QL: Merge pull request #109 from github/missing-nomagic
...
QL: Query for finding missing `nomagic` on cand predicates
2021-10-15 17:59:59 +01:00
Geoffrey White
6b0360acca
Revert "C++: Disable the two null termination queries enabled by 6794."
...
This reverts commit f38dade578 .
2021-10-15 17:54:26 +01:00
Geoffrey White
5cbf632573
C++: Inline and simplify 'Assignment to another stack variable' case in NullTermination.qll.
2021-10-15 17:54:26 +01:00
Erik Krogh Kristensen
62355f3f0e
fix performance of the transitive step query
2021-10-15 18:47:54 +02:00
Erik Krogh Kristensen
0bfedc74fa
QL: fix performance of the transitive step query
2021-10-15 18:47:54 +02:00
Geoffrey White
f38dade578
C++: Disable the two null termination queries enabled by 6794.
2021-10-15 17:39:12 +01:00
Mathias Vorreiter Pedersen
dbc3b49777
Merge branch 'main' into missing-nomagic
2021-10-15 17:26:09 +01:00
Mathias Vorreiter Pedersen
188a6b19f0
QL: Merge branch 'main' into missing-nomagic
2021-10-15 17:26:09 +01:00
Nick Rolfe
8469a535e3
Merge pull request #366 from github/merge-3.3-main-1
...
Merge 3.3 into main
2021-10-15 17:18:39 +01:00
Mathias Vorreiter Pedersen
df3d5aefc7
Merge pull request #119 from github/query-depends-on-tostring
...
Query: Query logic depends on `toString`
2021-10-15 16:15:54 +01:00
Mathias Vorreiter Pedersen
02c26037cb
QL: Merge pull request #119 from github/query-depends-on-tostring
...
Query: Query logic depends on `toString`
2021-10-15 16:15:54 +01:00
Mathias Vorreiter Pedersen
f5bb1d0124
QL: Respond to PR reviews.
2021-10-15 16:02:23 +01:00
Mathias Vorreiter Pedersen
4d5901a421
QL: QL: Respond to PR reviews.
2021-10-15 16:02:23 +01:00
Arthur Baars
804aef9b4a
Merge remote-tracking branch 'codeql/main' into 'main'
...
Conflicts:
config/identical-files.json
2021-10-15 16:37:59 +02:00
Arthur Baars
0e7b1f516c
Merge remote-tracking branch 'origin/rc/3.3' into 'main'
2021-10-15 16:36:09 +02:00
Arthur Baars
3cb9a4921d
Merge pull request #363 from github/codeql-merge
...
Merge `github/codeql` into rc/3.3
2021-10-15 16:17:20 +02:00
Arthur Baars
f296cc7860
Merge pull request #362 from github/merge-3.3-main
...
Merge 3.3 into main
2021-10-15 16:01:56 +02:00
Taus
eb787ae321
Merge pull request #95 from github/tausbn/add-override-test
...
Add test for `override`
2021-10-15 16:00:15 +02:00
Taus
d6dd752764
QL: Merge pull request #95 from github/tausbn/add-override-test
...
Add test for `override`
2021-10-15 16:00:15 +02:00
Erik Krogh Kristensen
fe891746bf
C++: fix implicit this
2021-10-15 14:59:48 +01:00
Arthur Baars
568872a2f5
Add ruby to CODEOWNERS
2021-10-15 15:38:16 +02:00
Arthur Baars
103d9420d2
Update CodeSpaces configuration
2021-10-15 15:38:16 +02:00
Arthur Baars
5cd9b9cfc5
Remove github/codeql submodule
2021-10-15 15:38:16 +02:00
Arthur Baars
5a16f1e093
Merge identical-files.json
2021-10-15 15:38:16 +02:00
Geoffrey White
a0e501c3a9
Sync identical files.
2021-10-15 14:34:02 +01:00
Arthur Baars
56953f5d5d
Merge commit 'codeql-ruby/rc/3.3' into codeql/rc/3.3
2021-10-15 15:33:47 +02:00
Erik Krogh Kristensen
caeeebf572
add explicit this qualifier on all of java
2021-10-15 15:27:37 +02:00
Arthur Baars
ceecb23118
Merge remote-tracking branch 'rc/3.3' into 'main'
2021-10-15 15:21:48 +02:00
Mathias Vorreiter Pedersen
ed17bd9106
Merge pull request #123 from github/tausbn/add-instanceof-super-resolution
...
Support `super` with `instanceof`
2021-10-15 14:15:37 +01:00
Mathias Vorreiter Pedersen
5dbeaa17d6
QL: Merge pull request #123 from github/tausbn/add-instanceof-super-resolution
...
Support `super` with `instanceof`
2021-10-15 14:15:37 +01:00
Arthur Baars
2444f6e7eb
Merge pull request #361 from github/prepare-merge
...
Prepare merge into github/codeql
2021-10-15 15:07:35 +02:00
Taus
5b261d88bb
Support super with instanceof
2021-10-15 12:27:24 +00:00
Taus
1375e1d9fc
QL: Support super with instanceof
2021-10-15 12:27:24 +00:00
Tom Hvitved
888a1b38aa
C#: Handle Nullable<T> default parameter values in assemblies
2021-10-15 14:23:18 +02:00
Arthur Baars
472fe0064f
Update dependabot config
2021-10-15 14:20:07 +02:00
Arthur Baars
a9ba13c557
Drop LICENSE and CODE_OF_CONDUCT.md
2021-10-15 14:20:07 +02:00
Arthur Baars
21373c43eb
Add change note
2021-10-15 14:20:07 +02:00
Arthur Baars
c66bf38f8d
Update Ruby workflows
2021-10-15 14:20:07 +02:00
Anders Schack-Mulligen
684600cc54
Merge pull request #104 from github/bidirectional-import
...
Query for finding missing or unwanted bidirectional imports of abstract classes
2021-10-15 14:02:58 +02:00
Anders Schack-Mulligen
370d75bedc
QL: Merge pull request #104 from github/bidirectional-import
...
Query for finding missing or unwanted bidirectional imports of abstract classes
2021-10-15 14:02:58 +02:00
Taus
8ceeb71c8e
Merge pull request #117 from github/tausbn/update-extractor-generator
...
Upgrade the extractor generator
2021-10-15 13:59:32 +02:00
Taus
7745a13efb
QL: Merge pull request #117 from github/tausbn/update-extractor-generator
...
Upgrade the extractor generator
2021-10-15 13:59:32 +02:00
Mathias Vorreiter Pedersen
1469766994
QL: Reduce precision to 'medium'.
2021-10-15 12:57:32 +01:00
Mathias Vorreiter Pedersen
21caef3d7d
QL: QL: Reduce precision to 'medium'.
2021-10-15 12:57:32 +01:00
Mathias Vorreiter Pedersen
67b65b691e
Merge pull request #122 from github/aschackmull/library-annot
...
New query: Don't use library annotation.
2021-10-15 12:56:22 +01:00
Mathias Vorreiter Pedersen
ed15ee8dfb
QL: Merge pull request #122 from github/aschackmull/library-annot
...
New query: Don't use library annotation.
2021-10-15 12:56:22 +01:00
Mathias Vorreiter Pedersen
30717310e7
Remove the dataflow library.
2021-10-15 12:40:49 +01:00
Mathias Vorreiter Pedersen
1d331fc678
QL: Remove the dataflow library.
2021-10-15 12:40:49 +01:00
Anders Schack-Mulligen
b0bbbc54d0
New query: Don't use library annotation.
2021-10-15 13:35:25 +02:00
Anders Schack-Mulligen
510f8253e5
QL: New query: Don't use library annotation.
2021-10-15 13:35:25 +02:00
Erik Krogh Kristensen
1a79b13bdc
fix performance
2021-10-15 13:32:39 +02:00
Erik Krogh Kristensen
8aa354c4c0
QL: fix performance
2021-10-15 13:32:39 +02:00
Taus
10aeadb889
Fix bad merge
2021-10-15 11:12:52 +00:00
Taus
24959a52d0
QL: Fix bad merge
2021-10-15 11:12:52 +00:00
Taus
e185382c41
Update bleeding-codeql-analysis.yml
2021-10-15 11:06:53 +00:00
Taus
6f4370a684
QL: Update bleeding-codeql-analysis.yml
2021-10-15 11:06:53 +00:00
Taus
1fb8a175f9
Merge branch 'main' into tausbn/add-override-test
2021-10-15 13:03:17 +02:00
Taus
53cbde0c44
QL: Merge branch 'main' into tausbn/add-override-test
2021-10-15 13:03:17 +02:00
Taus
ccaef199bf
Ignore overridden predicates in consistency check
2021-10-15 10:58:38 +00:00
Taus
9c82f72720
QL: Ignore overridden predicates in consistency check
2021-10-15 10:58:38 +00:00
Mathias Vorreiter Pedersen
c9f80b1052
QL: Add query for using toString in query logic.
2021-10-15 11:57:55 +01:00
Mathias Vorreiter Pedersen
d90de13bdb
QL: QL: Add query for using toString in query logic.
2021-10-15 11:57:55 +01:00
Mathias Vorreiter Pedersen
5c70c6a19b
QL: Add dataflow library.
2021-10-15 11:57:30 +01:00
Mathias Vorreiter Pedersen
4fe43155c0
QL: QL: Add dataflow library.
2021-10-15 11:57:30 +01:00
Taus
44fff659bd
Fix dataset_measure.yml, hopefully
...
Also I forgot to add `TreeSitter.qll` to the path for the build, whoops.
2021-10-15 10:53:33 +00:00
Taus
85e5b689a3
QL: Fix dataset_measure.yml, hopefully
...
Also I forgot to add `TreeSitter.qll` to the path for the build, whoops.
2021-10-15 10:53:33 +00:00
Taus
2a0c29156f
Update build.yml to supply generator args
2021-10-15 10:43:51 +00:00
Taus
e5dab0185d
QL: Update build.yml to supply generator args
2021-10-15 10:43:51 +00:00
Taus
bd5243884a
Merge pull request #116 from github/erik-krogh/qlpack-test
...
add test for qlpacks
2021-10-15 12:33:34 +02:00
Taus
4238a5be2f
QL: Merge pull request #116 from github/erik-krogh/qlpack-test
...
add test for qlpacks
2021-10-15 12:33:34 +02:00
Taus
89d2f93a16
Merge branch 'main' into tausbn/update-extractor-generator
2021-10-15 12:28:01 +02:00
Taus
b75e19a446
QL: Merge branch 'main' into tausbn/update-extractor-generator
2021-10-15 12:28:01 +02:00
Anders Schack-Mulligen
6c70f5299d
Remove some FPs.
2021-10-15 12:05:02 +02:00
Anders Schack-Mulligen
3fc0bed9b5
QL: Remove some FPs.
2021-10-15 12:05:02 +02:00
Arthur Baars
393800e4b9
Move create-extractor-pack Action
2021-10-15 11:47:57 +02:00
Arthur Baars
c815178f31
Remove CodeSpaces configuration
2021-10-15 11:47:56 +02:00
Arthur Baars
976daddd36
Move files to ruby subfolder
2021-10-15 11:47:28 +02:00
Taus
5ef7b9797e
Also update qltest.cmd
2021-10-15 09:34:14 +00:00
Taus
514f8f3344
QL: Also update qltest.cmd
2021-10-15 09:34:14 +00:00
Taus
310ea6b69c
Merge pull request #112 from github/tausbn/import-language-first
...
Query: Noninitial imports of the standard library
2021-10-15 11:30:02 +02:00
Taus
53e362c994
QL: Merge pull request #112 from github/tausbn/import-language-first
...
Query: Noninitial imports of the standard library
2021-10-15 11:30:02 +02:00
Erik Krogh Kristensen
741e4a7a38
add test for qlpacks, and get them to work
2021-10-15 11:24:18 +02:00
Erik Krogh Kristensen
0954584743
QL: add test for qlpacks, and get them to work
2021-10-15 11:24:18 +02:00
Taus
7f80514144
Autoformat
2021-10-15 09:21:24 +00:00
Taus
8020040b4f
QL: Autoformat
2021-10-15 09:21:24 +00:00
Taus
816bfbe4ea
Upgrade the extractor generator
...
For now, the grammar still includes dbscheme and YAML, but with this
change we should be able to separate these out into their own grammars.
2021-10-15 09:16:34 +00:00
Taus
9f4c829b3e
QL: Upgrade the extractor generator
...
For now, the grammar still includes dbscheme and YAML, but with this
change we should be able to separate these out into their own grammars.
2021-10-15 09:16:34 +00:00
Taus
b2e4276bc8
Merge pull request #6886 from aschackmull/java-python/perffix-transitive-step-x3
...
Java/Python: Fix some potential performance problems due to transitive deltas.
2021-10-15 11:06:35 +02:00
Erik Krogh Kristensen
e3d42a1fba
remove leftover test predicate
2021-10-15 10:58:44 +02:00
Erik Krogh Kristensen
6fe7579fc3
QL: remove leftover test predicate
2021-10-15 10:58:44 +02:00
Geoffrey White
ee7ac53bf6
Merge pull request #107 from github/missing-qldoc
...
Add ql/missing-qldoc query.
2021-10-15 09:41:45 +01:00
Geoffrey White
2f77b921a0
QL: Merge pull request #107 from github/missing-qldoc
...
Add ql/missing-qldoc query.
2021-10-15 09:41:45 +01:00
Erik Krogh Kristensen
e6b07070f6
Merge pull request #102 from github/esbena/simple-codeql-action
...
make another codeql-action workflow that uses a published pack
2021-10-15 10:32:19 +02:00
Erik Krogh Kristensen
e862dfd3dc
QL: Merge pull request #102 from github/esbena/simple-codeql-action
...
make another codeql-action workflow that uses a published pack
2021-10-15 10:32:19 +02:00
Taus
fed640b21f
Merge pull request #114 from github/erik-krogh/consistency
...
fix the signature of regexpCapture and regexpFind
2021-10-15 10:12:19 +02:00
Taus
2352cf7a26
QL: Merge pull request #114 from github/erik-krogh/consistency
...
fix the signature of regexpCapture and regexpFind
2021-10-15 10:12:19 +02:00
Mathias Vorreiter Pedersen
e1871a2508
Merge pull request #86 from github/use-set-literal
...
New query: Use set literal
2021-10-15 08:55:30 +01:00
Mathias Vorreiter Pedersen
8e6bc11197
QL: Merge pull request #86 from github/use-set-literal
...
New query: Use set literal
2021-10-15 08:55:30 +01:00
Tom Hvitved
86b1305e35
Merge pull request #6883 from hvitved/csharp/inline-expectations
...
C#: Adopt inline test expectations framework
2021-10-15 09:33:22 +02:00
Erik Krogh Kristensen
541dcb365f
hook up consistency query
2021-10-15 09:31:54 +02:00
Erik Krogh Kristensen
ddc0ade28c
QL: hook up consistency query
2021-10-15 09:31:54 +02:00
Erik Krogh Kristensen
29ebe7b13d
add test
2021-10-15 09:31:54 +02:00
Erik Krogh Kristensen
f071da499b
QL: add test
2021-10-15 09:31:54 +02:00
Erik Krogh Kristensen
1641d0fa93
update expected output
2021-10-15 09:31:54 +02:00
Erik Krogh Kristensen
6cd11d2e13
QL: update expected output
2021-10-15 09:31:54 +02:00
Erik Krogh Kristensen
f19dd78d40
fix getArity on PredicateOrBuiltin
2021-10-15 09:31:53 +02:00
Erik Krogh Kristensen
74a7945995
QL: fix getArity on PredicateOrBuiltin
2021-10-15 09:31:53 +02:00
Erik Krogh Kristensen
c31bd7a1e8
fix the signature of regexpCapture and regexpFind
2021-10-15 09:31:31 +02:00
Erik Krogh Kristensen
153f8fec0e
QL: fix the signature of regexpCapture and regexpFind
2021-10-15 09:31:31 +02:00
Mathias Vorreiter Pedersen
50e80dc8b7
Merge pull request #113 from github/erik-krogh/fix-implcit-this
...
fix implicit this
2021-10-15 08:28:19 +01:00
Mathias Vorreiter Pedersen
f29457f4ca
QL: Merge pull request #113 from github/erik-krogh/fix-implcit-this
...
fix implicit this
2021-10-15 08:28:19 +01:00
Anders Schack-Mulligen
4de1deefc4
Merge pull request #6889 from tausbn/java-fix-import-order
...
Java: Fix import order in `SignAnalysisSpecific`
2021-10-15 09:17:50 +02:00
Anders Schack-Mulligen
0b82289950
Merge pull request #6828 from zbazztian/adjust-jsp-locations
...
Adjust locations of results in JSP files
2021-10-15 08:28:11 +02:00
Erik Krogh Kristensen
016ff2af63
fix implicit this
2021-10-14 22:37:17 +02:00
Erik Krogh Kristensen
f9d8ae588c
QL: fix implicit this
2021-10-14 22:37:17 +02:00
hubwriter
4f247bab4e
Add Ruby to language table
2021-10-14 17:13:42 +01:00
Taus
71f69997e2
Autoformat
2021-10-14 16:06:19 +00:00
Taus
632d42fe68
QL: Autoformat
2021-10-14 16:06:19 +00:00
Taus
a9c5fd2cc0
Java: Fix import order in SignAnalysisSpecific
2021-10-14 15:51:56 +00:00
Taus
c6a52ed2ea
Query: Noninitial imports of the standard library
...
Finds a single result in
```
semmle.code.java.dataflow.internal.rangeanalysis.SignAnalysisSpecific.qll
```
which starts with
```ql
module Private {
import semmle.code.java.dataflow.RangeUtils as RU
private import semmle.code.java.dataflow.SSA as Ssa
private import semmle.code.java.controlflow.Guards as G
private import java as J
private import Sign
...
```
2021-10-14 15:44:23 +00:00
Taus
37e9024343
QL: Query: Noninitial imports of the standard library
...
Finds a single result in
```
semmle.code.java.dataflow.internal.rangeanalysis.SignAnalysisSpecific.qll
```
which starts with
```ql
module Private {
import semmle.code.java.dataflow.RangeUtils as RU
private import semmle.code.java.dataflow.SSA as Ssa
private import semmle.code.java.controlflow.Guards as G
private import java as J
private import Sign
...
```
2021-10-14 15:44:23 +00:00
Geoffrey White
8f30b8b586
Autoformat.
2021-10-14 16:00:23 +01:00
Anders Schack-Mulligen
eb0a88d39c
Merge pull request #6885 from aschackmull/java/perffix-transitve-step
...
Java: Fix performance problem due to transitive step.
2021-10-14 16:51:51 +02:00
hubwriter
75066813ee
Add more Ruby refs as per CD plan
2021-10-14 15:51:28 +01:00
Mathias Vorreiter Pedersen
4016a8e458
QL: Add query for finding missing nomagic on candidate predicates.
2021-10-14 15:46:22 +01:00
Mathias Vorreiter Pedersen
187c24e260
QL: QL: Add query for finding missing nomagic on candidate predicates.
2021-10-14 15:46:22 +01:00
Geoffrey White
0a3705b7af
Add ql/missing-qldoc query.
2021-10-14 15:45:03 +01:00
Geoffrey White
ecf27ff24b
QL: Add ql/missing-qldoc query.
2021-10-14 15:45:03 +01:00
Anders Schack-Mulligen
f6a517c998
Merge pull request #6882 from MathiasVP/fix-unnecessary-exists
...
C++/Python: Remove unnecessary `exists`
2021-10-14 16:44:05 +02:00
Mathias Vorreiter Pedersen
3e2fb5a64e
Merge pull request #105 from github/aschackmull/transitive-step
...
New performance query: Transitive step in recursion.
2021-10-14 15:28:33 +01:00
Mathias Vorreiter Pedersen
9330fa0f69
QL: Merge pull request #105 from github/aschackmull/transitive-step
...
New performance query: Transitive step in recursion.
2021-10-14 15:28:33 +01:00
Anders Schack-Mulligen
310eec07c1
Java/Python: Fix some potential performance problems due to transitive deltas.
2021-10-14 16:10:00 +02:00
Joe Farebrother
9b786c27c0
Fix isAbstract
2021-10-14 15:03:19 +01:00
Joe Farebrother
be36de9b0a
QL: Fix isAbstract
2021-10-14 15:03:19 +01:00
Joe Farebrother
ec6a8b933c
Query for finding missing or unwanted bidirectional imports of abstract classes
2021-10-14 15:02:08 +01:00
Joe Farebrother
1013cb4ccb
QL: Query for finding missing or unwanted bidirectional imports of abstract classes
2021-10-14 15:02:08 +01:00
Anders Schack-Mulligen
cb5f2559ea
Java: Fix performance problem due to transitive step.
2021-10-14 15:54:54 +02:00
Anders Schack-Mulligen
ec292dbffd
New performance query: Transitive step in recursion.
2021-10-14 15:42:40 +02:00
Anders Schack-Mulligen
dfa0e77e39
QL: New performance query: Transitive step in recursion.
2021-10-14 15:42:40 +02:00
Geoffrey White
f08d2ee759
Merge branch 'main' into setliterals
2021-10-14 14:39:39 +01:00
Esben Sparre Andreasen
ab11bce776
document usage
2021-10-14 15:34:54 +02:00
Esben Sparre Andreasen
72d1473581
QL: document usage
2021-10-14 15:34:54 +02:00
Geoffrey White
76880e8f93
Autoformat and fix test.
2021-10-14 14:31:42 +01:00
Geoffrey White
e510593aa0
QL: Autoformat and fix test.
2021-10-14 14:31:42 +01:00
Esben Sparre Andreasen
d23de3dcd8
make another codeql-action workflow that uses a published pack
2021-10-14 15:29:06 +02:00
Esben Sparre Andreasen
b611b5100b
QL: make another codeql-action workflow that uses a published pack
2021-10-14 15:29:06 +02:00
Geoffrey White
9d63efe495
Python: Set literals.
2021-10-14 14:22:44 +01:00
Geoffrey White
b9cce57db4
JS: Fix mistake.
2021-10-14 14:22:43 +01:00
Geoffrey White
882adc8e50
JS: Set literals.
2021-10-14 14:22:42 +01:00
Geoffrey White
a82c76d2f9
Java: Set literals.
2021-10-14 14:22:40 +01:00
Geoffrey White
3983587682
C#: Set literals.
2021-10-14 14:22:39 +01:00
Tom Hvitved
083214f85a
C#: Use inline test expectations for FieldFlow.ql
2021-10-14 15:22:21 +02:00
Tom Hvitved
ed6a182cd1
C#: Adopt inline test expectations framework
2021-10-14 15:22:21 +02:00
Geoffrey White
6af28e37ae
We can use PredicateOrBuiltin now.
2021-10-14 13:59:47 +01:00
Geoffrey White
6d313cfb6b
QL: We can use PredicateOrBuiltin now.
2021-10-14 13:59:47 +01:00
Geoffrey White
9b52ad2d3d
Work around import of internal file.
2021-10-14 13:59:40 +01:00
Geoffrey White
fe8b466ff0
QL: Work around import of internal file.
2021-10-14 13:59:40 +01:00
Geoffrey White
a665e94805
Merge branch 'main' into use-set-literal
2021-10-14 13:55:40 +01:00
Geoffrey White
df972eeb05
QL: Merge branch 'main' into use-set-literal
2021-10-14 13:55:40 +01:00
Anders Schack-Mulligen
8b6baa250c
Merge pull request #6878 from aschackmull/remove-singleton-setliteral
...
C++/C#/Java/JavaScript/Python: Remove singleton set literals.
2021-10-14 14:53:05 +02:00
Rasmus Wriedt Larsen
7cd5e681dd
Merge pull request #6693 from yoff/python/promote-regex-injection
...
Python: Promote `py/regex-injection`
2021-10-14 14:49:05 +02:00
Mathias Vorreiter Pedersen
47a85bbb1d
Merge pull request #6869 from MathiasVP/fix-prefix/suffix-equality
...
Java/JS/Python: Replace '.prefix'/'.suffix' with '.matches'
2021-10-14 13:47:03 +01:00
Mathias Vorreiter Pedersen
78caab4214
Merge pull request #81 from github/doc-style
...
Add some queries for qldoc style
2021-10-14 13:46:48 +01:00
Mathias Vorreiter Pedersen
1762394b9b
QL: Merge pull request #81 from github/doc-style
...
Add some queries for qldoc style
2021-10-14 13:46:48 +01:00
Rasmus Wriedt Larsen
a5ab0b9100
Merge pull request #6871 from tausbn/python-fix-uses-of-implicit-this
...
Python: Fix uses of "implicit `this`"
2021-10-14 14:38:13 +02:00
Mathias Vorreiter Pedersen
9a15feae29
Merge pull request #89 from github/esbena/proper-bundle
...
Attempt to use a proper query pack
2021-10-14 13:24:14 +01:00
Mathias Vorreiter Pedersen
4e73b9a30f
QL: Merge pull request #89 from github/esbena/proper-bundle
...
Attempt to use a proper query pack
2021-10-14 13:24:14 +01:00
Esben Sparre Andreasen
a64660aae1
build a query pack separately, with a compilation cache
2021-10-14 14:09:01 +02:00
Esben Sparre Andreasen
aeabe67812
QL: build a query pack separately, with a compilation cache
2021-10-14 14:09:01 +02:00
Tom Hvitved
3acd718876
Merge pull request #360 from github/bump-codeql
...
Bump `codeql` submodule
2021-10-14 14:00:57 +02:00
Tom Hvitved
b12561865a
Bump codeql submodule
2021-10-14 13:41:48 +02:00
Nick Rolfe
1920cd1c7e
Merge pull request #359 from github/explicit_this
...
Add explicit `this` qualifiers in generated code
2021-10-14 12:40:09 +01:00
Anders Schack-Mulligen
d7fd1e0718
Merge pull request #80 from github/aschackmull/calltarget-astnode
...
Refactor Call.getTarget to be an AstNode
2021-10-14 13:35:50 +02:00
Anders Schack-Mulligen
9a500eecb9
QL: Merge pull request #80 from github/aschackmull/calltarget-astnode
...
Refactor Call.getTarget to be an AstNode
2021-10-14 13:35:50 +02:00
Anders Schack-Mulligen
10d6803b05
Merge pull request #6880 from hvitved/csharp/explicit-this
...
C#: Add explicit `this` qualifiers
2021-10-14 13:31:04 +02:00
Anders Schack-Mulligen
c0f1d365ba
This is slightly faster without magic.
2021-10-14 13:12:26 +02:00
Anders Schack-Mulligen
dfa6f285e5
QL: This is slightly faster without magic.
2021-10-14 13:12:26 +02:00
Anders Schack-Mulligen
cd3839f621
Fix semantic merge conflict
2021-10-14 13:12:11 +02:00
Anders Schack-Mulligen
63b844856d
QL: Fix semantic merge conflict
2021-10-14 13:12:11 +02:00
Joe Farebrother
b4a05804fa
Also allow deprecated headers
2021-10-14 12:09:19 +01:00
Joe Farebrother
97db13beb4
QL: Also allow deprecated headers
2021-10-14 12:09:19 +01:00
Joe Farebrother
0f71066aaa
Allow comments preceded by INTERNAL
2021-10-14 12:09:19 +01:00
Joe Farebrother
896eca684e
QL: Allow comments preceded by INTERNAL
2021-10-14 12:09:19 +01:00
Joe Farebrother
fd3c53da9b
Add query for class docs that don't start with an article.
...
Returns quite a few results, many of which seem to be TPs.
2021-10-14 12:09:18 +01:00
Joe Farebrother
f872ed13e3
QL: Add query for class docs that don't start with an article.
...
Returns quite a few results, many of which seem to be TPs.
2021-10-14 12:09:18 +01:00
Joe Farebrother
323ccc8cea
Add query to find non US spelling
2021-10-14 12:09:18 +01:00
Joe Farebrother
4cb4073dd7
QL: Add query to find non US spelling
2021-10-14 12:09:18 +01:00
Anders Schack-Mulligen
350620d44a
Fix bad magic.
2021-10-14 13:07:53 +02:00
Anders Schack-Mulligen
220f4b373c
QL: Fix bad magic.
2021-10-14 13:07:53 +02:00
Anders Schack-Mulligen
6b4dbc3fe5
Fix compile error.
2021-10-14 13:07:53 +02:00
Anders Schack-Mulligen
2c01b54a49
QL: Fix compile error.
2021-10-14 13:07:53 +02:00
Anders Schack-Mulligen
ff3aba0f5d
Adjust expected output.
2021-10-14 13:07:53 +02:00
Anders Schack-Mulligen
862706f709
QL: Adjust expected output.
2021-10-14 13:07:53 +02:00
Anders Schack-Mulligen
ffc25f8f89
Fix semantic merge conflict.
2021-10-14 13:06:41 +02:00
Anders Schack-Mulligen
744c3447c9
QL: Fix semantic merge conflict.
2021-10-14 13:06:41 +02:00
Anders Schack-Mulligen
41a0bf154f
Move some AstNodes to Ast.qll, fix compilation error.
2021-10-14 13:06:41 +02:00
Anders Schack-Mulligen
946968b37c
QL: Move some AstNodes to Ast.qll, fix compilation error.
2021-10-14 13:06:41 +02:00
Anders Schack-Mulligen
7955a8b6c8
Refactor
2021-10-14 13:06:41 +02:00
Anders Schack-Mulligen
69cf373f21
QL: Refactor
2021-10-14 13:06:41 +02:00
Mathias Vorreiter Pedersen
3d0917e6fc
Merge pull request #96 from github/erik-krogh/dont-use-getaqlclass
...
add query to detect uses of getAQlClass
2021-10-14 12:06:00 +01:00
Mathias Vorreiter Pedersen
09d727f343
QL: Merge pull request #96 from github/erik-krogh/dont-use-getaqlclass
...
add query to detect uses of getAQlClass
2021-10-14 12:06:00 +01:00
Mathias Vorreiter Pedersen
8049d3f738
Python: Remove unnecessary 'exists'.
2021-10-14 12:02:57 +01:00
Mathias Vorreiter Pedersen
69ed7c543f
C++: Remove unnecessary 'exists'.
2021-10-14 11:59:59 +01:00
Erik Krogh Kristensen
6af27c23ec
lowercase query id
2021-10-14 12:59:27 +02:00
Erik Krogh Kristensen
5fc1b8bb29
QL: lowercase query id
2021-10-14 12:59:27 +02:00
Erik Krogh Kristensen
949ead913f
add query to detect uses of getAQlClass
2021-10-14 12:59:27 +02:00
Erik Krogh Kristensen
e167554ad9
QL: add query to detect uses of getAQlClass
2021-10-14 12:59:27 +02:00
Nick Rolfe
ec91111848
Add explicit this qualifiers in generated code
2021-10-14 11:53:27 +01:00
Mathias Vorreiter Pedersen
486fc453e7
Merge pull request #99 from github/missing-noinline
...
Add query: Missing `noinline`
2021-10-14 11:37:16 +01:00
Mathias Vorreiter Pedersen
b46dfc076d
QL: Merge pull request #99 from github/missing-noinline
...
Add query: Missing `noinline`
2021-10-14 11:37:16 +01:00
Erik Krogh Kristensen
047aee313c
add pragma[noinline] to predicates where the qldoc mentions join-order
2021-10-14 12:34:25 +02:00
Mathias Vorreiter Pedersen
626ec4d209
QL: Accept test changes.
2021-10-14 11:28:40 +01:00
Mathias Vorreiter Pedersen
7bcc906d67
QL: QL: Accept test changes.
2021-10-14 11:28:40 +01:00
Mathias Vorreiter Pedersen
3e3ad8e5d4
Merge branch 'main' into missing-noinline
2021-10-14 11:08:05 +01:00
Mathias Vorreiter Pedersen
d4b9c36343
QL: Merge branch 'main' into missing-noinline
2021-10-14 11:08:05 +01:00
Mathias Vorreiter Pedersen
deffeff01c
Merge pull request #97 from github/fix-spurious-exists-mistakes
...
QL: Respond to PR reviews for #87
2021-10-14 11:03:36 +01:00
Mathias Vorreiter Pedersen
8e1494b91a
QL: Merge pull request #97 from github/fix-spurious-exists-mistakes
...
QL: Respond to PR reviews for #87
2021-10-14 11:03:36 +01:00
Tom Hvitved
dde054d5a7
Merge pull request #357 from github/erik-krogh/fix-implicit-this
...
Add explicit `this` qualifiers
2021-10-14 12:00:58 +02:00
Mathias Vorreiter Pedersen
2f7272d1ed
QL: Add a query that finds missing noinline or nomagic annotations.
2021-10-14 11:00:26 +01:00
Mathias Vorreiter Pedersen
f4d35f6afe
QL: QL: Add a query that finds missing noinline or nomagic annotations.
2021-10-14 11:00:26 +01:00
Mathias Vorreiter Pedersen
c900118731
QL: Model QL annotations.
2021-10-14 10:59:25 +01:00
Mathias Vorreiter Pedersen
c9bfd85c0d
QL: QL: Model QL annotations.
2021-10-14 10:59:25 +01:00
Joe Farebrother
9749f797c8
Merge pull request #70 from github/dont-mention-this
...
Query to find member predicates that don't depend on `this`
2021-10-14 10:49:49 +01:00
Joe Farebrother
ed87d77bc5
QL: Merge pull request #70 from github/dont-mention-this
...
Query to find member predicates that don't depend on `this`
2021-10-14 10:49:49 +01:00
Tom Hvitved
f5420333e2
Sync shared files
2021-10-14 11:49:02 +02:00
Mathias Vorreiter Pedersen
ed5960e015
QL: Respond to PR reviews.
2021-10-14 10:48:54 +01:00
Mathias Vorreiter Pedersen
4406065807
QL: QL: Respond to PR reviews.
2021-10-14 10:48:54 +01:00
Tom Hvitved
3dc09a3cda
Revert changes to shared/generated files
2021-10-14 11:42:05 +02:00
Anders Schack-Mulligen
57cb300759
C++/C#/Java/JavaScript/Python: Remove singleton set literals.
2021-10-14 11:34:22 +02:00
Mathias Vorreiter Pedersen
7d9c408af4
Merge pull request #87 from github/mathiasvp/superfluous-exists
...
New query: Unnecessary 'exists'
2021-10-14 10:23:53 +01:00
Mathias Vorreiter Pedersen
dd6abdc06b
QL: Merge pull request #87 from github/mathiasvp/superfluous-exists
...
New query: Unnecessary 'exists'
2021-10-14 10:23:53 +01:00
Taus
5a519c5089
Add test for override
...
This test demonstrates that our handling of `override` is incorrect.
Quick-eval'ing the `test` predicate produces the following output:
| f | i | j |
+---+-----+-----+
| 1 | 10 | 10 |
| 1 | 10 | 100 |
| 1 | 100 | 10 |
| 1 | 100 | 100 |
| 2 | 20 | 20 |
| 3 | 3 | 3 |
this demonstrates that `f.bar` and `f.baz` can resolve to all predicates
of that name in the file.
However, at present we only capture the calls to members on `Foo`.
2021-10-14 09:14:59 +00:00
Taus
b5bef24ce2
QL: Add test for override
...
This test demonstrates that our handling of `override` is incorrect.
Quick-eval'ing the `test` predicate produces the following output:
| f | i | j |
+---+-----+-----+
| 1 | 10 | 10 |
| 1 | 10 | 100 |
| 1 | 100 | 10 |
| 1 | 100 | 100 |
| 2 | 20 | 20 |
| 3 | 3 | 3 |
this demonstrates that `f.bar` and `f.baz` can resolve to all predicates
of that name in the file.
However, at present we only capture the calls to members on `Foo`.
2021-10-14 09:14:59 +00:00
Erik Krogh Kristensen
f7ff83c2e7
Merge pull request #93 from github/aschackmull/delete-vscode-file
...
Delete this file that vscode keeps changing for me.
2021-10-14 11:01:33 +02:00
Erik Krogh Kristensen
fb491c392e
QL: Merge pull request #93 from github/aschackmull/delete-vscode-file
...
Delete this file that vscode keeps changing for me.
2021-10-14 11:01:33 +02:00
Anders Schack-Mulligen
11fd4f4997
Delete this file that vscode keeps changing for me.
2021-10-14 10:59:39 +02:00
Anders Schack-Mulligen
56d9c351d5
QL: Delete this file that vscode keeps changing for me.
2021-10-14 10:59:39 +02:00
Mathias Vorreiter Pedersen
bff9665866
Merge branch 'main' into mathiasvp/superfluous-exists
2021-10-14 09:49:40 +01:00
Mathias Vorreiter Pedersen
1762b4fb91
QL: Merge branch 'main' into mathiasvp/superfluous-exists
2021-10-14 09:49:40 +01:00
Taus
f0a8c77095
Merge pull request #91 from github/tausbn/fix-parsing-of-unique
...
Fix parsing of `unique`
2021-10-14 10:21:49 +02:00
Taus
2cedddfce8
QL: Merge pull request #91 from github/tausbn/fix-parsing-of-unique
...
Fix parsing of `unique`
2021-10-14 10:21:49 +02:00
Erik Krogh Kristensen
a358a192c4
add explicit this to all calls to class predicates
2021-10-14 10:11:55 +02:00
Erik Krogh Kristensen
cbd55f2299
add explicit this to all calls to class predicates
2021-10-14 10:10:00 +02:00
Taus
a5fcc5c15a
Fix parsing of unique
2021-10-14 08:09:13 +00:00
Taus
5d975089c1
QL: Fix parsing of unique
2021-10-14 08:09:13 +00:00
Mathias Vorreiter Pedersen
455a34a1ec
Merge pull request #77 from github/erik-krogh/qlpacks
...
add pretty AST for YAML and a QLPack utility class
2021-10-14 08:42:52 +01:00
Mathias Vorreiter Pedersen
18c427cddc
QL: Merge pull request #77 from github/erik-krogh/qlpacks
...
add pretty AST for YAML and a QLPack utility class
2021-10-14 08:42:52 +01:00
Mathias Vorreiter Pedersen
e46ccc072e
Merge pull request #82 from github/esbena/codeql-action-on-other-repos
2021-10-14 07:44:15 +01:00
Mathias Vorreiter Pedersen
238fba9b6e
QL: Merge pull request #82 from github/esbena/codeql-action-on-other-repos
2021-10-14 07:44:15 +01:00
Esben Sparre Andreasen
0ff2de9b5e
restrict the queries that are run by default
2021-10-14 08:12:04 +02:00
Esben Sparre Andreasen
b0cbb31895
QL: restrict the queries that are run by default
2021-10-14 08:12:04 +02:00
Esben Sparre Andreasen
98b359bd9a
Add codeql-go sources ( abe3f2148b)
2021-10-14 08:09:51 +02:00
Esben Sparre Andreasen
3039206eab
QL: Add codeql-go sources ( abe3f2148b)
2021-10-14 08:09:51 +02:00
Esben Sparre Andreasen
53e17e7835
Add codeql sources ( a2371370ff)
2021-10-14 08:09:51 +02:00
Esben Sparre Andreasen
808fd78d96
QL: Add codeql sources ( a2371370ff)
2021-10-14 08:09:51 +02:00
Esben Sparre Andreasen
9826e7df1d
Add codeql-ruby sources ( 236643fc43)
2021-10-14 08:09:50 +02:00
Esben Sparre Andreasen
946c572413
QL: Add codeql-ruby sources ( 236643fc43)
2021-10-14 08:09:50 +02:00
Esben Sparre Andreasen
d9f38826f7
Implement import-repositories.sh
2021-10-14 08:09:50 +02:00
Esben Sparre Andreasen
d8e1e3e8c0
QL: Implement import-repositories.sh
2021-10-14 08:09:50 +02:00
Mathias Vorreiter Pedersen
c5bcb7999e
QL: Complete the GVN library.
2021-10-13 22:48:45 +01:00
Mathias Vorreiter Pedersen
c21df48bcd
QL: QL: Complete the GVN library.
2021-10-13 22:48:45 +01:00
Mathias Vorreiter Pedersen
a2371370ff
Merge pull request #6865 from MathiasVP/fix-if-none
...
C++/C#/JS/Python: Replace 'if p() then q() else none()' with a conjunction
2021-10-13 19:47:55 +01:00
Mathias Vorreiter Pedersen
4991301f36
JS: Fix incorrect fix.
2021-10-13 19:45:02 +01:00
Erik Krogh Kristensen
5e7adc661f
autoformat
2021-10-13 20:26:40 +02:00
Erik Krogh Kristensen
4958b8ba0d
QL: autoformat
2021-10-13 20:26:40 +02:00
Tom Hvitved
c14dcfbfe4
Data flow: Sync
2021-10-13 20:13:28 +02:00
CodeQL CI
2b0415e238
Merge pull request #6741 from yoff/python/model-os-path-file-accesses
...
Approved by RasmusWL
2021-10-13 11:11:41 -07:00
Tom Hvitved
5be7a97a16
Data flow: Avoid unnecessary non-linear recursion via getConfiguration()
2021-10-13 20:10:26 +02:00
Tom Hvitved
ee44e742f6
Data flow: Avoid bad join-order in pathIntoCallable0
2021-10-13 20:09:43 +02:00
Arthur Baars
236643fc43
Merge pull request #356 from github/rc/3.3
...
Merge rc/3.3 into main
2021-10-13 19:21:36 +02:00
Arthur Baars
240b33f119
Merge pull request #355 from github/aeisenberg/bump-submodule
...
Bump codeql submodule
2021-10-13 18:50:25 +02:00
Mathias Vorreiter Pedersen
5b881c2151
Merge pull request #73 from github/tausbn/add-implicit-this-query
...
Add "implicit `this`" query
2021-10-13 17:36:02 +01:00
Mathias Vorreiter Pedersen
ce3a531daf
QL: Merge pull request #73 from github/tausbn/add-implicit-this-query
...
Add "implicit `this`" query
2021-10-13 17:36:02 +01:00
Mathias Vorreiter Pedersen
c3141125af
QL: Add a query that finds unnecessary 'exists'.
2021-10-13 17:31:29 +01:00
Mathias Vorreiter Pedersen
a917f240cf
QL: QL: Add a query that finds unnecessary 'exists'.
2021-10-13 17:31:29 +01:00
Andrew Eisenberg
ef8eff8c29
Bump codeql submodule
2021-10-13 09:30:52 -07:00
Andrew Eisenberg
878203f1d0
Merge pull request #6862 from github/aeisenberg/tutorial
...
Move tutorial directly into each qlpack
2021-10-13 09:29:37 -07:00
Mathias Vorreiter Pedersen
2543b720e6
QL: Add a basic GVN library.
2021-10-13 17:26:26 +01:00
Mathias Vorreiter Pedersen
690b7ef617
QL: QL: Add a basic GVN library.
2021-10-13 17:26:26 +01:00
Mathias Vorreiter Pedersen
c577817882
QL: Add some convenience predicates in 'Ast.qll' and move a couple of the predicates from subclasses of 'BinOpExpr' into 'BinOpExpr'.
2021-10-13 17:26:00 +01:00
Mathias Vorreiter Pedersen
4795cbb849
QL: QL: Add some convenience predicates in 'Ast.qll' and move a couple of the predicates from subclasses of 'BinOpExpr' into 'BinOpExpr'.
2021-10-13 17:26:00 +01:00
Mathias Vorreiter Pedersen
4c4fd52347
QL: Add some more model classes that represent builtin QL classes.
2021-10-13 17:24:27 +01:00
Mathias Vorreiter Pedersen
d7f08703af
QL: QL: Add some more model classes that represent builtin QL classes.
2021-10-13 17:24:27 +01:00
Tom Hvitved
1cf90858cc
Merge pull request #350 from github/hvitved/erb-get-a-child-stmt-perf
...
Speedup `ErbDirective::containsStmtStart`
2021-10-13 18:14:43 +02:00
Andrew Eisenberg
0d1632a5d2
Move tutorial directly into each qlpack
...
Previously, the tutorial was injected during build time. This is much
simpler.
2021-10-13 08:37:04 -07:00
Arthur Baars
5df728dd7d
Merge pull request #354 from github/hvitved/identical-files-fix
...
Remove "DataFlow2" section from `identical-files.json`
2021-10-13 17:20:40 +02:00
Geoffrey White
2e61ae244a
C++: Set literals.
2021-10-13 16:12:36 +01:00
Tom Hvitved
6b46aaaefb
Remove "DataFlow2" section from identical-files.json
2021-10-13 17:03:48 +02:00
Erik Krogh Kristensen
31394878a2
resolve calls to db relations
2021-10-13 17:03:24 +02:00
Erik Krogh Kristensen
b31f705ffc
QL: resolve calls to db relations
2021-10-13 17:03:24 +02:00
Taus
06ba078ef2
Merge pull request #83 from github/tausbn/fix-missing-override-fps
...
Fix "missing override" FPs
2021-10-13 16:36:18 +02:00
Taus
823c24a7ab
QL: Merge pull request #83 from github/tausbn/fix-missing-override-fps
...
Fix "missing override" FPs
2021-10-13 16:36:18 +02:00
Arthur Baars
893ca5a250
Merge pull request #353 from github/rc/3.3
...
Merge rc/3.3 into main
2021-10-13 16:33:42 +02:00
Erik Krogh Kristensen
1a1770fc06
resolve imports across qlpacks
2021-10-13 16:20:07 +02:00
Erik Krogh Kristensen
bc74af7307
QL: resolve imports across qlpacks
2021-10-13 16:20:07 +02:00
Arthur Baars
dc8399f13c
Merge pull request #352 from github/hvitved/dataflowimpl2-sync
...
Add missing `DataFlowImpl2.qll` entry to `identical-files.json`
2021-10-13 16:08:24 +02:00
Taus
bd01d92500
Fix "missing override" FPs
...
This brings the analysis back to the level it was at before the addition
of `instanceof`.
2021-10-13 14:07:24 +00:00
Taus
cc43230244
QL: Fix "missing override" FPs
...
This brings the analysis back to the level it was at before the addition
of `instanceof`.
2021-10-13 14:07:24 +00:00
Geoffrey White
0704ab7bd3
Add tests.
2021-10-13 15:00:54 +01:00
Geoffrey White
7c02b6a3b2
QL: Add tests.
2021-10-13 15:00:54 +01:00
Geoffrey White
c8c23a6eb4
Support hasName(x) pattern as well.
2021-10-13 15:00:54 +01:00
Geoffrey White
161461eb6f
QL: Support hasName(x) pattern as well.
2021-10-13 15:00:54 +01:00
Geoffrey White
e6242fd349
Add ql/use-set-literal query.
2021-10-13 15:00:54 +01:00
Geoffrey White
d933bf6f24
QL: Add ql/use-set-literal query.
2021-10-13 15:00:54 +01:00
Anders Schack-Mulligen
169cc75c88
Merge pull request #6840 from aschackmull/java/misc-perf
...
Java: Fix some performance issues.
2021-10-13 15:53:49 +02:00
Tom Hvitved
11792e17a9
Add missing DataFlowImpl2.qll entry to identical-files.json
2021-10-13 15:50:29 +02:00
Andrew Eisenberg
01819cdbde
Merge pull request #344 from github/aeisenberg/tutorial
2021-10-13 06:48:55 -07:00
Anders Schack-Mulligen
dd4f6edd62
Merge pull request #75 from github/aschackmull/isclosure
...
Expose transitive closure syntax.
2021-10-13 15:45:20 +02:00
Anders Schack-Mulligen
4b73c99c56
QL: Merge pull request #75 from github/aschackmull/isclosure
...
Expose transitive closure syntax.
2021-10-13 15:45:20 +02:00
Mathias Vorreiter Pedersen
43b1185d82
Merge pull request #79 from github/esbena/fix-1
...
fix getAPrimaryQlClass: SuperAccess -> Super
2021-10-13 14:44:25 +01:00
Mathias Vorreiter Pedersen
366fc23938
QL: Merge pull request #79 from github/esbena/fix-1
...
fix getAPrimaryQlClass: SuperAccess -> Super
2021-10-13 14:44:25 +01:00
Taus
a6115687aa
Python: More implicit this
2021-10-13 13:43:37 +00:00
Taus
a9c8163ab3
Python: Fix uses of implicit this
...
Quoting the style guide:
"14. _Always_ qualify _calls_ to predicates of the same class with
`this`."
2021-10-13 13:43:36 +00:00
Esben Sparre Andreasen
3e7b82a02a
fix getAPrimaryQlClass: SuperAccess -> Super
2021-10-13 15:38:16 +02:00
Esben Sparre Andreasen
64a3ffdca7
QL: fix getAPrimaryQlClass: SuperAccess -> Super
2021-10-13 15:38:16 +02:00
Erik Krogh Kristensen
06f2345bbb
add pretty AST for YAML and a QLPack utility class
2021-10-13 15:35:14 +02:00
Erik Krogh Kristensen
236989f6fd
QL: add pretty AST for YAML and a QLPack utility class
2021-10-13 15:35:14 +02:00
Mathias Vorreiter Pedersen
aef394e2d1
Merge pull request #62 from github/if-with-none
...
QL: Add query that finds 'if p() then q() else none()'
2021-10-13 14:29:15 +01:00
Mathias Vorreiter Pedersen
d2222ee9f2
QL: Merge pull request #62 from github/if-with-none
...
QL: Add query that finds 'if p() then q() else none()'
2021-10-13 14:29:15 +01:00
Andrew Eisenberg
0e0441743b
Move tutorial directly into each qlpack
...
See also https://github.com/github/codeql/pull/6862
2021-10-13 15:28:17 +02:00
Arthur Baars
aa4d0021a8
Merge pull request #349 from github/aibaars/bump-codeql-main
...
Bump codeql submodule on main
2021-10-13 15:26:59 +02:00
Arthur Baars
078cebe822
Merge pull request #351 from github/aibaars/fix-broken-links
...
Update broken links
2021-10-13 15:25:23 +02:00
Esben Sparre Andreasen
b8d26abbc2
Merge pull request #64 from github/esbena/codeql-action-support
...
CodeQL-action to work with QL-for-QL
2021-10-13 15:24:13 +02:00
Esben Sparre Andreasen
d41331b28b
QL: Merge pull request #64 from github/esbena/codeql-action-support
...
CodeQL-action to work with QL-for-QL
2021-10-13 15:24:13 +02:00
Philip Ginsbach
a204b7f3e7
Merge pull request #6866 from github/ginsbach/MoreInstanceofExtensions
...
more instanceof extensions
2021-10-13 14:21:50 +01:00
Esben Sparre Andreasen
85a35544af
add workflow with codeql-action
2021-10-13 15:21:08 +02:00
Esben Sparre Andreasen
5e1f565b6a
QL: add workflow with codeql-action
2021-10-13 15:21:08 +02:00
Jonas Jensen
c215838531
Merge pull request #6867 from nickrolfe/mergeback
...
Merge rc/3.3 into main
2021-10-13 15:19:18 +02:00
Mathias Vorreiter Pedersen
6ece3c2b46
Merge pull request #6870 from jbj/cp-fixes
...
C++: Fix potential Cartesian products
2021-10-13 14:15:33 +01:00
Arthur Baars
f4003406cf
Apply suggestions from code review
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2021-10-13 15:11:04 +02:00
Taus
e524076045
Extend the tests slightly
...
Adds a test for when the call is to an outer, non-member predicate.
2021-10-13 13:03:30 +00:00
Taus
d0cb1384a9
QL: Extend the tests slightly
...
Adds a test for when the call is to an outer, non-member predicate.
2021-10-13 13:03:30 +00:00
Arthur Baars
112b7a8e27
Update broken links
2021-10-13 15:03:19 +02:00
Anders Schack-Mulligen
94dbf2b7b4
Expose transitive closure syntax.
2021-10-13 12:48:38 +00:00
Anders Schack-Mulligen
7d68020c7b
QL: Expose transitive closure syntax.
2021-10-13 12:48:38 +00:00
Tom Hvitved
436f678c94
Speedup ErbDirective::containsStmtStart
2021-10-13 14:41:04 +02:00
Taus
bc5e0924d2
Add tests for "implicit this"
2021-10-13 12:27:20 +00:00
Taus
a0e2bd57a7
QL: Add tests for "implicit this"
2021-10-13 12:27:20 +00:00
Jonas Jensen
e80c1ad91f
C++: Fix resource-not-released-in-destructor CP
...
By moving a disjunct outside the scope of an `exists(Function f`
variable it doens't use, the code becomes clearer and can be optimized
better.
The CP in the QL code did not lead to a CP at evaluation time since the
optimizer was smart enough to compensate for it:
376161 ~37597630% {0} r1 = SCAN functions OUTPUT {}
1 ~0% {0} r2 = STREAM DEDUP r1
Before this change, the largest tuple count in `leakedInSameMethod` on
bitcoin/bitcoin was 2M. Now it's 400k.
2021-10-13 14:24:26 +02:00
Mathias Vorreiter Pedersen
a80860cdc6
Python: Replace '.prefix'/'.suffix' with '.matches'.
2021-10-13 13:23:12 +01:00
Mathias Vorreiter Pedersen
f3bb0a676e
JS: Replace '.prefix'/'.suffix' with '.matches'.
2021-10-13 13:23:07 +01:00
Mathias Vorreiter Pedersen
d85d009a54
Java: Replace '.prefix'/'.suffix' with '.matches'.
2021-10-13 13:19:06 +01:00
Jonas Jensen
955344e175
C++: Inline a predicate that contains CPs
...
The `overflows` predicate had quite severe Cartesian products. We didn't
see them in practice because magic saved us, but we can't rely on magic
in the future, so it seems better to inline this predicate.
Tuple counts and speed look good both before and after.
2021-10-13 14:11:47 +02:00
Philip Ginsbach
c9c0c7f24f
fix formatting
2021-10-13 13:10:37 +01:00
Taus
48cfa9665a
Add "implicit this" query
2021-10-13 12:08:19 +00:00
Taus
fb5513c1c8
QL: Add "implicit this" query
2021-10-13 12:08:19 +00:00
Mathias Vorreiter Pedersen
95ea619cc4
Merge pull request #69 from github/erik-krogh/perf
...
fix two bad join orders
2021-10-13 12:53:12 +01:00
Mathias Vorreiter Pedersen
d1721d0bcd
QL: Merge pull request #69 from github/erik-krogh/perf
...
fix two bad join orders
2021-10-13 12:53:12 +01:00
Taus
2d412d63e0
Merge pull request #71 from github/tausbn/more-yaml-hacking
...
"Parse" YAML without errors
2021-10-13 13:51:20 +02:00
Taus
411faca6ef
QL: Merge pull request #71 from github/tausbn/more-yaml-hacking
...
"Parse" YAML without errors
2021-10-13 13:51:20 +02:00
Geoffrey White
3dab87e6ca
Merge pull request #48 from github/extractor-pack
...
Make the create-extractor-pack.ps1 script more reliable.
2021-10-13 12:38:10 +01:00
Geoffrey White
ca81110e4b
QL: Merge pull request #48 from github/extractor-pack
...
Make the create-extractor-pack.ps1 script more reliable.
2021-10-13 12:38:10 +01:00
Erik Krogh Kristensen
4cb004c0c6
autoformat
2021-10-13 13:34:47 +02:00
Erik Krogh Kristensen
15679dfec6
QL: autoformat
2021-10-13 13:34:47 +02:00
Erik Krogh Kristensen
705e24690f
cache getClassPredicate
2021-10-13 13:26:37 +02:00
Erik Krogh Kristensen
09862b9fe7
QL: cache getClassPredicate
2021-10-13 13:26:37 +02:00
Taus
7034933cee
"Parse" YAML without errors
2021-10-13 11:24:26 +00:00
Taus
30040680ec
QL: "Parse" YAML without errors
2021-10-13 11:24:26 +00:00
Arthur Baars
bf3d291a1c
Updates after codeql file sync
2021-10-13 13:24:20 +02:00
Arthur Baars
80ac05d5c6
Bump codeql submodule to 'main'
2021-10-13 13:24:08 +02:00
Joe Farebrother
1b4130fe97
Add check for predicates with an override annotation
2021-10-13 12:22:46 +01:00
Joe Farebrother
c3493d6fde
QL: Add check for predicates with an override annotation
2021-10-13 12:22:46 +01:00
Erik Krogh Kristensen
584702058d
fix two bad join orders
2021-10-13 13:20:41 +02:00
Erik Krogh Kristensen
932f00b43e
QL: fix two bad join orders
2021-10-13 13:20:41 +02:00
Alex Ford
0d72a51334
Merge pull request #342 from github/improve-xss-isAdditionalFlowStep
...
Improve `XSS::Shared::isAdditionalFlowStep` performance
2021-10-13 12:15:52 +01:00
Mathias Vorreiter Pedersen
bdc54bcda7
Python: Replace 'if p() then q() else none()' with a conjunction.
2021-10-13 12:13:55 +01:00
Mathias Vorreiter Pedersen
887849857d
JS: Replace 'if p() then q() else none()' with a conjunction.
2021-10-13 12:13:55 +01:00
Mathias Vorreiter Pedersen
7690625114
C#: Replace 'if p() then q() else none()' with a conjunction.
2021-10-13 12:11:50 +01:00
Mathias Vorreiter Pedersen
ba981c525b
C++: Replace 'if p() then q() else none()' with a conjunction.
2021-10-13 12:11:42 +01:00
Joe Farebrother
33bd267eb0
"doesn't mention this" query
2021-10-13 12:09:04 +01:00
Joe Farebrother
d474a76cf0
QL: "doesn't mention this" query
2021-10-13 12:09:04 +01:00
Arthur Baars
6a18aa4e2a
Merge pull request #348 from github/rc/3.3
...
Merge rc/3.3 into main
2021-10-13 13:08:55 +02:00
Arthur Baars
287046e9b0
Merge pull request #346 from github/erik-krogh/fix-primary-class-typo
...
fix typo for getAPrimaryQlClass
2021-10-13 12:53:51 +02:00
Anders Schack-Mulligen
1f6eb6e763
Merge pull request #55 from github/mathiasvp/prefix-or-suffix-in-comparison
...
New query: Find uses of '.prefix' or '.suffix' when comparing against string literals
2021-10-13 12:45:12 +02:00
Anders Schack-Mulligen
3ed7f9664c
QL: Merge pull request #55 from github/mathiasvp/prefix-or-suffix-in-comparison
...
New query: Find uses of '.prefix' or '.suffix' when comparing against string literals
2021-10-13 12:45:12 +02:00
Philip Ginsbach
6b9ddf1f65
Guard non-extending subtype of G::Guard
2021-10-13 11:44:22 +01:00
Anders Schack-Mulligen
35f6c598e7
Merge pull request #54 from github/aschackmull/singleton-set
...
New query: Singleton set literal.
2021-10-13 12:43:41 +02:00
Anders Schack-Mulligen
87910e80af
QL: Merge pull request #54 from github/aschackmull/singleton-set
...
New query: Singleton set literal.
2021-10-13 12:43:41 +02:00
Philip Ginsbach
e3e741251f
ParameterNode non-extending subtype of ParameterNodeImpl
2021-10-13 11:42:41 +01:00
Philip Ginsbach
aa656f7542
ArgumentNode non-extending subtype of ArgumentNodeImpl
2021-10-13 11:41:40 +01:00
Philip Ginsbach
4a0aac8505
SuppressionScope non-extending subtype of SuppressionComment
2021-10-13 11:40:32 +01:00
Geoffrey White
ddc7794c8d
Merge branch 'main' into extractor-pack
2021-10-13 11:40:26 +01:00
Geoffrey White
1265c3fbed
QL: Merge branch 'main' into extractor-pack
2021-10-13 11:40:26 +01:00
Philip Ginsbach
d0ecabad19
DataFlowCall non-extending subtype of Call
2021-10-13 11:39:25 +01:00
Nick Rolfe
1c5dcecf1e
Update expected output to match getAPrimaryQlClass change
2021-10-13 12:39:13 +02:00
Erik Krogh Kristensen
e1675ff055
fix typo for getAPrimaryQlClass
2021-10-13 12:39:13 +02:00
Philip Ginsbach
14fae833cb
Merge pull request #65 from github/ginsbach/SuggestInstanceof
...
Suggest instanceof extensions
2021-10-13 11:33:41 +01:00
Philip Ginsbach
fed3d80a3d
QL: Merge pull request #65 from github/ginsbach/SuggestInstanceof
...
Suggest instanceof extensions
2021-10-13 11:33:41 +01:00
Erik Krogh Kristensen
88c003681b
Merge pull request #61 from github/aschackmull/extends-formula
...
Add missing extends Formula
2021-10-13 12:33:29 +02:00
Erik Krogh Kristensen
6b901429d0
QL: Merge pull request #61 from github/aschackmull/extends-formula
...
Add missing extends Formula
2021-10-13 12:33:29 +02:00
Arthur Baars
d448e208ab
Merge pull request #347 from github/aibaars/bump-codeql
...
Bump codeql submodule to rc/3.3
2021-10-13 12:28:17 +02:00
Erik Krogh Kristensen
6e274f640f
Merge pull request #63 from github/erik-krogh/disable-windows
...
disable windows CI
2021-10-13 12:28:13 +02:00
Erik Krogh Kristensen
0060fcbfd7
QL: Merge pull request #63 from github/erik-krogh/disable-windows
...
disable windows CI
2021-10-13 12:28:13 +02:00
Erik Krogh Kristensen
79c51625a8
disable windows part 3
2021-10-13 12:10:02 +02:00
Erik Krogh Kristensen
42bf00f17e
QL: disable windows part 3
2021-10-13 12:10:02 +02:00
Philip Ginsbach
754bf84abe
suggest replacing 'this instanceof ...' in constructor with non-extending subtypes
2021-10-13 11:06:59 +01:00
Philip Ginsbach
9ae0aad46d
QL: suggest replacing 'this instanceof ...' in constructor with non-extending subtypes
2021-10-13 11:06:59 +01:00
Erik Krogh Kristensen
256af31b38
disable windows part 2
2021-10-13 12:05:17 +02:00
Erik Krogh Kristensen
bd6825833d
QL: disable windows part 2
2021-10-13 12:05:17 +02:00
Arthur Baars
8ef1af9de0
Bump codeql submodule to rc/3.3
2021-10-13 12:03:49 +02:00
Mathias Vorreiter Pedersen
af3ae3f1fa
QL: Respond to PR comments.
2021-10-13 09:57:05 +00:00
Mathias Vorreiter Pedersen
df20f84ae2
QL: QL: Respond to PR comments.
2021-10-13 09:57:05 +00:00
Erik Krogh Kristensen
825c1c4407
disable windows CI
2021-10-13 11:54:03 +02:00
Erik Krogh Kristensen
9b36fdf9bd
QL: disable windows CI
2021-10-13 11:54:03 +02:00
Tom Hvitved
e2db11b31f
Performance improvements in XSS.qll
...
Various performance improvements to make sure that we never join methods
and calls (or variables and accesses) on only name (or file), but always
perform a multi-join on both values.
2021-10-13 11:53:49 +02:00
Mathias Vorreiter Pedersen
c3f9d584a4
QL: Add query that finds 'if p() then q() else none()'.
2021-10-13 09:48:57 +00:00
Mathias Vorreiter Pedersen
6c7d848727
QL: QL: Add query that finds 'if p() then q() else none()'.
2021-10-13 09:48:57 +00:00
Anders Schack-Mulligen
7bd0bf9908
Add missing extends Formula
2021-10-13 09:47:10 +00:00
Anders Schack-Mulligen
01ef4d7060
QL: Add missing extends Formula
2021-10-13 09:47:10 +00:00
Mathias Vorreiter Pedersen
81e88f8d34
QL: Actually use the SuffixPredicateCall class as well. Now the query finds 20 results.
2021-10-13 09:31:45 +00:00
Mathias Vorreiter Pedersen
e927c43222
QL: QL: Actually use the SuffixPredicateCall class as well. Now the query finds 20 results.
2021-10-13 09:31:45 +00:00
Mathias Vorreiter Pedersen
812597505d
QL: Respond to PR reviews.
2021-10-13 09:28:02 +00:00
Mathias Vorreiter Pedersen
b4d710d58f
QL: QL: Respond to PR reviews.
2021-10-13 09:28:02 +00:00
Geoffrey White
d99d02994a
Update README.md
...
I needed the rust-analyzer extension to get anywhere in VSCode.
2021-10-13 10:09:08 +01:00
Geoffrey White
46789aecaa
QL: Update README.md
...
I needed the rust-analyzer extension to get anywhere in VSCode.
2021-10-13 10:09:08 +01:00
Mathias Vorreiter Pedersen
6c55a67f9a
QL: Add query to find uses of .prefix or .suffix when comparing against literals.
2021-10-13 09:06:58 +00:00
Mathias Vorreiter Pedersen
f86a827bb6
QL: QL: Add query to find uses of .prefix or .suffix when comparing against literals.
2021-10-13 09:06:58 +00:00
Anders Schack-Mulligen
79485ec5da
New query: Singleton set literal.
2021-10-13 09:01:54 +00:00
Anders Schack-Mulligen
f71acdf9fe
QL: New query: Singleton set literal.
2021-10-13 09:01:54 +00:00
Erik Krogh Kristensen
ed767b4a54
Merge pull request #51 from github/aschackmull/ignore-work
...
Add work folder to gitignore.
2021-10-13 10:52:49 +02:00
Erik Krogh Kristensen
eb527a5494
QL: Merge pull request #51 from github/aschackmull/ignore-work
...
Add work folder to gitignore.
2021-10-13 10:52:49 +02:00
Anders Schack-Mulligen
f71881ef78
Add work folder to gitignore.
2021-10-13 08:28:27 +00:00
Anders Schack-Mulligen
a8b1ef83f1
QL: Add work folder to gitignore.
2021-10-13 08:28:27 +00:00
Calum Grant
59e4a6ff7b
Move file to correct location
2021-10-13 09:23:04 +01:00
Geoffrey White
76144a7f7d
Make the create-extractor-pack.ps1 script more reliable.
2021-10-13 09:17:59 +01:00
Geoffrey White
54b7fa3944
QL: Make the create-extractor-pack.ps1 script more reliable.
2021-10-13 09:17:59 +01:00
Taus
ef538570c8
Merge pull request #37 from github/toUnicodeBuildin
...
add `toUnicode` as a build-in
2021-10-13 10:13:05 +02:00
Taus
352c50c2e5
QL: Merge pull request #37 from github/toUnicodeBuildin
...
add `toUnicode` as a build-in
2021-10-13 10:13:05 +02:00
Calum Grant
f575139180
Add Ruby to toctree
2021-10-13 09:10:46 +01:00
Erik Krogh Kristensen
bb3e6399a4
Merge pull request #41 from github/tausbn/support-instanceof
...
Support `instanceof`
2021-10-13 09:14:02 +02:00
Erik Krogh Kristensen
fbb58f1954
QL: Merge pull request #41 from github/tausbn/support-instanceof
...
Support `instanceof`
2021-10-13 09:14:02 +02:00
Anders Schack-Mulligen
d4fd8780e9
Merge pull request #6863 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-10-13 08:58:18 +02:00
Anders Schack-Mulligen
306388a6bc
Update java/ql/src/Likely Bugs/Comparison/StringComparison.ql
2021-10-13 08:57:31 +02:00
github-actions[bot]
2f27a0c9f9
Add changed framework coverage reports
2021-10-13 00:09:35 +00:00
Andrew Eisenberg
8285878504
Merge pull request #6861 from github/aeisenberg/qlpack-defaultSuite
...
QlPacks: Add the defaultSuite to query packs that are missing it
2021-10-12 14:27:09 -07:00
Andrew Eisenberg
7a0437f159
Merge pull request #343 from github/aeisenberg/defaultSuite
...
Add defaultSuite
2021-10-12 14:26:35 -07:00
Andrew Eisenberg
d9ab13b43d
Update ql/src/qlpack.yml
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2021-10-12 13:01:03 -07:00
Andrew Eisenberg
2fca1f57c6
Add defaultSuite
...
Also, change the dependencies to be in alignment with other standard qlpacks.
2021-10-12 21:57:53 +02:00
Arthur Baars
4e79d9fad6
Merge pull request #334 from github/RasmusWL/normalize-qlpack
...
Packaging: Normalize src/qlpack.yml
2021-10-12 21:56:31 +02:00
Alex Ford
ad5c1f9b32
ql format
2021-10-12 20:43:20 +01:00
Alex Ford
d7b5e4c779
update predicate visibility
2021-10-12 20:43:20 +01:00
Alex Ford
9083cda8df
improve XSS::Shared::isFlowFromHelperMethod performance
2021-10-12 20:43:20 +01:00
Alex Ford
9afc1f9275
split out isAdditionalXSSFlowStep components
2021-10-12 20:43:20 +01:00
Taus
8c6d139d67
Fix up getASuperType
...
I'm not sure if it's correct to include also the `instanceof`s, but we
can always fix this later.
2021-10-12 19:28:13 +00:00
Taus
db6551c22d
QL: Fix up getASuperType
...
I'm not sure if it's correct to include also the `instanceof`s, but we
can always fix this later.
2021-10-12 19:28:13 +00:00
Andrew Eisenberg
bbb2637bcc
QlPacks: Add the defaultSuite to query packs that are missing it
...
Also, change some examples pack names from `codeql-lang-examples` to
`codeql/lang-examples`. This doesn't affect behaviour since internally,
the legacy name is converted to the modern name.
2021-10-12 11:54:50 -07:00
Arthur Baars
bf139a09f9
Merge pull request #341 from github/rc/3.3
...
Rc/3.3 mergeback
2021-10-12 20:48:21 +02:00
Arthur Baars
8531174d30
Merge pull request #333 from github/hvitved/api-graphs-non-linear-rec
...
API graphs: Avoid non-linear recursion
2021-10-12 20:24:07 +02:00
Arthur Baars
80ebfed226
Merge pull request #336 from github/improve-getTemplateFile
...
Improve `RenderCall#getTemplateFile` performance and accuracy
2021-10-12 20:21:12 +02:00
Arthur Baars
06e91c1182
Merge pull request #322 from github/request-without-validation
...
rb/request-without-cert-validation
2021-10-12 20:19:11 +02:00
Arthur Baars
a78ee535a0
Merge pull request #340 from github/mergeback
...
Merge rc/3.3 into main
2021-10-12 20:16:59 +02:00
Taus
d436be7e96
Support instanceof
...
Stills needs to be hooked up correctly to the AST.
2021-10-12 17:40:29 +00:00
Taus
4694ab4773
QL: Support instanceof
...
Stills needs to be hooked up correctly to the AST.
2021-10-12 17:40:29 +00:00
Rasmus Lerchedahl Petersen
83490e9a03
Python: update change note
2021-10-12 19:27:27 +02:00
Aditya Sharad
a517a05ca8
Merge pull request #6830 from github/henrymercer/report-extraction-errors-as-warnings
...
C++: Improve SARIF severity level reporting of extractor diagnostics
2021-10-12 09:59:27 -07:00
Nick Rolfe
ceef9762a7
Fix comment typo
...
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com >
2021-10-12 17:45:34 +01:00
Arthur Baars
398ed4c0c9
Merge pull request #338 from github/aibaars/update-grammar
...
Update tree-sitter-ruby
2021-10-12 18:39:34 +02:00
Calum Grant
30a00b22c9
CodeQL library for Ruby
2021-10-12 17:33:09 +01:00
Arthur Baars
bb5da92577
Update src/unsupported_feature.rb with a feature that is still unsupported
2021-10-12 18:11:00 +02:00
Arthur Baars
8c9d3b88df
Update dbscheme stats
2021-10-12 17:48:59 +02:00
Arthur Baars
0dc3ea5ed1
Add test-cases for forward arguments and endless methods
2021-10-12 17:32:01 +02:00
Arthur Baars
e44064cda7
Add forward parameter/arguments to AST
2021-10-12 17:31:31 +02:00
Nick Rolfe
ecc9f07c50
Merge pull request #311 from github/nickrolfe/oj
...
Consider Oj.load a sink for unsafe deserialization
2021-10-12 16:17:08 +01:00
Alex Ford
e35ad020d5
ql format
2021-10-12 15:56:00 +01:00
Alex Ford
909cdacb1a
remove cast to StringlikeLiteral
2021-10-12 15:27:26 +01:00
Alex Ford
44499cab51
replace an abstract predicate
2021-10-12 15:27:10 +01:00
Anders Schack-Mulligen
0e5f89a03c
Merge pull request #6463 from smowton/smowton/admin/gson-unsafe-deserialization
...
Java: add Gson support to unsafe-deserialization query
2021-10-12 16:15:27 +02:00
Mathias Vorreiter Pedersen
6853f491f4
Merge pull request #6794 from geoffw0/impropnullfp
...
C++: Improvements to cpp/improper-null-termination
2021-10-12 14:47:02 +01:00
Tom Hvitved
10739b11ee
Merge pull request #6841 from hvitved/dataflow/incorrect-summary-chaining
...
Data flow: Add tests for missing summary flow
2021-10-12 15:44:21 +02:00
Rasmus Lerchedahl Petersen
e904e7410b
Python: Update frameworks.rst
2021-10-12 15:21:38 +02:00
yoff
c40b3a9533
Update python/ql/lib/semmle/python/frameworks/Asyncpg.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-10-12 15:19:07 +02:00
Rasmus Lerchedahl Petersen
6c108e43d9
Python: address review
2021-10-12 15:16:48 +02:00
Rasmus Lerchedahl Petersen
cf92e1eee7
Python: move getStringArgIndex
2021-10-12 15:11:00 +02:00
Chris Smowton
83c6406167
Update javadoc
2021-10-12 13:51:02 +01:00
Tom Hvitved
cc305ed766
Data flow: Sync
2021-10-12 14:37:33 +02:00
Tom Hvitved
296e268339
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-10-12 14:28:32 +02:00
Erik Krogh Kristensen
7d4266aea7
skip pipes and other special files when determining which files to extract
2021-10-12 14:06:41 +02:00
Chris Smowton
3c96e62be7
Remove duplicate declaration
2021-10-12 12:35:05 +01:00
Chris Smowton
8816aa1431
Improve Android stub fidelity to the point that all relevant tests work
...
Note these still aren't entirely mechanically generated stubs matching the real Android 9.
2021-10-12 12:35:05 +01:00
Chris Smowton
205b6fe6d7
Fix bad merge on Uri.java
2021-10-12 12:35:05 +01:00
Chris Smowton
5da392ebfe
Introduce TaintInheritingContent
2021-10-12 12:35:05 +01:00
Chris Smowton
1afc03b9b5
Remove redundant import
2021-10-12 12:35:05 +01:00
Chris Smowton
9e0b112f05
Remove now-unnecessary models and tests
2021-10-12 12:35:05 +01:00
Chris Smowton
490168fb05
Fix comments
2021-10-12 12:35:05 +01:00
Chris Smowton
1dffbcd0bd
Fix tests disrupted by re-modelling and stubbing Android 9:
...
* Account for changed dataflow graph shape using external flow
* Account for BaseBundle only existing as of Android 5
* Properly implement Parcelable, which we previously got away with due to a partial stub
* Restore an Android 11 function that had been added to the Android 9 Context class (I won't get into enforcing the difference in this PR)
2021-10-12 12:35:05 +01:00
Chris Smowton
81c0e66b1d
Add change note and update qhelp
2021-10-12 12:35:05 +01:00
Chris Smowton
fc0b18cf61
Add tests for Android flow steps
2021-10-12 12:35:05 +01:00
Chris Smowton
cd2c9e9ca3
Add Gson support to unsafe deserialization query
2021-10-12 12:35:04 +01:00
Anders Schack-Mulligen
6b4ca31783
Merge pull request #6849 from Marcono1234/marcono1234/improvements
...
Java: Serialization query improvements
2021-10-12 13:30:45 +02:00
Alex Ford
9640af0b8c
Merge pull request #339 from github/rc-workflows
...
enable actions workflows for rc branches
2021-10-12 12:23:47 +01:00
Erik Krogh Kristensen
7b61445f83
Merge pull request #40 from github/erik-krogh/fix-qltest
...
fix qlpack version string
2021-10-12 13:08:40 +02:00
Erik Krogh Kristensen
ca21f5800b
QL: Merge pull request #40 from github/erik-krogh/fix-qltest
...
fix qlpack version string
2021-10-12 13:08:40 +02:00
Erik Krogh Kristensen
b0a237bcc1
fix qlpack version string
2021-10-12 11:01:18 +00:00
Erik Krogh Kristensen
d6d626e932
QL: fix qlpack version string
2021-10-12 11:01:18 +00:00
hubwriter
516674697b
Fix one-word typo
2021-10-12 11:30:02 +01:00
Alex Ford
f870c38e4c
enable actions workflows for rc branches
2021-10-12 10:47:27 +01:00
Alex Ford
48f3d48a11
add some test cases for checking against spurious flow into ERB templates
2021-10-12 10:37:22 +01:00
Arthur Baars
2a7f3fbfaf
Add upgrade script
2021-10-12 11:36:10 +02:00
Shati Patel
1c3239972c
Merge pull request #6854 from shati-patel/packaging-beta-note
...
Docs: Update beta note for packaging
2021-10-12 10:33:59 +01:00
Taus
75c4d6a8a0
Merge pull request #6650 from yoff/python-dataflow/init-time
...
Python: Import time dataflow
2021-10-12 11:31:03 +02:00
Rasmus Lerchedahl Petersen
61008fd3d0
Merge branch 'main' of github.com:github/codeql into python/promote-regex-injection
2021-10-12 11:28:12 +02:00
Rasmus Lerchedahl Petersen
b093aaaf27
Python: switch to type tracking
...
for tracking compiled regexes
2021-10-12 11:23:27 +02:00
yoff
43f7eede0b
Merge pull request #6182 from haby0/python/LogInjection
...
Python: CWE-117 Log injection
2021-10-12 10:54:45 +02:00
yoff
c007c9460c
Merge pull request #6843 from RasmusWL/dataflow-bool-expr
...
Python: Add data-flow for `x or y` and `x and y`
2021-10-12 10:40:54 +02:00
Rasmus Lerchedahl Petersen
f34d1ee997
Python: Update test expectation following rename
2021-10-12 10:36:18 +02:00
Tom Hvitved
97bbb12e06
Merge pull request #6838 from hvitved/csharp/enumerate-files-dir-not-found
...
C#: Make `GetCSharpArgsLogs` robust against log directory not existing
2021-10-12 10:00:27 +02:00
haby0
d52f95d24d
Auto Formatting
2021-10-12 09:36:44 +08:00
Nick Rolfe
8e14b6582d
Remove unused predicate
2021-10-11 18:15:41 +01:00
Mathias Vorreiter Pedersen
df8c399efb
Merge pull request #6710 from ihsinme/ihsinme-patch-70
...
CPP: Add query for CWE-1041 Use of Redundant Code
2021-10-11 17:17:01 +01:00
Alex Ford
7270fe0ee7
slightly limit viable template files from render calls
2021-10-11 17:12:08 +01:00
Alex Ford
cdfee1f27d
better RenderCall#getTemplateFile performance and accuracy
2021-10-11 16:46:10 +01:00
ihsinme
4334acb6f2
Update FindWrapperFunctions.qhelp
2021-10-11 18:40:03 +03:00
Tony Torralba
a8aa8e3bb4
Use InlineExpectationsTest directly
2021-10-11 16:38:20 +02:00
yoff
0629ce00de
Merge pull request #6214 from haby0/python/ClientSuppliedIpUsedInSecurityCheck
...
[Python] CWE-348: Client supplied ip used in security check
2021-10-11 16:38:04 +02:00
Geoffrey White
ac6acfb660
C++: Use data flow.
2021-10-11 15:36:00 +01:00
Owen Mansel-Chan
058a04f756
Merge pull request #6795 from owen-mc/inline-expectation-test-trivial-change
...
Change class name in InlineExpectationTest to avoid clash
2021-10-11 15:35:17 +01:00
shati-patel
c7fbddce54
Docs: Update beta note for packaging
2021-10-11 15:02:25 +01:00
Rasmus Wriedt Larsen
bca1cb141c
Packaging: Normalize src/qlpack.yml
...
Port of 4) from https://github.com/github/codeql/pull/6605
> Dependencies from query packs to other packs are always "*" since
these dependencies are always from source and we should get the
latest.
Compare with [C++ change](https://github.com/github/codeql/pull/6605/files#diff-0236560ca1b9c19eb7c74d8bfecd1c78005e762122f8bcdaee9eb9b20460bf9c ).
2021-10-11 14:36:14 +02:00
Marcono1234
ba0dbd5871
Java: Improve IncorrectSerializableMethods.ql; address review comments
2021-10-11 14:29:10 +02:00
Rasmus Lerchedahl Petersen
19f6cc00c8
Python: rewrite import time test
2021-10-11 14:28:25 +02:00
yoff
5aee715931
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-10-11 13:00:21 +02:00
Arthur Baars
fac4df203a
Update tree-sitter-ruby
2021-10-11 12:53:16 +02:00
Tom Hvitved
98d1ee5178
API graphs: Avoid non-linear recursion
2021-10-11 12:01:33 +02:00
Tom Hvitved
68ea3e7b49
Data flow: Add debugging predicates for rendering data flow graphs for summarized callables
2021-10-11 11:29:08 +02:00
Tom Hvitved
d5955f1ae1
Java: Add test for missing summary flow
2021-10-11 11:29:08 +02:00
Tom Hvitved
30bf2aade4
C#: Add test for missing summary flow
2021-10-11 11:29:08 +02:00
Tom Hvitved
61973c399e
C#: Make GetCSharpArgsLogs robust against log directory not existing
2021-10-11 11:28:49 +02:00
Tom Hvitved
c75e2d306d
Merge pull request #6852 from hvitved/csharp/interpret-element0-bad-magic
...
C#: Avoid bad magic in `interpretElement0`
2021-10-11 11:27:35 +02:00
haby0
c2d0fcfbe6
Update python/ql/test/experimental/query-tests/Security/CWE-348/ClientSuppliedIpUsedInSecurityCheck.expected
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-10-11 16:46:02 +08:00
haby0
29ddc76e2f
Update python/ql/test/experimental/query-tests/Security/CWE-117/LogInjection.expected
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-10-11 16:43:30 +08:00
Rasmus Wriedt Larsen
8444388ec7
Python: Update .expected
2021-10-11 09:48:56 +02:00
Rasmus Wriedt Larsen
1552c108b0
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-10-11 09:34:15 +02:00
Tom Hvitved
b05d76a131
C#: Avoid bad magic in interpretElement0
2021-10-11 09:30:52 +02:00
Tony Torralba
0919746f1a
Merge pull request #6844 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-10-11 09:25:46 +02:00
github-actions[bot]
ea0a0522a7
Add changed framework coverage reports
2021-10-11 00:08:32 +00:00
Marcono1234
a7670fbcab
Java: Enhance IncorrectSerializableMethods.ql
2021-10-11 02:05:53 +02:00
Marcono1234
12936ff5fe
Java: Fix IncorrectSerializableMethods.ql using wrong readObject signature
2021-10-11 02:05:53 +02:00
Marcono1234
b009886664
Java: Add TypeObjectInputStream
2021-10-11 02:05:50 +02:00
Marcono1234
a74d423d82
Java: Improve AnnotationPresentCheck.ql
2021-10-11 01:03:46 +02:00
Rasmus Lerchedahl Petersen
64b1aeaecd
Python: Shorten toString for module vars
2021-10-10 15:59:31 +02:00
Rasmus Lerchedahl Petersen
0aa632d149
Python: Move writing of module vars
...
into runtime jump steps.
2021-10-10 15:49:33 +02:00
yoff
9c9c5c09ff
Merge pull request #6837 from RasmusWL/more-unsafe-deserialization-sinks
...
Python: More unsafe deserialization sinks
2021-10-10 14:33:53 +02:00
yoff
f6122c8a6c
Merge pull request #6734 from erik-krogh/regBehind
...
JS/PY: do not filter away regular expressions with lookbehinds
2021-10-10 13:54:26 +02:00
Henry Mercer
5b26d41d27
C++: Improve SARIF severity level reporting of extractor diagnostics
2021-10-08 17:53:55 +01:00
Rasmus Wriedt Larsen
a50b193c40
Python: Model data-flow for x or y and x and y
2021-10-08 18:32:30 +02:00
Rasmus Wriedt Larsen
15476c2513
Python: Add data-flow tests for BoolExp
...
> 6.11. Boolean operations
> The expression x and y first evaluates x; if x is false, its value is
> returned; otherwise, y is evaluated and the resulting value is
> returned.
> The expression x or y first evaluates x; if x is true, its value is
> returned; otherwise, y is evaluated and the resulting value is
> returned.
2021-10-08 18:29:06 +02:00
Nick Rolfe
f500e5b2d7
Use Expr::getValueText
2021-10-08 16:41:06 +01:00
Geoffrey White
79f13cae55
Merge pull request #6839 from geoffw0/toctoufp
...
CPP: Add test cases for cpp/toctou-race-condition
2021-10-08 16:15:00 +01:00
Rasmus Lerchedahl Petersen
705970cedd
Python: Update tests to use correct tag
2021-10-08 16:57:36 +02:00
Cornelius Riemenschneider
84883d115d
Merge pull request #6813 from adityasharad/docs/database-create-bazel
...
CLI docs: Add example for creating a database using a Bazel build command
2021-10-08 16:56:10 +02:00
Rasmus Lerchedahl Petersen
8ba01abcd6
Merge branch 'python-dataflow/init-time' of github.com:yoff/codeql into python-dataflow/init-time
2021-10-08 16:53:08 +02:00
Anders Schack-Mulligen
2185a654de
Java: Fix some performance issues.
2021-10-08 15:53:14 +02:00
Anders Schack-Mulligen
5d0e72755d
Merge pull request #6770 from aschackmull/java/stream-model
...
Java: Add models for java.util.stream.
2021-10-08 15:48:50 +02:00
Geoffrey White
1c56573194
C++: Add tests.
2021-10-08 14:30:27 +01:00
Geoffrey White
dd95131630
C++: Test spacing.
2021-10-08 14:28:42 +01:00
Rasmus Lerchedahl Petersen
4807f50c00
Merge branch 'main' of github.com:github/codeql into python-dataflow/init-time
2021-10-08 14:55:01 +02:00
ihsinme
8c42545d1c
Update FindWrapperFunctions.qhelp
2021-10-08 13:10:36 +03:00
Rasmus Wriedt Larsen
fd0c386a4c
Python: Add change-note
2021-10-08 12:06:18 +02:00
Rasmus Wriedt Larsen
5e6f042f6e
Python: Model pickle.Unpickler
2021-10-08 11:55:54 +02:00
Rasmus Wriedt Larsen
75b06d8a25
Python: Model dill.load
2021-10-08 11:55:54 +02:00
Rasmus Wriedt Larsen
4820be3b10
Python: Model keyword arguments to dill.loads
2021-10-08 11:55:54 +02:00
Rasmus Wriedt Larsen
9180257afe
Python: Refactor Dill.qll
...
So it matches the layout of all our other qll modules modeling a PyPI
package.
2021-10-08 11:55:54 +02:00
Rasmus Wriedt Larsen
f9333fc551
Python: Expand dill tests
2021-10-08 11:55:54 +02:00
Rasmus Wriedt Larsen
42980a1ab4
Python: Model shelve.open
2021-10-08 11:55:54 +02:00
Tony Torralba
2df30dc107
Use InlineFlowTest for local and remote flow tests
2021-10-08 11:48:35 +02:00
Anders Schack-Mulligen
446c738f20
Merge pull request #6790 from aschackmull/dataflow/force-precision
...
Dataflow: Force high precision of certain Contents.
2021-10-08 11:44:26 +02:00
Calum Grant
958fbc7992
Merge pull request #316 from github/calumgrant/readme
...
Update README.md
2021-10-08 10:36:07 +01:00
Alex Ford
9dedb0540e
Merge pull request #312 from github/rb/stored-xss-1
...
Implement `rb/stored-xss` query
2021-10-08 10:33:11 +01:00
ihsinme
d79596354e
Update cpp/ql/src/experimental/Security/CWE/CWE-1041/FindWrapperFunctions.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-10-08 11:50:45 +03:00
Tom Hvitved
951df380a9
Merge pull request #6829 from hvitved/csharp/gvn-to-string-concat-range
...
C#: Speedup GVN string `concat`s by pulling ranges into separate predicates
2021-10-08 10:02:31 +02:00
Anders Schack-Mulligen
06e59f3b17
Merge pull request #6832 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-10-08 09:53:49 +02:00
Anders Schack-Mulligen
1bec58dee5
Dataflow: Fix more qldoc: s/accesspath/access path/.
2021-10-08 09:41:26 +02:00
github-actions[bot]
062250741a
Add changed framework coverage reports
2021-10-08 00:08:55 +00:00
Rasmus Wriedt Larsen
a81d359669
Python: Model marshal.load
2021-10-07 21:27:51 +02:00
Rasmus Wriedt Larsen
1b61296ea5
Python: Model pickle.load
2021-10-07 21:25:48 +02:00
Rasmus Wriedt Larsen
27c368a444
Python: Model keyword arguments to pickle.loads
2021-10-07 21:24:12 +02:00
Rasmus Wriedt Larsen
3592b09d56
Python: Expand stdlib decoding tests
...
The part about claiming there is decoding of the input to `shelve.open`
is sort of an odd one, since it's not the filename, but the contents of
the file that is decoded.
However, trying to only handle this problem through path injection is
not enough -- if a user is able to upload and access files through
`shelve.open` in a path injection safe manner, that still leads to code
execution.
So right now the best way we have of modeling this is to treat the
filename argument as being deserialized...
2021-10-07 21:11:51 +02:00
Alex Ford
16ab4da812
Update ql/lib/codeql/ruby/security/XSS.qll
...
Co-authored-by: Harry Maclean <hmac@github.com >
2021-10-07 20:03:07 +01:00
Rasmus Wriedt Larsen
a31bf75169
Python: Refactor pickle.loads() modeling
2021-10-07 20:28:30 +02:00
Robert Marsh
2539e3247a
Merge pull request #6814 from MathiasVP/fix-qldoc-in-copy-instruction
...
C++/C#: Fix QLDoc of `CopyInstruction`
2021-10-07 11:18:38 -07:00
Aditya Sharad
2ed572095c
CLI docs: Address comments on Bazel example
2021-10-07 10:51:11 -07:00
yoff
933412eb8d
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-10-07 17:45:07 +02:00
Nick Rolfe
eafe22ef93
Merge remote-tracking branch 'origin/main' into nickrolfe/oj
2021-10-07 16:40:36 +01:00
Tony Torralba
91efb61e97
Use synthetic fields to improve taint precision
2021-10-07 17:03:08 +02:00
Tony Torralba
0325c07bd9
Reorganize fluent models
2021-10-07 17:03:07 +02:00
Tony Torralba
ffa77f0a76
Fix QLDoc
2021-10-07 17:03:07 +02:00
Tony Torralba
588dedc265
Add stubs
2021-10-07 17:03:05 +02:00
Tony Torralba
1a04ad98bc
Add Android Slice models
2021-10-07 17:01:16 +02:00
Arthur Baars
2a32b59840
Merge pull request #331 from github/aibaars/remove-unsafe
...
Remove use of 'unsafe'
2021-10-07 16:58:59 +02:00
Alex Ford
de01770612
update test output
2021-10-07 15:50:35 +01:00
Arthur Baars
439d873564
Remove use of 'unsafe'
2021-10-07 16:38:29 +02:00
Alex Ford
168e67dd6d
deduplicate string constantQualifiedName(ConstantWriteAccess) as string ConstantWriteAccess#getQualifiedName
2021-10-07 15:30:36 +01:00
Alex Ford
5b38e06765
Rename ActiveRecordModelClass#methodMayAccessField() as ActiveRecordModelClass#getAPotentialFieldAccessMethod()
2021-10-07 15:30:36 +01:00
Alex Ford
3bdc680434
Drop a comment that is no longer relevant
2021-10-07 15:30:36 +01:00
Alex Ford
8262247ed7
Minor simplification of finderMethodName predicate
2021-10-07 15:30:36 +01:00
Alex Ford
eb8c48d10f
Remove some unused predicates
2021-10-07 15:30:36 +01:00
Alex Ford
c9edbd98d5
Update ql/lib/codeql/ruby/frameworks/ActiveRecord.qll
...
Co-authored-by: Harry Maclean <hmac@github.com >
2021-10-07 15:30:36 +01:00
Alex Ford
e4fe1d5c13
check for superclass method definitions in ActiveRecordModelClass#methodMayAccessField
2021-10-07 15:30:36 +01:00
Alex Ford
fb5cfcc9b0
OrmTracking goes through or expressions
2021-10-07 15:30:36 +01:00
Alex Ford
be018cc97f
update ActionController tests
2021-10-07 15:30:36 +01:00
Alex Ford
955080234b
partial support for rails layouts
2021-10-07 15:30:36 +01:00
Alex Ford
8e1b48e607
StoredXSS.qhelp
2021-10-07 15:30:36 +01:00
Alex Ford
182a926eeb
rename some example files
2021-10-07 15:30:36 +01:00
Alex Ford
1929a95e89
format
2021-10-07 15:30:36 +01:00
Alex Ford
6065e29aba
Fix performance issues related to a x-product between ActiveRecordModelInstantiation and MethodCall
2021-10-07 15:30:36 +01:00
Alex Ford
43a49689d7
reorganize ActiveRecord field access heuristics
2021-10-07 15:30:36 +01:00
Alex Ford
8f81eaa79c
format
2021-10-07 15:30:36 +01:00
Alex Ford
b2434950d3
abstract away some ActiveRecord specific parts of XSS.qll
2021-10-07 15:30:36 +01:00
Alex Ford
6a32c0cde0
update XSS tests
2021-10-07 15:30:36 +01:00
Alex Ford
6dc3ce335b
make rb/stored-xss track ActiveRecord db accesses
2021-10-07 15:30:36 +01:00
Alex Ford
f6dd6bb00c
expand ActiveRecord modelling to cover how to access fields
2021-10-07 15:30:36 +01:00
Alex Ford
eb5f26ce06
duplicate DataFlow implementation
2021-10-07 15:30:36 +01:00
Alex Ford
a2084f813e
rb/stored-xss structure and initial implementation (FileSystemReadAccess sources)
2021-10-07 15:30:36 +01:00
Chris Smowton
9a80ab31c4
Merge pull request #6567 from luchua-bc/java/sensitive_android_file_leak
...
Java: CWE-200 - Query to detect exposure of sensitive information from android file intent
2021-10-07 15:19:39 +01:00
Chris Smowton
39640efc9b
Remove no-longer-needed TaintPreservingCallables and update test expectations
2021-10-07 14:33:39 +01:00
Anders Schack-Mulligen
2b88a2aa0c
Dataflow: Fix qldoc: s/accesspath/access path/.
2021-10-07 14:46:24 +02:00
Anders Schack-Mulligen
f885751107
Java: Add change note.
2021-10-07 14:42:19 +02:00
Tom Hvitved
764a987b09
C#: Speedup GVN string concats by pulling ranges into separate predicates
2021-10-07 13:51:05 +02:00
haby0
538bf7c321
Update python/ql/src/experimental/Security/CWE-348/ClientSuppliedIpUsedInSecurityCheck.ql
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-10-07 19:44:25 +08:00
Anders Schack-Mulligen
fc69acee46
Java: Add test.
2021-10-07 13:28:02 +02:00
Nick Rolfe
253064144b
Tweak alert wording.
...
This reflects the fact that the query finds results where validation is
only disabled under certain conditions.
2021-10-07 12:06:53 +01:00
Tom Hvitved
1c08592637
Merge pull request #329 from github/hvitved/dataflow/synth-return
...
Data flow: Add a synthetic return node
2021-10-07 13:06:39 +02:00
Chris Smowton
b7448d55ed
Introduce TaintInheritingContent instead of using parts of DataFlowPrivate
2021-10-07 11:20:19 +01:00
Henry Mercer
4b069d41f6
Merge pull request #6818 from github/henrymercer/js/add-classify-files-to-library-pack
...
JS: Move `ClassifyFiles.qll` to library pack
2021-10-07 11:18:20 +01:00
Tom Hvitved
c540615223
HardcodedCredentials: Add test for default parameter values
2021-10-07 11:57:57 +02:00
CodeQL CI
a0dd3d9e75
Merge pull request #6815 from asgerf/js/adjust-security-severity-scores
...
Approved by erik-krogh, esbena
2021-10-07 02:36:19 -07:00
Sebastian Bauersfeld
f651bc3668
Adjust locations of results in JSP files. This is necessary due to known limitations in VSCode which cause locations with zero character indices to be mapped to invalid ranges. This is hopefully a temporary workaround until this problem has been properly addressed.
2021-10-07 12:45:21 +07:00
Dave Bartolomeo
d8d9073bc2
Merge pull request #6826 from github/aeisenberg/add-library
2021-10-06 20:18:39 -04:00
Andrew Eisenberg
e2b1f6ac50
Packaging: Add library flag to upgrades packs
...
This flag was missing. It should be there. Otherwise, this
pack cannot be built.
2021-10-06 14:29:55 -07:00
Nick Rolfe
ffda527da9
Tidy up
2021-10-06 18:07:29 +01:00
Dave Bartolomeo
0452512de2
Merge pull request #6820 from github/aeisenberg/gitignore
...
Ignore .codeql folder
2021-10-06 12:59:45 -04:00
Chris Smowton
f88c8a64a1
Copyedit
2021-10-06 17:37:21 +01:00
Chris Smowton
b33daa3d3a
Update Intent model tests, and fix models where required
2021-10-06 17:09:47 +01:00
Chris Smowton
4be2347a30
Adapt to use the new shared Intent models
2021-10-06 16:15:18 +01:00
Henry Mercer
83cbc86f50
JS: Move ClassifyFiles.qll to library pack
...
This allows us to use this library in packs that depend on the
`codeql/javascript-all` library pack.
2021-10-06 16:08:06 +01:00
Andrew Eisenberg
c9c45808b4
Merge pull request #6819 from github/aeisenberg/javascript/fix-compile-errors
...
Fixes compile errors by moving files
2021-10-06 07:59:50 -07:00
Tom Hvitved
953821c443
Avoid potential tuple explosion in reverse type tracking
2021-10-06 15:21:43 +02:00
Tom Hvitved
fdf1cd38fd
Data flow: Add a synthetic return node
2021-10-06 15:21:43 +02:00
Nick Rolfe
1ce458fa33
Add query to find HTTP requests that disable SSL validation
2021-10-06 14:06:09 +01:00
Chris Smowton
91d8b3da23
Sort Intent models
2021-10-06 12:30:40 +01:00
Chris Smowton
f24e310ace
Update test expectation details
2021-10-06 12:25:23 +01:00
Chris Smowton
ffdfc0549a
Update comment
2021-10-06 12:17:49 +01:00
luchua-bc
987bfa6ca7
Update condition check and qldoc
2021-10-06 12:17:49 +01:00
luchua-bc
8c2fddb297
Update the condition check and use DataFlow in the ql file
2021-10-06 12:17:49 +01:00
Chris Smowton
b0e652a3af
Remove AsyncTask models
2021-10-06 12:17:49 +01:00
Chris Smowton
9e0cf5a2fd
Update test expectations to include subpaths
2021-10-06 12:17:49 +01:00
Chris Smowton
3607d50994
Update remote flow source locations
2021-10-06 12:17:46 +01:00
luchua-bc
02bfa1ca57
Optimize the query
2021-10-06 12:16:04 +01:00
luchua-bc
0621e65827
Query to detect exposure of sensitive information from android file intent
2021-10-06 12:16:04 +01:00
Dave Bartolomeo
91b2ee2f10
Merge pull request #6822 from github/lgtm.com
...
Make sure the lgtm.com branch is an ancestor of rc/3.3
2021-10-06 06:58:13 -04:00
Geoffrey White
4c6f4ef14b
Revert "C++: change note" and "C++: Exclusion rules for system macros"
...
This reverts commit a055c86c4f .
This reverts commit 237a7d34b8 .
2021-10-06 10:21:19 +01:00
Harry Maclean
c50a6c180f
Merge pull request #318 from github/hmac-open-query
...
Add a query for uses of `Kernel.open` and `IO.read`
2021-10-06 10:05:43 +01:00
Anders Schack-Mulligen
d0b307ecfb
Merge pull request #6103 from atorralba/atorralba/promote-insecure-javamail
...
Java: Promote Insecure JavaMail SSL Configuration from experimental
2021-10-06 09:24:11 +02:00
Anders Schack-Mulligen
9505846088
Merge pull request #6821 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-10-06 09:06:14 +02:00
github-actions[bot]
33ee947f8d
Add changed framework coverage reports
2021-10-06 00:08:24 +00:00
Andrew Eisenberg
57ef989a89
Fixes compile errors by moving files
...
The two files moved in this commit are referenced from the
javascript/lib qlpack, but they are located in the
javascript/src qlpack. This causes compile errors when running
compile-ish commands for javascript queries. Moving the
files fixes it.
2021-10-05 14:00:02 -07:00
Andrew Eisenberg
0590e2a5fb
Ignore .codeql folder
2021-10-05 13:42:36 -07:00
Chris Smowton
5b13232a9d
Merge pull request #6739 from joefarebrother/android-intent-extra
...
Java: Model Android Bundle and Intent extras methods
2021-10-05 15:39:42 +01:00
Tom Hvitved
1d1215923c
Merge pull request #323 from github/hvitved/get-value-text
...
Introduce `Expr::getValueText`
2021-10-05 14:26:25 +02:00
Harry Maclean
7bf818fdf5
Refactor KernelMethodCall modelling
...
By extending `DataFlow::CallNode` instead of `MethodCall`, we get rid of
a lot of `.asExpr().getExpr()` calls.
2021-10-05 12:26:59 +01:00
Anders Schack-Mulligen
9133adac30
Java: Adjust csv validation.
2021-10-05 13:13:28 +02:00
Anders Schack-Mulligen
04892df45a
Java: Include stream method overrides.
2021-10-05 13:13:28 +02:00
Anders Schack-Mulligen
af7d633f2f
Java: Add Stream::mapMulti* and Stream::toList.
2021-10-05 13:13:28 +02:00
Anders Schack-Mulligen
ef80263106
Java: Add models for java.util.stream.
2021-10-05 13:13:27 +02:00
Anders Schack-Mulligen
5d63a76e25
Merge pull request #6797 from Marcono1234/marcono1234/remove-overwritten-NestedType-isStatic-qldoc
...
Java: Remove overwritten `NestedType.isStatic()` QLDoc
2021-10-05 13:05:53 +02:00
Joe Farebrother
b956238efa
Fill in gen/get methods for tests
2021-10-05 12:01:25 +01:00
Harry Maclean
232fb9ad5b
Add cwe-073 tag to KernelOpen query
...
CWE-073 is External Control of File Name or Path, which applies here.
2021-10-05 11:13:58 +01:00
Harry Maclean
6f293c7a5e
Add a query for uses of Kernel.open and IO.read
2021-10-05 11:13:58 +01:00
Harry Maclean
0fcb079ba7
Merge pull request #326 from github/hmac/eval-fixes
...
Make Code execution query more specific
2021-10-05 10:57:54 +01:00
Calum Grant
a95b87dfcb
Update CONTRIBUTING guidelines
2021-10-05 10:48:34 +01:00
Calum Grant
d8a19ecd6e
Initial version of CONTRIBUTING from codeql-go
2021-10-05 10:30:22 +01:00
Calum Grant
d8209719e1
Moved developer information into its own doc
2021-10-05 10:28:40 +01:00
Harry Maclean
e419fc9599
Make Code execution query more specific
...
Only the first argument to eval, instance_eval, send, class_send and
module_send is interpreted as Ruby code.
2021-10-05 10:28:34 +01:00
haby0
a17b0d4e5c
Modify Sanitizer
2021-10-05 17:12:04 +08:00
Mathias Vorreiter Pedersen
b089e6d84e
C++/C#: Fix QLDoc of 'CopyInstruction'.
2021-10-05 09:14:20 +01:00
Asger Feldthaus
3a20ca96c4
JS: Update CWE tags and severity score of code injection query
...
The derived security-severity score of the JS code injection query
was much lower than for other languages (6.1 versus 9.3), possibly due
some differences in CWE tags, such as the inclusion of CWE-079.
We also add the more specific CWE-095 ("eval injection") for consistency
with other languages. It is a child of CWE-094 ("code injection") which
was already tagged.
2021-10-05 10:12:19 +02:00
Asger Feldthaus
c4e8af983a
JS: Update score and add CWE-730 to LoopBoundInjection
...
This is a denial-of-service query, but was missing the CWE-730 tag
("denial of service") and consequently had a lower score than the
other DoS queries.
2021-10-05 10:10:01 +02:00
Asger Feldthaus
682a71176d
JS: Make TaintedFormatString have same severity as LogInjection
...
The CWE number for this query is associated with buffer overflows
from printf/scanf-style functions in C++, which has likely determined
its derived security score.
But in JavaScript, a tainted format string is unlikely to lead to
anything worse than log injection so we're manually update its score
to reflect this.
2021-10-05 10:10:01 +02:00
Asger Feldthaus
83ca4ef6d9
JS: Lower security-severity of queries with speculative threat model
...
In the CVSS calculator we model this by setting 'Attack Complexity' to
High and 'User Interaction' to Low (as opposed to None).
CVSS vector:
CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N
2021-10-05 10:10:01 +02:00
Tony Torralba
a86cbd884e
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-10-05 09:40:22 +02:00
Tony Torralba
3323f7ab1a
Fix qhelp
2021-10-05 09:18:50 +02:00
Tony Torralba
9f54b1065a
Apply suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2021-10-05 09:18:49 +02:00
Tony Torralba
9c1021134a
Add some links to qhelp
2021-10-05 09:18:49 +02:00
Tony Torralba
2d1278ece5
Consider setStartTLSRequired for Apache SimpleEmail
2021-10-05 09:18:48 +02:00
Tony Torralba
baffb0ed89
Consider Jakarta Mail
2021-10-05 09:18:47 +02:00
Tony Torralba
a2e9c2f4ab
Apply suggestions from code review
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-10-05 09:18:47 +02:00
Tony Torralba
c13bf2a2a1
Add change note
2021-10-05 09:18:46 +02:00
Tony Torralba
73653f77aa
Use InlineExpectationsTest
2021-10-05 09:18:45 +02:00
Tony Torralba
8c6d58e6d8
Refactored into libraries
2021-10-05 09:18:44 +02:00
Tony Torralba
0e149f0523
Move from experimental
2021-10-05 09:18:44 +02:00
CodeQL CI
40d98ad678
Merge pull request #6789 from asgerf/js/restrict-package-exports
...
Approved by erik-krogh
2021-10-05 06:20:23 +01:00
Aditya Sharad
9913221010
CLI docs: Add example for creating a database using a Bazel build command
...
We have internal material on this subject, so it makes sense to have a reference example.
Bazel builds could be in any compiled language, so follow the pattern
of the generic build script example.
Include the build flags that we recommend to customers,
which turn off Bazel's caching and distributed behaviour
so that CodeQL can observe the entire build.
2021-10-04 11:08:43 -07:00
yoff
f230a37004
Merge pull request #6804 from tausbn/python-fix-bad-magic-in-conditionblock-controls
...
Python: Fix bad magic in `controls/2`
2021-10-04 19:16:06 +02:00
Geoffrey White
11b8d4191f
C++: Repair .expected following merge.
2021-10-04 16:53:33 +01:00
Geoffrey White
2c64fa50d2
Merge branch 'main' into impropnullfp
2021-10-04 16:51:21 +01:00
Mathias Vorreiter Pedersen
7f7f90681f
Merge pull request #6808 from MathiasVP/add-cwes-to-incorrect-allocation-handling
...
C++: Add more CWEs to 'cpp/incorrect-allocation-error-handling'.
2021-10-04 17:02:08 +02:00
Marcono1234
0bce8234d8
Java: Remove overwritten NestedType.isStatic() QLDoc
...
Did not mention nested non-member interfaces and record classes.
The documentation of the overridden `isStatic()` predicate already mentions
that this predicate holds for explicitly and implicitly static elements, so
overwriting it is not necessary and only adds more maintenance work.
2021-10-04 16:30:57 +02:00
Anders Schack-Mulligen
745ece6e6d
Merge pull request #6613 from Marcono1234/marcono1234/literals-test-split
...
Java: Split literals tests
2021-10-04 16:20:08 +02:00
Mathias Vorreiter Pedersen
eac0222f2c
C++: Add more CWEs to 'cpp/incorrect-allocation-error-handling'.
2021-10-04 15:15:40 +01:00
Tom Hvitved
70e41b180e
Merge pull request #6800 from hvitved/csharp/constant-cond-tuple-discard
...
C#: Filter discards in tuples in `ConstantCondition.ql`
2021-10-04 14:38:45 +02:00
Tom Hvitved
9762ce706b
Merge pull request #6799 from hvitved/csharp/dead-store-using-discard
...
C#: Filter using `var _ = ... results` from `DeadStoreOfLocal.ql`
2021-10-04 14:38:15 +02:00
Chris Smowton
041aff6bfd
Merge pull request #6802 from atorralba/atorralba/fix-flowtestcasegenerator-folder
...
Java: Fix flow test case generator's folder name
2021-10-04 13:36:01 +01:00
Nick Rolfe
b955fdb58d
Merge pull request #324 from github/clippy_fixes
...
clippy fixes
2021-10-04 13:35:26 +01:00
Nick Rolfe
2a44cd8c98
Merge pull request #6803 from nickrolfe/cpp_upgrade_script
...
C++: add upgrade script for dbscheme comment changes
2021-10-04 13:31:13 +01:00
Taus
54aec7bb96
Python: Fix bad magic in controls/2
...
The changes to `ModificationOfParameterWithDefault.ql` and the use of
`ConditionBlock::controls` therein caused the `BasicBlock` argument to
get magicked in, resulting in the following antijoin for the `forall`:
```
[2021-10-04 12:07:46] (108s) Tuple counts for GuardedControlFlow::ConditionBlock::controls_dispred#fbf#antijoin_rhs/5@d84e94 after 1m44s:
201222345 ~7% {5} r1 = JOIN GuardedControlFlow::ConditionBlock::controls_dispred#fbf#shared#2 WITH Flow::BasicBlock::getASuccessor_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0 'arg1', Rhs.1 'arg4', Lhs.1 'arg0', Lhs.2 'arg2', Lhs.3 'arg3'
200599933 ~4% {5} r2 = JOIN r1 WITH Flow::BasicBlock::dominates#ff ON FIRST 2 OUTPUT Lhs.2 'arg0', Lhs.0 'arg1', Lhs.3 'arg2', Lhs.4 'arg3', Lhs.1 'arg4'
0 ~0% {4} r3 = JOIN GuardedControlFlow::ConditionBlock::controls_dispred#fbf#shared#1 WITH GuardedControlFlow::ConditionBlock#class#f ON FIRST 1 OUTPUT Lhs.0 'arg3', Lhs.2 'arg1', Lhs.1 'arg0', false
0 ~0% {4} r4 = JOIN GuardedControlFlow::ConditionBlock::controls_dispred#fbf#shared WITH GuardedControlFlow::ConditionBlock#class#f ON FIRST 1 OUTPUT Lhs.0 'arg3', Lhs.2 'arg1', Lhs.1 'arg0', true
0 ~0% {4} r5 = r3 UNION r4
0 ~0% {5} r6 = JOIN r5 WITH Flow::BasicBlock::getASuccessor_dispred#ff ON FIRST 2 OUTPUT Lhs.2 'arg0', Lhs.1 'arg1', Lhs.3 'arg2', Lhs.0 'arg3', Rhs.0
200599933 ~4% {5} r7 = r2 UNION r6
return r7
```
(cancelled)
I observed that quick-eval'ing the `controls` predicate exhibit no such
bad join order (and terminated quickly) which lead me to conclude that
this was a case of bad magic.
Adding the `pragma[nomagic]` resulted in a return to the previous
performance.
2021-10-04 12:16:53 +00:00
Tony Torralba
064aba810b
Remove hyphens from the flow testcase generator folder name
...
So that it can be imported from the autogenerated query `gen.ql`
2021-10-04 13:31:07 +02:00
Nick Rolfe
5aec84b672
C++: add upgrade script for dbscheme comment changes
2021-10-04 12:30:42 +01:00
Asger Feldthaus
cbd577694c
JS: Autoformat
2021-10-04 13:30:15 +02:00
Tom Hvitved
a315640082
C#: Address review comments
2021-10-04 13:15:26 +02:00
Nick Rolfe
46d1280d07
Fix clippy warnings in extractor
2021-10-04 12:07:49 +01:00
Tom Hvitved
f06632a8e7
C#: Filter discards in tuples in ConstantCondition.ql
2021-10-04 13:04:18 +02:00
Nick Rolfe
a188e73f7b
Fix clippy warnings in generator
2021-10-04 11:55:55 +01:00
Erik Krogh Kristensen
8d6cac76cc
apply suggestions from asgerf
2021-10-04 12:45:02 +02:00
Nick Rolfe
087958be2d
Fix clippy warnings in node-types
2021-10-04 11:44:21 +01:00
Nick Rolfe
1e38c705b8
Fix clippy warnings in autobuilder
2021-10-04 11:44:14 +01:00
Rasmus Lerchedahl Petersen
aa91c26792
Python: Add missing taint steps
2021-10-04 12:12:07 +02:00
yoff
4521a9fdf0
Update python/ql/lib/semmle/python/frameworks/Stdlib.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-10-04 11:36:53 +02:00
Anders Schack-Mulligen
65a4f36cf8
Merge pull request #6767 from aschackmull/dataflow/callback-postupdate
...
Dataflow: Support side-effects for callbacks in summaries.
2021-10-04 11:13:18 +02:00
Tom Hvitved
70b9b002cb
C#: Add change note
2021-10-04 10:48:07 +02:00
Tom Hvitved
682a2aae3a
C#: Filter using var _ = ... results from DeadStoreOfLocal.ql
2021-10-04 10:45:44 +02:00
Jonas Jensen
ce27acd099
Merge pull request #6793 from MathiasVP/add-return-value-deref-to-model-util
...
C++: Handle return value dereferences in `ModelUtil.qll`
2021-10-04 09:22:52 +02:00
Marcono1234
fb1385b3e8
Java: Fix formatting of SpuriousJavadocParam.java
2021-10-03 00:13:36 +02:00
Owen Mansel-Chan
938d003e5e
Fix example to use space after $ for consistency
2021-10-02 08:11:49 +01:00
Owen Mansel-Chan
25792b2a45
Change class name to avoid clash with Go and Javascript libraries
2021-10-02 08:04:17 +01:00
Porcuiney Hairs
cf31b6e7f6
fix testcases
2021-10-02 02:10:18 +05:30
Mathias Vorreiter Pedersen
cc8b581c06
C++: Accept test changes.
2021-10-01 22:23:17 +02:00
Mathias Vorreiter Pedersen
cca77ed65c
Merge branch 'main' into add-return-value-deref-to-model-util
2021-10-01 22:02:06 +02:00
Geoffrey White
b9a1a451a9
C++: Autoformat.
2021-10-01 19:21:30 +01:00
Tamás Vajk
62aa7b75bd
Merge pull request #6792 from tamasvajk/fix/csv-workflow
...
Let 'ql/lib' folders trigger the CSV workflow
2021-10-01 19:44:48 +02:00
Mathias Vorreiter Pedersen
0679142607
C++: Accept test changes.
2021-10-01 18:27:55 +02:00
Mathias Vorreiter Pedersen
3463c28e24
C++: Add return value dereference to 'callOutput'. This will need to be modified once we get return value side effects in the IR.
2021-10-01 18:27:46 +02:00
Marcono1234
e3fed55945
Java: Add tests for text blocks
2021-10-01 18:16:11 +02:00
Joe Farebrother
085701c7db
Remove models.csv
2021-10-01 17:11:12 +01:00
Geoffrey White
51188aa93f
C++: Give the two queries medium precision (for now).
2021-10-01 17:04:22 +01:00
Joe Farebrother
5e4498a53a
Add more models; fix tests
2021-10-01 16:53:53 +01:00
Geoffrey White
a62772c274
C++: Add change note.
2021-10-01 16:35:12 +01:00
Marcono1234
924b7320bc
Java: Add test for NullLiteral
2021-10-01 17:27:54 +02:00
Marcono1234
bb6e6f4808
Java: Split literals tests
...
This allows changing individual tests in the future without having to adjust
the expected output of all other tests.
2021-10-01 17:27:50 +02:00
Geoffrey White
ada30800c9
C++: Exclude results where identity-like functions obscure operations on a variable.
2021-10-01 16:16:06 +01:00
Anders Schack-Mulligen
99ba80d492
C#: Adjust test output.
2021-10-01 16:57:30 +02:00
Tamas Vajk
ebe0988d9a
Let 'ql/lib' folders trigger the CSV workflow
2021-10-01 16:30:56 +02:00
Arthur Baars
2f462771bb
Merge pull request #286 from github/aibaars/xxe
...
XXE query
2021-10-01 16:14:41 +02:00
Geoffrey White
11d7a0b712
C++: Exclude results where the address of the variable is taken.
2021-10-01 14:39:02 +01:00
Geoffrey White
d41e517757
C++: Simplify mayAddNullTerminator.
2021-10-01 14:15:05 +01:00
Geoffrey White
ec2e4f432a
C++: Add more test cases, inspired by FPs on LGTM with the query.
2021-10-01 14:03:41 +01:00
Geoffrey White
74957dcb2e
C++: Test spacing.
2021-10-01 13:59:34 +01:00
Anders Schack-Mulligen
6359c44622
Java: Autoformat.
2021-10-01 14:05:47 +02:00
yoff
1ce9426adf
Merge pull request #6761 from RasmusWL/cryptodome-sha3
...
Python/JS: Recognize SHA-3 hash functions
2021-10-01 13:33:36 +02:00
Anders Schack-Mulligen
98f68cb053
Dataflow: Sync.
2021-10-01 13:11:43 +02:00
Anders Schack-Mulligen
490df2027b
Dataflow: Add language-specific predicate forceHighPrecision().
2021-10-01 13:11:14 +02:00
Anders Schack-Mulligen
d4f1a9602f
Dataflow: Force high precision of certain Contents.
2021-10-01 13:03:50 +02:00
Anders Schack-Mulligen
eb26b4a04b
Merge pull request #6755 from alexet/alexet/cache-params-string
...
Java: Fix more performance issues with future versions of codeql.
2021-10-01 12:54:53 +02:00
Arthur Baars
5a454bb9f2
Add comment
2021-10-01 12:13:19 +02:00
Asger Feldthaus
c8e7df7900
JS: Add test case
2021-10-01 12:02:40 +02:00
Asger Feldthaus
600e5bad0d
JS: Exclude methods declared private/protected
2021-10-01 11:46:32 +02:00
Asger Feldthaus
af1b04de9c
JS: Restrict what property names that are considered public exports
2021-10-01 11:42:03 +02:00
Arthur Baars
c78d02d00d
Fix module of Parser::Options
2021-10-01 11:18:03 +02:00
Arthur Baars
b06bb7a789
Improve test cases
...
Set NONET (2048) by default.
2021-10-01 11:16:56 +02:00
Erik Krogh Kristensen
5a1eb1995c
add change note
2021-10-01 11:13:41 +02:00
Mathias Vorreiter Pedersen
a3cf721b9e
Merge pull request #6713 from geoffw0/cwe139
...
C++: New query for 'Cleartext transmission of sensitive information'
2021-10-01 11:10:36 +02:00
Tom Hvitved
08225181c8
Introduce Expr::getValueText
2021-10-01 11:03:46 +02:00
Geoffrey White
679b0f9b73
C++: Autoformat.
2021-10-01 09:40:16 +01:00
Rasmus Lerchedahl Petersen
175a06fe73
Python: Fix compile error due to predicate rename
2021-10-01 10:33:42 +02:00
Anders Schack-Mulligen
799e099d1d
Merge pull request #6784 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-10-01 10:05:34 +02:00
Erik Krogh Kristensen
694016dcbe
add missing qldoc
2021-10-01 09:01:57 +02:00
Erik Krogh Kristensen
6a9277b5ce
recognize string sanitizers for ldap-injection
2021-10-01 09:01:29 +02:00
Erik Krogh Kristensen
51b56a9e28
add cwe 090 (ldap injection) and cwe 943 (Improper Neutralization of Special Elements in Data Query Logic) to SqlInjection.ql
2021-10-01 09:01:29 +02:00
Erik Krogh Kristensen
2062afc868
add calls to parseDN as sinks for ldap-injection
2021-10-01 09:01:28 +02:00
Erik Krogh Kristensen
d4de5e3248
refactoring and renamings in the ldap model
2021-10-01 09:01:14 +02:00
Erik Krogh Kristensen
bcf4626fd0
remove ldap examples from experimental folder
2021-10-01 09:00:10 +02:00
Erik Krogh Kristensen
c55b7bcd85
model ldap filters as taint steps
2021-10-01 09:00:10 +02:00
Erik Krogh Kristensen
9b5ff66b68
naively port tests from ldap examples
2021-10-01 09:00:10 +02:00
Erik Krogh Kristensen
2b286a856c
naively move ldap into the SQL injection query
2021-10-01 09:00:10 +02:00
Erik Krogh Kristensen
94e2676c0f
naive conversion of ldapjs model to API node
2021-10-01 09:00:10 +02:00
github-actions[bot]
3d61c81456
Add changed framework coverage reports
2021-10-01 00:09:22 +00:00
Rasmus Wriedt Larsen
2d5c6e2723
Python: FastAPI: Add taint test
2021-09-30 19:14:15 +02:00
Rasmus Wriedt Larsen
c839f35485
Python: FastAPI: Proper modeling of implicit returns
2021-09-30 19:14:15 +02:00
Rasmus Wriedt Larsen
50147708bf
Python: FastAPI: Model response classes
...
Figuring out how to do the `media_type` tracking was quite difficult.
2021-09-30 19:14:15 +02:00
Rasmus Wriedt Larsen
eef946a0c8
Python: FastAPI: Add test for custom response annotation
...
It really is rather contrived, but it also _does_ work.
2021-09-30 19:14:15 +02:00
Rasmus Wriedt Larsen
c9895b54fe
Python: FastAPI: Add tests for direct response construction
2021-09-30 19:14:14 +02:00
Rasmus Wriedt Larsen
c50c805f5f
Python: FastAPI: Model Cookie Writes
2021-09-30 19:14:14 +02:00
Rasmus Wriedt Larsen
d34c5fd72f
Python: FastAPI: Add tests with response parameter
2021-09-30 19:14:14 +02:00
Rasmus Wriedt Larsen
285de2b4c8
Python: FastAPI: Add support for APIRouter
2021-09-30 19:14:14 +02:00
Rasmus Wriedt Larsen
b1f8b5352b
Python: FastAPI: Add support for api_route
...
Note that `route` did not actually work (that also comes from the
underlying web framework library Starlette)
2021-09-30 19:14:14 +02:00
Rasmus Wriedt Larsen
3661ff3bd8
Python: Add basic FastAPI support
2021-09-30 19:14:14 +02:00
Chris Smowton
f48c418d6d
Merge pull request #5907 from x-f1v3/java/hardcoded-shiro-key
...
Java: CWE-798: Query to detect hard-coded SHIRO key
2021-09-30 17:58:12 +01:00
Chris Smowton
ec4cb7c90f
Fix typo
2021-09-30 16:22:12 +01:00
Harry Maclean
f61161e66d
Merge pull request #321 from github/hmac-more-eval
...
Identify more instances of code injection
2021-09-30 16:12:24 +01:00
Chris Smowton
cb4ce36d3c
Update change note; drop unnecessary import
2021-09-30 15:00:13 +01:00
Chris Smowton
b0983cb726
Specifically include Base64 encode/decode as a likely intermediate step for hardcoded credentials
2021-09-30 14:57:49 +01:00
Chris Smowton
b57a58c253
Amend change note
2021-09-30 14:27:05 +01:00
f1v3
24c9bb2fb7
autoformat
2021-09-30 14:26:19 +01:00
f1v3
168fc4170d
Apply suggestions from code review
2021-09-30 14:26:14 +01:00
f1v3
f3bde56de9
detects a hard-coded cipher key for shiro
2021-09-30 14:22:48 +01:00
Harry Maclean
8c0c08e887
Identify more instance of code injection
...
`class_eval` and `module_eval` both take a string as argument and
execute it as Ruby code.
2021-09-30 14:19:24 +01:00
Chris Smowton
60a023d064
Merge pull request #5852 from luchua-bc/java/hardcoded-azure-credential
...
Java: CWE-798 Query to detect hard-coded Azure credentials
2021-09-30 14:11:29 +01:00
Rasmus Lerchedahl Petersen
35d9005eae
Python: typo again..
2021-09-30 14:39:44 +02:00
Rasmus Lerchedahl Petersen
f3fc56a167
Python: typos
2021-09-30 14:39:05 +02:00
Rasmus Lerchedahl Petersen
d19d37bf9b
Python: more suggestions from review
2021-09-30 14:36:26 +02:00
yoff
c1c63d0c28
Merge pull request #6738 from RasmusWL/qldoc-getArgByName
...
Python: Add QLDoc to `Function.getArgByName`
2021-09-30 14:11:18 +02:00
yoff
46e62cd963
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-09-30 14:00:18 +02:00
Rasmus Lerchedahl Petersen
02e91b3902
Python: Model functions that will raise
...
on non-existing files.
2021-09-30 13:36:24 +02:00
Harry Maclean
7f103b9450
Merge pull request #319 from github/hmac-activerecord-updates
...
Add some more vulnerable ActiveRecord methods
2021-09-30 12:09:09 +01:00
Arthur Baars
0419d28ba0
XXE: overapproximate feature flag values for & and | operators
2021-09-30 11:20:23 +02:00
Arthur Baars
089f9d87d4
Address comments
2021-09-30 11:20:23 +02:00
Arthur Baars
2b077595ae
Also track DTDLOAD and NONET
2021-09-30 11:20:23 +02:00
Arthur Baars
4268d9c565
XXE query
2021-09-30 11:20:17 +02:00
Harry Maclean
7191e1c007
Re-add delete_all and destroy_all methods
...
These methods don't take any arguments in Rails versions > 3, but
there's no harm in checking for them anyway, and some people might be
using very old Rails versions.
2021-09-30 09:39:58 +01:00
Harry Maclean
75bbc51e73
Make room for new test cases
...
This just bumps the other code down a bit so that the .expected diff is
easier to read.
2021-09-30 09:33:39 +01:00
Rasmus Lerchedahl Petersen
fc9fb59082
Python: Add comments
2021-09-30 10:05:57 +02:00
Jonas Jensen
45cf6344cd
Merge pull request #6184 from github/rdmarsh2/improve-exec-tainted
...
C++: Refactor ExecTainted.ql to only report results after string concatenation
2021-09-29 19:21:13 +02:00
CodeQL CI
e9b4e571e1
Merge pull request #6775 from RasmusWL/fix-hasLocationInfo-url
...
Approved by aschackmull, erik-krogh, hvitved, jbj, tausbn
2021-09-29 16:51:08 +01:00
alexet
447eb23356
Java: Fix for tc magic issue with subtyping.
2021-09-29 16:01:08 +01:00
Rasmus Lerchedahl Petersen
115113888f
Python: Add change note
2021-09-29 16:58:14 +02:00
Rasmus Lerchedahl Petersen
cc1c32cf0e
Python: model file accesses
2021-09-29 16:53:25 +02:00
Joe Farebrother
3ae5f13c3d
Generate tests and stubs
2021-09-29 15:44:21 +01:00
Tamás Vajk
089bb33113
Merge pull request #6773 from tamasvajk/fix/global-stmt-library
...
C#: Handle invalid code gracefully: global statements in library
2021-09-29 16:18:05 +02:00
Harry Maclean
0ea228e86f
Merge pull request #315 from github/hmac-outgoing-http
...
Model more HTTP clients
2021-09-29 14:26:56 +01:00
Harry Maclean
a9c00a05fe
HTTP -> Http
...
Change the capitalisation of HTTP to Http, to conform to the QL style
guide.
Leave the HTTP module in Concepts alone, so it remains consistent with
the Concepts in other language libraries.
2021-09-29 13:50:05 +01:00
Nick Rolfe
1d58f8cd50
Merge pull request #320 from github/rasmuswl/fix-hasLocationInfo-url
2021-09-29 13:23:08 +01:00
Tom Hvitved
c69762bc14
Merge pull request #317 from github/hvitved/disable-operation-resolution
...
Temporarily disable operation call resolution
2021-09-29 14:17:05 +02:00
Rasmus Wriedt Larsen
3a270abcdc
Fix hasLocationInfo URL reference
...
Port of https://github.com/github/codeql/pull/6775
2021-09-29 14:04:25 +02:00
Rasmus Wriedt Larsen
ba990f72f2
Another hasLocationInfo URL reference fix
2021-09-29 14:00:28 +02:00
Harry Maclean
f5f79a81bc
Update ActionController fixture
2021-09-29 12:51:26 +01:00
Rasmus Wriedt Larsen
987b573709
Fix hasLocationInfo URL reference
...
Follow up to https://github.com/github/codeql/pull/5830
2021-09-29 13:47:58 +02:00
alexet
dea8dde566
Java: Improve performance of confusing overloading query.
2021-09-29 12:17:30 +01:00
Harry Maclean
615beeec80
Identify more vulnerable ActiveRecord methods
...
This change identifies the following patterns:
- `Model.select(input)`
- `Model.reselect(input)`
- `Model.rewhere(input)`
- `Model.update_all(input)`
- `model.reload(lock: input)`
2021-09-29 11:47:07 +01:00
Harry Maclean
270d13e4ac
Identify more vulnerable ActiveRecord methods
...
`find_by!`, `find_or_create_by`, `find_or_create_by!` and
`find_or_initialize_by` act similarly to `find_by`.
2021-09-29 10:49:14 +01:00
Harry Maclean
56919eee0b
delete/destroy_all -> delete/destroy_by
...
The ActiveRecord `delete_all` and `destroy_all` methods do not take a
condition argument - they act on the scope of their receiver.
The `delete_by` and `destroy_by` methods do take an argument which can
be raw SQL, and are therefore vulnerable to SQL injection.
For more info:
https://api.rubyonrails.org/v6.1.4/classes/ActiveRecord/Relation.html#method-i-delete_all
https://api.rubyonrails.org/v6.1.4/classes/ActiveRecord/Relation.html#method-i-delete_by
2021-09-29 10:45:54 +01:00
Harry Maclean
3a1b294c21
Identify more ActiveRecord calculate methods
...
`average`, `count`, `maximum`, `minimum` and `sum` are all convenience
methods that call `calculate(:<method name>, ...)` under the hood.
Therefore they are vulnerable to SQL injection too.
2021-09-29 10:11:38 +01:00
Tamas Vajk
e17071723f
C#: Handle invalid code gracefully: global statements in library
2021-09-29 10:23:33 +02:00
Mathias Vorreiter Pedersen
8dcf7926de
Merge pull request #6760 from andersfugmann/relax_memberMayBeVarSize
...
Increase precision to high for cpp/static-buffer-overflow
2021-09-29 10:09:11 +02:00
Tom Hvitved
10d19bf05b
Temporarily disable operation call resolution
2021-09-29 09:40:41 +02:00
Benjamin Muskalla
d09c3bf863
Merge pull request #6748 from bmuskalla/fixHiddenTypesTestGenerator
...
Java: Avoid stubbing methods with private parameter types
2021-09-29 09:27:13 +02:00
Anders Schack-Mulligen
1a92fa5d92
Merge pull request #6772 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-09-29 09:25:19 +02:00
github-actions[bot]
8d2ad4ed17
Add changed framework coverage reports
2021-09-29 00:08:05 +00:00
Porcuiney Hairs
b9c08167f3
C# : Add query to detect SSRF
2021-09-29 04:14:22 +05:30
Erik Krogh Kristensen
aafae24ef2
update qhelp
2021-09-28 23:11:02 +02:00
Erik Krogh Kristensen
8d556ed1e1
Update python/ql/lib/semmle/python/security/BadTagFilterQuery.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-09-28 23:04:28 +02:00
Calum Grant
5317022d2e
Basic query for Ruby
2021-09-28 20:51:21 +01:00
Geoffrey White
89098f54be
C++: Correct comment.
2021-09-28 20:03:42 +01:00
Benjamin Muskalla
5f659f6e48
Merge branch 'main' into fixHiddenTypesTestGenerator
2021-09-28 17:42:39 +02:00
Rasmus Lerchedahl Petersen
a5912ff76d
Python: Align implementations of awaited.
2021-09-28 16:42:19 +02:00
Geoffrey White
10323ac819
Update cpp/ql/src/Security/CWE/CWE-311/CleartextStorage.inc.qhelp
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-09-28 15:13:29 +01:00
Shati Patel
ee46717c76
Merge pull request #6771 from shati-patel/mergeback-3.2-main
...
Merge 3.2 into main
2021-09-28 14:52:17 +01:00
Jonas Jensen
914e621d1b
Merge pull request #6678 from andersfugmann/refactor_use_of_isGuardPhi
...
C++: Refactor code to use predicate isGuardPhi/4
2021-09-28 15:45:05 +02:00
Shati Patel
976190e84d
Merge pull request #6764 from shati-patel/slides-links
...
Docs: Fix a few links in the training slides
2021-09-28 14:35:46 +01:00
Mathias Vorreiter Pedersen
06eb93da3f
Merge pull request #6769 from github/docfix-dead-links-in-readme
...
Fix dead links in README.md
2021-09-28 15:21:19 +02:00
Mathias Vorreiter Pedersen
7197f41e75
Fix dead links in README.md
2021-09-28 15:12:36 +02:00
Edoardo Pirovano
5488872044
Merge pull request #6505 from edoardopirovano/trailing-comma
...
QL Language Spec: Trailing comma in set literal
2021-09-28 13:45:09 +01:00
Chris Smowton
413ac4e8f4
Merge pull request #6684 from owen-mc/java/model/apache-collections-subpackages
...
Java: model remaining subpackages of Apache Commons Collections
2021-09-28 12:28:48 +01:00
Anders Schack-Mulligen
e95dc82087
Autoformat.
2021-09-28 13:00:50 +02:00
Tony Torralba
cec6cd0830
Merge pull request #6724 from atorralba/atorralba/android-contentprovider-sources
...
Java: Add sources for content providers in Android
2021-09-28 12:13:54 +02:00
Chris Smowton
39a12a8464
Remove models that are no longer required
2021-09-28 10:48:43 +01:00
Anders Schack-Mulligen
b11cb88a9f
Dataflow: Sync to C#.
2021-09-28 11:45:33 +02:00
Anders Schack-Mulligen
9a9bbe3123
Dataflow: Support side-effects for callbacks in summaries.
2021-09-28 11:42:38 +02:00
Tony Torralba
46eb27cd01
Don't restrict inputs to be ParameterNodes
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-09-28 11:21:56 +02:00
Anders Fugmann
ba98c0c1cb
Merge remote-tracking branch 'upstream/main' into relax_memberMayBeVarSize
2021-09-28 11:15:11 +02:00
Harry Maclean
6d7a04a222
Move Files test to its own folder
...
This prevents it picking up fixtures from other tests.
2021-09-28 10:06:53 +01:00
Harry Maclean
b34fcc65d1
Model the Typhoeus http client
2021-09-28 10:06:53 +01:00
Harry Maclean
b5dec5e8cf
Model the OpenURI http client
2021-09-28 10:06:53 +01:00
Anders Schack-Mulligen
fc8b439263
Merge pull request #6740 from aschackmull/java/callback-dispatch
...
Java: Add callback dispatch to more anonymous classes.
2021-09-28 10:49:27 +02:00
Anders Peter Fugmann
a358ea8667
C++: Apply documentation change suggestion
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-09-28 10:38:02 +02:00
Anders Schack-Mulligen
c294b75f6c
Merge pull request #6766 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-09-28 10:35:43 +02:00
Shati Patel
d5e17f9ebf
Merge pull request #6765 from shati-patel/docs-config-fixes
...
Docs: Fix inconsistencies in sphinx config files
2021-09-28 09:18:02 +01:00
Anders Peter Fugmann
c7ea7ca5cd
C++: Apply documentation change suggestion
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-09-28 09:40:25 +02:00
Anders Peter Fugmann
49c656d904
C++: Apply documentation change suggestion
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-09-28 09:40:07 +02:00
Anders Fugmann
79549c2285
Merge remote-tracking branch 'upstream/main' into refactor_use_of_isGuardPhi
2021-09-28 09:38:16 +02:00
Owen Mansel-Chan
787f36f056
Add a change note
2021-09-28 07:32:28 +01:00
Robert Marsh
d47c4732e2
C++: Update change note date
2021-09-27 17:36:14 -07:00
github-actions[bot]
b7b229d59b
Add changed framework coverage reports
2021-09-28 00:08:59 +00:00
Robert Marsh
dfb27d170c
C++ fix test compilation errors
2021-09-27 13:58:54 -07:00
luciaromeroML
1fc58e51a3
adding suggestion that removes sanitizer for unknown base urls
2021-09-27 17:37:36 -03:00
luciaromeroML
1f2618b893
new test case for unknown base url
2021-09-27 17:37:11 -03:00
shati-patel
64fcbe05c3
Docs: Fix inconsistencies in sphinx config files
2021-09-27 18:54:23 +01:00
luchua-bc
378db7de87
Remove local user input and use fluent model
2021-09-27 17:33:04 +00:00
shati-patel
31c34870ef
Fix warning about "Anonymous hyperlink mismatch"
2021-09-27 18:27:57 +01:00
shati-patel
3c17ac424d
Docs: Fix some broken/redirected links
2021-09-27 18:27:30 +01:00
Calum Grant
64ae42014c
Update README.md
2021-09-27 17:46:15 +01:00
Felicity Chapman
bb6c079e5a
Merge pull request #6762 from github/felicitymay-patch-1
...
Update links to match those on the staging site
2021-09-27 16:49:58 +01:00
Felicity Chapman
a3c1975a84
Update links to match those on the staging site
2021-09-27 16:35:22 +01:00
Owen Mansel-Chan
bdd78d2bc7
Fix stub
2021-09-27 16:24:41 +01:00
Owen Mansel-Chan
29db42c3cd
Generate stubs
2021-09-27 16:24:40 +01:00
Owen Mansel-Chan
e6df8164cf
Fix up old tests for new helper functions
2021-09-27 16:24:39 +01:00
Owen Mansel-Chan
cf03bd8bd1
Merge new and old tests
...
# Conflicts:
# java/ql/test/library-tests/frameworks/apache-collections/TestNew.java
2021-09-27 16:24:38 +01:00
Owen Mansel-Chan
342c14887b
Fix existing models for MapUtils
2021-09-27 16:24:37 +01:00
Owen Mansel-Chan
e1101e582e
Minor improvement to existing tests
2021-09-27 16:24:37 +01:00
Owen Mansel-Chan
768203bd36
Remove redundant casts
2021-09-27 16:24:36 +01:00
Owen Mansel-Chan
c51fb00082
Add tests for non-public abstract classes
2021-09-27 16:24:35 +01:00
Owen Mansel-Chan
0a92b04c8b
Fix up automatically generated tests
2021-09-27 16:24:34 +01:00
Owen Mansel-Chan
15161d8867
Make concrete subclasses of abstract classes
2021-09-27 16:24:33 +01:00
Owen Mansel-Chan
53ee465726
Fix errors in generated tests that stop compilation
2021-09-27 16:24:32 +01:00
Owen Mansel-Chan
a20acfee25
Add automatically generated tests
...
Also update test.ql to use the new InlineFlowTest.
2021-09-27 16:24:31 +01:00
Owen Mansel-Chan
f69787afd0
Miscellaneous model fixes
2021-09-27 16:24:30 +01:00
Owen Mansel-Chan
9b12980688
Do not model some protected methods
2021-09-27 16:24:29 +01:00
Owen Mansel-Chan
cb0f82c36e
Do not modelled protected static inner classes
2021-09-27 16:24:29 +01:00
Owen Mansel-Chan
3b678bfbc5
Address review comments
2021-09-27 16:24:28 +01:00
Owen Mansel-Chan
e1750adc38
Address problems highlighted by generating tests
2021-09-27 16:24:27 +01:00
Owen Mansel-Chan
fd0fb9483e
Model the remaining subpackages in Apache Commons Collections
2021-09-27 16:24:26 +01:00
Owen Mansel-Chan
3d1d491e6b
Model java.lang.Object.clone() better for access paths.
...
Model value flow for Element, MapKey and MapValue. This assumes
that clone() is a shallow copy.
2021-09-27 16:24:25 +01:00
Edoardo Pirovano
18020707b8
QL Language Spec: Trailing comma in set literal
2021-09-27 15:57:39 +01:00
Rasmus Lerchedahl Petersen
3c1206f873
Python: Model more awaiting construcs
...
in API graphs.
Some unsatisfactory lack of understanding here.
2021-09-27 16:41:01 +02:00
Tom Hvitved
5219b1a8b9
Merge pull request #310 from github/hvitved/more-instanceof
...
More uses of `instanceof` in the external/internal AST layer
2021-09-27 16:11:04 +02:00
Harry Maclean
ca1fc44f21
Model the HTTPClient http client
2021-09-27 14:44:25 +01:00
Harry Maclean
3a4ddc4b4e
Model the HTTParty http client
...
We currently model direct calls like
HTTParty.get("http://example.com ")
but we don't yet handle calls on other classes that have included the
`HTTParty` module, like
class MyClient
include HTTParty
end
MyClient.get("http://example.com ")
2021-09-27 14:44:04 +01:00
Tom Hvitved
8018c1525d
Merge pull request #314 from github/hvitved/setter-method-call-base
...
Strengthen the type of `SetterMethodCall`
2021-09-27 15:29:07 +02:00
Nick Rolfe
79c2f09585
Merge pull request #302 from github/rm_tokeninfo_idx
...
Remove unused columns from tokeninfo tables
2021-09-27 14:19:38 +01:00
Nick Rolfe
b2c4daecd5
Merge pull request #303 from github/nickrolfe/node_kind_id
...
Use integer comparisons instead of strings when scanning ERB files
2021-09-27 14:18:10 +01:00
Rasmus Lerchedahl Petersen
f6311bf051
Python: model other awaiting constructs
2021-09-27 14:32:55 +02:00
Rasmus Lerchedahl Petersen
15b07bfcc0
Python: Model sql executions
2021-09-27 14:15:58 +02:00
Tom Hvitved
317303cdad
Strengthen the type of SetterMethodCall
2021-09-27 14:05:28 +02:00
Anders Schack-Mulligen
cfa0d46b73
Merge pull request #6097 from atorralba/atorralba/promote-xslt-injection
...
Java: Promote XSLT Injection from experimental
2021-09-27 13:14:57 +02:00
Anders Schack-Mulligen
e027d514f1
Merge pull request #6037 from atorralba/atorralba/promote-spel-injection
...
Java: Promote SpEL Injection query from experimental
2021-09-27 13:13:35 +02:00
Tony Torralba
d5f675c2dc
Fix unbound field
...
Add tests for non-exported providers
2021-09-27 12:58:28 +02:00
Arthur Baars
2a4747b27e
Merge pull request #313 from github/hmac-remove-unicode-char
...
Remove unicode character from doc string
2021-09-27 12:57:21 +02:00
Harry Maclean
3e100bc2a9
Remove unicode character from doc string
...
We require that all source code is in ASCII.
2021-09-27 11:40:04 +01:00
Rasmus Wriedt Larsen
ded3088529
Python/JS: Recognize SHA-3 hash functions
...
Official names are SHA3-224, SHA3-256, SHA3-384, SHA3-512 as per
https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf
2021-09-27 12:08:40 +02:00
Tony Torralba
78c12dc505
Move to lib
2021-09-27 12:04:14 +02:00
Tony Torralba
ad08ccb50b
Apply suggestion from code review
2021-09-27 12:00:21 +02:00
mc
95751fcc21
Update XsltInjection.qhelp
...
Made a few minor tweaks during editorial review
2021-09-27 12:00:21 +02:00
Tony Torralba
13417dbf14
Remove DataFlow references from XsltInjection.qll
2021-09-27 12:00:20 +02:00
Tony Torralba
ff21662b23
Refactor XsltInjection.qll
2021-09-27 12:00:18 +02:00
Tony Torralba
6967b06dee
Decouple XsltInjection.qll to reuse the taint tracking configuration
2021-09-27 11:59:51 +02:00
Tony Torralba
fc58ada92e
Add change note
2021-09-27 11:58:20 +02:00
Tony Torralba
108118afa3
Use InlineExpectationsTest
2021-09-27 11:58:18 +02:00
Tony Torralba
d8bb5273e7
Refactor to use CSV sink models
2021-09-27 11:57:58 +02:00
Tony Torralba
c792567904
Move from experimental
2021-09-27 11:57:53 +02:00
Tony Torralba
6d9a88d1c8
Move to lib
2021-09-27 11:43:46 +02:00
mc
3520fed752
Update SpelInjection.qhelp
2021-09-27 11:40:51 +02:00
Tony Torralba
d10dbbdd9d
Apply suggestions from code review
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-09-27 11:40:51 +02:00
Tony Torralba
6bf1e87bbe
Remove CSV sinks; make imports private
2021-09-27 11:40:47 +02:00
Tony Torralba
91f46624b6
Refactor SpelInjection.qll
2021-09-27 11:40:26 +02:00
Tony Torralba
94f32d2985
Decouple SpelInjection.qll to reuse the taint tracking configuration
2021-09-27 11:39:30 +02:00
Tony Torralba
569426b04e
Consider subtypes of Expression and ExpressionParser
...
Add parseRaw as additional taint step
2021-09-27 11:38:12 +02:00
Tony Torralba
b0852f6c16
Add change note
2021-09-27 11:37:46 +02:00
Tony Torralba
b985ddb868
Use InlineExpectationsTest
2021-09-27 11:37:41 +02:00
Tony Torralba
079769ed2e
Refactored SpelInjection.qll to use CSV sink models
2021-09-27 11:36:56 +02:00
Tony Torralba
fc6af0476f
Moved from experimental
2021-09-27 11:36:48 +02:00
Anders Fugmann
03bd7d7f96
C++: Update test results from OverflowStatic
2021-09-27 11:23:08 +02:00
Anders Schack-Mulligen
92ffd8c465
Merge pull request #6749 from aschackmull/java/istextblock
...
Java: Add StringLiteral.isTextBlock().
2021-09-27 10:54:31 +02:00
Jonas Jensen
b0836a620c
Merge pull request #6757 from geoffw0/impropnulltest2
...
C++: Small improvement to cpp/improper-null-termination
2021-09-27 10:52:49 +02:00
Jonas Jensen
06b36f742e
Merge pull request #6745 from andersfugmann/handle_overflow_for_upperbound
...
C++: Handle overflow for upperbound
2021-09-27 10:32:49 +02:00
James Fletcher
c977cfe40a
Merge pull request #6754 from github/update-link
...
Update one more link in the QL training content
2021-09-27 08:33:42 +01:00
Anders Fugmann
e0921ac983
C++: Increase precision of cpp/static-buffer-overflow to high
2021-09-27 09:06:36 +02:00
luchua-bc
5264936fc3
Correct the run method and add Math.min check
2021-09-24 21:00:53 +00:00
Geoffrey White
7e7dfe2cc4
C++: Understand format arguments.
2021-09-24 19:25:43 +01:00
Geoffrey White
91a8b9fdd9
C++: Add suggested test (and a good variant).
2021-09-24 18:34:28 +01:00
Nick Rolfe
175958b9be
Consider Oj.load a sink for unsafe deserialization
...
Unless a known-safe mode is used, either by setting the default options,
or by explicitly passing a mode in the options hash argument.
2021-09-24 17:43:22 +01:00
Alexander Eyers-Taylor
8debae1a3b
Merge pull request #6753 from github/aibaars/fix-typo
...
Fix typo in language spec
2021-09-24 17:21:14 +01:00
Rasmus Wriedt Larsen
547cbb6322
Merge pull request #6331 from porcupineyhairs/pythonXpath
...
Python : Improve Xpath Injection Query
2021-09-24 18:11:08 +02:00
james
1adc5c2a5b
update links correctly
2021-09-24 17:00:59 +01:00
Geoffrey White
6901d9d9c2
C++: Add and use getRemoteSocket predicates.
2021-09-24 15:16:48 +01:00
Geoffrey White
9f59bc8f7b
C++: Naive translation to use RemoteFlow*Function.
2021-09-24 15:12:14 +01:00
Rasmus Wriedt Larsen
d39df18544
Python: Minor test cleanup
2021-09-24 16:11:27 +02:00
james
e664711f47
make links to slide decks relative
2021-09-24 14:56:48 +01:00
Tom Hvitved
793368d670
More uses of instanceof in the external/internal AST layer
2021-09-24 15:55:15 +02:00
Arthur Baars
7d3a219f63
Fix typo in language spec
...
Thanks to https://github.com/github/codeql/issues/6750
2021-09-24 15:47:09 +02:00
james
23e4ad1abb
update one more link
2021-09-24 14:46:14 +01:00
Geoffrey White
3e1bc66984
Merge pull request #6733 from MathiasVP/fix-qldoc-in-initialize-dynamic-allocation-instruction
...
C++/C#: Fix QLDoc on `InitializeDynamicAllocationInstruction`.{`getAllocationAddressOperand` and `getAllocationAddress`}
2021-09-24 14:30:03 +01:00
alexet
49f8f46354
Java: Cache params string computation.
2021-09-24 14:12:26 +01:00
Rasmus Wriedt Larsen
26d2fbd217
Python: Fix new XPath injection query
...
Fixes the typo `ETXpath` => `ETXPath`
2021-09-24 15:11:34 +02:00
Rasmus Wriedt Larsen
913a679ef5
Python: Replace old XPath injection query
2021-09-24 15:10:41 +02:00
Anders Peter Fugmann
aebde189f8
C++: Apply peer review suggestion
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-09-24 15:09:23 +02:00
Anders Schack-Mulligen
66c206cc61
Merge pull request #6747 from bmuskalla/organizeUtils
...
Java: Organize `utils` into separate directories
2021-09-24 15:05:51 +02:00
Rasmus Wriedt Larsen
c9640ffdbc
Python: Minor adjustments to XPath Injection
2021-09-24 15:02:39 +02:00
Rasmus Lerchedahl Petersen
520a2da8ab
Python: Add tests for asyncpg
2021-09-24 14:41:50 +02:00
Mathias Vorreiter Pedersen
24214002a1
C#/C++: Sync identical files.
2021-09-24 13:13:09 +01:00
Mathias Vorreiter Pedersen
eba1b0bc15
Respond to review comments.
2021-09-24 13:12:58 +01:00
Rasmus Wriedt Larsen
289660067c
Merge branch 'main' into pythonXpath
2021-09-24 13:53:38 +02:00
Harry Maclean
74982cb3aa
Merge pull request #307 from github/hmac-outgoing-http-2
...
Model some more HTTP clients
2021-09-24 12:30:48 +01:00
Anders Schack-Mulligen
854f2a046a
Java: Add StringLiteral.isTextBlock().
2021-09-24 13:11:18 +02:00
Mathias Vorreiter Pedersen
69541d3628
Merge pull request #6744 from rdmarsh2/rdmarsh2/dtt-subpath
...
C++: add subpaths to DefaultTaintTracking
2021-09-24 11:58:31 +01:00
Tom Hvitved
141f5f7605
Merge pull request #308 from github/hvitved/operation-method-call
...
Make `{Unary,Binary}Operation` a sub class of `MethodCall`
2021-09-24 12:51:07 +02:00
Benjamin Muskalla
70e1724463
Exclude methods with non-public parameter types
2021-09-24 12:41:12 +02:00
Anders Fugmann
cbdabe35de
C++: Update test results to reflect changes
2021-09-24 12:29:28 +02:00
Anders Fugmann
c9c41252e3
C++: Update test results in SimpleRangeAnalysis
2021-09-24 12:23:48 +02:00
Tom Hvitved
30d2df53c6
Include MethodCall.getAChild in {Unary,Binary}Operation.getAChild
2021-09-24 12:08:54 +02:00
Anders Fugmann
3437cf2909
C++: only use upperbound if there are no overflows in the guard
2021-09-24 11:46:58 +02:00
Anders Fugmann
d7afd86a27
C++: Add test case exposing problem with overflows for upperBound predicate
2021-09-24 11:44:05 +02:00
Benjamin Muskalla
38ca5aba98
Move test generator into subdirectory
2021-09-24 11:13:04 +02:00
Benjamin Muskalla
4e6a8d991e
Move stub generator into subdirectory
2021-09-24 11:12:41 +02:00
Benjamin Muskalla
cb0a567c03
Merge pull request #6743 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-09-24 09:23:35 +02:00
Anders Fugmann
032ac50034
C++: Do not warn on static buffer overflow using loop counters, if the loop counter has been widened
2021-09-24 08:31:36 +02:00
Anders Fugmann
3e5f7d0db5
C++: using buildin offsetof for an array member indexed after end is legal
2021-09-24 08:31:35 +02:00
Anders Fugmann
b08eabec68
C++: Relax predicate memberMayBeVarSize to mark all members of size 0 or 1 as variable sized
2021-09-24 08:31:35 +02:00
Anders Fugmann
a4a9e2aa96
C++: Weaken wording on overflow static alert text
2021-09-24 08:31:35 +02:00
Robert Marsh
3189c578a4
C++: Add QLDoc to subpaths in DefaultTaintTracking
2021-09-23 22:42:38 -07:00
haby0
9b969e15fc
Modify according to @yoff suggestion
2021-09-24 12:56:10 +08:00
Robert Marsh
c2b356ab08
C++: add subpaths to DefaultTaintTracking
2021-09-23 21:00:45 -07:00
luchua-bc
272e4f6cf9
Update the query
2021-09-24 01:48:11 +00:00
github-actions[bot]
ceb9a0bd6b
Add changed framework coverage reports
2021-09-24 00:08:02 +00:00
luchua-bc
2dc38aee54
Update qldoc
2021-09-23 20:31:24 +00:00
Tom Hvitved
edfdfb1fa4
Make {Unary,Binary}Operation a sub class of MethodCall
2021-09-23 19:13:55 +02:00
Harry Maclean
88885a222e
Model the RestClient HTTP client
2021-09-23 16:32:15 +01:00
Harry Maclean
4cf520c2df
Model the Faraday HTTP client
2021-09-23 16:32:15 +01:00
Harry Maclean
ee51298633
Model the Excon HTTP client
2021-09-23 16:32:15 +01:00
Tom Hvitved
ca2ff9a863
Merge pull request #305 from github/hvitved/desugar/array-literals
...
Desugar array literals to `::Array.[]`
2021-09-23 17:30:34 +02:00
Anders Schack-Mulligen
a031b2a090
Merge pull request #6493 from atorralba/atorralba/cleartext-storage-query-refactor
...
Java: Refactor Cleartext Storage queries
2021-09-23 16:31:17 +02:00
Tony Torralba
b52a2cd292
Apply code review comments
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-09-23 15:48:15 +02:00
Arthur Baars
40f0112e8a
Merge pull request #297 from github/aibaars/alert-suppression
...
Alert suppression and file classifier query
2021-09-23 15:37:19 +02:00
Rasmus Lerchedahl Petersen
f2fbeed490
Python: Model os.path-functions
2021-09-23 15:30:00 +02:00
Rasmus Lerchedahl Petersen
81adb7dd2a
Python: Add tests for os.path-functions
2021-09-23 15:28:05 +02:00
Anders Schack-Mulligen
6be4b3bac6
Merge pull request #6725 from emilejq/date-format
...
Java: Remove requirements for final and access mods from DateFormatThreadUnsafe
2021-09-23 15:02:17 +02:00
Harry Maclean
4f9518a9c6
Merge pull request #293 from github/hmac-code-injection
...
Add query for Code Injection
2021-09-23 13:50:48 +01:00
Anders Schack-Mulligen
4841c3037d
Java: Add callback dispatch to more anonymous classes.
2021-09-23 14:34:56 +02:00
Tom Hvitved
f347505542
Merge pull request #277 from github/hvitved/flow-summaries
...
Add support for flow summaries
2021-09-23 14:31:52 +02:00
Taus
9b1836e366
Merge pull request #36 from github/various-small-fixes
...
Various small fixes
2021-09-23 13:42:19 +02:00
Taus
b719faa627
QL: Merge pull request #36 from github/various-small-fixes
...
Various small fixes
2021-09-23 13:42:19 +02:00
Harry Maclean
41608ef47b
Address review comments
2021-09-23 12:26:54 +01:00
Joe Farebrother
0919042692
Model Bundle and Intent extra methods
2021-09-23 12:03:45 +01:00
Tom Hvitved
68d41f9f12
Address review comments
2021-09-23 12:39:47 +02:00
ihsinme
13741ba137
Update FindWrapperFunctions.ql
2021-09-23 12:55:03 +03:00
ihsinme
18de9f0aa3
Update FindWrapperFunctions.expected
2021-09-23 12:53:16 +03:00
Rasmus Wriedt Larsen
f14e3f6007
Merge pull request #5445 from jorgectf/jorgectf/python/ldapinsecureauth
...
Python: Add LDAP Insecure Authentication query
2021-09-23 11:08:13 +02:00
Emile El-Qawas
83fb41e414
Add visibility constraints; Fix non-compliant code
2021-09-23 09:55:49 +01:00
Tony Torralba
d0b9920cac
Fix encryption sanitizer
...
It now discards sensitive exprs (sources) instead of sinks for better precision
2021-09-23 10:42:30 +02:00
Tony Torralba
51d2b5225e
Remove cached property from SensitiveSource::flowsTo
2021-09-23 10:42:30 +02:00
Tony Torralba
563e8a2bd6
Remove unused library
2021-09-23 10:42:30 +02:00
Tony Torralba
a30554e97c
Refactored cleartext storage libraries
2021-09-23 10:42:30 +02:00
Harry Maclean
83705c5787
Merge pull request #306 from github/hmac-outgoing-http
...
Model outgoing HTTP requests as remote flow sources
2021-09-23 09:34:44 +01:00
Rasmus Wriedt Larsen
ef6e502ff0
Python: Make LDAP global options test better
...
Before it didn't really showcase that we know it can make connections
secure.
2021-09-23 10:18:18 +02:00
Chris Smowton
93daaf5b5b
Merge pull request #6174 from joefarebrother/guava-collections
...
Java: Model Guava collections package
2021-09-23 09:13:24 +01:00
Rasmus Wriedt Larsen
70489b2fc2
Merge branch 'main' into jorgectf/python/ldapinsecureauth
2021-09-23 10:05:56 +02:00
Harry Maclean
5826f2c279
Move Net::HTTP modelling into http_clients module
...
This seems a more convenient place to keep all the HTTP client
modelling.
2021-09-23 09:04:20 +01:00
Harry Maclean
b658bacab3
Simplify Net::HTTP modelling
2021-09-23 09:04:01 +01:00
Harry Maclean
3000587849
Add Net::HTTP request modelling
2021-09-23 09:04:01 +01:00
Harry Maclean
2bdea01c8a
Add HTTP::Client concept
2021-09-23 09:04:01 +01:00
Rasmus Wriedt Larsen
d4564d5dd1
Python: Add QLDoc to Function.getArgByName
2021-09-23 10:01:04 +02:00
Tom Hvitved
27c45d8dda
Merge pull request #6731 from hvitved/remove-reduced-env-var
...
Remove `CODEQL_REDUCE_FILES_FOLDERS_RELATIONS`
2021-09-23 09:39:17 +02:00
Robert Marsh
49f8fd2164
C++: whitespace fix
2021-09-22 16:54:03 -07:00
Robert Marsh
0c5d642489
C++: Rename SystemFunction and restore QLDoc
2021-09-22 14:22:57 -07:00
Robert Marsh
6f03c3e252
C++: Accept command injection test changes
...
Making the DefaultTaintTracking configurations inactive removed many
unneeded nodes and edges from the PathGraph predicates.
2021-09-22 14:19:23 -07:00
Robert Marsh
8faeab18b9
C++: move ResolveCall.qll out of internal directory
2021-09-22 11:54:47 -07:00
Robert Marsh
21ed5c430d
Merge branch 'main' into rdmarsh2/improve-exec-tainted
...
Manual fix for conflict in Models.qll
2021-09-22 11:51:18 -07:00
Chris Smowton
3123abfac3
Merge pull request #6711 from bananabr/AndroidLoggingFix
...
Fix Android logging signature
2021-09-22 17:23:04 +01:00
Alex Ford
21e31a47d9
Merge pull request #283 from github/file-system-sources
...
Start modelling some file system access concepts
2021-09-22 16:45:13 +01:00
Alex Ford
b769aa67c2
test for IO.open as a way of creating an IO instance
2021-09-22 16:29:10 +01:00
Erik Krogh Kristensen
805d1d170c
do not filter away regular expressions with lookbehinds
2021-09-22 17:14:29 +02:00
Joe Farebrother
522c6e01d2
Sort models by class and name
2021-09-22 15:23:01 +01:00
Alex Ford
0092c0279b
Apply suggestions from code review
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-09-22 14:28:15 +01:00
yoff
14a31a2299
Merge pull request #6732 from RasmusWL/minor-sqlalchemy-comment-fixes
2021-09-22 15:15:52 +02:00
Mathias Vorreiter Pedersen
35baff8bac
C#/C++: Sync identical files.
2021-09-22 13:32:29 +01:00
Mathias Vorreiter Pedersen
5969c227ab
C++: Fix QLDoc on 'getAllocationAddressOperand' and 'getAllocationAddress'.
2021-09-22 13:32:20 +01:00
Tom Hvitved
e670fdbb82
Move two predicates in FlowSummaryImplSpecific.qll
2021-09-22 14:12:46 +02:00
Rasmus Wriedt Larsen
8badba26b8
Python: Minor SQLALchemy comment fixes
2021-09-22 13:58:29 +02:00
haby0
6c07a3e260
Apply @yoff's suggestion
2021-09-22 18:50:58 +08:00
Chris Smowton
24e3ad4e18
Remove unnecessary type constraint
2021-09-22 10:54:24 +01:00
Mathias Vorreiter Pedersen
a66f83644b
Merge pull request #6728 from rdmarsh2/rdmarsh/sql-models-followup
...
C++: Add additional functions to the SQL models
2021-09-22 10:19:51 +01:00
Tom Hvitved
364dab6990
Remove CODEQL_REDUCE_FILES_FOLDERS_RELATIONS
2021-09-22 09:43:56 +02:00
Edoardo Pirovano
b960857fc2
Merge pull request #6722 from edoardopirovano/update-analyze-docs
...
Update documentation to reflect changes to `database analyze`
2021-09-22 08:29:45 +01:00
yoff
65d3373ad3
Merge pull request #6727 from RasmusWL/fix-sqlalchemy-query
...
Python: Merge SQLAlchemy TextClause injection into `py/sql-injection`
2021-09-22 09:29:28 +02:00
Tom Hvitved
a37737d065
Replace string kind with boolean preservesValue
2021-09-22 09:28:55 +02:00
Robert Marsh
3108817717
C++: Add additional functions to the SQL models
2021-09-21 17:34:01 -07:00
Robert Marsh
d6fd83dd6c
C++: move resolveCall to its own file for perf
...
This avoids a performance issue in DataFlowImpl::localFlowStep when the
DataFlow::Configuration subclasses in DefaultTaintTracking are active
in the same query as other Configuration
subclasses.
ResolveCall.qll is kept internal for the moment.
2021-09-21 16:32:09 -07:00
Tom Hvitved
888183f26d
Desugar array literals to ::Array.[]
2021-09-21 21:27:29 +02:00
Rasmus Wriedt Larsen
d44f279339
Python: Fix .qhelp
2021-09-21 20:35:03 +02:00
Rasmus Wriedt Larsen
a83bb39d0f
Python: Merge SQLAlchemy TextClause injection into py/sql-injection
...
As discussed in a meeting today, this will end up presenting an query
suite that's easier to use for customers.
Since https://github.com/github/codeql/pull/6589 has JUST been merged,
if we get this change in fast enough, no end-user will ever have run
`py/sqlalchemy-textclause-injection` as part of LGTM.com or Code
Scanning.
2021-09-21 20:21:42 +02:00
Alex Ford
70c2be8ca3
Files library tests
2021-09-21 19:08:03 +01:00
Alex Ford
05a04f4835
Files.qll library implementation
2021-09-21 19:07:55 +01:00
Alex Ford
6315621b16
use instanceof extensions for some filesystem concepts
2021-09-21 19:02:11 +01:00
Alex Ford
d1f2258d45
revamp weak file permissions query
2021-09-21 19:02:11 +01:00
Alex Ford
25300cb2b4
start modelling some file access concepts
2021-09-21 19:02:11 +01:00
ihsinme
88a257fcdc
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-09-21 20:32:08 +03:00
Robert Marsh
d62f76afa6
Merge pull request #6133 from MathiasVP/promote-sql-pqxx
...
C++: Promote `cpp/sql-injection-via-pqxx` out of experimental
2021-09-21 10:13:57 -07:00
Robert Marsh
97c2917c16
Merge pull request #6409 from JordyZomer/main
...
cpp: Add query to detect unsigned integer to signed integer conversio…
2021-09-21 09:57:44 -07:00
Joe Farebrother
3cd675bfff
Manually fill in most of the remaining support method calls
2021-09-21 17:56:18 +01:00
Mathias Vorreiter Pedersen
478093aa89
Update cpp/ql/lib/semmle/code/cpp/models/interfaces/Sql.qll
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-09-21 17:51:24 +01:00
Emile El-Qawas
dcae1c5c04
DateFormatThreadUnsafe - Remove requirements for final and access modifiers
2021-09-21 16:50:48 +01:00
Joe Farebrother
6e9bee1be7
Add missing models
2021-09-21 16:32:49 +01:00
Joe Farebrother
25d6e00b1a
Implement gen methods for MapDifference
2021-09-21 16:30:12 +01:00
Joe Farebrother
a47897bdf9
Implement Table gen methods
2021-09-21 15:29:06 +01:00
Anders Schack-Mulligen
2c41de6648
Merge pull request #6720 from aschackmull/java/isunreachableincall-joinorder
...
Java: Fix join-order in isUnreachableInCall.
2021-09-21 16:07:42 +02:00
Anders Schack-Mulligen
dd1bed02e8
Merge pull request #6721 from aschackmull/dataflow/subpaths01-joinorder
...
Dataflow: Fix join-order in subpaths01
2021-09-21 16:05:41 +02:00
Mathias Vorreiter Pedersen
bd5edc7ae5
Respond to review comments.
2021-09-21 14:29:26 +01:00
Erik Krogh Kristensen
99ed4a1a89
add a bad-tag-filter query for Python and JavaScript
2021-09-21 15:04:03 +02:00
Mathias Vorreiter Pedersen
dfe932d053
Add missing conjunct in PostgreSqlEscapeFunction's 'escapesSqlArgument' predicate.
2021-09-21 12:14:45 +01:00
Nick Rolfe
dd31473dff
Merge pull request #301 from github/fix_source_archive
...
Fix filenames in source archives
2021-09-21 11:37:02 +01:00
Erik Krogh Kristensen
fd64ff9ef1
don't give group numbers to non-capturing groups
2021-09-21 12:15:27 +02:00
Erik Krogh Kristensen
c40ffab093
make isStartState public in ReDoSUtil
2021-09-21 12:14:21 +02:00
Erik Krogh Kristensen
672e4a3d72
cache TopLevel::isMinified
2021-09-21 12:13:37 +02:00
Erik Krogh Kristensen
60993214d5
cache isInterpretedAsRegExp
2021-09-21 12:13:37 +02:00
Erik Krogh Kristensen
01e345c2cc
implement RegExpWordBoundary in RegexTreeView
2021-09-21 12:13:37 +02:00
Erik Krogh Kristensen
8535e6f281
use toUnicode in RegexTreeView
2021-09-21 12:13:37 +02:00
Tony Torralba
99881db8bd
Add stubs
2021-09-21 12:10:05 +02:00
Tony Torralba
0c1f3ed0b3
Add tests for ContentProvider sources
2021-09-21 12:09:47 +02:00
Tony Torralba
a811ab3aff
Add ContentProvider sources
2021-09-21 12:09:28 +02:00
Jonas Jensen
a055c86c4f
C++: change note
2021-09-21 11:58:04 +02:00
Nick Rolfe
d60410e6b8
Use integer comparisons instead of strings when scanning ERB files
2021-09-21 10:50:04 +01:00
Jonas Jensen
237a7d34b8
C++: Exclusion rules for system macros
...
Unwanted results were reported for our JPL Rule 24 queries. Including
system headers with complex macros could lead to unpredictable alerts
from these rules.
2021-09-21 11:31:13 +02:00
Edoardo Pirovano
5a28a796af
Update documentation to reflect changes to database analyze
2021-09-21 10:16:12 +01:00
Tom Hvitved
cdc359527a
Resolve semantic conflicts after rebase
2021-09-21 11:14:11 +02:00
yoff
4adb0c75bd
Merge pull request #6589 from RasmusWL/promote-sqlalchemy
...
Python: Promote modeling of SQLAlchemy
2021-09-21 11:08:41 +02:00
Tom Hvitved
564c76c41f
Address review comments
2021-09-21 11:04:53 +02:00
Tom Hvitved
08dc6d79ef
Add support for flow summaries
2021-09-21 11:04:53 +02:00
Rasmus Wriedt Larsen
4a16be2cba
Merge pull request #6557 from yoff/python/port-modification-of-default-value
...
Python: port modification of default value
2021-09-21 10:12:12 +02:00
Rasmus Wriedt Larsen
f8e6ba633a
Python: Fix .expected for new subpaths query predicate
2021-09-21 09:40:13 +02:00
Rasmus Wriedt Larsen
c7c8e2f3e3
Merge branch 'main' into promote-sqlalchemy
2021-09-21 09:36:07 +02:00
Nick Rolfe
3201f30098
Update dbscheme stats
2021-09-20 23:13:38 +01:00
Nick Rolfe
e97adff21d
Add upgrade script to remove unused tokeninfo columns
2021-09-20 22:42:13 +01:00
Nick Rolfe
6a17dfd228
Remove file column from tokeninfo tables.
2021-09-20 22:42:13 +01:00
Nick Rolfe
6f059638d2
Remove idx column from tokeninfo tables.
2021-09-20 22:42:13 +01:00
Nick Rolfe
143256e673
Fix filenames in source archives
2021-09-20 22:17:45 +01:00
Nick Rolfe
c183e05c49
Merge pull request #300 from github/fix_tests
...
Fix tests
2021-09-20 16:19:40 +01:00
Nick Rolfe
d27f8a6d24
Add empty subpaths section to expected test output
2021-09-20 15:56:58 +01:00
Anders Schack-Mulligen
eaf05305ff
Merge pull request #6709 from aschackmull/java/local-taint-collections
...
Java: Add container flow to the local taint flow relation.
2021-09-20 16:04:45 +02:00
Tom Hvitved
8aaabe8b1e
Merge pull request #299 from github/hvitved/actions-reuse
...
Add two 'composite' actions for reusing logic
2021-09-20 15:55:28 +02:00
Nick Rolfe
6f7d4fef70
Merge pull request #287 from github/unsafe-deserialization
...
rb/unsafe-deserialization query
2021-09-20 14:23:30 +01:00
Nick Rolfe
8af12a164a
Merge pull request #298 from github/trap_extension
...
Fix trap extension for source files without extensions
2021-09-20 14:23:01 +01:00
Anders Schack-Mulligen
044623a360
Dataflow: Sync.
2021-09-20 14:58:28 +02:00
Anders Schack-Mulligen
07c05528ef
Dataflow: Fix join-order in subpaths01.
2021-09-20 14:58:12 +02:00
Tom Hvitved
e201dae672
Add two 'composite' actions for reusing logic
2021-09-20 14:52:02 +02:00
Anders Schack-Mulligen
c72e385a47
Java: Fix join-order in isUnreachableInCall.
2021-09-20 14:09:09 +02:00
Nick Rolfe
c30c7b380d
Replace if let with match.
2021-09-20 12:22:55 +01:00
Nick Rolfe
0936c4cd7b
Fix trap extension for source files without extensions
...
We were writing files with names like `Gemfile..trap.gz`. Now fixed to
`Gemfile.trap.gz`.
2021-09-20 12:11:00 +01:00
Tom Hvitved
4bfbf62e13
Merge pull request #296 from github/hvitved/empty-location
...
Extract a special empty location
2021-09-20 13:05:27 +02:00
Tom Hvitved
1393dc9eb4
Update extractor/src/main.rs
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-09-20 12:50:24 +02:00
Mathias Vorreiter Pedersen
797966fd3d
C++: Change the names of the new classes and predicates to match the upcoming 'CommandExecutionFunction' class.
2021-09-20 11:49:09 +01:00
Tom Hvitved
82d463e86e
Merge pull request #6718 from hvitved/csharp/xss-subpath
...
C#: Add `subpaths` predicate to XSS queries
2021-09-20 12:47:27 +02:00
Harry Maclean
95e50cedad
Add query for Code Injection
...
This query finds cases where user input flows to an argument to `eval`
or `send`, which can execute arbitrary Ruby code.
2021-09-20 11:35:45 +01:00
Rasmus Wriedt Larsen
97c0f1c7b7
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-09-20 12:04:46 +02:00
Tom Hvitved
64507ab316
Merge pull request #6712 from hvitved/csharp/subsumption-perf-take2
...
C#: Speedup type subsumption calculation
2021-09-20 11:59:24 +02:00
Tom Hvitved
b9c4abe7dc
C#: Fix qldoc typos
2021-09-20 10:42:01 +02:00
Tom Hvitved
6d315a5d16
C#: Add subpaths predicate to XSS queries
2021-09-20 10:40:54 +02:00
Anders Schack-Mulligen
187b7e117c
Merge pull request #6715 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-09-20 10:19:16 +02:00
Harry Maclean
916b844557
Merge pull request #280 from github/hmac-cli-injection
...
Add CLI Injection query
2021-09-20 08:54:01 +01:00
Tom Hvitved
b2d0c60a02
Replace hasLocationInfo with getLocation in API::Node
2021-09-20 09:52:26 +02:00
Tom Hvitved
58d06715fc
Extract a special empty location
2021-09-20 09:52:26 +02:00
luchua-bc
8170f01b66
Query to detect uncontrolled thread resource consumption
2021-09-20 02:12:47 +00:00
github-actions[bot]
f0e7be7d56
Add changed framework coverage reports
2021-09-20 00:08:08 +00:00
Tom Hvitved
c6c1ad1b90
C#: Update toString for nested types
2021-09-18 19:51:37 +02:00
Tom Hvitved
07fe29cc67
C#: Speedup type subsumption calculation
2021-09-18 19:51:37 +02:00
luciaromeroML
f348a5ce47
adding comments to some functions
2021-09-17 18:25:14 -03:00
luciaromeroML
25065bc986
simplifying sentence
2021-09-17 18:07:04 -03:00
luciaromeroML
0b0ac8317c
format ql code
2021-09-17 18:05:52 -03:00
valeria-meli
054218a381
Merge branch 'main' into javascript/ssrf
2021-09-17 17:08:52 -03:00
Robert Marsh
a9add04ee3
C++: remove unneed import
2021-09-17 12:17:06 -07:00
Robert Marsh
d3d708bc68
C++: QLDoc for CommandExecution model
2021-09-17 12:16:20 -07:00
Alex Ford
36289aa9d9
Merge pull request #255 from github/reflected-xss
...
rb/reflected-xss query
2021-09-17 18:32:48 +01:00
Joe Farebrother
4929c66e60
Implement gen methods for collections and maps
2021-09-17 17:37:46 +01:00
Harry Maclean
739661eb10
Test that KernelMethodCall is specific enough
...
Calls to `UnknownModule.system`, where `UnknownModule` is a module that
we know nothing about, should not be identified as instances of
`KernelMethodCall`.
2021-09-17 17:02:17 +01:00
Harry Maclean
64a8cedaa7
Generalise the concept of a Kernel method call
2021-09-17 17:02:17 +01:00
Harry Maclean
599dc28ffa
Add another test for shell interpretation
2021-09-17 17:02:17 +01:00
Harry Maclean
f8359767bc
Exclude non-shell interpreted args
...
Update the CommandInjection query to only consider sinks where the
argument is interpreted by a shell. If the argument is passed directly
to a subprocess then it's not vulnerable to shell injection.
2021-09-17 17:02:17 +01:00
Harry Maclean
c8e9a592f0
Update CLI injection tests
...
Cover more cases, like sinks after (but not guarded by) barrier guards.
2021-09-17 17:02:17 +01:00
Harry Maclean
d046fb0591
Separate open3 pipeline methods
...
These have a slightly different structure than the other open3 methods.
2021-09-17 17:02:17 +01:00
Harry Maclean
174ba25c66
Update SystemCommandExecution to new pattern
...
The new pattern is to use the new instanceof keyword in the class
definition, instead of constraining the "superclass" via a member field.
2021-09-17 17:02:17 +01:00
Harry Maclean
cbc14ccda9
Make KernelSystemCall more specific
...
Test that calls to`system` on modules other than `Kernel` are excluded,
such as in this example:
module Foo
def self.system(*args); end
end
# This is not a call to Kernel.system
Foo.system("bar")
2021-09-17 17:02:17 +01:00
Harry Maclean
fb23a2e3bf
Add SubshellHeredocExecution
...
This is a form of command execution:
result = <<`EOF`
echo foo bar #{baz}
EOF
2021-09-17 17:02:17 +01:00
Harry Maclean
799ef4e4c9
Add barrier guards for CLI injection
2021-09-17 17:02:17 +01:00
Harry Maclean
4ecc78effc
Kernel#system -> Kernel.system
2021-09-17 17:02:17 +01:00
Harry Maclean
8f65d78cb5
Add Shellwords.escape as CLI injection sanitizer
2021-09-17 17:02:17 +01:00
Harry Maclean
fe8fc0697b
Add qhelp for CLI Injection query
2021-09-17 17:02:17 +01:00
Harry Maclean
4a0d7c528a
Add top-level CLI injection query and tests
2021-09-17 17:02:17 +01:00
Harry Maclean
8440fe2ba9
Add CommandInjection dataflow config
2021-09-17 17:02:17 +01:00
Harry Maclean
a8f0bce1d1
Add SystemCommandExecution concept
...
A SystemCommandExecution is a method call or builtin that executes a
system command, either directly or via a subshell.
2021-09-17 17:02:17 +01:00
Joe Farebrother
3ef09da1df
Add models for more of methods; update stubs
2021-09-17 16:57:49 +01:00
Nick Rolfe
3c05101961
Merge pull request #290 from github/extract_gemfile
...
Automatically extract Gemfiles
2021-09-17 16:42:30 +01:00
Nick Rolfe
3d23575a38
Merge pull request #292 from github/regexp_slash_az
...
Don't parse `\A` and `\Z` as `RegExpConstant`
2021-09-17 16:42:13 +01:00
Daniel Santos
9e41f43ee2
Fix: android.util.Log is final. No inheritance handling is needed.
2021-09-17 10:15:48 -05:00
Geoffrey White
e7c82d7370
C++: Accept subpaths in tests.
2021-09-17 16:14:24 +01:00
Geoffrey White
24668b2281
Merge branch 'main' into cwe139
2021-09-17 16:04:51 +01:00
Geoffrey White
51243454c8
C++: Change note.
2021-09-17 15:10:55 +01:00
Anders Schack-Mulligen
2cbad4aed6
Merge pull request #6600 from atorralba/atorralba/fix-conditionalbypass
...
Java: Fix performance of the query User-controlled bypass of sensitive method
2021-09-17 16:07:39 +02:00
Geoffrey White
90bc138049
CPP: Fix QLDoc comments.
2021-09-17 14:12:04 +01:00
Tamás Vajk
3247794e2f
Merge pull request #6196 from tamasvajk/feature/sql-sinks
...
C#: Migrate SQL sinks to CSV format
2021-09-17 14:36:57 +02:00
Joe Farebrother
e946f49b64
[Test gen] Gen methods for Set and Iterator
2021-09-17 11:22:50 +01:00
Joe Farebrother
0bff1b4afb
Implement get methods
2021-09-17 11:08:09 +01:00
haby0
99167539fb
Modify sinks
2021-09-17 17:29:40 +08:00
Geoffrey White
a3de94e868
C++: Assign precision and severity; medium for now, since there are FPs in SAMATE Juliet.
2021-09-17 10:05:06 +01:00
Tamas Vajk
8232698254
C#: Migrate SQL sinks to CSV format
2021-09-17 10:21:31 +02:00
Tamás Vajk
6a78aa7840
Merge pull request #6461 from tamasvajk/feature/service-stack
...
C#: Add ServiceStack support
2021-09-17 10:16:20 +02:00
Felicity Chapman
7383988988
Merge pull request #6701 from github/docs-4908-training-note-links
...
Update links in training notes to use CodeQL microsite
2021-09-17 09:00:36 +01:00
james
e906ded0d1
remove java class
2021-09-17 08:48:26 +01:00
Daniel Santos
032a7e71fe
Update Logging.qll
...
Simplified using a set-literal as suggested by @intrigus-lgtm
2021-09-16 13:03:26 -05:00
Ethan Palm
b73a2f7d56
Merge pull request #6667 from ethanpalm/indirect-build-tracing-docs
...
Add indirect build tracing docs
2021-09-16 12:36:56 -04:00
Ethan P
4d7aa5c945
Update example note
2021-09-16 09:29:35 -07:00
Daniel Santos
af8b2b6d9c
Fix Android logging signature in java/ql/src/experimental/semmle/code/java/Logging.qll
2021-09-16 11:24:06 -05:00
ihsinme
b6bcf9fa44
Add files via upload
2021-09-16 19:18:19 +03:00
ihsinme
b393c6a285
Add files via upload
2021-09-16 19:16:54 +03:00
james
c36292bfd0
a few more links
2021-09-16 17:03:29 +01:00
Anders Schack-Mulligen
a67db45454
Merge pull request #6612 from Marcono1234/marcono1234/literal-getLiteral-usage
...
Java: Replace incorrect usage of `Literal.getLiteral()`
2021-09-16 17:00:32 +02:00
Rasmus Lerchedahl Petersen
64685f31dc
Python: Add missing qldoc
...
Also do some general cleanup
How was this allowed comitted in the first place?
2021-09-16 16:51:43 +02:00
Joe Farebrother
1111afc031
Update tests for new support methods; fix bad model
2021-09-16 15:23:03 +01:00
Joe Farebrother
54dbd7c0bd
[Test gen] Add more support method implementations
2021-09-16 15:23:03 +01:00
Joe Farebrother
ef5bf87672
[Test gen] Distinguish default support methods
2021-09-16 15:23:03 +01:00
Joe Farebrother
eb45e67784
Generate tests for modified models
2021-09-16 15:23:02 +01:00
Joe Farebrother
1eacbd88b8
Fix up some incorrect models; simplify/remove some redundand ones
2021-09-16 15:23:02 +01:00
Joe Farebrother
a89bd32eb0
Factor out content manipulating methods from tests to a separate file
2021-09-16 15:23:02 +01:00
Joe Farebrother
56a2dc632b
Move tests around and remove files used for generating tests
2021-09-16 15:23:02 +01:00
Joe Farebrother
7dded52de2
Add change note
2021-09-16 15:23:02 +01:00
Joe Farebrother
8425a94729
Mark failing tests as missing
...
I'm not sure why these tests don't work.
2021-09-16 15:23:02 +01:00
Joe Farebrother
7bf55fbc49
Update stubs to not include package protected members
2021-09-16 15:23:02 +01:00
Joe Farebrother
39349f3763
Fix failing test
2021-09-16 15:23:02 +01:00
Joe Farebrother
60c6158152
Fill in implementations of getters for synthetic fields
2021-09-16 15:23:01 +01:00
Joe Farebrother
225e70a8d0
Fill in implementations fo getMapKey/Value
2021-09-16 15:23:01 +01:00
Joe Farebrother
338a6f2114
Fill in implementations for getElement
2021-09-16 15:23:01 +01:00
Joe Farebrother
cd7c7c3152
Implement array getters/constructors in generated tests
2021-09-16 15:23:01 +01:00
Joe Farebrother
84748cda76
Increase field flow branch limit.
...
I'm a little concerned that this appears to be necassary for tests; as it may mean that results involving these flow steps may not be found in real-world projects.
2021-09-16 15:23:01 +01:00
Joe Farebrother
f94a61cc8a
Remove unneeded rows
2021-09-16 15:23:01 +01:00
Joe Farebrother
b51ffadd27
Improve generated tests
2021-09-16 15:23:01 +01:00
Joe Farebrother
0f2c50f1f5
Explicitly add the of and copyOf methods for ImmutableSorted variants of certain types.
2021-09-16 15:23:01 +01:00
Joe Farebrother
c8e2b027ee
Add fieldFlowBranchLimit to the tests
2021-09-16 15:23:00 +01:00
Joe Farebrother
839c9e35c8
Simplify synthetic table fields
2021-09-16 15:23:00 +01:00
Joe Farebrother
46eec3c8eb
Switch to simpler synthetic field model
2021-09-16 15:23:00 +01:00
Joe Farebrother
6ae11b5b2c
Generate stubs.
...
Some generated stubs were manually adjusted due to minor issues in the stub generator.
In particular, ambiguous references were resolved and references to private classes were removed.
2021-09-16 15:23:00 +01:00
Joe Farebrother
ff733e0334
Fix up issues in generated tests
2021-09-16 15:23:00 +01:00
Joe Farebrother
693d729ec6
Generate tests and fix broken specs
2021-09-16 15:23:00 +01:00
Joe Farebrother
2150c1d58e
Remove <> from flow summaries
2021-09-16 15:23:00 +01:00
Joe Farebrother
1273b063f4
Fix test expectations
2021-09-16 15:23:00 +01:00
Joe Farebrother
a755633405
Add the remaining utility classes
2021-09-16 15:22:59 +01:00
Joe Farebrother
19579f0d9a
Add more utility class models and reorder existing ones
2021-09-16 15:22:59 +01:00
Joe Farebrother
ca583bffd5
Add Lists and Collections2 utilites
2021-09-16 15:22:59 +01:00
Joe Farebrother
5fee6d2d19
Convert Sets utilities
2021-09-16 15:22:59 +01:00
Joe Farebrother
10f0f3038c
Add tables, improve tests, make fixes
2021-09-16 15:22:59 +01:00
Joe Farebrother
73aba09eee
Add create methods
2021-09-16 15:22:59 +01:00
Joe Farebrother
035d655e72
Update guava collection flow steps to CSV
2021-09-16 15:22:59 +01:00
Marcono1234
020aa4d94c
Java: Address feedback and fix test failures
2021-09-16 14:10:48 +01:00
Marcono1234
58d2d5d14e
Java: Replace incorrect usage of Literal.getLiteral()
2021-09-16 14:10:48 +01:00
haby0
0277601705
Eliminate false positives caused by .
2021-09-16 20:59:34 +08:00
Rasmus Lerchedahl Petersen
72bf390ec5
Merge branch 'main' of github.com:github/codeql into python/promote-regex-injection
2021-09-16 14:50:17 +02:00
Tom Hvitved
1c1c46591e
Merge pull request #6708 from hvitved/python/files-folders-drop-columns
...
Python: Drop redundant columns from `files` and `folders` relations
2021-09-16 14:42:15 +02:00
Tom Hvitved
1fd91ab9bd
Merge pull request #295 from github/hvitved/remove-numlines
...
No longer create redundant `numlines` relation
2021-09-16 13:21:20 +02:00
Tom Hvitved
9f10018d48
Address review comment
2021-09-16 13:11:03 +02:00
Taus
783233dfe4
Merge pull request #6696 from yoff/python/copy-multiples-performance-fix-from-ruby
...
Python: Copy performance fix for `multiples` from ruby
2021-09-16 13:01:07 +02:00
Tom Hvitved
464b50231b
DB upgrade script
2021-09-16 12:57:32 +02:00
Tony Torralba
f18c163408
Improve handling of the 'author' word as an exception
2021-09-16 11:57:28 +02:00
Tony Torralba
8022530f34
Merge pull request #5983 from atorralba/atorralba/promote-insecure-basic-auth
...
Java: Promote Insecure Basic Authentication query from experimental
2021-09-16 11:45:30 +02:00
Tom Hvitved
fd04baa9fe
No longer create redundant numlines relation
2021-09-16 11:43:13 +02:00
Anders Schack-Mulligen
28e5dcef52
Java: Add container flow to the local taint flow relation.
2021-09-16 11:14:30 +02:00
Tom Hvitved
37ec83a68b
Python: Upgrade script
2021-09-16 10:51:27 +02:00
Tom Hvitved
94b5c4eada
Python: Drop redundant columns from files and folders relations
2021-09-16 10:51:27 +02:00
Benjamin Muskalla
d3caa80274
Merge pull request #6706 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-09-16 09:58:19 +02:00
Tamas Vajk
f015cea590
Merge branch 'main' into feature/service-stack
2021-09-16 09:42:42 +02:00
Tamas Vajk
05dd3fa0e7
Adjust review findings
2021-09-16 09:42:38 +02:00
Erik Krogh Kristensen
0198cf6318
Merge pull request #6704 from erik-krogh/fix-upgrade
...
JS: fix dbsheme upgrade from TypeScript 4.4 PR
2021-09-16 08:34:58 +02:00
Anders Schack-Mulligen
236ffc8972
Merge pull request #6700 from aschackmull/dataflow/subpaths-joinorder
...
Dataflow: Fix bad joinorder in subpaths
2021-09-16 08:22:59 +02:00
github-actions[bot]
563878d28d
Add changed framework coverage reports
2021-09-16 00:08:03 +00:00
Erik Krogh Kristensen
5c73fed83a
fix dbsheme upgrade from TypeScript 4.4 PR
2021-09-15 22:38:27 +02:00
Alex Ford
e89d485bc0
update test output (subpaths)
2021-09-15 20:51:14 +01:00
Alex Ford
773291e4c3
Put exprNodeReturnedFrom predicate in DataFlowDispatch.qll
2021-09-15 20:50:46 +01:00
Alex Ford
e80faa017c
Fix rb/reflected-xss flow from helper method return values
2021-09-15 20:50:46 +01:00
Alex Ford
35da921deb
format
2021-09-15 20:50:46 +01:00
Alex Ford
50b0bb8b36
Restrict rb/reflected-xss instance variable taint edges
2021-09-15 20:50:46 +01:00
Alex Ford
5cfefb1027
Add some more test cases for rb/reflected-xss
2021-09-15 20:50:46 +01:00
Alex Ford
6cc82d46f3
Fix LinkToCallArgumentAsSink matching when link_to is passed a block
2021-09-15 20:50:46 +01:00
Alex Ford
200c8f2493
Add some HTMLEscaping implementations for Rails
2021-09-15 20:50:46 +01:00
Alex Ford
2e65f9b80e
update some comments referencing view components
2021-09-15 20:50:46 +01:00
Alex Ford
98fd0e1c24
Update ql/src/queries/security/cwe-079/ReflectedXSS.qhelp
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-09-15 20:50:46 +01:00
Alex Ford
0689e6095e
make a type more specific
2021-09-15 20:50:46 +01:00
Alex Ford
ed708c1903
Update ql/src/queries/security/cwe-079/ReflectedXSS.qhelp
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-09-15 20:50:46 +01:00
Alex Ford
eed87b3319
Apply suggestions from code review
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-09-15 20:50:46 +01:00
Alex Ford
205b141482
format
2021-09-15 20:50:46 +01:00
Alex Ford
76864a82be
remove an incorrect test case
2021-09-15 20:50:46 +01:00
Alex Ford
3445a6a5e7
fix flow steps from controller instance var assignement to view read access
2021-09-15 20:50:46 +01:00
Alex Ford
b993723595
remove spurious ivar -> locals hash mapping (actionview/controller)
2021-09-15 20:50:46 +01:00
Alex Ford
3430a46440
fix some local variable mappings between view and controller
2021-09-15 20:50:46 +01:00
Alex Ford
b264a05288
Update ql/lib/codeql/ruby/security/ReflectedXSSCustomizations.qll
...
Co-authored-by: Harry Maclean <hmac@github.com >
2021-09-15 20:50:46 +01:00
Alex Ford
dbb239b04e
reorder and format rb/reflected-xss qhelp
2021-09-15 20:50:46 +01:00
Alex Ford
d71dd3f6c7
rb/reflected-xss
2021-09-15 20:50:46 +01:00
Robert Marsh
c85cc1455b
C++: accept changes to new ExecTainted test
2021-09-15 11:27:13 -07:00
Ethan P
080867a390
Add reviewer feedback
2021-09-15 11:19:41 -07:00
Robert Marsh
a3e1f54e33
C++: Refactor models to prevent IR reevaluation
2021-09-15 10:55:56 -07:00
Robert Marsh
509a3493b6
C++: support new subpaths predicate in ExecTainted
2021-09-15 10:55:56 -07:00
Robert Marsh
09ef8f639e
C++: Improve performance by restricting isSource
2021-09-15 10:55:55 -07:00
Robert Marsh
83cc098412
C++: accept test output
2021-09-15 10:55:55 -07:00
Robert Marsh
3cd08bc724
C++: autoformat Printf.qll
2021-09-15 10:55:55 -07:00
Robert Marsh
fe1f9878ba
C++: add GVN import to fix reevaluation
2021-09-15 10:55:54 -07:00
Robert Marsh
e874fbbea2
C++: Add path stitching in ExecTainted.ql
2021-09-15 10:55:54 -07:00
Robert Marsh
5dc6e13ab5
C++: use TaintTracking2 in ExecTainted.ql
2021-09-15 10:55:53 -07:00
Robert Marsh
4d2036fa26
C++: change note for cpp/command-line-injection
2021-09-15 10:55:53 -07:00
Robert Marsh
c30e7ec41a
C++: raise precision of cpp/command-line-injection
2021-09-15 10:55:53 -07:00
Robert Marsh
181eb803e1
C++: Add QLDoc for getOutputArgument
2021-09-15 10:55:52 -07:00
Robert Marsh
37c92178a5
C++: exclude int/string conversion in ExecTainted
2021-09-15 10:55:52 -07:00
Robert Marsh
5e265f45e1
C++: ExecTainted tests for int/string conversions
2021-09-15 10:55:51 -07:00
Robert Marsh
9926892c8a
C++: remove debugging predicates
2021-09-15 10:55:51 -07:00
Robert Marsh
9c478c502e
C++: add some more tests for ExecTainted
2021-09-15 10:55:50 -07:00
Robert Marsh
562c8b97ad
C++: add comment explaining concatenation logic
2021-09-15 10:55:50 -07:00
Robert Marsh
6f408f949c
C++: Refactor ExecTainted.ql to need concatenation
...
This makes ExecTainted report results only when the tainted value does
not become the start of the string which is eventually run as a shell
command. The theory is that those cases are likely to be deliberate, and
part of the expected threat model of the program (e.g. $CC in make).
This lines up better with the results I considered fixable true
positives in LGTM testing
2021-09-15 10:55:49 -07:00
Robert Marsh
8f4df8603a
C++: more tests for command injection
2021-09-15 10:55:49 -07:00
Nick Rolfe
f76ce8b33b
Merge pull request #6686 from hvitved/cpp/files-folders-drop-columns
...
C++: Drop redundant columns from `files` and `folders` relations
2021-09-15 18:33:20 +01:00
Mathias Vorreiter Pedersen
33ef634ea8
Merge pull request #6679 from andersfugmann/relax_memberMayBeVarSize
...
Improve precision on OverflowStatic query.
2021-09-15 17:24:10 +01:00
Felicity Chapman
05d83e487d
Update all links to CodeQL microsite
2021-09-15 17:08:55 +01:00
Tony Torralba
21079a1315
Fix conditionControlsMethod predicate
...
Exceptions for throw and return statements were missing the appropriate condition
2021-09-15 17:51:51 +02:00
Tony Torralba
d3cf697b07
QLDoc
2021-09-15 17:32:36 +02:00
Tony Torralba
5ed9949498
Adapt InsecureBasicAuth to the previous commit
2021-09-15 17:20:28 +02:00
Tony Torralba
2e08c5dd2b
Refactored HttpsUrls.ql
2021-09-15 17:20:28 +02:00
Tony Torralba
c3c73377b8
Fix scope issues in the Java example
2021-09-15 17:20:28 +02:00
Tony Torralba
023264660b
Suggestions from code review
2021-09-15 17:20:28 +02:00
mc
0e7cbbfeb8
Update InsecureBasicAuth.qhelp
2021-09-15 17:20:28 +02:00
mc
e58b90ef1c
Added full stops
2021-09-15 17:20:28 +02:00
Tony Torralba
e159351179
Update java/change-notes/2021-06-01-insecure-basic-auth-query.md
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-09-15 17:20:27 +02:00
Tony Torralba
30178d4f23
Decouple InsecureBasicAuth.qll to reuse the taint tracking configuration
2021-09-15 17:20:27 +02:00
Tony Torralba
90df3fa94c
Remove CWE reference from qlhelp since it's obtained from metadata
2021-09-15 17:20:27 +02:00
Tony Torralba
49c6a56f97
Add change note
2021-09-15 17:20:27 +02:00
Tony Torralba
148443fae1
Use InlineExpectationsTest
2021-09-15 17:20:27 +02:00
Tony Torralba
2cada386b4
Refactored into InsecureBasicAuth.qll
2021-09-15 17:20:27 +02:00
Tony Torralba
905be67aae
Moved from experimental
2021-09-15 17:20:27 +02:00
Tom Hvitved
d3a1d0a62a
Merge pull request #294 from github/bump-codeql
...
Bump `codeql` submodule
2021-09-15 16:24:04 +02:00
Anders Schack-Mulligen
c0fd44c909
Dataflow: Sync.
2021-09-15 16:10:54 +02:00
Anders Schack-Mulligen
3abe1b4fc6
Dataflow: Fix bad join-order.
2021-09-15 16:10:30 +02:00
Geoffrey White
c4714b55a3
Merge pull request #6588 from ihsinme/ihsinme-patch-069
...
CPP: Add query for CWE-675: Duplicate Operations on Resource
2021-09-15 15:10:03 +01:00
Tom Hvitved
9e67382f06
Bump codeql submodule
2021-09-15 14:59:42 +02:00
Jonas Jensen
65f4ec403f
Merge pull request #6593 from geoffw0/samate-move
...
C++: Add test cases with SAMATE Juliet code snippets to the codeql test suite.
2021-09-15 14:18:08 +02:00
Mathias Vorreiter Pedersen
947ab8a14d
Make the QLDoc on 'getAnSqlParameter' more clear.
2021-09-15 13:15:05 +01:00
Erik Krogh Kristensen
3f736d3eb8
Merge pull request #6694 from erik-krogh/owasp-fixes
...
JS/Java: use the correct cwe tags
2021-09-15 13:46:35 +02:00
CodeQL CI
b228398b87
Merge pull request #6587 from erik-krogh/ts44
...
Approved by asgerf
2021-09-15 04:00:13 -07:00
Rasmus Lerchedahl Petersen
8ea7a28a77
Python: Unexpose fields as suggested.
2021-09-15 12:32:21 +02:00
yoff
758b6bd4dd
Update python/ql/src/semmle/python/functions/ModificationOfParameterWithDefaultCustomizations.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-09-15 12:25:27 +02:00
Geoffrey White
0e7afb24cf
Merge pull request #6643 from MathiasVP/add-frontend-and-extractor-diagnostic-query
...
C++: Add uninterpreted query for obtaining frontend and extraction time
2021-09-15 11:17:58 +01:00
Geoffrey White
9ad51fbc02
C++: Fix the correct test this time.
2021-09-15 11:03:09 +01:00
Erik Krogh Kristensen
cf149bd8c8
add static_initializer as a stmt_parent
2021-09-15 11:54:30 +02:00
Chris Smowton
03db15af9a
Merge pull request #6685 from smowton/smowton/admin/android-uri-model
...
Java: Add models for android.net.Uri[.Builder]
2021-09-15 10:48:33 +01:00
Erik Krogh Kristensen
0b83d033d7
add @static_initializer in the stats file
2021-09-15 11:33:05 +02:00
Jordy Zomer
0f6e845418
Merge branch 'main' of https://github.com/JordyZomer/codeql into main
2021-09-15 10:41:31 +02:00
Jordy Zomer
01a06d1f5c
Add filter and format the query
2021-09-15 10:37:40 +02:00
Anders Fugmann
e49cd83868
C++: update change note per suggestion from peer review
2021-09-15 10:31:15 +02:00
Anders Schack-Mulligen
8485b6f0b3
Merge pull request #6691 from bmuskalla/moreStringMethods
...
Java: Support String#getChars and #translateEscapes
2021-09-15 10:14:54 +02:00
CodeQL CI
220f2ded85
Merge pull request #6698 from asgerf/js/template-self-assignment
...
Approved by esbena
2021-09-15 01:08:39 -07:00
Anders Schack-Mulligen
3f7d6e6f85
Merge pull request #6136 from smowton/smowton/admin/spring-xss-content-type-sensitivity
...
Spring HTTP: improve content-type sensitivity
2021-09-15 09:50:56 +02:00
Anders Schack-Mulligen
2a9e3da24f
Merge pull request #6697 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-09-15 09:35:09 +02:00
Asger Feldthaus
b5db4047a0
JS: Exclude template files in SelfAssignment
2021-09-15 08:59:47 +02:00
haby0
c60eded2de
Fix conflicting
2021-09-15 11:07:43 +08:00
github-actions[bot]
baab70bea6
Add changed framework coverage reports
2021-09-15 00:07:57 +00:00
CodeQL CI
b25b19f71b
Merge pull request #6584 from erik-krogh/clipBoard
...
Approved by esbena
2021-09-14 12:41:49 -07:00
Erik Krogh Kristensen
5a7785776c
add upgrade script
2021-09-14 20:43:07 +02:00
Erik Krogh Kristensen
fdbf5f73b1
add JS support for static initializers
2021-09-14 20:40:46 +02:00
Erik Krogh Kristensen
cc0d86403e
revert some type changes that are no longer needed
2021-09-14 20:40:46 +02:00
Erik Krogh Kristensen
48b763c7e9
add qldoc to StaticInitializer::getBody
2021-09-14 20:40:46 +02:00
Erik Krogh Kristensen
7ce87a7118
remove stray import
2021-09-14 20:40:46 +02:00
Erik Krogh Kristensen
c8c7a1f772
remove the body field from StaticInitializer and relax the valuye type on MemberDefinition
2021-09-14 20:40:45 +02:00
Erik Krogh Kristensen
e3ed6c2523
refactor StaticInitializer into it's own class
2021-09-14 20:40:45 +02:00
Erik Krogh Kristensen
23e28ae5d4
fix typo in comment
...
Co-authored-by: Asger F <asgerf@github.com >
2021-09-14 20:40:45 +02:00
Erik Krogh Kristensen
2a03a84315
remove TODO comment
...
Co-authored-by: Asger F <asgerf@github.com >
2021-09-14 20:40:45 +02:00
Erik Krogh Kristensen
68ab210dc8
update TypeScript version info in versions-compilers.rst
2021-09-14 20:40:45 +02:00
Erik Krogh Kristensen
ffd51e725f
add getter for static initializer blocks
2021-09-14 20:40:45 +02:00
Erik Krogh Kristensen
9585481d0b
add support for static initializer blocks in TypeScript
2021-09-14 20:40:45 +02:00
Erik Krogh Kristensen
59f15eb4eb
add tests for TypeScript 4.4 types
2021-09-14 20:40:45 +02:00
Erik Krogh Kristensen
02a0eed8ee
add basic support for TypeScript 4.4
2021-09-14 20:40:45 +02:00
Erik Krogh Kristensen
3b6c8c5191
Merge branch 'main' into clipBoard
2021-09-14 20:21:37 +02:00
CodeQL CI
136d04390d
Merge pull request #6695 from erik-krogh/js-add-cwes
...
Approved by esbena
2021-09-14 11:19:35 -07:00
Nick Rolfe
961674e4a8
Update expected output now we extract the Gemfile
2021-09-14 18:23:57 +01:00
Nick Rolfe
ec13133317
Automatically extract .gemspec and Gemfile files
...
They are just Ruby code, after all.
2021-09-14 18:23:57 +01:00
Nick Rolfe
ebf23d00d1
Don't parse \A and \Z as RegExpConstant
...
Fixes some FPs for the ReDoS queries.
2021-09-14 16:49:35 +01:00
Geoffrey White
8fd848701e
C++: Fix test failure.
2021-09-14 16:38:11 +01:00
Chris Smowton
e5b84fb795
Use InlineFlowTest
2021-09-14 16:37:07 +01:00
Chris Smowton
5d737934c3
Don't inherit models from a final class
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2021-09-14 16:37:07 +01:00
Chris Smowton
367a53dd71
Add models for android.net.Uri[.Builder]
2021-09-14 16:37:07 +01:00
Harry Maclean
12723f0f13
Merge pull request #288 from github/hmac-barrier-guard-checks
...
Make barrier guards more specific
2021-09-14 16:16:20 +01:00
Chris Smowton
ca87768a93
Merge pull request #6692 from bmuskalla/testGeneratorFlowTest
...
Java: Test generator uses `InlineFlowTest`
2021-09-14 15:44:24 +01:00
Arthur Baars
e03fe0fcd4
Add ClassifyFiles.ql
2021-09-14 16:30:34 +02:00
Mathias Vorreiter Pedersen
44dca68463
Merge branch 'main' into promote-sql-pqxx
2021-09-14 15:29:37 +01:00
Chris Smowton
406466de9a
Simplify specifiesContentType predicate
2021-09-14 15:24:46 +01:00
Mathias Vorreiter Pedersen
adbeba291b
Merge pull request #6687 from MathiasVP/fix-fp-in-av-rule-114
...
C++: Exclude uninstantiated templates from AV Rule 114.
2021-09-14 15:24:18 +01:00
Chris Smowton
6cff0d0376
Merge pull request #6393 from luchua-bc/java/xss-jsf
...
Java: CWE-079 Query to detect XSS with JavaServer Faces (JSF)
2021-09-14 15:15:56 +01:00
Anders Fugmann
bc22e0d9aa
C++: Update comments on memberMayBeVarSize
2021-09-14 16:04:39 +02:00
Tony Torralba
4e93330cb9
Improved tests
...
Note that a FN test case was added
2021-09-14 15:51:08 +02:00
Benjamin Muskalla
abd770a027
Avoid empty template in test generator
2021-09-14 15:32:12 +02:00
Chris Smowton
a1ad1ddc10
Deprecated and replace uses of old name ServletWriterSource
2021-09-14 14:21:29 +01:00
Rasmus Lerchedahl Petersen
d37c14880f
Python: Copy performance fix
2021-09-14 15:15:50 +02:00
haby0
9e63aa9d84
Update query
2021-09-14 21:12:49 +08:00
Erik Krogh Kristensen
b936a04826
add some fitting CWEs to existing queries
2021-09-14 14:59:24 +02:00
Ethan Palm
c62a21e04f
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-09-14 08:55:46 -04:00
Erik Krogh Kristensen
6d12c4aab1
use the correct cwe tags
2021-09-14 14:42:23 +02:00
Anders Schack-Mulligen
26eafcb55a
Merge pull request #6456 from smowton/smowton/admin/flexjson-unsafe-deserialization
...
Java: add unsafe-deserialization support for Flexjson
2021-09-14 14:33:22 +02:00
Tom Hvitved
f4e2c30d86
Merge pull request #291 from github/hvitved/regexp-multiples
...
Speedup `RegExp::multiples`
2021-09-14 14:22:20 +02:00
Tom Hvitved
8ac3dc29e0
Speedup RegExp::multiples
...
Use regexps to perform matching to avoid constructing sub strings.
2021-09-14 13:58:24 +02:00
Rasmus Lerchedahl Petersen
c2d2037726
Python: Add change note and set precision
2021-09-14 13:45:51 +02:00
Tony Torralba
0640b41f00
Adjust tests
2021-09-14 13:44:53 +02:00
Rasmus Wriedt Larsen
8b7fad8595
Merge pull request #6283 from tausbn/python-fix-exceptstmt-gettype
...
Python: Fix `ExceptStmt::getType`
2021-09-14 13:40:33 +02:00
Rasmus Wriedt Larsen
49f5f1e2c2
Merge pull request #6336 from tausbn/python-make-annotated-assignment-a-definitionnode
...
Python: Two fixes regarding annotated assignments
2021-09-14 13:37:53 +02:00
Chris Smowton
6af5c5fc86
Add change note
2021-09-14 12:36:38 +01:00
Chris Smowton
26dbf058c8
Add reverse import from ExternalFlow.qll
2021-09-14 12:35:33 +01:00
Rasmus Lerchedahl Petersen
1c7982b319
Python: Move query tests over
2021-09-14 13:29:21 +02:00
Chris Smowton
fcc0f1d5a7
Expand test to exercise all sinks
2021-09-14 12:27:33 +01:00
Chris Smowton
e439b7d7f8
Remove resource-related sources
...
These access application-owned resources AFAICT
2021-09-14 12:24:27 +01:00
Tony Torralba
b740cf9664
Add change note
2021-09-14 13:16:47 +02:00
Tony Torralba
097927226b
Improved heuristics to increase precision
2021-09-14 13:16:47 +02:00
Tony Torralba
f8d1e2ac11
Refactor tests to use InlineExpectationsTest
2021-09-14 13:16:45 +02:00
Tony Torralba
1f7990d6bb
Refactor to use ConditionalBypassQuery.qll
2021-09-14 13:16:09 +02:00
Tony Torralba
a484e9fb06
Use RemoteFlowSource instead of UserInput
2021-09-14 13:16:09 +02:00
Rasmus Lerchedahl Petersen
36e27f2aa4
Python: Remove promoted code:
...
- queries (`py/regex-injection`)
- concepts (RegexExecution, RegexEscape)
- library models (Stdlib::Re)
2021-09-14 13:14:16 +02:00
Tom Hvitved
b69033f4ff
C++: Upgrade script
2021-09-14 13:14:04 +02:00
Tom Hvitved
6c32b92929
C++: Drop redundant columns from files and folders relations
2021-09-14 13:14:04 +02:00
Tom Hvitved
98a12cef26
Merge pull request #6690 from hvitved/js/files-folders-drop-columns
...
JavaScript: Drop redundant columns from `files` and `folders` relations
2021-09-14 13:13:37 +02:00
Rasmus Lerchedahl Petersen
abbd1d1dc5
Python: Fix errors introduced during port
...
testing on a database helps..
2021-09-14 13:08:21 +02:00
Chris Smowton
104873e8ee
Autoformat
2021-09-14 12:07:59 +01:00
Chris Smowton
6811441459
Factor JSF source definitions
2021-09-14 12:07:48 +01:00
Chris Smowton
b7fc068cee
Move JSFRenderer.qll to lib
2021-09-14 11:49:01 +01:00
Chris Smowton
023c533745
Combine Servlet and JSF vulnerable writer flow-tracking
...
JSP and Servlet already shared this logic; might as well add JSF into the same mechanism.
2021-09-14 11:48:34 +01:00
Chris Smowton
cb8096f636
Remove JSF XSS Example
...
Per previous commit, no need for a top-level JSF example
2021-09-14 11:47:37 +01:00
Chris Smowton
cca9ad06b4
Remove JSF example
...
I don't think we need this: there are lots of possible XSS vectors; we don't need to enumerate every one in the qhelp file.
2021-09-14 11:47:36 +01:00
Chris Smowton
76e4077b56
Delete unused classes
2021-09-14 11:47:35 +01:00
luchua-bc
24addd5c10
Query to detect XSS with JavaServer Faces (JSF)
2021-09-14 11:47:32 +01:00
Chris Smowton
e92b9cbe99
Improve getAProducesExpr documentation
2021-09-14 11:16:45 +01:00
Harry Maclean
4763312e55
Merge ConditionBlock and BarrierGuard
2021-09-14 11:11:12 +01:00
Benjamin Muskalla
f9918cc63c
Test generator uses InlineFlowTest
2021-09-14 11:58:56 +02:00
Rasmus Lerchedahl Petersen
6c82daef3d
Python: Move Regexinjection out of experimental
...
and fix up structure
2021-09-14 11:54:59 +02:00
Rasmus Lerchedahl Petersen
3d5192d6d3
Python: Fix typos
2021-09-14 11:54:11 +02:00
Arthur Baars
c2ec6407f5
Add AlertSuppression.ql
2021-09-14 11:53:53 +02:00
Rasmus Lerchedahl Petersen
a30f697537
Python: Add getName to RegexExecution concept
2021-09-14 11:53:40 +02:00
Anders Schack-Mulligen
e71173d953
Merge pull request #6591 from bmuskalla/inlineFlowTest
...
Java: Simplify setup for flow tests using `InlineExpectationsTest`
2021-09-14 10:31:29 +02:00
Tom Hvitved
57b5b2af2e
JavaScript: DB upgrade script
2021-09-14 10:25:53 +02:00
Tom Hvitved
25e1da0150
JavaScript: Update expected test output
2021-09-14 10:25:42 +02:00
Tom Hvitved
63e28c57cd
JavaScript: Drop redundant columns from files and folders relations
2021-09-14 10:25:37 +02:00
Benjamin Muskalla
199e015a06
Support missing String methods
2021-09-14 10:22:22 +02:00
jorgectf
b505662ef9
Fix global test and update .expected
2021-09-14 10:20:50 +02:00
Tamás Vajk
d52616b687
Merge pull request #6683 from tamasvajk/feature/csv-coverage-fix
...
Only leave CSV coverage updater job enabled on github/codeql
2021-09-14 10:13:28 +02:00
Anders Fugmann
3f5ab60fb4
C++: Add DEPRECATED to documentation block
2021-09-14 09:55:19 +02:00
Benjamin Muskalla
93f9097b02
Merge pull request #6689 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-09-14 09:35:31 +02:00
jorgectf
2ccc6dc092
Merge branch 'main' into jorgectf/python/ldapinsecureauth
2021-09-14 09:32:19 +02:00
ihsinme
8fa3cefb8c
Update DoubleRelease.ql
2021-09-14 10:31:20 +03:00
ihsinme
d150c9a6be
Update DoubleRelease.ql
2021-09-14 08:51:13 +03:00
github-actions[bot]
bf7c26e681
Add changed framework coverage reports
2021-09-14 00:07:57 +00:00
Taus
4d24be04a1
Merge pull request #6688 from RasmusWL/small-fix
...
Python: Fix `globals() == locals()` FP
2021-09-13 21:50:13 +02:00
Erik Krogh Kristensen
b889674486
add change note
2021-09-13 20:45:35 +02:00
Erik Krogh Kristensen
8569d261f7
add test
2021-09-13 20:43:31 +02:00
Erik Krogh Kristensen
8e98dcefb1
add clipboard data as a RemoteFlowSource
2021-09-13 20:43:31 +02:00
Erik Krogh Kristensen
3983aceb48
recognize types of the form "HTML%Element" as dom values
2021-09-13 20:43:31 +02:00
Erik Krogh Kristensen
bac80bf686
delete ClipboardXss.ql experimental query
2021-09-13 20:43:31 +02:00
Rasmus Wriedt Larsen
f402475dd3
Python: Fix globals() == locals() FP
2021-09-13 20:03:11 +02:00
Rasmus Wriedt Larsen
69fe2a36e5
Python: Add globals() == locals() test
2021-09-13 20:02:08 +02:00
Rasmus Wriedt Larsen
ba7cdec2ea
Python: Add some lines in test file
...
These are just empty now, such that it's obvious the tests didn't
change.
2021-09-13 20:00:50 +02:00
Rasmus Wriedt Larsen
a9694bf0ef
Python: Clean whitespace
2021-09-13 19:58:59 +02:00
Mathias Vorreiter Pedersen
a714966e9b
Import 'cpp' and add more description.
2021-09-13 18:43:34 +01:00
Ethan P
930a36df37
Add example step for ending build tracing
2021-09-13 13:40:49 -04:00
Mathias Vorreiter Pedersen
034899367d
C++: Exclude uninstantiated templates from AV Rule 114.
2021-09-13 18:08:51 +01:00
Ethan P
47a543e086
Add reviewer feedback
2021-09-13 12:02:31 -04:00
Tom Hvitved
3bdc92ba8e
Merge pull request #6681 from hvitved/java/files-folders-drop-columns
...
Java: Drop redundant columns from `files` and `folders` relations
2021-09-13 17:43:31 +02:00
Chris Smowton
122ffca049
Merge pull request #6645 from Marcono1234/marcono1234/spurious-javadoc-param-generic-class
...
Java: Detect spurious param Javadoc tag of generic classes
2021-09-13 16:41:06 +01:00
Benjamin Muskalla
24d740b2da
Merge branch 'main' into inlineFlowTest
2021-09-13 17:15:37 +02:00
Benjamin Muskalla
bf5a46f6d8
Simplify inline tests
2021-09-13 17:08:02 +02:00
Taus
b51ce1d2b3
Merge pull request #6640 from yoff/python-add-parameter-default-value-flow-step
...
Python: add parameter default value flow step
2021-09-13 17:05:48 +02:00
Rasmus Lerchedahl Petersen
8f152a5bfb
Python: Port regex concepts and adapt PolyRedos
2021-09-13 16:50:00 +02:00
Anders Schack-Mulligen
7b764aec92
Merge pull request #6682 from aschackmull/java/callbacks
...
Java: Add support for callback-based library models.
2021-09-13 16:43:03 +02:00
Chris Smowton
3c7b39f089
Add change note
2021-09-13 15:36:26 +01:00
Anders Fugmann
f202ddc5aa
C++: Add changenote
2021-09-13 16:31:06 +02:00
Tamas Vajk
80f5ec29d4
Log stdout and stderr in CSV coverage jobs
2021-09-13 16:16:03 +02:00
Tamas Vajk
1d8fae44cc
Only leave CSV coverage updater job enabled on github/codeql
2021-09-13 16:15:21 +02:00
Tom Hvitved
b60f1cd531
Java: Upgrade script
2021-09-13 16:09:47 +02:00
Tom Hvitved
9fdcacd865
Java: Drop redundant columns from files and folders relations
2021-09-13 16:09:47 +02:00
Anders Schack-Mulligen
ab862276fc
Java: Fix tests.
2021-09-13 16:04:11 +02:00
Anders Schack-Mulligen
12aeaeed56
Java: Address review comment.
2021-09-13 16:03:50 +02:00
Geoffrey White
67c6b35845
C++: We get many more real world results using taint tracking.
2021-09-13 15:03:28 +01:00
Geoffrey White
0e8064dbf9
C++: Add a test demonstrating taint.
2021-09-13 15:00:31 +01:00
Chris Smowton
47b5165f2a
Merge pull request #6653 from smowton/smowton/admin/javascript-unpaired-surrogate-test
...
Java and JS: Add/adapt tests for literals with an unpaired surrogate character
2021-09-13 14:53:23 +01:00
Anders Schack-Mulligen
818e75bb8f
Java: Fix compilation error in telemetry lib.
2021-09-13 15:50:21 +02:00
Anders Fugmann
8e9ac18026
C++: Deprecate RangeSSA::isGuardPhi/3
2021-09-13 15:35:05 +02:00
Geoffrey White
902fa7d44a
C++: Subsection header.
2021-09-13 14:10:17 +01:00
Geoffrey White
acd1acd869
C++: Give it a section header.
2021-09-13 14:08:18 +01:00
Geoffrey White
befd1a7ccc
C++: Rename security tests readme.
2021-09-13 14:06:22 +01:00
Chris Smowton
abdd3a5dbe
Adjust Java tests that check for unpaired surrogate extraction
2021-09-13 14:02:05 +01:00
Erik Krogh Kristensen
05cc6bcf8a
adjust regexp libraries to how unpaired surrogate are parsed now
2021-09-13 14:02:05 +01:00
Chris Smowton
f24d7c4212
Acknowledge new FPs due to the extractor using U+FFFD for unpaired surrogates
...
These were already misinterpreted, but the ReDoS code ignored them as they previously appeared to be `?` characters.
2021-09-13 14:02:05 +01:00
Chris Smowton
487ebdf173
Add test for Javascript literal with an unpaired surrogate character
2021-09-13 14:02:05 +01:00
Geoffrey White
ee7ccd7936
C++: Upgrade to path problem.
2021-09-13 13:52:12 +01:00
Anders Schack-Mulligen
89a6cdc711
Java: Add support for callback-based library models.
2021-09-13 14:49:28 +02:00
Ian Lynagh
3404bcf265
Merge pull request #6680 from github/igfoo/java_location
...
Java: Use the standard URL format for Location.toString()
2021-09-13 13:43:32 +01:00
Ian Lynagh
4fbb165dce
Java: Use the standard URL format for Location.toString()
2021-09-13 12:53:50 +01:00
Harry Maclean
6f32401e5c
Add unless x != test to barrier guards
...
This tests that the following call to `foo bar` is guarded:
unless bar != "bar"
foo bar
end
2021-09-13 11:58:17 +01:00
Anders Fugmann
9a35a699cb
C++: Update tests
2021-09-13 12:10:58 +02:00
Chris Smowton
68ed3250e8
Merge pull request #6478 from smowton/smowton/feature/jax-rs-request-filters
...
Java: Add sources for Jax-RS filters
2021-09-13 10:59:17 +01:00
Geoffrey White
f58177f292
C++: Full dataflow version.
2021-09-13 10:53:09 +01:00
Felicity Chapman
1d76578202
Merge pull request #6659 from github/docs-311-update-version
...
Update version numbers for LGTM Enterprise 1.28
2021-09-13 10:26:52 +01:00
James Fletcher
c86311e879
Merge pull request #6502 from github/dataflow-tutorial
...
Add data flow debugging guide to CodeQL docs
2021-09-13 10:25:19 +01:00
Anders Fugmann
342b2df93f
C++: zero or one byte sized arrays in unions are considered as having the length of the union its a member of
2021-09-13 11:25:04 +02:00
Anders Fugmann
3172d5727a
C++: Relax constraints on Buffer::memberMayBeVarSize
2021-09-13 11:15:33 +02:00
yoff
d0563c80be
Merge pull request #6665 from smowton/smowton/fix/python-redos-invalid-utf16
...
ReDoS: fix unpaired surrogate test
2021-09-13 11:14:45 +02:00
Anders Schack-Mulligen
2db039fb77
Merge pull request #6673 from Marcono1234/marcono1234/clone-method-models
...
Java: Remove duplicate classes modeling Object.clone
2021-09-13 11:13:14 +02:00
Anders Schack-Mulligen
dde07fd2ee
Merge pull request #6672 from Marcono1234/marcono1234/functional-interfaces-test
...
Java: Extend functional interfaces test
2021-09-13 11:13:06 +02:00
Anders Fugmann
4ab9b81a9a
C++: Add tests exposing some FP's for OverflowStatic query
2021-09-13 11:09:56 +02:00
Tom Hvitved
4628f880b4
Merge pull request #6489 from hvitved/csharp/files-folders-drop-columns
...
C#: Drop redundant columns from `files` and `folders` relations
2021-09-13 11:02:13 +02:00
Geoffrey White
e696eaaa2f
C++: Fix false positives involving STDIN_FILENO.
2021-09-13 09:50:19 +01:00
Geoffrey White
3ba9e80635
C++: Support various functions / variants.
2021-09-13 09:50:03 +01:00
Geoffrey White
1707d67adb
C++: Support 'send' as well.
2021-09-13 09:49:40 +01:00
Geoffrey White
29ad3bf7f8
C++: Test dataflow and other slightly more complex cases.
2021-09-13 09:49:25 +01:00
Anders Schack-Mulligen
31739cdae6
Merge pull request #6668 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-09-13 09:50:09 +02:00
Tom Hvitved
2730423ab2
C#: Upgrade script
2021-09-13 09:49:10 +02:00
Tom Hvitved
5d048a9518
C#: Drop redundant columns from files and folders relations
2021-09-13 09:49:09 +02:00
Tamás Vajk
cc1374b832
Merge pull request #6646 from tamasvajk/fix/csv-timeseries
...
Fix CSV timeseries script to create DB with scheme from correct git SHA
2021-09-13 09:41:56 +02:00
Tom Hvitved
0abfb00032
Merge pull request #6660 from hvitved/csharp/dotnet-exec-tracing-windows
...
C#: Handle `dotnet exec csc.dll` compiler calls on Windows
2021-09-13 09:07:50 +02:00
github-actions[bot]
26e8e89aca
Add changed framework coverage reports
2021-09-13 00:08:00 +00:00
jorgectf
353c0a9ee7
Add missing comment
2021-09-12 20:44:04 +02:00
jorgectf
3cf28ad6ce
Merge remote-tracking branch 'origin/main' into jorgectf/python/ldapinsecureauth
2021-09-12 20:36:25 +02:00
jorgectf
18b05bc56e
Fix tests and add global option
2021-09-12 20:35:57 +02:00
jorgectf
54012eba23
Optimize getFullHostRegex
2021-09-12 20:13:08 +02:00
Philip Ginsbach
131d63c374
Merge pull request #6592 from github/ginsbach/instanceofDocs
...
language reference entry for non-extending subtypes
2021-09-12 15:21:41 +01:00
Marcono1234
d117593d72
Java: Remove duplicate classes modeling Object.clone
2021-09-12 02:05:57 +02:00
Marcono1234
5009ed618f
Java: Extend functional interfaces test
2021-09-12 01:50:07 +02:00
Andrew Eisenberg
edbaceceb3
Merge pull request #6666 from github/aeisenberg/suites-fix
...
Remove incorrect `suites` directive
2021-09-10 14:15:10 -07:00
Ethan P
fb22931e2d
add indirect build tracing content and example
2021-09-10 16:06:32 -04:00
CodeQL CI
e8fc3c8ead
Merge pull request #5888 from erik-krogh/casting
...
Approved by asgerf
2021-09-10 09:11:39 -07:00
Andrew Eisenberg
9c0f18b88d
Remove incorrect directive
...
This directive should only be in the
pack.
2021-09-10 08:57:37 -07:00
Harry Maclean
800e18349f
Add != to StringConstCompare
...
This means we treat != comparisons against strings as taint tracking guards:
if foo != "A"
foo # still tainted
else
foo # not tainted, because we know foo == "A"
end
2021-09-10 16:42:45 +01:00
Chris Smowton
95046b9bb1
Factor JaxRS models
2021-09-10 16:36:40 +01:00
Chris Smowton
451a46bf0e
Add models for getLanguage, getMediaType
2021-09-10 16:36:38 +01:00
Chris Smowton
5e7a3ca2e6
Model UriInfo.relativize and resolve.
2021-09-10 16:36:37 +01:00
Chris Smowton
62ecab8432
Add change note
2021-09-10 16:36:36 +01:00
Chris Smowton
f1c3a11103
Add sources for Jax-RS filters
2021-09-10 16:36:34 +01:00
Harry Maclean
8f36b0d7fe
Simplify guard in SQL injection tests
...
We don't (yet) properly sanitize taint in cases like this
foo = "A" unless foo == "B"
So for now, use a simpler guard in the SQL injection test.
We can resurrect the old, more idiomatic guard when we can support it.
2021-09-10 16:27:57 +01:00
Chris Smowton
d83ed33252
Make supertype consideration consistent
2021-09-10 16:27:28 +01:00
Chris Smowton
9b488207eb
Add support for the Flexjson framework to the unsafe-deserialization query
2021-09-10 16:27:23 +01:00
Harry Maclean
56983565fe
Update ReDoS length guard
...
Changes to barrier guards in a previous commit mean we need to update
this guard to match.
2021-09-10 16:21:17 +01:00
Chris Smowton
9d31641bb1
Add change note
2021-09-10 16:10:56 +01:00
Chris Smowton
655236c70d
Remove no-longer-needed generic specifiers
2021-09-10 16:10:55 +01:00
Chris Smowton
b47939c737
Note resolved spurious results
2021-09-10 16:10:54 +01:00
Chris Smowton
d940085384
Spring HTTP: inherit produced content-types from surrounding class
2021-09-10 16:10:52 +01:00
Chris Smowton
bdd135dbff
Spring HTTP: mark explicitly content-typed body calls as sinks
...
Previously only the return from the request-handler method constituted a sink, and was filtered by the Produces annotation if any, even though a BodyBuilder could explicitly override.
These sinks are also marked as out-barriers to avoid duplicate paths when the Produces annotation is in agreement.
2021-09-10 16:10:50 +01:00
Chris Smowton
701d0bcdca
Spring content types: recognise constant content-type strings
2021-09-10 16:10:48 +01:00
Chris Smowton
4397371a50
Spring constant media types: recognise constant string versions
...
Previously we only recognised the constant MediaTypes
2021-09-10 16:10:47 +01:00
Chris Smowton
b9b34eb0ee
Move Spring XSS sink definition into SpringHttp.qll
2021-09-10 16:10:45 +01:00
Chris Smowton
3b6cc97557
Sanitize Spring bodies directly associated with an XSS-safe Content-Type
2021-09-10 16:10:44 +01:00
Chris Smowton
0ebbb333ba
Merge pull request #6564 from haby0/java/xxe/new
...
Java: Add XXE sinks
2021-09-10 16:04:27 +01:00
Chris Smowton
38cc9bef02
ReDoS: fix unpaired surrogate test
...
This actually does result in an FP, but this was previously hidden by non-interpretation of '\u' escapes within a raw string.
2021-09-10 15:37:34 +01:00
Chris Smowton
29028c5d46
Update test expectations to account for dataflow subpaths changes
2021-09-10 13:53:41 +01:00
Chris Smowton
2d03840fde
Add experimental variants of java/xxe, incorporating new sinks and a version that uses local sources.
...
Originally authored by @haby0, squashed to clean up a tangled commit history.
2021-09-10 13:49:31 +01:00
Rasmus Lerchedahl Petersen
2eb11731e2
Python: Subpaths in test output
2021-09-10 14:04:57 +02:00
Rasmus Lerchedahl Petersen
02fd63ce20
Merge branch 'main' of github.com:github/codeql into python/port-modification-of-default-value
...
To get the subpaths.
2021-09-10 14:03:02 +02:00
Rasmus Lerchedahl Petersen
5d137ce9c5
Python: Update test expectations
2021-09-10 13:35:49 +02:00
Rasmus Wriedt Larsen
db78e3a7da
Merge pull request #6274 from tausbn/python-api-graphs-import-star
...
Python: Support `import *` in API graphs
2021-09-10 13:25:41 +02:00
Rasmus Wriedt Larsen
b45743b562
Merge pull request #6312 from tausbn/python-deprecate-importnode
...
Python: Deprecate `importNode`
2021-09-10 13:12:56 +02:00
CodeQL CI
27f2d417c1
Merge pull request #6652 from asgerf/js/type-tracking-through-callback
...
Approved by erik-krogh
2021-09-10 04:11:14 -07:00
Rasmus Lerchedahl Petersen
7cfa08abc8
Python: Do not use BarrierGuards
...
They are simply not right for this problem.
We should not even make them available as an extension point.
2021-09-10 12:48:24 +02:00
Tom Hvitved
649c2ce188
Merge pull request #6586 from hvitved/dataflow/stage2-precise-call-ctx-take2
...
Data flow: Add precise call contexts to stage 2
2021-09-10 11:34:35 +02:00
Tom Hvitved
af0b9abab7
C#: Handle dotnet exec csc.dll compiler calls on Windows
2021-09-10 11:26:43 +02:00
Anders Fugmann
2c93bce9ad
C++: Refactor code to use predicate isGuardPhi/4
2021-09-10 10:53:48 +02:00
CodeQL CI
0673355f31
Merge pull request #6649 from rhysd/discussion-untrusted-inputs
...
Approved by erik-krogh
2021-09-10 01:44:54 -07:00
Rasmus Lerchedahl Petersen
b20232db3c
Python: Simplify guards as suggested
2021-09-10 10:31:48 +02:00
Anders Peter Fugmann
1bbadb57a2
Merge pull request #6568 from andersfugmann/andersfugmann/improve_upper_bound
...
C++: Improve predicate upperBound in SimpleRangeAnalysis
2021-09-10 09:49:48 +02:00
Erik Krogh Kristensen
a756ffa3a6
use the new instanceof syntax for NodeJSClientRequest
2021-09-10 09:30:37 +02:00
Tom Hvitved
296d10fe2a
Data flow: Adjust callMayFlowThroughFwd pragmas
2021-09-10 09:21:24 +02:00
Felicity Chapman
3b3350e648
Correct the Qllexer path for slides
2021-09-10 08:04:07 +01:00
Anders Schack-Mulligen
3e17fdcaa3
Merge pull request #6407 from bmuskalla/charSeqSubSeq
...
Java: Track taint for CharSequence#subSequence
2021-09-10 09:01:29 +02:00
Felicity Chapman
32b3e416b3
Update version numbers for LGTM E 1.28
2021-09-10 06:54:36 +01:00
rhysd
97ed9edd32
JS: Detect untrusted inputs in 'discussion' and 'discussion_comment' payloads
2021-09-10 10:42:58 +09:00
Chris Smowton
5b8b27a2aa
Merge pull request #6651 from smowton/smowton/admin/functional-interface-tests
...
Add tests for functional interfaces
2021-09-09 22:02:16 +01:00
Nick Rolfe
b51e741439
Merge pull request #289 from github/rust_warnings
...
Fix 'unused borrow that must be used' warnings.
2021-09-09 17:27:05 +01:00
Nick Rolfe
cf72bada3d
Fix 'unused borrow that must be used' warnings.
...
I don't remember seeing this warning before upgrading to Rust 1.55
2021-09-09 17:03:10 +01:00
Tamás Vajk
ad04099ac2
Merge pull request #6630 from tamasvajk/feature/interface-runtimecallable
...
C# Extend runtime callables to cover interface members with default implementation
2021-09-09 17:24:55 +02:00
Andrew Eisenberg
4c74709019
Merge pull request #6606 from github/aeisenberg/docs
...
Update the docs about qlpacks
2021-09-09 07:42:24 -07:00
Anders Schack-Mulligen
13c4b93d3d
Merge pull request #6648 from aschackmull/java/func-interface
...
Java: Fix FunctionalInterface.
2021-09-09 16:14:14 +02:00
Benjamin Muskalla
9d5e48430e
Merge branch 'main' into charSeqSubSeq
2021-09-09 16:04:36 +02:00
Chris Smowton
a0bf170d02
Add test for functional interfaces
2021-09-09 15:00:42 +01:00
Anders Schack-Mulligen
ec3990c619
Java: Fix FunctionalInterface.
2021-09-09 15:04:22 +02:00
Anders Schack-Mulligen
c4956a4ade
Merge pull request #6376 from bmuskalla/thirdpartyapitelemtry
...
Java: Introduce queries to capture information about 3rd party API usage
2021-09-09 13:55:47 +02:00
Rasmus Lerchedahl Petersen
6c5596d17e
Python: rewrite test
2021-09-09 13:45:44 +02:00
Anders Fugmann
270dbd2bf7
C++: Revert peer review suggestion.
...
The suggested change has a severe impact on row counts, as cpp does not cache
the results for `bbDominates`. Since the `getGuardedUpperBound` predicate the
cost of runtime complexity is considered higher than the benefit of this change.
2021-09-09 13:26:42 +02:00
Anders Fugmann
6c44b0e6e7
C++: Add test case where a guarded block has two predecessors which are both in the dominance domain of the guard
2021-09-09 13:18:49 +02:00
Benjamin Muskalla
c0e65e71b4
Revert "Java: Fix external flow perofrmance with future optimiser."
...
This reverts commit be1d4c04f2 .
2021-09-09 13:06:23 +02:00
Benjamin Muskalla
eef044f4d0
Add test to capture expected parameter format
2021-09-09 13:05:15 +02:00
Tamas Vajk
abe6c90829
Update change note
2021-09-09 13:04:47 +02:00
Tamas Vajk
0a17ab9325
Merge branch 'main' into feature/service-stack
2021-09-09 13:01:43 +02:00
Tamas Vajk
cc7471f37d
Fix package separator in timeseries report
2021-09-09 12:53:59 +02:00
Rasmus Lerchedahl Petersen
e27b3162e5
Python: rewrite simpleLocalFlowStep
...
to take into account the split between
import time and runtime.
2021-09-09 12:43:08 +02:00
Nick Rolfe
6dbf6d7e82
Merge pull request #278 from github/aibaars/revert-hotfix
...
Revert "Use hotfixed version of `codeql/suite-helpers` with workaround for bug in released CLI"
2021-09-09 11:21:20 +01:00
Harry Maclean
b4c29425ea
Make barrier guards more specific
...
Following examples from the other libraries, this change introduces a
member predicate `checks(CfgNode expr, boolean branch)` to
`BarrierGuard`, which holds if the guard validates `expr` for a
particular value of `branch`, which represents the value of the
condition in the guard.
For example, in the following guard...
if foo == "foo"
do_something foo
else
do_something_else foo
end
...the variable `foo` is validated when the condition `foo == "foo"` is
true.
We also introduce the concept that a guard "controls" a code block based
on the value of `branch`. In the example above, the "then" branch of the
if statement is controlled when `branch` is true. The else branch is
not controlled because `foo` can take (almost) any value in that branch.
Based on these concepts, we define a guarded node to be a read of a
validated variable in a controlled block.
In the above example, the `foo` in `do_something foo` is guarded, but
the `foo` in `do_something_else foo` is not.
2021-09-09 11:04:52 +01:00
Tamas Vajk
cbb37f70c4
Change timeseries CSV report to only include dates when values changed
2021-09-09 11:34:38 +02:00
Benjamin Muskalla
a1b7437f8d
Merge branch 'main' into thirdpartyapitelemtry
2021-09-09 11:11:42 +02:00
Tamas Vajk
1fe9e9262f
Fix CSV timeseries script to create DB with scheme from correct git SHA
2021-09-09 10:59:52 +02:00
Marcono1234
a173d9593b
Java: Detect spurious param Javadoc tag of generic classes
2021-09-09 00:11:02 +02:00
Andrew Eisenberg
fb90bb4241
Remove outdated section
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2021-09-08 10:45:50 -07:00
Nick Rolfe
2ddca2c0db
Document and test YAML.safe_load
2021-09-08 18:22:31 +01:00
Nick Rolfe
760dbd739d
Add test for rb/unsafe-deserialization
2021-09-08 17:49:23 +01:00
Nick Rolfe
9b9fc18605
Add taint step for Base64.decode64
2021-09-08 17:49:23 +01:00
Nick Rolfe
adceb0a2a1
Add query rb/unsafe-deserialization
2021-09-08 17:49:23 +01:00
Andrew Eisenberg
ec5435befd
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2021-09-08 08:13:15 -07:00
Philip Ginsbach
55c605998c
Update docs/codeql/ql-language-reference/types.rst
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-09-08 15:35:40 +01:00
Benjamin Muskalla
96a34b6165
Fix value flow for fluent api
2021-09-08 16:12:52 +02:00
Anders Schack-Mulligen
5d58edb3b9
Merge pull request #6641 from aschackmull/dataflow/edges-fasttc
...
Dataflow: Only calculate fastTC for the relevant part of edges.
2021-09-08 15:45:46 +02:00
Mathias Vorreiter Pedersen
44f477d552
C++: Add uninterpreted query for obtaining frontend and extraction time.
2021-09-08 14:32:50 +01:00
Benjamin Muskalla
b47507293a
Minor fixes for fluent apis
2021-09-08 15:32:41 +02:00
Tamas Vajk
9ab6c29cd3
Extend runtime callables to cover interface members with default implementation
2021-09-08 15:07:49 +02:00
Rasmus Lerchedahl Petersen
baca9edbb1
Merge branch 'main' of github.com:github/codeql into python-add-parameter-default-value-flow-step
2021-09-08 14:48:13 +02:00
Rasmus Lerchedahl Petersen
a9c409403c
Python: more tests and comments
2021-09-08 14:44:36 +02:00
CodeQL CI
cd26d97dd7
Merge pull request #6549 from erik-krogh/moreDom
...
Approved by asgerf
2021-09-08 05:10:47 -07:00
Chris Smowton
5d37748973
Merge pull request #6631 from github/Claim-Java-16-support
...
Claim Java 16 support
2021-09-08 12:31:28 +01:00
Benjamin Muskalla
67eaa1b735
Fix qldoc
2021-09-08 13:08:28 +02:00
Asger Feldthaus
db1de18cc2
JS: Support transitive callback-passing
2021-09-08 13:08:16 +02:00
Asger Feldthaus
ceaf2b3727
JS: Rename FlowSteps::callback -> exploratoryCallbackStep
2021-09-08 13:08:12 +02:00
Asger Feldthaus
7c94dd94e9
JS: Add type-tracking steps through callback args
2021-09-08 13:08:05 +02:00
Asger Feldthaus
1f6df4e70d
JS: Add callback type tracking test
2021-09-08 13:08:04 +02:00
Anders Schack-Mulligen
1af39f0776
Dataflow: Sync.
2021-09-08 13:02:07 +02:00
Anders Schack-Mulligen
2e9876f58f
Dataflow: Only calculate fastTC for the relevant part of edges.
2021-09-08 13:01:29 +02:00
Anders Fugmann
f91bd91d02
C++: Apply suggested change from code review
2021-09-08 12:38:53 +02:00
Anders Schack-Mulligen
2b7882e6e5
Merge pull request #5032 from aschackmull/dataflow/subpaths
...
Dataflow: Add subpaths query predicate.
2021-09-08 11:52:41 +02:00
Anders Schack-Mulligen
3f5b9d0f54
Merge pull request #6637 from github/alexet/imporve-query
...
Java: Fix performance issues with future versions of codeql.
2021-09-08 11:16:19 +02:00
Anders Fugmann
e93dc0b4c4
C++: Fix comment in getGuardedUpperBound
2021-09-08 11:06:58 +02:00
Rasmus Lerchedahl Petersen
9b198c6d0a
Python: Add some module initialization tests
2021-09-08 10:37:28 +02:00
Rasmus Lerchedahl Petersen
4a5f70e6c8
Python: Reclassify defaultValueFlowStep
...
as a `jumpStep`.
2021-09-08 10:05:31 +02:00
Dave Bartolomeo
6837233128
Treat CallSideEffect and InitializeDynamicAllocation the same as other side effects during IR generation
...
This commit moves the IR generation for the `CallSideEffect` and `InitializeDynamicAllocation` side effect instruction into their own subclasses of `TranslatedSideEffect`. Previously, they were embeddded in `TranslatedCall` and `TranslatedAllocationSideEffects`. There are no diffs in the generated IR. This just makes the implementation of all side effect generation be consistent.
2021-09-07 14:22:23 -04:00
jorgectf
eee9b3f39e
Merge remote-tracking branch 'origin/main' into jorgectf/python/headerInjection
2021-09-07 19:54:58 +02:00
jorgectf
352eab0eca
Fix HeaderDeclaration class' comment
2021-09-07 19:44:25 +02:00
Jorge
190bc2f0da
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-09-07 19:42:37 +02:00
Nick Rolfe
a62aa2b1b2
Merge pull request #269 from github/polynomial_redos
...
Polynomial ReDoS query
2021-09-07 18:31:04 +01:00
jorgectf
4e261c61ae
Optimize concatAndCompareAgainstFullHostRegex
2021-09-07 19:05:03 +02:00
jorgectf
800801177d
Fix taint tracking comment
2021-09-07 19:02:32 +02:00
jorgectf
b802d7903a
Fix OPT_X_TLS_ mandatory options
2021-09-07 19:01:46 +02:00
jorgectf
ee98c0c587
Add start_tls_s() comment and use DataFlow::MethodCallNode instead
2021-09-07 19:00:14 +02:00
Nick Rolfe
414362db8d
Rename .qll to match our naming scheme for other dataflow queries.
2021-09-07 17:38:08 +01:00
Jorge
1bc16fb31e
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-09-07 18:37:33 +02:00
Nick Rolfe
7666d856b7
Merge remote-tracking branch 'origin/main' into polynomial_redos
2021-09-07 17:35:07 +01:00
alexet
81f4822b8d
Java: Fix performance with future optimiser by caching a predicate
2021-09-07 16:38:40 +01:00
alexet
be1d4c04f2
Java: Fix external flow perofrmance with future optimiser.
2021-09-07 16:38:39 +01:00
alexet
726feb3f4d
Java: Fix magic in TC with future optimiser.
2021-09-07 16:38:39 +01:00
Tamás Vajk
f90d1fd70e
Merge pull request #6636 from tamasvajk/fix/stubbing-2
...
C#: Fix member order (yet again) in stubbing
2021-09-07 17:37:29 +02:00
Benjamin Muskalla
9e66ee1da0
Add example to inline flow test docs
2021-09-07 16:47:02 +02:00
Benjamin Muskalla
3641b28c3e
Convert javax-json to InlineFlowTest
2021-09-07 16:47:01 +02:00
Benjamin Muskalla
a6b47208e1
Convert optional to InlineFlowTest
2021-09-07 16:47:01 +02:00
Benjamin Muskalla
2d9b4b33d4
Convert spring to InlineFlowTest
2021-09-07 16:47:01 +02:00
Benjamin Muskalla
da3b7a2b69
Convert json-java to InlineFlowTest
2021-09-07 16:47:00 +02:00
Benjamin Muskalla
ff73e46c95
Convert jackson to InlineFlowTest
2021-09-07 16:47:00 +02:00
Benjamin Muskalla
1ead522705
Convert guava-cache to InlineFlowTest
2021-09-07 16:47:00 +02:00
Benjamin Muskalla
efd5dc94e6
Convert apache-commons-lang3 to InlineFlowTest
2021-09-07 16:47:00 +02:00
Benjamin Muskalla
eba414e31b
Convert apache-collections to InlineFlowTest
2021-09-07 16:46:59 +02:00
Benjamin Muskalla
3bc70f0ce6
Convert containerflow to inline flow test
2021-09-07 16:46:59 +02:00
Benjamin Muskalla
7a0fc6ae61
Migrate jaxson to inline test
2021-09-07 16:46:59 +02:00
Benjamin Muskalla
41891959a3
Fix apache test
2021-09-07 16:46:58 +02:00
Benjamin Muskalla
2d13906e0e
Simplify jaxrs setup
2021-09-07 16:46:58 +02:00
Benjamin Muskalla
24d43689b2
Simplify test setup
2021-09-07 16:46:58 +02:00
Benjamin Muskalla
8830f1531f
Convert some tests to use InlineFlowTest
2021-09-07 16:46:58 +02:00
Benjamin Muskalla
acb055400d
Extract inline flow test
2021-09-07 16:46:57 +02:00
Benjamin Muskalla
d1a1f57e77
Convert taint-format test into inline test
2021-09-07 16:46:56 +02:00
Rasmus Wriedt Larsen
995a8192a9
Merge pull request #6635 from github/RasmusWL/fix-csharp-cwe-tag
...
C#: Fix CWE tag for `cs/insufficient-key-size`
2021-09-07 15:54:42 +02:00
Tom Hvitved
3d4db42da4
Merge pull request #6634 from hvitved/csharp/codeql-manual-build-command
...
C#: Use explicit Code Analysis build command
2021-09-07 15:31:20 +02:00
Tamas Vajk
469993f6d3
C#: Fix member order (yet again) in stubbing
...
With explicit interface implementation, the same member name can show up multiple times in a type declaration. This commit defines an explicit order
for these members.
2021-09-07 15:26:03 +02:00
yoff
43effd2b40
Update python/ql/src/semmle/python/functions/ModificationOfParameterWithDefault.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-09-07 15:08:50 +02:00
Taus Brock-Nannestad
bea8a457a2
Merge branch 'main' into python-make-annotated-assignment-a-definitionnode
2021-09-07 15:01:01 +02:00
Taus Brock-Nannestad
1ab86892a0
Merge branch 'main' into python-deprecate-importnode
2021-09-07 14:59:12 +02:00
CodeQL CI
5b229e9392
Merge pull request #6574 from asgerf/js/vue-api-graphs
...
Approved by erik-krogh
2021-09-07 05:53:30 -07:00
Taus Brock-Nannestad
79c3ccd56e
Python: Remove import-helper tests
...
As discussed, these are all present in the `ApiGraphs` directory
already (except for the dataflow consistency test, which has been
moved there instead).
2021-09-07 14:50:05 +02:00
Tamás Vajk
d7934865c9
Merge pull request #6628 from tamasvajk/feature/fix-stub-escaping
...
C#: improve stubbing to escape more member names (not just fields)
2021-09-07 14:29:44 +02:00
Benjamin Muskalla
f7ad894495
Fix name of api filter predicate
2021-09-07 14:28:58 +02:00
Taus Brock-Nannestad
5ac32f145f
Merge branch 'main' into python-fix-exceptstmt-gettype
2021-09-07 14:21:13 +02:00
Benjamin Muskalla
22df141761
Rename API name predicate
2021-09-07 14:17:13 +02:00
Taus
51c0ceea38
Python: Update test_import_star.py
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-09-07 14:15:48 +02:00
Taus Brock-Nannestad
5f5285955b
Merge branch 'main' into python-api-graphs-import-star
2021-09-07 14:13:56 +02:00
Taus
b99c075282
Merge pull request #6460 from yoff/python-regex-parsing-consistency-checks
...
Python: Add regex parsing consistency checks
2021-09-07 13:33:59 +02:00
Nick Rolfe
4d5928ae5a
Add @security-severity tag
2021-09-07 12:15:44 +01:00
Tom Hvitved
bef05f885c
C#: Update CIL data flow tests
2021-09-07 13:02:20 +02:00
Anders Schack-Mulligen
f6541811d2
Dataflow: Update more tests.
2021-09-07 13:02:20 +02:00
Anders Schack-Mulligen
f30dad7705
Dataflow: Update test expected outputs.
2021-09-07 13:02:20 +02:00
Nick Rolfe
8fbe5c0adf
Merge pull request #261 from github/getPrimaryQlClasses
...
Implement getPrimaryQlClasses
2021-09-07 12:02:15 +01:00
Tom Hvitved
8ce7fdc59a
Merge pull request #284 from github/hvitved/instanceof-test
...
Use `instanceof` base classes
2021-09-07 13:01:43 +02:00
Rasmus Wriedt Larsen
8f52089475
C#: Fix CWE tag for cs/insufficient-key-size
...
Since this targets
CWE-326 Inadequate Encryption Strength
> The software stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.
> \- https://cwe.mitre.org/data/definitions/326.html
and not
CWE-327: Use of a Broken or Risky Cryptographic Algorithm
> The use of a broken or risky cryptographic algorithm is an unnecessary risk that may result in the exposure of sensitive information.
> \- https://cwe.mitre.org/data/definitions/327.html
This matches what we do for similar query in Python: https://github.com/github/codeql/blob/main/python/ql/src/Security/CWE-326/WeakCryptoKey.ql
2021-09-07 12:59:10 +02:00
Anders Schack-Mulligen
7ec1fa2ebe
Dataflow: Sync.
2021-09-07 12:51:42 +02:00
Anders Schack-Mulligen
2d7d45a8ac
Dataflow: Account for hidden nodes.
2021-09-07 12:51:42 +02:00
Anders Schack-Mulligen
3c3d71d4a0
Dataflow: Sync
2021-09-07 12:51:42 +02:00
Anders Schack-Mulligen
81ed3e7176
Dataflow: Add subpaths query predicate.
2021-09-07 12:51:42 +02:00
Tamás Vajk
1dc712f54d
Merge pull request #6629 from tamasvajk/feature/dispatch-fix
...
C#: Fix dispatch library to handle summarized callables with no runti…
2021-09-07 12:35:45 +02:00
Tamas Vajk
203ca3f91b
C#: improve stubbing to escape more member names (not just fields)
2021-09-07 12:34:23 +02:00
Tamás Vajk
7befdc9c5c
Merge pull request #6627 from tamasvajk/feature/stub-readme
...
C#: Add readme to stub folder
2021-09-07 12:09:52 +02:00
Tamás Vajk
c63fd4a254
Merge pull request #6260 from tamasvajk/feature/method-name
...
C#: Change generic method names to include <> and type args/params
2021-09-07 12:09:27 +02:00
Rasmus Lerchedahl Petersen
fcd346c2af
Python: Add flow from default values
...
to their parameters.
This creates data-flow inconsistencies,
probably because the default values have incorrect enclosing callables
2021-09-07 11:33:09 +02:00
Tom Hvitved
bcaf0658e4
C#: Use explicit Code Analysis build command
2021-09-07 10:58:06 +02:00
Mathias Vorreiter Pedersen
5cecea42e4
Merge pull request #6603 from geoffw0/impropnulltests
...
C++: Add test cases for cpp/improper-null-termination.
2021-09-07 09:55:36 +01:00
Mathias Vorreiter Pedersen
b7206c1218
Merge pull request #6581 from geoffw0/uncontrolledarith2
...
CPP: Improvements for cpp/uncontrolled-arithmetic
2021-09-07 09:48:59 +01:00
Anders Fugmann
ebdda885f9
C++: Update test annotation for OverflowStatic
2021-09-07 10:38:16 +02:00
Rasmus Lerchedahl Petersen
e8644f6f2a
Python: coment out discriminating test
...
The test case has different behaviour between py2/3.
When merging this, we should create an issue to resolve it.
2021-09-07 10:30:38 +02:00
Rasmus Lerchedahl Petersen
b48caaf465
Python: fix reference to PrintNode.qll
2021-09-07 10:19:42 +02:00
Rasmus Lerchedahl Petersen
8729701b66
Merge branch 'main' of github.com:github/codeql into python/port-modification-of-default-value
...
Files have moved around, specifically PrintNode.qll.
2021-09-07 10:13:51 +02:00
Rasmus Lerchedahl Petersen
29cb067769
Python: Remember to update test expectations
2021-09-07 10:13:17 +02:00
Rasmus Lerchedahl Petersen
ae8408bcab
Python: Add missing qldoc
2021-09-07 10:09:02 +02:00
Rasmus Lerchedahl Petersen
4998a48f99
Python: Fix simple guards
2021-09-06 22:40:30 +02:00
Nick Rolfe
060060bc0b
Merge remote-tracking branch 'origin/main' into getPrimaryQlClasses
2021-09-06 19:34:34 +01:00
Geoffrey White
cd5a5347fc
C++: Add basic test.
2021-09-06 18:11:34 +01:00
Geoffrey White
246302453f
C++: Add CleartextTransmission query.
2021-09-06 18:11:19 +01:00
Chris Smowton
79ff7baaf6
Claim Java 16 support
...
As of https://github.com/github/codeql/pull/6604 we support all new Java 16 features
2021-09-06 17:17:17 +01:00
yoff
138a7ae67f
Merge pull request #6349 from RasmusWL/more-modeling
...
Python: Improve various library modeling
2021-09-06 17:01:45 +02:00
Tamas Vajk
3a9cf639bd
Change ServiceStack redis sinks to code injection instead of SQL injection
2021-09-06 16:59:31 +02:00
Tamas Vajk
5fa9f16c01
Adjust ServiceStack CSV rows with generic method names
2021-09-06 16:45:21 +02:00
Tom Hvitved
3594794875
Use instanceof base classes in range patterns
2021-09-06 16:15:52 +02:00
yoff
c7146ac10c
Update python/ql/src/meta/alerts/RemoteFlowSourcesReach.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswl@github.com >
2021-09-06 16:00:58 +02:00
Tamas Vajk
f6366e1e1f
Merge branch 'feature/method-name' into feature/service-stack
2021-09-06 15:52:08 +02:00
Tamas Vajk
207d8f6030
Merge branch 'main' into feature/service-stack
2021-09-06 15:46:43 +02:00
Anders Fugmann
9af4d560dd
Merge branch 'main' into andersfugmann/improve_upper_bound
2021-09-06 14:26:58 +02:00
Tamas Vajk
5014ef2337
C#: Add ServiceStack support with CSV data model
2021-09-06 14:06:37 +02:00
Tamas Vajk
43ccc14162
Add ServiceStack stubs and empty test referencing it
2021-09-06 14:05:41 +02:00
Tamas Vajk
e3a49f8213
C#: improve stubbing to escape more member names (not just fields)
2021-09-06 14:02:42 +02:00
Tamas Vajk
270b56af1b
Extend runtime callables to interface members with default implementation
2021-09-06 14:02:42 +02:00
Tamas Vajk
39a88d2e43
Fix dispatch library to handle summarized callables with no runtime target
2021-09-06 14:02:42 +02:00
Tamas Vajk
648197db35
C#: Fix dispatch library to handle summarized callables with no runtime target
2021-09-06 13:45:43 +02:00
Tamas Vajk
0d88d18781
C#: Add readme to stub folder
2021-09-06 13:42:36 +02:00
Andrew Eisenberg
bb9911e06f
Merge pull request #6605 from aeisenberg/aeisenberg/pack/consistency
2021-09-06 04:40:58 -07:00
Rasmus Wriedt Larsen
b28bddd22c
Merge pull request #6598 from RasmusWL/fail-on-missing-query-pack
...
Misc: Make `generate-code-scanning-query-list.py` fail on missing query pack
2021-09-06 13:22:13 +02:00
Tamas Vajk
b7f13a7e1f
C#: Change generic method names to include <> and type args/params
2021-09-06 11:48:22 +02:00
Erik Krogh Kristensen
85e1c87d14
use the new non-extending-subtypes syntax
2021-09-06 11:19:50 +02:00
Erik Krogh Kristensen
8d4af3ad81
convert field based range pattern to casting based range pattern
2021-09-06 11:05:23 +02:00
Anders Fugmann
ddbaf585ec
Merge branch 'main' into andersfugmann/improve_upper_bound
2021-09-06 10:32:44 +02:00
Anders Fugmann
e4d22ea628
C++: Add comment on why getGuardedUpperBound must have exactly one predecessor
2021-09-06 10:31:32 +02:00
Tom Hvitved
9b3b9a731f
Move instanceof check from charpred in CfgScope
2021-09-06 10:31:16 +02:00
Anders Schack-Mulligen
5a47ddbf77
Merge pull request #6604 from smowton/smowton/admin/marcono-record-tests
...
Java: Add tests for static and final modifiers relating to record classes
2021-09-06 09:32:32 +02:00
Tamás Vajk
b9ef6c7e55
Merge pull request #6596 from tamasvajk/fix/stub-ordering
...
C#: Fix ordering of stubbed type members, implemented interfaces, and…
2021-09-06 09:27:19 +02:00
ihsinme
8b0d5a2e7b
Update cpp/ql/src/experimental/Security/CWE/CWE-675/DoubleRelease.qhelp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-09-05 22:46:37 +03:00
Dave Bartolomeo
d1e6813812
Make side effects for constructor calls use same mechanism as other arguments
...
This commit is yet another step to fixing the order of IR side effect instructions. Instead of having a special `StructorCallSideEffects` class for the call itself, I've introduced a `TranslatedStructorCallQualifierSideEffect` class that shares a bunch of common code with `TranslatedArgumentExprSideEffect`, but handles the case where there's no `Expr` for the qualifier of the constructor call. Because this class uses the same ordering as regular argument side effects, these side effects now appear in the correct order, reads before writes.
The test expectations have changed to reflect the new, correct order.
2021-09-03 16:58:32 -04:00
Andrew Eisenberg
286c102358
Update the docs about qlpacks
...
This is a first pass to fix obvious holes and outdated information, but
we should rethink these docs completely.
2021-09-03 12:50:25 -07:00
Andrew Eisenberg
6a47fcaf1f
Packaging: Normalize all qlpack.yml files for all languages
...
This commit ensures consistency among all of our qlpacks. Here are the
changes:
1. Ensure only modern references are used (codeql-{lang} is converted to
codeql/{lang}-all or codeql/{lang}-queries where appropriate).
2. Use consistent version numbers. All languages are at 0.0.2 except
javascript, which is 0.0.3.
3. Convert all `libraryPathDependencies` to `dependencies` with version
constraints
4. Dependencies from query packs to other packs are always `"*"` since
these dependencies are always from source and we should get the
latest.
5. Dependencies from codeql/{lang}-lib to codeql/{lang}-upgrades must
be strict since there is a tight connection between the libary
and its relevant upgrades.
2021-09-03 11:53:28 -07:00
Chris Smowton
23d7633cd5
Add tests for static and final modifiers relating to record classes
2021-09-03 18:20:16 +01:00
Dave Bartolomeo
ba72a1cde7
Make TranslatedSideEffect abstract
...
This is step two of fixing the ordering of call side effects. This commit refactors the existing `TranslatedSideEffect` class into an abstract `TranslatedSideEffect` class, which contains functionality common to all kinds of side effect, and a concrete `TranslatedArgumentSideEffect` class, which is the implementation of argument side effects. A future commit will add additional concrete classes for conservative call side effects and allocation side effects.
This change has zero diffs to the generated IR.
2021-09-03 11:31:14 -04:00
Philip Ginsbach
863eede75b
easier second example for instanceof extensions
2021-09-03 16:12:52 +01:00
Geoffrey White
4e60fd5fc7
C++:Add the ImproperNullTerminationTainted.ql query to the test.
2021-09-03 15:53:24 +01:00
Tamas Vajk
c02a743835
Revert redundant order by
2021-09-03 16:51:32 +02:00
Geoffrey White
ccf1a44a2b
C++: Extend tests for cpp/improper-null-termination.
2021-09-03 15:48:36 +01:00
Dave Bartolomeo
47e16b0480
Move logic for determining CallSideEffect opcode out of TranslatedCall.
...
This is the first step to fixing the order of side effects on call instructions. The goal is to move all side effects (argument side effects, allocation side effects, and conservative call side effects) to be treated as elements in a single sequence of side effects, which will then be handled in a single place similar to how we already handle argument side effects.
2021-09-03 09:58:31 -04:00
Calum Grant
51d729a086
Merge pull request #282 from github/add-coc
...
Create CODE_OF_CONDUCT.md
2021-09-03 14:25:44 +01:00
Benjamin Muskalla
ec0066d5a4
Merge pull request #6597 from bmuskalla/hideStubsInDiff
...
Java: Hide diff for generated files by default
2021-09-03 15:11:15 +02:00
Rasmus Lerchedahl Petersen
913990bc62
Python: Add suggested comments and test case
2021-09-03 14:40:16 +02:00
Harry Maclean
36d5fda400
Merge pull request #260 from github/hmac-url-redirect
...
Add URLRedirect query
2021-09-03 13:36:54 +01:00
Pierre
12c1f43ceb
Create CODE_OF_CONDUCT.md
...
Add COC based on the latest template.
2021-09-03 14:27:04 +02:00
yoff
c6eb795e76
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-09-03 14:23:57 +02:00
Benjamin Muskalla
51475d2fb0
Merge branch 'main' into thirdpartyapitelemtry
2021-09-03 14:23:31 +02:00
Harry Maclean
87253032e2
Add a query for URL redirect vulnerabilities
...
This query finds instances of CWE-601: Redirection to Untrusted Site.
The structure is copied from a query of the same name in the Python
library. We add customisations specific to `ActionController`.
2021-09-03 13:17:14 +01:00
Benjamin Muskalla
f59a5b6574
Hide changes for experimenal stubs
2021-09-03 14:16:04 +02:00
Calum Grant
799c0ff252
Merge pull request #281 from github/add-license
...
Add LICENSE
2021-09-03 13:14:15 +01:00
Benjamin Muskalla
ab5c1d6bdd
Rework filter to exclude simple constructors
2021-09-03 13:38:01 +02:00
Asger Feldthaus
7149ad8ac4
JS: Also mark uses of the exports object as an export in PackageExports
2021-09-03 13:35:30 +02:00
Pierre
bc85a1b825
Add LICENSE file
...
Required step for open-sourcing. This uses the same license at `codeql-ruby`.
2021-09-03 13:10:54 +02:00
Chris Smowton
0dd463dd2b
Merge pull request #6520 from smowton/smowton/feature/allow-local-interfaces
...
Java: Allow local interfaces
2021-09-03 12:01:36 +01:00
Philip Ginsbach
cd646c819d
explain instanceof extensions via charpred instanceof
2021-09-03 10:55:03 +01:00
Benjamin Muskalla
9ed14b438e
Use readble format for APIs
2021-09-03 11:53:18 +02:00
Philip Ginsbach
35b0e83370
simpler first instanceof extension example
2021-09-03 10:52:05 +01:00
Chris Smowton
c20cf23c98
Update stats file dependencies
2021-09-03 10:40:51 +01:00
Benjamin Muskalla
4b02e266fd
Fix test as we support explicit collection types
2021-09-03 11:37:39 +02:00
Benjamin Muskalla
7d3131ca49
Move usage count into where clause
2021-09-03 11:32:14 +02:00
Benjamin Muskalla
89ce04dcb9
Pull usage count into where clause
2021-09-03 11:26:22 +02:00
Philip Ginsbach
6e025186ab
make clear that instanceof supertypes are not base types
2021-09-03 10:23:58 +01:00
Philip Ginsbach
abaa0633d7
consistently distinguish base types and supertypes
2021-09-03 10:20:14 +01:00
Philip Ginsbach
d2f833d02c
deep implications => implications
2021-09-03 10:13:12 +01:00
Benjamin Muskalla
2edb32f344
Fix naming
2021-09-03 10:59:35 +02:00
Rasmus Wriedt Larsen
67df890f68
Misc: Fail by default if query pack can't be found
2021-09-03 10:56:49 +02:00
Chris Smowton
76a41146a8
Merge pull request #6594 from smowton/smowton/fix/stub-arrays-and-bounds
...
Move unreachable cases of IndirectType into getAContainedType
2021-09-03 09:56:04 +01:00
Benjamin Muskalla
6ede08e3c9
Remove dead code
2021-09-03 10:53:24 +02:00
Benjamin Muskalla
c06e37f3d9
Hide diff for generated files by default
2021-09-03 10:46:52 +02:00
Rasmus Wriedt Larsen
9386a900eb
Misc: Clean whitespace in generate-code-scanning-query-list.py
2021-09-03 10:46:25 +02:00
james
8c37e90a77
revert a couple of changes
2021-09-03 09:31:54 +01:00
Geoffrey White
f2047ee4d0
C++: Actually fix expected files after layout changes.
2021-09-03 09:13:41 +01:00
Tamas Vajk
3560853f36
C#: Fix ordering of stubbed type members, implemented interfaces, and location comments
2021-09-03 09:53:34 +02:00
Nati Pesaresi
629efb85fb
ternary operator
2021-09-02 17:55:09 -03:00
Anders Fugmann
d962fc4ce1
C++: Improve predicate upperBound in SimpleRangeAnalysis
...
If an expression has an immediate guardPhi node, this is used as a strict upper bound
2021-09-02 21:46:18 +02:00
Anders Fugmann
c110508b4e
C++: Add tests to expose potential improvements available to SimpleRangeAnalysis
2021-09-02 21:20:33 +02:00
Chris Smowton
d57bd34575
Update dbscheme stats
2021-09-02 20:14:51 +01:00
Shati Patel
d22620f72f
Merge pull request #6575 from shati-patel/docs-copyright-year
...
Docs: Auto-update copyright year
2021-09-02 18:43:07 +01:00
Nick Rolfe
47e5a8fd09
Add test for polynomial ReDoS query
2021-09-02 17:57:56 +01:00
Nick Rolfe
cbe23661ed
Rename exponential ReDoS test directory
2021-09-02 17:57:56 +01:00
Nick Rolfe
d62b41bdf4
Add query for polynomial ReDoS
2021-09-02 17:57:56 +01:00
Chris Smowton
c259d0204a
Move unreachable cases of IndirectType into getAContainedType
2021-09-02 17:53:52 +01:00
Geoffrey White
a0b712d44b
C++: Add notice about the SAMATE Juliet tests.
2021-09-02 17:34:48 +01:00
Geoffrey White
d73604d1c5
C++: Fix a few glitches and accept line number changes in expected files.
2021-09-02 17:34:47 +01:00
Geoffrey White
f755659f5d
C++: More directory structure consistency / cleanup.
2021-09-02 17:34:47 +01:00
Geoffrey White
d1ab2d2e8c
C++: Remove some irrelevant macro logic and main functions.
2021-09-02 17:34:46 +01:00
Geoffrey White
fdb4a2acdb
C++: Clean up header comments.
2021-09-02 17:34:46 +01:00
Geoffrey White
75d367a6c5
C++: Add ad-hoc SAMATE Juliet test cases (that were previously internal). Directory structures cleaned up in a few places.
2021-09-02 17:34:45 +01:00
Philip Ginsbach
ee13efbffd
some whitesapce fixes
2021-09-02 17:31:55 +01:00
Philip Ginsbach
dbda1bf5c0
Update docs/codeql/ql-language-reference/types.rst
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-09-02 17:30:36 +01:00
Chris Smowton
b9afccc015
Remove impossible lines from Stubs.qll
2021-09-02 17:14:38 +01:00
james
2e995839bb
fix link
2021-09-02 16:46:23 +01:00
james
81a9ce2baa
polish text
2021-09-02 16:40:29 +01:00
Alex Ford
86073776b7
Merge pull request #249 from github/erb-lib
...
Add codeql_ruby.ast.Erb library
2021-09-02 16:26:52 +01:00
Philip Ginsbach
dbc95cadb4
language reference entry for non-extending subtypes
2021-09-02 15:23:39 +01:00
Rasmus Wriedt Larsen
9f590dbf2d
Python: Fix .expected
...
After we now model `db.text()` calls from Flask-SQLAlchemy
2021-09-02 16:04:25 +02:00
Rasmus Wriedt Larsen
414bf12f86
Python: Fix DefaultTextClauseConstruction
2021-09-02 16:03:25 +02:00
Rasmus Wriedt Larsen
88c6d4bb20
Python: Fix .qhelp
2021-09-02 16:02:04 +02:00
Arthur Baars
ab4cc753b0
Revert "Use hotfixed version of codeql/suite-helpers with workaround for bug in released CLI"
...
This reverts commit 9d7b77496e .
2021-09-02 16:01:51 +02:00
Chris Smowton
29b9231f49
Rename db types relating to local classes
...
These now all refer to types or classes-or-interfaces.
2021-09-02 14:51:51 +01:00
Chris Smowton
e8bdc8ba17
Make Member.getEnclosingCallable compatible with local interfaces
2021-09-02 14:51:50 +01:00
Chris Smowton
608d24f75e
Rename QL elements that refer to local classes
2021-09-02 14:51:50 +01:00
Chris Smowton
0a5410c2d3
Remove unnecessary charpred
2021-09-02 14:51:49 +01:00
Chris Smowton
474d983f8d
Fix typo
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-09-02 14:51:48 +01:00
Chris Smowton
fca561351d
Fix typo
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-09-02 14:51:48 +01:00
Chris Smowton
ac43ad6da2
Add change note
2021-09-02 14:51:47 +01:00
Chris Smowton
e048a729db
Add Interface.isLocal and use it where appropriate
...
Some EJB logic regrettably needs to be renamed out of the way. Hopefully the churn caused by this is less than would be caused if Interface's isLocal needed to be named differently from Class.isLocal.
2021-09-02 14:51:46 +01:00
Chris Smowton
ca5c2b2acf
Fix description wording
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-09-02 14:51:46 +01:00
Chris Smowton
9c4a50503c
Allow local interfaces
...
Java 16 permits enums and interfaces to be declared method-locally. Enums are already classes, but interfaces are not (in dbscheme terms), so we need to permit isLocalClass to tag them like it already does classes.
2021-09-02 14:51:45 +01:00
Rasmus Wriedt Larsen
065075056b
Python: Highlight how await taint-step works
2021-09-02 15:45:59 +02:00
Rasmus Wriedt Larsen
ad102e2746
Python: Minor cleanup to snippets
...
As pointed out in review, we don't need this override any more!
2021-09-02 15:40:32 +02:00
CodeQL CI
b4963c7538
Merge pull request #6558 from erik-krogh/redosCasing
...
Approved by esbena, yoff
2021-09-02 12:20:08 +01:00
Tom Hvitved
b8ec5d7d31
Merge pull request #276 from github/hvitved/api-graphs-comment-typo
...
Fix typo in comment
2021-09-02 12:50:25 +02:00
Taus
e4fd749a46
Merge pull request #6547 from github/RasmusWL/cwe328-weak-hash
...
Python: Add CWE-328 to `py/weak-sensitive-data-hashing`
2021-09-02 11:42:31 +02:00
Tamás Vajk
82f61ca015
Merge pull request #6577 from tamasvajk/fix/cil-modified-pointer
...
C#: Temporarily extract modified pointers as unmodified during CIL ex…
2021-09-02 10:48:51 +02:00
Rasmus Wriedt Larsen
d55f18f8e3
Python: Add modeling of Flask-SQLAlchemy
2021-09-02 10:48:24 +02:00
Rasmus Wriedt Larsen
f1744890b1
Python: Add tests for Flask-SQLAlchemy
2021-09-02 10:48:15 +02:00
Tom Hvitved
2d0febeb04
Fix typo in comment
2021-09-02 10:24:37 +02:00
Rasmus Wriedt Larsen
c34d6d1162
Python: Add query to handle SQLAlchemy TextClause Injection
...
instead of doing this via taint-steps. See description in code/tests.
2021-09-02 10:19:57 +02:00
Rasmus Wriedt Larsen
81dbe36e99
Python: Promote SQLAlchemy modeling
...
Due to the split between `src/` and `lib/`, I was not really able to do
the next step without having moved the SQLAlchemy modeling over to be in
`lib/` as well.
2021-09-02 10:19:57 +02:00
Rasmus Wriedt Larsen
ba99e21875
Python: Remove modeling of sqlescapy PyPI package
...
I've never seen this being used in real code, and this library doesn't
have a lot of traction, so I would rather not commit to supporting it
(which includes verifying that it actually makes things safe).
Personally I don't think this is the right approach for avoiding SQL
injection either.
2021-09-02 10:19:57 +02:00
Rasmus Wriedt Larsen
91442e100c
Python: Model sessionmaker().begin()
2021-09-02 10:19:57 +02:00
Rasmus Wriedt Larsen
feb2303e1f
Python: Model the underlying DB-API connection
2021-09-02 10:19:57 +02:00
Rasmus Wriedt Larsen
1ab04a7276
Python: Model Connection.execution_options
2021-09-02 10:19:57 +02:00
Rasmus Wriedt Larsen
2acf518037
Python: Model exec_driver_sql
2021-09-02 10:19:57 +02:00
Rasmus Wriedt Larsen
fe143c7dfa
Python: Rewrite most of SQLAlchemy modeling
2021-09-02 10:19:57 +02:00
Rasmus Wriedt Larsen
b39bb24fcf
Python: Add more SQLAlchemy tests
2021-09-02 10:19:57 +02:00
Jonas Jensen
1ba26237a7
Merge pull request #6585 from rvermeulen/patch-3
...
Update qldoc for the Access class
2021-09-02 10:17:36 +02:00
ihsinme
1e88470ad8
Add files via upload
2021-09-02 10:22:49 +03:00
ihsinme
9f4b7255aa
Add files via upload
2021-09-02 10:21:07 +03:00
Erik Krogh Kristensen
1ad204d89e
make after and TState private in ReDoSUtil
2021-09-02 09:15:43 +02:00
Erik Krogh Kristensen
df04c5044c
use concat instead of strictconcat in RegexTreeView.qll
2021-09-02 08:54:39 +02:00
Tom Hvitved
c3ecae503b
Data flow: Sync files
2021-09-01 19:58:47 +02:00
Tom Hvitved
136c8b5192
Data flow: Improve callMayFlowThroughFwd join order
...
Before:
```
[2021-08-25 09:56:29] (1395s) Tuple counts for DataFlowImpl2::Stage3::callMayFlowThroughFwd#ff/2@111fb3:
15495496 ~5% {5} r1 = SCAN DataFlowImpl2::Stage3::fwdFlowOutFromArg#fffff#reorder_0_2_4_1_3 OUTPUT In.3, In.4, In.2 'config', In.0 'call', In.1
1450611958 ~6335% {5} r2 = JOIN r1 WITH DataFlowImpl2::Stage3::fwdFlow#fffff_03412#join_rhs ON FIRST 3 OUTPUT Lhs.3 'call', Lhs.4, Lhs.2 'config', Rhs.3, Rhs.4
7043648 ~20415% {2} r3 = JOIN r2 WITH DataFlowImpl2::Stage3::fwdFlowIsEntered#fffff#reorder_0_3_4_1_2 ON FIRST 5 OUTPUT Lhs.0 'call', Lhs.2 'config'
return r3
```
After:
```
[2021-08-25 10:57:02] (2652s) Tuple counts for DataFlowImpl2::Stage3::callMayFlowThroughFwd#ff/2@d3e27b:
15495496 ~0% {6} r1 = SCAN DataFlowImpl2::Stage3::fwdFlowOutFromArg#fffff#reorder_0_2_4_1_3 OUTPUT In.0 'call', In.1, In.2 'config', In.3, In.4, In.2 'config'
9236888 ~22% {7} r2 = JOIN r1 WITH DataFlowImpl2::Stage3::fwdFlowIsEntered#fffff#reorder_0_3_4_1_2 ON FIRST 3 OUTPUT Lhs.3, Rhs.3, Rhs.4, Lhs.4, Lhs.5, Lhs.0 'call', Lhs.2 'config'
7043648 ~20415% {2} r3 = JOIN r2 WITH DataFlowImpl2::Stage3::fwdFlow#fffff ON FIRST 5 OUTPUT Lhs.5 'call', Lhs.6 'config'
return r3
```
2021-09-01 19:57:29 +02:00
Andrew Eisenberg
10f6cab77e
Merge pull request #6583 from github/aeisenberg/query-suite-docs
...
Docs: Update documentation for query suites
2021-09-01 10:33:22 -07:00
Tom Hvitved
c176d344ab
Merge pull request #274 from github/hvitved/cfg/may-raise
...
CFG: Model calls that may raise an exception
2021-09-01 17:42:13 +02:00
Tom Hvitved
6e23a9ae7a
Merge pull request #275 from github/hvitved/api-graphs-fix
...
API graphs: Fix bug for resolvable modules
2021-09-01 17:10:27 +02:00
Tom Hvitved
03e91a22bc
API graphs: Performance fixes
2021-09-01 16:57:56 +02:00
Tom Hvitved
ae70af01cd
API graphs: Fix bug for resolvable modules
2021-09-01 16:57:52 +02:00
Tom Hvitved
031a73ff0f
Add API graph test that exhibits a missing edge
2021-09-01 16:56:09 +02:00
Benjamin Muskalla
ee8958ba03
Fix nodes for local taint test
2021-09-01 15:55:59 +02:00
Benjamin Muskalla
c1d34d7d6f
Move Strings to lib
2021-09-01 15:55:39 +02:00
Benjamin Muskalla
190bf90bc8
Replace stringbuilder step with model
2021-09-01 15:41:16 +02:00
Benjamin Muskalla
7ddf7ff211
Track taint from concatenated string
2021-09-01 15:41:16 +02:00
Benjamin Muskalla
d178fe4e5d
Fix failing tests
2021-09-01 15:41:16 +02:00
Benjamin Muskalla
93bc8aa7b2
Fix tests to take trim into account
2021-09-01 15:41:15 +02:00
Benjamin Muskalla
7be179cf6c
Mark String constructor as propagating taint
2021-09-01 15:41:15 +02:00
Benjamin Muskalla
3928ffd30d
Support CharSequence#subSequence
2021-09-01 15:41:15 +02:00
Benjamin Muskalla
b7e608abc9
Model string builder APIs
2021-09-01 15:41:14 +02:00
Benjamin Muskalla
dab626270d
Convert Objects API to csv model
2021-09-01 15:41:14 +02:00
Benjamin Muskalla
5df5805d36
Convert strings to summary model
2021-09-01 15:41:14 +02:00
Benjamin Muskalla
e0d978fd58
Migrate String constructor to model
2021-09-01 15:41:13 +02:00
Tom Hvitved
701eab7b74
Merge pull request #273 from github/hvitved/has-name
...
Add `hasName` predicates
2021-09-01 15:39:39 +02:00
Remco Vermeulen
7310590f90
Update qldoc FunctionAccess class
...
The `FunctionAccess` class doesn't capture accesses of functions in function call expressions.
This update makes that explicit.
2021-09-01 15:36:00 +02:00
Remco Vermeulen
ffd2a388a9
Update qldoc for the Access class
...
The access class does not capture function accesses that are part of a function call expression.
This updates makes that explicit
2021-09-01 15:30:33 +02:00
Tom Hvitved
89e6c0e838
CFG: Model calls that may raise an exception
...
In order to avoid dead `rescue`s, we assume that any call that happens in a
`rescue`/`ensure` context may raise an exception.
2021-09-01 14:07:28 +02:00
Tom Hvitved
4eaa31d800
Add hasName predicates
2021-09-01 13:32:19 +02:00
Asger Feldthaus
cc838326e1
JS: Remove old bulk export access getAnExportedModule
2021-09-01 13:28:54 +02:00
Asger Feldthaus
7daa6481e3
JS: Check property name in NodeJSModule.getABulkExportedNode
2021-09-01 13:25:14 +02:00
Asger Feldthaus
4b1f918feb
JS: Extend getABulkExportedNode and use it in PackageExports
2021-09-01 13:24:23 +02:00
Chris Smowton
dccdc3be5a
Merge pull request #6582 from github/smowton/admin/mention-multiple-sort-criteria
...
Expression docs: mention multiple sort criteria
2021-09-01 12:22:23 +01:00
Asger Feldthaus
cce3c0256e
JS: Update some comments in Vue
2021-09-01 13:04:40 +02:00
Tamás Vajk
e9ff6e8755
Merge pull request #6578 from tamasvajk/fix/cil-local-decoding
...
C#: Handle non-critical exception in CIL local variable extraction
2021-09-01 12:52:53 +02:00
Erik Krogh Kristensen
a3289fabe1
sync ReDoSUtil with python
2021-09-01 12:47:06 +02:00
Erik Krogh Kristensen
537450606e
use a consistent comment about the ignore case flag
2021-09-01 12:46:50 +02:00
Erik Krogh Kristensen
ff74fe1e03
rename hasChildThatMatchesIgnoringCasing to hasChildThatMatchesIgnoringCasingFlags
2021-09-01 12:45:20 +02:00
Erik Krogh Kristensen
75a3f34e86
use if-else in ReDoSUtil::getCanonicalizationFlags
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-09-01 12:44:02 +02:00
CodeQL CI
29bcd7ca6f
Merge pull request #6572 from erik-krogh/live-server
...
Approved by esbena
2021-09-01 12:41:23 +02:00
Tamás Vajk
50a9b18c92
Merge pull request #6579 from tamasvajk/fix/cil-type-args
...
C#: Fix completely broken type argument extraction in NoMetadataHandleType
2021-09-01 12:16:15 +02:00
Chris Smowton
303e02fb8a
Fix typo
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-09-01 10:45:47 +01:00
Erik Krogh Kristensen
f8d46677b9
add RequestExpr as an alias to NodeJSLib::RequestExpr in Connect.qll
2021-09-01 10:11:05 +02:00
Erik Krogh Kristensen
98d018ce26
remove redundant extends clause
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-09-01 10:09:40 +02:00
Andrew Eisenberg
21c168e229
Apply suggestions from code review
...
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com >
2021-08-31 14:47:28 -07:00
Andrew Eisenberg
0923d1fdc1
Docs: Update documentation for query suites
...
Adds some clarification around the `qlpack` directive.
The semantics has changed. This provides a new example
and some description.
2021-08-31 13:39:04 -07:00
Alex Ford
41e7ef11e6
add missing pragma back
2021-08-31 21:19:56 +01:00
Alex Ford
d47c8ee9a5
format
2021-08-31 21:04:43 +01:00
Chris Smowton
c92b7828cb
Merge pull request #6580 from smowton/smowton/admin/guava-models-mistakes
...
Fix minor mistakes in old Guava models
2021-08-31 19:44:23 +01:00
Chris Smowton
a47efc4348
Expression docs: mention multiple sort criteria
2021-08-31 19:18:03 +01:00
Shati Patel
a80a367de4
Merge pull request #6354 from Optixal/docs-js-isuncertain
...
JS: Fixed description of `isUncertain()` predicate in CodeQL Language Guides: CodeQL Library for JavaScript
2021-08-31 19:13:40 +01:00
Geoffrey White
d6368c3d1b
C++: Add QLDoc comments.
2021-08-31 19:03:45 +01:00
Tom Hvitved
2d08b0156a
Merge pull request #271 from github/hvitved/cfg/shared
...
Adopt shared CFG library
2021-08-31 19:41:02 +02:00
Geoffrey White
49807c080b
C++: Understand *=.
2021-08-31 18:25:52 +01:00
Geoffrey White
436b18a11f
C++: Add test cases.
2021-08-31 18:23:15 +01:00
Geoffrey White
6bbed9d624
C++: Test layout.
2021-08-31 18:09:21 +01:00
Sauyon Lee
7156dee270
Merge pull request #6521 from sauyon/java/test-gen-improvements
...
Java: generate more realistic tests
2021-08-31 10:06:08 -07:00
Alex Ford
20b851a6e0
improve ErbExecutionDirective definition
2021-08-31 17:49:15 +01:00
Alex Ford
df9e0dfcb2
make strictlyBefore a member predicate on Location
2021-08-31 16:24:38 +01:00
Alex Ford
d84731bcc7
Add a library for working with the ERB AST
2021-08-31 16:24:38 +01:00
Harry Maclean
502ad3f9bd
Merge pull request #247 from github/hmac-jump-to-def
...
Jump-to-definition
2021-08-31 16:00:43 +01:00
Harry Maclean
3490e328e1
codeql_ruby -> codeql.ruby
2021-08-31 15:43:02 +01:00
Harry Maclean
d3f683e573
Minor refactor of constantQualifiedName
2021-08-31 15:42:06 +01:00
Harry Maclean
34f02ee622
Fix constantQualifiedName
...
Exclude partial results
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com >
2021-08-31 15:42:06 +01:00
Harry Maclean
91d56cd802
Use dataflow to find method call targets
...
This includes both local and non-local methods, and is also simpler than
the previous definition.
2021-08-31 15:42:06 +01:00
Harry Maclean
cd3192e8f1
Fix ordering for definitionOf
...
Actually select the lexicographically least location, not the greatest.
2021-08-31 15:42:06 +01:00
Harry Maclean
8901eba978
Include constants in jump-to-def query
...
The previous version of this query inadvertently excluded constants
which weren't classes or modules. This version includes them, by
introducing a laxer version of `resolveScopeExpr` that doesn't require
the result to be a `TResolved`.
2021-08-31 15:42:06 +01:00
Harry Maclean
155b385981
Simplify LocalVariable constraint in jump-to-def
2021-08-31 15:42:06 +01:00
Harry Maclean
e72f1399cb
Include class variables in jump-to-def query
2021-08-31 15:42:06 +01:00
Harry Maclean
e84ebe2b94
Include instance variables in jump-to-def query
...
By convention, instance variables are considered to be "defined" in the
`#initialize` method of their containing class. If an instance variable
is written to in `#initialize` and then read elsewhere in the program,
we will point from the read to the write. If it is not written to in
`#initialize` then we won't provide any jump-to-definition information
for it.
2021-08-31 15:42:06 +01:00
Harry Maclean
a16cd8967b
Ignore synthesised reads for jump-to-definition
...
We synthesise variables for things like tuple patterns. For example,
this Ruby code:
a, b = ...
becomes:
__synth__0 = ...
a = __synth__0[0]
b = __synth__0[1]
The `__synth__` variables should be ignored when calculating
jump-to-definition information, since they don't appear in the original
source code.
2021-08-31 15:42:05 +01:00
Harry Maclean
a814010665
Small refactor to constantQualifiedName
2021-08-31 15:42:05 +01:00
Harry Maclean
95e2b8a4a4
Simplify jump-to-def query
...
The expected output format is a tuple (a, b, k) where `a` and `b` are any
`AstNode` subclass and `k` is a string indicating the kind of
definition (e.g. variable, method, ...).
By ensuring that every value in `DefLoc` is a subclass of `Expr` (itself
a subclass of `AstNode`) we can simplify the query by removing all the
use of `getLocation()`.
2021-08-31 15:42:05 +01:00
Harry Maclean
19e135fb6f
Remove redundant imports
2021-08-31 15:42:05 +01:00
Harry Maclean
2fbbabda2d
First draft of a jump-to-definition query
...
TODO: flesh out this message
2021-08-31 15:42:05 +01:00
Nick Rolfe
d1171e08b1
Merge pull request #272 from github/fix_upgrade
...
Fix typo in db upgrade script
2021-08-31 15:34:55 +01:00
Chris Smowton
7977d9c253
Fix minor mistakes in old Guava models
...
Also add tests for the affected functions
2021-08-31 15:26:09 +01:00
Nick Rolfe
ad66f03f90
Fix typo in db upgrade script
2021-08-31 15:23:16 +01:00
Chris Smowton
b38a23daee
Fix test cases featuring primitive arrays
...
Previously we couldn't print the name of types like `byte[]` for example.
2021-08-31 15:12:47 +01:00
Tamas Vajk
b267d26ff8
C#: Fix completely broken type argument extraction in NoMetadataHandleType
2021-08-31 14:34:27 +02:00
Tamas Vajk
d6ae19c87d
C#: Handle non-critical exception in CIL local variable extraction
2021-08-31 14:29:53 +02:00
Tamas Vajk
0ba334bb22
C#: Temporarily extract modified pointers as unmodified during CIL extraction
2021-08-31 14:26:36 +02:00
Erik Krogh Kristensen
28dce6e95a
fix non-monotonic recursion in js/missing-rate-limiting
2021-08-31 14:23:23 +02:00
Erik Krogh Kristensen
83252e5ba2
change note
2021-08-31 14:23:23 +02:00
Erik Krogh Kristensen
cecb6c7bdd
add model for live-server
2021-08-31 14:23:23 +02:00
Erik Krogh Kristensen
b509627113
add tests for connect
2021-08-31 14:23:23 +02:00
Erik Krogh Kristensen
3d6ab81ab8
refactor the tests for connect
2021-08-31 14:23:23 +02:00
Erik Krogh Kristensen
c6399dbdf4
simplify the connect model by reusing NodeJSLib::RouteHandler
2021-08-31 14:23:23 +02:00
Tom Hvitved
eeb68a88b6
Add make target to run tests locally
2021-08-31 14:22:26 +02:00
Tom Hvitved
4677a0832f
Adopt shared CFG library
2021-08-31 13:42:41 +02:00
Tom Hvitved
50158b82c8
Sync shared files
2021-08-31 13:42:25 +02:00
Tom Hvitved
b9745c8e27
Bump codeql submodule
2021-08-31 13:38:52 +02:00
Chris Smowton
f94d8c341d
Abbreviate multi-column min
2021-08-31 11:57:49 +01:00
Chris Smowton
510f5abb9a
Add missing qldoc
2021-08-31 11:56:03 +01:00
Chris Smowton
5dddc48e60
autoformat
2021-08-31 11:53:13 +01:00
Arthur Baars
60aca018a8
Merge pull request #254 from github/hvitved/drop-files-folders-columns
...
Drop redundant columns from `files` and `folders` relations
2021-08-31 12:30:05 +02:00
Tom Hvitved
c70407ae8c
Update DB stats
2021-08-31 12:19:35 +02:00
Tom Hvitved
652d2a7a72
DB upgrade script
2021-08-31 12:19:35 +02:00
Tom Hvitved
7f03b87142
Drop redundant columns from files and folders relations
2021-08-31 12:16:26 +02:00
Arthur Baars
32253aa868
Merge pull request #266 from github/dbartol/refactor-packs
...
Refactor Ruby into library and query packs
2021-08-31 12:14:00 +02:00
Tom Hvitved
c8a5397085
Merge pull request #6513 from hvitved/csharp/cfg/shared
...
C#: Make CFG library shared
2021-08-31 11:55:43 +02:00
Asger Feldthaus
27f10123c7
JS: Autoformat
2021-08-31 11:19:11 +02:00
Asger Feldthaus
8833ff7854
JS: Use Vue model in Vuex model
2021-08-31 11:19:10 +02:00
Asger Feldthaus
ebf17e10d6
JS: Fixup in getComponentRef()
2021-08-31 11:19:09 +02:00
Asger Feldthaus
607f2d66b8
JS: Rename getASelfRef to getAnInstanceRef
2021-08-31 11:19:08 +02:00
Asger Feldthaus
999f22f548
JS: Fix getOwnOptionsObject
2021-08-31 11:19:08 +02:00
Asger Feldthaus
9f02ae29ec
JS: Autoformat
2021-08-31 11:19:07 +02:00
Asger Feldthaus
7dd65d8ac6
JS: Clean up taint step definitions
...
These are Unit types and so should be kept private as you can't
use them for anything other than getting all taint steps of a certain
type.
Also factors out accesses to 'this'.
2021-08-31 11:19:06 +02:00
Asger Feldthaus
5b0e26c814
JS: Use API graphs a few more places
2021-08-31 11:19:06 +02:00
Asger Feldthaus
4ff135e827
JS: Port class-based components to API graphs
2021-08-31 11:19:05 +02:00
Asger Feldthaus
5cd0996d92
JS: Deprecate getOwnOptionsObject()
2021-08-31 11:19:04 +02:00
Asger Feldthaus
7be4b76abb
JS: Simplify getABoundFunction
2021-08-31 11:19:04 +02:00
Asger Feldthaus
0ee1e8bd97
JS: Rename ExtendedVue to ComponentExtension
2021-08-31 11:19:03 +02:00
Asger Feldthaus
881951368d
JS: Merge VueInstance and ExtendedInstance into one case
2021-08-31 11:19:03 +02:00
Asger Feldthaus
ecda79834d
JS: Remove getOption(name) override subsumed by new implementation
2021-08-31 11:19:02 +02:00
Asger Feldthaus
e4901eda91
JS: Handle .extend called on any component
2021-08-31 11:19:01 +02:00
Asger Feldthaus
2a79817c3b
JS: Add test for "extends"
2021-08-31 11:19:01 +02:00
Asger Feldthaus
4d4443c3cf
JS: Use API graphs in getOption(s)
2021-08-31 11:19:00 +02:00
Asger Feldthaus
f450476b27
JS: Improve handling of default exports in Vue
2021-08-31 11:19:00 +02:00
Asger Feldthaus
cd6a60dc70
JS: Treat default-export from .vue file as entry point
2021-08-31 11:18:59 +02:00
Asger Feldthaus
b223049682
JS: Add getComponentRef()
2021-08-31 11:18:58 +02:00
Asger Feldthaus
b9d1b5584e
JS: Add API-node version of getOwnOptions
2021-08-31 11:18:58 +02:00
Asger Feldthaus
63b7c6a8d9
JS: Use API:: classes for clarity (no semantic change)
2021-08-31 11:18:57 +02:00
Asger Feldthaus
f7f69dc3ab
JS: Make MkExtendedInstance handle cross-module flow
2021-08-31 11:18:56 +02:00
Asger Feldthaus
76c38a564d
JS: Port vue() to API graphs
2021-08-31 11:18:56 +02:00
Tom Hvitved
7fc536db15
Data flow: Add precise call contexts to stage 2
2021-08-31 10:44:33 +02:00
CodeQL CI
cf9ab83dee
Merge pull request #6498 from bananabr/main
...
Approved by asgerf
2021-08-31 08:46:11 +02:00
CodeQL CI
c3e122f5fc
Merge pull request #6569 from erik-krogh/packageJsonModule
...
Approved by asgerf
2021-08-31 08:23:45 +02:00
Benjamin Muskalla
09aaa8f78e
Merge pull request #6562 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-08-30 21:31:02 +02:00
Rasmus Lerchedahl Petersen
a01fca5d48
Merge branch 'main' of github.com:github/codeql into python-regex-parsing-consistency-checks
...
To fix conflicts
2021-08-30 18:40:12 +02:00
yoff
13c5857241
Update python/ql/src/semmle/python/RegexTreeView.qll
...
Co-authored-by: Taus <tausbn@github.com >
2021-08-30 18:38:38 +02:00
Rasmus Lerchedahl Petersen
a855074588
Python: Try to remove py2/3 differences
2021-08-30 15:41:51 +02:00
Rasmus Lerchedahl Petersen
0de621edf9
Python: Add qldoc
2021-08-30 15:03:58 +02:00
Tom Hvitved
789e2e48cf
C#: Remove temporary dispatch restriction
2021-08-30 14:49:04 +02:00
Tom Hvitved
05b45da42f
Merge pull request #6556 from hvitved/csharp/insecure-sql-conn-flow
...
C#: Use data flow instead of taint tracking in `InsecureSQLConnection.ql`
2021-08-30 11:31:22 +02:00
Tom Hvitved
7dbdfeb161
Merge pull request #6548 from hvitved/csharp/dataflow/tests
...
C#: Update call-context data-flow tests
2021-08-30 11:30:55 +02:00
Rasmus Lerchedahl Petersen
1903cb8f82
Python: Add change note
2021-08-30 11:27:55 +02:00
Erik Krogh Kristensen
486b283c20
support the "module" field in package.json files
2021-08-30 11:05:32 +02:00
Rasmus Lerchedahl Petersen
a762373ad6
Python: Implement simple barrier guard
...
The one found in the original test case
2021-08-30 11:04:27 +02:00
Erik Krogh Kristensen
f5a1a12435
support case insensitive regexps in the ReDoS queries
2021-08-30 09:59:33 +02:00
github-actions[bot]
b28e956dd2
Add changed framework coverage reports
2021-08-30 00:08:31 +00:00
Andrew Eisenberg
bf15b18f22
Merge pull request #6565 from github/dbartol/suite-helpers-incomatbility
2021-08-27 12:40:11 -07:00
Sauyon Lee
adcb90aa8c
fixup generateflowtestcase chaneg
2021-08-27 11:25:03 -07:00
Sauyon Lee
23b9028d2c
Correctly determine which support method definitions are required
2021-08-27 11:25:03 -07:00
Sauyon Lee
04e04b3031
Use array allocation syntax
2021-08-27 11:25:03 -07:00
Sauyon Lee
97faeb026f
Fix side of stack that gen method types are used
2021-08-27 11:25:03 -07:00
Sauyon Lee
119de6c60c
Replace type variables before attempting to match to an array generation
2021-08-27 11:25:03 -07:00
Sauyon Lee
9d66761eeb
Consider a callable to ambiguous if it has a varargs parameter
2021-08-27 11:25:02 -07:00
Sauyon Lee
0d174f2daf
Only include support methods and imports from working test cases
2021-08-27 11:25:02 -07:00
Dave Bartolomeo
ede2ae11e9
Fix incompatibility with release CLI
...
This fixes #6563 , in which a customer reports being unable to run a query suite despite following the "Getting Started with the CodeQL CLI" instructions. The problem is that the released versions of the CodeQL CLI incorrectly disallow any reference to a library pack from within a .qls file. This is a CLI bug that will be fixed in the next CLI release, but since our policy is to make `github/codeql`'s `main` branch compatible with the latest released CLI, we need to work around this for now by pretending `codeql/suite-helpers` is a query pack.
2021-08-27 14:17:48 -04:00
Erik Krogh Kristensen
81742528a2
add test
2021-08-27 10:04:39 +02:00
Erik Krogh Kristensen
1b6e1dbd13
include property writes in super-classes when reading a property in a sub-class
2021-08-27 10:04:39 +02:00
Erik Krogh Kristensen
285c659541
add src as a potential unsafe DOM property name for js/xss-through-dom
2021-08-27 10:04:39 +02:00
Dave Bartolomeo
42629b969f
Move initial dbscheme
2021-08-26 19:43:06 -04:00
Dave Bartolomeo
593f3b62fe
Fix paths in upgrade script check
2021-08-26 19:26:26 -04:00
Dave Bartolomeo
9c03a02965
Update lock file for hotfix
2021-08-26 19:13:48 -04:00
Dave Bartolomeo
2c1620f25e
Move missed library file
2021-08-26 18:59:58 -04:00
Dave Bartolomeo
9d7b77496e
Use hotfixed version of codeql/suite-helpers with workaround for bug in released CLI
2021-08-26 18:50:04 -04:00
Dave Bartolomeo
11ad664bfb
Updated pack versions and lock files
2021-08-26 18:50:04 -04:00
Dave Bartolomeo
eb412fb31e
Fix PowerShell version of extractor pack script
2021-08-26 18:50:04 -04:00
Dave Bartolomeo
56332a676d
Ignore .codeql output directories
2021-08-26 18:50:04 -04:00
Arthur Baars
ac2c315839
Fix merge conflicts during rebase
2021-08-26 18:48:53 -04:00
Arthur Baars
0afcb9cc86
Workaround for compilation failure
2021-08-26 18:42:06 -04:00
Arthur Baars
817f8747de
Fix build
2021-08-26 18:42:02 -04:00
Arthur Baars
17fc6ab72c
Refactor into separate library and query packs
2021-08-26 18:40:06 -04:00
jorgectf
64b305cf7a
Add .qhelp along with its example
2021-08-26 23:29:45 +02:00
Edoardo Pirovano
48829450bb
Merge pull request #6560 from edoardopirovano/bump-js-packs
...
JS: Release new version of library and upgrade pack
2021-08-26 16:53:29 +01:00
Sauyon Lee
2132ee52d5
Restrict the size of appliesTo for default methods
2021-08-26 08:02:21 -07:00
Sauyon Lee
abf3bbbe8d
Add qldoc for public elements
2021-08-26 08:02:21 -07:00
Sauyon Lee
e7611ab641
Move getCall and appliesTo to relevant classes
2021-08-26 08:02:21 -07:00
Sauyon Lee
ce8d14e6ef
Add a priority predicate for test generation support methods
2021-08-26 08:02:21 -07:00
Sauyon Lee
1bd5eb5120
Use if statement instead of manual disjuction
2021-08-26 08:02:21 -07:00
Sauyon Lee
73d6177477
Java test gen: make char zero '\0'
2021-08-26 08:02:20 -07:00
Chris Smowton
2b0f6a2723
Java: Generate more realistic tests
2021-08-26 08:02:20 -07:00
Chris Smowton
33c727e6b9
Split up GenerateFlowTestCase.qll
...
This doesn't change any behaviour or alter any predicate bodies
2021-08-26 08:02:19 -07:00
Edoardo Pirovano
29e75aed75
JS: Release new version of library and upgrade pack
2021-08-26 15:54:54 +01:00
Alex Ford
ee6c809281
Merge pull request #262 from github/action-view-1
...
Start modelling ActionView
2021-08-26 15:22:55 +01:00
Tom Hvitved
348b12c109
Merge pull request #268 from github/hvitved/db-upgrade-pr-check
...
Add DB upgrade script check
2021-08-26 16:06:06 +02:00
Tom Hvitved
42daf5b6d3
Add DB upgrade script check
2021-08-26 15:55:18 +02:00
Alex Ford
9571e7bccc
drop ViewComponent parts from the ActionView library
2021-08-26 14:45:47 +01:00
Alex Ford
a3ae5bcec4
improve ActionControllerHelperMethod doc
2021-08-26 14:12:27 +01:00
Chris Smowton
7a0555ecb3
Merge pull request #6357 from artem-smotrakov/static-iv
...
Java: Static initialization vector
2021-08-26 13:45:43 +01:00
Chris Smowton
4e243f9277
Merge pull request #6555 from bmuskalla/objectsAsCsv
...
Java: Migrate `Objects` flow to CSV model
2021-08-26 13:45:16 +01:00
Alexandre Boulgakov
f18e8a4d95
Merge pull request #6541 from sashabu/sashabu/init
...
C++: Add support for default member initializers.
2021-08-26 13:29:56 +01:00
Rasmus Lerchedahl Petersen
49ae549e89
Python: Implement modifying syntax
2021-08-26 14:29:18 +02:00
Rasmus Lerchedahl Petersen
097c23e437
Python: add inline expectations test
...
Consider removing the original test
2021-08-26 14:08:52 +02:00
Benjamin Muskalla
9ca3b4661a
Fix return value for requireNonNullElse
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-08-26 14:03:55 +02:00
Tom Hvitved
7e1efbdd8e
C#: Use data flow instead of taint tracking in InsecureSQLConnection.ql
2021-08-26 13:48:57 +02:00
Tom Hvitved
592a42231f
C#: Fix test for InsecureSQLConnection.ql
2021-08-26 13:48:56 +02:00
Rasmus Wriedt Larsen
47377c7197
Merge branch 'main' into more-modeling
2021-08-26 13:40:17 +02:00
Alexandre Boulgakov
10bc2568b7
C++: Add support for default member initializers.
2021-08-26 12:32:30 +01:00
yoff
7b204cebbe
Merge pull request #6551 from erik-krogh/redosUnicode
...
JS/Python: use toUnicode in ReDoSUtil.qll
2021-08-26 12:41:11 +02:00
jorgectf
786edb72df
Update .expected
2021-08-26 12:36:34 +02:00
Jorge
d458464e6b
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-08-26 12:20:09 +02:00
Nick Rolfe
4ec30b2a4b
Merge pull request #267 from github/erik-krogh/redosUnicode
...
use toUnicode in ReDoSUtil.qll
2021-08-26 11:08:31 +01:00
Benjamin Muskalla
8abb9fb045
Replace Objects model
2021-08-26 12:06:56 +02:00
Benjamin Muskalla
4e2c148e80
Model Objects API as CSV
2021-08-26 12:06:47 +02:00
Rasmus Lerchedahl Petersen
d834cec9b9
Python: test simple sanitizer
2021-08-26 11:31:20 +02:00
Rasmus Lerchedahl Petersen
8614563b42
Python: More tests of syntactic constructs
2021-08-26 10:56:41 +02:00
Erik Krogh Kristensen
ff27a0c894
use toUnicode in ReDoSUtil.qll
2021-08-26 08:46:51 +00:00
Fosstars
1dd4bf00ac
Simplify StaticInitializationVectorSource
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-08-26 09:42:23 +02:00
Alex Ford
4a4b2445dc
Clean up how we map between Rails actions and default associated template files
2021-08-26 04:57:15 +01:00
Daniel Santos
b8ce5a63c5
Remove unncessary results
...
Simplifies query to improve performance by removing unnecessary results.
2021-08-25 17:33:45 -05:00
Rasmus Lerchedahl Petersen
5bff5188ac
Python: switch from negative to positive list
...
This should avoid potentially terrible performance.
Also noted the missing syntactic constructs,
as I went through the documnetation.
2021-08-25 23:52:42 +02:00
Erik Krogh Kristensen
0cc19d914e
use toUnicode in ReDoSUtil.qll
2021-08-25 22:21:43 +02:00
Andrew Eisenberg
039b655f7f
Merge pull request #6544 from github/aeisenberg/pack/javascript
...
Packaging: Rafactor Javascript core libraries
2021-08-25 13:17:34 -07:00
Andrew Eisenberg
5609c3d1b5
Packaging: Fix identical files script
2021-08-25 12:17:27 -07:00
Andrew Eisenberg
45d1fa7f01
Packaging: Rafactor Javascript core libraries
...
Extract the external facing `qll` files into the codeql/javascript-all
query pack.
2021-08-25 12:15:56 -07:00
Andrew Eisenberg
48344d9ffc
Merge pull request #6545 from github/aeisenberg/pack/python
...
Packaging: Rafactor Python core libraries
2021-08-25 12:04:44 -07:00
Artem Smotrakov
23e2322635
Simplify ArrayUpdate
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-08-25 19:43:43 +02:00
Artem Smotrakov
f41828e5db
Better qldoc in StaticInitializationVectorQuery.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-08-25 19:38:33 +02:00
Nick Rolfe
ffd80fcc88
Merge pull request #263 from github/bump_ts
...
Bump tree-sitter versions to pick up parsing fixes
2021-08-25 16:35:23 +01:00
Harry Maclean
4cbd848497
Merge pull request #264 from github/hmac-dependabot
...
Enable dependabot on the Rust projects
2021-08-25 16:34:29 +01:00
Daniel Santos
cd40de7464
Update javascript/ql/src/experimental/Security/CWE-079/ClipboardXss.ql
...
Typo fix
Co-authored-by: Asger F <asgerf@github.com >
2021-08-25 09:40:55 -05:00
Harry Maclean
0bd7e5914f
Enable dependabot on the Rust projects
...
Add a dependabot.yml file to trigger daily dependabot updates on the
four Rust projects in the codebase:
- `node_types`
- `generator`
- `extractor`
- `autobuilder`
2021-08-25 15:35:31 +01:00
CodeQL CI
1daeea5696
Merge pull request #6472 from erik-krogh/apiPromise
...
Approved by asgerf
2021-08-25 14:45:03 +01:00
Nick Rolfe
3b0055a7c0
Use published crate for tree-sitter-ruby 0.19
2021-08-25 14:32:01 +01:00
CodeQL CI
170a069657
Merge pull request #6403 from asgerf/js/handlebars-extraction
...
Approved by erik-krogh
2021-08-25 13:54:52 +01:00
Nick Rolfe
bc06817611
Add ERB comment as regression test for parsing bug
2021-08-25 12:43:33 +01:00
Nick Rolfe
289b59d3b0
Bump tree-sitter versions to pick up parsing fixes
...
Particularly, in tree-siter-embedded-template
2021-08-25 11:58:56 +01:00
Fosstars
f97c8bb049
Removed sanitizer in StaticInitializationVectorConfig
2021-08-25 12:40:48 +02:00
Fosstars
86b7b2b86d
Updated qldoc for ArrayUpdate
2021-08-25 12:14:36 +02:00
Fosstars
c80a1da483
Don't consider copyOf() and clone() in ArrayUpdate
2021-08-25 12:11:34 +02:00
Tom Hvitved
ab2bc38789
C#: Use shared logic in NodeGraph.ql test
2021-08-25 11:35:12 +02:00
Tom Hvitved
d405284d36
C#: Make CFG library shared
2021-08-25 11:35:11 +02:00
Asger Feldthaus
87843a3794
JS: Autoformatttt
2021-08-25 10:37:37 +02:00
Tom Hvitved
01f7fdfea5
C#: Update call-context data-flow tests
2021-08-25 10:34:53 +02:00
Erik Krogh Kristensen
c664d7cfb3
add a getMaybePromisifiedCall method in API graphs, and use it to model child_process
2021-08-25 10:27:09 +02:00
Rasmus Wriedt Larsen
605bd19306
Python: Add CWE-328 to py/weak-sensitive-data-hashing
...
Reading over the description at https://cwe.mitre.org/data/definitions/328.html :
> The product uses a hashing algorithm that produces a hash value that can be used to determine the original input, or to find an input that can produce the same hash, more efficiently than brute force techniques.
For the data that does not require computationally expensive hashing, that will be the exactly problems that this query finds 👍 (that is, MD5, SHA1)
2021-08-25 10:19:22 +02:00
Jonas Jensen
abdf993e47
Merge pull request #6537 from andersfugmann/implicit_downcast_involving_references
...
Implicit downcast involving references
2021-08-25 09:45:32 +02:00
Anders Peter Fugmann
67a267d971
Update cpp/change-notes/2021-08-24-implicit-downcast-from-bitfield.md
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-08-25 08:58:44 +02:00
Andrew Eisenberg
e23df94748
Packaging: Fix identical files script
2021-08-24 16:12:43 -07:00
Andrew Eisenberg
8f73c6968a
Merge pull request #6542 from github/aeisenberg/pack/move-external
...
Java: Move the ExternalArtifact.qll module to the library pack
2021-08-24 16:07:26 -07:00
yo-h
2b4635c4e0
Merge pull request #6539 from smowton/smowton/admin/downgrade-sql-unescaped
...
Downgrade precision of java/concatenated-sql-query
2021-08-24 17:22:01 -04:00
Andrew Eisenberg
3660c64328
Packaging: Rafactor Python core libraries
...
Extract the external facing `qll` files into the codeql/python-all
query pack.
2021-08-24 13:23:45 -07:00
Andrew Eisenberg
7f3066cd64
Java: Move the ExternalArtifact.qll module to the library pack
2021-08-24 13:01:02 -07:00
Chris Smowton
2689c13bde
Merge pull request #6485 from Marcono1234/marcono1234/field-initializer-fix
...
Java: Fix Field.getInitializer() matching non-initializer assignments
2021-08-24 20:52:02 +01:00
Alex Ford
abc283ee8a
remove ErbFile refs
2021-08-24 17:22:35 +01:00
Alex Ford
e403fc77d3
tests
2021-08-24 17:21:22 +01:00
Alex Ford
d628716c42
extend ActionController tests
2021-08-24 17:21:22 +01:00
Alex Ford
41ff10c908
extend modelling of ActionController, and start modelling ActionView
2021-08-24 17:21:22 +01:00
Geoffrey White
8f38ab0116
Merge pull request #6540 from jbj/ctime-weaken-claims
...
C++:Lower potentially-dangerous-function precision
2021-08-24 17:01:23 +01:00
Jonas Jensen
19ee64d9ad
C++:Lower potentially-dangerous-function precision
...
There have been multiple reports of false positives from this query over
time. Now that it has `@security-severity 10.0`, these false positives
look even worse.
The query looks purely for calls to functions with certain names, not
at whether the calls happen in a dangerous context. To justify a higher
precision, the query should only flag calls that happen in a thread or
another non-reentrant context.
2021-08-24 17:14:42 +02:00
yoff
2f5ed03798
Merge pull request #6323 from RasmusWL/sec-test-layout
...
Python: Restructure security tests to contain query name
2021-08-24 16:50:08 +02:00
Rasmus Lerchedahl Petersen
e865a290de
Python: straight port of query
...
The old query uses `pointsTo` to limit the sinks
to methods on lists and dictionaries.
That constraint is omitted here which could hurt performance.
2021-08-24 16:35:11 +02:00
Rasmus Lerchedahl Petersen
e3765ced78
Python: Add tests for modification of defaults
2021-08-24 16:35:11 +02:00
Nick Rolfe
5e783e4798
Implement getPrimaryQlClasses
2021-08-24 14:49:56 +01:00
Chris Smowton
5a2dfda09e
Add test for field initializers
2021-08-24 14:04:45 +01:00
Marcono1234
c8d98ae649
Java: Fix Field.getInitializer() matching non-initializer assignments
2021-08-24 14:04:44 +01:00
Asger Feldthaus
8a564cc64b
JS: Fix qldoc
2021-08-24 14:31:00 +02:00
Asger F
8f8a46848d
Update javascript/ql/src/semmle/javascript/frameworks/Templating.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-08-24 14:16:41 +02:00
CodeQL CI
c66a34be9c
Merge pull request #6533 from erik-krogh/cwdPath
...
Approved by asgerf
2021-08-24 13:10:38 +01:00
CodeQL CI
c0e8680c81
Merge pull request #6534 from erik-krogh/fallbackEntry
...
Approved by asgerf
2021-08-24 11:38:25 +01:00
Erik Krogh Kristensen
99d7e8b953
add change note
2021-08-24 12:35:20 +02:00
Chris Smowton
7f73efe3e1
Downgrade precision of java/concatenated-sql-query
2021-08-24 10:46:01 +01:00
Rasmus Wriedt Larsen
ca341bde08
Merge pull request #5612 from jty-team/jty/python/nosqlInjection
...
Python: CWE-943 - Add NoSQL injection query
2021-08-24 11:29:25 +02:00
Anders Fugmann
6b66f5dbb4
C++: Add change note for implicit downcasting involving references
2021-08-24 10:26:25 +02:00
Anders Fugmann
6d4b7c828c
C++: Remove superfluous 'and any()'
2021-08-24 09:37:39 +02:00
Ian Lynagh
43355feaeb
Merge pull request #6536 from github/igfoo/getPrimaryQlClasses
...
All languages: Add getPrimaryQlClasses()
2021-08-23 19:49:37 +01:00
Geoffrey White
bc9994774a
Merge pull request #6515 from MathiasVP/clarify-initialization-vs-assignment-in-docs
...
C++: Clarify difference between 'Initializer' and 'Assignment'.
2021-08-23 18:00:36 +01:00
Ian Lynagh
1e06808105
Update cpp/change-notes/2021-08-23-getPrimaryQlClasses.md
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-08-23 16:52:07 +01:00
Chris Smowton
57d44b8a40
Merge pull request #6538 from atorralba/atorralba/fix-test-generator-qlpack
...
Java: Adapt test generator to new qlpack name
2021-08-23 15:57:38 +01:00
Ian Lynagh
a9db1c52e5
All languages: Add getPrimaryQlClasses()
...
This is a non-overridable predicate that concatenates all the
getAPrimaryQlClass() results into a comma-separated string.
2021-08-23 15:49:10 +01:00
Shati Patel
2a51abdee3
Merge pull request #6523 from shati-patel/vscode-docs
...
Docs: Minor tweaks to VS Code docs (query history + viewing results)
2021-08-23 15:06:09 +01:00
Tony Torralba
1ee2f6f207
Adapt test generator to new package name
2021-08-23 16:05:13 +02:00
Erik Krogh Kristensen
38477d7d2e
Merge pull request #6462 from erik-krogh/repeat
...
JS: support more regular expressions in js/incomplete-multi-character-sanitization
2021-08-23 15:39:31 +02:00
Shati Patel
1dc18c4f9c
Update docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2021-08-23 14:37:51 +01:00
yoff
0c0f335b1c
Merge pull request #6508 from github/RasmusWL-patch-1
...
Python: Update comment for RegExpTreeView isExcluded
2021-08-23 15:07:29 +02:00
james
18440710b4
fix typos
2021-08-23 14:02:53 +01:00
Anders Fugmann
c04ba7b724
C++: Revert benign change of return type from 'unsigned int' to 'int' in testcase, and add 'GOOD' annotation to the testcase
2021-08-23 14:58:43 +02:00
Anders Fugmann
9324d8f348
C++: Fix case where implicit downcasts were not detected when using reference
2021-08-23 14:44:49 +02:00
Anders Fugmann
8939a9b2c1
C++: Add tests for implicit downcast involving references
2021-08-23 14:42:36 +02:00
james
66bdbf4a28
address review comments
2021-08-23 11:35:04 +01:00
james
dbf7487a9b
address review comments
2021-08-23 11:34:48 +01:00
Chris Smowton
0210d85ce8
Merge pull request #6499 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-08-23 11:26:36 +01:00
shati-patel
e1ae531b62
Docs: Auto-update copyright year
2021-08-23 11:11:31 +01:00
Chris Smowton
4cfa0f66a8
Merge pull request #6526 from github/aeisenberg/pack/java-default
...
Packaging: Migrate default.qll
2021-08-23 11:05:00 +01:00
yoff
467aa647da
Merge pull request #6507 from tausbn/python-prevent-polynomial-redos-explosion
...
Python: Prevent explosion in poly-ReDoS query
2021-08-23 11:48:14 +02:00
Rasmus Lerchedahl Petersen
34d7772a0d
Python: Move constraints into pranch charpreds
...
For sequences and alternations, we require at least one child.
Otherwise, we wish to represent the term differently.
This avoids multiple representations.
2021-08-23 11:44:00 +02:00
Nick Rolfe
9c17e00645
Merge pull request #256 from github/syncRedos
...
sync ReDoSUtil.qll with python/JS
2021-08-23 10:11:16 +01:00
Erik Krogh Kristensen
5fe6671cc5
making it more explicit what character class matching is used for
2021-08-23 08:30:50 +02:00
Erik Krogh Kristensen
5d232bbfce
recognize more src folders when "main" in package.json points to a compiled output
2021-08-23 08:09:01 +02:00
Erik Krogh Kristensen
32ac8778bd
add the cwd option to shell executions as a sink to js/path-injection
2021-08-23 07:32:05 +02:00
github-actions[bot]
7d9f06fb63
Add changed framework coverage reports
2021-08-23 00:08:11 +00:00
Andrew Eisenberg
2042cc7871
Packaging: Migrate default.qll
2021-08-20 20:01:29 -07:00
Andrew Eisenberg
eda7616a23
Merge pull request #6514 from github/aeisenberg/pack/java
...
Packaging: Refactor java and C#
2021-08-20 15:24:13 -07:00
Andrew Eisenberg
8e75fef923
Fix identical files script
2021-08-19 14:55:54 -07:00
Andrew Eisenberg
c9f1c98390
Packaging: C# refactoring
...
Split c# pack into `codeql/csharp-all` and `codeql/csharp-queries`.
2021-08-19 14:09:35 -07:00
Andrew Eisenberg
8e750f18ad
Packaging: Java refactoring
...
Split java pack into `codeql/java-all` and `codeql/java-queries`.
2021-08-19 14:09:35 -07:00
Andrew Eisenberg
39533317ff
Merge pull request #6524 from github/aeisenberg/cpp/move-file
...
C++: Move file from src to lib
2021-08-19 13:46:31 -07:00
Andrew Eisenberg
2b36378917
C++: Move file from src to lib
...
Neglected to do this one earlier.
2021-08-19 13:12:42 -07:00
shati-patel
03953ef32d
Update default query history format
2021-08-19 19:07:47 +01:00
shati-patel
58073ceeb1
Docs: Update options for viewing results in VS Code
2021-08-19 19:07:29 +01:00
Owen Mansel-Chan
714e126088
Merge pull request #6370 from owen-mc/java/model/apache-collections
...
Java: Model more of Apache Commons Collections
2021-08-19 15:09:06 +01:00
Asger Feldthaus
2553338bce
JS: Autoformat {AST,HTML}Extractor.java
2021-08-19 14:54:05 +02:00
Asger Feldthaus
bac212c610
JS: Fix typo: instantiaton -> instantiation
2021-08-19 14:41:18 +02:00
Asger Feldthaus
a1819a54f2
JS: Remove unused isInPlainCodeContext
2021-08-19 14:22:05 +02:00
Asger Feldthaus
bef222dfcc
JS: Add placeholder in attribute to trap test
2021-08-19 14:19:25 +02:00
CodeQL CI
1e1ee55ade
Merge pull request #6511 from asgerf/js/vue-component-renaming
...
Approved by erik-krogh
2021-08-19 12:57:15 +01:00
Mathias Vorreiter Pedersen
207dcb08a7
C++: Make it clear that 'getAnAssignment' also gets the expression from the initializer.
2021-08-19 13:38:32 +02:00
Alexandre Boulgakov
297ae91e3b
Merge pull request #6516 from sashabu/sashabu/elements
...
C++: Move element tests to internal repo.
2021-08-19 11:28:43 +01:00
Mathias Vorreiter Pedersen
586c5b90c1
C++: Mention Variable.getAnAssignedValue() in the QLDoc for getAnAssignment.
2021-08-19 12:27:03 +02:00
Joe Farebrother
9dc28eb9b5
Merge pull request #6387 from joefarebrother/guava-cache
...
Java: Model guava cache package
2021-08-19 10:53:48 +01:00
Tamás Vajk
763de4fff9
Merge pull request #6425 from raulgarciamsft/insecureRandom_potential_fix
...
C#: Adding Membership.GeneratePassword() as a bad source of random data
2021-08-19 11:16:26 +02:00
Alexandre Boulgakov
89e52bf500
C++: Move element tests to internal repo.
2021-08-19 09:48:13 +01:00
Mathias Vorreiter Pedersen
01dfab2aec
Update cpp/ql/lib/semmle/code/cpp/exprs/Assignment.qll
...
Co-authored-by: Matan Merom <1010225+matan7890@users.noreply.github.com >
2021-08-19 10:32:46 +02:00
Rasmus Lerchedahl Petersen
c4554836ca
Python: merge test.py into unittests.py
2021-08-19 10:24:32 +02:00
Rasmus Lerchedahl Petersen
3c647c65bf
Python: update comment
2021-08-19 10:21:19 +02:00
Tamas Vajk
d97525e21e
Fix minor quality issues in comment and change note
2021-08-19 09:30:23 +02:00
Mathias Vorreiter Pedersen
f5c23c9c52
C++: Clarify the difference between 'Initializer' and 'Assignment' in the QLDoc for these classes.
2021-08-19 08:33:27 +02:00
Erik Krogh Kristensen
ba40a99ef8
Merge pull request #38 from github/rankOne
...
add a query for finding rank[1]
2021-08-18 23:23:00 +02:00
Erik Krogh Kristensen
b8a368a47f
QL: Merge pull request #38 from github/rankOne
...
add a query for finding rank[1]
2021-08-18 23:23:00 +02:00
Alexandre Boulgakov
1eb804a072
Merge pull request #6496 from sashabu/sashabu/c_linkage
...
C++: Allow querying for "C" language linkage on routine types.
2021-08-18 17:46:44 +01:00
Chris Smowton
48818ebd6d
Merge pull request #6434 from smowton/smowton/admin/jodd-unsafe-deserialization
...
Java: Unsafe deserialization: add support for Jodd JSON library
2021-08-18 17:26:02 +01:00
Mathias Vorreiter Pedersen
24638418f1
Merge pull request #6503 from andersfugmann/model_strdupa_functions
...
C++: Model strdupa and strndupa
2021-08-18 17:48:04 +02:00
Shati Patel
089077ed60
Merge pull request #6322 from shati-patel/shati-patel/docs-multi-dbs-vscode
...
Docs: Running query on multiple DBs in CodeQL for VS Code
2021-08-18 16:41:10 +01:00
Rasmus Lerchedahl Petersen
21f683d531
Python: clean up stray coments
2021-08-18 16:59:35 +02:00
Daniel Santos
5644514606
Update javascript/ql/src/experimental/Security/CWE-079/ClipboardXss.ql
...
Co-authored-by: Asger F <asgerf@github.com >
2021-08-18 09:52:55 -05:00
Alexandre Boulgakov
3ba308a69f
C++: Allow querying for "C" language linkage on routine types.
2021-08-18 15:35:30 +01:00
Taus
021e5ff510
Python: Autoformat
2021-08-18 14:27:54 +00:00
Rasmus Wriedt Larsen
60eb81106a
Python: Update comment for RegExpTreeView isExcluded
...
I noticed after reading https://github.com/github/codeql/pull/6507 , but didn't want to overload that PR.
2021-08-18 16:16:26 +02:00
Chris Smowton
cc4fe7375c
Merge pull request #5953 from github/sauyon/java/spring-webutil
...
Java: Add models for the Spring `web.util` package
2021-08-18 15:07:28 +01:00
Mathias Vorreiter Pedersen
27df2727e9
Merge pull request #6501 from erik-krogh/rank
...
CPP/C#: use min() instead of rank[1]()
2021-08-18 15:47:08 +02:00
Asger Feldthaus
eef7f559c6
JS: Change note
2021-08-18 15:36:41 +02:00
Asger Feldthaus
cde8059960
JS: Update some comments referring to Vue instances
2021-08-18 15:36:41 +02:00
Asger Feldthaus
165f6c6935
JS: Add a deprecated forwarder for Vue::Instance
2021-08-18 15:36:41 +02:00
Asger Feldthaus
7b6485c32a
JS: Rename some test predicates to match class name
2021-08-18 15:36:41 +02:00
Asger Feldthaus
b21071923e
JS: Rename variables to match new class name
2021-08-18 15:36:41 +02:00
Asger Feldthaus
0a98679f74
JS: Rename Vue::Instance to Vue::Component
2021-08-18 15:36:41 +02:00
Anders Fugmann
0b98b39f91
C++: Test dataflow tests for strdupa and strndupa functions
2021-08-18 15:22:14 +02:00
Taus
af91a2df00
Python: Prevent explosion in poly-ReDoS query
...
I consider this to be a short-term solution to the performance problems
we identified. The choice of "at most ten occurrences of `.*`" is
somewhat arbitrary, and it's possible a higher limit would work just as
well.
2021-08-18 13:21:46 +00:00
james
dcbf766217
add new article to toc
2021-08-18 12:14:48 +01:00
Anders Fugmann
44752d5ee0
C++: Model strdupa and strndupa string functions returning memory allocated with alloca
2021-08-18 13:12:08 +02:00
james
8443d344a2
correct article name
2021-08-18 11:58:42 +01:00
james
18b8244406
fix link
2021-08-18 11:47:16 +01:00
james
429decd7b6
tweak sojme text
2021-08-18 11:38:03 +01:00
james
ad2850dd5d
add new tutorial
2021-08-18 11:27:53 +01:00
james
babec9bf79
add data flow debugging guide
2021-08-18 11:26:51 +01:00
Erik Krogh Kristensen
91b8c1c4a0
Update ql/src/queries/style/RankOne.ql
...
Co-authored-by: Taus <tausbn@github.com >
2021-08-18 11:25:36 +02:00
Erik Krogh Kristensen
23b2d43440
QL: Update ql/src/queries/style/RankOne.ql
...
Co-authored-by: Taus <tausbn@github.com >
2021-08-18 11:25:36 +02:00
Erik Krogh Kristensen
feb1ab86f0
add a query for finding rank[1]
2021-08-18 09:19:05 +00:00
Erik Krogh Kristensen
b45a793e28
QL: add a query for finding rank[1]
2021-08-18 09:19:05 +00:00
Asger Feldthaus
4a1fb5df5d
JS: De-abstractify Vue::Instance class
2021-08-18 11:14:25 +02:00
Asger Feldthaus
40ae13a20e
JS: Rename Vue::{Component -> ComponentRegistration}
2021-08-18 11:14:25 +02:00
Erik Krogh Kristensen
dd59f79947
use min() instead of rank[1]()
2021-08-18 11:09:03 +02:00
Erik Krogh Kristensen
4cc2ac9d35
exclude char classes that match everything
2021-08-18 08:59:17 +00:00
Harry Maclean
a2115f41e8
Merge pull request #259 from github/hmac-print-ast
...
Don't include desugared nodes in the printed AST
2021-08-18 09:16:36 +01:00
Aditya Sharad
21d03cd365
Merge pull request #6488 from github/aeisenberg/pack/cpp
...
Packaging: Refactor cpp libraries
2021-08-17 16:44:04 -07:00
Andrew Eisenberg
03d6b15401
Merge branch 'main' into aeisenberg/pack/cpp
2021-08-17 15:28:47 -07:00
Andrew Eisenberg
88ceb42356
Packaging: Migrate cpp experimental/semmle folder to lib
...
Also, fix up some library path dependencies.
2021-08-17 14:41:41 -07:00
Andrew Eisenberg
d8e4e25c1e
Packaging: Fix query pack references
...
We can't have recursive references to query packs.
2021-08-17 13:03:40 -07:00
Sauyon Lee
17cef3f498
Address review comments
2021-08-17 12:45:47 -07:00
Andrew Eisenberg
2c5dd2dfa3
Packaging: Refactor the cpp libraries
...
This PR separates the core cpp packs into `codeql/cpp-queries` and
`codeql/cpp-all`.
There are very few lines of code changed. Almost all changes are moving
files around.
2021-08-17 11:22:36 -07:00
Daniel Santos
5e155d25b1
new Experimental query ClipboardBasedXss
2021-08-17 12:57:26 -05:00
Joe Farebrother
076aeb5d80
Update tests
2021-08-17 16:44:58 +01:00
Benjamin Muskalla
99e19e6d59
Fix predicate to only match the current API
2021-08-17 16:26:08 +02:00
Benjamin Muskalla
035f7b57e9
Improve query name
2021-08-17 16:25:49 +02:00
Harry Maclean
e82c21d35d
Don't include desugared nodes in the printed AST
...
The base `PrintAstConfiguration` class already has a predicate for
filtering out desugared nodes - this change just makes use of it in the
query.
This fixes https://github.com/github/codeql-team/issues/408 , which was
caused by including nodes representing the desugaring of
a[b] = c
in the query output. This would result in multiple edges to the same
target node (one from the surface AST and another from the desugared
AST), which the VSCode AST viewer cannot handle.
2021-08-17 15:20:30 +01:00
Mathias Vorreiter Pedersen
88372df125
Merge pull request #6495 from andersfugmann/more_buffer_overrun_tests
...
More buffer overrun tests
2021-08-17 16:18:36 +02:00
yoff
50a4345235
Merge pull request #6161 from RasmusWL/peewee-modeling
...
Python: Add modeling of `peewee`
2021-08-17 16:06:35 +02:00
Anders Fugmann
666d5917fa
C++: Avoid inclusion of standard headers
2021-08-17 15:56:28 +02:00
Anders Fugmann
469f8a638b
C++: Add more tests for buffer overruns
2021-08-17 15:21:33 +02:00
Anders Fugmann
35b7808866
C++: Fix wrong comment on what is tested
2021-08-17 15:21:03 +02:00
Rasmus Wriedt Larsen
3231ae77ef
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-08-17 15:17:10 +02:00
Erik Krogh Kristensen
25d29b2c29
add change-note
2021-08-17 15:12:15 +02:00
Erik Krogh Kristensen
3f7f5d2418
performance improvements in ReDoSUtil
2021-08-17 15:10:33 +02:00
Erik Krogh Kristensen
49e47641e4
sync ReDoSUtil.qll with python
2021-08-17 15:10:33 +02:00
Erik Krogh Kristensen
9c2d83e82b
add tests
2021-08-17 15:10:30 +02:00
Erik Krogh Kristensen
6d06550f7d
update expected output
2021-08-17 15:10:30 +02:00
Erik Krogh Kristensen
5d4c434d34
restrict char class matches to alpha-numeric chars
2021-08-17 15:10:30 +02:00
Erik Krogh Kristensen
59f0a41665
support more regular expressions in js/incomplete-multi-character-sanitization
2021-08-17 15:10:20 +02:00
Chris Smowton
92d1becf08
Merge pull request #6474 from github/yo-h-patch-1
...
Java: add `org.json` package to known frameworks
2021-08-17 14:09:39 +01:00
Chris Smowton
c52a51e5c8
Merge pull request #6454 from smowton/smowton/admin/change-note-wording
...
Java: Elaborate change note a little
2021-08-17 14:08:04 +01:00
CodeQL CI
92804a3cc3
Merge pull request #6487 from erik-krogh/moreJquerySinks
...
Approved by asgerf
2021-08-17 11:46:24 +01:00
Arthur Baars
df4fb23f37
Merge pull request #246 from github/aibaars/tweaks
...
Add an example snippet query
2021-08-17 12:42:02 +02:00
Cornelius Riemenschneider
341dad5f73
Merge pull request #6490 from criemen/criemen/delete-flaky-test
...
JS: Delete flaky test.
2021-08-17 12:33:03 +02:00
CodeQL CI
e3cdc4522e
Merge pull request #6450 from asgerf/js/query-suffix-convention2
...
Approved by erik-krogh
2021-08-17 11:31:21 +01:00
Arthur Baars
9b877dc6e1
Add an example snippet query
2021-08-17 11:29:44 +01:00
Rasmus Wriedt Larsen
15d483d56c
Python: Use TypeTrackingNode in new PEP249 modeling
2021-08-17 12:03:40 +02:00
Rasmus Wriedt Larsen
b649f5f38c
Merge branch 'main' into peewee-modeling
2021-08-17 12:03:18 +02:00
Tom Hvitved
44ff623d8c
Merge pull request #5508 from edvraa/deserializers
...
deserialization sinks
2021-08-17 11:41:52 +02:00
Rasmus Lerchedahl Petersen
dee5535fbb
Python: condense tests
...
This also avoids potential licensing issues.
2021-08-17 11:24:39 +02:00
Tom Hvitved
50cfd9c318
Merge pull request #257 from github/hvitved/cfg/erb
...
CFG: Allow `erb` top-level scopes
2021-08-17 11:21:44 +02:00
Sauyon Lee
390e48fdd2
Remove more redundant models
2021-08-17 02:17:36 -07:00
Arthur Baars
115a13f50c
Merge pull request #258 from github/qltest-no-beta
...
Exclude beta releases of code-cli for qltest job
2021-08-17 11:09:53 +02:00
Cornelius Riemenschneider
59b3d55b9a
JS: Delete flaky test.
2021-08-17 10:58:39 +02:00
Alex Ford
8427a6bcee
exclude beta releases of code-cli for qltest job
2021-08-17 09:57:52 +01:00
Tom Hvitved
394c27a279
CFG: Allow erb top-level scopes
2021-08-17 10:46:15 +02:00
Andrew Eisenberg
e566fb9c5a
Packaging: Update suite-helpers qlpack
...
Uses new style naming scheme.
2021-08-16 17:51:33 -07:00
Erik Krogh Kristensen
cc2a267b07
recognize array elements from JQuery objects as DOM values
2021-08-16 22:35:57 +02:00
Benjamin Muskalla
1d3bcdf522
Align tests with new query structure
2021-08-16 21:55:00 +02:00
Chris Smowton
ff3f85be49
Autoformat
2021-08-16 18:09:40 +01:00
Owen Mansel-Chan
b23fabe8cb
Fix errors from previous PR
2021-08-16 16:11:17 +01:00
Benjamin Muskalla
87ef540b52
Split out queries showing supported APIs
2021-08-16 16:38:32 +02:00
Benjamin Muskalla
89f4a35273
Remove filter to see all unsupported APIs
2021-08-16 15:40:53 +02:00
Joe Farebrother
48c61fc4b4
Update models for Cache.getAllPresent and LoadingCache.getAll
2021-08-16 13:50:54 +01:00
Mathias Vorreiter Pedersen
221a259938
Merge pull request #6486 from ihsinme/ihsinme-patch-textFix
...
correction of the error text
2021-08-16 14:49:33 +02:00
ihsinme
6988912b72
Update UndefinedOrImplementationDefinedBehavior.ql
2021-08-16 15:20:00 +03:00
Erik Krogh Kristensen
5e63b0b132
add RegExpSubPattern.getOperand
2021-08-16 12:14:53 +00:00
Erik Krogh Kristensen
8bd663a7ce
sync ReDoSUtil.qll with python/JS
2021-08-16 12:04:22 +00:00
Erik Krogh Kristensen
46959234b7
Merge pull request #6288 from erik-krogh/emptyRedos
...
JS/Python: Fix FP in redos related to empty lookaheads
2021-08-16 13:48:22 +02:00
Asger Feldthaus
0047536337
JS: Add change note
2021-08-16 13:22:43 +02:00
ihsinme
c63dff639c
Update UndefinedOrImplementationDefinedBehavior.expected
2021-08-16 14:15:10 +03:00
ihsinme
74f372d547
Update UndefinedOrImplementationDefinedBehavior.ql
2021-08-16 14:11:28 +03:00
Asger Feldthaus
4923bda0f3
JS: Autoformat
2021-08-16 12:33:55 +02:00
Tamás Vajk
166a6b02f6
Merge pull request #6268 from tamasvajk/feature/generic-type-name
...
C#: Remove type args/params from generic type names in extractor
2021-08-16 12:22:16 +02:00
Chris Smowton
497f36796c
Merge pull request #6483 from Marcono1234/marcono1234/callable-string-signature-doc
...
Java: Improve Callable.getStringSignature() documentation
2021-08-16 11:05:59 +01:00
Erik Krogh Kristensen
e962a7c77c
Update python/ql/src/semmle/python/RegexTreeView.qll
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-08-16 11:24:05 +02:00
Rasmus Lerchedahl Petersen
6be78d442c
Python: fix compilation
2021-08-16 10:35:33 +02:00
Fosstars
fbac5891b8
Fixed a typo in qldoc
2021-08-14 21:28:30 +02:00
Marcono1234
48872b4588
Java: Improve Callable.getStringSignature() documentation
2021-08-14 19:58:55 +02:00
Fosstars
e2dc9753ac
Covered copyOfRange() and clone() in ArrayUpdate
2021-08-14 13:25:46 +02:00
Fosstars
d218813320
Updated qldoc for ArrayUpdate
2021-08-14 13:09:14 +02:00
Fosstars
11992404ec
Be precise when checking for Cipher.ENCRYPT_MODE
2021-08-14 12:18:02 +02:00
Fosstars
4e69081c22
Support multi-dimensional arrays
2021-08-13 20:52:27 +02:00
Sarita Iyer
57ff8e7138
Merge pull request #6473 from github/sarita-iyer/codeql-packs-vscode
...
Added article for working with codeQL packs in VS Code
2021-08-12 16:08:00 -04:00
Sarita Iyer
a373ac8332
Update period at end of quote
2021-08-12 15:42:23 -04:00
Sarita Iyer
eb2ef23d56
Apply suggestions from code review
...
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com >
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2021-08-12 14:57:13 -04:00
Sauyon Lee
814004e63d
Add tests for html escape functions
2021-08-12 11:20:49 -07:00
Sauyon Lee
ed1d855025
Java: Remove redundant models from Spring web.util and fix typo
2021-08-12 11:20:49 -07:00
Sauyon Lee
9c1d5a70e3
Java: Add test for XSS sanitizer
2021-08-12 11:20:49 -07:00
Sauyon Lee
9a5c0f6c73
Java: Add HTML escapes as XSS sanitizers
...
Co-Authored-By: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-08-12 11:20:49 -07:00
Sauyon Lee
eb980e2a40
Add change note
2021-08-12 11:20:49 -07:00
Sauyon Lee
d86dffbb5d
Add tests for Spring web.util
2021-08-12 11:20:48 -07:00
Sauyon Lee
fd0ea15719
Add stubs for Spring web.util tests
2021-08-12 11:20:48 -07:00
Sauyon Lee
25649a61c4
Java: Add models for the Spring web.util package
2021-08-12 11:20:48 -07:00
Sarita Iyer
d1190dc5f2
Switch from object to element, and clarify package cache functionality
2021-08-12 10:41:20 -04:00
Owen Mansel-Chan
1c2476c6a1
Add explanatory comments
2021-08-12 14:51:49 +01:00
Owen Mansel-Chan
fe477ff989
Fix more models based on review comments
2021-08-12 14:51:37 +01:00
Rasmus Lerchedahl Petersen
2df846ee4b
Merge branch 'python-regex-parsing-consistency-checks' of github.com:yoff/codeql into python-regex-parsing-consistency-checks
2021-08-12 13:34:11 +02:00
Rasmus Lerchedahl Petersen
54e65ce765
Python: Add consistency tests
...
for all the projects that went out of disk as a result of ReDoS
2021-08-12 13:33:44 +02:00
Shati Patel
1707fb8821
Merge pull request #6475 from github/correct-link-syntax
...
Fix markup in `metadata-for-codeql-queries.rst`
2021-08-12 09:36:18 +01:00
yoff
61bbddeb0c
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-08-12 09:39:04 +02:00
Asger Feldthaus
a6c389698e
JS: Fix DomBasedXssQuery.qll
2021-08-12 09:31:24 +02:00
Asger Feldthaus
fd027451b1
JS: Fix StoresXss example query
2021-08-12 09:30:43 +02:00
Asger Feldthaus
020d65befc
Fix StoredXssTypeTracking example query
2021-08-12 09:30:43 +02:00
Asger Feldthaus
cb0075f15a
JS: Remove use of deprecated API
2021-08-12 09:30:43 +02:00
Asger Feldthaus
3a6da34454
JS: Add missing QLdoc
2021-08-12 09:30:43 +02:00
Asger Feldthaus
71930f93f1
JS: Fix cleartext logging
2021-08-12 09:30:43 +02:00
Asger Feldthaus
abb819ed88
JS: Fix insecure randomness
2021-08-12 09:30:43 +02:00
Asger Feldthaus
5638a33199
JS: Remove obsolete module prefix
2021-08-12 09:30:43 +02:00
Asger Feldthaus
f6da030572
JS: Migrate to *Query.qll convention
2021-08-12 09:30:18 +02:00
CodeQL CI
8fe2a43fd9
Merge pull request #6433 from asgerf/js/tainted-url-suffix
...
Approved by erik-krogh
2021-08-12 00:28:46 -07:00
James Fletcher
3bd918972e
fix markup
2021-08-12 08:16:20 +01:00
yo-h
bd3a24d568
Java: add org.json package to known frameworks
2021-08-11 20:03:32 -04:00
Sarita Iyer
186e011a4b
Added codeql packs info for use in VS code
2021-08-11 15:47:27 -04:00
Alexandre Boulgakov
00466e4bb0
Merge pull request #6464 from sashabu/sashabu/auto
...
C++: Expose trailing return type presence.
2021-08-11 18:43:39 +01:00
Alex Ford
0f6c464d27
Merge pull request #251 from github/aibaars/test
...
Add integration test
2021-08-11 16:54:47 +01:00
Chris Smowton
7a2704373f
Merge pull request #5943 from joefarebrother/java-stub
...
[Java] Add stubbing script
2021-08-11 16:11:53 +01:00
Alexandre Boulgakov
490498899b
C++: Expose trailing return type presence.
2021-08-11 16:04:07 +01:00
Geoffrey White
3f72a1abea
Merge pull request #6471 from MathiasVP/fix-fp-in-incorrect-allocation-error-handling
...
C++: Fix false-positive in 'cpp/incorrect-allocation-error-handling'
2021-08-11 15:56:55 +01:00
CodeQL CI
c8ded7ebf6
Merge pull request #6459 from erik-krogh/oreq
...
Approved by asgerf
2021-08-11 07:40:13 -07:00
Mathias Vorreiter Pedersen
8d594dbf08
Update cpp/ql/test/query-tests/Security/CWE/CWE-570/test.cpp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-08-11 16:18:18 +02:00
Benjamin Muskalla
8aba0b04bc
Add QLDoc for all shared libraries
2021-08-11 16:07:24 +02:00
Mathias Vorreiter Pedersen
0d1884d7a6
C++: Fix FP and accept test changes.
2021-08-11 15:38:57 +02:00
Mathias Vorreiter Pedersen
c2b1da0010
C++: Add FP testcase with an 'new' that has a 'std::nothrow&' parameter, but not a 'noexcept' specifier. This case was previously not reported because of the 'noexcept' specifier, and apparently the 'std::nothrow' case was broken all along.
2021-08-11 15:38:03 +02:00
Benjamin Muskalla
26ffe6c03d
Add tests for telemetry queries
2021-08-11 15:32:09 +02:00
Benjamin Muskalla
6287e6d8e9
Filter unused API callsites
2021-08-11 15:31:56 +02:00
Benjamin Muskalla
ec7f4d18e1
Avoid duplicates and support modular runtime
2021-08-11 15:31:33 +02:00
Rasmus Lerchedahl Petersen
c08f94ec04
Python: Fix parsing of octal escapes
2021-08-11 15:01:26 +02:00
Rasmus Lerchedahl Petersen
34b054ff53
Python: Add consistency checks
2021-08-11 14:58:27 +02:00
Mathias Vorreiter Pedersen
89ce25f247
Merge pull request #6083 from ihsinme/ihsinme-patch-275
...
CPP: Add query for CWE-783 Operator Precedence Logic Error When Use Bitwise Or Logical Operations
2021-08-11 14:40:09 +02:00
Asger Feldthaus
2da40b8b07
JS: Fix some performance issues
2021-08-11 14:31:06 +02:00
ihsinme
6d24047626
Update OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
2021-08-11 14:34:20 +03:00
Arthur Baars
f26f8c1e05
Add integration test
2021-08-11 12:54:30 +02:00
Asger Feldthaus
13fa49a7f1
JS: Update TRAP output
2021-08-11 12:54:22 +02:00
Asger Feldthaus
b9b10af9b5
JS: Tolerate parse errors in test due to speculative parsing
2021-08-11 12:54:22 +02:00
Asger Feldthaus
74505544e9
JS: Remove unused getTemplateContentNode
2021-08-11 12:54:22 +02:00
Asger Feldthaus
5d2bc5e40b
JS: Update stats file
2021-08-11 12:54:22 +02:00
Asger Feldthaus
31d93bb150
JS: Add upgrade script
2021-08-11 12:54:22 +02:00
Asger Feldthaus
349a851631
JS: Add change note
2021-08-11 12:54:19 +02:00
Asger Feldthaus
65b44248f8
JS: Autoformat
2021-08-11 12:50:54 +02:00
Asger Feldthaus
4f4f524937
JS: Add test for upward traversal
2021-08-11 12:50:54 +02:00
Asger Feldthaus
b7339348ef
JS: Add tests for EJS includes
2021-08-11 12:50:54 +02:00
Asger Feldthaus
b1cadc8ae7
JS: Add test for AngularJS sinks
2021-08-11 12:50:54 +02:00
Asger Feldthaus
e61d534c59
JS: Add ambiguity test for template file resolution
2021-08-11 12:50:54 +02:00
Asger Feldthaus
308461a3e3
JS: Pass around base folder in file resolution
2021-08-11 12:50:54 +02:00
Asger Feldthaus
e8d10b983e
JS: Tests for template file resolution
2021-08-11 12:50:54 +02:00
Asger Feldthaus
28fe8da37c
JS: Add similar test for .njk file
2021-08-11 12:50:54 +02:00
Asger Feldthaus
1444ec5255
JS: Add similar test for hbs
2021-08-11 12:50:54 +02:00
Asger Feldthaus
7045fb4679
JS: Expand on test
2021-08-11 12:50:54 +02:00
Asger Feldthaus
ec5e0283d5
JS: Bump extractor version string
2021-08-11 12:50:54 +02:00
Asger Feldthaus
e3e24f9880
JS: Use separate ScopeManager for template exprs
2021-08-11 12:50:54 +02:00
Asger Feldthaus
b36e9e0e54
JS: Filter out common string literal sinks
2021-08-11 12:50:53 +02:00
Asger Feldthaus
f563a015a4
JS: Recognize .njk extension in QL
2021-08-11 12:50:53 +02:00
Asger Feldthaus
e19b6c2c3b
JS: Update taint step
2021-08-11 12:50:53 +02:00
Asger Feldthaus
13aa511364
JS: Support TemplatePlaceholderTag.getEnclosingExpr
...
fixup! makeLocation
2021-08-11 12:50:52 +02:00
Asger Feldthaus
0a14de1741
JS: Also extract .njk files
2021-08-11 12:36:35 +02:00
Asger Feldthaus
14bada4bbe
JS: Model consolidate and factor in template syntax from call site
2021-08-11 12:36:35 +02:00
Asger Feldthaus
425bd7abf9
JS: Model template instantiation from Fastify, Hapi, and Koa
2021-08-11 12:36:35 +02:00
Asger Feldthaus
266c10462e
JS: More aggressive TemplateFileReference.getValue
2021-08-11 12:36:35 +02:00
Asger Feldthaus
bc73d9f431
JS: Support templates importing each other
2021-08-11 12:36:35 +02:00
Asger Feldthaus
bb80fdddbd
JS: Handle leading ../ in template resolution
2021-08-11 12:36:35 +02:00
Asger Feldthaus
6954a9ac23
JS: Treat EJS-include calls as template instantiations
...
JS: Fixup EJS include call (API node)
2021-08-11 12:36:35 +02:00
Asger Feldthaus
248715c743
JS: Restrict FileAccessToHttp a bit
2021-08-11 12:36:35 +02:00
Asger Feldthaus
8a50d99f33
JS: Treat GeneratedCodeExpr as DirectEval in UnusedVariable.ql
2021-08-11 12:36:35 +02:00
Asger Feldthaus
623557ba39
JS: "this" in a template is not the global object
2021-08-11 12:36:35 +02:00
Asger Feldthaus
ee33c593e0
JS: Autoformat
2021-08-11 12:36:34 +02:00
Asger Feldthaus
0f27bffb05
JS: Add sinks for server-template tags in AngularJS templates
2021-08-11 12:36:34 +02:00
Asger Feldthaus
d6dbabf9e0
JS: Ignore empty char sequences
2021-08-11 12:36:34 +02:00
Asger Feldthaus
745f9b36e0
JS: Exclude non-code script tags
2021-08-11 12:36:34 +02:00
Asger Feldthaus
2412f530f9
JS: Add steps and sinks for pipes
2021-08-11 12:36:34 +02:00
Asger Feldthaus
23eeb49959
JS: Detect relevant templating syntax, and add sinks
2021-08-11 12:36:34 +02:00
Asger Feldthaus
f3b97f05c9
JS: Add steps to/from placeholder tags
2021-08-11 12:36:34 +02:00
Asger Feldthaus
f1c663b01b
JS: Add steps from instantiation site to placeholder expr
2021-08-11 12:36:34 +02:00
Asger Feldthaus
5659a8a30f
JS: Add template resolution logic
2021-08-11 12:36:34 +02:00
Asger Feldthaus
1474c0788b
JS: Introduce TemplateInstantiation
2021-08-11 12:36:34 +02:00
Asger Feldthaus
8fe2d84d53
JS: Move template-related classes to Templating file
2021-08-11 12:36:34 +02:00
Asger Feldthaus
f26e94c0db
JS: Rename to Angular-style template
2021-08-11 12:36:34 +02:00
Asger Feldthaus
66cec65bfb
JS: Format HTMLExtractor
2021-08-11 12:36:34 +02:00
Asger Feldthaus
8666bc1894
JS: Extract placeholders in HTML
2021-08-11 12:36:31 +02:00
Chris Smowton
d45d58804b
Merge pull request #6466 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-08-11 07:56:55 +01:00
github-actions[bot]
5db82651fe
Add changed framework coverage reports
2021-08-11 00:13:37 +00:00
jorgectf
e6ce10b5c5
Merge remote-tracking branch 'origin/main' into jty/python/nosqlInjection
2021-08-10 20:01:08 +02:00
Joe Farebrother
7462180dcd
Improve handling or array types
2021-08-10 16:52:38 +01:00
Joe Farebrother
207c753f6f
Update model for getAll
2021-08-10 15:05:02 +01:00
Tamas Vajk
2437546009
Merge branch 'main' into feature/service-stack
2021-08-10 15:16:17 +02:00
Alex Ford
4d6d6a4016
Merge pull request #236 from github/more-concepts
...
Port some concepts to Concepts.qll
2021-08-10 12:42:40 +01:00
Tamas Vajk
243424063a
Add pragma inline to getMember/Method/Callable
2021-08-10 13:25:56 +02:00
Tamas Vajk
51661bfa62
Add pragma noinline to fix uselessUpcast check
2021-08-10 13:24:30 +02:00
Owen Mansel-Chan
2000985509
Remove duplicate test
2021-08-10 11:58:28 +01:00
Calum Grant
e29e61fd3e
Merge pull request #250 from github/aibaars-patch-2
...
Use strict 3 digit semantic version number
2021-08-10 11:41:15 +01:00
Owen Mansel-Chan
a55a32f50a
Add more missing models
...
And corresponding tests
2021-08-10 11:35:20 +01:00
Erik Krogh Kristensen
01a202fa10
fix cfg and dataflow for logical compound assignments
2021-08-10 12:17:59 +02:00
Asger Feldthaus
b1ce3d1c5a
JS: Do not extract binary HTML
2021-08-10 12:15:44 +02:00
Asger Feldthaus
96a2c3f2db
JS: Extract .hbs and .ejs as HTML
2021-08-10 12:15:44 +02:00
Asger Feldthaus
e678c16d59
JS: Parse EJS-style template tags
2021-08-10 12:15:44 +02:00
Asger Feldthaus
a7cdf532fa
JS: Parse mustache-style tags as expressions
2021-08-10 12:15:43 +02:00
Asger Feldthaus
d1c31db06f
JS: Reset implicit variable scope when leaving template expr
2021-08-10 12:15:43 +02:00
Benjamin Muskalla
8127f63b1e
Only include APIs without support
2021-08-10 12:05:16 +02:00
Benjamin Muskalla
26d4269071
Use FlowSources for coverage tracking
2021-08-10 12:02:56 +02:00
Arthur Baars
da464511ec
Use strict 3 digit semantic version number
2021-08-10 12:02:54 +02:00
Benjamin Muskalla
c48586ff80
Implement coverage tracking using dataflow nodes
2021-08-10 11:38:01 +02:00
Benjamin Muskalla
5b55a83aaa
Use basename for jars
2021-08-10 11:37:19 +02:00
Tom Hvitved
d658ef1dcd
Merge pull request #6449 from hvitved/python/contains-in-scope-perf
...
Python: Avoid bad join in `AstExtended::AstNode::containsInScope`
2021-08-10 10:27:00 +02:00
Chris Smowton
cb73100717
Merge pull request #6458 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-08-10 09:23:53 +01:00
Chris Smowton
9f9c76390f
Nudge CI
2021-08-10 09:12:18 +01:00
Asger Feldthaus
d83f5a9cd7
JS: Update StringConcatenation tests after handling 0-arg join calls
2021-08-10 08:56:36 +02:00
Asger Feldthaus
a3e56dea5e
JS: Factor out StringOps::substringMethodName
2021-08-10 08:55:04 +02:00
Asger Feldthaus
1074d409fb
JS: Autoformat
2021-08-10 08:55:03 +02:00
Asger Feldthaus
6ef83f8015
JS: Change note
2021-08-10 08:55:03 +02:00
Asger Feldthaus
f1bcfa287b
JS: Add more tests
2021-08-10 08:55:03 +02:00
Asger Feldthaus
4efea4316e
JS: Use TaintedUrlSuffix flow label in jQuery xss
2021-08-10 08:55:03 +02:00
Asger F
077aa05336
Merge pull request #6448 from asgerf/js/handlebars-extraction-preliminary
...
JS: Update locations in Angular2 test
2021-08-10 08:50:18 +02:00
github-actions[bot]
22fe354aab
Add changed framework coverage reports
2021-08-10 00:07:47 +00:00
Aditya Sharad
0b64ef2579
Merge pull request #248 from github/hmakholm/pr/windows-autobuilder
...
attempt to fix Windows autobuilder script
2021-08-09 09:49:17 -07:00
Henning Makholm
d9880075cc
attempt to fix Windows autobuilder script
2021-08-09 18:35:45 +02:00
Owen Mansel-Chan
54fdfe3906
Make helper functions more consistent
2021-08-09 17:18:03 +01:00
Owen Mansel-Chan
2d31bb8d64
Remove toString taint propagation
...
We do not do this for other overrides of toString
2021-08-09 17:18:02 +01:00
Owen Mansel-Chan
487a46ae77
Improve treatment of new and old package name
2021-08-09 16:25:11 +01:00
Chris Smowton
021e405294
Elaborate change note a little
2021-08-09 15:33:21 +01:00
Chris Smowton
5ba9347281
Merge pull request #6006 from artem-smotrakov/timing-attacks
...
Java: Timing attacks while comparing results of cryptographic operations
2021-08-09 15:30:47 +01:00
Chris Smowton
171dc26531
Fix test reference and expectations
2021-08-09 13:56:55 +01:00
Tom Hvitved
c0049bf161
Merge pull request #229 from github/hvitved/api-graphs/remove-mk-module
...
API graphs: Remove `MkModule`
2021-08-09 13:10:17 +02:00
Tom Hvitved
ae837d9f7a
API graphs: Remove restriction on top-level constants
2021-08-09 12:59:36 +02:00
Tom Hvitved
ea6d51f123
Python: Avoid bad join in AstExtended::AstNode::containsInScope
2021-08-09 11:20:57 +02:00
Asger Feldthaus
88500a3fa3
JS: Update TRAP test output
2021-08-09 11:19:08 +02:00
Asger Feldthaus
2836d465e4
JS: Update locations in Angular2 test
2021-08-09 11:03:15 +02:00
Tamas Vajk
91bd3d1a11
Cache getName to improve performance
2021-08-09 10:28:31 +02:00
Tom Hvitved
15db6dfb10
Merge pull request #6431 from hvitved/csharp/silence-xml-extraction
...
C#: Silence XML extraction commands
2021-08-09 09:36:23 +02:00
CodeQL CI
562ba49f4e
Merge pull request #6406 from erik-krogh/cleanCfg
...
Approved by asgerf
2021-08-09 00:21:31 -07:00
Tamás Vajk
c1cf2a1c5f
Merge pull request #5579 from edvraa/cookies
...
C#: HttpOnly and Secure cookie queries
2021-08-09 08:58:11 +02:00
Owen Mansel-Chan
1997dfbb4a
Remove unnecessary casts
2021-08-08 14:03:57 +01:00
Owen Mansel-Chan
f94e467076
Fixes to models and tests
...
Running the test generator script again showed many missing tests.
2021-08-08 14:03:48 +01:00
Owen Mansel-Chan
377403d525
Remove redundant models and corresponding test
...
Iterator.next is already modelled
2021-08-08 13:57:51 +01:00
Owen Mansel-Chan
5d3f10824e
Fix erroneous treatment of varargs in models
2021-08-08 13:57:50 +01:00
Fosstars
df0f9ee3a5
Fixed a few typos
2021-08-08 12:50:04 +02:00
Owen Mansel-Chan
9533f12e24
Add explanatory commented for MapIterator model
2021-08-06 07:06:36 +01:00
Owen Mansel-Chan
2ba41df2ba
Remove commented line
2021-08-06 07:06:36 +01:00
Owen Mansel-Chan
d1a440a45a
Improve helper functions for Put
2021-08-06 07:06:35 +01:00
Owen Mansel-Chan
26f5ac9ff2
Add change note
2021-08-06 07:06:35 +01:00
Owen Mansel-Chan
b922d7c6f3
Duplicate models for old package name
...
The package name was org.apache.commons.collection until release 4.0.
2021-08-06 07:06:34 +01:00
Owen Mansel-Chan
51a7018afc
Add stubs
2021-08-06 07:06:16 +01:00
Raul Garcia
2708326624
Update csharp/ql/test/query-tests/Security Features/CWE-338/InsecureRandomness.cs
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-08-05 16:33:01 -07:00
Raul Garcia (MSFT)
e117077761
Adding change-note
2021-08-05 15:29:18 -07:00
Jordy Zomer
a3bacc76f1
Update cpp/ql/src/experimental/Security/CWE/CWE-787/UnsignedToSignedPointerArith.ql
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-08-05 23:31:12 +02:00
Chris Smowton
0b6c991ac4
Unsafe deserialization: add support for Jodd JSON library
2021-08-05 16:01:14 +01:00
Jordy Zomer
cf40d0ae4d
Fix a typo unsiged -> unsigned
2021-08-05 16:40:49 +02:00
Shati Patel
8bb47b91b9
Merge pull request #6426 from shati-patel/docs/cwe-coverage
...
Docs: Make TOC more visible and add note about CWE coverage
2021-08-05 15:01:29 +01:00
Shati Patel
97dd88661e
Merge pull request #6427 from shati-patel/docs/vscode-tests
...
Docs: Mention setting for running tests in VS Code (already shipped)
2021-08-05 15:01:20 +01:00
Tom Hvitved
5b5ed97421
C#: Silence XML extraction commands
2021-08-05 15:24:01 +02:00
Tom Hvitved
4ee5cc5557
Merge pull request #6428 from hvitved/csharp/xss-nodes
...
C#: Add missing `nodes` predicate to XSS queries
2021-08-05 15:03:22 +02:00
Tom Hvitved
9eb3f28ef1
C#: Add missing nodes predicate to XSS queries
2021-08-05 13:53:52 +02:00
Tom Hvitved
6471092139
Merge pull request #6394 from github/p0/csharp-virtual-dispatch-limit
...
C#: Guard against virtual dispatch branching too much.
2021-08-05 13:20:14 +02:00
Jordy Zomer
489ac04f86
Remove author tag
2021-08-05 12:34:31 +02:00
shati-patel
dbf49a8257
Docs: Mention setting for running tests in VS Code
2021-08-05 11:27:20 +01:00
shati-patel
09f3001048
Docs: Make TOC more visible and add note about CWE coverage
2021-08-05 10:55:41 +01:00
Anders Schack-Mulligen
c29353db80
Merge pull request #6424 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-08-05 09:48:53 +02:00
Tony Torralba
0356ed7f9e
Merge pull request #5911 from atorralba/atorralba/promote-missing-jwt-signature-check
...
Java: Promote Missing JWT signature check query from experimental
2021-08-05 09:43:03 +02:00
Anders Schack-Mulligen
1932f604dc
Merge pull request #6419 from smowton/smowton/admin/unsafe-deserialization-jabsorb
...
Add unsafe-deserialization support for Jabsorb
2021-08-05 09:04:23 +02:00
Erik Krogh Kristensen
d3ea58002d
fix a case in union where order wasn't necessarily preserved
2021-08-05 08:48:15 +02:00
Erik Krogh Kristensen
6ca53c8b25
a little more special casing in CFGExtractor union
2021-08-05 08:32:56 +02:00
CodeQL CI
475032780e
Merge pull request #6311 from asgerf/js/dom-element-methods
...
Approved by erik-krogh
2021-08-04 23:18:34 -07:00
Raul Garcia (MSFT)
7340a1293f
Fixing query & test
2021-08-04 19:37:57 -07:00
Raul Garcia (MSFT)
8544356f90
Adding Membership.GeneratePassword() as a bad source of random data because of the bias.
2021-08-04 17:12:00 -07:00
github-actions[bot]
9d13edb325
Add changed framework coverage reports
2021-08-05 00:08:17 +00:00
Erik Krogh Kristensen
7e422a656a
remove unused imports
2021-08-04 23:41:36 +02:00
Erik Krogh Kristensen
ff9943906d
micro optimize the hot loops by adding special cases and removing streams
2021-08-04 23:35:58 +02:00
Fosstars
b913928294
Renamed queries and merged qhelp files
2021-08-04 17:54:16 +02:00
Chris Smowton
1f08c3fe55
Move test files to appropriate package directories
2021-08-04 16:50:03 +01:00
edvraa
db2f9add53
Post merge
2021-08-04 18:37:17 +03:00
Chris Smowton
5a42448888
Code review suggestions
...
- Remove unneeded import
- Remove unnecessary `toLowerCase` call
2021-08-04 16:08:07 +01:00
Chris Smowton
69549e9ce3
Add unsafe-deserialization support for Jabsorb
...
This is partly extracted from https://github.com/github/codeql/pull/5954
2021-08-04 15:35:50 +01:00
Asger Feldthaus
1b67b43b40
JS: Change note
2021-08-04 16:25:59 +02:00
Asger Feldthaus
00f4694616
JS: Recognize methods returning DOM objects
2021-08-04 16:25:56 +02:00
Anders Schack-Mulligen
5f9f857c34
Update java/ql/src/semmle/code/java/security/JWT.qll
2021-08-04 16:23:21 +02:00
Anders Schack-Mulligen
78998d0ca1
Update java/ql/src/semmle/code/java/security/JWT.qll
2021-08-04 16:22:56 +02:00
Arthur Baars
e8f6cb65b8
Merge pull request #245 from github/aibaars/tweaks
...
Move UseDetect.ql to experimental for now
2021-08-04 16:05:06 +02:00
Arthur Baars
23f423ad66
Merge pull request #242 from github/regex_parsing_fixes
...
Regex parsing fixes
2021-08-04 16:04:54 +02:00
Arthur Baars
9ca0e81953
Move UseDetect to experimental for now
2021-08-04 15:52:48 +02:00
Anders Schack-Mulligen
6a09a5667d
Merge pull request #5931 from atorralba/atorralba/promote-jndi-injection
...
Java: Promote JNDI Injection query from experimental
2021-08-04 15:48:44 +02:00
Owen Mansel-Chan
2e04319d9f
Manually improve tests
2021-08-04 14:27:01 +01:00
Owen Mansel-Chan
a538699a0a
Add automatically generated tests
2021-08-04 14:27:00 +01:00
Owen Mansel-Chan
b82389088b
Model interfaces in Apache Commons Collections main package
2021-08-04 14:26:59 +01:00
Owen Mansel-Chan
39ea0a989a
Model *Utils classes
2021-08-04 14:26:58 +01:00
Tony Torralba
bc9563c073
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-08-04 14:40:32 +02:00
Arthur Baars
8ded688b72
Add queries.xml for legacy tooling
2021-08-04 14:34:20 +02:00
Tony Torralba
989afb446e
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-08-04 14:07:10 +02:00
edvraa
d1e41689bb
Merge with main
2021-08-04 14:25:34 +03:00
Tony Torralba
a046d75ea6
Apply suggestions from code review
2021-08-04 13:15:49 +02:00
edvraa
e790ee7c2e
Fix formatting
2021-08-04 14:06:27 +03:00
Tony Torralba
452fd9a8e3
Refactor to path query
2021-08-04 13:05:18 +02:00
Anders Schack-Mulligen
fe654dc8ee
Merge pull request #6418 from github/cwe-918-add-sec-sev
...
Update Security-Severity for CWE-918
2021-08-04 13:04:40 +02:00
Tamas Vajk
6405b89443
Add DB upgrade script to change generic type names to undecorated ones
2021-08-04 12:38:16 +02:00
Tamas Vajk
f1a596ee81
Fix code review findings
2021-08-04 12:38:16 +02:00
Tamas Vajk
62f5af9ac8
Fix TupleType::getName
2021-08-04 12:38:16 +02:00
Tamas Vajk
d3803b01e4
Fix nested generic type qualified names
2021-08-04 12:38:16 +02:00
Tamas Vajk
99fe9d8d07
Fix erroneous space in type name
2021-08-04 12:38:16 +02:00
Tamas Vajk
0cfd73c818
Adjust QL getName to the extracted undecorated names
2021-08-04 12:38:15 +02:00
Tamas Vajk
8df77060ba
C#: Remove type args/params from generic type names in extractor
2021-08-04 12:38:15 +02:00
turbo
a8f84da7ac
Update Security-Severity for CWE-918
2021-08-04 12:17:21 +02:00
Tony Torralba
b586f3ec9c
Make the additional flow step abstract
2021-08-04 12:11:17 +02:00
Tony Torralba
f4bc4df8c1
Renamed JWTQuery so that it's named after the actual query name
2021-08-04 12:08:08 +02:00
Tom Hvitved
0eaeb3b5a6
Rename moduleImport to getTopLevelMember
2021-08-04 10:57:57 +02:00
Tom Hvitved
8451286754
API graphs: Remove MkModule
2021-08-04 10:28:30 +02:00
Anders Schack-Mulligen
1a078c38ad
Merge pull request #6412 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-08-04 09:58:34 +02:00
github-actions[bot]
8a2acda53c
Add changed framework coverage reports
2021-08-04 00:07:10 +00:00
valeria-meli
0b5c8909dd
tests
2021-08-03 18:00:49 -03:00
valeria-meli
595ea6c383
files for qhelp
2021-08-03 18:00:29 -03:00
valeria-meli
57ac944319
rename folders
2021-08-03 17:39:48 -03:00
valeria-meli
92c874c2e2
rename query
2021-08-03 17:32:36 -03:00
valeria-meli
0e4865c40c
Merge branch 'main' into javascript/ssrf
2021-08-03 17:17:50 -03:00
Erik Krogh Kristensen
fe551f1359
remove the last use of createCollection
2021-08-03 21:54:55 +02:00
Jordy Zomer
19bb8e8c17
Make requested changes
2021-08-03 21:54:04 +02:00
Robert Marsh
55256d434d
Merge pull request #6410 from geoffw0/uncontrolledarithtests
...
C++: Clean up the test directories for cpp/uncontrolled-arithmetic
2021-08-03 12:46:31 -07:00
Geoffrey White
e679eac008
C++: Rename test directories to match the test names, where possible.
2021-08-03 18:43:02 +01:00
Jordy Zomer
e07516585a
cpp: Add query to detect unsigned integer to signed integer conversions used in pointer arithmetics
2021-08-03 19:08:47 +02:00
Mathias Vorreiter Pedersen
8ce6335383
Merge pull request #6372 from geoffw0/uncontrolledarith
2021-08-03 17:53:39 +02:00
Erik Krogh Kristensen
85d6bfe044
move createCollection to the only place it is used
2021-08-03 16:55:44 +02:00
Erik Krogh Kristensen
ef5ea437c3
remove raw Object type where possible, and simplify accordingly
2021-08-03 16:55:38 +02:00
Geoffrey White
54253bc2eb
C++: Resurrect underflow detection, but only on unsigned types.
2021-08-03 15:02:39 +01:00
Chris Smowton
eaf3d3cc03
Merge pull request #6162 from smowton/smowton/feature/jax-rs-content-type-sensitivity-fixes
...
Jax-RS: implement content-type tracking
2021-08-03 14:53:31 +01:00
Geoffrey White
23ba7dcf9c
Merge pull request #6141 from ihsinme/ihsinme-patch-276
...
CPP: Add a query to find incorrectly used exceptions. 2
2021-08-03 14:46:39 +01:00
Anders Schack-Mulligen
7fb1e1578e
Merge pull request #5894 from atorralba/atorralba/promote-ognl-injection
...
Java: Promote OGNL Injection query from experimental
2021-08-03 15:31:40 +02:00
Anders Schack-Mulligen
be6fd7c22e
Merge pull request #6382 from bmuskalla/stringValueOfTaint
...
Track taint for String.valueOf(..)
2021-08-03 15:30:30 +02:00
Chris Smowton
3bf41491b3
Apply suggestions from code review
2021-08-03 14:15:39 +01:00
Benjamin Muskalla
8ce841493c
Avoid taint for valueOf(Object)
2021-08-03 14:46:55 +02:00
ihsinme
a1755b0b53
Update OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
2021-08-03 15:42:59 +03:00
ihsinme
e5c30c2edf
Update OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
2021-08-03 15:29:51 +03:00
Anders Schack-Mulligen
c0d76da1a6
Merge pull request #5846 from atorralba/atorralba/promote-unsafe-android-webview-fetch
...
Java: Promote Unsafe resource loading in Android WebView from experimental
2021-08-03 14:24:34 +02:00
Tony Torralba
f5cbec4938
Fix tests affected by Jackson stubs changes
2021-08-03 14:22:55 +02:00
Anders Schack-Mulligen
fb9feabe64
Merge pull request #6062 from atorralba/atorralba/promote-groovy-injection
...
Java: Promote Groovy Code Injection from experimental
2021-08-03 14:19:15 +02:00
ihsinme
4f09545f24
Update OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
2021-08-03 15:12:39 +03:00
ihsinme
15e76d1a98
Update cpp/ql/src/experimental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-08-03 15:11:22 +03:00
Mathias Vorreiter Pedersen
43044cd475
Merge pull request #6081 from ihsinme/ihsinme-patch-273
...
CPP: Add a query to find incorrectly used switch
2021-08-03 13:16:45 +02:00
Tony Torralba
a33e0bce9d
Fix tests affected by Jackson stubs changes
2021-08-03 13:15:45 +02:00
Anders Schack-Mulligen
ad86641e22
Merge pull request #6216 from smowton/smowton/admin/serializability-dataflow
...
Create a dataflow instance specifically for the Serializability library
2021-08-03 13:03:49 +02:00
Tony Torralba
c44de87503
Fix reference to PostUpdateNode
2021-08-03 12:45:12 +02:00
Nick Rolfe
78b64dad71
Merge pull request #244 from github/script_cleanup
...
Tidy up shell scripts
2021-08-03 11:27:32 +01:00
Nick Rolfe
52ecc2c152
fix path to create-extractor-pack.sh
2021-08-03 11:14:23 +01:00
Tom Hvitved
ee51e1593f
Merge pull request #6217 from hvitved/csharp/dataflow/csv-override-fix
...
C#: Fix CSV overrides logic
2021-08-03 12:11:26 +02:00
Chris Smowton
36379146c5
Resync dataflow clone
2021-08-03 11:03:30 +01:00
Joe Farebrother
a4659f4e96
Exclude package protected members
2021-08-03 10:51:39 +01:00
Chris Smowton
afa827829a
Make imports private where possible
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-08-03 10:36:46 +01:00
Chris Smowton
a52c4746bc
Improve docs
2021-08-03 10:36:46 +01:00
Chris Smowton
75310a6609
Create a dataflow instance specifically for the Serializability library
...
Otherwise because this dataflow instance populates AdditionalTaintStep there is an ever-present danger that a user will stumble into creating a recursive configuration, or at least that by using DataFlow5::Configuration for any other purpose they will needlessly recalculate the Serializability dataflow results.
2021-08-03 10:36:46 +01:00
Chris Smowton
f83f950be6
Merge pull request #6325 from smowton/smowton/feature/org-json-models
...
Java: add models of JSON-java, aka `org.json`
2021-08-03 10:33:49 +01:00
Mathias Vorreiter Pedersen
3a456577d8
Merge pull request #6378 from geoffw0/impropnull
...
C++: Test and improve cpp/improper-null-termination
2021-08-03 11:32:15 +02:00
CodeQL CI
07f6ce7f3b
Merge pull request #6398 from erik-krogh/authHeader
...
Approved by esbena
2021-08-03 02:04:35 -07:00
CodeQL CI
394d3349ac
Merge pull request #6213 from asgerf/js/vuex
...
Approved by erik-krogh
2021-08-03 01:49:06 -07:00
Geoffrey White
bb96ca3e00
Merge branch 'main' into impropnull
2021-08-03 09:37:58 +01:00
Anders Schack-Mulligen
62adefb015
Merge pull request #6400 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-08-03 10:36:27 +02:00
Geoffrey White
db292287db
Merge branch 'main' into impropnull
2021-08-03 09:34:16 +01:00
Tony Torralba
084cda6daa
Merge branch 'main' into atorralba/promote-groovy-injection
2021-08-03 09:53:46 +02:00
Tony Torralba
36565802dc
Delete unnecesary file
...
RequestForgery.expected in experimental was an artifact from a merge that wasn't adequately removed
2021-08-03 09:48:04 +02:00
Tony Torralba
8852f69d36
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-08-03 09:46:32 +02:00
CodeQL CI
a27cb4b1ae
Merge pull request #6399 from erik-krogh/nunjucks
...
Approved by esbena
2021-08-03 00:45:37 -07:00
Erik Krogh Kristensen
f1f44ceee7
add change-note
2021-08-03 09:11:27 +02:00
Erik Krogh Kristensen
6b579dfad3
normalize auth-headers to lowercase
2021-08-03 09:09:47 +02:00
Erik Krogh Kristensen
116679d8b6
simplify union
2021-08-03 08:59:33 +02:00
Erik Krogh Kristensen
8f613b6b16
rename seq to visitSequence
2021-08-03 08:59:33 +02:00
Erik Krogh Kristensen
e56e56c14e
use Collection instead of Iterable
2021-08-03 08:59:33 +02:00
Erik Krogh Kristensen
1479376f23
rename visit to visitWithSuccessors to avoid ambiguity
2021-08-03 08:59:33 +02:00
Erik Krogh Kristensen
4289875747
make utility methods static
2021-08-03 08:59:33 +02:00
Erik Krogh Kristensen
94a593b208
rename entry and exit to getEntryNode and getExitNode respectively
2021-08-03 08:59:33 +02:00
Erik Krogh Kristensen
366a16f700
rename the V class to WriteSuccessorsVisitor
2021-08-03 08:59:33 +02:00
Erik Krogh Kristensen
c059ceaee9
add qldoc to union(xs, ys)
2021-08-03 08:59:33 +02:00
Erik Krogh Kristensen
8db10aeb9d
add JavaDoc to createIterable and createReversedIterable
2021-08-03 08:59:33 +02:00
Erik Krogh Kristensen
8fdcd917ee
rename foreach and hcaerof to createIterable and createReversedIterable respectively
2021-08-03 08:59:32 +02:00
Erik Krogh Kristensen
014728a66a
implement hcaerof in terms of foreach
2021-08-03 08:59:32 +02:00
Erik Krogh Kristensen
ca26b5ebbc
rename succ to writeSuccessor/writeSuccessors
2021-08-03 08:59:32 +02:00
Asger Feldthaus
c88d213f37
JS: Use appendToNamespace
2021-08-03 08:52:19 +02:00
Asger Feldthaus
f5f255d93d
JS: Rename getPrefix -> getNamespace
2021-08-03 08:51:35 +02:00
Asger F
ff17d298b0
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-08-03 08:45:56 +02:00
github-actions[bot]
cd65baf481
Add changed framework coverage reports
2021-08-03 00:07:34 +00:00
Ethan Palm
2c6977e5e2
Merge pull request #6327 from ethanpalm/cwe-coverage-tables
...
CodeQL: Display CWE coverage information by language
2021-08-02 18:00:01 -04:00
Erik Krogh Kristensen
87c0c60c22
don't report dummy authentication headers as hardcoded-crendentials
2021-08-02 22:56:14 +02:00
Erik Krogh Kristensen
f719e0ca1b
remove nunjucks template URLs from the target-blank query
2021-08-02 22:46:59 +02:00
Ethan P
6a6993248d
Add note to readme about CWE coverage tables
2021-08-02 13:34:26 -07:00
Nick Rolfe
f2af68f8cf
Clean up script file locations
2021-08-02 18:21:50 +01:00
Arthur Baars
2c8b1fa6da
Merge pull request #231 from github/aibaars/makefile
...
Add makefile
2021-08-02 18:31:16 +02:00
Arthur Baars
38f82ffc3c
Update Makefile
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-08-02 18:01:59 +02:00
Benjamin Muskalla
60c7003667
Optimize return type check
2021-08-02 17:14:44 +02:00
Benjamin Muskalla
fda394858b
Turn external API query into diagnostics query
...
* Expose (partial) CSV model for the API
* Rework and simplify predicates
2021-08-02 17:14:44 +02:00
Benjamin Muskalla
8595ae71f7
Simplify api coverage detection
...
Fixes a bug that doesn't take super types into account
when computing the usage of a specific API.
2021-08-02 17:14:44 +02:00
Benjamin Muskalla
3365634259
Expose csv parameter format predicate
2021-08-02 17:14:44 +02:00
Benjamin Muskalla
aab633eced
Reformat
2021-08-02 17:14:43 +02:00
Benjamin Muskalla
2064915d3b
Fold JDK API query into external API query
2021-08-02 17:14:43 +02:00
Benjamin Muskalla
0c04c9a2c2
Fix aggregation of jar usages
2021-08-02 17:14:43 +02:00
Benjamin Muskalla
722889e881
Make id unique
2021-08-02 17:14:42 +02:00
Benjamin Muskalla
d9285e78c0
Add query to collect external API calls
2021-08-02 17:14:42 +02:00
Benjamin Muskalla
07303ccbb3
Fix formatting
2021-08-02 17:14:42 +02:00
Benjamin Muskalla
b9f6b60c4d
Introduce query to capture external libraries
2021-08-02 17:14:41 +02:00
Benjamin Muskalla
32f52ac30d
Improve column names
2021-08-02 17:14:41 +02:00
Benjamin Muskalla
18e3763f90
Expose whether APIs are already supported
2021-08-02 17:14:41 +02:00
Benjamin Muskalla
9b6ae9029f
Introduce query for capture JDK API usage
2021-08-02 17:14:40 +02:00
Chris Smowton
fad1622730
Merge pull request #5435 from haby0/DynamicallyLoadedClasses
...
Java: CWE-470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
2021-08-02 16:04:30 +01:00
Alex Ford
403dee279d
add Node#getALocalSource predicate
2021-08-02 15:56:36 +01:00
Alex Ford
56139ccf93
port some concepts to Concepts.qll
2021-08-02 15:56:36 +01:00
Arthur Baars
58a6f5a783
Address comments
2021-08-02 16:12:50 +02:00
Arthur Baars
730b6d8e6c
Add makefile
2021-08-02 16:12:50 +02:00
Tony Torralba
08bdd1aa7a
Merge branch 'main' into atorralba/promote-ognl-injection
2021-08-02 16:05:38 +02:00
Tony Torralba
8b50b3d00f
Add jackson-core to test dependencies
2021-08-02 16:04:49 +02:00
Geoffrey White
904db788ec
Merge branch 'main' into impropnull
2021-08-02 15:00:12 +01:00
Chris Smowton
09a873138d
Add missing qldoc
2021-08-02 14:48:42 +01:00
Chris Smowton
170bb43393
Update java/ql/test/library-tests/frameworks/json-java/test.ql
...
Remove unnecessary import
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-08-02 14:46:38 +01:00
Chris Smowton
8a78075d3d
Remove redundant method taint flow specifications
2021-08-02 14:30:31 +01:00
Mathias Vorreiter Pedersen
bbbbeda7c3
Merge pull request #6385 from MathiasVP/more-FieldConfiguration-sources
...
C++: Fix missing local flow in AST dataflow
2021-08-02 15:22:07 +02:00
Anders Schack-Mulligen
53e6ddfeb6
Merge pull request #6001 from atorralba/atorralba/promote-mvel-injection
...
Java: Promote MVEL injection query from experimental
2021-08-02 14:40:26 +02:00
Tony Torralba
f4b78ef3bd
Fix stubs
2021-08-02 14:12:05 +02:00
Tony Torralba
9b384d84cc
Merge branch 'main' into atorralba/promote-ognl-injection
2021-08-02 14:06:45 +02:00
Tony Torralba
351a24558d
Add tests for JacksonSerializability
...
Upgraded jackson stubs to 2.12
2021-08-02 14:03:30 +02:00
Tony Torralba
632ae747c7
Fix JacksonModel duplicate row
2021-08-02 12:53:30 +02:00
Anders Schack-Mulligen
3b676d432f
Merge pull request #5900 from artem-smotrakov/unsafe-jackson-deserialization
...
Java: Unsafe deserialization with Jackson
2021-08-02 12:45:30 +02:00
Anders Schack-Mulligen
0a1c754de8
Merge pull request #6395 from github/bmuskalla/fixTypoInVariables
...
Fix typo in variables documentation
2021-08-02 12:30:14 +02:00
Benjamin Muskalla
d678cdc815
Update variables.rst
2021-08-02 12:07:09 +02:00
Arthur Baars
2f491a1924
Merge pull request #230 from github/redos-enable-tounicode
...
enable unicode parsing in the ReDoS query
2021-08-02 10:42:09 +02:00
Pavel Avgustinov
2be9f3e41e
C#: Guard against virtual dispatch branching too much.
...
We have observed databases where dispatch to highly overridden
virtual methots (like Enumerable.GetEnumerator) ends up branching
to many thousands of overrides, if there is not sufficient type
context to prune. This causes performance problems for analyses
that use dataflow.
As an immediate fix, this commit prevents branching to virtual
method overrides if this would result in branching to 1,000 or
more methods.
2021-08-02 09:40:16 +01:00
Tom Hvitved
7a475eb0a2
C#: Fix CSV overrides logic
2021-08-02 10:35:21 +02:00
Tom Hvitved
df29538840
C#: Add test that exhibits bug in CSV overrides logic
2021-08-02 10:35:21 +02:00
Anders Schack-Mulligen
6c973b59ac
Update java/ql/src/semmle/code/java/frameworks/Jackson.qll
2021-08-02 10:16:42 +02:00
Anders Schack-Mulligen
26881ec220
Merge pull request #6389 from github/yo-h-patch-1
...
Java: update `frameworks.rst` with Jackson
2021-08-02 10:07:02 +02:00
Tony Torralba
9fadb26325
Fix qhelp sample
2021-08-02 10:00:59 +02:00
Tony Torralba
4435853c8a
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-08-02 09:56:40 +02:00
Erik Krogh Kristensen
632ad518f0
enable unicode parsing in the ruby ReDoS query
2021-08-02 07:13:41 +00:00
ihsinme
375a60194b
Update OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
2021-08-01 16:44:54 +03:00
ihsinme
14b4e08ce9
Update OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.expected
2021-08-01 16:43:56 +03:00
ihsinme
36131ee16a
Update test.cpp
2021-08-01 16:43:05 +03:00
ihsinme
098773dd10
Update FindIncorrectlyUsedSwitch.ql
2021-08-01 15:04:30 +03:00
ihsinme
80eb4907c0
Update FindIncorrectlyUsedSwitch.expected
2021-08-01 15:03:30 +03:00
ihsinme
5c71a7c024
Update test.c
2021-08-01 15:02:41 +03:00
Fosstars
bd7e7b1371
Better qldoc for timing attacks
2021-08-01 10:18:37 +02:00
Fosstars
44e52517ad
Removed unsafeMacCheckWithArraysDeepEquals() test
2021-08-01 10:12:38 +02:00
Fosstars
0fc487fb04
Better qhelp for timing attacks
2021-08-01 09:57:14 +02:00
Artem Smotrakov
9b953cf0fc
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-08-01 09:47:07 +02:00
Fosstars
ad54c9d937
Two queries for timing attacks
2021-08-01 09:47:07 +02:00
Artem Smotrakov
e3b6ceade5
Renamed NonConstantTimeCryptoComparison.ql to NonConstantTimeCheckOnSignature.ql
2021-08-01 09:47:06 +02:00
Artem Smotrakov
8b557765b3
Narrow NonConstantTimeCryptoComparison.ql to timing attack on signatures and MACs only
2021-08-01 09:47:06 +02:00
Artem Smotrakov
c359852608
Consider only Cipher.ENCRYPT_MODE in NonConstantTimeCryptoComparison.ql
2021-08-01 09:47:06 +02:00
Artem Smotrakov
1f2a9cdda7
Added taint propagation steps for hashes in NonConstantTimeCryptoComparison.ql
2021-08-01 09:47:06 +02:00
Artem Smotrakov
c96d939cf5
Covered custom fast-fail checks in NonConstantTimeCryptoComparison.ql
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-08-01 09:47:06 +02:00
Artem Smotrakov
6500a1bbbb
More references in NonConstantTimeCryptoComparison.qhelp
2021-08-01 09:47:05 +02:00
Artem Smotrakov
860e8f379e
Better signatures in java/non-constant-time-crypto-comparison
2021-08-01 09:47:05 +02:00
Artem Smotrakov
622c7ee957
Added a change note for new steps for ByteBuffer and InputStream
2021-08-01 09:47:05 +02:00
Artem Smotrakov
1b4ee05b80
Better docs for java/non-constant-time-crypto-comparison
2021-08-01 09:47:05 +02:00
Artem Smotrakov
8c4da16459
More test cases for java/non-constant-time-crypto-comparison
2021-08-01 09:47:04 +02:00
Artem Smotrakov
295fd686ce
Make java/non-constant-time-crypto-comparison a warning
2021-08-01 09:47:04 +02:00
Artem Smotrakov
c977fd09cb
Better constant check in java/non-constant-time-crypto-comparison
2021-08-01 09:47:04 +02:00
Artem Smotrakov
d01dc35011
Less duplicate code in java/non-constant-time-crypto-comparison
2021-08-01 09:47:04 +02:00
Artem Smotrakov
40e513ba52
Added more taint propagation steps for InputStream and ByteBuffer
2021-08-01 09:47:04 +02:00
Artem Smotrakov
a4f3a5a88e
Take into account remote user input in java/non-constant-time-crypto-comparison
2021-08-01 09:47:03 +02:00
Artem Smotrakov
8e6d227dc0
More sinks for java/ql/src/experimental/Security/CWE/CWE-208/NonConstantTimeCryptoComparison.ql
2021-08-01 09:47:03 +02:00
Artem Smotrakov
dfa3b523d0
Renamed files
2021-08-01 09:47:03 +02:00
Artem Smotrakov
75f67959f3
Covered Arrays.deepEquals() in NonConstantTimeCryptoComparison.ql
2021-08-01 09:47:02 +02:00
Artem Smotrakov
5dbcf1d611
Covered Object.deepEquals() in NotConstantTimeCryptoComparison.ql
2021-08-01 09:47:02 +02:00
Artem Smotrakov
5c474f689d
Better comments and descriptions
2021-08-01 09:47:02 +02:00
Artem Smotrakov
f245dc3ac8
Removed hashes from NotConstantTimeCryptoComparison.ql
2021-08-01 09:47:02 +02:00
Artem Smotrakov
8a69b7b3ac
Added NotConstantTimeCryptoComparison.qhelp and examples
2021-08-01 09:47:01 +02:00
Artem Smotrakov
67579dd1d8
Added tests for NotConstantTimeCryptoComparison.ql
2021-08-01 09:47:01 +02:00
Artem Smotrakov
c2c85d32da
Java: Added a query for timing attacks
2021-08-01 09:47:01 +02:00
Artem Smotrakov
7959e76da8
Better qldoc in UnsafeDeserializationQuery.qll
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-07-30 09:30:59 +02:00
Fosstars
a4b0041120
Better looksLikeResolveClassStep() predicate
2021-07-30 09:28:03 +02:00
Fosstars
1d3eb570bf
hasJsonTypeInfoAnnotation() should check fields recursively
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-07-30 08:30:40 +02:00
yo-h
6a18b33616
Java: update frameworks.rst with Jackson
...
Updating manually maintained list with coverage in `JacksonSerializability.qll`
2021-07-29 17:35:06 -04:00
Arthur Baars
d986bea317
Merge pull request #238 from github/aibaars/extract-erb
...
Extract ERB tags
2021-07-29 19:21:32 +02:00
Aditya Sharad
cb686ea802
Merge pull request #6388 from github/geoffw0-patch-2
...
Update query-metadata-style-guide.md
2021-07-29 10:20:26 -07:00
Arthur Baars
00a0b93172
Add erb file
2021-07-29 19:09:56 +02:00
Geoffrey White
5e6e176f32
Update query-metadata-style-guide.md
...
Add a note about the `@security-severity` tag.
2021-07-29 17:53:31 +01:00
Nick Rolfe
4007e85991
Incorporate changes from Python PR
2021-07-29 17:25:39 +01:00
Nick Rolfe
3abe047cac
Fix parsing of POSIX bracket expressions.
...
The docs are misleading. [[:alpha:]] is actually a character class
*containing* a POSIX bracket expression, and that means you can have
expressions like [[:alpha:][:digit:]_?!]
2021-07-29 17:24:51 +01:00
Nick Rolfe
5d336d8e1d
Make some predicates/classes/imports private
2021-07-29 17:17:11 +01:00
Mathias Vorreiter Pedersen
b1e5fbe2de
Merge pull request #6377 from sashabu/sashabu/virtual
...
C++: Allow querying virtual, override, and final declaration specifiers.
2021-07-29 17:51:14 +02:00
Joe Farebrother
227818adb4
Add change note
2021-07-29 16:41:33 +01:00
Joe Farebrother
e23f666f67
Replace get and newWith methods with real implementations
2021-07-29 16:39:50 +01:00
Tony Torralba
29490e5872
Add suggestion from code review
2021-07-29 17:07:18 +02:00
Joe Farebrother
f1ca29a846
Add more stubs
2021-07-29 15:58:42 +01:00
Tony Torralba
3fcc9fae79
Refactor sinks to reuse code
2021-07-29 16:48:47 +02:00
Geoffrey White
417edab126
C++: Simplify out the 'effect' string.
2021-07-29 15:44:53 +01:00
Geoffrey White
7f621bc737
C++: Repair the tests that use subtraction so that the thing they're testing is preserved, and add two new explicit tests of behaviour on subtraction.
2021-07-29 15:36:43 +01:00
Tony Torralba
6e3b6dcb98
Imporve qhelp
2021-07-29 16:36:38 +02:00
Tony Torralba
bdf0f582a4
QLDoc improvements from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-07-29 16:34:21 +02:00
Tony Torralba
90b5e02b6e
Improve qhelp
2021-07-29 16:28:10 +02:00
Geoffrey White
13823df5a1
C++: Remove underflow detection.
2021-07-29 15:22:18 +01:00
Geoffrey White
9e0411238b
C++: Add some more test cases.
2021-07-29 15:15:26 +01:00
Tony Torralba
4ea6729c53
Update java/ql/src/Security/CWE/CWE-347/MissingJWTSignatureCheck.ql
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2021-07-29 16:10:49 +02:00
mc
0a986ad0e8
Update JndiInjection.qhelp
...
Improve negation
2021-07-29 15:10:32 +01:00
Joe Farebrother
096509b9aa
Generate tests and stubs
2021-07-29 15:01:50 +01:00
Joe Farebrother
3bcb46f875
Model guava cache package
2021-07-29 14:52:26 +01:00
Mathias Vorreiter Pedersen
bbb38fd2aa
C++: Accept more test changes.
2021-07-29 15:49:50 +02:00
Tony Torralba
2628d3dc39
Improve csv sink models
2021-07-29 15:36:18 +02:00
Tony Torralba
3edc8bc679
Doc improvements
2021-07-29 15:35:39 +02:00
Tony Torralba
d9fb650dfb
JacksonCreateParserMethod converted to CSV summay model
2021-07-29 15:19:30 +02:00
Tony Torralba
b20d53cfd4
Update java/ql/src/semmle/code/java/security/OgnlInjection.qll
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-07-29 15:08:27 +02:00
Alexandre Boulgakov
e55bd4fb64
C++: Allow querying virtual, override, and final declaration specifiers.
2021-07-29 14:02:03 +01:00
Mathias Vorreiter Pedersen
41d233f086
C++: Make the 'definition by reference'-node in 'foo(a.b);' a source in the 'FieldConfiguration' configuration.
2021-07-29 14:49:59 +02:00
Mathias Vorreiter Pedersen
a082172422
C++: Add testcase demonstrating missing local flow out of fields that are defined by reference.
2021-07-29 14:46:32 +02:00
Nick Rolfe
e757d2e654
Merge pull request #241 from github/fix_yml
...
Fix invalid file-type identifier
2021-07-29 12:05:10 +01:00
Arthur Baars
c568162256
Use a single TrapWriter
...
The output of two distinct TrapWriters should not be written to the
same TRAP file because this causes name clashes between TRAP labels.
2021-07-29 12:50:27 +02:00
Nick Rolfe
4aacdafb38
Fix invalid file-type identifier
...
Upper-case characters are not allowed.
2021-07-29 11:49:22 +01:00
mc
8f1fc9e893
Update MvelInjection.qhelp
...
Minor tweaks
2021-07-29 11:30:19 +01:00
Arthur Baars
cc1bdf1fc3
Add charpred to RubyFile class
2021-07-29 11:48:35 +02:00
Joe Farebrother
143b302eef
Merge pull request #6384 from joefarebrother/test-gen-improvements
...
Java: Test generator: use getComponentType
2021-07-29 10:47:37 +01:00
Joe Farebrother
3b430d4925
Use getComponentType
2021-07-29 10:11:22 +01:00
Joe Farebrother
f7099f459f
Java: Test generator: use getComponentType
2021-07-29 10:08:45 +01:00
Artem Smotrakov
83a9b0ee28
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-07-29 11:04:21 +02:00
mc
ebf004a4df
Update MissingJWTSignatureCheck.qhelp
...
Using same syntax as on other queries for 'BAD' and 'GOOD'.
2021-07-29 09:13:00 +01:00
Benjamin Muskalla
b7b74b51a3
Track taint for String.valueOf(..)
2021-07-29 09:14:03 +02:00
Arthur Baars
fcf2d4cbd2
Apply suggestions from code review
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-07-29 09:02:57 +02:00
Geoffrey White
ae35ae10e6
C++: Fix readlink FPs.
2021-07-28 17:45:18 +01:00
Fosstars
893f84fbf4
Merge branch 'unsafe-jackson-deserialization' of github.com:artem-smotrakov/ql into unsafe-jackson-deserialization
2021-07-28 18:25:53 +02:00
Fosstars
50497eb747
Make imports as private as possible
2021-07-28 18:25:05 +02:00
ihsinme
2d5a263799
Update FindIncorrectlyUsedExceptions.ql
2021-07-28 18:46:49 +03:00
Geoffrey White
c2ef58d29d
C++: Support 'readlinkat'.
2021-07-28 16:15:28 +01:00
Geoffrey White
358d89f3ce
C++: Add tests.
2021-07-28 16:15:16 +01:00
Joe Farebrother
d900fcaf42
Merge pull request #6374 from joefarebrother/test-gen-improvements
...
Java: Add support for synthetic fields to the test generator
2021-07-28 16:02:47 +01:00
Artem Smotrakov
7fec575df8
Simplify JsonTypeInfo stub
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-07-28 14:23:50 +02:00
Joe Farebrother
9ddae3e9f6
Fix spelling
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-07-28 10:12:17 +01:00
Tony Torralba
3248f458a5
Update java/change-notes/2021-06-14-groovy-code-injection-query.md
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2021-07-28 10:45:03 +02:00
haby0
eda3d864f5
Model written using smowton
2021-07-28 15:55:47 +08:00
valeria-meli
f3c0bf7826
copy-paste from our repo
2021-07-27 18:09:11 -03:00
Aditya Sharad
d7c29791de
Merge pull request #6368 from bmuskalla/addMissingKeywords
...
Add missing keywords to language specification
2021-07-27 11:08:25 -07:00
Felicity Chapman
0714f4abbb
Merge pull request #6339 from github/package-manager-docs
...
[July 27-8, 2021] CodeQL package manager: update CodeQL CLI docs (beta)
2021-07-27 18:24:03 +01:00
Arthur Baars
1d245b8d2e
Merge pull request #237 from github/aibaars/rules-sarif
...
Build/Release: create rules.sarif file
2021-07-27 18:49:50 +02:00
Arthur Baars
dacd3f3d19
Update dbscheme stats
2021-07-27 18:43:51 +02:00
Arthur Baars
4d18ec226a
Fix dataset_measure.yml
2021-07-27 18:43:51 +02:00
Arthur Baars
38eb6c112f
Add ERB extraction
2021-07-27 18:43:51 +02:00
Arthur Baars
768a751271
Add upgrade script
2021-07-27 18:43:51 +02:00
Arthur Baars
866ff7b1f6
Replace Generated module with Ruby
2021-07-27 18:43:44 +02:00
Arthur Baars
02bf895a4a
Update dbscheme type references
2021-07-27 18:42:21 +02:00
Joe Farebrother
2d862ef119
Support synthetic fields
2021-07-27 17:28:53 +01:00
Arthur Baars
2e10f8f054
Prefix dbscheme entries with language name
2021-07-27 18:17:19 +02:00
Arthur Baars
fe868e4c05
Ruby-Generator: add --dbscheme and --library flags
2021-07-27 18:17:19 +02:00
Arthur Baars
fc8f5919f3
Remove Ruby specific parts from FileSystem.qll
2021-07-27 18:17:15 +02:00
Chris Smowton
23de0859ea
Add missing models and other minor improvements per Marcono1234's review
2021-07-27 16:03:39 +01:00
Joe Farebrother
a8cca4ba0e
Merge pull request #6373 from joefarebrother/test-gen-improvements
...
Java: Test generator improvements
2021-07-27 15:44:56 +01:00
Chris Smowton
0049b8e3c4
Merge pull request #6371 from github/smowton/admin/test-generator-notice-bad-rows
...
Add test-case generator check for non-parseable rows
2021-07-27 15:44:01 +01:00
Joe Farebrother
309f0e7c26
Fix handling of arrays
2021-07-27 15:05:57 +01:00
Joe Farebrother
9ffcfbcd33
Add --force option
2021-07-27 15:05:57 +01:00
Joe Farebrother
8ab0fd54b4
Improvements to the test generator:
...
- Only reference public methods
- Report rows for which test cases could not be generated
- Add a blanket `throws Exception` clause to the generated method
2021-07-27 15:05:55 +01:00
Joe Farebrother
2036aa1e4a
Format test generator
2021-07-27 15:04:19 +01:00
Felicity Chapman
28ce21ed7e
Update docs/codeql/codeql-cli/publishing-and-using-codeql-packs.rst
2021-07-27 15:02:39 +01:00
Geoffrey White
5ac6b38380
C++: Change note.
2021-07-27 14:27:16 +01:00
mc
10a3dcb188
Update GroovyInjection.qhelp
2021-07-27 14:26:49 +01:00
Chris Smowton
97d603cafb
Add test-case generator check for non-parseable rows
2021-07-27 14:26:22 +01:00
Geoffrey White
e7842b9625
C++: Autoformat.
2021-07-27 14:19:30 +01:00
Geoffrey White
00f6f668cc
C++: Don't report underflowing multiplication.
2021-07-27 14:02:40 +01:00
Geoffrey White
40f0658e8a
C++: Exclude unintended results on pointers.
2021-07-27 13:39:20 +01:00
Geoffrey White
503c5c9e33
C++: Add more test cases.
2021-07-27 13:38:00 +01:00
Anders Schack-Mulligen
a5f0a4ea71
Merge pull request #6087 from smowton/smowton/admin/rest-xss-tests
...
Java: Add Spring XSS tests
2021-07-27 14:09:34 +02:00
Felicity Chapman
e5d8e81634
Merge branch 'package-manager-docs' of github.com:github/codeql into package-manager-docs
2021-07-27 12:52:46 +01:00
Felicity Chapman
f060296cf8
Update beta note with details of release
2021-07-27 12:52:15 +01:00
Arthur Baars
58c93bfdca
Build/Release: create rules.sarif file
2021-07-27 12:29:27 +02:00
Anders Schack-Mulligen
aa8fa26a2a
Merge pull request #6355 from intrigus-lgtm/patch-6
...
Update broken link
2021-07-27 09:05:02 +02:00
haby0
00f13e1e6e
Modify isAdditionalTaintStep
2021-07-27 10:59:38 +08:00
Felicity Chapman
ecaf03ff7e
Update docs/codeql/codeql-cli/about-ql-packs.rst
2021-07-27 00:19:31 +01:00
Felicity Chapman
070554e0d8
Update description of 'suites'
2021-07-26 23:48:50 +01:00
Felicity Chapman
de5d14df62
Replace package manager
2021-07-26 23:37:13 +01:00
Felicity Chapman
5b92d9445e
Apply suggestions from code review
...
Co-authored-by: Dave Bartolomeo <dbartol@github.com >
2021-07-26 23:29:01 +01:00
Felicity Chapman
5197c2db9f
Move beta note into a reusable
2021-07-26 23:15:45 +01:00
Felicity Chapman
84fe27270f
Further changes from the technical review
2021-07-26 23:08:32 +01:00
Felicity Chapman
6c82c2c0c8
Apply suggestions from code review
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2021-07-26 22:38:25 +01:00
Robert Marsh
b6200e5b23
Merge pull request #6369 from geoffw0/toctou3
...
C++: Increase cpp/toctou-race-condition query precision.
2021-07-26 13:16:28 -07:00
Robert Marsh
fbb3f2e506
Merge pull request #6273 from geoffw0/cleartext-storage-file
...
C++: Improve the CleartextFileWrite query
2021-07-26 12:46:51 -07:00
Felicity Chapman
c6a9b029cf
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
2021-07-26 18:19:24 +01:00
Felicity Chapman
8b64b8144c
Apply suggestions from code review
2021-07-26 18:15:04 +01:00
Geoffrey White
f65c5cfb70
C++: Increase query precision.
2021-07-26 15:15:12 +01:00
intrigus-lgtm
434b36c648
Update broken link
2021-07-26 15:48:47 +02:00
Felicity Chapman
33d859eb5c
Fix further Sphinx build warnings
2021-07-26 13:12:10 +01:00
Dominik Bamberger
f2ac9f6224
Wrap code in a block.
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-07-26 13:55:08 +02:00
Dominik Bamberger
275ab370d4
Revert "Remove space to test if that fixes CI."
...
This reverts commit 3eb8d11a0a .
2021-07-26 13:44:11 +02:00
Anders Schack-Mulligen
6c666b49f5
Merge pull request #6366 from smowton/smowton/fiix/junit-nested-classes
...
Prevent class-could-be-static alerts regarding JUnit Nested tests
2021-07-26 12:45:23 +02:00
Dominik Bamberger
3eb8d11a0a
Remove space to test if that fixes CI.
2021-07-26 12:35:56 +02:00
Benjamin Muskalla
a32e6f507c
Add missing keywords to language specification
2021-07-26 12:27:56 +02:00
Dominik Bamberger
f1883adb34
Rename label to avoid collision.
2021-07-26 12:17:00 +02:00
Dominik Bamberger
1cdb345148
Add missing table columns.
2021-07-26 11:40:20 +02:00
Joe Farebrother
358a7c1707
Fix issue when building with no pom file
2021-07-26 10:38:16 +01:00
Dominik Bamberger
fedd4d7d15
Remove typo from file name.
2021-07-26 11:23:40 +02:00
Dominik Bamberger
163dfa086a
Note accepting multiple packs.
2021-07-26 11:21:20 +02:00
Anders Schack-Mulligen
5d3e8d2add
Merge pull request #6365 from Marcono1234/marcono1234/InstanceOfExpr-getCheckedType
...
Java: Add `InstanceOfExpr.getCheckedType()`
2021-07-26 11:20:48 +02:00
Dominik Bamberger
db056fb57b
Remove obsolete '--allow-packs' flag.
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2021-07-26 11:18:06 +02:00
Dominik Bamberger
1f439a15db
Remove obsolete '--allow-packs' flag.
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2021-07-26 11:17:25 +02:00
Dominik Bamberger
66922dcfa8
Clarify sequence.
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2021-07-26 11:16:59 +02:00
Dominik Bamberger
a634d37026
Include location.
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2021-07-26 11:15:59 +02:00
Anders Schack-Mulligen
ee13520836
Merge pull request #6364 from Marcono1234/marcono1234/TypeLiteral-getReferencedType
...
Java: Add `TypeLiteral.getReferencedType()`
2021-07-26 11:15:06 +02:00
Dominik Bamberger
270d49d3fd
Refer to GitHub Packages.
2021-07-26 11:14:20 +02:00
Dominik Bamberger
659af055e7
Wrap note.
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2021-07-26 11:12:03 +02:00
Dominik Bamberger
5193e657bc
Add warning about reformatting and stripping comments.
2021-07-26 11:08:50 +02:00
Dominik Bamberger
f89f3f408b
Mention optional dependencies block.
2021-07-26 11:07:13 +02:00
Dominik Bamberger
ff74e9b73b
Mention optional '+' modifier to combine input with config file.
2021-07-26 11:04:02 +02:00
Chris Smowton
aca905fa36
Prevent class-could-be-static alerts regarding JUnit Nested tests
2021-07-26 09:35:26 +01:00
Anders Schack-Mulligen
f6439b792e
Merge pull request #6356 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-07-26 10:33:08 +02:00
Dominik Bamberger
15ed567420
Set expectations for multi-language analysis.
2021-07-26 10:32:31 +02:00
Dominik Bamberger
de573a373b
Use 'query suites' instead of 'code scanning suites'.
2021-07-26 10:27:18 +02:00
Dominik Bamberger
77f481d8da
Fix command invocation.
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2021-07-26 10:15:45 +02:00
Dominik Bamberger
120f00354e
Include '--output' and '--format' flags.
2021-07-26 10:11:59 +02:00
Dominik Bamberger
f6ce9b9eb3
Remove '--allow-packs' flag.
2021-07-26 10:09:45 +02:00
Dominik Bamberger
3402ca62c2
Explain GitHub Packages as GitHub Container Registry (GHCR).
2021-07-26 10:06:48 +02:00
Dominik Bamberger
907179c704
Explain GitHub Packages as GitHub Container Registry (GHCR).
2021-07-26 10:02:13 +02:00
Dominik Bamberger
228e4938df
Add description metadata example.
2021-07-26 09:41:05 +02:00
Dominik Bamberger
c8e604d141
Add licenses metadata example.
2021-07-26 09:40:00 +02:00
Dominik Bamberger
1df3f7f1cf
Remove section on 'bugs'.
2021-07-26 09:35:40 +02:00
Dominik Bamberger
1d5c5c2021
Replace collaborators with authors.
2021-07-26 09:34:04 +02:00
Dominik Bamberger
589e18c6fc
Remove obsolete version warning.
2021-07-26 09:32:16 +02:00
Dominik Bamberger
756cbab361
Remove mention of test files to make it sound less exclusive to testing.
2021-07-26 09:31:27 +02:00
Dominik Bamberger
c9732937dd
Mention suites correctly.
2021-07-26 09:25:18 +02:00
Dominik Bamberger
4d88326ad3
Add space to YAML syntax.
2021-07-26 09:23:52 +02:00
Dominik Bamberger
4116bfaea0
Add more naming restrictions.
2021-07-26 09:22:09 +02:00
Dominik Bamberger
e7bfa8f6ac
Use a less generic example.
2021-07-26 09:18:07 +02:00
Dominik Bamberger
e2f13ecf20
Mention cache lookup.
2021-07-26 09:15:53 +02:00
Dominik Bamberger
8ae9b9b865
Remove section about '.qll' file structure.
2021-07-26 09:10:16 +02:00
Dominik Bamberger
fdae0dd402
Mention cache usage.
2021-07-26 09:07:27 +02:00
github-actions[bot]
d51eafbfd5
Add changed framework coverage reports
2021-07-26 00:08:31 +00:00
Marcono1234
606173012a
Java: Add InstanceOfExpr.getCheckedType()
...
Additionally change `EqualsUsesInstanceOf.ql` to check for all RefTypes
instead of only Class.
2021-07-26 00:50:11 +02:00
Marcono1234
3569ed56e5
Java: Add TypeLiteral.getReferencedType()
2021-07-26 00:02:08 +02:00
jorgectf
8d0386b049
Split into getNameArg and getValueArg
2021-07-25 04:35:22 +02:00
jorgectf
f9b244ecad
Polish documentation
2021-07-24 01:06:05 +02:00
haby0
291ca3830a
Modify according to suggestions
2021-07-23 09:28:55 +08:00
Ethan P
87005b93e3
Remove placeholder note
2021-07-22 16:25:41 -04:00
intrigus-lgtm
a30005c42e
Replace broken link with archive.org link.
2021-07-22 22:14:44 +02:00
Robert Marsh
0e9d36b922
Merge pull request #6335 from geoffw0/toctou2
...
C++: Improvements to the cpp/toctou-race-condition query
2021-07-22 12:49:32 -07:00
Taus
74f1992aaf
Merge pull request #6352 from tausbn/mergeback-rc/3.2-to-main
...
Mergeback `rc/3.2` to `main`
2021-07-22 19:58:29 +02:00
Geoffrey White
d9682aa440
C++: Autoformat.
2021-07-22 18:32:40 +01:00
Dominik Bamberger
807fdb01c8
Add beta note.
2021-07-22 19:23:10 +02:00
Dominik Bamberger
b51db7f2de
Include packaging in 'Using custom queries with the CodeQL CLI'.
2021-07-22 19:23:10 +02:00
Jorge
f02b6d60a5
Merge branch 'github:main' into jorgectf/python/ldapinsecureauth
2021-07-22 18:49:51 +02:00
Shawn P
930d576cfb
Fixed isUncertain() description
2021-07-23 00:45:02 +08:00
jorgectf
b03e75e3d1
Extend ldap3's start_tls and fix tests
2021-07-22 18:42:41 +02:00
Geoffrey White
e9b96adf24
C++: Exclude results formatted with a character other than %s.
2021-07-22 17:40:32 +01:00
Geoffrey White
f8fed263e6
C++: Exclude results that are used as file names.
2021-07-22 17:40:25 +01:00
jorgectf
a34d6d390e
Port to ApiGraphs and finish the query
2021-07-22 18:34:57 +02:00
Ethan P
c7731ebbbe
Correct codeql database analyze command syntax
2021-07-22 11:44:54 -04:00
Dominik Bamberger
af80a255a3
Add example for 'Integrating a CodeQL pack into a Code Scanning workflow'.
2021-07-22 17:35:39 +02:00
Dominik Bamberger
7519288bfb
Add example for 'Running a CodeQL pack'.
2021-07-22 17:35:39 +02:00
Joe Farebrother
6be9c705f0
Update usage text
2021-07-22 16:30:26 +01:00
Chris Smowton
5c917b4a23
Merge pull request #6353 from sauyon/sauyon/java/model-constructors
...
Java: Add models for collection constructors
2021-07-22 16:27:59 +01:00
Sauyon Lee
150f3fd352
improve windows compatibility
2021-07-22 08:00:14 -07:00
Rasmus Wriedt Larsen
f71c99af22
Merge pull request #5444 from jorgectf/jorgectf/python/ldapimproperauth
...
Python: Add LDAP Improper Authentication query
2021-07-22 17:00:09 +02:00
Sauyon Lee
5d716b95b1
Allow use of pom.xml to generate stubs
2021-07-22 07:52:35 -07:00
Geoffrey White
1d582182b0
C++: Exclude 'path'.
2021-07-22 15:49:30 +01:00
Geoffrey White
86ee5fea40
C++: More test cases and correct an existing one.
2021-07-22 15:47:06 +01:00
haby0
2a50cf8244
Fix
2021-07-22 22:24:09 +08:00
Sauyon Lee
fd02dcdf2e
Java: Add models for collection constructors
2021-07-22 07:23:26 -07:00
Rasmus Wriedt Larsen
42a997cbcb
Python: Fix deprecation warning
2021-07-22 15:59:13 +02:00
Ethan P
1606d96859
fix typo
2021-07-22 09:58:43 -04:00
Rasmus Wriedt Larsen
71e6db8a01
Merge branch 'main' into jorgectf/python/ldapimproperauth
2021-07-22 15:57:43 +02:00
haby0
d8f5f6987b
Fix
2021-07-22 21:53:41 +08:00
Taus
6ea8ef5d16
Merge branch 'rc/3.2' into mergeback-rc/3.2-to-main
2021-07-22 13:52:56 +00:00
haby0
e160352b38
Fix
2021-07-22 21:48:46 +08:00
Taus
08f480a556
Merge pull request #6351 from tausbn/python-hotfix-localsourcenode-typetrackingnode
...
Python: Hotfix `LocalSourceNode`
2021-07-22 15:47:59 +02:00
haby0
735ab28040
Update java/ql/src/experimental/Security/CWE/CWE-470/UnsafeReflection.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-07-22 21:45:30 +08:00
haby0
7cf2e9ed79
Update java/ql/src/experimental/Security/CWE/CWE-470/UnsafeReflection.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-07-22 21:45:29 +08:00
haby0
46a212b712
Update java/ql/src/experimental/Security/CWE/CWE-470/UnsafeReflection.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-07-22 21:45:29 +08:00
haby0
676f0ad817
Update java/ql/src/experimental/Security/CWE/CWE-470/UnsafeReflection.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-07-22 21:45:29 +08:00
haby0
4ebf0ed7c5
Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
2021-07-22 21:45:29 +08:00
Chris Smowton
40173f7abb
Remove stubbing script outputs
2021-07-22 14:33:34 +01:00
Rasmus Wriedt Larsen
802d9bda83
Merge pull request #5680 from mrthankyou/python-use-sqlalchemy
...
Python: Add SqlAlchemy model
2021-07-22 15:31:39 +02:00
Mathias Vorreiter Pedersen
f6f9c8af65
Merge pull request #6350 from MathiasVP/mergeback-2021-07-22
...
Mergeback `rc/3.2`
2021-07-22 15:13:44 +02:00
Taus
020c6e3b3b
Python: Update change note
2021-07-22 13:11:29 +00:00
Taus
badf6311c9
Python: Remove flow between globals...
...
... in a local scope. Or rather, remove these from the `hasLocalSource`
relation.
This prevents a quadratic blowup when the same global is mentioned
_a lot_ of times within a single function scope.
2021-07-22 13:10:40 +00:00
Taus
ed794f42b5
Python: Soft revert TypeTrackingNode
...
Temporarily instates `TypeTrackingNode` as an alias of `LocalSourceNode`
as having it as a separate class lead to performance regressions.
In the hopes that this will be resolved in the near future, I have left
the current `TypeTrackingNode` implementation in situ, but hidden inside
a `FutureWork` private module.
2021-07-22 13:10:07 +00:00
Mathias Vorreiter Pedersen
e34261accf
Merge branch 'rc/3.2' into mergeback-2021-07-22
2021-07-22 14:40:22 +02:00
Ethan P
09c2ccafd8
Formatting fixes
2021-07-22 08:31:28 -04:00
Rasmus Wriedt Larsen
38875ca0c7
Python: Improve handling of async methods
2021-07-22 14:17:07 +02:00
Rasmus Wriedt Larsen
c3f942f899
Python: Provide internal InstanceTaintStepsHelper
...
I realized that if you ever wanted to the way taint-steps works again,
you would have to go to all the 117 places it has been implemented, and
change EVERY ONE OF THEM :( so trying to solve that problem here.
Not super happy with the name, but that was just the best I could come up with :D
2021-07-22 14:16:50 +02:00
Rasmus Wriedt Larsen
6e9d9fcbbd
Python: Improve taint steps in for & iterable unpacking
...
These were written way before the ones in DataFlowPrivate, but
apparently didn't cover quite as much :|
2021-07-22 14:16:17 +02:00
Dominik Bamberger
6d869f2572
Remove section on 'Creating a custom QL pack'.
2021-07-22 13:25:01 +02:00
Geoffrey White
a4c137fae5
C++: Add '_fsopen' as well.
2021-07-22 11:31:41 +01:00
Rasmus Wriedt Larsen
d3163d8a76
Python: Add iterable-unpacking in for test
2021-07-22 11:59:46 +02:00
Rasmus Wriedt Larsen
e2d3fa7093
Python: Add list-comprehension taint test
2021-07-22 11:59:46 +02:00
Rasmus Wriedt Larsen
f5ae5a581b
Python: A bit more additional taint clean up
...
A few stragglers that did not have the same TODO comments as the others
2021-07-22 11:59:46 +02:00
Rasmus Wriedt Larsen
d2efe0b84d
Python: Normalize additional taint steps for modeled classes
...
Such that it should be next to the other class-related predicates (such
as `instance()`), the class is called `AdditionalTaintStep`, and it
marked private.
I also moved any modeling of attributes as well, while I was at it.
2021-07-22 11:59:46 +02:00
Rasmus Wriedt Larsen
be1cad864b
Python: Resolve all meth = obj.meth; meth() TODOs
...
It would probably have been easier to do this as the _first_ thing...
but that's too late now 😓
2021-07-22 11:59:46 +02:00
Chris Smowton
e2a533c7de
Merge pull request #6346 from aschackmull/java/perf-fix
...
Java: Fix bad magic.
2021-07-22 10:15:16 +01:00
Chris Smowton
605f037af8
Merge pull request #6247 from p0wn4j/spring-responseentity-redirect-sink
...
[Java] CWE-601: Add Spring URL Redirect ResponseEntity sink
2021-07-22 09:45:30 +01:00
Rasmus Wriedt Larsen
6f63c03558
Python: Model http.cookies.Morsel and usage in Tornado
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
7e09a1cbfd
Python: Model tornado.httputil.HTTPHeaders
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
7020e4132b
Python: Model BaseHTTPRequestHandler.rfile as file-like object
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
d388dd547e
Python: Model HTTPMessage from Stdlib
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
f3ce3933d1
Python: Add AdditionalTaintStep to type-tracking class snippet
...
I know that the TODO about not having the tools to handling
`meth = obj.meth; meth()` is outdated now that we `DataFlow::MethodCallNode`,
but I'm planning to deal with that later on ;)
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
dac71ded9d
Python: Add Authorization modeling in Flask
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
133632119d
Python: Model werkzeug Headers
...
Also removed a misleading comment link to method on wrong class :D
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
4d9c86a252
Python: Model Werkzeug FileStorage.save as FileSystemAccess
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
9cb4899c5c
Python: Add FileStorage modeling in Flask
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
09b0c300d9
Python: Rewrite werkzeug to avoid InstanceSourceApiNode
...
InstanceSourceApiNode is a really good idea, but it just happened too
soon. I can't do what I need if I have to supply an API-node. So to
avoid confusion between deprecating to/from InstanceSource in those
classes, I opted to do some major reorganizing as well 👍
Due to aliasing restrictions, I had to use a little trick with the
`WerkzeugOld` module.
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
04190ea308
Python: Add file-like modeling to werkzeug FileStorage
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
5f5c0b11c7
Python: Refactor Werkzeugmodeling
...
Having the additional taint step just next to the other definitions, so
everything is together.
2021-07-22 10:43:18 +02:00
Rasmus Wriedt Larsen
4f4dec50f2
Python: Model ResovlerMatch in Django
...
Like before, omitted ClassInstantiation
2021-07-22 10:43:13 +02:00
Anders Schack-Mulligen
dcfc027b5f
Java: Fix bad magic.
2021-07-22 10:12:49 +02:00
jorgectf
edb273ace5
Merge remote-tracking branch 'origin/jorgectf/python/ldapimproperauth' into jorgectf/python/ldapinsecureauth
2021-07-22 02:51:19 +02:00
jorgectf
68f79f054b
Update .expected
2021-07-21 21:32:08 +02:00
jorgectf
8d84d63b94
Add Python-Jose modeling and tests
2021-07-21 21:31:53 +02:00
jorgectf
ce507beed4
Add Authlib modeling and tests
2021-07-21 21:31:35 +02:00
jorgectf
e14b10370e
Add indeterminate test to pyjwt
2021-07-21 21:30:54 +02:00
jorgectf
f1b3c70909
Divide JWT libraries
2021-07-21 21:29:23 +02:00
Chris Smowton
c568a9463a
Remove <> qualifier from ResponseEntity name
...
This was an extractor bug that was fixed recently
2021-07-21 17:58:06 +01:00
Geoffrey White
fa0f5d08a2
Merge branch 'main' into toctou2
2021-07-21 16:21:29 +01:00
Rasmus Wriedt Larsen
6f0a622252
Python: Remove ClassInstantiation from Django UploadedFile
...
since UploadedFile is the abstract base class, all real usage would be
of one of the subclasses, so removing this to not provide a false hope
that it actually works.
I don't think investing the time into making this work would give any
value, so that's why I didn't do it ;)
2021-07-21 16:35:09 +02:00
Rasmus Wriedt Larsen
7dc6518350
Python: Add FileLikeObject modeling
...
Such that the result of `request.FILES["key"].file.read()` is tainted
2021-07-21 16:35:09 +02:00
Rasmus Wriedt Larsen
18c0d13efd
Python: Model most of UploadedFile in Django
2021-07-21 16:35:09 +02:00
Rasmus Wriedt Larsen
5ec5557203
Python: Model MultiValueDict in Django
2021-07-21 16:35:09 +02:00
Rasmus Wriedt Larsen
95e88c18b9
Python: Minor cleanup
2021-07-21 16:35:09 +02:00
Rasmus Wriedt Larsen
51b543c67c
Python: Model taint for django request methods
2021-07-21 16:35:09 +02:00
Rasmus Wriedt Larsen
bced467a88
Python: Refactor django additional step handling
...
So it matches the new style we're using in aiohttp/twisted/...
2021-07-21 16:35:09 +02:00
Rasmus Wriedt Larsen
ce4b192caa
Python: Improve usefulness of RemoteFlowSourcesReach meta query
...
Before, results from `dca` would look something like
## + py/meta/alerts/remote-flow-sources-reach
- django/django@c2250cf_cb8f: tests/messages_tests/urls.py:38:16:38:48
reachable with taint-tracking from RemoteFlowSource
- django/django@c2250cf_cb8f: tests/messages_tests/urls.py:38:9:38:12
reachable with taint-tracking from RemoteFlowSource
now it should make it easier to spot _what_ it is that actually changed,
since we pretty-print the node.
2021-07-21 16:35:09 +02:00
Ethan P
3a048a1cdd
Add `qlpack.yml` information
2021-07-21 09:27:41 -04:00
Rasmus Wriedt Larsen
6aabbf0b9a
Python: Add some alert meta queries
...
Intended for use with dca
2021-07-21 14:53:01 +02:00
Mathias Vorreiter Pedersen
73ee7409f6
Merge pull request #6342 from MathiasVP/fix-fp-in-uninitialized-local
...
C++: Fix FP in `cpp/uninitialized-local`
2021-07-21 14:46:57 +02:00
Ethan P
2cdf404e05
Create "About CodeQL packs" and add to ToC
2021-07-21 08:10:46 -04:00
Anders Schack-Mulligen
22f6b021ba
Merge pull request #6338 from aschackmull/java/cleanup-deprecated
...
Java: Remove deprecated ParExpr.
2021-07-21 11:36:40 +02:00
Geoffrey White
daed988108
Merge pull request #6341 from MathiasVP/mergeback-2021-07-21
...
Mergeback `rc/3.2`
2021-07-21 10:35:07 +01:00
Mathias Vorreiter Pedersen
e536cecefe
C++: Fix FP caused by a variable missing type information.
2021-07-21 11:04:23 +02:00
Mathias Vorreiter Pedersen
6d0290809d
Merge branch 'rc/3.2' into mergeback-2021-07-21
2021-07-21 10:23:58 +02:00
Tony Torralba
76905c47b4
Formatting
2021-07-21 09:47:45 +02:00
ihsinme
8aac5b339e
Update FindIncorrectlyUsedExceptions.expected
2021-07-21 09:49:19 +03:00
ihsinme
4202759bcc
Update test.cpp
2021-07-21 09:48:36 +03:00
ihsinme
2d1924ac0e
Update test.cpp
2021-07-21 08:32:18 +03:00
ihsinme
cf689b83a9
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-07-21 08:29:42 +03:00
Ethan P
0eb2f903a3
add procedural information for publishing and using CodeQL packs
2021-07-20 23:21:36 -04:00
Ethan P
e586765cbe
add new articles to ToC
2021-07-20 22:33:06 -04:00
p0wn4j
f0d5520976
Add Spring URL Redirect ResponseEntity sink
...
Copyedit qhelp
2021-07-21 03:16:16 +04:00
Ethan P
96de32bd2a
Add conceptual information "Creating and working with CodeQL packs"
2021-07-20 14:01:30 -04:00
Geoffrey White
473198a6ef
C++: Accept any check followed by a 'sensitive' use such as 'chmod'.
2021-07-20 18:11:05 +01:00
Aditya Sharad
46fbb2a3cc
Merge pull request #6334 from github/security-severity-docs
...
Update CodeQL docs for security-severity levels
2021-07-20 09:58:19 -07:00
Geoffrey White
c6d8abc9b1
C++: Add a couple more testcases.
2021-07-20 17:52:59 +01:00
Tony Torralba
4622d8590b
Fix change note
2021-07-20 17:50:58 +02:00
Tony Torralba
26999c7ac4
Decouple UnsafeAndroidAccess.qll to reuse the taint tracking configuration
2021-07-20 17:46:35 +02:00
Tony Torralba
99e66cffa2
Merge branch 'main' into atorralba/promote-unsafe-android-webview-fetch
2021-07-20 17:30:56 +02:00
Tony Torralba
ed0db7c7b4
Fix release note
2021-07-20 17:24:24 +02:00
Tony Torralba
7a898a04f3
Fix release note
2021-07-20 17:23:47 +02:00
Tony Torralba
3259ead946
Decouple OgnlInjection.qll to reuse the taint tracking configuration
2021-07-20 17:21:10 +02:00
Tony Torralba
b6904a7992
Merge branch 'main' into atorralba/promote-ognl-injection
2021-07-20 17:17:17 +02:00
Tony Torralba
22c9baa462
Refactor JWT.qll
2021-07-20 17:14:34 +02:00
Tony Torralba
430d9f1834
Merge branch 'main' into atorralba/promote-missing-jwt-signature-check
2021-07-20 16:20:35 +02:00
Tony Torralba
8f1ecf529f
QLDoc
2021-07-20 15:53:38 +02:00
Tony Torralba
42b6b26c10
Decouple JndiInjection.qll to reuse the taint tracking configuration
2021-07-20 15:38:34 +02:00
Anders Schack-Mulligen
77d53676ba
Java: Remove deprecated ParExpr.
2021-07-20 15:27:31 +02:00
Taus
6591a86aad
Python: Add test cases
...
I debated whether to add a
`MISSING: use=moduleImport("builtins").getMember("print").getReturn()`
annotation to the last line.
Ultimately, I decided to add it, as we likely _do_ want this information
to propagate into inner functions (even if the value of `var2` may
change before `func4` is called).
2021-07-20 13:26:35 +00:00
Taus
e53b86fbbc
Python: Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-07-20 15:19:45 +02:00
Geoffrey White
5d1c7841a6
C++: Change note.
2021-07-20 14:14:01 +01:00
Tony Torralba
b8ea833a61
Merge branch 'main' into atorralba/promote-jndi-injection
2021-07-20 15:01:26 +02:00
Taus
bbcbcefedc
Python: Add false negative test case.
2021-07-20 12:54:06 +00:00
Tony Torralba
68df8028d2
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-07-20 14:47:16 +02:00
Taus
233ae5a54b
Python: Fix FP in py/unused-local-variable
...
This is only a temporary fix, as indicated by the TODO comment.
The real underlying issue is the fact that `isUnused` is defined in
terms of the underlying SSA variables (as these are only created
for variables that are actually used), and the fact that annotated
assignments are always considered to redefine their targets, which may
not actually be the case.
Thus, the correct fix would be to change the extractor to _disregard_
mere type annotations for the purposes of figuring out whether an
SSA variable should be created or not.
However, in the short term the present fix is likely sufficient.
2021-07-20 12:13:44 +00:00
Taus
8b3fa789da
Python: Add AnnAssign DefinitionNode
...
This was a source of false positives for the
`py/uninitialized-local-variable` query, as exemplified by the test
case.
2021-07-20 11:57:26 +00:00
Taus
f91e826781
Python: Add test case
2021-07-20 11:57:12 +00:00
Arthur Baars
3790611ca1
Merge pull request #233 from github/tausbn/bump-typetrackingnode-changes
...
Bump `codeql` submodule
2021-07-20 13:24:30 +02:00
Arthur Baars
890adf97d6
Merge pull request #6333 from github/rc/3.2
...
Merge rc/3.2 to main
2021-07-20 12:19:20 +02:00
Geoffrey White
ae944b268a
C++: Restrict the 'check' to stat / access only as these are by far the more reliable results.
2021-07-20 11:18:00 +01:00
James Fletcher
a365d4fb34
update docs for security-severity
2021-07-20 11:00:13 +01:00
Rasmus Wriedt Larsen
5a489a386a
Merge pull request #6329 from havron/qhelp-typo
...
Fix qhelp typo in RequestWithoutValidation
2021-07-20 10:18:35 +02:00
Artem Smotrakov
158a75e5a1
Import UnsafeDeserializationQuery in unsafeDeserialization.ql
2021-07-20 10:14:50 +02:00
Tony Torralba
0f199601f8
Refactor GroovyInjection.qll
2021-07-20 09:44:37 +02:00
Anders Schack-Mulligen
47528b3379
Merge pull request #6332 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2021-07-20 09:27:59 +02:00
github-actions[bot]
bed08a6f4f
Add changed framework coverage reports
2021-07-20 00:06:37 +00:00
Ethan P
1cf5386824
Create publishing-and-using-codeql-packs.rst
2021-07-19 18:42:01 -04:00
Ethan P
a5cbc560e3
Add conceptual info for creating and working with CodeQL packs
2021-07-19 18:41:44 -04:00
Porcuiney Hairs
c6c925d67a
Python : Improve Xpath Injection Query
2021-07-20 03:31:30 +05:30
Aditya Sharad
48778ce9a4
Merge pull request #6160 from timoles/patch-1
...
Add information for generating qhelp files locally
2021-07-19 14:14:22 -07:00
Ethan P
26a36592ce
Add intros and Overview headers
2021-07-19 16:29:18 -04:00
Ethan P
511e01aa1b
shorten title for full-cwe
2021-07-19 16:23:57 -04:00
Sam Havron
733e5b45bf
Fix qhelp typo in RequestWithoutValidation
2021-07-19 16:01:06 -04:00
Timo Müller
b24c096a76
Apply suggestions from code review
...
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com >
2021-07-19 21:12:59 +02:00
Aditya Sharad
20fa8e49c8
Merge pull request #6326 from adityasharad/codeowners/codeql-tools
...
Codeowners: Add reviewer teams for CodeQL tools and associated docs
2021-07-19 11:15:58 -07:00
Ethan P
5028fccee5
Create new CWE coverage overview and full CWE coverage page
2021-07-19 14:01:42 -04:00
Ethan P
618e8b34dc
Create individual language pages for CWE tables
2021-07-19 14:01:18 -04:00
Aditya Sharad
94b2b174c1
Merge pull request #6177 from skyzyx/patch-1
...
Update getting-started-with-the-codeql-cli.rst
2021-07-19 10:58:43 -07:00
Geoffrey White
ab4b2c2342
C++: Fix 'rename'.
2021-07-19 18:58:39 +01:00
Geoffrey White
95ec8f5394
C++: Add support for '_wfsopen'.
2021-07-19 18:36:09 +01:00
Aditya Sharad
c26a4d315d
Codeowners: Add reviewer teams for CodeQL tools and associated docs
2021-07-19 10:35:59 -07:00
Chris Smowton
7819d32784
Make MediaType stub constants actually constant
...
This is required to use them in annotations
2021-07-19 18:28:30 +01:00
Chris Smowton
a0297d51e5
Note fixed test result
...
the Optional type has now been modelled
2021-07-19 18:28:06 +01:00
Chris Smowton
82ea2592ad
Spring HTTP: Fix test mistakes
...
Classes without RestController and methods without GetMapping or similar were never going to be detected.
2021-07-19 18:21:13 +01:00
Chris Smowton
392e405f5d
Add Spring-XSS test
...
This covers the cases currently exercised in https://github.com/github/codeql-securitylab/blob/main/java/ql/src/pwntester/security/RestXSS.ql
2021-07-19 18:21:11 +01:00
Chris Smowton
16c5952167
Add and improve Spring-web stubs
2021-07-19 18:20:37 +01:00
Chris Smowton
8051a7cd83
Add change note
2021-07-19 18:11:05 +01:00
Chris Smowton
34a4b71891
Add models of JSON-java, aka org.json
2021-07-19 17:57:27 +01:00
Arthur Baars
ed054acd8e
Merge pull request #6305 from intrigus-lgtm/patch-5
...
C# remove spurious spaces in <code> tag
2021-07-19 17:09:36 +02:00
Rasmus Wriedt Larsen
5249591747
Python: Fix test folder for InsecureProtocol
2021-07-19 16:57:00 +02:00
Rasmus Wriedt Larsen
5939128a76
Python: Fix test folder for InsecureDefaultProtocol
...
it was named wrong before. whoops.
2021-07-19 16:56:07 +02:00
Rasmus Wriedt Larsen
77021ae119
Python: Restructure security tests to contain query name
...
We were mixing between things, so this is just to keep things
consistent. Even though it's not strictly needed for all queries,
it does look nice I think
2021-07-19 16:54:34 +02:00
Rasmus Wriedt Larsen
da021feb8b
Python: Move py/incomplete-hostname-regexp tests to own folder
2021-07-19 16:48:21 +02:00
Rasmus Wriedt Larsen
7939a1372e
Python: Move Jinja2WithoutEscaping tests to own folder
2021-07-19 16:44:41 +02:00
Geoffrey White
c85edb6c03
C++: Use [, ] in the query.
2021-07-19 15:24:25 +01:00
Geoffrey White
7684796d63
C++: Fix handling of the 'stat' pointer argument.
2021-07-19 15:13:19 +01:00
Mathias Vorreiter Pedersen
7bc18abbb0
Merge pull request #6150 from geoffw0/toctou
...
C++: Tests for cpp/toctou-race-condition
2021-07-19 15:51:35 +02:00
Tony Torralba
70081b6a1e
Refactor MvelInjection.qll
2021-07-19 15:36:35 +02:00
Artem Smotrakov
47e4cf4180
Make UnsafeDeserializationSink public
2021-07-19 15:34:33 +02:00
Geoffrey White
0c029898bb
C++: Autoformat.
2021-07-19 13:58:25 +01:00
Geoffrey White
49bbfefb4d
C++: Fix uses of 'rename' in tests.
2021-07-19 13:57:16 +01:00
Tony Torralba
45a72ff6eb
Fix InsecureBasicAuth test expectations
2021-07-19 13:56:31 +02:00
Tony Torralba
46faf68d64
Decouple MvelInjection.qll to reuse the taint tracking configuration
2021-07-19 13:50:03 +02:00
Tony Torralba
5ca8b380e9
Merge branch 'main' into atorralba/promote-mvel-injection
2021-07-19 13:45:10 +02:00
Nick Rolfe
8d21f95ffc
Merge pull request #235 from github/comment_fix
...
Move comment so it's not treated as part of the precision metadata
2021-07-19 12:39:13 +01:00
Nick Rolfe
ce35d74447
Move comment so it's not treated as part of the precision metadata
2021-07-19 12:29:16 +01:00
shati-patel
69dab49073
Docs: Running query on multiple DBs in CodeQL for VS Code
2021-07-19 12:24:05 +01:00
Artem Smotrakov
035f7ac669
Refactored libs for unsafe deserialization
2021-07-19 13:19:36 +02:00
Tony Torralba
1c91e74269
Rename sink models class
2021-07-19 13:05:37 +02:00
Tony Torralba
441e8afe81
Decouple GrovyInjection.qll to reuse the taint tracking configuration
2021-07-19 12:53:37 +02:00
Anders Schack-Mulligen
db76b12f3f
Merge pull request #6313 from aschackmull/java/fix-csv-dispatch
...
Java: Fix a bug in call-context-sensitve dispatch to SummarizedCallable.
2021-07-19 12:49:31 +02:00
Tony Torralba
b08f417a1e
Merge branch 'main' into atorralba/promote-groovy-injection
2021-07-19 12:44:03 +02:00
Artem Smotrakov
e02530749b
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-07-19 11:52:12 +02:00
thank_you
9e01338500
Query only vulnerable methods
2021-07-18 17:13:10 -04:00
Artem Smotrakov
cfe74b527a
Use inline-expectation tests for StaticInitializationVector.ql
2021-07-17 01:04:52 +02:00
ihsinme
4083da3218
Update cpp/ql/src/experimental/Security/CWE/CWE-561/FindIncorrectlyUsedSwitch.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-07-16 23:18:58 +03:00
Artem Smotrakov
218731ca0a
Added a query for static initialization vectors in encryption
...
- Added StaticInitializationVector.ql
- Added StaticInitializationVector.qhelp
- Added tests
2021-07-16 19:06:44 +02:00
Artem Smotrakov
c367c7e33b
Merge branch 'unsafe-jackson-deserialization' of github.com:artem-smotrakov/ql into unsafe-jackson-deserialization
2021-07-16 18:26:38 +02:00
Artem Smotrakov
3856527d14
Refactored tests for unsafe deserialization
2021-07-16 18:26:06 +02:00
Artem Smotrakov
6d7cb48054
Refactored the query for unsafe deserialization
2021-07-16 18:25:41 +02:00
Calum Grant
8d71d09b94
Merge pull request #234 from github/calumgrant/security-severities
...
Add security-severity metadata
2021-07-16 15:40:03 +01:00
Calum Grant
46a03795c2
Add security-severity metadata
2021-07-16 14:05:54 +01:00
Anders Schack-Mulligen
effca4495f
Java: Fix a bug in call-context-sensitve dispatch to SummarizedCallable.
2021-07-16 14:31:29 +02:00
Taus
4f3f93f267
Python: Autoformat
2021-07-16 12:22:24 +00:00
Taus
3fd0ec74f0
Python: Deprecate importNode
...
Unsurprisingly, the only thing affected by this was the `import-helper`
tests. These have lost all of the results relating to `ImportMember`s,
but apart from that the underlying behaviour should be the same.
I also limited the test to only `CfgNode`s, as a bunch of `EssaNode`s
suddenly appeared when I switched to API graphs.
Finally, I used `API::moduleImport` with a dotted name in the type
tracking tests. This goes against the API graphs interface, but I think
it's more correct for this use case, as these type trackers are doing
the "module attribute lookup" bit manually.
2021-07-16 11:38:30 +00:00
Erik Krogh Kristensen
6da1007f67
mark new redos tests correctly
2021-07-16 13:37:47 +02:00
Erik Krogh Kristensen
b2b736db10
add more tests for non-empty positive lookaheads
2021-07-16 13:25:37 +02:00
Asger Feldthaus
be8c574d5c
JS: Add test and comment for access path termination criteria
2021-07-16 09:42:59 +02:00
Asger Feldthaus
0247de76af
JS: Add a .vue file to vuex test
2021-07-16 09:31:47 +02:00
intrigus-lgtm
7aa19ea00f
C# remove spurious spaces in <code> tag
2021-07-15 19:34:36 +02:00
intrigus-lgtm
88bd464296
C# remove spurious spaces in <code> tag
2021-07-15 19:34:13 +02:00
intrigus-lgtm
f587db4385
C# remove spurious spaces in <code> tag
2021-07-15 19:33:24 +02:00
Rasmus Wriedt Larsen
a07de3faae
Merge branch 'main' into emptyRedos
2021-07-15 18:21:29 +02:00
Taus
258f85d6d0
Add defaultImplicitTaintRead
2021-07-15 15:52:59 +00:00
Geoffrey White
c5ed859cf5
C++: Update test comments to my best understanding.
2021-07-15 16:36:21 +01:00
jorgectf
6f09b95019
Update .expected
2021-07-15 17:16:29 +02:00
Taus
dc4d353a01
Bump shared dataflow library
2021-07-15 15:08:59 +00:00
Taus
ec645725f0
Bump codeql submodule
...
Syncs up the shared type tracking implementation with Python.
2021-07-15 14:35:33 +00:00
Geoffrey White
e5e8a1b781
C++: Exclude integral types from SensitiveExprs.
2021-07-15 14:44:14 +01:00
Geoffrey White
dd95c53a3e
C++: More test cases.
2021-07-15 14:39:56 +01:00
Geoffrey White
aabb2fc3a1
C++: Tune SensitiveExprs.qll based on real TP and FP results.
2021-07-15 14:25:29 +01:00
Joe Farebrother
af78b99475
Include stubs for javax
2021-07-15 10:58:12 +01:00
Joe Farebrother
f59ab527b4
Fix issue with nested types
2021-07-15 10:57:32 +01:00
Joe Farebrother
65ce8aa798
Fix issue with circular type bounds
2021-07-15 10:49:14 +01:00
Joe Farebrother
0577e12b97
Add consistency checks
2021-07-15 10:49:13 +01:00
Joe Farebrother
ecf130f7ae
Move stubber to utils folder for consistency with test generator
2021-07-15 10:49:13 +01:00
Joe Farebrother
ddb93e8829
Fix a bug with type bounds + a few other bugs
2021-07-15 10:49:13 +01:00
Joe Farebrother
036e83a247
Fix error with implementing interfaces
2021-07-15 10:49:13 +01:00
Joe Farebrother
06d6ddc1b9
Fix issue with reporting javac output
2021-07-15 10:49:13 +01:00
Joe Farebrother
8f40a6e21e
Use shlex for printing commands
2021-07-15 10:49:13 +01:00
Joe Farebrother
c850c7d079
Fix typo in comment
2021-07-15 10:49:13 +01:00
Joe Farebrother
b562bdd14f
Simplify the python script
2021-07-15 10:49:12 +01:00
Joe Farebrother
f35320e85b
Add explanatory comments + minor fixes
2021-07-15 10:49:12 +01:00
Joe Farebrother
cce6217e17
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-07-15 10:49:12 +01:00
Joe Farebrother
471c140d2c
Fix incorrect comment
2021-07-15 10:49:12 +01:00
Joe Farebrother
cffaa8d9a0
Improve the stubbing query to handle more language constructs correctly
2021-07-15 10:49:12 +01:00
Joe Farebrother
40bb19e4f1
Add Java stubbing script
2021-07-15 10:49:12 +01:00
Erik Krogh Kristensen
383b5f2ff2
implement RegExpSubPattern.getOperand in the Python regexp implementation
2021-07-15 09:41:53 +02:00
Erik Krogh Kristensen
de8f64c5be
sync with python
2021-07-14 23:40:06 +02:00
Erik Krogh Kristensen
80d784e37a
add a step over empty lookaheads/lookbehinds
2021-07-14 23:40:04 +02:00
mr-sherman
04940a1105
Create 2021-07-14-service-stack-support.md
2021-07-14 15:54:28 -04:00
Taus
5a9fca48e8
Python: Fix ExceptStmt::getType
...
We were not supporting `except` statements handling multiple exception
types (specified as a tuple) correctly, instead just returning the
tuple itself as the "type" (which makes little sense).
To fix this, we explicitly extract the elements of this node, in the
case where it _is_ a tuple.
This is a change that can potentially affect many queries (as `getType`
is used in quite a few places), so some care should be taken to
ensure that this does not adversely affect performance.
2021-07-14 14:03:49 +00:00
Taus
ec9063b4a5
Python: Add test case for github/codeql#6227
2021-07-14 13:52:32 +00:00
edvraa
fd4d8e2595
Use HasFlow instead HasFlowPath
2021-07-14 16:06:34 +03:00
Tom Hvitved
42c06bfde4
Merge pull request #226 from github/hvitved/const-flow
...
Data flow through constants
2021-07-14 13:21:07 +02:00
Tom Hvitved
9463927409
Address review comments
2021-07-14 11:05:55 +02:00
ihsinme
1e12ede9fa
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-07-14 10:11:28 +03:00
Taus
c3789811c8
Python: Support import * in API graphs
2021-07-13 18:22:51 +00:00
Taus
8b6b4dde69
Python: Refactor built-ins logic
...
This will make it possible to reuse for names defined in `import *`.
2021-07-13 18:20:25 +00:00
${sleep,5}
51a6140258
Change variable name to correct sanitized input variable
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-07-13 14:04:06 -04:00
Taus
df8a6b984a
Python: Add import * tests
...
Moves the current test out of `test.py`, as otherwise any unknown global
(like, say, `sink`) would _also_ be considered to be something
potentially defined in `unknown`.
2021-07-13 17:46:59 +00:00
Geoffrey White
989633993b
C++: Increase the query precision.
2021-07-13 18:38:30 +01:00
Geoffrey White
dd03828522
C++: Change note.
2021-07-13 18:08:34 +01:00
Geoffrey White
652f903457
C++: Add simple dataflow to the query.
2021-07-13 17:48:48 +01:00
Geoffrey White
7500d75b5b
C++: Fix some easy FPs.
2021-07-13 17:36:41 +01:00
Geoffrey White
133953303b
C++: More test cases.
2021-07-13 17:32:08 +01:00
Arthur Baars
64a55ba6cf
Merge pull request #232 from github/regexp_test_order
...
Stabilise node ordering for regexp parsing test
2021-07-13 17:36:21 +02:00
Nick Rolfe
1fe5162b67
Stabilise node ordering for regexp parsing test
2021-07-13 16:18:21 +01:00
Artem Smotrakov
1b3516ab94
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-07-13 14:53:45 +02:00
Artem Smotrakov
09ae779b21
Removed fromSource() check in looksLikeResolveClassStep()
2021-07-12 19:56:51 +02:00
edvraa
a0942e0360
JsonConvert
2021-07-12 15:23:04 +03:00
edvraa
f4cb6c50c0
YamlDotNet
2021-07-12 13:25:50 +03:00
edvraa
1e4409f9ed
SharpSerializer
2021-07-12 13:22:20 +03:00
edvraa
c3ac3ca41c
FsPickler
2021-07-12 13:20:57 +03:00
edvraa
1682e993bc
Merge with Main
2021-07-12 11:32:47 +03:00
edvraa
40e8a900de
Apply changes from code review
2021-07-12 02:08:23 +03:00
edvraa
6393dca22f
Apply changes from code review
2021-07-12 01:13:41 +03:00
edvraa
3de7b280e4
AuthCookie.qll moved to experimental
2021-07-12 01:13:40 +03:00
edvraa
02f0d81830
delete unused predicate
2021-07-12 01:13:40 +03:00
edvraa
3723f7f132
comments
2021-07-12 01:13:40 +03:00
edvraa
2c9d6827ad
comments
2021-07-12 01:13:40 +03:00
edvraa
74cb61a475
Autoformat
2021-07-12 01:13:40 +03:00
edvraa
65fb46af3d
fix help files
2021-07-12 01:13:40 +03:00
edvraa
d0e9a01edc
Rename files
2021-07-12 01:13:40 +03:00
edvraa
5c9a3d5ce7
Single Secure query
2021-07-12 01:13:39 +03:00
edvraa
07327984b0
Single HttpOnly query
2021-07-12 01:13:39 +03:00
edvraa
dea4d67ebd
Extract to predicate isCookieWithSensitiveName
2021-07-12 01:13:39 +03:00
edvraa
7e723e90f1
Remove redundant iResponse.getAppendMethod() = mc.getTarget(), it is already covered by higher level exists
2021-07-12 01:13:39 +03:00
edvraa
98261a63c5
typo accessibe -> accessible
2021-07-12 01:13:39 +03:00
edvraa
89c4102462
HttpOnly and Secure cookie queries
2021-07-12 01:13:39 +03:00
Artem Smotrakov
c98f1a479e
Better taint propagation in UnsafeTypeConfig
2021-07-09 10:24:15 +02:00
Artem Smotrakov
476843a278
Added comments for Jackson in UnsafeDeserialization.qll
2021-07-09 10:24:15 +02:00
Artem Smotrakov
e9731cd212
Minor improvements for Jackson in UnsafeDeserialization.qll
2021-07-09 10:24:15 +02:00
Artem Smotrakov
704cc77bb5
Added a change note for Jackson
2021-07-09 10:24:14 +02:00
Artem Smotrakov
24e4b68b9c
Removed getAnAccess() calls for Jackson
2021-07-09 10:24:14 +02:00
Artem Smotrakov
aefd21075b
Added tests for UnsafeDeserialization.ql and Jackson
2021-07-09 10:24:10 +02:00
Artem Smotrakov
ea0991c980
Added Jackson to UnsafeDeserialization.qhelp
2021-07-09 10:17:29 +02:00
Artem Smotrakov
97fca620fa
Cover attacker-controlled types for deserialization with Jackson
2021-07-09 10:16:04 +02:00
Artem Smotrakov
3eb2af1bc2
First draft of sinks for unsafe deserialization with Jackson
2021-07-09 10:16:01 +02:00
haby0
e8d0827916
Add tornado source
2021-07-05 10:42:15 +08:00
Geoffrey White
dc2cb9bd62
C++: Fix numbering.
2021-07-02 18:33:36 +01:00
Geoffrey White
bc3b347569
C++: Another test case to consider.
2021-07-02 18:32:46 +01:00
Geoffrey White
a53b161afb
C++: Move some variant tests to a case we definitely do want to flag the base case of.
2021-07-02 18:18:11 +01:00
Geoffrey White
c3cd1359d6
C++: Mark the cases we're not sure about.
2021-07-02 18:18:10 +01:00
Geoffrey White
cf8fa830a9
C++: Clarify the note about file descriptors.
2021-07-02 18:18:10 +01:00
Geoffrey White
d86a0ab7a5
C++: Add test cases involving file descriptor versions.
2021-07-02 18:17:59 +01:00
Tom Hvitved
23447e6d58
Reduce size of lookupMethodOrConst
2021-07-02 14:02:26 +02:00
Tom Hvitved
bf696df788
Data flow through constants
2021-07-02 14:02:26 +02:00
Tom Hvitved
3b6e5881c8
Update constants.rb test
2021-07-02 14:02:26 +02:00
Arthur Baars
0eae89a41b
Merge pull request #228 from github/qhelp
...
QHelp preview
2021-07-02 14:00:51 +02:00
Arthur Baars
5afd3c7846
Merge pull request #213 from github/aibaars/api-graphs2
...
First version of ApiGraphs
2021-07-02 13:58:00 +02:00
Arthur Baars
48ad0aa1ee
Escape file paths
2021-07-02 13:51:22 +02:00
Arthur Baars
b2ba8e664c
Handle .inc.qhelp files
2021-07-02 13:32:43 +02:00
haby0
b866f1b21e
Add CWE-348 ClientSuppliedIpUsedInSecurityCheck
2021-07-02 19:30:33 +08:00
Arthur Baars
20570eb1d1
QHelp preview
2021-07-02 13:10:51 +02:00
Asger Feldthaus
a2b913119d
JS: Change note
2021-07-02 12:47:55 +02:00
Asger Feldthaus
ee608540c5
JS: Add support for createNamespacedHelpers
2021-07-02 12:47:55 +02:00
Asger Feldthaus
dd1e21c713
JS: Model vuex
2021-07-02 12:47:55 +02:00
Asger Feldthaus
fefe30a9fa
JS: Add API graph edges for indirect propref members
2021-07-02 12:47:54 +02:00
Asger Feldthaus
2a3bc0f110
JS: Add spread step when bactracking in API graphs
2021-07-02 12:47:54 +02:00
Asger Feldthaus
9f2897b179
JS: Make VueRouterFlowSource a subclass of ClientSideRemoteFlowSource
2021-07-02 12:47:54 +02:00
Tom Hvitved
703e9e726d
Merge pull request #225 from github/hvitved/private-methods
...
Model private methods and "main objects"
2021-07-02 11:02:41 +02:00
Tom Hvitved
330b33638e
Address review comments
2021-07-02 10:41:10 +02:00
Tom Hvitved
52529d590b
Model private methods and "main objects"
2021-07-02 10:41:06 +02:00
Tom Hvitved
9de4ed4d4d
Add tests for private methods
2021-07-02 10:39:49 +02:00
Tom Hvitved
8de1eedb41
Merge pull request #227 from github/hvitved/expose-call-graph
2021-07-01 18:29:14 +02:00
jorgectf
3d2b6f7a2d
Delete outdated comment
2021-07-01 17:54:46 +02:00
jorgectf
7fb44470ee
Add .expected results
2021-07-01 17:53:04 +02:00
jorgectf
a1f48db60b
Make verifiesSignature() a predicate
2021-07-01 17:51:56 +02:00
jorgectf
4079e5352e
Add JWT framework to Frameworks.qll
2021-07-01 17:51:34 +02:00
jorgectf
07422a1dce
Move tests under test/
2021-07-01 17:51:00 +02:00
Tom Hvitved
c3cff3e113
Expose call graph through Call::getATarget()
2021-07-01 16:40:45 +02:00
ihsinme
02bf800b6d
Update FindIncorrectlyUsedSwitch.ql
2021-07-01 08:50:46 +03:00
Nick Rolfe
d99b5510e5
Merge pull request #219 from github/regex
...
Add regexp parser and exponential ReDoS query
2021-06-30 17:23:29 +01:00
Alex Ford
7cc6b3a7b0
Merge pull request #224 from github/sqli-override-fp
...
rb/sql-injection: fix FPs stemming from not accounting for overridden methods
2021-06-30 17:20:14 +01:00
Chris Smowton
7f556de8a0
Resolve now-fixed spurious XSS results
2021-06-30 12:04:22 +01:00
Chris Smowton
c37ecb7102
Fix existing JaxRs tests
...
* Expose getContentTypeString for use by tests
* Use it to get constant arguments to @Produces annotations
* Note that text/html is xss-vulnerable (I have no idea how it ever came to expect exactly text/plain)
2021-06-30 12:04:21 +01:00
Chris Smowton
52471b292a
Add change note
2021-06-30 12:04:21 +01:00
Chris Smowton
856046ce50
Jax-RS: implement content-type tracking
...
This follows content-type specifications across Variant-related functions and the ResponseBuilder class in order to sanitize or sink entities as appropriate.
2021-06-30 12:04:21 +01:00
Chris Smowton
10714211c6
Add utility functions definining XSS-vulnerable content-types
2021-06-30 12:04:21 +01:00
Chris Smowton
450eebcd40
JaxWS: Pull out MediaType constant interpretation routine
...
Also extend the routine slightly to expose multiple content types given with array notation
2021-06-30 12:04:20 +01:00
Chris Smowton
3e7ea34054
XSS: expose extension point for defining barrier sinks
2021-06-30 12:04:20 +01:00
thank_you
0be2c6b765
Add SQLEscapySanitizerCall class
2021-06-29 19:39:46 -04:00
thank_you
986f2f4302
Add SQLEscape module
2021-06-29 19:39:26 -04:00
${sleep,5}
2a65917bb5
Merge pull request #1 from RasmusWL/python-use-sqlalchemy
...
Minor updates to SQL alchemy PR
2021-06-29 18:15:44 -04:00
jorgectf
e02a63a27a
Delete trivial *_good.py tests
2021-06-29 23:03:41 +02:00
jorgectf
621a810b7b
Update .expected
2021-06-29 16:53:53 +02:00
jorgectf
9a8d1f8e0f
Take back non-trivial tests
2021-06-29 16:53:44 +02:00
jorgectf
0819090fcb
Fix qldocs typo
2021-06-29 16:53:32 +02:00
jorgectf
2f9e6454a5
Hardcode ldap2 binding functions
2021-06-29 16:14:55 +02:00
Alex Ford
3f76075fe6
improve some rails framework tests
2021-06-29 13:56:28 +01:00
Alex Ford
31cbf818ab
fix rb/sql-injection FPs due to not accounting for overridden ActiveRecord methods
2021-06-29 13:54:15 +01:00
Nick Rolfe
97ae9ed181
Add more qldoc comments from Python version
...
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com >
2021-06-29 11:22:47 +01:00
Rasmus Wriedt Larsen
a5a7f3e38a
Python: Add taint-step for sqlalchemy.text
2021-06-29 11:06:25 +02:00
Rasmus Wriedt Larsen
ef48734206
Python: Add taint-tests for SQLAlchemy
2021-06-29 11:03:40 +02:00
Rasmus Wriedt Larsen
cb112395f8
Python: Fixup after merging main
2021-06-29 11:02:43 +02:00
Rasmus Wriedt Larsen
684f51ae5f
Merge branch 'main' into python-use-sqlalchemy
2021-06-29 10:58:51 +02:00
Rasmus Wriedt Larsen
eac1c5d109
Python: Fix concepts-tests for SQLAlchemy
2021-06-29 10:58:28 +02:00
Tom Hvitved
20f239fd0a
Improve performance of seqChild/4
...
Gets rid of the following bad join-order
```
[2021-06-29 09:40:44] (5s) Starting to evaluate predicate RegExpTreeView::seqChild#fffff#reorder_0_1_2_4_3/5@i2#fe59dz (iteration 2)
[2021-06-29 09:46:34] (354s) Tuple counts for RegExpTreeView::seqChild#fffff#reorder_0_1_2_4_3/5@i2#fe59dz:
222277 ~0% {5} r1 = SCAN RegExpTreeView::RegExpTerm#ffff#prev_delta OUTPUT In.1 're', In.2 'start', In.3, 0, In.0 'result'
207749 ~3% {4} r2 = JOIN r1 WITH ParseRegExp::RegExp::item_dispred#fff ON FIRST 3 OUTPUT Lhs.0 're', Lhs.1 'start', 0, Lhs.4 'result'
11636 ~2% {5} r3 = JOIN r2 WITH ParseRegExp::RegExp::sequence_dispred#fff ON FIRST 2 OUTPUT 0, Lhs.3 'result', Lhs.0 're', Lhs.1 'start', Rhs.2 'end'
222277 ~0% {4} r4 = SCAN RegExpTreeView::RegExpTerm#ffff#prev_delta OUTPUT In.1 're', In.2 'start', In.3, In.0 'result'
207749 ~0% {3} r5 = JOIN r4 WITH ParseRegExp::RegExp::item_dispred#fff ON FIRST 3 OUTPUT Lhs.1, Lhs.3 'result', Lhs.0 're'
902017671 ~2% {3} r6 = JOIN r5 WITH RegExpTreeView::RegExpTerm#ffff#reorder_3_0_1_2#prev ON FIRST 1 OUTPUT Lhs.2 're', Lhs.1 'result', Rhs.1
1193975963 ~2% {5} r7 = JOIN r6 WITH ParseRegExp::RegExp::sequence_dispred#fff ON FIRST 1 OUTPUT Lhs.0 're', Rhs.1, Rhs.2 'end', Lhs.2, Lhs.1 'result'
0 ~0% {6} r8 = JOIN r7 WITH RegExpTreeView::seqChild#fffff#reorder_0_1_2_4_3#prev ON FIRST 4 OUTPUT Lhs.4 'result', Lhs.0 're', Lhs.1 'start', Lhs.2 'end', Rhs.4 're', (1 + Rhs.4 're')
0 ~0% {6} r9 = SELECT r8 ON In.5 'i' > 0
0 ~0% {5} r10 = SCAN r9 OUTPUT In.5 'i', In.0 'result', In.1 're', In.2 'start', In.3 'end'
11636 ~2% {5} r11 = r3 UNION r10
222277 ~3% {2} r12 = SCAN RegExpTreeView::RegExpTerm#ffff#prev_delta OUTPUT In.3, In.0 'result'
961948702 ~4% {5} r13 = JOIN r12 WITH RegExpTreeView::RegExpTerm#ffff#reorder_2_1_0_3#prev ON FIRST 1 OUTPUT Rhs.1 're', Lhs.0, Rhs.3, Lhs.1, Rhs.2 'result'
902017671 ~0% {3} r14 = JOIN r13 WITH ParseRegExp::RegExp::item_dispred#fff ON FIRST 3 OUTPUT Lhs.0 're', Lhs.3, Lhs.4 'result'
1193975963 ~2% {5} r15 = JOIN r14 WITH ParseRegExp::RegExp::sequence_dispred#fff ON FIRST 1 OUTPUT Lhs.0 're', Rhs.1, Rhs.2 'end', Lhs.1, Lhs.2 'result'
0 ~0% {6} r16 = JOIN r15 WITH RegExpTreeView::seqChild#fffff#reorder_0_1_2_4_3#prev ON FIRST 4 OUTPUT Lhs.4 'result', Lhs.0 're', Lhs.1 'start', Lhs.2 'end', Rhs.4 're', (1 + Rhs.4 're')
0 ~0% {6} r17 = SELECT r16 ON In.5 'i' > 0
0 ~0% {5} r18 = SCAN r17 OUTPUT In.5 'i', In.0 'result', In.1 're', In.2 'start', In.3 'end'
0 ~0% {5} r19 = SCAN RegExpTreeView::seqChild#fffff#reorder_0_1_2_4_3#prev_delta OUTPUT In.0 're', In.1 'start', In.2 'end', In.4, In.3
0 ~0% {6} r20 = JOIN r19 WITH ParseRegExp::RegExp::sequence_dispred#fff ON FIRST 3 OUTPUT Lhs.0 're', Lhs.1 'start', Lhs.2 'end', Lhs.3, Lhs.4, (1 + Lhs.3)
0 ~0% {6} r21 = SELECT r20 ON In.5 'i' > 0
0 ~0% {5} r22 = SCAN r21 OUTPUT In.4, In.0 're', In.1 'start', In.2 'end', In.5 'i'
0 ~0% {5} r23 = JOIN r22 WITH RegExpTreeView::RegExpTerm#ffff#prev ON FIRST 1 OUTPUT Rhs.3, Lhs.1 're', Lhs.2 'start', Lhs.3 'end', Lhs.4 'i'
0 ~0% {7} r24 = JOIN r23 WITH RegExpTreeView::RegExpTerm#ffff#reorder_2_1_0_3#prev ON FIRST 2 OUTPUT Lhs.1 're', Lhs.0, Rhs.3, Lhs.2 'start', Lhs.3 'end', Lhs.4 'i', Rhs.2 'result'
0 ~0% {5} r25 = JOIN r24 WITH ParseRegExp::RegExp::item_dispred#fff ON FIRST 3 OUTPUT Lhs.5 'i', Lhs.6 'result', Lhs.0 're', Lhs.3 'start', Lhs.4 'end'
0 ~0% {5} r26 = r18 UNION r25
11636 ~2% {5} r27 = r11 UNION r26
11636 ~2% {5} r28 = r27 AND NOT RegExpTreeView::seqChild#fffff#reorder_0_1_2_4_3#prev(Lhs.2 're', Lhs.3 'start', Lhs.4 'end', Lhs.1 'result', Lhs.0 'i')
11636 ~0% {5} r29 = SCAN r28 OUTPUT In.2 're', In.3 'start', In.4 'end', In.1 'result', In.0 'i'
return r29
```
2021-06-29 09:57:23 +02:00
jorgectf
51395d155f
Move xmltodict to its own file under frameworks/
2021-06-28 21:08:43 +02:00
Jorge
350440897c
Apply suggestions from code review
...
Update `xmltodict` format and delete `ujson` modeling.
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-06-28 21:02:40 +02:00
jorgectf
68c683189a
Polish documentation, mongoCollectionMethod() and update .expected
2021-06-28 20:55:49 +02:00
jorgectf
3fd1129895
Delete trivial tests
2021-06-28 20:18:31 +02:00
jorgectf
0ca4f240d9
Merge tests and update .expected
2021-06-28 20:13:53 +02:00
Ryan Parman
0d7e4d5854
Update getting-started-with-the-codeql-cli.rst
...
1. The documentation is at least one full macOS release behind, and we're past WWDC so we already know what the next version is. IMO, we should optimize the documentation for the now + future, rather than providing exceptions for them while favoring legacy releases. _Current_ macOS requires the steps that are currently hidden by default; I would recommend inverting the pattern so that _current_ is shown by default, and legacy releases are hidden away.
1. Homebrew is the bread and butter of many developers. Installing Python via Homebrew installs a custom version of `xattr` that is different from the system's `xattr`, which doesn't support the `-c` flag. By specifically executing the system-provided version of `xattr` by path, you are more-or-less guaranteed to get the system-provided `xattr` with the expected `-c` flag.
2021-06-28 10:20:00 -06:00
Jorge
a5009efb4b
Merge pull request #5 from RasmusWL/nosql-fixes
...
Small NoSQL fixes
2021-06-28 14:23:57 +02:00
jorgectf
1d432af498
Update .expected
2021-06-28 14:18:27 +02:00
jorgectf
1d4d8ab6e0
Fix tests
2021-06-28 14:16:52 +02:00
jorgectf
b9422518b3
Rephrase .qhelp
2021-06-28 14:00:00 +02:00
Rasmus Wriedt Larsen
318694ccc8
Python: Don't rely on d = d.getOutput() for Decoding
...
Although it is for `json.loads` and the like.
2021-06-28 13:17:45 +02:00
Rasmus Wriedt Larsen
59711424bd
Python: Fix qhelp for NoSQL injection
2021-06-28 11:48:28 +02:00
Rasmus Wriedt Larsen
5477b2e0d5
Python: Minor refactoring cleanup
2021-06-28 10:54:21 +02:00
Rasmus Wriedt Larsen
4a2c99a021
Python: Inline LDAPImproperAuth.qll
...
Since having it inlined makes the query a bit easier to read. We
obviously need to share it if we want to share this predicate, but for
now that does not seem to be the case.
2021-06-28 10:54:21 +02:00
Rasmus Wriedt Larsen
b33f6a315c
Python: Fix select for py/improper-ldap-auth
2021-06-28 10:54:21 +02:00
Rasmus Wriedt Larsen
dfe16aae4c
Python: Handle both positional and keyword args for LDAP bind
2021-06-28 10:46:13 +02:00
ihsinme
6e7644f529
Update FindIncorrectlyUsedExceptions.ql
2021-06-27 22:27:41 +03:00
Rasmus Wriedt Larsen
97571e0b4f
Python: Add modeling of peewee
2021-06-25 17:50:59 +02:00
Rasmus Wriedt Larsen
1317ae298c
Python: Rename cursor => Cursor in PEP249
...
Notice that since this will be part of the same PR as 5cfc433 , it is OK
to do this change without keeping `PEP249::cursor` for backwards
compatibility.
2021-06-25 17:30:35 +02:00
Rasmus Wriedt Larsen
d8db83d081
Python: Add cursor::instance for PEP249
...
For Peewee modeling I want to be able to define new cursor instances
just like I can do for connections.
2021-06-25 17:29:32 +02:00
Rasmus Wriedt Larsen
6be0db2c22
Python: Improve QLDoc of PEP249 modeling
2021-06-25 17:24:28 +02:00
Rasmus Wriedt Larsen
5cfc43395b
Python: Refactor PEP249 to encapsulate in module
...
So global namespace doesn't contain `Connection` whenever `PEP249.qll`
is imported
2021-06-25 17:15:12 +02:00
Rasmus Wriedt Larsen
c476c89de5
Python: Add tests for peewee
2021-06-25 16:08:57 +02:00
Nick Rolfe
ba7021086b
Merge remote-tracking branch 'origin/main' into regex
2021-06-25 15:00:26 +01:00
Timo Müller
d1a4f57342
Added chapter about generating qhelp files locally
2021-06-25 15:48:27 +02:00
Nick Rolfe
bee94757dd
Add query test for ReDoS.ql, ported from JS
2021-06-25 12:51:35 +01:00
Nick Rolfe
6142029fdc
Recognise \t as not escaping t
2021-06-25 12:46:25 +01:00
Nick Rolfe
a77e7761fd
Make \h and \H character class escapes
2021-06-25 12:27:39 +01:00
Nick Rolfe
a5dff79e51
Fix locations of regexp nodes in AST viewer
2021-06-25 12:00:38 +01:00
Arthur Baars
fa5e7cb9cc
Merge pull request #223 from github/aibaars/mkdir-p
...
Create parent folders when copying qhelp and sample files
2021-06-25 11:29:27 +02:00
Alex Ford
5179e3e5d6
Merge pull request #209 from github/query-sql-injection
2021-06-25 09:59:50 +01:00
Arthur Baars
efde1f86d9
Fix test case
2021-06-25 10:59:10 +02:00
Arthur Baars
0d77f49f7c
Create parent folders
2021-06-24 22:07:58 +02:00
Alex Ford
2a7d8bbc0a
Apply suggestions from code review
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2021-06-24 19:43:35 +01:00
Arthur Baars
d4666ab099
Merge pull request #222 from github/aibaars/file-filters
...
Add support for LGTM_INDEX_FILTERS environment variable
2021-06-24 20:09:08 +02:00
Arthur Baars
e3b4e0a9a3
Add missing use statement
2021-06-24 20:00:41 +02:00
Arthur Baars
f92989350a
Update autobuilder/src/main.rs
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-06-24 19:50:32 +02:00
Nick Rolfe
9ec503a3a5
Merge remote-tracking branch 'origin/main' into regex
2021-06-24 18:16:13 +01:00
Alex Ford
a45366e426
remove unnecessary ExprNodes prefix
2021-06-24 18:12:26 +01:00
Alex Ford
b27891b14e
update ActiveRecord test output
2021-06-24 18:12:26 +01:00
Alex Ford
1f5a5181b9
StringInterpolationComponentCfgNode extends ExprNodes::StmtSequenceCfgNode
2021-06-24 18:12:26 +01:00
Alex Ford
a4a8f17a54
Update ql/src/codeql_ruby/dataflow/BarrierGuards.qll
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2021-06-24 18:12:26 +01:00
Alex Ford
9883a9b606
update SqlInjection tests
2021-06-24 18:12:26 +01:00
Alex Ford
d62f4f5bd4
Address review comments
2021-06-24 18:12:26 +01:00
Alex Ford
bc5a1b86ff
Fix handling of arrays passed to ActiveRecord SQL methods
2021-06-24 18:12:26 +01:00
Alex Ford
fc8db88b66
Apply suggestions from code review
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2021-06-24 18:12:25 +01:00
Alex Ford
7415503772
update ActiveRecord test output
2021-06-24 18:12:25 +01:00
Alex Ford
12e4c9ee90
update SqlInjection tests
2021-06-24 18:12:25 +01:00
Alex Ford
734fe01867
Support named :conditions parameter to some SQL executing ActiveRecord calls
2021-06-24 18:12:25 +01:00
Alex Ford
91bde8d85d
Support ActiveRecord SQL executing calls where there is a self receiver (implicit or explicit)
2021-06-24 18:12:25 +01:00
Alex Ford
5386c776b3
Implement rb/sql-injection
2021-06-24 18:12:25 +01:00
Alex Ford
957b29b5af
Add more defaultAdditionalTaintSteps
2021-06-24 18:12:25 +01:00
Alex Ford
6e5665da8c
Make ActiveRecord model flag more potentially dangerous SQL executions
2021-06-24 18:12:25 +01:00
Alex Ford
8761873cd1
Implement two common barrier guards
2021-06-24 18:12:25 +01:00
Alex Ford
98313d0a56
Convenience classes for wrapping some Exprs as ExprCfgNodes
2021-06-24 18:12:25 +01:00
Alex Ford
ad1d8420f3
Make BarrierGuard abstract
2021-06-24 18:12:25 +01:00
Alex Ford
adf32e973a
Create Frameworks.qll to act as a container for all framework models
2021-06-24 18:12:25 +01:00
Nick Rolfe
17a59ef824
Add basic test for regex parsing
2021-06-24 18:06:08 +01:00
Arthur Baars
f69c5dc19b
Merge pull request #221 from github/package-depend-on-compile-queries
...
make the package job depend on compile-queries
2021-06-24 19:03:44 +02:00
Arthur Baars
22990a938d
Add support for LGTM_INDEX_FILTERS environment variable
...
* re-implement autobuilder script in Rust
* add additional --include/--exclude flags based on LGTM_INDEX_FILTERS
environment variable
2021-06-24 18:45:31 +02:00
Nick Rolfe
51b0ffdaf8
Fix printAst to support adding edges in AstDesugar test
2021-06-24 17:14:23 +01:00
Nick Rolfe
f7e89f47fd
Comment out temporarily-unused predicates
2021-06-24 17:06:41 +01:00
Alex Ford
58e9b69ea4
make the package job depend on compile-queries
2021-06-24 16:52:22 +01:00
Nick Rolfe
a6dd2fa0a1
Split ReDoS query into .ql and .qll, and add .qhelp
2021-06-24 16:32:45 +01:00
Arthur Baars
7574d1cad7
Merge pull request #220 from github/aibaars/update-build-yml
...
Update build.yml
2021-06-24 16:38:26 +02:00
Arthur Baars
be1d4c3d2c
Address comment
2021-06-24 16:31:24 +02:00
Arthur Baars
ade36691b6
Remove unnecessary qualifier
2021-06-24 16:13:29 +02:00
Arthur Baars
dfc96de4cc
Update build.yml
2021-06-24 16:09:45 +02:00
Arthur Baars
95399b2d0a
Refactor ApiGraphs.qll
2021-06-24 15:58:02 +02:00
Arthur Baars
4f96834711
Add ConstantAccessCfgNode
2021-06-24 15:57:48 +02:00
Arthur Baars
6bed50a86b
Rename predicate with snake cased name
2021-06-24 11:59:13 +02:00
Arthur Baars
b2be1c3b3d
Update ql/src/codeql_ruby/ApiGraphs.qll
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2021-06-23 20:40:22 +02:00
Geoffrey White
06591956ff
C++: Rename some variables.
2021-06-23 17:54:47 +01:00
Geoffrey White
a2c904d0c0
C++: Clarify the meanings of predicates.
2021-06-23 17:17:50 +01:00
Geoffrey White
eeb84d4209
C++: Add more test cases for the toctou query.
2021-06-23 17:12:53 +01:00
Tom Hvitved
9438885776
Merge pull request #216 from github/hvitved/synthesis-location
...
AST synthesis: Move location information into a separate predicate
2021-06-23 16:50:17 +02:00
Nick Rolfe
c784e37089
Add regexp parser and exponential ReDoS query
2021-06-23 15:29:49 +01:00
Alex Ford
e5f0206c6d
Merge pull request #208 from github/action-controller-1
...
Model accesses to `ActionController` parameters via `params` method
2021-06-23 14:21:55 +01:00
Alex Ford
0238c19085
remove TODO
2021-06-23 14:11:38 +01:00
Alex Ford
5941eb2be4
model some ActionController user input sources (params)
2021-06-23 14:11:38 +01:00
Alex Ford
9227f3a0c3
Add RemoteFlowSources.qll
2021-06-23 14:11:38 +01:00
Alex Ford
5163514d43
Merge pull request #218 from github/build-yml-debug
...
Fix `compile-queries` job
2021-06-23 14:04:33 +01:00
Alex Ford
8e1f2e6237
try fixing build.yml
2021-06-23 13:41:51 +01:00
Mathias Vorreiter Pedersen
90633b9ce1
C++: Make the new SQL abstract classes extend 'Function' instead. This is more in line with how we model RemoteFlowFunction.
2021-06-23 11:49:51 +02:00
ihsinme
d61fcfc84b
Add files via upload
2021-06-23 10:46:03 +03:00
ihsinme
460fde72ff
Add files via upload
2021-06-23 10:44:27 +03:00
Tom Hvitved
1dde5b8ef9
AST synthesis: Move location information into a separate predicate
2021-06-23 08:46:07 +02:00
Arthur Baars
f18e5030e0
Address comments by @tausbn
2021-06-22 17:25:34 +02:00
Mathias Vorreiter Pedersen
90fe5c5aca
C++: Add change-note.
2021-06-22 17:13:07 +02:00
Mathias Vorreiter Pedersen
2e2673aff6
C++: Delete the experimental SqlPqxxTainted query.
2021-06-22 17:13:07 +02:00
Mathias Vorreiter Pedersen
440793b5ff
C++: Move the example from the experimental CWE-089 query into a test.
2021-06-22 17:13:06 +02:00
Mathias Vorreiter Pedersen
222cd41aa3
C++: Use the new SQL interface in 'Security.qll' and 'SqlTainted.ql'.
2021-06-22 17:13:06 +02:00
Mathias Vorreiter Pedersen
092fbd60d9
C++: Create a new SQL interface.
2021-06-22 17:13:06 +02:00
Alex Ford
dbf1805c8b
Merge pull request #196 from github/active-record-1
...
Start modelling some potential SQL fragment sinks in ActiveRecord
2021-06-22 16:05:26 +01:00
Arthur Baars
bedd790d33
Merge pull request #217 from github/aibaars-patch-2
...
Remove ad-hoc entries from query suite
2021-06-22 15:48:22 +02:00
Arthur Baars
f7eee915da
Remove ad-hoc queries
2021-06-22 15:35:30 +02:00
Erik Krogh Kristensen
23e3062c3b
add toUnicode as a build-in
2021-06-22 12:07:47 +00:00
Erik Krogh Kristensen
b385dfd5a8
QL: add toUnicode as a build-in
2021-06-22 12:07:47 +00:00
Arthur Baars
cdfe74959f
Remove methodName field
2021-06-22 10:32:44 +02:00
Arthur Baars
7c3c1db462
Use ApiGraphs in WeakFilePermissions query
2021-06-22 10:25:56 +02:00
Arthur Baars
65d9327951
Add CallNode class
2021-06-22 10:25:56 +02:00
ihsinme
94bd2a32f9
Update FindIncorrectlyUsedSwitch.qhelp
2021-06-22 10:39:37 +03:00
Arthur Baars
57d8ba649f
Use flowsTo
2021-06-21 19:37:41 +02:00
Arthur Baars
d2e2901128
First version of ApiGraphs
2021-06-21 19:37:41 +02:00
Arthur Baars
f0c83288a7
Add test case for ApiGraph
2021-06-21 19:37:41 +02:00
Arthur Baars
4fa093048c
Add inline expectations test framework
2021-06-21 19:37:41 +02:00
Arthur Baars
33c5312842
Merge pull request #215 from github/bump-codeql
...
Bump `codeql` submodule
2021-06-21 16:18:04 +02:00
Tom Hvitved
992d8faa06
Bump codeql submodule
2021-06-21 16:06:45 +02:00
Tom Hvitved
abe5e3d953
Merge pull request #210 from github/hvitved/dataflow/consistency
...
Data flow: Add consistency queries
2021-06-21 14:42:55 +02:00
Nick Rolfe
35eb4a3af4
Merge pull request #214 from github/regexp_naming
...
Use RegExp prefix instead of Regex, for consistency with other languages.
2021-06-21 11:06:19 +01:00
Tom Hvitved
b820f3f20d
Merge pull request #212 from github/hvitved/ssa/assigns-pred
...
Add `Ssa::WriteDefinition::assigns/1` predicate
2021-06-21 10:46:48 +02:00
jorgectf
b10ade17be
Update HeaderDeclaration input naming
2021-06-20 00:13:59 +02:00
Taus
e79ded9046
Add exclusions to Module consistency test
2021-06-19 12:41:16 +00:00
Taus
2515fc0ebc
QL: Add exclusions to Module consistency test
2021-06-19 12:41:16 +00:00
Taus
6d1dc24fa7
Autoformat
2021-06-19 12:36:10 +00:00
Taus
7a117caaea
QL: Autoformat
2021-06-19 12:36:10 +00:00
Taus
6bff0f48a2
Remove SuperAccess::getType()
...
This had a bad effect on our call resolution, so I'm reverting it for
now. We may want to diverge from the language specification here.
2021-06-19 12:17:17 +00:00
Taus
2fa4424f71
QL: Remove SuperAccess::getType()
...
This had a bad effect on our call resolution, so I'm reverting it for
now. We may want to diverge from the language specification here.
2021-06-19 12:17:17 +00:00
Taus
b9238ea436
Update printAst test
...
to reflect the renaming of `Aggregate` to `FullAggregate`.
2021-06-19 12:16:42 +00:00
Taus
4c4a2658fe
QL: Update printAst test
...
to reflect the renaming of `Aggregate` to `FullAggregate`.
2021-06-19 12:16:42 +00:00
Taus
e3a4d3074c
Exclude a few more paths from tests
2021-06-19 11:54:50 +00:00
Taus
fb8f549d93
QL: Exclude a few more paths from tests
2021-06-19 11:54:50 +00:00
Taus
815337dde1
Split up Aggregate properly
...
Previously, we had `Aggregate` and `ExprAggregate` as separate classes,
the latter of which representing aggregates that contain only an
expression.
This was a problem for the `rank` aggregate, as it inherited from
`Aggregate`, but _could_ also contain just an expression (even if this
is rather rare).
To fix this, I renamed `Aggregate` to `FullAggregate` (to make the
division clearer), and added a new type `Aggregate` that represents the
union of these two types. Now `Rank` can inherit from the new class
`Aggregate` and everything is dandy.
2021-06-19 11:50:50 +00:00
Taus
76b55c4a5a
QL: Split up Aggregate properly
...
Previously, we had `Aggregate` and `ExprAggregate` as separate classes,
the latter of which representing aggregates that contain only an
expression.
This was a problem for the `rank` aggregate, as it inherited from
`Aggregate`, but _could_ also contain just an expression (even if this
is rather rare).
To fix this, I renamed `Aggregate` to `FullAggregate` (to make the
division clearer), and added a new type `Aggregate` that represents the
union of these two types. Now `Rank` can inherit from the new class
`Aggregate` and everything is dandy.
2021-06-19 11:50:50 +00:00
Taus
1e973f3681
Fix getType for aggregates
...
We were only including the `strict` variant of `count` and not any of
the other ones (spot the mistake!).
Also, `unique` was added as a recognised aggregate name.
2021-06-19 11:47:45 +00:00
Taus
8d17a95265
QL: Fix getType for aggregates
...
We were only including the `strict` variant of `count` and not any of
the other ones (spot the mistake!).
Also, `unique` was added as a recognised aggregate name.
2021-06-19 11:47:45 +00:00
Taus
0ff0aecb22
Add more getType overrides
...
Mainly adds ones for primitive types.
One peculiarity: the language specification states that the type of
`super` is the same as the type of `this`, and _not_ the type of
the superclass on which the method is actually accessed. This seems a
bit strange to me, so I thought I would highlight it specifically.
Also, I'm not entirely sure that the rules around type coercion for
the various binary operators are 100% correct.
2021-06-19 11:40:12 +00:00
Taus
602c9e720e
QL: Add more getType overrides
...
Mainly adds ones for primitive types.
One peculiarity: the language specification states that the type of
`super` is the same as the type of `this`, and _not_ the type of
the superclass on which the method is actually accessed. This seems a
bit strange to me, so I thought I would highlight it specifically.
Also, I'm not entirely sure that the rules around type coercion for
the various binary operators are 100% correct.
2021-06-19 11:40:12 +00:00
jorgectf
058ade4d8e
Merge remote-tracking branch 'upstream/main' into jorgectf/python/jwt-queries
2021-06-18 22:21:38 +02:00
jorgectf
6565680dd6
Finish query
2021-06-18 22:16:39 +02:00
jorgectf
017a778a20
Polish make_response and fix extend argument
2021-06-18 20:21:11 +02:00
Nick Rolfe
65aa97c07c
Use RegExp prefix instead of Regex, for consistency with other languages.
2021-06-18 15:56:19 +01:00
Tom Hvitved
7cc02e6d00
Add Ssa::WriteDefinition::assigns/1 predicate
2021-06-18 10:42:32 +02:00
jorgectf
eac5254a88
Resolve merge conflict
2021-06-18 02:12:49 +02:00
jorgectf
dcb1da338b
Extend documentation
2021-06-18 02:03:56 +02:00
jorgectf
4963caf506
Rewrite frameworks modeling
2021-06-18 02:03:27 +02:00
jorgectf
066504e79e
Checkout Stdlib.qll
2021-06-18 02:02:47 +02:00
jorgectf
1d7ddce8db
Update .expected
2021-06-17 18:10:43 +02:00
Nick Rolfe
78db1bf045
Merge pull request #211 from github/smaller_trap
...
Tweaks to reduce size of TRAP output
2021-06-17 17:09:14 +01:00
jorgectf
9cbb7e0899
Change query objective
2021-06-17 17:53:58 +02:00
jorgectf
5704ac36db
Rework LDAP framework modeling
2021-06-17 17:44:08 +02:00
jorgectf
13cfcec968
Change qhelp explanation
2021-06-17 17:43:34 +02:00
jorgectf
d34d2ed2b1
Add .qlref
2021-06-17 17:42:38 +02:00
Nick Rolfe
ab72b4e9e7
Use hexadecimal encoding for TRAP labels
2021-06-17 16:16:32 +01:00
Nick Rolfe
ed93233917
Remove unnecessary spaces in TRAP output
2021-06-17 16:16:06 +01:00
jorgectf
eb16018446
Update .expected
2021-06-17 15:45:05 +02:00
jorgectf
4e74003cd5
Polish Concepts documentation
2021-06-17 15:44:51 +02:00
jorgectf
7e6032f5b4
Port to Decoding
2021-06-17 15:43:54 +02:00
jorgectf
8e3d5ff3f9
Rename mongoclient tests
2021-06-17 15:43:01 +02:00
jorgectf
b8e619a60c
Extend qhelp references
2021-06-17 15:42:45 +02:00
Alex Ford
7439ab5635
remove recvCls field from ActiveRecordModelClassMethodCall
2021-06-17 14:42:42 +01:00
Alex Ford
214532516b
try to avoid a future merge conflict
2021-06-17 14:41:51 +01:00
Alex Ford
762656ee60
Add QLDoc to ActiveRecord.qll
2021-06-17 14:41:51 +01:00
Alex Ford
12a0af1d28
Tidy up PotentiallyUnsafeSqlExecutingMethodCall characteristic predicate
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-06-17 14:39:40 +01:00
Tony Torralba
1014400a08
Fix test comments
2021-06-17 15:03:45 +02:00
Tony Torralba
3ec2c1308e
Add RequestForgerySanitizer
2021-06-17 14:58:27 +02:00
Tony Torralba
0c71393171
Merge branch 'main' into atorralba/promote-unsafe-android-webview-fetch
2021-06-17 14:54:25 +02:00
Tom Hvitved
41ed9f3e1b
Data flow: Fix inconsistencies
2021-06-17 10:48:32 +02:00
Tom Hvitved
00e544189e
Data flow: Add consistency queries
2021-06-17 10:26:56 +02:00
Tom Hvitved
ad54f2e1f4
Bump codeql submodule
2021-06-17 10:24:19 +02:00
ihsinme
1cabaec0c3
Update cpp/ql/src/experimental/Security/CWE/CWE-561/FindIncorrectlyUsedSwitch.qhelp
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-06-17 11:09:36 +03:00
ihsinme
bf65044a0d
Update test.c
2021-06-17 10:42:25 +03:00
jorgectf
8527ccc6d6
Update .expected
2021-06-16 23:19:14 +02:00
jorgectf
5c7229c715
Optimize Type Tracking stuff
2021-06-16 23:19:05 +02:00
jorgectf
81505fbd76
Normalize tests
2021-06-16 23:18:38 +02:00
Tony Torralba
2dd862661b
Generic type parameters no longer needed in CSV sink models
2021-06-16 16:23:50 +02:00
Tony Torralba
2c8f8911fc
Adatp CSV sink models to generics fix
2021-06-16 16:12:02 +02:00
Tony Torralba
47fffb04a6
Merge branch 'main' into atorralba/promote-ognl-injection
2021-06-16 15:46:33 +02:00
Tony Torralba
91ba30a781
Merge branch 'main' into atorralba/promote-missing-jwt-signature-check
2021-06-16 15:46:14 +02:00
Tony Torralba
dab33b21fb
Merge branch 'main' into atorralba/promote-mvel-injection
2021-06-16 15:44:43 +02:00
Tony Torralba
bf2be6ec7c
Merge branch 'main' into atorralba/promote-jndi-injection
2021-06-16 15:34:37 +02:00
Tony Torralba
66a8f57784
Fix HttpsUrls tests affected by the new URL summary
2021-06-16 13:04:00 +02:00
Tony Torralba
66d49aa4e8
Fix InsecureBasicAuth tests affected by the new URL summary
2021-06-16 13:01:40 +02:00
Tony Torralba
af6bd0b963
Consider subtypes of ReaderSource
2021-06-16 13:01:40 +02:00
Tony Torralba
87dfc92aba
Add tests for CompilationUnit's subtypes
2021-06-16 13:01:40 +02:00
Tony Torralba
e324e4e8d1
Remove non-ascii characters added by accident
2021-06-16 13:01:40 +02:00
Tony Torralba
357b0e1a90
Fix SSRF tests affected by the new URL summary
2021-06-16 13:01:40 +02:00
Tony Torralba
17cce6bd18
Add change note
2021-06-16 13:01:39 +02:00
Tony Torralba
f3ef93fa8a
Make sinks more specific, improve tests
2021-06-16 13:01:39 +02:00
Tony Torralba
f9e6b3c3d2
Add new URL(tainted) as taint step
2021-06-16 13:01:39 +02:00
Tony Torralba
7ff4d368be
Fix tests
2021-06-16 13:01:39 +02:00
Tony Torralba
6f926e1e80
Refine sinks and add more taint steps
2021-06-16 13:01:39 +02:00
Tony Torralba
5d56eb6ea1
Add stubs
2021-06-16 13:01:39 +02:00
Tony Torralba
4b491dcc50
Add codehaus sink and taint steps
2021-06-16 13:01:39 +02:00
Tony Torralba
7883549c25
Use InlineExpectationsTest
2021-06-16 13:01:39 +02:00
Tony Torralba
7031e0a91d
Refactor to use CSV sink models
2021-06-16 13:01:38 +02:00
Tony Torralba
356601ce15
Moved from experimental
2021-06-16 13:01:38 +02:00
Tom Hvitved
872c7edfc8
Merge pull request #207 from github/bump-codeql
...
Bump `codeql` submodule
2021-06-16 12:33:40 +02:00
Tom Hvitved
84d79ccae9
Bump codeql submodule
2021-06-16 11:55:38 +02:00
jorgectf
5123b8f4e3
Update .expected
2021-06-15 20:29:33 +02:00
jorgectf
e61cf9a58d
Simplify tests
2021-06-15 19:32:02 +02:00
jorgectf
6bed8594f2
Match sanitizer inputs' naming
2021-06-15 16:27:32 +02:00
ihsinme
b118817fb8
Add files via upload
2021-06-15 16:52:39 +03:00
ihsinme
f5008d31f5
Add files via upload
2021-06-15 16:51:38 +03:00
ihsinme
4f2703e0aa
Add files via upload
2021-06-15 16:43:57 +03:00
ihsinme
bdab785bef
Add files via upload
2021-06-15 16:42:38 +03:00
Alex Ford
bf43a77df5
Include some more types of expressions as possible active record SQL sink arguments
2021-06-15 12:41:42 +01:00
Alex Ford
ea21c591af
remove accidentally unbound variable
2021-06-15 11:39:48 +01:00
Alex Ford
c1b9952517
account for chained method calls when constructing ActiveRecord SQL queries
2021-06-15 11:39:48 +01:00
Alex Ford
f8a77b9854
format QL
2021-06-15 11:39:48 +01:00
Alex Ford
57c04266e3
rename SqlExecutingMethodCall as PotentiallyUnsafeSqlExecutingMethodCall
2021-06-15 11:39:48 +01:00
Alex Ford
2d4bb61789
limit SqlExecutingMethodCall to those that are called with a StringlikeLiteral argument
2021-06-15 11:39:48 +01:00
Alex Ford
2c15b60998
add ActiveRecord find_by_sql as an SQL executing method call
2021-06-15 11:39:48 +01:00
Alex Ford
c641d12259
add shell ActiveRecord library tests
2021-06-15 11:39:48 +01:00
Alex Ford
5b7df8578a
cleanup ActiveRecord.qll
2021-06-15 11:39:48 +01:00
Alex Ford
7488d072d8
Model some SQL fragment sinks in ActiveRecord model classes
2021-06-15 11:39:48 +01:00
Alex Ford
743deee9ce
add a class to represent ActiveRecord models
2021-06-15 11:39:48 +01:00
Alex Ford
7d3eaf40ff
add base SqlExecution concepts
2021-06-15 11:39:48 +01:00
Tom Hvitved
3a37e321d5
Merge pull request #205 from github/hvitved/taint-tracking
...
Initial taint-tracking library
2021-06-15 09:30:59 +02:00
Tom Hvitved
5a9521372b
Merge pull request #206 from github/tausbn/fix-identical-files
2021-06-15 07:31:07 +02:00
jorgectf
c948970181
resolve merge conflicts
2021-06-15 01:24:04 +02:00
jorgectf
1662c5d113
resolve merge conflict
2021-06-15 01:22:11 +02:00
Taus
2bbcbb2200
Bump submodule pointer
2021-06-14 19:04:22 +00:00
Tom Hvitved
302b485f4c
Merge pull request #204 from github/hvitved/cfg-nodes-perf
...
Improve performance of `ExprChildMapping::reachesBasicBlock()`
2021-06-14 20:14:17 +02:00
Taus
068b980517
Update identical-files.json
...
As of https://github.com/github/codeql/pull/6063 we have now started using the shared type tracking library in Python as well. 🎉
2021-06-14 19:01:24 +02:00
Tom Hvitved
8aa337ab01
Initial taint-tracking library
2021-06-14 14:19:34 +02:00
Tom Hvitved
b154c936c3
Improve performance of ExprChildMapping::reachesBasicBlock()
...
Since all expressions are now post-order, the logic of `reachesBasicBlock` can
be simplified, and performance can be improved as well.
2021-06-14 11:58:24 +02:00
luchua-bc
6a2c7d54cd
Enhance the query to check more scenarios
2021-06-14 03:24:16 +00:00
Arthur Baars
88fb3c7097
Merge pull request #203 from github/aibaars/pack-qhelp-samples
...
Query pack: include .rb and .erb sample files from queries directory
2021-06-11 13:50:17 +02:00
Arthur Baars
909e6d5a62
Query pack: include .rb and .erb sample files from queries directory
...
These are required by the qhelp files.
2021-06-11 13:42:43 +02:00
Arthur Baars
78a6ed43c3
Merge pull request #202 from github/aibaars-patch-2
...
HardCodedCredentials: fix query metadata comment
2021-06-11 12:05:44 +02:00
Arthur Baars
661d6e8e38
HardCodedCredentials: fix query metadata comment
2021-06-11 11:59:46 +02:00
Tom Hvitved
8860b8adf0
Merge pull request #198 from github/hvitved/desugar-compound-assignment
2021-06-10 19:39:54 +02:00
Alex Ford
f74dff560b
Merge pull request #187 from github/hardcoded-credentials
...
Add rb/hardcoded-credentials query
2021-06-10 16:12:32 +01:00
Alex Ford
8839d4c584
limit additional flow steps in rb/hardcoded-credentials to string concatenation
2021-06-10 14:59:28 +01:00
Alex Ford
fe45dadd55
set precision to high for rb/hardcoded-credentials
2021-06-10 14:52:26 +01:00
Alex Ford
e26afe91b5
move rb/hardcoded-credential alert location to the source
2021-06-07 14:53:04 +01:00
Alex Ford
5d79a8cec0
account for keyword args in rb/hardcoded-credentials and simplify query
2021-06-07 14:49:49 +01:00
Tom Hvitved
962768e7c0
Disambiguate toStrings for nested synthetic local variables
2021-06-04 19:20:11 +02:00
Tom Hvitved
82fbc03889
Merge pull request #200 from github/hvitved/dataflow/call-sensitivity
...
Data flow: Call-sensitive resolution of lambda/block calls
2021-06-04 16:25:13 +02:00
Alex Ford
ec326bfcb7
Merge pull request #201 from github/perm-file-report-source
...
Report rb/weak-file-permission alerts at source rather than sink and improve alert message
2021-06-04 14:52:48 +01:00
Alex Ford
8a3ffb6dca
add missing toString
2021-06-04 13:25:03 +01:00
Alex Ford
b2d36babc4
report rb/weak-file-permission alerts at source rather than sink and improve alert message
2021-06-04 13:10:18 +01:00
Nick Rolfe
523a0b1f12
Merge pull request #197 from github/upgrade-pack
2021-06-04 13:03:39 +01:00
Nick Rolfe
6203c9019a
Remove reference to deleted upgrades qlpack from manifest
2021-06-04 12:15:36 +01:00
Tom Hvitved
61e35ddae1
Data flow: Call-sensitive resolution of lambda/block calls
2021-06-04 12:58:38 +02:00
Tom Hvitved
77146e4e04
Data flow: Reduce caching
...
These predicates are now cached in the shared implementation.
2021-06-04 12:53:47 +02:00
Tom Hvitved
f9eecfb59f
Bump codeql submodule
2021-06-04 12:52:05 +02:00
Tom Hvitved
6678ac0347
Desugar compound assignments
2021-06-04 10:39:06 +02:00
Tom Hvitved
da9adfbab4
Improve performance of desugaring transformations
2021-06-04 10:34:00 +02:00
Tom Hvitved
57eee0368d
Add CFG tests for compound assignments
2021-06-04 10:34:00 +02:00
Tom Hvitved
dfcf4c90ab
Merge pull request #199 from github/hvitved/splat-expr
...
Rename `(Hash)SplatArgument` to `(Hash)SplatExpr` and make them `UnaryOperation`s
2021-06-04 10:33:42 +02:00
Tom Hvitved
1007f2aaff
Rename (Hash)SplatArgument to (Hash)SplatExpr and make them UnaryOperations
2021-06-04 10:04:06 +02:00
Tom Hvitved
372f8645a9
Add (hash)splat AST tests
2021-06-04 09:53:14 +02:00
Tony Torralba
58aa25ddc2
Fix QLDocs
2021-06-04 09:32:00 +02:00
Nick Rolfe
8b987757c6
Merge upgrades qlpack into ql/src
2021-06-03 18:28:20 +01:00
Tom Hvitved
2094aa983a
Merge pull request #194 from github/hvitved/desugar-child
2021-06-03 18:07:33 +02:00
Arthur Baars
03ef1261d3
Merge pull request #192 from github/aibaars/release-workflow
...
Build workflow: create release
2021-06-03 16:52:50 +02:00
Tom Hvitved
908e9ff3b5
Include desugared node in AstDesugar.ql
2021-06-03 14:46:32 +02:00
Tony Torralba
34a8383c1a
Unused import
2021-06-03 10:22:53 +02:00
Tony Torralba
9cb0e3371c
Bidirectional import in ExternalFlow.qll
2021-06-03 10:22:42 +02:00
Tony Torralba
56d6fc951c
Fixed some QLDoc
2021-06-03 10:22:15 +02:00
Tony Torralba
ae0a00e30a
Added change note
2021-06-03 10:21:59 +02:00
Tony Torralba
d476459727
Use InlineExpectationsTest
2021-06-02 12:15:26 +02:00
Tony Torralba
b30c92e69e
Refactored into MvelInjection.qll using CSV models
2021-06-02 11:33:01 +02:00
Taus
bc2932383b
Merge pull request #35 from github/downstream-latest-generator
2021-06-02 10:07:09 +02:00
Taus
08dd9477c2
QL: Merge pull request #35 from github/downstream-latest-generator
2021-06-02 10:07:09 +02:00
Tony Torralba
59e6e1ffac
Moved from experimental
2021-06-02 09:58:30 +02:00
Taus
35dccb5f3d
Update to latest generator
...
Includes better QLDoc generation and better escaping in the generated
files (the latter has changed the dbscheme, so rebuilding databases will
be required).
2021-06-01 16:43:11 +00:00
Taus
75a959389c
QL: Update to latest generator
...
Includes better QLDoc generation and better escaping in the generated
files (the latter has changed the dbscheme, so rebuilding databases will
be required).
2021-06-01 16:43:11 +00:00
Taus
c2ecad7ddb
Merge pull request #34 from github/dbscheme-and-qlpack-support
...
Add support for dbscheme and qlpack.yml
2021-06-01 18:23:36 +02:00
Taus
22e4606358
QL: Merge pull request #34 from github/dbscheme-and-qlpack-support
...
Add support for dbscheme and qlpack.yml
2021-06-01 18:23:36 +02:00
Arthur Baars
63475dc692
Merge pull request #195 from github/escape_field_name
...
Escape field names with table storage
2021-06-01 14:55:46 +02:00
Nick Rolfe
1388d82f1d
Escape field names with table storage
2021-06-01 13:32:13 +01:00
Nick Rolfe
9c199b6c2a
Merge pull request #193 from github/tausbn/autogenerate-qldoc
...
Autogenerate QLDoc for `TreeSitter.qll`
2021-06-01 13:31:32 +01:00
Tom Hvitved
5bafc0c708
Merge pull request #183 from github/hvitved/assign-op-desugar
...
Desugar setter assignments
2021-06-01 14:00:04 +02:00
Alex Ford
f27dd45e4c
run formatter
2021-06-01 12:29:45 +01:00
Alex Ford
907bb9b556
add a comment
2021-06-01 12:22:04 +01:00
Alex Ford
1f931d6f76
rb/hardcoded-credentials: fix bad bracketing
2021-06-01 12:22:04 +01:00
Alex Ford
fdd4f7f616
attempt to use typetracker in rb/hardcoded-credentials
2021-06-01 12:22:04 +01:00
Alex Ford
c530ba5b11
format ql
2021-06-01 12:22:04 +01:00
Alex Ford
f1303e0ced
remove WIP files
2021-06-01 12:22:04 +01:00
Alex Ford
10175e1398
remove WIP files
2021-06-01 12:22:04 +01:00
Alex Ford
4fdd072603
WIP: HardcodedCredentials query
2021-06-01 12:22:04 +01:00
Taus
53b7492aa3
Generate QLDoc for getChild
2021-06-01 10:57:39 +00:00
Taus
6cf7a12c8c
Undo field name escaping
2021-06-01 10:56:45 +00:00
Taus
d38520dc73
Escape field names correctly
...
This should make `field('unique', $.whatever)` valid again.
2021-05-31 20:56:29 +00:00
Taus
64090b086c
Autogenerate QLDoc for TreeSitter.qll
...
It's not quite perfect, as there's still some QLDoc missing on the
various `getChild` methods, but it wasn't immediately clear to me how
to get this working (especially since the QLDoc would ideally be
different depending on whether there was a child index or not).
Then again, `getChild` probably has a pretty intuitive meaning...
2021-05-31 20:54:10 +00:00
Tom Hvitved
3ffef634d7
More synthesis refactoring
...
- Join `TElementReferenceSynth` and `TMethodCallSynth`.
- Move arity and setter information into `MethodCallKind`.
- Add `Synthesis::methodCall` for specifying which method calls need synthesis.
2021-05-31 16:29:41 +02:00
Taus
9abe340a1f
Fix getQLDoc compilation error
2021-05-31 08:55:27 +00:00
Taus
cbd0caa4ab
QL: Fix getQLDoc compilation error
2021-05-31 08:55:27 +00:00
Taus
3cdc6a18ae
Merge branch 'main' into dbscheme-and-qlpack-support
2021-05-31 10:50:39 +02:00
Taus
ada77a3c8b
QL: Merge branch 'main' into dbscheme-and-qlpack-support
2021-05-31 10:50:39 +02:00
Taus
6b2c96615f
Merge pull request #30 from github/qldoc-nodes
...
Add AST nodes for QLDoc
2021-05-31 10:45:15 +02:00
Taus
17ef056579
QL: Merge pull request #30 from github/qldoc-nodes
...
Add AST nodes for QLDoc
2021-05-31 10:45:15 +02:00
Taus
1cbcf40637
Simplify getAMember
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-05-31 10:26:50 +02:00
Taus
855683e980
QL: Simplify getAMember
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-05-31 10:26:50 +02:00
Erik Krogh Kristensen
4bbd06f51f
improve performance of module resolution
2021-05-31 08:06:49 +00:00
Erik Krogh Kristensen
f2f6d34f21
QL: improve performance of module resolution
2021-05-31 08:06:49 +00:00
Erik Krogh Kristensen
b3e23bcc31
improve performance of type resolution
2021-05-31 07:51:11 +00:00
Erik Krogh Kristensen
3ee642868d
QL: improve performance of type resolution
2021-05-31 07:51:11 +00:00
Erik Krogh Kristensen
a286dc349a
improve scope resolution performance
2021-05-31 07:46:51 +00:00
Erik Krogh Kristensen
12627d19fa
QL: improve scope resolution performance
2021-05-31 07:46:51 +00:00
Erik Krogh Kristensen
18b6216f78
more improvements to printAst performance
2021-05-31 07:33:11 +00:00
Erik Krogh Kristensen
7a4e4134da
QL: more improvements to printAst performance
2021-05-31 07:33:11 +00:00
Erik Krogh Kristensen
7d4611941a
fix printAst performance
2021-05-30 21:42:15 +00:00
Erik Krogh Kristensen
5e89bf99a8
QL: fix printAst performance
2021-05-30 21:42:15 +00:00
Erik Krogh Kristensen
a349fdd367
spaces in folder/file names are underscores in import names
2021-05-30 21:36:01 +00:00
Erik Krogh Kristensen
e47c4ff2ad
QL: spaces in folder/file names are underscores in import names
2021-05-30 21:36:01 +00:00
Erik Krogh Kristensen
6c5e33e3d2
use qlpack existence to determine the root for imports
2021-05-30 21:30:11 +00:00
Erik Krogh Kristensen
1aa7cbb918
QL: use qlpack existence to determine the root for imports
2021-05-30 21:30:11 +00:00
Taus
4e8157e3cb
Autoformat
2021-05-30 17:53:38 +00:00
Taus
676bc5ee2a
QL: Autoformat
2021-05-30 17:53:38 +00:00
Taus
eaf6d8123d
Add support for dbscheme and qlpack.yml
...
Currently the the YAML "parser" fails for some legacy files, but the
actual files appear to be parsed correctly.
2021-05-30 17:38:26 +00:00
Taus
2bbf1e37fc
QL: Add support for dbscheme and qlpack.yml
...
Currently the the YAML "parser" fails for some legacy files, but the
actual files appear to be parsed correctly.
2021-05-30 17:38:26 +00:00
Erik Krogh Kristensen
5c80716724
Merge branch 'main' into qldoc-nodes
2021-05-30 15:51:29 +00:00
Erik Krogh Kristensen
01e420fd02
QL: Merge branch 'main' into qldoc-nodes
2021-05-30 15:51:29 +00:00
Erik Krogh Kristensen
33ed98e8b7
Merge pull request #32 from github/jumpToField
...
get jump to field to work
2021-05-29 22:09:44 +02:00
Erik Krogh Kristensen
63c7b21f4b
QL: Merge pull request #32 from github/jumpToField
...
get jump to field to work
2021-05-29 22:09:44 +02:00
Erik Krogh Kristensen
c2c0a96f40
Merge pull request #33 from github/fixes
...
improve callgraph resolution, and other fixes
2021-05-29 22:09:32 +02:00
Erik Krogh Kristensen
35fe816918
QL: Merge pull request #33 from github/fixes
...
improve callgraph resolution, and other fixes
2021-05-29 22:09:32 +02:00
Erik Krogh Kristensen
48170f5ce0
change multipleResolveCall to ignore aliases
2021-05-29 19:30:40 +00:00
Erik Krogh Kristensen
f1aa5ef804
QL: change multipleResolveCall to ignore aliases
2021-05-29 19:30:40 +00:00
Erik Krogh Kristensen
bd86ffb35b
fix the arity of predicate aliases
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
5b1bab0921
QL: fix the arity of predicate aliases
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
8dc3948221
support more types on aggregates
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
7a33225fd0
QL: support more types on aggregates
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
c8d0384907
add callgraph test
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
04ca858e85
QL: add callgraph test
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
068c57acdd
add super calls to the callgraph
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
c78bae69c8
QL: add super calls to the callgraph
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
2d86b13d44
add super nodes
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
aceab25d9b
QL: add super nodes
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
5dcc161f2d
add getEnclosingPredicate utility predicate
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
3d50a4d254
QL: add getEnclosingPredicate utility predicate
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
fb50ba407d
add test for boolean literals in the ast
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
d9aa3bbdfa
QL: add test for boolean literals in the ast
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
8ad05b778d
add support for boolean literals
2021-05-29 19:23:58 +00:00
Erik Krogh Kristensen
1ba51013a4
QL: add support for boolean literals
2021-05-29 19:23:58 +00:00
Taus
4140ce0f10
Fix misparse of -j - 1
2021-05-29 14:17:21 +00:00
Taus
bb418f9614
QL: Fix misparse of -j - 1
2021-05-29 14:17:21 +00:00
Taus
1345fa982a
Merge pull request #31 from github/autogenerate-qldoc
...
Autogenerate QLDoc for `TreeSitter.qll`
2021-05-29 16:08:22 +02:00
Taus
3f2690c3b3
QL: Merge pull request #31 from github/autogenerate-qldoc
...
Autogenerate QLDoc for `TreeSitter.qll`
2021-05-29 16:08:22 +02:00
Taus
18fc76fdb8
Autoformat
2021-05-29 08:09:35 +00:00
Taus
aae4a1e3f9
QL: Autoformat
2021-05-29 08:09:35 +00:00
Taus
0b74535b4a
Fix test output
2021-05-29 08:07:44 +00:00
Taus
1feb35efb7
QL: Fix test output
2021-05-29 08:07:44 +00:00
Taus
5658abd716
Merge branch 'main' into qldoc-nodes
2021-05-29 00:03:09 +02:00
Taus
4e060ce368
QL: Merge branch 'main' into qldoc-nodes
2021-05-29 00:03:09 +02:00
Taus
010bc39465
Fix tests
...
I'm not really a fan of `toString`s that don't indicate the type of the
object, so I added a reference to `getAPrimaryQlClass`. Hopefully this
should result in less noise in the diff.
2021-05-28 22:00:15 +00:00
Taus
23e4281ddb
QL: Fix tests
...
I'm not really a fan of `toString`s that don't indicate the type of the
object, so I added a reference to `getAPrimaryQlClass`. Hopefully this
should result in less noise in the diff.
2021-05-28 22:00:15 +00:00
Erik Krogh Kristensen
7fa3645e5d
get jump to field to work
2021-05-28 23:47:41 +02:00
Erik Krogh Kristensen
3cd7594247
QL: get jump to field to work
2021-05-28 23:47:41 +02:00
Taus
9b0b4df181
Add getAModule and getANewType
...
Also removes `getAQLDocComment`, as those were already dangling off of
their respective successors in the file (and so should not dangle off
of the top level as well).
2021-05-28 21:44:41 +00:00
Taus
109f938968
QL: Add getAModule and getANewType
...
Also removes `getAQLDocComment`, as those were already dangling off of
their respective successors in the file (and so should not dangle off
of the top level as well).
2021-05-28 21:44:41 +00:00
Taus
3280f02d6a
Remove getAMember from getAChild
...
Adds `getAQLDocComment` for accessing those module members that are
simply QLDoc comments (apart from the one that applies to the module
itself, which is still accessed through `getQLDoc`.)
2021-05-28 21:12:02 +00:00
Taus
24230dc205
QL: Remove getAMember from getAChild
...
Adds `getAQLDocComment` for accessing those module members that are
simply QLDoc comments (apart from the one that applies to the module
itself, which is still accessed through `getQLDoc`.)
2021-05-28 21:12:02 +00:00
Taus
3a045ef4e5
Autogenerate QLDoc for TreeSitter.qll
2021-05-28 21:06:51 +00:00
Taus
7d597782b8
QL: Autogenerate QLDoc for TreeSitter.qll
2021-05-28 21:06:51 +00:00
shati-patel
e57f9e9a1b
autoformat
2021-05-28 18:59:41 +01:00
shati-patel
1d4f6e0564
QL: autoformat
2021-05-28 18:59:41 +01:00
shati-patel
e401364fa1
fix space in test
2021-05-28 18:53:45 +01:00
shati-patel
03fcfdd53a
QL: fix space in test
2021-05-28 18:53:45 +01:00
shati-patel
9e6b085e81
Link to hackathon issue from README
2021-05-28 18:38:12 +01:00
shati-patel
33fcfdef3d
QL: Link to hackathon issue from README
2021-05-28 18:38:12 +01:00
shati-patel
dd598f8aa5
Add missing space
2021-05-28 18:36:40 +01:00
shati-patel
5a7f349bfa
QL: Add missing space
2021-05-28 18:36:40 +01:00
Taus
64a53f8ba0
Add AST nodes for QLDoc
2021-05-28 17:11:02 +00:00
Taus
51fbee69c2
QL: Add AST nodes for QLDoc
2021-05-28 17:11:02 +00:00
Shati Patel
764a5d1457
Remove codeql-action placeholder file
...
(Didn't get code scanning set up, so this file doesn't do anything useful)
2021-05-28 18:03:13 +01:00
Shati Patel
64d24c744a
QL: Remove codeql-action placeholder file
...
(Didn't get code scanning set up, so this file doesn't do anything useful)
2021-05-28 18:03:13 +01:00
Erik Krogh Kristensen
333e18a1da
Merge pull request #29 from github/fourth-query
...
add `ql/override-parameter-name`
2021-05-28 18:00:48 +02:00
Erik Krogh Kristensen
2736b0149c
QL: Merge pull request #29 from github/fourth-query
...
add `ql/override-parameter-name`
2021-05-28 18:00:48 +02:00
Erik Krogh Kristensen
fd8fd0b70e
add ql/override-parameter-name
2021-05-28 14:59:44 +00:00
Erik Krogh Kristensen
775a0eebaa
QL: add ql/override-parameter-name
2021-05-28 14:59:44 +00:00
Erik Krogh Kristensen
0c61c9d2b2
adjust qldoc on printAst
2021-05-28 14:35:01 +00:00
Erik Krogh Kristensen
fe6e7a8ed8
QL: adjust qldoc on printAst
2021-05-28 14:35:01 +00:00
mr-sherman
ec48d0ac29
Merge remote-tracking branch 'upstream/main' into service-stack-remote-sink
...
merging from main because it fell way behind.
2021-05-28 10:30:29 -04:00
Tom Hvitved
074ea79b9a
Merge pull request #28 from github/caching
...
Cache some predicates
2021-05-28 15:25:12 +02:00
Tom Hvitved
5dec75abf3
QL: Merge pull request #28 from github/caching
...
Cache some predicates
2021-05-28 15:25:12 +02:00
Tom Hvitved
05d1788c1f
Cache some predicates
2021-05-28 15:20:55 +02:00
Tom Hvitved
ce13360f9b
QL: Cache some predicates
2021-05-28 15:20:55 +02:00
Tom Hvitved
42df07c23a
Merge pull request #27 from github/newtype-call
...
Resolve `newtype` constructor calls
2021-05-28 15:14:52 +02:00
Tom Hvitved
27d0af917a
QL: Merge pull request #27 from github/newtype-call
...
Resolve `newtype` constructor calls
2021-05-28 15:14:52 +02:00
Erik Krogh Kristensen
51230f6ee3
Merge pull request #25 from github/cleanup
...
cleanup
2021-05-28 15:07:16 +02:00
Erik Krogh Kristensen
7e69931455
QL: Merge pull request #25 from github/cleanup
...
cleanup
2021-05-28 15:07:16 +02:00
Tom Hvitved
8d245e6bc2
Resolve newtype constructor calls
2021-05-28 15:06:37 +02:00
Tom Hvitved
22cd2844d3
QL: Resolve newtype constructor calls
2021-05-28 15:06:37 +02:00
Erik Krogh Kristensen
f15ad39181
format
2021-05-28 13:02:01 +00:00
Erik Krogh Kristensen
3515580889
QL: format
2021-05-28 13:02:01 +00:00
Erik Krogh Kristensen
d171ace902
fix
2021-05-28 12:58:02 +00:00
Erik Krogh Kristensen
249d209f45
QL: fix
2021-05-28 12:58:02 +00:00
Erik Krogh Kristensen
c3344d0734
cleanup
2021-05-28 12:50:33 +00:00
Erik Krogh Kristensen
e456098a35
QL: cleanup
2021-05-28 12:50:33 +00:00
Taus
e89ed8a1f9
Reuse defined predicate arity
2021-05-28 12:40:45 +00:00
Taus
e62e72edfd
QL: Reuse defined predicate arity
2021-05-28 12:40:45 +00:00
Taus
fa8efb6ca9
Make getParameter 0-indexed
2021-05-28 12:22:14 +00:00
Taus
45ae088fd8
QL: Make getParameter 0-indexed
2021-05-28 12:22:14 +00:00
Joe Farebrother
3f133a7e84
Merge pull request #26 from github/builtins
...
Built in predicates
2021-05-28 13:01:14 +01:00
Joe Farebrother
236f413e01
QL: Merge pull request #26 from github/builtins
...
Built in predicates
2021-05-28 13:01:14 +01:00
Joe Farebrother
3945dbfa54
Support builtin predicates
2021-05-28 12:57:36 +01:00
Joe Farebrother
87e39c7f23
QL: Support builtin predicates
2021-05-28 12:57:36 +01:00
Tom Hvitved
671628484b
Merge pull request #24 from github/types
...
Resolve calls
2021-05-28 13:50:22 +02:00
Tom Hvitved
28d2daea3f
QL: Merge pull request #24 from github/types
...
Resolve calls
2021-05-28 13:50:22 +02:00
Tom Hvitved
41a2e020bd
Update expected test output
2021-05-28 13:49:31 +02:00
Tom Hvitved
17f6cad0e9
QL: Update expected test output
2021-05-28 13:49:31 +02:00
Tom Hvitved
5112b49b94
Remove compilation warnings
2021-05-28 13:44:31 +02:00
Tom Hvitved
4110810431
QL: Remove compilation warnings
2021-05-28 13:44:31 +02:00
Joe Farebrother
cee5dd0cba
Merge pull request #20 from github/missing-override-query
...
Add Missing Override query
2021-05-28 12:40:17 +01:00
Joe Farebrother
c33e0a5f30
QL: Merge pull request #20 from github/missing-override-query
...
Add Missing Override query
2021-05-28 12:40:17 +01:00
Joe Farebrother
26d0e9df5d
Add Missing Override query
2021-05-28 12:39:59 +01:00
Joe Farebrother
933593223f
QL: Add Missing Override query
2021-05-28 12:39:59 +01:00
Tom Hvitved
5975ee4932
Resolve calls
2021-05-28 13:39:21 +02:00
Tom Hvitved
99a3a09033
QL: Resolve calls
2021-05-28 13:39:21 +02:00
Taus
ac35f348c4
printAst edge labels and a bit of consistency
2021-05-28 11:33:06 +00:00
Taus
f46dab6c84
QL: printAst edge labels and a bit of consistency
2021-05-28 11:33:06 +00:00
Taus
c8de28c0a0
Get rid of getParent overrides
2021-05-28 11:11:33 +00:00
Taus
d65e0a9181
QL: Get rid of getParent overrides
2021-05-28 11:11:33 +00:00
Tom Hvitved
535fd73cc9
Merge pull request #23 from github/as-expr
...
Only generate `AsExpr`s when there is an `as` keyword
2021-05-28 12:16:11 +02:00
Tom Hvitved
752194b19e
QL: Merge pull request #23 from github/as-expr
...
Only generate `AsExpr`s when there is an `as` keyword
2021-05-28 12:16:11 +02:00
Tom Hvitved
cbcc4ead36
Only generate AsExprs when there is an as keyword
2021-05-28 12:12:34 +02:00
Tom Hvitved
bac0e02fae
QL: Only generate AsExprs when there is an as keyword
2021-05-28 12:12:34 +02:00
Erik Krogh Kristensen
2e02e15875
Merge pull request #22 from github/third-query
...
add ql/rexexp-pattern
2021-05-28 12:00:32 +02:00
Erik Krogh Kristensen
f0bb846345
QL: Merge pull request #22 from github/third-query
...
add ql/rexexp-pattern
2021-05-28 12:00:32 +02:00
Erik Krogh Kristensen
9113469d9d
add ql/rexexp-pattern
2021-05-28 09:55:09 +00:00
Erik Krogh Kristensen
de57b2bc9f
QL: add ql/rexexp-pattern
2021-05-28 09:55:09 +00:00
Erik Krogh Kristensen
cc60ddde1c
Merge pull request #18 from github/second-query
...
implement `ql/override-swapped-name`
2021-05-28 11:19:33 +02:00
Erik Krogh Kristensen
a5f5fed695
QL: Merge pull request #18 from github/second-query
...
implement `ql/override-swapped-name`
2021-05-28 11:19:33 +02:00
Erik Krogh Kristensen
2430dbfd04
update expected output
2021-05-28 09:16:54 +00:00
Erik Krogh Kristensen
e40d713878
QL: update expected output
2021-05-28 09:16:54 +00:00
shati-patel
d1c6660c32
add codeql to path
2021-05-28 10:16:16 +01:00
shati-patel
96a9c3446f
QL: add codeql to path
2021-05-28 10:16:16 +01:00
Erik Krogh Kristensen
75d77b70cc
implement ql/override-swapped-name
2021-05-28 09:14:57 +00:00
Erik Krogh Kristensen
50f5c83cf2
QL: implement ql/override-swapped-name
2021-05-28 09:14:57 +00:00
Erik Krogh Kristensen
19e33b2e29
bump precision
2021-05-28 09:14:57 +00:00
Erik Krogh Kristensen
d8b6579f59
QL: bump precision
2021-05-28 09:14:57 +00:00
shati-patel
ebcd27e1b3
Placeholder codeql workflow (wip)
2021-05-28 10:14:21 +01:00
shati-patel
da6a915779
QL: Placeholder codeql workflow (wip)
2021-05-28 10:14:21 +01:00
Tom Hvitved
c2c1a9200e
Merge pull request #19 from github/more-variables
...
More variable resolution
2021-05-28 11:12:03 +02:00
Tom Hvitved
fac92ef2d0
QL: Merge pull request #19 from github/more-variables
...
More variable resolution
2021-05-28 11:12:03 +02:00
Tom Hvitved
dc5080c61d
More variable resolution
2021-05-28 11:05:46 +02:00
Tom Hvitved
3e87a05de8
QL: More variable resolution
2021-05-28 11:05:46 +02:00
Tom Hvitved
e5a9bcd786
Merge pull request #15 from github/inheritance
...
Resolve inheritable members (fields and member predicates)
2021-05-28 11:05:28 +02:00
Tom Hvitved
36248cc803
QL: Merge pull request #15 from github/inheritance
...
Resolve inheritable members (fields and member predicates)
2021-05-28 11:05:28 +02:00
Joe Farebrother
0b1d109460
Resolution of inherited members
2021-05-28 11:00:01 +02:00
Joe Farebrother
d4d7c6de64
QL: Resolution of inherited members
2021-05-28 11:00:01 +02:00
Tom Hvitved
6d6c1f343d
Merge pull request #16 from github/var-resolution
...
Variable resolution
2021-05-28 09:51:15 +02:00
Tom Hvitved
3a3f8096e7
QL: Merge pull request #16 from github/var-resolution
...
Variable resolution
2021-05-28 09:51:15 +02:00
Tom Hvitved
b20aa3fb07
Add variables to jump-to-def queries
2021-05-28 09:46:03 +02:00
Tom Hvitved
ef69a46f00
QL: Add variables to jump-to-def queries
2021-05-28 09:46:03 +02:00
Tom Hvitved
f99dc7b266
Variable resolution
2021-05-28 09:34:53 +02:00
Tom Hvitved
43ec1a77cf
QL: Variable resolution
2021-05-28 09:34:53 +02:00
Erik Krogh Kristensen
28f2527f86
Merge pull request #17 from github/first-query
...
Add the `ql/primary-ql-class-consistency` query
2021-05-28 00:31:43 +02:00
Erik Krogh Kristensen
bf98e9636c
QL: Merge pull request #17 from github/first-query
...
Add the `ql/primary-ql-class-consistency` query
2021-05-28 00:31:43 +02:00
Erik Krogh Kristensen
391c8150f5
make the test pass an auto-format check
2021-05-27 22:26:14 +00:00
Erik Krogh Kristensen
6f7cbf7194
QL: make the test pass an auto-format check
2021-05-27 22:26:14 +00:00
Erik Krogh Kristensen
d59f0df23f
space
2021-05-27 22:21:14 +00:00
Erik Krogh Kristensen
09463f4e72
QL: space
2021-05-27 22:21:14 +00:00
Erik Krogh Kristensen
16cf439f6b
run the query on our on code, and fix an error
2021-05-27 22:21:09 +00:00
Erik Krogh Kristensen
cb991fbf14
QL: run the query on our on code, and fix an error
2021-05-27 22:21:09 +00:00
Taus
9103e2697f
Add getAChild
...
Joint work with: REDACTED
2021-05-27 22:17:10 +00:00
Taus
77758e5ba6
QL: Add getAChild
...
Joint work with: REDACTED
2021-05-27 22:17:10 +00:00
Erik Krogh Kristensen
497f0cd48b
autoformat
2021-05-27 22:16:57 +00:00
Erik Krogh Kristensen
913cf53617
QL: autoformat
2021-05-27 22:16:57 +00:00
Erik Krogh Kristensen
79c99b0c61
update expected output after the introduction of a TopLevel ast node
2021-05-27 22:13:35 +00:00
Erik Krogh Kristensen
136b046b38
QL: update expected output after the introduction of a TopLevel ast node
2021-05-27 22:13:35 +00:00
Erik Krogh Kristensen
e8cc0ee453
Add the ql/primary-ql-class-consistency query
2021-05-27 22:08:18 +00:00
Erik Krogh Kristensen
d88cc79736
QL: Add the ql/primary-ql-class-consistency query
2021-05-27 22:08:18 +00:00
Tom Hvitved
967553d582
Merge pull request #14 from github/predicate-expr-resolution
...
Resolve predicate expressions
2021-05-27 20:39:39 +02:00
Tom Hvitved
4f410f53b8
QL: Merge pull request #14 from github/predicate-expr-resolution
...
Resolve predicate expressions
2021-05-27 20:39:39 +02:00
Tom Hvitved
8c59edefb2
Restrict resolvePredicateExpr to ClasslessPredicates
2021-05-27 20:28:46 +02:00
Tom Hvitved
0eabd4fcd9
QL: Restrict resolvePredicateExpr to ClasslessPredicates
2021-05-27 20:28:46 +02:00
Tom Hvitved
f713d8b13e
Resolve predicate expressions
2021-05-27 20:26:19 +02:00
Tom Hvitved
2f74e3e765
QL: Resolve predicate expressions
2021-05-27 20:26:19 +02:00
Taus
e01fe66519
Add missing parents for ModuleExpr
2021-05-27 17:28:00 +00:00
Taus
93fa56fe79
QL: Add missing parents for ModuleExpr
2021-05-27 17:28:00 +00:00
Taus
c8cb81d1f9
missed a spot...
2021-05-27 17:20:01 +00:00
Taus
cdac3f9726
QL: missed a spot...
2021-05-27 17:20:01 +00:00
Taus
44c8e78873
super and aggregates containing expressions
2021-05-27 17:19:35 +00:00
Taus
dc11ec418b
QL: super and aggregates containing expressions
2021-05-27 17:19:35 +00:00
shati-patel
1e9d8d0ca1
A bit more documentation
2021-05-27 18:07:49 +01:00
shati-patel
05e2ec3f82
QL: A bit more documentation
2021-05-27 18:07:49 +01:00
Taus
a4de52d135
Add unique as known aggregate name to treesitter
2021-05-27 16:48:59 +00:00
Taus
0e38056a3a
QL: Add unique as known aggregate name to treesitter
2021-05-27 16:48:59 +00:00
Taus
2abb79cd57
Orphan fixes for aggregates
2021-05-27 16:48:38 +00:00
Taus
219b123271
QL: Orphan fixes for aggregates
2021-05-27 16:48:38 +00:00
shati-patel
fd3abe42bf
Fix multiplication operator
2021-05-27 16:55:39 +01:00
shati-patel
625b9563bf
QL: Fix multiplication operator
2021-05-27 16:55:39 +01:00
Taus
0337a0dc18
AST: range, in, set, and files
2021-05-27 15:47:46 +00:00
Taus
b9ea00c372
QL: AST: range, in, set, and files
2021-05-27 15:47:46 +00:00
shati-patel
59e85abe9e
Merge branch 'main' of github.com:github/codeql-ql
2021-05-27 15:51:56 +01:00
shati-patel
e36915b0ef
QL: Merge branch 'main' of github.com:github/codeql-ql
2021-05-27 15:51:56 +01:00
shati-patel
da65f75372
Add some more documentation
2021-05-27 15:51:40 +01:00
shati-patel
8ce59ff073
QL: Add some more documentation
2021-05-27 15:51:40 +01:00
Joe Farebrother
c66e7de6a8
Merge pull request #13 from github/type-expr-resolution
...
Type expression resolution
2021-05-27 15:48:20 +01:00
Joe Farebrother
0aa936d2d2
QL: Merge pull request #13 from github/type-expr-resolution
...
Type expression resolution
2021-05-27 15:48:20 +01:00
Joe Farebrother
45e6af2d14
Add jump-to-def support
2021-05-27 15:45:00 +01:00
Joe Farebrother
c6b5130ad5
QL: Add jump-to-def support
2021-05-27 15:45:00 +01:00
Taus
fe631a5eaf
Add AST support for HOPs
2021-05-27 14:37:15 +00:00
Taus
f61471c451
QL: Add AST support for HOPs
2021-05-27 14:37:15 +00:00
Joe Farebrother
16005fa6cf
Support aliases and unions
2021-05-27 15:25:37 +01:00
Joe Farebrother
cb3e971ebc
QL: Support aliases and unions
2021-05-27 15:25:37 +01:00
Joe Farebrother
719ef68aeb
`Merge branch 'main' into type-expr-resolution
2021-05-27 15:12:49 +01:00
Joe Farebrother
3a8e1779d9
QL: `Merge branch 'main' into type-expr-resolution
2021-05-27 15:12:49 +01:00
Taus
2882f6d37c
Link up ModuleExpr with PredicateCall
2021-05-27 14:11:20 +00:00
Taus
69b4d577d5
QL: Link up ModuleExpr with PredicateCall
2021-05-27 14:11:20 +00:00
Joe Farebrother
9580362332
Fixes for resolution and consistency query
2021-05-27 15:05:42 +01:00
Joe Farebrother
5ec1068230
QL: Fixes for resolution and consistency query
2021-05-27 15:05:42 +01:00
Taus
e09a012064
Support class unions
2021-05-27 14:01:21 +00:00
Taus
a1fc6391d7
QL: Support class unions
2021-05-27 14:01:21 +00:00
Joe Farebrother
fc2f9b5ab6
Add type expression resolution
2021-05-27 14:48:26 +01:00
Joe Farebrother
d5bf0cb33f
QL: Add type expression resolution
2021-05-27 14:48:26 +01:00
Taus
97468a3935
Support predicate foo = bar/5;
2021-05-27 13:18:31 +00:00
Taus
158b50f482
QL: Support predicate foo = bar/5;
2021-05-27 13:18:31 +00:00
Taus
359b7d6b39
Add support for class Foo = Bar;
2021-05-27 13:08:30 +00:00
Taus
192ac4cae3
QL: Add support for class Foo = Bar;
2021-05-27 13:08:30 +00:00
Taus
59c4e170a8
Make all calls formulas
2021-05-27 12:57:39 +00:00
Taus
bb50f90a64
QL: Make all calls formulas
2021-05-27 12:57:39 +00:00
Taus
20e72d3304
Add AST node for expression annotations
2021-05-27 12:52:37 +00:00
Taus
59c0c06a8e
QL: Add AST node for expression annotations
2021-05-27 12:52:37 +00:00
Taus
6aa64ba2cc
Fix up NoneCall
...
In some contexts, `none()` is a formula. This means in general we cannot
assume `Call` is an `Expr`, but only know that it's an `AstNode`.
2021-05-27 12:41:22 +00:00
Taus
b79e295c71
QL: Fix up NoneCall
...
In some contexts, `none()` is a formula. This means in general we cannot
assume `Call` is an `Expr`, but only know that it's an `AstNode`.
2021-05-27 12:41:22 +00:00
Taus
a99a6a4721
Add use of parentheses to printAst test
2021-05-27 12:25:29 +00:00
Taus
3211545a63
QL: Add use of parentheses to printAst test
2021-05-27 12:25:29 +00:00
Taus
21e8993c71
Hide parentheses in AST
...
Joint work with erik-krogh
2021-05-27 12:17:40 +00:00
Taus
b4f67c9d5f
QL: Hide parentheses in AST
...
Joint work with erik-krogh
2021-05-27 12:17:40 +00:00
Tom Hvitved
80761ba069
Make jump-to-def queries work for module references
2021-05-27 12:58:52 +02:00
Tom Hvitved
aa23ec0714
QL: Make jump-to-def queries work for module references
2021-05-27 12:58:52 +02:00
shati-patel
65bdb1722c
More QLDoc
2021-05-27 11:52:48 +01:00
shati-patel
b4a03fe3f0
QL: More QLDoc
2021-05-27 11:52:48 +01:00
Tom Hvitved
871f4b1be8
Merge pull request #8 from github/module-resolution
...
Module resolution
2021-05-27 12:45:07 +02:00
Tom Hvitved
e1501dc830
QL: Merge pull request #8 from github/module-resolution
...
Module resolution
2021-05-27 12:45:07 +02:00
Tom Hvitved
ebb1cd3f8f
Module resolution
2021-05-27 12:42:46 +02:00
Tom Hvitved
f3cae6bb25
QL: Module resolution
2021-05-27 12:42:46 +02:00
Taus
0aa7127e47
link up NewType correctly
2021-05-27 10:41:43 +00:00
Taus
b3844cb715
QL: link up NewType correctly
2021-05-27 10:41:43 +00:00
Taus
c89e924b67
regenerate TreeSitter.ql
2021-05-27 10:24:00 +00:00
Taus
5a3da4b9eb
QL: regenerate TreeSitter.ql
2021-05-27 10:24:00 +00:00
Erik Krogh Kristensen
c449e45b72
Merge pull request #11 from github/greenbar
...
Trying to get a green bar
2021-05-27 12:16:43 +02:00
Erik Krogh Kristensen
ae164a6049
QL: Merge pull request #11 from github/greenbar
...
Trying to get a green bar
2021-05-27 12:16:43 +02:00
Erik Krogh Kristensen
1d7f43206e
update the printAst test
2021-05-27 10:13:42 +00:00
Erik Krogh Kristensen
ef83783d11
QL: update the printAst test
2021-05-27 10:13:42 +00:00
Erik Krogh Kristensen
4921b6cf56
switch to having the pretty AST by default in printAst
2021-05-27 10:13:33 +00:00
Erik Krogh Kristensen
58fb239cf0
QL: switch to having the pretty AST by default in printAst
2021-05-27 10:13:33 +00:00
Taus
cdd9978c30
ifs, implications, instanceof
2021-05-27 10:12:41 +00:00
Taus
3ac7fa8369
QL: ifs, implications, instanceof
2021-05-27 10:12:41 +00:00
Erik Krogh Kristensen
be495b28da
add cases to the getParent relation
2021-05-27 10:12:03 +00:00
Erik Krogh Kristensen
3aebdcce7b
QL: add cases to the getParent relation
2021-05-27 10:12:03 +00:00
Erik Krogh Kristensen
79789e28a1
calls and inline casts
2021-05-27 10:04:20 +00:00
Erik Krogh Kristensen
a38d9a3cbf
QL: calls and inline casts
2021-05-27 10:04:20 +00:00
shati-patel
d9a7f10cfe
Add more QLDoc
2021-05-27 10:56:40 +01:00
shati-patel
83a38eebab
QL: Add more QLDoc
2021-05-27 10:56:40 +01:00
Shati Patel
14ee979bbe
Merge pull request #10 from github/more-expressions
...
Add more expressions
2021-05-27 10:44:49 +01:00
Shati Patel
1aecd5738b
QL: Merge pull request #10 from github/more-expressions
...
Add more expressions
2021-05-27 10:44:49 +01:00
shati-patel
8f031cda5f
Add more expressions
2021-05-27 10:41:29 +01:00
shati-patel
fb30a1c893
QL: Add more expressions
2021-05-27 10:41:29 +01:00
Erik Krogh Kristensen
c4c0a63104
use moduleExpr in Type
2021-05-27 09:31:47 +00:00
Erik Krogh Kristensen
01ae97bf22
QL: use moduleExpr in Type
2021-05-27 09:31:47 +00:00
Tom Hvitved
01d4b8a41c
Add module expressions and module aliases
2021-05-27 11:28:37 +02:00
Tom Hvitved
7b64df51ab
QL: Add module expressions and module aliases
2021-05-27 11:28:37 +02:00
Tom Hvitved
509e789510
Merge pull request #9 from github/dataset-measure
...
Update dataset_measure.yml
2021-05-27 10:48:09 +02:00
Tom Hvitved
9f68fdfb61
QL: Merge pull request #9 from github/dataset-measure
...
Update dataset_measure.yml
2021-05-27 10:48:09 +02:00
Tom Hvitved
aaa7973906
Update dataset_measure.yml
2021-05-27 10:39:51 +02:00
Tom Hvitved
ff591a0c57
QL: Update dataset_measure.yml
2021-05-27 10:39:51 +02:00
Erik Krogh Kristensen
48c9e5f3b8
Merge pull request #7 from github/ast
...
AST layer
2021-05-27 10:39:04 +02:00
Erik Krogh Kristensen
d941e7cdb8
QL: Merge pull request #7 from github/ast
...
AST layer
2021-05-27 10:39:04 +02:00
Tom Hvitved
09d0cdbaf8
Add ModuleMember::isPrivate()
2021-05-27 10:27:57 +02:00
Tom Hvitved
197a36daf6
QL: Add ModuleMember::isPrivate()
2021-05-27 10:27:57 +02:00
Erik Krogh Kristensen
ab20f8f74e
add support for aggregates
2021-05-27 08:23:15 +00:00
Erik Krogh Kristensen
b83c19f27b
QL: add support for aggregates
2021-05-27 08:23:15 +00:00
Tom Hvitved
e8841e6482
Simplify getSynthChild
2021-05-27 10:20:31 +02:00
Erik Krogh Kristensen
fec3d745ca
make sure Literal is an Expr
2021-05-27 07:31:44 +00:00
Erik Krogh Kristensen
abec79cb0f
QL: make sure Literal is an Expr
2021-05-27 07:31:44 +00:00
Erik Krogh Kristensen
ee9e1914b0
literals and fixes
2021-05-26 21:35:01 +00:00
Erik Krogh Kristensen
6f5499eefe
QL: literals and fixes
2021-05-26 21:35:01 +00:00
Erik Krogh Kristensen
a692794178
add types
2021-05-26 21:35:01 +00:00
Erik Krogh Kristensen
c075f370c7
QL: add types
2021-05-26 21:35:01 +00:00
Taus
ec98e8a82d
Add convenience methods for aggregates
2021-05-26 21:25:42 +00:00
Taus
9536e591fb
QL: Add convenience methods for aggregates
2021-05-26 21:25:42 +00:00
Taus
4eb836ca9b
AST for quantifiers, negation
2021-05-26 21:06:04 +00:00
Taus
d4782e67fe
QL: AST for quantifiers, negation
2021-05-26 21:06:04 +00:00
Erik Krogh Kristensen
3057790071
ast for imports, modules, and various fixes
2021-05-26 19:39:54 +00:00
Erik Krogh Kristensen
ad7d35df2a
QL: ast for imports, modules, and various fixes
2021-05-26 19:39:54 +00:00
Taus
2addbfabd0
More work on ComparisonFormula
2021-05-26 18:12:06 +00:00
Taus
0ddac5bcee
QL: More work on ComparisonFormula
2021-05-26 18:12:06 +00:00
Taus
eafbd15da0
Merge branch 'main' into ast
2021-05-26 17:38:44 +00:00
Taus
cd15cec629
QL: Merge branch 'main' into ast
2021-05-26 17:38:44 +00:00
Taus
2443ad3314
Add body as a field of charpred
2021-05-26 17:26:15 +00:00
Taus
e554fa8277
QL: Add body as a field of charpred
2021-05-26 17:26:15 +00:00
Tom Hvitved
f8b99291a7
Improve desugaring of setter assignments
2021-05-26 18:41:21 +02:00
Taus
94c1321e43
WIP formulas and expressions
...
Joint work with shati-patel.
2021-05-26 16:21:01 +00:00
Taus
29c32a924f
QL: WIP formulas and expressions
...
Joint work with shati-patel.
2021-05-26 16:21:01 +00:00
Erik Krogh Kristensen
28968163e0
Merge remote-tracking branch 'origin/main' into ast
2021-05-26 15:02:23 +00:00
Erik Krogh Kristensen
20f495dfbf
QL: Merge remote-tracking branch 'origin/main' into ast
2021-05-26 15:02:23 +00:00
Erik Krogh Kristensen
7a4a4e9cdd
implement more AST cases
2021-05-26 15:01:55 +00:00
Erik Krogh Kristensen
a453c32e71
QL: implement more AST cases
2021-05-26 15:01:55 +00:00
Taus
9b8acdb37f
Don't printAst ReservedWords
2021-05-26 14:28:33 +00:00
Taus
88972f04f4
QL: Don't printAst ReservedWords
2021-05-26 14:28:33 +00:00
Erik Krogh Kristensen
8fa3a425a5
slightly more AST stuff
2021-05-26 14:18:25 +00:00
Erik Krogh Kristensen
9a9b6f71c2
QL: slightly more AST stuff
2021-05-26 14:18:25 +00:00
Erik Krogh Kristensen
cb49c1ec24
switch printAst query to use new pretty AST layer
2021-05-26 14:04:23 +00:00
Erik Krogh Kristensen
407a3b5d3d
QL: switch printAst query to use new pretty AST layer
2021-05-26 14:04:23 +00:00
Arthur Baars
af6f050d06
Merge pull request #189 from github/aibaars/fix-lgtm-suite
...
Fix LGTM suites
2021-05-26 16:02:14 +02:00
Arthur Baars
3f210865b2
Build workflow: create release
2021-05-26 15:55:34 +02:00
Erik Krogh Kristensen
a4603a49a1
fix format (again)
2021-05-26 13:53:15 +00:00
Erik Krogh Kristensen
7f2c999b8e
QL: fix format (again)
2021-05-26 13:53:15 +00:00
Erik Krogh Kristensen
00b33acfe9
fix format
2021-05-26 13:50:19 +00:00
Erik Krogh Kristensen
e820a5a1e2
QL: fix format
2021-05-26 13:50:19 +00:00
Erik Krogh Kristensen
344c19f049
extremely minimal AST layer
2021-05-26 13:48:02 +00:00
Erik Krogh Kristensen
e35ab675ba
QL: extremely minimal AST layer
2021-05-26 13:48:02 +00:00
Taus
f2edd7724c
Record annotation names in the AST
2021-05-26 13:14:52 +00:00
Taus
c91a2b88fd
QL: Record annotation names in the AST
2021-05-26 13:14:52 +00:00
Erik Krogh Kristensen
e469ce171d
don't print LineComment (they were disconnected from the root), and a bit of printAst performance
2021-05-26 13:12:44 +00:00
Erik Krogh Kristensen
955f4d4d24
QL: don't print LineComment (they were disconnected from the root), and a bit of printAst performance
2021-05-26 13:12:44 +00:00
shati-patel
80b508aa03
de-ruby some more things
2021-05-26 14:09:09 +01:00
shati-patel
bae0c260d9
QL: de-ruby some more things
2021-05-26 14:09:09 +01:00
Erik Krogh Kristensen
44311e2ace
Merge pull request #5 from github/qltest-testing
...
Get qlTest to work
2021-05-26 14:48:20 +02:00
Erik Krogh Kristensen
54e449f3c6
QL: Merge pull request #5 from github/qltest-testing
...
Get qlTest to work
2021-05-26 14:48:20 +02:00
Erik Krogh Kristensen
f916aa9a37
better printAst test
2021-05-26 12:44:50 +00:00
Erik Krogh Kristensen
9772f35984
QL: better printAst test
2021-05-26 12:44:50 +00:00
Erik Krogh Kristensen
a015b9499a
add test for the printAst query
2021-05-26 12:38:21 +00:00
Erik Krogh Kristensen
5494db9b33
QL: add test for the printAst query
2021-05-26 12:38:21 +00:00
Erik Krogh Kristensen
4ca756ddf9
insert placeholder (that compiles) in localDefinitions.ql
2021-05-26 12:29:12 +00:00
Erik Krogh Kristensen
571b949a06
QL: insert placeholder (that compiles) in localDefinitions.ql
2021-05-26 12:29:12 +00:00
Erik Krogh Kristensen
3addd03c29
insert placeholder (that compiles) in localReferences.ql
2021-05-26 12:29:12 +00:00
Erik Krogh Kristensen
fe6595ec02
QL: insert placeholder (that compiles) in localReferences.ql
2021-05-26 12:29:12 +00:00
Taus
f351100f86
Merge pull request #6 from github/support-expr-annotations
...
Support expression annotations
2021-05-26 14:25:25 +02:00
Taus
36497ad50a
QL: Merge pull request #6 from github/support-expr-annotations
...
Support expression annotations
2021-05-26 14:25:25 +02:00
Taus
0f6d6df745
Support expression annotations
2021-05-26 12:21:19 +00:00
Taus
6f8f0bb749
QL: Support expression annotations
2021-05-26 12:21:19 +00:00
Arthur Baars
ec905e0866
Merge pull request #168 from github/aibaars/typetrack-method
...
Call graph
2021-05-26 14:19:21 +02:00
Tom Hvitved
0c3ce12520
Update ql.qll
2021-05-26 14:00:36 +02:00
Tom Hvitved
8493f515ee
QL: Update ql.qll
2021-05-26 14:00:36 +02:00
Erik Krogh Kristensen
9e5a4b9fbb
get printAst to work
2021-05-26 11:58:14 +00:00
Erik Krogh Kristensen
530df51e8f
QL: get printAst to work
2021-05-26 11:58:14 +00:00
Arthur Baars
4dc182d4a4
Merge pull request #191 from github/fixCap
...
fix snake_casing of camelCased identifiers
2021-05-26 13:39:52 +02:00
shati-patel
041c07463f
another bit of cleanup
2021-05-26 12:38:40 +01:00
shati-patel
1b8f702ec6
QL: another bit of cleanup
2021-05-26 12:38:40 +01:00
Arthur Baars
bacbd5e997
Address comments
2021-05-26 13:35:45 +02:00
Tom Hvitved
419e69b2b5
More cleanup
2021-05-26 13:25:43 +02:00
Tom Hvitved
68e9f9657b
QL: More cleanup
2021-05-26 13:25:43 +02:00
shati-patel
5b830fdcd1
Fix commands on Windows (take 2)
2021-05-26 12:24:54 +01:00
shati-patel
f9f8dfb619
QL: Fix commands on Windows (take 2)
2021-05-26 12:24:54 +01:00
Erik Krogh Kristensen
f04005e4ca
update dbscheme to fix capitalization
2021-05-26 11:23:22 +00:00
Erik Krogh Kristensen
2df49aaae8
QL: update dbscheme to fix capitalization
2021-05-26 11:23:22 +00:00
Erik Krogh Kristensen
ecde34fdf4
Merge pull request #4 from github/fixCap
...
fix snake_casing of generated ql identifiers
2021-05-26 13:18:30 +02:00
Erik Krogh Kristensen
786f756591
QL: Merge pull request #4 from github/fixCap
...
fix snake_casing of generated ql identifiers
2021-05-26 13:18:30 +02:00
Erik Krogh Kristensen
9c1b237e3b
fix snake_casing of camelCased identifiers
2021-05-26 11:16:05 +00:00
shati-patel
d7e53bfdb3
Fix Windows commands
2021-05-26 12:12:36 +01:00
shati-patel
407f63b7d2
QL: Fix Windows commands
2021-05-26 12:12:36 +01:00
Erik Krogh Kristensen
02e1d424b2
fix snake_casing of generated ql identifiers
2021-05-26 11:12:05 +00:00
Erik Krogh Kristensen
b0d86d466f
QL: fix snake_casing of generated ql identifiers
2021-05-26 11:12:05 +00:00
Shati Patel
021c0a03b4
Update devcontainer files
2021-05-26 10:22:53 +00:00
Shati Patel
6bb91f4080
QL: Update devcontainer files
2021-05-26 10:22:53 +00:00
Arthur Baars
a044f41aad
Merge pull request #188 from github/aibaars/qlpack
...
Build Ruby bundle
2021-05-26 12:18:51 +02:00
Tom Hvitved
815bd4fb92
Update workflow files
2021-05-26 11:50:37 +02:00
Tom Hvitved
cacefbe075
QL: Update workflow files
2021-05-26 11:50:37 +02:00
Tom Hvitved
ec15ba8e9c
Update Readme
2021-05-26 11:46:34 +02:00
Tom Hvitved
f5c1b2e645
QL: Update Readme
2021-05-26 11:46:34 +02:00
Tom Hvitved
6d04ef46f4
Change more Ruby to QL
2021-05-26 11:43:18 +02:00
Tom Hvitved
823ab1076a
QL: Change more Ruby to QL
2021-05-26 11:43:18 +02:00
Tom Hvitved
7bac6a07b6
Initial commit
2021-05-26 11:32:30 +02:00
Tom Hvitved
abcabeef06
Remove *Real predicates and enable recursive desugaring
2021-05-25 21:27:39 +02:00
Tom Hvitved
3f412e4fad
Desugar setter assignment operations
2021-05-25 21:27:39 +02:00
Tom Hvitved
b173cc332a
Desugar setter assignments
2021-05-25 21:27:39 +02:00
Tom Hvitved
b812012b71
Add CFG setter assignment test
2021-05-25 21:27:39 +02:00
Tom Hvitved
e85677a040
Adjust locations of synthesized AST nodes
2021-05-25 21:27:34 +02:00
Arthur Baars
aea0c6fc64
Merge pull request #190 from github/aibaars/fix-heredoc-parent
...
Fix Scope::parentOf for HeredocBody nodes
2021-05-25 11:58:21 +02:00
Arthur Baars
ce23ae33e7
Fix Scope::parentOf for HereDocBody
2021-05-25 11:27:45 +02:00
Arthur Baars
bb62564c9e
Add test for heredoc with variables
2021-05-25 11:16:55 +02:00
Arthur Baars
86d57d3e26
Fix LGTM suites
2021-05-25 10:41:07 +02:00
Arthur Baars
73aae5dfd9
Use num_cpus-1 threads by default
2021-05-25 09:28:49 +02:00
Arthur Baars
4f404e9b11
Temporarily include some queries in the code scanning suite
...
This should be reverted once we have a decent set of default queries.
2021-05-25 09:21:40 +02:00
Arthur Baars
a02cfd27c9
Compile query packs with previous CodeQL versions too
2021-05-24 17:48:49 +02:00
Arthur Baars
78d9191526
Build query pack
2021-05-24 13:27:50 +02:00
Tony Torralba
7dbdba28cc
Consider search methods with unsafe SearchControls
2021-05-21 15:21:04 +02:00
Tom Hvitved
423a1b39e1
Improve call graph performance by forcing non-linear joins first
2021-05-20 14:36:56 +02:00
Tom Hvitved
492f41d399
Fix performance
2021-05-20 14:27:13 +02:00
Arthur Baars
0ccca47b01
Dataflow for implicit self argument of methods
2021-05-20 14:27:13 +02:00
Arthur Baars
eb8b2558da
Add types of lambdas and methods
2021-05-20 14:27:13 +02:00
Arthur Baars
e787d99cd1
Resolve yield calls to blocks
2021-05-20 14:27:13 +02:00
Arthur Baars
66b2c39985
More tests
2021-05-20 14:27:13 +02:00
Arthur Baars
578b94453d
Flow for captured local variables
2021-05-20 14:27:13 +02:00
Arthur Baars
e46755021b
Add data flow steps for optional parameter values
2021-05-20 14:27:13 +02:00
Arthur Baars
da88661746
Add SSA flow step for parameters
2021-05-20 14:27:13 +02:00
Arthur Baars
84da0cb2f3
Track type of Classes/Modules and and self in singleton methods
2021-05-20 14:27:13 +02:00
Arthur Baars
f157f1f359
Fix superclass of Class
2021-05-20 14:27:13 +02:00
Arthur Baars
1ba94beb01
Fix types of true/false
2021-05-20 14:27:13 +02:00
Tom Hvitved
f63f5aba15
Fix performance
2021-05-20 14:27:13 +02:00
Arthur Baars
af19cc5fae
Add test cases
2021-05-20 14:27:13 +02:00
Arthur Baars
a9806719f9
Toplevel 'self'
2021-05-20 14:27:13 +02:00
Arthur Baars
1a739b2fbf
Resolve super calls
2021-05-20 14:27:13 +02:00
Arthur Baars
7f520e7899
Add types of literals
2021-05-20 14:27:13 +02:00
Arthur Baars
4951b7d378
Treat methods defined in a singleton class similar to single methods
2021-05-20 14:27:13 +02:00
Arthur Baars
8815bb7dbe
Track calls to singleton methods
2021-05-20 14:27:13 +02:00
Arthur Baars
b13bae6a4e
Resolve instance method calls
2021-05-20 14:27:13 +02:00
Arthur Baars
3c80b32ba0
Merge pull request #186 from github/bump-codeql
...
Bump `codeql` sub module
2021-05-20 14:26:24 +02:00
Tom Hvitved
16d34c7cd4
Sync files
2021-05-20 14:15:54 +02:00
Tom Hvitved
c73e6ff390
Bump codeql sub module
2021-05-20 14:15:33 +02:00
Tony Torralba
2613e58916
Remove duplicated class
2021-05-20 12:49:02 +02:00
Tony Torralba
0589dd7e54
Move Jndi.qll from experimental
2021-05-20 12:30:28 +02:00
Tony Torralba
0c1fe9be4f
Add change note
2021-05-20 12:00:11 +02:00
Tony Torralba
c1e71b60b4
Use InlineExpectationsTest
2021-05-20 12:00:11 +02:00
Tony Torralba
3f0b803796
Refactored to use CSV sink models
2021-05-20 12:00:05 +02:00
Tom Hvitved
1509584e27
Merge pull request #185 from github/hvitved/resolve-expr-perf
...
Improve performance of `internal/Module.qll`
2021-05-19 14:53:46 +02:00
Tom Hvitved
6b6aeb10c7
Improve performance of internal/Module.qll
2021-05-19 14:33:52 +02:00
Tom Hvitved
4798a1a008
Merge pull request #184 from github/cfg/singleton-method-abnormal
...
CFG: Add missing `propagatesAbnormal` overrides
2021-05-19 12:45:59 +02:00
Tony Torralba
1351516e9a
Moved JNDI injection related files from experimental to standard
2021-05-19 11:32:51 +02:00
Tony Torralba
43d4575359
Add createParser as taint preserving callable
2021-05-19 11:20:54 +02:00
Tony Torralba
e58746508d
Merge branch 'main' into atorralba/promote-ognl-injection
2021-05-19 10:41:08 +02:00
Tom Hvitved
c866f88410
CFG: Add missing propagatesAbnormal overrides
2021-05-18 20:39:46 +02:00
Tom Hvitved
9871698cee
Add more CFG tests
2021-05-18 20:39:08 +02:00
Nick Rolfe
b9b6ffe53e
Merge pull request #178 from github/cfg_cleanup
...
Clean up CFG implementation
2021-05-18 10:53:44 +01:00
Tony Torralba
34a55e77ef
Add missing subtype test
2021-05-18 09:38:35 +02:00
Tony Torralba
347bd2ebc2
Added change note
2021-05-17 17:51:07 +02:00
Nick Rolfe
778de741d0
Merge remote-tracking branch 'origin/main' into cfg_cleanup
2021-05-17 16:26:28 +01:00
Tony Torralba
1815656a02
Use set literals for OGNL packages
2021-05-17 16:56:37 +02:00
Tony Torralba
8d682000b4
Fix QLDocs
2021-05-17 16:53:30 +02:00
Tony Torralba
ed13c17ea8
Fix qhelp file
2021-05-17 16:52:08 +02:00
Nick Rolfe
f3d831c25e
Remove unnecessary superclass prefix
2021-05-17 15:26:53 +01:00
Nick Rolfe
9a2523e2f9
Make EndBlockTree extend StmtSequenceTree
2021-05-17 15:24:20 +01:00
Tony Torralba
bc2370ae1d
Use InlineExpectationsTest for tests
2021-05-17 15:58:33 +02:00
Nick Rolfe
6d395230d4
Make BraceBlockTree extend StmtSequenceTree
2021-05-17 14:54:11 +01:00
Tom Hvitved
ad036f8af1
Merge pull request #179 from github/hvitved/synth-framework-take2
...
AST synthesis framework (take 2)
2021-05-17 15:36:56 +02:00
Tony Torralba
cfb38c43b3
QLDocs
2021-05-17 15:04:50 +02:00
Tom Hvitved
25f226e9dc
Add comment to getVariableReal
2021-05-17 15:02:40 +02:00
Tony Torralba
897cd5384f
Created JWT.qll and refactored to use CSV models
2021-05-17 14:44:33 +02:00
Tom Hvitved
b434d42d05
Rename ParenthesizedExprSynth to StmtSequenceSynth
2021-05-17 13:39:44 +02:00
luchua-bc
7af1984348
Update the change note
2021-05-17 11:35:35 +00:00
Tony Torralba
3e4ccaf9a8
Move from experimental to standard
2021-05-17 10:41:54 +02:00
luchua-bc
1a072f3bb9
Move APIs from predicates flagged auto-generated to the other section
2021-05-14 20:38:23 +00:00
Alex Ford
ca046c9af5
Merge pull request #182 from github/loc-query-tag
2021-05-14 17:42:21 +01:00
Alex Ford
1ba491a956
add lines-of-code tag to rb/summary/lines-of-code
2021-05-14 17:06:49 +01:00
Alex Ford
3c0f20cec8
Merge pull request #170 from github/weak-file-permissions
...
Add `rb/overly-permissive-file` query
2021-05-14 17:04:15 +01:00
Arthur Baars
6c382ccd4b
Merge pull request #169 from github/aibaars/codespace
...
Add CodeSpace container
2021-05-14 18:00:51 +02:00
Alex Ford
e9090cec70
Merge pull request #181 from github/loc-description-improvements
...
LOC summary query improvements
2021-05-14 16:13:42 +01:00
Alex Ford
65b0ce204d
restrict rb/summary/lines-of-code to the source root
2021-05-14 16:00:55 +01:00
Alex Ford
71234155b8
improve rb/summary/lines-of-code description
2021-05-14 15:59:07 +01:00
Alex Ford
7ff2ca4ffe
improve rb/summary/lines-of-user-code name and description
2021-05-14 15:56:59 +01:00
Alex Ford
6bd2e4e4b7
Merge pull request #175 from github/loc-summary-queries-1
...
Summary queries for total LOC and user-code LOC
2021-05-14 15:51:45 +01:00
luchua-bc
9ef58e378c
Remove the sample Java file in the src folder
2021-05-14 11:01:25 +00:00
Arthur Baars
66bf13e77a
Setup a CodeSpace
2021-05-13 21:03:40 +02:00
Arthur Baars
3547980f5b
Update reference to tree-sitter-embedded-template
2021-05-13 21:03:40 +02:00
Arthur Baars
498e760b21
Add consistency queries to codeqlmanifest
2021-05-13 21:03:40 +02:00
Nick Rolfe
a46f45440a
Create NamespaceTree to reduce duplication
2021-05-13 17:52:20 +01:00
Nick Rolfe
5e6dddad3e
Replace count(getReceiver()) with 1
2021-05-13 16:59:05 +01:00
Tony Torralba
132a187586
Add missing QLDoc
2021-05-13 16:29:29 +02:00
Tony Torralba
50e1b42581
Add missing QLDoc
2021-05-13 15:37:16 +02:00
Alex Ford
11949c6b77
Merge pull request #176 from github/diagnostics-entries
...
Start writing diagnostics to the DB, and some basic summary/diagnostics queries
2021-05-13 14:31:01 +01:00
Tony Torralba
1fbdf6ecd0
Add change note
2021-05-13 15:13:25 +02:00
Tony Torralba
db732918af
Add taint step for setExpression
2021-05-13 15:01:36 +02:00
Alex Ford
15712df717
update ruby.dbscheme.stats
2021-05-13 13:50:53 +01:00
Alex Ford
dc3c5926f5
add a db upgrade for the diagnostics table
2021-05-13 13:45:02 +01:00
Alex Ford
277a6a020a
diagnostics: use debug rather than hidden terminology, and leave gaps for other severities
2021-05-13 13:44:10 +01:00
Alex Ford
b2f2f786ac
allow the WeakFilePermissions access predicate to return multiple values
2021-05-13 13:22:14 +01:00
Niroshan Rajadurai
d9826c571a
Update README.md
...
Updates to point to GHAS Capabilities, and tighter wording on License terms
2021-05-13 13:17:16 +01:00
Alex Ford
0d1c4a1290
document that the WeakFilePermissions access predicate should return at most one value
2021-05-13 13:06:45 +01:00
Alex Ford
89be8d8710
Apply suggestions from code review
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2021-05-13 12:59:16 +01:00
Tom Hvitved
ff06e724b1
AST synthesis framework
2021-05-12 19:58:52 +02:00
luchua-bc
4d014717b6
Add a change note and reset the qhelp file
2021-05-12 15:50:40 +00:00
Alex Ford
acdbd9859e
simplify ExtractionError class defn
2021-05-12 16:45:31 +01:00
Alex Ford
11376bc411
note that severity 3 corresponds to an error diagnostic level
2021-05-12 16:39:51 +01:00
Alex Ford
0dad1a4779
use a case-split for diagnostic severity levels
2021-05-12 16:38:37 +01:00
Tom Hvitved
ea1c7b51ef
Add more operator assignment tests
2021-05-12 17:24:11 +02:00
Tony Torralba
09b40601a7
Consider ExpressionAccessor
2021-05-12 12:32:38 +02:00
thank_you
3e25b14a68
Update NoSQLInjection.expected
2021-05-11 20:07:09 -04:00
Alex Ford
0016146e11
limit summary queries to files from within the source directory
2021-05-11 21:07:08 +01:00
Alex Ford
49d9bb798c
revamp the diagnostics tests
2021-05-11 19:53:00 +01:00
Alex Ford
9b115129fe
move diagnostics queries to match other languages more closely
2021-05-11 19:53:00 +01:00
Alex Ford
1381d8d076
tidy up Diagnostics library
2021-05-11 19:28:31 +01:00
Alex Ford
9663b74e12
use severity level 3 to indicate an extraction error for a file
2021-05-11 19:23:05 +01:00
Alex Ford
d1d8cff915
tests for some more diagnostics queries
2021-05-11 19:14:22 +01:00
Alex Ford
de497dd1ba
tests for NumberOfFiles* summary queries
2021-05-11 19:14:22 +01:00
Nick Rolfe
004147984b
Simplify CFG classes for StmtSequences
2021-05-11 18:27:11 +01:00
Tony Torralba
8754c85a57
Use InlineExpectationsTest
2021-05-11 16:23:12 +02:00
Tony Torralba
fc03b92e11
Moved from experimental to standard
2021-05-11 15:42:13 +02:00
Tony Torralba
53da3b661a
Refactor to CSV sink model
2021-05-11 15:33:49 +02:00
Alex Ford
8ab95324eb
dedupe some error reporting code
2021-05-11 14:09:10 +01:00
Alex Ford
0f3168f293
record more parse errors
2021-05-10 21:23:24 +01:00
thank_you
3ace49549a
Add tests for SqlAlchemy modeling library
...
After researching SqlAlchemy and it's various query methods, I discovered several types of SQL injection possibilities.
The SQLExecution.py file contains these examples and can be broken up into two types of injections. Injections requiring the text() taint-step and injections NOT requiring the text() taint step.
2021-05-10 16:12:15 -04:00
Tony Torralba
8553ca1019
Autoformatting
2021-05-10 15:42:20 +02:00
Alex Ford
2154b7df30
add doc for IntegerLiteral.getValue
2021-05-10 11:02:48 +01:00
Alex Ford
48add9ffbc
remove internal import in rb/overly-permissive-file
2021-05-10 11:00:59 +01:00
Tony Torralba
d99b5bfc66
Reuse previous tests from experimental
2021-05-10 11:17:20 +02:00
Tony Torralba
c70503142f
Require JS enabled even when cross-origin access is enabled in the webviews
2021-05-10 09:45:59 +02:00
thank_you
0238e51c10
Add checks for EmbeddedDocument classes
...
Mongoengine supports EmbeddedDocument documents. We should check for this in our query.
2021-05-09 19:42:40 -04:00
thank_you
07c3e22428
Fix method name to match flask_mongoengine library
2021-05-09 19:23:52 -04:00
${sleep,5}
67bc576e30
Delete StdLib.qll
2021-05-07 17:37:02 -04:00
jorgectf
0fc044dfd5
Checkout Stdlib.qll
2021-05-07 23:03:23 +02:00
jorgectf
e7bdc73420
Update .expected
2021-05-07 23:00:21 +02:00
jorgectf
65c6f1976a
Rename mongoengine-flask-db-document-subclass
2021-05-07 23:00:08 +02:00
thank_you
aa24c689bc
Add back accidentally deleted StdLib.qll file
2021-05-07 15:17:01 -04:00
thank_you
83f0870231
Update file path of module
2021-05-07 15:13:56 -04:00
thank_you
9a44020af3
Rename StdLib.qll file to NoSQL.qll file
...
It makes more sense to have this file represent just the NoSQL module
2021-05-07 15:13:30 -04:00
thank_you
8f8eff231a
Fix comment description of predicate
2021-05-07 15:08:48 -04:00
Jorge
ae806cd445
Merge branch 'github:main' into jorgectf/python/ldapimproperauth
2021-05-07 20:46:09 +02:00
thank_you
7693d696cc
Add additional query tests
...
To ensure that this query works against numerous usages of libraries such as PyMongo, Flask PyMongo, Mongoengine, and Flask Mongoengine, I've added a variety of query tests to test against. These tests deal with scenarious such as:
- Subscript expressions
- Mongoengine instances and Document subclasses
- Mongoengine connection usage
- And more...
2021-05-07 14:36:02 -04:00
thank_you
1d36aa6649
Add additional querying for mongoengine Document subclassing
...
After further research, it was discovered that Flask-Mongoengine has multiple ways of allowing a developer to call the Document class. One way is by directly importing the Document class from the module. Another approach is to get the Document class via a mongoengine instance.
The update to this query checks for cases where the developer gets the Document class via the MongoEngine instance.
Other misc changes include setting the various predicates to private.
2021-05-07 14:30:50 -04:00
Alex Ford
269ae8331b
record 'unknown table type' extraction errors
2021-05-07 17:56:50 +01:00
Nick Rolfe
94ceb3f237
Remove unused class
2021-05-07 17:20:51 +01:00
Nick Rolfe
9def7c2dfe
Make CFG for TEnsure post-order
2021-05-07 17:15:10 +01:00
Nick Rolfe
7f6805c82f
Make CFG for TDo post-order
2021-05-07 17:00:30 +01:00
Nick Rolfe
46c9f858c4
Make CFG for TElse post-order
2021-05-07 16:47:19 +01:00
Nick Rolfe
2569bf257f
Make CFG for TThen post-order
2021-05-07 15:40:50 +01:00
Tony Torralba
6884edf52a
Merge branch 'main' into atorralba/promote-unsafe-android-webview-fetch
2021-05-07 16:31:55 +02:00
Tony Torralba
1f1a1bdb41
Remove unnecessary CWE reference
2021-05-07 16:29:00 +02:00
luchua-bc
fc7d340a89
Query to detect hard-coded Azure credentials
2021-05-07 13:16:41 +00:00
Tony Torralba
dcee1daa31
Mark spurious test results
2021-05-07 13:17:04 +02:00
Tony Torralba
e6b7da1926
Add import for Android sinks in ExternalFlow
2021-05-07 12:41:39 +02:00
Tony Torralba
e2e65aca3c
Add new sink for Android XSS
2021-05-07 12:25:19 +02:00
Alex Ford
a7873f9023
rb/summary/number-of-files-extracted-with-errors
2021-05-07 00:24:13 +01:00
Alex Ford
31b8913ffd
rb/summary/number-of-successfully-extracted-files FIXUP
2021-05-07 00:23:56 +01:00
Alex Ford
804198cd37
rb/summary/number-of-successfully-extracted-files
2021-05-07 00:22:22 +01:00
Alex Ford
e7285babf0
rb/diagnostics/successfully-extracted-files
2021-05-07 00:17:58 +01:00
Alex Ford
54266eca33
rb/diagnostics/files-extracted-with-errors
2021-05-07 00:17:12 +01:00
Alex Ford
d223851429
add Diagnostics.qll
2021-05-07 00:15:09 +01:00
Alex Ford
272aec27f2
clean up the parse_error writing code
2021-05-07 00:15:09 +01:00
Alex Ford
3a1dff1c95
start writing diagnostics entries for parse errors
2021-05-06 23:09:43 +01:00
Alex Ford
c38453305f
add diagnostics table to dbscheme
2021-05-06 22:58:01 +01:00
Alex Ford
e5896047d8
summary LOC query tests
2021-05-06 19:54:23 +01:00
Alex Ford
98a4f4c5b9
rb/summary/lines-of-user-code
2021-05-06 19:54:23 +01:00
Alex Ford
f6c8b07f4f
rb/summary/lines-of-code
2021-05-06 19:54:23 +01:00
Nick Rolfe
4e80b548c1
Make BeginBlock CFG post-order
2021-05-06 16:45:27 +01:00
Nick Rolfe
2c7f1e0c11
Remove unused class
2021-05-06 16:28:36 +01:00
Nick Rolfe
9185a93312
Make SingletonClassDeclarationTree post-order
2021-05-06 16:20:50 +01:00
Nick Rolfe
fd3d50f340
Make ModuleDeclarationTree post-order
2021-05-06 15:54:11 +01:00
Nick Rolfe
d623f47ba0
Make ClassDeclarationTree post-order
2021-05-06 15:36:25 +01:00
Tony Torralba
b69261727d
Add a new test for
2021-05-06 13:26:25 +02:00
Tony Torralba
1f1f85aeb5
Add change note and fix some QLDocs
2021-05-06 13:13:23 +02:00
Tony Torralba
e14294a2f7
Remove XSS sink since it's better handled in this query
2021-05-06 11:20:37 +02:00
Arthur Baars
07c059cb2e
Merge pull request #166 from github/type_tracking
...
Minimal implementation of shared type-tracking library
2021-05-06 10:59:45 +02:00
Tony Torralba
84504a88e4
Fix tests by adding AndroidManifest.xml
2021-05-06 10:55:56 +02:00
Tony Torralba
a706046a19
Reestructured test
2021-05-06 09:17:53 +02:00
Nick Rolfe
a0084b7732
Simplify CFG tree classes for calls
2021-05-05 17:18:44 +01:00
Nick Rolfe
569063ca73
Make YieldCallTree post-order
2021-05-05 17:14:32 +01:00
Tony Torralba
c138ed3e4d
QLDocs
2021-05-05 16:51:15 +02:00
Tony Torralba
03ce8d689f
Refactored to use CSV sink model
2021-05-05 16:34:30 +02:00
Nick Rolfe
3a3586f14b
Restrict type to MethodCallCfgNode
2021-05-05 14:49:24 +01:00
Arthur Baars
73b5699f32
Merge pull request #174 from github/escape_file_keys
...
Escape keys for files and folders
2021-05-05 15:02:04 +02:00
Nick Rolfe
c37f390efc
Reserve more capacity for escaped key
2021-05-05 13:21:16 +01:00
Nick Rolfe
99ae17de03
Avoid copying key when it doesn't need escaping
2021-05-05 12:54:23 +01:00
Nick Rolfe
b16b95e2f7
Fix type-tracking load/store steps
2021-05-05 12:12:45 +01:00
Tony Torralba
9b78cee37a
Add tests
2021-05-05 11:59:57 +02:00
Tony Torralba
be50e8f30c
Moved from experimental to standard
2021-05-05 11:59:49 +02:00
Tony Torralba
458b89bf5f
Added Android stubs
2021-05-05 11:57:01 +02:00
thank_you
c4a67e522c
Rewrite query to take into account MongoClient and subscript expressions
...
A couple of notes with these changes:
- Added TypeTracker pattern to handle subscript expressions. We've found that pymongo supports subscripts expressions when calling databases and collections. To resolve this, we implemented the TypeTracker pattern to catch those subscripts since CodeQL Python API modeling doesn't support subscript expressions.
- After some research, we've discovered that MongoEngine and Flask-MongoEngine utilize MongoClient under-the-hood. This requires us to rewrite the query so that instead of querying these libraries with specific queries, we are instead going to query for usages of MongoClient since all of the libraries we are targeting utilizes MongoClient under-the-hood.
2021-05-04 19:29:31 -04:00
thank_you
56dc4d886e
Add comment on BsonObjectIdCall
2021-05-04 19:11:59 -04:00
Nick Rolfe
d2d5f31599
Escape keys for files and folders
2021-05-04 16:52:35 +01:00
Nick Rolfe
647c108c0b
Merge remote-tracking branch 'origin/main' into type_tracking
2021-05-04 12:38:16 +01:00
Arthur Baars
1a94fb47b6
Merge pull request #172 from github/update-testoutput
...
Update expected test output
2021-05-04 13:37:37 +02:00
Arthur Baars
27538cb11d
Update expected test output
2021-05-04 12:43:43 +02:00
Nick Rolfe
53deede8ab
Remove unnecessary local flow inside type-tracking store step
2021-05-04 11:32:57 +01:00
Nick Rolfe
35ee62c689
Use splitting-aware nodes for type-tracking store/load steps
2021-05-04 11:31:03 +01:00
Arthur Baars
6adff6f195
Merge pull request #171 from github/self_nodes
...
Create synthetic `self` nodes for calls without explicit receivers
2021-05-03 12:59:11 +02:00
Nick Rolfe
5dc910d0db
Move track predicate to LocalSourceNode
2021-04-30 15:05:12 +01:00
Nick Rolfe
37c8d8a252
Rename getCallable to getTarget
2021-04-30 14:41:50 +01:00
Nick Rolfe
fdccd5da7e
Add AstNode::isSynthesized()
2021-04-30 11:58:54 +01:00
Alex Ford
2c8a4f833f
make rb/overly-permissive-file a proper path-problem
2021-04-29 19:11:39 +01:00
Nick Rolfe
e87bf57bc5
Avoid recursion in IPA construction
2021-04-29 18:04:15 +01:00
Alex Ford
4375452866
more IntegerLiteral.getValue improvements
2021-04-29 17:08:33 +01:00
Alex Ford
05adfec03d
account for more patterns in IntegerLiteral.getValue
2021-04-29 17:02:54 +01:00
Alex Ford
35d5bae10e
run formatter
2021-04-29 16:16:09 +01:00
Alex Ford
efa323c304
rb/overly-permissive-file use QL bitwise operators
2021-04-29 16:08:42 +01:00
Alex Ford
46a14b2826
move parseInt logic into getValue method predicate on IntegerLiteral
2021-04-29 15:54:22 +01:00
Alex Ford
1c89bbe188
fix select format of rb/overly-permissive-file
2021-04-29 15:44:54 +01:00
Nick Rolfe
bd6fe41388
Merge IPA branches for implicit self
2021-04-29 15:38:58 +01:00
Alex Ford
2c0fc7d193
parse integer permission args as ints instead of using regex matches
2021-04-29 15:34:10 +01:00
Nick Rolfe
59c83b7b8f
Add clarifying comment
2021-04-29 14:00:27 +01:00
Nick Rolfe
9540125771
Remove fromGeneratedInclSynth predicate
2021-04-29 13:58:16 +01:00
Arthur Baars
300a54384f
Add TypeTracker to identical-files.json
2021-04-29 12:20:14 +02:00
Arthur Baars
f07c58ee07
Update codeql submodule
2021-04-29 12:13:11 +02:00
Nick Rolfe
96ddd55191
Apply suggestions from code review
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2021-04-29 12:07:32 +02:00
Nick Rolfe
c1c437f020
Minimal implementation of shared type-tracking library
2021-04-29 12:07:32 +02:00
thank_you
d85b1a2d5f
Replace recursive getAMember*() method
2021-04-28 16:54:49 -04:00
Nick Rolfe
f3852f9b56
Create synthetic self nodes for calls without explicit receivers
2021-04-28 16:43:40 +01:00
Alex Ford
0a6dc6f150
update WeakFilePermissions.expected
2021-04-28 16:31:07 +01:00
Alex Ford
7a72d8ec2f
add qhelp for rb/overly-permissive-file
2021-04-28 15:51:08 +01:00
Alex Ford
e3d393b7c1
use full dataflow for permission args in rb/overly-permissive-file
2021-04-28 15:40:58 +01:00
Alex Ford
e5862a942f
WIP rb/overly-permissive-file query
2021-04-27 21:22:17 +01:00
edvraa
18a3e4d45b
add comments
2021-04-27 22:10:04 +03:00
thank_you
62f3e8d64a
Add sanitizer for ObjectId
...
ObjectId is a sanitizer used to sanitize strings into valid MongoDB ids. During research we've found that this method is used.
ObjectId returns a string representing an id. If at any time ObjectId can't parse it's input (like when a tainted dict in passed in), then ObjectId will throw an error preventing the query from running.
2021-04-26 15:35:42 -04:00
edvraa
c9c9758e01
Make similarly named files in tests and qhelp in sync
2021-04-22 12:23:46 +03:00
edvraa
57689df5aa
Remove DataFlow::Node
2021-04-21 19:29:30 +03:00
edvraa
a93d6a3ef6
Remove SafeConstructorTrackingConfig
2021-04-21 17:16:54 +03:00
edvraa
9e46ef3cd9
Get rid of getParent
2021-04-21 17:11:40 +03:00
edvraa
808444986d
Get rid of UnsafeDeserializerCallable
2021-04-21 17:06:20 +03:00
edvraa
b6952d541a
get rid of getParent
2021-04-21 16:55:34 +03:00
edvraa
9cc67e4266
make private where possible
2021-04-21 16:48:05 +03:00
Arthur Baars
bc6aec7a99
Merge pull request #167 from github/alexrford/numlines
...
Implement FLines metrics queries
2021-04-21 14:42:18 +02:00
Alex Ford
240f0abf27
drop @tags from metrics queries
2021-04-21 13:00:48 +01:00
Alex Ford
15289dba34
simplify File.getNumberOfLines
2021-04-21 12:59:25 +01:00
Alex Ford
cc5bbfce0b
Get -> Gets
2021-04-21 12:57:55 +01:00
Alex Ford
5a191692df
Update ql/src/queries/metrics/FLinesOfComments.ql
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2021-04-21 12:57:12 +01:00
edvraa
8f6411dba3
Simpify with exists
2021-04-21 13:52:41 +03:00
Alex Ford
4e119cc085
consider empty files (no ruby tokens) to have 0 lines
2021-04-21 11:29:55 +01:00
Alex Ford
a8597025aa
fixed logic for line counting
2021-04-21 11:29:09 +01:00
edvraa
0590522e4b
a deserializer
2021-04-21 13:29:00 +03:00
edvraa
3ac5f7bb18
Move RemoteSource and LocalSource to UnsafeDeserialization.qll
2021-04-21 13:27:26 +03:00
Alex Ford
bcc1be05de
use explicit this prefixes in FileSystem.qll
2021-04-21 10:51:28 +01:00
Alex Ford
85ecacd858
make helper predicates private
2021-04-21 10:50:00 +01:00
Alex Ford
9d117d10b8
drop MetricFile class
2021-04-21 10:45:42 +01:00
Alex Ford
c6b6a83501
extend FLines* tests
2021-04-21 10:42:53 +01:00
Alex Ford
a1c91e28da
move FLines* tests to a common directory
2021-04-21 10:34:58 +01:00
Alex Ford
fcd46025fe
update metadata for FLines* queries
2021-04-21 10:28:20 +01:00
Arthur Baars
abb37e212a
Merge pull request #165 from github/aibaars/methods
...
Implement method lookup
2021-04-21 11:24:20 +02:00
Arthur Baars
549e5ab9d6
Revert "Rename Method -> MethodDeclaration"
...
This reverts commit d361ef37af .
2021-04-21 10:50:47 +02:00
Arthur Baars
1245674df8
Add missing @id properties
2021-04-21 10:50:47 +02:00
Alex Ford
50a0f282bf
add basic tests for FLines queries
2021-04-20 17:36:16 +01:00
Alex Ford
f0d1498c8c
Revert "WIP: populate numlines table"
...
This reverts commit 62bf58b289 .
2021-04-20 17:36:16 +01:00
Alex Ford
37cce23c26
add FLines.ql, FLinesOfComments.ql
2021-04-20 17:36:16 +01:00
Alex Ford
d6c7846089
put logic for determining line counts into MetricFile
2021-04-20 17:36:16 +01:00
thank_you
7773c53124
Replace any(string) with _ wildcard
2021-04-20 08:49:08 -04:00
thank_you
bbd3552392
Rename predicate to getQuery
2021-04-20 08:47:37 -04:00
Arthur Baars
122315db3f
Remove 'Method' class
2021-04-20 13:41:11 +02:00
Alex Ford
28e46c8915
add FLinesOfCode.ql metric query
2021-04-20 10:12:52 +01:00
thank_you
c5fbbc0551
Refactor SqlAlchemy model
...
- Replaced classes that look for SqlAlchemy instances with predicates
- General clean-up of code
2021-04-19 18:56:00 -04:00
Alex Ford
7bfc61789d
line count MetricFile predicates
2021-04-19 18:08:01 +01:00
Alex Ford
62bf58b289
WIP: populate numlines table
2021-04-19 18:06:35 +01:00
Arthur Baars
bf4f91e038
Address comments
2021-04-16 16:37:42 +02:00
edvraa
c3deb48efa
Charpred for InstanceMethodSink
2021-04-16 17:19:42 +03:00
Arthur Baars
07726fd979
Add some module and method tests
2021-04-16 11:07:57 +02:00
edvraa
a412581556
reintroduce UnsafeDeserializer
2021-04-15 22:32:42 +03:00
thank_you
a854fb8f8b
Add documentation and refactor code
2021-04-15 15:22:15 -04:00
edvraa
3aedd2c1f4
Use TaintTracking2
2021-04-15 22:12:01 +03:00
edvraa
773556e5e0
Use hasFlow where path is not needed
2021-04-15 16:27:09 +03:00
edvraa
1581a27d3d
Simplify getTarget check
2021-04-15 16:24:36 +03:00
Arthur Baars
bf556a2b53
Implement method lookup
2021-04-15 11:32:43 +02:00
Arthur Baars
5837af0936
Add MethodBase::getMethod
2021-04-15 11:32:43 +02:00
Arthur Baars
d361ef37af
Rename Method -> MethodDeclaration
2021-04-15 11:32:43 +02:00
Arthur Baars
3590a2c2ac
Merge pull request #164 from github/aibaars/fix-modules
...
Improve module/class resolution
2021-04-15 11:32:28 +02:00
Thank You
f1e71e21ed
Add SqlAlchemy module
2021-04-14 22:00:25 -04:00
edvraa
b027fddc7e
Remove redundant check
2021-04-15 00:14:09 +03:00
edvraa
3a9d1f46fd
Hide implementation details
2021-04-15 00:09:19 +03:00
edvraa
a4fd70aa3d
Use don't care expression
2021-04-14 23:35:38 +03:00
Arthur Baars
24bb11b20a
Improve module/class resolution
2021-04-14 17:14:38 +02:00
Arthur Baars
12ee957331
Add test cases
2021-04-14 17:12:39 +02:00
Arthur Baars
3b73d41cc4
Merge pull request #163 from github/aibaars/modules-2
...
Ignore include/prepend statements in blocks
2021-04-14 17:09:34 +02:00
Arthur Baars
9afda342bc
Address comments
2021-04-14 09:57:49 +02:00
Arthur Baars
754bfdd136
Ignore include/prepend statements in blocks
...
Include and prepend statements are rarely used in block in normal code and when
used in normal code they tend to be in blocks that are passed to methods like
`module_eval` which is a builtin method that evaluates a block in the context
of some other module (typically created with Module.new). We currently don't attempt
to track such "dynamically" constructed modules, and ignoring such modules
and the `module_eval` calls on them seems fine for now.
Another, much more frequent use of include/prepend statements in blocks is in Rspec.describe and
Rspec.context method calls in tests. Rspec also evaluates those blocks in the context of some
special Rspec class. Precisely tracking such calls during the initial construction of the module/class
hierarchy would be really hard and there would be little benefit because the interesting modules and classes of
an application are not defined in test files.
2021-04-14 09:53:19 +02:00
Arthur Baars
280fe73063
Add test case with 'module_eval' call with block containing 'prepend' statement
2021-04-14 09:53:19 +02:00
jorgectf
5d25a27d62
Add .expected
2021-04-09 22:28:03 +02:00
jorgectf
4615927eeb
Fix flask_mongoengine Call
2021-04-09 22:27:53 +02:00
jorgectf
166385755a
Polish Calls naming
2021-04-09 21:49:41 +02:00
jorgectf
208b53e4d2
Polish query file
2021-04-09 21:36:21 +02:00
jorgectf
983af32ab5
Polish qhelp examples
2021-04-09 21:36:11 +02:00
jorgectf
fa5869afe7
Polish qhelp and examples
2021-04-09 21:31:45 +02:00
jorgectf
a6b3aefb0b
Add flask_mongoengine sink
2021-04-09 21:30:17 +02:00
jorgectf
0e51dbec86
Polish tests
2021-04-09 21:29:56 +02:00
Arthur Baars
caef2c36c7
Merge pull request #162 from github/aibaars/modules
...
Basic implementation of module resolution
2021-04-09 20:50:54 +02:00
Arthur Baars
cdfabbc95d
Make Cached module private
2021-04-09 16:47:02 +02:00
Arthur Baars
a247544fc5
Add comments
2021-04-09 16:35:23 +02:00
Arthur Baars
7bc5be93ff
Module: make main predicates cached
2021-04-09 13:29:27 +02:00
Arthur Baars
2db999d0da
Improve module resolution
2021-04-09 09:51:24 +02:00
jorgectf
f140601241
Write documentation
2021-04-09 01:57:23 +02:00
jorgectf
f02c2855ad
Generate .expected
2021-04-09 01:28:38 +02:00
jorgectf
632dc61d5e
Create qlref
2021-04-09 01:28:22 +02:00
jorgectf
e9c4574552
Apply structure
2021-04-09 01:26:53 +02:00
jorgectf
789c5857fa
Create qhelp example
2021-04-09 01:26:28 +02:00
jorgectf
ce3fb6be21
Improve qhelp
2021-04-09 01:26:16 +02:00
jorgectf
b0c498629a
Init restructuring
2021-04-09 01:02:03 +02:00
jorgectf
6158dd6bce
Finish Sinks
2021-04-09 01:02:02 +02:00
jorgectf
bd894ae8b3
Fix flask test
2021-04-09 01:02:02 +02:00
jorgectf
3be916e82b
Polish FlaskHeaderCall
2021-04-09 01:02:01 +02:00
jorgectf
46c5cb1136
Polish WerkzeugHeaderCall
2021-04-09 01:02:00 +02:00
jorgectf
6f89b3f3d9
Init Header Injection query
2021-04-09 01:02:00 +02:00
jorgectf
5787406a0d
Add .expected
2021-04-09 00:51:26 +02:00
jorgectf
1320eeee53
Add qlref
2021-04-09 00:51:15 +02:00
jorgectf
015d203fcb
Improve tests, move them and create qhelp examples
2021-04-09 00:50:47 +02:00
jorgectf
2392be08c7
Improve sink
2021-04-09 00:50:04 +02:00
jorgectf
20fc5db49e
Polish query file
2021-04-09 00:49:30 +02:00
jorgectf
63bd32359a
Improve qhelp
2021-04-09 00:48:57 +02:00
Arthur Baars
ceb2eb21d8
Address comments
2021-04-08 15:11:57 +02:00
jorgectf
7e456494ef
Set up taint config and custom sink
2021-04-08 00:20:04 +02:00
jorgectf
8ca6e84268
Refactor Calls to use ApiGraphs
2021-04-08 00:19:46 +02:00
jorgectf
aa7763b3d2
Set up Concepts
2021-04-08 00:19:14 +02:00
jorgectf
db1f54a5f3
Polish query file
2021-04-08 00:19:00 +02:00
thank_you
83f28bfdda
Catch any keyword argument passed to MongoEngine's objects method
...
After some research, we discovered that any keyword argument passed to the objects method will result in NoSQL injection. This includes scenarios where we have the following:
objects(name_of_model_attribute=unsanitized_user_input)
2021-04-07 16:45:48 -04:00
thank_you
719c30bd92
Fix file name and adjust where the test points to
2021-04-07 16:42:51 -04:00
Arthur Baars
039e8b36a5
Add some include/prepend tests
2021-04-07 17:27:33 +02:00
Arthur Baars
84f6e902ea
AST: move some scope related methods to AstNode
2021-04-07 17:16:10 +02:00
Arthur Baars
063b085078
Address comments
2021-04-07 15:57:13 +02:00
thank_you
4e98348411
Remove comment
2021-04-06 13:57:03 -04:00
thank_you
dc274ecf36
Improve sentence structure and grammar
2021-04-06 13:51:59 -04:00
thank_you
520e65e3c3
Remove unnecessary example code
2021-04-06 13:46:51 -04:00
thank_you
ac31260fed
Made grammar changes
2021-04-06 13:42:57 -04:00
jorgectf
bfd4280d35
Fix imports and begin refactor
2021-04-06 15:51:37 +02:00
jorgectf
2f874c5c0b
Precision warn and Remove CWE (broken) reference
2021-04-06 15:47:42 +02:00
jorgectf
809bf2377e
Move to experimental folder
2021-04-06 15:47:41 +02:00
jorgectf
8715d29a44
Upload LDAP Improper authentication query, qhelp and tests
2021-04-06 15:47:41 +02:00
Arthur Baars
50b8b6b257
Also resolve constants with respect to the ancestors
...
of the enclosing module.
2021-04-06 15:47:13 +02:00
thank_you
6ade120983
Add check for mongoengine raw queries
...
After initial research on our end, we believe that the only vulnerability within the objects() method is passing a query into the __raw__ keyword argument. More info can be found below:
http://docs.mongoengine.org/guide/querying.html?highlight=inc__#raw-queries
2021-04-05 20:44:16 -04:00
thank_you
759fa2cd01
Update query to search for more pymongo sink methods
2021-04-05 20:42:18 -04:00
thank_you
3f0c758622
Add required __raw__ keyword
...
This __raw__ keyword is required for the actual mongoengine vulnerability. More info can be found below:
http://docs.mongoengine.org/guide/querying.html?highlight=inc__#raw-queries
2021-04-05 19:07:13 -04:00
Your Name
80216f6974
Rename classes
2021-04-05 14:41:08 -04:00
Your Name
be9a3a95b1
Add relevant PyMongo sink methods
2021-04-05 14:23:56 -04:00
Your Name
9072d19cda
Update qhelp file
2021-04-05 13:56:43 -04:00
jorgectf
d22da880e7
Fix verifiesSignature()
2021-04-04 20:31:07 +02:00
jorgectf
198f8dcc1f
Improve predicates
2021-04-03 23:01:50 +02:00
jorgectf
7ed7809a60
Use LocalSourceNode and flowsTo() for better performance
2021-04-02 21:17:18 +02:00
jorgectf
513055cae5
Change old comments
2021-04-01 18:45:39 +02:00
jorgectf
ee70eb709c
Remove old comment
2021-04-01 18:34:54 +02:00
jorgectf
5edb3b1153
Query upload
2021-04-01 18:31:45 +02:00
jorgectf
15e176a3b8
Polish query select
2021-04-01 13:00:12 +02:00
jorgectf
f980d0694b
Fix taint configs
2021-04-01 12:50:25 +02:00
jorgectf
c8740a2031
Update naming
2021-04-01 12:41:11 +02:00
jorgectf
3a47a45e47
Attempt to apply TaintTracking2
2021-03-31 18:49:41 +02:00
jorgectf
f0a50eb67a
Polish up configs
2021-03-31 17:58:18 +02:00
jorgectf
017a826b30
Remove unused class variables
2021-03-31 17:52:03 +02:00
jorgectf
5a1dc48e48
Fix Mongoengine test
2021-03-31 17:50:31 +02:00
jorgectf
7a4dc46341
Fix Sinks
2021-03-31 17:50:05 +02:00
jorgectf
01f9d4a1b0
Fix MongoEngine Sink
2021-03-31 15:50:45 +02:00
edvraa
13080703b9
Make query symmetric
2021-03-31 15:59:19 +03:00
edvraa
f8867e40a7
Rename deserializeCall to deserializeCallArg
2021-03-31 15:49:17 +03:00
edvraa
aa9d84854f
Rename taint tracking variables
2021-03-31 15:42:52 +03:00
edvraa
7cbbd6cc89
Simplify query
2021-03-31 15:35:54 +03:00
edvraa
8bb3be2677
Fix comment
2021-03-31 15:31:14 +03:00
edvraa
94234b8b02
Rename ObjectMethodSink to InstanceMethodSink
2021-03-31 15:22:30 +03:00
jorgectf
ccd57bea7a
Fix imports
2021-03-30 21:17:11 +02:00
jorgectf
4579132f22
Add left tests
2021-03-30 21:14:33 +02:00
jorgectf
d856f160c8
Adapt query configs and custom classes
2021-03-30 21:14:21 +02:00
jorgectf
bd5ff01ebb
PyMongo and Mongoengine sinks
2021-03-30 21:13:43 +02:00
jorgectf
aea7546cf9
Add Concepts
2021-03-30 21:13:15 +02:00
jorgectf
517a9202ce
PR init
2021-03-30 17:51:17 +02:00
Arthur Baars
f12e6ea8ea
Avoid 'Object::' prefixes
2021-03-30 16:14:21 +02:00
Arthur Baars
b2c7185664
Add tests
2021-03-30 15:49:41 +02:00
Arthur Baars
201c1e4b81
Basic module resolution
2021-03-30 15:40:03 +02:00
Arthur Baars
ea9afcd4e1
AST: make some classes instance of Scope
2021-03-30 15:40:03 +02:00
Arthur Baars
eebbc7e505
AST: rename Class/Module to ClassDefinition/ModuleDefinition
2021-03-30 15:40:01 +02:00
mr-sherman
bf2d7b3a16
Added IRestClientAsync methods to external location sink. Removed import from
...
Remote.qll, as it is un-necessary now.
2021-03-29 14:37:51 -04:00
mr-sherman
13997caa32
feedback from code review
2021-03-26 16:29:14 -04:00
Tom Hvitved
aad5d133d0
Merge pull request #161 from github/hvitved/cfg-remove-is-hidden
...
CFG: Remove `isHidden()` predicate
2021-03-25 15:08:17 +01:00
Tom Hvitved
0bb5007103
Reintroduce hidden then/else/do in AST; include all in CFG
2021-03-25 14:22:35 +01:00
Tom Hvitved
58ecd771d3
AST: Exclude empty then/else/do statements
2021-03-25 09:53:55 +01:00
Tom Hvitved
ca7c0584c7
CFG: Remove isHidden() predicate
2021-03-24 17:22:05 +01:00
Tom Hvitved
9472cef492
Merge pull request #160 from github/bump-codeql
...
Bump `codeql` sub module and implement new data-flow stubs
2021-03-24 15:34:42 +01:00
Tom Hvitved
6c00e66272
Update ql/src/codeql_ruby/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-03-24 15:02:30 +01:00
Tom Hvitved
b8f65fb756
Bump codeql sub module and implement new data-flow stubs
2021-03-24 14:00:21 +01:00
mr-sherman
3e889c398e
updated document formatting
2021-03-23 10:09:30 -04:00
Arthur Baars
d103acb04f
Merge pull request #158 from github/hvitved/vscode-hide-codeql-submodule
...
Hide `codeql` sub module in VS Code workspace
2021-03-23 10:41:32 +01:00
Arthur Baars
6a26483fc7
Merge pull request #159 from github/hvitved/herdoc-body-rank-performance
...
Improve performance of `HereDoc::getBody()`
2021-03-23 10:40:28 +01:00
Tom Hvitved
2891d94f99
Improve performance of HereDoc::getBody()
...
Gets rid of
```
[2021-03-23 10:07:49] (138s) Tuple counts for Literal::HereDoc::getBody_dispred#ff#shared#1/4@1cc5b9:
11294 ~0% {1} r1 = SCAN AST::Cached::THereDoc#ff@staged_ext OUTPUT In.0
11294 ~388% {1} r2 = JOIN r1 WITH Literal::HereDoc::getBody_dispred#ff#join_rhs ON FIRST 1 OUTPUT Rhs.1 'arg1'
95514613 ~2080% {4} r3 = JOIN r2 WITH locations_default_1023#join_rhs ON FIRST 1 OUTPUT Rhs.1 'arg0', Lhs.0 'arg1', Rhs.2 'arg2', Rhs.3 'arg3'
```
2021-03-23 10:31:48 +01:00
Tom Hvitved
1004363131
Hide codeql sub module in VS Code workspace
2021-03-23 09:55:56 +01:00
mr-sherman
858c0e67a1
added support for remote flow sinks in the form of parameters to the function
...
ServiceStack.IRestClient.Get()
2021-03-22 19:27:49 -04:00
Nick Rolfe
b293522710
Merge pull request #150 from github/parent_child
...
Create `ast_node_parent` relation
2021-03-22 15:06:50 +00:00
Nick Rolfe
e7f1ae8c96
Merge remote-tracking branch 'origin/main' into parent_child
2021-03-22 14:58:33 +00:00
Nick Rolfe
3284a3fc1f
Merge pull request #157 from github/cfg_impl
...
Port CFG implementation to public AST interface
2021-03-22 14:57:43 +00:00
edvraa
ac29184521
deserialization sinks
2021-03-20 21:50:46 +02:00
Nick Rolfe
cf7ce911bc
Combine CfgScope classes for BodyStmt ∩ Callable
2021-03-19 16:08:43 +00:00
Nick Rolfe
7667606b89
Replace some uses of Generated types
2021-03-19 14:31:17 +00:00
Nick Rolfe
21192bf43c
Remove outdated comment
2021-03-19 14:28:26 +00:00
Nick Rolfe
f37c862c92
Rename MandatoryParameterTree to NonDefaultValueParameterTree
2021-03-19 14:27:29 +00:00
Nick Rolfe
c6958f64e4
Make CFG for AssignExpr visit left operand before right
2021-03-19 14:25:38 +00:00
Nick Rolfe
f381f94bc2
Rename ProgramScope to ToplevelScope
2021-03-19 14:02:54 +00:00
Nick Rolfe
5cedf7ee86
Remove unused import
2021-03-19 13:59:02 +00:00
Tom Hvitved
e175513293
Remove duplicate tuple patterns
2021-03-19 10:52:29 +01:00
jorgectf
957b3e1e85
Precision warn
2021-03-18 20:39:53 +01:00
jorgectf
3ce0a9c8c0
Move to experimental folder
2021-03-18 20:20:04 +01:00
Nick Rolfe
c0636bef29
Make CfgScope extend Scope
2021-03-18 19:08:51 +00:00
Nick Rolfe
6bcc433af3
Uncomment empty class and module in CFG test
2021-03-18 19:02:32 +00:00
Nick Rolfe
9493997e9d
Make space in CFG test for two new lines in the middle
...
Commented out to make it easier to ignore the noise from line number
changes.
2021-03-18 19:01:11 +00:00
Nick Rolfe
37435764a0
Fix control-flow for empty classes and modules
2021-03-18 18:58:40 +00:00
jorgectf
7de9214c99
Upload LDAP Insecure authentication query and tests
2021-03-18 17:41:34 +01:00
Nick Rolfe
434d9e54a1
Fix complex symbols having multiple ControlFlowTree implementations
2021-03-18 14:48:08 +00:00
Nick Rolfe
4ce7faf868
Fix erroneous flow from 'raise' call to StmtSequence
2021-03-18 13:01:27 +00:00
Nick Rolfe
ceda7c8fd2
Generalise splitting of parenthesized exprs to all statement sequences
2021-03-18 11:21:11 +00:00
Nick Rolfe
c8eab42c1d
Minor comment fixes
2021-03-18 11:09:21 +00:00
Tom Hvitved
3bb2c529a5
CFG: Revert change to mandatory parameters
2021-03-18 10:43:10 +01:00
Arthur Baars
d4030c66d8
Update Consistency.qll
2021-03-18 09:54:44 +01:00
Tom Hvitved
c761ab6882
Merge pull request #156 from github/hvitved/ipa-ast
...
Make external `AstNode` an IPA type
2021-03-17 22:23:05 +01:00
Nick Rolfe
32e2b257bf
Port CFG implementation to public AST interface
2021-03-17 20:28:47 +00:00
Nick Rolfe
26c251f080
Order CFG nodes by column as well
2021-03-17 19:07:52 +00:00
Tom Hvitved
39aa2c6e53
Rework IPA injectors for constant accesses
2021-03-17 14:27:21 +01:00
Tom Hvitved
eb7610c55f
Rename (to|from)TreeSitter to (to|from)Generated
2021-03-17 09:28:23 +01:00
Tom Hvitved
5724112513
Address review comments
2021-03-17 09:28:18 +01:00
Tom Hvitved
7eaf02a0bf
Make external AstNode an IPA type
2021-03-16 12:50:20 +01:00
Arthur Baars
c672169621
Merge pull request #155 from github/aibaars/order-ast-test
...
AST: order edges by target node
2021-03-15 10:43:34 +01:00
Arthur Baars
d54db292f7
Move semmle.order property to printAst.qll
2021-03-15 10:33:10 +01:00
Arthur Baars
3e5ff1d042
AST: order edges by target node
...
When printing a tree CodeQL iterates over the nodes and
for each node prints the successor edges as children. If the
the successor edges are ordered by target node then the children
printe in the right order in the expected output.
2021-03-12 16:52:34 +01:00
Arthur Baars
cde496cc4c
Merge pull request #152 from github/aibaars/fix-vars
...
Fix VariableRead/WriteAcess for instance and class variables
2021-03-11 17:05:56 +01:00
Calum Grant
bf873c8ad1
Merge pull request #147 from github/calumgrant/use-detect
...
Ruby: New query UseDetect
2021-03-10 14:39:37 +00:00
Calum Grant
cb977cb290
Ruby: Use getAUniqueRead TC
2021-03-10 10:56:33 +00:00
Arthur Baars
3966de6b2b
Merge pull request #151 from github/aibaars/scopes-refactor
...
Add Scopes.qll and remove VariableScopes IPA type
2021-03-09 20:55:18 +01:00
Arthur Baars
6a284378d6
Update ql/src/codeql_ruby/ast/Scope.qll
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-03-09 18:57:24 +01:00
Arthur Baars
f28071ceb6
Fix VariableRead/WriteAcess for instance and class variables
2021-03-09 13:55:55 +01:00
Arthur Baars
600d9c66ae
Remove VariableScope
2021-03-09 11:56:17 +01:00
Arthur Baars
86a89ab1fe
Remove VariableScope IPA type
2021-03-09 11:48:18 +01:00
Calum Grant
855d190800
Ruby: Test local data flow
2021-03-09 10:25:24 +00:00
Calum Grant
5b4bf584a1
Ruby: Update qltest output for new select format
2021-03-09 10:20:23 +00:00
Calum Grant
0f829476f4
Ruby: Refactor EndCall to reduce number of classes
2021-03-09 10:13:07 +00:00
Arthur Baars
00260db58f
Add Scope.qll
2021-03-09 09:46:42 +01:00
Nick Rolfe
56e03d7ed4
Remove old upgrades
2021-03-08 18:28:23 +00:00
Nick Rolfe
be102e24f6
Update stats
2021-03-08 18:25:37 +00:00
Nick Rolfe
f691ec9e2a
Remove overrides of getParent[Index]
2021-03-08 18:25:37 +00:00
Nick Rolfe
9b96bc32cc
Add ast_node_parent relation
2021-03-08 18:25:37 +00:00
Nick Rolfe
61b3aa8f27
Merge pull request #149 from github/manual_stats_workflow
...
Enable manual dispatch of stats workflow
2021-03-08 14:28:27 +00:00
Nick Rolfe
df8f7a30d7
Enable manual dispatch of stats workflow
2021-03-08 14:10:37 +00:00
Nick Rolfe
1818b68ea2
Merge pull request #148 from github/calumgrant/readme-qltest
...
Update README.md
2021-03-04 19:36:42 +00:00
Calum Grant
67416a6440
Update README.md
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-03-04 17:19:34 +00:00
Calum Grant
0be5c529ee
Update README.md
2021-03-04 16:03:23 +00:00
Calum Grant
20a62d169a
Ruby: Update query description
2021-03-04 15:48:09 +00:00
Calum Grant
ca497479c2
Ruby: Finish the test for UseDetect
2021-03-04 15:44:05 +00:00
Calum Grant
522bcff79d
Ruby: Initial test case
2021-03-04 15:38:09 +00:00
Calum Grant
5854b831f3
Ruby: rb/use-detect query
2021-03-04 13:43:59 +00:00
Arthur Baars
ce69c912fd
Merge pull request #145 from github/aibaars/fix
...
Fix regression in rb/unused-parameter
2021-03-01 12:26:47 +01:00
Arthur Baars
c9f86743bd
Merge pull request #143 from github/aibaars/ast-test
...
AST: add printAST test case
2021-02-26 19:41:56 +01:00
Arthur Baars
b2fbeee794
CFG: hide all non-AstNodes
2021-02-26 19:04:33 +01:00
Arthur Baars
5f32b822e2
Remove use of AstNodes
2021-02-26 19:03:55 +01:00
Arthur Baars
dd4f297c37
Remove duplicate clause
2021-02-26 17:51:04 +01:00
Arthur Baars
39181ec871
AST: printAST: show all primary classes and method names
2021-02-25 15:25:49 +01:00
Arthur Baars
e2b2a450ac
AST: add printAST test case
2021-02-25 15:25:49 +01:00
Arthur Baars
75883b94cd
QLTest: ignore *.testproj folders
2021-02-25 15:25:42 +01:00
Arthur Baars
7ab147a7b8
Merge pull request #144 from github/aibaars/missing
...
AST: add missing getAPrimaryQlClass predicate
2021-02-25 15:18:29 +01:00
Arthur Baars
a6bb34c86d
AST: add missing getAPrimaryQlClass predicate
2021-02-25 14:59:39 +01:00
Arthur Baars
fa7adee245
Merge pull request #142 from github/aibaars/clean-up
...
Remove as many references to TreeSitter::Generated
2021-02-25 14:28:09 +01:00
Arthur Baars
9800e3f930
Add some TODO comments
2021-02-25 13:43:36 +01:00
Arthur Baars
f3d1c804be
Update test data
2021-02-25 12:57:18 +01:00
Arthur Baars
7c0ea7b3bc
CFG: add AstNode for @in
2021-02-25 12:57:18 +01:00
Arthur Baars
b16d6bf5b4
CFG: make isValidFor work for hidden nodes
2021-02-25 12:57:18 +01:00
Arthur Baars
9fc5c43412
Clean-up Completion.qll
2021-02-25 12:57:18 +01:00
Arthur Baars
999b82ca73
Remove imports of TreeSitter
2021-02-25 12:57:18 +01:00
Arthur Baars
d30912611b
Merge pull request #136 from github/aibaars/child-parent
...
Finish AST and add consistency query
2021-02-25 12:54:45 +01:00
Arthur Baars
27a2310840
CFG: sort expected output by file path and line
2021-02-25 12:27:11 +01:00
Arthur Baars
87b2c142bc
Update qldoc
2021-02-25 10:23:29 +01:00
Arthur Baars
4ba0f3088a
Use strictcount
2021-02-25 10:21:07 +01:00
Arthur Baars
0f940349ba
AST: rename getExpr predicates to more meaningful names
2021-02-25 10:11:29 +01:00
Arthur Baars
1a73cf6cc4
AST: add ArgumentList
2021-02-24 19:07:16 +01:00
Arthur Baars
336b310668
AST: improve AST for special parameters
2021-02-24 19:07:16 +01:00
Arthur Baars
8913810bf0
AST: change return type of Assignment LHS to Pattern
2021-02-24 19:07:16 +01:00
Arthur Baars
190978cc56
AST: add consistency query
2021-02-24 19:07:16 +01:00
Arthur Baars
cb21e8edda
CFG: hide nodes that are not proper AstNodes
2021-02-24 19:07:16 +01:00
Arthur Baars
14474d660b
AST: change types to Stmt
2021-02-24 19:07:16 +01:00
Arthur Baars
3288070279
Merge pull request #131 from github/aibaars/pattern
...
AST: split method call into normal and setter calls
2021-02-24 19:03:55 +01:00
Arthur Baars
a7408dd262
Merge pull request #140 from github/aibaars/namespace
...
AST: introduce 'Namespace' as super class of Class/Module
2021-02-24 13:22:02 +01:00
Arthur Baars
242481c701
Apply suggestions from code review
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-02-24 13:13:47 +01:00
Arthur Baars
d6c0049a7e
AST: make SetterMethodCall instance of MethodCall
2021-02-24 13:06:54 +01:00
Arthur Baars
7ae20f3b5b
AST: add SetterMethodCall as instance of LhsExpr
2021-02-24 13:06:54 +01:00
Arthur Baars
79bb20b31f
AST: add MethodCall as a subclass of Call
2021-02-24 13:06:53 +01:00
Arthur Baars
5fe7bd57fa
AST: calls without method name
2021-02-24 13:02:22 +01:00
Arthur Baars
eaeabf19bf
Merge pull request #141 from github/bump_ts
...
Add support for multiple statements in interpolations
2021-02-24 11:29:26 +01:00
Nick Rolfe
37253fd1f1
Update stats for dbscheme change to interpolation_child
2021-02-23 16:08:24 +00:00
Nick Rolfe
6c84f2c3dc
Add test case for multiple statements in interpolation
2021-02-23 15:52:11 +00:00
Nick Rolfe
672148e5b4
Add support for multiple statements in interpolations
2021-02-23 15:36:14 +00:00
Arthur Baars
a7ddd642ea
AST: introduce 'Namespace' as super class of Class/Module
2021-02-19 13:34:34 +01:00
Arthur Baars
098e0ac142
Merge pull request #139 from github/printast
...
printAst: use the user-facing AST library
2021-02-19 09:46:27 +01:00
Nick Rolfe
d52e439547
printAst: use the user-facing AST library
2021-02-18 18:25:57 +00:00
Arthur Baars
370135fab7
Merge pull request #138 from github/aibaars/part-1
...
AST: getChild/getParent
2021-02-18 19:00:08 +01:00
Arthur Baars
1c8a76f44a
AST: make Assignment::getLeftOperand a Pattern again
2021-02-18 18:14:55 +01:00
Arthur Baars
c877eb4642
AST: add additional token-types to variable patterns
2021-02-18 14:37:58 +01:00
Arthur Baars
3ee83870b6
AST: add begin expressions
2021-02-18 14:37:58 +01:00
Arthur Baars
5659388ec0
AST: implement AstNode::child
2021-02-18 14:37:58 +01:00
Arthur Baars
c0b5ac760a
AST: rename getLhs/getRhs to getLeftOperand/getRightOperand
2021-02-18 14:37:58 +01:00
Arthur Baars
095eb803b3
AST: improve type of getDefaultValue
2021-02-18 14:37:58 +01:00
Arthur Baars
e42d1ff936
Change Expr to LhsExpr for getVariableExpr
2021-02-18 14:37:58 +01:00
Arthur Baars
214f113016
AST: add getChild/getParent method
2021-02-18 14:37:53 +01:00
Nick Rolfe
ac3da22158
Merge pull request #137 from github/scope_tostring
...
Include file/class/method/module names in VariableScope::toString
2021-02-17 19:24:36 +00:00
Nick Rolfe
b8bbbe92f3
Include file/class/method/module names in VariableScope::toString
2021-02-17 18:10:03 +00:00
Nick Rolfe
aedf093e72
Merge pull request #135 from github/aibaars/heredoc
...
AST: HereDoc
2021-02-17 17:18:38 +00:00
Arthur Baars
cabe6df820
Add missing heredoc end token
2021-02-17 15:58:13 +01:00
Arthur Baars
e1047fad2c
CFG: remove intermediate HeredocBody nodes
2021-02-17 13:10:18 +01:00
Arthur Baars
167574d82f
AST: HereDoc
2021-02-17 13:10:18 +01:00
Arthur Baars
1e19904342
Merge pull request #134 from github/literals
...
Add and expand AST classes for literals
2021-02-17 13:09:02 +01:00
Nick Rolfe
c019da83f3
Address feedback on StringInterpolationComponent::getStmt
2021-02-17 10:57:01 +00:00
Nick Rolfe
97654eb338
Simplify bash script
2021-02-17 10:48:17 +00:00
Arthur Baars
4f5b1c06ac
Merge branch 'main' into literals
2021-02-16 19:30:03 +01:00
Arthur Baars
3f4b4b360e
Merge pull request #133 from github/aibaars/pattern-0
...
AST: RestAssignment and LhsExpr
2021-02-16 19:29:15 +01:00
Nick Rolfe
3978d6387e
Update tree-sitter-ruby revision used
2021-02-16 16:49:59 +00:00
Nick Rolfe
4537e5d6f8
Update expected test output to match truncation of long strings
2021-02-16 16:21:49 +00:00
Nick Rolfe
02f853b8fd
Add r suffix to RationalLiteral::getValueText()
2021-02-16 16:21:28 +00:00
Nick Rolfe
cd38b980a8
Update dbscheme stats
2021-02-16 16:13:00 +00:00
Nick Rolfe
fff5dad702
Truncate long strings in StringlikeLiteral::toString()
2021-02-16 16:11:41 +00:00
Arthur Baars
7dd429c945
Format Expr.qll
2021-02-16 15:41:44 +00:00
Nick Rolfe
1c869f6d85
Make merge_stats.py work in python3
2021-02-16 15:41:44 +00:00
Nick Rolfe
5e6ef5c8b5
Upgrade script for dbscheme changes to range_*
2021-02-16 15:41:44 +00:00
Nick Rolfe
2eb8757285
Update expected test output for toString changes
2021-02-16 15:41:05 +00:00
Nick Rolfe
f56f81f555
Add and expand AST classes for literals
2021-02-16 15:41:05 +00:00
Arthur Baars
c4b3c8bc28
More QLDoc for LhsExpr
2021-02-16 16:09:56 +01:00
Arthur Baars
e3cf226679
AST: make ConstantWriteAccess extend LhsExpr
2021-02-16 13:03:04 +01:00
Arthur Baars
9d449a90c2
AST: add LhsExpr
2021-02-16 13:02:02 +01:00
Arthur Baars
7778f1c21f
AST: make Pattern:Range abstract
2021-02-16 13:01:00 +01:00
Arthur Baars
9c5da197ed
AST: add Pattern::getRestIndex
2021-02-16 12:56:06 +01:00
Arthur Baars
eee12eecc9
Merge pull request #132 from github/rescue_naming
...
Rename {Rescue,RescueExpr} to {RescueExpr,RescueModifierExpr}
2021-02-16 12:54:19 +01:00
Nick Rolfe
04ad1f805a
Update rust auto-formatting for 1.50
2021-02-16 11:47:24 +00:00
Nick Rolfe
0fc19ea7a9
Rename RescueExpr to RescueClause
2021-02-16 11:46:30 +00:00
Nick Rolfe
cf50006d68
Rename {Rescue,RescueExpr} to {RescueExpr,RescueModifierExpr}
2021-02-16 11:09:25 +00:00
Arthur Baars
90f59de589
Merge pull request #130 from github/aibaars/ast-5
...
AST: add ElementReference as call
2021-02-15 14:59:34 +01:00
Arthur Baars
ad6c916f01
Merge pull request #129 from github/aibaars/ast-4
...
AST: rescue modifier
2021-02-15 14:59:22 +01:00
Arthur Baars
c6c39ad04d
Merge pull request #128 from github/aibaars/ast-3
...
AST: undef and alias
2021-02-15 14:59:12 +01:00
Arthur Baars
5b8c74eb5b
AST: add SingletonMethod::getObject
2021-02-15 13:53:50 +01:00
Arthur Baars
e3f54411d8
AST: add ElementReference
2021-02-15 13:51:16 +01:00
Arthur Baars
d69a1731f9
Fix QL doc
2021-02-15 12:53:13 +01:00
Arthur Baars
ddea74265d
AST: rescue modifier
2021-02-15 12:50:00 +01:00
Arthur Baars
9cb58be5cf
AST: avoid multivalued results for MethodName::getValueText
2021-02-15 10:39:21 +01:00
Arthur Baars
8a4f27c052
Add test case
2021-02-12 19:23:13 +01:00
Arthur Baars
5f1907efc4
AST: undef and alias
2021-02-12 19:22:51 +01:00
Arthur Baars
392af7fe76
Merge pull request #127 from github/aibaars/ast-2
...
Some more AST
2021-02-12 18:40:24 +01:00
Arthur Baars
c0c155361f
Address comments
2021-02-12 18:31:44 +01:00
Arthur Baars
874ac121d9
AST: Toplevel and BEGIN/ END blocks
2021-02-12 15:26:30 +01:00
Arthur Baars
015b581f57
AST: add redo, retry, empty-statement
2021-02-12 15:18:28 +01:00
Arthur Baars
64cba18c41
AST: add Self class
2021-02-12 14:09:00 +01:00
Arthur Baars
ce824f4adb
Merge pull request #126 from github/aibaars/rescue
...
AST: rescue clauses
2021-02-12 14:08:31 +01:00
Arthur Baars
63f67aa04e
AST: rename getVariable to getVariableExpr
2021-02-12 13:35:17 +01:00
luchua-bc
6bfe2f2ba6
Add more sinks
2021-02-11 17:53:42 +00:00
Tom Hvitved
1aaebeea76
Merge pull request #125 from github/hvitved/cfg-to-string
...
CFG: Reintroduce `toString()`s
2021-02-11 18:46:26 +01:00
Arthur Baars
43b238f729
AST: rescue clauses
2021-02-11 18:40:29 +01:00
Tom Hvitved
c4ee79ed27
CFG: Reintroduce toString()s
2021-02-11 18:37:18 +01:00
Nick Rolfe
307db73c9c
Merge pull request #124 from github/aibaars/ast-stmt-expr
...
AST: make Expr extend Stmt and change ExprSequence to StmtSequence
2021-02-11 17:00:21 +00:00
Arthur Baars
f9e9dc2304
Address comment
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-02-11 17:53:28 +01:00
Arthur Baars
c4e2c87d82
AST: some statement tests
2021-02-11 17:20:11 +01:00
Arthur Baars
d42b6b651e
AST: rename ExprSequence to StmtSequence
2021-02-11 17:20:10 +01:00
Arthur Baars
fd6aeba9f5
AST: make Expr extend Stmt
2021-02-11 17:20:10 +01:00
Arthur Baars
f02d4a977d
AST: some statement tests
2021-02-11 17:20:10 +01:00
Arthur Baars
d02d359c51
Merge pull request #122 from github/constants_scopes
...
Rework handling of scope resolution nodes, and add `ConstantAccess` class
2021-02-11 17:19:47 +01:00
Arthur Baars
ada652b6f0
Merge branch 'main' into constants_scopes
2021-02-11 17:00:50 +01:00
Nick Rolfe
885137dca2
Simplify representation of calls that use scope resolution operator.
...
Now, `Foo::bar` is a call where the receiver expr is `Foo`.
2021-02-11 15:29:42 +00:00
Arthur Baars
f8ce7276a3
Merge pull request #123 from github/aibaars/ast-ensure
...
AST: ensure and else blocks
2021-02-11 15:17:30 +01:00
Arthur Baars
a908f2fe86
Merge pull request #121 from github/aibaars/dataflow-2
...
Dataflow: identify ReturnNodes
2021-02-11 15:10:27 +01:00
Arthur Baars
426bf30822
AST: ensure and else blocks
2021-02-11 14:27:23 +01:00
Arthur Baars
4f3412fff9
Address comments
2021-02-11 13:46:34 +01:00
Nick Rolfe
23998e5f99
Accept CFG test changes
...
Some generated ScopeResolution nodes are no longer represented in the
user-facing AST. These should go away when we port the CFG to the
user-facing AST.
2021-02-11 12:38:13 +00:00
Nick Rolfe
6ff0ebb94a
Add ConstantAccess class
2021-02-11 12:29:25 +00:00
luchua-bc
f1788ed04e
Revamp the query to handle more cases
2021-02-11 04:33:42 +00:00
Nick Rolfe
452a343e86
Remove ScopeResolution from AST
...
Now we handle it specially in calls and class/module names, so they have
predicate to get the scope expr.
2021-02-10 17:53:25 +00:00
Arthur Baars
0f6854301e
Dataflow: identify ReturnNodes
2021-02-10 18:26:11 +01:00
Arthur Baars
d69aa96f23
More tests
2021-02-10 18:26:11 +01:00
Arthur Baars
6c63bd2586
Merge pull request #120 from github/aibaars/ast
...
AST: lambda and block bodies
2021-02-10 18:25:37 +01:00
Arthur Baars
635b6fb45b
AST: lambda and brace block bodies
2021-02-10 14:45:14 +01:00
Arthur Baars
d4ebcbf18f
Merge pull request #118 from github/aibaars/dataflow
...
More dataflow steps
2021-02-09 20:36:28 +01:00
Tom Hvitved
9cfc08319d
Use Generated::AstNode in ExprChildMapping
2021-02-09 19:32:41 +01:00
Arthur Baars
1e64b264ba
Fix compilation errors after merge
2021-02-09 18:50:30 +01:00
Arthur Baars
3e0b7c491a
Merge remote-tracking branch 'origin/main' into aibaars/dataflow
2021-02-09 18:49:53 +01:00
Tom Hvitved
248f5cd648
Merge pull request #119 from github/hvitved/ast-range
...
Rangify `AstNode`
2021-02-09 16:47:50 +01:00
Tom Hvitved
85c13a1190
Make entries in RemoveWhenFullCoverage explicit
2021-02-09 16:34:25 +01:00
Arthur Baars
daa7bd7fd4
Move ReturningStmt::getValue implementation to internal library
2021-02-09 14:01:08 +01:00
Arthur Baars
e398837bdc
Rename Statement to Stmt
2021-02-09 13:55:06 +01:00
Arthur Baars
bb89e134c4
Address comments
2021-02-09 13:54:46 +01:00
Tom Hvitved
32daf28b34
Rangify AstNode
2021-02-09 12:17:21 +01:00
Arthur Baars
a752491c5f
Add flow steps for loop 'return' values
2021-02-08 19:06:07 +01:00
Arthur Baars
adb88df638
Add flow steps for conditional and case expressions
2021-02-08 19:00:47 +01:00
Arthur Baars
c991d550cd
AST: add Statement and ReturningStatement
2021-02-08 19:00:47 +01:00
Arthur Baars
bde04d48a2
Merge pull request #116 from github/aibaars/cfg-loop-post-order
...
CFG: make loop expressions post order
2021-02-08 09:53:25 +01:00
Arthur Baars
f2a6f3aadc
Update comments
2021-02-08 09:47:33 +01:00
Arthur Baars
37c4e6cbdf
Merge pull request #98 from github/aibaars/erb-extractor
...
Quick and dirty ERB extraction
2021-02-05 18:45:47 +01:00
Arthur Baars
b553eb6964
CFG: make 'for .. in' post-order
...
Use the 'in' as the intermediate node that checks whether the Enumerable
has more elements.
2021-02-05 18:23:31 +01:00
Arthur Baars
4ae55a718a
CFG: make 'while' post-order
2021-02-05 18:23:31 +01:00
Arthur Baars
5bb32b983c
Merge pull request #115 from github/aibaars/dataflow
...
My first dataflow step
2021-02-05 14:13:38 +01:00
Arthur Baars
846173732b
Add newline at the end of each code region in an ERB file
2021-02-05 09:49:25 +01:00
Arthur Baars
9d974bd56d
Extract ERB files
2021-02-05 09:48:54 +01:00
Arthur Baars
bc55fa861e
Merge pull request #114 from github/aibaars/fix-scopes
...
Correct the scope of class/method names etc.
2021-02-04 17:22:25 +01:00
Arthur Baars
83bcd26244
Add dataflow step tests
2021-02-04 16:09:50 +01:00
Arthur Baars
62802d53c8
Ensure module/class/methods and their headers belong to the right CfgScope
2021-02-04 15:32:20 +01:00
Arthur Baars
bfc5ee3149
Correct the scope of class/method names etc.
2021-02-04 15:30:58 +01:00
Arthur Baars
a998879897
Add local flow step for parenthesized expressions
2021-02-04 14:06:58 +01:00
Arthur Baars
f8cca01e6f
Restrict assigment flow to normal assignments only
2021-02-04 14:04:58 +01:00
Arthur Baars
8368a39f00
QLDoc updates
2021-02-04 13:40:06 +01:00
Arthur Baars
da565875df
Merge pull request #112 from github/hvitved/ssa/shared-sync
...
SSA: Sync with latest changes
2021-02-04 13:39:32 +01:00
Arthur Baars
8cec8699a7
Merge pull request #113 from github/aibaars/parenthesized-expr
...
AST: add ParenthesizedExpr
2021-02-04 13:36:47 +01:00
Arthur Baars
2035bc4d3a
AST: add ParenthesizedExpr
2021-02-04 11:51:05 +01:00
Nick Rolfe
61d9669655
Merge pull request #110 from github/class_ast
...
Add AST classes for classes and modules
2021-02-03 19:32:55 +00:00
Tom Hvitved
16c4faef6a
SSA: Sync with latest changes
...
Now that the shared SSA library supports uncertain/pseudo reads, we can simplify
the Ruby implementation.
2021-02-03 20:31:36 +01:00
Nick Rolfe
c5fca0cb6b
Add ModuleBase base class and combine class/module tests
2021-02-03 16:13:59 +00:00
Arthur Baars
3c0f822369
Merge pull request #111 from github/hvitved/dataflow
...
Initial data flow library
2021-02-03 13:43:08 +01:00
Tom Hvitved
de77a7f96d
Initial data-flow files
2021-02-03 10:57:14 +01:00
Nick Rolfe
8976cc556a
Update test to match removal of Module::getAClass()
2021-02-02 18:02:16 +00:00
Nick Rolfe
ee03e84d7f
Rename Class.qll to Module.qll
2021-02-02 18:00:29 +00:00
Nick Rolfe
645b8c2a8a
Apply suggestions from code review
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2021-02-02 17:54:00 +00:00
Tom Hvitved
f71505c29c
Data flow: Sync files
2021-02-02 13:03:42 +01:00
Nick Rolfe
6331a33b23
Update dbscheme stats
2021-02-01 14:41:00 +00:00
Nick Rolfe
c667791bde
Update expected test output to match toString() for classes and modules
2021-02-01 14:23:47 +00:00
Nick Rolfe
0649e6c3b0
Update CFG to handle separate superclass node
2021-02-01 14:23:47 +00:00
Nick Rolfe
fbc1c5e8c0
Add test for Module
2021-02-01 14:23:47 +00:00
Nick Rolfe
86bb8a246b
Add test for Class and SingletonClass
2021-02-01 14:23:47 +00:00
Nick Rolfe
d26822ad23
Add upgrade script moving superclass exprs to own table
2021-02-01 14:23:47 +00:00
Nick Rolfe
443a992a90
Add AST classes for classes and modules
2021-02-01 14:23:41 +00:00
Arthur Baars
2770b4fef8
Merge pull request #104 from github/aibaars/variables
...
Simple implementation of class and instance variables
2021-01-29 18:28:25 +01:00
Arthur Baars
c33c3a1124
Address comments
2021-01-29 17:45:48 +01:00
Arthur Baars
6a7e3bfc10
Address comments
2021-01-29 17:45:48 +01:00
Arthur Baars
2921f72473
Implement class variables
2021-01-29 17:45:48 +01:00
Arthur Baars
a07e0fb0f7
Class variables boilerplate code
2021-01-29 17:45:44 +01:00
Arthur Baars
341bc5c888
Implement instance variables
2021-01-29 16:09:44 +01:00
Arthur Baars
e36795c82e
Instance variables boilerplate code
2021-01-29 15:41:23 +01:00
Arthur Baars
184d42efe0
Remove unnecessary clause
2021-01-29 15:39:31 +01:00
Arthur Baars
b04391636d
Fix qldoc comment
2021-01-29 15:39:31 +01:00
Tom Hvitved
f8790c81a8
Merge pull request #108 from github/hvitved/ssa
...
Add SSA library
2021-01-29 15:12:14 +01:00
Nick Rolfe
623ee59410
Merge pull request #106 from github/self
2021-01-28 20:16:48 +00:00
Nick Rolfe
30804f74e2
Remove redundant instanceof expression
2021-01-28 17:48:16 +00:00
Tom Hvitved
47fdee4bbe
Sync SsaImplCommon.qll with C# implementation
2021-01-28 09:09:37 +01:00
Tom Hvitved
05b8a6c27b
Apply suggestions from code review
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-01-28 08:49:42 +01:00
Nick Rolfe
640092352b
RegularSuperCallRange::getReceiver() never holds
2021-01-27 18:49:37 +00:00
Nick Rolfe
743e627a8d
Test calls to methods named 'super'
2021-01-27 18:45:08 +00:00
Nick Rolfe
70bbeaac3b
Simplify, since super tokens are never variable accesses
2021-01-27 18:28:01 +00:00
Tom Hvitved
b9b4325b84
Add initial mapping of CFG nodes to AST nodes
2021-01-27 15:38:49 +01:00
Tom Hvitved
edc6e7eba8
Add UnusedParameter.ql query
2021-01-27 10:47:42 +01:00
Tom Hvitved
9dfea8006d
Add UninitializedLocal.ql query
2021-01-27 10:44:49 +01:00
Tom Hvitved
8abedaee8a
Add DeadStoreOfLocal.ql query
2021-01-27 10:42:02 +01:00
Tom Hvitved
2077ba4a1f
Add SSA library
2021-01-27 10:39:19 +01:00
Nick Rolfe
6423ea3219
Merge pull request #107 from github/hvitved/index-files-working-dir
...
Add `--working-dir=.` to `index-files` call
2021-01-26 19:19:20 +00:00
Tom Hvitved
735eb24a33
Add --working-dir=. to index-files call
2021-01-26 19:31:16 +01:00
Nick Rolfe
7ac46bf8f8
Add SuperCall class for calls to super
2021-01-26 18:08:46 +00:00
luchua-bc
8ed2bc59ad
Add the c# program to src and address the issue with algorithm type
2021-01-26 17:29:52 +00:00
Tom Hvitved
d19053deda
Merge pull request #105 from github/hvitved/vcall
2021-01-25 18:41:36 +01:00
Tom Hvitved
2c6b9eceda
Move vcall into internal/Variable.qll
2021-01-25 16:26:11 +01:00
Tom Hvitved
ce74208317
Merge pull request #97 from github/hvitved/var-access-categorization
...
Categorize variable accesses into reads and (implicit or explicit) writes
2021-01-25 16:25:35 +01:00
Tom Hvitved
979da623ed
Merge pull request #103 from github/hvitved/cfg/params
...
CFG: Replace special parameters with their identifiers
2021-01-25 16:24:10 +01:00
Tom Hvitved
3a0c9a8104
CFG: Replace special parameters with their identifiers
...
For example, instead of including `**kwargs` in the CFG, we include `kwargs`.
This means that all variable accesses belonging to parameter definitions will
be included in the CFG.
2021-01-25 10:02:21 +01:00
Nick Rolfe
12fc0b914b
Merge pull request #102 from github/hvitved/blocks-no-params
...
Recognize blocks without parameters
2021-01-22 15:44:14 +00:00
Tom Hvitved
586885f066
Recognize blocks without parameters
2021-01-22 16:16:01 +01:00
Tom Hvitved
0f3a4a1a60
Merge pull request #101 from github/stats
...
Update stats
2021-01-22 16:05:47 +01:00
Nick Rolfe
216b1de2dd
Update stats
2021-01-22 14:35:43 +00:00
Nick Rolfe
858ca0b3bc
Merge pull request #100 from github/call_ast
...
Add AST classes and tests for method calls
2021-01-22 14:33:10 +00:00
Nick Rolfe
243dfde72e
Create ComplexSymbolRange class to deduplicate some predicates
2021-01-22 14:21:39 +00:00
Tom Hvitved
7e374c416a
Categorize variable accesses into reads and (implicit or explicit) writes
2021-01-22 13:17:26 +01:00
Nick Rolfe
3939008fd5
Small tweaks based on PR feedback
2021-01-22 12:17:17 +00:00
Nick Rolfe
ccd8a2aae6
Merge remote-tracking branch 'origin/main' into call_ast
2021-01-22 11:48:32 +00:00
Tom Hvitved
08c655e4e3
Merge pull request #99 from github/hvitved/cfg/to-string
...
CFG: Use manual `toString()`s for `AstCfgNode` when available
2021-01-21 14:10:16 +01:00
Nick Rolfe
2e8d154f2b
Add AST classes and tests for method calls
2021-01-20 18:34:25 +00:00
Tom Hvitved
bf7eb022a0
CFG: Use manual toString()s for AstCfgNode when available
2021-01-20 19:15:03 +01:00
luchua-bc
46fd5bd92e
Move test files to the test folder
2021-01-20 03:51:46 +00:00
Arthur Baars
78771ba4c2
Merge pull request #96 from github/hvitved/codeql-submodule-sync
...
Add `github/codeql` submodule and functionality for synchronizing files
2021-01-19 11:16:38 +01:00
Tom Hvitved
c11df1fe8c
Add sync-identical-files.py
2021-01-18 17:34:51 +01:00
Tom Hvitved
a41eea4fd7
Merge pull request #95 from github/hvitved/cfg/not-bug
...
CFG: Fix bug in `LogicalNotTree`
2021-01-18 16:05:39 +01:00
Tom Hvitved
e9a8afe284
Add github/codeql as a sub module
2021-01-18 15:54:39 +01:00
Tom Hvitved
34fe416a85
CFG: Fix bug in LogicalNotTree
2021-01-18 15:03:58 +01:00
Tom Hvitved
3f31775252
CFG: Add test for constant condition
2021-01-18 15:01:41 +01:00
luchua-bc
07f45a51f8
Query to detect hash without salt
2021-01-13 02:49:00 +00:00
Arthur Baars
03d407e50d
Merge pull request #82 from github/more_exprs
...
Add AST library for control expressions (conditionals and loops)
2021-01-11 10:35:37 +01:00
Nick Rolfe
6d7efab820
Add ConditionalLoop base class
2021-01-08 12:20:08 +00:00
Arthur Baars
c68f6a7f2e
Merge pull request #84 from github/aibaars/codeql-threads
...
Actions: apply CODEQL_THREADS to all steps
2021-01-08 13:19:01 +01:00
Nick Rolfe
6465c90a16
Rename IfOrElsifExpr to IfExpr; remove child classes
2021-01-08 11:53:15 +00:00
Nick Rolfe
15785b4535
Add db base type for CaseExpr::Range
2021-01-08 11:31:43 +00:00
Arthur Baars
4ef4053385
Actions: apply CODEQL_THREADS to all steps
2021-01-08 10:25:25 +01:00
Nick Rolfe
6efebf1e36
Merge remote-tracking branch 'origin/main' into more_exprs
2021-01-07 19:02:50 +00:00
Nick Rolfe
6c0804c1af
Address feedback on CFG change
2021-01-07 19:02:37 +00:00
Nick Rolfe
8cb8ead48e
Address more feedback on ExprSequence
2021-01-07 19:02:14 +00:00
Nick Rolfe
19a4e63ac6
Move comment about getCondition from class to predicate
2021-01-07 18:01:38 +00:00
Nick Rolfe
9a71bdc993
Improvements from feedback on case/when classes.
2021-01-07 17:48:51 +00:00
Nick Rolfe
36c7d3fe5b
Replace ConditionalExpr::get{Then,Else} with getBranch(boolean cond).
2021-01-07 17:32:41 +00:00
Nick Rolfe
e245382057
Merge pull request #83 from github/threads
...
Parallelize extraction
2021-01-07 17:14:41 +00:00
Nick Rolfe
f4abe7f4a1
Remove ThenExpr, ElseExpr, and DoExpr from public API
2021-01-07 15:56:31 +00:00
Nick Rolfe
83a28786a0
Use 4 threads for extraction and TRAP import in stats job
2021-01-07 11:17:07 +00:00
Nick Rolfe
1d3f06aca1
Simplify propagation of errors
2021-01-07 11:11:15 +00:00
Nick Rolfe
92c78e2b2d
Simplify num_codeql_threads function slightly
2021-01-07 11:10:43 +00:00
Nick Rolfe
bb2bdc01b5
Have the extract function create the TS parser object
2021-01-07 10:56:23 +00:00
Nick Rolfe
bf4eac5113
Parallelize extraction
...
Use the Rayon library to do parallel iteration over the file list. The
number of threads used respects the CODEQL_THREADS environment variable.
2021-01-06 18:22:27 +00:00
Nick Rolfe
f484b573f2
update stats for dbscheme change
2021-01-05 16:25:46 +00:00
Nick Rolfe
7c503120ae
Add AST library for control expressions (conditionals and loops)
2021-01-05 16:08:33 +00:00
Arthur Baars
c35283cefb
Merge pull request #77 from github/aibaars/global-variables
...
Add global variables
2020-12-21 12:15:31 +01:00
Arthur Baars
f0ddeaa9f2
Merge pull request #81 from github/aibaars/revert-dup-code
...
Update ruby.dbscheme.stats
2020-12-21 12:15:10 +01:00
Arthur Baars
ad1782b620
Address comments
2020-12-21 11:01:46 +01:00
Arthur Baars
8469bd3688
Uncomment getAPrimaryQlClass()
2020-12-21 11:01:46 +01:00
Arthur Baars
dc0de9132e
Add GlobalVariable
2020-12-21 11:01:46 +01:00
Arthur Baars
1ada9feda7
Make VariableAccess "abstract"
2020-12-21 11:01:46 +01:00
Arthur Baars
ebacec41d5
Update ruby.dbscheme.stats
2020-12-21 10:58:25 +01:00
Nick Rolfe
b1b2815c26
Merge pull request #80 from github/aibaars/revert-dup-code
...
Updates after CodeQL upgrade to 2.4.1
2020-12-21 09:57:59 +00:00
Arthur Baars
d4874641a3
Revert "Add duplicate code tables to dbscheme"
...
This reverts commit 4c699fcb32 .
2020-12-21 10:45:59 +01:00
Arthur Baars
bf232f0582
Update formatting for CodeQL 2.4.1
2020-12-21 10:45:59 +01:00
Arthur Baars
ff8ea6d44f
Merge pull request #79 from github/test_checks
...
Add all the TRAP check flags in qltest workflow
2020-12-21 10:20:47 +01:00
yo-h
402ed04189
Merge pull request #4844 from johnlugton/servicestack
...
Add provisional support for ServiceStack framework to feature branch
2020-12-18 16:24:27 -05:00
Nick Rolfe
5a54026bcc
Add all the TRAP check flags in qltest workflow
2020-12-18 17:25:28 +00:00
John Lugton
059d6b0e0f
Fix warning in ServiceStack.qll
2020-12-18 08:34:06 -08:00
John Lugton
563dc62c33
Improve qldoc for ServiceStack.qll
2020-12-18 08:23:27 -08:00
Arthur Baars
dddf0a66d9
Merge pull request #78 from github/typo
...
fix typo in comment
2020-12-18 13:50:58 +01:00
Nick Rolfe
72319b538f
fix typo in comment
2020-12-18 12:47:31 +00:00
Arthur Baars
8f1c916242
Merge pull request #66 from github/aibaars/cfg-2
...
CFG: make all simple nodes instance of StandardLeftToRight{Pre,Post}Tree
2020-12-18 13:26:05 +01:00
Nick Rolfe
c4ca537574
Merge pull request #75 from github/stmts_exprs
...
Add AST classes and tests for operations
2020-12-18 10:40:27 +00:00
Nick Rolfe
6c828214f7
Make import private
2020-12-18 10:23:19 +00:00
Nick Rolfe
53fbfc369d
Make params test pass for now
...
- some toString improvements
- comment out getAPrimaryQlClass predicates that cause the test to fail
2020-12-18 10:13:13 +00:00
Nick Rolfe
4718de08b2
Address review feedback
2020-12-18 10:08:45 +00:00
John Lugton
3f1f83f667
remove experimental
2020-12-17 16:24:52 -08:00
John Lugton
6d5f9035e6
Minor fixes to XSS:
...
Only want returns in request methods
Also care about non-string 1st args to HttpResult e.g. streams
2020-12-17 16:17:26 -08:00
John Lugton
7d47bffd53
Tidy up ServiceStack.qll
...
Use fully qualified names for classes
Make util predicate private
Make naming more consistent with rest of ql libs
2020-12-17 16:17:26 -08:00
Chelsea Boling
d4acccb13c
Update sink
2020-12-17 16:17:26 -08:00
Chelsea Boling
0a7e4b6840
Update sink based on feedback
2020-12-17 16:17:26 -08:00
Chelsea Boling
4e0f3a30ee
Update sink based on feedback
2020-12-17 16:17:25 -08:00
Chelsea Boling
ba46eaa143
Refactor sink
2020-12-17 16:17:25 -08:00
Chelsea Boling
3c493511e9
Update file
2020-12-17 16:17:25 -08:00
Chelsea Boling
12e8107492
Add example
2020-12-17 16:17:25 -08:00
Chelsea Boling
5c7dedffb3
Update sinks
2020-12-17 16:17:25 -08:00
Chelsea Boling
71a08c3237
Update servicestack lib
2020-12-17 16:17:25 -08:00
John Lugton
d408ae7e10
Split ServiceStack into modules and incorporate into main lib
2020-12-17 16:17:25 -08:00
John Lugton
386eb2d56b
move ServiceStack out of microsoft
2020-12-17 16:17:25 -08:00
Chelsea Boling
a2615339f7
Delete ServiceStack.qll
2020-12-17 16:17:24 -08:00
Chelsea Boling
cae6f91729
Create ServiceStack.qll
2020-12-17 16:17:24 -08:00
Chelsea Boling
dbe0170249
Add files via upload
2020-12-17 16:17:24 -08:00
Chelsea Boling
188dbde2d6
Create SQLInjection.ql
2020-12-17 16:17:24 -08:00
Chelsea Boling
96d11b7966
Create ServiceStack.qll
2020-12-17 16:17:24 -08:00
Nick Rolfe
a87fe410af
Simplify examples for unary plus/minus
2020-12-17 18:35:01 +00:00
Nick Rolfe
8b7af665b4
Simplify imports
2020-12-17 18:33:49 +00:00
Tom Hvitved
6893f57978
Merge pull request #74 from github/hvitved/cfg/fix-join-order
...
CFG: Fix bad join-order
2020-12-17 16:58:23 +01:00
Tom Hvitved
07c464b753
CFG: Fix bad join-order
...
Before:
```
[2020-12-17 11:33:46] (211s) Tuple counts for ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::nestedEnsure_dispred#ff/2@2ea588:
11409019 ~0% {2} r1 = SCAN ControlFlowGraphImpl::getScope#ff AS I OUTPUT I.<1>, I.<0> 'this'
3714296409 ~0% {3} r2 = JOIN r1 WITH ControlFlowGraphImpl::Trees::getAChildInScope#fff_102#join_rhs AS R ON FIRST 1 OUTPUT r1.<1> 'this', R.<1>, R.<2>
2359 ~0% {2} r3 = JOIN r2 WITH ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::getAnEnsureDescendant#ff AS R ON FIRST 2 OUTPUT r2.<2>, r2.<0> 'this'
1 ~0% {2} r4 = JOIN r3 WITH ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::getEnsure_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r3.<1> 'this', R.<1> 'innerBlock'
return r4
```
After:
```
[2020-12-17 15:20:37] (51s) Tuple counts for ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::nestedEnsure_dispred#ff/2@c4f57d:
635 ~1% {3} r1 = JOIN ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::getEnsure_dispred#ff_10#join_rhs AS L WITH ControlFlowGraphImpl::Trees::getAChildInScope#fff_201#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, L.<1> 'innerBlock', R.<2>
1 ~0% {3} r2 = JOIN r1 WITH ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::getAnEnsureDescendant#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1> 'this', r1.<2>, r1.<1> 'innerBlock'
1 ~0% {2} r3 = JOIN r2 WITH ControlFlowGraphImpl::getScope#ff AS R ON FIRST 2 OUTPUT r2.<0> 'this', r2.<2> 'innerBlock'
return r3
```
2020-12-17 16:46:03 +01:00
Arthur Baars
ff751b97d2
CFG: make all simple nodes instance of StandardLeftToRight{Pre,Post}Tree
2020-12-17 16:39:54 +01:00
Arthur Baars
a15a066414
Merge pull request #72 from github/aibaars/fix-cfg
...
CFG improvements
2020-12-17 16:39:19 +01:00
Arthur Baars
b676c95218
Address comments
2020-12-17 16:35:51 +01:00
Nick Rolfe
73798312b9
Add classes and tests for operations
2020-12-17 15:16:37 +00:00
Tom Hvitved
46fc17da58
CFG: Fix multiple abnormal successors
2020-12-17 11:15:17 +01:00
Tom Hvitved
1033b8610a
CFG: Add more tests
2020-12-17 11:14:10 +01:00
Arthur Baars
91ae237434
Use latest CodeQL for CI
2020-12-17 11:04:57 +01:00
Arthur Baars
dd954ea943
CFG: correct flow for lambda bodies
...
Lambda bodies are parsed as nested do-blocks or normal blocks.
This is actually incorrect, as the body of a lambda can't have
parameters. However, we can "inline" such blocks to get the
desired control flow.
2020-12-17 10:04:01 +01:00
Arthur Baars
eafec4331b
CFG: add nodes for block arguments
2020-12-17 10:04:01 +01:00
Arthur Baars
d016e3cae0
CFG: methods are evaluated before their arguments
2020-12-17 10:04:01 +01:00
Arthur Baars
81c907a87a
CFG: fix BEGIN and END blocks
2020-12-17 10:04:01 +01:00
Arthur Baars
f2fd1c7931
CFG: make def nodes visible
2020-12-17 10:04:01 +01:00
Arthur Baars
f2effce786
CFG: improve handling of block and lambda
2020-12-17 10:04:01 +01:00
Arthur Baars
30895e634c
CFG: refactor CfgScope
2020-12-17 10:04:01 +01:00
Arthur Baars
bc47338b52
CFG: add test-case for conditional method declarations
2020-12-17 10:04:01 +01:00
Arthur Baars
69de81bdd5
CFG: have alternative flow for the definition and call of methods etc.
2020-12-17 10:04:01 +01:00
Arthur Baars
fd14770542
CFG: drop getObject from flow of singleton method
2020-12-17 09:59:30 +01:00
Arthur Baars
8501e30b6a
CFG: fix linking heredoc start to heredoc body
2020-12-17 09:59:30 +01:00
Arthur Baars
edbd997f15
Merge pull request #71 from github/kinds
...
Create disjoint db types for different operators
2020-12-17 09:58:52 +01:00
Nick Rolfe
282d20d766
Remove redundant field on ChildNode struct
2020-12-16 20:57:06 +00:00
Nick Rolfe
a873cb9f3d
Update dbscheme stats
2020-12-16 20:53:41 +00:00
Nick Rolfe
d1a9572b0e
Merge remote-tracking branch 'origin/main' into kinds
2020-12-16 17:55:20 +00:00
Nick Rolfe
f5282edfc1
Simplifications based on PR feedback
2020-12-16 17:54:40 +00:00
Arthur Baars
381d6aafaa
Merge pull request #73 from github/calls
...
Update tree-sitter-ruby to pick up improvements to calls
2020-12-16 14:00:53 +01:00
Nick Rolfe
0518d51b51
Update CFG: call receiers are evaluated before arguments
2020-12-16 12:40:57 +00:00
Nick Rolfe
e98a84c8b5
Update CFG to match changes to Call/MethodCall
2020-12-16 12:01:30 +00:00
Nick Rolfe
aa0c1491a6
Update tree-sitter-ruby to pick up improvements to calls
2020-12-16 10:13:45 +00:00
Arthur Baars
7971b243f1
Merge pull request #69 from github/hvitved/cfg/post-order-cond
...
CFG: Model `IfElsifAstNode` in post-order
2020-12-15 19:22:16 +01:00
Nick Rolfe
ddb71790e9
Fix formatting
2020-12-15 16:01:13 +00:00
Tom Hvitved
9aadeedeb9
CFG: Model IfElsifAstNode in post-order
2020-12-15 17:00:12 +01:00
Tom Hvitved
bb88858633
CFG: Add test for nested ifs
2020-12-15 16:46:55 +01:00
Nick Rolfe
3f5eab04b5
Create disjoint db types for different operators
2020-12-15 15:22:33 +00:00
Arthur Baars
ac9f439935
Merge pull request #70 from github/hvitved/cfg/rescue-part2
...
CFG: More adjustments for `rescue`/`ensure`
2020-12-15 16:06:26 +01:00
Tom Hvitved
16c25f2a4c
CFG: Handle ensure blocks without body/rescues
2020-12-15 13:49:14 +01:00
Tom Hvitved
489b406e2a
CFG: Change column order in succExit/hasExitScope
2020-12-15 13:45:22 +01:00
Tom Hvitved
e784640cca
CFG: Add more test cases
2020-12-15 13:45:22 +01:00
Arthur Baars
5108b369e1
Merge pull request #64 from github/hvitved/cfg/rescue
...
Implement CFG logic for `rescue-ensure`
2020-12-15 11:43:14 +01:00
Tom Hvitved
a76e6848c7
CFG: Address more review comments
2020-12-14 20:45:57 +01:00
Tom Hvitved
ec4ead2117
Apply suggestions from code review
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-12-14 14:53:35 +01:00
Nick Rolfe
b76f97d337
Merge pull request #68 from github/bump_ts
...
Bump tree-sitter-ruby revision to get operator_assignment field
2020-12-14 12:40:36 +00:00
Tom Hvitved
89fb2f8498
CFG: Add @kind graph to Cfg.ql, and remove labels from ordinary successor edges
2020-12-14 11:00:26 +01:00
Nick Rolfe
6bacac7598
Bump tree-sitter-ruby revision to get operator_assignment field
2020-12-08 18:28:54 +00:00
Tom Hvitved
b14a889f5f
CFG: Use MatchingCompletion for parameters with default values
2020-12-08 13:47:32 +01:00
Tom Hvitved
80a59a81ed
CFG: Use MatchingCompletion for patterns
2020-12-08 13:47:32 +01:00
Tom Hvitved
31b8d33a7c
CFG: Mark redo edges out of for loops
2020-12-08 13:47:32 +01:00
Tom Hvitved
b6ea5c5eab
CFG: Implement logic for rescue-ensure blocks
2020-12-08 13:47:32 +01:00
Nick Rolfe
53a1cbc492
Merge pull request #67 from github/getAPrimaryQlClass
...
Rename describeQlClass to getAPrimaryQlClass
2020-12-08 12:16:18 +00:00
Nick Rolfe
3145b3dde7
Rename describeQlClass to getAPrimaryQlClass
2020-12-08 11:09:18 +00:00
Tom Hvitved
5a0376f67e
CFG: More tests
2020-12-08 11:06:15 +01:00
Arthur Baars
990ed34c02
Merge pull request #55 from github/aibaars/cfg
...
Control flow graph
2020-12-07 16:51:33 +01:00
Arthur Baars
9390cf0401
CFG: add test case for if-in-case
2020-12-07 16:46:52 +01:00
Arthur Baars
86e73afc74
CFG: extract HeredocBeginning::getName predicate
2020-12-07 16:31:17 +01:00
Arthur Baars
9883d7124e
CFG: improve handling of redo
2020-12-07 16:20:42 +01:00
Arthur Baars
003f7230b2
Apply suggestions from code review
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2020-12-07 16:02:19 +01:00
Arthur Baars
024150b04b
CFG: hide 'begin'
2020-12-07 16:02:19 +01:00
Arthur Baars
87451fd999
CFG: specialise return type instead of instanceof check
2020-12-07 15:36:09 +01:00
Arthur Baars
6aea3eff3e
CFG: rename getBody{=>Node} and getCondition{=>Node}
2020-12-07 15:30:57 +01:00
Arthur Baars
6d12bcc2fe
Make ConditionalSuccessor not abstract
2020-12-07 15:19:14 +01:00
Arthur Baars
044d14c8b4
Use private imports in generated code
2020-12-07 15:14:34 +01:00
Arthur Baars
ed3b102ecc
Improve formatting
2020-12-07 15:12:43 +01:00
Arthur Baars
d25835c7d2
Merge pull request #61 from github/aibaars/code-nav
...
Add basic code navigation queries
2020-12-07 14:47:43 +01:00
Arthur Baars
2394b26636
CFG: skip Uninterpreted nodes
2020-12-07 13:11:21 +01:00
Arthur Baars
36f5a63c18
Improve handling of class, module, block and method
2020-12-07 13:11:21 +01:00
Arthur Baars
2124247d5e
CFG: add samples of all syntactical constructs to cfg.rb
2020-12-07 13:11:21 +01:00
Arthur Baars
ebf3a31224
CFG: don't handle rescue, else, ensure for now
2020-12-07 13:11:21 +01:00
Arthur Baars
97d0220ffd
CFG: Model nodes with simple flow
2020-12-07 13:11:21 +01:00
Arthur Baars
3807e1be38
CFG: flow for rescue-modifier
2020-12-07 13:11:21 +01:00
Arthur Baars
d619bdd8f9
CFG: Completions: fix definition of boolean constants
2020-12-07 13:11:21 +01:00
Arthur Baars
6c579ff608
CFG: link heredoc start to its body
2020-12-07 13:11:21 +01:00
Arthur Baars
49d11b1e09
CFG: don't hide Class and Module nodes
2020-12-07 13:11:21 +01:00
Arthur Baars
0852068bcd
CFG: make lambda a CFG entry point
2020-12-07 13:11:21 +01:00
Arthur Baars
01066ea3bb
CFG: case expression
2020-12-07 13:11:21 +01:00
Arthur Baars
2f238280dc
CFG: model if-modifier and unless
2020-12-07 13:11:21 +01:00
Arthur Baars
5d6e77be28
CFG: model while, until and variants
2020-12-07 13:11:21 +01:00
Arthur Baars
6660cb4417
CFG: for-in loop
2020-12-07 13:11:21 +01:00
Arthur Baars
165b2b37dc
Treat for variables and exception variables as declarations
2020-12-07 13:11:21 +01:00
Arthur Baars
b60ea74e8a
Treat conditional expressions as if-then-else
2020-12-07 13:11:21 +01:00
Arthur Baars
97fab0d18b
Assignments evaluate right-hand-side first
2020-12-07 13:11:21 +01:00
Arthur Baars
465c266b8a
Classes and module are not CfgScopes
2020-12-07 13:11:21 +01:00
Arthur Baars
0959a4675f
Merge pull request #65 from github/aibaars/dup-code
...
Add duplicate code tables to dbscheme
2020-12-07 13:10:52 +01:00
Arthur Baars
4c699fcb32
Add duplicate code tables to dbscheme
2020-12-07 13:06:26 +01:00
Arthur Baars
0a38d6801c
Address review comments
2020-12-07 12:53:45 +01:00
Arthur Baars
d92d635103
Add basic code navigation queries
2020-12-04 15:01:43 +01:00
Arthur Baars
1d502cb40d
Merge pull request #63 from github/aibaars/fix-warnings
...
Fix warnings and make imports private
2020-12-04 10:43:01 +01:00
Arthur Baars
c1f1efb16b
Merge pull request #62 from github/aibaars/update-grammar
...
Update tree-sitter grammar
2020-12-03 19:14:13 +01:00
Arthur Baars
22fd8908c5
Use private imports
...
No need to have everyting re-export the entire AST
2020-12-03 19:13:05 +01:00
Arthur Baars
582b00ef07
Fix warnings
2020-12-03 19:05:49 +01:00
Arthur Baars
dd3f94a3e2
Update tree-sitter grammar
2020-12-03 18:50:47 +01:00
Nick Rolfe
b0227a7ee1
Merge pull request #60 from github/aibaars/osx-gnutar
...
Workaround for broken cache on OSX
2020-12-03 16:10:10 +00:00
Arthur Baars
c69f64fb4f
Workaround for broken cache on OSX
2020-12-03 16:40:37 +01:00
Nick Rolfe
492f7d1987
Merge pull request #59 from github/bump_ts
...
Bump to latest tree-sitter-ruby revision
2020-12-02 20:04:12 +00:00
Nick Rolfe
d7c1231020
Bump to latest tree-sitter-ruby revision
2020-12-02 16:11:07 +00:00
Tom Hvitved
86a2cbc773
Merge pull request #58 from github/hvitved/pattern-get-a-variable
...
Add `Pattern::getAVariable()` and use `self` range field throughout
2020-12-02 12:57:52 +01:00
Tom Hvitved
9129e886b2
Update ql/src/codeql_ruby/ast/Parameter.qll
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-12-02 12:07:13 +01:00
Tom Hvitved
77129e473a
Adhere to ::Range pattern
2020-12-02 11:27:00 +01:00
Tom Hvitved
b2483069e0
Add Pattern::getAVariable() and use self range field througout
2020-12-02 10:36:33 +01:00
Arthur Baars
59263650b1
Merge pull request #57 from github/hvitved/rename-generated-qll
...
Move `Generated.qll` to `ast/internal/TreeSitter.qll`
2020-12-02 10:32:38 +01:00
Tom Hvitved
a370cd8bdf
Move Generated.qll to ast/internal/TreeSitter.qll
2020-12-01 20:53:41 +01:00
Tom Hvitved
ba7a42328d
Merge pull request #56 from github/hvitved/parameter-get-a-variable
...
Introduce `Parameter::getAVariable()`
2020-12-01 18:32:34 +01:00
Tom Hvitved
d50f5cc785
Address review comments
2020-12-01 15:14:14 +01:00
Tom Hvitved
9820dcb363
Generate VariableAccesses also for defining accesses
2020-12-01 14:39:41 +01:00
Tom Hvitved
bde9f59e0e
Introduce Parameter::getAVariable()
2020-12-01 13:18:06 +01:00
Tom Hvitved
965b351cde
Merge pull request #54 from github/hvitved/ast-final
...
Mark more AST predicates as `final`
2020-12-01 12:38:28 +01:00
Tom Hvitved
311a0b6b20
Mark more AST predicates as final
2020-12-01 10:24:33 +01:00
Tom Hvitved
11927a930f
Merge pull request #53 from github/user-facing
...
Add some user-facing AST classes
2020-12-01 10:23:37 +01:00
Nick Rolfe
baf29ae56b
Add qldoc comment and isOptional predicate to KeywordParameter
2020-11-30 13:42:02 +00:00
Tom Hvitved
c0dd89122c
Handle parameters with overlapping names
2020-11-28 19:23:08 +01:00
Tom Hvitved
58baa33a3f
Various changes to user-facing library
...
- Remove `abstract` classes from public API.
- Align `Variable.qll` with rest of library.
- Introduce `Callable` class.
- Make `Pattern` class cover everything that can be on the LHS of an assignment
and in a pattern (except special parameters such as `**param`).
2020-11-27 17:07:03 +01:00
Tom Hvitved
59d45de118
Move AST files into ast folder
2020-11-27 14:45:15 +01:00
Tom Hvitved
00f3daabfe
Rename Variables.qll to Variable.qll
2020-11-27 14:39:20 +01:00
Nick Rolfe
38b401f04f
Fix import
2020-11-26 16:04:46 +00:00
Arthur Baars
f9c7ae78fe
Merge pull request #52 from github/aibaars/db-stats
...
Collect database stats
2020-11-26 17:03:34 +01:00
Nick Rolfe
399170fd58
Add getParent(Index) to user-facing AstNode
2020-11-26 15:33:50 +00:00
Arthur Baars
c7986442d0
Update ruby.dbscheme.stats
2020-11-26 15:07:13 +01:00
Arthur Baars
49c97bd157
Collect database stats
2020-11-26 14:53:30 +01:00
Nick Rolfe
c598dc6b5c
Initial work on user-facing AST library
2020-11-26 13:45:45 +00:00
Arthur Baars
2082171bdf
Merge pull request #51 from github/aibaars/cfg-scopes
...
CFG: add more CfgScopeRanges
2020-11-26 12:13:53 +01:00
Tom Hvitved
8632cbec71
CFG: Do not descend into nested scopes
2020-11-26 10:58:23 +01:00
Arthur Baars
30cb2cc3e0
CFG: add more CfgScopeRanges
2020-11-26 10:58:23 +01:00
Arthur Baars
e181666a37
Merge pull request #49 from github/aibaars/parent
...
Add parent ref and parent_index fields to all AstNodes
2020-11-25 18:25:03 +01:00
Arthur Baars
083672744e
Remove @file from @astnode
2020-11-25 17:37:58 +01:00
Arthur Baars
735aec9d34
Ensure top-level nodes have distinct parent_index values
2020-11-25 13:48:25 +01:00
Arthur Baars
00015b0022
Add #keyset[parent, parent_index]
2020-11-25 13:48:25 +01:00
Arthur Baars
89953fd87c
Add parent_index field to @astnode
2020-11-25 13:48:25 +01:00
Arthur Baars
b72db8b6f1
Add parent field to AstNode
2020-11-25 13:48:25 +01:00
Arthur Baars
c7b07b7821
Merge pull request #47 from github/aibaars/name-resolution
...
Name resolution: handle the different types of parameters better
2020-11-25 13:44:42 +01:00
Arthur Baars
64ebf5b909
Address comments
2020-11-25 12:55:53 +01:00
Arthur Baars
7a13e8549b
Merge pull request #50 from github/pin_ts_rev
...
Pin tree-sitter-ruby revision
2020-11-24 20:46:53 +01:00
Nick Rolfe
f612e05b34
Pin tree-sitter-ruby revision
2020-11-24 19:22:30 +00:00
Arthur Baars
bc5d7a3b74
Change modelling of Parameters
2020-11-24 19:22:40 +01:00
Arthur Baars
c745978ebb
Fix inconsistent variable references
2020-11-24 19:22:40 +01:00
Arthur Baars
290d3decc8
Add consistency query for Variables
...
Test that VariableAccess.getVariable returns a unique Variable
2020-11-24 19:19:15 +01:00
Tom Hvitved
0616040f3c
Merge pull request #48 from github/hvitved/ci-check-queries
...
Check query compilation and formatting in `qltest.yml`
2020-11-24 11:51:54 +01:00
Tom Hvitved
eceeb6a5fd
Break up QL CI tests into separatly named steps
2020-11-24 11:47:59 +01:00
Tom Hvitved
966e1cdcd0
Apply old formatter to make CI check pass
2020-11-24 11:26:47 +01:00
Tom Hvitved
74f0a8fdb7
Check query compilation and formatting in qltest.yml
2020-11-24 11:20:16 +01:00
Tom Hvitved
d5582f3f48
Merge pull request #46 from github/hvitved/unique-parent
...
Add `unique` wrapper to `AstNode::getParent()`
2020-11-23 16:16:02 +01:00
Tom Hvitved
8132c4cafb
Update generator/src/ql.rs
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-11-23 16:12:31 +01:00
Tom Hvitved
d0257dda36
Add unique wrapper to AstNode::getParent()
2020-11-23 15:23:21 +01:00
Arthur Baars
41a76eeb01
Merge pull request #42 from github/aibaars/name-resolution
...
Local variable binding
2020-11-23 15:22:43 +01:00
Arthur Baars
3ea6cb40f8
Merge pull request #45 from github/hvitved/name-resolution-suggestions
...
Suggested changes to Variables.qll
2020-11-23 13:28:40 +01:00
Tom Hvitved
59624454d1
Suggested changes to Variables.qll
...
- Remove `abstract` predicates from public API.
- Cache core computations.
- Redefine `VariableScope::get[A]Variable` to only include variables declared
directly in the scope.
2020-11-23 10:33:34 +01:00
Arthur Baars
bc423000ca
Add variable to varaccess tests
2020-11-23 09:58:31 +01:00
Arthur Baars
49f1143133
Make Variable an IPA type and speed things up on large databases
2020-11-23 09:58:31 +01:00
Tom Hvitved
bb06c1ffeb
Various minor changes to Variables.qll
2020-11-23 09:58:31 +01:00
Arthur Baars
c16a2e77d8
Model local variables
2020-11-23 09:58:31 +01:00
Arthur Baars
6bd476ff30
Add AstNode::getParent
2020-11-23 09:58:31 +01:00
Nick Rolfe
10411ef49e
Merge pull request #43 from github/hvitved/unbreak-print-ast
...
Unbreak PrintAST query
2020-11-19 13:58:43 +00:00
Tom Hvitved
7716d53552
Unbreak PrintAST query
2020-11-19 14:48:14 +01:00
Tom Hvitved
100daacb94
Merge pull request #39 from github/hvitved/cfg-skeleton
...
Initial CFG skeleton code
2020-11-19 14:41:16 +01:00
Tom Hvitved
06a6a3feb0
Address review comments
2020-11-19 14:31:08 +01:00
Tom Hvitved
4626168969
CFG: Separate scope for method blocks
2020-11-19 09:29:15 +01:00
Tom Hvitved
4dd4373b53
Initial CFG skeleton code
2020-11-18 20:12:42 +01:00
Arthur Baars
f9c1bbd8f9
Merge pull request #41 from github/gitignore
...
Update .gitignore
2020-11-17 18:31:35 +01:00
Nick Rolfe
9d1eec8fe8
Update .gitignore
2020-11-17 16:45:10 +00:00
Nick Rolfe
12d4224e8e
Merge pull request #40 from github/refactor
...
Move all naming decisions to shared library
2020-11-17 11:19:18 +00:00
Nick Rolfe
1a9663ff7d
Replace single-branch match with if let
2020-11-16 18:43:54 +00:00
Nick Rolfe
68c97a2d13
Use .. to ignore fields
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-11-16 18:41:18 +00:00
Nick Rolfe
ad61f7a0a6
Use references instead of owned strings in generator
2020-11-16 17:54:16 +00:00
Nick Rolfe
bbe7c70d34
more refactoring of names
2020-11-16 17:54:16 +00:00
Nick Rolfe
83a0e5fea6
Refactor to move naming decisions to shared library
2020-11-16 17:54:14 +00:00
Nick Rolfe
505d5c04d8
Merge pull request #31 from github/aibaars/drop-classes
...
Simplify generated QL classes
2020-11-16 14:16:02 +00:00
Arthur Baars
043c3fd2eb
Simplify generated QL classes
2020-11-13 12:59:22 +01:00
Arthur Baars
f57d20f5c6
Merge pull request #36 from github/readme-build-dbs
...
Add README instructions for building databases
2020-11-13 12:57:09 +01:00
Nick Rolfe
c16390fd05
Merge remote-tracking branch 'origin/main' into readme-build-dbs
2020-11-13 11:37:28 +00:00
Nick Rolfe
8d46151a10
Merge pull request #37 from github/aibaars-patch-1
...
Change cache key
2020-11-13 11:33:31 +00:00
Arthur Baars
5fe3bf138c
Change cache key
2020-11-12 19:11:04 +01:00
Arthur Baars
402c348e37
Merge pull request #33 from github/aibaars/qltest
...
Add QL test support
2020-11-12 15:10:39 +01:00
Nick Rolfe
0e1b54f061
Add instructions for building databases
2020-11-12 13:33:32 +00:00
Nick Rolfe
bb1d6f3bb8
Merge pull request #34 from github/aibaars/osx-fmt
...
Remove cargo fmt workaround on OSX
2020-11-12 13:03:41 +00:00
Nick Rolfe
056879eb97
Merge pull request #35 from github/aibaars/cargo-update
...
Run: cargo update
2020-11-12 10:34:50 +00:00
Arthur Baars
8d1ed4bf89
Run: cargo update
...
This pulls in improvements to the tree-sitter-ruby repository.
2020-11-12 10:25:40 +01:00
Arthur Baars
557d990a0d
Remove cargo fmt workaround on OSX
...
The `fmt` component is now installed by default on OSX.
2020-11-12 09:29:26 +01:00
Arthur Baars
44150600ab
Add QLTest workflow
2020-11-11 21:57:50 +01:00
Arthur Baars
080c56c9eb
Add QL test support
2020-11-11 16:32:44 +01:00
Arthur Baars
db35abdf17
Merge pull request #32 from github/getFileBySourceArchiveName
...
Replace getEncodedFile with getFileBySourceArchiveName predicate
2020-11-11 13:46:10 +01:00
Nick Rolfe
5771e4790e
Replace getEncodedFile with getFileBySourceArchiveName predicate
...
While also making it work with paths for databases created on Windows.
2020-11-10 16:50:10 +00:00
Arthur Baars
5f1e373355
Merge pull request #30 from github/string_contents
...
Get latest fixes from tree-sitter-ruby repo
2020-11-09 15:05:50 +01:00
Arthur Baars
81ceb22b14
Restore cache before running cargo fmt
...
It appears cargo fmt also downloads the git dependencies which takes quite a while. The cache should contain a copy of the cloned repo, so restoring the cache early should speed things up.
2020-11-09 14:25:54 +01:00
Nick Rolfe
6f72ba106e
Get latest fixes from tree-sitter-ruby repo
2020-11-06 17:15:22 +00:00
Nick Rolfe
aec99746d6
Merge pull request #29 from github/aibaars/dedup
...
Deduplicate and sort union members
2020-11-05 18:00:07 +00:00
Arthur Baars
222af90790
Deduplicate and sort union members
2020-11-05 18:50:12 +01:00
Arthur Baars
f514655231
Merge pull request #28 from github/token_classes
...
Add classes for token kinds
2020-11-05 17:27:22 +01:00
Nick Rolfe
510621f018
Don't add 'Token' prefix to token subclass names
2020-11-05 16:21:33 +00:00
Nick Rolfe
4bda204118
Add classes for token kinds
2020-11-05 13:06:46 +00:00
Arthur Baars
296d4d0f47
Merge pull request #26 from github/aibaars/tokens
...
Store tokens into separate table
2020-11-05 14:03:26 +01:00
Arthur Baars
c565f323f6
Don't register extra tokens as children of the parent node
2020-11-05 12:53:58 +01:00
Arthur Baars
180df8a63d
Make classes non-abstract
2020-11-04 18:18:45 +01:00
Nick Rolfe
69b1d7c0dc
Make union-wrapping classes abstract to fix results for toString/describeQlClass
2020-11-04 16:01:51 +00:00
Arthur Baars
86aa05e3cb
Address comments
2020-11-04 14:49:47 +01:00
Arthur Baars
c3e8d85f0b
Tolerate tokens containing invalid UTF-8
2020-11-04 14:46:31 +01:00
Arthur Baars
8056186c3c
Hide disconnected tokens
2020-11-04 13:35:24 +01:00
Arthur Baars
96423d2e8e
Remove describeQlClass from union types
...
The descriptions of the underlying types are more interesting.
2020-11-04 13:35:24 +01:00
Arthur Baars
053c9f60a4
Store tokens in a separate table
2020-11-04 13:35:24 +01:00
Nick Rolfe
9e49991859
Merge pull request #27 from github/extractor-pack-script
...
Add scripts to create extractor pack locally
2020-11-04 12:20:45 +00:00
Nick Rolfe
b16588f058
Add powershell script to create extractor pack locally
2020-11-04 12:09:52 +00:00
Nick Rolfe
a83ac24652
Add bash script to create extractor pack locally
2020-11-04 11:59:17 +00:00
Arthur Baars
b92d789598
Merge pull request #25 from github/printAST
...
Implement basic `printAst` query
2020-11-03 19:13:44 +01:00
Nick Rolfe
41dcb19cd5
Implement basic printAst query
2020-11-03 13:47:54 +00:00
Arthur Baars
65c1f2c359
Merge pull request #20 from github/aibaars/extract-extra
...
Extract 'extra' nodes and their subtrees
2020-11-03 13:45:33 +01:00
Arthur Baars
d7e9178cda
Merge pull request #24 from github/gzip
...
Add buffered writing and gzip compression for trap files
2020-11-03 13:45:19 +01:00
Arthur Baars
bfc05539ec
Update library and dbscheme
2020-11-03 10:07:05 +01:00
Arthur Baars
25205a09a3
Update tree-sitter-ruby
2020-11-03 10:06:59 +01:00
Arthur Baars
dc3459de8e
Extract 'extra' nodes and their subtrees
2020-11-03 10:03:11 +01:00
Nick Rolfe
27c3c88b3c
Add buffered writing and gzip compression for trap files
2020-11-02 16:14:19 +00:00
Arthur Baars
0156de12ea
Merge pull request #22 from github/aibaars/trapwriter
...
Add a TrapWriter
2020-11-02 15:00:38 +01:00
Arthur Baars
0ccd97639b
Address comments
2020-11-02 13:30:46 +01:00
Arthur Baars
0ecab93d09
Merge pull request #23 from github/aibaars/locations-lib
...
Add Locations.qll and import FileSystem and Locations libraries in generated AST
2020-11-02 13:08:15 +01:00
Arthur Baars
f94b5ae412
Update QL code generator
2020-10-31 14:03:26 +01:00
Arthur Baars
1b502c161e
Add Locations library and move language independent files to 'codeql'
2020-10-31 11:51:01 +01:00
Arthur Baars
63ca8212f6
Limit string sizes to 1MB
2020-10-31 11:36:01 +01:00
Arthur Baars
f265ccef59
TrapWriter: add global ID caching and populate folders
2020-10-31 11:35:57 +01:00
Arthur Baars
0de8b0c069
Add TrapWriter::comment
2020-10-31 11:35:22 +01:00
Arthur Baars
748dee64ae
Escape label keys
2020-10-31 11:35:22 +01:00
Arthur Baars
57842e8a87
Add TrapWriter
2020-10-31 11:35:16 +01:00
Nick Rolfe
83667ab89a
Merge pull request #19 from github/locations
...
Fix location handling to match common db schema requirements
2020-10-30 16:56:34 +00:00
Arthur Baars
c2c197dba5
Merge pull request #21 from github/aibaars/files-qll
...
Basic FileSystem.qll
2020-10-30 17:50:54 +01:00
Nick Rolfe
075c72e6ef
Iterate through path components to 'normalize' paths on windows
2020-10-30 15:26:46 +00:00
Arthur Baars
3e12aa457f
Basic FileSystem.qll
2020-10-30 15:40:29 +01:00
Nick Rolfe
e73500ef7c
Cope with empty filenames/extensions
2020-10-30 14:38:24 +00:00
Nick Rolfe
0a754334cf
Don't generate the QL File class
2020-10-30 13:41:27 +00:00
Nick Rolfe
35cb379db7
Fix name of table for locations
2020-10-30 13:24:16 +00:00
Nick Rolfe
a54f923a73
Normalize the absolute path in the files table
2020-10-30 13:22:58 +00:00
Nick Rolfe
4b8bbd101c
Give locations full ids matching the common spec
2020-10-30 13:06:21 +00:00
Nick Rolfe
79d15051be
Fix full ids for files to match common spec
2020-10-30 12:45:23 +00:00
Nick Rolfe
7f03206b52
Use a key id for file entities
2020-10-30 11:29:04 +00:00
Nick Rolfe
826b4571a0
Canonicalize source file paths in main
2020-10-30 11:21:51 +00:00
Nick Rolfe
d47bd32b58
Now that we also generate conjunctions, use parentheses in disjunctions
2020-10-30 10:34:42 +00:00
Nick Rolfe
f198dc530f
Use fromSource = 1
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-10-30 10:25:09 +00:00
Nick Rolfe
2232700428
Correct comment
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-10-30 10:24:24 +00:00
Nick Rolfe
4d5d80c749
Fix location handling to match common db schema requirements
2020-10-29 19:44:16 +00:00
Nick Rolfe
556507cec7
Merge pull request #18 from github/optional_fields
...
Don't generate an index for optional fields that occur at most once
2020-10-29 15:35:27 +00:00
Nick Rolfe
547d12ca58
Add more info to error message
2020-10-29 15:13:04 +00:00
Nick Rolfe
11c9c18de4
Don't generate an index for optional fields that occur at most once
2020-10-29 13:04:26 +00:00
Arthur Baars
fbb075b477
Merge pull request #17 from github/aibaars/locations-2
...
TRAP locations: always fix-up empty ranges
2020-10-29 12:15:52 +01:00
Arthur Baars
3350d9d3d4
TRAP locations: always fix-up empty ranges
2020-10-29 10:45:07 +01:00
Arthur Baars
ca91e15a4b
Merge pull request #16 from github/aibaars/locations
...
Fix locations in the
2020-10-28 18:09:58 +01:00
Arthur Baars
4c04b8bb15
Add comment
2020-10-28 17:40:01 +01:00
Arthur Baars
d2f42552f6
Adjust source locations
...
Tree-sitter row and column numbers are 0-based while CodeQL expects 1-based.
In addition tree-sitter location ranges end-points are exclusive while
CodeQL's ranges are inclusive.
2020-10-28 17:30:03 +01:00
Nick Rolfe
743eca7992
Merge pull request #15 from github/aibaars/ql-folder
...
Add QL folder structure
2020-10-28 13:11:50 +00:00
Arthur Baars
638fd91e50
Update generator to write the ast.qll file directly into ql/src
2020-10-28 14:04:36 +01:00
Arthur Baars
28a99cfe83
Update path of generated dbscheme
2020-10-28 14:04:36 +01:00
Arthur Baars
88acbc883c
Copy dbscheme stats into extractor pack
2020-10-28 14:04:36 +01:00
Arthur Baars
030d957535
Update stats with values measured on bunch of ruby databases
2020-10-28 14:04:36 +01:00
Arthur Baars
5d3f2de685
Add dbscheme to QL folder
2020-10-28 14:04:36 +01:00
Arthur Baars
2e102b8cdf
Add folder structure for QL code
2020-10-28 14:04:36 +01:00
Arthur Baars
553e1ab465
Merge pull request #13 from github/aibaars/improve-workflow
...
Check formatting and cache builds
2020-10-28 14:04:05 +01:00
Arthur Baars
7e6c30b121
Check formatting and cache builds
2020-10-28 13:55:52 +01:00
Nick Rolfe
29899485c7
Merge pull request #11 from github/ql_gen
...
Generate QL classes
2020-10-28 12:25:53 +00:00
Nick Rolfe
e03d5da8cd
Rename a field to avoid using raw identifiers
2020-10-28 12:14:54 +00:00
Nick Rolfe
f4b9c0c71a
Merge remote-tracking branch 'origin/main' into ql_gen
2020-10-28 11:41:18 +00:00
Nick Rolfe
24b4586ddd
Merge pull request #14 from github/aibaars/remove-storage-index
...
Extractor: fix child index values
2020-10-28 11:37:38 +00:00
Nick Rolfe
11152583d5
Add get_name() method to simplify logic in field handling
2020-10-28 11:30:50 +00:00
Nick Rolfe
53de99e6af
Regenerate QL with fix to Top::getAFieldOrChild
2020-10-28 11:22:21 +00:00
Nick Rolfe
7b51030dd4
Merge remote-tracking branch 'origin/ql_gen' into ql_gen
2020-10-28 11:20:58 +00:00
Nick Rolfe
b4f9599dd9
Simplify hashmap insertion
2020-10-28 11:20:47 +00:00
Nick Rolfe
679ca6d0f1
Update Actions workflow to generate ruby_ast.qll
2020-10-28 11:04:09 +00:00
Nick Rolfe
17820e017c
Fix Top::getAFieldOrChild() so it doesn't take an index arg
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-10-28 11:02:42 +00:00
Nick Rolfe
bc22631c32
Simplify QL model following review feedback
2020-10-28 11:00:40 +00:00
Nick Rolfe
77fdafdc95
Simplify error handling with if let
2020-10-28 10:35:33 +00:00
Nick Rolfe
59580d51bb
Merge remote-tracking branch 'origin/main' into ql_gen
2020-10-28 10:30:36 +00:00
Arthur Baars
fe1d8ec15f
Extractor: fix child index values
2020-10-27 22:32:53 +01:00
Arthur Baars
0c15783f2b
Merge pull request #12 from github/crates-language
...
Use tree-sitter-ruby crate instead of vendoring it
2020-10-27 20:53:48 +01:00
Nick Rolfe
a41c3e36f9
Give node_types a static lifetime.
2020-10-27 19:11:05 +00:00
Nick Rolfe
5484ff3dcf
Use tree_sitter_ruby crate in generator
2020-10-27 18:13:40 +00:00
Douglas Creager
2663de86fb
Don't clone submodules in Actions workflow
...
Since we don't have any submodules anymore!
2020-10-27 14:02:15 -04:00
Nick Rolfe
ce8de3feba
Update generator binary name in Actions workflow
2020-10-27 17:56:37 +00:00
Douglas Creager
5f985be2d9
Use tree-sitter-ruby crate instead of vendoring it
2020-10-27 13:54:56 -04:00
Nick Rolfe
e05bcf9fb7
Generate QL classes
2020-10-27 17:46:11 +00:00
Arthur Baars
3e1c378aba
Merge pull request #8 from github/aibaars/actions
...
Improve extractor build and add GitHub Actions configuration
2020-10-27 18:21:20 +01:00
Arthur Baars
4b46a75c24
Merge pull request #10 from github/github/aibaars/escape-uppercase
...
DB scheme: convert uppercase to lowercase + underscore
2020-10-27 18:21:00 +01:00
Arthur Baars
bb2e7d841f
DB scheme: convert uppercase to lowercase + underscore
2020-10-27 18:15:48 +01:00
Arthur Baars
53b97ff0fa
Use release builds for the CodeQL package
2020-10-27 17:48:11 +01:00
Arthur Baars
bdff1fe9f4
Merge pull request #9 from github/aibaars/escape-column-names
...
DB scheme generator: escape column names
2020-10-27 17:44:39 +01:00
Arthur Baars
e3a1d426b8
DB scheme generator: escape column names
2020-10-27 17:31:10 +01:00
Arthur Baars
9e6ccf558e
Preserve permissions of Linux and OSX binaries
...
The {upload,download}-artifact actions do not preserve
file permissions, so we need to patch things up.
2020-10-27 17:17:44 +01:00
Arthur Baars
048f19edc1
Build a CodeQL extractor pack
2020-10-27 17:02:08 +01:00
Arthur Baars
73a090501a
Add GitHub actions configuration
2020-10-27 16:34:17 +01:00
Arthur Baars
7555141246
Extractor: include contents node-types.json as constant
2020-10-27 16:34:17 +01:00
Arthur Baars
74dd4dcc2c
Build parser.c and scanner.cc separately
2020-10-27 16:34:17 +01:00
Arthur Baars
74e9829609
Merge pull request #7 from github/aibaars/refactor
...
Refactor dbscheme generator to use intermediate representation
2020-10-27 14:12:05 +01:00
Arthur Baars
1fd6fdd652
Address review comment from earlier pull-request
2020-10-27 13:43:59 +01:00
Arthur Baars
a50f79b401
Add logging to dbscheme generator
2020-10-27 13:36:58 +01:00
Arthur Baars
0439d4f674
Refactor dbscheme generator to use intermediate representation
...
* merge extractor/node_types.rs into node-types/lib.rs
* use intermediate representation in dbscheme generator
* move dbscheme naming and escaping functions to node-types so they can be shared
2020-10-27 13:27:45 +01:00
Arthur Baars
4c1682ef2e
Merge pull request #5 from github/aibaars/logger
...
Add logging based on the tracing library
2020-10-27 13:24:34 +01:00
Nick Rolfe
63282eac60
Merge pull request #6 from github/windows_paths
...
Handle Windows path prefixes
2020-10-27 12:20:54 +00:00
Nick Rolfe
c02b735eec
Handle Windows path prefixes
2020-10-27 12:09:46 +00:00
Arthur Baars
52035ef672
Add tracing logger
2020-10-27 11:29:21 +01:00
Arthur Baars
9c534209f7
Add tracing:0.1
2020-10-27 11:26:35 +01:00
Arthur Baars
467e32ade4
Merge pull request #2 from github/aibaars/extractor-rust
...
Rewrite extractor in rust
2020-10-27 10:16:58 +01:00
Arthur Baars
0f576fe29a
Address review comments
2020-10-26 19:10:44 +01:00
Arthur Baars
1d36b5085a
Do not recurse into 'extra' nodes for now
2020-10-26 18:39:10 +01:00
Arthur Baars
fd39524c5e
Improve error messages
...
Include file path and line number and emit better descriptions
2020-10-26 18:37:29 +01:00
Arthur Baars
47ccc33ab3
Initial version of extractor based on tree-sitter grammar
2020-10-24 13:22:39 +02:00
Arthur Baars
d00c956028
Build with clang for non-windows platforms
2020-10-24 13:22:39 +02:00
Arthur Baars
f6292e437e
Merge pull request #4 from github/shared_lib
...
Add library package for shared code
2020-10-23 14:18:42 +02:00
Nick Rolfe
849e109583
Add library package for shared code
2020-10-23 13:01:17 +01:00
Arthur Baars
305fd566a8
Merge pull request #3 from github/aibaars/codeql-extractor-yaml
...
Basic CodeQL extractor configuration and autobuild scripts
2020-10-22 22:23:44 +02:00
Arthur Baars
e16b85e511
Add codeql-extractor config
2020-10-22 18:30:57 +02:00
Nick Rolfe
12571dbe42
Merge pull request #1 from github/dbscheme
...
Basic dbscheme generation from `node-types.json`
2020-10-22 12:29:44 +01:00
Nick Rolfe
36823d7804
Move deserialization to node_types module; propagate errors to caller
2020-10-22 11:10:05 +01:00
Nick Rolfe
e018f3f20b
Use if let instead of iterating over Option
2020-10-21 12:51:10 +01:00
Nick Rolfe
5e3544fcc3
Use fmt::Display trait for writing dbscheme
2020-10-21 12:45:54 +01:00
Nick Rolfe
a7a18b8b0f
Gather all hard-coded Ruby-specific names/paths in one struct.
2020-10-21 11:29:25 +01:00
Nick Rolfe
47c8a3d6fb
Simplify to std::io::Result
2020-10-21 11:26:23 +01:00
Nick Rolfe
fd1f8b22e2
Simplify keysets to Option<Vec<String>>
2020-10-21 11:06:53 +01:00
Nick Rolfe
97181d1c21
Basic dbscheme generation from node-types.json
2020-10-20 17:49:55 +01:00
Nick Rolfe
735fde7a22
Add README
2020-10-15 13:26:13 +01:00
Nick Rolfe
a837c65bc4
Add VSCode build task for cargo build
2020-10-15 13:21:12 +01:00
Nick Rolfe
ffbb57a8e2
Make VSCode default to unix line endings
2020-10-15 13:20:37 +01:00
Nick Rolfe
6c697bf9b5
Split into generator and extractor packages
2020-10-15 13:20:11 +01:00
Nick Rolfe
b677a91fea
Add VSCode workspace
2020-10-14 11:16:28 +01:00
Nick Rolfe
89959b2e0d
Add tree-sitter-ruby submodule
2020-10-14 11:15:59 +01:00
Nick Rolfe
d3ccb49273
Initial commit: cargo-generated boilerplate
2020-10-13 18:42:13 +01:00