Commit Graph

33872 Commits

Author SHA1 Message Date
Esben Sparre Andreasen
5e1f565b6a QL: add workflow with codeql-action 2021-10-13 15:21:08 +02:00
Jonas Jensen
c215838531 Merge pull request #6867 from nickrolfe/mergeback
Merge rc/3.3 into main
2021-10-13 15:19:18 +02:00
Mathias Vorreiter Pedersen
6ece3c2b46 Merge pull request #6870 from jbj/cp-fixes
C++: Fix potential Cartesian products
2021-10-13 14:15:33 +01:00
Arthur Baars
f4003406cf Apply suggestions from code review
Co-authored-by: Tom Hvitved <hvitved@github.com>
2021-10-13 15:11:04 +02:00
Taus
e524076045 Extend the tests slightly
Adds a test for when the call is to an outer, non-member predicate.
2021-10-13 13:03:30 +00:00
Taus
d0cb1384a9 QL: Extend the tests slightly
Adds a test for when the call is to an outer, non-member predicate.
2021-10-13 13:03:30 +00:00
Arthur Baars
112b7a8e27 Update broken links 2021-10-13 15:03:19 +02:00
Anders Schack-Mulligen
94dbf2b7b4 Expose transitive closure syntax. 2021-10-13 12:48:38 +00:00
Anders Schack-Mulligen
7d68020c7b QL: Expose transitive closure syntax. 2021-10-13 12:48:38 +00:00
Tom Hvitved
436f678c94 Speedup ErbDirective::containsStmtStart 2021-10-13 14:41:04 +02:00
Taus
bc5e0924d2 Add tests for "implicit this" 2021-10-13 12:27:20 +00:00
Taus
a0e2bd57a7 QL: Add tests for "implicit this" 2021-10-13 12:27:20 +00:00
Jonas Jensen
e80c1ad91f C++: Fix resource-not-released-in-destructor CP
By moving a disjunct outside the scope of an `exists(Function f`
variable it doens't use, the code becomes clearer and can be optimized
better.

The CP in the QL code did not lead to a CP at evaluation time since the
optimizer was smart enough to compensate for it:

    376161  ~37597630%     {0} r1 = SCAN functions OUTPUT {}
    1       ~0%            {0} r2 = STREAM DEDUP r1

Before this change, the largest tuple count in `leakedInSameMethod` on
bitcoin/bitcoin was 2M. Now it's 400k.
2021-10-13 14:24:26 +02:00
Mathias Vorreiter Pedersen
a80860cdc6 Python: Replace '.prefix'/'.suffix' with '.matches'. 2021-10-13 13:23:12 +01:00
Mathias Vorreiter Pedersen
f3bb0a676e JS: Replace '.prefix'/'.suffix' with '.matches'. 2021-10-13 13:23:07 +01:00
Mathias Vorreiter Pedersen
d85d009a54 Java: Replace '.prefix'/'.suffix' with '.matches'. 2021-10-13 13:19:06 +01:00
Jonas Jensen
955344e175 C++: Inline a predicate that contains CPs
The `overflows` predicate had quite severe Cartesian products. We didn't
see them in practice because magic saved us, but we can't rely on magic
in the future, so it seems better to inline this predicate.

Tuple counts and speed look good both before and after.
2021-10-13 14:11:47 +02:00
Philip Ginsbach
c9c0c7f24f fix formatting 2021-10-13 13:10:37 +01:00
Taus
48cfa9665a Add "implicit this" query 2021-10-13 12:08:19 +00:00
Taus
fb5513c1c8 QL: Add "implicit this" query 2021-10-13 12:08:19 +00:00
Mathias Vorreiter Pedersen
95ea619cc4 Merge pull request #69 from github/erik-krogh/perf
fix two bad join orders
2021-10-13 12:53:12 +01:00
Mathias Vorreiter Pedersen
d1721d0bcd QL: Merge pull request #69 from github/erik-krogh/perf
fix two bad join orders
2021-10-13 12:53:12 +01:00
Taus
2d412d63e0 Merge pull request #71 from github/tausbn/more-yaml-hacking
"Parse" YAML without errors
2021-10-13 13:51:20 +02:00
Taus
411faca6ef QL: Merge pull request #71 from github/tausbn/more-yaml-hacking
"Parse" YAML without errors
2021-10-13 13:51:20 +02:00
Geoffrey White
3dab87e6ca Merge pull request #48 from github/extractor-pack
Make the create-extractor-pack.ps1 script more reliable.
2021-10-13 12:38:10 +01:00
Geoffrey White
ca81110e4b QL: Merge pull request #48 from github/extractor-pack
Make the create-extractor-pack.ps1 script more reliable.
2021-10-13 12:38:10 +01:00
Erik Krogh Kristensen
4cb004c0c6 autoformat 2021-10-13 13:34:47 +02:00
Erik Krogh Kristensen
15679dfec6 QL: autoformat 2021-10-13 13:34:47 +02:00
Erik Krogh Kristensen
705e24690f cache getClassPredicate 2021-10-13 13:26:37 +02:00
Erik Krogh Kristensen
09862b9fe7 QL: cache getClassPredicate 2021-10-13 13:26:37 +02:00
Taus
7034933cee "Parse" YAML without errors 2021-10-13 11:24:26 +00:00
Taus
30040680ec QL: "Parse" YAML without errors 2021-10-13 11:24:26 +00:00
Arthur Baars
bf3d291a1c Updates after codeql file sync 2021-10-13 13:24:20 +02:00
Arthur Baars
80ac05d5c6 Bump codeql submodule to 'main' 2021-10-13 13:24:08 +02:00
Joe Farebrother
1b4130fe97 Add check for predicates with an override annotation 2021-10-13 12:22:46 +01:00
Joe Farebrother
c3493d6fde QL: Add check for predicates with an override annotation 2021-10-13 12:22:46 +01:00
Erik Krogh Kristensen
584702058d fix two bad join orders 2021-10-13 13:20:41 +02:00
Erik Krogh Kristensen
932f00b43e QL: fix two bad join orders 2021-10-13 13:20:41 +02:00
Alex Ford
0d72a51334 Merge pull request #342 from github/improve-xss-isAdditionalFlowStep
Improve `XSS::Shared::isAdditionalFlowStep` performance
2021-10-13 12:15:52 +01:00
Mathias Vorreiter Pedersen
bdc54bcda7 Python: Replace 'if p() then q() else none()' with a conjunction. 2021-10-13 12:13:55 +01:00
Mathias Vorreiter Pedersen
887849857d JS: Replace 'if p() then q() else none()' with a conjunction. 2021-10-13 12:13:55 +01:00
Mathias Vorreiter Pedersen
7690625114 C#: Replace 'if p() then q() else none()' with a conjunction. 2021-10-13 12:11:50 +01:00
Mathias Vorreiter Pedersen
ba981c525b C++: Replace 'if p() then q() else none()' with a conjunction. 2021-10-13 12:11:42 +01:00
Joe Farebrother
33bd267eb0 "doesn't mention this" query 2021-10-13 12:09:04 +01:00
Joe Farebrother
d474a76cf0 QL: "doesn't mention this" query 2021-10-13 12:09:04 +01:00
Arthur Baars
6a18aa4e2a Merge pull request #348 from github/rc/3.3
Merge rc/3.3 into main
2021-10-13 13:08:55 +02:00
Arthur Baars
287046e9b0 Merge pull request #346 from github/erik-krogh/fix-primary-class-typo
fix typo for getAPrimaryQlClass
2021-10-13 12:53:51 +02:00
Anders Schack-Mulligen
1f6eb6e763 Merge pull request #55 from github/mathiasvp/prefix-or-suffix-in-comparison
New query: Find uses of '.prefix' or '.suffix' when comparing against string literals
2021-10-13 12:45:12 +02:00
Anders Schack-Mulligen
3ed7f9664c QL: Merge pull request #55 from github/mathiasvp/prefix-or-suffix-in-comparison
New query: Find uses of '.prefix' or '.suffix' when comparing against string literals
2021-10-13 12:45:12 +02:00
Philip Ginsbach
6b9ddf1f65 Guard non-extending subtype of G::Guard 2021-10-13 11:44:22 +01:00