Commit Graph

19087 Commits

Author SHA1 Message Date
Robert Marsh
aad6d43423 C++: autoformat 2020-10-19 10:12:16 -07:00
Geoffrey White
8646d5c811 C++: Fix test failure (we no longer have taint flow from the size parameter). 2020-10-19 17:37:11 +01:00
luchua-bc
2c2aab6ffc Sensitive broadcast 2020-10-19 16:16:13 +00:00
Geoffrey White
541a449bc4 Merge branch 'main' into callderef 2020-10-19 17:15:33 +01:00
Rasmus Wriedt Larsen
98691fe8ec Python: Model fabric Group execution (version 2.x)
This required some thought for how to model that we're interested in subclasses
of `fabric.group.Group`, and not so much that class itself. Some thoughts:

---

After initially using this in `module Group`

    /** A reference to a subclass of `fabric.group.Group` */
    abstract class SubclassRef extends DataFlow::Node { }

    private class SubclassInstantiation extends SubclassInstanceSource, DataFlow::CfgNode {
      override CallNode node;

      SubclassInstantiation() { node.getFunction() = any(SubclassRef ref).asCfgNode() }
    }

with this in `module SerialGroup` and `module ThreadingGroup`:

    class ClassRef extends DataFlow::Node, fabric::group::Group::SubclassRef {
      ClassRef() { this = classRef(DataFlow::TypeTracker::end()) }
    }

I wasn't too much of fan of that approach. Since we probably need the `SubclassInstanceSource` anyway, and don't really have a specific use for `SubclassRef`, I just went with concrete (QL) subclasses of `SubclassInstanceSource` in each of the modules for the Python subclasses.

I really don't know what the best approach is, so I'm very open to suggestions. I think we'll really have to flesh this out for handling Django responses, since we're interested in the fact that some subclasses provide default values for the content-type, and keeping track of that is important for XSS (since there is no XSS if response is `text/plain`)
2020-10-19 18:09:11 +02:00
Rasmus Wriedt Larsen
f10456e35f Python: Model fabric task decorator (version 2.x) 2020-10-19 18:03:03 +02:00
Rasmus Wriedt Larsen
c671017252 Python: Model fabric Connection (version 2.x) 2020-10-19 18:03:02 +02:00
Rasmus Wriedt Larsen
f7502386e7 Python: Model fabric package (version 1.x) 2020-10-19 18:03:01 +02:00
Vadim Peretokin
aa578ed334 Update cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.cpp
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2020-10-19 16:58:17 +02:00
Geoffrey White
460fbea253 C++: Add some more cases. 2020-10-19 15:54:42 +01:00
Geoffrey White
6280b7d5d4 C++: Add the example code for IntMultToLong to the test. 2020-10-19 15:45:31 +01:00
Anders Schack-Mulligen
4ce41854a4 Merge pull request #4508 from smowton/smowton/fix/droid-webview-test-data
Fix test data for WebView experimental query
2020-10-19 16:29:20 +02:00
CodeQL CI
5ead4244fe Merge pull request #4450 from asgerf/js/angular
Approved by erik-krogh
2020-10-19 07:25:59 -07:00
Owen Mansel-Chan
77312a2859 List precision options more accurately 2020-10-19 15:08:19 +01:00
Chris Smowton
4fa2a79b41 Fix test data for WebView experimental query 2020-10-19 14:57:18 +01:00
Erik Krogh Kristensen
ce95676130 add express.csrf as an CSRF protecting middleware 2020-10-19 15:39:02 +02:00
Rasmus Wriedt Larsen
6b30198d59 Python: Port old fabric tests
For v1 tests, just extended with explicit calls that use keyword arguments.

For v2 tests, rewrote pretty much everything to what it 100% explicit what we support
2020-10-19 14:34:22 +02:00
CodeQL CI
d644a30b19 Merge pull request #4434 from erik-krogh/printAST
Approved by asgerf
2020-10-19 04:42:42 -07:00
Joe Farebrother
980fdd8dea Java: Update Guava version in test stubs and change note 2020-10-19 11:56:28 +01:00
Vadim Peretokin
f403c9d02c Update cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.cpp
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2020-10-19 12:49:32 +02:00
Erik Krogh Kristensen
ca0870da53 update expected output from InterfaceDefinition -> InterfaceDeclaration change 2020-10-19 12:36:48 +02:00
Joe Farebrother
227092e2ae Java: Minor corrections to comments
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
2020-10-19 11:16:33 +01:00
CodeQL CI
2e52cbeb4a Merge pull request #4499 from max-schaefer/js/module_compile
Approved by asgerf
2020-10-19 03:06:21 -07:00
Erik Krogh Kristensen
8f6165cd5f print synthetic constructors in PrintAst.ql 2020-10-19 11:10:14 +02:00
Erik Krogh Kristensen
5b1ed97d68 Update javascript/ql/src/semmle/javascript/TypeScript.qll
Co-authored-by: Asger F <asgerf@github.com>
2020-10-19 11:01:06 +02:00
Rasmus Lerchedahl Petersen
646ced2a1d Python: Add concept test scaffold 2020-10-19 10:58:57 +02:00
Rasmus Lerchedahl Petersen
f17720f587 Python: Add test and fix filename 2020-10-19 10:58:57 +02:00
Rasmus Lerchedahl Petersen
d76b2c0023 Python: Add concept and port query 2020-10-19 10:58:57 +02:00
Erik Krogh Kristensen
8c44392638 add local dataflow to js/template-syntax-in-string-literal 2020-10-19 10:58:40 +02:00
Max Schaefer
e1d90e90ad JavaScript: Add modelling for Module.prototype._compile. 2020-10-19 09:42:17 +01:00
Chris Smowton
3e03db178f Merge pull request #4483 from smowton/smowton/admin/droid-webview-pr-rebase
Rebase of #3706
2020-10-19 09:29:04 +01:00
Dave Bartolomeo
ece20cdb5e Merge branch 'main' into dbartol/temporaries/work 2020-10-18 13:11:06 -04:00
Mathias Vorreiter Pedersen
7942d7332a Merge pull request #4501 from dbartol/dbartol/PrintPartialFlow
C++: Annotate IR with partial flow info
2020-10-18 17:48:54 +02:00
Dave Bartolomeo
b73cb3a4ce Accept C# IR diffs 2020-10-18 11:11:05 -04:00
Dave Bartolomeo
2f34c78552 Fix formatting 2020-10-18 11:08:42 -04:00
Dave Bartolomeo
0b2acff837 Add upgrade script 2020-10-18 08:42:24 -04:00
Dave Bartolomeo
939bfae6e0 Fix formatting 2020-10-18 08:32:08 -04:00
Dave Bartolomeo
5f6ae32f1c Accept test output after merge 2020-10-17 18:16:21 -04:00
Dave Bartolomeo
129e250569 Update test expectations 2020-10-17 17:01:24 -04:00
Dave Bartolomeo
eb9cea48b8 Fix modeling of std::set::emplace 2020-10-17 17:00:29 -04:00
Dave Bartolomeo
40cd96eb1d Merge from main 2020-10-17 15:14:26 -04:00
Dave Bartolomeo
4e0afb0dc3 Print targets of Load and Store instructions in IR dump 2020-10-17 15:01:45 -04:00
Dave Bartolomeo
e4fdf699ad Accept improved test results 2020-10-17 14:33:10 -04:00
Dave Bartolomeo
4814dcf145 Print partial flow info in PrintIRLocalFlow.qll 2020-10-17 14:32:31 -04:00
Dave Bartolomeo
a80c6fbf97 C++: Print target variable name for Load and Store, if known
Now that we've started printing the targets of `Call` instructions in the IR dumps, I figured I might as well print the names of the variable being loaded or stored as well. We could potentially extend this to match fields, array elements, etc., but that's quite a bit more work.
2020-10-17 14:21:27 -04:00
Dave Bartolomeo
100f13f202 C++: Annotate IR with partial flow info
I've added one more property to the annotations provided by `PrintIRLocalFlow.qll`: The `pflow` property will now be emitted for any operand or instruction for which `configuration.hasPartialFlow` determines that there is partial flow to that node. This requires that partial flow be enabled via overriding `Configuration::explorationLimit()` in order to display. Otherwise, you'll still just get the local flow info as before.
2020-10-17 13:17:08 -04:00
Dave Bartolomeo
1dae8f62c1 Model copy-ish constructors for std::pair 2020-10-17 11:33:20 -04:00
Dave Bartolomeo
1b53c4684d Fix test expectations due to pair/make_pair fixes 2020-10-17 09:46:18 -04:00
Dave Bartolomeo
686f5aa8ed Handle parameter indirections in make_shared and make_unique 2020-10-17 08:53:55 -04:00
Dave Bartolomeo
7da4eef90d Fix subtle typing issue with std::makr_pair 2020-10-17 08:53:20 -04:00