Commit Graph

33872 Commits

Author SHA1 Message Date
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
Taus
3aea270e10 Python: Autoformat 2021-06-18 18:30:27 +00:00
jorgectf
017a778a20 Polish make_response and fix extend argument 2021-06-18 20:21:11 +02:00
yo-h
26a04d6659 Merge pull request #6108 from tamasvajk/fix/coverage-commenter
Fix diff in the framework coverage PR comment
2021-06-18 14:02:15 -04:00
Taus
aeac03663f Python: Remove old ClickHouseDriver.qll
The merge must've gone wrong some way, as this file is not supposed to
exist in `experimental` anymore.
2021-06-18 17:41:09 +00:00
Taus
348b20ca9d Merge branch 'main' of https://github.com/github/codeql into python-a-few-minor-cleanups 2021-06-18 17:38:43 +00:00
Taus
9351688da8 Python: asCfgNode cleanup 2021-06-18 17:22:42 +00:00
Taus
c386f4a009 Python: Clean up py/insecure-protocol
Going all the way to the AST layer seemed excessive to me, so I rewrote
it to do most of the logic at the data-flow layer. In principle this
_could_ result in more names being computed (due to splitting), but in
practice I don't expect this make a big difference.
2021-06-18 17:22:42 +00:00
Taus
f24a9a46d9 Python: add getAnAttributeWrite 2021-06-18 17:22:42 +00:00
Taus
c78ba476cf Python: Clean up a few verbose casts 2021-06-18 17:22:42 +00:00
Nick Rolfe
65aa97c07c Use RegExp prefix instead of Regex, for consistency with other languages. 2021-06-18 15:56:19 +01:00
Tamas Vajk
b3f44f457a Fix diff in the framework coverage PR comment 2021-06-18 16:33:50 +02:00
haby0
1750efad2a fix 2021-06-18 21:46:48 +08:00
haby0
dca737190b Modify JShellInjection.expected 2021-06-18 21:36:45 +08:00
haby0
2b77f7d1bc Modify isAdditionalTaintStep 2021-06-18 21:36:44 +08:00
haby0
a71757f0f4 Update java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
2021-06-18 21:36:44 +08:00
haby0
bfe0d40987 using isAdditionalTaintStep 2021-06-18 21:36:44 +08:00
haby0
3a2a99e289 Fix 1 2021-06-18 21:36:44 +08:00
haby0
ed0aabef46 add isAdditionalTaintStep 2021-06-18 21:36:44 +08:00
haby0
921b8e80a2 Jshell Injection 2021-06-18 21:36:44 +08:00
Mathias Vorreiter Pedersen
17df8e44d0 C++: Convert 'cpp/tainted-arithmetic' to a 'path-problem' query. 2021-06-18 14:56:17 +02:00
AlonaHlobina
ac35438b5f Update versions-compilers.rst 2021-06-18 15:35:37 +03:00
CodeQL CI
081fd28090 Merge pull request #6102 from RasmusWL/js-qhelp-fixup
Approved by erik-krogh
2021-06-18 04:52:48 -07:00
Chris Smowton
6302187a5d Merge pull request #5957 from haby0/java/BeanShellInjection
Java: BeanShell Injection
2021-06-18 12:38:51 +01:00
Jonas Jensen
f829fff2ad Merge pull request #6100 from github/AlonaHlobina-patch-2
Update C/C++ Clang and GCC versions.rst
2021-06-18 13:10:29 +02:00
AlonaHlobina
288a314108 Update versions-compilers.rst 2021-06-18 13:35:11 +03:00
Rasmus Wriedt Larsen
968a0921d4 JS: Fix secure example inclusion in InsecureDownload.qhelp 2021-06-18 12:12:06 +02:00
Anders Schack-Mulligen
7eb6da3888 Merge pull request #5772 from smowton/smowton/feature/apache-tuple-flow
Add models for Apache Commons Lang's tuple types
2021-06-18 11:25:07 +02:00
AlonaHlobina
bd820458f5 Update docs/codeql/support/reusables/versions-compilers.rst
Co-authored-by: Jonas Jensen <jbj@github.com>
2021-06-18 12:24:34 +03:00
haby0
a73cb3f04a Fix error 2021-06-18 17:22:26 +08:00
CodeQL CI
1ffd9c9ba7 Merge pull request #6086 from asgerf/js/knex
Approved by esbena
2021-06-18 01:58:21 -07:00
Tom Hvitved
7cc02e6d00 Add Ssa::WriteDefinition::assigns/1 predicate 2021-06-18 10:42:32 +02:00
Calum Grant
32f6a465b0 Merge pull request #6080 from github/calumgrant/security-severities
Update security-severity scores
2021-06-18 09:40:40 +01:00
Tom Hvitved
eb86bceb4d Address review comments 2021-06-18 10:18:47 +02:00
AlonaHlobina
9c5ba8d4f6 Adding C++20 Beta support.rst 2021-06-18 10:56:11 +03:00
haby0
0d18e4ff9c BeanShell Injection 2021-06-18 15:54:13 +08:00
AlonaHlobina
9feda2ddd6 Update C/C++ Clang and GCC versions.rst 2021-06-18 10:46:22 +03:00
Tamás Vajk
0545bcfbd2 Merge pull request #6028 from github/tamasvajk/feature/csv-coverage-report-comment
Add CSV coverage PR commenter
2021-06-18 09:32:45 +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