Ian Lynagh
4551af90f6
Merge pull request #8640 from github/release-prep/2.8.5
...
Release preparation for version 2.8.5
2022-04-01 14:07:21 +01:00
github-actions[bot]
ee746d20df
Release preparation for version 2.8.5
2022-04-01 10:39:31 +00:00
Jeroen Ketema
f2beb9eb2b
Merge pull request #8622 from MathiasVP/fix-cpp-performance
...
C++: Fix bad magic and bad join
2022-04-01 09:51:16 +02:00
Mathias Vorreiter Pedersen
dc88f715f8
C++: Fix join order.
2022-03-31 10:35:36 +01:00
Mathias Vorreiter Pedersen
da39c9f5ef
C++: Fix bad magic.
2022-03-31 10:35:29 +01:00
Ian Lynagh
46c27dd20f
Merge pull request #8514 from github/post-release-prep/codeql-cli-2.8.4
...
Post-release preparation for codeql-cli-2.8.4
2022-03-30 16:36:14 +01:00
Tom Hvitved
3c50987b9b
Merge pull request #8590 from hvitved/ruby/rc-perf-picks
...
Ruby: Cherry pick performance fixes onto `rc/3.5`
2022-03-30 14:48:33 +02:00
Tom Hvitved
f429dafb09
Address review comments
2022-03-29 10:23:59 +02:00
Tom Hvitved
15ef8c1d8f
Ruby: Cache ConstantReadAccess::getValue
2022-03-29 10:23:54 +02:00
Tom Hvitved
fe50c2879e
Ruby: Rework getConstantValue implementation
2022-03-29 10:23:49 +02:00
Tom Hvitved
ec82fb1221
Ruby: Fix bad join-order in RegExpTerm::hasLocationInfo
...
Before:
```
[2022-03-23 14:50:16] (776s) Tuple counts for RegExpTreeView::RegExpTerm::hasLocationInfo#dispred#f0820431#ffffff/6@5f6cf7if after 1m4s:
707103 ~7% {2} r1 = SCAN Literal::StringlikeLiteral::getNumberOfComponents#dispred#f0820431#ff OUTPUT In.0, (In.1 - 1)
64721 ~0% {5} r2 = JOIN r1 WITH RegExpTreeView::RegExpTerm#7783c185#ffff_1023#join_rhs ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Rhs.1 'this', Rhs.2, Rhs.3
64721 ~0% {5} r3 = JOIN r2 WITH Literal::StringlikeLiteral::getComponent#dispred#f0820431#fff ON FIRST 2 OUTPUT Rhs.2, Lhs.0, Lhs.2 'this', Lhs.3, Lhs.4
64721 ~0% {5} r4 = JOIN r3 WITH AST::AstNode::getLocation#dispred#f0820431#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2 'this', Lhs.3, Lhs.4
64721 ~3% {6} r5 = JOIN r4 WITH Locations::Location::hasLocationInfo#dispred#f0820431#ffffff ON FIRST 1 OUTPUT Rhs.1 'filepath', Lhs.1, Lhs.2 'this', Lhs.3, Lhs.4, Rhs.4 'endline'
353247577 ~1% {10} r6 = JOIN r5 WITH Locations::Location::hasLocationInfo#dispred#f0820431#ffffff_1023#join_rhs ON FIRST 1 OUTPUT Lhs.1, 0, Lhs.2 'this', Lhs.3, Lhs.4, Lhs.0 'filepath', Lhs.5 'endline', Rhs.1, Rhs.2 'startline', Rhs.3
353247577 ~0% {9} r7 = JOIN r6 WITH Literal::StringlikeLiteral::getComponent#dispred#f0820431#fff ON FIRST 2 OUTPUT Rhs.2, Lhs.7, Lhs.2 'this', Lhs.3, Lhs.4, Lhs.5 'filepath', Lhs.6 'endline', Lhs.8 'startline', Lhs.9
64721 ~2% {6} r8 = JOIN r7 WITH AST::AstNode::getLocation#dispred#f0820431#bf ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.5 'filepath', Lhs.7 'startline', (Lhs.8 + Lhs.3), Lhs.6 'endline', ((Lhs.8 + Lhs.4) - 1)
return r8
```
After:
```
[2022-03-23 14:58:35] (247s) Tuple counts for RegExpTreeView::RegExpTerm::componentHasLocationInfo#f0820431#fbfffff/7@de55ac7l after 1.1s:
12956 ~0% {3} r1 = SCAN files OUTPUT In.0, 0, In.1 'filepath'
9850785 ~0% {7} r2 = JOIN r1 WITH locations_default_102345#join_rhs ON FIRST 1 OUTPUT Rhs.1, 0, Lhs.2 'filepath', Rhs.2 'startline', Rhs.3 'startcolumn', Rhs.4 'endline', Rhs.5 'endcolumn'
823486 ~0% {8} r3 = JOIN r2 WITH AST::AstNode::getLocation#dispred#f0820431#bf_10#join_rhs ON FIRST 1 OUTPUT 0, Rhs.1, 0, Lhs.2 'filepath', Lhs.3 'startline', Lhs.4 'startcolumn', Lhs.5 'endline', Lhs.6 'endcolumn'
698251 ~4% {7} r4 = JOIN r3 WITH Literal::StringlikeLiteral::getComponent#dispred#f0820431#fff_120#join_rhs ON FIRST 2 OUTPUT Rhs.2, 0, Lhs.3 'filepath', Lhs.4 'startline', Lhs.5 'startcolumn', Lhs.6 'endline', Lhs.7 'endcolumn'
64721 ~1% {7} r5 = JOIN r4 WITH RegExpTreeView::RegExpTerm#7783c185#ffff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'this', 0, Lhs.2 'filepath', Lhs.3 'startline', Lhs.4 'startcolumn', Lhs.5 'endline', Lhs.6 'endcolumn'
return r5
[2022-03-23 14:58:35] (247s) Tuple counts for RegExpTreeView::RegExpTerm::hasLocationInfo#dispred#f0820431#ffffff/6@ad66b12q after 53ms:
707103 ~7% {2} r1 = SCAN Literal::StringlikeLiteral::getNumberOfComponents#dispred#f0820431#ff OUTPUT In.0, (In.1 - 1)
64721 ~0% {4} r2 = JOIN r1 WITH RegExpTreeView::RegExpTerm#7783c185#ffff_1023#join_rhs ON FIRST 1 OUTPUT Rhs.1 'this', Lhs.1, Rhs.2, Rhs.3
64721 ~5% {5} r3 = JOIN r2 WITH project#RegExpTreeView::RegExpTerm::componentHasLocationInfo#f0820431#bffffff ON FIRST 2 OUTPUT Lhs.0 'this', Rhs.2 'filepath', Lhs.2, Lhs.3, Rhs.3 'endline'
64721 ~2% {6} r4 = JOIN r3 WITH project#RegExpTreeView::RegExpTerm::componentHasLocationInfo#f0820431#fbfffff ON FIRST 2 OUTPUT Lhs.0 'this', Lhs.1 'filepath', Rhs.2 'startline', (Rhs.3 + Lhs.2), Lhs.4 'endline', ((Rhs.3 + Lhs.3) - 1)
return r4
```
2022-03-29 10:23:32 +02:00
github-actions[bot]
a3e74efc21
Post-release preparation for codeql-cli-2.8.4
2022-03-21 19:36:47 +00:00
Ian Lynagh
e41bbfd931
Merge pull request #8510 from github/release-prep/2.8.4
...
Release preparation for version 2.8.4
2022-03-21 16:27:29 +00:00
Ian Lynagh
1f8ce3a868
Java: Tweak release notes
2022-03-21 15:14:45 +00:00
github-actions[bot]
dedc8c2254
Release preparation for version 2.8.4
2022-03-21 13:25:49 +00:00
Alex Ford
c891c53835
Merge pull request #8395 from alexrford/ruby/clear-text-storage
...
Ruby: add `rb/clear-text-storage-sensitive-data` query
2022-03-21 10:05:39 +00:00
CodeQL CI
b04c46f96d
Merge pull request #8478 from asgerf/js/store-load-flow-context-sensitivity-bug
...
Approved by erik-krogh
2022-03-21 08:54:51 +00:00
Robert Marsh
4bf35ad188
Merge pull request #8483 from jketema/command-line-injection-test-cases-with-calls
...
C++: Add additional command line injection tests
2022-03-18 15:05:12 -04:00
Arthur Baars
beef8e29bc
Merge pull request #8332 from hvitved/ruby/regexp-taint-flow
...
Ruby: Use taint tracking instead of type tracking to define `regExpSource`
2022-03-18 18:24:02 +01:00
Jeroen Ketema
d37ef1b5ca
C++: Add command line injection test that currently results in a false positive
2022-03-18 16:12:09 +01:00
Arthur Baars
117fb5be7d
Merge pull request #7917 from aibaars/incomplete-hostname
...
Ruby: IncompleteHostnameRegExp.ql
2022-03-18 16:00:09 +01:00
Tom Hvitved
1437aefe9d
Ruby: Use taint tracking instead of type tracking to define regExpSource
2022-03-18 14:48:12 +01:00
Tom Hvitved
d97eaba070
Ruby: Add dataflow/taintracking copies for use in libraries
2022-03-18 14:48:12 +01:00
Arthur Baars
4a27928728
Ruby/JS add missing ^ in qhelp
2022-03-18 14:00:10 +01:00
Jeroen Ketema
459870ac1e
C++: Add additional command line injection tests
2022-03-18 13:42:27 +01:00
Arthur Baars
431b60506e
Merge remote-tracking branch 'upstream/main' into incomplete-hostname
2022-03-18 13:05:34 +01:00
Arthur Baars
6d24591416
Revert "Python: switch to shared implementation of IncompleteHostnameRegExp.ql"
...
This reverts commit ce50f35dda .
2022-03-18 13:02:55 +01:00
Chris Smowton
767453520e
Merge pull request #8032 from JLLeitschuh/feat/JLL/check_os
...
Java: Add Guard Classes for checking OS & unify System Property Access
2022-03-18 11:20:36 +00:00
Asger Feldthaus
26b7edccd4
JS: Change note
2022-03-18 11:59:36 +01:00
Asger F
929419abba
Merge pull request #8254 from asgerf/ruby/mad-prototype
...
Ruby: initial prototype of models-as-data
2022-03-18 10:48:33 +01:00
Mathias Vorreiter Pedersen
8bf172913e
Merge pull request #8474 from hvitved/flow-state-changing-steps-should-be-in-path-explanation-alternative
...
Dataflow: Flow-state changing steps should always be in path explanations
2022-03-18 09:08:36 +00:00
Asger Feldthaus
8753632193
JS: Fix bug in reachableFromStoreBase
2022-03-17 17:30:46 +01:00
Asger Feldthaus
8c6ca6582e
JS: Add test showing missing flow
2022-03-17 17:30:46 +01:00
Mathias Vorreiter Pedersen
abe30457ee
Python: Accept test changes.
2022-03-17 14:03:58 +01:00
Tom Hvitved
79ea2a3a9c
Data flow: Sync files
2022-03-17 14:03:58 +01:00
Tom Hvitved
4df12dc6e6
Data flow: State-changing taint steps should not be stepped over by the big step relation
2022-03-17 14:03:58 +01:00
Erik Krogh Kristensen
870521bd1e
Merge pull request #8473 from erik-krogh/redundantAnyCast
...
QL: expand redundant-inline-cast, and rename to redundant-cast
2022-03-17 10:41:50 +01:00
Erik Krogh Kristensen
fe94421d32
rename redundant-inline-cast to redundant-cast
2022-03-17 10:25:40 +01:00
Erik Krogh Kristensen
86398a8c65
Merge pull request #8304 from erik-krogh/xssUrl
...
JS: Refactor the XSS / Client-side-url queries
2022-03-17 09:13:09 +01:00
Erik Krogh Kristensen
aa8b7c8679
update reference to deprecated class name
2022-03-16 22:32:54 +01:00
Erik Krogh Kristensen
6cdc38748c
update expected output
2022-03-16 22:32:09 +01:00
Erik Krogh Kristensen
d8a5947a08
simplify TaintedUrlSuffix::source() to only consider window.location based sources
2022-03-16 22:32:09 +01:00
Erik Krogh Kristensen
b3de5d94a6
move PrefixStringSanitizer to the Query.qll file, and have it extend LabeledSanitizerGuardNode
2022-03-16 22:32:09 +01:00
Erik Krogh Kristensen
562dce57e8
rename isXSSSink to isXssSink
2022-03-16 22:32:09 +01:00
Erik Krogh Kristensen
f083e87fa1
refactor the js/xss query to use three flowlabels and one configuration
2022-03-16 22:32:08 +01:00
Erik Krogh Kristensen
87842bb8b7
add client-side-url sinks that may execute JavaScript as XSS sinks
2022-03-16 22:32:08 +01:00
Erik Krogh Kristensen
b471fec149
split interpretsArgumentsAsURL out of interpretsArgumentsAsHTML, and use it to generalize AttributeUrlSink
2022-03-16 22:32:08 +01:00
Erik Krogh Kristensen
2576e1f655
add utility predicate to get client-side remote-flow-sources that contain a URL query/fragment
2022-03-16 22:32:08 +01:00
Erik Krogh Kristensen
67e6a4c716
add a isXSSSink predicate to the client-side-url-redirection sinks
2022-03-16 22:32:08 +01:00
Erik Krogh Kristensen
fc79242674
add tests
2022-03-16 22:32:08 +01:00
Erik Krogh Kristensen
559f03ebbc
remove unnecessary module qualifier
2022-03-16 22:32:07 +01:00
Erik Krogh Kristensen
2d9d383c55
remove unused import
2022-03-16 22:32:07 +01:00
Arthur Baars
1a51f0cf56
Ruby: regex: fix getGroupNumber
...
non-capture groups should not have a group number
2022-03-16 18:50:51 +01:00
Jeroen Ketema
7a9a9d833a
Merge pull request #8435 from jketema/all-the-barriers
...
Add flow state versions of isBarrierIn, isBarrierOut, and isBarrierGuard
2022-03-16 15:50:19 +01:00
Michael Nebel
68f24cda0b
Merge pull request #8462 from michaelnebel/csharp/capture-models-fix-bad-join-order
...
C#: Fix bad join order in returnNodeAsOutput.
2022-03-16 15:46:17 +01:00
Asger Feldthaus
e1976da7f9
JS: Autoformat
2022-03-16 15:01:17 +01:00
Dave Bartolomeo
e669ffa22e
Merge pull request #8320 from jketema/structured-binding-array
...
C++: Handle initialization of structured bindings via bitwise copy in extractor
2022-03-16 09:41:31 -04:00
Asger F
228570129e
Merge branch 'main' into ruby/mad-prototype
2022-03-16 13:50:31 +01:00
Asger Feldthaus
e168da4c5f
Shared: make a predicate private
2022-03-16 13:48:56 +01:00
Michael Nebel
5f7b5ec5df
C#: Fix bad join order in returnNodeAsOutput.
2022-03-16 13:44:11 +01:00
Asger Feldthaus
8cef512234
Ruby: ensure ApiGraphs.qll imports its entry points
2022-03-16 13:40:14 +01:00
Asger Feldthaus
e3fbaf5d8f
Shared: prefer exists(var) instead of var = any(string s)
2022-03-16 13:37:08 +01:00
Asger Feldthaus
102540072e
Shared: remove documentation prone to falling out of date
2022-03-16 13:32:55 +01:00
Nick Rolfe
f6681f30c6
Merge pull request #8399 from github/nickrolfe/simple_symbol_constant_value
...
Ruby: implement getComponent(n) for simple and hash-key symbols
2022-03-16 12:10:39 +00:00
Asger Feldthaus
2ca45ef9f9
Ruby: support BlockArgument in identifying access path
2022-03-16 12:51:14 +01:00
Nick Rolfe
94ce578ea4
Ruby: implement getComponent(n) for simple and hash-key symbols
2022-03-16 11:43:46 +00:00
Asger Feldthaus
c9355095e3
Ruby: Use Receiver instead of Argument[-1] in ActiveStorage
2022-03-16 12:37:21 +01:00
Asger Feldthaus
71f195d1e0
Ruby: add test for Receiver in summary
2022-03-16 12:37:21 +01:00
Arthur Baars
6b323eeda8
Update expected output
2022-03-16 12:34:03 +01:00
Arthur Baars
ab93b3784b
Merge remote-tracking branch 'upstream/main' into incomplete-hostname
2022-03-16 12:31:12 +01:00
Arthur Baars
852f05bfb7
Address comment
2022-03-16 12:26:39 +01:00
Nick Rolfe
76918238f0
Ruby: test ExprCfgNode::getConstantValue()
2022-03-16 11:21:57 +00:00
Asger Feldthaus
f140c13261
JS: Sync ApiGraphModels.qll and update accordingly
2022-03-16 12:04:41 +01:00
Asger Feldthaus
2b02a173c1
Ruby: canonicalize callables based on package;type;path instead of input;output;kind
2022-03-16 12:04:41 +01:00
Asger Feldthaus
d8b4bc81ff
JS: Rename EntryPoint.getNode -> getANode
2022-03-16 12:04:39 +01:00
Erik Krogh Kristensen
f53df255b9
Merge pull request #8459 from erik-krogh/addSeverities
...
JS: add missing @security-severity to JS queries
2022-03-16 12:03:19 +01:00
Nick Rolfe
82ef2a12f6
Merge pull request #8164 from github/nickrolfe/escape_sequences
...
Ruby: interpret string escape sequences in getConstantValue()
2022-03-16 10:45:39 +00:00
Chris Smowton
b11340c829
Change note tense and detail level
2022-03-16 10:34:25 +00:00
Nick Rolfe
1a850028e7
Ruby: update date in changenote filename
2022-03-16 10:32:43 +00:00
Erik Krogh Kristensen
cd9d61c1fc
Merge pull request #8450 from erik-krogh/importAs
...
disallow lowercase import-as aliases
2022-03-16 11:32:37 +01:00
Jeroen Ketema
37293141ee
Merge pull request #8428 from jketema/noreturn
...
C++: Handle C11 _Noreturn in DefaultOptions
2022-03-16 11:23:23 +01:00
Asger Feldthaus
33ca55770c
Ruby: EntryPoint.getNode -> getANode
2022-03-16 11:02:26 +01:00
Asger Feldthaus
ecf7073bf1
Shared: codeql -> ql in code blocks
2022-03-16 11:00:24 +01:00
Erik Krogh Kristensen
d47b0a68e7
exclude tests from ql/missing-security-metadata
2022-03-16 10:40:45 +01:00
Erik Krogh Kristensen
2442beaf9a
add missing severities to JS queries
2022-03-16 10:40:34 +01:00
Jeroen Ketema
d51cbe2525
C++: Update IR tests for handling of bitwise copy with explicit source
2022-03-15 23:22:37 +01:00
Jeroen Ketema
8be02b164c
C++: Add IR tests exposing incorrect translation due to unhandled bitwise copy
...
These tests are in addition to exisiting tests involving default copy
constructors, which suffer from the same problem, i.e., the extractor not
handling bitwise copies.
2022-03-15 23:22:37 +01:00
Jeroen Ketema
2894bb0933
C++: Use correct change note file name format
2022-03-15 23:21:14 +01:00
Jeroen Ketema
638b2cac04
C++: Add change note on _Noreturn/noreturn in C11
2022-03-15 23:21:14 +01:00
Jeroen Ketema
1a1c34e1be
C++: Handle C11 _Noreturn in DefaultOptions
2022-03-15 23:21:14 +01:00
Erik Krogh Kristensen
b45f56ac08
Merge pull request #8431 from erik-krogh/deadCode
...
Delete dead code
2022-03-15 20:09:06 +01:00
Jonathan Leitschuh
09cc8ee09e
Add tests for StandardSystemProperty
2022-03-15 12:37:42 -04:00
Mathias Vorreiter Pedersen
57922f56ee
Merge pull request #8424 from ihsinme/ihsinme-patch-fix077
...
Detection reduction on request
2022-03-15 16:17:47 +00:00
Mathias Vorreiter Pedersen
05758181bb
Merge pull request #7884 from rdmarsh2/rdmarsh2/template-implicit-copy-constructor
...
C++: fix hasImplicitCopyConstructor for templates
2022-03-15 15:32:05 +00:00
Anna Railton
a08246a2a7
Merge pull request #8448 from github/annarailton-patch-1
...
Add docstring to `ExtractEndpointMapping.ql`
2022-03-15 14:54:45 +00:00
Erik Krogh Kristensen
b0fc958b32
simplify imports
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-03-15 15:10:04 +01:00
Erik Krogh Kristensen
57db7633c8
C#: make csharp import private
2022-03-15 14:59:06 +01:00
Erik Krogh Kristensen
89af50f6d5
rename all lower-case import-as statements
2022-03-15 14:40:38 +01:00
Erik Krogh Kristensen
54582438a1
QL: recognize the names defined by import as statements
2022-03-15 14:29:33 +01:00
Anna Railton
739d94e8f9
Add docstring to ExtractEndpointMapping.ql
2022-03-15 12:50:51 +00:00
Erik Krogh Kristensen
3067231b1a
Merge pull request #8253 from erik-krogh/domWrite
...
JS: merge hasDominatingWrite and hasDominatingAssignment
2022-03-15 13:37:00 +01:00
Erik Krogh Kristensen
154d0171d3
Merge pull request #8438 from erik-krogh/apiDisable
...
JS: add some API-nodes to js/disabling-certificate-validation
2022-03-15 12:56:59 +01:00
Chris Smowton
451661dd20
Improve guard class names
2022-03-15 11:46:54 +00:00
Mathias Vorreiter Pedersen
9f014be7c7
Merge pull request #8447 from MathiasVP/add-missing-security-severity
...
C++: Add missing `security-severity` tags
2022-03-15 11:29:28 +00:00
Joe Farebrother
8acd8ea01f
Merge pull request #8446 from joefarebrother/sensitive-logging
...
Java: Add security severity to sensitive logging query
2022-03-15 11:17:46 +00:00
Jeroen Ketema
157a36bc4f
Use node variable in all disjuncts
2022-03-15 11:55:35 +01:00
Jeroen Ketema
9a0e94f389
Add flow state versions of isBarrierIn, isBarrierOut, and isBarrierGuard
2022-03-15 11:55:34 +01:00
Mathias Vorreiter Pedersen
7337ebd569
C++: Add missing 'security-severity' tags.
2022-03-15 10:54:36 +00:00
Mathias Vorreiter Pedersen
9642e59349
Merge pull request #8382 from MathiasVP/use-taint-configuration-in-three-more-queries
...
C++: Use a `TaintTracking::Configuration` in three more queries
2022-03-15 10:43:05 +00:00
Joe Farebrother
e4a16cc700
Add security severity
2022-03-15 10:42:41 +00:00
Tony Torralba
6d5414281e
Merge pull request #8437 from atorralba/atorralba/missing-security-severity-query
...
Added MissingSecurityMetadata query
2022-03-15 11:42:41 +01:00
Henry Mercer
f38b498eed
Merge pull request #8433 from github/henrymercer/js-atm-remove-isEffectiveSinkWithOverridingScore
...
JS: Remove `isEffectiveSinkWithOverridingScore` from ML-powered libraries
2022-03-15 10:04:30 +00:00
Tony Torralba
6f484d3d64
Merge pull request #8440 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-03-15 10:58:27 +01:00
Asger Feldthaus
d628dc0b52
Ruby: sync ApiGraphModels.qll
2022-03-15 10:52:41 +01:00
Asger Feldthaus
82750638c6
JS: Verify models even if package is not used in database
2022-03-15 10:51:44 +01:00
Tony Torralba
fd4c9fd543
Cover a missing @tag security when @security-severity is used
2022-03-15 10:39:42 +01:00
Asger Feldthaus
a19f06ffc0
JS: Port checks to JS
2022-03-15 10:35:49 +01:00
Asger Feldthaus
7f8205684e
Ruby: verify tokens in identifying access path
2022-03-15 10:25:59 +01:00
Tony Torralba
82b2fd2d23
Exclude queries without precision
2022-03-15 10:22:10 +01:00
Mathias Vorreiter Pedersen
7e0e7d5004
Merge branch 'main' into use-taint-configuration-in-three-more-queries
2022-03-15 09:06:55 +00:00
Asger Feldthaus
97ca1155c3
JS: Sync ApiGraphModels.qll and test
2022-03-15 09:29:34 +01:00
Asger Feldthaus
65249dabd3
Ruby: add warning for wrong number of columns in CSV row
2022-03-15 09:28:21 +01:00
Erik Krogh Kristensen
c7509c4dd3
Merge branch 'main' into deadCode
2022-03-15 09:19:14 +01:00
Tony Torralba
18165cbb46
Exclude examples folder
2022-03-15 09:14:11 +01:00
Jonas Jensen
d89c52f4b0
Merge pull request #8403 from erik-krogh/noUpper
...
Rename all upper-case variables, and all lower-case modules
2022-03-15 09:00:37 +01:00
Asger Feldthaus
f28acbf3dc
Ruby: autoformat
2022-03-15 08:15:18 +01:00
github-actions[bot]
b10adfc8da
Add changed framework coverage reports
2022-03-15 00:13:15 +00:00
Arthur Baars
3311fedda7
Merge pull request #8365 from aibaars/qldoc-test
...
CI: add QLdoc test
2022-03-14 23:36:01 +01:00
Erik Krogh Kristensen
195ce9c58a
add some API-nodes to js/disabling-certificate-validation
2022-03-14 21:33:13 +01:00
Arthur Baars
6a74e761c8
Merge pull request #8398 from github/post-release-prep/codeql-cli-2.8.3
...
Post-release preparation for codeql-cli-2.8.3
2022-03-14 21:05:09 +01:00
Tom Hvitved
d3d20c69dd
Merge pull request #8425 from hvitved/csharp/structural-comparision-fix
...
C#: Avoid combinatorial explosion in structural comparison library
2022-03-14 20:10:40 +01:00
Henry Mercer
5102cadf8e
Merge pull request #8404 from github/codeql-ci/js-atm-new-release
...
JS: Bump version numbers of ML-powered packs after 0.1.0 release
2022-03-14 17:32:37 +00:00
Tony Torralba
03f3535188
Added MissingSecuritySeverity query
2022-03-14 17:53:08 +01:00
Asger Feldthaus
fee32d3480
Elaborate on qldoc for API::EntryPoint
2022-03-14 17:52:07 +01:00
Asger Feldthaus
be65b9bebc
Ruby: remove spurious Instance token from getExtraSuccessorFromInvoke
2022-03-14 17:39:43 +01:00
Asger Feldthaus
072ad8f4a7
Ruby: add (from model) to remote flow description
2022-03-14 17:39:17 +01:00
Asger Feldthaus
37bbd46e43
Ruby: fix broken comment
2022-03-14 17:33:57 +01:00
Asger Feldthaus
c9d7651c59
Be explicit about re-exporting
2022-03-14 17:26:30 +01:00
Nick Rolfe
488c8ef609
Ruby: accept test changes after adding more literals
2022-03-14 15:49:22 +00:00
Nick Rolfe
2a892c39ac
Ruby: add change note for getConstantValue improvements
2022-03-14 15:45:58 +00:00
Nick Rolfe
a39aed52c6
Ruby: add more tests for edge cases in parsing of integers
2022-03-14 15:45:57 +00:00
Nick Rolfe
6c5868cfb5
Ruby: use NumberUtils in parseInteger
...
And make parse{Binary,Octal,Hex}Int hold only for values in the range
0 to 2^31-1 (incl.)
2022-03-14 15:45:57 +00:00
Nick Rolfe
6bd9616c6e
Ruby: interpret string escape sequences in getConstantValue()
2022-03-14 15:45:57 +00:00
Michael Nebel
bcdbfefb2b
Merge pull request #8329 from michaelnebel/csharp/model-generator
...
C#: Capture Summary models.
2022-03-14 16:10:05 +01:00
Erik Krogh Kristensen
c93f29b1a1
fix typo in change note
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-03-14 16:03:45 +01:00
Joe Farebrother
d4b5eed3e4
Merge pull request #8410 from joefarebrother/sensitive-logging
...
Java: Promote Sensitive Logging query
2022-03-14 14:50:26 +00:00
Henry Mercer
8b1b2af2d8
JS: Remove isEffectiveSinkWithOverridingScore
...
This was previously used in the ATM external API query, but is now dead
code.
2022-03-14 14:25:36 +00:00
Erik Krogh Kristensen
8c28b93427
QL: rename query to ql/name-casing
2022-03-14 15:03:58 +01:00
Erik Krogh Kristensen
87987872c6
QL: use an/a correctly in the alert message
2022-03-14 15:03:07 +01:00
Erik Krogh Kristensen
93fcfc3012
QL: use negative char classes to generalize query to detect e.g. underscores
2022-03-14 15:00:27 +01:00
Mathias Vorreiter Pedersen
7593ebaa62
C++: Use 'getAstVariable' now that 'getASTVariable' is deprecated.
2022-03-14 13:38:27 +00:00
Chris Smowton
9f02ca0db2
Merge pull request #8357 from p0wn4j/jdbc-url-ssrf-sink
...
Java: Add JDBC connection SSRF sinks
2022-03-14 13:27:34 +00:00
Chris Smowton
ca8237b9de
Make comment into qldoc
2022-03-14 13:14:31 +00:00
Mathias Vorreiter Pedersen
50b77761f1
C++: Port the 'predictable' barrier from 'DefaultTaintTracking' to 'cpp/unclear-array-index-validation' to prevent an explosion of new results.
2022-03-14 13:14:07 +00:00
Joe Farebrother
e4b762b5c5
Improve qldoc; make taint tracking
2022-03-14 13:10:34 +00:00
Michael Nebel
21bcaf6a0e
C#/Java: After remaining code after rebase.
2022-03-14 14:08:49 +01:00
Michael Nebel
74352925e4
C#/Java: Remove inline from returnNodeEnclosingCallable.
2022-03-14 13:50:55 +01:00
Michael Nebel
48dc9d7057
C#/Java: Move containerContent to DataFlowPrivate.
2022-03-14 13:50:55 +01:00
Michael Nebel
b7803ef0b1
C#: Introduce SyntheticFieldContent in RelevantContent.
2022-03-14 13:50:55 +01:00
Michael Nebel
12ff2c6cd5
C#/Java: Improve comments in CaptureSummaryModels.
2022-03-14 13:50:55 +01:00
Michael Nebel
3ad9731e91
C#/Java: Add some more QL docs.
2022-03-14 13:50:50 +01:00
Michael Nebel
2476e716a2
C#: Move the isRelevantTaintStep and isRelevantContent into the shared utils.
2022-03-14 13:49:52 +01:00
Michael Nebel
665e3c9326
C#: Re-factor containerContent into standalone predicate in DataFlow library.
2022-03-14 13:49:51 +01:00
Michael Nebel
5d03e510d2
C#/Java: Include synthetic fields in isRelevantContent.
2022-03-14 13:49:51 +01:00
Michael Nebel
d881d31959
C#: Remove comma from QL Doc.
2022-03-14 13:49:51 +01:00
Michael Nebel
cd03af3be4
C#: Get rid of the isOwnInstanceAccess based on ReturnStmt.
2022-03-14 13:49:46 +01:00
Mathias Vorreiter Pedersen
0bf4ce7cf1
Merge pull request #8427 from MathiasVP/fix-bad-join-in-return-stack-allocated-memory
...
C++: Fix join in `cpp/return-stack-allocated-memory`
2022-03-14 12:49:30 +00:00
Michael Nebel
34a91f1aac
C#: Rename CaptureSummaryModelsQuery to CaptureSummaryModels.
2022-03-14 13:48:56 +01:00
Michael Nebel
94a840e96b
C#: Add some more testcases for flow summary generation.
2022-03-14 13:48:56 +01:00
Michael Nebel
36e0c683bd
C#: Add QL Doc to the primary predicate used for capturing flow.
2022-03-14 13:48:56 +01:00
Michael Nebel
e8aacb710e
C#: Add file level QL Doc to Capture Summary models specific implementations.
2022-03-14 13:48:56 +01:00
Michael Nebel
d114582b56
C#: Add QLDoc to the shared Capture summary models library.
2022-03-14 13:48:51 +01:00
Michael Nebel
8d2593ba0c
C#: Add expected output from running the test.
2022-03-14 13:47:24 +01:00
Michael Nebel
4d46b581c3
C#: Add some initial examples.
2022-03-14 13:47:24 +01:00
Michael Nebel
75b4632815
C#: Add test query.
2022-03-14 13:47:24 +01:00
Michael Nebel
20cbd6b332
Java/C#: Include the share files in sync files.
2022-03-14 13:47:24 +01:00
Michael Nebel
b08e696d42
C#: Add query.
2022-03-14 13:47:24 +01:00
Michael Nebel
31a374afa3
C#: Add copy of the shared CaptureSummaryModels logic.
2022-03-14 13:47:24 +01:00
Michael Nebel
e5cce6cca3
C#: Add initial implementation of specific predicates needed to capture summary models.
2022-03-14 13:47:24 +01:00
Michael Nebel
82d93d0f9e
Java: Refactor CaptureSummaryModels code to enable re-use in C#.
2022-03-14 13:47:20 +01:00
Michael Nebel
ba233ed7a1
Java: Rearrange and refactor language specific content into standalone predicates.
2022-03-14 13:46:24 +01:00
Chris Smowton
b351d5bc2f
Autoformat
2022-03-14 12:44:40 +00:00
Michael Nebel
6259ecfc12
C#: Add copy of shared functionality.
2022-03-14 13:43:51 +01:00
Michael Nebel
dadc143b60
C#: Add printer predicates for parameter and return nodes.
2022-03-14 13:43:51 +01:00
Michael Nebel
2b90b5ff62
C#: Add isRelevant predicates.
2022-03-14 13:43:51 +01:00
Michael Nebel
81c8cac77e
C#: Add partial model printer for TargetApi class.
2022-03-14 13:43:51 +01:00
Michael Nebel
9c6ed0ade3
C#: Add TargetAPI class.
2022-03-14 13:43:51 +01:00
Michael Nebel
9ca199c9ae
Java: Move generic code out of language specific file for model generation.
2022-03-14 13:43:45 +01:00
Michael Nebel
a2d9f4f6f4
Java: Introduce language specific file for model generator code.
2022-03-14 13:40:40 +01:00
Michael Nebel
a1c642685a
Java: Re-arrange code in ModelGeneratorUtils.
2022-03-14 13:35:56 +01:00
Erik Krogh Kristensen
689f3c0478
update some references to deprecated module names
2022-03-14 13:28:34 +01:00
Erik Krogh Kristensen
7c4f9f92fb
Merge pull request #8422 from erik-krogh/depMore
...
JS: Address some code that weren't affecting any query result
2022-03-14 13:24:08 +01:00
Chris Smowton
f83ea25ead
Add change note
2022-03-14 12:14:37 +00:00
Erik Krogh Kristensen
548e50c676
QL: add quick-eval predicate to detect unqueryable code
2022-03-14 13:04:22 +01:00
Erik Krogh Kristensen
2250ebc5e2
remove leftover comments
2022-03-14 13:04:22 +01:00
Erik Krogh Kristensen
3bf5e06d53
delete all dead code
2022-03-14 13:03:31 +01:00
Mathias Vorreiter Pedersen
7c411b4bad
C++: Respond to review comments
2022-03-14 11:57:28 +00:00
Erik Krogh Kristensen
27d41cba7e
QL: add ql/dead-code query
2022-03-14 12:57:02 +01:00
Chris Smowton
aada8d3af9
Merge pull request #8405 from smowton/smowton/fix/range-analysis-use-ranked-phi-nodes
...
C#/Java: Range analysis: use ranked phi nodes
2022-03-14 11:55:55 +00:00
Erik Krogh Kristensen
a4525bbb29
add change-note
2022-03-14 12:22:39 +01:00
Erik Krogh Kristensen
ad2ab5602e
PY: rename remaining private python modules
2022-03-14 12:22:33 +01:00
Mathias Vorreiter Pedersen
0da5d91955
Merge branch 'main' into use-taint-configuration-in-three-more-queries
2022-03-14 11:12:23 +00:00
Jeroen Ketema
4c2081b7fc
Merge pull request #8401 from jketema/taint-flow
...
Extend taint tracking interface with flow states
2022-03-14 12:06:10 +01:00
Mathias Vorreiter Pedersen
31b1e4079f
C++: Prevent join-on-enclosing-callable in 'cpp/return-stack-allocated-memory'.
2022-03-14 11:01:07 +00:00
Rasmus Wriedt Larsen
2f4a22c86c
Merge pull request #6112 from jorgectf/jorgectf/python/deserialization
...
Python: Port and extend XXE modeling
2022-03-14 11:59:28 +01:00
Erik Krogh Kristensen
8515a70fe6
JS: fix all ql/no-upper-case-variables
2022-03-14 11:50:48 +01:00
Erik Krogh Kristensen
02127b40cd
PY: fix all ql/no-upper-case-variables
2022-03-14 11:50:48 +01:00
Erik Krogh Kristensen
83f26eb833
rename all upper-case variables to start with a lower-case letter
2022-03-14 11:50:48 +01:00
Erik Krogh Kristensen
4f0d4ecf6e
QL: add no-uppercase-variables query
2022-03-14 11:50:48 +01:00
Erik Krogh Kristensen
7d6700a943
Merge branch 'main' into depMore
2022-03-14 11:49:18 +01:00
Erik Krogh Kristensen
c06336480c
add change note
2022-03-14 11:41:53 +01:00
Erik Krogh Kristensen
bbb2847ec1
Merge pull request #8323 from erik-krogh/acronyms
...
Enforcing consistent casing of acronyms
2022-03-14 11:38:25 +01:00
Jeroen Ketema
c832b21fbe
Add change notes for changes to the taint tracking library
2022-03-14 10:38:48 +01:00
Erik Krogh Kristensen
6d66ea4253
also deprecate the definitionReaches predicate, it was only used in a test
2022-03-14 10:14:15 +01:00
Erik Krogh Kristensen
54760081dc
add pointers to the qldoc of deprecated predicates
2022-03-14 10:10:38 +01:00
Tom Hvitved
06b8f74644
C#: Avoid combinatorial explosion in structural comparison library
...
In cases where the target of a call/access has multiple values (which is a DB
inconsistency), the GVN construction underlying the structural comparision library
may run into a combinatorial explosion. This change excludes such expressions from
the GVN construction.
2022-03-14 09:07:45 +01:00
ihsinme
62381d0762
Update test.cpp
2022-03-14 09:36:28 +03:00
ihsinme
de92356c88
Update InsecureTemporaryFile.expected
2022-03-14 09:35:03 +03:00
ihsinme
1db759cc4d
Update InsecureTemporaryFile.ql
2022-03-14 09:33:08 +03:00
Erik Krogh Kristensen
8f86b067e7
deprecate the unused localTaintStep and stringStep predicates
2022-03-13 23:54:53 +01:00
Erik Krogh Kristensen
cc231fef4c
deprecate some unused predicate in DefUse.qll
2022-03-13 23:54:53 +01:00
Erik Krogh Kristensen
c0a63beec1
deprecate unused document predicates in DOM.qll
2022-03-13 23:54:53 +01:00
Erik Krogh Kristensen
5e52a71091
remove test .qll files that weren't imported
2022-03-13 23:54:53 +01:00
Erik Krogh Kristensen
4fc85a791d
deprecate DefiningIdentifier, it was not used in any query
2022-03-13 23:54:53 +01:00
Erik Krogh Kristensen
9cf0a94e4d
use some Sanitizer classes that were unused in the query code
2022-03-13 23:54:53 +01:00
p0wn4j
ee67d27b56
Java: Add JDBC connection SSRF sinks
2022-03-12 16:35:32 +04:00
Arthur Baars
f59f36b863
Use RUNNER_TEMP instead of runner.temp
2022-03-11 21:13:41 +01:00
Joe Farebrother
b924de631f
Add change note, minor docs improvement
2022-03-11 17:58:52 +00:00
Joe Farebrother
594d51e84d
Exclude constants
2022-03-11 17:45:42 +00:00
Joe Farebrother
06f2c03828
Add tests
2022-03-11 17:44:52 +00:00
Arthur Baars
7da0889813
Update check-qldoc.yml
2022-03-11 17:45:23 +01:00
Arthur Baars
e1f9eca272
Update check-qldoc.yml
2022-03-11 17:44:55 +01:00
Jonathan Leitschuh
50ff2c2c68
Code cleanup from code review
2022-03-11 11:44:15 -05:00
Robert Marsh
5c04516179
Merge pull request #8390 from redsun82/remove-unique-from-uuid
...
C++: Remove uniqueness constraint from uuid
2022-03-11 11:08:34 -05:00
Alex Ford
808cc9cf35
Merge pull request #8396 from alexrford/ruby/charpred-only-field
...
Ruby: resolve `ql/field-only-used-in-charpred` alerts
2022-03-11 15:48:05 +00:00
Erik Krogh Kristensen
fa37ece593
Merge pull request #8408 from erik-krogh/pathProblem
...
QL: make a query checking for `edges` relation in a path-problem query
2022-03-11 16:27:46 +01:00
Erik Krogh Kristensen
14e0d387e7
add a ql/path-problem-query query
2022-03-11 16:06:27 +01:00
Alex Ford
757aa294aa
Update ruby/ql/lib/codeql/ruby/ast/internal/Scope.qll
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-03-11 14:53:02 +00:00
Tony Torralba
c49d19eb0f
Merge pull request #8407 from smowton/smowton/admin/revert-8325
...
Java: Revert #8325 , Add CharacterLiteral to CompileTimeConstantExpr.getStringValue
2022-03-11 14:55:10 +01:00
Arthur Baars
cf4b834536
Address comments
2022-03-11 14:25:34 +01:00
Chris Smowton
58d4513d84
Change note
2022-03-11 12:51:13 +00:00
Chris Smowton
496cae7742
Revert 8325, Add CharacterLiteral to CompileTimeConstantExpr.getStringValue
...
As pointed out in 8325's thread, this breaks the corner case of char-literal addition and the convention that getStringValue only applies to String-typed constants.
2022-03-11 12:45:53 +00:00
Chris Smowton
579b57cf67
Range analysis: use ranked phi nodes
...
This borrows a technique (and the implementing code) off Modulus analysis.
2022-03-11 12:32:12 +00:00
Erik Krogh Kristensen
1e365611fc
fix all other implicit-this warnings introduced by the acronym patch
2022-03-11 13:22:07 +01:00
github-actions[bot]
7ac7657ffc
JS: Bump patch version of ML-powered library and query packs post-release
2022-03-11 12:17:13 +00:00
Erik Krogh Kristensen
2e2970128e
fix typo in change-note
2022-03-11 13:16:34 +01:00
Erik Krogh Kristensen
a5a82a0b58
JS: remove accidential copy-pasted change-note
2022-03-11 13:16:34 +01:00
Erik Krogh Kristensen
b63b675169
RB: add explicit-this
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-03-11 13:16:10 +01:00
github-actions[bot]
2f6886642c
JS: Bump minor version of ML-powered library and query packs
2022-03-11 12:13:03 +00:00
Jeroen Ketema
a8b2805aeb
Merge pull request #8246 from ihsinme/ihsinme-patch-82
...
CPP: Add query for CWE-754: Improper Check for Unusual or Exceptional Conditions when using functions scanf
2022-03-11 12:54:49 +01:00
Chris Smowton
b1a42816bd
Merge pull request #8402 from smowton/smowton/admin/revert-8360
...
Java: Revert #8360 , "Add CompileTimeConstantExpr.getStringified method"
2022-03-11 11:54:24 +00:00
Erik Krogh Kristensen
e625d17978
Merge pull request #8374 from erik-krogh/nonDocBlock
...
QL: add query detecting block comments in a position where a QLDoc should be
2022-03-11 12:24:44 +01:00
Jeroen Ketema
93a0da75b6
Fix taint tracking configurations that broke due to interface change
2022-03-11 12:18:04 +01:00
Chris Smowton
46cd85c70b
Revert #8360 , "Add CompileTimeConstantExpr.getStringified method"
2022-03-11 11:13:21 +00:00
Jeroen Ketema
cd28f09ae0
Extend taint tracking interface with flow states
2022-03-11 11:50:35 +01:00
Jeroen Ketema
80c6253a57
C++: Remove private imports unused after deprecated cleanup
2022-03-11 11:47:44 +01:00
Chris Smowton
f006cd0e37
Merge pull request #8360 from JLLeitschuh/feat/JLL/compile_time_constant_getStringified
...
[Java] Add CompileTimeConstantExpr.getStringified method
2022-03-11 10:34:52 +00:00
Erik Krogh Kristensen
4f8f7cd57d
JS: update expected output of test
2022-03-11 11:18:14 +01:00
Erik Krogh Kristensen
1a275a32f7
add change-notes
2022-03-11 11:18:14 +01:00
Erik Krogh Kristensen
c2787ee18b
RB: add missing QLDoc
2022-03-11 11:18:09 +01:00
Erik Krogh Kristensen
8f08b4ccc8
JS: add missing QLDoc
2022-03-11 11:18:01 +01:00
Erik Krogh Kristensen
25690759fd
JS: update expected test output
2022-03-11 11:17:41 +01:00
Erik Krogh Kristensen
bb32c79f0c
Java: add missing qldoc
2022-03-11 11:17:38 +01:00
Erik Krogh Kristensen
cc43a94385
Java: remove duplicated class
2022-03-11 11:10:38 +01:00
Erik Krogh Kristensen
b568bb91ef
JS: remove duplicated predicate
2022-03-11 11:10:38 +01:00
Erik Krogh Kristensen
ed54d7b74b
fixup getAPrimaryQlClass
2022-03-11 11:10:38 +01:00
Erik Krogh Kristensen
23191b1f2c
C#: rename XmlComment to XmlCommentLine to avoid naming conflict
2022-03-11 11:10:38 +01:00
Erik Krogh Kristensen
69353bb014
patch upper-case acronyms to be PascalCase
2022-03-11 11:10:33 +01:00
Erik Krogh Kristensen
e3a15792fa
QL: add query detecting upper-case acronyms
2022-03-11 11:05:45 +01:00
Erik Krogh Kristensen
122ab6e6d8
C#: fix some ql/non-doc-block warnings
2022-03-11 11:02:58 +01:00
Erik Krogh Kristensen
ddf93b555e
PY: fix some ql/non-doc-block warnings
2022-03-11 11:02:58 +01:00
Erik Krogh Kristensen
8db51b49f3
QL: fix ql/non-doc-block in QL-for-QL
2022-03-11 11:02:58 +01:00
Erik Krogh Kristensen
8483b9fd65
QL: add query detecting block comments in a position where a QLDoc should be
2022-03-11 11:02:56 +01:00
Tony Torralba
c99bad4047
Recover old change note
2022-03-11 10:35:04 +01:00
Mathias Vorreiter Pedersen
3c17d90e3b
C++: Accept test changes.
2022-03-11 09:30:44 +00:00
Mathias Vorreiter Pedersen
272e096190
Merge branch 'main' into use-taint-configuration-in-three-more-queries
2022-03-11 09:24:03 +00:00
github-actions[bot]
3a5ebbb861
Post-release preparation for codeql-cli-2.8.3
2022-03-11 09:23:34 +00:00
Erik Krogh Kristensen
df9533f46e
Merge pull request #8347 from erik-krogh/depBeGone
...
remove all deprecations that are over a year old
2022-03-11 10:01:07 +01:00
Arthur Baars
42ca3f319b
Merge pull request #8397 from github/release-prep/2.8.3
...
Release preparation for version 2.8.3
2022-03-11 08:08:01 +01:00
Jonathan Leitschuh
1c9864286d
Remove SystemProperty from FlowSources
2022-03-10 18:29:29 -05:00
Jeroen Ketema
007e33ad46
Fix C++ changelog heading and itemization
2022-03-10 23:11:07 +01:00
Robert Marsh
1e2cc4fca8
C++: change note for template implicit copy ops
2022-03-10 15:26:24 -05:00
Erik Krogh Kristensen
d316ad198e
Merge pull request #8380 from erik-krogh/chainedCalls
...
JS: support that the base is not a method-call in getAChainedMethodCall
2022-03-10 21:13:42 +01:00
github-actions[bot]
6b194bc55f
Release preparation for version 2.8.3
2022-03-10 19:43:58 +00:00
Alex Ford
305a51754c
Run python config/sync-files.py
2022-03-10 18:34:16 +00:00
Alex Ford
506989ff91
Ruby: simplify some charpreds
2022-03-10 18:27:43 +00:00
Alex Ford
25416babe0
Ruby: resolve ql/field-only-used-in-charpred alerts
2022-03-10 18:27:43 +00:00
Alex Ford
0f0a51e2e0
Ruby: update test output
2022-03-10 18:27:06 +00:00
ihsinme
ac8adeabf5
Update ImproperCheckReturnValueScanf.expected
2022-03-10 21:12:23 +03:00
ihsinme
623f3fbe21
Update test.cpp
2022-03-10 21:10:41 +03:00
Erik Krogh Kristensen
9466043169
CPP: remove remaining ObjectiveC references
2022-03-10 19:00:49 +01:00
Alex Ford
2b25765156
Format QL
2022-03-10 17:55:42 +00:00
Alex Ford
43fb759dfa
Ruby: add a few more rb/clear-text-storage-sensitive-data test cases
2022-03-10 17:52:50 +00:00
Alex Ford
37c0702cdd
Ruby: update test output
2022-03-10 17:50:29 +00:00
Alex Ford
0b73088ed4
Ruby: link to sink in rb/clear-text-storage-sensitive-data message
2022-03-10 17:38:52 +00:00
Alex Ford
0f3cf47ca9
Ruby/JS/Py: Add "random" to the notSensitiveRegexp() heuristic
2022-03-10 17:38:52 +00:00
Alex Ford
532fc080a1
Ruby: Fix inconsistencies in checking for sensitive names in CleartextSources
2022-03-10 17:38:52 +00:00
Alex Ford
8be1be388e
Ruby: update CleartextStorage test output for source locations
2022-03-10 17:38:52 +00:00
Alex Ford
fda2b56e20
Ruby: move rb/clear-text-storage-sensitive-data location from sink to source
2022-03-10 17:38:52 +00:00
Alex Ford
4618000567
Ruby: move an import into CleartextStorage.ql
2022-03-10 17:38:52 +00:00
Alex Ford
853fbe8911
Ruby: Fix CleartextStorageCustomizations to use PersistentWriteAccess
2022-03-10 17:38:52 +00:00
Alex Ford
a1a7c31661
Ruby: drop an outdated TODO
2022-03-10 17:38:52 +00:00
Alex Ford
9fe7d6e143
Ruby: fix typo
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-03-10 17:38:52 +00:00
Alex Ford
0e2709f809
Ruby: changenote for rb/clear-text-storage-sensitive-data
2022-03-10 17:38:52 +00:00
Alex Ford
ef29a372a4
Ruby: Cleartext storage tests
2022-03-10 17:38:52 +00:00
Alex Ford
0070e30377
Ruby: Add rb/clear-text-storage-sensitive-data query
2022-03-10 17:38:52 +00:00
Alex Ford
7084718b07
Ruby: factor out common parts of CleartextLoggingCustomizations into CleartextSources
2022-03-10 17:38:52 +00:00
Alex Ford
19c7f7be46
Merge pull request #8271 from github/alexrford/ruby/orm-write-access
...
Ruby: Add `OrmWriteAccess` concept to model writes to a DB using an ORM
2022-03-10 17:35:02 +00:00
Jonathan Leitschuh
ecb8911756
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-03-10 11:48:16 -05:00
ihsinme
a094e6f63b
Update test.cpp
2022-03-10 17:56:34 +03:00
ihsinme
fa3ce61369
Update test.cpp
2022-03-10 17:54:03 +03:00
Tom Hvitved
d4808a7b4a
Merge pull request #8389 from hvitved/ruby/regex-unique-get-value
...
Ruby: Avoid multiple `RegExpEscape::getValue` results
2022-03-10 15:53:28 +01:00
Joe Farebrother
4bf6c10896
Split configs into Query.qll library
2022-03-10 13:23:40 +00:00
Erik Krogh Kristensen
41778328c2
Update javascript/ql/lib/semmle/javascript/dataflow/Sources.qll
...
Co-authored-by: Stephan Brandauer <kaeluka@github.com >
2022-03-10 14:16:28 +01:00
Mathias Vorreiter Pedersen
bff10e8ea1
C++: Add change note.
2022-03-10 10:59:04 +00:00
Mathias Vorreiter Pedersen
0d3e47bcae
C++: Pick the offset expression as the sink in 'cpp/unclear-array-index-validation' (and not the array expression).
2022-03-10 10:57:51 +00:00
Mathias Vorreiter Pedersen
5de2e24e9a
Merge pull request #8358 from geoffw0/cwe497c
...
C++: Upgrade cpp/system-data-exposure to high precision
2022-03-10 10:49:19 +00:00
Erik Krogh Kristensen
c2743177af
JS: delete the TrackedNodes.qll, it had no public interface left
2022-03-10 11:34:17 +01:00
Mathias Vorreiter Pedersen
693eca2179
C++: Give 'cpp/unclear-array-index-validation' precision low.
2022-03-10 10:17:08 +00:00
Chris Smowton
3113b27606
Fix style
2022-03-10 10:03:14 +00:00
Tom Hvitved
208851cb91
Merge pull request #7084 from hvitved/ruby/self-flow
...
Ruby: Cleanup flow through `self`
2022-03-10 10:50:24 +01:00
Tom Hvitved
5b974582e3
Merge pull request #8322 from hvitved/csharp/remove-odasa-legacy
...
C#: Remove legacy `odasa` support
2022-03-10 10:34:33 +01:00
Paolo Tranquilli
34829e92b1
C++: Remove uniqueness constraint from uuid
...
Different class definitions can have the same uuid. This happens for
example when using `#import <msxml6.dll>` there will be several C++
classes generated in `msxml6.tlh` which will share uuids with
`extern "C"` struct declarations in the system header `msxml.h`.
Notice that as far as the standard cpp QL library and queries go, we
expose `getUuid()` on `UserType` and we never try to invert it, so we
only rely on uniqueness of the `id` column in the `usertype_uuid` table,
not the `uuid` column.
Closes github/codeql-c-team#893
2022-03-10 10:33:37 +01:00
Tom Hvitved
76663f80f0
Ruby: Avoid multiple RegExpEscape::getValue results
2022-03-10 10:32:24 +01:00
Tom Hvitved
0d71f0ab40
Ruby: Add regex unicode test
2022-03-10 10:30:17 +01:00
Erik Krogh Kristensen
fa766126e5
CPP: remove import of deleted deprecation
2022-03-10 10:25:03 +01:00
Erik Krogh Kristensen
a96223c9c1
PY: remove leftover comments
2022-03-10 10:25:03 +01:00
Erik Krogh Kristensen
e6b0552114
JS: delete leftover comment
2022-03-10 10:25:02 +01:00
Erik Krogh Kristensen
53d557c037
CPP: delete file that that had been deprecated for over a year
2022-03-10 10:24:57 +01:00
Tom Hvitved
37f5db5baa
Ruby: Reduce captureFlow(In|Out)
...
When there is flow in/out of a block through a captured variable, we can restrict
the calls that give rise to the flow to the method calls to which the blocks
belong.
2022-03-10 10:21:51 +01:00
Geoffrey White
9e3156dd1c
Merge branch 'main' into cwe497c
2022-03-10 09:05:58 +00:00
Erik Krogh Kristensen
b9b65005d6
C#: delete leftover comment
2022-03-10 10:02:36 +01:00
ihsinme
4b451cfee6
Update ImproperCheckReturnValueScanf.expected
2022-03-10 10:13:04 +03:00
ihsinme
5e23615be7
Update test.cpp
2022-03-10 10:12:29 +03:00
Alex Ford
edf8a3f810
Ruby: update test output
2022-03-10 00:17:29 +00:00
Alex Ford
ace60df619
Ruby: add missing qldoc
2022-03-10 00:00:02 +00:00
Alex Ford
8abee165a5
Ruby: test cases for PersistentWriteAccess in rails model class
2022-03-09 22:35:40 +00:00
Alex Ford
a040b67434
Ruby: drop some redundant extends classes
2022-03-09 19:13:58 +00:00
Alex Ford
d85424d0e0
Ruby: Drop ActiveRecord::Persistence.ModifyAndSaveCall
2022-03-09 19:10:53 +00:00
Alex Ford
19c413d5fb
Ruby: Drop setsKeyValuePair/2 predicate from ActiveRecord::Persistence.ModifyAndSaveCall
2022-03-09 19:09:18 +00:00
Alex Ford
ee433637f8
Ruby: replace OrmWriteAccess with PersistentWriteAccess concept
2022-03-09 18:59:16 +00:00
Erik Krogh Kristensen
34c7bcadde
CPP: delete LocalScopeVariableReachability.qll
2022-03-09 18:28:13 +01:00
Erik Krogh Kristensen
9c4fcf4c6d
fix typo in change-note
...
Co-authored-by: Stephan Brandauer <kaeluka@github.com >
2022-03-09 18:28:13 +01:00
Erik Krogh Kristensen
b45d06df9a
PY: remove leftover comment
2022-03-09 18:28:13 +01:00
Erik Krogh Kristensen
755b0bbcb9
PY: update tests to not use deleted deprecations
2022-03-09 18:28:13 +01:00
Erik Krogh Kristensen
61e282da84
PY: delete test that mostly used deleted deprecated features
2022-03-09 18:28:13 +01:00
Erik Krogh Kristensen
6a28ddd9ec
JS: un-deprecate deleted deprecated class that defined taint-steps
2022-03-09 18:28:12 +01:00
Erik Krogh Kristensen
e140548547
C++: reintroduce deprecated predicates that affect an internal test
2022-03-09 18:28:12 +01:00
Erik Krogh Kristensen
309e376c6d
PY: convert test to not use deleted deprecations
2022-03-09 18:28:12 +01:00
Erik Krogh Kristensen
59db0e7a0f
JS: delete unused predicate
2022-03-09 18:28:12 +01:00
Erik Krogh Kristensen
c48a5a1294
JS: update tests to not use deleted deprecations
2022-03-09 18:28:12 +01:00
Erik Krogh Kristensen
9e46239928
CPP: remove 13 month old deprecation that override an even older deprecation
2022-03-09 18:28:12 +01:00
Erik Krogh Kristensen
417def8c8b
only mark deprecations as old after 14 months
2022-03-09 18:28:12 +01:00
Erik Krogh Kristensen
d5a76e8c98
Python: delete test that only used deprecated classes
2022-03-09 18:28:12 +01:00
Erik Krogh Kristensen
91af2f14b1
CPP: update expected output after deleting deprecated things
2022-03-09 18:28:12 +01:00
Erik Krogh Kristensen
a1769f8036
Python: add default implementation of getName() and deprecate it
2022-03-09 18:28:12 +01:00
Erik Krogh Kristensen
e721094182
Python: remove old deprecation that was recently updated by an automated patch of mine
2022-03-09 18:28:11 +01:00
Erik Krogh Kristensen
b8d632810e
Python: remove deprecation that were recently updated from an automated patch of mine
2022-03-09 18:28:11 +01:00
Erik Krogh Kristensen
5312e4a8b5
add change note that all old deprecations were deleted
2022-03-09 18:28:11 +01:00
Erik Krogh Kristensen
f924d69dbd
Java: remove deprecations that were recently updated from an automated patch of mine
2022-03-09 18:28:11 +01:00
Erik Krogh Kristensen
6dd3f7f113
CPP: remove old deprecated predicate that was recently updated by an automated patch of mine
2022-03-09 18:28:11 +01:00
Erik Krogh Kristensen
1e445856e7
CPP: remove leftover line comment
2022-03-09 18:28:11 +01:00
Erik Krogh Kristensen
a86f0afb3c
delete all deprecations that are over 14 months old
2022-03-09 18:28:07 +01:00
Erik Krogh Kristensen
ef07aaa998
add script for detecting deprecations that are over a year old
2022-03-09 18:25:07 +01:00
Mathias Vorreiter Pedersen
dfb20f7721
Merge pull request #8368 from MathiasVP/add-must-flow-lib
...
C++: Factor must-flow predicates out of two queries
2022-03-09 17:07:23 +00:00
Jonathan Leitschuh
2a6c4e9350
Add localFlowPlusInitializers
2022-03-09 11:06:26 -05:00
Jonathan Leitschuh
363fff2358
Cleanup from code review feedback
2022-03-09 10:48:06 -05:00
Taus
7b877fb317
Merge pull request #8336 from tausbn/python-fix-a-bunch-of-ql-warnings
...
Python: Fix a bunch of QL warnings
2022-03-09 16:31:28 +01:00
Jonathan Leitschuh
65457cc2e2
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-03-09 10:25:05 -05:00
Mathias Vorreiter Pedersen
17cec52af8
Merge pull request #8385 from erik-krogh/orderByConst
...
QL: add query detecting ordering by a constant
2022-03-09 14:18:35 +00:00
Mathias Vorreiter Pedersen
f2676968f0
C++: Actally convert 'cpp/overflow-destination' to a path-problem query.
2022-03-09 13:49:52 +00:00
Michael Nebel
fbe8f75903
Merge pull request #8038 from michaelnebel/csharp/gvn-cfecomparison
...
C#: Refactor Structural Comparison for Control Flow Elements.
2022-03-09 13:36:42 +01:00
Tom Hvitved
aa1284aa03
Ruby: Cache two more data flow predicates
2022-03-09 13:17:14 +01:00
Tom Hvitved
1e1b2e284d
Ruby: Cleanup flow through self
2022-03-09 13:17:11 +01:00
Mathias Vorreiter Pedersen
8a8fb692a3
C++: Use a 'TaintTracking::Configuration' for 'cpp/uncontrolled-allocation-size'.
2022-03-09 12:09:32 +00:00
Mathias Vorreiter Pedersen
2328898b19
C++: Use a 'TaintTracking::Configuration' for 'cpp/unclear-array-index-validation'.
2022-03-09 12:09:27 +00:00
Mathias Vorreiter Pedersen
d7652f9742
C++: Use a 'TaintTracking::Configuration' for 'cpp/overflow-destination'.
2022-03-09 12:07:25 +00:00
Michael Nebel
d0cb984f9e
Merge pull request #6 from hvitved/csharp/gvn-cfecomparison
...
C#: Code review suggestions
2022-03-09 12:11:23 +01:00
Erik Krogh Kristensen
cebd24156c
support that the base is not a method-call in getAChainedMethodCall
2022-03-09 11:12:04 +01:00
Rasmus Wriedt Larsen
0e9da4aadb
Python: Resolve name conflict over XML module
...
Not the prettiest solution... but it works ¯\_(ツ)_/¯
2022-03-09 11:02:28 +01:00
Tom Hvitved
c51ddd0d35
C#: Code review suggestions
2022-03-09 10:50:53 +01:00
Tom Hvitved
275902d558
Merge pull request #8373 from hvitved/ruby/regex-multiples-parse-fix
...
Ruby: Fix incorrect parsing of ranges
2022-03-09 10:30:01 +01:00
Tom Hvitved
7f0fa15fbc
Address review comment
2022-03-09 09:19:37 +01:00
Tom Hvitved
e4247e4ef6
C#: Add change note
2022-03-09 09:19:37 +01:00
Tom Hvitved
c463dc9d1a
C#: Remove legacy odasa support
...
The following environment variables are no longer supported:
```
ODASA_BUILD_ERROR_DIR
ODASA_CSHARP_LAYOUT
ODASA_SNAPSHOT
SEMMLE_DIST
SEMMLE_EXTRACTOR_OPTIONS
SEMMLE_PLATFORM_TOOLS
SEMMLE_PRESERVE_SYMLINKS
SOURCE_ARCHIVE
TRAP_FOLDER
```
2022-03-09 09:19:37 +01:00
Tom Hvitved
f5fbf50d7d
Ruby: Fix incorrect parsing of ranges
2022-03-08 19:53:17 +01:00
Tom Hvitved
89c3d0535a
Ruby: Add regex test that outputs all RegExpTerms
2022-03-08 19:53:17 +01:00
Tom Hvitved
073302f196
Ruby: Add another regex consistency test
2022-03-08 19:53:17 +01:00
Tom Hvitved
a70ed71c01
Merge pull request #8370 from hvitved/ruby/regex-group-name-off-by-one
...
Ruby: Fix off-by-one error in `getGroupName`
2022-03-08 19:52:32 +01:00
Tom Hvitved
5f48cc06bb
Ruby: Fix off-by-one error in getGroupName
2022-03-08 15:59:47 +01:00
Tom Hvitved
6dd126b6e3
Ruby: Add regex group tests
2022-03-08 15:59:28 +01:00
Mathias Vorreiter Pedersen
d8bad778ed
C++: Fix QLDoc
2022-03-08 14:38:39 +00:00
Tom Hvitved
86121164c5
Merge pull request #8364 from hvitved/ruby/fix-regex-parse
...
Ruby: Fix regex parsing of `/[|]/`
2022-03-08 15:26:29 +01:00
Taus
063a8bbc43
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-03-08 15:20:35 +01:00
Michael Nebel
ec75bbc748
Merge pull request #8203 from michaelnebel/csharp/extractor-option-buildless
...
C#: Refactoring - Move some of the standalone extractor code to the Standalone project.
2022-03-08 14:32:59 +01:00
Mathias Vorreiter Pedersen
69417e150a
C++: Address review comments.
2022-03-08 13:15:02 +00:00
Mathias Vorreiter Pedersen
1bf430529b
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/MustFlow.qll
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-03-08 13:07:17 +00:00
Mathias Vorreiter Pedersen
edf629f5aa
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/MustFlow.qll
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-03-08 13:07:09 +00:00
Mathias Vorreiter Pedersen
bfa0714577
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/MustFlow.qll
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-03-08 13:06:53 +00:00
Mathias Vorreiter Pedersen
9e7b0925c6
Merge pull request #8366 from jketema/code-duplication-deprecated
...
C++: Mark everything in CodeDuplication.qll as deprecated
2022-03-08 12:47:50 +00:00
Jeroen Ketema
3877598c12
C++: Remove cpp/duplicated-lines-in-files which was deprecated over a year ago
2022-03-08 12:58:19 +01:00
Mathias Vorreiter Pedersen
7106fe35aa
C++: Accept test changes. This is just a change in the names of the path nodes. These names are actually better as they don't refer to the name of IR instructions.
2022-03-08 11:40:56 +00:00
Mathias Vorreiter Pedersen
8c5b3368e1
C++: Make the two must-flow queries use the new must-flow library
2022-03-08 11:40:56 +00:00
Mathias Vorreiter Pedersen
ee9c0dcb83
C++: Add library for must-flow.
2022-03-08 11:40:56 +00:00
Jeroen Ketema
b039b91fd8
C++: Add change note
2022-03-08 12:36:11 +01:00
Jeroen Ketema
df1e810f13
C++: Remove duplicate code queries that were deprecated over a year ago
2022-03-08 12:28:41 +01:00
Jeroen Ketema
d2e2866276
C++: Also deprecate TDuplicationOrSimilarity
2022-03-08 12:26:07 +01:00
Arthur Baars
6aacc75a49
CI: add QLdoc test
2022-03-08 12:07:20 +01:00
Jeroen Ketema
55351ce835
Update cpp/ql/src/external/CodeDuplication.qll
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-03-08 11:57:05 +01:00
Jeroen Ketema
2e73e35747
Update cpp/ql/src/external/CodeDuplication.qll
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-03-08 11:56:55 +01:00
Jeroen Ketema
81783e828e
C++: Mark everything in CodeDuplication.qll as deprecated
...
Although we earlier added a comment to the classes in noting that
they are deprecated, we did not properly mark the classes as actually
being deprecated.
All predicates - except for 3 - depend on the classes being functional,
which they no longer are, so mark those a deprecated as well. The three
remaining predicates (`FunctionDeclarationEntry`, `numberOfSourceMethods`,
and `whitelistedLineForDuplication`) seem to be helpers, and are likely
not used when the library is not used, so mark those as deprecated as
well.
2022-03-08 11:38:01 +01:00
Erik Krogh Kristensen
4734f1916e
Merge pull request #7598 from erik-krogh/fieldOnlyUsedInCharPred
...
QL: field only used in charPred
2022-03-08 11:25:57 +01:00
Rasmus Wriedt Larsen
6b14c1d6b9
Merge branch 'main' into jorgectf/python/deserialization
2022-03-08 11:15:03 +01:00
Rasmus Wriedt Larsen
cbe3964a87
Merge pull request #8275 from haby0/py/add-ssrf-sinks
...
Python: Add Server-side Request Forgery sinks
2022-03-08 11:06:52 +01:00
Tom Hvitved
3bc8d0878f
Ruby: Add regex consistency queries
2022-03-08 10:10:14 +01:00
Tom Hvitved
6d4eecff14
Ruby: Fix regex parsing of /[|]/
2022-03-08 09:52:06 +01:00
Tom Hvitved
a7442b7a2b
Ruby: Add regex test case for /[|]/
2022-03-08 09:51:39 +01:00
ihsinme
8335778e20
Update ImproperCheckReturnValueScanf.qhelp
2022-03-08 07:45:07 +03:00
ihsinme
c0c7748c5e
Apply suggestions from code review
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-03-08 07:42:35 +03:00
Jonathan Leitschuh
2e8b5f743b
[Java] Add CompileTimeConstantExpr.getStringified method
...
Removes CharacterLiteral from CompileTimeConstantExpr.getStringValue
Resolves:
- https://github.com/github/codeql/pull/8325#issuecomment-1060470279
- https://github.com/github/codeql/pull/8325#issuecomment-1060587205
2022-03-07 20:11:38 -05:00
Jonathan Leitschuh
a21992ade9
Minor refactoring to improve tests and documentation
2022-03-07 18:40:53 -05:00
Jonathan Leitschuh
5b651f29d8
Fix insufficient tests and add documentation
2022-03-07 16:39:40 -05:00
Taus
5a8ba6a7af
Python: Fix use of singleton set
2022-03-07 18:59:49 +00:00
Taus
d2603884ca
Python: Fix a bunch of class QLDoc
2022-03-07 18:59:49 +00:00
Taus
af7f532212
Python: Fix up a bunch of function QLDoc
2022-03-07 18:59:49 +00:00
Geoffrey White
c793699562
C++: Change note.
2022-03-07 17:41:00 +00:00
Geoffrey White
fc6f42296a
C++: Upgrade cpp/system-data-exposure.
2022-03-07 17:39:04 +00:00
Jonathan Leitschuh
b282c7f1b9
Apply suggestions from code review
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
Co-authored-by: Chris Smowton <smowton@github.com >
2022-03-07 11:31:32 -05:00
Tom Hvitved
6aad8d6897
Merge pull request #8302 from aibaars/type-tracking-smallstep
...
Ruby: TypeTracker: add smallstep for functions that return their arguments
2022-03-07 17:26:45 +01:00
Arthur Baars
ce50f35dda
Python: switch to shared implementation of IncompleteHostnameRegExp.ql
2022-03-07 16:10:08 +01:00
Arthur Baars
bb348116ab
JavaScript: update expected output
2022-03-07 16:10:08 +01:00
Arthur Baars
98f56f4d60
Js/Ruby: Share IncompleteHostnameRegExp.ql
2022-03-07 16:10:08 +01:00
Arthur Baars
097c661362
Ruby: drop results that cannot be found yet from IncompleteHostnameRegExp.expected
2022-03-07 16:10:08 +01:00
Arthur Baars
9e8930c192
Ruby: IncompleteHostnameRegExp.ql
2022-03-07 16:10:08 +01:00
Arthur Baars
832c9c4b0b
Ruby: copy IncompleteHostnameRegExp files from JavaScript
2022-03-07 16:10:07 +01:00
Arthur Baars
602538d1c1
Ruby: add RegExpPatterns module
2022-03-07 16:09:12 +01:00
Mathias Vorreiter Pedersen
c7d624d314
Merge pull request #8247 from ihsinme/ihsinme-patch-80
...
CPP: Add query for CWE-190: Integer Overflow or Wraparound when using transform after operation
2022-03-07 11:00:29 +00:00
Geoffrey White
e7dca435a9
Merge pull request #6950 from ihsinme/ihsinme-patch-078
...
CPP: Add query for CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
2022-03-07 10:55:29 +00:00
Arthur Baars
200a965fda
Update expected output
2022-03-07 11:51:54 +01:00
Arthur Baars
95027e746c
Ruby: TypeTracker: add smallstep for functions that return their arguments
2022-03-07 11:51:54 +01:00
Tom Hvitved
9c4c35141a
Ruby: Update type tracker test
2022-03-07 11:51:54 +01:00
Tom Hvitved
64b458b166
Merge pull request #8319 from hvitved/csharp/recursive-qltest-extraction-change-note
...
C#: Add change note about recursive `codeql test run` extraction
2022-03-07 11:43:11 +01:00
Tom Hvitved
c1db0a9429
Merge pull request #8317 from hvitved/typetracker/jump-step
...
Ruby/Python: Clear call contexts after jump steps in type tracking
2022-03-07 11:38:51 +01:00
Tom Bolton
173f45f316
Merge pull request #8334 from github/tombolton/add-mapping-query
...
JS: Add query that maps queries to sink type
2022-03-07 10:35:37 +00:00
Mathias Vorreiter Pedersen
027c8247ae
Merge pull request #8310 from jketema/update-stats
...
C++: Update the DB scheme stats file
2022-03-07 09:11:53 +00:00
Tony Torralba
08ce128d64
Merge pull request #8325 from JLLeitschuh/feat/JLL/improve_compile_time_constant
...
[Java] Add CharacterLiteral to CompileTimeConstantExpr.getStringValue
2022-03-07 09:32:59 +01:00
haby0
7e6666bc63
Merge branch 'main' into py/add-ssrf-sinks
2022-03-07 12:09:14 +08:00
Erik Krogh Kristensen
9c759a987e
QL: add query detecting ordering by a constant
2022-03-06 17:02:19 +01:00
Alex Ford
98dbe3aaf3
Ruby: make ActiveRecord Persistence::ModifyAndSaveCall private
2022-03-05 18:22:32 +00:00
Jonathan Leitschuh
523ddb79f3
Cleanup after code review feedback
2022-03-04 15:35:01 -05:00
Jonathan Leitschuh
5243fe3dbf
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-03-04 15:30:52 -05:00
Tiferet Gazit
bbc712fdb3
Merge pull request #8297 from erik-krogh/atmPerf
...
JS: Fix ATM timeout on NodeJS
2022-03-04 10:41:35 -08:00
Alex Ford
8fed9f9aa0
Ruby: ActiveRecord - match OrmWriteAccesses for assignements to the assignment node rather than the setter call
2022-03-04 17:24:24 +00:00
Mathias Vorreiter Pedersen
624795cbbf
Merge pull request #8059 from rdmarsh2/rdmarsh2/cpp/insufficient-key-strength
...
C++: new query for insufficient key strength
2022-03-04 17:11:44 +00:00
Robert Marsh
280fdbfc1b
C++: accept test output from perf improvement
...
The last commit removed some source nodes from the dataflow graph, which
changed the test expectations slightly. No result changes occurred.
2022-03-04 11:39:10 -05:00
Jorge
5552834e0f
Merge pull request #9 from RasmusWL/WIP
...
Rasmus' rewrite of https://github.com/github/codeql/pull/6112
See https://github.com/github/codeql/pull/6112#pullrequestreview-898959413
2022-03-04 17:18:54 +01:00
Taus
b35718e0d5
Python: Remove uses of getAQlClass
2022-03-04 15:39:27 +00:00
Jonathan Leitschuh
38897f2ec1
Fixup tests from code review changes
2022-03-04 09:33:51 -05:00
Jonathan Leitschuh
17b6e66814
Apply suggestions from code review
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-03-04 09:29:57 -05:00
ihsinme
5c801392d1
Merge pull request #2 from geoffw0/fix_tests
...
Fix tests.
2022-03-04 15:41:41 +03:00
Arthur Baars
71e393c6e1
Merge pull request #8330 from aibaars/cache-regExpSource
...
Ruby: cache regExpSource/1 instead of isInterpretedAsRegExp
2022-03-04 13:38:11 +01:00
Taus
095f27f294
Python: Remove deprecated annotations
2022-03-04 12:30:26 +00:00
Geoffrey White
17cd4d86f1
Fix tests.
2022-03-04 12:27:48 +00:00
Taus
20710616c5
Python: Fix "use set literal" warnings
2022-03-04 12:26:36 +00:00
Geoffrey White
1cb104418f
Update ExposureSensitiveInformationUnauthorizedActor.expected
...
Fix test.
2022-03-04 12:25:22 +00:00
Geoffrey White
a34a61c16f
Update ExposureSensitiveInformationUnauthorizedActor.expected
...
Fix test.
2022-03-04 12:25:05 +00:00
Taus
821de636af
Python: Remove redundant inline casts
...
These are all implied by the return type of the other side of the
equality.
2022-03-04 12:21:31 +00:00
Taus
74f0bdfc79
Python: Fix "unused disjunct" warnings
...
For the most part, these boil down to "some global property holds, and
so this relation contains all instances of class `X`". The fix is to
explicitly build the cartesian product (which we were already building
implicitly anyway) by adding `and exists(var)` to the disjunct that did
not mention `var`.
Note that these cartesian products are always with singletons on one
side, and so should be unproblematic.
2022-03-04 12:14:57 +00:00
Mathias Vorreiter Pedersen
9a91e66714
Merge pull request #8321 from MathiasVP/improve-using-expired-address-query
...
C++: More TPs from `cpp/using-expired-stack-address`
2022-03-04 12:07:55 +00:00
tombolton
2ffa6771ff
replace endpoint type name with encoding in mapping query
2022-03-04 11:00:31 +00:00
Rasmus Wriedt Larsen
3f48916e95
Merge pull request #7915 from yoff/python/promote-xpath-injection
...
Python: promote XPath injection query
2022-03-04 11:59:39 +01:00
Rasmus Wriedt Larsen
f620e2599d
Merge branch 'main' into py/add-ssrf-sinks
2022-03-04 11:50:12 +01:00
Rasmus Wriedt Larsen
e47f726e74
Python: Add change-note
2022-03-04 11:48:17 +01:00
Rasmus Wriedt Larsen
d86284bf32
Python: Update frameworks.rst
2022-03-04 11:48:06 +01:00
Rasmus Wriedt Larsen
75bc532d10
Python: Avoid toString usage :O
2022-03-04 11:41:22 +01:00
Rasmus Wriedt Larsen
866e615689
Python: Add PyPI links in qldocs
2022-03-04 11:40:03 +01:00
Joe Farebrother
6c05f7a81a
remove url from sensitive info regex
2022-03-04 10:37:05 +00:00
Rasmus Wriedt Larsen
02a97b08bb
Python: Move urllib and urllib2 to be part of stdlib modeling
2022-03-04 11:31:47 +01:00
Rasmus Wriedt Larsen
c65839bb77
Python: improve urllib3 modeling
2022-03-04 11:25:14 +01:00
Rasmus Wriedt Larsen
7d6d8be179
Python: Fix httpx modeling
2022-03-04 11:07:51 +01:00
Rasmus Wriedt Larsen
56901ea841
Python: Make new SSRF sink modules private
2022-03-04 11:04:18 +01:00
Rasmus Wriedt Larsen
40feb1fb8d
Python: SPURIOUS results for httpx
2022-03-04 11:03:32 +01:00
yoff
d0a393e8d1
Update python/ql/test/library-tests/frameworks/stdlib/XPathExecution.py
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-03-04 10:56:53 +01:00
yoff
c514282d4a
Merge pull request #8255 from tausbn/python-nomagic-pattern-getcase
...
Python: Prevent magic/inlining in `getCase`
2022-03-04 10:53:20 +01:00
Tom Hvitved
c49ed559d6
Update csharp/ql/lib/change-notes/2022-03-03-recursive-qltest-extraction.md
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-03-04 10:49:42 +01:00
Rasmus Wriedt Larsen
ef045a6789
Python: Fix typo in set_default_parser
2022-03-04 10:18:30 +01:00
Rasmus Wriedt Larsen
1a9620a87a
Python: Add conditional assignment check for sax parser
2022-03-04 10:16:28 +01:00
Rasmus Wriedt Larsen
f0131afc54
Python: Fix huge_tree modeling
2022-03-04 10:16:28 +01:00
Rasmus Wriedt Larsen
d6cbfec434
Python: huge_tree tests were wrong
...
Nice spotted @jorgectf!
2022-03-04 10:16:28 +01:00
Rasmus Wriedt Larsen
3cd165d5b7
Python: Apply suggestions from code review
...
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com >
2022-03-04 10:15:50 +01:00
Arthur Baars
cd5c71e85e
Ruby: cache regExpSource/1 instead of isInterpretedAsRegExp
2022-03-04 10:15:22 +01:00
Jonathan Leitschuh
7ab193dde2
Add System.getProperties().getProperty support
2022-03-03 20:08:38 -05:00
Jorge
683c2fa825
Apply suggestions from code review
2022-03-04 01:02:56 +01:00
Jonathan Leitschuh
04cd0dbfe9
[Java] Add CharacterLiteral to CompileTimeConstantExpr.getStringValue
2022-03-03 18:08:17 -05:00
Jonathan Leitschuh
31527a67e5
Refactor OS Checks & SystemProperty logic from review feedback
2022-03-03 17:15:35 -05:00
Jonathan Leitschuh
103c770ce7
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-03-03 16:39:45 -05:00
Rasmus Wriedt Larsen
3f6c55e8ae
Python: Rename vulnerable predicate => vulnerableTo
2022-03-03 22:09:31 +01:00
Rasmus Wriedt Larsen
0d69dc854c
Python: Minor qldoc improvement
2022-03-03 22:06:26 +01:00
Rasmus Wriedt Larsen
837daaae3b
Python: Remove XMLParser concept
2022-03-03 22:04:48 +01:00
Rasmus Wriedt Larsen
df8e0fce68
Python: Minor fixup of qldoc
2022-03-03 22:02:48 +01:00
ihsinme
467136c173
Create ExposureSensitiveInformationUnauthorizedActor.expected
2022-03-04 00:02:44 +03:00
ihsinme
77bc26681d
Create ExposureSensitiveInformationUnauthorizedActor.expected
2022-03-04 00:02:26 +03:00
Rasmus Wriedt Larsen
c0a6f9f3fd
Python: Restructure lxml modeling
...
and handle parser being passed as positional argument
2022-03-03 22:00:55 +01:00
Rasmus Wriedt Larsen
c0a2c25f5a
Python: Restructure modeling of xml.etree parsers
2022-03-03 21:59:34 +01:00
Rasmus Wriedt Larsen
a033b71eaf
Python: Align QLdocs of XML modeling
2022-03-03 21:34:46 +01:00
Rasmus Wriedt Larsen
de0e67f327
Python: Restructure overall XML modeling
2022-03-03 21:31:15 +01:00
Rasmus Wriedt Larsen
46238d5ea0
Python: Add test for XMLPullParser
...
But handling this in a nice way will require some restructuring
2022-03-03 21:28:46 +01:00
Rasmus Wriedt Larsen
33ebcdf437
Python: Support feed method of lxml/xml.etree Parsers
2022-03-03 21:26:24 +01:00
Rasmus Wriedt Larsen
f72f673e7e
Python: Update XmlEntityInjection.expected
...
I had forgotten about this, but better late than never... also added a
small representative test
2022-03-03 21:18:18 +01:00
Rasmus Wriedt Larsen
3278793972
Python: Handle more functions and kw-args
2022-03-03 21:18:18 +01:00
Rasmus Wriedt Larsen
2451123c67
Python: Move XML PoC to new test dir
2022-03-03 21:18:18 +01:00
Rasmus Wriedt Larsen
c739ae40b6
Python: Port xmltodict tests
2022-03-03 21:18:18 +01:00
Rasmus Wriedt Larsen
0b12d91817
Python: Port xml.sax tests
2022-03-03 21:18:18 +01:00
Harry Maclean
1181779c10
Merge pull request #7920 from github/hmac/string-flow-summaries
...
Ruby: Add String flow summaries
2022-03-04 09:09:19 +13:00
Rasmus Wriedt Larsen
5fb4c4d152
Python: Port xml.etree tests
2022-03-03 20:51:02 +01:00
Robert Marsh
60532e631e
C++: fix missing paren
2022-03-03 14:45:43 -05:00
Rasmus Wriedt Larsen
a7134cac2e
Python: Port xml.dom tests
2022-03-03 20:39:56 +01:00
Rasmus Wriedt Larsen
faebaee141
Python: Use concept tests for XML Parsing
...
I was loosing my mind from looking through those .expected files
Just going to take it one file at time, to make reviewing easier
2022-03-03 20:36:51 +01:00
Rasmus Wriedt Larsen
4b03f5c724
Python: Rename xml.sax test for consistency
2022-03-03 19:39:32 +01:00
Rasmus Wriedt Larsen
7cda901da2
Python: Add separate query for SimpleXMLRPCServer
...
This was a rough quick-n-dirty query, and should get some qhelp as well at some point.
2022-03-03 19:35:33 +01:00
ihsinme
5d1dee24d4
Create ExposureSensitiveInformationUnauthorizedActor.qlref
2022-03-03 20:04:54 +03:00
ihsinme
7b3546ea30
Create ExposureSensitiveInformationUnauthorizedActor.qlref
2022-03-03 20:04:17 +03:00
ihsinme
625f74e9be
Rename cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/semmle/tests/test2.cpp to cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/test3/test.cpp
2022-03-03 20:01:24 +03:00
ihsinme
8eec20644f
Rename cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/semmle/tests/test1.cpp to cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/test2/test.cpp
2022-03-03 20:00:54 +03:00
ihsinme
6e951f74ed
Rename cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/semmle/tests/test.cpp to cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/test1/test.cpp
2022-03-03 20:00:18 +03:00
ihsinme
9c04bd12f5
Update and rename cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/semmle/tests/ExposureSensitiveInformationUnauthorizedActor.expected to cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/test1/ExposureSensitiveInformationUnauthorizedActor.expected
2022-03-03 19:59:36 +03:00
ihsinme
e1c1f80f28
Rename cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/semmle/tests/ExposureSensitiveInformationUnauthorizedActor.qlref to cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/test1/ExposureSensitiveInformationUnauthorizedActor.qlref
2022-03-03 19:58:16 +03:00
ihsinme
b32be69e0a
Update DangerousUseOfTransformationAfterOperation.expected
2022-03-03 19:55:30 +03:00
Rasmus Wriedt Larsen
9406a972cd
Python: Fix vuln detection for xml.minidom with parser arg
2022-03-03 17:52:11 +01:00
Rasmus Wriedt Larsen
5a652480b1
Python: Annotate xml.dom tests
2022-03-03 17:37:25 +01:00
Arthur Baars
b79d08523c
Merge pull request #8293 from aibaars/regex-pattern-source
...
Ruby: parse more string literals as regular expressions
2022-03-03 17:35:40 +01:00
Rasmus Wriedt Larsen
c4d08db62a
Python: Expand XML PoC with minidom/pulldom/expat
2022-03-03 17:30:16 +01:00
Arthur Baars
22b0697371
Update ruby/ql/lib/codeql/ruby/security/performance/ParseRegExp.qll
...
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com >
2022-03-03 17:13:19 +01:00
tombolton
bd9e845aea
update column names and remove encoding value
2022-03-03 15:59:10 +00:00
tombolton
f1f1526237
add query-sink mapping query
2022-03-03 15:20:06 +00:00
Rasmus Wriedt Larsen
3affa6cf3a
Python: Annotate xmltodict tests
2022-03-03 15:08:56 +01:00
Rasmus Wriedt Larsen
61291936bf
Python: Properly model xml.etree
2022-03-03 15:06:55 +01:00
Mathias Vorreiter Pedersen
bf10456bf5
C++: Add a path explanation to the 'cpp/using-expired-stack-address' query.
2022-03-03 13:55:00 +00:00
Mathias Vorreiter Pedersen
9df923a7c8
C++: Catch more true positives by stepping into calls in the 'cpp/using-expired-stack-address' query.
2022-03-03 13:53:09 +00:00
Rasmus Wriedt Larsen
703e3e8a0f
Python: Handle DTD retrieval vuln in lxml
2022-03-03 14:46:48 +01:00
Rasmus Wriedt Larsen
e295399f70
Python: Properly handle huge_tree in lxml
2022-03-03 14:43:37 +01:00
Rasmus Wriedt Larsen
124c03c15c
Python: Expand lxml tests
...
And add annotations, see PoC.py for reference
Some of these needs fixing though
2022-03-03 14:40:45 +01:00
Tom Hvitved
0c2551079a
C#: Add change note about recursive codeql test run extraction
2022-03-03 14:32:55 +01:00
Tom Hvitved
9d6d479fba
Add missing QL doc
2022-03-03 14:17:41 +01:00
Rasmus Wriedt Larsen
3c321dd98d
Python: Model lxml.etree.get_default_parser in own class
2022-03-03 13:49:17 +01:00
Rasmus Wriedt Larsen
52891cb476
Python: Add PoC for XML vulns
2022-03-03 13:48:46 +01:00
Joe Farebrother
4ad402f33f
Move from experimental to main
2022-03-03 12:13:14 +00:00
Tom Hvitved
ba6ff88d05
Sync files
2022-03-03 12:30:50 +01:00
Tom Hvitved
b23ab8089a
Ruby: Clear call contexts after jump steps in type tracking
2022-03-03 12:29:47 +01:00
Rasmus Wriedt Larsen
661d8bf553
Python: Better handling of resolve_entities arg in lxml
2022-03-03 10:05:57 +01:00
Rasmus Wriedt Larsen
515b824b3c
Python: Add lxml positive test
2022-03-03 09:42:19 +01:00
Jeroen Ketema
f80372b837
C++: Update the DB scheme stats file
2022-03-03 09:02:37 +01:00
Jeroen Ketema
3fc2f2f3dc
Merge pull request #8309 from jketema/taint-join-order
...
C++: Fix join order in the IR dataflow library
2022-03-03 09:00:42 +01:00
ihsinme
01f9114a80
Update test.cpp
2022-03-03 10:57:11 +03:00
ihsinme
bec4170bdf
Update ImproperCheckReturnValueScanf.expected
2022-03-03 10:39:19 +03:00
ihsinme
8e0c0ad200
Update test.cpp
2022-03-03 10:37:31 +03:00
ihsinme
25b3aba823
Update test.cpp
2022-03-03 10:21:38 +03:00
ihsinme
2dc85e183c
Update test.cpp
2022-03-03 10:20:41 +03:00
ihsinme
547342cd61
Update test.cpp
2022-03-03 10:16:00 +03:00
ihsinme
1a30b8d467
Apply suggestions from code review
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-03-03 10:14:22 +03:00
Jeroen Ketema
2fd950caad
C++: Fix join order in the IR dataflow library
...
Not having this fixed caused problems when updating the database
scheme stats file.
2022-03-03 07:42:52 +01:00
Jonathan Leitschuh
fea50065f5
Fix duplicated comment
2022-03-02 19:54:04 -05:00
Jonathan Leitschuh
85de9f305e
Fix naming of OSCheck method
2022-03-02 19:41:46 -05:00
Jonathan Leitschuh
a7adbb7291
Refactor more system property access logic
2022-03-02 19:33:05 -05:00
Harry Maclean
4a43731b83
Ruby: Use SimpleSummarizedCallable
...
This simplifies some String flow summaries.
2022-03-03 10:49:44 +13:00
Robert Marsh
9fb94d85b4
C++: performance tweaks for InsufficientKeySize
2022-03-02 15:59:42 -05:00
Arthur Baars
692fc4cb02
Update ruby/ql/lib/change-notes/2022-02-28-regex-string-literals.md
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-03-02 21:13:23 +01:00
Jonathan Leitschuh
3c53a05e16
Add OS Checks based upon separator or path separator
2022-03-02 14:15:56 -05:00
Jonathan Leitschuh
82d3cd8924
Improve system property lookup
2022-03-02 12:51:15 -05:00
Jonathan Leitschuh
dad9a02fbd
Update TempDirInfoDisclosure with new OS Guards
2022-03-02 12:51:15 -05:00
Jonathan Leitschuh
5913c9acad
Refactor OS Guard Checks
2022-03-02 12:51:14 -05:00
Jonathan Leitschuh
fd63107edf
Update OS Check from Review Feedback
2022-03-02 12:51:12 -05:00
Jonathan Leitschuh
9f5022ee95
Review fixup and add test for apache SystemUtils
2022-03-02 12:50:38 -05:00
Jonathan Leitschuh
49513443f2
Update java/ql/lib/semmle/code/java/os/OSCheck.qll
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2022-03-02 12:50:37 -05:00
Jonathan Leitschuh
3cdfc00542
Cleanup from review feedback
2022-03-02 12:50:37 -05:00
Jonathan Leitschuh
39828fd596
Apply OS guard checks to TempDirLocalInformationDisclosure
2022-03-02 12:50:37 -05:00
Jonathan Leitschuh
cd073a2173
Java: Add Guard Classes for checking OS
2022-03-02 12:50:35 -05:00
Rasmus Lerchedahl Petersen
6946ae931a
python: missed a spot..
2022-03-02 17:12:48 +01:00
Michael Nebel
b39f383d45
Merge pull request #8230 from michaelnebel/csharp/autobuilder-buildless
...
C#: Buildless extractor option.
2022-03-02 15:53:02 +01:00
Rasmus Wriedt Larsen
7f7758b83d
Python: rewrite xml sax modeling
2022-03-02 15:22:11 +01:00
Rasmus Wriedt Larsen
6dd776b2de
Python: Only produce one alert per vulnerable XML sink
...
This made it much easier to debug the current alerts on tests at least.
Notice that it's important that we have `strictconcat` and not just
`concat`, since `concat` will also allow flow to sinks that are not
vulnerable to any kind of XML vulnerability :|
2022-03-02 15:22:11 +01:00
Michael Nebel
938902dc89
C#: Include example fragment in the release note on, how to invoke the extractor with the optional parameter.
2022-03-02 14:28:25 +01:00
Michael Nebel
fc89888c74
C#: Add pattern that only accepts 'true' and 'false' as the buildless option.
2022-03-02 14:28:21 +01:00
Michael Nebel
c5ddf6110f
C#: Address review comments (change description to use true/false instead of yes/no).
2022-03-02 14:27:45 +01:00
Rasmus Wriedt Larsen
16e482bf6f
Python: Improve QLDoc for XML parsing/parsers
2022-03-02 14:25:12 +01:00
Rasmus Wriedt Larsen
aaf55b21c4
Python: Add XMLVulnerabilityKind
...
This gives some freedom in changing the name presented, and not worrying about whether you have made a typo that makes everything break :|
2022-03-02 14:25:12 +01:00
Rasmus Wriedt Larsen
ee23c05489
Python: XML: Expose vuln kind on sink
2022-03-02 14:25:12 +01:00
Michael Nebel
8d9999a8c4
C#: Change note describing the buildless extractor option.
2022-03-02 14:25:11 +01:00
Michael Nebel
3859b62554
C#: Autobuilder should use standalone in case buildless options is provided.
2022-03-02 14:25:11 +01:00
Michael Nebel
c973693bee
C#: Introduce buildless extractor option.
2022-03-02 14:25:06 +01:00
Rasmus Wriedt Larsen
500e0aced6
Python: Rewrite sax XML tests
...
The tests for type-trackers were not that interesting, since they did
not have XML input in both cases, which is the problem we were trying
hard to solve.
I did keep the test-case of not-user-supplied url alive as well though
👍
I added OK/NOT OK annotations.
Notice that we report all 4 kinds of vulnerabilities on line 93
2022-03-02 14:24:46 +01:00
Michael Nebel
fff42501fc
Merge pull request #8167 from michaelnebel/csharp/extractor-option-compress
...
C# Extractor Option for specifying compression.
2022-03-02 14:22:52 +01:00
Michael Nebel
23fbfbc3b7
C#: Performance optimization of the GVN implementation.
2022-03-02 13:48:33 +01:00
Michael Nebel
a0a2cde6fa
C#: Update relase note to include example fragment on, how to invoke the extractor with the optional parameter.
2022-03-02 13:17:20 +01:00
Rasmus Lerchedahl Petersen
143e9ee954
Merge branch 'main' of github.com:github/codeql into python/promote-xpath-injection
2022-03-02 13:14:08 +01:00
Rasmus Lerchedahl Petersen
ee45e79948
python: Create XML modulein Concepts
...
to prepare for XXE and other XML related modelling
2022-03-02 13:10:23 +01:00
Rasmus Lerchedahl Petersen
80be767a7a
python: implement stdlib xpath support
2022-03-02 12:59:34 +01:00
Rasmus Lerchedahl Petersen
06e0f140c5
python: add tests for stdlib xpath
2022-03-02 12:58:37 +01:00
Erik Krogh Kristensen
62f2614f72
move hasDominatingWrite to the TypeTracking stage
2022-03-02 11:30:05 +01:00
Erik Krogh Kristensen
1db6a644a5
only block flow for dominated reads when the property name is known
2022-03-02 11:30:05 +01:00
Erik Krogh Kristensen
a9062cc047
merge hasDominatingWrite and hasDominatingAssignment
2022-03-02 11:30:05 +01:00
Mathias Vorreiter Pedersen
3681a1b736
Merge pull request #7933 from geoffw0/cwe497
...
C++: Improve cpp/system-data-exposure
2022-03-02 10:18:01 +00:00
Mathias Vorreiter Pedersen
71cd507f89
Merge pull request #8298 from MathiasVP/filter-bad-conversions-in-cpp-gvn
...
C++: Fix `GVN` performance on more invalid IR
2022-03-02 10:14:19 +00:00
Michael Nebel
53b2eac8c5
C#: Remove (symmetric) duplicates from the test output.
2022-03-02 09:44:51 +01:00
Michael Nebel
38f04e5585
C#: Flatten the the Gvn type.
2022-03-02 09:44:51 +01:00
Michael Nebel
6b4dea780f
C#: Introduce caching of the Gvn related types and the toGvn predicate.
2022-03-02 09:44:51 +01:00
Michael Nebel
796a18043b
C#: Add testcase for GVN printing.
2022-03-02 09:44:51 +01:00
Michael Nebel
7e25b141ca
C#: Add test cases for finding structurally equivalent control flow elements.
2022-03-02 09:44:51 +01:00
Michael Nebel
52952e98bf
C#: Example source code with structurally same expressions and statements.
2022-03-02 09:44:51 +01:00
Michael Nebel
4499551ca4
C#: Add a verbatim copy of the structural comparison for internal use only.
2022-03-02 09:44:51 +01:00
Michael Nebel
16270cf57f
C#: Add configuration class to allow defining a candidate pairs of control flow predicates, where we want to look for structural equality.
2022-03-02 09:44:51 +01:00
Michael Nebel
87cb92a434
C#: Add predicates for restricting the Gvn type and the relation between control flow elements and global value numbers.
2022-03-02 09:44:51 +01:00
Michael Nebel
8bd12b23e2
C#: Add type(s) for representing global value numbers.
2022-03-02 09:44:51 +01:00
Michael Nebel
cc5d56547c
C#: Add type Global value number kinds for control flow elements.
2022-03-02 09:44:51 +01:00
Michael Nebel
8179e247bf
C#: Delete the existing structural comparison implementation.
2022-03-02 09:44:51 +01:00
ihsinme
9e76260f1d
Update DangerousUseOfTransformationAfterOperation.ql
2022-03-02 10:38:57 +03:00
ihsinme
f5267ba8c6
Update DangerousUseOfTransformationAfterOperation.qhelp
2022-03-02 10:24:40 +03:00
Harry Maclean
37dac186a8
Ruby: String.try_convert isn't value-preserving
...
`String.try_convert` can convert arbitrary objects to strings, which
obviously isn't value-preserving.
2022-03-02 13:31:59 +13:00
Arthur Baars
169f65526e
Merge pull request #8292 from aibaars/api-graphs-private
...
Ruby: ApiGraphs: use private imports
2022-03-02 00:35:46 +01:00
Taus
8460ab4f31
Merge pull request #7549 from hvitved/python/points-to-perf
2022-03-01 23:05:10 +01:00
Mathias Vorreiter Pedersen
155502cfdb
C#/C++: Sync identical files.
2022-03-01 16:56:49 +00:00
Mathias Vorreiter Pedersen
4acae4a2d1
C++: Remove redundant conjunct.
2022-03-01 16:56:25 +00:00
Geoffrey White
2962b125af
Merge branch 'main' into cwe497
2022-03-01 16:19:28 +00:00
Paolo Tranquilli
c81f2661a3
Merge pull request #8300 from redsun82/check-qhelp
...
check-qhelp: call super init in IncludeHandler
2022-03-01 17:07:28 +01:00
Paolo Tranquilli
ef4d1de9c3
check-qhelp: call super init in IncludeHandler
...
`xml.sax.ContentHandler` has a non-trivial `__init__`. While this is
probably harmless, it does not hurt to fix this.
2022-03-01 16:50:55 +01:00
Rasmus Wriedt Larsen
518e2aeebf
Merge branch 'main' into jorgectf/python/deserialization
2022-03-01 16:47:13 +01:00
Rasmus Lerchedahl Petersen
f55d7d627e
python: model XPathEvaluator
2022-03-01 14:40:13 +01:00
Rasmus Lerchedahl Petersen
3bb17be389
python: add concept and library tests
2022-03-01 14:39:28 +01:00
ihsinme
a6654fce4a
Update ImproperCheckReturnValueScanf.ql
2022-03-01 16:37:29 +03:00
ihsinme
e9fefab9b1
Update test.cpp
2022-03-01 16:36:24 +03:00
ihsinme
bfec3c5e6e
Update ImproperCheckReturnValueScanf.expected
2022-03-01 16:35:31 +03:00
Tom Hvitved
92fa0071bd
Update python/ql/lib/semmle/python/pointsto/MRO.qll
...
Co-authored-by: Taus <tausbn@github.com >
2022-03-01 14:16:49 +01:00
Asger Feldthaus
df379809df
Ruby: support CSV rows of form ;any;Method[foo]
2022-03-01 14:08:21 +01:00
Asger Feldthaus
05ea33033b
Ruby: add test for API::EntryPoint
2022-03-01 14:08:21 +01:00
Asger Feldthaus
bf83400bd2
Ruby: port API::EntryPoint from JS
2022-03-01 14:08:21 +01:00
Asger Feldthaus
e10e3b9466
Ruby: convert ActiveStorage::Filename model to MaD
2022-03-01 14:08:21 +01:00
Asger Feldthaus
e6a3747656
Ruby: add test for ActiveStorage.Filename.new
2022-03-01 14:08:21 +01:00
Asger Feldthaus
70c083fa64
Ruby: convert Regexp.escape model to MaD
2022-03-01 14:08:21 +01:00
Asger Feldthaus
cbd044a768
Ruby: add a code injection test for flwo through Regexp.escape
2022-03-01 14:08:21 +01:00
Asger Feldthaus
63e7c16d6b
Ruby: add test with sinks and type-defs
2022-03-01 14:08:20 +01:00
Asger Feldthaus
388949f12e
Ruby: support WithBlock and WithoutBlock
2022-03-01 14:08:20 +01:00
Asger Feldthaus
d6bc9c259e
Ruby: add simple test case
2022-03-01 14:08:20 +01:00
Asger Feldthaus
d808bdc028
JS: Sync ApiGraphModels.qll
2022-03-01 14:08:20 +01:00
Asger Feldthaus
a33e89279d
Ruby: instantiate ApiGraphModels library in Ruby
2022-03-01 14:08:20 +01:00
Arthur Baars
ea8187c771
Ruby: .github/workflows/ruby-qltest.yml: turn off fail-fast
2022-03-01 13:30:56 +01:00
Arthur Baars
b2745d44f2
Ruby: update ReDoS.expected
2022-03-01 13:30:56 +01:00
Arthur Baars
61fa3ba314
Add change note
2022-03-01 13:30:56 +01:00
Arthur Baars
a51f17e0ed
Ruby: introduce RegExpPatternSource
2022-03-01 13:30:51 +01:00
Arthur Baars
1240c11c4b
Ruby: parse some string literals as regex
...
In addition to regex literals, also parse normal string literals
as regular expressions if they somehow "flow" into a method call
that is known to interpret string values as regular expressions.
2022-03-01 13:26:51 +01:00
Geoffrey White
5402b02fd7
Merge branch 'main' into cwe497
2022-03-01 11:58:24 +00:00
Mathias Vorreiter Pedersen
52dbf2c787
C#/C++: Sync identical files.
2022-03-01 11:50:50 +00:00
Mathias Vorreiter Pedersen
b6faa207a4
C++: Remove redundant cast.
2022-03-01 11:50:44 +00:00
Mathias Vorreiter Pedersen
93bd380838
C#/C++: Sync identical files.
2022-03-01 11:37:19 +00:00
Mathias Vorreiter Pedersen
6b324fb781
C++: Filter out InheritanceConversionInstructions with multiple base or derived classes when doing global value numbering.
2022-03-01 11:34:41 +00:00
Michael Nebel
8312fc6895
C#: Use groups and rename to trap.compression instead. Various changes to description to align with Ruby.
2022-03-01 12:01:44 +01:00
Tamás Vajk
94cb5c2be4
Merge pull request #8296 from github/post-release-prep/codeql-cli-2.8.2
...
Post-release preparation for codeql-cli-2.8.2
2022-03-01 11:57:36 +01:00
Rasmus Wriedt Larsen
eece2222ba
Merge pull request #8252 from github/RasmusWL/debugging-dataflow-improvements
...
Docs: Mention `hasPartialFlowRev` and performance problem
2022-03-01 11:27:57 +01:00
Erik Krogh Kristensen
dfc74d728b
fix duplicate words in qldoc
2022-03-01 11:22:58 +01:00
Erik Krogh Kristensen
1b5c7392f0
restrict the size of the getASubexpressionWithinQuery predicate, and remove double-recursion
2022-03-01 11:18:42 +01:00
Erik Krogh Kristensen
bdd07de7ed
improve performance of getTestFile by finding possible test files first
2022-03-01 11:18:22 +01:00
Erik Krogh Kristensen
51482e4fcf
Merge pull request #8295 from erik-krogh/ts46
...
JS: Add support for TypeScript 4.6
2022-03-01 11:09:02 +01:00
Michael Nebel
7522a2d248
Merge pull request #7832 from aschackmull/java/modelgen
...
Java: Simplify model generator query using flow state.
2022-03-01 10:57:07 +01:00
Rasmus Lerchedahl Petersen
ce3ee65f47
python: remove getTree for now
2022-03-01 10:49:21 +01:00
Rasmus Wriedt Larsen
f3f2c3183e
Docs: Apply suggestions from code review
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-03-01 10:45:24 +01:00
Mathias Vorreiter Pedersen
1f01d8014e
Merge pull request #8225 from jketema/ir-structured-bindings-translation
...
C++: Update the IR translation for structured bindings
2022-03-01 09:43:35 +00:00
yoff
853857bd7e
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-03-01 10:26:29 +01:00
ihsinme
be11e4fc2d
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-03-01 12:25:57 +03:00
github-actions[bot]
980f822983
Post-release preparation for codeql-cli-2.8.2
2022-03-01 09:24:30 +00:00
Arthur Baars
7e6ef7ac74
Ruby: ApiGraphs: use private imports
2022-03-01 10:24:19 +01:00
Erik Krogh Kristensen
4c58f9781b
add support for TypeScript 4.6
2022-03-01 09:56:21 +01:00
Mathias Vorreiter Pedersen
3719353338
Merge pull request #8172 from github/redsun82/pre-commit
...
add pre-commit configuration
2022-03-01 08:54:54 +00:00
Erik Krogh Kristensen
2b7c819135
fix extension of change-note
2022-03-01 09:54:19 +01:00
Michael Nebel
7bde1cbfb3
Java: Add case for Synthetic Fields in isRelevantTaintStep.
2022-03-01 09:15:01 +01:00
ihsinme
d772ea0efe
Apply suggestions from code review
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-03-01 10:49:36 +03:00
ihsinme
bc22b9b208
Update test.cpp
2022-03-01 09:43:15 +03:00
ihsinme
c6083a6f95
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-03-01 09:37:57 +03:00
Jeroen Ketema
0c2cfa1307
C++: Add comment on the existence of reference types
2022-02-28 19:14:54 +01:00
Arthur Baars
5ce6b847d1
Merge pull request #8166 from aibaars/regex-char-sequence-1
...
Ruby/Python: regex parser: group sequences of 'normal' characters
2022-02-28 17:47:53 +01:00
Tamás Vajk
d3e36038a0
Merge pull request #8152 from tamasvajk/fix/useless-dynamic-cast
...
C# Exclude dynamic casts from useless casts check
2022-02-28 17:00:28 +01:00
Michael Nebel
24640c3670
Java: Make a testcase for wrappers of sources.
2022-02-28 16:57:36 +01:00
Michael Nebel
66fe0e74b5
Java: Don't require that the source is directly within the TargetApi itself (in that case wrappers get excluded).
2022-02-28 16:48:23 +01:00
Michael Nebel
4a0b2b64b3
Java: Explicitly tie ReturnNode to TargetApi before calling returnNodeAsOutput.
2022-02-28 16:48:23 +01:00
Tom Hvitved
44949b6353
Java: Add bindingset to returnNodeAsOutput
2022-02-28 16:48:23 +01:00
Anders Schack-Mulligen
908cc40c9f
Java: Fix bug in model flow sanitizer.
2022-02-28 16:48:23 +01:00
Anders Schack-Mulligen
16a5ccddea
Java: Simplify model generator query using flow state.
2022-02-28 16:48:23 +01:00
yoff
d953382df9
Merge pull request #7807 from RasmusWL/dataflow-improvements
...
Python: Dataflow improvements
2022-02-28 16:24:00 +01:00
Jeroen Ketema
497991b6b1
C++: Improve change note
2022-02-28 16:08:23 +01:00
Tom Hvitved
5cba505514
Merge pull request #8284 from hvitved/csharp/move-csharp9-standalone-tests
...
C#: Move C# 9 standalone tests
2022-02-28 15:15:47 +01:00
Tamas Vajk
efb876192f
Add change note
2022-02-28 14:58:59 +01:00
Tamas Vajk
4748d2c6e2
C# Exclude dynamic casts from useless casts check
2022-02-28 14:58:59 +01:00
Ian Lynagh
1e62b485a5
Merge pull request #8241 from igfoo/igfoo/stats4
...
Java: Update stats and make some performance tweaks
2022-02-28 12:58:06 +00:00
Tom Hvitved
4ecd843c05
C#: Move C# 9 standalone tests
2022-02-28 13:43:20 +01:00
haby0
be40b54b9f
add test
2022-02-28 20:34:58 +08:00
Geoffrey White
2b0d473072
C++: Remove this query from exclude-slow-queries.yml.
2022-02-28 12:18:11 +00:00
Rasmus Wriedt Larsen
0e0f159891
Python: Use Python 3 for investigation tests
...
Apparently there are minor differences with `test-6-max-import-depth-2`
where under Python 2 `isfile_no_problem.py` still works as before
2022-02-28 11:33:31 +01:00
Rasmus Wriedt Larsen
01d426dc58
Python: Replace rest of from testlib import *
...
I think we should write our tests in a way that puts points-to in the
best condition to resolve calls. Although this specific change did not
change much, it should help set us up for success in the future 👍
2022-02-28 10:58:44 +01:00
Rasmus Wriedt Larsen
ead0b658d2
Python: Fix fieldflow tests by increasing max-import-depth
2022-02-28 10:58:44 +01:00
Rasmus Wriedt Larsen
a0d1cea490
Python: Add investigation of field-flow problem
...
TL;DR; we used a too low value for `--max-import-depth` :(
2022-02-28 10:58:44 +01:00
haby0
b23e28a1e6
add Server-side Request Forgery sinks
2022-02-28 15:24:02 +08:00
Alex Ford
6ddacce27a
Ruby: Add OrmWriteAccess concept changenote
2022-02-28 01:18:39 +00:00
Alex Ford
63ef9a75c9
Ruby: model OrmWriteAccesses for ActiveRecord
2022-02-28 01:18:39 +00:00
Alex Ford
b1fd321b65
Ruby: update Rails framework test output for existing tests
2022-02-28 01:13:26 +00:00
Alex Ford
283a48c76d
Ruby: tests for OrmWriteAccess
2022-02-28 01:12:49 +00:00
Alex Ford
8c6c680a28
Ruby: Add OrmWriteAccess concept
2022-02-28 01:11:40 +00:00
Jeroen Ketema
e40c51cc83
C++: Add documentation for TranslatedStructuredBindingVariableAccess
2022-02-27 21:13:48 +01:00
Jeroen Ketema
0a4d8132e6
C++: Consistently use getUnspecifiedType in structured binding IR translation
2022-02-27 21:13:48 +01:00
Jeroen Ketema
4ffbc2d148
C++: Ensure we use lvalue reference types for structured bindings
...
This also adds a test for rvalue reference uses in the tuple
structured binding case.
2022-02-27 21:13:48 +01:00
Jeroen Ketema
074577b539
C++: Refactor IR structured binding tuple test
2022-02-27 21:13:48 +01:00
Jeroen Ketema
edaabf8fdf
C++: Add structured bindings IR change note
2022-02-27 21:13:48 +01:00
Jeroen Ketema
6515e77c0e
C++: Generate additional loads for non-reference structured bindings
2022-02-27 21:13:48 +01:00
Jeroen Ketema
eebfbc12a0
C++: Add structured bindings struct as data member test case
2022-02-27 21:13:48 +01:00
Jeroen Ketema
5814349fd8
C++: Give names in structured binding declarations correct IR types
2022-02-27 21:13:48 +01:00
Jeroen Ketema
73f0366dc6
C++: Add typedef'ed reference structured binding test
2022-02-27 21:13:48 +01:00
Jeroen Ketema
91659af4d4
C++: Add array data member structured binding test
2022-02-27 21:13:48 +01:00
Jeroen Ketema
ec05942693
C++: Use unnamed_local_variable in array structured binding test
2022-02-27 21:13:48 +01:00
Jeroen Ketema
437a85dec7
C++: Add pointer related structured binding tests
2022-02-27 21:13:48 +01:00
Chris Smowton
958fd9b3ea
Merge pull request #7867 from ahmed532009/timing-attacks
...
Java: Timing attacks while comparing the headers value
2022-02-25 21:55:13 +00:00
Chris Smowton
f981fee37d
Adjust test expectation
2022-02-25 20:05:06 +00:00
Chris Smowton
ff5d680837
Add missing substitution description
2022-02-25 19:12:25 +00:00
Ian Lynagh
0bf1370cd5
Java: Autoformat QL
2022-02-25 19:08:08 +00:00
Alexander Eyers-Taylor
d38cd4a0d7
Merge pull request #8156 from alexet/alexet/expression-pragma-doc
...
QLSpeciifcation: Add documentation for expression pragmas
2022-02-25 18:59:49 +00:00
Arthur Baars
0c23f5815f
Add change note
2022-02-25 18:43:43 +01:00
Arthur Baars
5044f89105
Ruby/Python re-introduce normalCharacterSequence
2022-02-25 18:43:43 +01:00
Chris Smowton
8fbd8c52dd
Fix test expectations
2022-02-25 17:35:52 +00:00
Chris Smowton
ff303db034
Autoformat and fix qhelp
2022-02-25 17:33:08 +00:00
Chris Smowton
303927c9c9
Fix qhelp
2022-02-25 17:33:08 +00:00
Chris Smowton
e02a3d0ddd
Rename qlref file
2022-02-25 17:33:08 +00:00
Ahmed Farid
3a2d514b18
Create ComparingValueOfSensetiveHeader.qlref
2022-02-25 17:33:08 +00:00
Ahmed Farid
0d278f6d61
Create Test.java
2022-02-25 17:33:08 +00:00
Ahmed Farid
1bc5fe13eb
Update and rename java/ql/test/experimental/query-tests/security/CWE-208/TimingAttackAgainstHeader.expected to java/ql/test/experimental/query-tests/security/CWE-208/TimingAttackAgainstHeader/TimingAttackAgainstHeader.expected
2022-02-25 17:33:08 +00:00
Ahmed Farid
63133f7e8b
Update TimingAttackAgainstHeader.expected
2022-02-25 17:33:08 +00:00
Ahmed Farid
f2457dafb5
Create TimingAttackAgainstHeader.expected
2022-02-25 17:33:08 +00:00
Ahmed Farid
35abc3f9a3
Update and rename ComparingValueOfSensetiveHeader.java to Test.java
2022-02-25 17:33:08 +00:00
Chris Smowton
091227982c
Delete unnecessary test files
2022-02-25 17:33:08 +00:00
Ahmed Farid
899b8d03b2
Update TimingAttackAgainstHeader.ql
2022-02-25 17:33:07 +00:00
Ahmed Farid
308f86f66f
Update TimingAttackAgainstHeader.ql
2022-02-25 17:33:07 +00:00
Ahmed Farid
2eee6b4f69
Update TimingAttackAgainstHeader.ql
2022-02-25 17:33:07 +00:00
Ahmed Farid
7859288040
Update TimingAttackAgainstHeader.ql
2022-02-25 17:33:07 +00:00
Ahmed Farid
d83444cb18
Update TimingAttackAgainstHeader.ql
2022-02-25 17:33:07 +00:00
Ahmed Farid
e79c0eaa71
Update TimingAttackAgainstHeader.ql
2022-02-25 17:33:07 +00:00
Ahmed Farid
36cf1010f8
Update TimingAttackAgainstHeader.ql
2022-02-25 17:33:07 +00:00
Ahmed Farid
8e6f76d47a
Update TimingAttackAgainstHeader.qhelp
2022-02-25 17:33:07 +00:00
Ahmed Farid
fa8af6bf70
Update TimingAttackAgainstHeader.ql
2022-02-25 17:33:07 +00:00
Ahmed Farid
19d0e1f4a7
Create ComparingValueOfSensetiveHeader.qlref
2022-02-25 17:33:07 +00:00
Ahmed Farid
f96e47db09
Update ComparingValueOfSensetiveHeader.java
2022-02-25 17:33:07 +00:00
Ahmed Farid
09e054ace6
Update ComparingValueOfSensetiveHeader.java
2022-02-25 17:33:07 +00:00
Ahmed Farid
f758ed0d85
Update ComparingValueOfSensetiveHeader.java
2022-02-25 17:33:07 +00:00
ahmed532009
4a9ee5826d
Update TimingAttackAgainstHeader.qhelp
2022-02-25 17:33:07 +00:00
ahmed532009
6da9bc593f
Rename csrfComparison.java to ComparingValueOfSensetiveHeader.java
2022-02-25 17:33:07 +00:00
ahmed532009
a0a1c587e5
Create ComparingValueOfSensetiveHeader.java
2022-02-25 17:33:07 +00:00
ahmed532009
aa488e532f
Update csrfComparison.java
2022-02-25 17:33:07 +00:00
Chris Smowton
333130b2a4
Abbreviate isSink
2022-02-25 17:33:07 +00:00
Chris Smowton
80a2b388bf
Update TimingAttackAgainstHeader.qhelp
2022-02-25 17:33:07 +00:00
ahmed532009
fa81f43694
Update TimingAttackAgainstHeader.qhelp
2022-02-25 17:33:06 +00:00
ahmed532009
39e07cbc9c
Update and rename UnsafecsrfComparison.java to csrfComparison.java
2022-02-25 17:33:06 +00:00
ahmed532009
c6c67b907b
Update TimingAttackAgainstHeader.qhelp
2022-02-25 17:33:06 +00:00
ahmed532009
98b06d35af
Update TimingAttackAgainstHeader.ql
2022-02-25 17:33:06 +00:00
ahmed532009
bf95e59b24
Update TimingAttackAgainstHeader.qhelp
2022-02-25 17:33:06 +00:00
ahmed532009
ab6a7bb3d8
Update TimingAttackAgainstHeader.ql
2022-02-25 17:33:06 +00:00
root
49feeb1c36
Timing attacks while comparing the headers value
2022-02-25 17:33:06 +00:00
Alexander Eyers-Taylor
6b9ccd6e91
QLSpec: Apply suggestions from code review
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2022-02-25 15:34:43 +00:00
Rasmus Wriedt Larsen
f988e1f0d8
Python: Improve field-flow by removing import *
...
Since that apparently impacts call graph resolution with points-to :O
Also interesting that global flow was only not working for those cases
because of the tricky ifs... still need to 100% figure out how those ifs
are messing up the analysis :|
2022-02-25 16:01:08 +01:00
Rasmus Wriedt Larsen
999af15bd5
Python: Show unresolved calls for field-flow tests
2022-02-25 15:58:07 +01:00
Taus
622b32692b
Python: Prevent magic/inlining in getCase
...
This is a simplified version of
https://github.com/github/codeql/pull/8028
consisting of just the `nomagic` fix.
2022-02-25 14:32:59 +00:00
yoff
8b926f6859
Merge pull request #7873 from RasmusWL/fix-attribute-taint
...
Python: Fix attribute taint
2022-02-25 15:02:24 +01:00
Rasmus Wriedt Larsen
2d0034c40d
Python: Replicate global field-flow failures
2022-02-25 14:14:00 +01:00
Asger F
a8bfebaeb6
Merge pull request #8149 from asgerf/shared/use-shared-access-path-syntax
...
Shared: use shared access path syntax to parse arguments in CSV rows
2022-02-25 14:04:18 +01:00
CodeQL CI
0f125d1e8a
Merge pull request #8234 from asgerf/ruby/meta-queries
...
Approved by nickrolfe
2022-02-25 12:46:15 +00:00
Rasmus Wriedt Larsen
faaa63a73c
Python: Ensure no cross-talk in global tests
...
By giving all variables unique names
I also added a comment with the function name from the normal tests, so
its' easily visible what these tests are testing
2022-02-25 13:41:51 +01:00
Rasmus Wriedt Larsen
0642610ee9
Python: Global flow works when in own file???
...
This is very suspicious
2022-02-25 13:36:00 +01:00
Rasmus Wriedt Larsen
d83a9ef8d3
Python: Fix global field-flow for validTest.py
2022-02-25 13:35:43 +01:00
yoff
e1c2f46092
Merge pull request #8200 from RasmusWL/debug-partial-flow-snippet
...
Python: Add `debug partial flow` snippet
2022-02-25 12:41:12 +01:00
Arthur Baars
9d9abaf1f9
Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-02-25 12:27:20 +01:00
Pierre
f047707ef3
Merge pull request #8251 from github/turbo-java-17-python-310
...
Update supported Java and Python versions
2022-02-25 12:19:01 +01:00
Chris Smowton
011248e686
Merge pull request #7774 from smowton/smowton/admin/test-annotation-inheritence
...
Add test checking that inheritence is noticed even with annotations present
2022-02-25 11:15:21 +00:00
Rasmus Wriedt Larsen
49dbb8cae7
Docs: Mention hasPartialFlowRev and performance problem
...
The things that I mentioned in https://github.com/github/codeql/pull/6502#issuecomment-901087620 that never got into the document 😳
2022-02-25 11:22:20 +01:00
Pierre
9e27675554
Update supported Java and Python versions
2022-02-25 11:12:01 +01:00
Mathias Vorreiter Pedersen
dfd30e46b0
Merge pull request #8227 from geoffw0/319improve
...
C++: Promote cpp/non-https-url
2022-02-25 08:48:44 +00:00
ihsinme
ffdca61f9a
Add files via upload
2022-02-25 11:20:23 +03:00
ihsinme
74f8145970
Add files via upload
2022-02-25 11:18:38 +03:00
ihsinme
0c8a07218c
Add files via upload
2022-02-25 11:16:05 +03:00
ihsinme
bddb5fd9f9
Add files via upload
2022-02-25 11:14:20 +03:00
ihsinme
3d1f4d5499
Merge pull request #1 from github/main
...
up to head
2022-02-25 11:04:55 +03:00
Robert Marsh
a60fe9f4b8
C++: exclude 0 earlier in InsufficientKeySize
2022-02-24 14:26:37 -05:00
Tamás Vajk
17fbbdba34
Merge pull request #8233 from github/release-prep/2.8.2
...
Release preparation for version 2.8.2
2022-02-24 20:07:55 +01:00
Chris Smowton
b1c98ae3c2
Add further test directly examining signature of method with problematic parameter types
2022-02-24 17:39:11 +00:00
Chris Smowton
379f2438a6
Add test checking that inheritence is noticed even with annotations present
2022-02-24 17:39:11 +00:00
Geoffrey White
899ae90ba4
C++: Add GVN.
2022-02-24 17:22:37 +00:00
Mathias Vorreiter Pedersen
ab3cad749c
Merge pull request #8173 from MathiasVP/add-using-expired-stack-address-query
...
C++: Add another `CWE-825` query
2022-02-24 17:18:35 +00:00
Geoffrey White
0bb9a95563
C++: Extend tests.
2022-02-24 17:15:29 +00:00
Tom Bolton
8dfc0d25d1
Merge pull request #8232 from github/tombolton/use-updated-counting-query
...
Add new xss queries to result counting query
2022-02-24 16:38:53 +00:00
Jeroen Ketema
0c788d7352
C++: Remove redundant empty line
2022-02-24 17:31:10 +01:00
Jeroen Ketema
b933a58215
C++: Replace Deprecated Queries by Deprecated Classes
...
This is more accurate for the only change in the list.
2022-02-24 16:48:23 +01:00
Michael Nebel
3e898a1b09
C#: Use generic TryParse method instead.
2022-02-24 16:18:42 +01:00
Tamas Vajk
0d16a7e38d
Fix formatting of C# change logs
2022-02-24 16:06:54 +01:00
github-actions[bot]
20fe22c8c8
Release preparation for version 2.8.2
2022-02-24 14:57:08 +00:00
Rasmus Wriedt Larsen
abe4d8da62
Python: Accept global field-flow inconsistencies
...
Yikes
2022-02-24 15:07:18 +01:00
Rasmus Wriedt Larsen
94d23f3817
Python: Also do all field-flow tests in global scope
...
Notice that these tests don't pass, to show how they differ in the next
commit!
2022-02-24 15:06:40 +01:00
Erik Krogh Kristensen
844815a032
Merge pull request #8231 from erik-krogh/fix-ql-for-ql-in-ql-for-ql
...
QL: fix ql-for-ql errors inside ql-for-ql
2022-02-24 15:01:45 +01:00
Erik Krogh Kristensen
ea1503ce2c
fix ql-for-ql errors inside ql-for-ql
2022-02-24 14:41:27 +01:00
tombolton
d80ef6566d
add new xss queries to result counting query
2022-02-24 13:31:40 +00:00
Paolo Tranquilli
d2ed5c47f9
fix typo
2022-02-24 14:28:21 +01:00
Tamás Vajk
83aaeca751
Merge pull request #8228 from tamasvajk/fix/change-notes-0.0.9
...
Fix 0.0.9 change note to match concatenated change log
2022-02-24 14:04:31 +01:00
Michael Nebel
62dc23f6a5
C#: Move the StandaloneAnalyser to the Standalone project.
2022-02-24 13:51:43 +01:00
Michael Nebel
efab3bfa89
C#: Make an extractor class in the standalone project with some of the specifics for the standalone extractor.
2022-02-24 13:51:43 +01:00
Michael Nebel
d2c872079b
C#: Move ExitCode enum out of Extractor class.
2022-02-24 13:51:42 +01:00
Michael Nebel
b0c62c8a10
C#: Refactor functionality to run standalone extractor into own method.
2022-02-24 13:51:42 +01:00
Michael Nebel
d947861690
C#: Minor refactoring.
2022-02-24 13:51:42 +01:00
Chris Smowton
4973224de7
Merge pull request #8216 from github/smowton/fix/creating-codeql-databases-docs-typo
...
Fix typo
2022-02-24 12:24:32 +00:00
Rasmus Wriedt Larsen
2da4b39844
Python: Add global field-flow tests
...
I thought it was interesting that it did not propagate flow to the uses
inside the functions :O
2022-02-24 13:15:48 +01:00
Geoffrey White
6c40cda68d
C++: Pragmatic solution to include more sinks (plus autoformat changes).
2022-02-24 12:10:34 +00:00
Tamas Vajk
a8c2d87897
Fix 0.0.9 change note to match concatenated change log
2022-02-24 12:51:10 +01:00
Mathias Vorreiter Pedersen
e4af34253a
C++: Actually fix incorrect annotation
2022-02-24 11:06:57 +00:00
Paolo Tranquilli
01a37e5165
fix check-qhelp.py again
2022-02-24 11:56:47 +01:00
Geoffrey White
e3493e32e0
C++: Change note.
2022-02-24 10:54:09 +00:00
Geoffrey White
fc8ebdaeb2
C++: Increase the query to precision high.
2022-02-24 10:54:09 +00:00
Geoffrey White
c16302be13
C++: Fix the FP.
2022-02-24 10:54:08 +00:00
Paolo Tranquilli
11c1b6a8a3
fix typo in .pre-commit-config.yaml
2022-02-24 11:46:19 +01:00
Paolo Tranquilli
4020464c2d
fix check-qhelp.py
...
It turns out checking changes on `.inc.qhelp` files is a bit trickier,
as we need to first find which `qhelp` files use them. The previous
iteration of this script was working under the assumption that
`.inc.qhelp` files were only included from the current or a parent
path, but this turns out to be wrong.
This time around, if we are asked to check one or more `.inc.qhelp`
files we build an include map from all `qhelp` files and run the help
generator on the `qhelp` files actually including them.
2022-02-24 11:40:46 +01:00
Paolo Tranquilli
9667315d49
pre-commit: add qhelp check
...
Also the instructions on customizing `pre-commit`'s behaviour have been
updated to use the `--config` option.
2022-02-24 10:55:53 +01:00
Mathias Vorreiter Pedersen
ef5f16ddd3
Merge branch 'main' into add-using-expired-stack-address-query
2022-02-24 08:41:27 +00:00
Harry Maclean
fc351fbd64
Ruby: Remove value-flow for name-matched summaries
...
String summaries that are identified by name only should not specify
value-preserving flow as this can cause spurious flow in cases where
they are applied to different but identically-named methods.
2022-02-24 16:15:15 +13:00
Harry Maclean
07369916b0
Ruby: Remove bad flow to/from block arguments
...
In these cases there is no block argument to the method call.
2022-02-24 14:44:59 +13:00
Erik Krogh Kristensen
e13b2df86f
Merge pull request #8185 from erik-krogh/amdImp
...
JS: recognize modules imported by AMD imports as library inputs
2022-02-23 20:21:45 +01:00
Geoffrey White
326dfa5bc2
C++: Add test cases.
2022-02-23 18:37:58 +00:00
Chris Smowton
3167a67e65
Fix typo
2022-02-23 18:19:11 +00:00
Chris Smowton
01db73bfc7
Merge pull request #5935 from porcupineyhairs/javaSstiNew
...
Java : Add SSTI query
2022-02-23 17:30:02 +00:00
Mathias Vorreiter Pedersen
8900f6c043
C++: Add comment about ir re-evaluation.
2022-02-23 17:12:05 +00:00
Mathias Vorreiter Pedersen
033edc24f4
C++: Respond to review comments.
2022-02-23 16:23:49 +00:00
Mathias Vorreiter Pedersen
fd83f3a999
Merge pull request #8209 from jketema/ir-structured-bindings-tests
...
C++: Add IR structured binding tests
2022-02-23 16:09:40 +00:00
Chris Smowton
7b425a80bc
Note path query expectations
2022-02-23 16:02:54 +00:00
Rasmus Wriedt Larsen
aeba497832
Merge pull request #7735 from yoff/python/promote-log-injection
...
Python: promote log injection
2022-02-23 16:21:12 +01:00
Jeroen Ketema
99dd049c1b
Add IR test for tuple structured bindings
2022-02-23 16:15:19 +01:00
Jeroen Ketema
caf0f28547
Add IR test for data member structured bindings
2022-02-23 15:55:19 +01:00
Taus
3ce7d47b5b
Merge pull request #7452 from jorgectf/python_jwt
...
Python: Add Python_JWT to JWT security query
2022-02-23 15:23:20 +01:00
Jeroen Ketema
ec2567b64b
Add IR test for array structured bindings
2022-02-23 15:10:10 +01:00
Chris Smowton
a8fe10f353
Java template injection query: import pathgraph
2022-02-23 13:47:24 +00:00
Asger Feldthaus
f1bfb31403
Shared: fix typo in a comment
2022-02-23 14:13:41 +01:00
Asger Feldthaus
bb9348d77f
Ruby: reject ArrayElement[-n] instead of interpreting it as ArrayElement[?]
2022-02-23 14:13:41 +01:00
Asger Feldthaus
a11c6f0f8e
Ruby: use AccessPathSyntax library
2022-02-23 14:13:40 +01:00
Asger Feldthaus
efec348eb3
Java: use AccessPathSyntax library
2022-02-23 14:13:40 +01:00
Asger Feldthaus
9cff065dca
C#: use AccessPathSyntax library
2022-02-23 14:13:40 +01:00
Asger Feldthaus
5cab737ef1
Shared: sync AccessPathSyntax.qll
2022-02-23 14:13:40 +01:00
Asger Feldthaus
abd4933d6c
Shared: move numeric parsing into AccessPathSyntax.qll
2022-02-23 14:13:37 +01:00
Mathias Vorreiter Pedersen
4b03778938
Update cpp/ql/src/Likely Bugs/Memory Management/UsingExpiredStackAddress.ql
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-02-23 13:10:29 +00:00
Rasmus Wriedt Larsen
b17c769257
Python: Remove accidental "foo" snippet
2022-02-23 13:30:56 +01:00
Rasmus Wriedt Larsen
5626427ea5
Python: Add "debug partial flow" snippet
2022-02-23 13:30:56 +01:00
CodeQL CI
7d55771092
Merge pull request #8150 from asgerf/js/prep-sharing-api-graph-mad
...
Approved by erik-krogh
2022-02-23 11:59:31 +00:00
CodeQL CI
62ee8fce3a
Merge pull request #8186 from asgerf/js/request-forgery-docs-followup
...
Approved by esbena, hubwriter
2022-02-23 11:46:37 +00:00
Stephan Brandauer
a664e02d04
Merge pull request #8014 from kaeluka/js/functionality-from-untrusted-source
...
JS: Functionality from untrusted sources query (CWE-830)
2022-02-23 12:45:31 +01:00
Chris Smowton
50d9945625
Autoformat
2022-02-23 11:41:23 +00:00
Mathias Vorreiter Pedersen
53299d61eb
C++: Add more tests.
2022-02-23 11:38:01 +00:00
Mathias Vorreiter Pedersen
c8f940124f
C++: Respond to review comments.
2022-02-23 11:17:12 +00:00
Chris Smowton
476997a599
Replace more non-breaking spaces
2022-02-23 11:02:17 +00:00
Stephan Brandauer
1ed71e15f3
apply docreview feedback
2022-02-23 11:21:22 +01:00
Michael Nebel
20f71110ef
C#: Add change note for compression extractor option.
2022-02-23 11:02:28 +01:00
Tony Torralba
f011bbc92c
Merge pull request #8055 from luchua-bc/java/unsafe-url-forward-with-shared-lib
...
CWE-552: Switch to the shared PathSanitizer library
2022-02-23 11:00:23 +01:00
Stephan Brandauer
517d6969e1
Merge pull request #8171 from kaeluka/js/update-atm-query-docs-for-nosql-sql-injection
...
update ATM NosqlInjection and SqlInjection query docs
2022-02-23 10:54:37 +01:00
Asger Feldthaus
22ba43fff6
JS: Minor fixup in the client-side request forgery qhelp
2022-02-23 10:54:26 +01:00
Erik Krogh Kristensen
203212657e
recognize modules imported by AMD imports as library inputs
2022-02-23 10:39:45 +01:00
Mathias Vorreiter Pedersen
8b7214621b
Update cpp/ql/src/Likely Bugs/Memory Management/UsingExpiredStackAddress.qhelp
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-02-23 09:38:30 +00:00
Mathias Vorreiter Pedersen
8e0f354c2c
Update cpp/ql/src/Likely Bugs/Memory Management/UsingExpiredStackAddress.cpp
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-02-23 09:38:06 +00:00
Mathias Vorreiter Pedersen
862ebefbad
Update cpp/ql/src/Likely Bugs/Memory Management/UsingExpiredStackAddress.ql
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-02-23 09:33:58 +00:00
Mathias Vorreiter Pedersen
dda85bf234
Update cpp/ql/src/Likely Bugs/Memory Management/UsingExpiredStackAddress.ql
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-02-23 09:33:52 +00:00
Stephan Brandauer
c17d8b145a
Merge pull request #8054 from asgerf/js/split-request-forgery
...
JS: split request forgery query into server-side and client-side variants
2022-02-23 10:27:16 +01:00
Michael Nebel
837b91b31e
C#: Make TrapCompression setter private.
2022-02-23 10:12:56 +01:00
Michael Nebel
68b85900b7
C#: Remove old way of providing compression parameter.
2022-02-23 09:39:13 +01:00
Michael Nebel
a04aa1f05d
C#: Add unit test(s).
2022-02-23 09:39:13 +01:00
Michael Nebel
6176b64907
C#: Add support to the extractor for getting the compression extractor option.
2022-02-23 09:39:13 +01:00
Michael Nebel
bca479c2f3
C#: Add extractor option 'compression'.
2022-02-23 09:39:13 +01:00
Mathias Vorreiter Pedersen
31a204a5d9
Merge pull request #8174 from jketema/hinding-cleanup
...
C++: Simplify `cpp/declaration-hides-variable`
2022-02-23 08:27:59 +00:00
Esben Sparre Andreasen
58e0d54744
Merge pull request #8168 from github/esbena/hapi-reflected-xss
...
JS: model hapi handler returns as reflected-xss sinks
2022-02-23 08:53:15 +01:00
jorgectf
4aa1c0a11e
Update .expected
2022-02-23 00:55:39 +01:00
Jeroen Ketema
423d325204
C++: Simplify cpp/declaration-hides-variable
...
The check for `(unnamed local variable)` is no longer needed, because these
variables are now identified as being compiler generated.
2022-02-22 23:04:48 +01:00
Robert Marsh
a37f746dff
C++: fix FP and add paths in InsufficientKeySize
2022-02-22 15:38:50 -05:00
Erik Krogh Kristensen
73f2e89f3e
Merge pull request #8165 from erik-krogh/protoWrite
...
JS: support more property writes in js/prototype-pollution-utility
2022-02-22 21:30:22 +01:00
jorgectf
7c108c7892
Polish test
2022-02-22 20:57:20 +01:00
Jorge
0216798cb9
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2022-02-22 20:55:51 +01:00
Mathias Vorreiter Pedersen
ea35f56212
C++: Add a query for detecting uses of expired stack pointers that escaped through global variables.
2022-02-22 19:12:08 +00:00
Porcupiney Hairs
c81d85f321
Include suggestions from review
2022-02-22 23:07:34 +05:30
Erik Krogh Kristensen
b6b93065ff
Merge pull request #8157 from erik-krogh/lodash-clone
...
JS: add lodash.{clone, cloneDeep} as a clone step
2022-02-22 18:12:10 +01:00
Erik Krogh Kristensen
c487bb73a7
Merge pull request #8143 from erik-krogh/pred-ql-style
...
QL: add ql-for-ql query for detecting bad predicate qldoc
2022-02-22 17:49:12 +01:00
Paolo Tranquilli
e15c1f7c45
fix typo in docs/pre-commit-hook-setup.md
2022-02-22 17:47:35 +01:00
Paolo Tranquilli
33cce2b5ac
add pre-commit configuration
...
This enables use of the `pre-commit` framework to run quick pre-commit
checks. In particular this allows to automatically fix:
* trailing white spaces
* absence or multiple newlines at the end of files
* QL code formatting
* file sync
More could be added in the future: anything that can be checked fast
can be added in the configuration (for example well-formedness of
`qldoc` files).
This is a purely opt-in feature. Instructions for enabling it and
possibly configuring its behaviour are in `pre-commit-hook-setup.md`.
2022-02-22 17:40:07 +01:00
Jeroen Ketema
aecc17c49b
Merge pull request #7928 from jketema/structured-bindings-db-scheme
...
C++: Add table that identifies C++ structured bindings
2022-02-22 17:34:26 +01:00
Stephan Brandauer
6a9186cdef
update ATM NosqlInjection and SqlInjection query docs
2022-02-22 16:56:18 +01:00
Arthur Baars
69ed121ecb
Ruby/Python: regex parser: group sequences of 'normal' characters
2022-02-22 16:15:33 +01:00
Geoffrey White
31d214d5ee
Merge pull request #8170 from geoffw0/typos
...
C++: Fix Spelling Typos.
2022-02-22 15:09:50 +00:00
Mathias Vorreiter Pedersen
894992d403
Merge pull request #8169 from MathiasVP/fix-spelling-in-post-dominance-frontier
...
C++/C#: Fix spelling of 'postDominanceFrontier'
2022-02-22 14:54:39 +00:00
Geoffrey White
4908eaf5ec
C++: Typos.
2022-02-22 14:33:11 +00:00
Ian Lynagh
691473bd6e
Java: Add a changenote
2022-02-22 14:07:31 +00:00
Mathias Vorreiter Pedersen
b6740ed4a1
C++/C#: Fix spelling of 'postDominanceFrontier'.
2022-02-22 13:48:13 +00:00
Asger Feldthaus
5390faeb8a
Ruby: add query for measuring call graph
2022-02-22 14:42:05 +01:00
Asger Feldthaus
c7c97d5bbb
Ruby: add queries for measuring taint sources and sinks
2022-02-22 14:29:47 +01:00
Esben Sparre Andreasen
2c527f7b35
model hapi handler returns as reflected-xss sinks
2022-02-22 14:12:01 +01:00
Erik Krogh Kristensen
517e17d422
support more property writes in js/prototype-pollution-utility, and generalize ObjectDefinePropertyAsPropWrite
2022-02-22 13:23:34 +01:00
Pierre
5ee96121fc
Merge pull request #8162 from github/turbo-no-glibc-no
...
Docs: Add note about muslc incompatibility
2022-02-22 13:06:28 +01:00
Henry Mercer
4f7604f0dd
Merge pull request #8151 from github/henrymercer/separate-atm-model-pack
2022-02-22 11:47:35 +00:00
Pierre
1d81f90260
Update docs/codeql/codeql-cli/getting-started-with-the-codeql-cli.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2022-02-22 12:47:31 +01:00
Erik Krogh Kristensen
08c703f605
exclude private predicates
2022-02-22 12:34:16 +01:00
Stephan Brandauer
2278e7f6e6
CWE 830 polish error messages
2022-02-22 11:41:54 +01:00
Stephan Brandauer
82330391c3
CWE-830 add support for setting attributes via setAttribute method
2022-02-22 11:41:54 +01:00
Stephan Brandauer
d80cd1aeb5
CWE 830 test where both branches in a ternary are unsafe
2022-02-22 11:41:53 +01:00
Stephan Brandauer
2934aa1a3a
rewrite docs, improve error messages, etc
2022-02-22 11:41:53 +01:00
Stephan Brandauer
d2335b65d5
stylistic improvements after review
2022-02-22 11:41:53 +01:00
Stephan Brandauer
9aec4437e2
polish qhelp for CWE-830 and add test file
2022-02-22 11:41:53 +01:00
Stephan Brandauer
44d86569ac
remove illegal chars from comments
2022-02-22 11:41:53 +01:00
Stephan Brandauer
fd77e27ed9
replace taint tracking by type tracking and merge remaining queries for CWE-830
2022-02-22 11:41:53 +01:00
Stephan Brandauer
8cafa6d562
improve error message in CWE-830
2022-02-22 11:41:53 +01:00
Stephan Brandauer
780fa97869
always require integrity checking for certain CDNs
2022-02-22 11:41:53 +01:00
Stephan Brandauer
83764df4f5
rename tests for CW-830 to clarify responsibilities
2022-02-22 11:41:52 +01:00
Stephan Brandauer
8d397fea09
JS: query to find dynamic creations of DOM elements that use untrusted sources
2022-02-22 11:41:52 +01:00
Stephan Brandauer
b35c70994f
permit http urls to 127.0.0.1 and others
2022-02-22 11:41:52 +01:00
Stephan Brandauer
dd2b779a3c
add CWE 830 link to references
2022-02-22 11:41:52 +01:00
Stephan Brandauer
b170422c22
add changenotes for functionality from untrusted source query
2022-02-22 11:41:52 +01:00
Stephan Brandauer
6722c17bb0
JS: Functionality from untrusted sources query (CWE-830)
2022-02-22 11:41:52 +01:00
Erik Krogh Kristensen
8ff2992b56
have each case on a separate line
2022-02-22 11:40:26 +01:00
Erik Krogh Kristensen
addb27c80e
deduplicate "%"
...
Co-authored-by: Stephan Brandauer <kaeluka@github.com >
2022-02-22 11:34:59 +01:00
Pierre
8b7f899883
Update getting-started-with-the-codeql-cli.rst
2022-02-22 11:34:49 +01:00
Pierre
6f936942fa
Add note about non-glibc systems
2022-02-22 11:29:51 +01:00
Porcuiney Hairs
e536628a66
Java : Add SSTI query
2022-02-22 15:57:53 +05:30
Asger Feldthaus
1be47db2e6
JS: Factor out more JS-specific code
2022-02-22 09:51:56 +01:00
Asger Feldthaus
2d509eb345
JS: Make Impl.qll determine the location of AccessPathSyntax.qll
2022-02-22 09:51:52 +01:00
Asger Feldthaus
42a3d8c689
JS: Treat Member[x] as a language-specific token
...
In Ruby it is ambiguous whether Member[foo] means x.foo or x::foo
2022-02-22 09:51:52 +01:00
Asger Feldthaus
acf95d6178
JS: Move summary resolution into JS-specific code
2022-02-22 09:51:52 +01:00
Asger Feldthaus
ab1642dd3f
JS: Rename {Shared,Impl} -> ApiGraphModels{,Specific}
2022-02-22 09:51:48 +01:00
Harry Maclean
07c70adde5
Ruby: Update CleartextLogging fixture
...
The flow summary for `String#sub` leads to two new results in this test.
They are duplicates of existing results, because the query is quite
liberal in what it considers a source.
```ruby
password = "abc"
password_masked = password.sub(/./, "x")
Logger.new(STDOUT).info password_masked
```
In the example above, the query considers lines 1 and 2 to both be
sources, with a sink at line 3. Previously there was no flow from line 1
to line 3 because of the missing flow summary for `String#sub`, and
therefore there was just one result. Now we have the flow summary, there
are two results.
Line 2 is considered a source because it is an assignment to a variable
that contains the term "password". I'm not sure how to adjust the query
to avoid these duplicates, so I'm leaving them in for now.
2022-02-22 16:58:41 +13:00
Harry Maclean
340288e0d4
Ruby: Update summary access paths for dot syntax
2022-02-22 16:41:16 +13:00
Harry Maclean
d180a55b3a
Ruby: Fix value/taint flow in String summaries
2022-02-22 16:41:16 +13:00
Harry Maclean
f07ae35b87
Ruby: Fix bug with String flow summaries
...
Split summaries for methods with optional block parmaters into separate
classes. Also model the `exclusive` argument to `String#upto`.
2022-02-22 16:41:16 +13:00
Harry Maclean
379de5581d
Ruby: Disable summaries that clash with Array
...
Some String methods are named identically to Array methods, and this
leads to overlapping flow summaries. These adversely affect the original
Array flow summaries.
2022-02-22 16:41:15 +13:00
Harry Maclean
fef46e1ee4
Ruby: Add flow summaries for String methods
2022-02-22 16:41:15 +13:00
Erik Krogh Kristensen
e8df6a14ca
add lodash.{clone, cloneDeep} as a clone step
2022-02-21 22:27:29 +01:00
alexet
7ea8577e23
QLSpec: Fix underline length
2022-02-21 19:25:44 +00:00
alexet
121b3f6fbf
QLSpec:Allow setliterals withing inrange terms
2022-02-21 18:57:29 +00:00
alexet
5473162f23
QLSpec: Add documentation for expression pragmas
2022-02-21 18:55:56 +00:00
alexet
e2bc03c147
QLSpec: Consistency in primary expression order.
2022-02-21 18:53:53 +00:00
Henry Mercer
e42f759f6b
Merge pull request #8153 from github/henrymercer/atm-add-cwe-tags
...
JS: Add CWE tags for ML-powered queries
2022-02-21 17:24:02 +00:00
Ian Lynagh
7ce9b160d0
Java: Performance tweaks
2022-02-21 17:05:00 +00:00
Henry Mercer
5a3daa9e3f
JS: Add CWE tags for ML-powered queries
...
- Cross-site scripting: CWE-79
- Path injection: CWE-22, CWE-23, CWE-36, CWE-73, CWE-99
- NoSQL injection: CWE-943
- SQL injection: CWE-89
2022-02-21 16:18:33 +00:00
Henry Mercer
02cce623a6
JS: Install pack dependencies in ML CI jobs
2022-02-21 16:10:15 +00:00
Henry Mercer
a89882c14e
JS: Update lockfiles for ML-powered queries packs
2022-02-21 16:03:05 +00:00
Asger Feldthaus
8194c041cc
JS: Merge sources to one class
2022-02-21 16:26:02 +01:00
Asger F
00ed72ed83
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-02-21 16:24:50 +01:00
Tamas Vajk
422c2d5ccb
C#: Add dynamic casts to useless upcast test
2022-02-21 16:10:00 +01:00
Henry Mercer
25f6ac3ec4
JS: Remove ML model pack from default workspace
...
We only want to put the checked out version of the model pack to test a
custom model.
Given that the repo doesn't contain any models by default, most users
won't want the local checkout of the model pack to override the one
downloaded from the package registry.
2022-02-21 15:06:30 +00:00
Henry Mercer
6fb9895367
JS: Separate the ML-powered queries model into its own pack
...
This allows users to more easily get started with development. Running
`codeql pack install` from the `-queries` pack will now install the ML
model.
2022-02-21 15:05:57 +00:00
Tom Bolton
0108642464
Merge pull request #8148 from github/tombolton/modify-counting-query
...
Update counting query to match end-to-end results
2022-02-21 15:02:43 +00:00
tombolton
e02319be9f
add end to end predicate to result counting query
2022-02-21 14:35:58 +00:00
Erik Krogh Kristensen
1407b49a8f
fix some instances of ql/pred-doc-style for JS
2022-02-21 15:02:21 +01:00
Erik Krogh Kristensen
11bbd872f3
add ql-for-ql query for detecting bad predicate qldoc
2022-02-21 15:02:15 +01:00
Rasmus Wriedt Larsen
d2cd77aefb
Merge branch 'main' into dataflow-improvements
2022-02-21 14:49:40 +01:00
Asger F
02c4966109
Merge pull request #7878 from asgerf/dot-separated-access-paths
...
Shared: Switch to dot-separated access paths in summary specs
2022-02-21 13:29:09 +01:00
Alex Ford
9196b64d6e
Merge pull request #8138 from github/ruby/file-write
...
Ruby: Implement `FileSystemWriteAccess` concept
2022-02-21 10:13:27 +00:00
Alex Ford
746290d903
Merge pull request #7713 from github/ruby/clear-text-logging
...
Ruby: Add `rb/clear-text-logging-sensitive-data` query
2022-02-21 10:12:33 +00:00
Jeroen Ketema
fc91c82777
Add change note
2022-02-21 10:48:46 +01:00
Jeroen Ketema
e05af1e1d1
Use underlyingElement in isStructuredBinding
...
Accodring to the documentation in `Element.qll`, `underlyingElement` is
supposed to be used here and not `unresolveElement`.
2022-02-21 10:46:29 +01:00
Esben Sparre Andreasen
1d437dd722
Merge pull request #8043 from github/esbena/sharpen-hardcoded-credentials
...
JS: Sharpen hardcoded credentials
2022-02-21 10:02:58 +01:00
Rasmus Wriedt Larsen
b59ab7f5f3
Merge branch 'main' into python/promote-log-injection
2022-02-21 09:59:31 +01:00
Erik Krogh Kristensen
5f9bd7a4a1
Merge pull request #7984 from erik-krogh/fix-ql-for-ql-js
...
JS: fix most ql-for-ql warnings
2022-02-21 09:15:06 +01:00
Asger Feldthaus
7848fcec80
Shared: sync AccessPathSyntax.qll
2022-02-21 08:21:53 +01:00
Asger Feldthaus
d7f07167ac
Shared: Remove getLastToken again
2022-02-21 08:21:53 +01:00
Asger Feldthaus
2c2a82a070
Shared: allow spaces between arguments in a token
2022-02-21 08:21:53 +01:00
Asger Feldthaus
55ac5cb012
Shared: auto format
2022-02-21 08:21:53 +01:00
Asger Feldthaus
4985fbb526
Shared: update getSummaryCsv and related test output
2022-02-21 08:21:53 +01:00
Asger Feldthaus
dcc523a2b7
Shared: auto format
2022-02-21 08:21:53 +01:00
Asger Feldthaus
7fcbdbeada
Shared: sync AccessPathSyntax.qll and FlowSummaryImpl.qll
2022-02-21 08:21:52 +01:00
Asger Feldthaus
d911e0abf8
Shared: use getToken instead of getLastToken
2022-02-21 08:21:52 +01:00
Asger Feldthaus
c4304a980d
Shared: add explicit this
2022-02-21 08:21:52 +01:00
Asger Feldthaus
dc6a13242b
Shared: update comment in AccessPathSyntax.qll
2022-02-21 08:21:52 +01:00
Asger Feldthaus
2907d53e17
Shared: sync AccessPathSyntax.qll and FlowSummaryImpl.qll
2022-02-21 08:21:52 +01:00
Asger Feldthaus
be63cf7049
Shared: fix qldoc and move getRawToken to top-level
2022-02-21 08:21:52 +01:00
Asger Feldthaus
c189df2341
Revert "JS: Add support for " of " syntax to help during transition"
...
This reverts commit 9bf522b3048c3b11f7e6d734ed797a613614a095.
2022-02-21 08:21:51 +01:00
Asger Feldthaus
57bf0b1432
Ruby: remove support for legacy syntax
2022-02-21 08:21:51 +01:00
Asger Feldthaus
e3605eed44
Ruby: update CSV rows to dot-separated syntax
2022-02-21 08:21:50 +01:00
Asger Feldthaus
7005d53a67
Ruby: manually rewrite DigSummary access path
2022-02-21 08:16:55 +01:00
Asger Feldthaus
6dbeb81f36
Ruby: use AccessPathSyntax.qll to parse input/output summary specs
2022-02-21 08:16:55 +01:00
Asger Feldthaus
0af9e8aa58
C#: remove support for legacy syntax
2022-02-21 08:16:55 +01:00
Asger Feldthaus
6bb15dcc27
C#: update CSV rows to dot-separated syntax
2022-02-21 08:16:55 +01:00
Asger Feldthaus
dffa1d1558
C#: use AccessPathSyntax.qll to parse input/output summary specs
2022-02-21 08:16:55 +01:00
Asger Feldthaus
affdbe9955
Java: remove support for legacy syntax
2022-02-21 08:16:55 +01:00
Asger Feldthaus
a121b73181
Java: update CSV rows to dot-separated syntax
2022-02-21 08:16:55 +01:00
Asger Feldthaus
7f808710ec
Java: update model generator
2022-02-21 08:16:54 +01:00
Asger Feldthaus
753c557dbe
Java: use AccessPathSyntax.qll to parse input/output summary specs
2022-02-21 08:16:54 +01:00
Asger Feldthaus
53935db6c6
JS: Add support for " of " syntax to help during transition
2022-02-21 08:16:54 +01:00
Asger Feldthaus
30254686d8
JS: Move ".."-parsing trick into AccessPathSyntax.qll
2022-02-21 08:16:54 +01:00
Asger Feldthaus
7c2cff3227
JS: Factor out AccessPathSyntax.qll
2022-02-21 08:16:54 +01:00
Asger Feldthaus
e2cbf47b16
JS: Fix accidental recursion
2022-02-21 08:16:53 +01:00
Harry Maclean
e4f801bea8
Merge pull request #7886 from github/hmac/split-ruby-std-library
...
Ruby: split standard library models into multiple files
2022-02-21 13:39:43 +13:00
Harry Maclean
9a60c7e4ac
Ruby: Update filename in test fixture
2022-02-21 09:43:36 +13:00
Alex Ford
6b8537c4e0
Ruby: FileSystemWriteAccess changenote
2022-02-20 20:14:01 +00:00
Alex Ford
baabe66551
Ruby: update Files.ql tests for write accesses
2022-02-20 19:28:12 +00:00
Alex Ford
12ce3d4784
Ruby: Implement FileSystemWriteAccess for IO/File API
2022-02-20 19:27:11 +00:00
Alex Ford
4f0174e89a
Ruby: add FileSystemWriteAccess concept
2022-02-20 19:26:54 +00:00
jorgectf
c5f30d99d5
Create an extendable AdditionalTaintStep class in customizations
2022-02-20 17:34:12 +01:00
Rasmus Wriedt Larsen
9d81fd3b95
Python: Improve sanitizer/guards tests
...
Based on review conversation
2022-02-18 14:12:41 +01:00
Rasmus Wriedt Larsen
7aa559f4aa
Python: Restore dataflow consistency queries
2022-02-18 13:47:29 +01:00
Rasmus Wriedt Larsen
c5b6fb37b7
Python: Clean up NormalDataflowTest.qll
2022-02-18 13:47:29 +01:00
Rasmus Wriedt Larsen
67ca14876a
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-02-18 13:47:07 +01:00
Alex Ford
dd383f942f
Merge remote-tracking branch 'origin/main' into ruby/clear-text-logging
2022-02-17 15:32:31 +00:00
Alex Ford
33f4fffe16
Ruby: Simplify sub!/gsub! sanitizers for cleartext logging query
2022-02-17 13:10:44 +00:00
Jeroen Ketema
d4832b48c6
C++: Update DB scheme stats
2022-02-17 11:48:42 +01:00
Jeroen Ketema
e2bc4c88e4
C++: Expose is_structured_binding as a member of Variable
2022-02-17 11:44:08 +01:00
Jeroen Ketema
f875d722b0
C++: Add DB upgrade and downgrade scripts
2022-02-17 11:44:08 +01:00
Jeroen Ketema
f358f8f265
C++: Add DB relation identifying structured bindings
2022-02-17 11:44:08 +01:00
Asger Feldthaus
69995d5750
Shared: rephrase request forgery name and description
2022-02-17 09:07:08 +01:00
Asger Feldthaus
51442ddf47
JS: Add change note
2022-02-17 09:07:08 +01:00
Asger Feldthaus
3496ae131b
JS: Factor out <recommendation> part of qhelp
2022-02-17 09:07:08 +01:00
Harry Maclean
bfd2c14555
Ruby: Add shim StandardLibrary.qll
...
This file re-exports everything it used to define, marking each as
deprecated to warn users that they should import `Core` or `Stdlib`
instead.
2022-02-17 20:44:04 +13:00
Harry Maclean
459f949c24
Ruby: fix old import in ActiveSupport
...
codeql.ruby.frameworks.StandardLibrary is deprecated
2022-02-17 20:44:04 +13:00
Harry Maclean
9fff2cfcff
Ruby: Add missing documentation
2022-02-17 20:44:04 +13:00
Harry Maclean
546bfcb8ea
Ruby: split tests to match stdlib changes
2022-02-17 20:44:04 +13:00
Harry Maclean
eb4f333c25
Ruby: Move UnknownMethodCall to ast/Call.qll
2022-02-17 20:44:04 +13:00
Harry Maclean
a397c65d36
Ruby: Split standard library modeling
...
Split the classes modeling various standard library concepts into a
structured group of multiple files.
Things that are part of the core language live in framworks/core and
standard libraries (that aren't part of core) live in frameworks/stdlib.
This mirrors the structure followed by the Ruby docs
(https://docs.ruby-lang.org/en/3.1/ ).
Tests are split in a followup commit.
2022-02-17 20:44:04 +13:00
Robert Marsh
103796dfa8
C++: respond to PR comments on InsufficientKeySize
2022-02-16 14:58:29 -05:00
Robert Marsh
cfd9c9d137
C++: Update doc for `getMinimumKeySize
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-02-16 14:53:09 -05:00
Ian Lynagh
a448db11b5
Merge pull request #8052 from igfoo/igfoo/descendent
...
Spelling: Use "descendant" rather than "descendent" for consistency
2022-02-16 18:03:52 +00:00
Robert Marsh
3637078a26
C++: change note for insufficient key size
2022-02-16 12:43:39 -05:00
Asger Feldthaus
8ac0ec8dfc
JS: Write help for ClientSideRequestForgery
2022-02-16 18:33:31 +01:00
Robert Marsh
d3665f935e
C++: add sample code for InsufficientKeySize.qhelp
2022-02-16 12:30:41 -05:00
luchua-bc
f136ea0f6f
Switch to the shared PathSanitizer library
2022-02-16 16:06:28 +00:00
Nick Rolfe
26e7f3273b
Merge pull request #8044 from github/nickrolfe/db_upgrade_script
...
Language-agnostic document on db up-/downgrades
2022-02-16 15:02:04 +00:00
Nick Rolfe
6d02ea7870
doc: remove unneeded --search-path flag
2022-02-16 14:51:12 +00:00
Ian Lynagh
b16e4c0247
Spelling: Use "descendant" rather than "descendent" for consistency
...
$ git grep -i descendant | wc -l
170
2022-02-16 14:26:02 +00:00
Nick Rolfe
54b56c44e6
doc: avoid using Posix-specific search-path separator
2022-02-16 12:42:58 +00:00
Asger Feldthaus
91c64152d2
JS: Rephrase the qhelp for SSRF query
2022-02-16 13:35:01 +01:00
Asger Feldthaus
cf66d01e80
JS: Add consistency test
2022-02-16 13:35:01 +01:00
Asger Feldthaus
3103cfd925
JS: Rename to tests to clientSide.js and serverSide.js
2022-02-16 13:35:01 +01:00
Asger Feldthaus
3fbc3a4d70
JS: Add ClientSideRequestForgery to RequestForgery test
2022-02-16 13:35:01 +01:00
Asger Feldthaus
260638c68b
JS: Add ClientSideRequestForgery and split request-forgery results between the two
2022-02-16 13:35:01 +01:00
Esben Sparre Andreasen
f08a140505
update tests for password patterns
2022-02-16 13:22:19 +01:00
Nick Rolfe
17450a5b27
Python/Ruby: rm old prepare-db-upgrade.sh files
2022-02-16 12:21:52 +00:00
Ian Lynagh
83bba47fdb
Java: Update stats
2022-02-16 12:06:18 +00:00
Nick Rolfe
549436fc86
doc: typo
2022-02-16 12:00:35 +00:00
Nick Rolfe
26b2012024
Move Ruby doc on db upgrades to common docs dir
...
And explain downgrades
2022-02-16 11:35:52 +00:00
Nick Rolfe
ee5068d843
Python/Ruby: forward to generic prepare-db-upgrade.sh
2022-02-16 11:03:28 +00:00
Tony Torralba
111aabb707
Merge pull request #7712 from luchua-bc/java/file-path-injection
...
Java: CWE-073 File path injection with the JFinal framework
2022-02-16 12:01:34 +01:00
Jeroen Ketema
3170670f67
Merge pull request #8041 from jketema/prepare-db-upgrade-script
...
Add version of `prepare-db-upgrade.sh` supporting multiple languages
2022-02-16 11:45:34 +01:00
Jeroen Ketema
671528b483
Find qldir by using the location of prepare-db-upgrade.sh
2022-02-16 11:35:15 +01:00
Jeroen Ketema
8ad0d8ea69
Factor out creating upgrade.properties into a function
2022-02-16 10:54:12 +01:00
Jeroen Ketema
b27dd6ca72
Simplify check_hash_valid
2022-02-16 10:53:39 +01:00
Jeroen Ketema
f558ac5b07
Make --lang a required script argument
2022-02-16 10:18:55 +01:00
Esben Sparre Andreasen
816d79692b
ignore deliberately hardcoded password strings
2022-02-16 09:47:01 +01:00
Esben Sparre Andreasen
78744a0182
add additional tests
2022-02-16 09:44:56 +01:00
Esben Sparre Andreasen
e67c09f9ab
change example passwords in test
2022-02-16 08:56:00 +01:00
Arthur Baars
ebb87c4b36
Merge pull request #7975 from github/post-release-prep/codeql-cli-2.8.1
...
Post-release preparation for codeql-cli-2.8.1
2022-02-15 20:17:35 +01:00
Geoffrey White
703f18b82f
C++: Better deduplication.
2022-02-15 17:52:27 +00:00
Jeroen Ketema
1209bbd9b4
Add version of prepare-db-upgrade.sh supporting multiple languages
2022-02-15 18:39:21 +01:00
luchua-bc
40bf093d34
Move shared code to the lib folder and update qldoc
2022-02-15 17:28:13 +00:00
Tony Torralba
5f0ab522f3
Merge pull request #7988 from Marcono1234/marcono1234/sealed-types-predicates
...
Java: Add predicates for sealed classes
2022-02-15 15:11:56 +01:00
yo-h
cfcb06cad9
Merge pull request #8035 from tamasvajk/feature/hardcoded-cred-medium-prec
...
C#: Downgrade hardcoded credentials queries to medium precision
2022-02-15 08:09:27 -05:00
Chris Smowton
2f82a46528
Elaborate change note
2022-02-15 12:56:57 +00:00
luchua-bc
fd533f2ba8
Remove the same callable constraint
2022-02-15 12:44:23 +00:00
Mathias Vorreiter Pedersen
c48e49650a
Merge pull request #8039 from jketema/downgrades
...
C++: Add initial DB scheme and qlpack file to downgrades directory
2022-02-15 11:30:33 +00:00
Jeroen Ketema
d59422be41
Add qlpack file to downgrades directory
2022-02-15 12:18:46 +01:00
Jeroen Ketema
0bcb5cb380
Add initial cpp DB scheme to downgrades directory
2022-02-15 11:59:46 +01:00
Mathias Vorreiter Pedersen
38e44924e7
Merge pull request #8036 from jketema/remove-legacy-relations-2
...
C++: Remove some unused legacy relations from the DB scheme - Take 2
2022-02-15 10:56:25 +00:00
Jeroen Ketema
3b2584a5d1
Add change note
2022-02-15 11:18:44 +01:00
Jeroen Ketema
9d7784e12d
C++: Add DB downgrade script
2022-02-15 11:18:44 +01:00
Jeroen Ketema
f791c63780
C++: Add DB upgrade script
2022-02-15 11:18:44 +01:00
Jeroen Ketema
68fd953d9b
C++: Mark classes depending on removed relations as deprecated
...
Also ensure they no longer depend on the removed relations.
2022-02-15 11:18:36 +01:00
Rasmus Wriedt Larsen
62d4bb50a5
Python: Autoformat
...
Trailing whitespace is a bit too easy with the ```suggestions through
the UI :|
2022-02-15 10:38:52 +01:00
Tony Torralba
bfa14fa066
Merge pull request #7823 from JLLeitschuh/improve/JLL/combined_http_headers
...
Java: Add HTTP Request Splitting to Netty Query
2022-02-15 10:24:36 +01:00
Rasmus Wriedt Larsen
5a90214ece
Merge pull request #7783 from yoff/python/promote-ldap-injection
...
Python: promote LDAP injection query
2022-02-15 10:24:18 +01:00
Jeroen Ketema
bf6ca7a7be
C++: Remove some unused legacy relations from the DB scheme
2022-02-15 10:16:35 +01:00
Tamas Vajk
0c667fa544
Move change note from lib to src folder
2022-02-15 09:58:12 +01:00
Tamas Vajk
c386ab5e51
Add change note
2022-02-15 09:55:18 +01:00
CodeQL CI
8f8621f82c
Merge pull request #8022 from asgerf/js/url-parse-qs
...
Approved by esbena
2022-02-15 09:34:21 +01:00
Tamas Vajk
e8bf94faf9
C#: Downgrade hardcoded credentials queries to medium precision
2022-02-15 09:34:20 +01:00
Marcono1234
a496b1d1a1
Java: Add predicates for sealed classes
2022-02-14 21:04:38 +01:00
Robert Marsh
0e50c4b186
C++: Add openssl low-level API
2022-02-14 14:47:55 -05:00
Chris Smowton
0bf6c83ef2
Merge pull request #4388 from JLLeitschuh/feat/JLL/java/CWE-200_temp_directory_local_information_disclosure
...
Java: CWE-200: Temp directory local information disclosure vulnerability
2022-02-14 18:58:44 +00:00
Chris Smowton
fd4dc95d84
Merge pull request #6443 from artem-smotrakov/ignored-hostname-verifier
...
Java: An experimental query for ignored hostname verification
2022-02-14 18:56:27 +00:00
yoff
de5b3a272d
Merge pull request #7660 from RasmusWL/deprecate-old-modeling
...
Python: Deprecate old points-to based modeling
2022-02-14 19:48:03 +01:00
Chris Smowton
f2bc5849ce
format
2022-02-14 17:00:14 +00:00
Nick Rolfe
9c79a171ae
Merge pull request #8017 from github/nickrolfe/csharp_externalData
...
C#: add externalData back to dbscheme
2022-02-14 16:54:32 +00:00
Jonathan Leitschuh
2048aed0a9
Review feedback and improve temp dir vulnerable/safe code sugestion
2022-02-14 11:29:16 -05:00
Chris Smowton
a62eae5a1e
Remove redundant conditions from HostnameVerificationCall.isIgnored
2022-02-14 16:26:41 +00:00
Jonathan Leitschuh
76964d58f2
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-02-14 11:04:31 -05:00
Jonathan Leitschuh
bb580ddbab
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-02-14 11:02:05 -05:00
Jonathan Leitschuh
7dee22a130
Fix implicit 'this' usage
2022-02-14 11:00:41 -05:00
luchua-bc
2b5982fd9d
Remove specified value step from additional taint step
2022-02-14 15:42:54 +00:00
yoff
3a995ec1b1
Update python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-14 16:08:44 +01:00
yoff
62598c0fd1
Update python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-14 16:07:40 +01:00
yoff
86786d3368
Update docs/codeql/support/reusables/frameworks.rst
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-14 16:05:59 +01:00
Asger Feldthaus
8b55a24e7c
JS: Add url-parse.qs as an alias for the querystringify library
2022-02-14 15:29:50 +01:00
luchua-bc
35a924292b
Model value passing between a setter and a getter call as a value step
2022-02-14 14:08:55 +00:00
Asger Feldthaus
f7108506f2
JS: Raise precision tag of js/request-forgery
2022-02-14 14:20:41 +01:00
Nick Rolfe
2633f9d02e
C#: delete externalData.rel in downgrade script
2022-02-14 12:25:32 +00:00
Nick Rolfe
6e7f5f8c12
C#: add DB upgrade and downgrade scripts
2022-02-14 12:16:39 +00:00
Nick Rolfe
d43a62a09f
C#: add externalData back to dbscheme
...
That table is still used, and is populated by the CSV extractor.
2022-02-14 12:09:00 +00:00
Rasmus Lerchedahl Petersen
d1200d0cd5
python: fix change-note formatting
2022-02-14 12:22:29 +01:00
Rasmus Lerchedahl Petersen
84447e4710
python: more detailed alert message
2022-02-14 11:55:07 +01:00
Rasmus Lerchedahl Petersen
bd14adefa0
python: add apologetic comment
2022-02-14 11:37:46 +01:00
Mathias Vorreiter Pedersen
9b8d85903c
Merge pull request #8011 from MathiasVP/revert-remove-legacy-tables
...
Revert "Merge pull request #7982 from jketema/remove-legacy-relations"
2022-02-14 10:32:01 +00:00
Mathias Vorreiter Pedersen
bc24b03d31
Merge pull request #8012 from erik-krogh/db-in-upgrade
...
QL: allow raw db types in upgrade/downgrade scripts
2022-02-14 10:24:55 +00:00
Erik Krogh Kristensen
8c7bf69a87
allow raw db types in upgrade/downgrade scripts without adding a warning for it
2022-02-14 10:40:07 +01:00
Mathias Vorreiter Pedersen
ab7850c581
Revert "Merge pull request #7982 from jketema/remove-legacy-relations"
...
This reverts commit 2b6d57d85b , reversing
changes made to 9b4dbb9dd8 .
2022-02-14 09:11:56 +00:00
Mathias Vorreiter Pedersen
2b6d57d85b
Merge pull request #7982 from jketema/remove-legacy-relations
2022-02-14 07:59:19 +00:00
Artem Smotrakov
48604cd7b3
Better HostnameVerificationCall.isIgnored()
2022-02-12 15:52:16 +00:00
Artem Smotrakov
36e565d673
Use classes from semmle.code.java.security.Encryption
2022-02-12 15:31:35 +00:00
Artem Smotrakov
651e43dee6
Clarify what verifier is
2022-02-12 12:24:48 +00:00
luchua-bc
78630f25dd
Match attribute name to reduce FP
2022-02-11 23:53:31 +00:00
Chuan-kai Lin
9b4dbb9dd8
Merge pull request #7895 from github/cklin/upgrades-initial-dbscheme
...
Upgrade scripts testing: set initial dbschemes
2022-02-11 11:06:12 -08:00
Andrew Eisenberg
0f3d780935
Merge pull request #7946 from github/aeisenberg/check-change-not
...
Workflows: Augment workflow to ensure failure with invalid change notes
2022-02-11 09:25:14 -08:00
Jeroen Ketema
7f4913d61f
Add change notes
2022-02-11 18:15:33 +01:00
Jeroen Ketema
9d7aa176f3
C++: Mark classes depending on removed relations as deprecated
...
Also ensure they no longer depend on the removed relations.
2022-02-11 18:04:17 +01:00
Nick Rolfe
b3048eed21
Merge pull request #7979 from github/nickrolfe/charp
...
C#: fix misspellings of 'csharp'
2022-02-11 16:57:59 +00:00
Erik Krogh Kristensen
a1c5724be7
fix most ql-for-ql warnings in JS
2022-02-11 17:57:37 +01:00
Andrew Eisenberg
5092493160
Update .github/workflows/validate-change-notes.yml
2022-02-11 08:41:20 -08:00
Geoffrey White
c4d9c1d9e7
C++: Reduce result duplication.
2022-02-11 16:03:38 +00:00
Jeroen Ketema
5205db9e17
C++: Add DB downgrade script
2022-02-11 16:36:21 +01:00
Jeroen Ketema
3033f3f89c
C++: Add DB upgrade script
2022-02-11 16:35:51 +01:00
Jeroen Ketema
94d3d63704
C++: Remove some unused legacy relations from the DB scheme
2022-02-11 16:35:08 +01:00
Erik Krogh Kristensen
360cf0ff17
Merge pull request #7981 from erik-krogh/erik-krogh/key-on-qlpacks
...
QL: add qlpack.yml to the cache key for QL-for-QL query build
2022-02-11 16:19:38 +01:00
Erik Krogh Kristensen
6639bdaf1e
add qlpack.yml to the cache key for QL-for-QL query build
2022-02-11 16:04:39 +01:00
Nick Rolfe
dc2f653496
Merge remote-tracking branch 'origin/main' into nickrolfe/charp
2022-02-11 14:56:15 +00:00
Erik Krogh Kristensen
25f6880809
Merge pull request #7980 from erik-krogh/fix-ql-pack
...
QL: fix pack name for ql-for-ql
2022-02-11 15:53:02 +01:00
Erik Krogh Kristensen
1fa5265a2e
fix pack name for ql-for-ql
2022-02-11 15:44:14 +01:00
Nick Rolfe
164cce7417
C#: fix misspellings of 'csharp'
2022-02-11 14:08:47 +00:00
Erik Krogh Kristensen
25d64a7901
Merge pull request #7930 from erik-krogh/rbApiIpa
...
RB: convert the ruby ApiGraphs to use IPA labels
2022-02-11 14:35:39 +01:00
Geoffrey White
00ba76b7e4
C++: Convert to IR taint tracking.
2022-02-11 13:00:42 +00:00
luchua-bc
e3d0e9f083
Update normalized path node
2022-02-11 12:38:05 +00:00
Arthur Baars
678645ba57
Merge pull request #7883 from github/aibaars/ruby-cross
...
Ruby: add configuration for 'cross'
2022-02-11 13:15:34 +01:00
Arthur Baars
525c685584
Ruby: add configuration for 'cross'
2022-02-11 12:50:33 +01:00
Taus
d7f30de5b0
Merge pull request #7874 from RasmusWL/set-store-step
...
Python: Fix setStoreStep to use `SetElementContent`
2022-02-11 12:50:02 +01:00
Arthur Baars
a85b2093d6
Merge pull request #7969 from github/doc-remove-filter-queries
...
Docs: remove mention of 'filter queries'
2022-02-11 12:48:34 +01:00
github-actions[bot]
21bf29353f
Post-release preparation for codeql-cli-2.8.1
2022-02-11 11:07:31 +00:00
Taus
327e0dad72
Merge pull request #7674 from erik-krogh/dbTypeInNonLib
...
QL: Use of db-type outside language core.
2022-02-11 12:00:14 +01:00
Arthur Baars
47eb96d223
Docs: remove mention of 'filter queries'
2022-02-11 11:45:34 +01:00
Erik Krogh Kristensen
5a39708cf7
move TLabel to the Impl module and cache it
2022-02-11 10:54:45 +01:00
Erik Krogh Kristensen
36e02ae9ac
Merge pull request #7912 from erik-krogh/moarApi
...
JS: convert more type-trackers to API-graphs
2022-02-11 10:32:45 +01:00
Erik Krogh Kristensen
daa96cc218
change some docstrings based on review, and make fields private
2022-02-11 10:25:54 +01:00
Tom Hvitved
0f60401919
Merge pull request #2513 from hvitved/csharp/null-maybe-capture
...
C#: Remove FPs from `cs/dereferenced-value-may-be-null`
2022-02-11 10:21:15 +01:00
Erik Krogh Kristensen
6ae4652ce9
make the Impl module private again
2022-02-11 10:17:24 +01:00
Arthur Baars
74ed89409c
Merge pull request #7948 from github/release-prep/2.8.1
...
Release preparation for version 2.8.1
2022-02-11 10:13:34 +01:00
Erik Krogh Kristensen
3791b159fb
Merge pull request #7892 from erik-krogh/nanSan
...
JS: Add a `isNaN` sanitizer, and use it in queries that already had a typeof check
2022-02-11 10:13:06 +01:00
Erik Krogh Kristensen
2ffd79d451
Merge pull request #7921 from erik-krogh/snapdragon
...
JS: add model for the snapdragon library
2022-02-11 10:10:55 +01:00
Arthur Baars
58a2597c3a
C++: move change note lines to correct query pack
2022-02-11 09:52:36 +01:00
Tom Hvitved
987b11c362
Merge pull request #7926 from hvitved/csharp/brotli
...
C#: Use Brotli instead of Gzip
2022-02-11 09:29:04 +01:00
Tamás Vajk
c5d917eb72
Improve formatting of 0.0.9 release notes
2022-02-11 09:19:43 +01:00
Esben Sparre Andreasen
a4447ce372
Update javascript/ql/lib/semmle/javascript/frameworks/Snapdragon.qll
2022-02-11 08:20:02 +01:00
luchua-bc
12c53baba4
Simplify the query
2022-02-11 01:05:06 +00:00
Harry Maclean
017183e7f3
Merge pull request #7919 from github/hmac/open-uri
...
Ruby: recognise additional form for OpenURI
2022-02-11 14:03:26 +13:00
Andrew Eisenberg
cba9e0b267
Fix paths in check-change-note
...
Library pack changes were being ignored.
2022-02-10 14:36:23 -08:00
github-actions[bot]
f25fc70b7c
Release preparation for version 2.8.1
2022-02-10 22:08:24 +00:00
Andrew Eisenberg
9441ea940c
Workflows: Augment workflow to ensure failure with invalid change notes
2022-02-10 13:52:54 -08:00
Erik Krogh Kristensen
f41bc64e30
add change-note
2022-02-10 22:41:35 +01:00
Arthur Baars
c9f898745c
Merge pull request #7943 from github/aibaars/cpp-move-note
...
C++: move change note
2022-02-10 22:32:31 +01:00
Arthur Baars
6cba49abe3
C++: move change note
2022-02-10 22:13:54 +01:00
Arthur Baars
1fb3cbfeee
Merge pull request #7940 from github/aibaars/js-move-note
...
Javascript: move change note
2022-02-10 21:20:06 +01:00
Arthur Baars
61ba896343
Javascript: move change note
2022-02-10 20:58:49 +01:00
Robert Marsh
dbe4770c7d
C++: add initial insufficient key size query
2022-02-10 14:53:40 -05:00
Tom Hvitved
2b2196d638
Merge pull request #7927 from github/hvitved-patch-1
...
Add C# 10 and .NET 6 to `versions-compilers.rst`
2022-02-10 20:43:33 +01:00
Erik Krogh Kristensen
eb56a5aef3
support more patterns that recognize valid numbers
2022-02-10 19:50:35 +01:00
Artem Smotrakov
0ba229a64b
Apply suggestions from code review (typos/formatting)
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-10 18:37:12 +00:00
Alex Ford
d55ba2542a
Ruby: fix an alert
2022-02-10 18:35:22 +00:00
Geoffrey White
85d03fdbfd
C++: Change note.
2022-02-10 18:05:41 +00:00
Erik Krogh Kristensen
02ed1ca392
add missing qldoc
2022-02-10 18:06:53 +01:00
yoff
a2532a86ea
Merge pull request #7894 from tausbn/python-normalise-prefixes
...
Python: Normalise string prefixes
2022-02-10 17:57:11 +01:00
Erik Krogh Kristensen
9739929795
convert the ruby ApiGraphs to use IPA labels
2022-02-10 17:54:19 +01:00
Alex Ford
bc53570a25
Ruby: fewer mappings from dataflow nodes to ast nodes
2022-02-10 15:58:31 +00:00
Alex Ford
7c1bd9a533
Ruby: add a test case for cleartext logging that uses NonCleartextPasswordFlow
2022-02-10 15:50:56 +00:00
Alex Ford
83a3808bbe
Ruby: avoid marking mutator methods as being safe (i.e. not returning sensitive data)
2022-02-10 15:50:56 +00:00
Alex Ford
b46e4ccd71
Ruby: drop SanitizerIn from ClearTextLoggingQuery
2022-02-10 15:50:56 +00:00
Alex Ford
7b4af39315
Ruby: track masked variables potentially containing sensitive data more accurately
2022-02-10 15:50:56 +00:00
Alex Ford
59ab384825
Ruby: rb/clear-text-logging-sensitive-data - match on CFG nodes rather than AST nodes
2022-02-10 15:50:56 +00:00
Jonathan Leitschuh
eee521e6ce
Fix test failure for TempDirLocalInformationDisclosure
2022-02-10 10:40:40 -05:00
Tom Hvitved
a3d631f2df
Add C# 10 and .NET 6 to versions-compilers.rst
2022-02-10 15:45:00 +01:00
Tom Hvitved
1c66444a61
C#: Use Brotli instead of Gzip
2022-02-10 14:30:24 +01:00
Felicity Chapman
efed21b99a
Merge pull request #7885 from Marcono1234/marcono1234/extractor-doc-improvements
...
Fix and improve Extractor options documentation formatting
2022-02-10 12:59:45 +00:00
CodeQL CI
9ebbd9efa1
Merge pull request #7591 from asgerf/js/mysql-sinks
...
Approved by esbena
2022-02-10 12:50:36 +00:00
Felicity Chapman
5ec1fc11f9
Apply suggestions from code review
2022-02-10 12:41:37 +00:00
CodeQL CI
a57ee019c2
Merge pull request #7819 from asgerf/asgerf/ruby-def-nodes
...
Approved by hvitved
2022-02-10 12:37:34 +00:00
Taus Brock-Nannestad
be323bafaf
Merge remote-tracking branch 'upstream/main' into python-normalise-prefixes
2022-02-10 12:55:49 +01:00
CodeQL CI
1a91a79b5b
Merge pull request #5841 from erik-krogh/libCode
...
Approved by esbena, ethanpalm
2022-02-10 11:36:45 +00:00
Mathias Vorreiter Pedersen
d05dbb285c
Merge pull request #7841 from jketema/structured-bindings-fix
...
C++: Update C++ variable hiding test
2022-02-10 11:29:38 +00:00
Geoffrey White
b0c2a144cc
C++: Remove no longer relevant tests.
2022-02-10 11:11:31 +00:00
Geoffrey White
20ad92a82e
C++: Filter noisiest sources.
2022-02-10 11:11:30 +00:00
Geoffrey White
7b5b2fdcd1
C++: Modernize cpp/system-data-exposure as a path-problem using IR taint, RemoteFlowSinkFunction.
2022-02-10 11:11:26 +00:00
Geoffrey White
5490809bcf
C++: Expand tests.
2022-02-10 10:43:21 +00:00
Erik Krogh Kristensen
d55920ad27
add model for the snapdragon library
2022-02-10 11:32:59 +01:00
Jeroen Ketema
46821fe136
Update C++ variable hiding test
...
Structured bindings are now handled better, so the false negative
related to structured bindings is now a true positive.
2022-02-10 10:58:32 +01:00
Tom Hvitved
58d90c7f8d
Python: More points-to performance improvements
2022-02-10 10:29:30 +01:00
Tom Hvitved
7fd8d6dd30
Address review comments
2022-02-10 10:29:30 +01:00
Tom Hvitved
2de892bfd8
Python: Points-to performance improvements
2022-02-10 10:29:30 +01:00
Erik Krogh Kristensen
12d31d750a
convert more type-trackers to API-graphs
2022-02-10 09:54:52 +01:00
Stephan Brandauer
a73cdf3527
Merge pull request #7911 from kaeluka/javascript/add-getFlowLabel-to-PathNode
...
JS: add a getFlowLabel method to the PathNode class
2022-02-10 09:10:08 +01:00
Jonathan Leitschuh
bafcce17d4
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-09 22:14:17 -05:00
Harry Maclean
d966ca8466
Ruby: recognise additional form for OpenURI
2022-02-10 15:42:15 +13:00
luchua-bc
ce03aeb4d9
Fixed an issue related to normalized path
2022-02-09 23:19:40 +00:00
Rasmus Wriedt Larsen
94f9656e8e
Python: Solve deprecation warnings for old experimental queries
2022-02-10 00:09:43 +01:00
Harry Maclean
f30222256f
Merge pull request #7061 from github/hmac/actiondispatch
...
Ruby: Rails route resolution
2022-02-10 09:46:36 +13:00
Ethan Palm
2f7f9d9032
Move explanation of example above sample code
2022-02-09 10:45:24 -08:00
Jonathan Leitschuh
ded8d64301
Remove CAPC and add CWE-93
2022-02-09 12:31:53 -05:00
Jonathan Leitschuh
03fdee3767
Cleanup Netty Response Splitting Query
2022-02-09 12:28:11 -05:00
Jonathan Leitschuh
8ffe878722
Apply suggestions from code review
...
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com >
2022-02-09 12:28:11 -05:00
Jonathan Leitschuh
c732cb7759
Add HTTP Request Splitting to Netty Query
2022-02-09 12:28:10 -05:00
Stephan Brandauer
3e88d46e0f
add a getFlowLabel method to the PathNode class
2022-02-09 17:28:25 +01:00
Jonathan Leitschuh
49a73673b6
Fix FP from mkdirs call on exact temp directory
2022-02-09 11:04:23 -05:00
Tamás Vajk
6483a92587
Merge pull request #7865 from github/post-release-prep/codeql-cli-2.8.0
...
Post-release preparation for codeql-cli-2.8.0
2022-02-09 16:42:38 +01:00
Jonathan Leitschuh
787e3dac31
Update java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-09 10:07:56 -05:00
Tom Hvitved
c695388c29
Merge pull request #7891 from hvitved/ruby/dataflow/hide-ssa-nodes
...
Ruby: Hide more SSA nodes from data-flow path explanations
2022-02-09 15:56:15 +01:00
Tom Hvitved
0bd8411cb6
Ruby: Hide more SSA nodes from data-flow path explanations
2022-02-09 15:31:10 +01:00
Rasmus Lerchedahl Petersen
aa010e420b
python: update qhelp
2022-02-09 15:27:39 +01:00
Rasmus Lerchedahl Petersen
75a2f92ce4
pthon: add change note
2022-02-09 15:23:36 +01:00
Mathias Vorreiter Pedersen
336c25d929
Merge pull request #7913 from RasmusWL/ql-qlpacks
...
QL: Streamline qlpacks
2022-02-09 13:37:19 +00:00
Rasmus Lerchedahl Petersen
313f9f056c
python: switch to using concepts
2022-02-09 14:36:48 +01:00
Rasmus Lerchedahl Petersen
17aa2898f9
python: model (xpathEval from) libxml2
2022-02-09 14:25:43 +01:00
Rasmus Lerchedahl Petersen
e8649d8947
python: model (etree from) lxml
2022-02-09 14:15:17 +01:00
Rasmus Wriedt Larsen
1f50624cf4
QL: Streamline qlpacks
...
So they follow the same format as the other languages.
`git grep codeql-ql` in the ql/ subfolder does not yield any results
now.
2022-02-09 14:08:36 +01:00
Rasmus Wriedt Larsen
9d5e8d5bd8
Merge pull request #7842 from RasmusWL/consistency-queires
...
Misc: Streamline `consistency-queries/qlpack.yml`
2022-02-09 13:42:18 +01:00
jorgectf
85b5ef36ae
XmlInjection -> XmlEntityInjection
2022-02-09 13:28:56 +01:00
Nick Rolfe
1eba8277ee
Merge pull request #7614 from github/nickrolfe/array_flow_summaries
...
Ruby: add more Array/Enumerable flow summaries
2022-02-09 09:57:59 +00:00
Harry Maclean
f276904fa9
Ruby: Add nomagic pragma to helper
2022-02-09 22:38:35 +13:00
Michael Nebel
ff369f2a36
Merge pull request #7846 from michaelnebel/csharp/deconstruction
...
C# 10: Tuple deconstruction.
2022-02-09 10:08:16 +01:00
Mathias Vorreiter Pedersen
bbbb5268ce
Merge pull request #7881 from geoffw0/clrtxtperf
...
CPP: Fix performance for cpp/cleartext-transmission
2022-02-09 09:03:44 +00:00
Erik Krogh Kristensen
5340530cb7
use the number guard in existing queries that contained typeof checks
2022-02-09 09:51:57 +01:00
Erik Krogh Kristensen
d6721ec574
implement a isNaN guard for unsafe-shell-command-construction
2022-02-09 09:51:57 +01:00
Tom Hvitved
9440a45015
Merge branch 'main' into post-release-prep/codeql-cli-2.8.0
2022-02-09 09:40:33 +01:00
yoff
f21ac04285
Update python/ql/lib/semmle/python/frameworks/Stdlib.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-09 09:22:31 +01:00
luchua-bc
4609227e76
Use data model for request/session attribute operations
2022-02-09 03:24:46 +00:00
jorgectf
3ccac4ed8a
Update .expected
2022-02-08 23:59:36 +01:00
Jonathan Leitschuh
7f46640176
Consider calls to setReadable(false, false) then setReadable(true, true) to be safe
2022-02-08 17:57:10 -05:00
jorgectf
c6d8b97871
Make verifyCall() a private predicate
2022-02-08 23:37:17 +01:00
jorgectf
7b51b91d13
Improve test
2022-02-08 23:33:43 +01:00
jorgectf
ed60d16367
Refactor the way to check the verifying call
2022-02-08 23:33:30 +01:00
Jorge
f1fab98ea2
Merge branch 'github:main' into python_jwt
2022-02-08 23:12:58 +01:00
Taus Brock-Nannestad
54ae744b2c
Python: Also update Python 2 file
2022-02-08 22:08:53 +01:00
Harry Maclean
3206384884
Merge pull request #7824 from github/hmac/constantize
2022-02-09 08:30:21 +13:00
Chuan-kai Lin
a7f1ee574c
Upgrade scripts testing: set initial dbschemes
...
This commit sets initial dbschemes for cpp, csharp, java, javascript, and
python so that automated testing for upgrade scripts would also cover legacy
upgrades.
2022-02-08 11:11:41 -08:00
Tom Hvitved
b2419d60bd
Merge pull request #7090 from hvitved/ruby/perf
...
Ruby: Cache more predicates
2022-02-08 20:02:33 +01:00
Chris Smowton
143d64c92c
Merge pull request #7879 from github/smowton/admin/getting-started-mention-codeql-go-deps
...
Docs: Note codeql-go needs an install step before use
2022-02-08 18:07:26 +00:00
Alex Ford
81ed5d0ff7
Ruby: comment and node description fixes
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-02-08 18:03:29 +00:00
jorgectf
b00051e4ab
Update .expected
2022-02-08 17:52:37 +01:00
jorgectf
01ad25f3f0
Apply .getALocalSource() and fix xmltodict's vulnerable predicate
2022-02-08 17:51:09 +01:00
jorgectf
7c4a6a12b0
Test polish
2022-02-08 17:50:39 +01:00
jorgectf
8f9cd16806
Update
2022-02-08 17:23:18 +01:00
Taus Brock-Nannestad
6ea8986daa
Python: Normalise string prefixes
2022-02-08 16:48:17 +01:00
Erik Krogh Kristensen
4bbb7ad320
Merge pull request #7876 from erik-krogh/zipRelative
...
JS: recognize more startswith sanitizers for path-injection queries
2022-02-08 15:22:39 +01:00
Nick Rolfe
ade7921079
Merge pull request #7890 from github/nickrolfe/unique_node
...
Ruby/QL: add `unique` annotation on `node` column
2022-02-08 13:15:17 +00:00
Tom Hvitved
984e01ecf0
C#: Remove FPs from cs/dereferenced-value-may-be-null
...
Apply a conservative approach by filtering out results for accesses to
captured nullable values, when there is an (implicit) call to the capturing
callable which is `null`-guarded. For example:
```
bool M(int? i, IEnumerable<int> @is)
{
if (i.HasValue)
return @is.Any(j => j == i.Value); // GOOD
return false;
}
```
2022-02-08 14:01:57 +01:00
Tom Hvitved
7948d965a0
C#: Add nullness tests for captured variables
2022-02-08 13:52:29 +01:00
Tom Hvitved
3b5267eca5
Ruby: Cache DataFlow::Node::{toString,getLocation}
2022-02-08 13:03:42 +01:00
Tom Hvitved
f337459a4a
Ruby: Cache capturedEntryWrite
2022-02-08 13:03:42 +01:00
Tom Hvitved
b041bc03d1
Ruby: Cache ConditionBlock::(immediately)Controls
2022-02-08 13:03:41 +01:00
Tom Hvitved
4037d1ff96
Ruby: Cache ErbDirective::getAChildStmt
2022-02-08 13:03:41 +01:00
Tom Hvitved
4c5f32ba4a
Ruby: Cache exprNodeReturnedFrom
2022-02-08 13:03:31 +01:00
Tom Hvitved
45412fa17f
Cache hasLocalSource
2022-02-08 13:03:27 +01:00
Chris Smowton
a6596ea7ce
Fix test requirements, formatting
2022-02-08 12:01:32 +00:00
Rasmus Lerchedahl Petersen
3f36ccba92
python: add name to concept
2022-02-08 12:40:13 +01:00
Rasmus Lerchedahl Petersen
8665fe4817
python: add concept for XPath construction
...
also small fixup in `SqlConstruction`
2022-02-08 12:31:37 +01:00
Erik Krogh Kristensen
28ba78cb76
add explicit this
2022-02-08 12:20:21 +01:00
Rasmus Wriedt Larsen
3e01816f0c
Python: Add change-note
2022-02-08 12:03:40 +01:00
Rasmus Lerchedahl Petersen
7d287f1698
python: add concept for xpath execution
2022-02-08 11:46:28 +01:00
Rasmus Lerchedahl Petersen
103b5761f3
python: remove superfluous configuration
...
this also removes duplicated nodes and edges
in the path results
2022-02-08 11:34:11 +01:00
Michael Nebel
c04e344192
Merge pull request #7749 from michaelnebel/csharp/lambda-improvements
...
C# 10 - Lambda improvements.
2022-02-08 11:28:55 +01:00
Benjamin Muskalla
b62df5a9ad
Merge pull request #7872 from bmuskalla/fixCoverageCollection
...
Collect framework coverage on demand
2022-02-08 11:27:48 +01:00
Rasmus Lerchedahl Petersen
a9cfc60ea1
python: move supporting libraries
...
and update reference in query
2022-02-08 11:27:45 +01:00
Henry Mercer
eff0ca01b1
Merge pull request #7417 from github/henrymercer/java/update-telemetry-query-metadata
...
Java: Start running telemetry queries on Code Scanning
2022-02-08 10:26:30 +00:00
Rasmus Lerchedahl Petersen
88efcff818
python: move query
...
and update reference in query test
2022-02-08 11:24:09 +01:00
Chris Smowton
79654592d9
Apply suggestions from code review
2022-02-08 10:23:46 +00:00
Rasmus Lerchedahl Petersen
e51ba6f421
python: rename test directory
2022-02-08 11:20:10 +01:00
Rasmus Lerchedahl Petersen
e52dca0a35
python: move tests
2022-02-08 11:19:28 +01:00
Benjamin Muskalla
ff8a96b96d
Rename framework coverage query
...
Move it to the other summary queries, update all references.
2022-02-08 11:14:03 +01:00
Rasmus Wriedt Larsen
a8edd44a3c
Python: Update .expected
2022-02-08 11:12:34 +01:00
Benjamin Muskalla
85a8efab63
Update .github/workflows/csv-coverage-metrics.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:07:56 +01:00
Benjamin Muskalla
6e3d2a2046
Update misc/suite-helpers/security-and-quality-selectors.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:07:35 +01:00
Benjamin Muskalla
fb91821882
Update misc/suite-helpers/security-extended-selectors.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:06:51 +01:00
Benjamin Muskalla
94c517efd6
Update misc/suite-helpers/code-scanning-selectors.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:06:35 +01:00
Benjamin Muskalla
284c397883
Update misc/suite-helpers/lgtm-selectors.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:06:30 +01:00
Benjamin Muskalla
e7823a78ef
Update .github/workflows/csv-coverage-metrics.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:06:21 +01:00
Nick Rolfe
fa16ff9ffc
QL for QL: make node column unique
2022-02-08 09:59:11 +00:00
Nick Rolfe
8881031d0a
Ruby: add upgrade/downgrade scripts
2022-02-08 09:57:55 +00:00
Nick Rolfe
2037368f62
Ruby: make node column unique
2022-02-08 09:55:34 +00:00
Nick Rolfe
dbe2951aec
Merge pull request #7880 from github/nickrolfe/locations_column_ql
...
QL for QL: sync changes from Ruby
2022-02-08 09:53:06 +00:00
CodeQL CI
db8ffb5ba9
Merge pull request #7870 from erik-krogh/nodeReExport
...
Approved by esbena
2022-02-08 09:44:25 +00:00
Erik Krogh Kristensen
d73b2effa0
rename maybeGetJoinArg maybeGetPathSuffix
2022-02-08 10:42:06 +01:00
Asger Feldthaus
862c3b9752
Ruby: autoformat
2022-02-08 10:22:15 +01:00
Asger Feldthaus
2b36703bfb
Ruby: add def= tags to API graph test
2022-02-08 10:20:25 +01:00
Geoffrey White
6005f3d2d4
C++: Add pragma[noinline].
2022-02-08 09:13:51 +00:00
Asger Feldthaus
66b1c86402
Ruby: update qldoc for def predicate
2022-02-08 10:00:14 +01:00
Asger Feldthaus
9ac526be89
Ruby: change binding for getParameter/getKeywordParameter
2022-02-08 09:36:05 +01:00
Asger Feldthaus
073493bb2e
Ruby: fix qldoc for getMethod
2022-02-08 09:28:07 +01:00
luchua-bc
ff4826d203
Correct the data model and update qldoc
2022-02-08 04:02:27 +00:00
Erik Krogh Kristensen
cc3f9bf2a8
fix performance issue by inlining a simpler version of getASourceProp
2022-02-08 00:22:01 +01:00
Erik Krogh Kristensen
aa95dd4ec7
fix typo
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-02-08 00:19:40 +01:00
Harry Maclean
3031b39dc1
Ruby: prevent bad join in ActionController.qll
2022-02-08 12:10:23 +13:00
Marcono1234
d0547cdbfd
Fix and improve Extractor options documentation formatting
2022-02-07 21:05:14 +01:00
Jonathan Leitschuh
c4112e6d4c
Post refactor fixiup
2022-02-07 15:02:13 -05:00
Robert Marsh
56caa5dfd6
C++: fix hasImplicitCopyConstructor for templates
...
Fixes some cases in instantiations of templates with manually written
copy constructors or copy assignment operators where
hasImplicitCopyConstructor would incorrectly hold
2022-02-07 14:26:28 -05:00
Chris Smowton
de38638db6
Combine CWE-200 queries
2022-02-07 14:22:36 -05:00
Rasmus Wriedt Larsen
eb109828c0
Merge pull request #7252 from museljh/feature/cwe-338
...
Python: CWE-338 insecureRandomness
2022-02-07 19:30:06 +01:00
Robert Marsh
61c315d74b
C++: test for explicit template copy constructor
2022-02-07 12:56:59 -05:00
Nick Rolfe
073d325750
QL for QL: update dbscheme stats
2022-02-07 17:54:35 +00:00
Nick Rolfe
3ee109731a
QL for QL: sync changes from Ruby
...
In particular, update the dbscheme to put location columns in a single
table.
2022-02-07 17:44:40 +00:00
Nick Rolfe
9217d0e1b9
Merge pull request #7875 from github/nickrolfe/locations_column
...
Ruby: put AST node locations in a single table
2022-02-07 17:43:33 +00:00
Geoffrey White
6727069893
C++: Autoformat.
2022-02-07 17:33:11 +00:00
Geoffrey White
d1b6871314
C++: Restrict type.
2022-02-07 17:32:52 +00:00
Geoffrey White
005dfdffdb
C++: Speed up cpp/cleartext-transmission ('Encrypted' class).
2022-02-07 17:19:25 +00:00
Chris Smowton
27b9e1c01b
Docs: Note codeql-go needs an install step before use
2022-02-07 16:11:42 +00:00
Erik Krogh Kristensen
b59c7911a3
update locations of expected output
2022-02-07 15:23:26 +01:00
Erik Krogh Kristensen
ca5f91e587
recognize more startswith sanitizers for path-injection queries
2022-02-07 14:19:13 +01:00
Michael Nebel
f21e084628
C#: Fix issue in naming of class in test file.
2022-02-07 14:15:59 +01:00
Michael Nebel
f5fc15e74d
C#: Add some testcases to cover mixed assignment and declarations in tuples.
2022-02-07 14:11:31 +01:00
Michael Nebel
0cf4b3fbcc
C#: Added dataflow testcases for tuple mixed initialization and assignment.
2022-02-07 14:11:31 +01:00
Michael Nebel
bcf732a7cb
C#: Re-factor tuple tests to use the default value flow configuration.
2022-02-07 14:11:31 +01:00
Michael Nebel
f478bf5b9b
Merge pull request #7809 from michaelnebel/csharp/test-pattern-match-flow
...
C#: Add flow test cases for undetected value flow, when making variable bindings in pattern matching.
2022-02-07 14:05:50 +01:00
Nick Rolfe
881776a2ac
Ruby: delete commented-out code
2022-02-07 12:50:06 +00:00
Nick Rolfe
e049f08c24
Ruby: update dbscheme stats
2022-02-07 12:42:34 +00:00
Erik Krogh Kristensen
6f28cb9201
lower the precision of js/unsafe-code-construction
2022-02-07 13:35:29 +01:00
Erik Krogh Kristensen
06f9924194
add change note
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
896d2bad0e
update expected output now that JSON.stringify() is seen as a sanitizer
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
d1d4ebb3b5
add values written to the global scope as exports
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
91b03f56ad
move .qll files from src to lib
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
eb133f59f6
update qhelp to focus on properly documenting potentially unsafe library functions
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
a9f7756788
reuse utility predicate
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
681179dcbb
add comment about parameters named "code"
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
53315e6ab6
ignore sources named "code"
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
59cc099008
add missing qldoc
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
d77c28f6a7
add qhelp for unsafe-code-construction
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
d790f3ccbb
add test for unsafe-code-construction query
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
198a464346
add js/unsafe-code-construction query
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
955ad8c458
add JSON.stringify as a code-injection sanitizer
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
68a5c1f5b5
add code-injection sink for calls to node
2022-02-07 13:34:18 +01:00
Rasmus Wriedt Larsen
62702d0ca9
Python: Fix setStoreStep to use SetElementContent
2022-02-07 13:18:36 +01:00
Nick Rolfe
b3b2bba618
Ruby: make some generated predicates final
2022-02-07 12:17:50 +00:00
Rasmus Wriedt Larsen
b276b2d48c
Python: Clean up taint steps for attributes
2022-02-07 13:12:31 +01:00
Rasmus Wriedt Larsen
59160eeb24
Python: Add test showing taint for attr store
...
In `x.arg = TAINTED_STRING` there is a store step to the attribute `arg`
of `x`. In our taint modeling, we allow _any_ store step with the code
below. This means that we also say there is a taint-step directly from
`TAINTED_STRING` to `x` :|
```codeql
// construction by literal
// TODO: Not limiting the content argument here feels like a BIG hack, but we currently get nothing for free :|
DataFlowPrivate::storeStep(nodeFrom, _, nodeTo)
```
2022-02-07 13:12:28 +01:00
Nick Rolfe
b43cc23277
Ruby: add db downgrade script
2022-02-07 12:10:36 +00:00
Nick Rolfe
e8855c3718
Ruby: add db upgrade script
2022-02-07 12:10:36 +00:00
Nick Rolfe
388d361ec3
Ruby: put AST node locations in a single table
2022-02-07 12:10:36 +00:00
Michael Nebel
99f89f1fe2
C#: Update db stats file.
2022-02-07 12:57:10 +01:00
Mathias Vorreiter Pedersen
55e69d421c
Merge pull request #7849 from Yonah125/main
...
C/C++: Useless Test : verification of "Fully converted" Type
2022-02-07 11:46:51 +00:00
Benjamin Muskalla
2f94356899
Run daily
2022-02-07 12:12:29 +01:00
Benjamin Muskalla
bd417769ce
Add workflow to upload metrics
2022-02-07 12:08:18 +01:00
Benjamin Muskalla
a1432c47dc
Exclude framework coverage query from suites
...
We don't want to run this query on any database but rather
in a specific setup. Exclude from suites by default.
2022-02-07 12:08:18 +01:00
Benjamin Muskalla
9af50f5216
Turn framework coverage into metric query
2022-02-07 12:08:18 +01:00
Jeroen Ketema
1f2865c7cc
Merge pull request #7798 from jketema/missing-open-arg
...
C++: Add query for missing mode argument in `open`/`openat` calls
2022-02-07 12:01:44 +01:00
BACK Yonah
61dc9ef12e
C/C++: AutoFormat fix
2022-02-07 11:41:17 +01:00
Rasmus Wriedt Larsen
32cd7d6fa7
Add groups to all consistency-queries/qlpack.yml
...
as discussed in PR review
2022-02-07 11:15:48 +01:00
Tom Hvitved
dc09e87cb2
Ruby: Use SimpleSummarizedCallable in a few more places
2022-02-07 11:05:32 +01:00
Erik Krogh Kristensen
0584a6acaf
recognize a nodejs re-exports in a loop
2022-02-07 10:12:38 +01:00
Michael Nebel
b2e18ebae1
C#: Lambda improvements change note.
2022-02-07 09:22:46 +01:00
Michael Nebel
782d6da754
C#: Support for lambda expression explicit return types and lambda attributes.
2022-02-07 09:19:47 +01:00
github-actions[bot]
b4ab86c020
Post-release preparation for codeql-cli-2.8.0
2022-02-06 23:34:07 +00:00
Arthur Baars
ac03fab986
Merge pull request #7753 from aibaars/ruby-3.1
...
Ruby 3.1 features
2022-02-06 21:06:16 +01:00
Artem Smotrakov
f53b2fcc62
Updated IgnoredHostnameVerification.ql to cover more uses of HostnameVerifier.verify()
2022-02-06 11:23:20 +00:00
jorgectf
d2f07e4df2
Merge branch 'jorgectf/python/deserialization' of https://github.com/jorgectf/codeql into jorgectf/python/deserialization
2022-02-05 16:20:17 +01:00
Jorge
99e14d16bc
Merge branch 'github:main' into jorgectf/python/deserialization
2022-02-05 16:20:09 +01:00
Jonathan Leitschuh
1f47ea5164
Update to new change note format
2022-02-04 17:16:12 -05:00
Jonathan Leitschuh
0268dd9f0a
Add file creation sanitizer
2022-02-04 17:10:27 -05:00
Jonathan Leitschuh
9299c7996d
Add information disclosure test fix suggestions
2022-02-04 17:10:27 -05:00
Jonathan Leitschuh
0a621c2801
Fix the formatting in TempDirLocalInformationDisclosureFromMethodCall
2022-02-04 17:10:27 -05:00
Jonathan Leitschuh
79db76dcf8
Fix test failures TempDirLocalInformationDisclosureFromSystemProperty
2022-02-04 17:10:27 -05:00
Jonathan Leitschuh
d5c9af31b2
Fixup documentation/code from PR feedback
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
f7a4aac525
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
a4b5573f53
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
a8d25b63ac
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-04 17:10:26 -05:00
Chris Smowton
e795823d97
Autoformat TempDirUtils.qll
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
7e514e9ef9
Add QLdoc and fix Compiler Errors in Tests
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
cb30385684
Update java/ql/src/Security/CWE/CWE-200/TempDirUtils.qll
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
df716cbaa0
Revert changes to MethodAccessSystemGetProperty
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
66831989b7
Add QLdoc to TempDirUtils
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
7e55c92eb4
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
c19f52cd04
Add release notes for "Temporary Directory Local information disclosure"
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
f6067d28f9
Fix file names and formatting from PR feedback
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
41b5011b81
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
7929faedc0
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
f910fd4719
Remove path flow tracking in 'TempDirLocalInformationDisclosureFromMethodCall'
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
e4c017e888
Apply suggestions from code review
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-02-04 17:10:24 -05:00
Jonathan Leitschuh
13fed0e9b6
Temp Dir Info Disclosure: Final pass and add documentation
2022-02-04 17:10:24 -05:00
Jonathan Leitschuh
bc12e994b0
Add java.nio.file.Files API checks
2022-02-04 17:10:24 -05:00
Jonathan Leitschuh
ecad7534ae
Add mkdirs check
2022-02-04 17:10:24 -05:00
Jonathan Leitschuh
cf0ed81575
Add TempDir taint tracking for Files.write
2022-02-04 17:10:24 -05:00
Jonathan Leitschuh
3a15678b1e
Java: CWE-200: Temp directory local information disclosure vulnerability
2022-02-04 17:10:23 -05:00
Erik Krogh Kristensen
ab2d3a7ca0
Merge pull request #7828 from Naman-ntc/main
...
JS: Adding model for `.get` function of `Map` in Unvalidated Dynamic Method Call
2022-02-04 20:19:02 +01:00
Erik Krogh Kristensen
f00d723c49
Merge pull request #7843 from erik-krogh/CVE-2021-23484
...
JS: add file sources from `jszip` to `js/zip-slip`
2022-02-04 20:17:43 +01:00
BACK Yonah
21fdc53d62
C/C++: Using UnspecifiedType instead of Type
2022-02-04 19:12:15 +01:00
Nick Rolfe
9744cf2457
Ruby: apply suggested simplification from review
2022-02-04 17:14:47 +00:00
Nick Rolfe
aaff3226c9
Ruby: prefer ...isInt(x) over x = ...getInt()
2022-02-04 17:10:22 +00:00
BACK Yonah
b2ca25abef
Merge branch 'main' of https://github.com/github/codeql
2022-02-04 18:09:19 +01:00
BACK Yonah
f4a1d1d5e6
C/C++: Useless Test Fully converted verification
2022-02-04 18:05:03 +01:00
Nick Rolfe
45962f1cad
Ruby: make this unique for each method
...
Even when summaries are shared in a single class.
2022-02-04 17:03:55 +00:00
BACK Yonah
34320cb57b
C/C++: Useless Test Fully converted verification
2022-02-04 18:03:29 +01:00
Ian Wright
6c3daf49f9
Merge pull request #7785 from github/z80coder/impose-length-restriction
...
Restrict AST nodes according to string length
2022-02-04 16:35:04 +00:00
Nick Rolfe
7a9ddc28bf
Ruby: address some more feedback on array flow summaries
2022-02-04 16:33:27 +00:00
Henry Mercer
bb1e89d261
Merge pull request #7848 from github/henrymercer/js-ml-powered-codeowners
...
JS: Add codeowners for ML-powered queries
2022-02-04 16:08:56 +00:00
Michael Nebel
6ee30843bb
C#: Add lambda attributes test cases.
2022-02-04 16:54:49 +01:00
Henry Mercer
22ef35e13a
JS: Add codeowners for ML-powered queries
...
Create a new reviewers team @github/codeql-ml-powered-queries-reviewers
for reviewing ML-powered queries and the associated CodeQL libraries.
2022-02-04 15:49:44 +00:00
Ian Wright
be5e8dae05
Update javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/FunctionBodyFeatures.qll
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-02-04 15:41:50 +00:00
Michael Nebel
7b3ba3cb96
C#: Modify database schema to allow lambda expression to be attributable and extract the lambda expression attributes.
2022-02-04 16:34:58 +01:00
Michael Nebel
f412d49ba4
C#: Add some examples lambdas with different kind of attributes and update existing testcases.
2022-02-04 16:34:58 +01:00
Michael Nebel
bb3f9cea3a
C#: Update test cases(s) expected output.
2022-02-04 16:34:58 +01:00
Michael Nebel
7520948ec4
C#: Add test case for finding lambdas with explicit return types.
2022-02-04 16:34:58 +01:00
Michael Nebel
83a5ef4961
C#: Examples of lambda expressions with explicit return types.
2022-02-04 16:34:58 +01:00
Michael Nebel
25019dbaa0
C#: Add support QL library support for lambda explicit return types.
2022-02-04 16:34:58 +01:00
Michael Nebel
eb8c226749
C#: Add support for explicit return types in the extractor.
2022-02-04 16:34:58 +01:00
Michael Nebel
ae62704d3a
C#: Add table for explicit return type in lambda expressions.
2022-02-04 16:34:57 +01:00
Michael Nebel
ccb727e3ca
C#: Test cases that shows that lambdas can be naturally (implicitly) typed and that the type is indistinguishable from the equivalent explicitly typed declaration.
2022-02-04 16:34:57 +01:00
Michael Nebel
a67033034a
C#: Example of naturally typed lambda.
2022-02-04 16:34:57 +01:00
jorgectf
43fde3561f
Merge branch 'jorgectf/python/deserialization' of https://github.com/jorgectf/codeql into jorgectf/python/deserialization
2022-02-04 16:32:11 +01:00
Jorge
d96eb01b9c
Merge branch 'github:main' into jorgectf/python/deserialization
2022-02-04 16:32:01 +01:00
Ian Wright
e57a0e0e2f
Update javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/FunctionBodyFeatures.qll
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-02-04 15:21:56 +00:00
Ian Wright
b38335a6c2
add QL comment; inline a predicate; restore a comment
2022-02-04 15:21:09 +00:00
Nick Rolfe
ed00f2b0d2
Ruby: address some feedback on array flow summaries
2022-02-04 13:40:39 +00:00
Erik Krogh Kristensen
edcb3ba902
add file sources from jszip to js/zip-slip
2022-02-04 14:39:49 +01:00
Tom Hvitved
693aa69abd
Update csharp/ql/consistency-queries/qlpack.yml
2022-02-04 14:38:25 +01:00
yoff
182c62f5c3
Merge pull request #7838 from tausbn/python-fix-charset-performance-problem
...
Python: Fix performance issue in `charSet`
2022-02-04 14:18:13 +01:00
Michael Nebel
567768134f
Merge pull request #7792 from michaelnebel/csharp/attributes
...
C#: Attribute kind and return value attributes.
2022-02-04 14:10:51 +01:00
Taus
67be20f368
Python: Remove implied inequalities
...
Also gets rid of `inner_end`, since we're already doing `end - 1 = ...`
in the other fix (and so this is more consistent).
2022-02-04 12:46:06 +00:00
Benjamin Muskalla
eee03ebe3b
Merge pull request #7767 from bmuskalla/regenerateModelScript
...
Java: Regenerate framework models automatically
2022-02-04 13:29:46 +01:00
Naman Jain
009c95774e
update expected files
2022-02-04 12:28:17 +00:00
Michael Nebel
6487b546dc
C#: Update TargetFramework testcases expected files as well, as these also uses the string representation of the attributes.
2022-02-04 13:05:08 +01:00
Nick Rolfe
161d766ba9
Ruby: address review comments on array_flow.rb
2022-02-04 11:59:59 +00:00
Michael Nebel
ade119f4a8
C#: Add flow test cases for undetected value flow, when making variable bindinds in pattern matching.
2022-02-04 12:57:58 +01:00
Jeroen Ketema
b967eaf25d
Add documentation for parseHex
2022-02-04 12:35:13 +01:00
Rasmus Wriedt Larsen
c817ba5718
Python: Add consistency-queries/qlpack.yml
...
But no queries yet
2022-02-04 12:08:54 +01:00
Rasmus Wriedt Larsen
0bcfc4b657
Ruby: Update consistency-queries/qlpack.yml
...
I'm not sure whether this means the consistency queries were run using
the 0.0.1 release of the `codeql/ruby-all` qlpack, but using `"*"` at
least ensures that it is always using the version from the CodeQL repo.
2022-02-04 12:06:50 +01:00
Rasmus Wriedt Larsen
580d7d9df0
QL: Update consistency-queries/qlpack.yml
2022-02-04 12:06:50 +01:00
Rasmus Wriedt Larsen
1db4bdc607
C#: Update consistency-queries/qlpack.yml
2022-02-04 12:06:50 +01:00
Rasmus Wriedt Larsen
2220d3cc47
Misc: Allow */ql/consistency-queries/qlpack.yml
2022-02-04 12:06:50 +01:00
Rasmus Wriedt Larsen
2e788ea86e
Python: Accept deprecation warnings for old tests
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
438a01e911
Python: Deprecate old bottle points-to extension
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
c9e36aaf72
Python: Fix deprecated deprecated
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
9ec531f040
Python: Add deprecation change-note
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
84fdd8a739
Python: Add non-deprecated httpVerb to Concepts
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
5a032d6f84
Python: deprecate old taint-tracking related predicates
2022-02-04 12:02:08 +01:00
Rasmus Wriedt Larsen
dba6b60c80
Python: Deprecate old library modeling
2022-02-04 12:02:08 +01:00
Rasmus Wriedt Larsen
a40fdf7a7c
Python: Deprecate old web modeling
2022-02-04 12:02:08 +01:00
Rasmus Wriedt Larsen
14a1aa0c11
Python: Add change-note
...
I went with `minorAnalysis` instead of `majorAnalysis`, since I don't
think the impact of this change will be major (but that's just my gut
feeling).
2022-02-04 12:00:49 +01:00
Rasmus Wriedt Larsen
b2ce0fcb72
Python: Add post-update nodes to args of unresolved calls
...
Besides solving the problem with `setattr`, it also solved some old
problems with json library modeling (yay).
2022-02-04 11:51:53 +01:00
Michael Nebel
f365477996
C#: Address review comments and update test output.
2022-02-04 11:48:12 +01:00
Benjamin Muskalla
bc5753cb20
Fix path expression
2022-02-04 11:43:18 +01:00
Naman Jain
5e1ca3154f
Update javascript/ql/test/query-tests/Security/CWE-754/UnvalidatedDynamicMethodCallGood3.js
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-02-04 16:13:05 +05:30
Naman Jain
5121414a53
Update javascript/ql/test/query-tests/Security/CWE-754/UnvalidatedDynamicMethodCallGood4.js
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-02-04 16:12:58 +05:30
Rasmus Wriedt Larsen
e9b496ba73
Merge pull request #7831 from RasmusWL/printast-remove-regexp
...
Python: Remove `RegExpTerm` from PrintAST
2022-02-04 11:38:58 +01:00
Asger Feldthaus
0a0d9583b4
Ruby: rephase comment for MkDef
2022-02-04 11:37:54 +01:00
Mathias Vorreiter Pedersen
2e2913b921
Merge pull request #7839 from rdmarsh2/rdmarsh2/ir-initializer-inheritance-fix
...
C++: fix IR generation for constructor base inits when no constructor is present.
2022-02-04 10:32:57 +00:00
Asger Feldthaus
0189e8abb4
Ruby: autoformat
2022-02-04 11:32:31 +01:00
Benjamin Muskalla
fcaead4004
Enable debugging action
2022-02-04 11:29:36 +01:00
Benjamin Muskalla
b747391c74
Improve error handling and refactor base path
2022-02-04 11:26:19 +01:00
Asger Feldthaus
87c62db781
Ruby: disable test line not currently working
2022-02-04 11:20:42 +01:00
Asger Feldthaus
75b72361ce
Ruby: add toString and locations to the new node types
2022-02-04 11:20:42 +01:00
Asger Feldthaus
7373a503f6
Ruby: Populate ArgumentPosition based on keyword arguments
2022-02-04 11:20:42 +01:00
Asger Feldthaus
5e350a0270
Ruby: Derive edge labels from {Argument,Parameter}Position
2022-02-04 11:20:42 +01:00
Asger Feldthaus
040e56623c
Ruby: add getAValueReachingRhs
2022-02-04 11:20:42 +01:00
Asger Feldthaus
17dd5cd581
Ruby: remove a stray TODO
2022-02-04 11:20:42 +01:00
Asger Feldthaus
d2e381aa79
Ruby: more def-node tests
2022-02-04 11:20:41 +01:00
Asger Feldthaus
32e0f42969
Ruby: refactor Return(x) to Method(x).return
2022-02-04 11:20:39 +01:00
Asger Feldthaus
55b5f19b92
Ruby: Add def-nodes to API graphs
2022-02-04 11:06:35 +01:00
Asger Feldthaus
9c17a5ce99
Ruby: replace "instance" label with a call to new
2022-02-04 11:03:25 +01:00
Asger Feldthaus
5858732da1
Ruby: change useStep signature
2022-02-04 11:01:04 +01:00
Asger Feldthaus
e6fdd4d34a
Ruby: Make hasLocalSource private/cached
2022-02-04 11:01:03 +01:00
Asger Feldthaus
9a496e647f
Ruby: Drive-by fix type-tracking through params with default values
2022-02-04 11:01:03 +01:00
Esben Sparre Andreasen
d08c0f7852
Merge pull request #7817 from github/esbena-patch-7
...
Document and format event-stream-orig.js
2022-02-04 10:26:30 +01:00
Jeroen Ketema
9f4e261625
Set precision of cpp/open-call-with-mode-argument to high
2022-02-04 10:01:25 +01:00
Jeroen Ketema
ef2a70e00c
Limit open/openat target to global/std scope
2022-02-04 09:51:10 +01:00
Mathias Vorreiter Pedersen
bc17df55ee
Merge pull request #7830 from MathiasVP/fix-ir-reevaluation-in-return-stack-allocated-memory
...
C++: Fix re-evaluation in `cpp/return-stack-allocated-memory`
2022-02-04 08:32:40 +00:00
Esben Sparre Andreasen
72b5edc144
Document and format event-stream-orig.js
...
Some anti-virus products (rightfully) flag this event-stream-orig.js as a malicious file.
This change does two things:
- neutralises the file such that the code can not be run accidentally
- documents the purpose of the file
2022-02-04 09:27:47 +01:00
Harry Maclean
ab7fd89653
Merge pull request #7663 from github/hmac/api-graph-subclass
...
Ruby: Add basic subclassing support to API Graphs
2022-02-04 10:19:07 +13:00
Harry Maclean
e328c6222a
Merge pull request #7797 from github/hmac/pin-rust
...
Ruby: Pin Rust to 1.54
2022-02-04 10:18:46 +13:00
Taus
22aa4c9379
Python: Fix performance issue in charSet
...
Observed on `mozilla/bugbug` on the 2.8.0 CLI branch, we had the
following line in the timing report:
```
FullServerSideRequestForgery.ql-17:regex::RegexString::charSet_dispred#fff#antijoin_rhs ............... 1m13s
```
Inspecting the logs, we see the following join:
```
(644s) Tuple counts for regex::RegexString::charSet_dispred#fff#antijoin_rhs/5@f295d1bk after 1m13s:
1 ~0% {1} r1 = CONSTANT(unique string)["]"]
2389 ~4% {3} r2 = JOIN r1 WITH regex::RegexString::nonEscapedCharAt_dispred#fff_201#join_rhs ON FIRST 1 OUTPUT Rhs.1 'arg0', Rhs.2 'arg1', (Rhs.2 'arg1' + 1)
668873 ~0% {6} r3 = JOIN r2 WITH regex::RegexString::char_set_start_dispred#fff ON FIRST 1 OUTPUT Lhs.0 'arg0', "]", Lhs.1 'arg1', Lhs.2 'arg2', Rhs.1 'arg3', Rhs.2 'arg4'
537501371 ~4% {7} r4 = JOIN r3 WITH regex::RegexString::nonEscapedCharAt_dispred#fff_021#join_rhs ON FIRST 2 OUTPUT Lhs.0 'arg0', Lhs.2 'arg1', Lhs.3 'arg2', Lhs.4 'arg3', Lhs.5 'arg4', "]", Rhs.2
269085087 ~0% {7} r5 = SELECT r4 ON In.6 > In.4 'arg4'
89583155 ~3% {7} r6 = SELECT r5 ON In.6 < In.1 'arg1'
89583155 ~26634% {5} r7 = SCAN r6 OUTPUT In.0 'arg0', In.1 'arg1', In.2 'arg2', In.3 'arg3', In.4 'arg4'
return r7
```
Now, this is problematic not just because of the large intermediary join
but also because of the large number of tuples being materialised at the
end. The culprit in this case turns out to be this bit of `charSet`:
```
not exists(int mid | this.nonEscapedCharAt(mid) = "]" | mid > inner_start and mid < inner_end)
```
Rewriting this to instead look for the minimum index at which a `]`
appears resulted in a much nicer join.
I also fixed up a similar issue surrounding the `\N` unicode escape.
Not that I think this will necessarily be relevant, but the `min`-based
solution is more robust either way.
2022-02-03 20:42:04 +00:00
Robert Marsh
8544cff1c4
Merge pull request #7836 from geoffw0/clrtxt9
...
C++: Fix more FPs in cpp/cleartext-transmission
2022-02-03 15:18:55 -05:00
Chuan-kai Lin
c8bc5cfa75
Merge pull request #7825 from github/cklin/python-downgrade-scripts
...
Python: adjust downgrade script location and format
2022-02-03 11:40:07 -08:00
Michael Nebel
32756cd442
C#: Update stats after the change in the attributes relation.
2022-02-03 20:00:33 +01:00
Robert Marsh
55cbff7614
C++: fix for constructor init without constructor
2022-02-03 13:44:02 -05:00
Harry Maclean
912842623d
Simplify cache key
2022-02-04 07:41:29 +13:00
Robert Marsh
836c47abb3
C++: test for constructor init without constructor
2022-02-03 13:34:05 -05:00
Geoffrey White
8031c3f699
Merge branch 'main' into clrtxt9
2022-02-03 17:01:59 +00:00
Geoffrey White
02b1774d7f
C++: Switch from GVN to localFlow.
2022-02-03 16:00:26 +00:00
Tom Hvitved
ef227a4721
Merge pull request #7784 from hvitved/csharp/dotnet6
...
C#: Use .NET 6
2022-02-03 16:42:26 +01:00
Geoffrey White
3cfd1b5052
C++: More test cases.
2022-02-03 15:11:59 +00:00
Rasmus Wriedt Larsen
8386b36217
Python: Apply suggestions from code review
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-02-03 15:00:04 +01:00
Geoffrey White
3b844f701e
C++:Change note.
2022-02-03 13:58:38 +00:00
Rasmus Wriedt Larsen
5cd08b8e8c
Python: Ignore .isAbsent() from ClassCall
...
This means that DataFlowCall is only for resolvable calls, which might not seem
like a big thing in itself, but enables the next commit to actually work :P
2022-02-03 14:58:30 +01:00
Rasmus Wriedt Larsen
a5c2341204
Python: Add simple test of DataFlowCall
...
Notice the strange thing with treating `mypkg.foo(42)` as a ClassCall,
but completely ignoring `mypkg.subpkg.bar(43)` -- due to having the two
`ClassValue`s:
- `Missing module attribute mypkg.foo`
- `Missing module attribute mypkg.subpkg`
But not `Missing module attribute mypkg.subpkg` with the current import
structure.
2022-02-03 14:58:30 +01:00
Rasmus Wriedt Larsen
48aa07d67a
Python: Handle SyntheticPreUpdateNode in PrintNode
2022-02-03 14:58:30 +01:00
Rasmus Wriedt Larsen
49b5d60229
Python: Use AttrRead/AttrWrite for attr read/store steps
...
Note that this doesn't actually add the desired flow from setattr, due
to missing post-update note. This will be fixed in later commit.
2022-02-03 14:58:30 +01:00
Rasmus Wriedt Larsen
5774459dfb
Python: restrict AttrRead with AttrNode.isLoad()
2022-02-03 14:58:23 +01:00
Rasmus Wriedt Larsen
cf68148316
Python: Add change-note
2022-02-03 14:29:02 +01:00
Rasmus Wriedt Larsen
e2de0e61ca
Python: Remove RegExpTerm from PrintAST
...
Since this caused bad performance (as we had to evaluate points-to).
Fixes https://github.com/github/codeql/issues/6964
This approach was motivated by the comment on the issue from @tausbn:
> We discussed this internally in the CodeQL Python team, and have
> agreed that the best approach for now is to disable the printing of
> regex ASTs.
I tried to keep our RegExpTerm logic, but doing the fix below did not
work, and still evaluated RegExpTerm :| I guess we will just have to
revert this PR if we want it back
```diff
TRegExpTermNode(RegExpTerm term) {
+ none() and
exists(StrConst str | term.getRootTerm() = getParsedRegExp(str) and shouldPrint(str, _))
}
```
2022-02-03 14:22:14 +01:00
Arthur Baars
6525035f0a
Address comments
2022-02-03 13:47:03 +01:00
Erik Krogh Kristensen
e93c46ad31
Merge pull request #7811 from erik-krogh/pyApiIpa
...
Python: refactor API-graph labels to an IPA type
2022-02-03 12:31:39 +01:00
Mathias Vorreiter Pedersen
58993e2dc6
C++: Fix re-evaluation by importing GVN.
2022-02-03 11:16:14 +00:00
Jeroen Ketema
0b9b6d7b98
Address review comments
2022-02-03 12:09:18 +01:00
Erik Krogh Kristensen
5284bbb6b3
Merge pull request #7821 from erik-krogh/upload-sarif
...
QL: upload sarif as part of the QL-for-QL workflow
2022-02-03 12:05:51 +01:00
Jeroen Ketema
4d03082f16
Ensure that O_CREAT and O_TMPFILE are unique
2022-02-03 11:24:20 +01:00
Henry Mercer
224d7a7ce0
Merge pull request #7801 from github/henrymercer/js-atm-migrate-tests
...
JS: Migrate CodeQL tests for ML-powered queries
2022-02-03 10:17:19 +00:00
Ian Wright
dca03d7b5d
reinstate the AST node limit to minimize change to feature values
2022-02-03 09:45:35 +00:00
Ian Wright
d5ab119039
actually count the number of chars
2022-02-03 09:41:51 +00:00
Jeroen Ketema
e1ca5dd120
Simplify text in change note
2022-02-03 10:36:30 +01:00
Naman Jain
9809d30f00
file renaming and updated expected file
2022-02-03 09:35:17 +00:00
Naman Jain
adc8bf37fe
fixed mistake in examples
2022-02-03 09:29:42 +00:00
Jeroen Ketema
5a2ce225f4
Check that all bits are set when checking for a flag
...
The `O_...` macro definitions somtimes set multiple bits, while
the bits individually represent the values of different `O_...`
macros. This lead to false postives on codebases built against
Musl libc, which defines `O_TMPFILE` as `020200000` and
`O_DIRECTORY` as `0200000`.
2022-02-03 10:29:13 +01:00
Tony Torralba
3c9b332ce0
Merge pull request #7826 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-02-03 09:38:53 +01:00
Tom Hvitved
6bb71f051b
Merge pull request #7791 from hvitved/dataflow/inline-local-flow-star
...
Data flow: Inline `local(Expr|Instruction)?(Flow|Taint)`
2022-02-03 09:02:43 +01:00
Harry Maclean
c65ca8ff86
Model calls to constantize as code executions
...
`constantize` is an ActiveSupport extension to `String` that attempts to
look up a constant with a name matching the receiver.
2022-02-03 15:22:07 +13:00
github-actions[bot]
2a9f98cce0
Add changed framework coverage reports
2022-02-03 00:10:33 +00:00
Harry Maclean
704b58519f
Ruby: Include subclasses in more API calls
...
Change the behaviour of `API::getInstance()` and `API::getReturn()` to
include results on subclasses of the current API node.
2022-02-03 11:35:59 +13:00
Chuan-kai Lin
df91ee6616
Python: adjust downgrade script location and format
2022-02-02 14:23:21 -08:00
Harry Maclean
61cd05cfc5
Ruby: Ensure TRoute and TRouteBlock are private
2022-02-03 10:55:28 +13:00
Harry Maclean
80835a5a19
Ruby: Don't expose abstract class
...
Make ActionDispatch::Route into a private class
ActionDispatch::RouteImpl, defining a new class Route which exposes the
necessary public API from RouteImpl.
Also rename getHTTPMethod to getHttpMethod.
2022-02-03 10:41:30 +13:00
Harry Maclean
a8a7c156d0
via - update tests
2022-02-03 10:40:23 +13:00
Erik Krogh Kristensen
7ef051456a
upload sarif as part of the QL-for-QL workflow
2022-02-02 20:32:22 +01:00
Tom Hvitved
7b5699d058
C#: Update CIL attributes test
2022-02-02 19:25:30 +01:00
Tom Hvitved
2fe65128a0
C#: Update CIL type annotations test
2022-02-02 19:25:30 +01:00
Tom Hvitved
c4ad237a5c
C#: Update expected test output
2022-02-02 19:25:30 +01:00
Tom Hvitved
516bd9f77f
C#: Fix deprecation warnings
2022-02-02 19:25:30 +01:00
Tom Hvitved
09c5212ccc
C#: Account for explicit interface implementations in OperatorSymbol
2022-02-02 19:25:30 +01:00
Tom Hvitved
d7eeb1fec8
C#: Use .NET 6
2022-02-02 19:25:30 +01:00
Henry Mercer
2c17437092
JS: Run ML-powered queries tests on all PRs modifying relevant files
2022-02-02 18:11:25 +00:00
Henry Mercer
a586be956e
JS: Remove versions from packs we don't intend to publish
2022-02-02 18:10:57 +00:00
Geoffrey White
708da8cd62
C++: Increase the query precision to 'high'.
2022-02-02 18:03:25 +00:00
Arthur Baars
a22868ba27
Merge branch 'main' into ruby-3.1
2022-02-02 19:00:03 +01:00
Geoffrey White
4048ba0a1c
C++: Fix false positives around terminal output.
2022-02-02 17:59:28 +00:00
Geoffrey White
39a2ffd438
C++: Fix false positives around 'stdin'.
2022-02-02 17:39:14 +00:00
Arthur Baars
6acf49d4da
Merge pull request #7814 from aibaars/fix-ql-alerts
...
Ruby: fix all QL-QL alerts
2022-02-02 18:25:38 +01:00
Jeroen Ketema
aa4651312e
Fix naming conflicts in cpp/world-writable-file-creation
2022-02-02 17:36:14 +01:00
Jeroen Ketema
f32500306a
Address review comments
2022-02-02 17:24:55 +01:00
Geoffrey White
cc20969bdd
C++: Add test cases based on some remaining real world FPs.
2022-02-02 16:15:59 +00:00
Tony Torralba
4f13bf8941
Merge pull request #6492 from atorralba/atorralba/android-cleartext-storage-database
...
Java: Create new query Cleartext storage of sensitive information in Android databases
2022-02-02 16:23:05 +01:00
Tony Torralba
54e8ea56e8
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-02-02 15:44:26 +01:00
Jeroen Ketema
0773ab37a5
Use matches to check for 0x prefix
2022-02-02 15:26:46 +01:00
Jeroen Ketema
92d9e51d2a
Extract the value of O_CREAT and O_TMPFILE from the defining macro
...
There are operating systems that define `O_CREAT` with a different
value than Linux, which uses `0x40`. For example, OpenBSD uses `0x0200`.
Hence, we cannot use a hardcoded value.
Also handle `O_TMPFILE` while here.
2022-02-02 15:16:26 +01:00
Mathias Vorreiter Pedersen
1aa32b09be
Merge pull request #7802 from geoffw0/clrtxt8
...
C++: Recognize password struct fields.
2022-02-02 14:10:40 +00:00
Naman Jain
aea7054938
modified query and added tests
2022-02-02 19:39:08 +05:30
Henry Mercer
7018f6ad40
JS: Add missing @id for endpoint types query
2022-02-02 13:15:15 +00:00
Henry Mercer
e6745dc63a
JS: Add Action to run tests for ML-powered queries
2022-02-02 13:15:12 +00:00
Henry Mercer
422919b9d0
JS: Add generated files to .gitattributes
2022-02-02 13:15:04 +00:00
Henry Mercer
fbcb8d6857
JS: Migrate CodeQL tests for ML-powered queries
2022-02-02 13:15:04 +00:00
Arthur Baars
3b05cb621c
Address comment
2022-02-02 14:11:45 +01:00
Arthur Baars
33b97f3e0c
Update synchronized files
2022-02-02 13:30:45 +01:00
Arthur Baars
fdcef6225b
Ruby: fix QL warnings
2022-02-02 13:29:09 +01:00
CodeQL CI
7bb11b837c
Merge pull request #7788 from yoff/python/remove-library-annotation
...
Approved by tausbn
2022-02-02 03:51:00 -08:00
Rasmus Wriedt Larsen
fb6b8eb394
Python: Add simple test of AttrRead/AttrWrite
2022-02-02 11:19:35 +01:00
Rasmus Wriedt Larsen
51bc6dcf7e
Python: Add attributeClearStep
2022-02-02 11:19:35 +01:00
Rasmus Wriedt Larsen
d2b72a7547
Python: Expand fieldflow tests
2022-02-02 11:19:31 +01:00
Tom Hvitved
712418e5f8
Merge pull request #7781 from hvitved/dataflow/summary-stack-bottom-less-nonlinear
...
Data flow: Reduce non-linear recursion in `SummaryComponentStack::bottom`
2022-02-02 10:35:53 +01:00
Benjamin Muskalla
d4c4e75bac
Merge pull request #7268 from bmuskalla/modelDiffAction
...
Java: Produce diffs for model generator changes
2022-02-02 10:30:45 +01:00
Jeroen Ketema
bd859d99bf
Address review comments
2022-02-02 10:09:47 +01:00
Jeroen Ketema
5b8f56dcc6
Add change notes
2022-02-02 10:07:38 +01:00
Michael Nebel
860ded2806
C#: Added change note for return value attributes.
2022-02-02 09:59:09 +01:00
Michael Nebel
62d987f31f
C#: Add upgrade and downgrade scripts.
2022-02-02 09:53:29 +01:00
Rasmus Lerchedahl Petersen
4ad99d9299
python: add missing QlDoc
2022-02-02 09:14:21 +01:00
Rasmus Lerchedahl Petersen
448e0785c2
python: logging.root is not a call
2022-02-02 09:04:16 +01:00
Harry Maclean
5adcdf1cf8
Ruby: Minor refactor
2022-02-02 17:32:11 +13:00
Harry Maclean
8f5380122a
Ruby: Cache ActionDispatch IPA types
2022-02-02 17:31:47 +13:00
Harry Maclean
749dc092ae
Ruby: Attempt to mitigate potential bad join
...
By joining simultaneously on controller class and name.
2022-02-02 17:03:46 +13:00
Harry Maclean
a38bc9fe89
Ruby Fix handling of via: in ActionDispatch
2022-02-02 17:03:27 +13:00
Harry Maclean
856c3d332c
Minor cleanup to ActionDispatch modelling
...
`x.isStringOrSymbol(result)` is slightly terser than
`result = x.getStringOrSymbol()`.
2022-02-02 16:26:20 +13:00
Harry Maclean
47823b5a9a
Handle via: :all in Rails routes
...
ActionDispatch modelling now understands that
match "/foo", to: "foo#bar", via: :all
is equivalent to
match "/foo",
to: "foo#bar",
via: [:get, :post, :put, :patch, :delete]
2022-02-02 16:26:20 +13:00
Harry Maclean
8bdc05ddaf
getValueText -> getConstantValue
2022-02-02 16:26:20 +13:00
Harry Maclean
417287153b
Ruby: QL style fixes
2022-02-02 16:26:20 +13:00
Harry Maclean
e975f92091
Ruby: remove unused predicate
2022-02-02 16:26:20 +13:00
Harry Maclean
3786fbfc7d
Ruby: Rewrite ActionDispatch::underscore
...
This version is much shorter and hopefully performs a bit better.
2022-02-02 16:26:20 +13:00
Harry Maclean
eff2136f52
Ruby: remove unused predicate
2022-02-02 16:26:20 +13:00
Harry Maclean
dead7a8059
Ruby: Make most of ActionDispatch private
...
Any classes/predicates not used externally or in tests are now private.
Also fix some typos.
2022-02-02 16:26:20 +13:00
Harry Maclean
fa28e55645
Add a test for ActionDispatch::underscore
...
This shows how the predicate behaves, as well as a case where it goes
wrong.
2022-02-02 16:26:20 +13:00
Harry Maclean
9c67869875
Remove ActionDispatch::capitalize
...
This predicate isn't used.
2022-02-02 16:26:20 +13:00
Harry Maclean
ad71fdbb24
Add missing documentation to ActionDispatch::Route
2022-02-02 16:26:20 +13:00
Harry Maclean
1766916fc5
Ruby: Document ActionDispatch modelling
2022-02-02 16:26:20 +13:00
Harry Maclean
314683d5fb
Ruby: Improve UrlRedirect query using Rails routes
...
Handlers for non-GET requests aren't vulnerable to URL redirect attacks,
because browsers won't initiate non-GET requests when you click a link.
We can use Rails routing information, if present, to filter out any
handlers for non-GET requests.
2022-02-02 16:26:20 +13:00
Harry Maclean
751d8a7f59
Ruby: Document getACapture
2022-02-02 16:26:20 +13:00
Harry Maclean
870c6d7412
Ruby: Rails route resolution
...
Add `Route` classes which model Rails routing information, typically
defined in a `routes.rb` file. We extract only the most basic
information: HTTP method, path, controller and action. This is enough to
determine whether a given controller method is a route handler, and what
HTTP method it handles, which is useful for, among other things, the URL
redirect query.
2022-02-02 16:26:19 +13:00
Henry Mercer
e622e517d9
Merge pull request #7800 from github/henrymercer/js-atm-add-model-building-pack
...
JS: Add model building pack for ML-powered queries
2022-02-01 20:51:19 +00:00
Harry Maclean
ce0354acb3
Include rust-toolchain.toml in Ruby cache keys
...
This ensures that if we change our Rust version, the caches will be
invalidated.
2022-02-02 08:08:11 +13:00
Harry Maclean
9c32ab7122
rust-toolchain -> rust-toolchain.toml
2022-02-02 08:05:46 +13:00
Harry Maclean
613ecbb418
Ruby: Pin Rust to 1.54
...
Add a rust-toolchain file to the Ruby directory, which instructs Rustup
to install a specific version of Rust (1.54). This will be used in CI,
so any use of language features or dependencies that don't support 1.54
will result in a CI failure.
This should ensure we have a documented minimum supported rust version
and an easy to way to update it in the future (update the rust-toolchain
file).
2022-02-02 08:05:46 +13:00
Geoffrey White
d864af3622
C++: Change note.
2022-02-01 19:00:40 +00:00
Harry Maclean
fb00a6c61b
Merge pull request #7666 from github/hmac/file-open-access
...
Ruby: Add File.open as a FileSystemAccess
2022-02-02 07:32:16 +13:00
liangjinhuang
1dd15fa235
style:auto format
2022-02-02 01:30:54 +08:00
liangjinhuang
976e484c57
style:move all source files under src/experimental & feat:modify source regular matching rules
2022-02-02 01:14:51 +08:00
Henry Mercer
14601316a5
JS: Autoformat
2022-02-01 17:08:21 +00:00
Rasmus Wriedt Larsen
f6215f2300
Python: Refactor field-flow test
2022-02-01 17:59:03 +01:00
Rasmus Wriedt Larsen
cc4fe38fbd
Python: Delete dedicated argumentRouting<N> tests
...
I feel like they don't bring any value anymore, since we have the nice
inline expectation tests. If I'm wrong, happy to revert this commit
though.
2022-02-01 17:51:33 +01:00
Rasmus Wriedt Larsen
54f53c828e
Python: Refactor argumentRoutingTest.ql to be more generic
...
I checked to see that the tests still works. If I deleted the `arg5`
annotation, it got failures:
```diff
diff --git a/python/ql/test/experimental/dataflow/coverage/argumentPassing.py b/python/ql/test/experimental/dataflow/coverage/argumentPassing.py
index e218bdde9b..71816c1e01 100644
--- a/python/ql/test/experimental/dataflow/coverage/argumentPassing.py
+++ b/python/ql/test/experimental/dataflow/coverage/argumentPassing.py
@@ -46,7 +46,7 @@ def argument_passing(
c,
d=arg4, #$ arg4 func=argument_passing
*,
- e=arg5, #$ arg5 func=argument_passing
+ e=arg5,
f,
**g,
):
diff --git a/python/ql/test/experimental/dataflow/coverage/argumentRoutingTest.expected b/python/ql/test/experimental/dataflow/coverage/argumentRoutingTest.expected
index e69de29bb2..22037a40c3 100644
--- a/python/ql/test/experimental/dataflow/coverage/argumentRoutingTest.expected
+++ b/python/ql/test/experimental/dataflow/coverage/argumentRoutingTest.expected
@@ -0,0 +1,2 @@
+| argumentPassing.py:49:7:49:10 | ControlFlowNode for arg5 | Unexpected result: arg5= |
+| argumentPassing.py:49:7:49:10 | ControlFlowNode for arg5 | Unexpected result: func=argument_passing |
```
2022-02-01 17:50:06 +01:00
Rasmus Wriedt Larsen
76f3d74fed
Python: Remove extra whitespace from argumentPassing.py
2022-02-01 17:48:16 +01:00
Rasmus Wriedt Larsen
5ee755db09
Python: Require MISSING: flow annotations for normal data-flow tests
...
I had to rewrite the SINK1-SINK7 definitions, since this new requirement
complained that we had to add this `MISSING: flow` annotation :D
Doing this implementation also revealed that there was a bug, since I
did not compare files when checking for these `MISSING:` annotations. So
fixed that up in the implementation for inline taint tests as well.
(extra whitespace in argumentPassing.py to avoid changing line numbers
for other tests)
2022-02-01 17:46:53 +01:00
Erik Krogh Kristensen
e06f6529f1
refactor API-graph labels to an IPA type
2022-02-01 17:32:08 +01:00
Rasmus Wriedt Larsen
2bc4a60496
Python: Unify normal dataflow test setup
...
I went with NormalDataflowTest to signify that if you don't know what
you're looking for, this is probably the one. I did not want to just
call it DataflowTest, since that becomes a big vague when there are also
`FlowTest.qll` and `MaximalFlowTest.qll` -- I'm open to renaming this
though 👍
2022-02-01 17:31:31 +01:00
Rasmus Wriedt Larsen
41319607a9
Python: Use InlineExpectationsTest for field-flow tests
...
I deleted the old tests, so it's very clear what tests to look for
2022-02-01 17:31:31 +01:00
Rasmus Wriedt Larsen
d6f415bae2
Python: Run match tests if Python 3.10 or newer
...
Also fixes a bug in the tests
2022-02-01 17:31:31 +01:00
liangjinhuang
1885b683f7
style:formatDocument
2022-02-02 00:21:26 +08:00
liangjinhuang
af2e8ff8c6
feat:modify source regular matching rules
2022-02-02 00:10:15 +08:00
Henry Mercer
368839edfc
JS: Fix QLDoc style in ExtractMisclassifiedEndpointFeatures.ql
2022-02-01 15:39:15 +00:00
Arthur Baars
ea901adb3c
Merge pull request #7799 from github/aibaars/fix-ruby-workflows
...
Ruby: use ruby specific cache key
2022-02-01 16:28:14 +01:00
Henry Mercer
db0b4fc463
JS: Add model building pack for ML-powered queries
...
Tests are currently still internal. They will be migrated to
`github/codeql` in a subsequent PR.
2022-02-01 15:03:26 +00:00
Arthur Baars
73d60550ce
QL-QL: fix cache keys
2022-02-01 15:57:59 +01:00
Erik Krogh Kristensen
0f85a52f09
Merge pull request #7773 from erik-krogh/CWE-367
...
JS: add a js/file-system-race query
2022-02-01 15:36:13 +01:00
Rasmus Wriedt Larsen
a4bb0cc5d8
Python: Run tests for fieldflow/test.py
2022-02-01 15:32:07 +01:00
Rasmus Wriedt Larsen
1390f034f3
Python: Delete duplicated tests
...
All the same tests are present in `fieldflow/test.py`
2022-02-01 15:31:30 +01:00
Arthur Baars
6451a71a78
Ruby: use ruby specific cache key
2022-02-01 15:18:09 +01:00
Rasmus Wriedt Larsen
1394b38032
Python: Improve customSanitizer tests
...
Before we didn't show how we treated the value _after_ the check. But we
do actually handle this nicely 💪
2022-02-01 15:09:29 +01:00
Mathias Vorreiter Pedersen
3597d80340
Merge pull request #7787 from Yonah125/main
...
C/C++ : Useless test
2022-02-01 14:01:27 +00:00
Jeroen Ketema
ff1c971100
Add query for missing mode argument in open/openat calls
2022-02-01 14:52:22 +01:00
Rasmus Lerchedahl Petersen
1e2428cb6b
python: create LDAP module in Concepts
2022-02-01 14:39:58 +01:00
Nick Rolfe
5828a61fec
Merge pull request #7795 from github/nickrolfe/graph_test_edge_ordering
...
Ruby/C#: add semmle.order attribute to edges in CFG tests
2022-02-01 13:36:15 +00:00
Rasmus Lerchedahl Petersen
c2cd58edc4
python: rewrite to separate configurations
...
source nodes get duplicated, so perhaps flow states
are actually better for performance?
2022-02-01 14:36:11 +01:00
Erik Krogh Kristensen
a51f892a99
move dot in qhelp
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-02-01 14:34:30 +01:00
Michael Nebel
2c6e35f55e
C#: Add more attribute testcases.
2022-02-01 14:06:45 +01:00
Rasmus Lerchedahl Petersen
7df5c70c6f
python: update frameworks.rst
2022-02-01 13:54:34 +01:00
Rasmus Lerchedahl Petersen
bec8c0daea
python: update change note
2022-02-01 13:39:03 +01:00
Rasmus Lerchedahl Petersen
c587084758
python: use standard InstanceSource construction
2022-02-01 13:31:16 +01:00
Michael Nebel
31a70a17a4
C#: Add attribute tests for delegate types.
2022-02-01 13:29:26 +01:00
Michael Nebel
8ee27be908
C#: Small change in the attribute elements test. We now require that the attribute should be in source code and not the attributable.
2022-02-01 13:29:26 +01:00
Michael Nebel
7d1d2e792c
C#: Add specialized ql classes for each attribute kind and update AST printing.
2022-02-01 13:29:26 +01:00
Michael Nebel
5a6667efc5
C#: Update attribute test cases.
2022-02-01 13:29:26 +01:00
Michael Nebel
c94cdfa79a
C#: Update the extractor to include the kind of the extracted attributes. Furthermore, include method return attributes.
2022-02-01 13:29:26 +01:00
Michael Nebel
e86ac73628
C#: Add attribute kind to the dbscheme for the attribute relation.
2022-02-01 13:29:26 +01:00
Erik Krogh Kristensen
e6c90670e6
Merge pull request #7740 from erik-krogh/CWE-347
...
JS: promote the js/jwt-missing-verification query out of experimental
2022-02-01 13:10:35 +01:00
museljh
012434b152
Update python/ql/src/experimental/Security/CWE-338/InsecureRandomness.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 19:00:06 +08:00
museljh
a6002186bd
Update python/ql/src/experimental/Security/CWE-338/InsecureRandomness.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 18:59:12 +08:00
Jeroen Ketema
dbac927721
Take into account that the 4th argument of openat may be omitted
...
This matches what is done for `open`.
2022-02-01 11:41:07 +01:00
Rasmus Wriedt Larsen
f7a0b17ed6
Merge pull request #7687 from yoff/python/PathInjection-FlowState
...
python: Rewrite path injection query to use flow state
2022-02-01 11:33:37 +01:00
yoff
b120721942
Update python/ql/src/Security/CWE-090/LdapInjection.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 11:02:47 +01:00
Rasmus Lerchedahl Petersen
119a7e4f34
python: provide links for Flask
2022-02-01 10:55:45 +01:00
Rasmus Lerchedahl Petersen
ecea392a08
python: rewrite qhelp overview
...
(combining the Java version and the JS version)
2022-02-01 10:47:18 +01:00
Rasmus Lerchedahl Petersen
26befebfc2
python: drop precision and add severity score
...
Given both the original FP score and our concerns
regarding sanitizers, `@precision medium`, which
is aligned with other languages, feels appropriate.
2022-02-01 10:34:36 +01:00
Rasmus Lerchedahl Petersen
7511b33512
python: "command" -> "log"
2022-02-01 10:23:16 +01:00
yoff
45f0bfd8f0
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 10:06:37 +01:00
yoff
c03f89d712
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 10:04:26 +01:00
Mathias Vorreiter Pedersen
a59a9ba82b
C++: Autoformat.
2022-02-01 08:28:53 +00:00
yoff
8df04c58e9
Merge pull request #7793 from tausbn/python-fix-bad-TPythonTuple-join-order
...
Python: Fix bad join order in `TPythonTuple`
2022-01-31 22:39:58 +01:00
Harry Maclean
e5b7478028
Merge pull request #7780 from github/hmac/split-tests
...
Ruby: Split up CI jobs
2022-02-01 09:10:01 +13:00
Nick Rolfe
990e07b986
Ruby/C#: add semmle.order attribute to edges in CFG tests
2022-01-31 20:08:24 +00:00
BACK Yonah
46c1744204
C/C++: getFullyConverted replaced by getConversion*
2022-01-31 18:51:18 +01:00
Taus
4a29095e3b
Python: Fix bad join order in TPythonTuple
...
TL;DR: Something introduced the following bad join order:
```
(227s) Tuple counts for dom#TObject::TPythonTuple#ff/2@i2#8f58670w after 3m46s:
25000 ~0% {2} r1 = SCAN PointsToContext::PointsToContext::appliesToScope_dispred#ff#prev_delta OUTPUT In.1, In.0 'context'
24000 ~1% {2} r2 = JOIN r1 WITH @py_scope#f ON FIRST 1 OUTPUT Lhs.1 'context', Lhs.0
1076876712 ~6% {3} r3 = JOIN r2 WITH Flow::TupleNode#class#f CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0 'context', Lhs.1
870129666 ~0% {3} r4 = JOIN r3 WITH Flow::ControlFlowNode::isLoad_dispred#f ON FIRST 1 OUTPUT Lhs.1 'context', Lhs.2, Lhs.0 'origin'
870129000 ~0% {3} r5 = r4 AND NOT dom#TObject::TPythonTuple#ff#prev(Lhs.2 'origin', Lhs.0 'context')
870129000 ~1% {3} r6 = SCAN r5 OUTPUT In.2 'origin', In.1, In.0 'context'
9000 ~0% {2} r7 = JOIN r6 WITH Flow::ControlFlowNode::getScope_dispred#ff ON FIRST 2 OUTPUT Lhs.0 'origin', Lhs.2 'context'
return r7
```
(...the above being the tuple counts _at the point when I cancelled the
query_!)
Rewriting the code to force a join between `TupleNode#class` and
`getScope` results in the following join orders:
```
(0s) Tuple counts for TObject::scope_loads_tuplenode#ff/2@b3cf0bo5 after 13ms:
37369 ~3% {1} r1 = JOIN Flow::TupleNode#class#f WITH Flow::ControlFlowNode::isLoad_dispred#f ON FIRST 1 OUTPUT Lhs.0 'origin'
37369 ~3% {2} r2 = JOIN r1 WITH Flow::ControlFlowNode::getScope_dispred#ff ON FIRST 1 OUTPUT Rhs.1 's', Lhs.0 'origin'
return r2
```
and
```
(78s) Tuple counts for dom#TObject::TPythonTuple#ff/2@i53#121c440w after 6ms:
34736 ~3% {2} r1 = SCAN PointsToContext::PointsToContext::appliesToScope_dispred#ff#prev_delta OUTPUT In.1, In.0 'context'
7370 ~5% {2} r2 = JOIN r1 WITH TObject::scope_loads_tuplenode#ff ON FIRST 1 OUTPUT Lhs.1 'context', Rhs.1 'origin'
7370 ~5% {2} r3 = r2 AND NOT dom#TObject::TPythonTuple#ff#prev(Lhs.1 'origin', Lhs.0 'context')
7370 ~1% {2} r4 = SCAN r3 OUTPUT In.1 'origin', In.0 'context'
return r4
```
the latter being the largest iteration of `dom#TPythonTuple` throughout
the log.
No other major performance issues were observed.
2022-01-31 16:59:50 +00:00
jorgectf
080775c873
Merge branch 'jorgectf/python/deserialization' of https://github.com/jorgectf/codeql into jorgectf/python/deserialization
2022-01-31 17:48:47 +01:00
Jorge
a1f8acc9bb
Merge branch 'github:main' into jorgectf/python/deserialization
2022-01-31 17:48:35 +01:00
BACK Yonah
56941dba6b
C/C++ : Fixed select issue in Useless Test
2022-01-31 16:56:12 +01:00
BACK Yonah
ca2ff6f9fb
C/C++: Fixing minor issues in Useless Test query
2022-01-31 16:04:56 +01:00
Tom Hvitved
5503abc73d
Merge pull request #7772 from hvitved/csharp/event-accessor-event-null
...
C#: Guard against `AssociatedSymbol` not being an `IEventSymbol`
2022-01-31 14:52:02 +01:00
Tom Hvitved
f2352d8272
Data flow: Inline local(Expr|Instruction)?(Flow|Taint)
...
Computing a full transitive closure is often bad; by inlining all calls we are
providing more context to the QL optimizer.
2022-01-31 14:33:41 +01:00
Ian Wright
83ecc065ab
restrict size of strings
2022-01-31 12:28:46 +00:00
Michael Nebel
56ac99039f
Merge pull request #7720 from michaelnebel/csharp/extended-prop-patterns
...
C#: Desugar property patterns that uses member access syntax.
2022-01-31 13:24:24 +01:00
Erik Krogh Kristensen
8dcec2e037
apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-31 13:17:26 +01:00
Erik Krogh Kristensen
ec1a8cc826
apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-31 12:32:12 +01:00
Tom Hvitved
2354281721
C#: Add DB down/upgrade scripts
2022-01-31 11:46:10 +01:00
Tom Hvitved
32e58add7b
C#: Extend compiler_generated to include event accessors
2022-01-31 11:45:23 +01:00
Rasmus Lerchedahl Petersen
9d416664a1
python: modern change note
...
I set the category to newQuery since that is what users will see.
When we have tags, it would be nice to tag it as a query promotion.
2022-01-31 11:27:55 +01:00
Rasmus Lerchedahl Petersen
bf1145ece0
python: Add change note
...
should we have the `lgtm,codescanning` handshake or not?
2022-01-31 11:27:55 +01:00
Rasmus Lerchedahl Petersen
8b5114d10e
python: Add standard customization setup
...
- modernize the sanitizer, but do not make it less specific
2022-01-31 11:27:55 +01:00
Rasmus Lerchedahl Petersen
20d54543fd
python: move log injection out of experimental
...
- move from custom concept `LogOutput` to standard concept `Logging`
- remove `Log.qll` from experimental frameworks
- fold models into standard models (naively for now)
- stdlib:
- make Logger module public
- broaden definition of instance
- add `extra` keyword as possible source
- flak: add app.logger as logger instance
- django: `add django.utils.log.request_logger` as logger instance
(should we add the rest?)
- remove LogOutput from experimental concepts
2022-01-31 11:27:55 +01:00
Rasmus Lerchedahl Petersen
211345c010
python: remove more annotations
2022-01-31 11:20:59 +01:00
Michael Nebel
7cbeffc8a7
C#: Refactor and use new language features.
2022-01-31 09:24:31 +01:00
Rasmus Lerchedahl Petersen
cac3862659
python: remove library annotation
...
to clean up QL warnings.
Should put these in a private module instead?
2022-01-31 08:50:37 +01:00
Rasmus Lerchedahl Petersen
0c3bce1415
python: deprecation
...
I am slightly concerned that the test now generates many more
intermediate results. I suppose that maes the analysis heavy.
Should the new library get a new name instead, so the old code
does not get evaluated?
2022-01-31 08:32:24 +01:00
BACK Yonah
d7313f3a82
C/C++ : Useless test
2022-01-30 14:33:32 +01:00
Mathias Vorreiter Pedersen
bb2feda8fb
Merge pull request #7703 from geoffw0/getslocal
2022-01-28 19:35:15 +00:00
Geoffrey White
8a1b49f816
C++: Recognize password struct fields.
2022-01-28 19:10:46 +00:00
Arthur Baars
abf3ce6223
Ruby: expressions in pin operator ^
2022-01-28 19:47:31 +01:00
Arthur Baars
00fb4d3776
Ruby: Values in Hash literals and keyword arguments can be omitted
2022-01-28 19:47:31 +01:00
Arthur Baars
3e2ca61c01
Ruby: support anonymous block parameters/arguments
2022-01-28 19:47:31 +01:00
Arthur Baars
b9258e78ca
Ruby: non-local variables in variable reference pattern
2022-01-28 19:47:31 +01:00
Arthur Baars
966b8be5f9
Ruby: add downgrade scripts
2022-01-28 19:47:31 +01:00
Arthur Baars
e5eb01ca45
Ruby: add upgrade scripts
2022-01-28 19:47:31 +01:00
Arthur Baars
c85012460a
Ruby: update dbscheme stats
2022-01-28 19:47:31 +01:00
Arthur Baars
c6a36a50c2
Ruby: regenerate dbscheme and library
2022-01-28 19:47:31 +01:00
Arthur Baars
bfbc9fe144
Ruby: update tree-sitter-ruby
2022-01-28 19:47:25 +01:00
Alex Ford
57e958c372
Ruby: missing QLDoc
2022-01-28 17:38:55 +00:00
Alex Ford
269722fa86
Ruby: rb/clear-text-logging-sensitive-data changenote
2022-01-28 17:27:05 +00:00
Alex Ford
7fec2d270b
Ruby: QL format
2022-01-28 17:24:56 +00:00
Alex Ford
186623f878
Ruby: Add CleartextLogging.qhelp
2022-01-28 17:24:56 +00:00
Alex Ford
7ed447842f
Ruby: cleartext logging test output
2022-01-28 17:24:56 +00:00
Alex Ford
4fc9128350
Ruby: cleartext logging - remove an unnecessary abstract class
2022-01-28 17:24:56 +00:00
Alex Ford
91ccd307e8
Ruby: Implement rb/clear-text-logging-sensitive-data
2022-01-28 17:24:56 +00:00
Mathias Vorreiter Pedersen
0f239e315c
Merge pull request #7782 from geoffw0/clrtxt7
...
C++: Fix FPs for cpp/cleartext-storage-file
2022-01-28 17:24:05 +00:00
Geoffrey White
0396a84c3c
C++: Remove empty predicate / extends.
2022-01-28 17:11:38 +00:00
Alex Ford
cfb2d7ffaf
Ruby: add shared SensitiveDataHeuristics.qll
2022-01-28 16:38:58 +00:00
Geoffrey White
af09dd8af1
C++: Fixes to gets models.
2022-01-28 16:04:23 +00:00
Geoffrey White
036e1495b8
Merge branch 'main' into getslocal
2022-01-28 15:58:13 +00:00
Ian Wright
aceeb7324c
restrict AST nodes according to string length
2022-01-28 15:06:10 +00:00
Rasmus Lerchedahl Petersen
68d18ead34
python: add change note
2022-01-28 14:00:07 +01:00
Geoffrey White
a695f02af4
C++: Add change note.
2022-01-28 12:38:27 +00:00
Tom Hvitved
82cceb0a29
C#: Mark event accessors without bodies as compiler generated
2022-01-28 13:11:34 +01:00
Tom Hvitved
682163962a
Data flow: Sync files
2022-01-28 13:01:24 +01:00
Tom Hvitved
4bf07825a1
Data flow: Reduce non-linear recursion in SummaryComponentStack::bottom
...
Before:
```
[2022-01-28 09:45:34] (449s) Tuple counts for FlowSummaryImpl::Public::SummaryComponentStack::bottom_dispred#ff/2@i23#25a5eew4 after 432ms:
0 ~0% {2} r1 = SCAN FlowSummaryImpl::Public::SummaryComponentStack::length#ff#prev_delta OUTPUT In.0 'this', (In.1 - 1)
0 ~0% {2} r2 = JOIN r1 WITH FlowSummaryImpl::Public::SummaryComponentStack::drop#fff#prev ON FIRST 2 OUTPUT Rhs.2, Lhs.0 'this'
0 ~0% {2} r3 = JOIN r2 WITH FlowSummaryImpl::Public::SummaryComponentStack::head_dispred#ff#prev ON FIRST 1 OUTPUT Lhs.1 'this', Rhs.1 'result'
4171589 ~5% {2} r4 = SCAN FlowSummaryImpl::Public::SummaryComponentStack::length#ff#prev OUTPUT In.0 'this', (In.1 - 1)
4171589 ~0% {2} r5 = JOIN r4 WITH FlowSummaryImpl::Public::SummaryComponentStack::drop#fff#prev ON FIRST 2 OUTPUT Rhs.2, Lhs.0 'this'
0 ~0% {2} r6 = JOIN r5 WITH FlowSummaryImpl::Public::SummaryComponentStack::head_dispred#ff#prev_delta ON FIRST 1 OUTPUT Lhs.1 'this', Rhs.1 'result'
62238 ~0% {3} r7 = SCAN FlowSummaryImpl::Public::SummaryComponentStack::drop#fff#prev_delta OUTPUT In.2, In.0 'this', In.1
62238 ~8% {3} r8 = JOIN r7 WITH FlowSummaryImpl::Public::SummaryComponentStack::head_dispred#ff#prev ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.2, Rhs.1 'result'
62238 ~5% {5} r9 = JOIN r8 WITH FlowSummaryImpl::Public::SummaryComponentStack::length#ff#prev ON FIRST 1 OUTPUT Lhs.0 'this', Lhs.1, Lhs.2 'result', Rhs.1, (Rhs.1 - 1)
10373 ~6% {5} r10 = SELECT r9 ON In.4 = In.1
10373 ~0% {2} r11 = SCAN r10 OUTPUT In.0 'this', In.2 'result'
10373 ~0% {2} r12 = r6 UNION r11
10373 ~0% {2} r13 = r3 UNION r12
10373 ~0% {2} r14 = r13 AND NOT FlowSummaryImpl::Public::SummaryComponentStack::bottom_dispred#ff#prev(Lhs.0 'this', Lhs.1 'result')
return r14
```
After:
```
[2022-01-28 09:52:48] (6s) Tuple counts for FlowSummaryImpl::Public::SummaryComponentStack::bottom#ff/2@i21#6243afwv after 5ms:
0 ~0% {2} r1 = JOIN FlowSummaryImpl::Public::SummaryComponentStack::bottom#ff#prev_delta WITH FlowSummaryImpl::Private::TConsSummaryComponentStack#fff#reorder_1_0_2#prev ON FIRST 1 OUTPUT Lhs.1 'result', Rhs.2 'this'
10373 ~3% {2} r2 = SCAN FlowSummaryImpl::Private::TConsSummaryComponentStack#fff#prev_delta OUTPUT In.1, In.2 'this'
10373 ~2% {2} r3 = JOIN r2 WITH FlowSummaryImpl::Public::SummaryComponentStack::bottom#ff#prev ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.1 'this'
10373 ~2% {2} r4 = r1 UNION r3
10373 ~2% {2} r5 = r4 AND NOT FlowSummaryImpl::Public::SummaryComponentStack::bottom#ff#prev(Lhs.1 'this', Lhs.0 'result')
10373 ~0% {2} r6 = SCAN r5 OUTPUT In.1 'this', In.0 'result'
return r6
```
2022-01-28 13:00:04 +01:00
Geoffrey White
b73dc98191
C++: Exclude write to stdout etc.
2022-01-28 11:57:31 +00:00
Tom Hvitved
864b61a804
Merge pull request #7766 from hvitved/csharp/extractor/type-param-constraints
...
C#: Make `TypeParameterConstraints` a `CachedEntity`
2022-01-28 12:39:31 +01:00
Tom Hvitved
28702dff82
Merge pull request #7779 from hvitved/csharp/initial-downgrade-scheme
...
C#: Add initial downgrade DB scheme for use in tests
2022-01-28 12:38:07 +01:00
Nick Rolfe
8248a942ce
Ruby: enable taint checking for array-flow test
2022-01-28 11:33:59 +00:00
Nick Rolfe
c0e1384f4a
Ruby: move Array/Enumerable flow summaries to their own file
2022-01-28 11:33:59 +00:00
Nick Rolfe
6c0eb8beee
Ruby: update array flow summaries to use getConstantValue()
2022-01-28 11:33:59 +00:00
Nick Rolfe
693ff6a904
Ruby: add flow summaries for remaining Array methods
2022-01-28 11:33:59 +00:00
Nick Rolfe
030cfa36da
Ruby: add flow summaries for all remaining Enumerable methods
2022-01-28 11:33:59 +00:00
Erik Krogh Kristensen
7b925604df
update expected output
2022-01-28 12:21:33 +01:00
Nick Rolfe
588e60e230
Merge pull request #7775 from github/nickrolfe/graph_test_ordering
...
Ruby/C#: more stable graph test ordering
2022-01-28 11:16:02 +00:00
Erik Krogh Kristensen
7aa59ca233
Merge pull request #7633 from erik-krogh/CWE-300
...
JS: add js/http-dependency query
2022-01-28 12:10:14 +01:00
Taus
47a57e0c0a
Merge pull request #7635 from github/python/support-match
...
Python/support match
2022-01-28 11:55:46 +01:00
yoff
74d57bbb1a
Update python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
...
Co-authored-by: Taus <tausbn@github.com >
2022-01-28 11:38:29 +01:00
Arthur Baars
cada7ef1a4
Ruby: add downgrade scripts to prepare-db-upgrade.sh
2022-01-28 11:07:56 +01:00
Rasmus Lerchedahl Petersen
ab43f041c3
python: rename files
2022-01-28 11:00:17 +01:00
Erik Krogh Kristensen
b5198bdaca
apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-28 10:46:27 +01:00
Erik Krogh Kristensen
bf9bcc9600
add a js/file-system-race query
2022-01-28 09:41:12 +01:00
Erik Krogh Kristensen
179c26da9a
apply suggestions from review
2022-01-28 09:37:46 +01:00
Tony Torralba
f3e034b2be
Merge pull request #7764 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-28 09:35:54 +01:00
Harry Maclean
0428b8ee20
Split Ruby CI into multiple parallel jobs
...
Run format, compile and db upgrade checks in parallel, along with the
main tests, which run in two parallel halves.
2022-01-28 21:23:34 +13:00
Rasmus Lerchedahl Petersen
4c3c4deb34
python: Move over query and tests
2022-01-28 09:19:11 +01:00
Esben Sparre Andreasen
ee52774e90
Merge pull request #7760 from erik-krogh/CWE-184
...
JS: add CWE-184 to incomplete-scheme-check and bad-tag-filter
2022-01-28 09:18:41 +01:00
Tom Hvitved
ee5495ce65
C#: Add initial downgrade DB scheme for use in tests
2022-01-28 09:05:42 +01:00
Rasmus Lerchedahl Petersen
a026120c52
Python: Move configuration over and refine it
...
The original configuration did not match sinks with sanitizers.
Here it is resolved using flow state,
it could also be done by using two configurations.
2022-01-28 09:00:40 +01:00
Rasmus Lerchedahl Petersen
d539920661
Python: Update list of frameworks
2022-01-28 08:58:30 +01:00
Harry Maclean
b01f81aab3
Use modified getAPath predicate for test
2022-01-28 19:45:52 +13:00
Harry Maclean
a1b0f02e6e
Ruby: Introduce API::getAnImmediateSubclass()
...
class A; end
class B < A; end
class C < B; end
In the example above, `getMember("A").getAnImmediateSubclass()` will
select only uses of B, whereas `getMember("A").getASubclass()` will
select uses of A, B and C. This is usually the behaviour you want.
2022-01-28 16:44:03 +13:00
github-actions[bot]
c6130ea2d4
Add changed framework coverage reports
2022-01-28 00:11:49 +00:00
Dave Bartolomeo
cca74e925f
Merge pull request #7724 from github/aeisenberg/examples-groups
...
Add new groups for examples packs
2022-01-27 12:11:26 -05:00
Rasmus Lerchedahl Petersen
c60df7d69c
Merge branch 'main' of github.com:github/codeql into python/support-match
2022-01-27 16:45:17 +01:00
yoff
4632c14280
Merge pull request #7654 from RasmusWL/remove-old-pointsto-queries
...
Python: Cleanup: Remove old points-to versions of queries
2022-01-27 16:39:01 +01:00
Nick Rolfe
cd5010fe11
C#: sync changes from Ruby to improve ordering of graph test output
2022-01-27 15:34:01 +00:00
Tom Hvitved
b7fb9e8b95
Merge pull request #7768 from hvitved/csharp/extractor-diagnostics-query
...
C#: Add internal extractor diagnostics query
2022-01-27 16:33:32 +01:00
Chris Smowton
17656fc12b
Merge pull request #7771 from Dig2/main
...
Fix typo in CodeQL-query-help-for-JavaScript
2022-01-27 15:03:35 +00:00
Mathias Vorreiter Pedersen
b3f4357dc8
Merge pull request #7742 from geoffw0/clrtxt6
...
C++: Upgrade cpp/cleartext-storage-buffer
2022-01-27 14:40:40 +00:00
Rasmus Lerchedahl Petersen
b93c04bb79
python: Add reverse flow in some patterns
...
Particularly in value and literal patterns.
This is getting a little bit into the guards aspect of matching.
We could similarly add reverse flow in terms of
sub-patterns storing to a sequence pattern,
a flow step from alternatives to an-or-pattern, etc..
It does not seem too likely that sources are embedded in patterns
to begin with, but for secrets perhaps?
It is illustrated by the literal test. The value test still fails.
I believe we miss flow in general from the static attribute.
2022-01-27 15:20:23 +01:00
Tom Hvitved
cdfe239016
C#: Guard against AssociatedSymbol not being an IEventSymbol
...
Apply same logic as for property/indexer accessors to account for cases where
the associated event cannot be determined. I have not been able to reproduce
such cases locally, though we have seen reports of it happening.
2022-01-27 15:14:03 +01:00
Nick Rolfe
6f06263d49
Ruby: add more properties for ordering nodes in graph tests
2022-01-27 13:57:43 +00:00
Dig2
516bed391a
Fix CodeQL-query-help-for-JavaScript typo
2022-01-27 21:33:20 +08:00
Benjamin Muskalla
5c9c83d331
Revert "Enable on my repo"
...
This reverts commit b9c3e6a052 .
2022-01-27 14:24:41 +01:00
Geoffrey White
2e1b09fd75
C++: Modernize flow sources.
2022-01-27 13:19:09 +00:00
Geoffrey White
47528dd8c0
C++: Autoformat.
2022-01-27 12:56:16 +00:00
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
Tom Hvitved
d9a1046e0e
Merge pull request #7683 from hvitved/ruby/qltest-4-threads
...
Ruby: Use multiple threads in QL test CI job
2022-01-27 13:11:39 +01:00
Benjamin Muskalla
39a853b5e4
Remove unused models
2022-01-27 12:27:37 +01:00
Benjamin Muskalla
1cfb088634
rely on defaults
2022-01-27 12:26:59 +01:00
Benjamin Muskalla
e5acc6b54b
use default sha for pr
2022-01-27 12:26:59 +01:00
Benjamin Muskalla
3646ae0995
Skip diff install if not needed
2022-01-27 12:26:58 +01:00
Geoffrey White
1bf9c19638
C++: Autoformat.
2022-01-27 11:26:18 +00:00
Geoffrey White
f090a3b440
C++: Add to and clarify some taint library QLDoc.
2022-01-27 11:26:00 +00:00
Benjamin Muskalla
10aa7a7982
Better name
2022-01-27 12:02:42 +01:00
Benjamin Muskalla
b9c3e6a052
Enable on my repo
2022-01-27 12:01:47 +01:00
Tom Hvitved
1e39259e26
Merge pull request #7750 from hvitved/ruby/desugar-hash-literals
...
Ruby: Desugar hash literals
2022-01-27 12:01:06 +01:00
Benjamin Muskalla
66b9974dd4
Simplify naming pattern
2022-01-27 12:00:29 +01:00
Geoffrey White
d9a2347178
C++: Switch back to IR taint.
2022-01-27 10:50:22 +00: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
Benjamin Muskalla
4aa0002e97
Rename workflow
2022-01-27 11:43:25 +01:00
github-actions[bot]
634134f283
Release preparation for version 2.8.0
2022-01-27 10:40:20 +00:00
Tom Hvitved
e2ae327a74
C#: Add internal extractor diagnostics query
2022-01-27 11:19:31 +01:00
Rasmus Lerchedahl Petersen
cb52ab669e
python: address review comments
...
The comment about `py_scopes` was simply removed
2022-01-27 11:17:00 +01:00
Benjamin Muskalla
c1b5565e4d
Automation to regenerate framework models
2022-01-27 11:15:10 +01:00
yoff
e28669e487
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2022-01-27 10:31:43 +01:00
Tom Hvitved
f4195219f4
C#: Make TypeParameterConstraints a CachedEntity
2022-01-27 10:19:16 +01:00
Tom Hvitved
280023c45a
Address review comments
2022-01-27 09:44:41 +01: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
Andrew Eisenberg
a7f755cf12
Add new groups for examples packs
...
Also, remove version numbers. Will make it easier to avoid publishing
the examples packs.
2022-01-26 14:49:18 -08: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
Rasmus Lerchedahl Petersen
163c888781
python: port concepts and implementations
2022-01-26 19:05:37 +01:00
Rasmus Lerchedahl Petersen
e6b5833bd6
python: fix typo in qhelp
2022-01-26 19:05:36 +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
Erik Krogh Kristensen
e75dc2116f
add CWE-184 to incomplete-scheme-check and bad-tag-filter
2022-01-26 16:13:13 +01: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
dd27ed8392
Ruby: Desugar hash literals
...
```rb
{ a: 1, **splat, b: 2 }
```
becomes
```rb
::Hash.[](a: 1, **splat, b: 2)
```
2022-01-26 13:53:18 +01:00
Tom Hvitved
39436828de
Ruby: Add internal/Literal.qll for internal implementation details
2022-01-26 13:48:26 +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
Rasmus Lerchedahl Petersen
47af3a69a5
Merge branch 'main' of github.com:github/codeql into python/support-match
2022-01-26 11:39:46 +01:00
Alvaro Muñoz Sanchez
ba90fecc98
retab Test.java
2022-01-26 11:20:10 +01:00
Erik Krogh Kristensen
abd87615ff
update qhelp with suggestions
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-01-26 11:03:05 +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
Erik Krogh Kristensen
de633940fe
promote the js/jwt-missing-verification query out of exeprimental
2022-01-26 09:35:54 +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
Michael Nebel
f1d5d3af9d
C#: Add change note for extended property patterns.
2022-01-25 15:13:11 +01:00
Michael Nebel
44cc044a3d
C#: Add testcase for extended property patterns (to indicate that they are de-sugared correctly).
2022-01-25 15:13:11 +01:00
Michael Nebel
833e8e4f1d
C#: Add some examples with the extended property pattern syntax.
2022-01-25 15:13:11 +01:00
Michael Nebel
83e7fae578
C#: Desugar property patterns that uses member access syntax.
2022-01-25 15:13:11 +01:00
Tom Hvitved
d7a91fdbe6
C#: Exclude extractor arguments from compilation_args relation
2022-01-25 15:09:29 +01:00
Geoffrey White
e4a3e9ee23
C++: Change note.
2022-01-25 13:55:01 +00:00
Geoffrey White
340b40e8f3
C++: Modernize cpp/cleartext-storage-buffer.
2022-01-25 13:54:42 +00: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
Harry Maclean
c5904b7410
Add inline tests for API Graph subclassing
2022-01-25 16:41:49 +13:00
Harry Maclean
517f2d0823
Add optional results to InlineExpectationsTest
...
The idea behind optional results is that there may be instances where
each line of source code has many results and you don't want to annotate
all of them, but you still want to ensure that any annotations you do
have are correct.
This change makes that possible by exposing a new predicate
`hasOptionalResult`, which has the same signature as `hasResult`.
Results produced by `hasOptionalResult` will be matched against any
annotations, but the lack of a matching annotation will not cause a
failure.
We will use this in the inline tests for the API edge getASubclass,
because for each API path that uses getASubclass there is always a
shorter path that does not use it, and thus we can't use the normal
shortest-path matching approach that works for other API Graph tests.
2022-01-25 16:41:49 +13:00
Harry Maclean
d0a274c1e8
Use API graph subclassing in GraphQL modelling
...
This simplifies some of the code.
2022-01-25 16:41:24 +13:00
Harry Maclean
5e7a29a979
Ruby: Use API graph subclassing in Rails modelling
...
Now that API graphs have basic subclassing support, we can simplify some
of the ActiveRecord and ActionController code.
2022-01-25 16:40:14 +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
Tony Torralba
4f4f531dfc
Add missing QLDoc
2022-01-24 15:13:09 +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
Geoffrey White
588447d596
C++: Fix up isParameterDeref.
2022-01-24 11:06:24 +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
Harry Maclean
8419daad03
Ruby: Add subclassing support to API Graphs
...
Given the code
class A; end
class B < A; end
class C < A; end
You can find uses of B and C with the expression
API::getTopLevelMember("A").getASubclass()
2022-01-24 12:21:39 +13:00
luchua-bc
27043a09b3
File path injection with the JFinal framework
2022-01-23 18:07:48 +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
Geoffrey White
4326e6f706
C++: Split 'gets' model and make it a local source.
2022-01-21 17:29:49 +00:00
Geoffrey White
79735f5ac5
C++: Add test case.
2022-01-21 17:29:48 +00: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
Tony Torralba
4df0f399cd
Move ContentProvider models to the appropriate file
2022-01-21 16:55:43 +01:00
Tony Torralba
c6dd7ddf7a
Fix stub
2022-01-21 16:55:43 +01:00
Tony Torralba
4f253590f1
Fix method name in LocalDatabaseOpenMethodAccess
2022-01-21 16:55:43 +01:00
Tony Torralba
652a1d2dc2
Fix wrongly resolved rebase conflicts
2022-01-21 16:55:43 +01:00
Tony Torralba
5cf664411b
Remove unneeded nonSuspicious values
2022-01-21 16:55:43 +01:00
Tony Torralba
baa1f71a53
Add QLDoc
2022-01-21 16:55:43 +01:00
Tony Torralba
4e4f619ae4
Update java/ql/lib/semmle/code/java/security/CleartextStorageAndroidDatabaseQuery.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-21 16:55:43 +01:00
Tony Torralba
c5ed5fcaac
Apply suggestions from code review
...
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com >
2022-01-21 16:55:42 +01:00
Tony Torralba
ee84dae164
Fix predicate name
2022-01-21 16:55:42 +01:00
Tony Torralba
16b61f78e6
Fix QLDocs and the qhelp example
2022-01-21 16:55:42 +01:00
Tony Torralba
f0604e2e84
Added query for Cleartext Storage in Android Database
2022-01-21 16:55:42 +01: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
Rasmus Lerchedahl Petersen
9aa4c4a6a7
python: Add missing input
...
also update test expectation
2022-01-21 13:55:33 +01:00
Rasmus Lerchedahl Petersen
41908cbf9f
python: add missing qldoc
2022-01-21 13:55:08 +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
Rasmus Lerchedahl Petersen
49d4b1480d
python: Do not remove ChainedConfigs12.qll
...
since it was clearly already used.
Add deprecation message instead.
2022-01-21 12:27:29 +01:00
Rasmus Lerchedahl Petersen
35c9307baa
python: rewrite NoSQLInjection to use flow state
...
This allows a bit more precision. Specifically, we could
require the sanitizer to only affect `ConvertedToDict`.
In practice, most sanitizers woudl probably fail on raw
input also, though.
2022-01-21 12:12:58 +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
Tom Hvitved
55f427ca0e
Ruby: Use multiple threads in QL test CI job
2022-01-21 11:46:08 +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
Erik Krogh Kristensen
debebb2b8c
rewrite the qhelp for js/insecure-dependency
2022-01-21 10:41:08 +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
Rasmus Lerchedahl Petersen
a5bc5373d0
python: Rewrite path injection to use flow state
...
This removes the FP cause by chaining
This PR also removes `ChainedConfigs12.qll`,
as we hope to solve future problems via flow states.
2022-01-21 09:26:48 +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
Erik Krogh Kristensen
548fb47603
JS: move ExternalArtifact.qll into lib/ folder to fix ql/db-type-outside-core
2022-01-20 14:00:57 +01:00
Erik Krogh Kristensen
9b69de8588
QL: add query detecting use of db-types outside the lib folder
2022-01-20 14:00:55 +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
Erik Krogh Kristensen
6b7d84add7
QL: exclude fields that are uniquely used in call to an IPA constructor
2022-01-20 11:37:08 +01: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
Erik Krogh Kristensen
6e9771fbf6
QL: make FieldAccess::getDeclaration return a FieldDecl
2022-01-20 09:59:45 +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
Erik Krogh Kristensen
708c18d4c2
QL: update the name of the consistency query to make code-scanning alerts more clear
2022-01-20 09:41:13 +01:00
Erik Krogh Kristensen
b8f1fb3954
JS: fix ql/field-only-used-in-charpred within JavaScript
2022-01-20 09:41:13 +01:00
Erik Krogh Kristensen
3d3c6875a6
QL: add query detecting fields that are only used within the charpred
2022-01-20 09:41:10 +01:00
github-actions[bot]
4ce8ccc52b
Release preparation for version 2.7.6
2022-01-20 08:21:18 +00:00
Harry Maclean
5dcee6ba27
Ruby: Add File.open as a FileSystemAccess
2022-01-20 21:09:41 +13:00
Rasmus Lerchedahl Petersen
32cbeae05f
python: missing start tag for relation
2022-01-20 08:56:12 +01:00
Rasmus Lerchedahl Petersen
d10ad3bdd4
python: update stats for tables
2022-01-20 08:42:32 +01: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
Rasmus Lerchedahl Petersen
7e9a9e3d9a
python: remove compiler warnings
2022-01-19 18:01:58 +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
Rasmus Lerchedahl Petersen
a0e79c1d7a
update stats for types
...
- should still update stats for tables
2022-01-19 16:38:19 +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
Rasmus Wriedt Larsen
93b3cd669a
Python: Cleanup: Remove old points-to versions of queries
...
Since we've internally agreed that we've reached the same or better set
of results.
2022-01-19 15:30:12 +01: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
Rasmus Lerchedahl Petersen
db253e8939
python: upgrade and downgrade scripts
2022-01-19 15:22:57 +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
Rasmus Lerchedahl Petersen
ef9fb0873f
python: tools for writing upgrades and downgrade
...
adapted from [the ruby instructions](https://github.com/github/codeql/blob/main/ruby/doc/prepare-db-upgrade.md )
2022-01-19 14:29:58 +01:00
Rasmus Lerchedahl Petersen
36e18d5d80
python: dataflow for match
...
- also update `validTest.py`, but commented out for now
otherwise CI will fail until we force it to run with Python 3.10
- added debug utility for dataflow (`dataflowTestPaths.ql`)
2022-01-19 14:29:58 +01:00
Rasmus Lerchedahl Petersen
bb210f4172
pythos: SSA for match
...
- new SSA definition `PatternCaptureDefinition`
- new SSA definition `PatternAliasDefinition`
- implement `hasDefiningNode`
2022-01-19 14:29:58 +01:00
Rasmus Lerchedahl Petersen
de8ecb214f
python: Wrappers for database classes
...
- new syntactic category `Pattern` (in `Patterns.qll`)
- subpatterns available on statments
- new statements `MatchStmt` and `Case`
(`Match` would conflict with the shared ReDoS library)
- new expression `Guard`
- support for pattern lists
2022-01-19 14:29:58 +01: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
Rasmus Lerchedahl Petersen
b17f844f35
python: New generated files
2022-01-19 13:36:32 +01: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
Erik Krogh Kristensen
b7a0b8765e
add js/http-dependency query
2022-01-19 10:05:39 +01: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
Asger Feldthaus
79f799066a
JS: Update test output
2022-01-17 16:27:57 +01: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
Artem Smotrakov
825fe1797a
Fixed another false-positive in CWE-297/IgnoredHostnameVerification.ql
2022-01-16 18:55:49 +00:00
Artem Smotrakov
6dad0e21d9
Ignore wrapped HostnameVerifier.vefify() calls
2022-01-16 18:29:30 +00:00
Artem Smotrakov
dcf251bb93
Fixed typos in IgnoredHostnameVerification.qhelp
2022-01-16 18:27:49 +00:00
Fosstars
2b33265d0f
Added a query for ignored hostname verification
...
- Added IgnoredHostnameVerification.ql
- Added a qhelp file with examples
- Added tests
2022-01-16 18:27:49 +00:00
Artem Smotrakov
f78002bc02
Fixed a false-positive in CWE-297/IgnoredHostnameVerification.ql
2022-01-16 18:25:18 +00:00
Fosstars
e11cb943a6
Added a query for ignored hostname verification
...
- Added IgnoredHostnameVerification.ql
- Added a qhelp file with examples
- Added tests
2022-01-16 18:25:18 +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
jorgectf
9ab6d21757
Add forward type tracking test
2022-01-14 22:56:51 +01: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
Asger Feldthaus
708408a458
JS: Recognize "sql" option as a query string
2022-01-13 13:04:41 +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
Benjamin Muskalla
426f3117d6
Clarify model names and escape variables
2022-01-11 15:58:21 +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
Benjamin Muskalla
49d2fbfb5f
Fixed slug references and PR skips
2022-01-11 11:47:28 +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
Henry Mercer
19933262c4
Java: Fix copy/paste error in existing queries
...
Co-authored-by: yo-h <55373593+yo-h@users.noreply.github.com >
2022-01-05 10:50:22 +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
jorgectf
1f1b7a54f8
Update .expected
2021-12-19 18:58:43 +01:00
jorgectf
b6bdcd0eb8
Delete redundant exists()
2021-12-19 18:57:22 +01:00
jorgectf
98c8503ebd
Fix test mismatch
2021-12-19 18:35:53 +01:00
jorgectf
f82ed8573e
Model python_jwt.process_jwt
2021-12-19 18:32:14 +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
Henry Mercer
5696146179
Java: Convert telemetry queries to summary metrics
...
Use the support for summary metrics with messages that'll be in the next
version of the CodeQL CLI.
2021-12-15 17:59:01 +00: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
liangjinhuang
77b5f422ba
change PasswordFnSink to RandomFnSink
2021-12-11 12:31:20 +08: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
Benjamin Muskalla
557cb0a09e
Add job name
2021-12-06 11:42:03 +01:00
Benjamin Muskalla
657c576186
Skip diffs if same branch
2021-12-06 11:30:14 +01:00
Benjamin Muskalla
38debc0b64
Remove push trigger
2021-12-06 11:21:15 +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
liangjinhuang
1102f60f3e
add tests
2021-12-04 00:52:15 +08: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
Benjamin Muskalla
d181ee1701
Shorten workflow name
...
This will show up including the job name anyway
```
Models as Data / model-diff (apache/commons-codec)
```
2021-11-30 12:19:10 +01:00
Benjamin Muskalla
5e69eb491f
Generate diff and archive results
2021-11-30 12:19:10 +01:00
Benjamin Muskalla
734422f384
Generate the models for each variant
2021-11-30 12:19:10 +01:00
Benjamin Muskalla
9672128699
Download database
2021-11-30 12:19:10 +01:00
Benjamin Muskalla
c0a3cd07a5
Add default projects
2021-11-30 12:19:09 +01:00
Benjamin Muskalla
881539c735
Add scaffolding for model diff job
2021-11-30 12:19:09 +01: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
liangjinhuang
d0ac11817e
add insecureRandomness
2021-11-28 20:47:06 +08: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
jorgectf
cb8e54e38e
Delete redundant LXMLParser dangerous check
2021-11-16 13:27:24 +01:00
jorgectf
637901d980
Make concepts instances of their ranges
2021-11-16 13:25:29 +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
ihsinme
c916bed853
Update test1.cpp
2021-11-15 16:29:51 +03: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
ihsinme
99740876cb
Add files via upload
2021-11-14 11:28:27 +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
ihsinme
8ddfea1dee
Update cpp/ql/src/experimental/Security/CWE/CWE-200/ExposureSensitiveInformationUnauthorizedActor.qhelp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-11-09 09:20:39 +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
jorgectf
066b40098c
Add lxml.etree.XMLParser missing resolve_entities dangerous case
2021-10-28 19:34:15 +02: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
Rasmus Wriedt Larsen
58bc1102e5
Merge branch 'main' into jorgectf/python/deserialization
2021-10-28 12:31:34 +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
ihsinme
1c80f26178
Update ExposureSensitiveInformationUnauthorizedActor.ql
2021-10-28 09:50:41 +03:00
ihsinme
04ee78aecf
Apply suggestions from code review
...
thanks
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-10-28 09:46:26 +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
ihsinme
8a1d271328
Add files via upload
2021-10-25 14:48:19 +03:00
ihsinme
1dacd2ea76
Add files via upload
2021-10-25 14:47:25 +03: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
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
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
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
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
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
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
jorgectf
f1a73e3009
Merge branch 'jorgectf/python/deserialization' of https://github.com/jorgectf/codeql into jorgectf/python/deserialization
2021-10-16 10:07:13 +02:00
jorgectf
c2046f1777
Improve readability for xmlDom()
2021-10-16 10:07:11 +02:00
Jorge
be424704a6
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-10-16 10:04:50 +02:00
jorgectf
320a00be31
Delete simple API::Nodes
2021-10-16 10:02:43 +02:00
jorgectf
5b66a15de3
Extend mayBeDangerous() QLDoc
2021-10-16 09:57:28 +02:00
Edoardo Pirovano
0e01b91c7e
Language reference: Fix when trailing commas are allowed
2021-10-16 08:57:26 +01:00
jorgectf
15dfc6d1da
Fix xml_sax_parser.py good/bad naming
2021-10-16 09:50:58 +02: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
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
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
Geoffrey White
a0e501c3a9
Sync identical files.
2021-10-15 14:34:02 +01: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Calum Grant
30a00b22c9
CodeQL library for Ruby
2021-10-12 17:33:09 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Tom Hvitved
f06632a8e7
C#: Filter discards in tuples in ConstantCondition.ql
2021-10-04 13:04:18 +02:00
Erik Krogh Kristensen
8d6cac76cc
apply suggestions from asgerf
2021-10-04 12:45:02 +02: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
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
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
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
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
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
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
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
Rasmus Wriedt Larsen
ba990f72f2
Another hasLocationInfo URL reference fix
2021-09-29 14:00:28 +02: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
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
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 Wriedt Larsen
8df3dab121
Python: Adjust .expected with subpaths
2021-09-28 17:04:20 +02:00
Rasmus Wriedt Larsen
e472814ddd
Python: Fix XXE qhelp
2021-09-28 17:02:39 +02:00
Rasmus Wriedt Larsen
9c286a1b50
Python: fix name of .qhelp file
2021-09-28 16:57:46 +02:00
Rasmus Wriedt Larsen
67fddda6d2
Merge branch 'main' into jorgectf/python/deserialization
2021-09-28 16:49:33 +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
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
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
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
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
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
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
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
james
e664711f47
make links to slide decks relative
2021-09-24 14:56:48 +01:00
james
23e4ad1abb
update one more link
2021-09-24 14:46:14 +01:00
alexet
49f8f46354
Java: Cache params string computation.
2021-09-24 14:12:26 +01:00
Rasmus Lerchedahl Petersen
520a2da8ab
Python: Add tests for asyncpg
2021-09-24 14:41:50 +02:00
Anders Schack-Mulligen
854f2a046a
Java: Add StringLiteral.isTextBlock().
2021-09-24 13:11:18 +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
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
haby0
9b969e15fc
Modify according to @yoff suggestion
2021-09-24 12:56:10 +08:00
luchua-bc
272e4f6cf9
Update the query
2021-09-24 01:48:11 +00:00
luchua-bc
2dc38aee54
Update qldoc
2021-09-23 20:31:24 +00: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
4841c3037d
Java: Add callback dispatch to more anonymous classes.
2021-09-23 14:34:56 +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
Joe Farebrother
0919042692
Model Bundle and Intent extra methods
2021-09-23 12:03:45 +01: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
d4564d5dd1
Python: Add QLDoc to Function.getArgByName
2021-09-23 10:01:04 +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
Erik Krogh Kristensen
805d1d170c
do not filter away regular expressions with lookbehinds
2021-09-22 17:14:29 +02:00
haby0
6c07a3e260
Apply @yoff's suggestion
2021-09-22 18:50:58 +08: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
ihsinme
88a257fcdc
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-09-21 20:32:08 +03:00
Erik Krogh Kristensen
99ed4a1a89
add a bad-tag-filter query for Python and JavaScript
2021-09-21 15:04:03 +02: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
luchua-bc
8170f01b66
Query to detect uncontrolled thread resource consumption
2021-09-20 02:12:47 +00: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
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
Geoffrey White
90bc138049
CPP: Fix QLDoc comments.
2021-09-17 14:12:04 +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
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
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
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
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
Robert Marsh
c85cc1455b
C++: accept changes to new ExecTainted test
2021-09-15 11:27:13 -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
Felicity Chapman
05d83e487d
Update all links to CodeQL microsite
2021-09-15 17:08:55 +01:00
haby0
c60eded2de
Fix conflicting
2021-09-15 11:07:43 +08:00
haby0
9e63aa9d84
Update query
2021-09-14 21:12:49 +08:00
Rasmus Lerchedahl Petersen
c2d2037726
Python: Add change note and set precision
2021-09-14 13:45:51 +02:00
Rasmus Lerchedahl Petersen
1c7982b319
Python: Move query tests over
2021-09-14 13:29:21 +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
Rasmus Lerchedahl Petersen
abbd1d1dc5
Python: Fix errors introduced during port
...
testing on a database helps..
2021-09-14 13:08:21 +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
Rasmus Lerchedahl Petersen
a30f697537
Python: Add getName to RegexExecution concept
2021-09-14 11:53:40 +02:00
Anders Fugmann
3f5ab60fb4
C++: Add DEPRECATED to documentation block
2021-09-14 09:55:19 +02:00
Rasmus Lerchedahl Petersen
8f152a5bfb
Python: Port regex concepts and adapt PolyRedos
2021-09-13 16:50:00 +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
Anders Fugmann
8e9ac18026
C++: Deprecate RangeSSA::isGuardPhi/3
2021-09-13 15:35:05 +02:00
Geoffrey White
ee7ccd7936
C++: Upgrade to path problem.
2021-09-13 13:52:12 +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
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 Fugmann
2c93bce9ad
C++: Refactor code to use predicate isGuardPhi/4
2021-09-10 10:53:48 +02:00
Felicity Chapman
3b3350e648
Correct the Qllexer path for slides
2021-09-10 08:04:07 +01:00
Felicity Chapman
32b3e416b3
Update version numbers for LGTM E 1.28
2021-09-10 06:54:36 +01:00
jorgectf
61a81b60e8
Extend .qlref
2021-09-09 19:06:58 +02:00
Rasmus Lerchedahl Petersen
6c5596d17e
Python: rewrite test
2021-09-09 13:45:44 +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
Rasmus Lerchedahl Petersen
a9c409403c
Python: more tests and comments
2021-09-08 14:44:36 +02:00
Rasmus Lerchedahl Petersen
9b198c6d0a
Python: Add some module initialization tests
2021-09-08 10:37:28 +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
21da603d81
Update .qlref
2021-09-07 20:13:39 +02: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
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
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
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
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
Nati Pesaresi
629efb85fb
ternary operator
2021-09-02 17:55:09 -03:00
jorgectf
48bca5beb8
Fix references' link anchor
2021-08-25 17:09:47 +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
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
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
valeria-meli
f3c0bf7826
copy-paste from our repo
2021-07-27 18:09:11 -03:00
jorgectf
8d0386b049
Split into getNameArg and getValueArg
2021-07-25 04:35:22 +02:00
jorgectf
93c8529fc9
Add .expected
2021-07-25 01:53:21 +02:00
jorgectf
1dd77f167a
Fix undetected tests
2021-07-25 01:51:52 +02:00
jorgectf
b83b31cc7a
Write qldocs
2021-07-24 02:33:57 +02:00
jorgectf
61e873d725
Polish tests
2021-07-24 02:09:23 +02:00
jorgectf
0d2646fd3d
Polish documentation
2021-07-24 01:23:51 +02:00
jorgectf
f9b244ecad
Polish documentation
2021-07-24 01:06:05 +02:00
jorgectf
068150b1ab
Finish modeling
2021-07-22 19:34:23 +02:00
jorgectf
b5e10b6c42
Write (String|Bytes)IO additional taint step
2021-07-22 19:15:30 +02:00
jorgectf
11f4c1cc8e
Format tests
2021-07-22 19:04:35 +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
haby0
e8d0827916
Add tornado source
2021-07-05 10:42:15 +08:00
haby0
b866f1b21e
Add CWE-348 ClientSuppliedIpUsedInSecurityCheck
2021-07-02 19:30:33 +08: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
jorgectf
d475d52c76
Add partial modeling
2021-06-30 00:59:40 +02:00
jorgectf
c3b3bde35d
Add XMLParser concept
2021-06-30 00:59:17 +02:00
jorgectf
b9fa57f518
Move tests to test/
2021-06-30 00:58:58 +02:00
jorgectf
78deec84fc
Upload main structure and initial tests
2021-06-22 16:41:08 +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
jorgectf
b10ade17be
Update HeaderDeclaration input naming
2021-06-20 00:13:59 +02:00
jorgectf
0e61558644
Empty commit
2021-06-19 18:39:58 +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
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
luchua-bc
6a2c7d54cd
Enhance the query to check more scenarios
2021-06-14 03:24:16 +00: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
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
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
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
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
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
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
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
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
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
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
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
luchua-bc
7af1984348
Update the change note
2021-05-17 11:35:35 +00:00
luchua-bc
1a072f3bb9
Move APIs from predicates flagged auto-generated to the other section
2021-05-14 20:38:23 +00:00
luchua-bc
9ef58e378c
Remove the sample Java file in the src folder
2021-05-14 11:01:25 +00: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
luchua-bc
4d014717b6
Add a change note and reset the qhelp file
2021-05-12 15:50:40 +00:00
luchua-bc
fc7d340a89
Query to detect hard-coded Azure credentials
2021-05-07 13:16:41 +00: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
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
luchua-bc
6bfe2f2ba6
Add more sinks
2021-02-11 17:53:42 +00:00
luchua-bc
f1788ed04e
Revamp the query to handle more cases
2021-02-11 04:33:42 +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
luchua-bc
46fd5bd92e
Move test files to the test folder
2021-01-20 03:51:46 +00:00
luchua-bc
07f45a51f8
Query to detect hash without salt
2021-01-13 02:49:00 +00:00