Taus Brock-Nannestad
f17bbd9982
Python: Fix another bad TC.
...
This one is a bit awkward, since the previous version was supposed to
improve indexing. Unfortunately this is vastly outweighed by the slow
convergence of the TC. Right now we pay the cost of inverting the
`hasFlowSource` relation, but this is still cheaper.
2021-03-26 16:38:13 +01:00
Henry Mercer
c83daa66e7
CodeQL CLI Docs: Mention that QL packs use SemVer versioning
2021-03-26 15:30:23 +00:00
Mathias Vorreiter Pedersen
b466f0515d
C++: Respond to more review comments. (1) Use getClassAndName to ensure a good join order, and (2) unify the two abstract predicates on PointerWrapper.
2021-03-26 16:16:23 +01:00
Rasmus Lerchedahl Petersen
8155334fa7
Python: More elaborate qldoc
...
also refactor code to match
2021-03-26 15:57:07 +01:00
Chris Smowton
42b63a61ae
Add change note
2021-03-26 14:31:36 +00:00
Chris Smowton
3a274424ab
Convert fluent method models to csv and generalise to the three different variants of StrBuilder.
2021-03-26 14:31:36 +00:00
Chris Smowton
851317e34f
Add models for StrBuilder's fluent methods
2021-03-26 14:31:36 +00:00
Rasmus Lerchedahl Petersen
7d7cbc49db
Fix comments.
...
This induced fixing the code, since things were wired up wrongly.
Currently the only implementation of `insecure_connection_creation`
is `ssl.wrap_socket`,
which is also the sole target of py/insecure-default-protocol`,
so perhaps this part should be turned off?
2021-03-26 14:20:38 +01:00
Mathias Vorreiter Pedersen
0ce08617ba
C++: Respond to review comments.
2021-03-26 13:42:18 +01:00
Tom Hvitved
e345064a53
C#: Performance tweaks in SsaImplCommon.qll
2021-03-26 13:24:34 +01:00
Rasmus Lerchedahl Petersen
2e948da3b4
Python: suggested refactor
2021-03-26 13:08:45 +01:00
Rasmus Lerchedahl Petersen
1be2be843d
Python: update test expectations
2021-03-26 13:08:23 +01:00
Jonas Jensen
7f16c52217
Merge pull request #3364 from github/rdmarsh/cpp/use-taint-configuration-dtt
...
C++: use TaintTracking::Configuration in DefaultTaintTracking
2021-03-26 12:39:25 +01:00
Alexander Eyers-Taylor
b21672c81c
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-03-26 11:15:46 +00:00
Tom Hvitved
1dbfe2369d
Merge pull request #5542 from hvitved/csharp/update-suites
...
C#: Remove deleted queries from suites
2021-03-26 12:13:09 +01:00
CodeQL CI
f584ff9acf
Merge pull request #5533 from asgerf/js/fix-query-metadata
...
Approved by esbena
2021-03-26 11:09:54 +00:00
Mathias Vorreiter Pedersen
8dc7b6403a
C++: Add shared_ptr and unique_ptr implementations. Also add some very basic tests.
2021-03-26 12:03:59 +01:00
Mathias Vorreiter Pedersen
d20a0c9e82
C++: Add a class that models wrapped pointer types.
2021-03-26 11:50:06 +01:00
Asger Feldthaus
cc2a531684
JS: Cache PropRef.getBase
2021-03-26 10:48:25 +00:00
Tom Hvitved
9d1ef21d85
C#: Remove deleted queries from suites
2021-03-26 11:17:27 +01:00
Mathias Vorreiter Pedersen
c7c65736a9
C++: Accept test changes. These happened because of the incorrect usage of multiple configurations in 6c1ec6d96b.
2021-03-26 10:57:58 +01:00
Jonas Jensen
86755c6a98
Merge pull request #5515 from criemen/fix-query-metadata
...
C++: Fix query metadata warnings.
2021-03-26 10:19:46 +01:00
Anders Schack-Mulligen
506c95d098
Merge pull request #5372 from smowton/smowton/feature/commons-lang-models-to-csv
...
Java: Convert existing Commons Lang models to CSV
2021-03-26 10:18:23 +01:00
Tom Hvitved
d4ce42ac4f
Merge pull request #5416 from hvitved/csharp/rework-summaries
...
C#: Rework flow summary implementation
2021-03-26 09:47:15 +01:00
Tom Hvitved
e93b72d563
Merge pull request #5459 from hvitved/csharp/update-nuget
...
C#: Update more nuget packages
2021-03-26 09:28:09 +01:00
Mathias Vorreiter Pedersen
983b64a05f
Merge branch 'main' into rdmarsh/cpp/use-taint-configuration-dtt
2021-03-26 09:11:12 +01:00
Tom Hvitved
57fd2e3578
C#: Rename parameter in fieldOf()
2021-03-26 08:49:06 +01:00
Rasmus Lerchedahl Petersen
e936540863
Python: remove internal import
2021-03-26 08:22:09 +01:00
Rasmus Lerchedahl Petersen
f1619f1ee8
Python: "source" -> "contextOrigin"
2021-03-26 08:18:11 +01:00
Rasmus Lerchedahl Petersen
f14fb3bf9e
Merge branch 'python-port-insecure-protocol' of github.com:yoff/codeql into python-port-insecure-protocol
2021-03-26 08:06:51 +01:00
yoff
936757b4bf
Update python/ql/src/Security/CWE-327/FluentApiModel.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-03-26 08:05:51 +01:00
luchua-bc
d33b04cd96
Query to detect plaintext credentials in Java properties files
2021-03-26 02:33:40 +00:00
Rasmus Lerchedahl Petersen
9488b8bb18
Python: actually rename
2021-03-26 00:31:56 +01:00
Rasmus Lerchedahl Petersen
554404575d
Python: fix typo and name.
2021-03-26 00:29:40 +01:00
Rasmus Lerchedahl Petersen
c93e0c08fd
Merge branch 'python-port-insecure-protocol' of github.com:yoff/codeql into python-port-insecure-protocol
2021-03-26 00:26:33 +01:00
yoff
54dad57cf4
Update python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-03-26 00:25:40 +01:00
Rasmus Lerchedahl Petersen
2b257318f1
Python: more precise comment
2021-03-25 23:22:24 +01:00
yoff
62a0775cf6
Update python/ql/src/Security/CWE-327/examples/secure_protocol.py
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-03-25 23:09:11 +01:00
Porcuiney Hairs
2ca95166d9
Java : add query to detect insecure loading of Dex File
2021-03-26 01:59:11 +05:30
yoff
208d5157fa
Merge pull request #5500 from RasmusWL/django-forms
...
Python: Model RemoteFlowSources on Django forms/fields
2021-03-25 20:43:19 +01:00
Chris Smowton
a8422ffe26
Merge pull request #517 from smowton/smowton/fix/restore-extraction-under-odasa
...
Unify two implementations of GetExtractorPath
2021-03-25 19:35:24 +00:00
alexet
2576c86ebf
Docs: Update the language specification for changes to super.
2021-03-25 18:16:13 +00:00
Taus Brock-Nannestad
c2f112cb92
Python: Filter _before_ the cartesian product
...
It's always a sad thing to see a good plan go wrong:
86860032 ~0% {4} r26 = JOIN r19 WITH DataFlowPublic::TupleElementContent#class#ff CARTESIAN PRODUCT OUTPUT Lhs.0 'nodeFrom', Lhs.1 'nodeTo', Rhs.0, Rhs.1
129256 ~3% {4} r27 = SELECT r26 ON In.3 <= 7
129256 ~0% {3} r28 = SCAN r27 OUTPUT In.0 'nodeFrom', In.2 'c', In.1 'nodeTo'
Happily, now it looks like this:
129256 ~0% {3} r20 = JOIN r19 WITH DataFlowPrivate::small_tuple#f CARTESIAN PRODUCT OUTPUT Lhs.0 'nodeFrom', Rhs.0, Lhs.1 'nodeTo'
2021-03-25 19:06:05 +01:00
Erik Krogh Kristensen
5e59f6d558
Update javascript/ql/src/semmle/javascript/security/dataflow/ShellCommandInjectionFromEnvironmentCustomizations.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-03-25 19:03:37 +01:00
Taus Brock-Nannestad
8734df334b
Python: Slight cleanup
2021-03-25 18:35:16 +01:00
Taus Brock-Nannestad
229250dc54
Python: Limit size of TupleElementContent
...
A more principled approach is possible here, but in the short term
this will prevent an explosion.
For reference, openstack/cinder has roughly 19000 `ForTarget`s and
tuples of size up to 5300, and we were calculating the cartesian
product of these.
2021-03-25 18:28:49 +01:00
yoff
716e0f1404
Merge pull request #5517 from tausbn/python-prevent-potentially-bad-join-order
...
Python: Prevent potentially bad join order
2021-03-25 18:14:47 +01:00
Tom Hvitved
f100c8a9c0
C++: Make Windows autobuilder tests pass again
2021-03-25 17:43:48 +01:00
Tom Hvitved
ed78acb1d4
C#: Update more nuget packages
2021-03-25 17:32:12 +01:00
Taus Brock-Nannestad
dbef36cbbb
Python: Prevent bad TC and add a bit of caching
...
Using `simpleLocalFlowStep+` with the first argument specialised to
`CfgNode` was causing the compiler to turn this into a very slowly
converging manual TC computation.
Instead, we use `simpleLocalFlowStep*` (which is fast) and then join
that with a single step from any `CfgNode`. This should amount to the
same thing.
I also noticed that the charpred for `LocalSourceNode` was getting
recomputed a lot, so this is now cached. (The recomputation was
especially bad since it relied on `simpleLocalFlowStep+`, but anyway
it's a good idea not to recompute this.)
2021-03-25 17:28:37 +01:00