CodeQL CI
469e709113
Merge pull request #6055 from RasmusWL/rsa-modeling
...
Approved by yoff
2021-06-23 08:35:25 -07:00
Chris Smowton
9c91d1a965
Add change note
2021-06-23 16:09:29 +01:00
Chris Smowton
74feaf2893
Adapt to static methods and nested types returning unbound declaring types
...
Previously these returned raw declaring types instead
2021-06-23 16:03:18 +01:00
Chris Smowton
b34448af87
{Generic,Parameterized,Raw}Type: implement getAPrimaryQlClass
...
An aid to debugging
2021-06-23 15:58:31 +01:00
Tom Hvitved
9438885776
Merge pull request #216 from github/hvitved/synthesis-location
...
AST synthesis: Move location information into a separate predicate
2021-06-23 16:50:17 +02:00
Mathias Vorreiter Pedersen
9b8f558fb8
Merge pull request #6125 from MathiasVP/improve-tainted-arithmetic
...
C++: Add more barriers to `cpp/tainted-arithmetic`
2021-06-23 16:44:20 +02:00
Nick Rolfe
c784e37089
Add regexp parser and exponential ReDoS query
2021-06-23 15:29:49 +01:00
Mathias Vorreiter Pedersen
295e022df3
Merge branch 'main' into improve-tainted-arithmetic
2021-06-23 15:45:18 +02:00
Ian Lynagh
089e4e2e1e
Merge pull request #6147 from AlexDenisov/adjust_test_expectation
...
C++: Adjust test expectations after frontend upgrade
2021-06-23 14:43:47 +01:00
Alex Ford
e5f0206c6d
Merge pull request #208 from github/action-controller-1
...
Model accesses to `ActionController` parameters via `params` method
2021-06-23 14:21:55 +01:00
Alex Ford
0238c19085
remove TODO
2021-06-23 14:11:38 +01:00
Alex Ford
5941eb2be4
model some ActionController user input sources (params)
2021-06-23 14:11:38 +01:00
Alex Ford
9227f3a0c3
Add RemoteFlowSources.qll
2021-06-23 14:11:38 +01:00
Mathias Vorreiter Pedersen
a8c57ec4aa
C++: Prevent false negatives caused by incorrectly concluding that a loop variant condition refutes itself across loop iterations.
2021-06-23 15:08:16 +02:00
Tamas Vajk
b0447089d9
C#: Change Dapper stub to nuget-based one (stub also System.Data.SqlClient)
2021-06-23 15:04:57 +02:00
Alex Ford
5163514d43
Merge pull request #218 from github/build-yml-debug
...
Fix `compile-queries` job
2021-06-23 14:04:33 +01:00
Alex Ford
8e1f2e6237
try fixing build.yml
2021-06-23 13:41:51 +01:00
Anders Schack-Mulligen
6374914053
Java: Fix bad magic.
2021-06-23 14:39:18 +02:00
Alex Denisov
653afc8448
C++: Adjust test expectations after frontend upgrade
2021-06-23 14:39:16 +02:00
Mathias Vorreiter Pedersen
c44475458e
Update cpp/ql/src/Security/CWE/CWE-190/Bounded.qll
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-06-23 14:38:36 +02:00
Erik Krogh Kristensen
dbc8b9cf6a
autoformat
2021-06-23 14:21:15 +02:00
CodeQL CI
a86f50e091
Merge pull request #6135 from erik-krogh/chokidar
...
Approved by esbena
2021-06-23 05:16:06 -07:00
CodeQL CI
b66f4cb965
Merge pull request #6134 from erik-krogh/templates
...
Approved by asgerf, esbena
2021-06-23 05:09:23 -07:00
Tamas Vajk
f352bcb0a3
C#: Change nHibernate stub to nuget-based one
2021-06-23 13:55:19 +02:00
Tamas Vajk
1188e1b678
Fix extra constructor stubbing
2021-06-23 13:50:54 +02:00
Tamas Vajk
e200ecde4a
C#: Change Newtonsoft.Json stub to nuget-based one
2021-06-23 13:49:11 +02:00
Rasmus Wriedt Larsen
0774e985ce
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-06-23 13:37:38 +02:00
Tamás Vajk
2dc0849b79
Merge pull request #5664 from tamasvajk/feature/stub-generation
...
C#: Stub generation
2021-06-23 13:33:10 +02:00
Rasmus Wriedt Larsen
447099a1df
Python: Update jmespath tests
2021-06-23 13:32:19 +02:00
Artem Smotrakov
0dfb869c5b
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-06-23 13:23:54 +02:00
Mathias Vorreiter Pedersen
d308dd2f40
Update cpp/ql/src/semmle/code/cpp/controlflow/StackVariableReachability.qll
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-06-23 11:54:56 +02:00
Mathias Vorreiter Pedersen
90633b9ce1
C++: Make the new SQL abstract classes extend 'Function' instead. This is more in line with how we model RemoteFlowFunction.
2021-06-23 11:49:51 +02:00
Mathias Vorreiter Pedersen
6379463bcf
Merge branch 'main' into improve-tainted-arithmetic
2021-06-23 11:42:45 +02:00
Tamas Vajk
09dd615c6b
Regenerate stubs (add System.Void struct)
2021-06-23 11:38:41 +02:00
Geoffrey White
298f70f082
Merge pull request #6120 from MathiasVP/not-overflow-is-barrier-in-cwe-190
...
C++: Recognize any non-overflowing arithmetic expression as a barrier for `cpp/uncontrolled-arithmetic`
2021-06-23 10:35:33 +01:00
Tamas Vajk
d698f0ae27
Fix VoidType handling
2021-06-23 11:30:47 +02:00
Mathias Vorreiter Pedersen
9b94f3a650
Merge branch 'main' into improve-tainted-arithmetic
2021-06-23 11:04:08 +02:00
Rasmus Wriedt Larsen
902b450b12
Python: Also model pathlib.Path().open().write()
...
And this transition to type-trackers also helped fix the missing path
through function calls 👍
2021-06-23 10:50:04 +02:00
Rasmus Wriedt Larsen
39ec8701ca
Python: Add FileSystemWriteAccess concept
...
I made `FileSystemWriteAccess` be a subclass of `FileSystemAccess` (like in [JS](64001cc02c/javascript/ql/src/semmle/javascript/Concepts.qll (L68-L74) )), but then I started wondering about how I could give a good result for `getAPathArgument`, and what would a good result even be? The argument to the `open` call, or the object that the `write` method is called on? I can't see how doing either of these enables us to do anything useful...
So I looked closer at how JS uses `FileSystemWriteAccess`:
1. as sink for zip-slip: 7c51dff0f7/javascript/ql/src/semmle/javascript/security/dataflow/ZipSlipCustomizations.qll (L121)
2. as sink for downloading unsafe files (identified through their extension) through non-secure connections: 89ef6ea4eb/javascript/ql/src/semmle/javascript/security/dataflow/InsecureDownloadCustomizations.qll (L134-L150)
3. as sink for writing untrusted data to a local file 93b1e59d62/javascript/ql/src/semmle/javascript/security/dataflow/HttpToFileAccessCustomizations.qll (L43-L46)
for the 2 first sinks, it's important that `getAPathArgument` has a proper result... so that solves the problem, and highlights that it _can_ be important to give proper results for `getAPathArgument` (if possible).
So I'm trying to do best effort for `f = open(...); f.write(...)`, but with this current code we won't always be able to give a result (as highlighted by the tests). It will also be the case that there are multiple `FileSystemAccess` with the same path-argument, which could be a little strange.
overall, I'm not super confident about the way this new concept and implementation turned out, but it also seems like the best I could come up with right now...
The obvious alternative solution is to NOT make `FileSystemWriteAccess` a subclass of `FileSystemAccess`, but I'm not very tempted to go down this path, given the examples of this being useful above, and just the general notion that we should be able to model writes as being a specialized kind of `FileSystemAccess`.
2021-06-23 10:50:04 +02:00
Rasmus Wriedt Larsen
6a6d6fbe92
Python: Add leading space in some inline tests
2021-06-23 10:50:04 +02:00
Rasmus Wriedt Larsen
13609b2888
Python: Move pathlib tests to Python 3 only tests
2021-06-23 10:50:04 +02:00
Rasmus Wriedt Larsen
e2facd0981
Python: Expand cleartext query tests
2021-06-23 10:50:04 +02:00
Rasmus Wriedt Larsen
5506365b0e
Python: Split cleartext tests
2021-06-23 10:50:04 +02:00
Rasmus Wriedt Larsen
c0964617d7
Merge pull request #6111 from tausbn/python-a-few-minor-cleanups
...
Python: A few minor bits of cleanup
2021-06-23 10:42:41 +02:00
Erik Krogh Kristensen
6cf275bb36
update change-note
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-06-23 10:42:26 +02:00
Erik Krogh Kristensen
700dfcc3a7
add comment about why colors/safe is not safe
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-06-23 10:39:56 +02:00
Rasmus Wriedt Larsen
c77884b8c4
Python: Apply suggestions from code review
...
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com >
2021-06-23 10:37:06 +02:00
Rasmus Wriedt Larsen
ae841cdd9b
Python: Make import python private in Concepts.qll
...
Just a mistake that we have never caught on to
2021-06-23 10:32:36 +02:00
Mathias Vorreiter Pedersen
a611e76ed2
C++: Respond to review comments.
2021-06-23 10:28:00 +02:00
Erik Krogh Kristensen
8b5c285ac8
add support for the chokidar library
2021-06-23 09:59:34 +02:00