Andrew Eisenberg
cce8bed59e
Adds the mog action
...
The mog action will add a `merge-on-green` label to a PR if a user adds a comment that contains the word "MOG" in it.
2020-07-27 14:16:05 -07:00
Tom Hvitved
c5a4a6be05
Merge pull request #3871 from hvitved/csharp/autobuilder/dotnet-delegate
...
C#: Introduce delegate type in autobuilder
2020-07-27 16:51:24 +02:00
Taus
f40242dc3f
Merge pull request #3396 from porcupineyhairs/python-ssti
...
Python : Add query to detect Server Side Template Injection
2020-07-27 14:43:39 +02:00
Tom Hvitved
f5c1de8a17
Merge pull request #3960 from calumgrant/cs/tag-inefficient-containskey
...
C#: Fix tags typo
2020-07-27 11:44:58 +02:00
Calum Grant
09f45ac9fe
Merge pull request #3877 from calumgrant/cs/autobuilder-alerts
...
C#: Make fields readonly
2020-07-27 10:43:04 +01:00
Porcupiney Hairs
7a71ca3e0f
fix tests.
2020-07-24 00:57:19 +05:30
Rasmus Wriedt Larsen
c49311e69e
Python: Fix JinjaSSTISinks.expected
2020-07-23 20:11:27 +02:00
Rasmus Wriedt Larsen
03d22fa8e3
Python: Fix filenames in qhelp
2020-07-23 17:32:01 +02:00
Rasmus Wriedt Larsen
e283d289fd
Python: Update TemplateInjection.qhelp
...
Moved things around so there is only a single `<example>` tag (and had to rewrite contents a bit).
2020-07-23 17:23:26 +02:00
Porcupiney Hairs
1e7921e575
add qhelp and fix tests.
2020-07-23 20:04:32 +05:30
porcupineyhairs
8e85dc755a
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-07-23 19:37:40 +05:30
semmle-qlci
bb5b161d72
Merge pull request #3972 from shati-patel/merge-rc
...
Approved by mchammer01
2020-07-23 11:30:45 +01:00
Shati Patel
2326f31749
Merge branch 'rc/1.24' into merge-rc
2020-07-23 12:18:30 +02:00
Rasmus Wriedt Larsen
a97f942a17
Python: Autoformat
2020-07-23 11:38:34 +02:00
Felicity Chapman
40c998fa13
Merge pull request #3969 from alexey-tereshenkov-oxb/master
...
Python: Fix typo in qhelp file
2020-07-23 10:37:37 +01:00
Mathias Vorreiter Pedersen
a4242bcb5d
Merge pull request #3962 from rdmarsh2/ir-barrierguard-checks-expr
...
C++: make IR BarrierGuard::checks match AST
2020-07-23 09:21:37 +02:00
Alexey Tereshenkov
7840dfce3b
Put the closing tag back
2020-07-22 20:51:29 +01:00
Alexey Tereshenkov
e2939377e9
Update python/ql/src/Expressions/WrongNumberArgumentsForFormat.qhelp
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-07-22 20:07:34 +01:00
Alexey Tereshenkov
a6eb3caa5f
Update python/ql/src/Expressions/WrongNumberArgumentsForFormat.qhelp
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-07-22 20:07:27 +01:00
Alexey Tereshenkov
a5f566b563
Fix typo
2020-07-22 15:39:50 +01:00
Rasmus Wriedt Larsen
91e6222662
Python: Fix SSTI query by importing UntrustedStringKind
...
Without a concrete ExternalStringKind class, there will be no flow for
ExternalStringKind by default.
2020-07-21 18:01:27 +05:30
Rasmus Wriedt Larsen
9dbd280d31
Python: Fix syntax error
2020-07-21 18:01:27 +05:30
Porcupiney Hairs
49df4169cf
Python : Add query to detect Server Side Template Injection
2020-07-21 18:01:27 +05:30
Robert Marsh
0bb6d0c7ca
C++: make IR BarrierGuard::checks match AST
2020-07-17 15:43:57 -07:00
Calum Grant
79f412ff54
C#: Fix tags typo
2020-07-17 15:30:33 +01:00
Geoffrey White
2e5af67626
Merge pull request #3952 from MathiasVP/output-parameter-index-for-UserDefinedFormattingFunction
...
C++: Add getOutputParameterIndex override to UserDefinedFormattingFunction class.
2020-07-15 18:11:09 +01:00
Nick Rolfe
c7b668193b
Merge pull request #3929 from igfoo/static_assert
...
C++: Give static assertions an enclosing element
2020-07-15 18:03:26 +01:00
Mathias Vorreiter Pedersen
289a908eb8
C++: Update qldoc in reponse to PR comments
2020-07-15 16:24:47 +02:00
Mathias Vorreiter Pedersen
c4b97a3a62
C++: Accept more test changes
2020-07-15 16:19:51 +02:00
Mathias Vorreiter Pedersen
edc33b6516
C++: Add getOutputParameterIndex override to UserDefinedFormattingFunction and accept test changes
2020-07-15 14:46:08 +02:00
Mathias Vorreiter Pedersen
d711c22cd2
C++: Add testcase demonstrating lost query results
2020-07-15 14:42:45 +02:00
Robert Marsh
7dd2677746
Merge pull request #3950 from MathiasVP/simple-range-analysis-unsigned-multiplication-tests
...
C++: Add test cases for range analysis for unsigned multiplication
2020-07-14 14:18:06 -07:00
Mathias Vorreiter Pedersen
174b30461a
C++: Fix syntax error in testfile
2020-07-14 19:47:21 +02:00
Calum Grant
dcff87fb2e
Merge pull request #3366 from hvitved/csharp/dataflow/arrays
...
C#: Precise data-flow for collections
2020-07-14 17:12:29 +01:00
Mathias Vorreiter Pedersen
834ad92453
C++: Add test cases for unsigned multiplication and fix missing return value in existing tests
2020-07-14 16:57:47 +02:00
semmle-qlci
0bee0687cb
Merge pull request #3911 from RasmusWL/python-call-graph-tracing
...
Approved by tausbn
2020-07-14 15:33:45 +01:00
Ian Lynagh
616bad7b5c
C++: Add an upgrade script
2020-07-14 13:53:46 +01:00
Ian Lynagh
c254de464a
C++: Update stats following static_asserts change
2020-07-14 13:53:01 +01:00
Rasmus Wriedt Larsen
f1601d643a
Python: autoformat
2020-07-14 14:12:56 +02:00
Rasmus Wriedt Larsen
1d9c3b3bcd
Python: call-graph tracing: callable => callee
...
to use consistent naming
2020-07-14 14:12:02 +02:00
semmle-qlci
f8c03dcae6
Merge pull request #3924 from RasmusWL/python-metrics-queries-for-dist-compare
...
Approved by tausbn
2020-07-14 13:03:02 +01:00
Rasmus Wriedt Larsen
ee42d0839e
Python: Rename target => callee
...
To use a standardised naming :)
2020-07-14 11:26:05 +02:00
Rasmus Wriedt Larsen
d913d33289
Python: Autoformat
2020-07-14 11:21:55 +02:00
Taus
ee13e87f3b
Merge pull request #3947 from RasmusWL/python-fix-tests
...
Python: Make experimental/library-tests/CallGraph pass for Python 2
2020-07-13 22:10:34 +02:00
Arthur Baars
67b6018079
Merge pull request #3729 from luchua-bc/java-hardcoded-aws-credentials
...
Java: Hardcoded AWS credentials
2020-07-13 18:04:42 +02:00
Rasmus Wriedt Larsen
dc7d92ba2f
Python: Autoformat experimental/library-tests/CallGraph/
2020-07-13 16:20:02 +02:00
Rasmus Wriedt Larsen
83bd14b687
Python: Make experimental/library-tests/CallGraph pass for Python 2
...
The import doesn't actually work the intended way, so running
```
$ python python/ql/test/experimental/library-tests/CallGraph/test.py
```
will procude no output. but our extractor will extract the things we need, so
for a quick fix this will need to suffice.
2020-07-13 14:52:28 +02:00
luchua-bc
12803f1f53
Merge Hardcoded AWS Credentials check into the mail source folder
2020-07-13 12:22:34 +00:00
Geoffrey White
6519629472
Merge pull request #3942 from MathiasVP/remove-abstract-preprocessor
...
C++: Remove abstract classes from Preprocessor.qll
2020-07-13 10:00:50 +01:00
Rasmus Wriedt Larsen
3127bb27d0
Python: Remove strange empty line
2020-07-13 10:55:43 +02:00
Rasmus Wriedt Larsen
0b6c3ff99d
Python: Don't use PointsTo module name in metrics query
...
To avoid confusion with the normal PointsTo module in
python/ql/src/semmle/python/pointsto/PointsTo.qll
2020-07-13 10:46:03 +02:00
Rasmus Wriedt Larsen
a7d23063de
Python: Fix grammar
...
Co-authored-by: Taus <tausbn@github.com >
2020-07-13 10:44:19 +02:00
Mathias Vorreiter Pedersen
d6da318645
C++: Remove abstract classes from Preprocessor.qll
2020-07-10 21:55:14 +02:00
Dave Bartolomeo
912c50a881
Merge pull request #3937 from MathiasVP/replace-result-type-with-ir-result-type
...
C++: Replace getResultType() with getResultIRType()
2020-07-10 13:37:30 -04:00
Geoffrey White
456a05ecd5
Merge pull request #3940 from MathiasVP/remove-abstract-stmt
...
C++: Remove abstract classes and predicates from Stmt.qll
2020-07-10 16:41:45 +01:00
Mathias Vorreiter Pedersen
7cc83da97a
C++: Remove @stmt_while from the TConditionalStmt union type.
2020-07-10 15:51:34 +02:00
Taus
df3eb9f9c5
Merge pull request #3790 from RasmusWL/python-add-annotated-callgraph-tests
...
Python: Add annotated call-graph tests
2020-07-10 15:38:38 +02:00
Geoffrey White
2941f413f9
Merge pull request #3931 from aeisenberg/aeisenberg/cpp-print-ast
...
Add the printAst.ql contextual query for C++
2020-07-10 14:08:25 +01:00
Mathias Vorreiter Pedersen
567984af3d
C++: Remove abstract classes from Stmt.qll
2020-07-10 14:21:56 +02:00
Anders Schack-Mulligen
a1d272e870
Merge pull request #3918 from aibaars/organise-container-flow
...
Java: Clean up ContainerFlow, consider more methods
2020-07-10 14:19:44 +02:00
Arthur Baars
43b61038e9
Drop Map.merge as taint step
2020-07-10 13:00:14 +02:00
Robert Marsh
05685cc896
Merge pull request #3919 from dbartol/dbartol/IgnoreAutoBuilder
...
C++: Add `.gitignore` for autobuilder
2020-07-09 15:02:52 -07:00
Andrew Eisenberg
782759d58e
Add the printAst.ql contextual query for C++
...
This query will be used by the VS Code extension for viewing
ASTs of C/C++ files.
2020-07-09 08:28:49 -07:00
Arthur Baars
0d33a77ee3
Fix modelling of Stack.push
...
Stack.push(E) returns its argument, it does not propagate taint from
the stack to the return value.
2020-07-09 16:16:29 +02:00
Anders Schack-Mulligen
879551fc6a
Merge pull request #3936 from aibaars/object-clone
...
Java: model Object.clone
2020-07-09 16:09:01 +02:00
Anders Schack-Mulligen
c8b9b779ae
Merge pull request #3927 from rvermeulen/java-importable-cwe-601
...
Java: Move `UrlRedirectSink` into importable library
2020-07-09 16:03:29 +02:00
Anders Schack-Mulligen
99a4f8fd0b
Merge pull request #3926 from rvermeulen/java-importable-cwe-089
...
Java: Move `QueryInjectionSink` into importable library
2020-07-09 16:00:56 +02:00
Mathias Vorreiter Pedersen
002f930dba
C#: Sync identical files
2020-07-09 15:54:42 +02:00
Jonas Jensen
2fa54552f0
Merge pull request #3914 from geoffw0/cc_followup
...
C++: Repair swap taint tests
2020-07-09 15:54:40 +02:00
Mathias Vorreiter Pedersen
85a8280b30
C++: Replace getResultType() with getResultIRType() in IR dataflow
2020-07-09 15:54:15 +02:00
Mathias Vorreiter Pedersen
7029739691
C++: Replace getResultType() with getResultIRType() in IR range analysis
2020-07-09 15:53:54 +02:00
Mathias Vorreiter Pedersen
a405a95b68
C++: Introduce isSigned() and isUnsigned() predicates on IRIntegerType to mirror IntegralType
2020-07-09 15:52:09 +02:00
Jonas Jensen
277185a792
Merge pull request #3925 from geoffw0/rangefixup
...
C++: Add getFullyConverted() where missing in SimpleRangeAnalysis
2020-07-09 15:45:58 +02:00
Remco Vermeulen
7428a8cd95
Add missing java import
2020-07-09 15:06:26 +02:00
Remco Vermeulen
d3db4fa5b2
Add missing java import
2020-07-09 15:04:16 +02:00
Remco Vermeulen
54d6c8b5f4
Mark ServletUrlRedirectSink private
2020-07-09 15:03:51 +02:00
Arthur Baars
e183171fea
Java: model Object.clone
2020-07-09 14:50:29 +02:00
Remco Vermeulen
1212feab28
Add file-level qldoc
2020-07-09 14:11:59 +02:00
Remco Vermeulen
99228d8bc2
Optimize imports
2020-07-09 14:09:39 +02:00
Remco Vermeulen
ba9f3e2a1e
Join ServletUrlRedirectSink with UrlRedirectSink
2020-07-09 14:08:43 +02:00
Remco Vermeulen
88f4b224c3
Extend UrlRedirectSink from DataFlow::Node
2020-07-09 14:05:54 +02:00
Remco Vermeulen
f8078f1125
Remove superfluous imports
2020-07-09 13:43:10 +02:00
Arthur Baars
d3d58795f1
Java: ContainerFlow add comments
...
Some method variants are captured by a super class. Added some comments
to indicate where this happens to make review of missing methods easier
in the future.
2020-07-09 12:46:57 +02:00
semmle-qlci
e167b87150
Merge pull request #3932 from max-schaefer/portals-additions
...
Approved by esbena
2020-07-09 11:43:45 +01:00
Remco Vermeulen
9a84abf259
Generalize QueryInjectionSink
...
Extends from the more general DataFlow::Node instead of
DataFlow::ExprNode
2020-07-09 12:32:17 +02:00
Arthur Baars
24c6e506aa
Java: ContainerFlow: RValue -> Expr
...
While most flow for a qualifierToArgumentStep goes through a variable use
this is not always the case. Therefore it is best to remove the restriction
to RValue to allow taint steps to use postupdate nodes.
See also: ba86dea657
2020-07-09 12:20:48 +02:00
Arthur Baars
0bd103ac05
Java: add tests for Container taint steps
2020-07-09 12:15:38 +02:00
Rasmus Wriedt Larsen
e7c89dc24b
Python: Fix grammar
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-07-09 10:39:58 +02:00
Remco Vermeulen
c01844a39e
Add file-level qldoc
2020-07-09 10:30:31 +02:00
Max Schaefer
7a1410e0d5
JavaScript: Update and expand tests.
2020-07-09 09:25:52 +01:00
Remco Vermeulen
42e261ac02
Move SqlInjectionSink and PersistenceQueryInjectionSink
...
Join SqlInjectionSink and PersistenceQueryInjectionSink with
QueryInjectionSink to make its definition more transparent.
2020-07-09 10:21:24 +02:00
Remco Vermeulen
d07d21c9e2
Fix import
2020-07-09 10:20:53 +02:00
Anders Schack-Mulligen
777dc6305c
Merge pull request #3893 from aibaars/set-map-list-copy-of
...
Java: model some new Set,List,Map methods
2020-07-09 10:18:12 +02:00
Max Schaefer
1c47260bde
JavaScript: Add support for global variables to portals.
2020-07-09 09:12:56 +01:00
Max Schaefer
c40ef0556a
JavaScript: Broaden scope of imports considered relevant to portals.
...
Previously, we only considered an import relevant to portals if the path it imported was declared as a dependency. This falls down for deep imports where a specific module inside the package is imported rather than the default entry point, for imports of built-in modules like `fs`, and in cases where a developer simply forgets to declare a dependency.
So instead we now consider all imports relevant whose path does not start with a dot or a slash.
2020-07-09 09:09:44 +01:00
Max Schaefer
8b4b5781e6
JavaScript: Add utility predicate getBasePortal(i).
...
This iterates the existing `getBasePortal()` predicate `i` times.
2020-07-09 09:08:18 +01:00
Robert Marsh
0e66d0892b
Merge pull request #3785 from MathiasVP/dataflow-operand-nodes
...
C++: Operands as dataflow nodes
2020-07-08 14:50:54 -07:00
Arthur Baars
6367eb9ee8
Address review comments
2020-07-08 22:08:27 +02:00
Ian Lynagh
71b70b4bd0
C++: Give static_assert's an enclosing element
2020-07-08 17:10:43 +01:00
Remco Vermeulen
170be9ffe8
Move UrlRedirectSink into importable library
...
- The `UrlRedirect` class is renamed to `ServletUrlRedirect`.
- Abstract class `UrlRedirectSink` is defined that can be imported and
used to customise CWE-601 via Customizations.qll
2020-07-08 16:47:51 +02:00
Jonas Jensen
0bbbfe58cf
Merge pull request #3916 from geoffw0/cc_followup2
...
C++: Add missing constructor taint test
2020-07-08 16:35:47 +02:00
Remco Vermeulen
06517c6f82
Move QueryInjectionSink into importable library
...
This enables defining of new sinks to customise the CWE-089 queries.
2020-07-08 16:24:06 +02:00
Arthur Baars
e8f216c761
Merge remote-tracking branch 'upstream/master' into set-map-list-copy-of
2020-07-08 15:11:13 +02:00
Anders Schack-Mulligen
bf5c5297d3
Merge pull request #3897 from aibaars/util-objects
...
Java: data flow for `java.util.Objects`
2020-07-08 15:07:50 +02:00
Anders Schack-Mulligen
528f250af3
Merge pull request #3653 from lcartey/java/improve-spring-support
...
Java: Improve modelling of Spring requests, flow steps and XSS sinks
2020-07-08 15:00:14 +02:00
Luke Cartey
443c13d516
Merge pull request #2 from aschackmull/java/spring-3653-2
...
Java: Fix qltests for https://github.com/github/codeql/pull/3653
2020-07-08 13:19:45 +01:00
Anders Schack-Mulligen
b88ebd69c1
Java: Fix OgnlInjection qltest
2020-07-08 14:12:27 +02:00
Anders Schack-Mulligen
a4fe4f41b9
Java: Fix JndiInjection qltest
2020-07-08 14:09:08 +02:00
Anders Schack-Mulligen
581d496167
Java: Fix LdapInjection qltest
2020-07-08 14:04:01 +02:00
Arthur Baars
72a24972e7
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-07-08 13:30:24 +02:00
Rasmus Wriedt Larsen
32219e58c0
Python: Add basic call-graph metric queries
...
For use with dist-compare
2020-07-08 13:29:54 +02:00
Anders Schack-Mulligen
48e4759632
Merge branch 'master' into java/spring-3653-2
2020-07-08 13:06:51 +02:00
semmle-qlci
6ef7288848
Merge pull request #3922 from aschackmull/java/stub-cleanup
...
Approved by aibaars
2020-07-08 12:04:39 +01:00
Geoffrey White
61dfebceb9
C++: Add getFullyConverted() as suggested.
2020-07-08 11:28:39 +01:00
Anders Schack-Mulligen
b38839e84e
Merge pull request #3920 from Marcono1234/patch-3
...
Improve VariableAssign.getSource documentation
2020-07-08 10:25:13 +02:00
Anders Schack-Mulligen
6eac8e82a3
Java: Consolidate spring-ldap-2.3.2 stubs.
2020-07-08 10:08:44 +02:00
Anders Schack-Mulligen
40b9d34ab9
Java: Consolidate springframework-5.2.3 stubs
2020-07-08 09:57:48 +02:00
Anders Schack-Mulligen
c166fee198
Merge pull request #3894 from aibaars/util-arrays
...
Java: model taint for java.util.Arrays
2020-07-08 09:06:40 +02:00
Marcono1234
00a61816c0
Improve VariableAssign.getSource documentation
2020-07-07 22:37:58 +02:00
Dave Bartolomeo
6f7a8d029c
C++: Move .gitignore into autobuilder directory
...
On second thought, I'm going to make this apply only to the AutoBuilder directory. C# has it in the root of `csharp`, but they need it for their extractor as well.
2020-07-07 16:31:46 -04:00
Dave Bartolomeo
d3bcc1dae4
C++: Add .gitignore for autobuilder
...
C# has its own additional `.gitignore` to ignore the output files of the AutoBuilder build. Now that we have our own AutoBuilder in C++, we need the same thing.
2020-07-07 16:27:43 -04:00
Taus
548fceb306
Merge pull request #3917 from RasmusWL/python-fix-experimental-tests
...
Python: Fix experimental tests
2020-07-07 22:05:47 +02:00
Arthur Baars
441bf98ce7
Java: add Vector::copyInto, BlockingQueue::drainTo
2020-07-07 20:35:02 +02:00
Arthur Baars
c9ae2c8b2c
Java: ContainerFlow: organize taintPreservingArgumentToQualifier
2020-07-07 20:32:10 +02:00
Arthur Baars
5d73b99fd1
Java: ContainerFlow: organize taintPreservingQualifierToMethod
2020-07-07 19:53:11 +02:00
Rasmus Wriedt Larsen
7306f58e57
Python: Fix experimental tests
2020-07-07 19:44:43 +02:00
Rasmus Wriedt Larsen
1d5ef381ae
Merge pull request #3915 from tausbn/python-qlformat-everything-again
...
Python: Autoformat everything using `qlformat`.
2020-07-07 18:48:05 +02:00
Arthur Baars
940fec5669
Drop taint tracking for Arrays.{deepToString,toString}
2020-07-07 17:26:49 +02:00
Arthur Baars
583f7f914e
Drop taint tracking for Arrays.{setAll, parallelSetAll, parallelPrefix}
2020-07-07 17:22:30 +02:00
Taus Brock-Nannestad
45eccb2521
Python: Fix test failures.
2020-07-07 17:01:17 +02:00
Geoffrey White
bc7c83a5d6
C++: Add taint test cases confirming that constructor definitions do no need to be present.
2020-07-07 16:01:13 +01:00
Arthur Baars
9cf6601d02
Java: Data flow for java.util.Objects
2020-07-07 16:58:22 +02:00
Ian Lynagh
22666dd46e
Merge pull request #3875 from igfoo/is_constexpr
...
C++: Accept test changes for is_constexpr
2020-07-07 15:47:28 +01:00
Taus
df4d145490
Merge branch 'master' into python-qlformat-everything-again
2020-07-07 16:33:21 +02:00
Jonas Jensen
32fcfcf97c
Merge pull request #3912 from aschackmull/location-doc
...
C++/C#/JavaScript/Python: Port Location qldoc update.
2020-07-07 15:54:34 +02:00
Taus Brock-Nannestad
f07a7bf8cf
Python: Autoformat everything using qlformat.
...
Will need subsequent PRs fixing up test failures (due to deprecated
methods moving around), but other than that everything should be
straight-forward.
2020-07-07 15:43:52 +02:00
Luke Cartey
3fef5cabf1
Merge pull request #1 from aschackmull/java/spring-3653
...
Java: Review changes for https://github.com/github/codeql/pull/3653
2020-07-07 12:07:33 +01:00
Anders Schack-Mulligen
67db1df00c
C++/C#/JavaScript/Python: Port Location qldoc update.
2020-07-07 11:39:27 +02:00
Rasmus Wriedt Larsen
42227c625d
Python: Fix grammar
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-07-07 11:33:54 +02:00
Rasmus Wriedt Larsen
27d1512a75
Python: MWE for call-graph tracing and ql comparison
2020-07-07 11:05:03 +02:00
Shati Patel
eaec2d722c
Merge pull request #3888 from shati-patel/go-docs
...
Learning CodeQL: Add new library modeling guide (Go)
2020-07-07 09:54:39 +01:00
Anders Schack-Mulligen
993506d781
Merge pull request #3820 from Marcono1234/patch-2
...
Add missing java.nio.file.Files methods to FileReadWrite.qll
2020-07-07 10:29:17 +02:00
Anders Schack-Mulligen
173e108606
Merge pull request #3907 from Marcono1234/patch-1
...
Java: Clarify documentation for Location predicate results
2020-07-07 07:58:39 +02:00
semmle-qlci
f2ce125e61
Merge pull request #3902 from Marcono1234/fix-outdated-query-links
...
Approved by shati-patel
2020-07-06 21:13:05 +01:00
Marcono1234
5649254dbd
Fix broken link formatting in introduce-libraries-java.rst
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-07-06 20:35:11 +02:00
Ian Lynagh
0d9b18dbd7
C++: Accept test changes for is_constexpr
...
Generated copy and move constructors may now be marked as constexpr.
2020-07-06 19:24:39 +01:00
Geoffrey White
0caa17ab10
C++: Test the new methods.
2020-07-06 18:47:56 +01:00
Geoffrey White
52e501c41d
C++: Extend the 'swap' taint tests with methods that do not have recognizable signatures (copy/move assignment).
2020-07-06 18:44:37 +01:00
Shati Patel
f98491a052
Apply suggestions from code review
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2020-07-06 18:30:01 +01:00
Marcono1234
0a9686709b
Fix wrong method name
2020-07-06 18:52:07 +02:00
semmle-qlci
fe0c5a9ea6
Merge pull request #3892 from asger-semmle/js/redirect-starts-with-sanitizer
...
Approved by esbena
2020-07-06 17:04:30 +01:00
Rasmus Wriedt Larsen
d00e7396c4
Python: Consistently use camelCase in annotated call-graph tests
2020-07-06 17:59:16 +02:00
Rasmus Wriedt Larsen
65c4e6c02a
Python: Disable class instantiation annotation for now
...
Adjusting test setup properly requires some deep thinking, and I don't think I'm
ready to do that right now. Added a TODO instead.
2020-07-06 17:48:15 +02:00
Rasmus Wriedt Larsen
cd8ea78420
Python: Autoformat
2020-07-06 17:34:19 +02:00
Rasmus Wriedt Larsen
9e252d5465
Python: Explain random example
2020-07-06 17:30:49 +02:00
Rasmus Wriedt Larsen
849159b279
Python: Unlimited import depth
2020-07-06 17:30:26 +02:00
Rasmus Wriedt Larsen
acfc62cad6
Python: Fix grammar
...
Co-authored-by: Taus <tausbn@gmail.com >
2020-07-06 17:21:29 +02:00
Anders Schack-Mulligen
f98460cfd0
Java: Use SpringHttpEntity class.
2020-07-06 16:54:20 +02:00
Anders Schack-Mulligen
ae21de90b6
Java: Misc grammar and formatting.
2020-07-06 16:19:42 +02:00
Anders Schack-Mulligen
b06d1c715a
Java: More qldoc and some formatting.
2020-07-06 16:04:14 +02:00
Marcono1234
6ff8508d01
Java: Clarify documentation for Location predicate results
2020-07-06 15:46:11 +02:00
semmle-qlci
6d80445f24
Merge pull request #3851 from erik-krogh/queryStuff
...
Approved by esbena
2020-07-06 14:40:41 +01:00
Anders Schack-Mulligen
5e9e7feddc
Java: Add some qldoc and minor formatting.
2020-07-06 15:39:20 +02:00
Anders Schack-Mulligen
e6658c5110
Java: Cleanup TaintTrackingUtil.qll
2020-07-06 15:35:16 +02:00
Erik Krogh Kristensen
9a944625d1
autoformat
2020-07-06 15:17:15 +02:00
Anders Schack-Mulligen
5d8f9a79f1
Java: Misc grammar fixes.
2020-07-06 14:50:33 +02:00
Anders Schack-Mulligen
a80e663ab5
Java: Minor typo fix and autoformat
2020-07-06 14:43:01 +02:00
Anders Schack-Mulligen
2ce0921935
Java: Clean up SpringHttp.qll
2020-07-06 14:35:53 +02:00
Anders Schack-Mulligen
2ae15f9ace
Java: Remove list, map, and StringReplaceMethod flow steps.
2020-07-06 14:19:13 +02:00
Anders Schack-Mulligen
a41c2d8abf
Java: Make a few predicates private and autoformat SpringController.
2020-07-06 14:18:16 +02:00
semmle-qlci
13c3513d76
Merge pull request #3905 from erik-krogh/unsafeShellTypo
...
Approved by esbena
2020-07-06 11:41:56 +01:00
Arthur Baars
f917b9e3cb
Merge pull request #3608 from aschackmull/java/backport-switchexpr-cfg-fix
...
Java: Backport missing CFG edge fix for switch expressions
2020-07-06 11:43:16 +02:00
Arthur Baars
d2734b2903
Merge pull request #3684 from aschackmull/java/javadoctag-qldoc
...
Java: Improve qldoc for JavadocTag.
2020-07-06 11:42:04 +02:00
Arthur Baars
98d24101b1
Merge pull request #3687 from aschackmull/java/getanenclosingstmt
...
Java: Add Expr.getAnEnclosingStmt.
2020-07-06 11:41:21 +02:00
semmle-qlci
73d606d2c3
Merge pull request #3844 from github/esbena-patch-3
...
Approved by erik-krogh
2020-07-06 09:47:59 +01:00
Erik Krogh Kristensen
8585312271
fix typo in js/shell-command-constructed-from-input
2020-07-06 10:33:49 +02:00
Marcono1234
2d9b52f750
Update query console links in source-locations.rst, replace deprecated predicates
...
Removes 'eclipse-cdt/cdt' and 'gradle/gradle' from the queried projects
because they cannot be queried currently, and instead queries all demo
projects which are currently available.
2020-07-05 22:32:53 +02:00
Marcono1234
7b4960c9a7
Update query console links in javadoc.rst
...
Removes 'gradle/gradle' from the queried projects because it cannot be
queried currently, and instead queries all demo projects which are currently
available.
2020-07-05 22:06:39 +02:00
Marcono1234
b835d7879c
Update query console links in introduce-libraries-java.rst
...
Removes 'eclipse-cdt/cdt' and 'gradle/gradle' from the queried projects
because they cannot be queried currently, and instead queries all demo
projects which are currently available.
2020-07-05 22:06:26 +02:00
Marcono1234
2b3b64cdbc
Update query console links in expressions-statements.rst
...
Removes 'eclipse-cdt/cdt' and 'gradle/gradle' from the queried projects
because they cannot be queried currently, and instead queries all demo
projects which are currently available.
2020-07-05 20:04:36 +02:00
Marcono1234
c10a598670
Update query console links in call-graph.rst
...
Removes 'eclipse-cdt/cdt' and 'gradle/gradle' from the queried projects
because they cannot be queried currently, and instead queries all demo
projects which are currently available.
2020-07-05 19:54:27 +02:00
Marcono1234
ab2456630c
Update query console links in annotations.rst
...
Removes 'eclipse-cdt/cdt' and 'gradle/gradle' from the queried projects
because they cannot be queried currently, and instead queries all demo
projects which are currently available.
2020-07-05 19:43:48 +02:00
Marcono1234
13ffd7307c
Update query console links in types-class-hierarchy.rst
...
Removes 'gradle/gradle' from the queried projects because it cannot be
queried currently, and instead queries all demo projects which are currently
available.
2020-07-05 19:20:42 +02:00
Marcono1234
f8e474f89a
Add missing java.nio.file.Files methods to FileReadWrite.qll
2020-07-05 18:39:26 +02:00
Arthur Baars
19a481f809
Java: Arrays: add tests
2020-07-03 17:15:17 +02:00
Arthur Baars
0b89efbee4
Java: model Arrays::addList
2020-07-03 17:15:17 +02:00
Arthur Baars
a07af79fff
Java: model java.util.Arrays
2020-07-03 17:15:17 +02:00
Arthur Baars
1485f7c876
Java: model some new Set,List,Map methods
...
Models the taint propagation for the copyOf(..),
of(..), ofEntries(..) and entry(..) methods
2020-07-03 17:14:53 +02:00
Max Schaefer
163257a6c5
Merge pull request #3891 from aibaars/exclude-experimental
...
CodeQL: exclude `experimental` queries from LGTM suites
2020-07-03 16:14:29 +01:00
Arthur Baars
c629f6b13a
Merge pull request #3869 from aibaars/util-collections
...
Java: model java.util.Collections
2020-07-03 17:09:14 +02:00
yoff
687bb4dfc8
Merge pull request #3890 from github/tausbn-add-paths-ignore-to-code-scanning-config
...
Code Scanning: Don't scan the Python directory.
2020-07-03 16:03:41 +02:00
Taus
01c4852360
Merge pull request #3701 from yoff/SharedDataflow
...
Python: Start using the shared data flow libraries
2020-07-03 16:03:20 +02:00
Asger Feldthaus
b5104ae42d
JS: Add StartsWith sanitizer
2020-07-03 14:46:07 +01:00
Asger Feldthaus
4c06eb8bfe
JS: Add test showing FPs
2020-07-03 14:45:42 +01:00
Rasmus Lerchedahl Petersen
fe9520b50b
Python: correct doc for toString
2020-07-03 15:04:54 +02:00
Arthur Baars
5fff41f35b
Don't track taint on Map keys
2020-07-03 14:47:25 +02:00
Rasmus Lerchedahl Petersen
33cf96ccb8
Python: Address review comments
2020-07-03 14:11:58 +02:00
Anders Schack-Mulligen
6de612a566
Java: Split SpringWebRequestGetMethod into its own class.
2020-07-03 14:06:54 +02:00
Arthur Baars
2b248fb24f
CodeQL: exclude queries from CodeScanning suites
2020-07-03 14:03:00 +02:00
Arthur Baars
bb01dbd2ae
CodeQL: exclude queries from LGTM suites
2020-07-03 14:01:20 +02:00
Taus
b99ec29f6e
Code Scanning: Additionally exclude Java and C++.
2020-07-03 13:56:25 +02:00
Taus
39bc978573
Code Scanning: Don't scan the Python directory.
...
... Possibly some of the other language teams want to get on this? 🙂
If so, give me a shout!
2020-07-03 13:46:30 +02:00
yoff
d201eb2c12
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-07-03 13:33:27 +02:00
yoff
59d611ddd5
Update python/ql/src/experimental/dataflow/internal/DataFlowPublic.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-07-03 13:32:03 +02:00
yoff
8891fbf006
Update python/ql/src/experimental/dataflow/internal/DataFlowPublic.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-07-03 13:31:38 +02:00
yoff
40a6728748
Update python/ql/src/experimental/dataflow/internal/TaintTrackingPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-07-03 13:30:10 +02:00
Rasmus Lerchedahl Petersen
e3666004cf
Python: add some links to readme
2020-07-03 10:37:38 +02:00
Shati Patel
45bd492161
Learning CodeQL: Add new library modeling guide (Go)
2020-07-03 08:10:44 +01:00
Rasmus Lerchedahl Petersen
a9e0288e5b
Python: exclude global vars from local flow
2020-07-03 08:41:10 +02:00
Rasmus Lerchedahl Petersen
bdc68ce6b6
Python: refactor Node class
2020-07-03 08:01:44 +02:00
Erik Krogh Kristensen
078b6a8df2
autoformat
2020-07-03 00:21:55 +02:00
semmle-qlci
04a0d47ab9
Merge pull request #3870 from hvitved/csharp/cfg/cond-out-param
...
Approved by calumgrant
2020-07-02 18:48:05 +01:00
Arthur Baars
5f2a5f1b55
Java: Collections: add tests
2020-07-02 19:18:02 +02:00
Calum Grant
03cc4e179e
C#: Make fields readonly
2020-07-02 17:47:17 +01:00
Taus
ba634af86e
Merge pull request #3362 from RasmusWL/python-keyword-only-args
...
Python: properly support keyword only arguments
2020-07-02 18:21:59 +02:00
Rasmus Lerchedahl Petersen
5f18fb427a
Python: update TODO
2020-07-02 16:20:38 +02:00
Erik Krogh Kristensen
261821b32c
Merge remote-tracking branch 'upstream/master' into queryStuff
2020-07-02 16:08:05 +02:00
semmle-qlci
b5c8f2238b
Merge pull request #3805 from esbena/js/seal-freeze-flow
...
Approved by asgerf
2020-07-02 13:54:54 +01:00
Rasmus Wriedt Larsen
513c2974bd
Merge branch 'master' into python-keyword-only-args
2020-07-02 14:48:32 +02:00
Erik Krogh Kristensen
2b0a091921
split out type-tracking into two predicates, to avoid catastrophic join-order
2020-07-02 14:28:28 +02:00
Rasmus Wriedt Larsen
b2f8638ff0
Python: Update dbscheme with new comment
2020-07-02 14:17:55 +02:00
Taus
eecc3ca5dd
Merge pull request #3503 from RasmusWL/python-fix-django-taint-sinks
...
Python: Fix django taint sinks
2020-07-02 13:32:35 +02:00
Tom Hvitved
7dfc584159
C#: Introduce delegate type in autobuilder
2020-07-02 13:29:49 +02:00
Tom Hvitved
527a099a26
C#: Fix CFG for conditional method calls with out parameters
2020-07-02 13:12:53 +02:00
Tom Hvitved
090205d9e9
C#: Add CFG test for conditional call to method with out parameter
2020-07-02 13:09:40 +02:00
Arthur Baars
21a4b8d6c0
Java: remove useless casts
2020-07-02 13:03:15 +02:00
Arthur Baars
d80bf3395f
Add Navigable variants and sort method names
2020-07-02 13:02:38 +02:00
semmle-qlci
97128b1475
Merge pull request #3829 from asger-semmle/js/xss-substr
...
Approved by erik-krogh
2020-07-02 11:58:32 +01:00
Arthur Baars
e7b495e7d3
Java: model Collections::addAll
2020-07-02 12:38:22 +02:00
Rasmus Wriedt Larsen
26b7a301d6
Merge branch 'master' into python-keyword-only-args
2020-07-02 12:27:02 +02:00
Arthur Baars
5cf5c77b09
Java: model java.util.Collections
2020-07-02 12:25:55 +02:00
Tom Hvitved
d01904d404
Merge pull request #3846 from hvitved/csharp/autobuilder-refactor
...
C#: Factor C++ parts out of autobuilder
2020-07-02 12:02:04 +02:00
Rasmus Wriedt Larsen
67be45f045
Merge branch 'master' into python-fix-django-taint-sinks
2020-07-02 11:55:42 +02:00
Rasmus Wriedt Larsen
9a82927187
Python: Autoformat
2020-07-02 11:54:41 +02:00
Rasmus Wriedt Larsen
a947d151e5
Python: Django changes now backwards compatible deprecation
2020-07-02 11:53:25 +02:00
Rasmus Wriedt Larsen
4a7bfbe091
Python: Use .matches instead of .indexOf() = 0
2020-07-02 11:43:23 +02:00
Anders Schack-Mulligen
50fee5c4a1
Merge pull request #3817 from Marcono1234/patch-1
...
Fix outdated query console link
2020-07-02 11:41:19 +02:00
semmle-qlci
0bf1f75274
Merge pull request #3850 from aschackmull/dataflow/doc
...
Approved by hvitved
2020-07-02 09:04:35 +01:00
semmle-qlci
bfb734e1d7
Merge pull request #3832 from asger-semmle/js/typescript-in-html-files3
...
Approved by erik-krogh
2020-07-02 08:30:45 +01:00
Anders Schack-Mulligen
c78427569e
Update docs/ql-libraries/dataflow/dataflow.md
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2020-07-02 09:24:33 +02:00
Jonas Jensen
2bd84a3a5e
Merge pull request #3865 from geoffw0/bufferwrite-fixup
...
C++: 'modelling' -> 'modeling' part 2.
2020-07-02 08:37:19 +02:00
Jonas Jensen
62a656de0f
Merge pull request #3860 from dbartol/codeql-c-analysis-team/40/2
...
C++: QLDoc cleanup
2020-07-02 08:32:44 +02:00
semmle-qlci
45ef3ec4a8
Merge pull request #3619 from erik-krogh/CWE022-Correctness
...
Approved by asgerf
2020-07-01 20:07:58 +01:00
Tom Hvitved
398a95c65f
C#: Remove unused field
2020-07-01 20:06:46 +02:00
Tom Hvitved
498ee9b5f5
C#: Factor C++ parts out of autobuilder
2020-07-01 20:06:46 +02:00
Geoffrey White
a260df9035
C++: 'modelling' -> 'modeling'.
2020-07-01 17:49:22 +01:00
Mathias Vorreiter Pedersen
bb9c8881d6
Merge pull request #3786 from geoffw0/bufferwritecleanup
...
C++: Clean up BufferWrite.qll
2020-07-01 18:33:26 +02:00
Dave Bartolomeo
f0215d1748
C++: Fix typo
2020-07-01 11:57:56 -04:00
Geoffrey White
8d8e47dc29
C++: QLDoc other straightforward model implementations.
2020-07-01 16:25:24 +01:00
Geoffrey White
e39c115746
C++: QLDoc Strcpy (as demanded by the tests).
2020-07-01 16:23:50 +01:00
semmle-qlci
66a6fe7317
Merge pull request #3853 from max-schaefer/js/canonical-names
...
Approved by asgerf
2020-07-01 16:08:59 +01:00
Rasmus Lerchedahl Petersen
0b11e77457
Python: make compile
2020-07-01 16:55:44 +02:00
Rasmus Lerchedahl Petersen
0175d5be0c
Sync dataflow files
2020-07-01 16:44:11 +02:00
Rasmus Lerchedahl Petersen
7fb97d75f4
Merge branch 'master' of github.com:github/codeql into SharedDataflow
...
to get updated dataflow files
2020-07-01 16:43:14 +02:00
Dave Bartolomeo
566d7fad63
C++: Autoformat some more
2020-07-01 10:14:35 -04:00
Shati Patel
6429fe48aa
Merge pull request #3862 from shati-patel/shati-patel-patch-1
...
Small terminology update
2020-07-01 14:58:50 +01:00
Max Schaefer
a6d8073987
JavaScript: Make getADefinition and getAnAccess available on all CanonicalNames.
2020-07-01 14:42:03 +01:00
Esben Sparre Andreasen
3ca6031ae5
JS: rename predicate
2020-07-01 15:27:28 +02:00
Esben Sparre Andreasen
75451e349a
JS: teach the dataflow library identity functions Object.freeze/seal
2020-07-01 15:27:28 +02:00
Esben Sparre Andreasen
33c52761d4
JS: more dataflow and global access path testing
2020-07-01 15:26:25 +02:00
Anders Schack-Mulligen
20aed81476
Merge pull request #3863 from intrigus-lgtm/patch-2
...
Fix typo, add Oxford comma
2020-07-01 15:01:49 +02:00
Tom Hvitved
9e3a6e8d5e
Merge remote-tracking branch 'upstream/master' into csharp/dataflow/arrays
2020-07-01 14:50:26 +02:00
intrigus-lgtm
cabd275baa
Fix typo, add Oxford comma
2020-07-01 14:49:09 +02:00
Anders Schack-Mulligen
4aac70d3da
Dataflow: update doc based on review.
2020-07-01 14:45:49 +02:00
Shati Patel
5af5f40ae1
Small terminology update
2020-07-01 13:41:50 +01:00
Anders Schack-Mulligen
7d057598d8
Merge pull request #3857 from jbj/flowthrough-bigstep-perf
...
C++: Remove big-step relation in flow-through code
2020-07-01 14:23:23 +02:00
Jonas Jensen
50cd759718
Merge pull request #3733 from geoffw0/models5
...
C++: Constructor and assignment models
2020-07-01 13:58:27 +02:00
Erik Krogh Kristensen
3157cd724d
add noSQL tests for type-tracking req.query
2020-07-01 11:45:09 +02:00
Erik Krogh Kristensen
bace2994c3
add test for type-tracking req.params
2020-07-01 11:38:54 +02:00
Anders Schack-Mulligen
38b73ff684
Merge pull request #3854 from hvitved/dataflow/node-type-interface
...
Data flow: Replace `getErasedRepr()` and `Node::getTypeBound()` with `getNodeType()`
2020-07-01 11:37:19 +02:00
Erik Krogh Kristensen
8227010463
also use new type-tracking in isUserControlledObject
2020-07-01 11:32:51 +02:00
Rasmus Lerchedahl Petersen
79e4f1ee93
Python: Enable consistency check (currently fails)
2020-07-01 09:21:36 +02:00
semmle-qlci
ef109d91ed
Merge pull request #3842 from hvitved/csharp/dataflow/remove-viable-impl
...
Approved by aschackmull
2020-07-01 08:14:57 +01:00
Tom Hvitved
ed2077b2f4
Merge pull request #3841 from gavinl/master
...
QHELP: Encryption using ECB.qhelp grammar
2020-07-01 08:45:35 +02:00
Dave Bartolomeo
10bbd566d4
C++: Autoformat
2020-07-01 02:28:53 -04:00
Rasmus Lerchedahl Petersen
7787900bed
Python: make compile and simplify
2020-07-01 07:36:00 +02:00
Rasmus Lerchedahl Petersen
825f24a953
Python: simplify according to review comments
2020-07-01 07:20:26 +02:00
Rasmus Lerchedahl Petersen
3388ca44ed
Python: sync dataflow library
2020-07-01 07:16:59 +02:00
Rasmus Lerchedahl Petersen
e259281821
Merge branch 'master' of github.com:github/codeql into SharedDataflow
...
to receive updates from data flow library
2020-07-01 07:15:32 +02:00
Robert Marsh
e9777913a3
Merge pull request #3856 from geoffw0/qldoc5follow
...
C++: Make getSecureAlgorithmRegex() work as expected.
2020-06-30 16:17:37 -07:00
Dave Bartolomeo
6592f8c1bb
C++: QLDoc cleanup
...
This PR just fixes a few bits of PR feedback from my previous QLDoc PR.
2020-06-30 17:33:52 -04:00
Jonas Jensen
cff0f48d34
C++: Work around join-order issue in flow-through
...
In this non-linear recursion, a `#prev` relation was joined earlier than
the `#prev_delta` relation. As a result, each iteration of the predicate
processes every tuple from previous iterations.
This quadratic behavior caused severe slowdowns on oneapi-src/oneDNN.
2020-06-30 21:12:57 +02:00
Jonas Jensen
17beb2d867
C++: Remove big-step relation in flow-through code
...
This relation was originally introduced to improve performance but may
no longer be necessary. The `localFlowStepPlus` predicate had an
explosion of tuples on oneapi-src/oneDNN for C++.
2020-06-30 21:06:45 +02:00
Geoffrey White
8bdcc47a50
C++: Add a test.
2020-06-30 17:46:08 +01:00
Geoffrey White
54b8f8e662
C++: Make getSecureAlgorithmRegex() return a single regexp as expected, and as getInsecureAlgorithmRegex() does.
2020-06-30 16:51:16 +01:00
Mathias Vorreiter Pedersen
286c09183f
Merge pull request #3837 from geoffw0/qldoc5
...
C++/Java: Update QLDoc and terminology in Encryption.qll
2020-06-30 17:44:59 +02:00
Mathias Vorreiter Pedersen
cb39525f3b
Merge pull request #3847 from nickrolfe/71-this-followup
...
C++: make MemberFunction::getTypeOfThis() return PointerType
2020-06-30 17:44:32 +02:00
Tom Hvitved
f1179cc202
Java: Follow-up changes
2020-06-30 17:44:16 +02:00
Tom Hvitved
de3dc734ff
C++: Follow-up changes
2020-06-30 17:44:16 +02:00
Tom Hvitved
1fa58bd82d
Data flow: Sync files
2020-06-30 17:37:16 +02:00
Tom Hvitved
6bcb8a3a5b
C#: Replace getErasedRepr() and getTypeBound() with getNodeType()
2020-06-30 17:37:16 +02:00
James Fletcher
8ff8b3e22c
Merge pull request #3852 from jf205/1.24-mergeback
...
1.24 -> master mergeback
2020-06-30 16:21:49 +01:00
Jonas Jensen
63de58c557
Merge pull request #3819 from dbartol/codeql-c-analysis-team/40/2
...
C++: More IR QLDoc (including `Opcode.qll`)
2020-06-30 17:09:15 +02:00
yoff
989b57c51d
Merge pull request #3822 from tausbn/python-document-internal-ast-classes
...
Python: Document internal AST classes.
2020-06-30 16:48:14 +02:00
james
5a929def95
Merge branch 'rc/1.24' into 1.24-mergeback
2020-06-30 15:44:29 +01:00
James Fletcher
d5c6433245
Merge pull request #3849 from asger-semmle/js/vue-support-rc
...
JS: Add Vue to list of supported frameworks
2020-06-30 15:43:04 +01:00
Jonas Jensen
4a5299e368
Merge pull request #3843 from geoffw0/qldoc6
...
C++: Bit more QLDoc
2020-06-30 16:21:37 +02:00
Erik Krogh Kristensen
ed48efe5b4
recognize access to a query object through function calls
2020-06-30 15:52:08 +02:00
semmle-qlci
224289c55f
Merge pull request #3845 from max-schaefer/js/walk-sync
...
Approved by asgerf
2020-06-30 14:45:41 +01:00
Geoffrey White
cf75397ef1
Java: Rename tests.
2020-06-30 14:33:05 +01:00
Geoffrey White
3bdfab8d8c
C++: Autoformat.
2020-06-30 14:12:34 +01:00
Anders Schack-Mulligen
4dabbac19b
Dataflow: Add documentation language maintainers.
2020-06-30 14:57:56 +02:00
Asger Feldthaus
472501bd6f
JS: Add Vue to list of supported frameworks
2020-06-30 13:47:25 +01:00
Nick Rolfe
09e13ca2f2
C++: make MemberFunction::getTypeOfThis() return PointerType
...
The dbscheme technically allows for any Type, but in practice it will
always be a PointerType, so this should make it easier for users to
understand.
2020-06-30 13:45:21 +01:00
Matthew Gretton-Dann
ab876b8b78
Merge pull request #3814 from nickrolfe/71-this
...
C++: add MemberFunction::getTypeOfThis()
2020-06-30 13:31:14 +01:00
semmle-qlci
42bca1a3fa
Merge pull request #3824 from asger-semmle/js/static-regexp-capture-group-step
...
Approved by erik-krogh, esbena
2020-06-30 13:20:14 +01:00
semmle-qlci
c850938af0
Merge pull request #3833 from asger-semmle/js/vue-class-component
...
Approved by erik-krogh
2020-06-30 13:16:42 +01:00
semmle-qlci
15a0297ca2
Merge pull request #3834 from asger-semmle/js/vue-classification
...
Approved by erik-krogh
2020-06-30 13:14:25 +01:00
Geoffrey White
5c11c9ee43
Java: Rename additional private predicates.
2020-06-30 13:05:46 +01:00
Geoffrey White
f8425b8a58
Java: Update uses.
2020-06-30 13:02:48 +01:00
Geoffrey White
db0500b9ef
Java: Direct port of changes to Java.
2020-06-30 13:02:48 +01:00
Geoffrey White
51db1475ff
Apply suggestions from code review
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-06-30 12:42:12 +01:00
Geoffrey White
4c088b19ad
C++: Delete outdated bit.
2020-06-30 12:38:02 +01:00
semmle-qlci
4b7d60a217
Merge pull request #3803 from esbena/js/more-fs-promises
...
Approved by erik-krogh
2020-06-30 12:33:35 +01:00
Geoffrey White
bbb9396300
C++: Improvement in Overflow.qll.
2020-06-30 12:20:19 +01:00
Geoffrey White
0ee73cce51
Update cpp/ql/src/semmle/code/cpp/security/FunctionWithWrappers.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-06-30 12:16:20 +01:00
Geoffrey White
de25bc6c78
C++: Improvement in Synchronization.qll.
2020-06-30 12:14:56 +01:00
Geoffrey White
3a3cc9a60a
C++: Autoformat.
2020-06-30 12:06:18 +01:00
Max Schaefer
62d56a3d7c
JavaScript: Fix module name for walk-sync package.
2020-06-30 11:57:16 +01:00
Esben Sparre Andreasen
80981ec8f5
Update UnsafeHtmlExpansion-transformed.html
2020-06-30 12:01:02 +02:00
Taus Brock-Nannestad
7e97bd1d36
Python: Address review comments.
2020-06-30 11:36:26 +02:00
Mathias Vorreiter Pedersen
c52f68e337
Merge pull request #3808 from geoffw0/qldoc4
...
C++: Yet more QLDoc
2020-06-30 10:33:29 +02:00
Geoffrey White
5c51bb7979
C++: QLDoc Literal.qll.
2020-06-30 09:32:48 +01:00
Asger Feldthaus
7a2c65f638
JS: Fix virtual source root in AutoBuildTest
2020-06-30 09:25:06 +01:00
Jonas Jensen
f79299883a
Merge pull request #3831 from MathiasVP/remove-abstract-decl-var-call
...
C++: Remove abstractness from DeclarationEntry, AccessHolder and Call
2020-06-30 10:21:55 +02:00
Geoffrey White
40e02bee53
C++: QLDoc Overflow.qll.
2020-06-30 09:19:41 +01:00
Geoffrey White
0102322544
C++: QLDoc FunctionWithWrappers.qll.
2020-06-30 09:10:21 +01:00
Jonas Jensen
47bb007b9a
C++: Autoformat fixups
2020-06-30 09:56:39 +02:00
Anders Schack-Mulligen
13cb853af5
Merge pull request #3294 from ggolawski/ognl-injection
...
CodeQL query to detect OGNL injections
2020-06-30 09:46:02 +02:00
Mathias Vorreiter Pedersen
acee9eb7ab
C++: Add comment to pseudo-abstract predicates
2020-06-30 09:19:47 +02:00
Mathias Vorreiter Pedersen
50709b235e
C++: Replace implication with disjunction in charpred for Call
2020-06-30 09:18:52 +02:00
Esben Sparre Andreasen
c7f67fafd9
JS: support additional promisification of the fs-module members
2020-06-30 09:10:30 +02:00
Mathias Vorreiter Pedersen
667bb323ac
C++: Rename union types to follow the naming convention of IPA types (and make them private)
2020-06-30 08:40:46 +02:00
Tom Hvitved
3efe1a9d10
C#: Remove unused viableImpl predicate
2020-06-30 08:31:30 +02:00
Tom Hvitved
b57cfc965a
Merge pull request #3804 from aschackmull/dataflow/dispatch-refactor
...
Dataflow: Refactor dispatch with call context.
2020-06-30 08:28:27 +02:00
Gavin Lang
7a023a65b0
Grammatical issues in Encryption using ECB.qhelp
2020-06-30 15:33:05 +10:00
Dave Bartolomeo
42657dbe3f
C++: Miscellaneous IR QLDoc
2020-06-29 14:30:12 -04:00
Asger Feldthaus
182e4ce727
JS: Autoformat
2020-06-29 19:10:28 +01:00
Dave Bartolomeo
1fa38474e9
C++: Autoformat
2020-06-29 14:09:53 -04:00
Nick Rolfe
4b6908c5bf
C++: test template classes with MemberFunction::getTypeOfThis()
2020-06-29 18:05:58 +01:00
Geoffrey White
fc69c16ba6
C++: Deprecate some old terminology.
2020-06-29 18:03:16 +01:00
Geoffrey White
71492f90ac
C++: QLDoc Encryption.qll, improve existing QLDoc, and update terminology.
2020-06-29 18:03:15 +01:00
Dave Bartolomeo
c52653270e
C++: QLDoc for IRConfiguration.qll
2020-06-29 12:43:51 -04:00
Dave Bartolomeo
87f0b0ef97
C++: QLDoc for EdgeKind.qll
2020-06-29 12:43:50 -04:00
Dave Bartolomeo
440ea6a069
C++: QLDoc for PrintIR.qll
2020-06-29 12:43:50 -04:00
Dave Bartolomeo
2043d9c7c4
C++: QLDoc for Operand.qll
2020-06-29 12:43:50 -04:00
Dave Bartolomeo
ead2a143e0
C++: QLDoc for IRVariable
...
Moved a couple of predicates that were only needed by IR construction into `TranslatedElement.qll`
2020-06-29 12:43:50 -04:00
Dave Bartolomeo
1423ea0591
C++: More IR.qll QLDoc
2020-06-29 12:43:50 -04:00
Dave Bartolomeo
98348a9353
C++: QLDoc for IR.qll
2020-06-29 12:43:50 -04:00
Dave Bartolomeo
88f89b3334
C++: QLDoc for IRFunction.qll
2020-06-29 12:43:49 -04:00
Dave Bartolomeo
d0af9f5808
C++: QLDoc all of IRBlock.qll
2020-06-29 12:43:49 -04:00
Dave Bartolomeo
77bf564136
C++: Finish Instruction.qll QLDoc
2020-06-29 12:43:49 -04:00
Dave Bartolomeo
6de3d5bc3d
C++: Change opcode QLDocs to refer to instruction QLDocs
...
As discussed in today's C++ analysis team meeting. `Opcode` is rarely used directly, so we'll just refer to the documentation for the corresponding `Instruction` class.
I've preserved the script in case we want to do a bulk change of all of the `Opcode` comments, but I don't expect it will be needed if we just add a new `Opcode` or two.
2020-06-29 12:41:36 -04:00
Geoffrey White
a8a7df4e5c
C++: QLDoc SensitiveExprs.qll.
2020-06-29 17:08:44 +01:00
Geoffrey White
e2e5e9b2a9
C++: QLDoc Synchronization.qll and improve existing QLDoc.
2020-06-29 16:56:01 +01:00
Asger Feldthaus
cb12d894a6
JS: Add test
2020-06-29 15:54:06 +01:00
Asger Feldthaus
326c7af4eb
JS: Fix incorrect classification of Vue files
2020-06-29 15:49:07 +01:00
Anders Schack-Mulligen
d297ce2279
Merge pull request #3436 from artem-smotrakov/revocation-checking
...
Java: Added a query for disabled certificate revocation checking
2020-06-29 16:42:36 +02:00
Anders Schack-Mulligen
b53b90501b
Merge pull request #3550 from luchua-bc/java-unsafe-cert-trust
...
Java: CWE-273 Unsafe certificate trust
2020-06-29 16:39:39 +02:00
Anders Schack-Mulligen
0bd81eb4b8
Dataflow: Fix reference to viableCallable.
2020-06-29 16:22:58 +02:00
Geoffrey White
55883f60f7
C++: Autoformat.
2020-06-29 14:48:15 +01:00
semmle-qlci
da8725aa5c
Merge pull request #3823 from dellalibera/js/fancy-log
...
Approved by erik-krogh
2020-06-29 14:46:51 +01:00
semmle-qlci
b3e68ef81c
Merge pull request #3806 from erik-krogh/moreDownloads
...
Approved by asgerf
2020-06-29 13:53:10 +01:00
Asger Feldthaus
b05942b599
JS: Add HTML file example
2020-06-29 13:45:01 +01:00
Asger Feldthaus
3938856e61
JS: Make this work in qltest
2020-06-29 13:42:55 +01:00
Asger Feldthaus
1a16d7339a
JS: Set SourceType correctly
2020-06-29 13:42:22 +01:00
Geoffrey White
441d4c077a
Update cpp/ql/src/semmle/code/cpp/exprs/Cast.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-06-29 13:13:00 +01:00
Taus Brock-Nannestad
b469d55d17
Python: Fix a few things in Stmts.qll.
2020-06-29 13:32:36 +02:00
Nick Rolfe
ab1dc64eea
C++: expand qldoc on MemberFunction::getTypeOfThis()
2020-06-29 11:54:28 +01:00
Asger Feldthaus
fcb365188b
JS: Add change note
2020-06-29 09:59:17 +01:00
Asger Feldthaus
e46a9dac65
JS: Count lines of code correctly
2020-06-29 09:59:17 +01:00
Asger Feldthaus
9c65318f99
JS: Extract TypeScript in HTML files to a snippet in virtual source root
2020-06-29 09:59:17 +01:00
Asger Feldthaus
da58fb5e62
JS: Resolve relative imports across real and virtual source roots
2020-06-29 09:44:48 +01:00
Asger Feldthaus
d3b9ebe1d2
JS: Perform glob matching across source roots
2020-06-29 09:44:48 +01:00
Asger Feldthaus
1297d0f414
JS: Extract HTML before TypeScript
2020-06-29 09:44:48 +01:00
Asger Feldthaus
2c1567aedd
JS: Don't extract TypeScript from HTML
2020-06-29 09:44:48 +01:00
Asger Feldthaus
805deb13c0
JS: Fix whitespace
2020-06-29 09:44:45 +01:00
Asger Feldthaus
1e5f846168
JS: Use StringReplaceCall
2020-06-29 09:31:56 +01:00
Mathias Vorreiter Pedersen
6b27652b99
C++: Remove abstractness from a couple of AST classes
2020-06-29 10:27:16 +02:00
Erik Krogh Kristensen
27b2c02693
remove todo comment
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-29 09:58:59 +02:00
Asger Feldthaus
8632c2a3b2
JS: Factor out VirtualSourceRoot
2020-06-29 08:18:29 +01:00
Asger Feldthaus
bfedcb01c4
JS: Make TypeScript aware of custom extractor extensions
2020-06-29 08:16:58 +01:00
Asger Feldthaus
d55e3300f3
JS: Bundle FileExtractors into a class
2020-06-29 08:16:58 +01:00
Asger Feldthaus
ea6b99e726
JS: Add shouldExtract predicate
2020-06-29 08:16:58 +01:00
Asger Feldthaus
164a18f02d
JS: Factor out extractFiles
2020-06-29 08:16:05 +01:00
Asger Feldthaus
da3d1a3b5f
JS: Recognize 'lang' attribute of script tags
2020-06-29 08:15:52 +01:00
Asger F
bdb7e3def3
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-06-29 07:55:15 +01:00
Asger Feldthaus
03c91a66c5
JS: Update expected output
2020-06-29 07:52:25 +01:00
ubuntu
bb06014f3d
Add fancy-log
2020-06-28 22:02:02 +02:00
Alessio Della Libera
ce32d646dc
Update javascript/ql/src/semmle/javascript/frameworks/Logging.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-06-28 21:58:45 +02:00
Mathias Vorreiter Pedersen
5fbf30590e
C++: Accept test changes.
2020-06-28 20:21:51 +02:00
Taus Brock-Nannestad
5744356dbc
Python: Add a bunch more toString docs.
2020-06-28 14:55:45 +02:00
Taus Brock-Nannestad
e72e662f68
Python: Autogenerate QLDoc for toString AST methods.
...
Only adds these for the methods that do not `override` other
methods (as these presumably have their own `toString` documentation).
2020-06-28 14:41:45 +02:00
Mathias Vorreiter Pedersen
9c0f877172
C++: Keep old instruction -> instruction flow in simpleInstructionLocalFlowStep. This means we don't have to add general operand -> instruction to the simpleLocalFlowStep relation, which seems to add a 10% performance regression.
2020-06-28 11:28:43 +02:00
Asger Feldthaus
9ca25d5bef
JS: Support .hash extraction via a few more methods
2020-06-28 01:38:59 +01:00
Asger Feldthaus
19db418395
JS: Add missing store step in Xss query
2020-06-28 01:26:11 +01:00
Asger Feldthaus
3e616e998e
JS: Add test
2020-06-27 21:31:40 +01:00
Asger Feldthaus
84d21074e5
JS: Support Vue class components
2020-06-27 21:24:46 +01:00
Grzegorz Golawski
aff0e0eb25
Cleanup according to review comments.
2020-06-27 18:30:36 +02:00
Artem Smotrakov
f5f30ce25e
Java: Simplified the query for disabled certificate revocation checking
...
Removed a dataflow cofiguration for setting a revocation checker.
Instead, the query just checks if addCertPathChecker() or setCertPathCheckers()
methods are called.
2020-06-27 11:37:20 +03:00
Artem Smotrakov
a2fa03e4f5
Java: Improved the query for disabled certificate revocation checking
...
- Added a taint propagation step for List.of() methods
- Added a testcase with one of the List.of() method
- Simplified conditions
- Fixed typos
2020-06-27 11:37:20 +03:00
Artem Smotrakov
06e3f101ce
Java: Added a query for disabled certificate revocation checking
...
- Added experimental/Security/CWE/CWE-299/DisabledRevocationChecking.ql
The query looks for PKIXParameters.setRevocationEnabled(false) calls.
- Added RevocationCheckingLib.qll
- Added a qhelp file with examples
- Added tests in java/ql/test/experimental/Security/CWE/CWE-299
2020-06-27 11:37:20 +03:00
Asger Feldthaus
ac5b9cd168
JS: Autoformat
2020-06-26 23:15:04 +01:00
Dave Bartolomeo
4dcdd8a0ee
C++: Add last remaining QLDoc to Opcode.qll
2020-06-26 17:25:30 -04:00
Dave Bartolomeo
bdf121f3b8
C++: Update opcode QLDoc script to handle abstract base classes
...
This auto-generates even more QLDoc for `Opcode.qll`
2020-06-26 16:04:33 -04:00
ubuntu
9135bbd5c8
JS: model fancy-log (and recognize the 'dir' log level)
2020-06-26 21:33:52 +02:00
Asger Feldthaus
6707e3424d
JS: Prevent bad join ordering
2020-06-26 20:21:56 +01:00
Taus Brock-Nannestad
24daf2c4d1
Python: Document internal AST classes.
...
We already document these in the classes that override them, so I
simply added a pointer to this information.
2020-06-26 21:15:30 +02:00
Asger Feldthaus
06dd3ab2ca
JS: Propagate into RegExp.$x
2020-06-26 18:58:43 +01:00
Asger Feldthaus
17af8f7650
JS: Add test for taint propagating into RegExp.$1
2020-06-26 18:58:43 +01:00
Dave Bartolomeo
e00a8f7670
Merge pull request #3815 from jbj/getAPrimaryQlClass
...
C++: getCanonicalQLClass -> getAPrimaryQlClass
2020-06-26 13:52:16 -04:00
Dave Bartolomeo
5f290520ab
C++: Accept test diffs due to opcode rename
2020-06-26 13:45:41 -04:00
semmle-qlci
3aefb7fad9
Merge pull request #3613 from erik-krogh/Reassigned
...
Approved by asgerf
2020-06-26 17:05:45 +01:00
Dave Bartolomeo
281985b845
C++: Sync Opcode.qll QLDoc with Instruction.qll QLDoc
...
For every concrete `Opcode`, there is a corresponding `Instruction` class. Rather than duplicate all of the QLDoc by hand, I wrote a quick Python script to copy the QLDoc from `Instruction.qll` to `Opcode.qll`. I don't expect that we will need to do this often, so I'm not hooking it up to a PR check or anything like that, but I did commit the script itself in case we need it again.
2020-06-26 11:42:32 -04:00
Dave Bartolomeo
023e1dc0a2
Instruction and opcode cleanup
...
- Renamed `DynamicCastToVoid` to the more descriptive `CompleteObjectAddress`
- Split verbose description from summary in a few Instruction QLDoc comments.
- Added `Instruction` classes for the few remaining `Opcode`s that didn't have one.
- Removed a use of "e.g."
2020-06-26 11:39:10 -04:00
Jonas Jensen
a22fb7662e
C++: Autoformat fixup
2020-06-26 16:57:06 +02:00
Marcono1234
7443c9c5ad
Fix outdated query console link
...
#3546 changed the query but did not adjust the query link.
Additionally the old query could not be re-run because some of the projects it
targeted (gradle/gradle and eclipse-cdt/cdt) cannot be queried currently.
It now queries all available demo projects of the query console instead.
2020-06-26 16:40:19 +02:00
Nick Rolfe
0ae5fb0357
C++: auto-format test query
2020-06-26 15:35:55 +01:00
Nick Rolfe
309a8e60c8
C++: add more test cases for the type of this
2020-06-26 14:20:46 +01:00
Nick Rolfe
e79625ed14
Accept suggested qldoc change
...
Co-authored-by: Dave Bartolomeo <dbartol@github.com >
2020-06-26 14:20:46 +01:00
Nick Rolfe
9e9d69238a
C++: add test for MemberFunction::getTypeOfThis()
2020-06-26 14:20:46 +01:00
Nick Rolfe
8bd3be6e7b
C++: add MemberFunction::getTypeOfThis()
2020-06-26 14:20:46 +01:00
Nick Rolfe
ca25971955
C++: upgrade script for member_function_this_type
2020-06-26 14:20:45 +01:00
Nick Rolfe
3b15d39ec6
C++: update stats for new member_function_this_type table
2020-06-26 14:20:45 +01:00
Nick Rolfe
133838dbf3
C++: update tests to expect type of this
2020-06-26 14:20:45 +01:00
Nick Rolfe
d1d7fac4ca
C++: add member_function_this_type to dbscheme
2020-06-26 14:20:45 +01:00
semmle-qlci
b015c735d0
Merge pull request #3809 from max-schaefer/util-deprecate
...
Approved by asgerf
2020-06-26 14:20:14 +01:00
semmle-qlci
1b4df57426
Merge pull request #3731 from asger-semmle/js/monorepo-bugfixes
...
Approved by erik-krogh
2020-06-26 14:18:35 +01:00
Erik Krogh Kristensen
0b050204ad
add missing dot in qldoc
2020-06-26 15:07:12 +02:00
Dave Bartolomeo
f48948c604
C++: Opcode cleanup
...
- Remove unused `MemoryAccessOpcode`
- Make `OpcodeWithCondition` private
- Add QLDoc for `Opcode` module
2020-06-26 09:04:37 -04:00
Mathias Vorreiter Pedersen
beb66299e9
Merge pull request #3796 from dbartol/codeql-c-analysis-team/40/2
...
C++: QLDoc for all of `Instruction.qll`
2020-06-26 14:04:48 +02:00
Erik Krogh Kristensen
e4fe236d37
autoformat
2020-06-26 13:59:06 +02:00
Tom Hvitved
795c5784b0
C#: Precise data flow for collections
2020-06-26 13:40:05 +02:00
Dave Bartolomeo
11c702331a
Merge pull request #3795 from rdmarsh2/rdmarsh/cpp/add-qldoc-3
...
C++: QLDoc for PrintAST and AST-based range analysis
2020-06-26 07:38:10 -04:00
Rasmus Wriedt Larsen
3f0975f5a1
Merge pull request #3770 from tausbn/python-add-a-bunch-of-documentation
...
Python: Add a bunch of documentation.
2020-06-26 13:30:45 +02:00
Jonas Jensen
c1b26d71c3
C++: getCanonicalQLClass -> getAPrimaryQlClass
...
Also updated the QLDoc for `getAPrimaryQlClass` to match the Go version.
2020-06-26 13:20:36 +02:00
Rasmus Lerchedahl Petersen
64af5f585c
Python: Update status description
2020-06-26 13:18:07 +02:00
Rasmus Lerchedahl Petersen
f84adb3c26
Python: stub for clearsContent
...
also remove all `CastNode`s (seems to help)
2020-06-26 13:09:35 +02:00
Taus
e5d23b2082
Merge pull request #3801 from RasmusWL/python-3521-revived
...
Python: Add support for detecting XSLT Injection (#3521 revived)
2020-06-26 13:05:28 +02:00
Max Schaefer
640c194c92
JavaScript: Model util.deprecate as a pre call-graph step.
2020-06-26 11:47:19 +01:00
Max Schaefer
712a216461
Add self-verifying type-tracking tests.
2020-06-26 11:47:19 +01:00
Rasmus Lerchedahl Petersen
248717473e
Python: quick status added to readme.md
2020-06-26 12:25:17 +02:00
Rasmus Wriedt Larsen
b164f2695d
Python: One more minor doc fix from review
2020-06-26 12:08:12 +02:00
Rasmus Wriedt Larsen
08384e30af
Python: Minor doc fixes from review
2020-06-26 12:06:31 +02:00
Rasmus Lerchedahl Petersen
6e5f71bf43
Python: sync dataflow files
2020-06-26 12:02:14 +02:00
Rasmus Lerchedahl Petersen
e147e59652
Merge branch 'master' of github.com:github/codeql into SharedDataflow
...
To sync files
2020-06-26 12:01:01 +02:00
Rasmus Lerchedahl Petersen
43f85ef265
Python: typo
2020-06-26 12:00:24 +02:00
Tom Hvitved
6efbd5f9d1
C#: Add data-flow test for List.Clear()
2020-06-26 11:44:08 +02:00
Jonas Jensen
9d8052a434
Merge pull request #3813 from MathiasVP/is-argument-for-parameter-join-order
...
C++: Improve join order for AliasAnalysis::isArgumentForParameter
2020-06-26 11:34:33 +02:00
Calum Grant
8725e09053
Merge pull request #3798 from hvitved/csharp/dataflow/async-tests
...
C#: Move async data-flow tests from local to global
2020-06-26 10:14:28 +01:00
semmle-qlci
f81fc77e9e
Merge pull request #3782 from erik-krogh/promiseSteps
...
Approved by asgerf
2020-06-26 10:11:10 +01:00
Mathias Vorreiter Pedersen
63752dddef
C++/C#: Sync identical files
2020-06-26 09:08:44 +02:00
Mathias Vorreiter Pedersen
3af679e83d
C++: Put unique around getEnclosingFunction, and specialize function argument, to improve join order.
2020-06-26 09:08:35 +02:00
semmle-qlci
92cc59b47b
Merge pull request #3800 from esbena/js/npmlog
...
Approved by erik-krogh
2020-06-26 07:54:08 +01:00
Dave Bartolomeo
7e3f2dbe4c
C++: Improve QLDoc for getElementSize()
2020-06-25 17:04:32 -04:00
Erik Krogh Kristensen
7cb6516bc4
make internal predicates within DominatingPaths smaller.
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
1ec2c549d2
autoformat
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
8b3ca73c1c
autoformat
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
081b03c8f4
add tests that access-path domination can happen within a statement
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
47d52870f2
Use a ControlFlowNode based API to determine domination
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
926f2c139f
require that a write must dominate the enclosing stmt of a read
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
55565a51df
don't use getEnclosingStmt
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
34d6a4dcf8
use Rhs of a prop-write
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
cc2e61531e
update expected output
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
f7c42ca1b5
autoformat
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
252f805db4
performance improvement
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
21e5a522b0
give the same rank to all expressions inside a single stmt
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
e467d3ccbf
use dominating write check in js/path-injection
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
6bc821b1ab
add tests for dominating writes
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
2b2d691e45
don't treated a property from a tainted object as tainted when there exists a dominating write
2020-06-25 23:00:52 +02:00
Erik Krogh Kristensen
5e4acfbe19
implement predicate for finding dominating writes to an access-path
2020-06-25 23:00:52 +02:00
Jonas Jensen
d4c5887122
Merge pull request #3807 from geoffw0/qldoc3
...
C++: Even more QLDoc
2020-06-25 19:29:35 +02:00
Geoffrey White
168f9404f0
Merge branch 'master' into models5
2020-06-25 17:42:08 +01:00
semmle-qlci
056e1a8c4b
Merge pull request #3599 from asger-semmle/js/nameditem
...
Approved by esbena
2020-06-25 17:34:14 +01:00
Geoffrey White
488d41f797
C++: QLDoc Cast.qll.
2020-06-25 17:30:45 +01:00
Geoffrey White
6639d6de83
C++: QLDoc exprs\ObjectiveC.qll (deprecated).
2020-06-25 17:30:45 +01:00
Geoffrey White
1df843c8f6
C++: QLDoc multiple files in the exprs directory.
2020-06-25 17:30:44 +01:00
Geoffrey White
b7730fb1ad
C++: QLDoc PrintfLike.qll.
2020-06-25 17:30:44 +01:00
Robert Marsh
9a1f909129
C++: Fix QLDoc for PrintAST.qll nodes/edges
2020-06-25 09:07:20 -07:00
Robert Marsh
b3072b9544
Apply suggestions from code review
...
Co-authored-by: Dave Bartolomeo <dbartol@github.com >
2020-06-25 08:54:17 -07:00
Calum Grant
b759856ccb
Merge pull request #3792 from calumgrant/cs/qldoc-coverage1
...
C#: Improve qldoc coverage
2020-06-25 16:34:52 +01:00
Erik Krogh Kristensen
690bde47aa
remove a .getALocalSource() that isn't needed
2020-06-25 16:51:10 +02:00
Asger Feldthaus
e28284bd01
JS: Fix javadoc
2020-06-25 15:39:00 +01:00
Asger Feldthaus
ad48c4e54d
JS: Always prepare package.json files
2020-06-25 15:38:20 +01:00
Asger Feldthaus
675c64d9d4
JS: Prefer extracting file with tsconfig that included it
2020-06-25 15:38:19 +01:00
Asger Feldthaus
4c4acd50bd
JS: Factor out loading of tsconfig files
2020-06-25 15:38:19 +01:00
Asger Feldthaus
cc3e62f535
JS: Move stack trace limit to top of file
2020-06-25 15:38:19 +01:00
Asger Feldthaus
cf78475799
JS: Only extract included files with a given tsconfig
2020-06-25 15:38:19 +01:00
Asger Feldthaus
6ff81377d5
JS: Also sort files in legacy extractor
2020-06-25 15:38:18 +01:00
Asger Feldthaus
6d15397fdc
JS: Ensure we never write outside the scratch dir
2020-06-25 15:38:18 +01:00
Asger Feldthaus
ba5d6bb2e9
JS: Actually set fields
2020-06-25 15:38:18 +01:00
Asger Feldthaus
dceb211021
JS: Pass source root to Node.js process
2020-06-25 15:38:18 +01:00
Asger Feldthaus
aaf141782f
JS: Fix source root
2020-06-25 15:38:17 +01:00
Asger Feldthaus
cb0a2498b0
JS: Sort files
2020-06-25 15:38:17 +01:00
Calum Grant
c4d43bafa4
Merge pull request #3797 from hvitved/csharp/dataflow/more-collection-tests
...
C#: More data-flow collection tests
2020-06-25 15:38:04 +01:00
Rasmus Lerchedahl Petersen
c5c1c4c0af
Python: started adding some coverage tests
2020-06-25 16:29:41 +02:00
semmle-qlci
cf0cd00458
Merge pull request #3627 from asger-semmle/js/unneeded-defensive-return
...
Approved by erik-krogh
2020-06-25 15:28:57 +01:00
Geoffrey White
d526a10981
C++: QLDoc TestFile.qll, StringAnalysis.qll.
2020-06-25 15:20:18 +01:00
semmle-qlci
c39dce4d66
Merge pull request #3781 from asger-semmle/js/deprecate-type-member-lookup
...
Approved by erik-krogh
2020-06-25 14:56:17 +01:00
Erik Krogh Kristensen
c3b52fadcc
add missing qldoc
2020-06-25 15:54:36 +02:00
Geoffrey White
7aa44fd357
C++: QLDoc Parameter.qll, Specifier.qll, commons/File.qll.
2020-06-25 14:42:44 +01:00
Geoffrey White
a722bd4bd0
C++: QLDoc UserType.qll.
2020-06-25 14:39:11 +01:00
Geoffrey White
c8fc8af340
C++: QLDoc Struct.qll, TypedefType.qll, Union.qll, Variable.qll.
2020-06-25 14:39:10 +01:00
Geoffrey White
908c3b4005
C++: QLDoc SecurityOptions.qll.
2020-06-25 14:39:10 +01:00
Dave Bartolomeo
b889d3687e
C++: Fix QLDoc review feedback
2020-06-25 09:33:43 -04:00
Erik Krogh Kristensen
09d969a8ad
recognize sensitive files by file-system writes
2020-06-25 15:19:42 +02:00
Erik Krogh Kristensen
8f5a3e9f4f
add support for getASavePath() to js/insecure-download
2020-06-25 15:18:31 +02:00
Erik Krogh Kristensen
dafca8fd81
introduce flow-labels to js/insecure-download
2020-06-25 15:17:57 +02:00
Erik Krogh Kristensen
9bdedb3f48
introduce getASavePath to ClientRequest
2020-06-25 15:17:19 +02:00
Dave Bartolomeo
3b4cd700c2
Remove accidentally added file
2020-06-25 09:08:30 -04:00
Anders Schack-Mulligen
6c679c328d
Dataflow: Refactor dispatch with call context.
2020-06-25 14:28:35 +02:00
Taus Brock-Nannestad
4dbc8e515a
Python: Address a few more review comments.
2020-06-25 14:19:18 +02:00
Taus
1608758219
Python: Apply suggestions from documentation review.
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-06-25 14:16:44 +02:00
Jonas Jensen
3ce4cff183
Merge pull request #3802 from geoffw0/modeling
...
C++: 'modelling' -> 'modeling'.
2020-06-25 14:07:57 +02:00
Jonas Jensen
f2ef088d4f
Merge pull request #3783 from geoffw0/qldoc2
...
C++: More QLDoc
2020-06-25 14:06:00 +02:00
Mathias Vorreiter Pedersen
a0bfbda51c
C++: Improve performance by not calling getDef, but instead refer to isDefinitionInexact. This gives roughly the same tuple numbers we had with only instruction nodes.
2020-06-25 13:37:14 +02:00
Dave Bartolomeo
6dc02c719b
C++: Fix typos
2020-06-25 07:19:15 -04:00
Geoffrey White
099e5891ae
C++: 'modelling' -> 'modeling'.
2020-06-25 11:50:43 +01:00
Geoffrey White
f956112042
C++: Autoformat.
2020-06-25 11:48:10 +01:00
Geoffrey White
b515c09946
C++: Autoformat.
2020-06-25 11:46:51 +01:00
Geoffrey White
6201796122
C++: modelling -> modeling
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-06-25 11:42:57 +01:00
Geoffrey White
89bea604d9
C++: Fix false positive.
2020-06-25 11:32:25 +01:00
Geoffrey White
720ac026dc
C++: Add false positive.
2020-06-25 11:21:08 +01:00
Geoffrey White
5489bb9946
C++: Autoformat.
2020-06-25 11:13:13 +01:00
Geoffrey White
8f6e56cb41
C++: Suggested change.
2020-06-25 11:13:00 +01:00
Asger Feldthaus
f9b796231b
JS: Add regression tests
2020-06-25 11:10:27 +01:00
Rasmus Wriedt Larsen
22ad8f717f
Python: Remove usage of .getASuccessor() in XSLT.qll
2020-06-25 12:07:45 +02:00
Rasmus Wriedt Larsen
1e5eeb8009
Python: Move lxml.etree library stub to reduce clutter
2020-06-25 12:07:41 +02:00
Esben Sparre Andreasen
4bfce4b8a3
JS: model npmlog (and recognize the "verbose" log level)
2020-06-25 12:06:51 +02:00
semmle-qlci
b24fba8df0
Merge pull request #3734 from dellalibera/loginjection
...
Approved by esbena
2020-06-25 11:06:25 +01:00
Asger Feldthaus
a109c1fc96
JS: Change note
2020-06-25 11:04:08 +01:00
Asger Feldthaus
ea3560fe07
JS: Ignore document.all checks explicitly
2020-06-25 11:03:06 +01:00
Rasmus Wriedt Larsen
3cc566f703
Merge branch 'master' into python-3521-revived
2020-06-25 12:02:21 +02:00
Asger Feldthaus
b867512db4
JS: Update test
2020-06-25 11:01:10 +01:00
Rasmus Wriedt Larsen
e60af68b29
Python: Move lxml.etree library stub (so merge is easy)
2020-06-25 11:54:34 +02:00
Rasmus Wriedt Larsen
994db060c7
Python: Use CWE-091 for XSLT
...
As indicated here https://www.zaproxy.org/docs/alerts/90017/
2020-06-25 11:53:12 +02:00
Calum Grant
4642bb2767
Merge pull request #3774 from hvitved/csharp/tripleticks
...
C#: Enable syntax highlighting in QLDoc snippets
2020-06-25 10:31:50 +01:00
Rasmus Wriedt Larsen
b36c23ef63
Merge pull request #3500 from yoff/UnmatchableDollar
...
Python: Regexp: Handle repetions {n} (with no ,)
2020-06-25 11:26:52 +02:00
Rasmus Wriedt Larsen
0b36cd44b8
Merge pull request #3522 from porcupineyhairs/pythonXpath
...
Python : Add Xpath injection query
2020-06-25 11:21:45 +02:00
Calum Grant
6e3609696a
C#: Address review comments.
2020-06-25 09:59:59 +01:00
Taus Brock-Nannestad
9f06e13313
Python: Fix incomplete renaming in Thrift.qll.
2020-06-25 10:48:26 +02:00
Rasmus Lerchedahl Petersen
415e0c4aac
Python: add suggestion for test cases
2020-06-25 10:46:33 +02:00
Erik Krogh Kristensen
2d7feb794f
Refactor Promises.qll to use PreCallGraphStep
2020-06-25 10:41:08 +02:00
Rasmus Lerchedahl Petersen
5973fe8411
Python: scaffold for testing data flow coverage
2020-06-25 10:32:10 +02:00
Tom Hvitved
b8ae4b7f64
C#: Move async data-flow tests from local to global
2020-06-25 10:04:18 +02:00
Tom Hvitved
3f91aa3b55
C#: More data-flow collection tests
2020-06-25 09:48:52 +02:00
Dave Bartolomeo
06a5242d76
Merge pull request #3793 from rdmarsh2/rdmarsh/cpp/ir-range-analysis-experimental
...
C++: move IR range analysis to experimental
2020-06-24 20:51:07 -04:00
Dave Bartolomeo
2685aa4b8b
C++: Use fewer words
2020-06-24 20:42:02 -04:00
Dave Bartolomeo
8b02f121d6
C++: QLDoc for all of Instruction.qll
...
I think I've now documented every class and public predicate in `Instruction.qll` I've tried to include detailed semantics of each instruction where appropriate.
2020-06-24 20:29:31 -04:00
Robert Marsh
362fbd12dc
C++: QLDoc for PrintAST.qll
2020-06-24 16:45:20 -07:00
Robert Marsh
39aaccc1ac
C++: Add QLDoc for AST range analysis libraries
2020-06-24 16:29:20 -07:00
Robert Marsh
3e6a19843d
Merge pull request #3727 from jbj/tainted-format-string-high
...
C++: Raise cpp/tainted-format-string* precisions to high
2020-06-24 15:06:13 -07:00
Calum Grant
d32199cccc
C#: QLdoc for CIL instructions.
2020-06-24 22:01:33 +01:00
Calum Grant
262a20cea0
C#: Add qldocs for Concurrency.qll, Documentation.qll, cil.qll and dotnet.qll.
2020-06-24 22:01:33 +01:00
Taus Brock-Nannestad
02363d76c1
Python: Document Comment.qll.
...
I didn't do the `toString` methods in this commit. I'm thinking
they're better to do in a separate commit. (There are 48 undocumented
instances!)
2020-06-24 22:43:59 +02:00
Taus Brock-Nannestad
fe78e68fd0
Python: Document a bunch of hasLocationInfo methods.
...
If only we had been _somewhat consistent in how we named the
parameters for these...
2020-06-24 22:38:03 +02:00
Rasmus Wriedt Larsen
155bbbdec9
Python: Add annotated call-graph tests
...
See the added README for in-depth details
2020-06-24 22:15:39 +02:00
Taus Brock-Nannestad
682e1b6040
Python: Document Comparisons.qll.
2020-06-24 22:13:46 +02:00
Asger F
090a685d86
Merge pull request #3751 from toufik-airane/master
...
[javascript] CWE-347: JWT Missing Secret Or Public Key Verification
2020-06-24 21:09:41 +01:00
Taus Brock-Nannestad
b8e744eade
Python: Document Class.qll.
2020-06-24 22:07:47 +02:00
Taus Brock-Nannestad
25122c9fb5
Python: Document (parts of) ExternalArtifact.qll.
...
I don't think there's any need to document the parts specific to
metrics or defects, as I don't believe these are used anywhere.
2020-06-24 21:53:37 +02:00
Robert Marsh
fb6e578618
C++: move IR range analysis to experimental
2020-06-24 12:50:14 -07:00
Mathias Vorreiter Pedersen
8c6753a3cc
C++: Accept consistency tests.
2020-06-24 21:13:38 +02:00
Geoffrey White
d259e8e8df
C++: Correct StrCpy.hasTaintFlow.
2020-06-24 18:34:02 +01:00
Geoffrey White
c3d275d0e7
C++: Clean up SprintfBW and comment Sprintf.
2020-06-24 18:34:02 +01:00
Geoffrey White
c681e6999d
C++: Refine the strcat and strcpy models, have BufferWrite depend on them so that information isn't duplicated.
2020-06-24 18:34:02 +01:00
ubuntu
d9a0dc0982
Remove check for console().getAMethodCall
2020-06-24 19:31:23 +02:00
Robert Marsh
38067b5b34
Merge pull request #3777 from rdmarsh2/rdmarsh/csharp/autobuilder-lang-name
...
C#/C++: Use CODEQL_EXTRACTOR_<LANG>_* in autobuilder
2020-06-24 10:18:26 -07:00
ubuntu
65eba0272d
Merge remote-tracking branch 'upstream/master' into loginjection
2020-06-24 19:15:27 +02:00
Mathias Vorreiter Pedersen
5190c26635
C++: Accept tests.
2020-06-24 18:28:41 +02:00
Mathias Vorreiter Pedersen
7530dc2132
C++: Hide operand nodes from path explanations to make the review diff smaller.
2020-06-24 18:28:23 +02:00
Mathias Vorreiter Pedersen
5aa1b13136
C++: Make the pre update node for ExplicitFieldStoreQualifierNode an operand node. This fixes the IR dataflow consistency errors.
2020-06-24 18:27:53 +02:00
Mathias Vorreiter Pedersen
470ee0059d
C++: Alternate dataflow between operands and instructions
2020-06-24 18:27:12 +02:00
Mathias Vorreiter Pedersen
d7a9d3d8bc
C++: Introduce operand dataflow node
2020-06-24 18:26:17 +02:00
luchua-bc
0779aab28f
Clean up the QL code
2020-06-24 15:02:16 +00:00
Anders Schack-Mulligen
791f31fa65
Merge pull request #3595 from luchua-bc/j2ee-server-directory-listing
...
Java: Add check for J2EE server directory listing
2020-06-24 16:45:34 +02:00
semmle-qlci
daeb13d9fd
Merge pull request #3779 from asger-semmle/js/metric-queries
...
Approved by esbena
2020-06-24 15:37:03 +01:00
Asger Feldthaus
42f32bf76c
JS: Recognize calls to .item and .namedItem
2020-06-24 15:11:18 +01:00
Geoffrey White
ff0a9bfc48
C++: QLDoc Stmt.qll, Block.qll.
2020-06-24 13:57:29 +01:00
Geoffrey White
ed32250636
C++: Deprecate Member.qll.
2020-06-24 13:57:28 +01:00
Geoffrey White
f1aac04bdf
C++: Deprecate overly specific parts of Type.qll.
2020-06-24 13:57:28 +01:00
Geoffrey White
e43ddd3f78
C++: QLDoc Type.qll.
2020-06-24 13:57:28 +01:00
Geoffrey White
6bcc1a0220
C++: QLDoc NameQualifiers.qll, Namespace.qll, NestedFields.qll.
2020-06-24 13:57:27 +01:00
semmle-qlci
696d19cb14
Merge pull request #3773 from erik-krogh/guardedCrypto
...
Approved by asgerf
2020-06-24 13:04:04 +01:00
Jonas Jensen
3982da5c47
Merge pull request #3771 from hvitved/qldoc-style-tripleticks
...
Suggest using target language syntax highlighting in QLDoc
2020-06-24 11:36:39 +02:00
Asger Feldthaus
e2a300e811
JS: Add change note
2020-06-24 10:33:45 +01:00
Rasmus Lerchedahl Petersen
f6c59abcd9
Merge branch 'master' of github.com:github/codeql into UnmatchableDollar
...
to make CodeScan happy
2020-06-24 11:04:07 +02:00
Rasmus Lerchedahl Petersen
6e9c48bba7
Python: test zero iterations
2020-06-24 11:01:27 +02:00
Rasmus Lerchedahl Petersen
226c295b4c
Python: format
2020-06-24 10:48:51 +02:00
Anders Schack-Mulligen
941177ee25
Merge pull request #3762 from hvitved/dataflow/clear-contents
...
Data flow: Model field clearing
2020-06-24 10:19:50 +02:00
Anders Schack-Mulligen
3b62bd254c
Merge pull request #3723 from JLLeitschuh/fix/JLL/gitignore_vs_code_generated_files
...
Add .gitignore for VS Code Generated maven project files
2020-06-24 09:35:01 +02:00
Erik Krogh Kristensen
76ed03f75b
update change-note
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-24 09:30:43 +02:00
semmle-qlci
a723ac0d8e
Merge pull request #3767 from esbena/js/console-member-calls
...
Approved by erik-krogh
2020-06-24 08:03:49 +01:00
Asger Feldthaus
d15c98d18c
JS: Add more metrics
2020-06-24 08:03:24 +01:00
Geoffrey White
afcc6ac712
Merge pull request #3766 from rdmarsh2/rdmarsh/cpp/add-qldoc-3
...
C++: Add QLDocs for Initializer.qll-Macro.qll and model classes
2020-06-24 07:31:48 +01:00
Robert Marsh
e24566e313
C#/C++: Use CODEQL_EXTRACTOR_CPP_ROOT in autobuild
...
Left this out earlier because I thought it needed to point to the C#
extractor root even in C++ mode, but it looks like it isn't yet used in
C++ mode.
2020-06-23 15:53:25 -07:00
Robert Marsh
c37c282861
C#/C++: Fix tests with new environment variables
2020-06-23 15:35:22 -07:00
Robert Marsh
da9aa546de
C#/C++: Use CODEQL_EXTRACTOR_CPP_* in autobuilder
2020-06-23 14:47:07 -07:00
Mathias Vorreiter Pedersen
30d9c6b9e4
Merge pull request #3776 from geoffw0/qldoc
...
C++: QLDoc ObjectiveC.qll, BufferWrite.qll, FileWrite.qll, OutputWrite.qll
2020-06-23 22:23:03 +02:00
Robert Marsh
b402352321
Merge pull request #3775 from hvitved/dataflow/tripleticks
...
Data flow: Enable syntax highlighting in QLDoc snippets
2020-06-23 09:53:10 -07:00
Robert Marsh
edaa43ab0b
C++: respond to PR comments on qldoc
2020-06-23 09:23:08 -07:00
Asger Feldthaus
63d48bfe5c
JS: Move IgnoredFile to MetaMetrics
2020-06-23 17:08:09 +01:00
Asger Feldthaus
35bdb4127e
JS: Add TypedExprs metric
2020-06-23 17:05:58 +01:00
Geoffrey White
fbaf398e7a
C++: QLDoc FileWrite and OutputWrite.
2020-06-23 16:57:22 +01:00
Geoffrey White
e01f050db8
C++: QLDoc BufferWrite.qll.
2020-06-23 16:29:00 +01:00
Geoffrey White
dea9a13e44
C++: QLDoc ObjectiveC.qll (deprecated).
2020-06-23 16:28:51 +01:00
Rasmus Lerchedahl Petersen
c70cf6d780
Python: better (if imperfect) handling of phi node
2020-06-23 17:25:33 +02:00
Tom Hvitved
652de80fa5
C#: Enable syntax highlighting in QLDoc snippets
2020-06-23 16:56:56 +02:00
Tom Hvitved
a3e7fd60f2
Data flow: Enable syntax highlighting in QLDoc snippets
2020-06-23 16:54:34 +02:00
Bt2018
fffc88ea5b
Metadata update
2020-06-23 10:34:28 -04:00
Taus
a2677f8df0
Merge pull request #3758 from RasmusWL/python-methods-overrides-as-recommendation
...
Python: Changing signature in overriden method is not an error
2020-06-23 16:16:44 +02:00
Erik Krogh Kristensen
79599b6cc0
add change-note
2020-06-23 15:57:55 +02:00
Erik Krogh Kristensen
3f8881a334
don't report insecure randomness when the insecure random is just a fallback
2020-06-23 15:53:19 +02:00
luchua-bc
f8c494716f
Fix ending line error
2020-06-23 12:48:07 +00:00
Tom Hvitved
8d5077ae83
Suggest using target language syntax highlighting in QLDoc
2020-06-23 14:48:04 +02:00
luchua-bc
89260d6f8a
Fix ending line error
2020-06-23 12:36:07 +00:00
Taus Brock-Nannestad
1e4ec5c987
Python: Make QLDoc for TObject.qll visible.
2020-06-23 14:31:30 +02:00
Taus Brock-Nannestad
ccf63e03bb
Python: Document FileOpen.qll.
2020-06-23 14:31:06 +02:00
Taus Brock-Nannestad
f86011fb51
Python: Document RedundantComparison.qll.
2020-06-23 14:30:42 +02:00
Taus Brock-Nannestad
2f93b1458e
Python: Document IsComparisons.qll.
2020-06-23 14:30:17 +02:00
Taus Brock-Nannestad
d6e5a5cb01
Python: Document AdvancedFormatting.qll.
2020-06-23 14:29:34 +02:00
Taus Brock-Nannestad
513ead66d3
Python: Document CallArgs.qll.
2020-06-23 14:28:40 +02:00
luchua-bc
deabfe6e5c
Adjust id tag and fix ending line error
2020-06-23 12:24:03 +00:00
luchua-bc
7642b43990
Adjust id tag and fix ending line error
2020-06-23 12:10:07 +00:00
semmle-qlci
0d61443915
Merge pull request #3753 from asger-semmle/js/xss-dom-exception-rephrasing
...
Approved by erik-krogh
2020-06-23 13:01:41 +01:00
Asger F
552b7ad3ca
Merge pull request #3765 from asger-semmle/js-team-sprint-merge2
...
JS: Merge js-team-sprint
2020-06-23 12:58:27 +01:00
semmle-qlci
a5a3573a3e
Merge pull request #3757 from asger-semmle/js/unused-npm-dependencies
...
Approved by erik-krogh
2020-06-23 12:56:45 +01:00
Asger Feldthaus
4f67cc269b
JS: Reduce ExpansiveTypes test
2020-06-23 11:44:07 +01:00
Asger Feldthaus
234f968294
JS: Deprecate property lookup on types
2020-06-23 11:42:28 +01:00
Toufik Airane
27f91b36b0
Update javascript/ql/src/experimental/Security/CWE-347/JWTMissingSecretOrPublicKeyVerification.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-06-23 12:28:21 +02:00
toufik-airane
37f44d98ce
fix minor issues
2020-06-23 12:28:03 +02:00
Rasmus Lerchedahl Petersen
b759b71ac8
Python: explain the regression test
2020-06-23 11:02:33 +02:00
Tom Hvitved
ff751ac0f8
Data flow: Sync files
2020-06-23 10:55:12 +02:00
Tom Hvitved
98ed2a18ac
Data flow: Move field-clearing checks from flowCandFwf0 into flowCandFwd
2020-06-23 10:55:12 +02:00
Tom Hvitved
13b4dfa972
Data flow: Rename BigStepBarrierNode to FlowCheckNode
2020-06-23 10:55:12 +02:00
Tom Hvitved
3faca03de6
C#: Introduce ObjectInitializerNode
2020-06-23 10:55:12 +02:00
Tom Hvitved
83050d96f8
C++: Stub implementations for clearsContent()
2020-06-23 10:55:12 +02:00
Tom Hvitved
c01f570d9e
Java: Implement clearsContent()
2020-06-23 10:55:12 +02:00
Tom Hvitved
c057e82efa
Data flow: Sync files
2020-06-23 10:55:11 +02:00
Tom Hvitved
e578827626
Java: Add more field-flow tests
2020-06-23 10:55:11 +02:00
Tom Hvitved
a1d5591634
C#: Model field-clearing in data-flow
2020-06-23 10:55:11 +02:00
Tom Hvitved
b5bc15a097
C#: Add more field-flow tests
2020-06-23 10:55:11 +02:00
James Fletcher
843c5c6c1e
Merge pull request #3742 from jf205/sd-110
...
CodeQL docs: Expand QLDoc style guide
2020-06-23 09:47:25 +01:00
Esben Sparre Andreasen
2d32ee7448
JS: support member calls of console
2020-06-23 10:46:01 +02:00
james
7e7d7e752e
docs: further improvements
2020-06-23 09:42:56 +01:00
Jonas Jensen
3747bd98f3
Merge pull request #3694 from geoffw0/models
...
C++: Extend the GetsFunction and SystemFunction models.
2020-06-23 10:15:32 +02:00
Shati Patel
95870977ca
Merge pull request #3763 from adityasharad/java/training-example-brace
...
Fix training example syntax
2020-06-23 08:34:09 +01:00
James Fletcher
c7cfd59651
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-06-23 08:31:48 +01:00
Mathias Vorreiter Pedersen
55ce5ce47a
Merge pull request #3754 from jbj/revert-flat-structs
...
C++: Revert #3419 to fix OpenJDK performance
2020-06-23 08:58:08 +02:00
Rasmus Lerchedahl Petersen
a55b4660d4
Python: support for with-definitions
2020-06-23 07:45:30 +02:00
Robert Marsh
c1eb712841
C++: QLDoc for data and taint models
2020-06-22 17:25:55 -07:00
Asger Feldthaus
b4f75ef414
Merge branch 'master' into js-team-sprint-merge2
2020-06-23 00:18:09 +01:00
Asger F
2edeb4aa8d
Merge pull request #3735 from esbena/js/insecure-http-options
...
JS: polish js/disabling-certificate-validation
2020-06-23 00:16:45 +01:00
Asger F
ca06f6dfb4
Merge branch 'js-team-sprint' into js/insecure-http-options
2020-06-23 00:16:02 +01:00
semmle-qlci
69b44def7b
Merge pull request #3759 from asger-semmle/js/sprint-suite
...
Approved by erik-krogh
2020-06-22 23:27:43 +01:00
toufik-airane
f7cbc8a8d4
Enhance query ouput
...
- add valuable text to assess the query results
- add an example of the output
2020-06-22 22:34:06 +02:00
toufik-airane
0f8879716f
rewrite description
2020-06-22 21:57:58 +02:00
Aditya Sharad
915148f82c
C++: Fix placeholder syntax in training example
2020-06-22 12:26:26 -07:00
Aditya Sharad
95f8ba433e
Java: Fix training example
2020-06-22 12:21:15 -07:00
Robert Marsh
231b85cb11
C++: File-level QLDoc for publicly imported models
2020-06-22 11:43:43 -07:00
Alessio Della Libera
a759905a5c
Update javascript/ql/src/experimental/Security/CWE-117/LogInjection.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-22 20:37:38 +02:00
toufik-airane
364f0ca734
rewrite description
2020-06-22 20:11:58 +02:00
toufik-airane
ac8991b192
remove JWTMissingSecretOrPublicKeyVerification.qll
2020-06-22 20:09:48 +02:00
toufik-airane
d9ecb7d762
rewrite help
2020-06-22 20:06:17 +02:00
toufik-airane
d65b7be32b
rewrite help
2020-06-22 20:00:52 +02:00
Toufik Airane
bb7ba50e23
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-06-22 19:27:36 +02:00
james
3fa49a9771
address review comment about sentence style
2020-06-22 17:07:10 +01:00
James Fletcher
676d486635
Apply suggestions from code review
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-06-22 17:03:31 +01:00
Asger Feldthaus
1efd71a681
JS: Sort security suite
2020-06-22 16:40:55 +01:00
Asger Feldthaus
8cc41a0c84
JS: Add new queries to security suite
2020-06-22 16:40:19 +01:00
Asger F
a067cd35aa
Merge pull request #3756 from esbena/js/delay-slow-query-merge
...
JS: delay merging two slow queries
2020-06-22 16:35:15 +01:00
Asger F
7d54b02fb9
Merge branch 'js-team-sprint' into js/delay-slow-query-merge
2020-06-22 16:34:49 +01:00
Asger F
4a459c8a7d
Merge pull request #3755 from esbena/js/polish-imcs
...
JS: polish js/incomplete-html-attribute-sanitization
2020-06-22 16:32:16 +01:00
Jonas Jensen
39137510ba
Merge pull request #3736 from rneatherway/exclude-cs-vulnerable-package
...
Exclude dependency-based query from C# Code Scanning
2020-06-22 17:27:23 +02:00
Geoffrey White
466f36c7e1
C++: Autoformat.
2020-06-22 16:04:32 +01:00
Rasmus Wriedt Larsen
d5895c16c8
Python: Changing signature in overriden method is not an error
...
Rather, fulfiling the Liskov substitution principle is an opinionated
recommendation. Looking at `py/inheritance/incorrect-overridden-signature` and
`py/mixed-tuple-returns`, it seems very appropriate that this should have
`@severity recommendation`, and `@sub-severity high`.
2020-06-22 16:58:52 +02:00
Rasmus Lerchedahl Petersen
e8289d6fa1
Python: add regression tests and organise tests
2020-06-22 16:36:19 +02:00
Asger Feldthaus
5cd2c7cdb2
JS: Reduce precision of js/unused-npm-dependency
2020-06-22 15:25:24 +01:00
Rasmus Lerchedahl Petersen
aa04a2a476
Python: sync dataflow files
2020-06-22 14:56:11 +02:00
Esben Sparre Andreasen
d4ad9a8bb2
Update change-notes/1.25/analysis-javascript.md
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-22 14:55:27 +02:00
Rasmus Lerchedahl Petersen
656c76558a
Merge branch 'master' of github.com:github/codeql into SharedDataflow
...
To sync dataflow files
2020-06-22 14:55:04 +02:00
Esben Sparre Andreasen
9a0bbb31f4
Revert "Merge pull request #3702 from esbena/js/memory-exhaustion"
...
This reverts commit eca5e2df8a , reversing
changes made to 1548eca994 .
2020-06-22 14:46:51 +02:00
Esben Sparre Andreasen
0a8d15ccc4
Revert "Merge pull request #3672 from esbena/js/server-crashing-route-handler"
...
This reverts commit 243e3ad9e3 , reversing
changes made to df79f2adc5 .
2020-06-22 14:45:35 +02:00
Esben Sparre Andreasen
3be094ea5b
JS: polish js/incomplete-html-attribute-sanitization
2020-06-22 14:35:00 +02:00
Rasmus Lerchedahl Petersen
13bb971b05
Python: sort out some enclosing callable confusion
2020-06-22 14:26:25 +02:00
Jonas Jensen
5a5df4de26
Revert "Merge pull request #3419 from MathiasVP/flat-structs"
...
There was unfortunately a semantic merge conflict between #3419 and
#3587 that caused a performance regression on (at least) OpenJDK.
This reverts commit 982fb38807 , reversing
changes made to b841cacb83 .
2020-06-22 14:09:06 +02:00
semmle-qlci
7a5aae7432
Merge pull request #3630 from erik-krogh/DevServer
...
Approved by asgerf
2020-06-22 12:59:13 +01:00
Asger F
56124b68a3
Update javascript/ql/src/Security/CWE-079/ExceptionXss.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-06-22 12:54:19 +01:00
Rasmus Wriedt Larsen
daa1b6fc79
Python: Fix grammar in QLDoc
...
Co-authored-by: Taus <tausbn@gmail.com >
2020-06-22 13:41:03 +02:00
Rasmus Wriedt Larsen
287bc40264
Merge pull request #3743 from tausbn/python-fix-deprecated-terms
...
Python: Fix a bunch of deprecated terms.
2020-06-22 13:36:06 +02:00
semmle-qlci
7f29465f35
Merge pull request #3752 from erik-krogh/limitStr
...
Approved by asgerf
2020-06-22 12:31:49 +01:00
toufik-airane
4853b8a281
Try to finish the PR
...
- Add help documentation
- Empty qll file
- rename examples
2020-06-22 13:26:13 +02:00
semmle-qlci
e06a54c33d
Merge pull request #3494 from hvitved/dataflow/partial-flow-access-path-limit
...
Approved by aschackmull
2020-06-22 12:09:00 +01:00
James Fletcher
5ebaa1d303
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-06-22 12:07:42 +01:00
Rasmus Lerchedahl Petersen
8d564e06d7
Python: sync data flow files
2020-06-22 12:16:11 +02:00
Geoffrey White
104298e09a
Merge branch 'master' into models5
2020-06-22 10:59:15 +01:00
Asger Feldthaus
1edb2a1892
JS: Rephrase XSS queries that use exception/dom text as source
2020-06-22 10:44:46 +01:00
Calum Grant
f2f020fa51
Merge pull request #3610 from hvitved/csharp/dataflow/call-sensitivity
...
C#: Add call-sensitivity to data-flow call resolution
2020-06-22 10:36:45 +01:00
Rasmus Lerchedahl Petersen
94a828aca2
Merge branch 'master' of github.com:github/codeql into SharedDataflow
...
To avoid CodeScan check failing
2020-06-22 11:29:00 +02:00
Rasmus Lerchedahl Petersen
b65e6fba9e
Python: attempt at capturing maximal flows
...
(this is what used to be "all flows")
2020-06-22 11:28:28 +02:00
Esben Sparre Andreasen
0654823b97
Merge branch 'js-team-sprint' into js/insecure-http-options
2020-06-22 11:25:25 +02:00
Esben Sparre Andreasen
f1dad0d6e0
Update DisablingCertificateValidation.qhelp
2020-06-22 11:24:33 +02:00
Esben Sparre Andreasen
3e898487e8
Apply suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-06-22 11:23:40 +02:00
Rasmus Lerchedahl Petersen
cc8367bff2
Python: update readme with lessons learned
2020-06-22 11:22:32 +02:00
Anders Schack-Mulligen
71665a02fa
Merge pull request #3737 from Marcono1234/patch-1
...
Simplify NoAssignInBooleanExprs.ql
2020-06-22 10:46:00 +02:00
Erik Krogh Kristensen
8d1b080d78
limit size of getStringValue
2020-06-22 10:29:53 +02:00
Tom Hvitved
72e6c9c2b1
Data flow: Use accessPathLimit() in partial flow as well
2020-06-22 10:08:51 +02:00
Rasmus Lerchedahl Petersen
47819bbcda
Python: obtain remaining expected flows
...
- implement encosing callable for more nodes
- implement extra flow for ESSA global variables
2020-06-22 07:36:09 +02:00
Porcupiney Hairs
a519132407
add support for libxml2
2020-06-22 02:01:07 +05:30
toufik-airane
7166d5422e
add test file for CWE-347
...
Add a test file for CWE-347.
The HS256 algorithm is safe, but the none algorithm is unsafe.
2020-06-20 17:10:35 +02:00
toufik-airane
8a2a33459a
Merge branch 'master' of github.com:toufik-airane/codeql
2020-06-20 16:56:27 +02:00
toufik-airane
b0aaca0e1c
JWT Missing Secret Or Public Key Verification
...
Add an experimental CodeQL query.
2020-06-20 16:54:41 +02:00
Taus Brock-Nannestad
5d5f1b487b
Merge branch 'master' into python-fix-deprecated-terms
2020-06-19 21:59:17 +02:00
Asger F
eca5e2df8a
Merge pull request #3702 from esbena/js/memory-exhaustion
...
JS: add query js/memory-exhaustion
2020-06-19 20:35:57 +01:00
Jonas Jensen
ac89559b20
Merge pull request #3744 from github/p0-patch-1
...
Fix typo in cpp-security-extended.qls
2020-06-19 21:19:20 +02:00
Pavel Avgustinov
00f1e57d0c
Update cpp-security-extended.qls
2020-06-19 20:16:24 +01:00
Jonas Jensen
81d8dc15cd
Merge pull request #3693 from geoffw0/stringtest
...
C++: Add tests of char* -> std::string -> char* conversions.
2020-06-19 21:12:33 +02:00
Taus Brock-Nannestad
410f4781b3
Python: Fix one last reference.
...
This one got lost in the big renaming somehow.
2020-06-19 20:15:01 +02:00
semmle-qlci
1548eca994
Merge pull request #3689 from erik-krogh/https-fix
...
Approved by mchammer01
2020-06-19 17:00:11 +01:00
Tom Hvitved
573d55a160
Merge pull request #3740 from github/codeql-analysis-yml
...
Enable code scanning
2020-06-19 17:57:52 +02:00
Taus Brock-Nannestad
48e3e9c0b4
Python: Do all the renames.
2020-06-19 17:02:47 +02:00
james
f02b54fcd2
docs: add more detailed qldoc style guide
2020-06-19 15:59:22 +01:00
Taus Brock-Nannestad
06d6913a20
Python: Change "sanity" to "consistency".
2020-06-19 16:55:59 +02:00
Taus Brock-Nannestad
01fb1e3786
Python: Get rid of deprecated terms in code and .qhelp.
2020-06-19 16:51:09 +02:00
Taus
2081d0cecc
Merge pull request #3575 from RasmusWL/python-add-qldoc-FunctionValue.getQualifiedName
...
Python: Add QLDoc for FunctionValue.getQualifiedName
2020-06-19 16:32:23 +02:00
Tom Hvitved
56670f3a5f
Disable analysis for JS and Python
2020-06-19 16:25:23 +02:00
Jonas Jensen
09d7ed092b
Merge pull request #3612 from dbartol/github/codeql-c-analysis-team/69_union
...
C++: Share `TInstruction` across IR stages
2020-06-19 16:03:11 +02:00
Geoffrey White
c18e0aa21a
C++: Add a TODO comment.
2020-06-19 14:30:56 +01:00
Erik Krogh Kristensen
0f5ef2c02a
Merge branch 'js-team-sprint' into https-fix
2020-06-19 14:57:44 +02:00
semmle-qlci
e13353f26a
Merge pull request #3732 from erik-krogh/priv-file-polish
...
Approved by mchammer01
2020-06-19 13:56:57 +01:00
Tom Hvitved
4b47483263
Add codeql-config.yml
2020-06-19 12:28:52 +00:00
Erik Krogh Kristensen
e46bd709c4
add change note
2020-06-19 14:15:50 +02:00
Erik Krogh Kristensen
0ee3f4977c
add test of webpack-dev-server and monorepo import
2020-06-19 14:15:46 +02:00
Erik Krogh Kristensen
c860151e8d
recognize instances of express from webpack-dev-server
2020-06-19 14:15:25 +02:00
Erik Krogh Kristensen
11cc97d286
add basic support for importing from neighbouring packages
2020-06-19 14:15:10 +02:00
Erik Krogh Kristensen
a17d152ca4
Merge branch 'js-team-sprint' into priv-file-polish
2020-06-19 13:19:10 +02:00
semmle-qlci
bfb2e9d6ea
Merge pull request #3724 from erik-krogh/bad-random-polish
...
Approved by mchammer01
2020-06-19 12:18:25 +01:00
Tom Hvitved
ffe3f500d7
Restrict languages in codeql-analysis.yml
2020-06-19 13:01:28 +02:00
Esben Sparre Andreasen
457588e893
JS: mention MITM
2020-06-19 11:59:12 +02:00
Geoffrey White
ab8d1ea723
C++: Model ConversionConstructor instead of all Constructors.
2020-06-19 10:55:10 +01:00
Anders Schack-Mulligen
8107fbadc2
Merge pull request #3456 from hvitved/dataflow/precise-field-types
...
Data flow: Track precise types during field flow
2020-06-19 11:50:10 +02:00
Esben Sparre Andreasen
4126d5b59e
Merge pull request #3646 from dellalibera/master
...
[javascript] CodeQL query to detect missing origin validation in cross-origin communication via postMessage
2020-06-19 11:43:57 +02:00
Rasmus Lerchedahl Petersen
426b1da552
Python: update sources and sinks
2020-06-19 11:38:15 +02:00
Tom Hvitved
a285f6460c
Create codeql-analysis.yml
2020-06-19 11:34:31 +02:00
Geoffrey White
3f4ebd285f
C++: Move models into models dir.
2020-06-19 10:26:07 +01:00
Rasmus Lerchedahl Petersen
9e078da963
Python: Better definition of all flows
...
does not become too big, when we filter out 0-step flows
2020-06-19 11:25:34 +02:00
Geoffrey White
e0651b2c19
Merge remote-tracking branch 'upstream/master' into models5
2020-06-19 10:15:25 +01:00
Geoffrey White
eebaf0f330
C++: Modify the tests so that ConversionConstructors are tested; we don't want the general case for Constructors any more.
2020-06-19 10:15:01 +01:00
Tom Hvitved
ca86bb8603
Address review comments
2020-06-19 10:34:11 +02:00
Esben Sparre Andreasen
0463c427a5
Update javascript/ql/src/Security/CWE-770/ResourceExhaustion.qhelp
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-06-19 09:47:59 +02:00
Esben Sparre Andreasen
b8229ca362
Update javascript/ql/src/Security/CWE-770/ResourceExhaustion.qhelp
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-06-19 09:47:48 +02:00
Esben Sparre Andreasen
e73beccc0b
Update javascript/ql/src/Security/CWE-770/ResourceExhaustion.qhelp
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-06-19 09:47:26 +02:00
Esben Sparre Andreasen
2846666f32
Update javascript/ql/src/Security/CWE-770/ResourceExhaustion.qhelp
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-06-19 09:47:13 +02:00
Esben Sparre Andreasen
4557af3c30
Update javascript/ql/src/Security/CWE-770/ResourceExhaustion.qhelp
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-06-19 09:46:58 +02:00
Esben Sparre Andreasen
baaa31665a
Update javascript/ql/src/experimental/Security/CWE-020/PostMessageNoOriginCheck.qhelp
2020-06-19 09:05:13 +02:00
Rasmus Lerchedahl Petersen
5ca6391f15
Python: update call graph test
...
we also have flow into functions!
2020-06-19 07:49:47 +02:00
Rasmus Lerchedahl Petersen
5a864aab87
Python: override genEnclosingCallable
...
achieved flow out of functions!
2020-06-19 07:29:46 +02:00
Alessio Della Libera
eba64dba7c
Update javascript/ql/src/experimental/Security/CWE-020/PostMessageNoOriginCheck.ql
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-18 19:44:46 +02:00
Alessio Della Libera
c0271b1627
Update javascript/ql/src/experimental/Security/CWE-020/PostMessageNoOriginCheck.qhelp
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-18 19:44:38 +02:00
Alessio Della Libera
ffc9a449ab
Update javascript/ql/src/experimental/Security/CWE-020/PostMessageNoOriginCheck.qhelp
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-18 19:43:45 +02:00
Alessio Della Libera
e84339d5bf
Update javascript/ql/src/experimental/Security/CWE-020/PostMessageNoOriginCheck.qhelp
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-18 19:43:36 +02:00
ubuntu
71a7ec593c
Use StringOps to identify functions used for verifing the origin
2020-06-18 19:41:07 +02:00
Alessio Della Libera
cc91026873
Update javascript/ql/src/experimental/Security/CWE-117/LogInjection.qll
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-06-18 19:31:11 +02:00
Alessio Della Libera
b4f255176a
Update javascript/ql/src/experimental/Security/CWE-117/LogInjection.help
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-06-18 19:29:34 +02:00
Erik Krogh Kristensen
7d6dac479c
Merge branch 'js-team-sprint' into https-fix
2020-06-18 16:53:01 +02:00
Erik Krogh Kristensen
dcf617b235
Merge branch 'js-team-sprint' into bad-random-polish
2020-06-18 16:52:32 +02:00
Erik Krogh Kristensen
6b0adf18d1
rewrite sentence in private-file-exposure qhelp
2020-06-18 16:51:15 +02:00
Erik Krogh Kristensen
1556b62007
Merge branch 'js-team-sprint' into priv-file-polish
2020-06-18 16:40:53 +02:00
Erik Krogh Kristensen
9ba2c98ec0
Apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-06-18 16:38:52 +02:00
semmle-qlci
20e96799e2
Merge pull request #3661 from erik-krogh/build-leaks
...
Approved by asgerf, mchammer01
2020-06-18 15:32:45 +01:00
Taus
44637e29ee
Merge pull request #3716 from RasmusWL/python-fix-re-escape-fp
...
Python: Fix FP in treating re.escape as regex
2020-06-18 16:05:50 +02:00
Marcono1234
161ba92123
Simplify NoAssignInBooleanExprs.ql
2020-06-18 15:16:09 +02:00
Rasmus Lerchedahl Petersen
9669a6a4dc
Python: test for getASuccessor
...
also align test names
2020-06-18 15:10:45 +02:00
Rasmus Lerchedahl Petersen
03b26f7ebe
Python: Remove excessive type pruning
2020-06-18 13:58:47 +02:00
Esben Sparre Andreasen
ab01dda559
JS: another qhelp fixup
2020-06-18 13:01:02 +02:00
Esben Sparre Andreasen
c9f60d4c97
JS: add lodash sinks for js/resource-exhaustion
2020-06-18 13:01:02 +02:00
Esben Sparre Andreasen
96160a6334
JS: fixup qhelp
2020-06-18 13:01:02 +02:00
Esben Sparre Andreasen
3f67e90374
JS: rename query, support timeouts, add documentation, add to suite
2020-06-18 13:01:02 +02:00
Esben Sparre Andreasen
d9d8eb4805
JS: avoid type inference in the taint steps (just a nice to have)
2020-06-18 13:00:45 +02:00
Esben Sparre Andreasen
fa4e8914e6
JS: fixups
2020-06-18 13:00:45 +02:00
Esben Sparre Andreasen
7b97fd07a8
JS: add query js/memory-exhaustion
2020-06-18 13:00:45 +02:00
Robin Neatherway
17d36cf363
Exclude dependency-based query from C# Code Scanning
...
This query overlaps with tools such as dependabot.
2020-06-18 11:29:15 +01:00
Esben Sparre Andreasen
44aa182d0d
Update change-notes/1.25/analysis-javascript.md
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-18 10:14:16 +02:00
Esben Sparre Andreasen
5e31f3a34e
JS: polish js/disabling-certificate-validation
2020-06-18 09:07:08 +02:00
Rasmus Lerchedahl Petersen
1562f5c69a
Python: General comment on dataflow
...
between SSA variables and control flow nodes
2020-06-18 07:52:29 +02:00
Rasmus Lerchedahl Petersen
d283919b92
Python: implemented ParameterNode, updated test
2020-06-18 07:45:16 +02:00
ubuntu
41c029567f
Add CodeQL query to detect Log Injection in JS code
2020-06-17 21:16:24 +02:00
Erik Krogh Kristensen
27a20b263e
Merge branch 'https-fix' of github.com:erik-krogh/ql into https-fix
2020-06-17 21:06:21 +02:00
Erik Krogh Kristensen
7a1c161e9e
Merge branch 'js-team-sprint' into https-fix
2020-06-17 21:04:44 +02:00
Erik Krogh Kristensen
218338b4f1
Merge branch 'js-team-sprint' into bad-random-polish
2020-06-17 21:04:00 +02:00
Erik Krogh Kristensen
73f26956a6
Merge branch 'js-team-sprint' into priv-file-polish
2020-06-17 21:03:09 +02:00
Rasmus Lerchedahl Petersen
c20219c2b9
Python: more local flow and more tests
2020-06-17 20:48:06 +02:00
Geoffrey White
35487ff109
Merge branch 'master' into stringtest
2020-06-17 19:00:26 +01:00
Erik Krogh Kristensen
bdda587247
Merge branch 'js-team-sprint' into build-leaks
2020-06-17 19:51:30 +02:00
ubuntu
c490cfdfa5
Create another branch
2020-06-17 19:51:14 +02:00
Erik Krogh Kristensen
6d6f29eb85
Merge pull request #3726 from erik-krogh/bad-code-polish
...
JS: Bad code polish
2020-06-17 19:45:37 +02:00
ubuntu
4ccfdef71d
Add CodeQL query to detect Log Injection in JS code
2020-06-17 19:44:58 +02:00
Geoffrey White
174fdadbf5
Merge branch 'master' into stringtest
2020-06-17 18:24:30 +01:00
Rasmus Lerchedahl Petersen
ce57a28c8f
Python: Use CallableValue and improve tests
2020-06-17 19:12:10 +02:00
Geoffrey White
03c6d7a7e5
Merge pull request #3654 from jbj/controlsBlock-perf
...
C++: Speed up IRGuardCondition::controlsBlock
2020-06-17 17:53:10 +01:00
Rasmus Lerchedahl Petersen
f24dc69e1d
Python: add flow from ArgumentNodes
2020-06-17 18:36:50 +02:00
Rasmus Lerchedahl Petersen
a45b5a7d3c
Python: Implemented return node
...
but I think they receive no flow
2020-06-17 17:41:43 +02:00
Tom Hvitved
ad56f17246
Merge pull request #2 from aschackmull/dataflow/content-type-tracking
...
Dataflow: Record content types
2020-06-17 17:26:04 +02:00
Erik Krogh Kristensen
a465fef7aa
shorten sentence in qhelp
2020-06-17 17:24:18 +02:00
Anders Schack-Mulligen
74eab3cbc0
Dataflow: Fix qltest.
2020-06-17 17:23:35 +02:00
Erik Krogh Kristensen
7aa911b9f4
add reference to cwe-116 in change-note
2020-06-17 17:20:46 +02:00
Erik Krogh Kristensen
abd9aab109
code-injection -> code injection
2020-06-17 17:20:46 +02:00
Erik Krogh Kristensen
45e2b94eb5
Apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-06-17 17:19:44 +02:00
Erik Krogh Kristensen
69888f90c6
add dot after bullet-point
2020-06-17 17:15:39 +02:00
Anders Schack-Mulligen
cedfaf6aaf
Dataflow: autoformat
2020-06-17 17:09:55 +02:00
Anders Schack-Mulligen
543ab71dfe
Dataflow: minor review fixes.
2020-06-17 17:03:22 +02:00
Rasmus Lerchedahl Petersen
25d624d64b
Python: Implement parameter nodes
2020-06-17 16:59:19 +02:00
Geoffrey White
33fab08975
C++: Autoformat.
2020-06-17 15:53:05 +01:00
Dave Bartolomeo
687d6d2643
C++: Replace TRawInstruction() calls
...
Replace most direct calls to `TRawInstruction()` with calls to `getInstructionTranslatedElement()` and `getInstructionTag()`, matching existing practice. One tiny RA diff in an inconsequential join order in `getInstructionVariable`.
2020-06-17 10:52:32 -04:00
Geoffrey White
833f5b0cf3
C++: Add flow through assignment operators.
2020-06-17 15:47:37 +01:00
Geoffrey White
b9a65581ce
C++: Some constructors should have dataflow instead of taint.
2020-06-17 15:47:37 +01:00
Geoffrey White
031c9b98f1
C++: General taint flow through constructors.
2020-06-17 15:47:37 +01:00
Geoffrey White
30151c99d7
C++: Remove the std::string Constructor model.
2020-06-17 15:43:58 +01:00
Rasmus Lerchedahl Petersen
8e51b2fed8
Python: refactor test for global flow
2020-06-17 16:43:11 +02:00
Geoffrey White
d565cfc58e
C++: Add a test of default constructors etc.
2020-06-17 15:41:36 +01:00
Geoffrey White
c196ea24b2
C++: Add taint tests of class constructors and assignment.
2020-06-17 15:41:00 +01:00
Geoffrey White
ea9e9a7a26
C++: Add taint tests of std::string constructors and assignment.
2020-06-17 15:41:00 +01:00
Dave Bartolomeo
c1016743a5
C++: Remove instructionOrigin()
...
This noopt predicate is no longer necessary. It's equivalent to `instruction = TRawInstruction(element, tag)`, which is already materialized and has a more favorable column order anyway.
2020-06-17 10:25:59 -04:00
Rasmus Lerchedahl Petersen
71f364eef3
Python: Implement OutNode
...
Also, fix test for local flow
2020-06-17 16:24:44 +02:00
Dave Bartolomeo
e85cc0b0c6
C++: Stop caching raw IR construction predicates
...
These predicates are only used within the new single IR stage, so there's no need to cache them beyond that. RA diffs are trivial. Where previously many of the predicate on `Instruction` were inline wrappers around cached predicates from `IRConstruction`, now the predicates from `IRConstruction` get inlined into the `Instruction` predicates, and the `Instruction` predicates get materialized. The net amount of work is the same, but now it's not getting cached unnecessarily.
2020-06-17 09:47:48 -04:00
Anders Schack-Mulligen
d28b5ace63
Dataflow: Sync.
2020-06-17 15:40:48 +02:00
Anders Schack-Mulligen
10b64fc47a
Dataflow: Record content type for stores.
2020-06-17 15:40:42 +02:00
Mathias Vorreiter Pedersen
01abaf373a
Merge pull request #3728 from geoffw0/memberfunctions
...
C++: Split MemberFunction.qll from Function.qll.
2020-06-17 14:54:33 +02:00
Jonas Jensen
a87ff80ac0
Merge pull request #3587 from rdmarsh2/ir-this-parameter-2
...
C++: IR return indirections for `this`
2020-06-17 13:27:35 +02:00
Geoffrey White
7edaade175
C++: Improve QLDoc.
2020-06-17 12:11:42 +01:00
Erik Krogh Kristensen
cd111fe350
Merge pull request #3721 from asger-semmle/js/non-linear-pattern-msg
...
JS: Improve alert message in js/non-linear-pattern
2020-06-17 13:10:56 +02:00
Geoffrey White
0a9ec70c31
C++: Autoformat.
2020-06-17 11:54:50 +01:00
Erik Krogh Kristensen
b0be0eb805
fix qhelp links
2020-06-17 11:50:44 +02:00
Erik Krogh Kristensen
fa0a8c3423
add documentation examples as tests
2020-06-17 11:37:32 +02:00
Erik Krogh Kristensen
b42824640d
add qhelp for js/exposure-of-private-files
2020-06-17 11:29:24 +02:00
Geoffrey White
f3e24963cb
C++: Update QLDoc.
2020-06-17 10:27:34 +01:00
ubuntu
22cb45beab
Merge remote-tracking branch 'upstream/master'
2020-06-17 11:13:13 +02:00
Erik Krogh Kristensen
345283fe34
add change note
2020-06-17 10:48:27 +02:00
Erik Krogh Kristensen
639907967f
add home/rootdir as leaking folders
2020-06-17 10:46:42 +02:00
Erik Krogh Kristensen
6675ddae12
add more libraries that serve static files to js/exposure-of-private-files
2020-06-17 10:00:59 +02:00
Jonas Jensen
e0ba23d2c7
C++: @precision high for tainted-format-string*
...
I think these queries have excellent results on lgtm.com. Many of the
results come from projects that use `sprintf` like it's a templating
engine, trusting that values from `argv` or `getenv` contain the correct
number of `%s`. I think we want to flag that.
The structure of the change note is modeled after 91af51cf46 .
2020-06-17 09:03:13 +02:00
Rasmus Lerchedahl Petersen
52898f16f5
Python: update paths after move
2020-06-17 08:34:45 +02:00
Rasmus Lerchedahl Petersen
47f5b04e87
Python: fix identical-files.json after move
...
also more grouping
2020-06-17 07:08:46 +02:00
Rasmus Lerchedahl Petersen
e192b66116
Python: move shared dataflow to experimental
2020-06-17 06:46:46 +02:00
luchua-bc
f40e27a3c5
Hardcoded AWS credentials
2020-06-17 02:46:02 +00:00
Erik Krogh Kristensen
fb5e13b456
Apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-06-16 23:45:45 +02:00
Erik Krogh Kristensen
d811518a2e
fixed from doc review, and add fixed example for js/biased-cryptographic-random using a secure library
2020-06-16 23:26:54 +02:00
Dave Bartolomeo
8e977dc6bf
C++/C#: Move overrides of IRType::getByteSize() into leaf classes
...
See https://github.com/github/codeql/pull/2272 . I've added code comments in all of the places that future me will be tempted to hoist these overrides.
2020-06-16 16:48:42 -04:00
Dave Bartolomeo
24c3110989
Merge from master
2020-06-16 16:37:38 -04:00
Erik Krogh Kristensen
210e71cd93
update expected output
2020-06-16 21:52:59 +02:00
Robert Marsh
ef940e815f
C++: Add comment for false positives in swap tests
2020-06-16 11:46:14 -07:00
Robert Marsh
0c99b3644c
C++: remove false negative comments in swap tests
2020-06-16 11:33:26 -07:00
Robert Marsh
1c9b6f0a48
Merge branch 'master' into ir-this-parameter-2
...
Accept test changes - dataflow changes are all positive
2020-06-16 11:28:49 -07:00
Geoffrey White
3d75d287a9
C++: Split MemberFunction.qll from Function.qll.
2020-06-16 17:40:46 +01:00
ubuntu
3104f8a37b
Remove Fields in PostMessageEvent
2020-06-16 18:30:00 +02:00
Alessio Della Libera
68b2a6c848
Update javascript/ql/src/experimental/Security/CWE-020/PostMessageNoOriginCheck.ql
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-16 18:27:21 +02:00
Alessio Della Libera
8843522d14
Update javascript/ql/src/experimental/Security/CWE-020/PostMessageNoOriginCheck.ql
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-16 18:26:42 +02:00
Alessio Della Libera
72dc6510b2
Update javascript/ql/src/experimental/Security/CWE-020/PostMessageNoOriginCheck.ql
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-16 18:22:55 +02:00
Robert Marsh
ab327b989d
Merge pull request #3713 from MathiasVP/flow-diff-test
...
C++: Add test for differences between AST and IR field flow
2020-06-16 09:09:46 -07:00
Erik Krogh Kristensen
ac1a0d9925
Merge pull request #3725 from erik-krogh/yargs-changenote
...
JS: add changenote for yargs
2020-06-16 16:28:43 +02:00
Erik Krogh Kristensen
02c825351c
add change note for js/bad-code-sanitization
2020-06-16 16:25:30 +02:00
Erik Krogh Kristensen
5ce17bea60
add qhelp for js/bad-code-sanitization
2020-06-16 16:23:41 +02:00
Jonas Jensen
e5e373cff2
Merge pull request #3673 from MathiasVP/assign-op-using-swap
...
C++: Add tests for taint through swap
2020-06-16 15:43:52 +02:00
Rasmus Lerchedahl Petersen
0f77403f0e
Python: small start on global flow
...
need to actually have `OutNode`s
2020-06-16 15:36:03 +02:00
Erik Krogh Kristensen
a0951f76b6
add additional taint steps when type-tracking RemoteFlowSource
2020-06-16 14:55:07 +02:00
semmle-qlci
07bff646d8
Merge pull request #3641 from asger-semmle/js/pre-call-graph-steps
...
Approved by erik-krogh
2020-06-16 13:41:55 +01:00
Erik Krogh Kristensen
cb5b946546
add changenote for yargs
2020-06-16 14:37:53 +02:00
Jonas Jensen
17737cd872
C++: Account for unreachable blocks in guards
...
This restores the code I removed in 4642037dc .
2020-06-16 14:33:12 +02:00
Rasmus Lerchedahl Petersen
f3e879a5ab
Python: small test of local flow
2020-06-16 14:31:22 +02:00
Erik Krogh Kristensen
696879653a
add qhelp to js/biased-cryptographic-random
2020-06-16 11:10:09 +02:00
lcartey@github.com
2978af34cd
Java: Add RestTemplate as flow source.
2020-06-16 09:50:37 +01:00
lcartey@github.com
f2edc53144
Java: Add Spring RestTemplate return values to untrusted data types
...
- Also improve unwrapping of lists/arrays/maps etc.
2020-06-16 09:50:37 +01:00
lcartey@github.com
9625e82afd
Java: Model Spring WebClients/RestTemplates.
2020-06-16 09:50:37 +01:00
lcartey@github.com
cd6339f5cd
Java: Add Spring flow out of HttpEntity and HttpHeader
2020-06-16 09:50:36 +01:00
lcartey@github.com
93c28d4c03
Java: Add taint step to flow through Spring tainted user data class
...
getters.
2020-06-16 09:50:36 +01:00
lcartey@github.com
8678d5fc6f
Java: Model untrusted user data types
...
Model the datatypes that may be populated on demand from request
parameters.
2020-06-16 09:50:36 +01:00
lcartey@github.com
8bd5f748b4
Java: SpringController - handle non-string literal produces values.
2020-06-16 09:50:36 +01:00
lcartey@github.com
0db7cead31
Java: Model taint flow through ResponseEntity.
2020-06-16 09:50:35 +01:00
lcartey@github.com
f6b2accabd
Java: Model ResponseEntity.BodyBuilder
2020-06-16 09:50:35 +01:00
lcartey@github.com
e2cec582be
Java: XSS - ignore Spring sinks when content-type is safe.
...
Methods annotated with a produces field which indicates a safe
content-type should not be considered XSS sinks. For example:
@RequestMapping(..., produces = "application/json")
2020-06-16 09:50:35 +01:00
lcartey@github.com
f6a99cb42e
Java: Model produces parameter to RequestMapping attribute.
2020-06-16 09:50:34 +01:00
lcartey@github.com
8057dff368
Java: Add Spring XSS sinks
...
Look for Spring request methods which return a String value which may be
coerced into a text/html output.
2020-06-16 09:50:34 +01:00
lcartey@github.com
c59042f9c3
Java: Taint tracking through String.replace(all)?
2020-06-16 09:50:34 +01:00
lcartey@github.com
7d555a7467
Java: Track flow through HttpEntity and ResponseEntity
...
- Only track if the body is a String type, as that is the only type at
risk of XSS.
2020-06-16 09:50:33 +01:00
lcartey@github.com
1d1234093f
Java: Model Spring @ResponseBody methods.
2020-06-16 09:50:33 +01:00
lcartey@github.com
fd2cd6025d
Java: Modelling of the Spring HTTP classes.
2020-06-16 09:50:33 +01:00
lcartey@github.com
bfcc06dd0b
Java: Improve Spring controller modelling
...
- Identify ModelMaps correctly
- Add extra not tainted param types (Pageable)
- Identify ModelAttributes
2020-06-16 09:50:33 +01:00
lcartey@github.com
7c4251deac
Java: Add flow out of Map and List
2020-06-16 09:50:32 +01:00
lcartey@github.com
6de2b93f3a
Java: Add SpringWebRequest to RemoteTaintedMethod
2020-06-16 09:50:32 +01:00
lcartey@github.com
4300bc8088
Java: Update RemoteFlowSource to use improve Spring request parameter
...
mapping.
2020-06-16 09:50:31 +01:00
lcartey@github.com
f5dc0337ed
Java: Improve modelling of Spring request methods
...
- Recognise @<httpverb>Mapping as well as @RequestMapping.
- Identify tainted/not tainted parameters of RequestMapping methods.
2020-06-16 09:50:31 +01:00
Mathias Vorreiter Pedersen
c30d1a618e
C++: Add charpred to partial definition node classes in qltest
2020-06-16 09:55:37 +02:00
Jonas Jensen
d80a033bed
Merge pull request #3719 from dbartol/github/codeql-c-analysis-team/69-consistency
...
C++/C#: Fix a couple new consistency failures, and improve consistency messages
2020-06-16 08:48:35 +02:00
Rasmus Lerchedahl Petersen
0abba238cc
Python: bit more local flow and fix ql docs
2020-06-16 08:21:32 +02:00
Rasmus Lerchedahl Petersen
ad04ec554a
Python: group related predicates
...
also restore accidentally removed comment
2020-06-16 07:30:44 +02:00
Jonathan Leitschuh
c2052ed152
Add .gitignore for VS Code Generated maven project files
...
When VS Code detects a Maven project, it automatically generates
a bunch of Eclipse files to describe the project.
These are now ignored in order to not pollute the repository
2020-06-15 22:29:30 -04:00
Erik Krogh Kristensen
5e060fa6a8
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-15 23:47:40 +02:00
Erik Krogh Kristensen
315faaffee
small corrections in documentation
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-15 23:40:27 +02:00
Asger Feldthaus
23d28967a7
JS: Autoformat
2020-06-15 20:40:17 +01:00
Asger Feldthaus
3242f5ed94
JS: Include qhelp example in test suite
2020-06-15 17:37:26 +01:00
Asger Feldthaus
824054ba62
JS: Change note and updated help
2020-06-15 17:34:36 +01:00
Asger Feldthaus
7091a9f704
JS: Special-case alert message for type annotations
2020-06-15 17:17:47 +01:00
Asger Feldthaus
c8ab69af11
JS: Avoid duplicate alerts
2020-06-15 16:57:54 +01:00
Asger Feldthaus
f380898126
JS: Add test showing duplicate alerts
2020-06-15 16:40:37 +01:00
Aditya Sharad
d7d00bddf6
Merge pull request #3718 from adityasharad/cpp/formatting-function-doc
...
C++: Fix QLDoc on `FormattingFunction` library
2020-06-15 08:39:16 -07:00
Asger Feldthaus
51d143d6f1
JS: Add test with destructuring pattern that looks like type annotations
2020-06-15 16:35:36 +01:00
Dave Bartolomeo
881b3c8e33
C#: Fix IR consistency errors
...
We were creating a `TranslatedFunction` even for functions that were not from source code, but then telling the IR package that those functions didn't have IR. This resulted in having prologue/epilogue instructions (e.g. `EnterFunction`, `ExitFunction`) with no enclosing `IRFunction`.
2020-06-15 11:33:00 -04:00
Owen Mansel-Chan
f9db197e17
Merge pull request #3683 from owen-mc/improve-ast-class-reference-for-java
...
Improve ast class reference for java
2020-06-15 16:25:25 +01:00
Erik Krogh Kristensen
23223fc5fb
change-note
2020-06-15 17:22:11 +02:00
Erik Krogh Kristensen
3ef5dc74a1
add backtracking to find division that end up being rounded
2020-06-15 17:10:10 +02:00
Erik Krogh Kristensen
e8db624e74
add .jar and .war to the list of sensitive files for js/insecure-download
2020-06-15 16:48:07 +02:00
Dave Bartolomeo
fecffab8e7
C++: Fix consistency error
...
`TTranslatedAllocationSideEffects` wasn't limiting itself to functions that actually have IR, so it was getting used even in template definitions.
2020-06-15 10:47:00 -04:00
Dave Bartolomeo
8cbc7e8654
C++/C#: Improve consistency failure result messages
...
Some of our IR consistency failure query predicates already produced results in the schema as an `@kind problem` query, including `$@` replacements for the enclosing `IRFunction` to make it easier to figure out which function to dump when debugging. This change moves the rest of the query predicates in `IRConsistency.qll` to do the same. In addition, it wraps each call to `getEnclosingIRFunction()` to return an `OptionalIRFunction`, which can be either a real `IRFunction` or a placeholder in case `getEnclosingIRFunction()` returned no results. This exposes a couple new consistency failures in `syntax-zoo`, which will be fixed in a subsequent commit.
This change also deals with consistency failures when the enclosing `IRFunction` has more than one `Function` or `Location`. For multiple `Function`s, we concatenate the function names. For multiple `Location`s, we pick the first one in lexicographical order. This changes the number of results produced in the existing tests, but does't change the actual number of problems.
2020-06-15 10:46:46 -04:00
semmle-qlci
3728e1afd3
Merge pull request #3715 from asger-semmle/js/returned-functions
...
Approved by erik-krogh, esbena
2020-06-15 15:32:54 +01:00
Aditya Sharad
1033d22d1b
C++: Fix QLDoc on FormattingFunction library
...
Copy-paste typo from `DataFlowFunction`.
2020-06-15 07:32:53 -07:00
Shati Patel
3520f2c737
Merge pull request #3714 from shati-patel/name-res-114
...
QL handbook: Update process for module resolution
2020-06-15 15:29:56 +01:00
Rasmus Lerchedahl Petersen
f8eb5839cd
Python: start on local flow
2020-06-15 16:25:41 +02:00
Shati Patel
947ccb06c7
Update docs/language/ql-handbook/name-resolution.rst
...
Co-authored-by: Henning Makholm <hmakholm@github.com >
2020-06-15 15:15:44 +01:00
Shati Patel
e69c946f31
Mention libraryPathDependencies
2020-06-15 14:56:57 +01:00
Erik Krogh Kristensen
d2716c532c
qhelp
2020-06-15 14:59:48 +02:00
Asger Feldthaus
17010e25a1
JS: Update another test
2020-06-15 13:55:46 +01:00
Erik Krogh Kristensen
dc09a68eb4
add change-note
2020-06-15 14:30:34 +02:00
semmle-qlci
57c8dd85a4
Merge pull request #2801 from esbena/js/bulky-route-handler-registration
...
Approved by asgerf
2020-06-15 13:06:22 +01:00
Erik Krogh Kristensen
8682918779
add change note
2020-06-15 13:47:43 +02:00
Erik Krogh Kristensen
fe9aa241a1
add qhelp
2020-06-15 13:47:39 +02:00
Erik Krogh Kristensen
4d1920eec1
add .js and .py files to js/insecure-download
2020-06-15 12:48:50 +02:00
Asger Feldthaus
4b3faabcc8
JS: Autoformat
2020-06-15 11:16:55 +01:00
Asger Feldthaus
c4179eb81d
JS: Update test
2020-06-15 11:13:20 +01:00
Rasmus Wriedt Larsen
c0043eb9db
Python: Don't treat re.escape(...) as a regex
...
Fixes https://github.com/github/codeql/issues/3712
2020-06-15 11:54:14 +02:00
Rasmus Lerchedahl Petersen
6dfb3a5df8
Python: Address QL docs
2020-06-15 11:50:07 +02:00
Rasmus Wriedt Larsen
7601bd497e
Python: Add tests for re.escape FP
2020-06-15 11:34:42 +02:00
semmle-qlci
b6b838774e
Merge pull request #3704 from asger-semmle/js/cve-serve
...
Approved by esbena
2020-06-15 09:54:17 +01:00
Asger Feldthaus
c7f74e47e2
JS: Autoformat
2020-06-15 09:51:42 +01:00
Calum Grant
0d1fb0f248
Merge pull request #3509 from hvitved/csharp/html-raw
...
C#: Recognize more calls to `IHtmlHelper.Raw`
2020-06-15 09:31:58 +01:00
Shati Patel
3dd529035d
QL reference: Update process for name resolution
2020-06-15 08:45:30 +01:00
Mathias Vorreiter Pedersen
6748f3887e
C++: Add test demonstrating differences between AST and IR field flow. Also refactored the partial definitions test
2020-06-15 09:39:15 +02:00
Rasmus Lerchedahl Petersen
1af2e56894
Summary of recent meeting.
...
Perhaps a not-python-specific version of this
could go into the shared implementation.
2020-06-15 08:01:02 +02:00
Dave Bartolomeo
89a1fd4b4a
C++/C#: Fix formatting
2020-06-13 08:22:04 -04:00
Dave Bartolomeo
eac3b06c57
C#: Fix up C# IR construction to latest interface
2020-06-12 17:40:27 -04:00
Dave Bartolomeo
73d2e09a8d
C++:/C# Remove opcode from TRawInstruction
2020-06-12 17:36:01 -04:00
Dave Bartolomeo
978275cbd4
C++/C#: Move irFunc out of various TInstruction branches
2020-06-12 17:26:45 -04:00
Dave Bartolomeo
07c1520b4d
C++/C#: Move ast out of TRawInstruction
2020-06-12 17:03:02 -04:00
Dave Bartolomeo
2aabe431f6
C++/C#: Stop caching getOldInstruction()
2020-06-12 16:22:58 -04:00
Dave Bartolomeo
ac169931b3
C++/C#: More efficient evaluation of SSA::hasInstruction()
2020-06-12 16:09:50 -04:00
Asger Feldthaus
315f3389d1
JS: Autoformat test
2020-06-12 19:58:05 +01:00
Asger F
d844e0025a
Merge pull request #3651 from esbena/js/bad-multicharacter-sanitization
...
JS: initial version of IncompleteMultiCharacterSanitization.ql
2020-06-12 16:25:22 +01:00
Asger Feldthaus
b9cd157c0f
JS: Autoformat
2020-06-12 15:36:02 +01:00
Dave Bartolomeo
4331b9b54e
C++: Simplify logic to an implication
2020-06-12 09:31:19 -04:00
Esben Sparre Andreasen
678bb7c128
JS: simplify loop detection
2020-06-12 14:56:08 +02:00
Asger Feldthaus
eaf6be5fea
JS: Fix lazy qldoc
2020-06-12 13:29:35 +01:00
Asger Feldthaus
91d98c0d00
JS: Change note
2020-06-12 13:12:55 +01:00
Asger Feldthaus
5548606f21
JS: Add test
2020-06-12 13:02:33 +01:00
Erik Krogh Kristensen
01c51eea89
Merge pull request #3680 from erik-krogh/bad-code-sanitizer
...
JS: Add query to detect bad code sanitizers
2020-06-12 14:00:21 +02:00
Asger Feldthaus
4795b87daa
JS: Add model of Micro
2020-06-12 12:45:11 +01:00
Asger Feldthaus
230f78afb6
JS: Step through path.{format, parse}
2020-06-12 12:26:45 +01:00
semmle-qlci
2342d3dba3
Merge pull request #3662 from asger-semmle/js/package-export-fixes
...
Approved by esbena
2020-06-12 12:18:23 +01:00
Max Schaefer
cafbe14dc8
Merge pull request #3703 from shati-patel/mergeback
...
Merge rc/1.24 into master
2020-06-12 11:37:47 +01:00
Shati Patel
07d5ee6126
Merge branch 'rc/1.24' into mergeback
2020-06-12 11:30:47 +01:00
Rasmus Lerchedahl Petersen
375da38765
Python: Minimal compilation of shared dataflow
2020-06-12 11:48:41 +02:00
Erik Krogh Kristensen
f0ec2eb37b
add missing qldoc
2020-06-12 11:47:53 +02:00
Erik Krogh Kristensen
c9fc1a378d
Merge pull request #3663 from erik-krogh/bad-crypto
...
JS: Introduce query to detect biased random number generators
2020-06-12 11:32:12 +02:00
Erik Krogh Kristensen
1751fb6c47
add missing qldoc
2020-06-12 11:30:22 +02:00
Erik Krogh Kristensen
adabd2daca
add qldoc and customizations module
2020-06-12 11:26:49 +02:00
Asger Feldthaus
4c536dde20
JS: Propagate locally returned functions out of calls
2020-06-12 10:07:37 +01:00
Erik Krogh Kristensen
908edb39b9
unsecure -> insecure
2020-06-12 11:02:26 +02:00
Erik Krogh Kristensen
86b23b239e
Merge pull request #3656 from erik-krogh/destruct-yargs
...
JS: support rest-patterns inside property patterns
2020-06-12 10:57:24 +02:00
Asger Feldthaus
6531db3cca
JS: Add test
2020-06-12 09:56:38 +01:00
Erik Krogh Kristensen
57d2226080
typo
2020-06-12 10:55:29 +02:00
Erik Krogh Kristensen
9780fcf8fe
fix ftp protocol regexp
2020-06-12 10:54:56 +02:00
Erik Krogh Kristensen
3f957103ed
improve alert message - and autoformat
2020-06-12 10:53:19 +02:00
Erik Krogh Kristensen
056a7e87ff
refactor into customizations module - and move curl download to a ClientRequest
2020-06-12 10:51:09 +02:00
Erik Krogh Kristensen
8225adcaea
move TODOs
2020-06-12 10:28:06 +02:00
Erik Krogh Kristensen
02c4a0477d
add tests for js/build-artifact-leak
2020-06-12 10:21:37 +02:00
Anders Schack-Mulligen
041af38934
Merge pull request #3697 from intrigus-lgtm/patch-1
...
Fix typo
2020-06-12 10:04:40 +02:00
semmle-qlci
6f40fc2eae
Merge pull request #3678 from Marcono1234/patch-1
...
Approved by shati-patel
2020-06-12 08:49:53 +01:00
Anders Schack-Mulligen
421a548e42
Update java/ql/src/semmle/code/java/Expr.qll
2020-06-12 09:24:37 +02:00
Jonas Jensen
abd05bcff1
Merge pull request #3596 from robertbrignull/more-suites
...
Add more code-scanning suites
2020-06-12 09:08:20 +02:00
semmle-qlci
035d8ea24c
Merge pull request #3690 from asger-semmle/js/fix-lgtm-filters-comment
...
Approved by max-schaefer
2020-06-12 07:40:58 +01:00
Esben Sparre Andreasen
1bdae109c5
Merge pull request #3686 from esbena/js/insecure-http-options
...
JS: add query js/disabling-certificate-validation
2020-06-12 08:40:12 +02:00
semmle-qlci
5c2f1169d0
Merge pull request #3679 from asger-semmle/js/dom-value-ref-restriction
...
Approved by erik-krogh, esbena
2020-06-12 07:39:26 +01:00
Esben Sparre Andreasen
243e3ad9e3
Merge pull request #3672 from esbena/js/server-crashing-route-handler
...
JS: add initial version of ServerCrash.ql
2020-06-12 08:38:37 +02:00
Robert Marsh
65f4ef712e
C++: accept false positive tests after merge
...
The IR false positives are due to the same path length limit as the AST
false positives on the same line.
2020-06-11 15:27:13 -07:00
Erik Krogh Kristensen
5b491313ad
add simple query for detecting sensitive files downloaded over unsecure connection
2020-06-11 23:19:28 +02:00
Erik Krogh Kristensen
065cb04202
make PropNode private again
2020-06-11 23:19:03 +02:00
Erik Krogh Kristensen
ef72c03ca9
use simpler taint-step for DestructingPattern
2020-06-11 23:16:46 +02:00
Marcono1234
7cd6dd27a6
Add link to Java regex Pattern documentation to language.rst
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-06-11 23:02:59 +02:00
intrigus-lgtm
422b059aec
Fix typo
2020-06-11 22:54:13 +02:00
Robert Marsh
a7efa0d602
Merge branch 'master' into ir-this-parameter-2
2020-06-11 13:21:52 -07:00
Mathias Vorreiter Pedersen
b78c06559e
Merge pull request #3691 from geoffw0/reftest
...
C++: Add a test case for CWE-114 involving pointers and references.
2020-06-11 22:02:45 +02:00
Geoffrey White
fdd7ad2300
C++: Add a SideEffectFunction model to 'system'.
2020-06-11 18:59:17 +01:00
Geoffrey White
e8b34e07f8
C++: Add an AliasFunction model to 'system'.
2020-06-11 18:44:41 +01:00
Geoffrey White
7fee2c239d
C++: Add an ArrayFunction model to 'system'.
2020-06-11 18:44:09 +01:00
Geoffrey White
b38a7a9ffc
C++: Fill out ArrayFunction model for 'fgets'.
2020-06-11 18:20:24 +01:00
Robert Marsh
ae46a8d8a1
Merge pull request #3692 from igfoo/blockstmt
...
C++: Fix reference to `Block`
2020-06-11 09:49:19 -07:00
Geoffrey White
40c20f2731
C++: Add the test for DefaultTaintTracking as well.
2020-06-11 17:37:05 +01:00
Geoffrey White
2f192f6a0c
C++: Add a test of char* -> std::string -> char* taint.
2020-06-11 17:37:05 +01:00
Dave Bartolomeo
41df7000c5
Merge from master, including fixing up merge conflicts
2020-06-11 12:20:46 -04:00
Ian Lynagh
fd88289e46
C++: Fix reference to Block
...
We don't call it `BlockStmt`.
2020-06-11 16:50:23 +01:00
Asger Feldthaus
475c631ff9
JS: Fix a misleading javadoc comment
2020-06-11 16:16:51 +01:00
Dave Bartolomeo
b116a3e8ea
C#: Rename IR module references to point to experimental
2020-06-11 10:24:01 -04:00
Anders Schack-Mulligen
c961a31789
Java: Add Expr.getAnEnclosingStmt.
2020-06-11 13:46:12 +02:00
semmle-qlci
c2de54f5ca
Merge pull request #3685 from shati-patel/ast-go-edits
...
Approved by felicitymay, owen-mc
2020-06-11 12:43:20 +01:00
Esben Sparre Andreasen
169c8909df
formatting
2020-06-11 13:28:26 +02:00
Esben Sparre Andreasen
bc7f02156b
JS: replace class with two predicates (and improve alert message)
2020-06-11 13:20:46 +02:00
Erik Krogh Kristensen
7c7af8d841
less heuristics when flagging division that is rounded
2020-06-11 12:55:13 +02:00
Erik Krogh Kristensen
f1b24ba901
use type inference to detect string concatenations
2020-06-11 12:34:58 +02:00
Esben Sparre Andreasen
2e059376fd
JS: add query js/disabling-certificate-validation
2020-06-11 12:32:01 +02:00
Erik Krogh Kristensen
f634c62af5
remove redundant check
2020-06-11 12:18:41 +02:00
Shati Patel
2874050503
CodeQL for Go: Edit AST reference
2020-06-11 10:49:19 +01:00
Rasmus Wriedt Larsen
a24974b194
Python: Add missing <p> to qhelp
2020-06-11 11:45:38 +02:00
Anders Schack-Mulligen
f23eb0432e
Java: Improve qldoc for JavadocTag.
2020-06-11 11:44:50 +02:00
Rasmus Wriedt Larsen
33a9fb6034
Python: Reorder XSLT qhelp to be valid
2020-06-11 11:30:54 +02:00
Tom Hvitved
ca531cbb9a
C#: Rename a class
2020-06-11 11:26:25 +02:00
Tom Hvitved
8395980fb1
C#: Recognize more calls to IHtmlHelper.Raw
...
Generalize logic by recognizing not only calls to
`Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.Raw()`, but calls to all `Raw()`
methods that implement `Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.Raw()`.
2020-06-11 11:26:25 +02:00
Erik Krogh Kristensen
c375a0c611
fix compilation and update expected output
2020-06-11 11:16:38 +02:00
Owen Mansel-Chan
ab52010674
Give general syntax instead of examples for exprs
2020-06-11 10:06:46 +01:00
Owen Mansel-Chan
3ca5d34d9b
Add more links to java AST class reference
...
Using the explicit hyperlink target feature of rst to keep the text in
the tables short and put all the URLs at the end of the document
2020-06-11 10:06:46 +01:00
Owen Mansel-Chan
84a4630eaf
Move explicit hyperlink targets to the bottom
2020-06-11 10:06:42 +01:00
Erik Krogh Kristensen
1124816f73
fixing FPs in js/biased-cryptographic-random
2020-06-11 11:06:02 +02:00
Calum Grant
5e021c24c1
Merge pull request #3652 from hvitved/csharp/dataflow/impl-layer
...
C#: Refactor data-flow predicates defined by dispatch
2020-06-11 10:01:50 +01:00
Asger Feldthaus
4bb2e8b637
JS: Update test externs and include array indices
2020-06-11 09:53:55 +01:00
Pavel Avgustinov
60df00c7e3
Merge pull request #3669 from github/sj-patch-contributing-SLA
...
Update CONTRIBUTING.md to clarify that CLAs are no longer required
2020-06-11 09:17:11 +01:00
Shati Patel
d9d0903084
Merge pull request #3681 from github/rc/1.24
...
Merge rc/1.24 into master
2020-06-11 09:00:57 +01:00
Max Schaefer
cee248520e
Merge pull request #3675 from owen-mc/ast-class-reference-for-go
...
AST class reference for go
2020-06-11 08:05:41 +01:00
Rasmus Lerchedahl Petersen
b5703cd3f6
Python: link to FP report in test file
2020-06-11 07:14:48 +02:00
Robert Marsh
982fb38807
Merge pull request #3419 from MathiasVP/flat-structs
...
C++: Add reverse reads to IR field flow
2020-06-10 14:31:00 -07:00
ubuntu
e8b05b70c4
Added support for detecting unsafe methods used for origin verification
2020-06-10 23:11:03 +02:00
ubuntu
cf3142e083
Updated qhelp with a third example
2020-06-10 23:09:35 +02:00
ubuntu
92f9f320f9
Added new example of an unsafe event.origin verification
2020-06-10 23:07:05 +02:00
Erik Krogh Kristensen
aa3482cbae
improve detection of duplicate results with js/code-injection
2020-06-10 22:58:02 +02:00
Erik Krogh Kristensen
5142670138
don't import AdditionalSinks, refactor sink out in new HeuristicSinks instead
2020-06-10 22:30:45 +02:00
Mathias Vorreiter Pedersen
a38839b446
C++: Include copy of IntWrapper class with two data members
2020-06-10 22:27:40 +02:00
Mathias Vorreiter Pedersen
ca20f17703
C++: Implement move constructor in terms of swap. I'm haven't found anything online on whether this is good or bad, and the only reason for not doing it might be performance.
2020-06-10 22:16:58 +02:00
Esben Sparre Andreasen
d6ae905eac
JS: remove speculative property access sink from js/server-crash
2020-06-10 21:40:12 +02:00
semmle-qlci
b841cacb83
Merge pull request #3676 from max-schaefer/js/global-access-paths-minor-fixes
...
Approved by erik-krogh
2020-06-10 20:02:55 +01:00
Calum Grant
cd914deeff
Merge pull request #3666 from hvitved/csharp/ir-experimental
...
C#: Move IR code into 'experimental' folder
2020-06-10 19:50:37 +01:00
Erik Krogh Kristensen
373a437d71
add query to detect improperly sanitized code
2020-06-10 19:50:12 +02:00
Owen Mansel-Chan
d8900448ec
Add references to the AST class reference for go
2020-06-10 17:32:41 +01:00
Owen Mansel-Chan
48ff00832c
Add a reference to the AST class reference for go
2020-06-10 17:24:40 +01:00
semmle-qlci
4cdb3c13df
Merge pull request #3658 from RasmusWL/python-3.8-dict-ismapping
...
Approved by tausbn
2020-06-10 17:19:49 +01:00
semmle-qlci
f7c6b1364b
Merge pull request #3640 from RasmusWL/python-handle-3.8-enum-convert
...
Approved by tausbn
2020-06-10 17:19:22 +01:00
Erik Krogh Kristensen
5c31b94761
autoformat and update expected output
2020-06-10 18:00:56 +02:00
Marcono1234
5d2b911596
Fix incorrect java.util.regex.Pattern name in specification
2020-06-10 17:56:57 +02:00
Max Schaefer
0f2186c844
JavaScript: Fix a few typos.
2020-06-10 16:44:24 +01:00
Owen Mansel-Chan
5b2c0fbb04
AST class reference for go
...
The master copy of this file is in the codeql-go repository
2020-06-10 16:42:03 +01:00
Mathias Vorreiter Pedersen
1a95095505
C++: Add default move constructor. Also removed debug comment I forgot to remove earlier. Luckily, that meant that no line numbers changed in .expected files.
2020-06-10 17:13:04 +02:00
Rasmus Wriedt Larsen
ce1f0a39ac
Python: Minor fixup of qhelp for XPath injection
2020-06-10 16:59:40 +02:00
Mathias Vorreiter Pedersen
5abab25c28
Update cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-06-10 16:51:21 +02:00
Rasmus Wriedt Larsen
48b2d2cc5c
Python: Make isSequence() and isMapping() tests version specific
...
Since unicode/bytes difference, output can't match between Python 2 and Python 3.
2020-06-10 16:43:56 +02:00
Asger Feldthaus
f23c6030aa
JS: Restrict domValueRef to known DOM property names
2020-06-10 15:14:23 +01:00
Asger Feldthaus
bb2b7fb6fb
JS: Add test with class stored in global variable
2020-06-10 15:14:23 +01:00
Rasmus Wriedt Larsen
721713b9e1
Python: Minor fixes from code review
...
Co-authored-by: Taus <tausbn@gmail.com >
2020-06-10 16:14:21 +02:00
Taus
5b0d92d72b
Merge pull request #3464 from yoff/UnicodeEscape
...
Python: Handle more escapes in regexes
2020-06-10 15:47:09 +02:00
Taus
da6736df37
Merge pull request #3668 from RasmusWL/python-random-modernisations
...
Python: Two small modernisations
2020-06-10 15:45:07 +02:00
Geoffrey White
91b9b78c48
C++: Add a test case for CWE-114 involving pointers and references.
2020-06-10 14:09:46 +01:00
Asger Feldthaus
36c4803694
JS: Add test
2020-06-10 14:08:33 +01:00
Mathias Vorreiter Pedersen
88dabffd2b
C++: Add tests that demonstrate flow through custom swap functions
2020-06-10 15:06:57 +02:00
Asger Feldthaus
07e90ff65f
JS: Autoformat
2020-06-10 14:03:01 +01:00
semmle-qlci
df79f2adc5
Merge pull request #3655 from asger-semmle/js/string-ops-regexp-test-fix
...
Approved by esbena
2020-06-10 13:35:22 +01:00
Esben Sparre Andreasen
1d396524a3
JS: add initial version of ServerCrash.ql
2020-06-10 14:25:56 +02:00
semmle-qlci
1b8f3c4b84
Merge pull request #3657 from hvitved/dataflow/hidden-nodes
...
Approved by aschackmull, jbj
2020-06-10 13:22:09 +01:00
Erik Krogh Kristensen
c4f61134f1
include the source of cryptographically random number in alert message
2020-06-10 13:32:46 +02:00
semmle-qlci
22d50f009e
Merge pull request #3667 from aschackmull/java/compiletimeconstant-cast-eval
...
Approved by aibaars
2020-06-10 12:05:42 +01:00
Bas van Schaik
bf19489501
Update CONTRIBUTING.md
2020-06-10 12:02:24 +01:00
Bas van Schaik
be48daf0d0
Update CONTRIBUTING.md
2020-06-10 11:58:38 +01:00
Erik Krogh Kristensen
7e8fd80327
use steps from InsecureRandomness, and use small-steps
2020-06-10 12:27:50 +02:00
Rasmus Wriedt Larsen
f73876e6ce
Python: Modernise ShouldBeContextManager
2020-06-10 11:53:11 +02:00
Rasmus Wriedt Larsen
37cfb5400d
Python: Modernise RatioOfDefinitions
2020-06-10 11:51:41 +02:00
Anders Schack-Mulligen
4b3ca13f25
Merge pull request #3491 from luchua-bc/java-insecure-smtp-ssl
...
Java: CWE-297 insecure JavaMail SSL configuration
2020-06-10 11:02:50 +02:00
Robert Brignull
ded5eec76a
rename slow-queries.yml to exclude-slow-queries.yml
2020-06-10 09:59:31 +01:00
Anders Schack-Mulligen
c334d72f11
Java: Fix CompileTimeConstantExpr qldoc and add char cast case.
2020-06-10 10:59:10 +02:00
Erik Krogh Kristensen
9029dbacf5
refactor isAdditionalTaintStep to a utility predicate in InsecureRandomness
2020-06-10 10:55:30 +02:00
Erik Krogh Kristensen
9189f23403
add support for secure-random
2020-06-10 10:39:02 +02:00
Erik Krogh Kristensen
16ec405724
add explanations about modulo by power of 2
2020-06-10 10:38:47 +02:00
Erik Krogh Kristensen
111f6d406c
introduce query to detect biased random number generators
2020-06-10 10:00:10 +02:00
Tom Hvitved
70c3ff36f8
C#: Adjust IR imports
2020-06-10 09:54:56 +02:00
Tom Hvitved
d5b8c9728c
Update identifal-files.json
2020-06-10 09:40:44 +02:00
Tom Hvitved
3c8735f43f
C#: Move IR code into 'experimental' folder
2020-06-10 09:37:30 +02:00
Erik Krogh Kristensen
733e04c1eb
Move rest-pattern inside property-pattern step to a taint-step
2020-06-10 09:02:22 +02:00
Erik Krogh Kristensen
2f9124f754
add missing qldoc
2020-06-09 23:32:58 +02:00
luchua-bc
1fd9c7fdec
Add all dependent class stubs
2020-06-09 20:12:05 +00:00
Jonas Jensen
ad401e9f21
C++: Copy and adjust Java's correctness argumnt
...
Instead of a vague reference to a code comment for another language, the
`controlsBlock` predicate now has the whole comment in it directly.
I've adjusted the wording so it should be reasonably correct for C/C++.
As with the other comments in this file, I don't distinguish between the
condition and its block. I think that makes the explanation clearer
without losing any detail we care about.
To make the code fit the wording of the comment, I changed the
`hasBranchEdge/2` predicate into `getBranchSuccessor/1`.
2020-06-09 20:53:56 +02:00
Erik Krogh Kristensen
eb00da5b31
improve readability
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-09 20:02:46 +02:00
Asger Feldthaus
a923a404ab
JS: Explicitly handle export declarations in PackageExports
2020-06-09 18:28:15 +01:00
Asger Feldthaus
806c9a372e
JS: Resolve package.json main module differently
2020-06-09 18:28:15 +01:00
Erik Krogh Kristensen
b8a9ac39f4
add lValueFlowStep for rest-pattern nested inside a property-pattern (and removed old incorrect approach)
2020-06-09 18:16:00 +02:00
Erik Krogh Kristensen
b6e0e6645f
Merge pull request #3645 from erik-krogh/infExposure
...
JS: add query to detect accidential leak of private files
2020-06-09 17:38:31 +02:00
Erik Krogh Kristensen
a7f6f045d2
add taint-steps for copying properties of an object
2020-06-09 17:16:13 +02:00
Erik Krogh Kristensen
7050d9d7bb
remove dead FlowLabel
2020-06-09 17:15:55 +02:00
Erik Krogh Kristensen
2af8739bb6
simplify web.DefinePlugin sink
2020-06-09 17:15:35 +02:00
Erik Krogh Kristensen
90596167b1
add taint-step for Array.reduce
2020-06-09 17:15:00 +02:00
Mathias Vorreiter Pedersen
06066f0c5b
Merge pull request #3659 from jbj/getFieldSizeOfClass-perf
...
C++: Performance tweak for 1-field struct loads
2020-06-09 15:53:19 +02:00
Erik Krogh Kristensen
be71ddf7bb
introduce basic BuildArtifactLeak query
2020-06-09 15:27:55 +02:00
Erik Krogh Kristensen
896a9b05f6
refactor CleartextLogging to allow for reuse
2020-06-09 15:03:07 +02:00
Jonas Jensen
a341912da9
C++: Performance tweak for 1-field struct loads
...
On kamailio/kamailio the `DataFlowUtil::simpleInstructionLocalFlowStep`
predicate was slow because of the case for single-field structs, where
there was a large tuple-count bulge when joining with
`getFieldSizeOfClass`:
3552902 ~2% {2} r1 = SCAN Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff AS I OUTPUT I.<1>, I.<0>
2065347 ~2% {2} r35 = JOIN r1 WITH Operand::NonPhiMemoryOperand::getAnyDef_dispred#3#ff AS R ON FIRST 1 OUTPUT r1.<1>, R.<1>
2065827 ~2% {3} r36 = JOIN r35 WITH Instruction::Instruction::getResultType_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r35.<1>, r35.<0>
2065825 ~3% {3} r37 = JOIN r36 WITH Type::Type::getSize_dispred#ff AS R ON FIRST 1 OUTPUT r36.<1>, r36.<2>, R.<1>
2068334 ~2% {4} r38 = JOIN r37 WITH Instruction::Instruction::getResultType_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r37.<2>, r37.<0>, r37.<1>
314603817 ~0% {3} r39 = JOIN r38 WITH DataFlowUtil::getFieldSizeOfClass#fff_120#join_rhs AS R ON FIRST 2 OUTPUT r38.<3>, R.<2>, r38.<2>
8 ~0% {2} r40 = JOIN r39 WITH Instruction::Instruction::getResultType_dispred#3#ff AS R ON FIRST 2 OUTPUT r39.<2>, r39.<0>
That's 314M tuples.
Strangely, there is no such bulge on more well-behaved snapshots like
mysql/mysql-server.
With this commit the explosion is gone:
...
2065825 ~0% {4} r37 = JOIN r36 WITH Type::Type::getSize_dispred#ff AS R ON FIRST 1 OUTPUT r36.<0>, R.<1>, r36.<1>, r36.<2>
1521 ~1% {3} r38 = JOIN r37 WITH DataFlowUtil::getFieldSizeOfClass#fff_021#join_rhs AS R ON FIRST 2 OUTPUT r37.<2>, R.<2>, r37.<3>
8 ~0% {2} r39 = JOIN r38 WITH Instruction::Instruction::getResultType_dispred#3#ff AS R ON FIRST 2 OUTPUT r38.<0>, r38.<2>
2020-06-09 14:50:02 +02:00
Rasmus Wriedt Larsen
bacd491875
Python: Fix isSequence() and isMapping()
2020-06-09 14:21:02 +02:00
Anders Schack-Mulligen
f77f486c6b
Merge pull request #3438 from artem-smotrakov/unsafe-tls
...
Java: Added a query for unsafe TLS versions
2020-06-09 14:07:17 +02:00
Rasmus Wriedt Larsen
846101d295
Python: Extend isSequence/isMapping test with custom classes
2020-06-09 14:04:14 +02:00
Tom Hvitved
a371205db1
Data flow: Sync files
2020-06-09 13:55:12 +02:00
Tom Hvitved
8c9f85d04f
Data flow: Allow nodes to be hidden from path explanations
2020-06-09 13:53:19 +02:00
Erik Krogh Kristensen
b510e470b1
support rest-patterns inside property patterns
2020-06-09 13:28:56 +02:00
Erik Krogh Kristensen
c580ada527
Merge pull request #3643 from erik-krogh/yargs
...
JS: extend support for yargs for js/indirect-command-line-injection
2020-06-09 13:17:28 +02:00
Jonas Jensen
4642037dce
C++: Speed up IRGuardCondition::controlsBlock
...
The `controlsBlock` predicate had some dramatic bulges in its tuple
counts. To make matters worse, those bulges were in materialized
intermediate predicates like `#shared` and `#antijoin_rhs`, not just in
the middle of a pipeline.
The problem was particularly evident on kamailio/kamailio, where
`controlsBlock` was the slowest predicate in the IR libraries:
IRGuards::IRGuardCondition::controlsBlock_dispred#fff#shared#4 ........ 58.8s
IRGuards::IRGuardCondition::controlsBlock_dispred#fff#antijoin_rhs .... 33.4s
IRGuards::IRGuardCondition::controlsBlock_dispred#fff#antijoin_rhs#1 .. 26.7s
The first of the above relations had 201M rows, and the others
had intermediate bulges of similar size.
The bulges could be observed even on small projects although they did
not cause measurable performance issues there. The
`controlsBlock_dispred#fff#shared#4` relation had 3M rows on git/git,
which is a lot for a project with only 1.5M IR instructions.
This commit borrows an efficient implementation from Java's
`Guards.qll`, tweaking it slightly to fit into `IRGuards`. Performance
is now much better:
IRGuards::IRGuardCondition::controlsBlock_dispred#fff ................... 6.1s
IRGuards::IRGuardCondition::hasDominatingEdgeTo_dispred#ff .............. 616ms
IRGuards::IRGuardCondition::hasDominatingEdgeTo_dispred#ff#antijoin_rhs . 540ms
After this commit, the biggest bulge in `controlsBlock` is the size of
`IRBlock::dominates`. On kamailio/kamailio this is an intermediate tuple
count of 18M rows in the calculation of `controlsBlock`, which in the
end produces 11M rows.
2020-06-09 12:15:45 +02:00
Rasmus Wriedt Larsen
65ce6d27ff
Python: Update isSequence() and isMapping() for Python 3.8
2020-06-09 11:57:00 +02:00
Rasmus Wriedt Larsen
958763edc2
Python: Add test for ClassValue.isSequence() and isMapping()
...
For Python 3.6
2020-06-09 11:55:22 +02:00
Tom Hvitved
8006866370
C#: Refactor data-flow predicates defined by dispatch
2020-06-09 11:25:07 +02:00
Erik Krogh Kristensen
b04d7015ae
fix test
2020-06-09 11:23:46 +02:00
Asger Feldthaus
0345036420
JS: Fix 'match' call in StringOps::RegExpTest
2020-06-09 10:07:36 +01:00
Jonas Jensen
cade3a3e23
C++: Use the hasBranchEdge helper predicate
...
This tidies up the code, removing unnecessary repetition.
2020-06-09 10:33:03 +02:00
Erik Krogh Kristensen
c2fbcea96f
base the chaining on yargs on the methods that are NOT chained
2020-06-09 10:22:25 +02:00
Esben Sparre Andreasen
2d2468463b
JS: initial version of IncompleteMultiCharacterSanitization.ql
2020-06-09 08:59:59 +02:00
Erik Krogh Kristensen
167239e745
add query to detect accidential leak of private files
2020-06-08 23:41:14 +02:00
Dave Bartolomeo
3fc02ce24e
C++: Fix join order in virtual dispatch with unique
...
The optimizer picked a terrible join order in `VirtualDispatch::DataSensitiveCall::flowsFrom()`. Telling it that `getAnOutNode()` has a unique result convinces it to join first on the `Callable`, rather than on the `ReturnKind`.
2020-06-08 17:15:43 -04:00
Robert Marsh
2a96856ca5
C++/C#: Document IRPositionalParameter
2020-06-08 12:41:26 -07:00
Dave Bartolomeo
c511cc3444
C++: Better caching for getPrimaryInstructionForSideEffect()
2020-06-08 15:37:36 -04:00
ubuntu
ab65ec40c0
Add Codeql to detect missing 'Message.origin' validation when using postMessage API
2020-06-08 20:18:34 +02:00
luchua-bc
5acfc52087
Add dependent stub classes for the test case
2020-06-08 16:17:40 +00:00
luchua-bc
1e4addb20d
Add dependent stub classes for the test case
2020-06-08 16:17:01 +00:00
Dave Bartolomeo
0ae98e78a2
Merge remote-tracking branch 'github/master' into github/codeql-c-analysis-team/69_union
2020-06-08 11:20:14 -04:00
Dave Bartolomeo
398678a28b
Merge pull request #3637 from jbj/dispatch-global-perf
...
C++: Fix data-flow dispatch perf with globals
2020-06-08 11:19:37 -04:00
semmle-qlci
1a7570ebbe
Merge pull request #3563 from RasmusWL/python-fabric-execute
...
Approved by tausbn
2020-06-08 16:00:49 +01:00
Erik Krogh Kristensen
0f06f04e32
extend support for yargs for js/indirect-command-line-injection
2020-06-08 16:45:09 +02:00
Asger Feldthaus
53280a6b11
JS: Add test demonstrating new flow
2020-06-08 14:25:21 +01:00
Rasmus Wriedt Larsen
baa415fec8
Python: Add points-to regression for metaclass
2020-06-08 15:03:46 +02:00
Rasmus Wriedt Larsen
7c037cd2ab
Python: Handle Enum._convert in Python 3.8
2020-06-08 14:49:58 +02:00
Asger Feldthaus
2d9b9fa584
JS: Use PreCallGraphStep in select array steps
2020-06-08 13:45:28 +01:00
Asger Feldthaus
3d2bbbd3db
JS: Add PreCallGraphStep extension point
2020-06-08 13:45:28 +01:00
Asger Feldthaus
1f2ab605bd
JS: Add store/load steps to AdditionalTypeTrackingStep
2020-06-08 13:45:28 +01:00
Henning Makholm
5daf1db5e5
Merge pull request #3615 from github/fix-root-defintion
...
QL Specification: Fix mistake in dispatch computation
2020-06-08 14:34:58 +02:00
Bt2018
99aa559ef2
Fix auto-formatting issue
2020-06-08 06:43:00 -04:00
Mathias Vorreiter Pedersen
b48168fc03
C++: Accept tests
2020-06-08 12:26:25 +02:00
Jonas Jensen
c62220e0dc
C++: Fix data-flow dispatch perf with globals
...
There wasn't a good join order for the "store to global var" case in the
virtual dispatch library. When a global variable had millions of
accesses but few stores to it, the `flowsFrom` predicate would join to
see all those millions of accesses before filtering down to stores only.
The solution is to pull out a `storeIntoGlobal` helper predicate that
pre-computes which accesses are stores.
To make the code clearer, I've also pulled out a repeated chunk of code
into a new `addressOfGlobal` helper predicate.
For the kamailio/kamailio project, these are the tuple counts before:
Starting to evaluate predicate DataFlowDispatch::VirtualDispatch::DataSensitiveCall::flowsFrom#fff#cur_delta/3[3]@21a1df (iteration 3)
Tuple counts for DataFlowDispatch::VirtualDispatch::DataSensitiveCall::flowsFrom#fff#cur_delta:
...
59002 ~0% {3} r17 = SCAN DataFlowDispatch::VirtualDispatch::DataSensitiveCall::flowsFrom#fff#prev_delta AS I OUTPUT I.<1>, true, I.<0>
58260 ~1% {3} r31 = JOIN r17 WITH DataFlowUtil::Node::asVariable_dispred#fb AS R ON FIRST 1 OUTPUT R.<1>, true, r17.<2>
2536187389 ~6% {3} r32 = JOIN r31 WITH Instruction::VariableInstruction::getASTVariable_dispred#fb_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, true, r31.<2>
2536187389 ~6% {3} r33 = JOIN r32 WITH project#Instruction::VariableAddressInstruction#class#3#ff AS R ON FIRST 1 OUTPUT r32.<0>, true, r32.<2>
58208 ~0% {3} r34 = JOIN r33 WITH Instruction::StoreInstruction::getDestinationAddress_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, true, r33.<2>
Tuple counts after:
Starting to evaluate predicate DataFlowDispatch::VirtualDispatch::DataSensitiveCall::flowsFrom#fff#cur_delta/3[3]@6073c5 (iteration 3)
Tuple counts for DataFlowDispatch::VirtualDispatch::DataSensitiveCall::flowsFrom#fff#cur_delta:
...
59002 ~0% {3} r17 = SCAN DataFlowDispatch::VirtualDispatch::DataSensitiveCall::flowsFrom#fff#prev_delta AS I OUTPUT I.<1>, true, I.<0>
58260 ~1% {3} r23 = JOIN r17 WITH DataFlowUtil::Node::asVariable_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, true, r17.<2>
58208 ~0% {3} r24 = JOIN r23 WITH DataFlowDispatch::VirtualDispatch::storeIntoGlobal#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, true, r23.<2>
58208 ~0% {3} r25 = JOIN r24 WITH DataFlowUtil::InstructionNode#ff_10#join_rhs AS R ON FIRST 1 OUTPUT true, r24.<2>, R.<1>
Notice that the final tuple count, 58208, is the same before and after.
The kamailio/kamailio project seems to have been affected by this issue
because it has global variables to do with logging policy, and these
variables are loaded from in every place where their logging macro is
used.
2020-06-08 11:48:40 +02:00
Anders Schack-Mulligen
8513c6981c
Merge pull request #3329 from artem-smotrakov/mvel-injection
...
Java: Add a query for MVEL injections
2020-06-08 11:48:00 +02:00
Mathias Vorreiter Pedersen
431cc5c926
C++: Fix inconsistent class name
2020-06-08 11:27:09 +02:00
Calum Grant
00078d14b9
Merge pull request #3601 from hvitved/csharp/overlapping-configs
...
C#: Avoid multiple taint-tracking configurations
2020-06-08 10:21:40 +01:00
Mathias Vorreiter Pedersen
01f3793159
C++: Add ReadSideEffect as a possible end instruction for load chains
2020-06-08 11:05:30 +02:00
Mathias Vorreiter Pedersen
a4388e9258
C++: Add example demonstrating missing flow
2020-06-08 11:03:36 +02:00
Esben Sparre Andreasen
872ee13ba6
JS: formatting
2020-06-08 10:04:37 +02:00
Anders Schack-Mulligen
ad8647f345
Merge pull request #3547 from pwntester/issue_3139
...
add support for java.io.StringWriter
2020-06-08 10:02:23 +02:00
Pavel Avgustinov
7c0b8f5587
Merge pull request #3622 from aschackmull/mergeback-124
...
Mergeback rc/1.24 -> master
2020-06-08 08:38:12 +01:00
Anders Schack-Mulligen
e444bcc923
Merge pull request #3634 from Marcono1234/MagicConstants-code-style
...
Fix Java code style of MagicConstants examples
2020-06-08 09:34:48 +02:00
Anders Schack-Mulligen
be862280b2
Update java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll
...
Fix trailing whitespace
2020-06-08 09:18:39 +02:00
Esben Sparre Andreasen
fa35a6a694
JS: formatting
2020-06-08 08:13:58 +02:00
porcupineyhairs
6dd9106301
Update XSLT.qll
2020-06-08 03:12:23 +05:30
Porcupiney Hairs
424e88d318
include sugestions from review
2020-06-08 02:52:11 +05:30
Marcono1234
ad1146a23a
Fix Java code style of MagicConstants examples
...
- Use recommended ordering of modifiers
- Use recommended variable naming scheme
2020-06-07 01:00:27 +02:00
Porcupiney Hairs
1ceb963d4c
Python : Add support for detecting XSLT Injection
...
This PR adds support for detecting XSLT injection in Python.
I have included the ql files as well as the tests with this.
2020-06-07 03:05:50 +05:30
luchua-bc
cba81eeb97
Fix string/type match and add a test case
2020-06-06 03:56:12 +00:00
Robert Marsh
cce99f92a1
C++: exclude conversions in IR field flow tests
2020-06-05 16:19:02 -07:00
Robert Marsh
53a87fa378
C++: accept field flow test changes after merge
2020-06-05 15:41:10 -07:00
Dave Bartolomeo
94c2bba584
C++/C#: Fix formatting
2020-06-05 17:14:14 -04:00
Robert Marsh
0d2f8f3825
Merge branch 'master' into ir-this-parameter-2
2020-06-05 13:52:56 -07:00
Dave Bartolomeo
d4e1ee8aa7
Merge pull request #3629 from MathiasVP/remove-initialize-this-from-value-numbering
...
C++: Remove TInitializeThisValueNumber from IR value numbering
2020-06-05 15:55:20 -04:00
Dave Bartolomeo
1c32e4cc68
C++/C#: Do filtering of instructions in cached predicates
...
The four cached predicates used to access common properties of instructions took a `TStageInstruction` as a parameter. This requires the calling code, in `Instruction.qll`, to then join the results with `hasInstruction()` to filter out results for `TRawInstruction`s that were discarded as unreachable. By simply switching the parameter types to `Instruction`, we can force that join to happen in the cached predicate itself. This makes the various accessor predicates on `Instruction` trivially inlinable to the cached predicate, instead of being joins of two huge relations that might have to be recomputed in later stages.
2020-06-05 15:41:21 -04:00
Dave Bartolomeo
e62b884b48
C++/C#: Cache Instruction.getResultIRType()
...
Most of the predicates on `Instruction` are thin wrappers around cached predicates in the `IRConstruction` or `SSAConstruction` modules. However, `getResultIRType()` has to join `Construction::getInstructionResultType()` with `LanguageType::getIRType()`. `getResultIRType()` is called frequently both within the IR code and by IR consumers, and that's a big join to have to repeat in multiple stages.
I looked at most of the other predicates in `Instruction.qll`, and didn't see any other predicates that met all of the criteria of "large, commonly called, and not already inline".
2020-06-05 15:17:28 -04:00
Dave Bartolomeo
c708ed1fe9
C++: Remove some usage of Instruction.getResultType()
...
There were a few places in the IR itself where we use `Instruction.getResultType()`, which returns the C++ `Type` of the result, instead of `Instruction.getResultIRType()`, which returns the language-neutral `IRType` of the result. By removing this usage, we can avoid evaluating `getResultType()` at all.
There are still other uses of `Instruction.getResultType()` in other libraries. We should switch those as well.
2020-06-05 14:08:01 -04:00
Dave Bartolomeo
11818489f5
C++/C#: Use cached to ensure that IR is evaluated in a single stage
...
Before this change, evaluation of the IR was spread out across about 5 stages. This resulted in a lot of redundant evaluation, especially tuple numbering of large IPA types like `TInstruction`. This change makes two small changes that, when combined, ensure that the IR is evaluated all in one stage:
First, we mark `TInstruction` as `cached`. This collapses all of the work to create instructions, across all three IR phases, into a single phase.
Second, we make the `SSA` module in `SSAConstruction.qll` just contain aliases to `cached` predicates defined in the `Cached` module. This ensures that all of the `Operand`-related SSA computation happens in the same stage as all of the `Instruction`-related SSA computation.
2020-06-05 14:05:25 -04:00
Robert Marsh
4c44c84ec0
C++: Add QLdoc in Initializer.qll-Macro.qll
2020-06-05 10:47:25 -07:00
Henning Makholm
d2d235d7a4
Merge pull request #3476 from hmakholm/pr/module-res-update
...
QL language specification: bring library path documentation up to date
2020-06-05 18:12:35 +02:00
Henning Makholm
c2c70d7627
QL specification: typo fix
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-06-05 18:01:21 +02:00
Artem Smotrakov
b7c3dd666c
Java: Clean up MVEL injection query
2020-06-05 17:22:45 +03:00
Artem Smotrakov
2842aeee72
Java: Simplified MvelInjectionLib
2020-06-05 17:17:43 +03:00
Artem Smotrakov
4a83fb8cc1
Java: Simplified MvelInjection test
2020-06-05 17:17:43 +03:00
Artem Smotrakov
df9d10f2ac
Java: Added MVELRuntime.execute() sink for MVEL injections
2020-06-05 17:17:43 +03:00
Artem Smotrakov
fa717b2d86
Java: Added template sinks for MVEL injections
2020-06-05 17:17:43 +03:00
Artem Smotrakov
8fd72659ec
Java: Added JSR 223 sinks for MVEL injections
...
- Updated MvelInjectionLib.qll
- Added tests and stubs for JSR 223 API
2020-06-05 17:17:43 +03:00
Artem Smotrakov
6a6c805048
Java: Added Accessor sink for MVEL injections
2020-06-05 17:13:24 +03:00
Artem Smotrakov
12e0234d40
Java: Added CompiledAccExpression sink for MVEL injections
2020-06-05 17:13:24 +03:00
Artem Smotrakov
32ff5ad496
Java: Added CompiledExpression sink for MVEL injections
2020-06-05 17:13:24 +03:00
Artem Smotrakov
c6c4c2c99b
Java: Add a query for MVEL injections
...
- Added experimental/Security/CWE/CWE-094/MvelInjection.ql
- Added experimental/Security/CWE/CWE-094/MvelInjectionLib.qll
- Added a qhelp file with an example of vulnerable code
- Added tests and stubs for mvel2-2.4.7
2020-06-05 17:13:24 +03:00
yoff
e5480e471a
Merge pull request #3591 from RasmusWL/python-taintkind-fixup
...
Python: Fix some problems in TaintKind useage
2020-06-05 16:03:18 +02:00
Anders Schack-Mulligen
e4e51b5027
Merge pull request #3291 from artem-smotrakov/spel-injection
...
Java: Add a query for SpEL injections
2020-06-05 15:51:38 +02:00
Mathias Vorreiter Pedersen
7642680ab9
C++: Also remove TInitializeThisValueNumber from the AST wrapper
2020-06-05 15:26:09 +02:00
Mathias Vorreiter Pedersen
1a33a3b7e1
Merge branch 'master' into remove-initialize-this-from-value-numbering
2020-06-05 15:03:54 +02:00
Mathias Vorreiter Pedersen
d49c0f7b67
C++: Sync identical files
2020-06-05 15:01:18 +02:00
Mathias Vorreiter Pedersen
15fa7be09a
C++: Remove TInitializeThisValueNumber case from IR value numbering
2020-06-05 15:01:11 +02:00
semmle-qlci
ff6936caa7
Merge pull request #3625 from erik-krogh/CVE714
...
Approved by asgerf
2020-06-05 12:21:10 +01:00
semmle-qlci
69a1e11c06
Merge pull request #3609 from erik-krogh/CredFN
...
Approved by asgerf, esbena
2020-06-05 10:49:01 +01:00
Erik Krogh Kristensen
82cf53897f
TypeOfCheck -> TypeOfUndefinedSanitizer
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-05 11:35:39 +02:00
Erik Krogh Kristensen
f70453c544
autoformat
2020-06-05 10:10:57 +02:00
Erik Krogh Kristensen
05d7be8e23
autoformat
2020-06-05 09:59:45 +02:00
Erik Krogh Kristensen
96ca4cf7eb
add missing quote
2020-06-04 19:45:24 +00:00
Erik Krogh Kristensen
815671f5d0
add sanitizer guard for typeof undefined
2020-06-04 21:32:26 +02:00
Henning Makholm
269fa3a140
comments from alexet
...
Put 'the query directory of the current file` back in the description.
2020-06-04 20:41:54 +02:00
Jonas Jensen
ad2d1d531b
Merge pull request #3616 from dbartol/dbartol/sync-missing
...
Allow missing files in `sync-files --latest`
2020-06-04 16:52:44 +02:00
Rasmus Wriedt Larsen
1ff369f62d
Python: Update test results for fabric.api.execute
2020-06-04 16:30:03 +02:00
Erik Krogh Kristensen
58f4f7129e
change-note
2020-06-04 16:25:26 +02:00
Erik Krogh Kristensen
5ce2987cb2
adjust comments to reflect that tainted-path have no array-steps
2020-06-04 16:15:37 +02:00
Erik Krogh Kristensen
ed4e1bbbdf
don't have a MembershipTestBarrierGuard in Configuration.qll
2020-06-04 16:13:49 +02:00
Erik Krogh Kristensen
b7a3c4a3d6
autoformat
2020-06-04 16:07:28 +02:00
semmle-qlci
22a651cb5c
Merge pull request #3621 from max-schaefer/js/qltest-experimental
...
Approved by asgerf, erik-krogh
2020-06-04 14:19:17 +01:00
Dave Bartolomeo
0666a2e587
Remove usage of f-string
2020-06-04 08:48:14 -04:00
Esben Sparre Andreasen
f618d430e7
JS: simplify HTTP::ContainerCollection, and improve expressivity(!)
2020-06-04 14:34:52 +02:00
Esben Sparre Andreasen
44ebf84f4c
JS: more express tests
2020-06-04 14:33:03 +02:00
Dave Bartolomeo
e2afad91dd
Merge pull request #3620 from MathiasVP/fix-missing-case-in-getkind
...
C++: Fix missing case in ValueNumber::getKind
2020-06-04 07:27:30 -04:00
Max Schaefer
9549b01e3c
JavaScript: Turn on experimental language features for two tests.
...
All other tests already pass with experimental features turned on, so once this is merged we can do so by default.
2020-06-04 11:27:31 +01:00
Mathias Vorreiter Pedersen
7328429ef1
C++: Sync identical files
2020-06-04 11:31:32 +02:00
Mathias Vorreiter Pedersen
36cfe3624b
C++: Add TConstantValueNumber case to ValueNumber::getKind
2020-06-04 11:31:02 +02:00
Erik Krogh Kristensen
e47770281a
update change-note
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-04 11:14:25 +02:00
semmle-qlci
c806e229aa
Merge pull request #3618 from aschackmull/java/typeflow-test
...
Approved by aibaars
2020-06-04 10:09:44 +01:00
Mathias Vorreiter Pedersen
4b16067af2
C++: Fix testcases after merge from master
2020-06-04 11:02:03 +02:00
Erik Krogh Kristensen
60320a9d78
update TaintedPath to use new consistency checking
2020-06-04 11:00:40 +02:00
Erik Krogh Kristensen
68ca8e23c0
introduce consistency-checking utility predicates
2020-06-04 11:00:01 +02:00
Erik Krogh Kristensen
c7c46ea3d6
update test comments to be consistent
2020-06-04 10:55:09 +02:00
Mathias Vorreiter Pedersen
2cf9bcef86
Merge branch 'master' into flat-structs
2020-06-04 10:52:25 +02:00
Erik Krogh Kristensen
550c578c3c
use MemberShipTest in TaintedPath
2020-06-04 10:51:08 +02:00
Erik Krogh Kristensen
d513e6c5b5
update comments in TaintedPath tests
2020-06-04 10:40:14 +02:00
Anders Schack-Mulligen
64225c31a6
Java: Add test case.
2020-06-04 10:31:08 +02:00
semmle-qlci
70131e6ac8
Merge pull request #3598 from asger-semmle/js/regexp-test
...
Approved by esbena
2020-06-04 09:05:21 +01:00
Mathias Vorreiter Pedersen
b48fe6ac32
Merge pull request #3123 from jbj/dataflow-indirect-args
...
C++: Wire up param/arg indirections in data flow
2020-06-04 09:38:57 +02:00
Dave Bartolomeo
cb2370cc7d
C++/C#: Fix formatting
2020-06-04 02:36:51 -04:00
Jonas Jensen
df96f8e4e8
Merge remote-tracking branch 'upstream/master' into dataflow-indirect-args
2020-06-04 08:20:00 +02:00
Dave Bartolomeo
a409b9d451
Merge remote-tracking branch 'github/master' into github/codeql-c-analysis-team/69_union
2020-06-03 16:10:22 -04:00
Dave Bartolomeo
15f41c0107
C++/C#: Remove dead QL code
2020-06-03 15:42:30 -04:00
yo-h
5cdc29e49a
Merge pull request #3607 from aschackmull/java/array-instanceof-typeflow
...
Java: Add instanceof type bounds for ArrayAccess.
2020-06-03 15:29:37 -04:00
Dave Bartolomeo
a18eba2c4c
Allow missing files in sync-files --latest
...
When running `sync-files` (or `sync-identical-files`) with the `--latest` switch, if one or more of the files in a group does not exist, the script will crash. This happens all the time when I add a new group, or add a new file path in an existing group. This has bothered me for a long time, so I finally fixed it when I ran into it again today.
I've changed the script as follows:
- If _none_ of the paths in the group exist, print an error message listing the paths in the group. This happens with or without `--latest`.
- If `--latest` is specified, copy the master file to the paths of the missing files.
2020-06-03 14:53:31 -04:00
Tom Hvitved
9e7ca25732
C#: Add call-sensitivity to data-flow call resolution
2020-06-03 20:43:49 +02:00
Dave Bartolomeo
bbadf4b4bb
C#: Port TInstruction-sharing support from C++
...
This updates C#'s IR to share `TInstruction` across stages the same way C++ does. The only interesting part is that, since we have not yet ported full alias analysis to C#, I stubbed out the required parts of the aliased SSA interface in `AliasedSSAStub.qll`.
2020-06-03 13:52:19 -04:00
Dave Bartolomeo
e65a5c921e
C++: Add missing QLDoc
2020-06-03 13:49:14 -04:00
Alexander Eyers-Taylor
5dd1b1d1a9
QL Specification: Fix mistake in dispatch computation
2020-06-03 18:38:00 +01:00
Dave Bartolomeo
f93c2e4e64
C++: Remove resultType from the IPA constructors for TInstruction
...
Making these part of the IPA object identity changes the failure mode for cases where we assign multiple result types to an instruction. Previously, we would just have one instruction with two result types, but now we'd have two instructions, which breaks things worse. This change goes back to how things were before, to avoid any new surprises on real-world code with invalid ASTs or IR.
2020-06-03 10:11:27 -04:00
Jonas Jensen
e292eee3d1
C++: Autoformat fixup
2020-06-03 15:48:50 +02:00
Erik Krogh Kristensen
a90c8769ee
update expected output
2020-06-03 15:24:04 +02:00
Erik Krogh Kristensen
7c26efbc12
case insensitive authorization header
2020-06-03 15:23:51 +02:00
Erik Krogh Kristensen
b508ad41c8
don't have a separate fetch module
2020-06-03 15:20:06 +02:00
Erik Krogh Kristensen
46cd0143d8
Update javascript/ql/src/semmle/javascript/frameworks/ClientRequests.qll
...
Co-authored-by: Asger F <asgerf@github.com >
2020-06-03 15:18:10 +02:00
Mathias Vorreiter Pedersen
d295e2139a
C++: Accept tests after merge from master
2020-06-03 15:13:44 +02:00
Mathias Vorreiter Pedersen
43a0d4c97d
Merge branch 'master' into flat-structs
2020-06-03 15:11:14 +02:00
Esben Sparre Andreasen
8316121a44
JS: formatting
2020-06-03 15:02:36 +02:00
Jonas Jensen
ad292d8fb6
C++: Accept one more test change from last commit
2020-06-03 14:51:05 +02:00
Tom Hvitved
86dd86848f
C#: Update call-sensitivity data-flow tests
2020-06-03 14:21:23 +02:00
Erik Krogh Kristensen
baee47f3c6
remove mention of fetch from change-note
2020-06-03 13:56:32 +02:00
Erik Krogh Kristensen
28a1900612
treat all writes to Authorization as a CredentialsExpr
2020-06-03 13:55:49 +02:00
Erik Krogh Kristensen
6466ab19a0
Update javascript/ql/src/semmle/javascript/frameworks/ClientRequests.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-03 13:51:04 +02:00
Erik Krogh Kristensen
f8caec76ab
move the Fetch module to ClientRequests
2020-06-03 13:37:34 +02:00
Erik Krogh Kristensen
aa463d8298
mention fetch instead of node-fetch
2020-06-03 13:33:43 +02:00
Erik Krogh Kristensen
c80baf981a
simplify change-note
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-03 13:33:31 +02:00
Erik Krogh Kristensen
1b53cd4bd9
update docstring of FetchAuthorization
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-06-03 13:31:16 +02:00
Jonas Jensen
8f702d4b49
C++: Override toString on argument indirections
...
Without this override, end users would see the string
`BufferReadSideEffect` in path explanations.
2020-06-03 13:04:10 +02:00
Erik Krogh Kristensen
19dd472ee5
change note
2020-06-03 12:19:48 +02:00
Erik Krogh Kristensen
a1940979ba
support credentials in a Buffer
2020-06-03 12:02:00 +02:00
Erik Krogh Kristensen
ba44ebe8a8
better support for browser based fetch API
2020-06-03 11:51:24 +02:00
Erik Krogh Kristensen
3622fb8716
support more variants of the Headers API
2020-06-03 11:50:10 +02:00
Anders Schack-Mulligen
a969dbc6ca
Java: Fix missing CFG edge for switch expressions.
2020-06-03 10:49:08 +02:00
Anders Schack-Mulligen
8d6e39eb18
Java: Add instanceof type bounds for ArrayAccess.
2020-06-03 09:42:37 +02:00
Mathias Vorreiter Pedersen
b890b162f4
C++: Restrict the side effect of StoreChainEndInstructionSideEffect to be WriteSideEffectInstructions
2020-06-03 09:28:06 +02:00
Esben Sparre Andreasen
afee864295
JS: make use of the colletions type tracking steps
2020-06-03 08:19:34 +02:00
Esben Sparre Andreasen
36b7574ac1
JS: add additional route handler registration tests
2020-06-03 08:18:11 +02:00
Esben Sparre Andreasen
117f009d17
JS: use HTTP::RouteHandlerCandidateContainer in Express
2020-06-03 08:18:11 +02:00
Esben Sparre Andreasen
9964902c10
JS: introduce HTTP::RouteHandlerCandidateContainer
2020-06-03 08:16:58 +02:00
Esben Sparre Andreasen
606f8274c7
JS: add tests for various route handler registration patterns
2020-06-03 08:16:58 +02:00
Robert Marsh
f7752b0a01
C++/C#: add IRParameter subclass of IRVariable
2020-06-02 17:22:10 -07:00
Erik Krogh Kristensen
3c802007a3
add support for string concatenations and base64-encoding of hardcoded credentials
2020-06-02 23:15:13 +02:00
Erik Krogh Kristensen
b6dc94fccb
add fetch.Headers.Authorization as a CredentialsExpr
2020-06-02 23:02:16 +02:00
Erik Krogh Kristensen
14f0d1687a
factor fetch import into NodeJSLib
2020-06-02 22:45:47 +02:00
Asger Feldthaus
8342981799
JS: Make isCoercedToBoolean private
2020-06-02 17:16:55 +01:00
Jonas Jensen
10dfa497a5
Merge remote-tracking branch 'upstream/master' into dataflow-indirect-args
...
Fixed a semantic merge conflict by accepting test changes in
`cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected`.
2020-06-02 18:03:34 +02:00
Jonas Jensen
9c50acc0f9
Merge pull request #3602 from MathiasVP/path-problem-for-dataflow-tests
...
C++: Make path-problem versions of ir-flow.ql and flow.ql
2020-06-02 17:59:26 +02:00
Asger Feldthaus
8a38633639
JS: Handle exec() == undefined
2020-06-02 16:52:07 +01:00
Asger Feldthaus
7d5384b723
JS: Autoformat
2020-06-02 16:38:40 +01:00
Asger Feldthaus
945db4d86c
JS: Fix test output
2020-06-02 16:38:21 +01:00
Philip Ginsbach
8b3dd6dec4
Merge pull request #3572 from ginsbach/typeunions
...
introduce type unions in the handbook
2020-06-02 16:31:36 +01:00
Mathias Vorreiter Pedersen
2a1ba6d592
C++: Share configurations in testcases
2020-06-02 16:50:57 +02:00
Mathias Vorreiter Pedersen
b9af1123d9
C++: Make path-problem versions of ir-flow.ql and flow.ql
2020-06-02 16:28:01 +02:00
Jonas Jensen
771fd0b1cc
C++: Fixup wording
2020-06-02 15:46:34 +02:00
Jonas Jensen
5f0d283212
Merge remote-tracking branch 'upstream/master' into dataflow-indirect-args
...
The conflicts came from how `this` is now a parameter but not a
`Parameter` on `master`.
Conflicts:
cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/defaulttainttracking.cpp
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/tainted.expected
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/test_diff.expected
cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected
cpp/ql/test/library-tests/dataflow/fields/ir-flow.expected
cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected
2020-06-02 15:35:02 +02:00
Tom Hvitved
1e8b7ed367
C#: Avoid multiple taint-tracking configurations
...
The taint-tracking configuration in `ExposureOfPrivateInformation.ql`
overlaps with the XSS taint-tracking configuration, as witnessed by this import chain:
```
semmle.code.csharp.security.dataflow.ExposureOfPrivateInformation.qll imports
semmle.code.csharp.security.dataflow.flowsinks.ExternalLocationSink imports
semmle.code.csharp.security.dataflow.flowsinks.Remote imports
semmle.code.csharp.security.dataflow.XSS
```
(The same for `CleartextStorage.qll` and `LogForging.ql`.)
The fix is to use `TaintTracking2` for the XSS configuration.
2020-06-02 14:42:35 +02:00
Mathias Vorreiter Pedersen
ce34d91a07
C++: Add more QLDoc to StoreNode and LoadNode classes, and related predicates. I also simplified the code a bit by moving common implementations of predicates into shared super classes. Finally, I added a getLocation predicate to StoreNode to match the structure of the LoadNode class.
2020-06-02 13:50:00 +02:00
semmle-qlci
e7800d4695
Merge pull request #3415 from esbena/js/membershiptest
...
Approved by asgerf
2020-06-02 11:36:51 +01:00
Calum Grant
b099f13f55
Merge pull request #3514 from hvitved/csharp/remove-more-deprecated
...
C#: Remove more deprecated classes and predicates
2020-06-02 10:35:14 +01:00
Mathias Vorreiter Pedersen
e17b486195
Merge pull request #3593 from rdmarsh2/rdmarsh/cpp/add-qldoc-2
...
C++: Add QLDoc for AST classes up to Include.qll
2020-06-02 10:23:23 +02:00
Robert
a0ee41306a
Update cpp/ql/src/codeql-suites/slow-queries.yml
...
Co-authored-by: Robert Marsh <rdmarsh2@gmail.com >
2020-06-02 09:22:23 +01:00
Esben Sparre Andreasen
f9ed64fc45
Merge branch 'master' into js/membershiptest
2020-06-02 08:54:44 +02:00
Robert Marsh
3460b9d550
C++: autoformat
2020-06-01 15:38:06 -07:00
Dave Bartolomeo
53d4a8e3b2
C++: Refactor IR construction interface
...
Now that `TInstruction` is shared between IR stages, several of the per-stage IR construction predicates can now be moved into the `Raw` interface exposed only by the initial construction of IR from the ASTs. This also removed a couple predicates that were not used previously at all.
2020-06-01 11:15:29 -04:00
Dave Bartolomeo
1e863ac40b
C++: Share TInstruction across IR stages
...
Each stage of the IR reuses the majority of the instructions from previous stages. Previously, we've been wrapping each reused old instruction in a branch of the `TInstruction` type for the next stage. This causes use to create roughly three times as many `TInstruction` objects as we actually need.
Now that IPA union types are supported in the compiler, we can share a single `TInstruction` IPA type across stages. We create a single `TInstruction` IPA type, with individual branches of this type for instructions created directly from the AST (`TRawInstruction`) and for instructions added by each stage of SSA construction (`T*PhiInstruction`, `T*ChiInstruction`, `T*UnreachedInstruction`). Each stage then defines a `TStageInstruction` type that is a union of all of the branches that can appear in that particular stage. The public `Instruction` class for each phase extends the `TStageInstruction` type for that stage.
The interface that each stage exposes to the pyrameterized modules in the IR is now split into three pieces:
- The `Raw` module, exposed only by the original IR construction stage. This module identifies which functions have IR, which `TRawInstruction`s exist, and which `IRVariable`s exist.
- The `SSA` module, exposed only by the two SSA construction stages. This identifiers which `Phi`, `Chi`, and `Unreached` instructions exist.
- The global module, exposed by all three stages. This module has all of the predicates whose implementation is different for each stage, like gathering definitions of `MemoryOperand`s.
Similarly, there is now a single `TIRFunction` IPA type that is shared across all three stages. There is a single `IRFunctionBase` class that exposes the stage-indepdendent predicates; the `IRFunction` class for each stage extends `IRFunctionBase`.
Most of the other changes are largely mechanical.
2020-06-01 11:15:29 -04:00
Philip Ginsbach
c97055faa9
whitespace in example for type unions fixed
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-06-01 14:27:34 +01:00
semmle-qlci
7265e94028
Merge pull request #3578 from erik-krogh/HtmlGuard
...
Approved by asgerf
2020-06-01 13:25:02 +01:00
Asger F
712c53afe9
Merge pull request #3579 from erik-krogh/fix-change-note-merge
...
JS: remove duplicates from change-note
2020-06-01 13:22:23 +01:00
Philip Ginsbach
faf4c16865
Mark the QL code as invalid more explicitly
2020-06-01 12:24:06 +01:00
Asger Feldthaus
707b0f33a0
JS: Use in ContainsHTMLGuard
2020-06-01 12:06:40 +01:00
Robert Brignull
6e0552c074
add more code-scanning suites
2020-06-01 11:45:46 +01:00
Asger Feldthaus
fa1a6eefa7
JS: Add StringOps::RegExpTest
2020-06-01 11:43:50 +01:00
Artem Smotrakov
df3adeec36
Java: Add a query for SpEL injections
...
- Added experimental/Security/CWE/CWE-094/SpelInjection.ql
and a couple of libraries
- Added a qhelp file with a few examples
- Added tests and stubs for Spring
2020-05-31 20:52:45 +03:00
semmle-qlci
14be4fedf7
Merge pull request #3594 from erik-krogh/CachedExprStringValue
...
Approved by asgerf
2020-05-30 16:56:40 +01:00
Erik Krogh Kristensen
dfd35aee61
autoformat
2020-05-30 14:50:13 +02:00
Mathias Vorreiter Pedersen
cd574e8569
Merge pull request #3589 from rdmarsh2/ir-placement-new-consistency
...
C++: fix IR control flow for cast in placement new
2020-05-30 13:27:34 +02:00
luchua-bc
3d4a5a337d
Add check for J2EE server directory listing
2020-05-30 10:58:16 +00:00
Erik Krogh Kristensen
3b4e57ab8d
autoformat
2020-05-30 12:45:51 +02:00
Robert Marsh
e17adf14dc
C++: autoformat
2020-05-29 16:13:40 -07:00
Robert Marsh
f8b6e07391
C++: Added QLDoc for Element.qll-Include.qll
2020-05-29 16:09:19 -07:00
Robert Marsh
1c20714c62
C++: file QLDoc for AutogeneratedFile-Diagnostics
2020-05-29 14:58:01 -07:00
Robert Marsh
45e555cff0
C++: accept inconsistency with unreachable exit block
2020-05-29 14:43:48 -07:00
Robert Marsh
5ee37bcd5a
Merge branch 'master' into ir-this-parameter-2
...
Bring in fix for duplicate virtual variables for parameter indirections
2020-05-29 14:40:45 -07:00
Jonas Jensen
91da0d5567
Merge pull request #3592 from geoffw0/strlen
...
CPP: Don't taint the return value of strlen
2020-05-29 19:23:47 +02:00
Robert Marsh
f8cfcef9c9
C++/C#: document isThisIndirection and sync files
2020-05-29 09:52:03 -07:00
Robert Marsh
6c9051ae6f
C++: accept consistency fixes
2020-05-29 09:49:28 -07:00
Geoffrey White
9ee75aaca1
C++: Change note.
2020-05-29 16:22:42 +01:00
Mathias Vorreiter Pedersen
3adc10fdb4
C++: Accept tests
2020-05-29 15:33:55 +02:00
Geoffrey White
f534f09784
C++: Autoformat.
2020-05-29 14:05:08 +01:00
Geoffrey White
19c33ab41c
C++: Refine StrLenFunction, including removal of taint flow.
2020-05-29 14:04:27 +01:00
Geoffrey White
705529cdf7
C++: Split StrLenFunction from PureStrFunction (without changes).
2020-05-29 14:04:27 +01:00
Geoffrey White
59cb5f9b1e
C++: Remove a special case for strlen in DefaultTaintTracking.
2020-05-29 14:04:26 +01:00
Geoffrey White
408e38a4d4
C++: Clarify which taint tracking libraries should be used somewhat.
2020-05-29 14:04:26 +01:00
Geoffrey White
d77092c931
C++: Add taint tests for strlen.
2020-05-29 13:39:40 +01:00
Rasmus Wriedt Larsen
551420401a
Python: Fix typo
...
Co-authored-by: Taus <tausbn@gmail.com >
2020-05-29 14:27:07 +02:00
semmle-qlci
f291749243
Merge pull request #3585 from asger-semmle/js/use-newer-yarn
...
Approved by erik-krogh
2020-05-29 13:02:20 +01:00
Mathias Vorreiter Pedersen
a0603692cb
C++: Add LoadChain and StoreChain nodes to handle reverse reads in dataflow
2020-05-29 13:53:53 +02:00
Rasmus Wriedt Larsen
59548a523e
Python: Add change-note about UntrustedStringKind imports
2020-05-29 13:45:10 +02:00
Philip Ginsbach
2d47537f11
Slightly modified version of Henning's suggestion
2020-05-29 12:41:58 +01:00
Erik Krogh Kristensen
f7ad210331
use SSA instead of internal AccessPath API
2020-05-29 13:08:19 +02:00
Erik Krogh Kristensen
05bfba4f99
use getImmediatePredecessor instead of getALocalSource()
2020-05-29 13:01:09 +02:00
Jonas Jensen
453de6bf4e
Merge pull request #3583 from MathiasVP/qldoc-for-unix-constants
...
C++: QLDoc for Constants
2020-05-29 12:27:59 +02:00
Mathias Vorreiter Pedersen
335baaef73
C++: Add testcases for partial definitions with long access paths
2020-05-29 12:15:39 +02:00
Rasmus Wriedt Larsen
48be57c8fd
Python: Improve QLDoc for ExternalStringDictKind
2020-05-29 12:06:57 +02:00
Rasmus Wriedt Larsen
b083c01520
Python: Deprecate StringDictKind
...
This QL
```codeql
import python
import semmle.python.dataflow.TaintTracking
import semmle.python.security.strings.Untrusted
from CollectionKind ck
where
ck.(DictKind).getMember() instanceof StringKind
or
ck.getMember().(DictKind).getMember() instanceof StringKind
select ck, ck.getAQlClass(), ck.getMember().getAQlClass()
```
generates these 6 results.
```
1 {externally controlled string} ExternalStringDictKind UntrustedStringKind
2 {externally controlled string} StringDictKind UntrustedStringKind
3 [{externally controlled string}] SequenceKind ExternalStringDictKind
4 [{externally controlled string}] SequenceKind StringDictKind
5 {{externally controlled string}} DictKind ExternalStringDictKind
6 {{externally controlled string}} DictKind StringDictKind
```
StringDictKind was only used in *one* place in our library code. As illustrated
above, it pollutes our set of TaintKinds. Effectively, every time we make a
flow-step for dictionaries with tainted strings as values, we do it TWICE --
once for ExternalStringDictKind, and once for StringDictKind... that is just a
waste.
2020-05-29 12:06:57 +02:00
Rasmus Wriedt Larsen
87bc8ae28d
Python: Don't use UntrustedStringKind in web lib
...
If I wanted to use my own TaintKind and not have any interaction with
`UntrustedStringKind` that wouldn't be possible today since these standard http
libraries import it directly. (also, I wouldn't get any sources of my custom
TaintKind from turbogears or bottle). I changed them to use the same pattern of
`ExternalStringKind` as everything else does.
2020-05-29 12:06:57 +02:00
Mathias Vorreiter Pedersen
ae4f6edc6a
Merge pull request #3204 from jbj/Expr-location-workaround
...
C++: Move Expr location workaround to Expr.qll
2020-05-29 11:58:50 +02:00
Philip Ginsbach
bb9e800241
remove "experimental syntax" box for type unions
2020-05-29 10:24:42 +01:00
Philip Ginsbach
299d87aa8e
better explanation of the purpose of type unions
...
Co-authored-by: Pavel Avgustinov <54942558+p0@users.noreply.github.com >
2020-05-29 10:22:57 +01:00
Philip Ginsbach
0562b4a2dd
restricted _subsets_ of algebraic datatypes
...
Co-authored-by: Pavel Avgustinov <54942558+p0@users.noreply.github.com >
2020-05-29 10:21:58 +01:00
Asger Feldthaus
f3a08375b4
JS: Use newer yarn.lock format
2020-05-29 09:45:50 +01:00
Jonas Jensen
7d4d435f25
Merge remote-tracking branch 'upstream/master' into Expr-location-workaround
...
Conflicts:
cpp/ql/test/library-tests/dataflow/fields/dataflow-ir-consistency.expected
2020-05-29 10:04:12 +02:00
Mathias Vorreiter Pedersen
a305d39111
Merge pull request #3577 from dbartol/github/codeql-c-analysis-team/69
...
C++: Fix `MemoryLocation` with multiple `VirtualVariables`
2020-05-29 09:40:58 +02:00
Mathias Vorreiter Pedersen
0467995f4f
C++: Make explicit that O_CREAT and O_EXCL are Linux-specific
2020-05-29 09:36:08 +02:00
Jonas Jensen
9813258a3e
Merge remote-tracking branch 'upstream/master' into Expr-location-workaround
...
Conflicts and semantic conflicts in `library-tests/dataflow/fields` and
`library-tests/ir/ir`.
2020-05-29 08:44:37 +02:00
Jonas Jensen
87ad519541
Merge pull request #3569 from geoffw0/strftime
...
C++: Taint flow consistency change for strftime
2020-05-29 08:05:25 +02:00
yo-h
1fea545160
Merge pull request #3573 from aschackmull/java/private-interface-methods
...
Java: Fix for private interface methods.
2020-05-28 20:31:55 -04:00
yo-h
c2de08ca51
Merge pull request #3499 from aschackmull/java/instanceof-pattern-cfg
...
Java: Add CFG edges for Java 14 pattern-matching instanceof.
2020-05-28 20:24:39 -04:00
Robert Marsh
a638a08bc5
C++: autoformat
2020-05-28 17:06:14 -07:00
Robert Marsh
f82c97b84a
C++: fix IR control flow for cast in placement new
2020-05-28 16:53:21 -07:00
Robert Marsh
56d0762380
C++: add test for placement new with cast
2020-05-28 16:36:26 -07:00
Robert Marsh
732da9cc4c
Merge pull request #3586 from MathiasVP/qldoc-for-remaining-controlflow
...
C++: QLDoc for the remaining elements in the controlflow directory
2020-05-28 15:59:19 -07:00
Robert Marsh
a897caec76
C++: outbound dataflow via this indirections
2020-05-28 15:30:41 -07:00
Robert Marsh
7dc30e3fdc
C++: add output indirections for this
2020-05-28 15:30:41 -07:00
Dave Bartolomeo
476f27e427
Merge from master
2020-05-28 17:27:08 -04:00
Dave Bartolomeo
01ef8795bf
C++: Updated fixed test expectation
2020-05-28 17:24:38 -04:00
Robert Marsh
0d8472bd9e
Merge pull request #3571 from rdmarsh2/ir-this-parameter
...
Treat `this` as a parameter in IR generation
2020-05-28 14:16:12 -07:00
Calum Grant
2b90b50587
Merge pull request #3528 from hvitved/csharp/cfg/cs6-initializers
...
C#: Fix CFG for C# 6 initializers
2020-05-28 21:40:52 +01:00
Calum Grant
499e349bff
Merge pull request #3529 from hvitved/csharp/cs6-nested-initializer-type
...
C#: Fix extracted type for nested object initializers
2020-05-28 21:25:57 +01:00
Jonas Jensen
8b8c00de75
Merge pull request #3584 from jbj/devcontainer
...
Codespaces: initial configuration
2020-05-28 19:06:02 +02:00
Robert Marsh
d8b5d3bce8
C++: accept test fixes
2020-05-28 08:45:01 -07:00
Robert Marsh
693789c2cc
Merge branch 'master' into ir-this-parameter
...
Bring in new tests so their output can be fixed
2020-05-28 08:32:10 -07:00
Mathias Vorreiter Pedersen
7b2c9c5aed
C++: Add quotes to improve readability.
2020-05-28 16:48:48 +02:00
Mathias Vorreiter Pedersen
5fb79cde9a
C++: Sync identical files
2020-05-28 16:45:52 +02:00
Mathias Vorreiter Pedersen
0671586aac
C++: QLDoc for the remaining elements in the controlflow directory
2020-05-28 16:35:46 +02:00
Geoffrey White
6fcfd0310f
C++: Autoformat.
2020-05-28 15:23:48 +01:00
Geoffrey White
c9e1ccf320
Merge branch 'master' into strftime
2020-05-28 15:22:16 +01:00
Jonas Jensen
19d4011b8a
Codespaces: initial configuration
...
This was adapted from https://github.com/github/vscode-codeql-starter .
2020-05-28 14:01:36 +02:00
Jonas Jensen
688f540843
Merge pull request #3582 from MathiasVP/qldoc-for-controlflow
...
C++: QLDoc for BasicBlock, ControlFlowGraph and Dataflow
2020-05-28 13:52:43 +02:00
Philip Ginsbach
63a6422dbf
incorporated Henning's example for type unions into the handbook
2020-05-28 12:32:31 +01:00
Erik Krogh Kristensen
5bb308dc8f
sanitize variables used in an HTML escaping switch-case
2020-05-28 12:37:41 +02:00
Mathias Vorreiter Pedersen
1ef0643b60
C++: QLDoc for Constants
2020-05-28 12:24:23 +02:00
Calum Grant
725a8f55ca
Merge pull request #3574 from hvitved/csharp/unification-performance
...
C#: Fix performance issue in unification library
2020-05-28 10:39:02 +01:00
Mathias Vorreiter Pedersen
52da5755b3
C++: Respond to review comments.
2020-05-28 11:20:13 +02:00
Jonas Jensen
1b23f3ec90
C++: Accept two more changed tests
2020-05-28 11:18:14 +02:00
Erik Krogh Kristensen
1a2db10a90
recognize barrier guard where the result is stored in a variable
2020-05-28 10:24:42 +02:00
Erik Krogh Kristensen
562a38cdd5
add ContainsHTMLGuard
2020-05-28 10:24:42 +02:00
Mathias Vorreiter Pedersen
3d27b6bbde
C++: QLDoc for BasicBlock, ControlFlowGraph and Dataflow
2020-05-28 10:10:26 +02:00
Jonas Jensen
9153f568be
C++: Accept test results with location fixes
2020-05-28 09:42:49 +02:00
Jonas Jensen
6eaf64c896
Merge remote-tracking branch 'upstream/master' into Expr-location-workaround
2020-05-28 09:37:15 +02:00
luchua-bc
104f1c3197
Add validation query for SSL Engine/Socket and com.rabbitmq.client.ConnectionFactory
2020-05-28 03:34:29 +00:00
Robert Marsh
54ed5d647a
C++:autoformat
2020-05-27 19:30:02 -07:00
Robert Marsh
58673c449a
C++: switch to TranslatedThisParameter
2020-05-27 19:29:29 -07:00
Porcupiney Hairs
8c5a97170d
Python : Add Xpath injection query
...
This PR adds support for detecting XPATH injection in Python.
I have included the ql files as well as the tests with this.
2020-05-28 03:15:12 +05:30
Robert Marsh
593d4c0f32
Merge pull request #3567 from MathiasVP/ir-partial-definition
...
Implement `asPartialDefinition` for IR dataflow nodes
2020-05-27 13:51:41 -07:00
semmle-qlci
083b8ef8e5
Merge pull request #3568 from asger-semmle/js/avoid-accidental-string-coercion
...
Approved by erik-krogh
2020-05-27 20:46:54 +01:00
Robert Marsh
be74616b2b
C++: accept consistency test fixes
2020-05-27 12:39:54 -07:00
Jonas Jensen
c7fa11229c
Merge pull request #3532 from MathiasVP/remove-field-conflation-from-ir-fieldflow
...
C++: Remove field conflation caused by IR field flow
2020-05-27 21:17:32 +02:00
Erik Krogh Kristensen
df3fb842c5
remove duplicates from change-note
2020-05-27 20:36:23 +02:00
Dave Bartolomeo
533eeff7e8
C++: Fix MemoryLocation with multiple VirtualVariables
...
While investigating a bug with `TInstruction` sharing, I discovered that we had a case where alias analysis could create two `VirtualVariable`s for the same `Allocation`. For an indirect parameter allocation, we were using the type of the pointer variable as the type of the indirect allocation, instead of just `Unknown`. If the `IRType` of the pointer variable was the same type as the type of at least one access to the indirect allocation, we'd create both an `EntireAllocationVirtualVariable` and a `VariableVirtualVariable` for the allocation.
I added a new consistency test to guard against this in the future. This also turned out to be the root cause of the one existing known consistency failure in the IR tests.
2020-05-27 14:06:59 -04:00
Mathias Vorreiter Pedersen
bd97fe627c
Merge branch 'master' into remove-field-conflation-from-ir-fieldflow
2020-05-27 17:08:19 +02:00
Rasmus Wriedt Larsen
21d531f81e
Python: Add QLDoc for FunctionValue.getQualifiedName
...
Matching the one for Function.getQualifiedName
2020-05-27 16:59:18 +02:00
semmle-qlci
674c184a97
Merge pull request #3566 from erik-krogh/XssAttributeSanitizer
...
Approved by asgerf
2020-05-27 15:45:41 +01:00
Tom Hvitved
1c5da67cd8
C#: Fix performance issue in unification library
2020-05-27 15:26:03 +02:00
Erik Krogh Kristensen
33da82d884
Merge branch 'master' of https://github.com/github/codeql into pr/erik-krogh/3566
2020-05-27 12:21:14 +00:00
semmle-qlci
3cfc1e553c
Merge pull request #3560 from erik-krogh/OptionalSanitizer
...
Approved by asgerf
2020-05-27 13:15:41 +01:00
Erik Krogh Kristensen
d05a61c745
Merge branch 'master' of https://github.com/github/codeql into pr/erik-krogh/3566
2020-05-27 12:12:08 +00:00
Philip Ginsbach
748d01f888
Merge pull request #1 from shati-patel/typeunions-edits
...
Editorial suggestions for "type unions"
2020-05-27 12:01:28 +01:00
Shati Patel
6c9c803d94
update wording
2020-05-27 12:00:17 +01:00
Shati Patel
5cf2e3ed8c
Editorial suggestions for "type unions"
2020-05-27 11:33:39 +01:00
semmle-qlci
fd05314b2c
Merge pull request #3531 from asger-semmle/js/node-version-check-notimeout
...
Approved by esbena
2020-05-27 11:13:22 +01:00
Erik Krogh Kristensen
3ae4e90902
change note
2020-05-27 09:45:49 +00:00
Philip Ginsbach
460b64cfd9
noted that type unions are enabled from 2.2.0
2020-05-27 10:13:00 +01:00
Anders Schack-Mulligen
a858a8cd42
Java: Fix for private interface methods.
2020-05-27 11:05:41 +02:00
Anders Schack-Mulligen
796eac108f
Java: Autoformat
2020-05-27 09:19:59 +02:00
Mathias Vorreiter Pedersen
db557a45e7
Merge pull request #3570 from geoffw0/mysprintftest
...
C++: Fix mysprintf in taint test
2020-05-27 09:19:54 +02:00
Mathias Vorreiter Pedersen
97edd97778
C++: Add getLocation to TNode IPA type in testcase
2020-05-27 08:28:18 +02:00
Robert Marsh
b45473ec4c
C++: more specific type in IndirectParameterAlloc
2020-05-26 14:07:26 -07:00
Robert Marsh
70f62538af
C++: autoformat
2020-05-26 14:06:22 -07:00
Robert Marsh
fb46002332
C++: Fix ThisParameterNode after IR changes
2020-05-26 13:35:08 -07:00
Erik Krogh Kristensen
dbc25ca3fb
cache Expr::getStringValue
2020-05-26 22:17:00 +02:00
Philip Ginsbach
c8ed08f14c
introduce type unions in the handbook
2020-05-26 19:46:58 +01:00
Robert Marsh
7ad45d50c0
C++: add test case from issue
2020-05-26 11:38:14 -07:00
yo-h
f952293ba0
Merge pull request #3526 from aschackmull/java/qltest-fps-nullness-rangeanalyis
...
Java: Add a few qltest cases for nullness and range analysis FPs.
2020-05-26 14:09:27 -04:00
Geoffrey White
95537ed26f
C++: Fix mysprintf in test.
2020-05-26 18:06:14 +01:00
Geoffrey White
d96bf797ef
C++: Test layout.
2020-05-26 18:06:06 +01:00
Erik Krogh Kristensen
319363f56c
update expected output
2020-05-26 18:47:37 +02:00
Robert Marsh
43520b8f9b
C++/C#: Fix copy/pasted qldoc
2020-05-26 09:47:30 -07:00
Geoffrey White
1baf14461d
C++: Add a definition of taint to the models library.
2020-05-26 17:44:17 +01:00
Robert Marsh
2429e22709
Merge pull request #3548 from dbartol/github/codeql-c-analysis-team/69
...
C++: Fix duplicate result types
2020-05-26 09:44:12 -07:00
Geoffrey White
965d4829b5
C++: Consistency.
2020-05-26 17:43:40 +01:00
Erik Krogh Kristensen
63a14d1b96
use HtmlConcatenationLeaf
2020-05-26 18:33:29 +02:00
Shati Patel
9afbd5b5eb
Merge pull request #3565 from shati-patel/53-style-guides
...
Docs: Update markdown files with 1.24 title changes
2020-05-26 15:58:04 +01:00
Rasmus Wriedt Larsen
6cba2fe4f8
Python: Model Django response sinks that are not vuln to XSS
...
Since HttpResponse is not *only* used for XSS, it is still valuable to know the
content is send as part of the response.
The *proper* solution to this problem of not all HttpResponses being vulnerable
to XSS is probably to define a new abstract class in Http.qll called
HttpResponseXSSVulnerableSink (or similar). I would like to model a few more
libraries/frameworks before fully comitting to an approach though.
2020-05-26 16:45:46 +02:00
Geoffrey White
dea7be0884
Merge pull request #3557 from jbj/qldoc-external
...
C++: QLDoc for legacy libraries in `external` dir
2020-05-26 15:01:03 +01:00
Erik Krogh Kristensen
9b047f6f03
use the DOTALL flag
2020-05-26 14:53:33 +02:00
Erik Krogh Kristensen
fd561d1ce2
remove temporary comment
...
Co-authored-by: Asger F <asgerf@github.com >
2020-05-26 14:37:02 +02:00
Erik Krogh Kristensen
0c00331527
less -> fewer
...
Co-authored-by: Asger F <asgerf@github.com >
2020-05-26 14:30:29 +02:00
Mathias Vorreiter Pedersen
08fa3141cd
C++: Fix accidential removal of private annotations
2020-05-26 14:15:46 +02:00
Erik Krogh Kristensen
124c4cb15e
Merge branch 'master' of github.com:github/codeql into OptionalSanitizer
2020-05-26 13:59:57 +02:00
Erik Krogh Kristensen
e5afdc53be
use HtmlSanitizerCall to recognize sanitizers
2020-05-26 13:34:49 +02:00
Erik Krogh Kristensen
3e3372be4b
recognize DOMPurify.sanitize as a HTML sanitizer
2020-05-26 13:34:33 +02:00
Jonas Jensen
5deeda0337
Merge pull request #3387 from geoffw0/tostringperf
...
C++: Eliminate recursion from toString().
2020-05-26 13:24:43 +02:00
Calum Grant
f0499451d3
Merge pull request #3513 from hvitved/csharp/deprecate-override
...
C#: Remove two deprecated predicates
2020-05-26 12:22:41 +01:00
Mathias Vorreiter Pedersen
251240376b
C++: Fix asPartialDefinition for IR dataflow nodes and accept testcases
2020-05-26 13:14:38 +02:00
Mathias Vorreiter Pedersen
c5c3ffaef0
C++: Add asPartialDefinition testcases
2020-05-26 13:14:11 +02:00
semmle-qlci
be5b343a0c
Merge pull request #3564 from max-schaefer/js/reflective-argument-access
...
Approved by asgerf
2020-05-26 12:09:13 +01:00
Asger Feldthaus
75fee22f1e
JS: Avoid string coercion in JSXName.getValue
2020-05-26 12:03:02 +01:00
Erik Krogh Kristensen
ad40c4b0f2
add a sanitizer guard for safe attribute string concatenations
2020-05-26 12:36:47 +02:00
Erik Krogh Kristensen
a9bea63019
recognize more HTML attribute concatenations
2020-05-26 12:36:24 +02:00
Shati Patel
bdecda22f7
Merge pull request #3538 from shati-patel/sd-86
...
QL language: Clarify use of query modules
2020-05-26 11:30:17 +01:00
Shati Patel
c12fd6fba6
Add links to Go queries
2020-05-26 11:08:11 +01:00
Shati Patel
495c6715cd
Update contributing guide with premigration changes
2020-05-26 11:08:11 +01:00
Shati Patel
bdfb8a337e
Update style guides with premigration changes
2020-05-26 11:08:11 +01:00
semmle-qlci
4b0354c4bc
Merge pull request #3555 from max-schaefer/js/require-flow
...
Approved by asgerf
2020-05-26 10:54:21 +01:00
Max Schaefer
5b0a3b9673
JavaScript: Change "Less results" to "Fewer results" in change notes.
2020-05-26 10:49:30 +01:00
Max Schaefer
abfcc42133
JavaScript: Re-alphabetise change notes.
2020-05-26 10:49:30 +01:00
Max Schaefer
215682f67c
JavaScript: Add change note.
2020-05-26 10:49:30 +01:00
Max Schaefer
7ddf5ced23
JavaScript: Update expected output for unrelated tests.
2020-05-26 10:49:30 +01:00
semmle-qlci
4b56229ca0
Merge pull request #3527 from esbena/js/fastify
...
Approved by asgerf
2020-05-26 10:44:59 +01:00
Rasmus Lerchedahl Petersen
6b168de7fc
Python: re, handle \Z
2020-05-26 11:42:21 +02:00
semmle-qlci
df205b617e
Merge pull request #3539 from asger-semmle/js/capture-level-flow
...
Approved by erik-krogh
2020-05-26 10:42:14 +01:00
Mathias Vorreiter Pedersen
b205d36933
C++: Remove chi -> load rule from simpleLocalFlowStep and accept tests
2020-05-26 11:40:26 +02:00
Rasmus Wriedt Larsen
c78ca2616c
Merge branch 'master' into python-keyword-only-args
2020-05-26 11:20:04 +02:00
Rasmus Wriedt Larsen
5a18b08d13
Python: Add comment explaining kw-only default index upgrade
2020-05-26 11:15:00 +02:00
Rasmus Wriedt Larsen
a616704a56
Python: Fix typo
...
Co-authored-by: Taus <tausbn@gmail.com >
2020-05-26 11:07:49 +02:00
Max Schaefer
9d3a9d71f1
JavaScript: Add basic support for reasoning about reflective parameter accesses.
...
Currently, only `arguments[c]` for a constant value `c` is supported.
This allows us to detect the prototype-pollution vulnerabilities in (old versions of) `extend`, `jquery`, and `node.extend`.
2020-05-26 09:59:29 +01:00
Max Schaefer
a39e8b4802
JavaScript: Add test for FlowSteps::argumentPassing predicate.
2020-05-26 09:51:06 +01:00
Rasmus Wriedt Larsen
9c75a39b81
Python: Extend command-injection to handle fabric.api.execute
2020-05-26 10:22:27 +02:00
Rasmus Wriedt Larsen
e04d1ffcd2
Python: Add test for fabric.api.execute
2020-05-26 10:20:22 +02:00
Anders Schack-Mulligen
6bc9624a4c
Merge pull request #3236 from luchua-bc/java-improper-url-validation
...
Java: Improper url validation
2020-05-26 09:48:44 +02:00
Mathias Vorreiter Pedersen
5fb76df44f
Merge pull request #3556 from jbj/qldoc-CodeDuplication
...
C++/JavaScript: Improve CodeDuplication.qll QLDoc
2020-05-26 09:17:28 +02:00
semmle-qlci
64aefc612f
Merge pull request #3554 from jbj/too-few-arguments-ambiguous
...
Approved by dbartol
2020-05-26 07:26:53 +01:00
Rasmus Lerchedahl Petersen
f1efdee194
Python: re test with \Z
2020-05-26 08:07:13 +02:00
Erik Krogh Kristensen
3f66c04e12
change note
2020-05-26 00:09:11 +02:00
Erik Krogh Kristensen
9254df1f78
sanitize optionally sanitized values
2020-05-26 00:09:11 +02:00
Erik Krogh Kristensen
8fac3a1403
add IsEmptyGuard to TaintTracking
2020-05-26 00:09:08 +02:00
Dave Bartolomeo
5c20d56134
Merge pull request #3558 from jbj/qldoc-default-objc
...
C++: Properly deprecate objc.qll and default.qll
2020-05-25 14:31:25 -04:00
Dave Bartolomeo
12688f80ce
Merge pull request #3559 from jbj/vcs-remove
...
C++: Remove VCS.qll and all queries using it
2020-05-25 14:30:31 -04:00
Jonas Jensen
e28ed848a4
C++: Remove VCS.qll and all queries using it
...
All these queries have been deprecated since 2018. There is
unfortunately no way to deprecate a library, but it's been years since
we populated any databases using the VCS library, so nobody should be
using it.
2020-05-25 19:28:06 +02:00
Jonas Jensen
85df60ea65
C++: Replace import default with import cpp
...
Some tests still used the old name for the top-level library.
2020-05-25 19:07:28 +02:00
Jonas Jensen
5fc2a3de92
C++: QLDoc for default.qll and objc.qll
...
These are both deprecated.
2020-05-25 19:05:41 +02:00
Jonas Jensen
357e14b2d2
C++: QLDoc for legacy libraries in external dir
...
These docs were taken from the corresponding files in JavaScript, and
parameter names were changed to match.
2020-05-25 19:03:14 +02:00
Jonas Jensen
6fc9e1d84c
C++/JavaScript: Improve CodeDuplication.qll QLDoc
...
I took most of the docs from the corresponding predicates in
JavaScript's `CodeDuplication.qll`. Where JavaScript had a corresponding
predicate but didn't have QLDoc, I added new QLDoc to both.
2020-05-25 18:59:48 +02:00
Taus
7716cff3d8
Merge pull request #3551 from RasmusWL/python-fix-upcoming-deprecation
...
Python: Fix (upcoming) deprecation compiler-warnings
2020-05-25 16:17:57 +02:00
semmle-qlci
8146073c74
Merge pull request #3553 from RasmusWL/python-fix-tainttracking-import
...
Approved by tausbn
2020-05-25 14:18:54 +01:00
semmle-qlci
6f1f926e0c
Merge pull request #3552 from RasmusWL/python-fix-filename-example
...
Approved by tausbn
2020-05-25 14:17:05 +01:00
Jonas Jensen
bc09720704
Merge pull request #3479 from geoffw0/fp2762
...
C++: Allow equality to block taint (security taint tracking)
2020-05-25 15:11:10 +02:00
Jonas Jensen
3d58e6f7af
Merge pull request #3515 from hvitved/dataflow/remove-deprecated
...
Data flow: Remove deprecated predicates
2020-05-25 15:08:28 +02:00
Jonas Jensen
b4c32a00d8
C++: Fix up QLDoc in TooFewArguments.qll
2020-05-25 14:49:02 +02:00
Jonas Jensen
b1edc1d255
C++: Only give alert when no def fits arg count
...
The `cpp/too-few-arguments` query produced alerts for ambiguous
databases where a function had multiple possible declarations, with some
declarations having the right number of parameters and some having too
many. With this change, the query errs on the side of caution in those
cases and does not produce an alert.
This fixes false positives on racket/racket.
The new `hasDefiniteNumberOfParameters` is exactly the negation of the
old `hasZeroParamDecl`.
2020-05-25 14:48:57 +02:00
Bt2018
2a654af983
Correct the select statement in the query
2020-05-25 08:24:38 -04:00
Rasmus Wriedt Larsen
f602f3e1c7
Python: Use proper import for semmle.python.dataflow.TaintTracking
...
It was moved in 637677d515 , but imports were not
updated.
2020-05-25 13:45:49 +02:00
Rasmus Wriedt Larsen
74167923bc
Python: Fix filename example
...
I got my eyes on this one since it was using a deprecated method, BUT it was
also doing the thing, since File.getName() is the same as
File.getAbsolutePath(), and that doesn't match the description :\
2020-05-25 13:17:32 +02:00
Rasmus Wriedt Larsen
6ce1b9f7fa
Python: Fix use of StrConst.strValue()
2020-05-25 13:12:56 +02:00
Anders Schack-Mulligen
0d75c6a5f1
Merge pull request #3506 from ggolawski/spring-actuators-fix
...
Fixes FPs in SpringBootActuators query
2020-05-25 13:09:56 +02:00
semmle-qlci
ac1a338390
Merge pull request #3407 from RasmusWL/python-add-BoundMethodValue-v2
...
Approved by tausbn
2020-05-25 12:00:45 +01:00
Rasmus Wriedt Larsen
32c8dd0491
Python: Fix (upcoming) deprecation compiler-warnings
...
In a near-future release overriding a deprecated predicate without making as
deprecated would give a compiler warning.
Not fixing the XML one. [I can see that this shouldn't be reported
anymore](https://github.com/github/codeql/pull/3520#issuecomment-631552943 ), and
it's not safe to remove since it was only marked as deprecated in
e6425bb4cf .
2020-05-25 11:05:30 +02:00
Taus
a2308771a3
Merge pull request #3489 from yoff/DeprecateObject
...
Python: Modernise `py/missing-equals`.
2020-05-25 10:56:16 +02:00
Rasmus Wriedt Larsen
49d7e12acd
Python: Remove unnecessary restriction from getNamedArgumentForCall
...
As agreed in https://github.com/github/codeql/pull/3407
2020-05-25 10:17:37 +02:00
Rasmus Wriedt Larsen
4fc3cae646
Python: Add test for how arguments to *args and **kwargs are handled
2020-05-25 10:16:10 +02:00
Rasmus Wriedt Larsen
87ee6ae101
Python: Add a bit of docs to CallableObjectInternal
...
As requested :)
2020-05-25 09:53:28 +02:00
Rasmus Wriedt Larsen
9e0d57c610
Python: Fix grammar in QLDoc
...
Co-authored-by: Taus <tausbn@gmail.com >
2020-05-25 09:47:01 +02:00
Rasmus Lerchedahl Petersen
3e712be431
Python: Modernise
2020-05-25 09:00:34 +02:00
Rasmus Lerchedahl Petersen
712513916c
Python: Address review
2020-05-25 07:44:00 +02:00
Max Schaefer
573fdaa424
JavaScript: Track require through local data flow.
2020-05-24 20:00:10 +01:00
luchua-bc
6d1ba3f899
Java: CWE-273 Unsafe certificate trust
2020-05-24 16:43:15 +00:00
Robert Marsh
1fa1bd5e36
C#: fix compilation error in IR
2020-05-22 16:08:11 -07:00
Robert Marsh
b4a947ddf1
C++: add getIRVariable for this temp variables
2020-05-22 15:43:34 -07:00
Robert Marsh
8a53dc882d
C++: treat this as a parameter in IR
2020-05-22 15:35:34 -07:00
Dave Bartolomeo
df834ac031
C++: Fix duplicate result types
...
In a couple of cases, we use `glval<unknown>` as the result type of an instruction because we can't come up with anything better. Two examples are the result of `VariableAddress[#ellipsis]`, and the address of the temp variable that holds the lvalue result of the conditional operator in `(a ? b : c) = y`. In both cases, we call `getTypeForGLValue(any(UnknownType t))`, but that would have multiple results because `result.hasType(any(UnknownType t), true)` also holds for `CppFunctionGLValueType`. I tightened the result type to ensure we get the right one.
2020-05-22 16:20:33 -04:00
Shati Patel
e990f1b53d
Merge pull request #3546 from aschackmull/java/tutorial-bug-fix
...
Java: Fix bug in tutorial.
2020-05-22 17:23:58 +01:00
Alvaro Muñoz
0b20785cce
add support for java.io.StringWriter
2020-05-22 18:13:28 +02:00
semmle-qlci
b9ecf1a304
Merge pull request #3447 from erik-krogh/LibCmdInjection
...
Approved by asgerf, mchammer01
2020-05-22 17:10:57 +01:00
Anders Schack-Mulligen
6228e7670b
Java: Fix bug in tutorial.
2020-05-22 14:44:24 +02:00
Esben Sparre Andreasen
e172d55ecb
Update javascript/ql/test/query-tests/Security/CWE-020/IncompleteUrlSchemeCheck.js
...
Co-authored-by: Asger F <asgerf@github.com >
2020-05-22 13:33:34 +02:00
Asger Feldthaus
823ed3bbdf
JS: Wrap node --version call in retry loop
2020-05-22 10:40:16 +01:00
Asger Feldthaus
6f0356b229
Revert "JS: Remove timeout for node --version check"
...
This reverts commit ec7c9489dc .
2020-05-22 10:40:07 +01:00
James Fletcher
9259dca40d
Merge pull request #3540 from github/jf205-patch-2
...
Link README.md to CodeQL for Go repo
2020-05-22 10:29:55 +01:00
Shati Patel
cf13992552
Merge pull request #3544 from shati-patel/code-typo
...
CodeQL docs: Fix error in code snippet [cherry-pick]
2020-05-22 08:42:41 +01:00
syang-ng
ca8c3dabda
fix an error in the code snippet of the documentation about global-data-flow-java
2020-05-22 08:00:52 +01:00
Shati Patel
8c1e4d49ca
Merge pull request #3537 from syang-ng/master
...
fix an error in the code snippet of the documentation about global-data-flow-java
2020-05-21 19:43:51 +01:00
James Fletcher
49d4c76f2f
Update README.md
2020-05-21 16:37:44 +01:00
Asger Feldthaus
75be3b7ecb
JS: Add test case for missed captured flow
2020-05-21 16:14:13 +01:00
Shati Patel
c021dcd1e8
Ql language: Clarify use of query modules
2020-05-21 15:30:40 +01:00
syang-ng
184209d1eb
fix an error in the code snippet of the documentation about global-data-flow-java
2020-05-21 22:00:15 +08:00
Geoffrey White
0f4723aee4
Merge pull request #3520 from dbartol/github/codeql-c-analysis-team/79
...
C++: Mark deprecated overrides as deprecated
2020-05-21 14:55:39 +01:00
Erik Krogh Kristensen
b79b25ef87
correct cwe-78 to cwe-078
2020-05-21 12:38:44 +00:00
Erik Krogh Kristensen
b297837969
Apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-05-21 14:32:02 +02:00
Esben Sparre Andreasen
b31f83a5af
JS: fixup expected output
2020-05-21 13:47:16 +02:00
Esben Sparre Andreasen
e588e59f9b
JS: fixup
2020-05-21 13:42:28 +02:00
Esben Sparre Andreasen
c400b45cd6
JS: make the Fastify model support isUserControlledObject
2020-05-21 13:42:28 +02:00
Esben Sparre Andreasen
894033df8a
JS: de-boilerplate the fastify model: address expr/dataflow comments
2020-05-21 13:42:28 +02:00
Esben Sparre Andreasen
74fc33e2a8
JS: make the qldoc check happy
2020-05-21 13:42:27 +02:00
Esben Sparre Andreasen
a76c70d2d7
JS: model fastify
2020-05-21 13:42:27 +02:00
James Fletcher
e0e9535f08
Merge pull request #3530 from jf205/sd-109
...
CodeQL docs: refine two article titles
2020-05-21 08:55:10 +01:00
Mathias Vorreiter Pedersen
617ef32464
C++: Remove [FALSE POSITIVE] annotations
2020-05-21 02:22:57 +02:00
Dave Bartolomeo
5641b2c140
C++: Remove deprecated predicate from File
2020-05-20 14:14:49 -04:00
Dave Bartolomeo
ff1e70efce
C++: Undo changes to shared XML.qll
2020-05-20 14:14:31 -04:00
Mathias Vorreiter Pedersen
3c167125e5
C++: Accept test output
2020-05-20 18:18:34 +02:00
Mathias Vorreiter Pedersen
218a3cf93d
C++: Remove field conflation
2020-05-20 18:18:26 +02:00
Asger Feldthaus
ec7c9489dc
JS: Remove timeout for node --version check
2020-05-20 17:12:24 +01:00
semmle-qlci
8df7b7c42a
Merge pull request #3525 from erik-krogh/ZipTaint
...
Approved by asgerf
2020-05-20 16:45:02 +01:00
james
edc5d36274
docs: refine some article titles
2020-05-20 16:16:14 +01:00
Bt2018
74ab6981eb
Fix HTML tag issue
2020-05-20 10:23:40 -04:00
semmle-qlci
079021a3e9
Merge pull request #3453 from RasmusWL/python-flask-routed-params
...
Approved by tausbn
2020-05-20 14:47:53 +01:00
Erik Krogh Kristensen
a23cde1354
autoformat
2020-05-20 15:36:46 +02:00
Tom Hvitved
011a95dcfa
C#: Fix extracted type for nested object initializers
2020-05-20 14:20:41 +02:00
Tom Hvitved
70d47b76b1
C#: Add test for the type of an object initializer
2020-05-20 14:18:16 +02:00
Geoffrey White
9babd5dc10
C++: Another positive effect of the change.
2020-05-20 12:49:01 +01:00
Erik Krogh Kristensen
5a3eec87c0
rename isTaintedPathStep to isPosixPathStep
2020-05-20 13:44:14 +02:00
Erik Krogh Kristensen
97c199e10d
update docstring
...
Co-authored-by: Asger F <asgerf@github.com >
2020-05-20 13:40:12 +02:00
Geoffrey White
f2436ff713
C++: Autoformat.
2020-05-20 12:39:54 +01:00
Rasmus Wriedt Larsen
712d4bd150
Python: Fix typo in docs
...
Co-authored-by: Taus <tausbn@gmail.com >
2020-05-20 13:06:24 +02:00
semmle-qlci
c15d22d9f8
Merge pull request #3516 from asger-semmle/js/typescript-3.9.2
...
Approved by erik-krogh
2020-05-20 11:31:57 +01:00
semmle-qlci
2bbc1c2af0
Merge pull request #3478 from erik-krogh/PromiseAll
...
Approved by asgerf, esbena
2020-05-20 11:03:05 +01:00
Tom Hvitved
7a54a90e61
C#: Fix CFG for C# 6 initializers
2020-05-20 12:01:22 +02:00
semmle-qlci
29b8a0db92
Merge pull request #3508 from asger-semmle/js/shared-data-flow-node
...
Approved by esbena
2020-05-20 10:58:09 +01:00
Anders Schack-Mulligen
8cbc01d49b
Java: Add a few qltest cases for nullness and range analysis FPs.
2020-05-20 10:44:15 +02:00
Erik Krogh Kristensen
33e0f25f3c
use NodeJSLib::Path instead of DataFlow::moduleMember
2020-05-20 10:30:23 +02:00
Erik Krogh Kristensen
7c51dff0f7
share implementation between TaintedPath and ZipSlip
2020-05-20 10:10:04 +02:00
Tom Hvitved
36e29e0f75
C#: Add CFG tests for C# 6 initializers
2020-05-20 09:33:51 +02:00
Tom Hvitved
e9839198f4
Merge pull request #3484 from calumgrant/cs/index-initializers
...
C#: Extract indexed initializers correctly
2020-05-20 09:22:47 +02:00
Tom Hvitved
97080731ad
Merge pull request #3486 from h3ku/master
...
CSHARP: Add experimental query for tainted WebClient
2020-05-20 08:17:05 +02:00
Rasmus Lerchedahl Petersen
4d6ad32f04
Python: Update test expectations.
...
As ar as I can tell, all these are improvements
2020-05-20 08:11:03 +02:00
Robert Marsh
28c2acabe5
Merge pull request #3505 from dbartol/github/codeql-c-analysis-team/69
...
C++/C#: Remove `UnmodeledDefinition` instruction
2020-05-19 17:17:53 -07:00
Dave Bartolomeo
3832d4cae6
C++: Mark deprecated overrides as deprecated
...
The QL compiler is about to be changed to emit a warning when overriding a deprecated predicate. This PR marks the existing overrides of deprecated predicates as `deprecated` themselves, which avoids the warning.
The `Print.qll` models seem to preserve the `isWideCharDefault()` predicate for backwards compatibility, so we can't remove them and must continue overriding them.
The `XML.qll` override is necessary because both superclasses declare the `getName()` predicate. One is `deprecated`, and the other is `abstract`, so we have to have an override.
2020-05-19 16:33:33 -04:00
semmle-qlci
0a8b3adc25
Merge pull request #3518 from felicitymay/merge-124-master
...
Approved by shati-patel
2020-05-19 19:30:47 +01:00
Felicity Chapman
99d7a21425
Merge branch 'rc/1.24' into merge-124-master
2020-05-19 19:04:44 +01:00
Felicity Chapman
cca3922d00
Merge pull request #3517 from felicitymay/1.24/SD-54-update-contact
...
CodeQL 1.24: Update information on support
2020-05-19 18:57:34 +01:00
Tom Hvitved
f0f833b58f
Merge pull request #3512 from jbj/mergeback-2020-05-19
...
Mergeback rc/1.24 -> master
2020-05-19 19:51:36 +02:00
Felicity Chapman
70d642a956
Update information on support
2020-05-19 18:17:17 +01:00
Erik Krogh Kristensen
5b569a4d6d
add a sanitizer for chained replace-calls
2020-05-19 19:16:58 +02:00
Geoffrey White
fdf4e83c25
C++: Solve tuple count bulge that may affect performance.
2020-05-19 16:59:37 +01:00
Jonas Jensen
d38700a87c
Merge remote-tracking branch 'upstream/master' into mergeback-2020-05-19
...
Conflicts:
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/tainted.expected
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/test_diff.expected
2020-05-19 17:44:15 +02:00
Asger Feldthaus
9d006327df
JS: Update qldoc for ValueNode
2020-05-19 15:57:07 +01:00
semmle-qlci
26dfca80f6
Merge pull request #3510 from max-schaefer/cull-boring-queries
...
Approved by asgerf, esbena
2020-05-19 15:41:53 +01:00
Asger Feldthaus
b39e0ec091
JS: Update output due to whitelisting change
2020-05-19 15:30:36 +01:00
Hector Cuesta
66d77a43bd
Fix typo in comment and TaintTrackingConfiguration name
2020-05-19 15:15:03 +01:00
Hector Cuesta
e18d8c5234
Remove duplicated CWE in security tag
2020-05-19 15:12:43 +01:00
Hector Cuesta
7d1ef92fbf
Remove unnecessary CWE reference.
2020-05-19 15:09:17 +01:00
Mathias Vorreiter Pedersen
f0f7e531d7
Merge pull request #3511 from jbj/simplify-field-conflation-test
...
C++: Simplify field conflation test
2020-05-19 16:04:45 +02:00
yo-h
bfeaeccf60
Merge pull request #3507 from aschackmull/java/cleanup-deprecated-overrides
...
Java: Clean up deprecated overrides.
2020-05-19 09:47:57 -04:00
Tom Hvitved
431403f5db
Data flow: Remove deprecated predicates
2020-05-19 15:42:59 +02:00
Tom Hvitved
2519e8a5f1
C#: Remove more deprecated classes and predicates
2020-05-19 15:39:17 +02:00
Tom Hvitved
9db8b993a9
C#: Remove two deprecated predicates
2020-05-19 15:32:29 +02:00
Bt2018
19d2a404c9
Add AndroidRString RefType to clarify the Android query
2020-05-19 08:44:26 -04:00
Max Schaefer
a803120414
Lower precision for a number of queries.
...
These queries are currently run by default, but don't have their results displayed.
Looking through results on LGTM.com, they are either false positives (e.g., `BitwiseSignCheck` which flags many perfectly harmless operations and `CompareIdenticalValues` which mostly flags NaN checks) or harmless results that developers are unlikely to care about (e.g., `EmptyArrayInit` or `MisspelledIdentifier`).
With this PR, the only queries that are still run but not displayed are security queries, where different considerations may apply.
2020-05-19 13:43:17 +01:00
Jonas Jensen
5318d42c4f
Merge remote-tracking branch 'upstream/rc/1.24' into mergeback-2020-05-19
2020-05-19 14:42:58 +02:00
Jonas Jensen
486f06ab18
C++: Simplify field conflation test
...
It turned out the `memcpy` step was not even necessary.
2020-05-19 14:12:11 +02:00
Erik Krogh Kristensen
b71919299b
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2020-05-19 14:03:03 +02:00
Alexander Eyers-Taylor
57dbe5793f
Merge pull request #3501 from jbj/dispatch-global-union
...
C++: Fix struct field conflation in IR data flow
2020-05-19 12:29:25 +01:00
Esben Sparre Andreasen
76bce40a8b
JS: test fixups
2020-05-19 13:12:34 +02:00
Asger F
875c3706e3
Update javascript/ql/src/semmle/javascript/CFG.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-05-19 12:08:51 +01:00
Asger Feldthaus
3f30564d93
JS: Autoformat
2020-05-19 12:05:32 +01:00
Geoffrey White
7d630c458e
Merge branch 'master' into fp2762
2020-05-19 11:43:50 +01:00
Asger Feldthaus
0db0ddf476
JS: Add a change note
2020-05-19 11:07:35 +01:00
Asger Feldthaus
525b9871e0
JS: Update benign test output changes
2020-05-19 11:07:08 +01:00
Asger Feldthaus
b5b93f33bc
JS: Bump to TypeScript 3.9.2
2020-05-19 11:07:08 +01:00
Anders Schack-Mulligen
6f03a0bc39
Merge pull request #3487 from luchua-bc/java-sensitive-jboss-logging
...
Add JBoss logging
2020-05-19 11:04:18 +02:00
Anders Schack-Mulligen
c36e6213f1
Merge pull request #3288 from ggolawski/jndi-injection
...
CodeQL query to detect JNDI injections
2020-05-19 11:03:29 +02:00
Asger Feldthaus
f49b36aec7
JS: Change note
2020-05-19 09:52:26 +01:00
Anders Schack-Mulligen
9d7329de30
Java: Clean up deprecated overrides.
2020-05-19 10:41:41 +02:00
Erik Krogh Kristensen
0275ea955b
update expected output
2020-05-19 10:29:07 +02:00
Erik Krogh Kristensen
a4450c36f6
autoformat
2020-05-19 10:26:36 +02:00
Erik Krogh Kristensen
5a5192b890
add testing for complex path sanitizer in ZipSlip
2020-05-19 10:17:15 +02:00
semmle-qlci
0c081a8e87
Merge pull request #3497 from esbena/js/yield-and-local-objects
...
Approved by asgerf, erik-krogh
2020-05-19 09:02:22 +01:00
semmle-qlci
0d762066f5
Merge pull request #3504 from erik-krogh/unique
...
Approved by esbena
2020-05-19 08:35:08 +01:00
Dave Bartolomeo
d6ef94a4c7
C++: Remove dead comment
2020-05-18 23:05:19 -04:00
Dave Bartolomeo
3758f3c48d
C++: Fix syntax-zoo test output
2020-05-18 18:07:52 -04:00
Dave Bartolomeo
01c2f0ce01
C++/C#: Fix formatting
2020-05-18 18:02:00 -04:00
Asger Feldthaus
91b9e95010
JS: Fix join ordering in analysis of add expressions
2020-05-18 22:45:59 +01:00
Asger Feldthaus
6a37e4b7a3
JS: Cache clobberedProp
2020-05-18 22:45:59 +01:00
Asger Feldthaus
5213c511b9
JS: Improve perf of GlobalVarUse.isIncomplete
2020-05-18 22:45:59 +01:00
Asger Feldthaus
7d9923038e
JS: Fix perf issue from overriding isIncomplete
2020-05-18 22:45:59 +01:00
Asger Feldthaus
e58683769d
JS: Fix bad join order in exploratoryBoundInvokeStep
2020-05-18 22:45:59 +01:00
Asger Feldthaus
9581bb52cb
JS: Update test output
2020-05-18 22:45:59 +01:00
Asger Feldthaus
430bf2da8a
JS: Fix whitelisting in UselessConditional
2020-05-18 22:45:56 +01:00
Asger Feldthaus
1d994b017f
JS: Update type inference
2020-05-18 22:42:12 +01:00
Asger Feldthaus
d5d08da545
JS: Update getEnclosingExpr
2020-05-18 22:42:12 +01:00
Asger Feldthaus
12cc228946
JS: Update getFallbackTypeAnnotation
2020-05-18 22:42:12 +01:00
Asger Feldthaus
b06cd6db30
JS: Update Node.isIncomplete
2020-05-18 22:42:12 +01:00
Grzegorz Golawski
73e736b47a
Enhanced comments according to the review comment
2020-05-18 23:37:48 +02:00
Asger Feldthaus
5568f0e182
JS: Pass local arguments to parameter value node, not SSA node
2020-05-18 22:34:42 +01:00
Asger Feldthaus
dc2d6a5fd9
JS: Make ValueNode the ParameterNode with a step to the SSA node
2020-05-18 22:34:42 +01:00
Asger Feldthaus
37ddccfa15
JS: Merge DestructuringPatternNode into ValueNode
2020-05-18 22:29:33 +01:00
Asger Feldthaus
b3161b1c41
JS: Factor TNode into a separate file
2020-05-18 22:29:33 +01:00
Asger Feldthaus
d9123833af
JS: Avoid misoptimization in mayReturnImplicitValue
2020-05-18 22:29:33 +01:00
Asger Feldthaus
eddbdffe62
JS: Add more tests for implicit returns
2020-05-18 22:29:33 +01:00
Asger Feldthaus
6a63f5b677
JS: Avoid bad join order in ImplicitProcessImport
2020-05-18 22:29:32 +01:00
Asger Feldthaus
c869812563
JS: Add UselessConditional test
2020-05-18 22:29:32 +01:00
Grzegorz Goławski
0075d35346
Update java/ql/src/experimental/Security/CWE/CWE-074/JndiInjectionLib.qll
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-05-18 23:18:16 +02:00
Erik Krogh Kristensen
aa396a39d3
Merge branch 'master' of https://github.com/github/codeql into pr/erik-krogh/3478
2020-05-18 20:57:51 +00:00
Grzegorz Golawski
ac329e81f8
Fixes FPs in SpringBootActuators query
...
No evidence that Spring Actuators are being used, e.g. `http.authorizeRequests().anyRequest().permitAll()`
Only safe Actuators are enabled, e.g. `EndpointRequest.to("health", "info")`
2020-05-18 22:55:33 +02:00
Erik Krogh Kristensen
fc7e9eb8c8
add test for non-tracked aliasing
2020-05-18 22:40:41 +02:00
Dave Bartolomeo
42c659b8f2
C++/C#: Remove UnmodeledDefinition instruction
2020-05-18 15:08:50 -04:00
Erik Krogh Kristensen
b8ba31aaa0
autoformat
2020-05-18 21:06:19 +02:00
Erik Krogh Kristensen
0758413cc7
revert change to import
2020-05-18 21:06:19 +02:00
Erik Krogh Kristensen
742abf8751
refactor package export into a library, and add tests for the library
2020-05-18 21:06:14 +02:00
Erik Krogh Kristensen
d7b852f408
use count aggregate to count
2020-05-18 21:03:26 +02:00
semmle-qlci
192bf918c3
Merge pull request #3488 from asger-semmle/js/sql-type-tracking
...
Approved by erik-krogh
2020-05-18 19:57:32 +01:00
Erik Krogh Kristensen
202b8a56b7
apply the unique aggregate where trivially applicable
2020-05-18 20:37:38 +02:00
Rasmus Wriedt Larsen
3774310985
Python: Reduce FPs in Django due to bad XSS taint-sinks
...
Fixes https://github.com/github/codeql-python-team/issues/38
2020-05-18 19:14:43 +02:00
Rasmus Wriedt Larsen
fa08676a1d
Python: Proper redirect taint sinks for Django
...
Also a major restructuring of the code. A bit controversial since it
renames/moves classes that are already public.
Fixes https://github.com/github/codeql/issues/3466
2020-05-18 19:14:29 +02:00
Asger F
96d6115452
Merge branch 'master' into js/sql-type-tracking
2020-05-18 15:58:42 +01:00
Rasmus Wriedt Larsen
72ea4ff0dc
Python: Add more tests of django responses
...
They clearly shouldn't all be XSS sinks
2020-05-18 16:56:47 +02:00
Dave Bartolomeo
35868d4e5b
C++/C#: Change dump of unmodeled use to m?
...
This is kind of inconsequential on its own, but will make the test diffs easier to understand once the next commit removes `UnmodeledDefinition`.
2020-05-18 10:47:43 -04:00
Jonas Jensen
76e194c8be
C++: Fix struct field conflation in IR data flow
...
The virtual-dispatch code for globals was missing any relationship
between the union field access and the global variable, which meant it
propagated function-pointer flow between any two fields of a global
struct. This resulted in false positives from
`cpp/tainted-format-string` on projects using SDL, such as
WohlSoft/PGE-Project.
In addition to fixing that bug, this commit also brings the code up to
date with the new style of modeling flow through global variables:
`DataFlow::Node.asVariable()`.
2020-05-18 16:24:22 +02:00
Erik Krogh Kristensen
70a28f60e3
Merge branch 'master' of https://github.com/github/codeql into pr/erik-krogh/3478
2020-05-18 14:05:37 +00:00
Bt2018
69f2525e62
Remove the ending blank lines for auto-format check
2020-05-18 10:02:37 -04:00
Bt2018
08ab7b0eb2
Remove the ending blank line for auto-format check
2020-05-18 10:00:12 -04:00
Jonas Jensen
f2402c5abb
C++: Test virtual dispatch field conflation
...
This test demonstrates that IR data flow conflates unrelated fields of a
global struct-typed variable and that this bug is not present in the old
AST-based implementation of `semmle.code.cpp.security.TaintTracking`.
2020-05-18 15:37:22 +02:00
semmle-qlci
0da1e68462
Merge pull request #3498 from max-schaefer/js/remote-exec
...
Approved by esbena
2020-05-18 14:17:20 +01:00
Rasmus Wriedt Larsen
8fc803fb9f
Merge branch 'master' into python-keyword-only-args
2020-05-18 14:44:31 +02:00
Rasmus Lerchedahl Petersen
b56545b236
Python: Regexp: Handle repetions {n} (with no ,)
2020-05-18 14:44:11 +02:00
Asger F
a9983fdb49
Update javascript/ql/src/semmle/javascript/frameworks/SQL.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-18 13:23:22 +01:00
Bt2018
7a9381f1fb
Add declaring type to the res.getString(R.string.key) call
2020-05-18 07:59:38 -04:00
Anders Schack-Mulligen
37c8917813
Java: Add test.
2020-05-18 13:19:19 +02:00
Max Schaefer
bdd778f989
JavaScript: Add change note.
2020-05-18 12:08:36 +01:00
Max Schaefer
6797fec1a3
JavaScript: Add more models of packages that execute commands over SSH.
2020-05-18 12:08:14 +01:00
Esben Sparre Andreasen
a9ba6ac659
JS: make LocalObjects::isEscape aware of yield
2020-05-18 12:43:46 +02:00
Erik Krogh Kristensen
0f82370f4e
rename getHighLight() -> getAlertLocation()
2020-05-18 12:28:28 +02:00
Erik Krogh Kristensen
2b1724291b
adjust qhelp to focus on user-controlled data
2020-05-18 12:27:20 +02:00
Erik Krogh Kristensen
d18808698a
adjust qhelp to focus on the execFile API
2020-05-18 12:22:46 +02:00
Esben Sparre Andreasen
aa87008775
JS: typo fixups
2020-05-18 12:19:46 +02:00
Erik Krogh Kristensen
9c294513c7
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2020-05-18 12:18:20 +02:00
semmle-qlci
14664be467
Merge pull request #3468 from p0/imp/nodejs-vm-sinks
...
Approved by esbena
2020-05-18 11:10:13 +01:00
Esben Sparre Andreasen
b3691cd0e9
JS: change MembershipTest to MembershipCandidate
2020-05-18 11:51:00 +02:00
Erik Krogh Kristensen
c6276ddd1c
update expected output after restricting precise array tracking to Promise.all
2020-05-18 11:49:07 +02:00
James Fletcher
bd6d2d899d
Merge pull request #3495 from jf205/java-article-fix
...
CodeQL docs: remove stray GH variable
2020-05-18 10:23:22 +01:00
james
06f465bae7
docs: remove gh variable
2020-05-18 10:12:40 +01:00
Jonas Jensen
cc00f0f584
C++: Move identical declarations to shared.h file
...
This cleans up the test results, which were confusing because functions
like `sink` had multiple locations.
There are some additional results now involving casts to `const char *`
because previously it varied whether `sink` used `const`, and now it
always does.
2020-05-18 10:42:52 +02:00
Asger Feldthaus
a18e0b37cf
JS: simplify sequelize model
2020-05-18 09:34:17 +01:00
Asger F
f52c827966
Apply suggestions from code review
...
Base type of EscapingSanitizer
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-18 09:31:09 +01:00
Asger F
ffb22c061a
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-18 09:28:22 +01:00
Erik Krogh Kristensen
bd3c4d4077
Merge branch 'master' of https://github.com/github/codeql into pr/erik-krogh/3478
2020-05-18 07:51:19 +00:00
Esben Sparre Andreasen
ddb545c182
JS: introduce MembershipTests.qll and use in two locations
2020-05-18 09:50:00 +02:00
Anders Schack-Mulligen
bd114db862
Java: Add cfg edges for instanceof-pattern.
2020-05-18 09:49:32 +02:00
semmle-qlci
6041d52936
Merge pull request #3424 from asger-semmle/js/express-param-handler
...
Approved by esbena
2020-05-18 08:48:24 +01:00
semmle-qlci
135eae9895
Merge pull request #3483 from esbena/js/fix-qhelp-FNs
...
Approved by asgerf
2020-05-18 08:47:05 +01:00
semmle-qlci
0230b79efc
Merge pull request #3391 from erik-krogh/SplitFPs
...
Approved by esbena
2020-05-18 08:46:26 +01:00
Erik Krogh Kristensen
8717f7bd0d
restrict precise array elements to Promise.all()
2020-05-17 15:58:59 +02:00
Erik Krogh Kristensen
2d6e3a5784
support outdir in tsconfig.json
2020-05-17 10:32:27 +02:00
Erik Krogh Kristensen
dfdecf1450
add change note
2020-05-17 10:32:27 +02:00
Erik Krogh Kristensen
c8cf958c8a
add test cases for js/shell-command-constructed-from-input
2020-05-17 10:32:27 +02:00
Erik Krogh Kristensen
59001bbdf4
add qhelp for js/shell-command-constructed-from-input
2020-05-17 10:32:27 +02:00
Erik Krogh Kristensen
5e647da0de
add js/shell-command-constructed-from-input query
2020-05-17 10:32:15 +02:00
luchua-bc
6c24f36068
Java: CWE-297 insecure JavaMail SSL configuration
2020-05-17 02:43:26 +00:00
Erik Krogh Kristensen
a1a6826278
support non-SourceNode in IndirectCommandArgument#argumentList
2020-05-16 23:15:37 +02:00
Erik Krogh Kristensen
a6cd91bb49
add support for mz/fs and mz/child_process
2020-05-16 23:15:33 +02:00
Erik Krogh Kristensen
bb8905b46e
add "valid" to the AdHocWhitelistCheckSanitizer
2020-05-16 22:43:36 +02:00
semmle-qlci
8d41ce1630
Merge pull request #3480 from erik-krogh/moreSlip
...
Approved by esbena
2020-05-16 21:17:27 +01:00
Mathias Vorreiter Pedersen
a42d80aa14
Merge pull request #3481 from dbartol/github/codeql-c-analysis-team/69
...
C++/C#: Allow memory operands to lack a definition
2020-05-16 11:53:00 +02:00
Asger Feldthaus
897a3e39c9
JS: Autoformat
2020-05-16 09:37:16 +01:00
Asger Feldthaus
0171c9e10c
JS: Autoformat
2020-05-16 09:25:18 +01:00
Asger Feldthaus
d279845a43
JS: Minor fixes
2020-05-16 09:24:53 +01:00
yo-h
4f00e40257
Merge pull request #3474 from aschackmull/java/string-formatted
...
Java: Add taint steps for String.formatted.
2020-05-15 22:04:36 -04:00
yo-h
69ab158910
Merge pull request #3473 from aschackmull/java/switchexpr
...
Java: Extend library support for switch expressions.
2020-05-15 20:46:37 -04:00
Dave Bartolomeo
96c87b309b
C++/C#: Use unique to get a better join order
...
The previous changes made the optimizer choose a bad join order for the RHS of the antijoin in `addressOperandAllocationAndOffset`. Once again, `unique` to the rescue.
2020-05-15 17:36:43 -04:00
Erik Krogh Kristensen
e2cd7e6230
more precise taint-tracking for Promise.all
2020-05-15 22:02:41 +02:00
Hector Cuesta
16e39414bc
Reword of help file
2020-05-15 18:14:52 +01:00
Asger Feldthaus
435f9ea09f
JS: Change note
2020-05-15 17:27:30 +01:00
Asger Feldthaus
5249e84359
JS: Type track spanner model
2020-05-15 17:27:30 +01:00
Asger Feldthaus
d225715828
JS: Type track mssql model
2020-05-15 17:27:30 +01:00
Asger Feldthaus
6dcee5a0ef
JS: Type track sqlite model
2020-05-15 17:27:30 +01:00
Asger Feldthaus
84cd02cf01
JS: Type track pg model
2020-05-15 17:27:27 +01:00
Asger Feldthaus
f7771f17d1
JS: Type track mysql model
2020-05-15 17:27:27 +01:00
Asger Feldthaus
3e9849b7c4
JS: Type track sequelize model
2020-05-15 17:27:24 +01:00
Hector Cuesta
ef53e443b7
Fix typo in comment
2020-05-15 17:17:42 +01:00
luchua-bc
4117cd73a7
Add JBoss logging
2020-05-15 16:14:41 +00:00
Geoffrey White
edd09f09cd
C++: Add test cases where several specific values are permitted.
2020-05-15 17:01:23 +01:00
Hector Cuesta
a022086498
Add experimental query for Tainted WebClient
2020-05-15 16:30:10 +01:00
Calum Grant
da6c37d7dc
C#: Update test output.
2020-05-15 15:40:49 +01:00
Henning Makholm
a57b060a0c
docs/language/ql-handbook/language.rst: apply suggestion from review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-05-15 15:55:16 +02:00
Jonas Jensen
b08de6c051
Merge pull request #3482 from MathiasVP/getlim-taint-source
...
C++: Add GetDelim as taint step
2020-05-15 15:54:29 +02:00
Tom Hvitved
cd9538d0d9
Merge remote-tracking branch 'upstream/master' into dataflow/precise-field-types
2020-05-15 15:24:05 +02:00
Calum Grant
5787871734
Merge pull request #3351 from hvitved/csharp/unification-nested-types
...
C#: Teach unification library about nested types
2020-05-15 14:11:00 +01:00
Calum Grant
cc844648ff
Merge pull request #3365 from hvitved/csharp/format-queries-path-problem
...
C#: Convert `string.format()` queries to path queries
2020-05-15 14:08:54 +01:00
Rasmus Wriedt Larsen
061f318576
Merge pull request #3460 from yoff/boolDefault
...
Python: __bool__ does not raise TypeError by default
2020-05-15 15:07:45 +02:00
Dave Bartolomeo
89ec60c948
C++/C#: Add missing QLDoc
2020-05-15 09:01:16 -04:00
Dave Bartolomeo
bcddaf4c29
C++/C#: Fix formatting
2020-05-15 08:56:32 -04:00
Mathias Vorreiter Pedersen
7502c6f821
Set mustWrite to false in response to PR feedback
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-05-15 14:32:46 +02:00
Asger Feldthaus
e311cc7689
JS: Change note
2020-05-15 13:06:37 +01:00
Calum Grant
53ca3ccf53
C#: Update changenotes
2020-05-15 13:06:17 +01:00
Rasmus Lerchedahl Petersen
60d5ba23b3
Python: Move test into appropriate class.
...
Also update test expectations with changed line numbers.
2020-05-15 13:51:51 +02:00
Calum Grant
84bce9f742
C#: Extract indexed initializers correctly.
2020-05-15 12:50:53 +01:00
Rasmus Lerchedahl Petersen
1b0687e2f2
Python: update expectations correctly
2020-05-15 13:25:20 +02:00
Esben Sparre Andreasen
1c5bffc095
JS: fix some FNs in the qhelp examples
2020-05-15 12:40:38 +02:00
Jonas Jensen
8a0af0bcac
Merge pull request #3465 from MathiasVP/remove-abstract-from-access-and-cast
...
C++: Remove abstract keyword from `Access` and `Cast` classes
2020-05-15 12:25:34 +02:00
Erik Krogh Kristensen
3138918f1d
add test for promise inside Promise.all
2020-05-15 11:49:29 +02:00
Mathias Vorreiter Pedersen
866b1361ec
C++: Accept tests
2020-05-15 11:12:47 +02:00
Mathias Vorreiter Pedersen
e70f22c753
C++: Model getdelim and friends
2020-05-15 11:05:57 +02:00
Mathias Vorreiter Pedersen
90d473d886
C++: Demonstrate lack of taint through getdelim
2020-05-15 11:01:27 +02:00
Asger Feldthaus
d84f1b47c2
JS: Refactor RequestInputAccess to use source nodes
2020-05-15 09:59:28 +01:00
Asger Feldthaus
da974f1527
JS: Add test with dynamic access to req.query
2020-05-15 09:59:28 +01:00
Asger Feldthaus
659e2ff709
JS: Tweak evaluation of route handler params
2020-05-15 09:59:27 +01:00
Asger F
b9995b784d
Update javascript/ql/src/semmle/javascript/frameworks/ConnectExpressShared.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-05-15 09:59:27 +01:00
Asger Feldthaus
a982cdc39c
JS: Autoformat
2020-05-15 09:59:27 +01:00
Asger Feldthaus
bfbe70a7a9
JS: Fixes
2020-05-15 09:59:27 +01:00
Asger Feldthaus
82d3a7eb23
JS: Go back to disjunction 😭
2020-05-15 09:59:27 +01:00
Asger Feldthaus
c45d84f8f3
JS: Update getRouteHandlerParameter and router tracking
2020-05-15 09:59:27 +01:00
Asger Feldthaus
9cacfab7c6
JS: Recognize Express param value callback as RemoteFlowSource
2020-05-15 09:59:26 +01:00
Geoffrey White
48f3db3fbe
Merge branch 'master' into fp2762
2020-05-15 09:55:30 +01:00
Erik Krogh Kristensen
6d79bab7e4
rename Fs to FS
2020-05-15 10:54:08 +02:00
Erik Krogh Kristensen
dd3342ba6f
restrict the number of stored array elements
2020-05-15 10:01:27 +02:00
Erik Krogh Kristensen
4eb96848a6
add change note for bluebird and "Promise"
2020-05-15 09:58:33 +02:00
Erik Krogh Kristensen
cb96ee8def
remove redundant instanceof check
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-05-15 09:58:18 +02:00
Erik Krogh Kristensen
7df35a6bab
update change note
2020-05-15 09:52:59 +02:00
semmle-qlci
a536069059
Merge pull request #3408 from esbena/js/unsafe-html-expansion
...
Approved by asgerf, mchammer01
2020-05-15 08:24:12 +01:00
Tom Hvitved
01102b309b
C#: Rename predicates
2020-05-15 09:06:12 +02:00
Dave Bartolomeo
4614372873
C++/C#: Add QLDoc
2020-05-14 17:49:23 -04:00
Dave Bartolomeo
6c12b59f0f
C++/C#: Allow non-Phi memory operands to have no definition
2020-05-14 17:22:23 -04:00
Henning Makholm
43e8a0f716
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-05-14 23:13:50 +02:00
Erik Krogh Kristensen
6775294ac1
update expected output
2020-05-14 22:26:44 +02:00
Rasmus Lerchedahl Petersen
81a5692935
Python: handle \uxxxx and refactor
2020-05-14 21:22:21 +02:00
Erik Krogh Kristensen
e7d1b12ac8
add test
2020-05-14 20:31:23 +02:00
Erik Krogh Kristensen
6d2bffef72
add fs.open/openSync as ZipSlip sinks
2020-05-14 20:31:13 +02:00
Erik Krogh Kristensen
2d675262b2
use the generalized fs module in more places
2020-05-14 20:31:00 +02:00
Geoffrey White
6579c71866
C++: Change note.
2020-05-14 18:44:06 +01:00
Geoffrey White
df5e16c45d
C++: Add a 1.25 change note file (didn't we used to have templates for these?).
2020-05-14 18:41:14 +01:00
Geoffrey White
4a6021fb61
C++: Allow equality checking to block taint flow.
2020-05-14 18:32:38 +01:00
Erik Krogh Kristensen
5132e61ce7
add tests
2020-05-14 18:55:49 +02:00
Erik Krogh Kristensen
e98f794dab
implement precise data-flow steps for Promise.all
2020-05-14 18:55:44 +02:00
Henning Makholm
69ba22a3c2
QL handbook: bring library path documentation up to date
2020-05-14 18:41:22 +02:00
semmle-qlci
c06680a496
Merge pull request #3470 from asger-semmle/js/cache-module-import
...
Approved by esbena
2020-05-14 17:20:04 +01:00
Mathias Vorreiter Pedersen
fe682556bf
Merge pull request #3475 from jbj/field-conflation-memcpy
...
C++: Test field conflation with array in struct
2020-05-14 17:53:32 +02:00
Dave Bartolomeo
efa133f0db
Merge pull request #3463 from MathiasVP/fix-field-flow-annotation
...
C++: Annotate field flow tests
2020-05-14 10:49:27 -04:00
Jonas Jensen
49ebb3197a
Merge pull request #3472 from geoffw0/paramstring
...
C++: Improve getParameterString().
2020-05-14 16:48:07 +02:00
Jonas Jensen
a380dc113f
C++: Test field conflation with array in struct
2020-05-14 16:29:39 +02:00
Dave Bartolomeo
9de597db25
C++: Refactor Operand to prepare for cross-phase IPA sharing
2020-05-14 10:29:08 -04:00
Geoffrey White
754d7f0be8
C++: More test cases for TaintedAllocationSize.
2020-05-14 15:23:31 +01:00
Anders Schack-Mulligen
1838a7455a
Java: Add taint steps for String.formatted.
2020-05-14 16:17:03 +02:00
Rasmus Lerchedahl Petersen
21d1ea5d96
Merge branch 'boolDefault' of github.com:yoff/codeql into boolDefault
2020-05-14 16:06:58 +02:00
Tom Hvitved
2c243ad1cd
C#: Add data-flow test
2020-05-14 15:58:50 +02:00
Tom Hvitved
2d7470fc3a
C++: Follow-up changes
2020-05-14 15:58:50 +02:00
Tom Hvitved
e608c53c3f
Java: Follow-up changes
2020-05-14 15:58:50 +02:00
Tom Hvitved
aa83cc1472
Data flow: Sync files
2020-05-14 15:58:50 +02:00
Tom Hvitved
a0d100485b
Data flow: Rename Content variables from f to c
2020-05-14 15:58:50 +02:00
Tom Hvitved
f1cd53507d
Data flow: Track precise types during field flow
2020-05-14 15:58:50 +02:00
Jonas Jensen
3cd377e299
C++: Fixup forgotten test annotation
...
This should have been removed in 038bea2f52 .
2020-05-14 15:57:47 +02:00
Rasmus Lerchedahl Petersen
1817d2af2b
Make test for wrong bool type pass
2020-05-14 15:56:57 +02:00
Rasmus Lerchedahl Petersen
7b004c3746
Python: Add test for wrong exception type
2020-05-14 15:42:52 +02:00
Anders Schack-Mulligen
0aad24e6db
Java: Extend library support for switch expressions.
2020-05-14 15:40:26 +02:00
Mathias Vorreiter Pedersen
1c2b8563ae
C++: Remove 'flow' value from testcases
2020-05-14 15:33:02 +02:00
Geoffrey White
6583012e6d
C++: Use concat in getParameterString().
2020-05-14 14:21:46 +01:00
Geoffrey White
da83f826b9
C++: Solve duplication in getParameterString().
2020-05-14 14:21:06 +01:00
Geoffrey White
ca0d23fd72
C++: Add a test case.
2020-05-14 14:20:02 +01:00
Mathias Vorreiter Pedersen
5f9b96cde9
C++: Fix off-by-one in test annotation
2020-05-14 15:12:00 +02:00
semmle-qlci
23532ae49a
Merge pull request #3467 from erik-krogh/tarSlip
...
Approved by esbena
2020-05-14 14:06:42 +01:00
semmle-qlci
57f44c5a81
Merge pull request #2886 from asger-semmle/js/call-graph-exploration
...
Approved by erik-krogh, esbena
2020-05-14 14:01:23 +01:00
semmle-qlci
384df88df1
Merge pull request #3359 from erik-krogh/MayHavePropName
...
Approved by esbena
2020-05-14 13:52:45 +01:00
Asger Feldthaus
e491431f4e
JS: Autoformat
2020-05-14 13:29:33 +01:00
Bt2018
819a599e2c
Correct the name tag and change the placeholders in the query
2020-05-14 08:13:21 -04:00
Geoffrey White
78f098f37a
C++: Test Function.getParameterString().
2020-05-14 13:05:39 +01:00
Mathias Vorreiter Pedersen
f414b277ba
C++: Modify complex.cpp test to account for longer access paths in the dataflow library
2020-05-14 13:58:04 +02:00
Pavel Avgustinov
3cc13db3a0
NodeJSLib: Restore backwards-compatibility.
2020-05-14 12:51:09 +01:00
Geoffrey White
53a53fb633
C++: Modernize the Functions test.
2020-05-14 12:50:57 +01:00
Bt2018
9a7ab4ee32
Correct comment of the HostVerificationMethodAccess method access
2020-05-14 07:43:17 -04:00
Shati Patel
3af98aaf44
Merge pull request #3469 from shati-patel/delete-spec
...
CodeQL docs migration: Delete `ql-spec` Sphinx project
2020-05-14 11:12:19 +01:00
Asger Feldthaus
1cdb51741f
JS: Dont use deprecated API in test case
2020-05-14 11:08:31 +01:00
Anders Schack-Mulligen
5c9fb2312e
Merge pull request #3090 from luchua-bc/java-insert-sensitive-info-into-log
...
Java: CWE-532 sensitive info logging
2020-05-14 11:43:47 +02:00
Shati Patel
cb2f7c4b15
CodeQL docs migration: Delete ql-spec Sphinx project
2020-05-14 10:32:01 +01:00
Mathias Vorreiter Pedersen
f5f3405ec3
C++: Modify IR field flow tests to use InlineExpectationsTest.qll
2020-05-14 11:11:21 +02:00
Pavel Avgustinov
ab2d059ed4
JavaScript: Model extra sinks in vm module
2020-05-14 10:01:40 +01:00
Erik Krogh Kristensen
b12e21edcc
add test for new zipslip sanitizer
2020-05-14 10:11:37 +02:00
Erik Krogh Kristensen
422ade16db
Apply suggestions from code review
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-05-14 10:05:59 +02:00
Erik Krogh Kristensen
ce5356f592
change note
2020-05-14 09:48:50 +02:00
Erik Krogh Kristensen
4175d36269
add test case
2020-05-14 09:46:54 +02:00
Erik Krogh Kristensen
b727fa81a0
add a path sanitizer to zipslip
2020-05-14 09:46:50 +02:00
Erik Krogh Kristensen
71e7083dcb
add "linkname" as a file-name-property for zip-slip
2020-05-14 09:06:23 +02:00
Erik Krogh Kristensen
a19718a10f
add fs.link and fs.linkSync as writing file system calls
2020-05-14 09:00:50 +02:00
Mathias Vorreiter Pedersen
671242ce5e
C++: Add upgrade script
2020-05-14 08:49:34 +02:00
Mathias Vorreiter Pedersen
dbba2269ad
C++: Add stats
2020-05-14 08:47:16 +02:00
yoff
e5eadf9126
Update python/ql/test/query-tests/Functions/general/protocols.py
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-05-14 07:34:53 +02:00
Rasmus Lerchedahl Petersen
c7ddd2c20c
Python: make test for unicode names pass
2020-05-14 07:31:03 +02:00
Rasmus Lerchedahl Petersen
de50aabd60
Python: test for unicode names
2020-05-14 07:30:29 +02:00
Rasmus Lerchedahl Petersen
4c7cf2ac2d
Python: Make test pass
...
Also checked that the OP's snapshot no longer has alerts from
`duplicate_char_in_class`
2020-05-14 07:06:59 +02:00
Robert Marsh
396ccda81f
Merge pull request #3422 from Cornelius-Riemenschneider/inbounds-ptr
...
C++: Add InBoundsPointerDeref.qll to experimental
2020-05-13 16:55:42 -07:00
Mathias Vorreiter Pedersen
8f3ba75534
C++: Remove abstract keyword from Access and Cast and create .dbscheme unions
2020-05-13 23:15:11 +02:00
Dave Bartolomeo
ea2081ca40
Merge pull request #3459 from dbartol/github/codeql-c-analysis-team/69
...
C++/C#: Remove `UnmodeledUse` instruction
2020-05-13 13:13:40 -04:00
Rasmus Lerchedahl Petersen
f9f52b0105
Python: test for unicode in raw strings
2020-05-13 18:47:36 +02:00
Asger Feldthaus
2ef7719b06
JS: PathExprInModule deprecation notice
2020-05-13 16:35:24 +01:00
Asger Feldthaus
3846f534a8
JS: Factor out overridden part of PathExpr.getSearchRoot
2020-05-13 16:34:43 +01:00
Asger Feldthaus
5f510878f3
JS: Remove PathExprBase and PathExprInModule
2020-05-13 16:34:28 +01:00
Asger Feldthaus
2d88385ffb
JS: Cache moduleImport
2020-05-13 15:07:13 +01:00
Mathias Vorreiter Pedersen
34314d0cb6
C++: Annotation field flow tests with [IR] and [AST]
2020-05-13 15:16:02 +02:00
Calum Grant
f5daeea618
Merge pull request #3421 from hvitved/csharp/dataflow/change-note
...
C#/Java/C++: Add change note for #3110
2020-05-13 13:53:01 +01:00
semmle-qlci
2a341d973d
Merge pull request #3458 from esbena/js/NoSQLCodeInjection
...
Approved by erik-krogh
2020-05-13 13:33:28 +01:00
Bt2018
7b88988981
Convert to path-problem query
2020-05-13 08:09:22 -04:00
Dave Bartolomeo
b0f7e9c6a7
C++: Accept test output
2020-05-13 08:02:17 -04:00
Bt2018
632cb8b666
Simplify CredentialExpr as the AddExpr step is included by TaintTracking::localTaintStep(node1, node2)
2020-05-13 07:55:32 -04:00
Bt2018
d9cc3c6f8d
Add a comment for reasoning in why debug and trace are included and other variations are excluded
2020-05-13 07:46:44 -04:00
Esben Sparre Andreasen
c6fa88af28
JS: change notes
2020-05-13 12:56:33 +02:00
Esben Sparre Andreasen
9552352d6a
JS: address qhelp feedback
2020-05-13 12:53:59 +02:00
Rasmus Lerchedahl Petersen
d9d86e1f56
Make test pass
2020-05-13 12:16:11 +02:00
Jonas Jensen
1018eaff09
Merge remote-tracking branch 'upstream/master' into dataflow-indirect-args
...
Conflicts:
cpp/ql/test/library-tests/dataflow/fields/ir-flow.expected
2020-05-13 12:05:58 +02:00
Esben Sparre Andreasen
7305a873b1
JS: formatting
2020-05-13 11:28:48 +02:00
Esben Sparre Andreasen
fedd32fc2b
JS: address review comment
2020-05-13 09:57:02 +02:00
Esben Sparre Andreasen
91f43a7dae
JS: address review comments
2020-05-13 09:52:01 +02:00
Jonas Jensen
038bea2f52
C++: Add type check to prevent field conflation
2020-05-13 09:25:24 +02:00
Jonas Jensen
250e12a323
C++: Demonstrate new field conflation
2020-05-13 09:24:36 +02:00
Esben Sparre Andreasen
7722d77c86
JS: add the NoSQL $where as a sink for js/code-injection
2020-05-13 08:30:22 +02:00
Esben Sparre Andreasen
20cf04442c
JS: model marsdb and minimongo
2020-05-13 08:28:59 +02:00
Anders Schack-Mulligen
f5e491caf0
Merge pull request #3448 from yo-h/java-qldoc-add
...
Java: improve QLDoc completeness
2020-05-13 08:26:02 +02:00
Dave Bartolomeo
5d3f25211d
C++/C#: Remove UnmodeledUse instruction
2020-05-13 01:06:40 -04:00
Dave Bartolomeo
7f2c6dd9f9
C++/C#: Remove UnmodeledUseOperand
2020-05-13 01:05:27 -04:00
Bt2018
ffd442a17a
Fine tuning criteria
...
1. Change the regex pattern from variable contains "url" to variable starts with "url"
2. Add the logging trace method to sink
2020-05-12 23:24:55 -04:00
Bt2018
491b67e658
Change string concatenation in the source to TaintTracking::Configuration
2020-05-12 22:57:07 -04:00
Bt2018
106c181ab1
Formatting with auto-format
2020-05-12 15:53:29 -04:00
yo-h
a884538238
Update java/ql/src/semmle/code/java/frameworks/javaee/ejb/EJBRestrictions.qll
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-05-12 14:14:26 -04:00
yo-h
facd429d0a
Update java/ql/src/semmle/code/java/frameworks/javaee/ejb/EJBJarXML.qll
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-05-12 14:14:14 -04:00
Bt2018
d75841d6a7
Add sample usage and remove unused imports
2020-05-12 13:42:17 -04:00
jcreedcmu
3c233c762c
Merge pull request #3431 from jcreedcmu/jcreed/jump-to-def-langs
...
Java, Javascript, Csharp: Add jump-to-definition queries
2020-05-12 10:54:11 -04:00
Tom Hvitved
d0c607c83f
Address review comments
2020-05-12 16:13:02 +02:00
semmle-qlci
6fb047aef6
Merge pull request #3451 from erik-krogh/fstreamWrite
...
Approved by esbena
2020-05-12 14:58:02 +01:00
semmle-qlci
ee848328ab
Merge pull request #3442 from erik-krogh/SmallPerfs
...
Approved by esbena
2020-05-12 14:36:34 +01:00
Rasmus Lerchedahl Petersen
6a35c6b4d4
Test: __bool__ does not raise TypeError by default
2020-05-12 15:28:12 +02:00
Rasmus Wriedt Larsen
8150c78ae0
Python: In flask, taint routed prameters for variable rules
...
Fixes https://github.com/github/codeql-python-team/issues/79
2020-05-12 15:02:32 +02:00
Jason Reed
569083d6d1
Csharp: Make Use class public, since definitions query needs it
2020-05-12 08:52:02 -04:00
Erik Krogh Kristensen
83d34b939c
change note
2020-05-12 14:24:04 +02:00
Erik Krogh Kristensen
d46148c045
add test case
2020-05-12 14:23:28 +02:00
Rasmus Wriedt Larsen
7d5e35a7aa
Python: Expand flask tests to use "variable rules"
...
which is what flask calls them. wildcard rules in bottle, django doesn't even
give them a proper term :(
2020-05-12 14:23:24 +02:00
Erik Krogh Kristensen
3707792cfd
recognize reading/wrinting calls to fstream methods
2020-05-12 14:18:07 +02:00
James Fletcher
a6c03a4350
Merge pull request #3449 from jf205/sd-38
...
CodeQL docs: remove information about metric queries
2020-05-12 12:21:09 +01:00
James Fletcher
85ebe04a1c
Update docs/language/learn-ql/writing-queries/query-metadata.rst
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-05-12 12:11:22 +01:00
james
cf03e61e3a
docs remove info about metrics from codeql docs
2020-05-12 11:33:22 +01:00
Jonas Jensen
451ae7b762
Merge pull request #3444 from dbartol/codeql-c-analysis-team/68
...
Rename `sanity` -> `consistency`
2020-05-12 12:33:08 +02:00
Erik Krogh Kristensen
bd768cbd7e
autoformat
2020-05-12 12:28:02 +02:00
Erik Krogh Kristensen
2fbdeceae7
add getContainedNode constraint to charpred of IndirectInclusionTest, and refactor two getEnclosingExpr()
2020-05-12 10:19:06 +02:00
semmle-qlci
8ce9c9d57e
Merge pull request #3441 from erik-krogh/BabelDirectives
...
Approved by esbena
2020-05-12 08:57:20 +01:00
Mathias Vorreiter Pedersen
73882c9f90
Merge pull request #3439 from jbj/passesByReference-qualifier
...
C++: Call qualifiers are passed by reference
2020-05-12 08:31:57 +02:00
Mathias Vorreiter Pedersen
df6abdc074
Merge pull request #3389 from jbj/dataflow-defbyref-to-field
...
C++: Post-update flow through &, *, +, ...
2020-05-12 08:30:33 +02:00
yo-h
1d55dffb98
Java: add missing QLDoc for J2ObjC.qll
2020-05-11 20:01:48 -04:00
yo-h
c55d01318c
Java: add missing QLDoc for JavaServerFaces.qll and JSFAnnotations.qll
2020-05-11 20:01:48 -04:00
yo-h
53ccbeed6d
Java: add missing QLDoc for JavadocCommon.qll
2020-05-11 20:01:47 -04:00
yo-h
e33ebdc803
Java: add missing QLDoc for NamingConventionsCommon.qll
2020-05-11 20:01:47 -04:00
yo-h
0e1ca44dfd
Java: add missing QLDoc for UnusedMavenDependencies.qll
2020-05-11 20:01:46 -04:00
yo-h
1c9c87241f
Java: add missing QLDoc for JdkInternals*.qll
2020-05-11 20:01:46 -04:00
yo-h
20a8438109
Java: add missing QLDoc for default.qll
2020-05-11 20:01:46 -04:00
yo-h
6c8a016ca6
Java: add missing QLDoc for JacksonSerializability.qll
2020-05-11 20:01:45 -04:00
yo-h
45b502a82f
Java: add missing QLDoc for GWT.qll, GwtUiBinder.qll, GwtXml.qll
2020-05-11 20:01:45 -04:00
yo-h
0d8d5773b7
Java: add missing QLDoc for Clover.qll
2020-05-11 20:01:44 -04:00
yo-h
6e64f3dd05
Java: add missing QLDoc for JavaxAnnotations.qll
2020-05-11 20:01:44 -04:00
yo-h
537c657b19
Java: add missing QLDoc for EJBRestrictions.qll
2020-05-11 20:01:44 -04:00
yo-h
4594b51dfc
Java: add missing QLDoc for EJB.qll
2020-05-11 20:01:43 -04:00
yo-h
3a82090087
Java: add missing QLDoc for EJBJarXML.qll
2020-05-11 20:01:42 -04:00
yo-h
8fe093c854
Java: add missing QLDoc for PersistenceXML.qll
2020-05-11 20:01:42 -04:00
yo-h
5b962c1add
Java: add missing QLDoc for Persistence.qll
2020-05-11 20:01:42 -04:00
Robert Marsh
090977447b
Merge pull request #3445 from geoffw0/rangerounding
...
C++: Round result of >> in SimpleRangeAnalysis
2020-05-11 13:07:18 -07:00
Felicity Chapman
0366c5d035
Merge pull request #3446 from hmakholm/rc/1.24
...
Merge rc/1.24 back into master
2020-05-11 20:15:34 +01:00
Jason Reed
66da91fe59
Java, Javascript, Csharp: Restrict definitions predicates
...
Only expose definition-use relation itself, and getEncodedFile.
2020-05-11 15:14:16 -04:00
Dave Bartolomeo
e5bd66809a
C++/C#: Add QLDoc for renamed queries
2020-05-11 14:16:21 -04:00
Geoffrey White
a4fa4c859a
C++: Fix rounding for >>.
2020-05-11 18:55:01 +01:00
Geoffrey White
b1c32deabc
C++: Add some tests with 64-bit values.
2020-05-11 18:54:50 +01:00
Dave Bartolomeo
3987267f26
Rename sanity -> consistency
2020-05-11 13:46:26 -04:00
Dave Bartolomeo
06783938d3
JavaScript: Rename sanity -> consistency
2020-05-11 13:46:12 -04:00
Dave Bartolomeo
b39d4bc4bd
Java: Rename sanity -> consistency
2020-05-11 13:37:01 -04:00
Dave Bartolomeo
09d1da2f7a
C++/C#: Rename sanity -> consistency
...
I did both of these languages together because they share some of the changed code via `identical-files.json`.
2020-05-11 13:29:52 -04:00
James Fletcher
46140c3c1f
Merge pull request #3440 from jf205/sd-68-2
...
CodeQL docs: more updates to "Further reading" sections
2020-05-11 16:33:29 +01:00
Asger F
86a774d912
Merge pull request #3394 from monkey-junkie/master
...
JS SSTI CWE-094
2020-05-11 15:06:17 +01:00
James Fletcher
7f952963e1
Update docs/language/learn-ql/writing-queries/debugging-queries.rst
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-05-11 14:58:46 +01:00
Jonas Jensen
cec73e689e
Merge pull request #3393 from dbartol/codeql-c-analysis-team/40/1
...
C++: A few IR QLDoc comments
2020-05-11 15:56:43 +02:00
Erik Krogh Kristensen
970ddcac7b
autoformat
2020-05-11 15:38:45 +02:00
Jonas Jensen
48d2bd6102
C++: Improve suppression of duplicate sources
...
This fixes a cosmetic bug in `.../CWE-134/.../examples.c` in the
internal repo.
2020-05-11 14:44:53 +02:00
Jonas Jensen
3a89f43cd6
Merge remote-tracking branch 'upstream/master' into dataflow-indirect-args
...
Conflicts:
cpp/ql/src/semmle/code/cpp/ir/dataflow/DefaultTaintTracking.qll
cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/defaulttainttracking.cpp
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/tainted.expected
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/test_diff.expected
cpp/ql/test/library-tests/dataflow/dataflow-tests/test_ir.expected
2020-05-11 14:44:17 +02:00
Jonas Jensen
3369453bb1
Merge pull request #3427 from MathiasVP/remove-abstract-from-builtin-op
...
C++: Remove abstract keyword from `BuiltInOperation`
2020-05-11 14:16:46 +02:00
Erik Krogh Kristensen
8b3e86c4f8
change note
2020-05-11 13:40:59 +02:00
Erik Krogh Kristensen
3ce60733cc
add test case
2020-05-11 13:11:24 +02:00
Erik Krogh Kristensen
acb0f2e54f
exclude "@babel/helpers - .." from js/unknown-directive
2020-05-11 12:42:18 +02:00
james
148c7eb34d
docs: further reading ql training
2020-05-11 11:40:58 +01:00
james
3a00c4838e
docs: further reading QL tutorials
2020-05-11 11:40:58 +01:00
james
5292051c3e
docs: further reading for codeql queries section
2020-05-11 11:40:50 +01:00
Jonas Jensen
4f5b8f7306
Merge pull request #3430 from MathiasVP/comments-about-comments
...
C++: Add QLDoc to CaptionedComments.qll and CommentedOutCode.qll
2020-05-11 12:36:54 +02:00
Tom Hvitved
c837ab7d1a
Apply suggestions from code review
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-05-11 11:42:50 +02:00
Mathias Vorreiter Pedersen
715fa9e446
Simplify comment
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-05-11 11:32:10 +02:00
Mathias Vorreiter Pedersen
104545f3a7
Replace 'Returns' with 'Gets'
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-05-11 11:31:51 +02:00
Calum Grant
91229f8d52
Merge pull request #3398 from hvitved/csharp/missing-x-frame-option
...
C#: More results for `cs/web/missing-x-frame-options`
2020-05-11 10:28:26 +01:00
Mathias Vorreiter Pedersen
411e52a231
C++: Replace @buildin_op with @builtin_op
2020-05-11 11:12:48 +02:00
Jonas Jensen
b3498bd0ad
Merge pull request #3425 from MathiasVP/remove-more-abstract-classes
...
C++: Remove abstract keyword from a couple of AST classes
2020-05-11 10:55:35 +02:00
Jonas Jensen
bebd5ae36b
C++: Call qualifiers are passed by reference
...
After #3382 changed the escape analysis to model qualifiers as escaping,
there was an imbalance in the SSA library, where `addressTakenVariable`
excludes variables from SSA analysis if they have their address taken
but are _not_ passed by reference. This showed up as a missing result in
`TOCTOUFilesystemRace.ql`, demonstrated with a test case in #3432 .
This commit changes the definition of "pass by reference" to include
call qualifiers, which allows SSA modeling of variables that have member
function calls on them.
2020-05-11 09:39:48 +02:00
Jonas Jensen
8ff045b6a2
Merge pull request #3432 from geoffw0/toctou
...
C++: Add a test of TOCTOUFilesystemRace.ql
2020-05-11 09:18:51 +02:00
Tom Hvitved
c2c4142271
Merge pull request #3306 from calumgrant/cs/extraction-nullability
...
C#: Enable nullability in Semmle.Extraction project
2020-05-11 08:40:31 +02:00
Jonas Jensen
71c21e6eca
C++: Accept test changes forgotten in 32e04b403
...
Adding a new test case leads to changes in all `.expected` files in its
directory.
The new results show that the `DefinitionsAndUses` library does not
model `std::addressof` correctly, but that library is not intended to be
used for new code.
2020-05-11 08:17:13 +02:00
Erik Krogh Kristensen
f8de69156e
inline basicFlowStep into flowStep
2020-05-10 22:15:37 +02:00
Erik Krogh Kristensen
87167900d1
deduplicate - and slightly optimize IndirectInclusionTest
2020-05-10 22:15:37 +02:00
Erik Krogh Kristensen
6d05b40d23
eliminate recursion from GuardControlFlowNode::dominates
2020-05-10 22:15:34 +02:00
Cornelius Riemenschneider
3596ff7c51
Address review.
2020-05-10 19:34:16 +02:00
Artem Smotrakov
bab6f3788e
Java: Added a query for unsafe TLS versions
...
- Added experimental/Security/CWE/CWE-327/UnsafeTlsVersion.ql
- Added SslLib.qll
- Added a qhelp file with examples
- Added tests in java/ql/test/experimental/Security/CWE/CWE-327
2020-05-10 19:14:52 +02:00
Mathias Vorreiter Pedersen
b34db333a5
C++: Add upgrade script
2020-05-09 13:41:39 +02:00
Grzegorz Golawski
a16295ebc0
Fix typos
2020-05-08 20:13:50 +02:00
yo-h
c54f8d8128
Merge pull request #3383 from aschackmull/java/printast
...
Java: Library for pretty-printing AST in linear time.
2020-05-08 13:01:39 -04:00
Jason Reed
beccdce108
C#: Refactor definitions query, add queries for ide search
...
This enables jump-to-definition and find-references in the VS Code
extension, for C# source archives.
2020-05-08 07:31:50 -04:00
jcreedcmu
c9788a7928
Merge pull request #3308 from jcreedcmu/jcreed/jump-to-def
...
Add queries for VS Code jump-to-definition
2020-05-08 07:29:02 -04:00
Mathias Vorreiter Pedersen
86f283dff2
C++: Add new stats file from Jenkins job
2020-05-08 09:15:58 +02:00
Grzegorz Golawski
afea9330b7
Fix the case where user-controlled input is passed as URL to env Hashtable
2020-05-08 00:44:22 +02:00
Grzegorz Golawski
df9921f870
Update according to the review comments
2020-05-07 23:19:13 +02:00
Geoffrey White
bff97d9fe5
C++: Effect of #3382 .
2020-05-07 19:06:05 +01:00
Geoffrey White
6499197087
C++: Add a test of TOCTOUFilesystemRace.ql.
2020-05-07 19:03:32 +01:00
Robert Marsh
761e3186f5
Merge pull request #3426 from MathiasVP/test-3110
...
C++: Add testcase for #3110
2020-05-07 10:40:12 -07:00
Jason Reed
01eeebc068
Java: Refactor definitions query, add queries for ide search
...
This enables jump-to-definition and find-references in the VS Code
extension, for Java source archives.
2020-05-07 12:44:36 -04:00
Jason Reed
48e4079c64
JS: Refactor definitions query, add queries for ide search
...
This enables jump-to-definition and find-references in the VS Code
extension, for javascript source archives.
2020-05-07 12:44:36 -04:00
Mathias Vorreiter Pedersen
8df25c3025
C++: Add QLDoc
2020-05-07 18:34:26 +02:00
Jonas Jensen
4b9a3f1482
Merge remote-tracking branch 'upstream/master' into dataflow-defbyref-to-field
2020-05-07 16:48:41 +02:00
Jonas Jensen
88eeca39fb
Merge commit '52d8acc1a198c5ea29c1dddceda1d6c0fb75de14' into dataflow-defbyref-to-field
...
This is a partial merge from master. In particular, it takes in #3382
and #3385 .
2020-05-07 16:46:11 +02:00
Jonas Jensen
5e8bd0a724
C++: Fix variable name in comment
2020-05-07 16:38:15 +02:00
Jonas Jensen
32e04b4033
C++: Support std::addressof
...
I didn't add this support in `AddressConstantExpression.qll` since I
think it would require extra work and testing to get the constexprness
right. My long-term plan for `AddressConstantExpression.qll` is to move
its functionality to the extractor.
2020-05-07 16:30:44 +02:00
Tom Hvitved
948c2f7f7e
C++: Add change note
2020-05-07 16:01:55 +02:00
Tom Hvitved
0b85f3fed4
Address review comments
2020-05-07 15:58:46 +02:00
Taus
2502d1c3ed
Merge pull request #3410 from RasmusWL/python-fix-3397
...
Python: More safe methods for py/modification-of-default-value
2020-05-07 15:28:24 +02:00
Anders Schack-Mulligen
2561ba82db
Merge pull request #3215 from aibaars/validating-object-input
...
Java: teach UnsafeDeserialization about ValidatingObjectInputStream
2020-05-07 14:57:50 +02:00
Cornelius Riemenschneider
1aa7a827af
Add QLDoc.
2020-05-07 14:53:41 +02:00
Mathias Vorreiter Pedersen
594f3b1807
C++: Add testcase for #3110
2020-05-07 14:39:53 +02:00
Dave Bartolomeo
e435484740
C++/C#: Fix formatting
2020-05-07 08:39:01 -04:00
Mathias Vorreiter Pedersen
43ffcfe730
C++: Remove abstract keyword from BuiltInOperation
2020-05-07 13:18:12 +02:00
Taus
964b8478dc
Merge pull request #3405 from jcreedcmu/jcreed/jump-to-def-python
...
Python: Refactor definitions query, add queries for ide search
2020-05-07 12:51:35 +02:00
Mathias Vorreiter Pedersen
dd0ca34038
C++: Remove abstract keyword from a couple of AST classes
2020-05-07 12:01:07 +02:00
Calum Grant
313c9ac6ec
C#: Address review comments.
2020-05-07 10:35:29 +01:00
Rasmus Wriedt Larsen
f099e0fdc6
Merge branch 'master' into python-keyword-only-args
2020-05-07 11:27:11 +02:00
Erik Krogh Kristensen
945fe45b6f
all split()[0] are safe for url-redirect
2020-05-07 10:55:17 +02:00
Erik Krogh Kristensen
a3fb13882b
Merge branch 'master' into SplitFPs
2020-05-07 10:51:11 +02:00
James Fletcher
29eed6866c
Merge pull request #3409 from jf205/sd-68
...
"CodeQL for X" docs: update "Further reading" sections
2020-05-07 09:35:23 +01:00
Dave Bartolomeo
f0e86a9191
C++: Add missing module comment
2020-05-06 17:30:20 -04:00
Dave Bartolomeo
df4fdaf6ff
C++: Fix PR feedback
...
Note that the various predicates to access the singleton instances of the `EdgeKind` classes have been moved into a module named `EdgeKind`.
2020-05-06 17:06:48 -04:00
Geoffrey White
c8524522c8
C++: Add test cases.
2020-05-06 18:51:50 +01:00
monkey-junkie
4594aa470d
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-06 18:18:06 +03:00
Cornelius Riemenschneider
e397e5d325
Add new testcase to arraylengthanalysis library.
2020-05-06 16:36:48 +02:00
Cornelius Riemenschneider
1c9fa4eb1d
This library proves that a subset of pointer dereferences in a program are safe, i.e. in-bounds.
...
It does so by first defining what a pointer dereference is (on the IR
`Instruction` level), and then using the array length analysis and the range
analysis together to prove that some of these pointer dereferences are safe.
2020-05-06 16:36:48 +02:00
Tom Hvitved
f19b1045d6
Java: Add change note
2020-05-06 15:52:49 +02:00
semmle-qlci
b2f1008a00
Merge pull request #3420 from max-schaefer/js/fix-missing-triple-backtick
...
Approved by asgerf
2020-05-06 13:52:18 +01:00
Jason Reed
5934345fe3
Python: Fix formatting.
2020-05-06 08:48:45 -04:00
Esben Sparre Andreasen
7cc3a5a242
JS: qhelp fixups
2020-05-06 14:46:34 +02:00
Tom Hvitved
ddd62a56cc
C#: Add change note for #3110
2020-05-06 14:28:47 +02:00
Anders Schack-Mulligen
f7410739d9
Java: Fix bug in qldoc.
2020-05-06 14:06:49 +02:00
Anders Schack-Mulligen
8c5e89c160
Java: Add PrintAst.
2020-05-06 14:06:40 +02:00
Esben Sparre Andreasen
69191577d6
JS: qhelp for js/unsafe-html-expansion
2020-05-06 14:03:27 +02:00
monkey-junkie
5ce9e0d0a2
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-06 14:32:55 +03:00
Asger F
5725814774
Merge pull request #3403 from asger-semmle/js/getcontainer
...
JS: Move getContainer to single rootdef (+fixes)
2020-05-06 12:06:44 +01:00
Max Schaefer
9335a6cb79
JavaScript: Fix missing triple backtick in qldoc comment.
2020-05-06 11:40:00 +01:00
Arthur Baars
39e652b26b
Java: teach UnsafeDeserialization about ValidatingObjectInputStream
...
The class org.apache.commons.io.serialization.ValidatingObjectInputStream
is an implementation of ObjectInputStream that validates the deserialized
classes against a white list. Therefore, this class should not be considered an
unsafe deserialization sink.
2020-05-06 12:15:30 +02:00
Arthur Baars
797721cd31
Test
2020-05-06 12:15:27 +02:00
monkey-junkie
122354a81a
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-06 12:54:50 +03:00
Esben Sparre Andreasen
344f0c36b0
JS: update expected output
2020-05-06 11:18:14 +02:00
monkey-junkie
3314dd0614
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.ql
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-05-06 11:17:41 +03:00
Rasmus Wriedt Larsen
f1630983d3
Python: Cleanup default-indexing upgrade script
2020-05-06 09:57:07 +02:00
Rasmus Wriedt Larsen
010d5fb769
Python: Fix indexes of keyword-only defaults in upgrade script
...
Works like a charm ;)
2020-05-06 09:57:07 +02:00
Rasmus Wriedt Larsen
a15833d194
Python: DB upgrade script for default-indexing change
...
Follow this excellent guide:
https://github.com/github/codeql-c-extractor-team/blob/master/docs/db-upgrade.md
2020-05-06 09:56:53 +02:00
Tom Hvitved
0466e36985
C#: Teach Implements.qll about nested types
2020-05-06 09:25:40 +02:00
Tom Hvitved
f9ece0aefb
C#: Add implements test for nested types
2020-05-06 09:25:40 +02:00
Tom Hvitved
4c1a9b25c1
C#: Teach unification library about nested types
2020-05-06 09:25:40 +02:00
Tom Hvitved
851fc98b01
C#: Add type unification tests for nested types
2020-05-06 09:25:40 +02:00
Anders Schack-Mulligen
3b3ca6d41e
Merge pull request #3214 from aibaars/base64
...
Java: Add org.apache.commons.codec.(De|En)coder to TaintTrackingUtil
2020-05-06 09:21:18 +02:00
Jonas Jensen
63f04afa8d
Merge pull request #3312 from hvitved/dataflow/impl-no-postupdate
...
Data flow: Support stores into nodes that are not `PostUpdateNode`s
2020-05-06 09:09:31 +02:00
semmle-qlci
9210660ea0
Merge pull request #3401 from erik-krogh/jsonLike
...
Approved by esbena
2020-05-06 08:00:44 +01:00
Asger F
b2da4fe491
Update javascript/ql/src/semmle/javascript/internal/StmtContainers.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-06 07:59:04 +01:00
Asger Feldthaus
926e79d272
JS: Autoformat
2020-05-06 07:59:04 +01:00
Asger Feldthaus
f51e846439
JS: Fix ClosureModule implementation
2020-05-06 07:59:04 +01:00
Asger Feldthaus
0f870a4992
JS: Use TCapturedVariableNode as starting point of callInputStep
2020-05-06 07:59:04 +01:00
Asger Feldthaus
4d6da19173
JS: Improve performance of getExceptionTarget
2020-05-06 07:59:04 +01:00
Asger Feldthaus
639f04386c
JS: Avoid bad join ordering in ClosureModule
2020-05-06 07:59:04 +01:00
Asger Feldthaus
e52e1b26c6
JS: Upgrade script
2020-05-06 07:59:04 +01:00
Asger Feldthaus
5f710bc881
JS: Move definition of getContainer() to a single rootdef
2020-05-06 07:59:04 +01:00
semmle-qlci
86c5b38d62
Merge pull request #3341 from hvitved/csharp/generics-nested-types
...
Approved by calumgrant
2020-05-06 07:16:37 +01:00
Erik Krogh Kristensen
52392f2a6d
autoformat
2020-05-05 22:33:53 +02:00
Robert Marsh
78d2ac1ff4
Merge pull request #3368 from Cornelius-Riemenschneider/local-ala
...
C++: Add experimental Array Length Tracking library
2020-05-05 13:05:52 -07:00
Felicity Chapman
0e0d0499bb
Merge pull request #3413 from felicitymay/update-docs-reviews
...
Update requirements for docs review
2020-05-05 19:05:57 +01:00
Mathias Vorreiter Pedersen
114310700a
Merge pull request #3414 from geoffw0/issue3356
...
C++: Fix error in QLDoc.
2020-05-05 18:07:49 +02:00
Geoffrey White
3e2e69c06a
C++: Autoformat.
2020-05-05 16:55:15 +01:00
Jason Reed
c759e891d0
Python: Exclude additional tag from LGTM suites
2020-05-05 09:43:40 -04:00
jcreedcmu
6cf30ef87a
Update python/ql/src/analysis/DefinitionTracking.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-05-05 09:40:54 -04:00
Anders Schack-Mulligen
11ffcc4378
Merge pull request #2912 from Mithrilwoodrat/master
...
Add check for disabled HTTPOnly setting in Tomcat
2020-05-05 14:39:32 +02:00
Geoffrey White
27490a35ae
C++: Fix error in QLDoc.
2020-05-05 13:37:14 +01:00
monkey-junkie
560674b670
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 15:36:11 +03:00
monkey-junkie
758e85dd3e
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 15:34:57 +03:00
Tom Hvitved
e8e27e0e00
C#: Address review comments
2020-05-05 14:28:13 +02:00
Tom Hvitved
3d37a49ccd
C#: Add change note
2020-05-05 14:28:13 +02:00
Tom Hvitved
19c3e6a58d
C#: Add DB upgrade script
2020-05-05 14:28:13 +02:00
Tom Hvitved
c324c388d0
C#: Refine UnboundGeneric and ConstructedGeneric
2020-05-05 14:28:13 +02:00
Tom Hvitved
8a01023dee
C#: Add more generics tests
2020-05-05 14:28:13 +02:00
Tom Hvitved
4f7743058a
C#: Restructure existing generics tests
2020-05-05 14:28:13 +02:00
Felicity Chapman
c0ebf12ab0
Update requirements for docs review
2020-05-05 13:25:19 +01:00
monkey-junkie
a8019705b5
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 15:24:24 +03:00
monkey-junkie
0aaa8af3bd
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 15:24:10 +03:00
Geoffrey White
2940f4794e
C++: Fix isfromtemplateinstantiation test.
2020-05-05 13:12:44 +01:00
Esben Sparre Andreasen
99e5db407f
JS: address review comments
2020-05-05 14:04:05 +02:00
Erik Krogh Kristensen
a4eee7e88e
more -> additional
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-05-05 14:01:39 +02:00
Tom Hvitved
e95cc24b3f
Data flow: Support stores into nodes that are not PostUpdateNodes
2020-05-05 14:01:04 +02:00
Geoffrey White
0b381b9ba7
C++: Autoformat.
2020-05-05 12:58:54 +01:00
Erik Krogh Kristensen
bffb12725b
add test and change-note to prototype-polution
2020-05-05 13:49:11 +02:00
Erik Krogh Kristensen
38db731e0b
add change note and new test for js/incomplete-url-scheme-check
2020-05-05 13:38:27 +02:00
Erik Krogh Kristensen
f56915d99f
add change note for js/xss
2020-05-05 13:36:50 +02:00
Erik Krogh Kristensen
3568439769
change getAnElementRead to getASubstringRead
2020-05-05 13:33:21 +02:00
Erik Krogh Kristensen
8711a8744c
update expected output
2020-05-05 13:27:32 +02:00
Erik Krogh Kristensen
fe02137d0b
change naming of StringSplitCall methods
2020-05-05 13:27:14 +02:00
Anders Schack-Mulligen
b7458091a9
Merge pull request #3110 from hvitved/dataflow/no-more-summaries
...
Data flow: No more flow summaries
2020-05-05 13:27:07 +02:00
Erik Krogh Kristensen
4a26c293c1
fix number of arguments for String.prototype.split
2020-05-05 13:22:35 +02:00
Erik Krogh Kristensen
f586639703
change getSplitAt to getSeparator
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-05-05 13:22:21 +02:00
Matthew Gretton-Dann
52d8acc1a1
Merge pull request #3404 from nickrolfe/field_attrs
...
C++: add test for attributes on fields
2020-05-05 12:12:28 +01:00
Rasmus Wriedt Larsen
6488714758
Python: Autoformat
2020-05-05 11:38:17 +02:00
Rasmus Wriedt Larsen
07ae40206f
Python: Don't allow getParameter(-1) for BoundMethodValue
...
As per discussion in the PR
2020-05-05 11:37:10 +02:00
Rasmus Wriedt Larsen
5d5d412b78
Python: Add test of safe methods for py/modification-of-default-value
2020-05-05 11:14:37 +02:00
james
28f51d9d9c
fix js reusable
2020-05-05 10:13:55 +01:00
Rasmus Wriedt Larsen
4da5222255
Python: More safe methods for py/modification-of-default-value
...
Fixes https://github.com/github/codeql/issues/3397
2020-05-05 11:09:05 +02:00
Geoffrey White
31a7e2c34e
C++: Make getAnonymousParameterDescription private.
2020-05-05 10:05:18 +01:00
monkey-junkie
056566ecc1
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 12:05:01 +03:00
monkey-junkie
3a4ea82ae2
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 12:02:46 +03:00
james
292f07d1fd
docs: update further reading sections
2020-05-05 09:59:25 +01:00
monkey-junkie
8310c96b97
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 11:59:06 +03:00
james
49280ed893
docs: add further reading reusables
2020-05-05 09:59:02 +01:00
monkey-junkie
25df6e1664
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 11:58:49 +03:00
monkey-junkie
700a070a15
Update javascript/ql/src/experimental/Security/CWE-94/examples/ServerSideTemplateInjection.js
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 11:58:40 +03:00
monkey-junkie
d8fb552097
Update javascript/ql/src/experimental/Security/CWE-94/examples/ServerSideTemplateInjectionSafe.js
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 11:58:28 +03:00
Esben Sparre Andreasen
304b013f88
JS: query and tests for unsafe HTML expansion
2020-05-05 10:32:16 +02:00
Rasmus Wriedt Larsen
affca1a728
Python: Add test-cases using keyword arguments for builtin function
2020-05-05 10:26:25 +02:00
Geoffrey White
a70f534458
Sync identical files.
2020-05-05 09:18:05 +01:00
Rasmus Wriedt Larsen
dfe7c8270b
Python: Clean up trailing whitespace
2020-05-05 09:55:09 +02:00
Rasmus Wriedt Larsen
87d7738b6e
Python: Expand QLDoc for get[Named]ArgumentForCall
2020-05-05 09:54:54 +02:00
Erik Krogh Kristensen
4b8b0cb379
update expected output
2020-05-05 09:13:21 +02:00
Erik Krogh Kristensen
7af19559d4
add test case for location.split("?")[0] for DomBasedXss
2020-05-05 09:13:21 +02:00
Erik Krogh Kristensen
4dcf944ccd
use StringSplitCall in TaintedPath
2020-05-05 09:13:21 +02:00
Erik Krogh Kristensen
22ec12b130
use split("?")[0] sanitizer is both DomBasedXSS and ClientSideUrlRedirect
2020-05-05 09:13:21 +02:00
Erik Krogh Kristensen
89f45372d1
introduce StringSplitCall and use it
2020-05-05 09:13:15 +02:00
Rasmus Wriedt Larsen
061bbb82f5
Python: Restructure getNamedArgumentForCall
...
So it matches the structure of getArgumentForCall -- call.getArgByName first!
2020-05-05 09:00:55 +02:00
Cornelius Riemenschneider
264763080e
Autoformat, address review.
2020-05-05 08:52:52 +02:00
John Doe
337be9c2e0
ssti query and help updated
2020-05-05 03:58:29 +03:00
John Doe
09922e5bb4
Merge branch 'master' of github.com:monkey-junkie/codeql
2020-05-05 03:44:23 +03:00
John Doe
895aa622bf
ssti updated
2020-05-05 03:37:43 +03:00
monkey-junkie
cd18842aa5
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 02:15:58 +03:00
monkey-junkie
a60660617f
Update javascript/ql/src/experimental/Security/CWE-94/ServerSideTemplateInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-05-05 02:15:00 +03:00
Rasmus Wriedt Larsen
838106d49c
Python: Refactor get[Named]ArgumentForCall
...
Also fixed a bug for BoundMethodValue, as highlighted in the expected diff 👍
2020-05-04 20:51:23 +02:00
Rasmus Wriedt Larsen
bc92c26e12
Python: Add BoundMethodValue
2020-05-04 20:51:12 +02:00
Rasmus Wriedt Larsen
96fdb7a5b6
Python: Add tests for getParameter[byName]
...
These already have results for BoundMethodValue, although
1) it's a bit strange that `getParameter(-1)` has results
2) why does `Method(Function C.n, class C)` exists? this would only be relevant
if `n` was a classmethod, but it isn't. It's not a problem that it exsits per
se, but curious.
2020-05-04 20:51:04 +02:00
Rasmus Wriedt Larsen
e9859ad96d
Python: Fix getArgumentForCall when using keyword arguments
...
Yikes :|
2020-05-04 20:50:56 +02:00
Rasmus Wriedt Larsen
acb506db21
Python: Add test for getNamedArgumentForCall
...
and rename the one for getArgumentForCall
2020-05-04 20:50:32 +02:00
Rasmus Wriedt Larsen
9ec32ee1c1
Python: Add test-cases using keyword arguments
2020-05-04 20:50:19 +02:00
Rasmus Wriedt Larsen
fc0b0221f0
Python: Add test-cases for BuiltinFunction and BuiltinMethod
2020-05-04 20:50:14 +02:00
Rasmus Wriedt Larsen
f624754390
Python: Use Value in GetACAll test
...
That was not possible when using the old Object-API, but in Value-API getACall
is defined on all Values.
2020-05-04 20:50:06 +02:00
Rasmus Wriedt Larsen
06b67e0d32
Python: Modernise test/library-tests/PointsTo/calls/*
2020-05-04 20:49:57 +02:00
Rasmus Wriedt Larsen
a5289bd708
Python: Use Object in CallRefersTo test
...
Since other things than FunctionObject can be called ;)
2020-05-04 20:49:47 +02:00
Rasmus Wriedt Larsen
7b8b4af6d2
Python: Add test for call.getFunction().refersTo
...
Showing that
`call.getFunction().refersTo(func)` gives different results from
`call = func.getACall()`
2020-05-04 20:49:19 +02:00
Geoffrey White
511d7c9199
C++: Improve solution for UsingDeclarationEntry.
2020-05-04 18:01:29 +01:00
Geoffrey White
3d431607e7
C++: Combine the usings tests and add detail about classes.
2020-05-04 17:48:42 +01:00
Geoffrey White
9fc37d174e
C++: Update the 'usings' tests.
2020-05-04 17:46:26 +01:00
Erik Krogh Kristensen
eb7e0d6a62
still flag single-expression files that contain a function
2020-05-04 18:37:26 +02:00
Jason Reed
c34fa840a2
Python: Use NiceLocationExpr::hasLocationInfo for ide jump-to-def
2020-05-04 11:36:54 -04:00
Jason Reed
b0f72ebb56
Python: Refactor definitions query, add queries for ide search
...
This enables jump-to-definition and find-references in the VS Code
extension, for python source archives.
2020-05-04 11:27:30 -04:00
Nick Rolfe
ae913fbf56
C++: update expected output to include field attribute
2020-05-04 16:17:59 +01:00
Calum Grant
a01ef83312
Merge pull request #3270 from hvitved/csharp/dataflow/library-field-flow
...
C#: Field-sensitive summaries for library code
2020-05-04 16:11:18 +01:00
Mathias Vorreiter Pedersen
a98135093f
Merge pull request #3400 from jbj/fieldFlow-join-order
...
C++: Fix fieldFlow join order
2020-05-04 17:07:55 +02:00
Nick Rolfe
124ea86d65
C++: add test for attributes on fields
2020-05-04 15:12:49 +01:00
Tom Hvitved
c7763e69e5
C#: Add comments to LibraryCodeNode::get{Predecessor|Successor}()
2020-05-04 13:46:52 +02:00
Bt2018
3b1dad84b3
The query help builder will interpret and automatically add the reference so this isn't needed here. And one typo is corrected.
2020-05-04 07:39:45 -04:00
Bt2018
5c803b70c5
The query help builder will interpret and automatically add this reference so this isn't needed here.
2020-05-04 07:05:15 -04:00
Bt2018
a6c9c5117f
Update java/ql/src/experimental/CWE-532/SensitiveInfoLog.ql
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-05-04 06:58:34 -04:00
Bt2018
a2560656d5
Update java/ql/src/experimental/CWE-532/SensitiveInfoLog.qhelp
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-05-04 06:57:42 -04:00
Jonas Jensen
50b0d426ee
C++: Fix fieldFlow join order
...
The `fieldFlow` predicate contained a fragile join that has become
ordered wrong recently, either as result of an unrelated change in the
data-flow library or as part of the stats change for the last dbscheme
change.
The minimal fix is to use `getEnclosingCallable` instead of
`getFunction` since the former uses `unique` to ensure good join
ordering in its callers. A longer-term fix should be applied to the AST
base libraries, but this will be invasive and require independent
testing.
Tuple counts on Wireshark before (cancelled after a few minutes):
(747s) Starting to evaluate predicate DataFlowUtil::localFlowStep#ff/2@bdba82
(848s) Tuple counts for DataFlowUtil::localFlowStep#ff:
1766640980 ~1% {2} r1 = JOIN DataFlowUtil::Node::getFunction_dispred#ff_10#join_rhs AS L WITH DataFlowUtil::Node::getFunction_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT L.<1>, R.<1>
1327 ~0% {2} r2 = JOIN r1 WITH project#DataFlowImplLocal::Configuration::hasFlow#fbb AS R ON FIRST 2 OUTPUT r1.<0>, r1.<1>
9691232 ~0% {2} r3 = DataFlowUtil::simpleLocalFlowStep#ff@staged_ext \/ r2
return r3
After:
(0s) Starting to evaluate predicate DataFlowUtil::localFlowStep#ff/2@a852a0
(0s) Tuple counts for DataFlowUtil::localFlowStep#ff:
49017 ~4% {3} r1 = JOIN project#DataFlowImplLocal::Configuration::hasFlow#fff AS L WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT L.<1>, R.<1>, R.<0>
42359 ~0% {2} r2 = JOIN r1 WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff AS R ON FIRST 2 OUTPUT r1.<2>, r1.<0>
9732264 ~0% {2} r3 = DataFlowUtil::simpleLocalFlowStep#ff@staged_ext \/ r2
return r3
2020-05-04 12:14:07 +02:00
Rasmus Wriedt Larsen
16e9d76e22
Merge branch 'master' into python-keyword-only-args
2020-05-04 11:49:00 +02:00
Mithrilwoodrat
a7960c3385
Update java/ql/src/experimental/Security/CWE/CWE-1004/InsecureTomcatConfig.qhelp
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-05-04 17:48:41 +08:00
Jonas Jensen
2b0ad2df6f
Merge pull request #3185 from github/geoffw0-patch-1
...
Add details about query tagging to supported-queries.md
2020-05-04 11:41:35 +02:00
semmle-qlci
a805a63443
Merge pull request #3357 from erik-krogh/YetAnotherPerformancePatch
...
Approved by asgerf, esbena
2020-05-04 10:05:34 +01:00
semmle-qlci
a0800cecc4
Merge pull request #3386 from erik-krogh/lessJQueryChaining
...
Approved by asgerf
2020-05-04 09:16:17 +01:00
Erik Krogh Kristensen
9a7f8d97d2
change note
2020-05-04 09:49:20 +02:00
Erik Krogh Kristensen
659d40e08d
add test to make sure sanitizer is not too broad
2020-05-04 09:49:14 +02:00
Erik Krogh Kristensen
c56063f857
recognize more split("?") sanitizers
2020-05-04 09:48:50 +02:00
Erik Krogh Kristensen
291134be66
add failing test
2020-05-04 09:48:29 +02:00
Tom Hvitved
a4d933d1d6
C#: More results for cs/web/missing-x-frame-options
...
Report an alert in _any_ `Web.config` file, as long as it does not have an
`X-Frame-Options` entry (as opposed to only reporting alerts when _all_
`Web.config` files lack the entry).
2020-05-04 09:17:08 +02:00
Erik Krogh Kristensen
ffdbe31a30
change-note
2020-05-04 09:08:46 +02:00
Erik Krogh Kristensen
cee986fa76
skip expressions that are alone in a file for js/useless-expression
2020-05-04 09:08:41 +02:00
Tom Hvitved
32b419229d
C#: Address review comments
2020-05-04 09:01:49 +02:00
mithrilwoodrat
1053aa4c44
add query to found Tomcat config disables 'HttpOnly' flag
2020-05-04 12:26:03 +08:00
Grzegorz Golawski
f893954ea3
Add Spring LDAP and JMXServiceURL related sinks
2020-05-03 20:51:50 +02:00
Dave Bartolomeo
8e9e3c8919
Merge pull request #3395 from jbj/IRBlock-unique
...
C++: Use `unique` aggregate in IRBlock computation
2020-05-03 07:54:51 -04:00
Jonas Jensen
0a59045dc3
C++: Use unique aggregate in IRBlock computation
...
This gives a slight speedup, and I think it makes the code shorter and
clearer.
On Wireshark, the time from the beginning of the `IRBlock` stage until
just before evaluation of `getInstruction` drops from 44s to 34s.
2020-05-03 10:07:09 +02:00
John Doe
68b57502f9
JS SSTI CWE-094
2020-05-03 02:42:45 +03:00
Dave Bartolomeo
d8f32e3db5
Merge pull request #3392 from rdmarsh2/rdmarsh/cpp/qldoc-get-ConvertedResultExpression
...
C++/C#: improve qldoc on IR get*ResultExpression
2020-05-02 15:59:08 -04:00
semmle-qlci
c66ec3c981
Merge pull request #3380 from asger-semmle/js/cache-amd
...
Approved by erik-krogh
2020-05-02 20:18:22 +01:00
Cornelius Riemenschneider
bab893d2d1
Address review.
2020-05-02 15:27:56 +02:00
Dave Bartolomeo
a166a4d143
C++: A few IR QLDoc comments
2020-05-01 18:17:20 -04:00
Robert Marsh
83e222e5bd
C++/C#: sync files
2020-05-01 14:17:43 -07:00
Robert Marsh
537db53a8d
C++/C#: improve qldoc on IR get*ResultExpression
2020-05-01 14:12:44 -07:00
Nick Rolfe
4ce896b856
Merge pull request #3378 from matt-gretton-dann/codeql-c-extractor/49-consteval
...
Add support for C++20's consteval specifier
2020-05-01 17:56:56 +01:00
Erik Krogh Kristensen
efbd74a4a4
remove more spurious jQuery objects by using externs
2020-05-01 18:54:32 +02:00
Geoffrey White
c8292e4b8e
Merge pull request #3148 from jbj/minmax-to-unique
...
C++: Replace "min = max" with "unique"
2020-05-01 17:43:32 +01:00
Erik Krogh Kristensen
2a1095abcc
autoformat, and apply naming suggestion
2020-05-01 18:35:34 +02:00
Jonas Jensen
4ec0ae6698
Merge pull request #3388 from geoffw0/cleanupstuff
...
C++: Small tidy up
2020-05-01 17:29:12 +02:00
Jonas Jensen
62c7387a76
Merge pull request #3373 from sj/patch-4
...
Update CODEOWNERS to use GitHub team identifiers after repo move
2020-05-01 17:11:12 +02:00
Mathias Vorreiter Pedersen
2e3463740d
Merge pull request #3382 from jbj/escape-qualifier
...
C++: Addresses may escape through call qualifiers
2020-05-01 16:23:46 +02:00
Mathias Vorreiter Pedersen
37f30d3bd2
Merge pull request #3385 from jbj/dataflow-remove-from-post
...
C++: Remove an unneeded local-flow case
2020-05-01 16:19:04 +02:00
Jonas Jensen
1b1095ee75
C++: Post-update flow through &, *, +, ...
...
Flow from a definition by reference of a field into its object was
working inconsistently and in a very syntax-dependent way. For a
function `f` receiving a reference, `f(a->x)` could propagate data back
to `a` via the _reverse read_ mechanism in the shared data-flow library,
but for a function `g` receiving a pointer, `g(&a->x)` would not work.
And `f((*a).x)` would not work either.
In all cases, the issue was that the shared data-flow library propagates
data backwards between `PostUpdateNode`s only, but there is no
`PostUpdateNode` for `a->x` in `g(&a->x)`. This pull request inserts
such post-update nodes where appropriate and links them to their
neighbors. In this exapmle, flow back from the output parameter of `g`
passes first to the `PostUpdateNode` of `&`, then to the (new)
`PostUpdateNode` of `a->x`, and finally, as a _reverse read_ with the
appropriate field projection, to `a`.
2020-05-01 15:40:19 +02:00
Geoffrey White
9b4884dfaf
C++: Backticks.
2020-05-01 14:26:34 +01:00
Geoffrey White
200d7ed360
C++: Remove if-else.
2020-05-01 14:26:34 +01:00
Geoffrey White
4907677351
C++: Try to improve QLDoc on deconstructSizeExpr.
2020-05-01 14:26:33 +01:00
Jonas Jensen
9b9f5248af
C++: Accept test changes
...
Lambda invocations are apparently const. This was exposed by the fix in
the previous commit.
2020-05-01 15:23:00 +02:00
Erik Krogh Kristensen
87365357ba
remove spurious jQuery objects
2020-05-01 15:19:54 +02:00
Tom Hvitved
7327df0881
Merge pull request #3384 from hvitved/csharp/docs/dotnet-core-3.1
...
C#: Update `version-compilers.rst` to mention .NET Core 3.1
2020-05-01 15:17:33 +02:00
Geoffrey White
46332d4849
C++: Eliminate recursion from toString().
2020-05-01 14:12:52 +01:00
Jonas Jensen
36bdcfa42d
C++: Remove an unneeded local-flow case
...
This case was added in dccc0f4db . The surrounding code has changed a lot
since then, and the case no longer seems to have an effect except to
create some dead ends and possibly cycles in the local flow graph.
2020-05-01 15:08:15 +02:00
Tom Hvitved
fd32e1110a
C#: Remove footnote from versions-compilers.rst
2020-05-01 13:57:28 +02:00
Tom Hvitved
8a41a5fc47
C#: Update version-compilers.rst to mention .NET Core 3.1
2020-05-01 13:48:24 +02:00
Jonas Jensen
5f74c24d4d
C++: Test definitions through &, *, ...
2020-05-01 11:04:49 +02:00
Jonas Jensen
4ddf12119d
C++: Don't suppress consistency checks for calls
...
See https://github.com/github/codeql/pull/3162#discussion_r400849713 .
2020-05-01 11:04:42 +02:00
Taus
33f4503ac3
Merge pull request #3213 from RasmusWL/python-iter-str-seq-with-tests
...
Python: supress non-useful results (w/ tests) for iter str/seq query
2020-05-01 11:04:05 +02:00
Taus
40def2af05
Merge pull request #3311 from RasmusWL/python-parse_qs
...
Python: Propagate taint through parse_qs
2020-05-01 10:40:31 +02:00
Erik Krogh Kristensen
16823143dd
refactor getAPropertyUsedInLoadStore
2020-05-01 09:58:11 +02:00
Erik Krogh Kristensen
1a42c9fd80
make predicates private
...
Co-authored-by: Asger F <asgerf@github.com >
2020-05-01 09:42:09 +02:00
Jonas Jensen
9fc27e9130
C++: Fix "is constant" check
...
The check was supposed to check for constant type, not constant value.
This fixes a false negative that appeared in
`LargeParameter/test.cpp:106`.
2020-05-01 09:04:31 +02:00
Rasmus Wriedt Larsen
e569d7ae41
Merge branch 'master' into python-parse_qs
2020-04-30 17:05:17 +02:00
Cornelius Riemenschneider
c856552b64
Add preOffset to the bindingset for simpleArrayLengthStep.
2020-04-30 15:00:12 +02:00
semmle-qlci
606a1145eb
Merge pull request #3331 from RasmusWL/python-improve-file-taint
...
Approved by tausbn
2020-04-30 13:58:03 +01:00
Jonas Jensen
8ffa124bf9
C++: Addresses may escape through call qualifiers
...
Also clarify the docs on `Call` to decrease the likelyhood of such an
omission happening again.
The updated test reflects that `f1.operator()` lets the address of `f1`
escape from the caller.
2020-04-30 14:27:40 +02:00
Rasmus Wriedt Larsen
e0b4518a3e
Merge branch 'master' into python-improve-file-taint
2020-04-30 11:24:29 +02:00
semmle-qlci
59a04282c1
Merge pull request #3381 from RasmusWL/docs-minor-python-fix
...
Approved by shati-patel
2020-04-30 10:11:28 +01:00
Rasmus Wriedt Larsen
862c4b0845
Docs: Fix result of cmp.getComparator(0) in Python tutorial
...
Fixes https://github.com/github/codeql/issues/3360
2020-04-30 10:59:59 +02:00
Tom Hvitved
b03e87f623
Merge pull request #3379 from calumgrant/cs/nullability-warning
...
C#: Remove nullability warnings
2020-04-30 08:38:28 +02:00
Cornelius Riemenschneider
b838426421
Move ArrayLengthAnalysis library to the correct location.
2020-04-29 21:07:44 +02:00
Jason Reed
62c128f9a4
C++: Add QLDoc.
2020-04-29 11:06:06 -04:00
semmle-qlci
2b055de4d6
Merge pull request #3154 from erik-krogh/ImplicitConv
...
Approved by asgerf
2020-04-29 16:05:19 +01:00
Calum Grant
25d5c81896
C#: Enable nullability for Semmle.Extraction project. Some refactoring required.
2020-04-29 15:59:46 +01:00
Calum Grant
6b8a5606d6
C#: Enable nullability for Autobuild tests project.
2020-04-29 15:27:35 +01:00
Calum Grant
86d032e2ea
C#: Remove nullability warning by lifting local function. Warning seems to be caused by a compiler bug.
2020-04-29 15:21:43 +01:00
Jason Reed
e73833eda6
C++: Factor out file encoding predicate
2020-04-29 10:15:26 -04:00
Jason Reed
0500715bc1
C++: Fix docstring in localReferences.ql
2020-04-29 10:15:26 -04:00
Jason Reed
f0a7ff0d9d
Exclude ide queries from lgtm suite.
2020-04-29 10:15:26 -04:00
Jason Reed
b341f768de
C++: Fix formatting
2020-04-29 10:15:26 -04:00
Jason Reed
3b7fecab93
C++: Fix duplicate query ids
2020-04-29 10:15:26 -04:00
Jason Reed
5390f4b255
C++: Scope tags meant for ide contextual queries
2020-04-29 10:15:26 -04:00
Jason Reed
aa7a0e6879
CPP: Add tags for VS Code jump-to-defition
2020-04-29 10:15:26 -04:00
alexet
6a41028d3a
CPP:Add preliminary local jump to def queries
2020-04-29 10:15:26 -04:00
Matthew Gretton-Dann
7d605095a5
C++: Update expected test results
2020-04-29 14:31:35 +01:00
Matthew Gretton-Dann
5b29a49c73
C++: Add library support for consteval
2020-04-29 14:31:35 +01:00
Cornelius Riemenschneider
f83c3452a1
Switch allocation size expression analysis to unconverted result expression.
2020-04-29 15:13:00 +02:00
Anders Schack-Mulligen
29a5ea121a
Merge pull request #2901 from ggolawski/java-spring-boot-actuators
...
CodeQL query to detect open Spring Boot actuator endpoints
2020-04-29 15:10:54 +02:00
Cornelius Riemenschneider
64cf0906b5
Address review.
...
Most important fix is that VNLength is now restricted to the subset
of value numbers that are Bounds in the RangeAnalysis.
2020-04-29 15:10:30 +02:00
Erik Krogh Kristensen
2ef13ef6e8
cousing -> sibling
2020-04-29 14:30:03 +02:00
Nick Rolfe
55301b4b2f
Merge pull request #3074 from matt-gretton-dann/codeql-c-extractor/50-char8_t
...
Add support for C++20's char8_t type.
2020-04-29 12:15:25 +01:00
Cornelius Riemenschneider
9d2533c8ab
Fix bug in handling of subtractions.
2020-04-29 13:07:15 +02:00
Mathias Vorreiter Pedersen
8a1d96b313
Merge pull request #3374 from jbj/PartialDefinition-refactor
...
C++: Refactor `PartialDefinition` charpred
2020-04-29 13:03:40 +02:00
Cornelius Riemenschneider
e6d193294a
Experimental library that tracks the length of memory.
...
For each pointer, we start tracking (starting from the allocation or an array declaration)
1) how long is the chunk of memory allocated
2) where the current pointer is in this chunk of memory.
This information might not always exist, but when it does, it is reliable.
Currently only works intraprocedurally.
2020-04-29 12:55:54 +02:00
Cornelius Riemenschneider
55cd0fac5c
Move useful helper predicate and types from RangeAnalysis to RangeUtils.
2020-04-29 12:55:54 +02:00
Jonas Jensen
de3fa8e68b
Merge pull request #3337 from Cornelius-Riemenschneider/alloc-type
...
C++: Allocation.qll: Provide getAllocatedElementType predicate for AllocationExprs.
2020-04-29 11:55:02 +02:00
Anders Schack-Mulligen
b6a7ab8bf4
Merge pull request #3372 from aibaars/spring-multipart
...
Java: add `org.springframework.web.multipart.MultipartFile::getX` as RemoteFlowSource
2020-04-29 11:35:04 +02:00
Matthew Gretton-Dann
a6947e0296
C++: Complete support for char8_t
2020-04-29 10:18:13 +01:00
Matthew Gretton-Dann
c0d0f7862b
C++: Add DB Upgrade script
2020-04-29 10:18:13 +01:00
Matthew Gretton-Dann
52670dd956
C++: Update expected test output.
2020-04-29 10:18:13 +01:00
Matthew Gretton-Dann
2d898af2fe
C++: Add library support for char8_t type.
2020-04-29 10:18:13 +01:00
Matthew Gretton-Dann
79b3a995e9
C++: Add DB support for C++20's char8_t
2020-04-29 10:18:13 +01:00
Shati Patel
0b8ea78381
Merge pull request #3375 from shati-patel/docs-links
...
Docs: Update links
2020-04-29 09:15:49 +01:00
semmle-qlci
62b7cbfdb4
Merge pull request #3377 from shati-patel/mergeback
...
Approved by jf205
2020-04-29 09:15:04 +01:00
Erik Krogh Kristensen
8af08756b9
split store-steps into backwards and forwards, and prune even more.
2020-04-29 09:16:22 +02:00
Erik Krogh Kristensen
7aa421fd8a
prune clearly infeasible store steps
2020-04-29 09:15:32 +02:00
Erik Krogh Kristensen
8cf71e59ce
prune infeasible load steps
2020-04-29 09:13:49 +02:00
Erik Krogh Kristensen
435b5cf42d
refactor how exploratoryFlowStep is used
2020-04-29 09:11:26 +02:00
Shati Patel
5c80cd5032
Merge branch 'rc/1.24' into mergeback
2020-04-29 08:05:53 +01:00
Felicity Chapman
93be343f9f
Update URL to new location
2020-04-28 19:54:44 +01:00
semmle-qlci
c104898694
Merge pull request #3376 from felicitymay/1.24/SD-57-update-url
...
Approved by shati-patel
2020-04-28 19:49:50 +01:00
Felicity Chapman
7af7e8b3b4
Update URL to new location
2020-04-28 18:18:54 +01:00
Shati Patel
a35e3edc67
Docs: Update links
2020-04-28 18:13:59 +01:00
Jonas Jensen
796041af72
C++: Refactor PartialDefinition charpred
...
This class used `newtype` for seemingly no reason. The new code is
shorter and should be faster as well.
2020-04-28 17:10:25 +02:00
Bas van Schaik
5940fa5799
Update CODEOWNERS with GitHub team identifiers after move
2020-04-28 16:02:05 +01:00
Arthur Baars
d7774788b3
Java: add Spring MultipartFile as RemoteFlowSource
2020-04-28 16:57:03 +02:00
Arthur Baars
ae2bab7e9c
Add test case
2020-04-28 16:57:03 +02:00
Shati Patel
606360c5ed
Merge pull request #3370 from shati-patel/sd-88
...
Docs: Delete "Technical information" articles
2020-04-28 14:58:28 +01:00
Shati Patel
0260202ded
Merge pull request #3371 from shati-patel/typo
...
Docs: Update link text
2020-04-28 14:18:55 +01:00
Felicity Chapman
b80d22ca92
Merge pull request #3369 from felicitymay/1.24/SD-16-go-cookbook-link
...
Add link to new Go cookbook space
2020-04-28 14:15:43 +01:00
Shati Patel
e18357525f
Fix link
2020-04-28 14:11:36 +01:00
Shati Patel
4d31291c01
Fix typo
...
Update link text
2020-04-28 14:04:23 +01:00
Shati Patel
9705e00676
Docs: Delete "Technical information" articles
2020-04-28 13:50:13 +01:00
Felicity Chapman
118c1c97b9
Add link to new Go cookbook space
2020-04-28 13:27:24 +01:00
Shati Patel
90cce2a2f4
Merge pull request #3367 from shati-patel/docs-links
...
Docs: update outdated links
2020-04-28 12:05:33 +01:00
Shati Patel
7a4b6a62d7
Update outdated links
2020-04-28 11:52:49 +01:00
Anders Schack-Mulligen
bc7163aa68
Merge pull request #3216 from aibaars/message-digest
...
Java: teach Encryption.qll about MessageDigest.getInstance
2020-04-28 11:41:53 +02:00
Arthur Baars
31e284a707
Add test case
2020-04-28 11:26:43 +02:00
Arthur Baars
9742d3892d
Java: Add org.apache.commons.codec.(De|En)coder to TainTrackingUtil
...
The commons codec library contains many encoder and decoder methods
and is fairly commonly used.
2020-04-28 11:26:43 +02:00
Tom Hvitved
7cbf37c6ba
C#: Convert string.format() queries to path queries
2020-04-28 09:59:19 +02:00
Asger Feldthaus
9b014c36df
JS: Avoid lots of unhelpful magic
2020-04-28 08:56:27 +01:00
Asger Feldthaus
a8283593a9
JS: Make PropWrite not depend on SourceNode
2020-04-28 08:56:27 +01:00
Asger Feldthaus
e3440c1410
JS: Cache AMD modules
2020-04-28 08:56:27 +01:00
Asger Feldthaus
aa2a49d189
JS: Rewrite mayHaveStringValue to avoid misoptimization
2020-04-28 08:56:27 +01:00
Grzegorz Golawski
31a2972eca
Remove qlpack.yml as these are not needed
2020-04-27 23:32:48 +02:00
Grzegorz Golawski
0c75330e42
Remove qlpack.yml as these are not needed
2020-04-27 23:31:10 +02:00
Grzegorz Golawski
639aa826ea
Remove qlpack.yml as these are not needed
2020-04-27 23:26:59 +02:00
yo-h
97f4cb64ef
Merge pull request #3349 from aschackmull/java/qldoc1
...
Java: Improve qldoc coverage.
2020-04-27 12:49:23 -04:00
Jonas Jensen
36221fe69a
Merge pull request #3334 from MathiasVP/get-an-assigned-value-join-order
...
C++: Fix join order in getAnAssignedValue
2020-04-27 17:50:12 +02:00
Rasmus Wriedt Larsen
c5e14f5c0d
Python: Handle defaults and annotations for keyword-only arguments
...
This commit is based on a change to the extractor
2020-04-27 17:24:10 +02:00
Rasmus Wriedt Larsen
1fcbb6e9f4
Python: Better test for Argument.getDefault(i)
...
Default values for positional arugments follow a rule, so if an argument has a
default value, later positional arguments must also have default values.
The database only stores the actual default values, and nothing about the
arguments that doesn't have default values.
This turns out to be a major problem for Argument.getKwDefault(i), since default
values for keyword-only arguments doesn't have the same rule. So if you know
there is one default value, you can't tell if it is associated with `foo` or
`bar`, as in the examples below:
```
def a(*, foo=None, bar):
pass
def b(*, foo, bar=None):
pass
```
2020-04-27 17:22:56 +02:00
Rasmus Wriedt Larsen
5f6058363f
Python: Improve QLdoc for Parameter.getPosition
2020-04-27 17:22:56 +02:00
Rasmus Wriedt Larsen
8c1cfe52f6
Python: Use getAKeywordOnlyArg instead of getAKwonlyarg
...
The result is the same, but `getAKeywordOnlyArg` is the method used everywhere
else in the code.
2020-04-27 17:22:56 +02:00
Rasmus Wriedt Larsen
c508e89a00
Python: Handle keyword-only arguments properly
2020-04-27 17:22:56 +02:00
Rasmus Wriedt Larsen
4185edc087
Python: Expand parameters/functions test
...
I want to ensure we handle when only _some_ parameters have default/annotations
2020-04-27 17:22:56 +02:00
Rasmus Wriedt Larsen
0cc8d49112
Python: Add tests for full Python 3 parameters syntax
...
Currently keyword-only parameters are not handled properly :(
2020-04-27 17:22:56 +02:00
Rasmus Wriedt Larsen
96b36a7f0f
Python: Clean up some QLdocs
2020-04-27 17:22:56 +02:00
Rasmus Wriedt Larsen
ce2d7fe04c
Python: Improve QLDoc for Arguments
2020-04-27 17:22:56 +02:00
Rasmus Wriedt Larsen
64c013ef4d
Merge branch 'master' into python-iter-str-seq-with-tests
2020-04-27 17:20:06 +02:00
Rasmus Wriedt Larsen
4e80abbfa9
Python: Fixup wording in comment
...
where you place a not is not without significance :D
2020-04-27 17:03:01 +02:00
jcreedcmu
12f264ca63
Merge pull request #3354 from dbartol/dbartol/Recommendation
...
Recommend the CodeQL for VSCode extension
2020-04-27 10:26:02 -04:00
Esben Sparre Andreasen
04b5a794f1
Merge pull request #3313 from esbena/js/typical-bad-sanitizer
...
New query: Incomplete HTML attribute sanitization
2020-04-27 14:31:13 +02:00
Mathias Vorreiter Pedersen
b1a94d8809
Merge branch 'master' into get-an-assigned-value-join-order
2020-04-27 14:11:30 +02:00
Tom Hvitved
d28c4fb0f5
Merge pull request #3202 from jbj/pathStep-join-unique
...
Java/C++/C#: Use `unique` to improve join order fix
2020-04-27 13:06:27 +02:00
Cornelius Riemenschneider
3f7d68178c
Use stripTopLevelSpecifiers() to get the allocated element type for malloc().
2020-04-27 12:46:14 +02:00
Cornelius Riemenschneider
92e8604fa1
Provide getAllocatedElementType predicate for AllocationExprs.
...
This predicate tries to determine the type of the allocated elements of an allocation expression.
2020-04-27 12:41:19 +02:00
Cornelius Riemenschneider
203315ae33
Assign malloc results in test to variables.
2020-04-27 12:40:35 +02:00
Esben Sparre Andreasen
c0250894de
Apply suggestions from code review
...
Co-Authored-By: mc <42146119+mchammer01@users.noreply.github.com >
2020-04-27 12:37:39 +02:00
Geoffrey White
230e5a3a9a
Merge pull request #3326 from Cornelius-Riemenschneider/alloc-size-mul
...
C++: Allocation.qll: Analyze common pattern of malloc() invocations to provide more accurate getSizeMult()
2020-04-27 11:18:54 +01:00
Erik Krogh Kristensen
1ad64bc619
introduce PropRef#mayHavePropertyName
2020-04-27 11:47:51 +02:00
Jonas Jensen
20c956e0a9
Merge pull request #3320 from Semmle/rdmarsh/cpp/taint-tracking-util-port
...
C++: move logic from DefaultTaintTracking into TaintTrackingUtil
2020-04-27 11:34:03 +02:00
Taus
de08433bd3
Merge pull request #3212 from RasmusWL/python-fix-tests-filter
...
Python: Fix (some) shortcomings of tests filter
2020-04-27 11:26:35 +02:00
James Fletcher
73c29ec189
Merge pull request #3346 from jf205/sd-48
...
Learn CodeQL docs: add note about path queries to data flow tutorials
2020-04-27 09:12:51 +01:00
Cornelius Riemenschneider
a50d5b7c6a
Accept changed test output.
2020-04-27 09:17:16 +02:00
Esben Sparre Andreasen
0a8e371b0e
Update javascript/ql/src/Security/CWE-116/IncompleteHtmlAttributeSanitization.qhelp
...
Co-Authored-By: Asger F <asgerf@github.com >
2020-04-27 09:09:26 +02:00
semmle-qlci
cbe417f5eb
Merge pull request #3336 from erik-krogh/MoarJQuery
...
Approved by esbena
2020-04-25 15:17:55 +01:00
Arthur Baars
59869ace63
Java: teach Encryption.qll about MessageDigest.getInstance
...
We already modelled usage of the protected `MessageDigest(String algo)`
constructor as a crypto algorithm specification. For some reason we did
not model the more commonly used public `MessageDigest.getInstance` method.
2020-04-25 00:41:10 +02:00
Robert Marsh
4eea62cbde
Merge pull request #3345 from Cornelius-Riemenschneider/openssl-allocators
...
C++: Allocation.qll: Add support for openssl allocation/deallocation functions.
2020-04-24 14:48:05 -07:00
Dave Bartolomeo
5e09d6d02d
Tell GitHub to allow JSON files with comments
2020-04-24 14:04:05 -04:00
Dave Bartolomeo
5180b44e1e
Recommend the CodeQL for VSCode extension
...
I've added a `.vscode/extensions.json` file that will automatically recommend the CodeQL for Visual Studio Code extension to anyone who opens the repo in VS Code (without the extension already installed).
2020-04-24 13:46:35 -04:00
Mathias Vorreiter Pedersen
38ebb81036
Merge pull request #3352 from jbj/SuspiciousAddWithSizeof-select
...
C++: Speed up SuspiciousAddWithSizeof select
2020-04-24 18:27:25 +02:00
Jonas Jensen
5917ce60b7
Merge pull request #3342 from dbartol/dbartol/SyncTask
...
Add a VS Code task to run `sync-files.py`
2020-04-24 16:42:44 +02:00
Dave Bartolomeo
c539e84071
Update README.md with VSCode info
2020-04-24 10:36:16 -04:00
Taus
bcb980b3d5
Merge pull request #3302 from RasmusWL/python-str-taint-add-methods
...
Python: Add taint for string methods
2020-04-24 16:29:11 +02:00
Rasmus Wriedt Larsen
b2b0296120
Merge pull request #3242 from BekaValentine/python-objectapi-to-valueapi-incorrectlyoverridenmethod
...
Python: ObjectAPI to ValueAPI: IncorrectlyOverriddenMethod
2020-04-24 16:28:11 +02:00
semmle-qlci
4c7a5007d8
Merge pull request #3314 from RasmusWL/python-model-stdlib-http.server
...
Approved by tausbn
2020-04-24 15:27:21 +01:00
Dave Bartolomeo
97565fd90f
Add Sync Identical Files tasks to build group
2020-04-24 10:24:17 -04:00
Jonas Jensen
718f4cd3f9
C++: Speed up SuspiciousAddWithSizeof select
...
This `select` clause had become very slow after we started caching
`ElementBase::toString` because the query used string concatenation to
produce alert messages, and those string concatenations were done very
early in the pipeline, producing lots of strings that would be discarded
moments later.
By using `$@` to interpolate elements into strings, the concatenation is
done outside of QL.
Testing on a Chromium snapshot, this commit takes us from
#select#ff ................ 6m2s
to
#select#cpe#134#fff ....... 15.2s
2020-04-24 16:18:18 +02:00
Dave Bartolomeo
8ed8d3ccc5
Merge pull request #3343 from sauyon/sync-files
...
sync-files.py: cast line to string before concat
2020-04-24 10:12:52 -04:00
Mathias Vorreiter Pedersen
98c2fd8401
Merge branch 'master' into get-an-assigned-value-join-order
2020-04-24 15:03:59 +02:00
Taus
266de2efa2
Merge pull request #3348 from RasmusWL/python-random-modernisation
...
Python: random modernisations
2020-04-24 14:18:10 +02:00
Anders Schack-Mulligen
beab320557
Java: Add more qldoc.
2020-04-24 14:17:47 +02:00
Rasmus Wriedt Larsen
2b3025265b
Python: Clean up QLdoc
...
Co-Authored-By: Taus <tausbn@gmail.com >
2020-04-24 14:05:02 +02:00
Calum Grant
fcc2b66d1a
Merge pull request #3347 from hvitved/csharp/vsvars-test
...
C#: Update expected test output
2020-04-24 12:12:31 +01:00
Rasmus Wriedt Larsen
367ee3e8c4
Python: Modernise security/injection/Path.qll
...
And we're making things a bit more clean since it's not *any* argument of `open()` that is a taint-sink.
2020-04-24 12:03:42 +02:00
Rasmus Wriedt Larsen
67837887c8
Python: Modernise security/injection/Exec.qll
2020-04-24 11:59:05 +02:00
Calum Grant
1f1ac72de8
Merge pull request #3309 from hvitved/csharp/cfg/catch-finally-bug
...
C#: Add missing CFG edge from generic `catch` block to `finally` block
2020-04-24 10:12:53 +01:00
Esben Sparre Andreasen
58b5bd5cfd
JS: fixup documentation
2020-04-24 10:56:53 +02:00
semmle-qlci
28cfe548d5
Merge pull request #3325 from erik-krogh/MoreEventClasses
...
Approved by asgerf
2020-04-24 09:02:27 +01:00
semmle-qlci
671e7c6637
Merge pull request #3335 from asger-semmle/js/cached-chained-methods
...
Approved by esbena
2020-04-24 08:28:05 +01:00
Tom Hvitved
6911937ab8
C#: Update expected test output
2020-04-24 09:26:50 +02:00
Esben Sparre Andreasen
f0a05f6a6c
JS: change notes
2020-04-24 09:18:16 +02:00
Esben Sparre Andreasen
6d6ec89ba8
JS: add qhelp
2020-04-24 09:18:09 +02:00
Esben Sparre Andreasen
708fd3d73f
JS: add query to query suite
2020-04-24 09:17:46 +02:00
Esben Sparre Andreasen
89613dbd23
JS: add query for incomplete HTML attribute sanitization
2020-04-24 09:17:46 +02:00
Mathias Vorreiter Pedersen
7df45a9bb4
Merge pull request #3316 from jbj/arithTypesMatch-perf
...
C++: inline arithTypesMatch predicate
2020-04-24 09:13:02 +02:00
Jonas Jensen
d98e956c2b
Merge pull request #3322 from felicitymay/merge-124-master
...
Merge rc/1.24 into master
2020-04-24 08:48:54 +02:00
Rasmus Wriedt Larsen
8878884724
Python: Rewrite web/stdlib/Request.qll QLDoc to be more clear
2020-04-24 08:07:23 +02:00
Rasmus Wriedt Larsen
23f3736b67
Python: Simplify CgiFieldStorageFieldKind.getTaintOfAttribute
2020-04-24 08:04:55 +02:00
Cornelius Riemenschneider
c25eb19b18
Add support for openssl allocation/deallocation functions.
2020-04-24 01:57:14 +02:00
Sauyon Lee
972551edd7
sync-files.py: cast line to string before concat
2020-04-23 15:32:28 -07:00
Dave
95b55f86ba
Add a VS Code task to run sync-files.py
...
If you're developing one of the libraries that has muiltiple copies auto-generated by `sync-files.py`, you can now run `sync-files.py --latest` by going to the `Terminal | Run Task...` menu in VS Code and selecting the `Sync Identical Files` task. You can set a keyboard binding to run this task for quicker access.
2020-04-23 16:58:34 -04:00
james
5e87bc998e
docs: add note about path queries
2020-04-23 20:30:28 +01:00
Erik Krogh Kristensen
19c6092998
autoformat
2020-04-23 20:59:34 +02:00
Erik Krogh Kristensen
ea1628ef54
fix typo in jQuery.qll
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-04-23 20:58:49 +02:00
Erik Krogh Kristensen
a71567da54
autoformat
2020-04-23 18:58:33 +02:00
Taus
1d6b6a48ae
Merge pull request #2924 from BekaValentine/python-objectapi-to-valueapi-wrongnumberargumentsincall
...
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInCall
2020-04-23 17:56:39 +02:00
Erik Krogh Kristensen
ee43db1b58
slightly expand the $().each model
2020-04-23 16:49:47 +02:00
Erik Krogh Kristensen
448ed150df
allow the empty string to flow to a JQuery XSS sink
2020-04-23 16:45:37 +02:00
Cornelius Riemenschneider
0ea7fedeb0
Address review and fix bug in deconstructSizeExpr/3.
...
Logic is hard, and I made a mistake inverting the formula for the second case, so the
predicate never held for a sizeExpr like sizeof(int)*sizeof(void).
Now, this case is correctly handled by the fallback.
2020-04-23 16:39:29 +02:00
Cornelius Riemenschneider
492f1f446a
Remove pragma[inline] from deconstructSizeExpr/3.
2020-04-23 15:53:11 +02:00
Erik Krogh Kristensen
96896fd7f5
second round of UnsafeJQueryPlugin reuse
2020-04-23 15:12:32 +02:00
Erik Krogh Kristensen
ea569dba78
update doc for JQuery plugin predicate
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-04-23 15:03:39 +02:00
Asger Feldthaus
cafdcfa4de
JS: Preserve reflective calls in getAMethodCall
2020-04-23 13:57:14 +01:00
Erik Krogh Kristensen
1954a60b6e
reuse existing predicate from UnsafeJqueryPlugin
2020-04-23 14:25:34 +02:00
Erik Krogh Kristensen
09b6727e6d
refactor $.each model
2020-04-23 14:24:56 +02:00
Erik Krogh Kristensen
ce106981b3
add tests
2020-04-23 14:24:33 +02:00
Mathias Vorreiter Pedersen
deff2820c2
C++: Modernize getAnAssignedValue following PR comments
2020-04-23 14:14:35 +02:00
Rasmus Wriedt Larsen
fe50811bbf
Python: In taint test, list comprehension => for loop
...
Apparently they're not the same thing :(
2020-04-23 14:13:00 +02:00
Rasmus Wriedt Larsen
06edd076b6
Python: Enable taint when iterating over ExternalFileObject
2020-04-23 14:11:50 +02:00
Erik Krogh Kristensen
e7d8cd8e8c
Merge remote-tracking branch 'upstream/master' into MoarJQuery
2020-04-23 14:10:53 +02:00
semmle-qlci
36b28386f8
Merge pull request #3332 from erik-krogh/JGrowl
...
Approved by esbena
2020-04-23 13:06:00 +01:00
Erik Krogh Kristensen
67443718c0
change note
2020-04-23 13:55:37 +02:00
Erik Krogh Kristensen
6897dda614
model that this in $().each(callback) is a DOM-node
2020-04-23 13:51:17 +02:00
Erik Krogh Kristensen
8de86967aa
model that this in a jQuery plugin is a jQuery object
2020-04-23 13:48:54 +02:00
semmle-qlci
801ce89c67
Merge pull request #3099 from esbena/js/introduce-poi-utility
...
Approved by erik-krogh
2020-04-23 12:14:00 +01:00
Jonas Jensen
37e3bc4b3e
C++: invoke unique without | |
...
Based on PR feedback. This will avoid a syntactic wart and make the
invocation do the right thing both with and without
`language[monotonicAggregates]`.
2020-04-23 13:10:05 +02:00
Jonas Jensen
312e6229fb
Merge pull request #3330 from MathiasVP/libc-assert
...
C++: Generalize charpred of LibcAssert
2020-04-23 13:06:41 +02:00
Rasmus Wriedt Larsen
1fe0040086
Python: Don't use six in urllib.parse string related tests
...
Since this test inheriently has `--max-import-depth=1`, by using six, we would
never look at the actual source-code of urllib.parse/urlparse and therefore the
test would never show if we understood the library code good enough that we
could propagate taint out-of-the-box.
All tests moved by one line... that is why the diff is so big
2020-04-23 13:00:45 +02:00
Erik Krogh Kristensen
d8c498bd15
add NOT OK comment
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-04-23 12:17:25 +02:00
Cornelius Riemenschneider
a33b7f8c99
Make getSizeMult() functional.
2020-04-23 12:15:31 +02:00
Rasmus Wriedt Larsen
94ae2febe5
Python: Propagate taint through parse_qsl
2020-04-23 12:14:22 +02:00
Erik Krogh Kristensen
e1423b0fa5
add test for jGrowl
2020-04-23 11:58:06 +02:00
Erik Krogh Kristensen
5382976195
change note
2020-04-23 11:52:16 +02:00
Taus
54d1991a9d
Merge pull request #3300 from RasmusWL/python-pointsto-regression-open
...
Python: Add points-to regression for uncalled function
2020-04-23 11:50:30 +02:00
Pavel Avgustinov
adf12ba2b4
Merge pull request #3333 from sj/patch-3
...
Update CODE_OF_CONDUCT.md to be based on Contributor Covenant template
2020-04-23 10:46:41 +01:00
Bas van Schaik
0c8786f941
Update code of conduct in line with GH
...
Updates CODE_OF_CONDUCT.md to use the Contributor Covenant Code of Conduct that is widely used for other open source projects at GitHub.
2020-04-23 10:19:13 +01:00
Jonas Jensen
d6f77c0f98
Merge pull request #3328 from MathiasVP/literal-comment
...
C++: Remove unnecessary part of comment
2020-04-23 11:10:16 +02:00
Mathias Vorreiter Pedersen
0fb534c79e
C++: Fix join order in getAnAssignedValue
2020-04-23 11:04:40 +02:00
Erik Krogh Kristensen
90652eeb25
add $.jGrowl as an XSS sink
2020-04-23 10:44:41 +02:00
Rasmus Wriedt Larsen
86630f1d6c
Python: Handle readline, readlines for ExternalFileObject
2020-04-23 10:40:16 +02:00
Rasmus Wriedt Larsen
7385ea5024
Python: Add tests for ExternalFileObject
2020-04-23 10:36:51 +02:00
Rasmus Wriedt Larsen
c479a77d55
Python: Refactor ExternalFileObject to use field
...
Instead of string matching. This brings it in line with what CollectionKind,
SequenceKind, and DictKind does.
2020-04-23 10:28:29 +02:00
Shati Patel
9c12fa32e1
Merge pull request #3318 from shati-patel/lexer-unique
...
Highlight "unique" as a keyword in CodeQL docs
2020-04-23 09:18:39 +01:00
semmle-qlci
da3292606c
Merge pull request #3191 from erik-krogh/XssDom
...
Approved by esbena, mchammer01
2020-04-23 09:17:07 +01:00
Jonas Jensen
f696594d35
Merge pull request #3295 from MathiasVP/field-flow-single-struct
...
C++: Add PostUpdateNode for updates to structs with no chi instructions
2020-04-23 10:02:10 +02:00
Jonas Jensen
cbed175931
Merge pull request #3273 from Semmle/rdmarsh/cpp/RemoteFlowSource-model
...
C++: Add remote flow sources via models
2020-04-23 09:54:40 +02:00
Mathias Vorreiter Pedersen
1016a0c0db
C++: Generalize charpred of LibcAssert
2020-04-23 09:48:30 +02:00
Esben Sparre Andreasen
a66b4b55fe
Update javascript/ql/src/experimental/poi/PoI.qll
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-04-23 09:47:21 +02:00
semmle-qlci
1312fcccae
Merge pull request #3324 from erik-krogh/BoundSocketIO
...
Approved by asgerf
2020-04-23 08:42:45 +01:00
Tom Hvitved
5b5f9adfc6
C#: Add missing CFG edge from generic catch block to finally block
2020-04-23 08:45:11 +02:00
Tom Hvitved
bd075a7de0
C#: Add CFG test
2020-04-23 08:45:11 +02:00
Esben Sparre Andreasen
161c05dced
Apply suggestions from code review
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-04-23 08:41:54 +02:00
Mathias Vorreiter Pedersen
cfecc9cafa
Merge pull request #3319 from jbj/Declaration-not-abstract
...
C++: Make `Declaration` not abstract
2020-04-23 08:36:18 +02:00
Mathias Vorreiter Pedersen
7b51d0c8a5
C++: Remove unnecessary part of comment
2020-04-23 08:35:44 +02:00
Cornelius Riemenschneider
293e6466d4
AllocationExpr.getSizeMult() now analyzes the size expression of function calls.
...
This yields more precise size information in a lot of the common cases of C allocation code,
as the common pattern malloc(count * sizeof(type)) is now understood.
2020-04-23 02:05:31 +02:00
Cornelius Riemenschneider
247fc42ec5
Add tests that show AllocationExpr.getSizeMult() behaviour.
2020-04-23 02:02:57 +02:00
Robert Marsh
0dc797d288
C++: autoformat ModelUtil.qll
2020-04-22 16:14:58 -07:00
Robert Marsh
ac22e7950c
C++: autoformat FlowSources.qll
2020-04-22 16:11:33 -07:00
Robert Marsh
471f536326
Merge pull request #3307 from dbartol/dbartol/BinaryConditional
...
C++: IR translation for binary conditional operator
2020-04-22 15:01:16 -07:00
Erik Krogh Kristensen
6ada588dd1
add support for util.inherits
2020-04-22 22:55:12 +02:00
Erik Krogh Kristensen
957e4073b0
use getABoundCallbackParameter in SocketIO
2020-04-22 21:56:34 +02:00
Erik Krogh Kristensen
40822e10b4
add SocketIO test case
2020-04-22 21:55:20 +02:00
Tom Hvitved
5a2dcc591c
Merge pull request #3317 from Semmle/revert-2814-cs/unqualify-trap-ids
...
Revert "C#: Improve db consistency by removing assembly id"
2020-04-22 20:46:35 +02:00
Felicity Chapman
89bf35cd43
Merge branch 'rc/1.24' into merge-124-master
...
Conflicts:
change-notes/1.24/analysis-javascript.md
Resolved in favor of the rc/1.24 branch
2020-04-22 19:01:47 +01:00
Taus
cf9114761f
Merge pull request #3321 from felicitymay/1.24/move-python-change-notes
...
1.24: Move python change notes into rc/1.24 branch
2020-04-22 19:42:12 +02:00
Felicity Chapman
523f1068b8
Editorial suggestions
...
We don't hyphenate "QL-library" and there were a few typos. Feel free to further revise this if I've changed the meaning too much.
As discussed separately, I was unable to raise this as a PR in GitHub.com and had to resort to a direct commit.
(cherry picked from commit e29468135d )
2020-04-22 18:15:43 +01:00
Taus
ac8cca37e8
Apply suggestions from code review
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
(cherry picked from commit 44b570f7b6 )
2020-04-22 18:15:43 +01:00
Taus Brock-Nannestad
63234aae40
Python: Finalise change notes for 1.24.
...
(cherry picked from commit e97d88c158 )
2020-04-22 18:15:42 +01:00
Rebecca Valentine
89752f4b55
Merge branch 'master' into python-objectapi-to-valueapi-wrongnumberargumentsincall
2020-04-22 09:52:33 -07:00
Rebecca Valentine
9cd2171fb8
Merge branch 'master' into python-objectapi-to-valueapi-incorrectlyoverridenmethod
2020-04-22 09:40:33 -07:00
Rebecca Valentine
d5c44d8513
Merge pull request #3315 from tausbn/python-finalise-1.24-change-notes
...
Python: Finalise change notes for 1.24.
2020-04-22 09:15:54 -07:00
Dave Bartolomeo
163ecd97de
Merge pull request #3277 from geoffw0/rangeshift
...
C++: Support for & and >> in SimpleRangeAnalysis
2020-04-22 11:36:36 -04:00
Jonas Jensen
448bd2be87
C++: Make Declaration not abstract
...
It looks like this change will stop `SignedOverflowCheck.ql` from
needlessly re-evaluating several cached stages.
2020-04-22 17:34:18 +02:00
Rasmus Wriedt Larsen
22096c36b9
Python: Add standard HttpSources tests for BaseHTTPRequestHandler
2020-04-22 17:28:49 +02:00
Rasmus Wriedt Larsen
51a9094064
Python: Add sinks for http.server.BaseHTTPRequestHandler
2020-04-22 17:28:27 +02:00
Shati Patel
321eb44370
Highlight "unique" as a keyword
2020-04-22 15:54:50 +01:00
Felicity Chapman
e29468135d
Editorial suggestions
...
We don't hyphenate "QL-library" and there were a few typos. Feel free to further revise this if I've changed the meaning too much.
As discussed separately, I was unable to raise this as a PR in GitHub.com and had to resort to a direct commit.
2020-04-22 15:48:01 +01:00
Tom Hvitved
8c0c283811
Revert "C#: Improve db consistency by removing assembly id"
2020-04-22 16:32:13 +02:00
Rasmus Wriedt Larsen
a27431e197
Python: Add module level QLDoc in web/stdlib/Request.qll
2020-04-22 16:22:03 +02:00
Taus
44b570f7b6
Apply suggestions from code review
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-04-22 16:03:20 +02:00
Jonas Jensen
7a3663976b
C++: inline arithTypesMatch predicate
...
This predicate is effectively a Cartesian product between all enum
types. It's infeasible to compute it in full, so luckily the optimizer
has been able to apply enough magic to make it feasible. That's not a
robust solution, and it has indeed broken on at least one version of the
1.24 release candidate.
On a Chromium snapshot where I ran the LGTM suite overnight, the
`m#MistypedFunctionArguments::arithTypesMatch#bb` predicate (magic for
`arithTypesMatch`) took 170m5s. That was commit b69fdf5 from the
internal repo. I tried to reproduce it in VSCode, this time with commit
646646, but it wasn't quite as bad: the predicate took only 38 seconds.
In any case, making the problematic predicate `pragma[inline]` removes
the slow magic and makes the `MistypedFunctionArguments.ql` query
faster.
2020-04-22 15:14:07 +02:00
Taus Brock-Nannestad
e97d88c158
Python: Finalise change notes for 1.24.
2020-04-22 14:31:04 +02:00
Esben Sparre Andreasen
a0e6562208
JS: address review feedback
2020-04-22 14:24:35 +02:00
Esben Sparre Andreasen
2747e2a0c7
JS: formatting
2020-04-22 14:24:35 +02:00
Esben Sparre Andreasen
2186ca7efc
JS: address non-semantic review feedback
2020-04-22 14:24:35 +02:00
Esben Sparre Andreasen
27e5fce0ed
JS: make the default PoIConfiguration/enabled inclusive
2020-04-22 14:24:34 +02:00
Esben Sparre Andreasen
3b45bcd285
JS: remove the standard PoI configurations
2020-04-22 14:24:34 +02:00
Esben Sparre Andreasen
dd6378f1d0
JS: address PoI review comments
2020-04-22 14:24:34 +02:00
Esben Sparre Andreasen
b2ca3d2bdc
JS: improve PoI::alertQuery docstring
2020-04-22 14:24:34 +02:00
Esben Sparre Andreasen
a386d2dcee
JS: add missing expected output
2020-04-22 14:24:34 +02:00
Esben Sparre Andreasen
607d46e2f9
JS: improve PoI tests
2020-04-22 14:24:34 +02:00
Esben Sparre Andreasen
c407cc072e
JS: autoformat
2020-04-22 14:24:34 +02:00
Esben Sparre Andreasen
e4ea089a0b
JS: add experimental PoI module
2020-04-22 14:24:34 +02:00
Esben Sparre Andreasen
ec73c97422
JS: refactor ClassifyFiles.qll from ClassifyFiles.ql
2020-04-22 14:24:34 +02:00
Erik Krogh Kristensen
ac26741816
reuse existing SanitizerGuard from UnsafeJQueryPlugin
2020-04-22 14:16:15 +02:00
Dave Bartolomeo
66381e89ef
C++: Add comment from PR feedback
2020-04-22 08:11:43 -04:00
Erik Krogh Kristensen
0a29d132d0
reuse existing logic in DomBasedXss
2020-04-22 13:50:43 +02:00
Rasmus Wriedt Larsen
6b84137a92
Python: Model cgi.FieldStorage (parsing of submitted forms)
2020-04-22 11:37:47 +02:00
Rasmus Wriedt Larsen
1ecfa2eb55
Merge pull request #3278 from tausbn/python-fix-warnings
...
Python: Fix remaining deprecation warnings.
2020-04-22 11:33:16 +02:00
Rasmus Wriedt Larsen
6eb24011eb
Python: Add docs to web/stdlib/Request.qll
2020-04-22 11:26:50 +02:00
Erik Krogh Kristensen
ac44cb425e
Merge branch 'master' into js/call-graph-exploration
2020-04-22 10:49:26 +02:00
Robert Marsh
9e0d6e8aa0
C++: move taint step cases to TaintTrackingUtil
2020-04-22 01:38:00 -07:00
Taus Brock-Nannestad
2fad5e8e32
Python: Remove deprecated TaintFlow and additionalFlowStepVar.
2020-04-22 10:34:00 +02:00
Erik Krogh Kristensen
a5bbfa30d1
add change note
2020-04-22 10:23:07 +02:00
Erik Krogh Kristensen
7bfea946fd
update links in xss-through-dom qhelp
2020-04-22 10:23:03 +02:00
Erik Krogh Kristensen
8811455d49
Merge remote-tracking branch 'upstream/master' into XssDom
2020-04-22 10:20:40 +02:00
Calum Grant
1b88c97688
Merge pull request #3199 from hvitved/csharp/vsvars-unset-platform
...
C#: Unset `Platform` env variable when invoking `vcvarsall.bat`
2020-04-22 09:18:20 +01:00
Geoffrey White
2e392516c2
Apply suggestions from code review
...
Co-Authored-By: Dave Bartolomeo <dbartol@github.com >
2020-04-22 09:09:16 +01:00
Erik Krogh Kristensen
76503d3536
user controlled -> user-controlled
2020-04-22 10:08:01 +02:00
Erik Krogh Kristensen
947e9828da
Update javascript/ql/src/Security/CWE-079/XssThroughDom.qhelp
...
Co-Authored-By: mc <42146119+mchammer01@users.noreply.github.com >
2020-04-22 10:07:50 +02:00
Rasmus Wriedt Larsen
26ed911bb2
Python: Add modeling of http.server.BaseHTTPRequestHandler
2020-04-22 09:52:10 +02:00
Rasmus Wriedt Larsen
30e2592701
Python: Propagate taint through parse_qs
2020-04-22 08:55:35 +02:00
Robert Marsh
52b1fb703d
C++: use models in TaintTrackingUtil
2020-04-21 17:18:14 -07:00
Robert Marsh
11683fa9cb
C++: add mapping between models and instructions
2020-04-21 17:10:45 -07:00
Taus
5af351eacd
Merge pull request #3275 from RasmusWL/python-fix-points-to-deprecations
...
Python: Remove deprecated annotation for old PointsTo::points_to
2020-04-21 18:18:07 +02:00
semmle-qlci
9fae953969
Merge pull request #3262 from asger-semmle/js/api-deprecation-and-renaming
...
Approved by erik-krogh
2020-04-21 15:45:13 +01:00
Dave Bartolomeo
4b44afef90
C++: Accept syntax-zoo test output
2020-04-21 09:42:24 -04:00
Dave Bartolomeo
fee557001e
C++: Update SignAnalysis test results
2020-04-21 09:34:44 -04:00
Mathias Vorreiter Pedersen
a49d22e6e4
C++: Fix join ordering
2020-04-21 13:25:06 +02:00
semmle-qlci
2fb711e460
Merge pull request #3169 from erik-krogh/Maps
...
Approved by asgerf, esbena
2020-04-21 12:12:06 +01:00
Erik Krogh Kristensen
59b94b3d1b
revert back to having 2 separate cases in JQuery::MethodCall
2020-04-21 13:08:06 +02:00
Asger Feldthaus
18188b659c
JS: Add 1.25 change note
2020-04-21 10:53:37 +01:00
Asger Feldthaus
c04ba91a90
JS: Autoformat
2020-04-21 10:51:42 +01:00
Asger Feldthaus
39920c1b08
JS: Add forwarding libraries in old locations
2020-04-21 10:51:42 +01:00
Asger Feldthaus
9e4709148b
JS: Move Forward/Backward exploration to explore folder
2020-04-21 10:51:41 +01:00
Asger Feldthaus
647a3d3a60
JS: Add note and debugging and exploration
2020-04-21 10:51:41 +01:00
Asger Feldthaus
ffeda7f45a
JS: Expand on doc a bit
2020-04-21 10:51:41 +01:00
Asger Feldthaus
066549f682
JS: Fix typo in qldoc
2020-04-21 10:51:41 +01:00
Asger F
291ebccfef
Update javascript/ql/src/semmle/javascript/explore/CallGraph.qll
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-04-21 10:51:41 +01:00
Asger F
4c9ef8c570
Update javascript/ql/src/semmle/javascript/explore/CallGraph.qll
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-04-21 10:51:41 +01:00
Asger Feldthaus
759e1dfe45
JS: Add helper library for call graph exploration
2020-04-21 10:51:40 +01:00
Rasmus Wriedt Larsen
32a97266cf
Python: Fix deprecation warnings in test output
2020-04-21 11:39:44 +02:00
semmle-qlci
53abf83229
Merge pull request #3304 from asger-semmle/js/typescript-unary-type-expr
...
Approved by erik-krogh
2020-04-21 10:38:59 +01:00
Asger Feldthaus
1703ffe6a1
JS: Cache some SourceNode getter methods differently
2020-04-21 10:33:07 +01:00
Asger Feldthaus
997b44928e
JS: Autoformat
2020-04-21 10:14:28 +01:00
semmle-qlci
2ecef33c9d
Merge pull request #3299 from asger-semmle/js/flows-to-redundant-check
...
Approved by esbena
2020-04-21 10:00:34 +01:00
semmle-qlci
80c20cb66e
Merge pull request #3297 from asger-semmle/js/isambient-refactor
...
Approved by esbena
2020-04-21 09:36:14 +01:00
semmle-qlci
d75d520f35
Merge pull request #3232 from RasmusWL/python-more-deprecated-annotations
...
Approved by BekaValentine
2020-04-21 09:30:27 +01:00
Tom Hvitved
29e690e159
Merge remote-tracking branch 'upstream/master' into csharp/vsvars-unset-platform
2020-04-21 09:00:26 +02:00
Tom Hvitved
7d86cce658
Merge pull request #2814 from calumgrant/cs/unqualify-trap-ids
...
C#: Improve db consistency by removing assembly id
2020-04-21 08:58:34 +02:00
Dave Bartolomeo
1428811f75
C++: IR translation for binary conditional operator
...
IR generation was not handling the special two-operand flavor of the `?:` operator that GCC supports as an extension. The extractor doesn't quite give us enough information to do this correctly (see github/codeql-c-extractor-team#67 ), but we can get pretty close.
About half of the code could be shared between the two-operand and three-operand flavors. The main differences for the two-operand flavor are:
1. The "then" operand isn't a child of the `ConditionalExpr`. Instead, we just reuse the original value of the "condition" operand, skipping any implicit cast to `bool` (see comment for rationale).
2. For the three-operand flavor, we generate the condition as control flow rather than the computation of a `bool` value, to avoid creating unnecessarily complicated branching. For the two-operand version, we just compute the value, since we have to reuse that value in the "then" branch anyway.
I've added IR tests for these new cases. I've also updated the expectations for `SignAnalysis.ql` based on the fix. @rdmarsh2, can you please double-check that these diffs look correct? I believe they do, but you're the range/sign analysis expert.
2020-04-21 02:05:21 -04:00
Robert Marsh
d0bb5ad4e2
C++: rename and add description to hasFlowSource
2020-04-20 13:25:31 -07:00
Robert Marsh
e6630a8fba
Apply suggestions from code review
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2020-04-20 10:14:13 -07:00
Jonas Jensen
4259904c5e
Merge pull request #3301 from Semmle/felicitymay-124-fix-typo
...
Fix error in 3287
2020-04-20 17:36:45 +02:00
Asger Feldthaus
883846dfb6
JS: Fix extraction of negative number literal types
2020-04-20 16:17:15 +01:00
Jonas Jensen
875daae84b
Merge pull request #3151 from dbartol/dbartol/floats
...
C++: Better support for complex numbers in IR and AST
2020-04-20 16:27:20 +02:00
Asger Feldthaus
4fc79e38ec
JS: Also fix typo in test case
2020-04-20 15:24:51 +01:00
Felicity Chapman
dc83ac61b5
Fix error in 3287
...
@jbj - apologies for the over-eager merge of #3287 . This should fix the error you highlighted.
2020-04-20 15:12:43 +01:00
Asger Feldthaus
d4978905f8
JS: Use SendCallback/ReceiveCallback in getAck
2020-04-20 15:12:04 +01:00
Rasmus Wriedt Larsen
43bc7c6619
Python: Autoformat
...
I'm not particularly happy about this one, but I don't care to fight about it today.
2020-04-20 16:08:53 +02:00
Rasmus Wriedt Larsen
b7145af447
Python: Handle all methods in StringKind.getTaintOfMethodResult
2020-04-20 16:07:30 +02:00
Calum Grant
41d8d32764
C#: Address review comment: Make dictionary type more specific.
2020-04-20 15:06:42 +01:00
Asger Feldthaus
ca60e8264e
JS: Autoformat
2020-04-20 14:42:41 +01:00
Jonas Jensen
9b61650cba
Merge pull request #3298 from MathiasVP/no-inline-std-string-constructor
...
C++: Add pragma[noinline] to StdStringConstructor
2020-04-20 15:10:05 +02:00
Rasmus Wriedt Larsen
a5d3966cb3
Python: Refactor StringKind.getTaintOfMethodResult
...
no need to match on ControlFlowNodes manually anymore 🎉
2020-04-20 15:01:40 +02:00
Rasmus Wriedt Larsen
10b36bb7a8
Python: Taint of string method reference isn't handled
2020-04-20 15:01:40 +02:00
Rasmus Wriedt Larsen
1631787336
Python: Fix points-to regressions Test.ql
...
Only being able to debug missing pointsTo for NameNode was quite limiting ...
2020-04-20 14:41:55 +02:00
Rasmus Wriedt Larsen
8746876377
Python: Add points-to regression for uncalled function
2020-04-20 14:41:45 +02:00
Mathias Vorreiter Pedersen
8be1bfe8d0
C++: Add comments and accept expected dataflow sanity failures
2020-04-20 14:13:12 +02:00
Mathias Vorreiter Pedersen
7ba4526f50
C++: Add noinline to StdString constructor
2020-04-20 13:36:41 +02:00
Erik Krogh Kristensen
9fc29ee0f8
update qhelp
2020-04-20 13:29:00 +02:00
Erik Krogh Kristensen
73b0aa4004
add more attributes potentially vulnerable to xss-through-dom
2020-04-20 13:29:00 +02:00
Erik Krogh Kristensen
12f4ce8111
merge two cases of jQuery method calls
2020-04-20 13:28:55 +02:00
Erik Krogh Kristensen
aee7cc117d
add change-note
2020-04-20 13:08:51 +02:00
Erik Krogh Kristensen
8b254f7b49
Merge remote-tracking branch 'upstream/master' into Maps
2020-04-20 13:00:39 +02:00
semmle-qlci
e965e5c73e
Merge pull request #3094 from erik-krogh/Mispelled
...
Approved by esbena
2020-04-20 11:41:23 +01:00
Calum Grant
eb1474acee
Merge pull request #3276 from hvitved/csharp/dataflow/array-tests
...
C#: Add data-flow test for collections
2020-04-20 11:36:17 +01:00
Calum Grant
ead916702a
C#: Take nullability into account when creating symbol entities. Otherwise, an entity with the wrong (cached) nullability could be created.
2020-04-20 11:29:31 +01:00
Asger Feldthaus
bccc27f1e7
JS: Rephrase flowsTo to avoid redundant SourceNode::Range check
2020-04-20 10:57:52 +01:00
Erik Krogh Kristensen
2d3e42e6d6
update qhelp for xss-through-dom
...
Co-Authored-By: Asger F <asgerf@github.com >
2020-04-20 11:50:46 +02:00
Mathias Vorreiter Pedersen
e0cd595d54
C++: Reduce intermediate tuple counts
2020-04-20 11:46:10 +02:00
Erik Krogh Kristensen
c713ba7bfe
fix typo
2020-04-20 10:51:42 +02:00
Felicity Chapman
962f13ee13
Merge pull request #3287 from felicitymay/1.24/SD-61-Cpp-finalize-notes
...
1.24 release: finalize change notes for C/C++
2020-04-20 09:07:58 +01:00
Felicity Chapman
3bfcd618c0
Merge pull request #3286 from felicitymay/1.24/SD-61-JS-finalize-notes
...
1.24 release: finalize change notes for JavaScript
2020-04-20 09:07:47 +01:00
Tom Hvitved
e186c9ddd1
C#: Update data-flow collection test method names
2020-04-20 09:29:51 +02:00
Tom Hvitved
161093bd57
C#: Rename arrays data-flow test to collections
2020-04-20 09:20:42 +02:00
Mathias Vorreiter Pedersen
a6e619ce5b
C++: Add field flow through single-field structs and accept tests
2020-04-20 08:52:46 +02:00
Mathias Vorreiter Pedersen
6fca23bc8b
C++: Demonstrate lack of flow through single-field structs
2020-04-20 08:50:31 +02:00
Asger Feldthaus
bb9fea5a27
JS: Refactor isAmbient computation
2020-04-19 22:45:19 +01:00
Grzegorz Golawski
40fcd4cbe5
Fix references
2020-04-19 20:49:07 +02:00
Grzegorz Golawski
457e2eaf59
CodeQL query to detect OGNL injections
2020-04-19 20:31:57 +02:00
Erik Krogh Kristensen
2632699397
Merge branch 'master' of git.semmle.com:Semmle/ql into Mispelled
2020-04-18 17:58:57 +02:00
Dave Bartolomeo
8041b74f1c
C++: Fix formatting
2020-04-18 09:56:38 -04:00
Dave Bartolomeo
de5abdb29a
C++/C#: Add missing QLDoc
2020-04-18 09:55:35 -04:00
semmle-qlci
243dea706e
Merge pull request #3269 from erik-krogh/Promisify
...
Approved by esbena
2020-04-18 13:02:42 +01:00
yo-h
26f624d2d4
Merge pull request #3285 from felicitymay/1.24/SD-61-Java-finalize-notes
...
1.24 release: finalize change notes for Java
2020-04-17 17:04:38 -04:00
Grzegorz Golawski
af48bc3e57
CodeQL query to detect JNDI injections
2020-04-17 21:45:42 +02:00
Robert Marsh
9008084b74
Merge pull request #3272 from dbartol/dbartol/DumpFixes
...
C++: A couple of fixes for IR dumps
2020-04-17 11:49:52 -07:00
Geoffrey White
a7c22db989
C++: Autoformat.
2020-04-17 18:50:41 +01:00
Geoffrey White
de751b0b75
C++: Correct UnsignedBitwiseAndExpr.
2020-04-17 17:10:59 +01:00
Geoffrey White
01d3257d72
C++: Add test cases involving casts.
2020-04-17 17:01:58 +01:00
Jonas Jensen
8ca6c57eef
Merge pull request #3118 from MathiasVP/ir-flow-fields
...
C++: IR field flow
2020-04-17 15:49:19 +02:00
Felicity Chapman
05d0d844bd
Editorial changes
2020-04-17 14:44:14 +01:00
Calum Grant
dbff9b6fc7
Merge pull request #3284 from felicitymay/1.24/SD-61-CS-finalize-notes
...
1.24 release: finalize change notes for C#
2020-04-17 14:13:39 +01:00
Felicity Chapman
d5145d9f0a
Sort table alphabetically
2020-04-17 14:05:21 +01:00
Felicity Chapman
c1323886b6
Update change-notes/1.24/analysis-javascript.md
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-04-17 13:30:49 +01:00
Erik Krogh Kristensen
cffa911661
retarget change note for 1.25
2020-04-17 14:22:57 +02:00
Erik Krogh Kristensen
a2ddf7bf8f
retarget change-note for 1.25
2020-04-17 14:19:17 +02:00
Erik Krogh Kristensen
88f600fa34
more -> additional
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-04-17 14:14:08 +02:00
Mathias Vorreiter Pedersen
ba0429cf01
Merge branch 'master' into ir-flow-fields
2020-04-17 13:57:12 +02:00
Erik Krogh Kristensen
225dc4b017
change-note
2020-04-17 13:54:48 +02:00
Felicity Chapman
01a31c1065
Minor editorial changes
2020-04-17 12:50:20 +01:00
Tom Hvitved
f91af7daf3
C#: Add more data-flow tests
2020-04-17 13:49:08 +02:00
Tom Hvitved
05ec75558d
Java: Update test
2020-04-17 13:49:08 +02:00
Tom Hvitved
1b6e978a62
Data flow: Sync files
2020-04-17 13:49:06 +02:00
Tom Hvitved
de41e668b0
Data flow: No more flow summaries
2020-04-17 13:48:20 +02:00
Felicity Chapman
ee12e6a00b
Sort alphabetically
2020-04-17 12:35:33 +01:00
Geoffrey White
e5dc14ac95
Merge pull request #3271 from jbj/1.24-change-note
...
C++: Tidy up 1.24 change notes
2020-04-17 12:33:24 +01:00
Felicity Chapman
67e8a5c8d8
Minor editorial changes
2020-04-17 12:11:33 +01:00
Chris Gavin
e974006122
Merge pull request #3283 from jbj/mergeback-2020-04-17
...
Mergeback rc/1.24 -> master
2020-04-17 12:11:22 +01:00
Erik Krogh Kristensen
e72eed1db5
more -> additional
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-04-17 13:10:06 +02:00
Felicity Chapman
81b3b4884c
Add LGTM info for new queries and comment detail
...
Plus minor editorial changes
2020-04-17 12:09:27 +01:00
Felicity Chapman
08d1a2c5ea
Reorder table and remove empty sections
2020-04-17 11:30:18 +01:00
Mathias Vorreiter Pedersen
8c03423f3e
C++: Accept test output
2020-04-17 12:03:16 +02:00
Erik Krogh Kristensen
4a93b91d59
make maybePromisified private
2020-04-17 11:47:03 +02:00
Erik Krogh Kristensen
3b230648d2
change-note
2020-04-17 11:45:08 +02:00
Erik Krogh Kristensen
4f32157a78
rename func to callback
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-04-17 11:36:48 +02:00
Erik Krogh Kristensen
427c32f211
report a local variable as the misspelling if there any many occourances of the global
2020-04-17 11:25:23 +02:00
Tom Hvitved
c36142f129
C#: Add data-flow test for collections
2020-04-17 11:22:01 +02:00
Erik Krogh Kristensen
1b80f46f30
add QHelp for js/xss-through-dom query
2020-04-17 10:54:21 +02:00
Erik Krogh Kristensen
14b551f887
Xss through DOM
2020-04-17 10:54:14 +02:00
Jonas Jensen
c970e8a52e
Merge remote-tracking branch 'upstream/rc/1.24' into mergeback-2020-04-17
2020-04-17 10:42:27 +02:00
Erik Krogh Kristensen
55edfed1ee
support jQuery().get() returning a DOM node
2020-04-17 10:32:53 +02:00
Erik Krogh Kristensen
dd9aec056c
handle basic dynamic method dispatch for jQuery methods
2020-04-17 10:32:52 +02:00
Jonas Jensen
7dab89ef56
C++: More details about lib implementation changes
...
This commit mostly restores the previous note about library changes but
avoids mentioning queries in the library section.
2020-04-17 10:32:28 +02:00
Jonas Jensen
9191190248
C++: Spaceship operator change note
2020-04-17 10:18:17 +02:00
Erik Krogh Kristensen
eca98b42d2
basic support for util.promisify for NodeJSFileSystemAccess
2020-04-17 09:54:37 +02:00
Erik Krogh Kristensen
ea0f6a367d
refactor into maybePromisified predicate
2020-04-17 09:50:08 +02:00
Dave Bartolomeo
c705797a2d
C++: IR construction for _Imaginary types
...
Includes a fairly exhaustive test case for arithmetic operations involving `_Complex` and/or `_Imaginary` types. Thanks to these new tests, I discovered that the extractor treats certain arithmetic operations on `_Imaginary` types as separate expression kinds, so I added support for those kinds in IR construction.
2020-04-16 11:58:09 -04:00
Mathias Vorreiter Pedersen
62e2ffe623
C++: Make PartialDefinitionNode private and add/update comments based on review comments
2020-04-16 17:19:12 +02:00
Tom Hvitved
1959480b78
C#: Field-flow summaries for library code
2020-04-16 15:20:47 +02:00
Dave Bartolomeo
3dd3b5304e
Merge remote-tracking branch 'upstream/master' into dbartol/floats
2020-04-16 08:44:41 -04:00
Taus
964a619450
Merge pull request #3211 from RasmusWL/python-unused-import-small-fix
...
Python: Fix FN in unused import
2020-04-16 14:22:50 +02:00
Taus
a92d926b56
Merge pull request #3218 from RasmusWL/python-add-missing-override
...
Python: Add missing override to ClassValue.hasAttribute
2020-04-16 14:06:23 +02:00
Taus Brock-Nannestad
2d8770d17c
Python: Fix remaining deprecation warnings.
2020-04-16 14:03:21 +02:00
Geoffrey White
24d7446976
C++: Basic model of '&' and '>>' in SimpleRangeAnalysis.
2020-04-16 11:17:29 +01:00
Geoffrey White
2acbdecfdb
C++: Add test cases.
2020-04-16 11:11:58 +01:00
Tom Hvitved
922e52f061
Merge pull request #3257 from hvitved/csharp/dataflow/tests
...
C#: Update data flow tests
2020-04-16 11:47:45 +02:00
Rasmus Wriedt Larsen
ab120ed7af
Python: Remove deprecated annotation for old PointsTo::points_to
...
We should only deprecate it when we're ready to deprecate the old refersTo and
all the old Object classes
2020-04-16 09:47:45 +02:00
Robert Marsh
d0e047186a
C++: add remote flow models for fread and gets
2020-04-15 18:01:04 -07:00
Robert Marsh
a006bd3117
C++: add model-based RemoteFlowSource
2020-04-15 17:46:00 -07:00
Dave Bartolomeo
2264ec714f
C++: Better type preservation in getVariableType()
...
`getVariableType()` is used to compute the actual semantic type of a variable from its declared type. That's where we handle pointer and function decay for parameters, and it's also where we handle arrays of unknown bound initialized with an initializer of known bound.
Previously, even if neither of the above situations applied, the type that we returned was the `getUnspecifiedType()` of the variable. This meant that, for example, `const char* p` would be treated as `char *`. This is inconsistent with how we handle types elsewhere in IR construction, where we preserve typedefs and cv-qualifiers when creating the `CppType` of an `IRVariable`, `Instruction`, or `Operand`.
The only visible effect this fix has is to fix the inferred result type for `Phi` instructions for variables affect by this change in `getVariableType()` behavior. Previously, we would see the variable accessed as both `const char*` and as `char*`, so we'd fall back to the canonical pointer type, which is `decltype(nullptr)`. Now, we see the same type for all accesses to the variable, so we use that type as the type of the SSA memory location and as the result type of the `Phi` instruction.
2020-04-15 18:41:24 -04:00
Dave Bartolomeo
90dc14c56e
C++/C#: Fix phantom Chi definitions in PrintSSA
...
When `PrintSSA.qll` is imported, IR dumps will be annotated with the alias analysis information used during SSA construction. When printing this information, we incorrectly treated instructions at offset -1, which should only be `Phi` instructions, as `Chi` instructions for the instruction at offset 0. This produced phantom annotations, but did not affect the correctness of the actual IR.
2020-04-15 18:24:11 -04:00
Mathias Vorreiter Pedersen
86ba03bea8
Merge pull request #3256 from Semmle/rdmarsh/cpp/add-qldoc-1
...
C++: Add QLdoc to some AST methods (Class.qll-Diagnostics.qll)
2020-04-15 21:46:36 +02:00
Erik Krogh Kristensen
69a16af152
Merge branch 'master' into Maps
2020-04-15 20:41:22 +02:00
Erik Krogh Kristensen
fd51142200
change succ in storeStep to be a SourceNode
2020-04-15 20:40:58 +02:00
Erik Krogh Kristensen
e8dc77d508
add support for util.promisify with child_process calls
2020-04-15 19:16:30 +02:00
Rasmus Wriedt Larsen
b179a0bdc2
Python: Add deprecated comment for FinalCustomPointsToFact
2020-04-15 16:59:07 +02:00
Rasmus Wriedt Larsen
5a51d2cc4c
Merge pull request #3245 from BekaValentine/python-objectapi-to-valueapi-wrongnameforargumentinclassinstantiation
...
Python: ObjectAPI to ValueAPI: WrongNameForArgumentInClassInstantiation
2020-04-15 16:48:26 +02:00
Rasmus Wriedt Larsen
390959713a
Merge pull request #3246 from BekaValentine/python-objectapi-to-valueapi-uselessclass
...
Python: ObjectAPI to ValueAPI: UselessClass
2020-04-15 16:45:02 +02:00
Jonas Jensen
7e67dcca6f
C++: Tidy up 1.24 change notes
...
- Merged the two notes for `cpp/uncontrolled-allocation-size` into one.
- Added note about renaming of a query id.
- Moved the use of IR in queries from the library section to the queries
section, rephrasing the note in terms of query results/performance
rather than library implementation.
- Grouped, without text changes, the three notes about the `Allocation`
library
- Grouped all the notes about standard-library models, abbreviating them
to eliminate the common text.
- Removed the note about `strlen` (#2647 ) since that should no longer
affect the results of queries or IR data flow after we started using
unsound IR for data flow.
2020-04-15 16:08:57 +02:00
Jonas Jensen
aa8f30cd83
Merge pull request #3268 from MathiasVP/ql-doc-negativitiy
...
C++: Add QLDoc to public predicates in Negativity.qll
2020-04-15 15:12:07 +02:00
Mathias Vorreiter Pedersen
3d0ac53266
Apply suggestions from code review
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2020-04-15 14:01:49 +02:00
Geoffrey White
b8acd702d6
C++: Rename the test for consistency.
2020-04-15 12:49:07 +01:00
Jonas Jensen
6eba3380dd
Merge pull request #3241 from geoffw0/alloc-size2
...
C++ Improvements to TaintedAllocationSize.ql
2020-04-15 12:58:19 +02:00
semmle-qlci
bfd80b42a7
Merge pull request #3260 from asger-semmle/js/location-tweaks
...
Approved by erik-krogh
2020-04-15 10:47:35 +01:00
Asger F
34d40b5035
Merge pull request #3237 from asger-semmle/js/sparse-capture
...
JS: Add CapturedVariableNode to avoid N^2 edges
2020-04-15 10:42:48 +01:00
Mathias Vorreiter Pedersen
f02feac33a
C++: Add flow from #3220
2020-04-15 11:34:19 +02:00
Asger Feldthaus
679259944f
JS: Address review comments
2020-04-15 10:27:32 +01:00
Geoffrey White
2aa64db40e
Merge remote-tracking branch 'upstream/rc/1.24' into alloc-size2
2020-04-15 10:09:54 +01:00
Mathias Vorreiter Pedersen
209e084820
Merge branch 'master' into ir-flow-fields
2020-04-15 10:51:45 +02:00
Mathias Vorreiter Pedersen
a2fbe9e9da
C++: Add QLDoc to public predicates in Negativity
2020-04-15 08:18:03 +02:00
Jonas Jensen
b603a3da64
Merge pull request #3259 from MathiasVP/ql-doc-fileclosed-loopbounds-memoryfreed
...
C++: QLDoc for FileClosed, LoopBounds and MemoryFreed
2020-04-15 08:08:04 +02:00
Jonas Jensen
6eac35c753
Merge pull request #3264 from Semmle/merge-rc/1.24
...
Merge rc/1.24 into master.
2020-04-15 07:56:58 +02:00
Jonas Jensen
ae11e7b72c
Merge pull request #3265 from Semmle/rdmarsh/cpp/deprecate-isDefined
...
C++: deprecate Declaration::isDefined()
2020-04-15 07:53:19 +02:00
Chris Gavin
4e981d8e70
Merge rc/1.24 into master.
2020-04-14 21:30:29 +01:00
Robert Marsh
146bfca2ad
Merge pull request #3254 from dbartol/dbartol/ImplicitReturnValue2
...
C++: Treat implicit end of body of non`-void` function as `Unreached`
2020-04-14 12:18:50 -07:00
Asger Feldthaus
1107e7c6a6
JS: Rename other uses of getURL
2020-04-14 19:45:09 +01:00
Dave Bartolomeo
279467654e
C++: Make test functions return void
2020-04-14 14:17:56 -04:00
Dave Bartolomeo
812087968f
C++: Fix test output
...
Mostly noise, but a couple of the missing operand errors are actual fixes.
2020-04-14 14:17:20 -04:00
Robert Marsh
b5c0a0f77d
C++: remove all uses of Declaration::isDefined
2020-04-14 10:54:06 -07:00
Robert Marsh
5ee60762fe
C++: deprecate Declaration::isDefined()
2020-04-14 10:49:52 -07:00
Robert Marsh
7f5b3de665
C++: autoformat
2020-04-14 10:36:53 -07:00
Robert Marsh
be81a1a8b3
Merge pull request #3255 from dbartol/dbartol/UnmodeledDefinition
...
C++: Connect `InitializeIndirection` to `UnmodeledDefinition`
2020-04-14 10:34:30 -07:00
Taus
8402e6a2e1
Merge pull request #3243 from BekaValentine/python-objectapi-to-valueapi-incorrectlyspecifiedoverriddenmethod
...
Python: ObjectAPI to ValueAPI: IncorrectlySpecifiedOverriddenMethod
2020-04-14 18:55:42 +02:00
Mathias Vorreiter Pedersen
092145d571
Update cpp/ql/src/Critical/FileClosed.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2020-04-14 18:38:33 +02:00
Dave Bartolomeo
125a09ce6e
C++: Fix IR generation of return of void expression
2020-04-14 11:40:33 -04:00
Dave Bartolomeo
95a6dd01c6
C#: Accept test output
2020-04-14 11:11:36 -04:00
Asger Feldthaus
6668a7a546
JS: Add backwards-compatible predicates to SocketIO
2020-04-14 15:57:19 +01:00
Dave Bartolomeo
83cd78c6cf
C++: Fix test output
2020-04-14 10:54:00 -04:00
Felicity Chapman
bc250506a1
Merge pull request #3227 from felicitymay/update-references
...
Update some out of date information
2020-04-14 14:56:05 +01:00
Asger F
c178eecd43
Update javascript/ql/src/semmle/javascript/Variables.qll
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-04-14 14:40:21 +01:00
Felicity Chapman
c570ebe5bd
Merge branch 'rc/1.24' into update-references
2020-04-14 14:10:26 +01:00
Geoffrey White
92187d9e71
C++: Change note.
2020-04-14 14:00:46 +01:00
Mathias Vorreiter Pedersen
721e9d532a
Merge pull request #2704 from rdmarsh2/rdmarsh/cpp/ir-flow-through-outparams
...
C++: IR dataflow edges through outparams
2020-04-14 14:20:34 +02:00
Taus
3e46604fa5
Merge pull request #3223 from BekaValentine/python-objectapi-to-valueapi-iterreturnsnoniterator
...
Python: ObjectAPI to ValueAPI: IterReturnsNonIterator
2020-04-14 12:55:21 +02:00
Taus
d9a2429de8
Merge pull request #3244 from BekaValentine/python-objectapi-to-valueapi-wrongnumberargumentsinclassinstantiation
...
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInClassInstantiation
2020-04-14 12:46:29 +02:00
semmle-qlci
e21164e5ac
Merge pull request #3258 from erik-krogh/NormalPathSanitizer-patch1
...
Approved by asgerf
2020-04-14 11:31:45 +01:00
semmle-qlci
52b76b1373
Merge pull request #3233 from RasmusWL/python-use-getAbsolutePath
...
Approved by BekaValentine
2020-04-14 10:43:24 +01:00
Mathias Vorreiter Pedersen
419b511ddb
C++: Format
2020-04-14 11:39:44 +02:00
semmle-qlci
2e95cab970
Merge pull request #3234 from RasmusWL/python-modenise-files
...
Approved by BekaValentine
2020-04-14 10:38:26 +01:00
Asger Feldthaus
3515a2b412
JS: Update test output
2020-04-14 10:31:31 +01:00
Asger Feldthaus
88667206fc
JS: Remove default hasLocationInfo case
2020-04-14 10:03:10 +01:00
Asger Feldthaus
5da968e34c
JS: Specialize ASTNode.getFile
2020-04-14 10:03:10 +01:00
Asger Feldthaus
244a304e1d
JS: Implement getFile() directly instead of via locations
2020-04-14 10:03:10 +01:00
Asger Feldthaus
dc084628cc
JS: Avoid the special name getURL
2020-04-14 10:03:09 +01:00
Erik Krogh Kristensen
6827b84bdc
change docstring to inline comment, and refer directly to array class
2020-04-14 10:32:16 +02:00
Erik Krogh Kristensen
e47575ce5b
more precise getChild for matching "../"
2020-04-14 10:24:08 +02:00
Mathias Vorreiter Pedersen
d8dcbe3cbd
C++: QLDoc for FileClosed, LoopBounds and MemoryFreed
2020-04-14 10:21:11 +02:00
Tom Hvitved
a9b88b6eaa
C#: Update data flow tests
2020-04-14 09:31:10 +02:00
Robert Marsh
10824f9612
C++: add method qldoc in Class.qll
2020-04-13 15:49:37 -07:00
Dave Bartolomeo
1bde11706e
C++: Connect InitializeIndirection to UnmodeledDefinition
...
The IR generation for `InitializeIndirection` currently connects its load operand to the result of the corresponding `InitializeParameter` instruction. This isn't exactly wrong, but it doesn't fit the IR invariant of "All unmodeled uses consume `UnmodeledDefinition`". Our current code doesn't care, because we just throw away all of the existing def-use information, modeled or otherwise, when we build unaliased SSA. However, some upcoming SSA changes don't work correctly if this invariant is broken.
I've added the trivial IR generation change, along with a new sanity query.
2020-04-13 18:37:47 -04:00
Dave Bartolomeo
603a3af19b
C++: Treat implicit end of body of non-void function as Unreached
...
When the extractor can't prove that control flow will never reach the end of a non-`void`-returning function without reaching an explicit `return` statement, it inserts an implicit `return` without an operand. If control actually reaches this point, the behavior is undefined.
We were previously generating invalid IR for these implicit `return` statements, because the lack of an operand meant that there was no definition of the return value variable along that path. Instead, I've changed the IR generation to emit an `Unreached` instruction for the implicit `return`. This ensures that we don't create a control flow edge from the end of the body to the function epilogue.
The change to the range analysis test avoids having that test depend on the previous bad IR behavior, while still preserving the original spirit of the test.
2020-04-13 18:09:44 -04:00
Robert Marsh
f24c4e51c5
C++: add method qldoc in Diagnostics.qll
2020-04-13 14:58:30 -07:00
Robert Marsh
d065389a6b
C++: add method commetns in Compilation.qll
2020-04-13 14:41:25 -07:00
Robert Marsh
de29d93ede
C++: add method qldoc for Comment.qll
2020-04-13 14:39:51 -07:00
Robert Marsh
8779177839
C++: accept minor test change
2020-04-13 14:03:02 -07:00
Robert Marsh
a5e7db73b2
Merge branch 'rc/1.24' into rdmarsh/cpp/ir-flow-through-outparams
...
For submodule consistency
2020-04-13 12:02:59 -07:00
Mathias Vorreiter Pedersen
cde34c9b1b
C++: Accept test output which I previously forgot to accept
2020-04-13 16:19:21 +02:00
Mathias Vorreiter Pedersen
daac5c5ab3
Merge branch 'master' into ir-flow-fields
2020-04-13 14:19:17 +02:00
Mathias Vorreiter Pedersen
945ecffd05
C++: Add charpred to ParameterNode
2020-04-13 14:18:57 +02:00
Pavel Avgustinov
7c5c9ea8ea
Merge pull request #3240 from Semmle/update-license-in-readme
...
Update README to reflect new license
2020-04-10 17:36:36 +01:00
Rebecca Valentine
8e91f10030
Python: ObjectAPI to ValueAPI: UselessClass: Adds preliminary modernization
2020-04-09 15:25:38 -07:00
Rebecca Valentine
339758fa70
Python: ObjectAPI to ValueAPI: WrongNameForArgumentInClassInstantiation: Adds preliminary modernization
2020-04-09 15:04:44 -07:00
Rebecca Valentine
8dc1933a02
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInClassInstantiation: Adds preliminary modernization
2020-04-09 14:58:30 -07:00
Rebecca Valentine
336e48c5c6
Python: ObjectAPI to ValueAPI: IncorrectlySpecifiedOverriddenMethod: Adds preliminary modernization
2020-04-09 14:50:26 -07:00
Rebecca Valentine
be00d71b99
Python: ObjectAPI to ValueAPI: IncorrectlyOverriddenMethod: Adds preliminary modernization
2020-04-09 14:41:22 -07:00
Rebecca Valentine
7a586c97a4
Python: ObjectAPI to ValueAPI: IterReturnsNonIterature: Replaces custom return_type predicate with call to getAnInferredReturnType
2020-04-09 14:30:40 -07:00
Dave Bartolomeo
9f18a15a93
Merge pull request #3231 from MathiasVP/qualified-static-calls-are-static
...
C++: Do not generate this parameters and read/write side effects from static member functions
2020-04-09 10:48:59 -04:00
Pavel Avgustinov
6737e99d65
Merge pull request #3209 from hmakholm/baselib-extractor
...
Add extractor field in base language QL packs
2020-04-09 15:24:49 +01:00
Mathias Vorreiter Pedersen
7f5330dd0a
Merge branch 'master' into ir-flow-fields
2020-04-09 16:08:44 +02:00
Geoffrey White
ba3a8d0872
C++: Improve naming and QLDoc.
2020-04-09 15:06:23 +01:00
Geoffrey White
a7979fdc12
C++: Base results purely on allocations now, not multiplications by a sizeof.
2020-04-09 15:05:29 +01:00
Geoffrey White
febbbc4423
C++: Additional test cases.
2020-04-09 15:03:35 +01:00
James Fletcher
6e88b6d4f4
Merge pull request #3239 from jf205/update-support-project
...
docs: Update support project to use fewer reusables
2020-04-09 14:18:55 +01:00
Geoffrey White
2f7ec49684
Merge pull request #3238 from MathiasVP/TlsSettingsMisconfiguration-id-no-underscores
...
C++: Replace underscores with dashes in query @id
2020-04-09 13:07:08 +01:00
Henry Mercer
5af7d5f03a
Update README to reflect new license
...
Per https://github.com/Semmle/ql/pull/3205 , code is now licensed under the MIT License.
2020-04-09 13:06:53 +01:00
Asger Feldthaus
c070416fbe
JS: Update test output
2020-04-09 12:24:11 +01:00
james
878109ccc4
docs: move language support into reusables folders
2020-04-09 12:20:27 +01:00
james
f7b3205cae
docs: move supported frameworks into single reusable
2020-04-09 12:19:58 +01:00
Mathias Vorreiter Pedersen
0c5bca8f4e
C++: Replace underscores with dashes in query @id
2020-04-09 12:09:15 +02:00
Asger Feldthaus
25d5cc78cb
JS: Use entry location instead of whole container
2020-04-09 09:18:26 +01:00
Asger Feldthaus
d9f81b082b
JS: Autoformat
2020-04-09 07:45:00 +01:00
Mathias Vorreiter Pedersen
6c7e1cdd46
C++: Make sure non-member functions are not reported to have a qualifier
2020-04-09 08:22:47 +02:00
luchua-bc
b7f2d32fb0
Address improper URL authorization
2020-04-08 22:41:11 -04:00
luchua-bc
e1a680cd86
Address improper URL authorization
2020-04-08 22:41:11 -04:00
Robert Marsh
3b591183c9
C++: remove partial flow from UnknownType
2020-04-08 17:09:30 -07:00
Robert Marsh
1199ff92e8
C++: autoformat
2020-04-08 16:41:29 -07:00
Robert Marsh
7e299e7494
C++/C#: Document ReturnIndirectionInstruction::getParameter
2020-04-08 16:41:07 -07:00
Robert Marsh
b37c13de91
C++: restore flow for non-class partial reads
...
This would otherwise have lost a good qltest result at
CWE-134/semmle/funcs/funcsLocal.c:58:9:58:10
2020-04-08 16:30:45 -07:00
Jonas Jensen
9f40886af9
C++: Don't allow taint out of a field read
...
except if it's from a union. This prevents field conflation through
buffers of `UnknownType`.
2020-04-08 14:02:33 -07:00
Robert Marsh
a0b26d66a4
C++: remove partial flow to IR loads
2020-04-08 13:56:56 -07:00
Robert Marsh
c38ccaaab6
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-04-08 12:32:35 -07:00
Asger Feldthaus
47934310ef
JS: Hide captured nodes in path explanations
2020-04-08 19:58:36 +01:00
semmle-qlci
404f7225a1
Merge pull request #3196 from asger-semmle/js/unnecessary-source-node-range
...
Approved by esbena
2020-04-08 18:44:02 +01:00
Rasmus Wriedt Larsen
a2440f0fcd
Python: Modernise semmle/python/dataflow/Files.qll
2020-04-08 16:53:19 +02:00
Rasmus Wriedt Larsen
32c04ad765
Python: Use getAbsolutePath() instead of deprecated getName()
2020-04-08 16:46:33 +02:00
James Fletcher
433794ef31
Merge pull request #3230 from jf205/tidy-up-branch
...
CodeQL docs: further updates to 'Learn CodeQL' project
2020-04-08 14:29:27 +01:00
Rasmus Wriedt Larsen
ac3acb9187
Python: Add more deprecated annotations
...
These classes/predicates are not used by anything in our codebase, and is using
deprecated classes/predicates, so I think it's safe to assume they should also
have been marked with the deprecated annotation.
Changes the QL compiler warnings with:
-WARNING: Type Configuration has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/dataflow/TaintTracking.qll:663,50-63)
-WARNING: Type Configuration has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/dataflow/TaintTracking.qll:666,19-32)
-WARNING: Type Configuration has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/dataflow/TaintTracking.qll:671,19-32)
-WARNING: Type Configuration has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/dataflow/TaintTracking.qll:733,16-39)
-WARNING: Type CustomPointsToAttribute has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/types/Extensions.qll:181,28-51)
-WARNING: Type CustomPointsToFact has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/types/Extensions.qll:155,60-78)
-WARNING: Type CustomPointsToFact has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/types/Extensions.qll:159,19-37)
-WARNING: Type CustomPointsToFact has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/types/Extensions.qll:41,33-51)
+WARNING: Type CustomPointsToFact has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/types/Extensions.qll:41,44-62)
2020-04-08 15:10:35 +02:00
yo-h
b25b6f7992
Merge pull request #3210 from yo-h/java14-ql
...
Java: dbscheme and library changes related to Java 14 extractor upgrade
2020-04-08 08:49:49 -04:00
Asger Feldthaus
5ab595da2e
JS: Autoformat
2020-04-08 12:40:00 +01:00
Mathias Vorreiter Pedersen
7298b68674
C++: Exclude 'this' params and read/write side effects from static member function calls through qualifiers, and accept tests
2020-04-08 13:35:26 +02:00
James Fletcher
2ffcf952ae
Apply suggestions from code review
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-04-08 12:28:01 +01:00
Felicity Chapman
07d9131256
Update docs/language/learn-ql/writing-queries/query-help.rst
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-04-08 12:14:40 +01:00
Mathias Vorreiter Pedersen
e4e0d3b573
C++: Add test cases showing that static member function calls get 'this' pointers and side effects for 'this' when accessed through qualifiers
2020-04-08 13:00:51 +02:00
james
6a1b11f9d1
docs: further updates to learn-codeql project
2020-04-08 11:59:40 +01:00
Felicity Chapman
eb89851025
Merge branch 'master' into update-references
2020-04-08 11:48:13 +01:00
James Fletcher
965235a3cf
Merge pull request #3229 from Semmle/jf205-patch-2
...
CodeQL docs: fix link text in 'CodeQL queries' map topic
2020-04-08 11:44:35 +01:00
James Fletcher
6b1406f1a8
Merge pull request #3226 from jf205/update-query-help-style-guide
...
docs: clarify 'query help' usage in 'Query help style guide'
2020-04-08 11:44:17 +01:00
Felicity Chapman
9db6b8f1e2
Update docs/language/learn-ql/writing-queries/query-help.rst
...
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2020-04-08 11:42:30 +01:00
Mathias Vorreiter Pedersen
b2759877cc
Merge pull request #3219 from jbj/DefaultTaintTracking-partial-no-structs
...
C++: Avoid partial chi flow to struct/class
2020-04-08 12:31:53 +02:00
Shati Patel
fa6705aeb6
Merge pull request #3228 from shati-patel/docs-qhelp
...
Docs: Change "Qhelp" to "Query help"
2020-04-08 11:26:26 +01:00
James Fletcher
df1b450248
Update writing-queries.rst
2020-04-08 11:25:36 +01:00
Shati Patel
92aee59ca5
Change "Qhelp" to "Query help"
2020-04-08 10:43:40 +01:00
Felicity Chapman
dacbc1376c
Update some out of date information
2020-04-08 10:36:04 +01:00
Asger Feldthaus
4ca3ac5ee9
JS: Add another warning
2020-04-08 10:30:45 +01:00
Asger F
4acb9da2cf
Update javascript/ql/src/semmle/javascript/frameworks/LazyCache.qll
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-04-08 10:30:21 +01:00
Asger Feldthaus
171b131eb1
JS: Add test for SourceNode not depending on flowsTo
2020-04-08 10:23:47 +01:00
Jonas Jensen
6726a23c31
Merge pull request #3221 from disconnect3d/patch-1
...
Fix missing colon in ReturnConstTypeMember.cpp
2020-04-08 11:22:31 +02:00
James Fletcher
d055e666f7
Merge pull request #3225 from jf205/merge-docs-preparation-master
...
CodeQL docs: Merge `docs-preparation` into `master`
2020-04-08 09:50:54 +01:00
James Fletcher
6ca8653551
Apply suggestions from code review
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-04-08 09:49:56 +01:00
James Fletcher
7bf0d3d10a
Update docs/language/learn-ql/writing-queries/introduction-to-queries.rst
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-04-08 09:38:18 +01:00
james
ff599a5ef3
docs: html -> HTML
2020-04-08 09:33:05 +01:00
james
7a3b310d8d
docs: clarify 'query help' usage
2020-04-08 09:26:19 +01:00
Rasmus Wriedt Larsen
004523ad50
Merge pull request #3222 from BekaValentine/python-objectapi-to-valueapi-overlycomplexdelmethod
...
Python: ObjectAPI to ValueAPI: OverlyComplexDelMethod
2020-04-08 09:28:04 +02:00
james
407e91ce75
Merge branch 'docs-preparation' into merge-docs-preparation-master
2020-04-08 08:24:17 +01:00
Mathias Vorreiter Pedersen
d65c52d281
Merge branch 'master' into ir-flow-fields
2020-04-08 09:16:42 +02:00
Jonas Jensen
42e9d1416b
Merge pull request #3206 from geoffw0/newfreefix
...
C++: Fix `cpp/new-free-mismatch` false positives
2020-04-08 08:39:43 +02:00
Rebecca Valentine
c2443f2342
Python: ObjectAPI to ValueAPI: OverlyComplexDelMethod: Adds preliminary modernization
2020-04-07 21:31:35 -07:00
Rebecca Valentine
0d65db148f
Python: ObjectAPI to ValueAPI: IterReturnsNonIterator: Adds preliminary modernization
2020-04-07 21:14:25 -07:00
yo-h
2b3ad6042b
Java 14: update supported language version in docs
2020-04-07 22:22:10 -04:00
yo-h
9a79e3be2c
Java 14: add PREVIEW FEATURE notes to QLDoc
2020-04-07 22:22:10 -04:00
yo-h
697b273e32
Java 14: update expected test output
2020-04-07 22:22:10 -04:00
yo-h
e12de3b021
Java 14: add dbscheme upgrade script for records
2020-04-07 22:22:09 -04:00
yo-h
70e09ddb88
Java 14: add dbscheme stats for records
2020-04-07 22:22:08 -04:00
yo-h
662cff8316
Java 14: add class Record to Type.qll
2020-04-07 22:22:08 -04:00
yo-h
e1787f58aa
Java 14: add isRecord relation to dbscheme
2020-04-07 22:22:08 -04:00
yo-h
b763342277
Java 14: account for instanceof pattern matching
2020-04-07 22:22:07 -04:00
yo-h
9d2f76849b
Java 14: switch expressions are no longer in preview
2020-04-07 22:22:07 -04:00
Rebecca Valentine
1d4f341b16
Merge branch 'master' into python-objectapi-to-valueapi-wrongnumberargumentsincall
2020-04-07 13:33:25 -07:00
Disconnect3d
96a0bddcf6
Update ReturnConstTypeMember.cpp
2020-04-07 22:30:57 +02:00
Geoffrey White
7fedac3266
C++: Fix apparently noncritical typo.
2020-04-07 20:56:07 +01:00
Geoffrey White
50194f372b
C++: Autoformat.
2020-04-07 20:54:54 +01:00
Mathias Vorreiter Pedersen
52b179aee5
Merge branch 'master' into ir-flow-fields
2020-04-07 21:27:17 +02:00
Calum Grant
4c7d413fa4
C#: Address review comment.
2020-04-07 19:58:48 +01:00
Asger Feldthaus
1f496d3c6b
JS: Add CapturedVariableNode
2020-04-07 19:02:46 +01:00
Jonas Jensen
a0992aac93
Merge pull request #3062 from geoffw0/alloc-size
...
C++: Improve hasUpperBoundsCheck
2020-04-07 19:31:04 +02:00
Geoffrey White
2686d9888c
C++: Add QLDoc.
2020-04-07 18:12:24 +01:00
Geoffrey White
66a0b7884e
Merge branch 'master' into alloc-size
2020-04-07 17:12:35 +01:00
Geoffrey White
ff39f714e8
C++: Autoformat.
2020-04-07 17:07:31 +01:00
Robert Marsh
0ccf39777c
Merge pull request #3189 from jbj/DefaultTaintTracking-Configuration
...
C++: Path explanations in DefaultTaintTracking
2020-04-07 08:38:10 -07:00
Jonas Jensen
39911af56b
C++: Avoid partial chi flow to struct/class
...
Flow through partial chi-instruction operands was introduced to make
definition-by-reference work, but its implementation also allowed all
other partial writes to propagate. In particular, tainting a field would
taint the whole struct, which in turn led to taint propagating across
unrelated fields of a struct.
The security test `CWE-134/semmle/argv/argvLocal.c` shows that we also
want to propagate taint from an array element to the whole array, and it
also seems right to propagate taint from a union member to the whole
union.
2020-04-07 16:24:24 +02:00
Mathias Vorreiter Pedersen
d56284fe8f
C++: Move added flow from simpleLocalFlowStep to simpleInstructionLocalFlowStep and remove flow that could cause field conflation
2020-04-07 16:00:40 +02:00
Mathias Vorreiter Pedersen
8928091dfb
Merge pull request #3181 from jbj/DefaultTaintTracking-qldoc
...
C++: QLDoc in DefaultTaintTracking
2020-04-07 14:58:21 +02:00
Jonas Jensen
057155f28f
Merge remote-tracking branch 'upstream/master' into DefaultTaintTracking-Configuration
2020-04-07 14:39:30 +02:00
Rasmus Wriedt Larsen
7af5f038ab
Python: Add missing override to ClassValue.hasAttribute
...
I was considering if this was actually something different than
Value.hasAttribute, and the names were just accidentially the same. But after
looking at the definition for Value, I'm happy about marking this as an
override (I did not test whether it was neede though):
```codeql
class Value extends TObject {
...
/** Holds if this value has the attribute `name` */
predicate hasAttribute(string name) { this.(ObjectInternal).hasAttribute(name) }
```
2020-04-07 14:02:53 +02:00
Jonas Jensen
9a1c2d83af
Merge pull request #3205 from Semmle/lic/MIT
...
Relicense under MIT
2020-04-07 13:24:12 +02:00
Pavel Avgustinov
6fc814632c
Relicense under MIT
2020-04-07 12:03:26 +01:00
Calum Grant
abf6be6030
C#: Avoid qualifying explicit interface implementations.
2020-04-07 11:17:35 +01:00
Calum Grant
9ec0c8f3ec
C#: Qualify type parameters with the entity that declares them
2020-04-07 11:17:35 +01:00
Calum Grant
39eb1a3825
C#: Remove assembly qualifier from some trap-ids.
2020-04-07 11:17:34 +01:00
Mathias Vorreiter Pedersen
5719967a8e
C++: Remove single-field case from PostUpdateNode and accept tests
2020-04-07 12:03:28 +02:00
Rasmus Wriedt Larsen
befe73df14
Python: supress non-useful results (w/ tests) for iter str/seq query
...
Fixes https://github.com/Semmle/ql/issues/3207
2020-04-07 11:46:36 +02:00
Rasmus Wriedt Larsen
94ccc16f85
Python: iter str/seq query gives non-useful results with tests
2020-04-07 11:46:35 +02:00
Rasmus Wriedt Larsen
46ecbef8f2
Python: Consistenly use TestScope instead of Test
...
It's not clear which one is the correct to use, but there were more uses of
TestScope than Test, so I'm assuming that is the right one ¯\_(ツ)_/¯
2020-04-07 11:42:13 +02:00
Rasmus Wriedt Larsen
2871eb307a
Python: Fix (some) shortcomings of tests filter
2020-04-07 11:24:06 +02:00
Rasmus Wriedt Larsen
6ed7b3dd92
Python: Add tests to illustrate shortcomings of current tests filter
2020-04-07 11:22:16 +02:00
Rasmus Wriedt Larsen
75e6470009
Python: Fix FN in py/unused-import
2020-04-07 09:41:42 +02:00
Rasmus Wriedt Larsen
1077ce3a35
Python: Add FN for py/unused-import
2020-04-07 09:26:14 +02:00
Tom Hvitved
6685a5ed4d
Merge pull request #3136 from calumgrant/cs/buildless-extraction
...
C#: Improvements to buildless extraction
2020-04-07 08:52:00 +02:00
Tom Hvitved
bacb11a563
Merge pull request #3150 from calumgrant/cs/enable-nullability
...
C#: Enable nullability for Autobuilder and Utils projects
2020-04-07 08:51:43 +02:00
Rebecca Valentine
c1ba1345df
Python: ObjAPI to ValAPI: WrongNumArgsInCall: ObjectAPI.qll: Adds doc for getAnInferredType
2020-04-06 11:03:42 -07:00
Jonas Jensen
db0d8bbb40
Merge pull request #3208 from geoffw0/issue44
...
C++: Add test cases more similar to issues/44.
2020-04-06 19:40:24 +02:00
Rebecca Valentine
16eedf9ea5
Merge branch 'master' into python-objectapi-to-valueapi-wrongnumberargumentsincall
2020-04-06 10:35:49 -07:00
Jonas Jensen
0743c42807
Merge remote-tracking branch 'upstream/master' into dataflow-indirect-args
...
Accepted test results that were in semantic merge conflict between
these branches. The changed results are due to a bug that that's part of
https://github.com/github/codeql-c-analysis-team/issues/35 .
2020-04-06 19:26:08 +02:00
Henning Makholm
d1ff3211ef
Add extractor fields to test qlpack.yml files.
2020-04-06 19:21:41 +02:00
Henning Makholm
bf579dedd4
Add extractor field in base language QL packs
2020-04-06 18:48:01 +02:00
Geoffrey White
d5accc70e1
C++: Add a test similar to issues/44.
2020-04-06 16:47:24 +01:00
Jonas Jensen
e37aab5002
C++: Suppress FieldAddressInstruction taint
...
See code comment. This fixes false positives on openjdk/jdk.
2020-04-06 16:14:26 +02:00
Jonas Jensen
3b76509159
C++: Test DefaultTaintTracking field conflation
2020-04-06 16:13:41 +02:00
Geoffrey White
a71ae2b468
C++: Consistent treatment of placement new.
2020-04-06 14:54:15 +01:00
Geoffrey White
492c5f367f
C++: Simplify NewDelete.qll.
2020-04-06 14:54:15 +01:00
semmle-qlci
e5d3286ee9
Merge pull request #3183 from asger-semmle/js/bad-url-scheme-check
...
Approved by esbena
2020-04-06 14:53:15 +01:00
Mathias Vorreiter Pedersen
c577541850
C++: Fix reverse read dataflow consistency failure and accept tests
2020-04-06 15:50:08 +02:00
Geoffrey White
050e239507
C++: Change note.
2020-04-06 14:39:07 +01:00
Geoffrey White
cbe133d0e6
C++: Deprecate freeCall in the legacy wrapper Alloc.qll.
2020-04-06 14:32:49 +01:00
Geoffrey White
e223557201
C++: Wean NewDelete.qll off the legacy wrapper Alloc.qll.
2020-04-06 14:32:15 +01:00
Calum Grant
0d86866ba3
Merge pull request #3160 from hvitved/csharp/null-maybe-fp
...
C#: Add false-positive test for NullMaybe.ql
2020-04-06 14:30:31 +01:00
Geoffrey White
8059d69bbd
C++: Model calls to operator new / delete for NewFreeMismatch.ql.
2020-04-06 14:27:05 +01:00
Geoffrey White
3e9f9645ae
C++: Exclude calls to operator new / delete from NewFreeMismatch.ql.
2020-04-06 14:08:00 +01:00
Geoffrey White
97cdcbee63
C++: Test for NewFreeMismatch.ql with operator new / delete.
2020-04-06 13:57:28 +01:00
Jonas Jensen
bf7614a4c9
C++: Move Expr location workaround to Expr.qll
...
This workaround from `DataFlowUtil.qll` should be useful for any query
that selects an `Expr`. In particular, it's useful for IR data flow.
This commit does not include test changes.
2020-04-06 14:13:22 +02:00
Calum Grant
6cce0de9b2
Merge pull request #3124 from hvitved/csharp/dataflow/sources-and-sinks
...
C#: Introduce `RemoteFlowSink` class
2020-04-06 12:36:14 +01:00
Asger Feldthaus
7da0345c6a
JS: Autoformat
2020-04-06 12:30:04 +01:00
Asger Feldthaus
2c6beadf68
JS: Recognize more forms of scheme checks
2020-04-06 12:30:03 +01:00
Jonas Jensen
d4338473b0
C++: Enforce unique enclosing callable
...
Every data-flow node should have a unique enclosing function (_callable_
in the terminology of the data-flow library), but this was not evident
for the optimizer, and it led to a bad join order in `pathStep`. This
commit fixes the join order for C++ AST data flow. All other copies of
data flow seem to be fine.
These are the tuple counts for OpenJDK before this commit:
(231s) Tuple counts for DataFlowImplLocal::pathStep#fffff#cur_delta:
5882 ~0% {6} r1 = SCAN DataFlowImplLocal::PathNodeMid#class#ffffff#prev_delta AS I OUTPUT I.<2>, I.<0>, I.<1>, I.<3>, I.<4>, I.<5>
1063406780 ~0% {7} r2 = JOIN r1 WITH DataFlowImplCommon::CallContext::relevantFor_dispred#ff AS R ON FIRST 1 OUTPUT r1.<2>, R.<1>, r1.<1>, r1.<0>, r1.<3>, r1.<4>, r1.<5>
5882 ~1% {6} r3 = JOIN r2 WITH DataFlowUtil::Node::getFunction_dispred#ff AS R ON FIRST 2 OUTPUT r2.<0>, r2.<6>, r2.<2>, r2.<3>, r2.<4>, r2.<5>
105 ~0% {5} r4 = JOIN r3 WITH project#DataFlowImplLocal::LocalFlowBigStep::localFlowBigStep#ffffff_021#join_rhs AS R ON FIRST 2 OUTPUT r3.<2>, r3.<3>, r3.<4>, r3.<5>, R.<2>
5882 ~1% {6} r5 = JOIN r2 WITH DataFlowUtil::Node::getFunction_dispred#ff AS R ON FIRST 2 OUTPUT r2.<5>, r2.<2>, r2.<0>, r2.<3>, r2.<4>, r2.<6>
5882 ~0% {6} r6 = JOIN r5 WITH DataFlowImplLocal::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r5.<2>, false, r5.<5>, r5.<1>, r5.<3>, r5.<4>
0 ~0% {5} r7 = JOIN r6 WITH DataFlowImplLocal::LocalFlowBigStep::localFlowBigStep#ffffff_02413#join_rhs AS R ON FIRST 3 OUTPUT R.<4>, r6.<3>, r6.<4>, r6.<5>, R.<3>
0 ~0% {5} r8 = JOIN r7 WITH DataFlowImplLocal::TNil#ff AS R ON FIRST 1 OUTPUT r7.<1>, r7.<2>, r7.<3>, R.<1>, r7.<4>
105 ~0% {5} r9 = r4 \/ r8
The problem is that `DataFlowUtil::Node::getFunction_dispred#ff`
(`getEnclosingCallable`) is joined too late.
After this commit, the tuple counts look like this:
(13s) Tuple counts for DataFlowImplLocal::pathStep#fffff#cur_delta:
5882 ~1% {6} r1 = SCAN DataFlowImplLocal::PathNodeMid#class#ffffff#prev_delta AS I OUTPUT I.<1>, I.<0>, I.<2>, I.<3>, I.<4>, I.<5>
5882 ~3% {7} r2 = JOIN r1 WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT r1.<2>, R.<1>, r1.<1>, r1.<0>, r1.<3>, r1.<4>, r1.<5>
5882 ~1% {6} r3 = JOIN r2 WITH DataFlowImplCommon::CallContext::relevantFor_dispred#ff AS R ON FIRST 2 OUTPUT r2.<3>, r2.<6>, r2.<2>, r2.<0>, r2.<4>, r2.<5>
105 ~0% {5} r4 = JOIN r3 WITH project#DataFlowImplLocal::LocalFlowBigStep::localFlowBigStep#ffffff_021#join_rhs AS R ON FIRST 2 OUTPUT r3.<2>, r3.<3>, r3.<4>, r3.<5>, R.<2>
5882 ~1% {6} r5 = JOIN r2 WITH DataFlowImplCommon::CallContext::relevantFor_dispred#ff AS R ON FIRST 2 OUTPUT r2.<5>, r2.<2>, r2.<3>, r2.<0>, r2.<4>, r2.<6>
5882 ~0% {6} r6 = JOIN r5 WITH DataFlowImplLocal::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r5.<2>, false, r5.<5>, r5.<1>, r5.<3>, r5.<4>
0 ~0% {5} r7 = JOIN r6 WITH DataFlowImplLocal::LocalFlowBigStep::localFlowBigStep#ffffff_02413#join_rhs AS R ON FIRST 3 OUTPUT R.<4>, r6.<3>, r6.<4>, r6.<5>, R.<3>
0 ~0% {5} r8 = JOIN r7 WITH DataFlowImplLocal::TNil#ff AS R ON FIRST 1 OUTPUT r7.<1>, r7.<2>, r7.<3>, R.<1>, r7.<4>
105 ~0% {5} r9 = r4 \/ r8
There is a slight slowdown coming from the introduction of a new
predicate `DataFlowImplLocal::pathStep#fffff#join_rhs`, which is used
only in the standard order:
(12s) Tuple counts for DataFlowImplLocal::pathStep#fffff#join_rhs:
282057 ~0% {2} r1 = SCAN DataFlowImplCommon::CallContext::relevantFor_dispred#ff AS I OUTPUT I.<1>, I.<0>
9159890 ~1% {2} r2 = JOIN r1 WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r1.<1>
return r2
The evaluation of `unique` is cheap but not free:
DataFlowUtil::Node::getEnclosingCallable_dispred#ff .............. 3.9s
DataFlowUtil::Node::getEnclosingCallable_dispred#ff_10#join_rhs .. 3.5s
The first of these two predicates evaluates `unique`, and the second
simply reorders columns. They take about the same time, which suggests
that `unique` is about as fast as it can be, given the number of tuples
it needs to push around. Note that the column reordering predicate is
only needed because of the standard order.
2020-04-06 12:04:39 +02:00
Mathias Vorreiter Pedersen
3aa293210d
C++: Ensure that only non-conflated chi instructions are used everywhere
2020-04-06 12:02:56 +02:00
James Fletcher
5034d40e64
Merge pull request #3203 from jf205/sd-55
...
CodeQL support docs: combine table and footnotes into single snippet
2020-04-06 09:52:02 +01:00
james
d2b0599b63
docs: combine table and footnotes
2020-04-06 09:27:30 +01:00
Jonas Jensen
46fc91315b
Java/C++/C#: Revert the join order fix from #2872
...
This revert brings back the performance problems in
`DataFlowImplLocal.qll` so they can be fixed in a different way. The fix
in #2872 was asymptotically good but had undesired overhead because it
introduced another predicate in the SCC that existed purely for join
ordering.
I did the revert by inlining the helper predicate, eliminating the
`enclosing` variable, and re-ordering the resulting lines to what they
were before #2872 .
2020-04-06 10:04:50 +02:00
Robert
1096e5d947
Merge pull request #3163 from robertbrignull/code_scanning_suites
...
Add code-scanning suites
2020-04-06 08:45:40 +01:00
Rasmus Wriedt Larsen
4ce3d5b748
Merge pull request #3040 from BekaValentine/python-objectapi-to-valueapi-iterreturnsnonself
...
Python: ObjectAPI to ValueAPI: IterReturnsNonSelf
2020-04-06 09:37:40 +02:00
Tom Hvitved
c8c706a0ba
C#: Un-deprecate PublicCallableParameterFlowSource
2020-04-06 09:01:44 +02:00
Mathias Vorreiter Pedersen
317734f41e
C++: Attach PostUpdateNodes to Chi nodes following aschackmull's suggestion
2020-04-05 22:35:26 +02:00
Jonas Jensen
530d4294b0
Merge remote-tracking branch 'upstream/master' into DefaultTaintTracking-Configuration
2020-04-05 07:27:07 +02:00
Jonas Jensen
58366b19e9
C++: Path explanations in the last two queries
...
For some reason I thought that these two queries were special because
they manipulate `SecurityOptions` to change the taint-tracking sources.
It turns out it was just the opposite: the queries used to be special
because they invalidated the cache for the `tainted` predicate, but that
predicate is no longer used, so these queries are no longer special.
2020-04-04 16:47:06 +02:00
Jonas Jensen
54a23a486a
C++: Accept test changes for 108d5177b8
2020-04-04 16:46:59 +02:00
Jonas Jensen
d7332644f0
C++: Fix DefinitionByReferenceNode.toString
...
This predicate now has a value also for calls to function pointers.
2020-04-04 15:31:01 +02:00
Jonas Jensen
108d5177b8
C++: Fix two bugs found by @rdmarsh2
...
Co-Authored-By: Robert Marsh <rdmarsh2@gmail.com >
2020-04-04 15:24:44 +02:00
Rebecca Valentine
01aac8273c
Python: ObjAPI to ValAPI: WrongNumArgsInCall: Update queries to use objectapi
2020-04-04 03:11:25 -07:00
Rebecca Valentine
8c1aeb24cb
Python: ObjAPI to ValAPI: WrongNumArgsInCall: Updates query expected results
2020-04-04 00:57:09 -07:00
Rebecca Valentine
88be3359ac
Python: ObjAPI to ValAPI: WrongNumForArgsInCall: Update affected queries to use objectapi
2020-04-04 00:15:10 -07:00
Rebecca Valentine
26bdb9ab04
Python: ObjAPI to ValAPI: WrongNumArgsInCall: Exceptions.qll: Removes extraneous spaces in comments
2020-04-03 20:33:17 -07:00
Rebecca Valentine
bbe7314c17
Python: ObjAPI to ValAPI: WrongNumArgsInCall: Autoformats ObjectAPI.qll
2020-04-03 20:30:24 -07:00
Rebecca Valentine
7615452b31
Python: ObjAPI to ValAPI: WrongNumArgsInCall: Autoformat CallArgs.qll
2020-04-03 20:28:19 -07:00
Rebecca Valentine
1e76720a92
Merge branch 'master' into python-objectapi-to-valueapi-wrongnumberargumentsincall
2020-04-03 20:25:53 -07:00
Rebecca Valentine
e0f26d4f7e
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInCall: Updates expected results
2020-04-03 20:11:42 -07:00
Rebecca Valentine
f25428b7a9
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInCall: Exceptions.qll: Fixes incorrect implementation of localRaisedType
2020-04-03 20:08:00 -07:00
Rebecca Valentine
c6fbbb1cd1
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInCall: CallArgs.qll: Fixes too_*_args refs to getA*Call
2020-04-03 20:06:43 -07:00
Rebecca Valentine
2ad0f5af2d
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInCall: ObjectAPI.qll: Adds getAFunctionCall and getAMethodCall predicates to FunctionValue
2020-04-03 20:04:32 -07:00
Rebecca Valentine
be86c9c066
Python: ObjectAPI to ValueAPI: IterReturnsNonSelf: ObjectAPI.qll: Explains why getAnInferredReturnType is weird for builtins
2020-04-03 15:16:16 -07:00
Rebecca Valentine
64b17888e5
Python: ObjectAPI to ValueAPI: IterReturnsNonSelf: ObjectAPI.qll: Reorganizes getAnInferredReturnType()
2020-04-03 15:14:25 -07:00
Robert Marsh
316d932829
Merge pull request #3198 from MathiasVP/valuenumbering-provider-new-file
...
C++/C#: Prevent accidental import of ValueNumberPropertyProvider
2020-04-03 13:31:11 -07:00
Grzegorz Golawski
1d8da905ac
Make the test runnable via codeql test run
2020-04-03 21:44:13 +02:00
ggolawski
79d7ea36ff
Update java/ql/src/experimental/Security/CWE/CWE-016/SpringBootActuators.qll
...
Co-Authored-By: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-04-03 21:36:34 +02:00
Jonas Jensen
bb3616e4c4
C++: Add example for globalVarFromId
2020-04-03 17:51:35 +02:00
semmle-qlci
a8098a2b2d
Merge pull request #3197 from erik-krogh/NormalPathSanitizer
...
Approved by asgerf
2020-04-03 16:33:18 +01:00
Jonas Jensen
5822cd7b84
C++: Put paths in the remaining LGTM-suite queries
2020-04-03 17:10:47 +02:00
Jonas Jensen
3ec1f691c2
C++: First query with flow-paths through globals
2020-04-03 16:45:00 +02:00
Jonas Jensen
aaebe3687e
C++: Fix copy-paste error in convertedExprNode
2020-04-03 16:37:23 +02:00
Jonas Jensen
469bdae9b2
C++: More helpful toString for def. by ref. node
2020-04-03 16:37:23 +02:00
Jonas Jensen
36da2d1dae
C++: Manipulate the source end of paths too
...
Without this, we get duplicate alerts in some cases and
unnatural-looking source nodes in other cases. The source nodes were
often `Conversion`s.
2020-04-03 16:37:23 +02:00
Jonas Jensen
e916f07a8e
C++: Formatting fixups
2020-04-03 15:52:13 +02:00
Jonas Jensen
427815d3d1
C++: taintedWithPath QLDoc + simplification
2020-04-03 15:52:13 +02:00
Jonas Jensen
3653627650
C++: Let configuration class extend singleton
2020-04-03 15:52:13 +02:00
Erik Krogh Kristensen
9c2053168b
writing out the truth table for DotDotSlashPrefixRemovingReplace
2020-04-03 15:46:47 +02:00
Tom Hvitved
8d81b885c6
C#: Unset Platform env variable when invoking vcvarsall.bat
2020-04-03 14:47:34 +02:00
semmle-qlci
676da02118
Merge pull request #3192 from asger-semmle/js/missing-await-not-delete
...
Approved by esbena
2020-04-03 13:21:48 +01:00
Shati Patel
a93aafcab5
Merge pull request #3194 from shati-patel/50-intro-to-ql
...
Docs: Include "Introduction to QL" in tutorial topic
2020-04-03 12:12:00 +01:00
Tom Hvitved
4e2d6c0250
C#: Add missing QL doc
2020-04-03 12:45:56 +02:00
Mathias Vorreiter Pedersen
c54cddead1
C++: Include PrintValueNumbering in testcase
2020-04-03 12:42:06 +02:00
Calum Grant
adde52d33c
C#: Add missing files
2020-04-03 11:22:50 +01:00
Jonas Jensen
16c7a35b1c
Merge pull request #3195 from geoffw0/taintstring
...
C++: Model taint flow through std::string constructor and c_str()
2020-04-03 12:05:07 +02:00
Erik Krogh Kristensen
94751c1b31
dst can be relative for "../" replace call
2020-04-03 11:08:31 +02:00
Calum Grant
6a26a6542a
C#: Remove a function.
2020-04-03 09:42:25 +01:00
semmle-qlci
dc774e0eac
Merge pull request #3166 from erik-krogh/DeadLocal
...
Approved by asgerf
2020-04-03 09:36:20 +01:00
Tom Hvitved
08fbd1d2ad
C#: Update change notes
2020-04-03 10:25:46 +02:00
Geoffrey White
73bfd819d9
C++: Rename classes.
2020-04-03 09:23:31 +01:00
Geoffrey White
1bcf187c3e
C++: Rename Strings.qll -> StdString.qll.
2020-04-03 09:17:33 +01:00
Mathias Vorreiter Pedersen
1e73528102
C++/C#: Add synchronization
2020-04-03 10:08:00 +02:00
Mathias Vorreiter Pedersen
0b12c1519b
C++/C#: Sync identical files
2020-04-03 10:06:37 +02:00
Mathias Vorreiter Pedersen
0f70944a5b
C++: Move ValueNumberPropertyProvider into its own file to prevent accidental imports
2020-04-03 09:55:41 +02:00
Erik Krogh Kristensen
e46cde17a1
add a "../" removing taint-step for js/path-injection
2020-04-03 09:42:05 +02:00
Shati Patel
b267df0077
Address review comments + make article intro consistent with map topic
2020-04-03 00:02:14 +01:00
Robert Marsh
a8e191248e
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
...
Merge IR SSA test additions
2020-04-02 15:30:20 -07:00
Grzegorz Golawski
6ca963a8c8
Fix
2020-04-03 00:30:02 +02:00
Grzegorz Golawski
f05b2af69d
Move to experimental
2020-04-03 00:27:51 +02:00
Asger Feldthaus
ffbbdd7779
JS: Autoformat
2020-04-02 23:04:24 +01:00
Asger Feldthaus
93971e9433
JS: Make local flow not depend on SourceNode
2020-04-02 23:03:29 +01:00
Asger Feldthaus
346867f425
JS: Remove Import->SourceNode dependency from AMD
2020-04-02 23:03:29 +01:00
Asger Feldthaus
3804d3fcfd
JS: Remove Import->SourceNode dependency from lazy cache
2020-04-02 23:03:20 +01:00
Robert Marsh
fd915bb5b1
C++: fix join order in IR virtual dispatch
2020-04-02 14:56:11 -07:00
Grzegorz Golawski
cffe89f652
Merge branch 'master' into java-spring-boot-actuators
2020-04-02 22:06:25 +02:00
Calum Grant
9481fada51
C#: Address review comments.
2020-04-02 20:29:45 +01:00
Rebecca Valentine
2a7b77c0e1
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInCall: Adds new version of FunctionObject.qll
2020-04-02 12:18:07 -07:00
Rebecca Valentine
161613f59e
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInCall: Adds new version of Exceptions.qll
2020-04-02 12:17:14 -07:00
Rebecca Valentine
6517feda9a
Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInCall: Adds new version of ObjectsAPI.qll
2020-04-02 11:56:15 -07:00
Geoffrey White
c9ec30fa2a
C++: Update use of deprecated methods.
2020-04-02 19:49:42 +01:00
Geoffrey White
e9132d833c
C++: Autoformat.
2020-04-02 19:49:42 +01:00
Geoffrey White
ab716ebe75
C++: Change note.
2020-04-02 19:49:42 +01:00
Geoffrey White
73171682b7
C++: Switch to taint flow as suggested in the old PR.
2020-04-02 19:49:41 +01:00
Geoffrey White
b14b52d0ac
C++: Add models for std::string (as in old PR).
2020-04-02 19:49:41 +01:00
Geoffrey White
69f6790c83
C++: Add a test of taint through std::strings, based on the one in the old PR.
2020-04-02 19:49:31 +01:00
Erik Krogh Kristensen
845020d2ae
change getReceiver to getAMethodCall
2020-04-02 20:28:27 +02:00
Erik Krogh Kristensen
2c0bae4937
Apply suggestions from code review
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-04-02 20:28:04 +02:00
Rebecca Valentine
712fb8badc
Python: ObjectAPI to ValueAPI: IterReturnsNonSelf: Autoformats
2020-04-02 09:19:41 -07:00
Shati Patel
26f15b8978
Include "Introduction to QL" in tutorial topic
2020-04-02 17:19:29 +01:00
Rebecca Valentine
cdda80623d
Merge branch 'master' into python-objectapi-to-valueapi-iterreturnsnonself
2020-04-02 09:16:23 -07:00
Jonas Jensen
604731ba6b
Merge pull request #3171 from MathiasVP/init-dynamic-alloc-newexpr
...
C++: Emit InitializeDynamicAllocation instructions for NewExpr and NewArrayExpr
2020-04-02 17:37:05 +02:00
Mathias Vorreiter Pedersen
ce5d8d516f
Merge branch 'master' into ir-flow-fields
2020-04-02 15:23:00 +02:00
Mathias Vorreiter Pedersen
e2908eaf63
C++: Add comment explaining why we can split call and allocation side effects
2020-04-02 15:11:13 +02:00
Mathias Vorreiter Pedersen
a273917e51
Merge branch 'master' into init-dynamic-alloc-newexpr
2020-04-02 14:11:03 +02:00
Jonas Jensen
4825774ce2
Merge pull request #3173 from geoffw0/opnew
...
C++: Support operator new and operator delete in models library
2020-04-02 14:01:10 +02:00
Mathias Vorreiter Pedersen
dda3aaa8aa
C++: Add QLDoc to public classes and predicates
2020-04-02 14:00:33 +02:00
Anders Schack-Mulligen
01157e43e3
Merge pull request #2899 from p-/cwe-036
...
Java: Calling openStream on URLs created from remote source can lead to file disclosure
2020-04-02 13:55:06 +02:00
Asger Feldthaus
8f930fc3e6
JS: Remove recursive SourceNode from AngularJS
2020-04-02 12:25:33 +01:00
Asger Feldthaus
ee106b1103
JS: Remove tautological SourceNode::Range subclasses
2020-04-02 12:21:17 +01:00
semmle-qlci
6757924183
Merge pull request #3157 from tausbn/python-fix-analysis-qhelp-link
...
Approved by felicitymay
2020-04-02 11:43:15 +01:00
Asger Feldthaus
3a9d047cf5
JS: Ignore delete expressions in js/missing-await
2020-04-02 11:35:09 +01:00
Asger Feldthaus
ccce0205b4
JS: Add test
2020-04-02 11:34:07 +01:00
Shati Patel
926d3d0968
Merge pull request #3190 from shati-patel/53-ql-reference
...
Docs: Change "handbook" to "reference"
2020-04-02 11:11:55 +01:00
Taus
d540bf6ce5
Merge pull request #3039 from BekaValentine/python-objectapi-to-valueapi-returnvalueignored
...
Python: ObjectAPI to ValueAPI: ReturnValueIgnored
2020-04-02 11:42:01 +02:00
Shati Patel
2d602720c1
Docs: Change "handbook" to "reference"
2020-04-02 10:32:12 +01:00
Mathias Vorreiter Pedersen
af9e05b9cd
C++: Accept test
2020-04-02 10:57:11 +02:00
Geoffrey White
ead5feb921
C++: Autoformat.
2020-04-02 09:50:14 +01:00
semmle-qlci
32cf0f14dc
Merge pull request #3179 from asger-semmle/js/underscore_int_literals
...
Approved by erik-krogh
2020-04-02 09:48:41 +01:00
Mathias Vorreiter Pedersen
020c273dc9
Merge branch 'master' into ir-flow-fields
2020-04-02 10:45:58 +02:00
Peter Stöckli
ca80bfda4f
Fix tags
2020-04-02 07:43:55 +02:00
Mathias Vorreiter Pedersen
8fdc4b037a
C++: Ensure that no call side effect is an allocation side effect
2020-04-02 07:30:56 +02:00
Robert Marsh
a061811939
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
...
Pick up new test for user-defined swap functions
2020-04-01 17:32:55 -07:00
Robert Marsh
bbb69d524e
Merge pull request #3188 from geoffw0/swap4
...
C++: Add a user defined swap function to taint tests.
2020-04-01 17:28:46 -07:00
Robert Marsh
8e89c379f5
Merge pull request #1319 from geoffw0/av114
...
CPP: Improve locations for AV Rule 114.ql.
2020-04-01 16:48:21 -07:00
Rebecca Valentine
cc53b15a5d
Python: ObjectAPI to ValueAPI: ReturnValueIgnored: Reorganizes predicates
2020-04-01 14:41:49 -07:00
Taus
bd41bb59ec
Merge pull request #3032 from BekaValentine/python-objectapi-to-valueapi-signatureoverriddenmethod
...
Python: ObjectAPI to ValueAPI: SignatureOverriddenMethod
2020-04-01 23:03:27 +02:00
Shati Patel
c9061f45f0
Merge pull request #3186 from shati-patel/51-move-go-docs
...
Docs: Copy "CodeQL for Go" docs into this repo
2020-04-01 21:39:32 +01:00
Rebecca Valentine
09349f1957
Python: ObjectAPI to ValueAPI: ReturnValueIgnored: Autoformats
2020-04-01 12:54:42 -07:00
Rebecca Valentine
28319ee0f7
Python: ObjectAPI to ValueAPI: SignatureOverriddenMethod: Autoformats
2020-04-01 12:32:21 -07:00
Jonas Jensen
207c76b855
C++: Path explanations in DefaultTaintTracking
...
The first three queries are migrated to use path explanations.
2020-04-01 20:51:05 +02:00
Erik Krogh Kristensen
75b183bc33
update expected output
2020-04-01 20:46:49 +02:00
Erik Krogh Kristensen
32b86ab91a
autoformat
2020-04-01 20:44:47 +02:00
Jonas Jensen
b07380d2eb
C++: Update ppReprType for C++ IR dataflow
...
I forgot to do this in b1be123e31 . Without this change, we suffix
` : void` on very step of an IR path explanation.
2020-04-01 20:19:00 +02:00
Geoffrey White
6b5f4d9e12
Merge branch 'master' into av114
2020-04-01 18:23:21 +01:00
James Fletcher
698252236b
Merge pull request #3184 from jf205/migration-28
...
CodeQL docs: update query console link text
2020-04-01 18:20:24 +01:00
Geoffrey White
7a98919879
C++: Add a non-standard swap to taint tests.
2020-04-01 17:14:38 +01:00
Peter Stöckli
36c351dc68
Add input from documentation review
2020-04-01 17:59:45 +02:00
Rebecca Valentine
838e37ca98
Python: ObjectAPI to ValueAPI: ReturnValueIgnore: Moves getAnInferredType to CallableObjectInternal
2020-04-01 08:45:27 -07:00
Shati Patel
e83bee2f02
Copy Go docs into this repo
2020-04-01 16:43:52 +01:00
Geoffrey White
452d1d084f
Add details about query tagging to supported-queries.md
...
Add some details about query tagging (see https://wiki.semmle.com/display/IN/Query+tags and https://wiki.semmle.com/display/IN/Modelling+CWEs+at+Semmle ).
2020-04-01 16:36:06 +01:00
James Fletcher
1ba7a4d39b
Update docs/language/learn-ql/introduction-to-ql.rst
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-04-01 16:09:28 +01:00
James Fletcher
aea2957570
Update docs/language/learn-ql/java/dataflow.rst
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-04-01 16:09:04 +01:00
Shati Patel
48a09ce1c0
Merge pull request #3178 from shati-patel/21-ql-language
...
[Migration prep] Docs: "QL language reference" category
2020-04-01 16:07:17 +01:00
Shati Patel
a514cecdf4
Fix sidebar title
2020-04-01 15:44:07 +01:00
Geoffrey White
8d3d088ae8
Merge branch 'master' into opnew
2020-04-01 15:43:32 +01:00
Rebecca Valentine
97b4077162
Merge branch 'master' into python-objectapi-to-valueapi-signatureoverriddenmethod
2020-04-01 07:42:10 -07:00
Rebecca Valentine
12377badf9
Merge branch 'master' into python-objectapi-to-valueapi-returnvalueignored
2020-04-01 07:37:17 -07:00
Rasmus Wriedt Larsen
0b09bfe2d8
Merge pull request #3180 from tausbn/python-a-few-more-autoformats
...
Python: Fix up (hopefully) the last file that needs autoformatting.
2020-04-01 16:36:11 +02:00
james
4d9cc8b3e0
docs: small change to query metadata table
2020-04-01 15:31:04 +01:00
Shati Patel
e246b6b9e3
Move links into different section
2020-04-01 15:26:03 +01:00
james
500f49d565
docs: fix a few more links
2020-04-01 15:22:42 +01:00
Shati Patel
0771c39294
Update docs/language/ql-handbook/about-the-ql-language.rst
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-04-01 15:21:11 +01:00
james
d9f04a8da4
docs: update query console link text
2020-04-01 15:11:05 +01:00
Geoffrey White
d71098d178
Merge branch 'master' into opnew
2020-04-01 15:00:26 +01:00
Jonas Jensen
9a55d42639
C++: QLDoc in DefaultTaintTracking
...
These docs are mostly copied and adapted from
`DefaultTaintTrackingImpl.qll`.
2020-04-01 15:30:31 +02:00
Geoffrey White
119d4a40a0
C++: Fix unintended consequence in IR.
2020-04-01 14:29:28 +01:00
Mathias Vorreiter Pedersen
fa7dc32dee
C++: Remove dependency on implementation of models in TranslatedCall
2020-04-01 14:46:52 +02:00
Erik Krogh Kristensen
957b60f84b
split fuzzy read/writes on collections into 2 pseudo-properties
2020-04-01 14:25:41 +02:00
Taus Brock-Nannestad
554bb76746
Python: Fix up (hopefully) the last file that needs autoformatting.
2020-04-01 14:16:35 +02:00
Erik Krogh Kristensen
b1bf7f9f3d
introduce pseudoProperty helper predicates
2020-04-01 14:08:56 +02:00
Taus
2dbb16e2db
Merge pull request #3177 from RasmusWL/python-minor-doc-fix
...
Python: Add missing ` in qldoc
2020-04-01 13:50:08 +02:00
Shati Patel
79068d5e68
Update link
2020-04-01 12:33:45 +01:00
Asger Feldthaus
541ff40d24
JS: Bump extractor version string
2020-04-01 12:26:30 +01:00
Asger Feldthaus
b5e110e39e
JS: Fix value of numeric literals containing underscores
2020-04-01 12:24:42 +01:00
Asger Feldthaus
9888f15a29
JS: Add test showing root cause of problem
2020-04-01 12:21:27 +01:00
Asger Feldthaus
2d864aaf1b
JS: Add failing test
2020-04-01 12:21:25 +01:00
Shati Patel
27408c2584
Delete QL spec articles and add README
2020-04-01 12:03:00 +01:00
Shati Patel
c08f730bcd
Delete "About QL" and references to it
2020-04-01 11:51:57 +01:00
Shati Patel
51f4575479
Include spec and "About QL" in reference sphinx project
2020-04-01 11:45:56 +01:00
Erik Krogh Kristensen
59840149e8
introduce a PseudoProperty type in Collections.qll
2020-04-01 12:16:09 +02:00
Rasmus Wriedt Larsen
f8f51109d0
Python: Add missing ` in qldoc
2020-04-01 12:07:19 +02:00
Erik Krogh Kristensen
b2b009cdd9
qldoc adjustment
2020-04-01 11:34:25 +02:00
Erik Krogh Kristensen
1be326a37b
add a CopyStep type-tracking step, for loadStoreSteps that loads and stores the same property
2020-04-01 11:21:05 +02:00
Erik Krogh Kristensen
9fc8ed17cd
remove unused import
2020-04-01 11:18:11 +02:00
Erik Krogh Kristensen
a188c6f804
qldoc changes and renaming
2020-04-01 11:12:54 +02:00
Tom Hvitved
42e180d6c4
Merge pull request #3060 from aschackmull/dataflow/no-param-to-same-param-flow
...
Dataflow: Exclude param-param flow through with identical params.
2020-04-01 09:42:12 +02:00
Rebecca Valentine
093eb71433
Python: ObjectAPI to ValueAPI: ReturnValueIgnored: Adds getAReturnType
2020-04-01 00:17:12 -07:00
Rebecca Valentine
eb4a567a34
Merge branch 'master' into python-objectapi-to-valueapi-signatureoverriddenmethod
2020-03-31 23:36:15 -07:00
Rebecca Valentine
eab31d3bef
Python: ObjectAPI to ValueAPI: SignatureOverriddenMethod: Updates expected results
2020-03-31 23:34:17 -07:00
Rebecca Valentine
0256eb15bf
Merge branch 'master' into python-objectapi-to-valueapi-wrongnumberargumentsincall
2020-03-31 22:58:11 -07:00
Rebecca Valentine
741317bd05
Python: ObjectAPI to ValueAPI: Makes isAbstract a predicate in CallArgs
2020-03-31 22:56:44 -07:00
Rebecca Valentine
0b2db56051
Python: ObjectAPI to ValueAPI: ObjectAPI.qll: Fixes error in isIterator
2020-03-31 22:15:21 -07:00
Rebecca Valentine
42388b0d97
Python: ObjectAPI to ValueAPI: ReturnValueIgnored: Adds prototype version of getAnInferredReturnType
2020-03-31 22:11:58 -07:00
Robert Marsh
b579e6aabe
C++: accept consistency test output
2020-03-31 12:56:52 -07:00
Robert Marsh
25f3f67c4a
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
...
Fixes test conflicts and reveals a bug in parameter handling
2020-03-31 12:54:00 -07:00
Erik Krogh Kristensen
49a8a48a72
autoformat
2020-03-31 20:27:05 +02:00
Mathias Vorreiter Pedersen
f06ae6e9de
C++: Accept more test output
2020-03-31 19:49:04 +02:00
Geoffrey White
f430cf9d18
C++: Use hasGlobalName.
2020-03-31 18:11:09 +01:00
Geoffrey White
49f8f24d0d
Merge pull request #3128 from jbj/library-overview-assignment
...
C++: Add AssignExpr + Initializer to library overview page
2020-03-31 18:02:11 +01:00
Peter Stöckli
60d5ed9c79
Input from Review
2020-03-31 18:30:00 +02:00
Mathias Vorreiter Pedersen
97061716f9
C++: Accept test output
2020-03-31 17:10:33 +02:00
Mathias Vorreiter Pedersen
291df97cd9
C++: Also add InitializeDynamicAllocation instruction for NewArrayExpr
2020-03-31 17:06:19 +02:00
Shati Patel
e5ad708390
Merge pull request #3172 from shati-patel/merge-master-docs
...
Merge "master" into "docs-preparation" branch
2020-03-31 15:58:27 +01:00
Calum Grant
9a5e80667e
C#: Address review comments.
2020-03-31 15:21:51 +01:00
Mathias Vorreiter Pedersen
b6f93746bf
C++: Accept test output
2020-03-31 16:00:56 +02:00
Geoffrey White
aa13257c1b
C++: Correct QLDoc.
2020-03-31 14:37:54 +01:00
Shati Patel
ba1a0da2ab
Merge branch 'master' into merge-master-docs
2020-03-31 13:09:18 +01:00
Tom Hvitved
4ca5e3755f
C#: Add false-positive test for NullMaybe.ql
2020-03-31 14:06:16 +02:00
Erik Krogh Kristensen
cec2cd3b14
update expected output
2020-03-31 14:05:05 +02:00
Alexander Eyers-Taylor
ca9b892519
Merge pull request #3143 from ginsbach/the
...
Uniqueness aggregate in handbook and reference
2020-03-31 13:01:20 +01:00
Mathias Vorreiter Pedersen
94f5468504
C++: Accept tests
2020-03-31 13:56:47 +02:00
Mathias Vorreiter Pedersen
bd89ee13d1
C++: Add InitializeDynamicAllocation instruction to NewExpr and NewArrayExpr
2020-03-31 13:56:32 +02:00
Erik Krogh Kristensen
64c813612f
autoformat
2020-03-31 13:56:01 +02:00
Geoffrey White
a75e249112
C++: Autoformat test.
2020-03-31 12:55:45 +01:00
Geoffrey White
18e60fabaf
C++: Model operator delete and operator delete[].
2020-03-31 12:55:44 +01:00
Erik Krogh Kristensen
8ae55fb1c4
add top level QLDoc to MapAndSet.qll
2020-03-31 13:55:34 +02:00
Erik Krogh Kristensen
45797dc729
autoformat
2020-03-31 13:53:00 +02:00
Shati Patel
01ad297eb0
Merge pull request #3170 from shati-patel/21-ql-language
...
CodeQL docs: Update intros in QL handbook and QL spec
2020-03-31 12:39:37 +01:00
Shati Patel
5bf0a087d0
Update docs/language/ql-handbook/queries.rst
...
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2020-03-31 12:25:23 +01:00
Shati Patel
a0158b3917
Update intros in QL handbook
2020-03-31 11:31:41 +01:00
Mathias Vorreiter Pedersen
688464a00f
C++: Add testcases with new and accept output
2020-03-31 12:22:07 +02:00
Jonas Jensen
7b7ff1fb3a
Merge pull request #3089 from geoffw0/sideeffect
...
CPP: Add side effect models for strcpy and strcat.
2020-03-31 12:11:04 +02:00
Erik Krogh Kristensen
3784b180d8
changes based on review
2020-03-31 12:07:55 +02:00
Geoffrey White
3b12d1adfd
C++: Test getPlacementArgument().
2020-03-31 11:06:21 +01:00
Geoffrey White
254c877d0a
C++: Deduplicate AllocationExprs.
2020-03-31 11:05:50 +01:00
Geoffrey White
259f714d91
C++: Model operator new and operator new[].
2020-03-31 11:02:52 +01:00
Geoffrey White
ef68bd6bf4
C++: Add a test of direct calls to operator new / operator dedelete.
2020-03-31 11:01:29 +01:00
Geoffrey White
aa49b35d2c
C++: Add an explicit test of DeallocationFunction and DeallocationExpr as well.
2020-03-31 10:37:20 +01:00
Erik Krogh Kristensen
546431c83d
dataflow and typetracking steps for Maps and Sets
2020-03-31 11:21:34 +02:00
Erik Krogh Kristensen
25aea900b6
add more dataflow steps for Arrays
2020-03-31 11:21:25 +02:00
Erik Krogh Kristensen
a02213e745
change LoadStoreStep such that it can store in different property
2020-03-31 11:20:57 +02:00
semmle-qlci
0feb7f87e4
Merge pull request #2761 from erik-krogh/UrlSearch
...
Approved by asgerf
2020-03-31 09:46:48 +01:00
semmle-qlci
5c920eb625
Merge pull request #3120 from asger-semmle/js/prefer-typescript-file
...
Approved by esbena
2020-03-31 09:32:14 +01:00
semmle-qlci
73dd4c8686
Merge pull request #3133 from asger-semmle/js/dictionary-taint-step-regression
...
Approved by esbena
2020-03-31 09:28:55 +01:00
Erik Krogh Kristensen
40fd1825e9
autoformat
2020-03-31 09:08:32 +02:00
Jonas Jensen
93f7c950ea
Merge pull request #3152 from dbartol/dbartol/sync-files
...
Move `sync-identical-files.py` into public repo as `sync-files.py`
2020-03-31 08:31:00 +02:00
Taus
e31143c9f8
Merge pull request #2889 from RasmusWL/python-add-custom-sanitizer-example
...
Python: Add example for how to write your own sanitizer
2020-03-30 22:59:56 +02:00
Robert Marsh
4bbf4628d4
Merge pull request #3162 from jbj/argHasPostUpdate-cpp
...
C++: Remove noise from argHasPostUpdate check
2020-03-30 13:20:09 -07:00
Geoffrey White
0cb7d4c82d
C++: Add an explicit test of AllocationFunction and AllocationExpr.
2020-03-30 20:28:21 +01:00
semmle-qlci
3027e5d316
Merge pull request #3161 from Semmle/max-schaefer-patch-1
...
Approved by felicitymay
2020-03-30 19:44:06 +01:00
Erik Krogh Kristensen
7938bc4ed0
improve alert message for js/useless-assignment-to-local
2020-03-30 20:19:50 +02:00
Geoffrey White
b634b59b9c
C++: Merge the two allocators tests.
2020-03-30 18:52:12 +01:00
Peter Stöckli
40c3b5468f
Fix QHelp/XML syntax
2020-03-30 18:55:14 +02:00
Rasmus Wriedt Larsen
6127d8b8f4
Python: Fixup comment alignment
2020-03-30 18:32:31 +02:00
Rasmus Wriedt Larsen
fad03e77cc
Python: Move helper predicate outside of class
...
otherwise the helper predicate can (and sometimes will) be evaluated once _per_
instance of that class.
2020-03-30 18:31:16 +02:00
Rasmus Wriedt Larsen
663dc24753
Python: Apply suggestion from Taus
...
rewrote the qldoc to explain it as well.
2020-03-30 18:29:08 +02:00
Jonas Jensen
531ef64c5d
C++: Fix other copies of the argHasPostUpdate test
2020-03-30 17:45:53 +02:00
Rasmus Wriedt Larsen
0b4bfed726
Merge pull request #3156 from tausbn/python-autoformat-all-ql-files
...
Python: Autoformat all `.ql` files.
2020-03-30 16:24:18 +02:00
Rasmus Wriedt Larsen
573494d313
Merge pull request #3096 from tausbn/python-autoformat-almost-everything
...
Python: Autoformat (almost) all `.qll` files.
2020-03-30 16:19:23 +02:00
Jonas Jensen
dd322be238
C++: Remove noise from argHasPostUpdate check
...
This consistency check seems to have value for AST data flow, but I've
disabled it on the IR for now.
This commit also includes two unrelated changes that seem to fix a
semantic merge conflict.
2020-03-30 15:51:11 +02:00
Max Schaefer
365751412c
Docs: Bump supported Go version.
...
cf https://github.com/github/codeql-go/pull/39
2020-03-30 14:24:22 +01:00
Geoffrey White
6d6ad4a0ae
Merge branch 'master' into sideeffect
2020-03-30 14:16:23 +01:00
Taus Brock-Nannestad
b990fac97b
Python: Fix test failures.
...
How could the tests fail because of autoformatting, you may ask?
The answer is deprecation warnings. These specify the location of the deprecated
entity, and due to autoformatting these moved around.
2020-03-30 13:55:38 +02:00
Taus Brock-Nannestad
2229e34466
Python: Fix outdated link in ImportFailure.qhelp.
2020-03-30 13:14:37 +02:00
semmle-qlci
fce04f0bd0
Merge pull request #3127 from erik-krogh/PromiseTrack
...
Approved by asgerf
2020-03-30 11:56:33 +01:00
Tom Hvitved
9fa9c10361
Merge pull request #2921 from aschackmull/dataflow/consistency-checks
...
Java: Add data-flow consistency checks.
2020-03-30 12:47:41 +02:00
Taus Brock-Nannestad
ab4cef53c2
Python: Autoformat one final straggler.
2020-03-30 12:36:43 +02:00
Taus Brock-Nannestad
727cde31c9
Python: Autoformat a few final stragglers.
2020-03-30 12:30:14 +02:00
Taus Brock-Nannestad
6eb9c6f84d
Merge branch 'master' into python-autoformat-almost-everything
2020-03-30 12:24:01 +02:00
Asger Feldthaus
a317b87b81
JS: Fix perf issue in DictionaryTaintStep
2020-03-30 11:23:47 +01:00
James Fletcher
675144cd3d
Merge pull request #3146 from jf205/tidy-up-docs-prep
...
CodeQL docs: tidy up 'docs-preparation' branch following pre-migration work
2020-03-30 11:10:28 +01:00
Anders Schack-Mulligen
caf0d1528f
Merge pull request #3155 from max-schaefer/add-module-comment
...
Data flow: Add module doc comment for `TaintTrackingImpl.qll`
2020-03-30 12:07:08 +02:00
Taus Brock-Nannestad
87a9f51c78
Python: Autoformat all .ql files.
2020-03-30 11:59:10 +02:00
James Fletcher
0f0dc3c2ae
Update docs/language/learn-ql/python/ql-for-python.rst
...
Co-Authored-By: Alistair <54933897+hubwriter@users.noreply.github.com >
2020-03-30 10:48:23 +01:00
Max Schaefer
e5e94e3357
Data flow: Add module doc comment for TaintTrackingImpl.qll
...
Modelled after the correponding comment for `DataFlowImpl.qll`.
2020-03-30 10:35:47 +01:00
Taus
b4fbfa029e
Merge pull request #3132 from RasmusWL/python-fix-iterable-unpacking-taint-CP
...
Python: Fix iterable-unpacking taint CP
2020-03-30 11:22:03 +02:00
Erik Krogh Kristensen
f55005a0ec
more precise warning message for implicit string/number conversions
2020-03-30 11:17:56 +02:00
Anders Schack-Mulligen
b2769b42ed
Merge pull request #3117 from adityasharad/java/jackson-taint-steps
...
Java: Add taint steps through Jackson serialization methods.
2020-03-30 10:34:56 +02:00
Anders Schack-Mulligen
57c9277601
Merge pull request #3142 from MathiasVP/no-magic-in-parameterThroughFlowCand
...
Data flow: No magic in returnFlowCallableCand
2020-03-30 10:15:48 +02:00
Dave Bartolomeo
6b24e3c8be
C++: Fix formatting
2020-03-29 08:18:05 -04:00
Dave Bartolomeo
3eef2747d5
Fix LGTM alerts
2020-03-29 03:12:27 -04:00
Dave Bartolomeo
0952064eb3
Move sync-identical-files.py into public repo as sync-files.py
...
We currently use a script to keep certain duplicate QL files in sync across the repo. For historical reasons, this script has lived in the private repo alongside the rest of CodeQL, even though it's only used for files in the public `ql` repo. This PR moves the script into the public `ql` repo. It is still invoked by Jenkins scripts that live in the private repo during CI, but it can also be invoked directly without having a checkout of the private repo. This is useful for anyone who is modifying the dataflow or IR libraries with only a QL checkout.
2020-03-29 02:59:14 -04:00
luchua-bc
000d894d99
Include Gradle Logging
2020-03-28 14:00:28 -04:00
Mathias Vorreiter Pedersen
7fce4ce9d1
Include join order fix from #3142
2020-03-28 12:34:05 +01:00
Dave Bartolomeo
434e11c0c5
C++: Fix test output
2020-03-27 19:47:08 -04:00
Dave Bartolomeo
39dd9b7099
C++/C#: Fix formatting
2020-03-27 19:46:53 -04:00
luchua-bc
048a33e143
Remove user ids from the check since they get logged a lot and are less sensitive
2020-03-27 19:40:00 -04:00
Dave Bartolomeo
c3a6ca0d9a
C++: Better support for complex numbers in IR and AST
...
This PR adds better support for differentiating complex and imaginary floating-point types from real floating-point types, in both the AST and in the IR type system.
*AST Changes*
- Introduces the new class `TypeDomain`, which can be either `RealDomain`, `ImaginaryDomain` or `ComplexDomain`. "type domain" is the term used for this concept in the C standard, and I couldn't think of a better one.
- Introduces `FloatingPointType.getDomain()`, to get the type domain of the type.
- Introduces `FloatingPointType.getBase()`, to get the numeric base of the type (either 2 or 10).
- Introduces three new subtypes of `FloatingPointType`: `RealNumberType`, `ComplexNumberType`, and `ImaginaryNumberType`, which differentiate between the types based on their type domain. Note that the decimal types (e.g., `_Decimal32`) are included in `RealNumberType`.
- Introduces two new subtypes of `FloatingPointType`: `BinaryFloatingPointType` and `DecimalFloatingPointType`, which differentiate between the types based on their numeric base, independent of type domain.
*IR Changes*
- `IRFloatingPointType` now has two additional parameters: the base and the type domain.
- New test that ensures that C++ types get mapped to the correct IR types.
- New IR test that verifies the IR for some basic usage of complex FP types.
2020-03-27 18:08:14 -04:00
Calum Grant
69041bc959
C#: Enable nullability in Autobuilder.
2020-03-27 20:26:38 +00:00
Nick Rolfe
1baf5df342
Merge pull request #3147 from dbartol/dbartol/FloatLiterals
...
C++: Fix test expectations for complex literals
2020-03-27 18:15:06 +00:00
Robert Brignull
90fad6f762
add code scanning suites
2020-03-27 17:03:23 +00:00
Shati Patel
28e5904079
Merge pull request #3149 from Semmle/jf205-patch-2
...
Change 'Set Literals' to 'Set literals'
2020-03-27 16:47:58 +00:00
James Fletcher
2c571d3655
Update language.rst
2020-03-27 16:40:48 +00:00
Jonas Jensen
710eb0cab9
C++: Replace "min = max" with "unique"
...
With the new `unique` aggregate added to QL, we can express directly
what the "min = max" pattern emulates.
Replacing "min and max" with `unique` might in general lead to fewer
results, but that happens only in cases where the aggregate expression
has multiple values. For the three predicates changed in this commit,
that should only happen on malformed databases.
2020-03-27 17:15:09 +01:00
Peter Stöckli
c6688eb349
Fix OpenStream documentation
2020-03-27 17:08:49 +01:00
Peter Stöckli
3de00443ff
Review feeback for OpenStream
2020-03-27 17:06:58 +01:00
Rasmus Wriedt Larsen
d55acc38df
Python: Constrain execution paths for taint_at_depth
...
Thanks Taus!
2020-03-27 16:20:08 +01:00
Erik Krogh Kristensen
4864e77430
Merge branch 'master' of git.semmle.com:Semmle/ql into UrlSearch
2020-03-27 15:59:29 +01:00
Philip Ginsbach
a91a5c3db9
"aggregation yields" => "query returns"
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-03-27 14:50:41 +00:00
Philip Ginsbach
23e4ae3f49
"and hence" => ", so"
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-03-27 14:50:07 +00:00
Philip Ginsbach
3406ee72ee
Update docs/language/ql-handbook/expressions.rst
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-03-27 14:49:45 +00:00
Philip Ginsbach
811bc01d1e
the `expression => <expression>`
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-03-27 14:49:23 +00:00
Philip Ginsbach
c91c3f24a0
fixed typo "the the"
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-03-27 14:47:57 +00:00
Dave Bartolomeo
3039aaf4f3
C++: Fix test expectations for complex literals
2020-03-27 10:33:19 -04:00
Shati Patel
0b62a1d980
Merge pull request #3144 from ginsbach/setliteralhandbook
...
Mention set literals in handbook
2020-03-27 14:25:56 +00:00
Peter Stöckli
5e62a6bebe
Move CWE-036 directory to experimental
2020-03-27 15:10:15 +01:00
Peter Stöckli
74fc416a35
Merge branch 'master' into cwe-036
2020-03-27 14:54:41 +01:00
Erik Krogh Kristensen
0ebbd80745
autoformat
2020-03-27 14:54:34 +01:00
Philip Ginsbach
73845923aa
Update docs/language/ql-handbook/expressions.rst
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2020-03-27 13:34:20 +00:00
Philip Ginsbach
90b82a0905
unique in aggregate section
2020-03-27 13:09:35 +00:00
Henning Makholm
875a70c0a3
Merge pull request #3129 from ginsbach/master
...
Set Literal in QL
2020-03-27 14:02:55 +01:00
Philip Ginsbach
d979bd958b
better wording for the unique aggregate
2020-03-27 13:01:50 +00:00
james
a6cfdfe8e3
docs: small change to codeql training landing page
2020-03-27 13:00:26 +00:00
james
b4b1903642
docs: simplify 'learning codeql' landing page
2020-03-27 13:00:26 +00:00
james
76f344638e
docs: 'What's new' -> 'Further reading'
2020-03-27 13:00:26 +00:00
james
deb657acdb
docs: tidy up 'codeql for x' pages
...
Manually construct tocs including intro text.
Fix a few intros and titles.
2020-03-27 13:00:00 +00:00
Philip Ginsbach
05be9b82a2
better wording for type compatibilit
2020-03-27 12:56:37 +00:00
Philip Ginsbach
135a288bed
Update docs/language/ql-handbook/expressions.rst
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-03-27 12:55:42 +00:00
semmle-qlci
fad902fc9b
Merge pull request #3095 from erik-krogh/MorePerf
...
Approved by asgerf
2020-03-27 12:51:37 +00:00
Mathias Vorreiter Pedersen
5ba5791ec6
C++: Only allow flow through non-conflated chi instructions
2020-03-27 13:37:17 +01:00
Mathias Vorreiter Pedersen
580310f321
Merge branch 'master' into ir-flow-fields
2020-03-27 13:32:26 +01:00
semmle-qlci
9b3400337b
Merge pull request #3130 from erik-krogh/PreciseSteps
...
Approved by asgerf
2020-03-27 12:18:28 +00:00
Philip Ginsbach
1b4df6e24c
whitespace fix
2020-03-27 11:53:19 +00:00
Philip Ginsbach
8e873f35ac
mention set literals in handbook
2020-03-27 11:51:03 +00:00
Philip Ginsbach
f9442211bf
unique aggregate in handbook and reference
2020-03-27 11:31:25 +00:00
Mathias Vorreiter Pedersen
7890a322c8
C++/C#/Java: Sync identical files
2020-03-27 11:51:38 +01:00
Mathias Vorreiter Pedersen
9ab8580ca7
Data flow: No magic in parameterThroughFlowCand
2020-03-27 11:51:10 +01:00
Rasmus Wriedt Larsen
8aadb8bd06
Python: Fix iterable-unpacking tests
2020-03-27 11:42:37 +01:00
semmle-qlci
1975a83cdd
Merge pull request #3116 from max-schaefer/js/postgres-type-tracking
...
Approved by asgerf
2020-03-27 09:23:52 +00:00
Erik Krogh Kristensen
58af63d8cc
add test case for XSS on url suffix
2020-03-27 10:02:24 +01:00
Erik Krogh Kristensen
d3e1a258fa
autoformat
2020-03-27 09:34:56 +01:00
Erik Krogh Kristensen
be11418c77
autoformat
2020-03-27 00:18:41 +01:00
Robert Marsh
968ddc6274
Merge pull request #3137 from jbj/DefaultTaintTracking-argv
...
C++: Never track flow out of an argv argument
2020-03-26 15:29:52 -07:00
Calum Grant
b94b4b7c91
C#: Fix tests
2020-03-26 20:40:40 +00:00
Calum Grant
8a968dac81
C#: Enable nullability in Semmle.Util
2020-03-26 20:10:21 +00:00
Jonas Jensen
95f116eb48
Merge branch 'DefaultTaintTracking-argv' into dataflow-indirect-args
2020-03-26 20:47:50 +01:00
Jonas Jensen
2801941ca2
C++: Never track flow out of an argv argument
...
This change removes some duplicate results that will otherwise appear
due to https://github.com/Semmle/ql/pull/3123 and possibly
https://github.com/Semmle/ql/pull/2704 .
2020-03-26 20:40:16 +01:00
Calum Grant
782f2b5b50
Merge pull request #3073 from hvitved/csharp/null-maybe-fp
...
C#: Add test for `cs/dereferenced-value-may-be-null`
2020-03-26 18:55:54 +00:00
Dave Bartolomeo
7879dde8b8
Merge pull request #3097 from jbj/detect-conflated-memory
...
C++: Implement Instruction.isResultConflated
2020-03-26 14:52:47 -04:00
Rasmus Wriedt Larsen
96d1fc8c0b
Python: Fix iterable-unpacking taint CP
...
When running ql/python/ql/src/Security/CWE-079/ReflectedXss.ql against the
database for flask.
Iitially there were 10 million result-tuples for iterable_unpacking_descent.
With this change, we're down to roughly 2100,
2020-03-26 16:42:48 +01:00
Calum Grant
71e0dc087b
C#: General code tidy.
2020-03-26 15:35:31 +00:00
Erik Krogh Kristensen
6b507c6933
add urlSuffix support to DomBasedXSS
2020-03-26 15:47:59 +01:00
Erik Krogh Kristensen
a850616927
delete Xss.actual
2020-03-26 15:40:37 +01:00
Erik Krogh Kristensen
e2d2c2341e
autoformat and update expected output
2020-03-26 15:38:00 +01:00
Erik Krogh Kristensen
baf50c832c
more precise charpreds in taint steps
2020-03-26 15:30:43 +01:00
Philip Ginsbach
71c588a74f
information on version support
2020-03-26 14:15:29 +00:00
Tom Hvitved
a8660d446e
C#: Fix typo
2020-03-26 14:54:03 +01:00
Philip Ginsbach
f4a1479d33
sentence about semantics
2020-03-26 12:49:09 +00:00
Philip Ginsbach
783cee30c4
mention set literals in the specification
2020-03-26 12:21:38 +00:00
Asger Feldthaus
816968d102
JS: Rename test files to avoid clash
2020-03-26 11:59:57 +00:00
Tom Hvitved
db8d61c3be
C#: Remove compiler warning in Remote.qll
2020-03-26 12:26:17 +01:00
Jonas Jensen
08c53d4a61
C++: Clean up the ParameterNode class tree
...
The new names are chosen to align with Java's `DataFlowUtil.qll`.
2020-03-26 11:57:53 +01:00
Mathias Vorreiter Pedersen
a43abaaed9
Merge branch 'master' into ir-flow-fields
2020-03-26 11:51:07 +01:00
Mathias Vorreiter Pedersen
c6c613840a
C++: Removed toString from PostUpdateNodes. They were more confusing than helpful
2020-03-26 11:43:40 +01:00
Mathias Vorreiter Pedersen
fbef146a49
C++: Remove PositionalArgumentWithoutWriteSideEffectNode (since not all arguments need a PostUpdateNode). Also generalized the added flow rule in simpleLocalFlowStep since there isn't always a ChiInstruction - for instance of it's a write to a struct that only has a single field.
2020-03-26 11:39:20 +01:00
Jonas Jensen
4f068685e1
C++: Add AssignExpr + Initializer to lib overview
2020-03-26 10:49:03 +01:00
yo-h
0f70da2258
Merge pull request #3105 from aschackmull/java/postupdate-jump
...
Java: Fix missing jump step from PostUpdate to capture.
2020-03-25 22:05:30 -04:00
Robert Marsh
e6cdbb9bd2
Merge pull request #3121 from dbartol/dbartol/ir-generate-all-fixup
...
C++: Late fix for PR feedback
2020-03-25 17:58:01 -07:00
Erik Krogh Kristensen
1cefa12315
update expected output
2020-03-25 23:54:57 +01:00
Erik Krogh Kristensen
8f45c8fe83
use LoadStoreStep for type-tracking promises
2020-03-25 23:54:57 +01:00
Erik Krogh Kristensen
1a2983fe39
support small steps for promise tracking
2020-03-25 23:54:57 +01:00
Erik Krogh Kristensen
00181e059b
add tests for type-tracking promises
2020-03-25 23:54:56 +01:00
Erik Krogh Kristensen
9a78d38df0
add a new LoadStoreStep as a StepSummary for TypeTracking
2020-03-25 23:54:56 +01:00
semmle-qlci
e7fd97e72b
Merge pull request #3119 from erik-krogh/SockJS
...
Approved by esbena
2020-03-25 21:36:29 +00:00
Tom Hvitved
95b6f6aee0
C#: Add change note
2020-03-25 20:05:39 +01:00
Tom Hvitved
54677189de
C#: Introduce RemoteFlowSink class
2020-03-25 20:05:39 +01:00
Tom Hvitved
142737dc61
C#: Move HtmlSinks from XSS.qll into separate file
2020-03-25 20:05:39 +01:00
Tom Hvitved
fddbce0b7b
C#: Move all predefined sources and sinks into security/dataflow/flow{sinks,sources}
2020-03-25 20:05:39 +01:00
Erik Krogh Kristensen
4b0bc6b2b3
autoformat
2020-03-25 19:47:41 +01:00
Dave Bartolomeo
f981ce6be4
Merge pull request #3122 from jbj/getParameter-docs
...
C++: Improve QLDoc for Function.getParameter
2020-03-25 12:59:28 -04:00
Calum Grant
87970337ae
C#: Improvements to buildless extraction, particularly for .NET Core.
2020-03-25 15:27:48 +00:00
Jonas Jensen
b622d62d3c
C++: Wire up param/arg indirections in data flow
2020-03-25 15:23:43 +01:00
Jonas Jensen
bc3bdbb11b
C++: Improve QLDoc for Function.getParameter
2020-03-25 15:21:24 +01:00
Dave Bartolomeo
1edd492abf
C++: Late fix for PR feedback
...
I missed this suggestion before I merged the original PR. Fixing it now before I forget.
2020-03-25 10:10:30 -04:00
Asger Feldthaus
ad1e0ec50b
JS: Inline variable again
2020-03-25 14:01:33 +00:00
Dave Bartolomeo
376779421d
Merge pull request #2975 from rdmarsh2/printir-generate-all
...
C++/C#: generate IR for funcs excluded in PrintIR
2020-03-25 09:45:02 -04:00
Tom Hvitved
7ac25d2439
C#: Add more tests for cs/information-exposure-through-exception
2020-03-25 14:33:49 +01:00
Asger Feldthaus
54021a1c30
JS: Update old entry point and add a test
2020-03-25 13:24:18 +00:00
Asger Feldthaus
a78f1b864b
JS: Fix trailing whitespace
2020-03-25 12:45:48 +00:00
Asger Feldthaus
6c9e35c22e
JS: Skip .js files with a same-named .ts file next to it
2020-03-25 12:45:37 +00:00
semmle-qlci
cf5b1f0cd5
Merge pull request #3019 from erik-krogh/ArrayStep
...
Approved by asgerf
2020-03-25 12:08:44 +00:00
Erik Krogh Kristensen
abcdfe3c53
use LibraryName class for websocket library names
2020-03-25 13:06:21 +01:00
Rasmus Wriedt Larsen
dc9dbf3682
Python: Autoformat
2020-03-25 11:56:18 +01:00
Jonas Jensen
2b2667aef7
Merge remote-tracking branch 'upstream/master' into detect-conflated-memory
...
Conflicts:
cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IRSanity.qll
cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IRSanity.qll
cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IRSanity.qll
cpp/ql/test/library-tests/ir/ir/aliased_ssa_sanity.expected
cpp/ql/test/library-tests/ir/ir/aliased_ssa_sanity_unsound.expected
cpp/ql/test/library-tests/ir/ir/raw_sanity.expected
cpp/ql/test/library-tests/ir/ir/unaliased_ssa_sanity.expected
cpp/ql/test/library-tests/ir/ir/unaliased_ssa_sanity_unsound.expected
cpp/ql/test/library-tests/ir/ssa/aliased_ssa_sanity.expected
cpp/ql/test/library-tests/ir/ssa/aliased_ssa_sanity_unsound.expected
cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_sanity.expected
cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_sanity_unsound.expected
cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_sanity.expected
cpp/ql/test/library-tests/syntax-zoo/raw_sanity.expected
cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_sanity.expected
csharp/ql/src/semmle/code/csharp/ir/implementation/raw/IRSanity.qll
csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/IRSanity.qll
csharp/ql/test/library-tests/ir/ir/raw_ir_sanity.expected
csharp/ql/test/library-tests/ir/ir/unaliased_ssa_sanity.expected
2020-03-25 11:55:39 +01:00
Rasmus Wriedt Larsen
12c6997e7b
Python: Reduce result set in custom taint sanitizer
2020-03-25 11:55:29 +01:00
Erik Krogh Kristensen
f7faaa634f
change-note
2020-03-25 11:37:39 +01:00
semmle-qlci
a413a3254b
Merge pull request #3114 from RasmusWL/python-add-fp-for-non-callable
...
Approved by tausbn
2020-03-25 10:34:50 +00:00
semmle-qlci
ac7c74dcee
Merge pull request #3111 from RasmusWL/python-fabric-command-injection
...
Approved by BekaValentine
2020-03-25 10:07:33 +00:00
Mathias Vorreiter Pedersen
ae076da517
Merge pull request #3112 from dbartol/codeql-c-analysis/34-Bad-Overlap
...
C++/C#: Fix invalid overlap
2020-03-25 10:40:39 +01:00
Erik Krogh Kristensen
f2b9e2019c
remove isRelevant from flowStep
2020-03-25 09:46:07 +01:00
Erik Krogh Kristensen
6f0e507242
outline predicate to fix join-ordering
2020-03-25 09:44:03 +01:00
Erik Krogh Kristensen
3000486b35
add more isRelevant calls
2020-03-25 09:42:24 +01:00
yo-h
116c13eb18
Merge pull request #3106 from aschackmull/java/getstmtbody-type
...
Java: Sharpen return type of LambdaExpr.getStmtBody().
2020-03-24 19:20:57 -04:00
Erik Krogh Kristensen
1d8e103322
autoformat
2020-03-25 00:19:23 +01:00
Mathias Vorreiter Pedersen
f92dd3c565
C++: Autoformat
2020-03-24 22:28:55 +01:00
Mathias Vorreiter Pedersen
077c282cd3
C++: Add field flow and accept tests
2020-03-24 22:28:54 +01:00
Mathias Vorreiter Pedersen
a5f08e1ea6
C++: Split parameter node class into an explicit and implicit version
2020-03-24 22:28:54 +01:00
Mathias Vorreiter Pedersen
22381f3ee6
C++: Demonstrate amount of field flow already present
2020-03-24 22:28:54 +01:00
yo-h
ac68b62b48
Merge pull request #3115 from aschackmull/java/experimental-dir
...
Java: Fix directory structure in experimental.
2020-03-24 16:50:28 -04:00
Aditya Sharad
a6e039b284
Java: Add tests for Jackson taint steps.
...
Add stubs for jackson-databind-2.10.
Based on http://fasterxml.github.io/jackson-databind/javadoc/2.10 .
Test taint through Jackson serialization APIs.
2020-03-24 12:59:24 -07:00
Aditya Sharad
7de8b48692
Java: Add taint steps through Jackson serialization methods.
2020-03-24 12:59:14 -07:00
Dave Bartolomeo
2b69cc9738
C#: Make IRConfiguration.qll just forward to the implementation
...
Just like C++ already does.
2020-03-24 13:33:50 -04:00
Max Schaefer
efbcec09ef
JavaScript: Add type tracking to Postgres model.
2020-03-24 17:30:07 +00:00
Anders Schack-Mulligen
75523e4eb8
Java: Fix directory structure in experimental.
2020-03-24 16:47:55 +01:00
Jonas Jensen
8f419d1676
C++: Fix conflated-memory sanity query
...
I had included `InitializeNonLocal` in the recursion because it made
everything look better in the presence of a bug that's since been fixed.
Taking it out means the sanity test is again aligned with the old
`isChiForAllAliasedMemory`.
2020-03-24 16:46:59 +01:00
Jonas Jensen
4e588869d8
C++: Sync identical files
2020-03-24 16:46:42 +01:00
Dave Bartolomeo
cc76782545
Merge remote-tracking branch 'upstream/master' into codeql-c-analysis/34-Bad-Overlap
2020-03-24 11:38:39 -04:00
semmle-qlci
ce0b72f949
Merge pull request #3093 from erik-krogh/MorePathSinks
...
Approved by asgerf
2020-03-24 14:26:41 +00:00
Anders Schack-Mulligen
d8edae96df
Java: Add test.
2020-03-24 15:24:17 +01:00
Rasmus Wriedt Larsen
05ecfc83f7
Python: Add test-case with swapped decorator order
2020-03-24 14:18:46 +01:00
Jonas Jensen
27832148a9
C++: Phi-node conflation is not about vvars
2020-03-24 13:56:42 +01:00
Jonas Jensen
95a8dcb3fd
C++: failing test for non-conflated escaped var
2020-03-24 13:31:08 +01:00
Taus
fe00d1cbf4
Merge pull request #2888 from RasmusWL/python-tarslip-sanitizer
...
Python: Improve tarslip sanitizer
2020-03-24 12:59:20 +01:00
Rasmus Wriedt Larsen
3ed48aae4c
Python: remove leftover arg in test code
2020-03-24 11:49:08 +01:00
Rasmus Wriedt Larsen
5ec0716cb0
Python: Add points-to regression when using @classmethod decorators
...
Specifically a problem when using a second decorator
2020-03-24 11:39:08 +01:00
Erik Krogh Kristensen
36981f385a
Merge branch 'master' of git.semmle.com:Semmle/ql into MorePathSinks
2020-03-24 11:20:33 +01:00
Rasmus Wriedt Larsen
49fa7c8589
Python: update 1.24 changelog
2020-03-24 10:15:36 +01:00
Rasmus Wriedt Larsen
4b8020b98d
Python: Autoformat Command.qll
2020-03-24 10:11:57 +01:00
semmle-qlci
4c9a6b73ee
Merge pull request #3107 from erik-krogh/FArgs
...
Approved by esbena
2020-03-24 08:32:56 +00:00
Erik Krogh Kristensen
fa710c5864
Merge remote-tracking branch 'upstream/master' into UrlSearch
2020-03-24 00:23:15 +01:00
Erik Krogh Kristensen
5b4f091257
add test for remote flow sources in WebSockets
2020-03-23 23:58:20 +01:00
Erik Krogh Kristensen
6a1491d83d
add SockJS to the existing WebSocket model
2020-03-23 23:56:11 +01:00
Erik Krogh Kristensen
9a18dc32c1
autoformat WebSocket tests
2020-03-23 23:49:26 +01:00
Erik Krogh Kristensen
7b7eddff1e
remove previous SockJS implementation, and move example to WebSocket test
2020-03-23 23:45:05 +01:00
Asger F
a1e032bee6
Merge pull request #3098 from kyprizel/master
...
Experimental SockJS support
2020-03-23 22:39:10 +00:00
yo-h
d315864383
Merge pull request #3108 from aschackmull/java/finalizemethod
...
Java: Fixup FinalizeMethod definition.
2020-03-23 18:27:57 -04:00
Dave Bartolomeo
bebf89fed5
C++: Accept test diffs
...
All changes look like real improvements.
2020-03-23 17:20:19 -04:00
kyprizel
dec1b8b070
Update javascript/ql/src/experimental/SockJS/SockJS.qll
...
Fix comments
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-03-23 22:59:48 +03:00
kyprizel
b90ff5e84d
Update javascript/ql/src/experimental/SockJS/SockJS.qll
...
do not import specific libs
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-03-23 22:59:23 +03:00
Jonas Jensen
29c4c8c0b2
C#: Fixup to follow C++ changes
2020-03-23 20:39:43 +01:00
Jonas Jensen
999051d20e
C++: QLDoc terminology: object -> mem allocation
2020-03-23 20:32:47 +01:00
Dave Bartolomeo
c5ac357bfc
C++/C#: Fix bad overlap sanity failures
...
`Instruction.getDefinitionOverlap()` depends on `SSAConstruction::getMemoryOperandDefinition()`, which in turn depends on `SSAConstruction::hasMemoryOperandDefinition()`. When the definition in question came from a `Chi` instruction, `hasMemoryOperandDefinition()` incorrectly bound `overlap` to the overlap relationship between the original (non-`Chi`) instruction and the use. The fix is to make use of the `actualDefLocation` parameter to `getDefinitionOrChiInstruction()`, which specifies the location for the result of the `Chi` in that case.
2020-03-23 14:57:41 -04:00
Jonas Jensen
b0d3c9ee6b
C++: Fix getExtentOverlap for entire allocation
2020-03-23 19:49:39 +01:00
Dave Bartolomeo
a2741da8e2
C++/C#: Add sanity test for invalid overlap from getDefinitionOverlap()
...
The result of `getDefinitionOverlap()` should never be `MayPartiallyOverlap`, because if that were the case, we should have inserted as `Chi` instruction and hooked the definition up to that instead.
There are quite a few existing failures.
2020-03-23 14:37:06 -04:00
Rasmus Wriedt Larsen
b567205579
Python: Model fabric v1.x command injection sinks
2020-03-23 17:49:56 +01:00
Rasmus Wriedt Larsen
a57eadaeb6
Python: Model fabric/invoke command injection sinks
2020-03-23 17:33:41 +01:00
Anders Schack-Mulligen
f29f0f418f
Dataflow: Exclude flow param-param flow through with identical params.
2020-03-23 17:27:53 +01:00
semmle-qlci
e5590091a0
Merge pull request #3109 from max-schaefer/js/performance-fixes
...
Approved by asgerf
2020-03-23 16:08:07 +00:00
Rasmus Wriedt Larsen
d475bb998e
Python: Add abstract class CommandSink
...
I'm going to add more in a sec, and listing *all* of them in CommandInjection.ql
started to be silly
2020-03-23 17:04:08 +01:00
Max Schaefer
55e7b22cdf
JavaScript: Autoformat.
2020-03-23 14:37:04 +00:00
kyprizel
49e5a22cab
Fixed code style for SockJS
...
also fixed appCreation, thanks to Erik Krogh.
2020-03-23 17:16:17 +03:00
Jonas Jensen
13465921a3
Merge pull request #3092 from dbartol/dbartol/VarArgIR2_ElectricBoogaloo
...
C++: Better IR for varargs
2020-03-23 14:13:54 +01:00
Erik Krogh Kristensen
833183c706
change note
2020-03-23 14:13:30 +01:00
Erik Krogh Kristensen
7bc7ffffd6
autoformat
2020-03-23 14:10:07 +01:00
Erik Krogh Kristensen
f1e0d37273
Update javascript/ql/test/library-tests/frameworks/Concepts/file-access.js
...
Co-Authored-By: Asger F <asgerf@github.com >
2020-03-23 14:02:22 +01:00
Max Schaefer
b13e6141a2
JavaScript: Inline promiseStep/4.
2020-03-23 12:01:52 +00:00
Asger F
6c2842bd49
Merge pull request #2919 from asger-semmle/js/property-barriers
...
JS: Make sanitizers no longer block taint inside an object
2020-03-23 11:43:18 +00:00
Rasmus Wriedt Larsen
dcfc9a8796
Python: TarSlip sanitizer: explain tests with not
...
It was a bit confusing what was meant before
2020-03-23 12:00:59 +01:00
Anders Schack-Mulligen
4bc0cb0d28
Java: Fixup FinalizeMethod definition.
2020-03-23 11:11:00 +01:00
Erik Krogh Kristensen
2c43d1d731
fix FP in superfluous-trailing-arguments related to Function.arguments
2020-03-23 10:40:35 +01:00
Luke Cartey
9eee16b2d6
Merge pull request #3091 from hvitved/csharp/xpath-injection-more-sinks
...
C#: Teach XPath injection query about `XPathNavigator`
2020-03-23 09:39:26 +00:00
semmle-qlci
2c7af72f14
Merge pull request #2858 from RasmusWL/python-support-django2
...
Approved by tausbn
2020-03-23 09:35:46 +00:00
Anders Schack-Mulligen
6d3717cff8
Java: Sharpen return type of LambdaExpr.getStmtBody().
2020-03-23 10:27:36 +01:00
Anders Schack-Mulligen
c78906500d
Java: Fix missing jump step from PostUpdate to capture.
2020-03-23 10:24:25 +01:00
Anders Schack-Mulligen
888c504f55
Merge pull request #2903 from hvitved/dataflow/performance
...
Data flow: Refactoring + performance improvements
2020-03-23 10:01:20 +01:00
Jonas Jensen
79d5b88e33
C++: Remove redundant case
2020-03-20 19:40:53 +01:00
Eldar T. Zaitov
ee0b65ad39
Added experimental SockJS support
2020-03-20 21:24:16 +03:00
Dave Bartolomeo
fb71f781a0
C++: Fix formatting
2020-03-20 14:23:58 -04:00
Robert Marsh
d529fedbad
C++: accept extractor changes to IR
2020-03-20 11:00:54 -07:00
yo-h
16f2957029
Merge pull request #3081 from aschackmull/java/urldecoder-step
...
Java: Add URLDecoder.decode as taint step.
2020-03-20 13:53:20 -04:00
yo-h
bcda481d4a
Merge pull request #3086 from aschackmull/java/apache-base64-taint
...
Java: Add apache Base64 taint steps.
2020-03-20 13:49:20 -04:00
Jonas Jensen
f6f9afe462
C++: Implement Instruction.isResultConflated
...
This predicate replaces `isChiForAllAliasedMemory`, which was always
intended to be temporary. A test is added to `IRSanity.qll` to verify
that the new predicate corresponds exactly with (a fixed version of) the
old one.
The implementation of the new predicate,
`Cached::hasConflatedMemoryResult` in `SSAConstruction.qll`, is faster
to compute than the old `isChiForAllAliasedMemory` because it uses
information that's readily available during SSA construction.
2020-03-20 17:57:18 +01:00
Dave Bartolomeo
82e2816915
C++: Fix handling of std::va_list that is used as a function parameter
...
In the Unix ABI, `std::va_list` is defined as `typedef struct __va_list_tag { ... } va_list[1];`, which means that any `std::va_list` used as a function parameter decays to `struct __va_list_tag*`. Handling this actually made the QL code slightly cleaner. The only tricky bit is that we have to determine what type to use as the actual `va_list` type when loading, storing, or modifying a `std::va_list`. To do this, we look at the type of the argument to the `va_*` macro. A detailed QLDoc comment explains the details.
I added a test case for passing a `va_list` as an argument, and then manipulating that `va_list` in the callee.
2020-03-20 12:53:09 -04:00
Geoffrey White
bb2ce6e5d9
C++: More missing override tags.
2020-03-20 16:23:15 +00:00
Taus Brock-Nannestad
a3bd46d4fe
Python: Autoformat remaining .qll.
2020-03-20 16:43:10 +01:00
Taus Brock-Nannestad
6904898a8b
Python: Autoformat query-local libs.
2020-03-20 16:42:46 +01:00
Taus Brock-Nannestad
9044ff6959
Python: Autoformat rest of semmle/python.
2020-03-20 16:42:22 +01:00
Taus Brock-Nannestad
810e91ea00
Python: Autoformat semmle/python top-level.
2020-03-20 16:41:45 +01:00
Taus Brock-Nannestad
f406a45ce0
Python: Autoformat web.
2020-03-20 16:38:27 +01:00
Taus Brock-Nannestad
5b121b7723
Python: Autoformat values.
2020-03-20 16:37:06 +01:00
Taus Brock-Nannestad
51f1cf020c
Python: Autoformat security.
2020-03-20 16:36:48 +01:00
Taus Brock-Nannestad
4852bb7355
Python: Autoformat pointsto.
2020-03-20 16:36:25 +01:00
Taus Brock-Nannestad
d8b942f922
Python: Autoformat objects.
2020-03-20 16:36:07 +01:00
Taus Brock-Nannestad
165dcd37a1
Python: Autoformat library-tests.
2020-03-20 16:35:37 +01:00
Geoffrey White
ccf5e03fc8
C++: Autoformat.
2020-03-20 15:01:22 +00:00
Geoffrey White
9e117709bc
C++: mustwrite = false.
2020-03-20 14:59:57 +00:00
luchua-bc
d9327705d2
Fix the issue of mixed tabs and spaces
2020-03-20 08:16:45 -04:00
luchua-bc
dfb42ecf42
Address sensitive info logging
2020-03-20 08:14:48 -04:00
Tom Hvitved
2d90e7daca
Autoformat
2020-03-20 09:34:34 +01:00
Erik Krogh Kristensen
f88cc2a977
inline promiseStep predicate
2020-03-20 09:07:52 +01:00
Erik Krogh Kristensen
90a324148d
add extra sinks to js/tainted-path
2020-03-20 09:07:39 +01:00
Dave Bartolomeo
bf284514fc
C++: Better IR for varargs
...
This PR changes the IR we generate for functions that accept a variable argument list. Rather than simply using `BuiltInOperationInstruction` to model the various `va_*` macros as mysterious function-like operations, we now model them in more detail. The intent is to enable better alias analysis and taint flow through varargs.
The `va_start` macro now generates a unary `VarArgsStart` instruction that takes the address of the ellipsis pseudo-parameter as its operand, and returns a value of type `std::va_list`. This value is then stored into the actual `std::va_list` variable via a regular `Store`.
The `va_arg` macro now loads the `std::va_list` argument, then emits a `VarArg` instruction on the result. This returns the address of the vararg argument to be loaded. That address is later used as the address operand of a regular `Load` to return the value of the argument. To model the side effect of moving to the next argument, we emit a `NextVarArg` instruction that takes the previous `std::va_list` value and returns an updated one, which is then stored back into the `std::va_list` variable.
The `va_end` macro just emits a `VarArgsEnd` unary instruction that takes the address of the `std::va_list` argument and does nothing, since `va_end` doesn't really do anything on most compiler implementations anyway.
The `va_copy` macro is just modeled as a plain copy.
2020-03-19 19:23:33 -04:00
Mathias Vorreiter Pedersen
67cb8525bf
Merge pull request #3082 from dbartol/dbartol/VarArgIR
...
C++: Model varargs in IR, Part I
2020-03-19 18:05:46 +01:00
Geoffrey White
88193dd389
C++: .expected change (desirable).
2020-03-19 13:32:17 +00:00
Dave Bartolomeo
74f61dc148
C++: Fix formatting
2020-03-19 09:18:32 -04:00
Tom Hvitved
fc74a482a4
C#: More XPath injection sinks
2020-03-19 14:13:35 +01:00
Geoffrey White
b444383ed1
C++: Add 'override' specifiers where I missed them.
2020-03-19 13:09:37 +00:00
Tom Hvitved
0d45700088
C#: Add change note
2020-03-19 13:41:22 +01:00
Tom Hvitved
4b3cf72c1c
C#: Teach XPath injection query about XPathNavigator
2020-03-19 13:38:16 +01:00
Tom Hvitved
7f0181ccff
C#: Add XPathNavigator test for cs/xml/xpath-injection
2020-03-19 13:37:03 +01:00
semmle-qlci
deb20fc37f
Merge pull request #3076 from esbena/js/even-more-mongoose-improvements
...
Approved by erik-krogh
2020-03-19 12:03:53 +00:00
Max Schaefer
ee62706ad2
JavaScript: Split up a predicate to avoid bad join order.
2020-03-19 11:47:53 +00:00
Max Schaefer
d91e6a4893
JavaScript: Avoid a few bad join orders.
2020-03-19 11:47:53 +00:00
semmle-qlci
2821b01017
Merge pull request #2915 from tausbn/python-add-points-to-for-missing-builtin-return-types
...
Approved by RasmusWL
2020-03-19 11:02:46 +00:00
Asger Feldthaus
4f42675b35
JS: Autformat
2020-03-19 09:36:27 +00:00
Rasmus Wriedt Larsen
f4e5079dd3
Merge pull request #2991 from BekaValentine/python-objectapi-to-valueapi-unguardednextingenerator
...
Python: ObjectAPI to ValueAPI: UnguardedNextInGenerator
2020-03-19 10:33:32 +01:00
Asger Feldthaus
3ae33e3c1a
JS: Update prototype pollution query
2020-03-18 23:59:25 +00:00
Asger Feldthaus
b6ca4fbee3
JS: Add getDefaultSourceLabel()
2020-03-18 23:52:25 +00:00
Rebecca Valentine
06f0947318
Update python/ql/src/Exceptions/UnguardedNextInGenerator.ql
...
Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-03-18 14:16:00 -07:00
Rebecca Valentine
9560c804b8
Update python/ql/test/query-tests/Exceptions/generators/test.py
...
Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-03-18 14:15:49 -07:00
Robert Marsh
59a81d8445
C++: merge from master and accept test changes
2020-03-18 13:47:01 -07:00
Robert Marsh
a30954599d
Merge pull request #3085 from jbj/inStaticInitializer-AggregateLiteral
...
C++: Manual magic in inStaticInitializer
2020-03-18 13:23:04 -07:00
Dave Bartolomeo
30d2b865c6
C++: Fix formatting
2020-03-18 14:06:28 -04:00
Geoffrey White
f32e84b1d0
C++: Autoformat.
2020-03-18 17:24:46 +00:00
Tom Hvitved
937924571c
Data flow: Sync files
2020-03-18 18:16:27 +01:00
Tom Hvitved
d0aaaad537
Address review comments
2020-03-18 18:16:11 +01:00
Geoffrey White
2e4e491ce8
Merge branch 'master' into sideeffect
2020-03-18 17:12:14 +00:00
Rasmus Wriedt Larsen
9a0b2b1843
Merge pull request #2989 from BekaValentine/python-objectapi-to-valueapi-incorrectexceptorder
...
Python: ObjectAPI to ValueAPI: IncorrectExceptOrder
2020-03-18 18:03:25 +01:00
Taus
ae1268f241
Merge branch 'master' into python-add-points-to-for-missing-builtin-return-types
2020-03-18 17:59:17 +01:00
Rasmus Wriedt Larsen
290e33a912
Merge pull request #2922 from tausbn/python-fix-multi-assign-points-to
...
Python: Fix bug in `multi_assignment_points_to`.
2020-03-18 17:50:37 +01:00
Rasmus Wriedt Larsen
b0303158a5
Merge pull request #3088 from tausbn/python-prepare-autoformatting
...
Python: Prepare for autoformatting.
2020-03-18 17:48:46 +01:00
Geoffrey White
6cc1c2341c
C++: Add some SideEffect models.
2020-03-18 16:42:33 +00:00
Geoffrey White
935b8d96f8
C++: Offset .expected for cleaner diff.
2020-03-18 16:42:33 +00:00
Geoffrey White
0c9466640a
C++: Add IR test for strcpy/strcat.
2020-03-18 16:42:25 +00:00
Dave Bartolomeo
0329327f9f
C++: Move VarArgs utilities location
2020-03-18 11:24:44 -04:00
Dave Bartolomeo
fed1bce015
C++: Make vararg utilities internal for now.
2020-03-18 11:18:38 -04:00
Dave Bartolomeo
4fce20116e
C++: Fix formatting
2020-03-18 09:53:01 -04:00
Dave Bartolomeo
26ea93af58
Merge remote-tracking branch 'upstream/master' into dbartol/VarArgIR
2020-03-18 09:52:21 -04:00
Jonas Jensen
a23077af11
C++: Comments for future maintainers
2020-03-18 14:11:37 +01:00
Taus Brock-Nannestad
57af7b84aa
Python: Prepare for autoformatting.
...
Mostly fixes up a bunch of comments that were made wonky by the autoformatter.
2020-03-18 13:59:38 +01:00
Tom Hvitved
3bd6429072
Data flow: Sync files
2020-03-18 13:28:26 +01:00
Tom Hvitved
321b91209f
Address review comments
2020-03-18 13:28:16 +01:00
Asger Feldthaus
7393844699
JS: Update some queries that used data as source
2020-03-18 11:55:13 +00:00
Asger Feldthaus
506ddaf3f4
JS: Add explanation for test failure
2020-03-18 11:55:13 +00:00
Asger Feldthaus
028022158d
JS: Add variant of test that passes
2020-03-18 11:55:13 +00:00
Asger Feldthaus
a7e337ab28
JS: Add some lines in test case
2020-03-18 11:55:13 +00:00
Asger Feldthaus
3e68072e38
JS: Accept test case change
2020-03-18 11:55:13 +00:00
Asger Feldthaus
18eea96cf8
JS: Autoformat
2020-03-18 11:55:13 +00:00
Asger Feldthaus
a9901a44e8
JS: Update TaintBarriers/isBarrier test
2020-03-18 11:55:13 +00:00
Asger Feldthaus
de7fbce27b
JS: Adjust whitespace in change notes
2020-03-18 11:55:13 +00:00
Asger Feldthaus
0edb765958
JS: Split test case function in two
2020-03-18 11:55:13 +00:00
Asger Feldthaus
4e75fe3977
JS: Update some qldoc comments
2020-03-18 11:55:13 +00:00
Asger Feldthaus
08ad4f785a
JS: Tweak other parts of change note for consistency
2020-03-18 11:55:12 +00:00
Asger Feldthaus
ad2b150d05
JS: Add change note
2020-03-18 11:55:12 +00:00
Asger Feldthaus
a195429471
JS: Add test with non-guard sanitizer
2020-03-18 11:55:12 +00:00
Asger Feldthaus
83606e7b60
JS: Dont use data label in taint-tracking configs
2020-03-18 11:55:12 +00:00
Asger Feldthaus
8da0584b12
JS: Add test
2020-03-18 11:55:12 +00:00
Jonas Jensen
f1ad0dafdc
Merge pull request #2849 from geoffw0/model-gets
...
C++: Model for gets
2020-03-18 11:06:23 +01:00
Anders Schack-Mulligen
396678fd55
Java: Add apache Base64 taint steps.
2020-03-18 10:54:40 +01:00
Esben Sparre Andreasen
b1a722fcda
JS: typo fix
2020-03-18 10:11:38 +01:00
Esben Sparre Andreasen
12d8177b4b
Update javascript/ql/src/semmle/javascript/frameworks/NoSQL.qll
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-03-18 10:12:05 +01:00
Esben Sparre Andreasen
ce3b196b93
Update javascript/ql/src/semmle/javascript/frameworks/NoSQL.qll
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-03-18 10:11:57 +01:00
Esben Sparre Andreasen
b9860d3444
Update javascript/ql/src/semmle/javascript/frameworks/NoSQL.qll
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-03-18 10:11:49 +01:00
Esben Sparre Andreasen
d74c16f86c
Update javascript/ql/src/semmle/javascript/frameworks/NoSQL.qll
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-03-18 10:11:36 +01:00
Jonas Jensen
260bfe7b1d
C++: Manual magic in inStaticInitializer
...
Since `runtimeExprInStaticInitializer` only looks at expressions at the
top level of an initializer or directly below some number of top-level
aggregate literals, there is no need for `inStaticInitializer` to
include expressions strictly below those in the AST.
I tested this on Wireshark, which has very large static initializers,
but found no measureable difference in run time. There are some
differences in tuple counts and iteration counts, though:
- `inStaticInitializer` changes from 6,241,153 rows (86 iterations) to
5,031,617 rows (7 iterations).
- `runtimeExprInStaticInitializer` changes from 386,350 rows to 4,705
rows.
- `hasDynamicInitialization` has 410 rows both before and after, which
suggests that this change does not affect results.
Even though there is no impact on this snapshot at this time, things
might look different if/when the restriction on aggregate literals to
100 children is removed in the extractor.
2020-03-18 09:28:45 +01:00
Jonas Jensen
93c6f8f1f7
Merge pull request #3056 from dbartol/dbartol/static-locals
...
C++: Model dynamic initialization of static local variables in IR
2020-03-18 08:16:21 +01:00
Dave Bartolomeo
309ccf3daf
C++: Factor out common code to avoid recursion
2020-03-17 18:44:29 -04:00
Dave Bartolomeo
772324fafa
C++: Add comment with IR for dynamic init of static var
2020-03-17 18:44:00 -04:00
Dave Bartolomeo
709757f7f2
Merge remote-tracking branch 'upstream/master' into dbartol/static-locals
2020-03-17 18:35:13 -04:00
Taus
46567a5842
Merge pull request #3029 from BekaValentine/python-objectapi-to-valueapi-handles
...
Python: ObjectAPI to ValueAPI: Handles
2020-03-17 22:37:27 +01:00
Rebecca Valentine
f351916418
Merge branch 'master' into testmerge
2020-03-17 12:32:45 -07:00
Taus
ca26feefbf
Merge pull request #2978 from BekaValentine/python-objectapi-to-valueapi-illegalexceptionhandlertype
...
Python: ObjectAPI to ValueAPI: IllegalExceptionHandlerType
2020-03-17 17:56:34 +01:00
Rebecca Valentine
a7a64952e2
Python: ObjectAPI.qll: Fixes docstring
2020-03-17 09:48:54 -07:00
Robert Marsh
84a74f406a
Merge pull request #3002 from theopolis/cpp-linux-drop-privileges-outoforder
...
CPP: Add query for CWE-273 that detects out-of-order setuid
2020-03-17 09:10:51 -07:00
Robert Marsh
3a66b04e7a
C#: add debug switch to IRConfiguration
2020-03-17 08:51:00 -07:00
Dave Bartolomeo
9cc3cda58e
C++: Model varargs in IR, Part I
...
This change introduces a new synthesized `IRVariable` in every varargs function. This variable represents the entire set of arguments passed to the ellipsis by the caller. We give it an opaque type big enough hold all of the arguments passed by the largest vararg call in the database. It is treated just like any other parameter. It is initialized the same, it has indirect buffers, etc.
I had to introduce a couple new APIs to `Call` and `Function`. The QLDoc comments should explain these. I added tests for these new APIs as well.
The next step will be to change the IR generation for the `va_*` macros to manipulate the ellipsis parameter.
2020-03-17 11:11:48 -04:00
Tom Hvitved
2e8bd5ccba
Data flow: Sync files
2020-03-17 15:16:12 +01:00
Tom Hvitved
0645940a5c
Address review comments
2020-03-17 15:16:01 +01:00
semmle-qlci
8792d0d248
Merge pull request #3070 from erik-krogh/DataPerf
...
Approved by asgerf
2020-03-17 13:47:09 +00:00
semmle-qlci
fa08258c14
Merge pull request #3036 from erik-krogh/CustomTrack
...
Approved by asgerf
2020-03-17 13:44:51 +00:00
semmle-qlci
ea46873bfe
Merge pull request #3065 from erik-krogh/PathSinks
...
Approved by esbena
2020-03-17 13:00:00 +00:00
Pavel Avgustinov
1472bf0c11
Merge pull request #3078 from jbj/contributing-supported-2
...
Docs: refactor guidelines for new queries
2020-03-17 12:46:28 +00:00
Erik Krogh Kristensen
9403026fff
add change note
2020-03-17 11:48:02 +01:00
Erik Krogh Kristensen
1dfe9e9c2a
changes based on review
2020-03-17 11:28:29 +01:00
Erik Krogh Kristensen
9a3176d3cc
Apply suggestions from code review
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-03-17 11:26:35 +01:00
Esben Sparre Andreasen
380f66cb19
JS: rename Mongoose::CommonInterfase -> Mongoose::InvokeNode
2020-03-17 11:25:05 +01:00
Erik Krogh Kristensen
095d4d711a
change import to an absolute import to fix warning
2020-03-17 11:21:46 +01:00
James Fletcher
55f9034712
Merge pull request #3080 from jf205/migration-tidy-links
...
CodeQL docs: tidy up a few links
2020-03-17 09:42:21 +00:00
James Fletcher
07e52d3b96
Merge pull request #3055 from jf205/codeql-migration-2162
...
CodeQL docs: update titles and small content changes (CodeQL queries)
2020-03-17 09:21:49 +00:00
Anders Schack-Mulligen
9c9e302a73
Java: Add URLDecoder.decode as taint step.
2020-03-17 10:19:02 +01:00
james
d615c58060
docs: tidy up a few links
2020-03-17 09:06:32 +00:00
Erik Krogh Kristensen
d7b69fcfea
autoformat
2020-03-17 09:52:08 +01:00
Jonas Jensen
9899d46999
Docs: refactor guidelines for new queries
2020-03-17 08:24:03 +01:00
Robert Marsh
de2d23b432
C++/C#: autoformat
2020-03-16 17:25:53 -07:00
Rebecca Valentine
ff6e0ce35c
Python: UnguardedNextInGenerator.ql: Excludes next with default value
2020-03-16 17:08:06 -07:00
Rebecca Valentine
68c455cd97
Python: IncorrectExceptOrder.ql: Autoformats w/ new QL indentation
2020-03-16 16:52:48 -07:00
Rebecca Valentine
c7a2925620
Python: Exceptions.qll: Clean up handleObject again
2020-03-16 14:52:51 -07:00
Rebecca Valentine
34ab4efeda
Python: ObjectAPI.qll: getOrigin now returns a CFG
2020-03-16 14:52:23 -07:00
Rebecca Valentine
45e47b92a0
Python: IllegalExceptionHandlerType.ql: Autoformats
2020-03-16 14:48:05 -07:00
james
d35d440624
docs: address review comments
2020-03-16 21:39:17 +00:00
Esben Sparre Andreasen
7dc80664e6
Merge pull request #3045 from Semmle/esbena-patch-2
...
JS: loosen qldoc for `barrierGuardIsRelevant`
2020-03-16 22:28:22 +01:00
Esben Sparre Andreasen
b75486bb58
JS: refactor NoSQL::Mongoose. Introduce Mongoose::CommonInterface
2020-03-16 22:12:30 +01:00
Esben Sparre Andreasen
833d1b1ab0
JS: fixup mongoose test
2020-03-16 22:11:22 +01:00
Esben Sparre Andreasen
9d9926fdbf
JS: model Mongoose Document for additional js/nosql-injection sinks
2020-03-16 22:11:22 +01:00
Esben Sparre Andreasen
55ab519fbe
JS: add Mongoose Document tests
2020-03-16 22:11:22 +01:00
Esben Sparre Andreasen
dc27a8f52c
JS: model mongoose Model on createConnection.<model/models>
2020-03-16 22:11:22 +01:00
Esben Sparre Andreasen
730396df12
JS: add Mongoose createConnection tests
2020-03-16 22:11:22 +01:00
Rebecca Valentine
5d55db116b
Python: Exceptions.qll: Updates handledObject to use getOrigin
2020-03-16 11:24:55 -07:00
Rebecca Valentine
787b80f9ae
Python: ObjectAPI.qll: Adds getOrigin predicate
2020-03-16 11:24:22 -07:00
Erik Krogh Kristensen
7145a57db3
refactor StepSummary into an internal .qll
2020-03-16 17:52:04 +01:00
Jonas Jensen
b7dc26e27d
Merge pull request #3072 from geoffw0/gezero2
...
C++: Improvement to cpp/unsigned-comparison-zero
2020-03-16 17:00:38 +01:00
Geoffrey White
44c66a3b09
C++: Fixup test .expected files after merge.
2020-03-16 15:45:29 +00:00
Erik Krogh Kristensen
cd6fe8115d
Update javascript/ql/src/semmle/javascript/Promises.qll
...
Co-Authored-By: Asger F <asgerf@github.com >
2020-03-16 16:27:50 +01:00
Geoffrey White
034f7cc948
Merge branch 'master' into model-gets
2020-03-16 15:12:36 +00:00
Calum Grant
945418869d
Merge pull request #3022 from hvitved/csharp/autobuild/dotnet-clean-try
...
C#: Ignore `dotnet clean` exit code in autobuilder
2020-03-16 15:10:32 +00:00
Taus Brock-Nannestad
c724b17368
Python: Fix up regression comment.
2020-03-16 16:01:05 +01:00
Tom Hvitved
fb2b239db7
C#: Add test for cs/dereferenced-value-may-be-null
2020-03-16 15:38:29 +01:00
Geoffrey White
40db92bfd1
C++: Change note.
2020-03-16 13:22:00 +00:00
Geoffrey White
2cee756587
C++: Support the mirror case with <=.
2020-03-16 13:22:00 +00:00
Geoffrey White
3c96b09d47
C++: Behaviour preserving transform.
2020-03-16 13:22:00 +00:00
Geoffrey White
dcf2f7f19c
C++: Add some test cases for the mirror case, with <=.
2020-03-16 13:22:00 +00:00
Geoffrey White
3d8633f701
C++: Additional test cases for the recursive bit of UnsignedGEZero.
2020-03-16 13:22:00 +00:00
Nick Rolfe
17c57dcb4c
Merge pull request #2971 from matt-gretton-dann/codeql-c-extractor/40-spaceship
...
C++20 Add DB Support for the <=> operator
2020-03-16 12:07:58 +00:00
semmle-qlci
eb7d8092a6
Merge pull request #3064 from asger-semmle/js/typescript-semantic-errors
...
Approved by erik-krogh
2020-03-16 11:57:55 +00:00
Taus Brock-Nannestad
dda32abd6a
Python: Fix test result for pruning test.
2020-03-16 12:55:12 +01:00
Taus Brock-Nannestad
5579dfb976
Python: Fix comment based on review.
2020-03-16 12:49:46 +01:00
Taus Brock-Nannestad
81f6877727
Python: Fix up tests.
2020-03-16 12:48:41 +01:00
james
42b6c116aa
docs: open-source -> open source
2020-03-16 11:47:16 +00:00
james
b7f87225d9
docs: update links following titles changes
2020-03-16 11:47:16 +00:00
james
764303acb5
docs: rework 'CodeQL queries' landing page
2020-03-16 11:47:16 +00:00
james
ff07f3d3b7
docs: 'About CodeQL queries' content updates
2020-03-16 11:47:16 +00:00
james
6721495160
docs: retitle locations
2020-03-16 11:47:16 +00:00
james
8055e91a5c
docs: update titles and intros (writing codeql queries)
2020-03-16 11:42:16 +00:00
Taus Brock-Nannestad
2d8f3bb033
Python: Use TUnknown instead of TUnknownInstance.
2020-03-16 11:34:54 +01:00
Erik Krogh Kristensen
f2548aa3b1
add more models for file related sinks and sources
2020-03-16 11:07:23 +01:00
Erik Krogh Kristensen
557b642a8e
add isRelevant check on flowStep predicate
2020-03-16 11:01:20 +01:00
Matthew Gretton-Dann
3465c96c12
C++: Update DB Stats
2020-03-16 09:58:02 +00:00
Matthew Gretton-Dann
b325bce4c6
C++: Add upgrade script
2020-03-16 09:58:02 +00:00
Matthew Gretton-Dann
06accfe72b
C++: Add support for the spaceship operator
2020-03-16 09:58:02 +00:00
Matthew Gretton-Dann
c5b3df1eb2
C++: Update expression precedences
...
The spaceship (<=>) operator adds a new row to the C++ precendence
table. In preparation for that shift the necessary precedences up one
to create a suitable hole.
Note: In investigations I belive precedence 14 was not used. However,
in order to make review easier I have kept that gap.
2020-03-16 09:54:59 +00:00
Jonas Jensen
5b20133415
Merge pull request #3067 from theopolis/cpp-additional-commandexec-apis
...
Add execve to CommandExecution
2020-03-16 10:33:20 +01:00
Ted Reed
429b07a95d
Add execve to CommandExecution
2020-03-15 20:35:46 -04:00
semmle-qlci
1d4dd2b2f7
Merge pull request #3057 from esbena/js/infer-this-as-exports
...
Approved by asgerf
2020-03-15 12:55:12 +00:00
Asger Feldthaus
b2f008ea9e
JS: Dont report TypeScript diagnostics by default
2020-03-15 12:06:08 +00:00
semmle-qlci
7e093a8e5c
Merge pull request #3041 from erik-krogh/JQueryAjax
...
Approved by esbena
2020-03-14 22:31:59 +00:00
semmle-qlci
ff03478ae8
Merge pull request #3049 from asger-semmle/js/fix-cyclic-join
...
Approved by erik-krogh
2020-03-14 16:19:25 +00:00
Erik Krogh Kristensen
486efbab77
refactor based on review
2020-03-14 14:53:38 +01:00
Erik Krogh Kristensen
4f39c28741
Merge branch 'master' of git.semmle.com:Semmle/ql into CustomTrack
2020-03-14 14:37:52 +01:00
semmle-qlci
20cae302fd
Merge pull request #3054 from erik-krogh/NoDeferred
...
Approved by asgerf
2020-03-14 13:36:16 +00:00
Esben Sparre Andreasen
4d6aa20990
Merge pull request #3004 from esbena/js/additional-mongodb-and-mongoose-injection-sinks
...
JS: Mongoose and MongoDB improvements
2020-03-14 12:31:43 +01:00
Robert Marsh
e9459992a1
Merge pull request #3061 from MathiasVP/fix-constant-comparison
...
C++: Fix getValue in SimpleRangeAnalysis
2020-03-13 11:13:22 -07:00
Geoffrey White
cecbdae3e1
C++: Change note.
2020-03-13 17:58:31 +00:00
Mathias Vorreiter Pedersen
09984a4068
C++: The extractor already provides the getValue result when the variable is a local variable. Thus we can simplify the QL code.
2020-03-13 17:57:01 +01:00
Mathias Vorreiter Pedersen
e1942bbee1
C++: Fix false positives
2020-03-13 17:09:57 +01:00
Mathias Vorreiter Pedersen
cc25298f67
C++: Demonstrate false positives when a const variable is initialized in a parameter list
2020-03-13 17:00:54 +01:00
Felicity Chapman
8b8104a338
Merge pull request #3059 from felicitymay/2166-part-2-python
...
Update link text for remaining links to Python topics
2020-03-13 15:40:24 +00:00
Esben Sparre Andreasen
2fac7434df
JS: infer this to be module.exports in node modules
2020-03-13 14:10:35 +01:00
Esben Sparre Andreasen
ae8d38236b
JS: add some tests for this
2020-03-13 14:09:23 +01:00
Tom Hvitved
f935f5eaca
Data flow: Sync files
2020-03-13 13:58:05 +01:00
Tom Hvitved
17e904f0f6
Data flow: Refactoring + performance improvements
...
- Introduce `ReadTaintNode` and `TaintStoreNode` to simplify logic for taint
getters and taint setters, respectively.
- `nodeCandFwd2`: Restrict `stored` column after a read, based on what it might
be before a store of the same field.
- `nodeCand2`: Restrict `read` column (renamed from `stored`) after a store, based
on what it might be after a read of the same field.
- Move big step predicates into a `LocalFlowBigStep` module.
- Define predicates by dispatch in `AccessPath[Front]` class.
- `flowCandFwd0`: Restrict `apf` column after a read, as it should be able to match
a Boolean `read` column from `nodeCand2`.
- `flowFwd0`: Restrict columns `ap` and `apf` after a read, by introducing a
`flowConsCandFwd` predicate (similar to what is done in the previous pruning steps).
- `flowFwd0`: Restrict columns `ap` and `apf` after a store, by introducing a
`flowConsCand` predicate (similar to what is done in the previous pruning steps).
2020-03-13 13:58:05 +01:00
Anders Schack-Mulligen
9fc75f1f92
Merge pull request #2850 from SpaceWhite/CWE-094
...
ScriptEngine java code injection
2020-03-13 13:43:09 +01:00
Anders Schack-Mulligen
2a2484ee0f
Merge pull request #2800 from SpaceWhite/CWE-643
...
CWE-643 XPathInjection on java
2020-03-13 13:40:17 +01:00
Dave Bartolomeo
11ab2d6848
C++: Fix formatting
2020-03-13 08:21:25 -04:00
semmle-qlci
25b9fcfafd
Merge pull request #3058 from asger-semmle/js/may-receive-argument-fix
...
Approved by max-schaefer
2020-03-13 11:49:49 +00:00
Felicity Chapman
d7f37056a6
Merge pull request #3042 from felicitymay/merge-123-master-2
...
Merge rc/1.23 into master
2020-03-13 11:18:43 +00:00
Dave Bartolomeo
9922958bf1
C++: Fix failed tests
...
Added a new `StaticLocalVariable` class, which made several other pieces of the original change a bit cleaner.
Fixed test failures due to a mistake in the original `CFG.qll` change.
Added a test case for static local variables with constructors.
Removed the `Uninitialized` instruction from the initialization of a static local, because all objects with static storage duration are zero-initialized at startup.
Fixed expectations for `SignAnalysis.ql` to reflect that a bad result is now fixed.
2020-03-13 06:46:07 -04:00
Rasmus Wriedt Larsen
b45f8ff41d
Merge pull request #3053 from tausbn/python-make-test-not-depend-on-minor-version
...
Python: Make two tests not depend on minor Python version.
2020-03-13 10:56:40 +01:00
Dave Bartolomeo
4c0d5c9d78
C++: Fix formatting
2020-03-13 04:50:35 -04:00
Felicity Chapman
7779862671
Merge pull request #3052 from felicitymay/2176-cobol
...
Remove information about COBOL analysis
2020-03-13 08:50:35 +00:00
yo-h
5104fd8692
Merge pull request #3051 from aschackmull/java/queue-taint-steps
...
Java: Add taint steps for java.util.Queue methods.
2020-03-12 20:54:11 -04:00
Dave Bartolomeo
1526400a81
C++: Model dynamic initialization of static local variables in IR
...
Previously, the IR for the initialization of a static local variable ran the initialization unconditionally, every time the declaration was reached during execution. This means that we don't model the possibility that an access to the static variable fetches a value that was set on a previous execution of the function.
I've added some simple modelling of the correct behavior to the IR. For each static local variable that has a dynamic initializer, we synthesize a (static) `bool` variable to hold whether the initializer for the original variable has executed. When executing a declaration, we check the value of the synthesized variable, and skip the initialization code if it is `true`. If it is `false`, we execute the initialization code as before, and then set the flag to `true`. This doesn't capture the thread-safe nature of static initialization, but I think it's more than enough to handle anything we're likely to care about for the foreseeable future.
In `TranslatedDeclarationEntry.qll`, I split the translation of a static local variable declaration into two `TranslatedElement`s: one for the declaration itself, and one for the initialization. The declaration part handles the checking and setting of the flag; the initialization just does the initialization as before.
I've added an IR test case that has static variables with constant, zero, and dynamic initialization. I've also verified the new IR generated for @jbj's previous test cases for constant initialization.
I inverted the sense of the `hasConstantInitialization()` predicate to be `hasDynamicInitialization()`. Mostly this just made more sense to me, but I think it also fixed a potential bug where `hasConstantInitialization()` would not hold for a zero-initialized variable. Technically, constant initialization isn't the same as zero initialization, but I believe that most code really cares about the distinction between dynamic initialization and static initialization, where static initialization includes both constant and zero initialization.
I've fixed up the C# side of IR generation to continue working, but it doesn't use any of the dynamic initialization stuff. In theory, it could use something similar to model the initialization of static fields.
2020-03-12 18:29:16 -04:00
Robert Marsh
9f1833af76
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-03-12 15:09:58 -07:00
Robert Marsh
a0823a2582
C++: add argv chi chain example to ssa test
2020-03-12 15:06:17 -07:00
Felicity Chapman
9d32ae7fc1
Apply suggestions from code review
...
Replace COBOL with Go
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2020-03-12 19:32:30 +00:00
Taus Brock-Nannestad
5c90becc1c
Python: Use TUnknown instead of TUnknownInstance.
2020-03-12 19:21:11 +01:00
Taus Brock-Nannestad
115bbf619d
Merge branch 'master' into python-fix-multi-assign-points-to
2020-03-12 18:50:10 +01:00
Taus Brock-Nannestad
3d0ee90880
Python: Make two tests not depend on minor Python version.
...
For syntax errors, we simply report the major version.
For unused imports, we were getting a result for `typing.py` when run under
Python 3.7.3. To prevent this import from being considered, I've set the maximum
import depth to `0`.
2020-03-12 18:19:53 +01:00
Felicity Chapman
8c931bfc66
Remove information about COBOL analysis
2020-03-12 16:37:29 +00:00
Asger Feldthaus
2bdf26a8f1
JS: Remove unneeded forwarding method
2020-03-12 15:48:47 +00:00
Asger Feldthaus
788c0f9037
JS: Refactor metadata class a bit
2020-03-12 15:45:22 +00:00
Geoffrey White
f4a1b41094
C++: Correct hasUpperBoundsCheck.
2020-03-12 15:45:01 +00:00
Geoffrey White
26ed560bd7
C++: Add new test cases.
2020-03-12 15:45:01 +00:00
Geoffrey White
263e51f72e
C++: Clean up the test.
2020-03-12 15:45:00 +00:00
Erik Krogh Kristensen
799c3eb06c
remove model of Deferred
2020-03-12 16:38:20 +01:00
Asger Feldthaus
ddab13ab44
JS: Add a comment
2020-03-12 15:29:51 +00:00
Anders Schack-Mulligen
99c55b6edb
Java: Add taint steps for java.util.Queue methods.
2020-03-12 15:02:06 +01:00
Taus
099997088a
Merge pull request #3005 from RasmusWL/python-modernise-string-taint
...
Python: Modernise StringKind files
2020-03-12 15:01:18 +01:00
Erik Krogh Kristensen
59d2d6d4fd
autoformat
2020-03-12 14:48:16 +01:00
Asger Feldthaus
4391b70b5f
JS: Fix perf issue in mayReceiveArgument
2020-03-12 13:45:34 +00:00
Jonas Jensen
917b984909
Merge pull request #3050 from geoffw0/mismatching_placement_new
...
C++: Fix mismatching new/free FP in template code.
2020-03-12 12:42:29 +01:00
SpaceWhite
300aee39be
nit: add dot to qhelp
2020-03-12 20:38:03 +09:00
SpaceWhite
bb1ea94c54
Nit: Fix qhelp and ql autoformat
2020-03-12 20:35:01 +09:00
SpaceWhite
822bfcd36c
Nit: fix qhelp
2020-03-12 20:25:23 +09:00
Taus Brock-Nannestad
4b5a20d21b
Merge branch 'master' into python-add-points-to-for-missing-builtin-return-types
2020-03-12 11:31:29 +01:00
Erik Krogh Kristensen
172c5ccaca
changes based on review
2020-03-12 11:04:33 +01:00
Erik Krogh Kristensen
91bc124f78
autoformat
2020-03-12 10:45:25 +01:00
semmle-qlci
4355f8d2b4
Merge pull request #3023 from erik-krogh/RedundantUpdate
...
Approved by esbena
2020-03-12 09:34:53 +00:00
Pavel Avgustinov
ecded4c11c
Merge pull request #3048 from jbj/desemmlify
...
Docs: Remove some Semmle references
2020-03-12 09:27:36 +00:00
Robert Marsh
cc99ddfd2c
C++/C#: resync
2020-03-11 12:41:26 -07:00
Ted Reed
07605f5161
Formatting and use lower case string matching
2020-03-11 15:00:58 -04:00
Robert Marsh
1878d04852
C++/C#: sync files and update imports
2020-03-11 11:49:11 -07:00
Robert Marsh
0c43a16ac8
C++: restrict dump str generation in aliased_ssa
2020-03-11 11:45:32 -07:00
Geoffrey White
f84c94b5fb
C++: Change note.
2020-03-11 18:11:51 +00:00
Geoffrey White
b2c5ce8dbd
C++: Exclude code in templates.
2020-03-11 18:11:45 +00:00
Geoffrey White
d454c8457d
C++: Test case.
2020-03-11 18:09:09 +00:00
Rasmus Wriedt Larsen
e52fec03f8
Python: Fix code formatting
2020-03-11 18:16:55 +01:00
Shati Patel
80de75515e
Merge pull request #3043 from shati-patel/2173-tutorials
...
CodeQL docs migration prep: Update QL tutorials
2020-03-11 17:07:35 +00:00
Felicity Chapman
02bec9f1e8
Update link text for remaining links to Python topics
2020-03-11 16:13:47 +00:00
Asger Feldthaus
1a1b7d4ee0
JS: Switch to whitelisting allowed properties
2020-03-11 16:09:14 +00:00
Erik Krogh Kristensen
2c18144560
change note
2020-03-11 17:01:41 +01:00
Erik Krogh Kristensen
d32d14f572
model responseText and responseXml on jqXHR objects
2020-03-11 17:00:44 +01:00
Rebecca Valentine
f80e206d33
Merge pull request #3008 from RasmusWL/python-modernise-security-files
...
Python: modernise remaining security files
2020-03-11 08:56:19 -07:00
Shati Patel
92d82a9dd1
Updates intros
2020-03-11 15:44:39 +00:00
Erik Krogh Kristensen
26d8e33434
Autoformat
2020-03-11 16:42:48 +01:00
Shati Patel
59691a1c6f
Apply suggestions from code review
...
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-03-11 15:33:54 +00:00
James Fletcher
554981e787
Merge pull request #2869 from jf205/codeql-migration-2163
...
CodeQL docs: update titles, add intros, and a few content updates
2020-03-11 14:29:56 +00:00
Jonas Jensen
86ad4d0357
Docs: Remove some Semmle references
...
The only Semmle references now left in the public Markdown files are in
URLs and in legal text. There are also two Semmle references left in
`docs/language/vale-styles/README.md` because I didn't understand them
well enough to change them.
2020-03-11 15:20:15 +01:00
Rasmus Wriedt Larsen
6d72e77cdf
Python: Django: Handle Class-based views
2020-03-11 14:44:14 +01:00
Erik Krogh Kristensen
dd261c51f7
add change note
2020-03-11 14:42:57 +01:00
Erik Krogh Kristensen
e88dac3dea
remove FP for js/redundant-operation
2020-03-11 14:42:32 +01:00
yo-h
38581663a4
Merge pull request #3047 from aschackmull/java/typeflow-testcase
...
Java: Add test case to typeflow qltest.
2020-03-11 09:25:36 -04:00
Asger Feldthaus
6645df93ad
JS: Blacklist another cyclic property
2020-03-11 13:09:37 +00:00
semmle-qlci
1d5fba85f9
Merge pull request #3034 from esbena/js/sharpen-useless-regexp-character-escape
...
Approved by asgerf
2020-03-11 12:29:45 +00:00
Ian Lynagh
9265540704
Merge pull request #2911 from matt-gretton-dann/ql-docs/update-supported-languages
...
QL docs: update supported C/C++ language versions
2020-03-11 12:14:14 +00:00
Anders Schack-Mulligen
e1a0c2d846
Java: Add minor test case to typeflow qltest.
2020-03-11 13:13:19 +01:00
Erik Krogh Kristensen
cb5ef7dbed
add basic support for jqXHR with ajax calls
2020-03-11 13:05:41 +01:00
Rasmus Wriedt Larsen
b760b1f1f2
Python: Django: Don't require viewFunction to mark as route
...
It's very nice to be able to see all the DjangoRoutes even if we don't know the
function that is used to handle the request, at least for debugging.
2020-03-11 12:37:18 +01:00
Alistair
d383c5973e
Merge pull request #3046 from hubwriter/remove-gh-variable
...
docs: Remove GitHub variable
2020-03-11 11:29:19 +00:00
Alistair Christie
d6b666cf8f
docs: Remove GitHub variable
2020-03-11 11:03:18 +00:00
Rasmus Wriedt Larsen
2da1503942
Merge branch 'master' into python-support-django2
2020-03-11 11:21:47 +01:00
Erik Krogh Kristensen
b987f2cf29
autoformat
2020-03-11 10:54:20 +01:00
Rasmus Wriedt Larsen
f5a8084a33
Merge pull request #2827 from BekaValentine/objectapi-to-valueapi-expectedmappingforformatstring
...
Python: ObjectAPI to ValueAPI: ExpectedMappingForFormatString
2020-03-11 10:52:48 +01:00
Rasmus Wriedt Larsen
47cd9c8956
Merge pull request #3038 from BekaValentine/python-objectapi-to-valueapi-deprecatedslicemethod
...
Python: ObjectAPI to ValueAPI: DeprecatedSliceMethod
2020-03-11 10:51:01 +01:00
Anders Schack-Mulligen
85d6b7c2ed
C++: Add tests.
2020-03-11 10:49:21 +01:00
Erik Krogh Kristensen
7f147221f5
refactor to include promise tracking as a core part of type tracking
2020-03-11 10:44:11 +01:00
Anders Schack-Mulligen
a9d76cbe64
Dataflow: Add consistency checks for toString and location.
2020-03-11 10:29:48 +01:00
Mathias Vorreiter Pedersen
f4e8f7a1cc
Merge pull request #2970 from jbj/multiple-types-test
...
C++: Tests for variables with ambiguous types
2020-03-11 09:53:59 +01:00
Erik Krogh Kristensen
fa26ce9f4b
update expected output
2020-03-11 09:36:12 +01:00
Esben Sparre Andreasen
4dac835bb0
JS: loosen qldoc for barrierGuardIsRelevant
2020-03-11 07:54:38 +01:00
Shati Patel
327486dc58
Update title and intro for river crossing puzzle
2020-03-11 02:35:21 +00:00
Shati Patel
52ffd91a26
Move "River crossing puzzle" into tutorial folder
...
- Update links
- Delete "QL etudes" folder
2020-03-11 02:25:56 +00:00
Shati Patel
30e41dd4da
Update references to QL tutorials
2020-03-11 02:14:39 +00:00
Shati Patel
8c5580fe5b
Reorganize map topic
2020-03-11 02:13:51 +00:00
Shati Patel
fe71cc79ba
Add intro to third tutorial
2020-03-11 01:53:47 +00:00
Shati Patel
fdfa2e1aeb
Rename third detective tutorial
2020-03-11 01:49:28 +00:00
Shati Patel
570e726ab5
Add intro to second tutorial
2020-03-11 01:46:40 +00:00
Shati Patel
992c61a0a3
Combine and rename second detective tutorial
2020-03-11 01:46:28 +00:00
Shati Patel
d0d34d6762
Add intro to first tutorial
2020-03-11 01:46:28 +00:00
Shati Patel
43347d006c
Combine and rename first detective tutorial
2020-03-11 01:46:22 +00:00
Ted Reed
107662fc67
Move Security/CWE/CWE-273 into experimental
2020-03-10 18:58:43 -04:00
Dave Bartolomeo
66fd566b66
Merge pull request #3006 from jbj/ir-no-static-init
...
C++: IR: Ignore constant static initializers
2020-03-10 15:46:56 -04:00
Alistair
44b9773ace
Merge pull request #2866 from hubwriter/alistairs-docs-preparation-1
...
CodeQL migration: Java topics - change titles & add intros (2164)
2020-03-10 19:23:09 +00:00
Robert Marsh
ba8ebe9f3a
C++: accept test changes
2020-03-10 11:41:59 -07:00
Robert Marsh
bba6b23019
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-03-10 11:12:19 -07:00
Dave Bartolomeo
ef194d3332
C++: Accept test output
2020-03-10 13:49:20 -04:00
Felicity Chapman
a567dba109
Merge pull request #2823 from felicitymay/2166-python-pre-migration-tasks
...
CodeQL: Python topics (2166) - WIP
2020-03-10 17:14:43 +00:00
Felicity Chapman
f1238f1ec9
Update docs/language/learn-ql/python/introduce-libraries-python.rst
2020-03-10 17:11:59 +00:00
Felicity Chapman
9a30df3a6d
Merge branch 'rc/1.23' into merge-123-master-2
2020-03-10 17:03:53 +00:00
Erik Krogh Kristensen
13e855910e
add more ClientRequest models for JQuery
2020-03-10 17:21:22 +01:00
Jonas Jensen
bf43475ff7
C++: Unroll recursion in inStaticInitializer
...
This gets rid of some slow recursive magic.
On Wireshark, this improves the timing of the involved predicates from
m#Variable::runtimeExprInStaticInitializer#b ..................... 3.1s (executed 86 times)
Variable::runtimeExprInStaticInitializer#b#antijoin_rhs .......... 1.6s
Variable::runtimeExprInStaticInitializer#b ....................... 985ms (executed 6 times)
Variable::runtimeExprInStaticInitializer#b#loop_invariant_prefix . 845ms
#Expr::Expr::getParent_dispred#fbPlus ............................ 3.6s (executed 86 times)
#Expr::Expr::getParent_dispred#fbPlus_10#join_rhs ................ 988ms
to
Variable::runtimeExprInStaticInitializer#f#antijoin_rhs . 1.8s
Variable::runtimeExprInStaticInitializer#f .............. 1.1s (executed 6 times)
Variable::inStaticInitializer#f ......................... 3.2s (executed 86 times)
2020-03-10 17:07:44 +01:00
Jonas Jensen
5e01b4b858
C++: Share the constant initializer detection
...
Since this code is shared between the AST CFG and the IR construction,
it seems right to have only one copy. That copy lives on a new class
`StaticStorageDurationVariable`, which may prove useful on its own.
2020-03-10 17:05:22 +01:00
Rebecca Valentine
160f6cbc15
Python: Adds preliminary modernization
2020-03-10 08:51:20 -07:00
Taus
11b5c54a0e
Merge pull request #2820 from RasmusWL/python-modernise-statements
...
Python: modernise Statements/ queries
2020-03-10 16:46:50 +01:00
semmle-qlci
e3fed39f88
Merge pull request #3000 from asger-semmle/js/late-barrier-guards
...
Approved by erik-krogh
2020-03-10 15:38:35 +00:00
Rebecca Valentine
b36214ae47
Python: Modernizes query and updates expecteds
2020-03-10 08:33:29 -07:00
Rebecca Valentine
85eb43de7d
Merge branch 'master' into python-objectapi-to-valueapi-wrongnumberargumentsincall
2020-03-10 08:26:52 -07:00
James Fletcher
5a7a3f7dcb
Merge pull request #3035 from jf205/merge-master-docs-preparation
...
Merge `master` into `docs-preparation`
2020-03-10 15:24:18 +00:00
Rebecca Valentine
6017197870
Python: Autoformats
2020-03-10 08:08:05 -07:00
Rebecca Valentine
4eb3de2aca
Merge branch 'master' into python-objectapi-to-valueapi-signatureoverriddenmethod
2020-03-10 08:06:45 -07:00
semmle-qlci
4c1d76ee9a
Merge pull request #2937 from BekaValentine/python-objectapi-to-valueapi-wrongnumberargumentsforformat
...
Approved by tausbn
2020-03-10 15:04:05 +00:00
Rebecca Valentine
c670f8180f
Python: Autoformats
2020-03-10 07:57:55 -07:00
Rebecca Valentine
909e064016
Merge branch 'objectapi-to-valueapi-expectedmappingforformatstring' of github.com:BekaValentine/ql into objectapi-to-valueapi-expectedmappingforformatstring
2020-03-10 07:54:56 -07:00
Rebecca Valentine
1234cb6e0f
Python: Incorporates updates from new master
2020-03-10 07:54:28 -07:00
Rebecca Valentine
b7bcf6c3d0
Merge branch 'master' into objectapi-to-valueapi-expectedmappingforformatstring
2020-03-10 07:51:48 -07:00
Rebecca Valentine
c690e2595c
Merge pull request #3007 from RasmusWL/python-remove-use-of-deprecated-getvalue
...
Python: Remove usage of deprecated .getValue()
2020-03-10 07:18:41 -07:00
Taus
ea5aa57151
Merge pull request #3031 from BekaValentine/python-objectapi-to-valueapi-signaturespecialmethods
...
Python: ObjectAPI to ValueAPI: SignatureSpecialMethods
2020-03-10 14:54:39 +01:00
Rasmus Wriedt Larsen
b1d1974a0f
Merge branch 'master' into python-modernise-statements
2020-03-10 14:53:44 +01:00
Taus
dd0ce1c607
Merge pull request #2942 from RasmusWL/pyhton-improve-regex-docs
...
Python: Add a bit of regex docs
2020-03-10 14:49:31 +01:00
Rasmus Wriedt Larsen
2382b42bbe
Python: Rewrite helper predicate has_string_type
2020-03-10 14:47:49 +01:00
Rasmus Wriedt Larsen
f3a10a12a1
Python: Fix typo
...
Co-Authored-By: Taus <tausbn@gmail.com >
2020-03-10 14:45:33 +01:00
Tom Hvitved
bd6c23d165
Merge pull request #3020 from aschackmull/dataflow/type-pruning-bigstep
...
Dataflow: Fix bug in type pruning.
2020-03-10 14:21:21 +01:00
Erik Krogh Kristensen
62ae484545
autoformat and update expected output
2020-03-10 14:01:40 +01:00
Rasmus Wriedt Larsen
5439059b0d
Python: Minor cleanup in regex.qll
2020-03-10 14:00:30 +01:00
semmle-qlci
570f095ae3
Merge pull request #2998 from asger-semmle/js/typescript-memory
...
Approved by erik-krogh
2020-03-10 12:24:52 +00:00
Felicity Chapman
7d0911d20f
Merge pull request #3033 from felicitymay/merge-123-master
...
Merge rc/1.23 back into master
2020-03-10 12:22:47 +00:00
Esben Sparre Andreasen
5c8800a1c7
JS: make autoformatter happy
2020-03-10 13:11:31 +01:00
james
f9cfa0cb25
Merge branch 'master' into merge-master-docs-preparation
2020-03-10 11:53:38 +00:00
James Fletcher
b1a24705ad
Apply suggestions from code review
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-03-10 11:39:41 +00:00
Erik Krogh Kristensen
066568ea60
add promise tracking to Files.qll
2020-03-10 12:36:42 +01:00
Erik Krogh Kristensen
a24bc564a4
add extra tests for file-name with promises
2020-03-10 12:35:34 +01:00
Erik Krogh Kristensen
97f2760583
refactor Files.qll to use type-tracking (without tracking anything)
2020-03-10 12:34:20 +01:00
Erik Krogh Kristensen
6110f85748
refactor chrome-remote-interface to use type-tracking promise steps
2020-03-10 12:27:21 +01:00
Esben Sparre Andreasen
5b1b945c35
JS: distinguishes escapes in strings and regular expression literals
2020-03-10 12:26:20 +01:00
Erik Krogh Kristensen
3ddfd7ba73
add extra promise test for chrome-remote-interface
2020-03-10 12:24:16 +01:00
Erik Krogh Kristensen
69d8cf643d
add type tracking predicates for promises
2020-03-10 12:23:23 +01:00
Taus
e3160f966f
Merge pull request #2932 from RasmusWL/python-re.compile-missing-points-to
...
Python: Add example of re.compile missing points-to
2020-03-10 11:55:23 +01:00
Anders Schack-Mulligen
e97c72cd5d
Dataflow: Adjust imports.
2020-03-10 11:34:09 +01:00
Jonas Jensen
28a9baba36
Merge pull request #3026 from MathiasVP/simplerangeanalysis-const-var-access
...
C++: Handle constant variable accesses in SimpleRangeAnalysis.qll
2020-03-10 11:22:33 +01:00
Anders Schack-Mulligen
fc87f1eb1b
C#: Fix tests.
2020-03-10 10:54:48 +01:00
Rasmus Wriedt Larsen
5e62f54094
Merge pull request #3030 from BekaValentine/python-objectapi-to-valueapi-useimplicitnonereturnvalue
...
Python: ObjectAPI to ValueAPI: UseImplicitNoneReturnValue
2020-03-10 10:38:06 +01:00
Rasmus Wriedt Larsen
1b8154c139
Merge pull request #2925 from BekaValentine/python-objectapi-to-valueapi-callargs
...
Python: ObjectAPI to ValueAPI: CallArgs
2020-03-10 10:26:21 +01:00
Esben Sparre Andreasen
3bfda6cd38
JS: refactoring: make separate modules for mongoose Model and Query
2020-03-10 09:57:45 +01:00
Esben Sparre Andreasen
480be06d86
JS: replace Model class with opaque type tracking predicate
2020-03-10 09:57:45 +01:00
Esben Sparre Andreasen
dbeb216af0
JS: make use of TypeScript types for mongoose Model and Query
2020-03-10 09:57:45 +01:00
Esben Sparre Andreasen
0c46e4d1af
JS: fixup typetracking usage: t2 -> t2.continue()
2020-03-10 09:57:45 +01:00
Esben Sparre Andreasen
aae92ad795
JS: add test for DatabaseAccess
2020-03-10 09:57:45 +01:00
Esben Sparre Andreasen
6b9bd8bd97
JS: adjust tests slightly to also support DatabaseAccess testing
2020-03-10 09:57:45 +01:00
Esben Sparre Andreasen
7a2faa0b6b
JS: add additional mongoose and mongodb js/nosql-injection sinks
2020-03-10 09:57:45 +01:00
Esben Sparre Andreasen
b6c616efd3
JS: support optional options argument to MongoClient.connect
2020-03-10 09:57:45 +01:00
Esben Sparre Andreasen
f24f03e1f8
JS: add mongodb .connect tests
2020-03-10 09:57:45 +01:00
Esben Sparre Andreasen
e61f522f30
JS: bump change notes for mongodb
2020-03-10 09:57:45 +01:00
Esben Sparre Andreasen
21e6e69f22
JS: support mongodb v3 (minimally)
...
https://github.com/github/codeql-javascript-team/issues/79
2020-03-10 09:57:45 +01:00
Mathias Vorreiter Pedersen
8b467eb9a7
C++: Allow multiple results in getValue
2020-03-10 09:50:28 +01:00
Felicity Chapman
d54a9c9630
Merge branch 'rc/1.23' into merge-123-master
2020-03-10 08:45:22 +00:00
Rebecca Valentine
7ce905a310
Python: Adds preliminary modernization
2020-03-09 19:29:47 -07:00
Rebecca Valentine
bbeefd5747
Python: Modernizes query
2020-03-09 19:21:31 -07:00
Rebecca Valentine
047c328c58
Update python/ql/src/semmle/python/objects/ObjectAPI.qll
...
Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-03-09 19:20:08 -07:00
Rebecca Valentine
e8708a083f
Python: Modernizes query and expecteds
2020-03-09 19:13:54 -07:00
Rebecca Valentine
48e67bca51
Python: Modernizes query
2020-03-09 18:57:42 -07:00
Rebecca Valentine
810efc5ca2
Python: Adds Rasmus's suggestion
...
Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-03-09 16:21:34 -07:00
Rebecca Valentine
f4f8c6e1e5
Python: Swaps out element_from_tuple
2020-03-09 16:20:22 -07:00
Taus
be09c17367
Merge pull request #2990 from BekaValentine/python-objectapi-to-valueapi-raisingtuple
...
Python: ObjectAPI to ValueAPI: RaisingTuple
2020-03-10 00:16:12 +01:00
Taus
96e99f55ad
Merge pull request #2976 from BekaValentine/python-objectapi-to-valueapi-emptyexcept
...
Python: ObjectAPI to ValueAPI: EmptyExcept
2020-03-09 23:56:27 +01:00
Taus
b51e2a9e80
Merge pull request #2977 from BekaValentine/python-objectapi-to-valueapi-catchingbaseexception
...
Python: ObjectAPI to ValueAPI: CatchingBaseException
2020-03-09 22:54:50 +01:00
Mathias Vorreiter Pedersen
1a5282ae21
C++: Add testcase that previously resulted in a false positive
2020-03-09 22:33:59 +01:00
Mathias Vorreiter Pedersen
525a00098e
C++: Address review comments
2020-03-09 22:16:05 +01:00
Dave Bartolomeo
9fae2faaeb
Merge pull request #2994 from jbj/IRSanity-separate-file
...
C++: Move InstructionSanity out of Instruction.qll
2020-03-09 16:34:36 -04:00
Rebecca Valentine
c9c469b201
Python: Modernizes queries
2020-03-09 12:52:33 -07:00
Rebecca Valentine
6a1203a60f
Python: Adds modernized predicates
2020-03-09 12:52:15 -07:00
Rebecca Valentine
6636f72e07
Python: Moves more predicates over to suffixed form
2020-03-09 11:59:44 -07:00
Rebecca Valentine
6d10c47cba
Python: Moves predicates over to suffixed form
2020-03-09 11:56:57 -07:00
Erik Krogh Kristensen
ad52d6446e
add test case for tuple-like use
2020-03-09 19:47:05 +01:00
Rebecca Valentine
bf92cee1b1
Python: Updates expected results
2020-03-09 11:16:58 -07:00
Erik Krogh Kristensen
981eef2587
expose arrayFunctionTaintStep in TaintTracking.qll
2020-03-09 17:22:29 +01:00
Erik Krogh Kristensen
509941649c
remove redundant qldoc, and change parameter names to better reflect behavior
2020-03-09 17:20:12 +01:00
Erik Krogh Kristensen
a476fc5c3b
revert Array.from change
2020-03-09 17:09:31 +01:00
Rasmus Wriedt Larsen
a38fd2d3d1
Python: Use unambiguous name getCallNode
2020-03-09 17:05:00 +01:00
Rasmus Wriedt Larsen
a9674ef6e8
Python: Resolve autoformat ugliness
2020-03-09 16:54:55 +01:00
Erik Krogh Kristensen
68ffd52d4c
update expected output
2020-03-09 16:45:10 +01:00
Erik Krogh Kristensen
b4b05696e1
two bugfixes
2020-03-09 16:45:03 +01:00
semmle-qlci
155985c77d
Merge pull request #3024 from max-schaefer/js/move-portals-to-experimental
...
Approved by asgerf
2020-03-09 15:39:36 +00:00
Rasmus Wriedt Larsen
31cfb1689c
Python: Fix minor bug in modernisation-rewrite
...
Obviously the result module shouldn't be a package 🤦 I was confusing
myself, since I wanted to say that `Module::named("Crypto.Cipher")` should be a package :D
2020-03-09 15:49:08 +01:00
Mathias Vorreiter Pedersen
6dee7061a0
C++: Handle constant variable accesses in SimpleRangeAnalysis.qll
2020-03-09 15:44:32 +01:00
Rasmus Wriedt Larsen
0ce8e9180b
Python: Remove code that adds taint to unrelated ControlFlowNode
...
The problem with the deleted code is that it would add flow to what might be an
unrelated ControlFlowNode, which is illustrated in the query below (that gives
results on flask)
from ControlFlowNode arg, CallNode call, CallNode other_call
where
call.getNode().getAKeyword().getValue() = arg.getNode() and
not call.getAnArg() = arg and
other_call.getAnArg() = arg and
not other_call = call
select call, arg, other_call
2020-03-09 15:27:31 +01:00
Rasmus Wriedt Larsen
cac5d00ca2
Python: Fix string taint tests
...
The tests in ql/python/ql/test/library-tests/taint/strings/ shows that
ClassValue::str() is not good enough.
2020-03-09 15:10:48 +01:00
Tom Hvitved
6a10516c1e
Merge pull request #3021 from aschackmull/dataflow/partial-path-perf
...
Java/C++/C#: Fix performance issue in partial paths exploration.
2020-03-09 15:04:33 +01:00
Max Schaefer
3c785ecaa7
JavaScript: Move flow summaries to experimental.
...
Also update description and change note to call out their experimental character more clearly.
2020-03-09 12:57:20 +00:00
Asger F
5a1bf94994
Merge pull request #2987 from asger-semmle/js/urls-not-sensitive-data
...
JS: Declassify sensitive exprs with special characters
2020-03-09 12:29:47 +00:00
Asger Feldthaus
6c1f98a5ae
JS: Update vague variable name
2020-03-09 11:58:38 +00:00
Tom Hvitved
a2269158df
C#: Ignore dotnet clean exit code in autobuilder
2020-03-09 12:00:28 +01:00
Calum Grant
250afda7da
Merge pull request #2831 from hvitved/csharp/local-function-fresh-label
...
C#: Generate fresh TRAP ID for local functions
2020-03-09 10:46:45 +00:00
Anders Schack-Mulligen
a2bbacf58d
Java/C++/C#: Fix performance issue in partial paths exploration.
2020-03-09 11:30:59 +01:00
Anders Schack-Mulligen
4298a3a931
Java: Add test.
2020-03-09 11:16:59 +01:00
Anders Schack-Mulligen
f491fcd5ae
Java/C++/C#: Sync.
2020-03-09 11:05:13 +01:00
Anders Schack-Mulligen
7a74634cfd
Java/C++/C#: Simplify.
2020-03-09 11:04:28 +01:00
Anders Schack-Mulligen
cf84a53573
Java/C++/C#: Fix bug in type pruning.
2020-03-09 11:04:24 +01:00
Erik Krogh Kristensen
0f0187d585
move Array.from to ArrayCreationNode
2020-03-09 10:26:21 +01:00
Erik Krogh Kristensen
dc4e361d75
add data-flow steps for arrays
2020-03-09 09:53:08 +01:00
Erik Krogh Kristensen
8e3cf5c9c8
add test for data-flow on arrays
2020-03-09 09:25:17 +01:00
Erik Krogh Kristensen
14740d4ccc
move existing array taint stracking into Arrays.qll
2020-03-09 09:20:45 +01:00
Asger Feldthaus
a9a9c14eea
JS: Change note
2020-03-07 15:15:13 +00:00
Asger Feldthaus
a1d479e975
JS: Declassify sensitive exprs with special characters
2020-03-07 15:15:13 +00:00
Asger Feldthaus
759631ae56
JS: Raise default memory limit to 2.4G
2020-03-07 15:13:53 +00:00
Asger Feldthaus
c55dcf88d5
JS: Improve error reporting
2020-03-07 15:13:52 +00:00
Asger Feldthaus
549d4e9b57
JS: Do not restart in the middle of a message
2020-03-07 15:13:52 +00:00
Asger Feldthaus
e1657b237b
JS: Extract compiler-restarting into a function
2020-03-07 15:13:52 +00:00
Asger Feldthaus
2ef21ea4b8
JS: Only evaluate relevant barrier guards
2020-03-07 15:13:20 +00:00
Asger Feldthaus
fd1a14d3bd
JS: Add qldoc to a private predicate
2020-03-07 15:13:20 +00:00
Asger Feldthaus
eed4204e04
JS: Lift some internal members to private top-level
2020-03-07 15:13:20 +00:00
Ted Reed
a425e5fb5c
Reduce false positives with small heuristics
2020-03-06 23:12:16 -05:00
SpaceWhite
5e912cbf8e
Move directory to experimental
2020-03-07 11:55:32 +09:00
SpaceWhite
8cdc2bb268
Merge branch 'master' into CWE-094
2020-03-07 11:54:31 +09:00
SpaceWhite
b7af1645aa
Move directory to experimental
2020-03-07 11:49:33 +09:00
SpaceWhite
2ec107bc2d
Merge branch 'master' into CWE-643
2020-03-07 11:47:53 +09:00
Rebecca Valentine
2f3967cf5e
Python: Fixes erroneous modernization bug
2020-03-06 18:31:38 -08:00
Rebecca Valentine
3e36c672cf
Python: Removes superfluous cast
2020-03-06 13:06:11 -08:00
Rebecca Valentine
7b49c8e6f8
Python: Fixes bug in modernization
2020-03-06 12:47:46 -08:00
Jonas Jensen
0cd3eb7b7e
C++: Accept test changes
...
Some IR inconsistencies are "fixed" because we no longer translate
constant initializers of static locals.
2020-03-06 20:20:47 +01:00
Rasmus Wriedt Larsen
8b2c74a4dd
Python: Modernise remaining Security/*.qll files
2020-03-06 17:30:02 +01:00
Rasmus Wriedt Larsen
14957345a3
Python: Fix formatting of isLegalExceptionType
2020-03-06 17:27:50 +01:00
Rasmus Wriedt Larsen
70634fe30e
Python: Remove usage of deprecated .getValue()
2020-03-06 16:20:31 +01:00
Felicity Chapman
90a9a6d2ac
Update docs/language/learn-ql/python/introduce-libraries-python.rst
2020-03-06 15:13:10 +00:00
Jonas Jensen
cc38abd228
C++: Ignore constant static initializers
2020-03-06 15:05:28 +01:00
Jonas Jensen
02f0b89a0d
C++: Test for constant static initializer
2020-03-06 15:05:28 +01:00
Rasmus Wriedt Larsen
2416cac8f4
Python: Modernise StringKind files
2020-03-06 14:45:03 +01:00
Alistair
40e8ccc020
Merge pull request #2879 from hubwriter/alistairs-docs-preparation-csharp
...
CodeQL migration: C# topics - change titles & add intros (2174)
2020-03-06 13:07:15 +00:00
mc
2c542df576
Merge pull request #2897 from mchammer01/js-migration-work
...
Code QL pre-migration tasks: update articles relating to CodeQL for JavaScript
2020-03-06 11:31:08 +00:00
mc
3558bb8bc0
Update docs/language/learn-ql/javascript/dataflow-cheat-sheet.rst
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-03-06 10:51:13 +00:00
mc
d777c08fc2
Update docs/language/learn-ql/javascript/type-tracking.rst
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-03-06 10:50:59 +00:00
semmle-qlci
3ae1aada37
Merge pull request #2995 from tausbn/python-fix-nested-sequence-assign-cp
...
Approved by RasmusWL
2020-03-06 09:43:24 +00:00
mchammer01
0a2ca55374
Merge branch 'js-migration-work' of github.com:mchammer01/ql into js-migration-work
2020-03-06 09:24:01 +00:00
mchammer01
fbe0735a5e
pre-migration tasks: address review comments
2020-03-06 09:20:40 +00:00
semmle-qlci
7891f8621e
Merge pull request #2982 from esbena/js/request-model-with-chaining
...
Approved by asgerf
2020-03-06 08:57:42 +00:00
semmle-qlci
ddc2f973d1
Merge pull request #3001 from asger-semmle/js/autoformat
...
Approved by erik-krogh
2020-03-06 08:53:56 +00:00
mc
e0ceeef4dc
Update docs/language/learn-ql/javascript/type-tracking.rst
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-03-06 08:18:07 +00:00
mc
0773bfc2d7
Update docs/language/learn-ql/javascript/introduce-libraries-ts.rst
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-03-06 08:17:52 +00:00
Jonas Jensen
a13f355a85
C++: autoformat fixup
2020-03-06 08:29:46 +01:00
Ted Reed
8e1a7fef30
CPP: Add query for CWE-273 that detects out-of-order setuid
2020-03-05 14:21:32 -05:00
Asger Feldthaus
2c8eae22d1
JS: Autoformat
2020-03-05 16:58:49 +00:00
Taus Brock-Nannestad
2face94fa5
Python: Mitigate CP in nested_sequence_assign.
...
The problem here was that in the base case, there was no relationship between
`left_parent` and `right_parent`. These could be any two tuples or lists, even
if they were not part of an assignment statement.
To fix this, we add a bit of manual "magic", requiring that both of these
arguments must belong to the left and right-hand sides of the same assignment
statement.
(Note that this is in principle _still_ a gross overapproximation, but since
assignment statements are usually quite restricted in size, I don't expect this
to be a major problem.)
2020-03-05 14:09:50 +01:00
Rasmus Wriedt Larsen
fb1e993c0f
Merge pull request #2963 from BekaValentine/python-objectapi-to-valueapi-advancedformatting
...
Python: ObjectAPI to ValueAPI: AdvancedFormatting
2020-03-05 13:40:02 +01:00
Jonas Jensen
e29f517af2
C++: Move InstructionSanity out of Instruction.qll
...
Having that module in `Instruction.qll` slowed down the parsing of that
file both humans and the compiler.
This commit moves the `InstructionSanity` module to `IRSanity.qll`
without making any changes to its contents apart from adding some
imports.
2020-03-05 12:11:50 +01:00
mchammer01
162a683075
pre-migration task: update links
2020-03-05 10:33:39 +00:00
semmle-qlci
0d76c71ed7
Merge pull request #2981 from asger-semmle/js/lower-syntax-error-severity
...
Approved by max-schaefer
2020-03-05 09:47:56 +00:00
semmle-qlci
98cee5cc1d
Merge pull request #2967 from asger-semmle/js/flow-through-prop
...
Approved by esbena
2020-03-05 09:46:35 +00:00
semmle-qlci
85ee5fc988
Merge pull request #2955 from erik-krogh/BetterHeader
...
Approved by asgerf
2020-03-05 08:24:43 +00:00
Rebecca Valentine
d535246703
Python: Modernizes query
2020-03-04 17:28:44 -08:00
Rebecca Valentine
646bc29e76
Python: Modernizes query
2020-03-04 17:22:21 -08:00
Rebecca Valentine
b09ab67e75
Python: Modernizes query
2020-03-04 17:10:32 -08:00
semmle-qlci
98034aaa53
Merge pull request #2988 from asger-semmle/js/autoformat-again-again
...
Approved by esbena
2020-03-04 21:20:52 +00:00
semmle-qlci
c6e3d8df49
Merge pull request #2969 from esbena/js/process-as-event-emitter
...
Approved by erik-krogh
2020-03-04 20:24:12 +00:00
Asger Feldthaus
53569453ba
JS: Autoformat again
2020-03-04 19:28:24 +00:00
Robert Marsh
d9d6960110
Merge pull request #2985 from MathiasVP/bounded-uncontrolled-alloc-size
...
C++: Add testcase for cpp/uncontrolled-allocation-size
2020-03-04 10:00:43 -08:00
Robert Marsh
80ec5c11b3
Merge pull request #2983 from jbj/definitionReachesRank-perf
...
C++: IR: faster definitionReachesRank
2020-03-04 09:57:06 -08:00
semmle-qlci
c5d39039bc
Merge pull request #2962 from erik-krogh/YetAnotherSanitizer
...
Approved by asgerf
2020-03-04 15:27:09 +00:00
Asger Feldthaus
c2f7cdce25
JS: Change precision to very-high
2020-03-04 15:06:10 +00:00
Mathias Vorreiter Pedersen
3973a50c9b
C++: Add testcase for cpp/uncontrolled-allocation-size
2020-03-04 15:51:14 +01:00
Jonas Jensen
6b2fd17f03
C++: IR: faster definitionReachesRank
...
On Wireshark with 6GB RAM, I've observed `definitionReachesRank` to be
the slowest predicate in the IR. It seems that the implementation was
slow because the optimizer failed to eliminate the common
`reachesRank - 1` subexpression. This led to context being pushed into
the `not`, which got implemented as `MATERIALIZE`. That wouldn't
normally be a disaster, but this is one of the largest predicates in the
IR SSA construction, and iteration 2 was very slow.
Before:
(1505s) Starting to evaluate predicate SSAConstruction::DefUse::definitionReachesRank#ffff#cur_delta/4[1]@93f592 (iteration 1)
(1535s) Tuple counts for SSAConstruction::DefUse::definitionReachesRank#ffff#cur_delta:
130670697 ~0% {4} r1 = SCAN project#SSAConstruction::DefUse::hasDefinitionAtRank#fffff AS I OUTPUT I.<0>, I.<1>, I.<2>, (I.<2> + 1)
130670697 ~6% {5} r2 = JOIN r1 WITH SSAConstruction::DefUse::exitRank#fff AS R ON FIRST 2 OUTPUT r1.<0>, r1.<1>, r1.<2>, r1.<3>, R.<2>
130670697 ~6% {5} r3 = SELECT r2 ON r2.<3> <= r2.<4>
130670697 ~0% {4} r4 = SCAN r3 OUTPUT r3.<0>, r3.<1>, r3.<2>, r3.<3>
return r4
(1535s) - SSAConstruction::DefUse::definitionReachesRank#ffff_delta has 130670697 rows (order for disjuncts: delta=<standard>).
(1535s) Starting to evaluate predicate SSAConstruction::DefUse::definitionReachesRank#ffff#cur_delta/4[2]@866c14 (iteration 2)
(1626s) Tuple counts for SSAConstruction::DefUse::definitionReachesRank#ffff#cur_delta:
261341394 ~107% {4} r1 = JOIN SSAConstruction::DefUse::definitionReachesRank#ffff#prev_delta AS L WITH SSAConstruction::DefUse::definitionReachesRank#ffff#join_rhs AS R ON FIRST 3 OUTPUT R.<0>, R.<1>, R.<2>, (1 + L.<3>)
261341394 ~107% {4} r2 = r1 AND NOT SSAConstruction::DefUse::definitionReachesRank#ffff#prev AS R(r1.<0>, r1.<1>, r1.<2>, r1.<3>)
130670697 ~0% {5} r3 = SCAN r2 OUTPUT r2.<0>, r2.<1>, (r2.<3> - 1), r2.<2>, r2.<3>
106034590 ~1% {4} r4 = JOIN r3 WITH project#SSAConstruction::DefUse::hasDefinitionAtRank#fffff AS R ON FIRST 3 OUTPUT r3.<0>, r3.<1>, r3.<3>, r3.<4>
106034590 {4} r5 = MATERIALIZE r4 AS antijoin_rhs
24636107 ~3% {4} r6 = r2 AND NOT r5(r2.<0>, r2.<1>, r2.<2>, r2.<3>)
24636107 ~0% {5} r7 = JOIN r6 WITH SSAConstruction::DefUse::exitRank#fff AS R ON FIRST 2 OUTPUT r6.<0>, r6.<1>, r6.<2>, r6.<3>, R.<2>
2749441 ~0% {5} r8 = SELECT r7 ON r7.<3> <= r7.<4>
2749441 ~4% {4} r9 = SCAN r8 OUTPUT r8.<0>, r8.<1>, r8.<2>, r8.<3>
return r9
(1626s) - SSAConstruction::DefUse::definitionReachesRank#ffff_delta has 2749441 rows (order for disjuncts: delta=<standard>).
After:
(12s) Tuple counts for SSAConstruction::DefUse::definitionReachesRank#ffff#cur_delta:
130670697 ~0% {4} r1 = SCAN project#SSAConstruction::DefUse::hasDefinitionAtRank#fffff AS I OUTPUT I.<0>, I.<1>, I.<2>, (I.<2> + 1)
return r1
(12s) - SSAConstruction::DefUse::definitionReachesRank#ffff_delta has 130670697 rows (order for disjuncts: delta=<standard>).
(12s) Starting to evaluate predicate SSAConstruction::DefUse::definitionReachesRank#ffff#cur_delta/4[2]@fff64c (iteration 2)
(34s) Tuple counts for SSAConstruction::DefUse::definitionReachesRank#ffff#cur_delta:
108784031 ~0% {4} r1 = SSAConstruction::DefUse::definitionReachesRank#ffff#prev_delta AS L AND NOT SSAConstruction::DefUse::exitRank#fff AS R(L.<0>, L.<1>, L.<3>)
2749441 ~5% {4} r2 = r1 AND NOT project#SSAConstruction::DefUse::hasDefinitionAtRank#fffff AS R(r1.<0>, r1.<1>, r1.<3>)
2749441 ~4% {4} r3 = SCAN r2 OUTPUT r2.<0>, r2.<1>, r2.<2>, (r2.<3> + 1)
2749441 ~4% {4} r4 = r3 AND NOT SSAConstruction::DefUse::definitionReachesRank#ffff#prev AS R(r3.<0>, r3.<1>, r3.<2>, r3.<3>)
return r4
(34s) - SSAConstruction::DefUse::definitionReachesRank#ffff_delta has 2749441 rows (order for disjuncts: delta=<standard>).
Note that the row counts are exactly the same before and after.
2020-03-04 15:00:47 +01:00
Mathias Vorreiter Pedersen
bbcf0b52df
Merge pull request #2941 from jbj/Overflow-stmtDominates
...
C++: Avoid `iDominates*` in Overflow.qll
2020-03-04 12:40:52 +01:00
Esben Sparre Andreasen
db335ae89b
JS: add default/chaining for request
2020-03-04 12:36:49 +01:00
Esben Sparre Andreasen
92b3e8c060
JS: add default/chaining tests for request
2020-03-04 12:25:23 +01:00
Mathias Vorreiter Pedersen
b20afa6370
Merge pull request #2979 from jbj/GVN-noinline
...
C++: pragma[noinline] on GVN charpred
2020-03-04 12:19:27 +01:00
Asger Feldthaus
6f2b05932e
JS: Change note
2020-03-04 11:18:12 +00:00
Asger Feldthaus
af0df6c369
JS: Lower severity of js/syntax-error
2020-03-04 11:16:59 +00:00
semmle-qlci
c4b961c8af
Merge pull request #2973 from tausbn/python-fix-or-disable-cps
...
Approved by BekaValentine
2020-03-04 10:36:47 +00:00
Jonas Jensen
60bcbf477a
C++: pragma[noinline] on GVN charpred
...
The charpred of class `GVN` in `ASTValueNumbering.qll` got inlined into
the member predicate `getAnInstruction` and caused a tuple explosion on
Wireshark in the query `StrncpyFlippedArgs.ql`.
I interrupted the predicate after 10 minutes and got these intermediate
tuple counts:
(5208s) Tuple counts for ASTValueNumbering::GVN::getAnInstruction_dispred#ff:
8754900909 ~5% {3} r1 = JOIN ValueNumberingInternal::tvalueNumber#ff_10#join_rhs AS L WITH ValueNumberingInternal::tvalueNumber#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, L.<1>, L.<0>
4390274632 ~150085% {2} r2 = JOIN r1 WITH project#SSAConstruction::Cached::getInstructionUnconvertedResultExpression AS R ON FIRST 1 OUTPUT r1.<2>, r1.<1>
return r2
After this change, the `getAnInstruction` predicate is itself inlined,
like it should be. The new non-inlined charpred takes 2.1s and has these
tuple counts:
(2s) Tuple counts for ASTValueNumbering::GVN#f:
9158442 ~117% {1} r1 = JOIN project#SSAConstruction::Cached::getInstructionUnconvertedResultExpression AS L WITH ValueNumberingInternal::tvalueNumber#ff@staged_ext AS R ON FIRST 1 OUTPUT R.<1>
return r1
2020-03-04 10:34:05 +01:00
Esben Sparre Andreasen
ae43e90a67
JS: model process as an EventEmitter
2020-03-04 09:49:16 +01:00
Rebecca Valentine
2bcd8c8cb8
Python: Moves query over to modernized predicates
2020-03-03 17:05:47 -08:00
Rebecca Valentine
fa59fc607c
Python: Adds modernized predicates
2020-03-03 17:05:29 -08:00
Rebecca Valentine
0f26734e9a
Python: Moves more predicates over to suffixed form
2020-03-03 17:04:12 -08:00
Rebecca Valentine
a0cf2cbb13
Python: Moves old predicates to suffixed form
2020-03-03 16:53:56 -08:00
Rebecca Valentine
400a0f5741
Python: Adds preliminary modernization
2020-03-03 16:52:12 -08:00
Rebecca Valentine
b33b222db8
Python: Modernizes query
2020-03-03 16:41:52 -08:00
Rebecca Valentine
88daf65854
Python: Removes obsolete predicates
2020-03-03 16:03:27 -08:00
Rebecca Valentine
3bedd5cb58
Python: Adds modernized predicates and moves query over to them
2020-03-03 16:02:25 -08:00
Rebecca Valentine
5fea31eed1
Python: Moves predicates over to suffixed form
2020-03-03 15:55:40 -08:00
Rebecca Valentine
e39a0c9121
Python: Moves non_local_control_flow to new API, and fixes bug in ClassValue implementation
2020-03-03 15:38:35 -08:00
Taus
02ae0fbda6
Merge pull request #2965 from BekaValentine/python-objectapi-to-valueapi-raising
...
Python: ObjectAPI to ValueAPI: Raising
2020-03-04 00:03:17 +01:00
Rebecca Valentine
ce204ac949
Python: Moves statement out of quantifier that it didnt need to be in
2020-03-03 14:57:30 -08:00
Rebecca Valentine
8e1c089ff3
Python: Removes unused import
2020-03-03 14:38:26 -08:00
Robert Marsh
1e3419fd60
C++/C#: generate IR for funcs excluded in PrintIR
...
Previously, functions excluded from PrintIR would not have IR
generated. This sometimes affected escacpe analysis of functions that
were printed.
2020-03-03 14:34:08 -08:00
semmle-qlci
6f508bccc1
Merge pull request #2943 from esbena/js/more-fs-modules
...
Approved by erik-krogh
2020-03-03 21:50:43 +00:00
Taus Brock-Nannestad
48a47e1b54
Python: Fix broken test output.
2020-03-03 19:45:13 +01:00
Taus
8bd4f6d136
Merge pull request #2945 from BekaValentine/python-objectapi-to-valueapi-calltosuperwrongclass
...
Python: ObjectAPI to ValueAPI: CallToSuperWrongClass
2020-03-03 18:38:58 +01:00
Taus
9068040097
Merge pull request #2964 from BekaValentine/python-objectapi-to-valueapi-notimplemented
...
Python: ObjectAPI to ValueAPI: NotImplemented
2020-03-03 18:36:14 +01:00
Calum Grant
464a034c7d
Merge pull request #2894 from BekaValentine/python-objectapi-to-valueapi-iscomparisons
...
Python: ObjectAPI to ValueAPI: IsComparisons
2020-03-03 17:25:24 +00:00
Taus Brock-Nannestad
eecace788f
Python: Fix or disable CPs introduced by #2700 and #2875 .
2020-03-03 18:18:03 +01:00
yo-h
a576f3fa54
Merge pull request #2966 from aschackmull/java/nullness-fp-test
...
Java: Document a FP for nullness in a test.
2020-03-03 12:04:52 -05:00
Nick Rolfe
c2db3d7984
Merge pull request #2968 from igfoo/unused_types
...
C++: Update tests following extractor no longer extracting some unused types
2020-03-03 16:03:40 +00:00
Esben Sparre Andreasen
4625217a68
Merge branch 'master' of github.com:Semmle/ql into js/more-fs-modules
2020-03-03 15:07:51 +01:00
Jonas Jensen
30b43b9322
C++: Tests for variables with ambiguous types
2020-03-03 14:45:04 +01:00
Esben Sparre Andreasen
dfa07130b5
JS: add process EventEmitter test
2020-03-03 14:26:03 +01:00
Jonas Jensen
88c74b2a4b
Merge pull request #2917 from MathiasVP/inexact-is-chi-for-all-aliased-memory
...
C++: `isChiForAllAliasedMemory` recursion through inexact Phi operands
2020-03-03 14:25:49 +01:00
Jonas Jensen
4f23acf080
Merge pull request #2957 from MathiasVP/dataflow-dispatch-same-num-args
...
C++: Only return functions that match arguments in DataFlowDispatch::viableCallable
2020-03-03 14:19:26 +01:00
Anders Schack-Mulligen
4601639bad
Java: Document a FP in a test.
2020-03-03 13:39:26 +01:00
Erik Krogh Kristensen
f03c67266a
add taint step for replace call that only removes dots
2020-03-03 12:58:06 +01:00
Erik Krogh Kristensen
95819c8731
use RegExpTerm to generalize predicate
2020-03-03 12:34:18 +01:00
Asger Feldthaus
a2042094cf
JS: Restrict reachableFromStoreBase
2020-03-03 11:32:23 +00:00
Asger Feldthaus
98524556c3
JS: Add some tests
2020-03-03 11:32:23 +00:00
Erik Krogh Kristensen
622a2fcfdc
use regexp term instead of char class
2020-03-03 12:24:13 +01:00
semmle-qlci
57b3e6addf
Merge pull request #2958 from erik-krogh/InnerPrefix
...
Approved by asgerf
2020-03-03 11:10:44 +00:00
Erik Krogh Kristensen
bc13204193
refactor header checks to be based on dominance
2020-03-03 12:04:31 +01:00
semmle-qlci
7f3f629d39
Merge pull request #2913 from asger-semmle/js/prototype-pollution-path
...
Approved by erik-krogh
2020-03-03 10:29:47 +00:00
semmle-qlci
b3cbf8baa8
Merge pull request #2960 from erik-krogh/OverloadsWithThis
...
Approved by asgerf
2020-03-03 10:10:00 +00:00
Esben Sparre Andreasen
adddebf039
Merge branch 'master' of github.com:Semmle/ql into js/more-fs-modules
2020-03-03 10:55:16 +01:00
semmle-qlci
e1c5449885
Merge pull request #2867 from erik-krogh/UselessCat
...
Approved by esbena
2020-03-03 09:10:25 +00:00
Erik Krogh Kristensen
9016f43d80
update expected output
2020-03-03 10:04:57 +01:00
Erik Krogh Kristensen
1781179e25
doc fixes
2020-03-03 09:50:02 +01:00
Erik Krogh Kristensen
c4ebd66b34
fix capitalization of predicate
2020-03-03 09:29:04 +01:00
Rebecca Valentine
2bbe4759ba
Python: Removes obsolete predicate
2020-03-02 18:53:06 -08:00
Rebecca Valentine
e481ddf99e
Python: Adds modernized predicate and moves queries over to it
2020-03-02 18:52:45 -08:00
Rebecca Valentine
a8ae843059
Python: Removes now obsolete original predicate
2020-03-02 18:46:19 -08:00
Rebecca Valentine
7161ca57c8
Python: Adds modernizations and moves query over to them
2020-03-02 18:45:41 -08:00
Rebecca Valentine
31fc0f2240
Python: Moves library and queries over to the new predicates, removes old ones
2020-03-02 18:08:10 -08:00
Rebecca Valentine
c058e17089
Python: Moves dependent queries to suffixed predicate names
2020-03-02 17:37:11 -08:00
Rebecca Valentine
0dcd52bd87
Python: Moves dependent query over to suffixed predicate names
2020-03-02 17:35:13 -08:00
Ian Lynagh
5b0cb10f9b
C++: Update tests following extractor no longer extracting some unused types
2020-03-03 01:30:18 +00:00
Rebecca Valentine
8ee2587997
Python: Moves library predicates to suffixed names
2020-03-02 17:04:32 -08:00
Rebecca Valentine
7930037bb6
Python: Move AdvancedFormatting dependents over to suffixed API
2020-03-02 16:39:02 -08:00
Rebecca Valentine
48bcde8e0f
Python: Move objectapi code to suffixed name
2020-03-02 16:31:06 -08:00
Rebecca Valentine
de6ea63fae
Python: Adds preliminary modernization.
2020-03-02 15:43:57 -08:00
Erik Krogh Kristensen
d2d5af42bf
add IndirectInclusionTest and IndirectEndsWith
2020-03-02 21:42:08 +01:00
Taus
f3b62e106d
Merge pull request #2840 from BekaValentine/python-objectapi-to-valueapi-useofapply
...
Python: ObjectAPI to ValueAPI: UseofApply
2020-03-02 21:40:35 +01:00
Erik Krogh Kristensen
97c16929ca
implement getPolarity and forward to inner StartsWith
2020-03-02 21:38:22 +01:00
Erik Krogh Kristensen
53d1cd33f6
support sanitizers that remove all forward slashes
2020-03-02 21:34:40 +01:00
Robert Marsh
0b74d56ed1
Merge pull request #2959 from jbj/getCanonicalQLClass-Variable
...
C++: Add getCanonicalQLClass overrides in Variable
2020-03-02 12:16:48 -08:00
Erik Krogh Kristensen
46a645c47b
Merge pull request #2956 from asger-semmle/js/autoformat-again
...
JS: Really autoformat everything
2020-03-02 21:16:07 +01:00
Erik Krogh Kristensen
68fb8c52e9
check the type of the this-type, instead of the AST-node
2020-03-02 16:35:16 +01:00
Alistair Christie
e7b58571b6
Make review comment changes
2020-03-02 15:32:03 +00:00
Erik Krogh Kristensen
e0fcc4af6a
handle this parameters when finding unreachable overloads
2020-03-02 16:26:00 +01:00
Mathias Vorreiter Pedersen
0b082a4089
C++: Only do argument check for
2020-03-02 16:22:05 +01:00
Alistair Christie
daf5a96935
Make review comment changes
2020-03-02 15:07:30 +00:00
Felicity Chapman
7a2bb120ec
Update introductions for feedback
2020-03-02 15:06:18 +00:00
Jonas Jensen
76066afe6a
C++: Add getCanonicalQLClass overrides in Variable
2020-03-02 13:49:12 +01:00
Erik Krogh Kristensen
019266e537
change name of Useless cat
2020-03-02 13:06:08 +01:00
Erik Krogh Kristensen
26fd17bf39
recognize utility functions implementing a StartsWith check
2020-03-02 13:00:58 +01:00
Mathias Vorreiter Pedersen
9df7a7a87e
Merge branch 'master' into inexact-is-chi-for-all-aliased-memory
2020-03-02 12:34:24 +01:00
Erik Krogh Kristensen
391b6a833c
add link to The Useless Use of Cat Award
2020-03-02 12:28:51 +01:00
Alistair Christie
fe9f974353
Merge branch 'master' into alistairs-docs-preparation-1
2020-03-02 11:17:42 +00:00
Mathias Vorreiter Pedersen
20529b4436
C++/C#: Sync identical files
2020-03-02 12:15:54 +01:00
Mathias Vorreiter Pedersen
14d836ba59
C++: should only match those functions that has the same number of parameters as the call has arguments.
2020-03-02 12:15:28 +01:00
Asger Feldthaus
e405a9769c
JS: Really autoformat everything
2020-03-02 10:48:33 +00:00
semmle-qlci
228bd73bd2
Merge pull request #2944 from erik-krogh/YetAnotherPrefix
...
Approved by esbena
2020-03-02 10:07:47 +00:00
Mathias Vorreiter Pedersen
3a3aa75121
Merge pull request #2935 from jbj/MissingEnumCaseInSwitch-perf
...
C++: Optimize EnumSwitch.getAMissingCase
2020-03-02 10:32:44 +01:00
Erik Krogh Kristensen
c14a485ca7
recognize more HttpResponseSink by restricting the hasNonHtmlHeader check
2020-03-02 10:10:34 +01:00
Anders Schack-Mulligen
b210009eec
Merge pull request #2923 from yo-h/java-customizations
...
Java: add `Customizations.qll`
2020-03-02 09:58:34 +01:00
Jonas Jensen
dab6691eb0
Merge pull request #2900 from dbartol/dbartol/void-buffer
...
C++: Better fix for `void` type on buffer access
2020-03-02 09:00:15 +01:00
Jonas Jensen
ec85f9f1a1
Merge pull request #2797 from rdmarsh2/rdmarsh/cpp/malloc-alias-locations
...
C++: Support dynamic memory allocations in IR alias analysis
2020-03-02 08:49:59 +01:00
Jonas Jensen
30b5db3b7f
C++: autoformat fixup
2020-03-02 08:48:54 +01:00
Jonas Jensen
bbc57878dd
C++: Performance fix for large basic blocks
...
The code is now quadratic in the number of statements in a basic block,
whereas before it was quadratic in the number of _control-flow nodes_ in
a basic block.
2020-03-02 08:46:58 +01:00
Robert Marsh
28ee756c6a
Merge pull request #2934 from geoffw0/add_tests
...
C++: Test and typos.
2020-02-28 15:12:32 -08:00
Rebecca Valentine
d5f689e041
Adds preliminary modernization
2020-02-28 10:42:27 -08:00
Geoffrey White
c6b0d4bbda
C#: Sync identical files.
2020-02-28 17:55:59 +00:00
Geoffrey White
82191102d9
Merge pull request #2930 from jbj/getUnconverted
...
C++: Add Expr.getUnconverted predicate
2020-02-28 14:25:36 +00:00
Erik Krogh Kristensen
71ff32e930
recognize another prefix check for js/path-injection
2020-02-28 14:55:41 +01:00
Rasmus Wriedt Larsen
ee4190e0d9
Python: Add example if urlsplit(url).path: => missing points-to
...
I wanted to highlight that it's not the call to `urlsplit` that is a problem, so
that's why I inserted a `check` in-between.
2020-02-28 13:43:10 +01:00
Rasmus Wriedt Larsen
8dd19ca6cd
Python: Add example of re.compile missing points-to
2020-02-28 13:41:26 +01:00
Taus Brock-Nannestad
10bacfe8fd
Python: Use subscriptUnknown instead of instance check.
...
Also adds a test for decomposing the unknown value of `a`.
2020-02-28 13:38:54 +01:00
Esben Sparre Andreasen
a589061bee
JS: add type-tracking to the fs-module and model the original-fs
2020-02-28 12:54:59 +01:00
Esben Sparre Andreasen
5a3a1c480d
JS: add tests for the fs-module and friends
2020-02-28 12:21:10 +01:00
Rasmus Wriedt Larsen
2e7807718f
Python: Add a bit of regex docs
...
and use the canonical way of specifying a ModuleValue
2020-02-28 11:45:39 +01:00
Jonas Jensen
dfe1a7e2f0
C++: Avoid iDominates* in Overflow.qll
...
The `iDominates` relation is directly on control-flow nodes, and its
transitive closure is far too large. It got compiled into a recursion
rather than `fastTC`, and I've observed that recursion to take about an
hour on a medium-size customer snapshot.
The fix is to check for dominance at the basic-block level.
2020-02-28 10:48:23 +01:00
Geoffrey White
4ca57db553
Merge pull request #2929 from Semmle/rc/1.23
...
Merge rc/1.23 into master
2020-02-28 09:30:20 +00:00
Erik Krogh Kristensen
5e0ae7b4d0
add end </p> tag
2020-02-28 10:23:03 +01:00
Jonas Jensen
0be13e45f2
Merge remote-tracking branch 'upstream/master' into MissingEnumCaseInSwitch-perf
2020-02-28 09:57:29 +01:00
Erik Krogh Kristensen
ce9cd53bf1
Merge remote-tracking branch 'upstream/master' into UselessCat
2020-02-28 09:56:23 +01:00
Erik Krogh Kristensen
d8a96dd771
change name to suggestion from previous code review
2020-02-28 09:55:15 +01:00
Erik Krogh Kristensen
922779e049
remove double a/an and adjust line lenghts
2020-02-28 09:48:07 +01:00
Erik Krogh Kristensen
17f1974e05
Apply suggestions from code review
...
Co-Authored-By: mc <42146119+mchammer01@users.noreply.github.com >
2020-02-28 09:43:32 +01:00
semmle-qlci
ec90627a64
Merge pull request #2909 from yo-h/experimental
...
Approved by aschackmull, jbj, max-schaefer, tausbn
2020-02-28 03:15:58 +00:00
yo-h
f8bf055fe1
Merge pull request #2927 from aschackmull/java/taintgettersetter-tests
...
Java: Add some more taint-getter-setter tests.
2020-02-27 22:12:25 -05:00
yo-h
7dc5f9446a
Merge pull request #2920 from aschackmull/java/typeflow-irrelevant-pruning
...
Java: Remove some irrelevant bounds from TypeFlow.
2020-02-27 22:10:32 -05:00
Rebecca Valentine
19c1ee5427
Adds preliminary modernization
2020-02-27 15:46:51 -08:00
Rebecca Valentine
9601c41fe5
Update python/ql/src/Expressions/IsComparisons.qll
...
Co-Authored-By: Taus <tausbn@github.com >
2020-02-27 10:46:07 -08:00
Rebecca Valentine
d19957f09d
Puts use_of_apply example back into expressions_test to avoid messing up other tests
2020-02-27 10:44:46 -08:00
Dave Bartolomeo
b0fb16c068
C++/C#: Fix formatting
2020-02-27 13:44:02 -05:00
Robert Marsh
ac517b7428
Merge branch 'master' into rdmarsh/cpp/malloc-alias-locations
2020-02-27 08:55:20 -08:00
Taus Brock-Nannestad
5bbf93241b
Python: Add test for tuple unpacking with "complicated" value.
2020-02-27 17:34:32 +01:00
Taus Brock-Nannestad
7a3895d661
Python: Fix points-to for a, b = some_unknown_object.
...
Also rewrites `multi_assignment_points_to` to be a bit more readable.
I'm not entirely sure that we want an unknown instance of `object` rather than
just `UnknownInternal`. The latter gets filtered out in the characteristic
predicate for `Value`, though, so I opted for the slightly more permissive
variant.
2020-02-27 17:26:54 +01:00
Geoffrey White
729c310eb9
C++: More typos.
2020-02-27 15:49:59 +00:00
Jonas Jensen
d686347315
C++: Optimize EnumSwitch.getAMissingCase
...
The `cpp/missing-case-in-switch` performed badly on some snapshots, to
the extent where it was as slow as the most expensive IR stages
(example: ChakraCore). This commit makes it faster, removing a
`pragma[noopt]` along the way.
The intermediate tuple counts on a customer codebase drop from 84M to
3M, while the content hash of `getAMissingCase` is the same.
Before:
(124s) Tuple counts for Stmt::EnumSwitch::getAMissingCase#ff#antijoin_rhs:
20867789 ~0% {3} r1 = JOIN Stmt::SwitchStmt::getASwitchCase_dispred#ff AS L WITH Stmt::EnumSwitch::getAMissingCase#ff#shared AS R ON FIRST 1 OUTPUT L.<1>, R.<0>, R.<1>
20122830 ~0% {3} r2 = JOIN r1 WITH Stmt::SwitchCase::getExpr_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r1.<1>, r1.<2>
20122830 ~0% {3} r3 = JOIN r2 WITH Expr::Expr::getValue_dispred#ff AS R ON FIRST 1 OUTPUT r2.<2>, r2.<1>, R.<1>
83961918 ~0% {4} r4 = JOIN r3 WITH Enum::EnumConstant::getInitializer_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r3.<1>, r3.<0>, r3.<2>
83961918 ~0% {4} r5 = JOIN r4 WITH initialisers AS R ON FIRST 1 OUTPUT R.<2>, r4.<3>, r4.<1>, r4.<2>
234348 ~185% {2} r6 = JOIN r5 WITH Expr::Expr::getValue_dispred#ff AS R ON FIRST 2 OUTPUT r5.<2>, r5.<3>
return r6
...
(124s) Tuple counts for Stmt::EnumSwitch::getAMissingCase#ff:
663127 ~4% {2} r1 = Stmt::EnumSwitch::getAMissingCase#ff#shared AS L AND NOT Stmt::EnumSwitch::getAMissingCase#ff#antijoin_rhs AS R(L.<0>, L.<1>)
return r1
(124s) Registering Stmt::EnumSwitch::getAMissingCase#ff + [] with content 2060ff326cvhihcsvoph6k9divuv4
(124s) >>> Wrote relation Stmt::EnumSwitch::getAMissingCase#ff with 663127 rows and 2 columns.
After:
(5s) Tuple counts for Stmt::EnumSwitch::getAMissingCase_dispred#ff#antijoin_rhs:
746029 ~0% {2} r1 = JOIN Stmt::EnumSwitch::getAMissingCase_dispred#ff#shared AS L WITH Enum::Enum::getAnEnumConstant_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, L.<1>
3116197 ~2% {3} r2 = JOIN r1 WITH Enum::EnumConstant::getInitializer_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r1.<1>, r1.<0>
3116197 ~0% {3} r3 = JOIN r2 WITH initialisers AS R ON FIRST 1 OUTPUT R.<2>, r2.<1>, r2.<2>
3116197 ~311% {3} r4 = JOIN r3 WITH Expr::Expr::getValue_dispred#ff AS R ON FIRST 1 OUTPUT r3.<1>, R.<1>, r3.<2>
234348 ~185% {2} r5 = JOIN r4 WITH Stmt::EnumSwitch::matchesValue#ff AS R ON FIRST 2 OUTPUT r4.<0>, r4.<2>
return r5
(5s) Registering Stmt::EnumSwitch::getAMissingCase_dispred#ff#antijoin_rhs + [] with content 173483d71508vl534mvlr1g0ehi12
(5s) >>> Wrote relation Stmt::EnumSwitch::getAMissingCase_dispred#ff#antijoin_rhs with 82902 rows and 2 columns.
(5s) Starting to evaluate predicate Stmt::EnumSwitch::getAMissingCase_dispred#ff/2@ae4c0b
(5s) Tuple counts for Stmt::EnumSwitch::getAMissingCase_dispred#ff:
746029 ~2% {2} r1 = JOIN Stmt::EnumSwitch::getAMissingCase_dispred#ff#shared AS L WITH Enum::Enum::getAnEnumConstant_dispred#ff AS R ON FIRST 1 OUTPUT L.<1>, R.<1>
663127 ~4% {2} r2 = r1 AND NOT Stmt::EnumSwitch::getAMissingCase_dispred#ff#antijoin_rhs AS R(r1.<0>, r1.<1>)
return r2
(5s) Registering Stmt::EnumSwitch::getAMissingCase_dispred#ff + [] with content 2060ff326cvhihcsvoph6k9divuv4
(5s) >>> Wrote relation Stmt::EnumSwitch::getAMissingCase_dispred#ff with 663127 rows and 2 columns.
2020-02-27 16:27:52 +01:00
Geoffrey White
f8a61ffc4c
C++: Expand the test as described in ODASA-640.
2020-02-27 15:26:53 +00:00
Geoffrey White
0a7d9db335
C++: Add example described in ODASA-640.
2020-02-27 15:23:16 +00:00
Geoffrey White
e6d35d314d
C++: Fix typo.
2020-02-27 15:23:10 +00:00
Jonas Jensen
c9e56d13f7
C++: Add Expr.getUnconverted predicate
...
This gets rid of the expensive predicate
`#Cast::Conversion::getExpr_dispred#ffPlus`, I've observed to cause
memory pressure on large databases.
2020-02-27 14:52:42 +01:00
Rasmus Wriedt Larsen
24e9f65a2f
Python: Fix documentation of MultiAssignmentDefinition.indexOf
...
As discussed in person
2020-02-27 14:12:33 +01:00
Anders Schack-Mulligen
67d386b5ba
C++/C#: Add synchronization.
2020-02-27 14:10:16 +01:00
Rasmus Wriedt Larsen
4433cc044d
Python: Document MultiAssignmentDefinition.indexOf
2020-02-27 13:48:43 +01:00
Asger Feldthaus
52ebe49a0b
JS: Flag deep assignments in prototype pollution query
2020-02-27 12:17:55 +00:00
Taus
0da554c701
Merge pull request #2914 from RasmusWL/python-remove-optimize-true-directive
...
Python: Remove `--optimize: true` from options files
2020-02-27 13:16:59 +01:00
Taus
d9383d0e86
Merge pull request #2902 from RasmusWL/python-use-of-input
...
Python: Highlight py/use-of-input is for Python 2
2020-02-27 13:15:32 +01:00
Taus
8bd3063d2b
Merge pull request #2875 from RasmusWL/python-taint-urlsplit
...
Python: Add taint for urlsplit
2020-02-27 13:13:47 +01:00
Asger F
b25a4614de
Merge pull request #2926 from asger-semmle/js/format-everything
...
JS: Autoformat everything
2020-02-27 12:11:01 +00:00
Anders Schack-Mulligen
8e2b56cfd0
Java: Include count in messages.
2020-02-27 13:10:42 +01:00
Taus
e09907894d
Merge pull request #2817 from BekaValentine/objectapi-to-valueapi-truncateddivision
...
Python: ObjectAPI to ValueAPI: TruncatedDivision
2020-02-27 12:52:26 +01:00
Erik Krogh Kristensen
a872d7c5c5
add comment about negative optionsArg
2020-02-27 12:42:22 +01:00
Erik Krogh Kristensen
bb911bbbf1
Apply suggestions from code review
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-02-27 12:38:06 +01:00
Anders Schack-Mulligen
33f6392be5
Java: Add some more taint-getter-setter tests.
2020-02-27 10:47:25 +01:00
Asger Feldthaus
fefcf1a7a6
JS: Autoformat everything
2020-02-27 09:41:01 +00:00
Anders Schack-Mulligen
0c30d7cced
Java: Update test output.
2020-02-27 10:28:12 +01:00
Erik Krogh Kristensen
9c06c48dc7
Merge pull request #2884 from esbena/js/practically-exploitable-redos
...
JS: add query js/exploitable-polynomial-redos
2020-02-27 10:19:17 +01:00
Anders Schack-Mulligen
a09e479033
Java: Change relevantNode to a class, and add two more checks.
2020-02-27 10:14:14 +01:00
Esben Sparre Andreasen
1b73cee692
JS: add js/exploitable-polynomial-redos
2020-02-27 08:42:43 +01:00
Rebecca Valentine
fe2bb8fb4b
Adds preliminary modernization
2020-02-26 22:01:31 -08:00
Rebecca Valentine
057fed2cb8
Fixes erroneus naming
2020-02-26 21:55:02 -08:00
Rebecca Valentine
84875d70ff
Adds preliminary modernization
...
This will overlapp with/depend on changes to CallArgs and ObjectAPI that are already in the WrongNamedArgumentInCall PR
2020-02-26 21:42:52 -08:00
yo-h
63adc63597
CONTRIBUTING.md: add paragraph on maintaining backwards compatibility
2020-02-26 18:39:23 -05:00
yo-h
aeb8793197
Update docs/experimental.md
...
Break sentence down into shorter ones, as per review comment.
2020-02-26 18:38:42 -05:00
Robert Marsh
95a762c987
Merge master for submodule update
2020-02-26 13:44:26 -08:00
Robert Marsh
4333fe7905
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-02-26 13:15:27 -08:00
yo-h
62f8bf2b2e
Java: add release note for Customizations.qll
2020-02-26 14:36:27 -05:00
yo-h
bd91bc0b29
Java: add Customizations.qll
2020-02-26 13:18:13 -05:00
Rebecca Valentine
b0493458d6
Combine and clean up the test files
2020-02-26 09:04:14 -08:00
Rebecca Valentine
ba1f3c46b8
Removes obsolete asBuiltin predicate
2020-02-26 08:17:45 -08:00
Taus Brock-Nannestad
5c3109a324
Python: Fix bug in multi_assignment_points_to.
...
This turned out to be a fairly simple but easy to make bug. When we want to
figure out the value pointed-to in a multi-assignment, we look at the left hand
side to see what value from the right hand side we should assign. Unfortunately,
we accidentally attempted to look up this information in the _left hand side_ of
the assignment, resulting in no points-to information at all. The only thing
needed to fix this was to properly link up the left and right hand sides: using
the left hand side to figure out what index to look at, and then looking up the
points-to information for the corresponding place in the right hand side.
2020-02-26 16:11:43 +01:00
Taus
85f5ad2231
Merge pull request #2904 from RasmusWL/python-http-clients
...
Python: Model outgoing HTTP client requests
2020-02-26 15:49:41 +01:00
Anders Schack-Mulligen
ce70b86604
Java: Add data-flow consistency checks.
2020-02-26 14:17:07 +01:00
Rasmus Wriedt Larsen
771dfecf6d
Python: Add sanitized edges for urlsplit test
2020-02-26 14:10:30 +01:00
Rasmus Wriedt Larsen
0b31cb1716
Python: Show that we have initial taint in urlsplit test
2020-02-26 14:09:02 +01:00
Rasmus Wriedt Larsen
400a8ffae5
Python: Use slightly better name than foobar
...
I intended to rename before committing, but woops
2020-02-26 14:08:10 +01:00
Anders Schack-Mulligen
508b6050a8
Java: Remove some irrelevant bounds from TypeFlow.
2020-02-26 13:51:25 +01:00
Taus
dce121b565
Merge pull request #2916 from BekaValentine/python-objectapi-to-valueapi-callargsandothers
...
Python: ObjectAPI to ValueAPI: CallArgs and Others
2020-02-26 12:51:18 +01:00
semmle-qlci
326522c250
Merge pull request #2846 from erik-krogh/CVE481
...
Approved by asgerf, esbena
2020-02-26 11:16:41 +00:00
Mathias Vorreiter Pedersen
1bee0ffe3b
C++: Autoformat
2020-02-26 12:09:21 +01:00
Rasmus Wriedt Larsen
4330d4e289
Python: Remove unused import in test
2020-02-26 10:26:30 +01:00
Rasmus Wriedt Larsen
5fae3a8d0a
Python: Explain complexity of HTTPConnection.request
2020-02-26 10:26:30 +01:00
Rasmus Wriedt Larsen
b213db03fd
Python: Consolidate stdlib http client tests
...
Move the stdlib tests from test/{2,3}/library-tests/ into /test/library-tests/,
and deal with version by using sys.version_info (results should be the same for
both versions).
six tests were moved from /library-tests/web/client/stdlib => /library-tests/web/client/six
2020-02-26 10:26:30 +01:00
Rasmus Wriedt Larsen
be187bcc0a
Python: Make Client::HttpRequest extend ControlFlowNode
...
Taus poitned out that the reuqest being send off, doesn't *need* to happen on a
CallNode. Someone *could* use a __setattr__ or property :\
2020-02-26 10:26:30 +01:00
Rasmus Wriedt Larsen
e25079acc2
Python: Remove unnecessary cast
2020-02-26 10:26:30 +01:00
Rasmus Wriedt Larsen
cd5399d43e
Python: Model outgoing http client requests
2020-02-26 10:26:30 +01:00
Mathias Vorreiter Pedersen
d942a3b54a
C++: Change definition of isChiForAllAliasedMemory to recurse through inexact PhiInstructions
2020-02-26 10:21:27 +01:00
yo-h
21dd8757dd
Update docs/experimental.md
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-02-25 23:11:29 -05:00
Rebecca Valentine
2fb722b04e
Removes the general versions of the query.
2020-02-25 14:55:55 -08:00
Rebecca Valentine
15aeeb1e50
Removes erroneous expected result for py3
2020-02-25 14:54:52 -08:00
Rebecca Valentine
e07a003f75
Swaps overridden_call globally
2020-02-25 11:02:18 -08:00
Rebecca Valentine
50c91b99da
Swaps correct_args_if_called_as_method globally
2020-02-25 11:01:51 -08:00
Rebecca Valentine
fb0cae76cf
Swaps wrong_args globally
2020-02-25 11:00:39 -08:00
Rebecca Valentine
3a764ade8d
Swaps too_many_args globally
2020-02-25 10:59:55 -08:00
Rebecca Valentine
3b0be46377
Swaps too_few_args globally
2020-02-25 10:59:16 -08:00
Rebecca Valentine
2c32a859cc
Swaps illegally_named_parameter globally
2020-02-25 10:58:08 -08:00
Rebecca Valentine
4857a947ac
Swaps get_function_or_initializer globally
2020-02-25 10:51:40 -08:00
Rebecca Valentine
cf4b7e1270
Swaps arg_count globally
2020-02-25 10:50:30 -08:00
Rebecca Valentine
c2a3af7e67
Adds objectapi suffix to private predicates
2020-02-25 10:48:29 -08:00
Rebecca Valentine
930228acc5
Un-autoformats
2020-02-25 09:52:46 -08:00
Rebecca Valentine
3e53e462d6
changes indents to 4
2020-02-25 09:46:21 -08:00
Rebecca Valentine
04951faf86
autoformat
2020-02-25 09:43:51 -08:00
Taus Brock-Nannestad
1526c86e6d
Python: Update test results for ReturnTypes.ql for Python 2.
2020-02-25 17:30:46 +01:00
yo-h
d06caefd8e
Address code review comments for experimental.md
2020-02-25 11:17:42 -05:00
Taus Brock-Nannestad
35ada17e2a
Python: Use object as default return type for built-ins.
2020-02-25 16:31:40 +01:00
Taus Brock-Nannestad
5813209337
Python: Add tests for missing points-to for built-in methods.
2020-02-25 16:25:41 +01:00
Erik Krogh Kristensen
dc6bfad023
Merge remote-tracking branch 'upstream/master' into CVE481
2020-02-25 16:25:03 +01:00
Taus Brock-Nannestad
887f85cee2
Python: Add test for missing points-to information
...
To ease the rollout of this test, currently we only report missing points-to
information for nodes that either
- appear as an argument in a call to a function named `check`, or
- appear inside a scope where the first line is annotated with a comment ending
in "check".
The idea behind the second version is that once we have points-to running at a
level where no node inside a scope that _ought_ to have points-to is missing
this information, we can simply remove all uses of `check(...)` from inside this
scope, and annotate the entire scope with `# check`. Once this has been done for
the entire file, we can then remove all the comments and just require
_everything_ to be checked.
Note that I don't expect all nodes to have the need for points-to information.
For instance, there are nodes representing scope entry and exit, and for these
it doesn't make sense to require that they "point-to" anything. Similarly,
`NameNode` appearing in a "store" (i.e. as the left hand side of an assignment)
do not strictly need to have points-to information, although it might be more
intuitive if they did.
Thus, the `relevant_node` predicate will almost certainly need to be extended to
exclude these kinds of nodes.
2020-02-25 16:07:50 +01:00
Rasmus Wriedt Larsen
f10a86d3ac
Python: Remove --optimize: true from options files
...
Tests will be run with optimizations on by default now.
2020-02-25 15:52:00 +01:00
Rasmus Wriedt Larsen
8f70101572
Python: docs: Use <code> tag consistently in UseofInput.qhelp
2020-02-25 15:40:08 +01:00
mchammer01
0c5216570c
pre-migration work: fix typos
2020-02-25 04:50:14 -08:00
Jonas Jensen
db33c360bc
Merge pull request #2910 from aschackmull/dataflow/cleanup
...
Java/C++: Minor dataflow cleanup.
2020-02-25 12:47:10 +01:00
semmle-qlci
03b882381a
Merge pull request #2723 from esbena/js/support-path-is-inside
...
Approved by asgerf
2020-02-25 11:21:24 +00:00
Taus
b453cf8f60
Merge pull request #2906 from RasmusWL/python-add-3-imports-tests
...
Python: Add Python 3 Imports tests from internal repo
2020-02-25 12:04:16 +01:00
Erik Krogh Kristensen
c83c27cbc4
add extra sanity-check that the output looks good
2020-02-25 11:11:58 +01:00
Erik Krogh Kristensen
8d26f32199
arg -> param
2020-02-25 10:53:07 +01:00
Erik Krogh Kristensen
87d283aa6c
add tests for third party command execution libraries (and two small fixes)
2020-02-25 10:50:59 +01:00
Matthew Gretton-Dann
3465d5a0c7
docs: Correct AC5 version
2020-02-25 09:29:18 +00:00
Matthew Gretton-Dann
a48e36e2e1
docs: Update clang/gcc versions supported
2020-02-25 09:28:39 +00:00
Matthew Gretton-Dann
28e9cd7e38
docs: Detail support for C18.
2020-02-25 09:27:42 +00:00
Mathias Vorreiter Pedersen
b9bb2ec0ac
Merge pull request #2864 from jbj/DefaultTaintTracking-cached
...
C++: Cache DefaultTaintTracking
2020-02-25 10:15:43 +01:00
Erik Krogh Kristensen
d540caecdd
Apply suggestions from code review
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-02-25 10:04:51 +01:00
Anders Schack-Mulligen
fba8772411
Java/C++: Minor dataflow cleanup.
2020-02-25 09:40:25 +01:00
Asger F
160fc48803
Merge pull request #2896 from asger-semmle/typescript-3.8
...
TS: Support Typescript 3.8
2020-02-25 08:19:01 +00:00
Esben Sparre Andreasen
5baba62154
JS: model path-is-inside+is-path-inside for js/path-injection
2020-02-24 23:10:15 +01:00
Esben Sparre Andreasen
86b836cd29
JS: add tests for js/path-injection
2020-02-24 23:03:42 +01:00
semmle-qlci
aadb148c1c
Merge pull request #2855 from asger-semmle/js/returned-partial-call
...
Approved by esbena
2020-02-24 21:37:41 +00:00
yo-h
43bcd5b26c
Add guidelines for experimental CodeQL queries and libraries
2020-02-24 15:08:31 -05:00
Robert Marsh
ea4ca31fb3
Merge pull request #2907 from geoffw0/argvlocal
...
C++: Modify the argvlocal tests
2020-02-24 10:55:21 -08:00
Erik Krogh Kristensen
afd6ea2628
small correction in doc + autoformat
2020-02-24 17:54:29 +01:00
Geoffrey White
4af0193c98
C++: Modify the argvlocal tests.
2020-02-24 16:51:47 +00:00
Geoffrey White
9f271949d5
C++: Adjust layout of the argvlocal test.
2020-02-24 15:52:31 +00:00
Anders Schack-Mulligen
67b32796dd
Merge pull request #853 from joshhale/tweak-cwe-078-example
...
doc: remove - from command arguments
2020-02-24 16:15:58 +01:00
Asger F
e665e3c187
Update change-notes/1.24/analysis-javascript.md
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-02-24 15:07:28 +00:00
Geoffrey White
c641a31640
C++: Refine nodeIsBarrierIn using getNodeForSource.
2020-02-24 14:39:31 +00:00
Rasmus Wriedt Larsen
2b997ec94a
Python: Add Python 3 Imports tests from internal repo
2020-02-24 15:36:45 +01:00
Asger Feldthaus
6360073da4
JS: Rephrase change note
2020-02-24 14:35:17 +00:00
Rasmus Wriedt Larsen
9d629aef95
Python: Highlight py/use-of-input is for Python 2
2020-02-24 15:13:19 +01:00
Geoffrey White
843b72b11a
C++: hasGlobalOrStdName().
2020-02-24 14:12:19 +00:00
Erik Krogh Kristensen
b20e8520f6
add default message if not pretty printed call can be created
2020-02-24 14:52:08 +01:00
semmle-qlci
317356e591
Merge pull request #2898 from asger-semmle/js/prototype-pollution-isobject-sanitizers
...
Approved by erik-krogh
2020-02-24 13:35:32 +00:00
Erik Krogh Kristensen
b72404dc99
add change note
2020-02-24 14:07:49 +01:00
Erik Krogh Kristensen
a779ae58a8
add qhelp
2020-02-24 14:03:41 +01:00
Jonas Jensen
2d9df70abc
Merge pull request #2887 from MathiasVP/fix-ir-gen-switch
...
C++: Fix IR generation for switch statements
2020-02-24 13:29:27 +01:00
Erik Krogh Kristensen
fb94af9764
remove the last dependency on PrettyPrinting
2020-02-24 13:18:15 +01:00
Erik Krogh Kristensen
051de247b0
change regexpMatch to regexpFind
2020-02-24 13:11:30 +01:00
Erik Krogh Kristensen
a768e937f0
complete qldoc
2020-02-24 13:08:50 +01:00
Jonas Jensen
ae68878476
C++: Cache DefaultTaintTracking
...
This should speed up the overall suite, where `DefaultTaintTracking` is
used in several queries.
2020-02-24 13:03:34 +01:00
Erik Krogh Kristensen
473787a426
refactor the getOptionsArg predicate into the SystemCommandExecution class
2020-02-24 12:59:20 +01:00
Geoffrey White
a0e839d3f1
C++: Block duplicate taint results from 'gets' and other functions.
2020-02-24 11:53:22 +00:00
Geoffrey White
06e649fc30
C++: Add support for fgetws.
2020-02-24 11:47:32 +00:00
Geoffrey White
5afebc8418
C++: Autoformat.
2020-02-24 11:40:47 +00:00
Asger Feldthaus
01309d7c2e
TS: Add test for named re-export and exportsAs
2020-02-24 11:40:28 +00:00
Asger Feldthaus
78954489fb
TS: Fix expected output
2020-02-24 11:40:28 +00:00
Asger Feldthaus
4e1bd9056c
TS: Fix javadoc
2020-02-24 11:40:28 +00:00
Asger Feldthaus
05d9e64dab
TS: Add change note
2020-02-24 11:40:27 +00:00
Asger Feldthaus
18974bad1c
TS: Add upgrade script and stats
2020-02-24 11:40:27 +00:00
Asger Feldthaus
47673c6e21
TS: Disable export analysis for type-only exports
2020-02-24 11:40:27 +00:00
Asger Feldthaus
16c909b433
TS: Add test case for import type * as ns
2020-02-24 11:40:27 +00:00
Asger Feldthaus
260b243c28
TS: Add test case to DeclBeforeUse
2020-02-24 11:40:27 +00:00
Asger Feldthaus
8d58aad0f2
TS: Support type-only import/export
2020-02-24 11:40:27 +00:00
Asger Feldthaus
0351f0b775
TS: Add test and documentation for private fields
2020-02-24 11:40:27 +00:00
Asger Feldthaus
8531c113a1
TS: Fix imports
2020-02-24 11:40:27 +00:00
Asger Feldthaus
9b52acc62a
TS: Handle export * as ns
2020-02-24 11:40:27 +00:00
Asger Feldthaus
7f939fe1e4
TS: Update to TypeScript 3.8.2
2020-02-24 11:40:27 +00:00
Geoffrey White
c45bf90e98
Update cpp/ql/src/semmle/code/cpp/models/implementations/Gets.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2020-02-24 11:36:09 +00:00
Geoffrey White
34b790d601
C++: Change note.
2020-02-24 11:33:27 +00:00
semmle-qlci
94aa77748d
Merge pull request #2810 from erik-krogh/CVE74
...
Approved by asgerf
2020-02-24 11:32:42 +00:00
Geoffrey White
e683f6113d
C++: Model 'gets'.
2020-02-24 11:27:35 +00:00
Geoffrey White
8dcd46f9e7
C++: Add a taint test for gets.
2020-02-24 11:25:28 +00:00
Asger Feldthaus
f923b24bc5
JS: Fix test
2020-02-24 11:19:23 +00:00
Erik Krogh Kristensen
75c1852ee4
doc changes from review
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-02-24 11:58:59 +01:00
Mathias Vorreiter Pedersen
ed430ce855
C++/C#: Bind parameter in new case.
2020-02-24 09:12:14 +01:00
Mathias Vorreiter Pedersen
af364e66fc
C++/C#: Move sanity check inside InstructionSanity module and accept tests
2020-02-23 20:53:49 +01:00
Grzegorz Golawski
fda4ab155a
CodeQL query to detect open Spring Boot actuator endpoints
2020-02-23 20:03:41 +01:00
Peter Stöckli
e81d3ce0b4
Add type for java.net.URL
2020-02-23 12:35:03 +01:00
Dave Bartolomeo
170331b105
C++: Better fix for void type on buffer access
...
Fixes issue https://github.com/github/codeql-c-analysis-team/issues/20
This change undoes the workaround in https://github.com/Semmle/ql/pull/2736 , and replaces it with a fix for the underlying cause. The problem was that the IR construction code for side effects incorrectly assumed that `BufferAccessOpcode` included `SizedBufferAccessOpcode`. I think that was actually a perfectly reasonable assumption to make, so I changed the `Opcode` hierarchy to make it true.
2020-02-21 18:46:32 -07:00
Taus
285be2893c
Merge pull request #2893 from BekaValentine/python-objectapi-to-valueapi-unnecessarylambda
...
Python: ObjectAPI to ValueAPI: UnnecessaryLambda
2020-02-21 22:23:02 +01:00
Taus
e444fb8bfa
Merge pull request #2818 from BekaValentine/objectapi-to-valueapi-hashedbutnohash
...
Python: ObjectAPI to ValueAPI: HashedButNoHash
2020-02-21 22:19:58 +01:00
Rebecca Valentine
14273fc677
Adds missing result to expected file
2020-02-21 11:25:03 -08:00
Peter Stöckli
e1e03e326b
Add query documentation header
2020-02-21 18:22:05 +00:00
Peter Stöckli
9de2be8eba
Fix whitespace issues in OpenStream.java
2020-02-21 17:13:04 +00:00
Peter Stöckli
b622e2ae06
Java: Calling openStream on URLs created from remote source can lead to local file disclosure.
2020-02-21 17:51:15 +01:00
Rasmus Wriedt Larsen
bfa7553095
Python: urlsplit sanitizer handles in [KNOWN_VALUE]
2020-02-21 16:03:29 +01:00
mchammer01
b4c72f610a
pre-migration tasks: start adding intros
2020-02-21 14:51:38 +00:00
Rasmus Wriedt Larsen
798db91f71
Python: Add more urlsplit tests
2020-02-21 15:51:33 +01:00
Erik Krogh Kristensen
44db0f4e5d
better printing of the options arg
2020-02-21 15:39:49 +01:00
Asger Feldthaus
d1df251b92
JS: Proto pollution: Add is-plain-object sanitizer
2020-02-21 14:38:33 +00:00
Erik Krogh Kristensen
90e5671d98
Merge branch 'master' of git.semmle.com:Semmle/ql into CVE481
2020-02-21 15:25:07 +01:00
Rasmus Wriedt Larsen
31ff652cb3
Python: Make Sanitizer available for urlsplit taint
...
It isn't used by default, it has to *actively* be enabled.
2020-02-21 15:18:53 +01:00
Mathias Vorreiter Pedersen
d9753b0ca5
C++/C#: Accept test output after adding sanity check to Instruction.qll
2020-02-21 15:09:53 +01:00
Asger Feldthaus
1ee112a341
JS: Add change note
2020-02-21 13:55:27 +00:00
Asger Feldthaus
a673539c98
JS: Update expected output
2020-02-21 13:51:23 +00:00
Asger Feldthaus
b780bc4d59
JS: Also track into callbacks
2020-02-21 13:51:22 +00:00
Asger Feldthaus
e8e649102f
JS: Also propagate out of returns
2020-02-21 13:51:22 +00:00
Asger Feldthaus
8c36b999cc
JS: Track flow into calls to bound functions
2020-02-21 13:51:20 +00:00
semmle-qlci
ee5cf95f5b
Merge pull request #2892 from asger-semmle/js/field-methods
...
Approved by esbena
2020-02-21 13:49:42 +00:00
semmle-qlci
e163d8d8c8
Merge pull request #2796 from asger-semmle/js/partial-invoke-receiver
...
Approved by esbena
2020-02-21 13:48:43 +00:00
Rasmus Wriedt Larsen
083dd4380b
Python: Add example for how to write your own sanitizer
2020-02-21 14:28:48 +01:00
Erik Krogh Kristensen
75410e5760
big refactor of UselessUseOfCal
2020-02-21 14:26:42 +01:00
Rasmus Wriedt Larsen
e804e98d60
Python: Update change-notes
2020-02-21 14:08:09 +01:00
Mathias Vorreiter Pedersen
da41cbca06
C#: Add similar fix to translation of switch statements in C#
2020-02-21 13:33:54 +01:00
Rasmus Wriedt Larsen
abbc9293db
Merge pull request #2891 from tausbn/python-special-operations
...
Python: Add AST support for special operations.
2020-02-21 13:16:22 +01:00
semmle-qlci
382e4bc06a
Merge pull request #2895 from max-schaefer/js/improve-param-qldoc
...
Approved by asgerf
2020-02-21 12:01:02 +00:00
mchammer01
6da729c6a6
pre-migration tasks: replace titles
2020-02-21 11:50:37 +00:00
Asger Feldthaus
01fed95fe6
JS: Add change note
2020-02-21 11:49:20 +00:00
Max Schaefer
75495d7aad
Update javascript/ql/src/semmle/javascript/Variables.qll
...
Co-Authored-By: Asger F <asgerf@github.com >
2020-02-21 10:06:32 +00:00
Geoffrey White
ad45a4b079
Merge pull request #2890 from nickrolfe/range_based_for
...
C++: add more extensive test for desugaring of range-based-for loops
2020-02-21 09:31:34 +00:00
Erik Krogh Kristensen
6ea14532ab
small changes based on review
2020-02-21 10:27:57 +01:00
Max Schaefer
fc4afe6eb2
JavaScript: Improve qldoc for Parameter to clarify that it also contains catch-clause parameters.
2020-02-21 09:14:00 +00:00
Anders Schack-Mulligen
771cb754c2
Merge pull request #2822 from hvitved/dataflow/node-cand-simple-call-context
...
Data flow: Track simple call contexts in `nodeCand[Fwd]1`
2020-02-21 10:02:06 +01:00
Jonas Jensen
1d786abebd
Merge pull request #2881 from rdmarsh2/ir-release-note
...
C++/Docs: release notes for IR taint tracking and GVN
2020-02-21 09:49:16 +01:00
Tom Hvitved
0cc3218115
Merge pull request #2872 from aschackmull/dataflow/pathstep-localflow-join
...
Java/C++/C#: Improve join-order in pathStep predicate
2020-02-21 09:39:17 +01:00
Rebecca Valentine
2b1d9c8d16
Updates last library difference
...
I'm not entirely sure if `getLiteralObject` and `getLiteralValue` are equivalent, and there don't see to be library tests for this
2020-02-20 20:20:56 -08:00
Rebecca Valentine
210387a8be
Adds bulk of modernizations
2020-02-20 17:32:42 -08:00
Rebecca Valentine
df7f43ee86
Adds modernization
2020-02-20 17:07:56 -08:00
Rebecca Valentine
2f3ea10cf8
Move the query and examples over to 2/query-tests
2020-02-20 16:31:58 -08:00
Rebecca Valentine
376638e9c0
Move query over to Rasmus's API for NumericValue
2020-02-20 16:18:54 -08:00
Rebecca Valentine
ab1fcb32ae
autoformats
2020-02-20 16:17:43 -08:00
Rebecca Valentine
5d9d724d43
Removes conflicting NumericValue definition
2020-02-20 16:17:33 -08:00
Rebecca Valentine
28be3b47fc
Replaces name-reference to the class with canonical predicate.
2020-02-20 15:41:51 -08:00
Rebecca Valentine
5acd982d59
Swaps ...obj for ...val
2020-02-20 15:41:51 -08:00
Rebecca Valentine
91ea46f5ee
Adds test output.
2020-02-20 15:41:51 -08:00
Rebecca Valentine
115495450d
Adds test cases.
2020-02-20 15:41:51 -08:00
Rebecca Valentine
96b8d78650
Adds modernized files.
2020-02-20 15:41:51 -08:00
Mathias Vorreiter Pedersen
780010d8f9
C++/C#: Sync identical files
2020-02-20 22:15:06 +01:00
Mathias Vorreiter Pedersen
6c08783158
C++: Accept output
2020-02-20 22:13:37 +01:00
Mathias Vorreiter Pedersen
4545ad0f93
C++: Add sanity check to Instruction.qll
2020-02-20 22:09:02 +01:00
Mathias Vorreiter Pedersen
76e5bd59df
C++: Change edge to DefaultEdge
2020-02-20 22:08:16 +01:00
Robert Marsh
7a7444b4e1
Docs: Simplify change note
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-02-20 12:50:52 -08:00
Tom Hvitved
a772b82fea
Address review comments
2020-02-20 19:48:49 +01:00
Taus Brock-Nannestad
913db460b2
Python: Add AST support for special operations.
...
These have the form `$name(arg1, arg2, ...)` and currently have no semantics.
They may be useful for testing purposes, however.
2020-02-20 18:05:37 +01:00
Nick Rolfe
46b226e0c5
C++: add more extensive test for desugaring of range-based-for loops
2020-02-20 16:15:22 +00:00
semmle-qlci
2df3fe8f36
Merge pull request #2883 from asger-semmle/typescript-3.7.5
...
Approved by erik-krogh
2020-02-20 15:59:36 +00:00
Rasmus Wriedt Larsen
1029f04e76
Python: TarSlip sanitizer: handle not
2020-02-20 16:27:54 +01:00
Rasmus Wriedt Larsen
3c317ed0e6
Python: TarSlip sanitizer: only clear taint on false edge
...
maybe it was on purpose, will have to investigate FPs when query is good
2020-02-20 16:11:24 +01:00
Rasmus Wriedt Larsen
2d637e1cf7
Python: Add more tarslip examples
2020-02-20 16:09:10 +01:00
Mathias Vorreiter Pedersen
c5f38eecfe
C++: Fix IR generation and accept output
2020-02-20 15:37:02 +01:00
Mathias Vorreiter Pedersen
051d574ffd
C++: Add switch testcases demonstrating incorrect IR
2020-02-20 15:31:44 +01:00
Erik Krogh Kristensen
924272a7a5
insert placeholder qhelp
2020-02-20 14:35:26 +01:00
Erik Krogh Kristensen
b2ccec28e0
require the file to be non-empty
2020-02-20 14:34:50 +01:00
Erik Krogh Kristensen
b1cbfce50b
use SystemCommandExecution and a few small fixes
2020-02-20 14:17:37 +01:00
Felicity Chapman
96f37c910b
Apply suggestions from code review
2020-02-20 12:32:18 +00:00
Erik Krogh Kristensen
03e295ef11
Merge branch 'master' of git.semmle.com:Semmle/ql into CVE74
2020-02-20 12:19:32 +01:00
semmle-qlci
f6af5da7f7
Merge pull request #2778 from erik-krogh/FalsySanitizer
...
Approved by asgerf
2020-02-20 11:17:03 +00:00
Erik Krogh Kristensen
63036aa444
Merge branch 'master' of git.semmle.com:Semmle/ql into CVE74
2020-02-20 12:09:06 +01:00
semmle-qlci
8b277f7226
Merge pull request #2868 from asger-semmle/js/missing-await-void
...
Approved by max-schaefer
2020-02-20 10:56:47 +00:00
Asger Feldthaus
6448acfa88
TS: Depend on TypeScript 3.7.5
2020-02-20 10:53:17 +00:00
Erik Krogh Kristensen
12c0291dde
require that an options object has a known set of properties
2020-02-20 11:35:11 +01:00
Erik Krogh Kristensen
b5ef45e6c2
add isSync predicate to SystemCommandExecution
2020-02-20 11:30:23 +01:00
Erik Krogh Kristensen
a193cb110e
support arrow functions in the callbacks
2020-02-20 11:13:39 +01:00
Erik Krogh Kristensen
558beb7255
simplify the output file argument
2020-02-20 10:57:33 +01:00
semmle-qlci
091c6c063c
Merge pull request #2856 from esbena/js/fix-RegExp-getPredecessor-getSuccessor
...
Approved by max-schaefer
2020-02-20 09:50:52 +00:00
Erik Krogh Kristensen
a5fdcb67f9
restricts alerts to the first line
2020-02-20 10:43:41 +01:00
Erik Krogh Kristensen
d4e73df92f
remove dead predicate
2020-02-20 10:39:16 +01:00
Jonas Jensen
97035aeb63
Merge pull request #2848 from geoffw0/model-sideeffects
...
C++: Disambiguate SideEffectFunction QLDoc.
2020-02-20 10:30:53 +01:00
Erik Krogh Kristensen
56f3e431f9
update expected output
2020-02-20 10:28:53 +01:00
Erik Krogh Kristensen
80962803b0
update doc for VarAccessBarrier, and make the class private
2020-02-20 10:09:32 +01:00
Erik Krogh Kristensen
2d437efdfd
corrections on qldoc
...
Co-Authored-By: Asger F <asgerf@github.com >
2020-02-20 09:54:11 +01:00
Robert Marsh
bed6d2b225
Merge branch 'master' into rdmarsh/cpp/malloc-alias-locations
2020-02-19 16:44:13 -08:00
Dave Bartolomeo
4f1a23e248
"Fix" spelling
2020-02-19 15:57:31 -07:00
Dave Bartolomeo
5263222dc2
"Fix" spelling
2020-02-19 15:57:19 -07:00
Robert Marsh
d151c2eeb7
C++: change note for IR-based GVN
2020-02-19 14:39:36 -08:00
Robert Marsh
8ea5739b7a
C++: release note for DefaultTaintTracking
2020-02-19 14:32:49 -08:00
Robert Marsh
de66841263
Merge pull request #2873 from geoffw0/fixasttest2
...
C++: Fix another test that should be working on the AST dataflow.
2020-02-19 14:13:44 -08:00
Robert Marsh
82f2540dde
Merge pull request #2871 from geoffw0/fixasttest
...
C++: Fix a test that should be working on the AST dataflow.
2020-02-19 10:55:13 -08:00
Alistair Christie
eb2fdda6aa
C# pre-migration changes: titles & intros
2020-02-19 17:18:29 +00:00
Asger Feldthaus
479770dc07
JS: Recognize class members in more cases
2020-02-19 17:04:41 +00:00
Shati Patel
38be2672a2
Merge pull request #2877 from jf205/123-mergeback
...
Merge some rc/1.23 documentation changes into master
2020-02-19 16:47:22 +00:00
Felicity Chapman
1da1d92170
Update intro for library overview topic
...
Based on suggestions from James and Shati
2020-02-19 16:39:29 +00:00
james
6467fa5272
Merge branch 'rc/1.23' into 123-mergeback
2020-02-19 16:36:39 +00:00
Felicity Chapman
552d2edb5b
Correction one more mention of tutorials
2020-02-19 16:35:59 +00:00
Felicity Chapman
f8c876176a
Apply suggestions from code review
...
Many thanks for the review suggestions.
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-02-19 16:31:15 +00:00
Anders Schack-Mulligen
91166431d2
Java/C++/C#: s/Callable/DataFlowCallable/
2020-02-19 17:23:01 +01:00
Erik Krogh Kristensen
bdab9ee12b
change useless cat query to only flag instances that can be re-written to
2020-02-19 16:59:28 +01:00
Jonas Jensen
1d2d8729b8
Merge pull request #2839 from MathiasVP/sync-ir-valuenumbering-internals
...
C++/C#: Fix sync config file for value numbering sharing
2020-02-19 16:57:16 +01:00
Rasmus Wriedt Larsen
fd270cc02c
Python: Add basic taint support for urlsplit/urlparse
2020-02-19 16:31:10 +01:00
Rasmus Wriedt Larsen
4f3149d865
Python: Fix error after merge conflict
2020-02-19 16:27:31 +01:00
Rasmus Wriedt Larsen
74345b1c05
Python: Make library-tests/taint/strings tests more transparent
...
Following the setup I invented for library-tests/taint/unpacking.
TestStep is still a bit annoying, since the output is not easy to eyeball; but
for now I guess we can live with it :)
I honestly didn't get the point of DistinctStringKinds.ql, other than showing we
can handle multiple taint kinds
2020-02-19 16:24:22 +01:00
Rasmus Wriedt Larsen
e4b83855d9
Python: Autoformat security/strings/External.qll
2020-02-19 16:24:13 +01:00
Tom Hvitved
ddf6b4a342
Merge pull request #2862 from calumgrant/cs/project-rids
...
C#: Add runtime identifiers to project files
2020-02-19 16:11:10 +01:00
Geoffrey White
89bbb975f9
C++: Effects on tests.
2020-02-19 14:52:49 +00:00
Geoffrey White
4e2a45cd3e
C++: Correct SideEffectFunction model for PureStrFunction.
2020-02-19 14:38:43 +00:00
Geoffrey White
22cba0f26e
C++: Delete TODO.
2020-02-19 14:38:43 +00:00
Geoffrey White
5f7085937e
C++: Improve the SideEffect library QLDoc.
2020-02-19 14:38:43 +00:00
Geoffrey White
c014ca6ed7
C++: Rename some tests for clarity / less emphasis on the AST.
2020-02-19 14:33:57 +00:00
Geoffrey White
3e49e12126
C++ Repair GlobalValueNumbering (AST) test.
2020-02-19 14:28:46 +00:00
Anders Schack-Mulligen
c6016bb08c
Java/C++/C#: Improve join-order in pathStep predicate
2020-02-19 14:47:39 +01:00
Rasmus Wriedt Larsen
e7fdfd3d3e
Python: Move subprocess.call so super-class detection works
...
This is a temporary fix!
Added minimal working example (MWE) as a regression, so it's easier to fix the
real problem.
only Python 3 is facing the problem -- and without --max-import-depth=1 the test
times out at 10 minutes :O
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
d7b803a859
Python: Fix modernisation of py/iteration-string-and-sequence
...
Introduced a regression, since the old code was:
```
predicate is_a_string_type(ClassObject seqtype) {
seqtype = theBytesType() and major_version() = 2
or
seqtype = theUnicodeType()
}
```
but *now* we're good!
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
0509228296
Python: Make ModelUsage test language agnostic
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
87eff7f062
Python: More iterator => iterable renaming
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
82b29b5698
Python: Recognize shebangs in module usage detection
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
01f5b3dc63
Python: Add a script that we can't classify usage of
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
3e7e9636ea
Python: Add ModuleValue.{isUsedAsModule, isUsedAsScript}
...
and a few test cases
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
b4ab0b55be
Python: Modernise Statements/RedundantAssignment
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
79a4d7e9cc
Python: Add some confusing (but valid) property tests
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
67e9edb820
Python: Add PropertyValue
...
+ Extend PropertyInternal.getSetter to handle non-decorator
+ Add PropertyInternal.getDeleter
It seems like a bit hacky way to do things, since we're not using the
PropertySetterOrDeleter class at all, but for now I'll leave it be.
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
e747add485
Python: Descriptor tests fixup (3/3)
...
Better tests for properties
2020-02-19 14:10:29 +01:00
Rasmus Wriedt Larsen
aed7bfb820
Python: Descriptor tests fixup (2/3)
...
Test format improved
2020-02-19 14:10:29 +01:00
Rasmus Wriedt Larsen
3f49aeecfe
Python: Descriptor tests fixup (1/3)
2020-02-19 14:10:29 +01:00
Rasmus Wriedt Larsen
13568b7b9f
Python: Modernise Statements/ queries
...
Almost. Left out a few things marked with TODO
2020-02-19 14:10:29 +01:00
Rasmus Wriedt Larsen
83d40f167b
Python: Update py/ineffectual-statement
...
e.(StrConst).isDocString() can only hold if e instanceof StrConst, since we have
that condition on the line above, we can safely remove this condition.
2020-02-19 14:05:55 +01:00
Rasmus Wriedt Larsen
6e349eb6e7
Python: Make py/side-effect-in-assert handle example
...
Also removed parantheses
2020-02-19 14:05:55 +01:00
Rasmus Wriedt Larsen
ae8dbd81f3
Python: Update test-file for py/redundant-assignment
...
now the test code can be pasted, and actually works ;)
2020-02-19 14:05:55 +01:00
Rasmus Wriedt Larsen
381668871d
Python: Autoformat statements
2020-02-19 14:05:55 +01:00
Geoffrey White
df29143b7e
C++: Fix a test that should be working on the AST dataflow.
2020-02-19 13:02:24 +00:00
Alistair Christie
fab7955c75
Make small editorial changes
2020-02-19 12:54:58 +00:00
Geoffrey White
c94582a1c0
Merge pull request #2861 from MathiasVP/gvn-use-impl
...
C++: Import AST GVN module for tests
2020-02-19 11:16:11 +00:00
james
6ff1c99ae3
docs: a few content updates
2020-02-19 11:08:18 +00:00
semmle-qlci
5e0f21a162
Merge pull request #2854 from max-schaefer/js/regexp-bounded-quantifier-fix
...
Approved by esbena
2020-02-19 10:12:13 +00:00
Mathias Vorreiter Pedersen
59a19679ea
C++/C#: Sync identical files after merge
2020-02-19 11:06:00 +01:00
Mathias Vorreiter Pedersen
bbcc1e1c37
Merge branch 'master' into sync-ir-valuenumbering-internals
2020-02-19 10:43:48 +01:00
Mathias Vorreiter Pedersen
3a05a82c1d
C++: Accept output
2020-02-19 10:35:03 +01:00
Asger Feldthaus
77105f6572
JS: Do not flag void operands MissingAwait
2020-02-19 09:30:03 +00:00
Mathias Vorreiter Pedersen
246ef694f6
Merge branch 'master' into gvn-use-impl
2020-02-19 10:29:46 +01:00
Erik Krogh Kristensen
344060e139
accept IO redirections as OK
2020-02-19 10:12:24 +01:00
Max Schaefer
4346691cdc
JavaScript: Distinguish {lo} and {lo,} in the regular expression parser.
2020-02-19 08:26:14 +00:00
james
d3eb5334b8
docs: update titles, some links, add intros
2020-02-19 07:37:35 +00:00
james
2245d64c52
docs: tidy up ql-for-cpp
2020-02-19 07:09:01 +00:00
Rebecca Valentine
2fa20eb805
Fixes bug introduced by merge of foresight additions.
2020-02-18 21:37:52 -08:00
Rebecca Valentine
7997e1dc98
Merge branch 'master' into objectapi-to-valueapi-expectedmappingforformatstring
2020-02-18 21:33:12 -08:00
Rebecca Valentine
9e3ed214d0
Python: ObjectAPI to ValueAPI: Foresight Additions ( #2819 )
...
* Adds the...Type() predicates as foresight modernizations.
* Removes predicates that are not currently ported/portable
* Adds range types
* Update python/ql/src/semmle/python/objects/ObjectAPI.qll
Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
* Update python/ql/src/semmle/python/objects/ObjectAPI.qll
Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
* Swaps xType for just x, at least when it's new
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-02-18 21:29:20 -08:00
Rebecca Valentine
810efef9de
Adds python3 test
2020-02-18 15:02:47 -08:00
Rebecca Valentine
e55f01d905
Adds new UseofApply test case and results to the Python2 tests dir
2020-02-18 12:12:25 -08:00
Rebecca Valentine
9338d21aaf
Removes unnecessary explanation
2020-02-18 11:43:43 -08:00
Rebecca Valentine
4059a99da6
Autoformats the query
2020-02-18 11:43:31 -08:00
Erik Krogh Kristensen
73a7d406a5
add query for useless use of cat
2020-02-18 19:18:45 +01:00
Robert Marsh
ff876aaedf
C++: Accept test output with IR enabled
2020-02-18 09:48:21 -08:00
Rebecca Valentine
d0617ef7bc
Autoformat
2020-02-18 09:00:31 -08:00
Felicity Chapman
2a5ac2e829
Fix failing Sphinx tests
2020-02-18 16:50:48 +00:00
Robert Marsh
adfe5f30a1
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-02-18 08:42:27 -08:00
Mathias Vorreiter Pedersen
cc4c780573
Merge pull request #2860 from jbj/isInCycle-neighbors
...
C++: Manual magic for `isInCycle`
2020-02-18 17:41:19 +01:00
Robert Marsh
aaf6926c34
Merge pull request #2851 from jbj/ir-enable-only
...
C++: Use IR for security.TaintTracking and GVN
2020-02-18 11:37:34 -05:00
Alistair Christie
fdbc74825e
Java topics - change titles & add intros
2020-02-18 16:34:55 +00:00
Felicity Chapman
74d93ba704
Tidy up some references
2020-02-18 16:05:01 +00:00
semmle-qlci
ba67faf461
Merge pull request #2863 from shati-patel/master
...
Approved by felicitymay
2020-02-18 15:56:10 +00:00
Taus
ffbb5d0529
Merge pull request #2739 from RasmusWL/python-modernise-security
...
Python: modernise Security/ queries
2020-02-18 16:28:53 +01:00
Felicity Chapman
8a44f51fc5
Bring headings more into line with content models
2020-02-18 13:18:02 +00:00
Felicity Chapman
8ab4cebc9b
Add reusable for other resources and make 'Further reading' section
2020-02-18 12:16:33 +00:00
Felicity Chapman
38e40622f1
Update topic titles and update map topic as discussed with JF and SP
2020-02-18 12:03:51 +00:00
Calum Grant
c3b88210aa
C#: Add runtime idenfitiers to project files.
2020-02-18 11:52:41 +00:00
Mathias Vorreiter Pedersen
4cad5549ee
C++: Directly import AST GVN module in tests
2020-02-18 12:21:14 +01:00
Rasmus Wriedt Larsen
1826abcdda
Python: Autoformat django/General.qll
...
Should get into the habbit of doing this, but this time it slipped :P
2020-02-18 11:26:16 +01:00
Rasmus Wriedt Larsen
48c1c598bc
Python: Write DjangoRegexRoute in more modern way
...
That is, assigning to fields instead of repeatedly using helper predicate
2020-02-18 11:25:27 +01:00
Rasmus Wriedt Larsen
ed9aa7dced
Python: Write DjangoPathRoute in modern way
...
That is, assigning to fields instead of repeatedly using helper predicate
2020-02-18 11:24:24 +01:00
Rasmus Wriedt Larsen
5a0babe88b
Python: Add support for Django 2.x and 3.x
...
I changed the django mock to support both 1.x and 2.x routing APIs, which is not
really a nice long term solution.
2020-02-18 11:22:35 +01:00
Erik Krogh Kristensen
e359e1a373
use a barrier directly instead of a barrier guard
2020-02-18 10:57:28 +01:00
Esben Sparre Andreasen
abe7aeef7c
Merge pull request #2643 from esbena/js/unsafe-jquery
...
JS: add query js/unsafe-jquery-plugin
2020-02-18 09:26:14 +01:00
Jonas Jensen
0d239e8bd2
C++: Manual magic for isInCycle
...
The `isInCycle` predicate would take a long time on Wireshark with 6GB
RAM, sometimes OOMing in the fastTC HOP. Analyzing wireshark with 6GB is
important because that's the standard configuration on our Jenkins
workers. With this commit, I can analyze Wireshark with 6GB on my
laptop.
The `getNonPhiOperandDef` predicate on Wireshark is 34M tuples, while
`getDefIfHasNeighbors` is 11M tuples, and the TC of
`getDefIfHasNeighbors` is 23M tuples (487 MB).
2020-02-18 08:33:43 +01:00
Rebecca Valentine
4178002d59
Merge branch 'master' into python-objectapi-to-valueapi-useofapply
2020-02-17 17:20:00 -08:00
Esben Sparre Andreasen
e8938fb466
JS: introduce RegExpSequence::nextElement and previousElement
2020-02-17 23:20:25 +01:00
Rebecca Valentine
c36c0aeb88
Fixes renaming bug
2020-02-17 12:09:01 -08:00
Rebecca Valentine
13cd8d2435
Fixes expected results bug
2020-02-17 11:47:03 -08:00
Rebecca Valentine
a2c1d5ff45
Moves to higher level API
2020-02-17 11:46:53 -08:00
Rebecca Valentine
c5986c52d3
Renames typeErrorType to typeError
2020-02-17 11:28:39 -08:00
Tom Hvitved
a695b567ec
Data flow: Sync files
2020-02-17 19:39:52 +01:00
Tom Hvitved
3a4f52315c
Data flow: Track simple call contexts in nodeCand[Fwd]1
2020-02-17 19:37:35 +01:00
semmle-qlci
ecad925101
Merge pull request #2631 from hvitved/dataflow/generalize-flow-summaries
...
Approved by aschackmull
2020-02-17 18:22:46 +00:00
yo-h
d3b1729864
Merge pull request #2793 from aschackmull/java/format-taint-step
...
Java: Add String.format as default taint step.
2020-02-17 12:50:12 -05:00
Alexander Eyers-Taylor
c685b348c3
Merge pull request #2837 from jf205/monotonic-aggregates
...
docs: expand QL book entry on monotonic aggregates
2020-02-17 17:05:54 +00:00
james
d5ff8f2b8e
docs: technical feedback
2020-02-17 16:20:31 +00:00
Rasmus Wriedt Larsen
adec76d041
Python: Follow conventions of getASomething
...
When multiple results are available, we usually name the function
`getAnArgument` or `getASomething`. The support for django copied the way bottle
did things, so this commits cleans up both
2020-02-17 16:55:55 +01:00
Rasmus Wriedt Larsen
362e7aebbb
Python: Add HttpRedirectSinks test for django
2020-02-17 16:54:06 +01:00
Rasmus Wriedt Larsen
a3c6472b9b
Python: Improve django tests (and prepare for v2 + v3 support)
2020-02-17 16:39:01 +01:00
Tom Hvitved
0e7838aca5
Data flow: Sync files
2020-02-17 15:08:26 +01:00
Tom Hvitved
c7aa31d90a
Address review comments
2020-02-17 15:07:53 +01:00
Erik Krogh Kristensen
56e5bd50f6
update expected output
2020-02-17 14:55:08 +01:00
James Fletcher
a3fc2eac9c
Merge pull request #2834 from shati-patel/2160-prep-ql-language
...
Minor update to QL language topics
2020-02-17 13:44:54 +00:00
Anders Schack-Mulligen
cabe627d1e
Java: Fix qldoc.
2020-02-17 14:44:12 +01:00
Erik Krogh Kristensen
2885d48ad0
changes based on review
2020-02-17 14:44:10 +01:00
Rasmus Wriedt Larsen
f3ab52b1fe
Python: Use StringValue instead of Value::forString
2020-02-17 14:41:32 +01:00
Rasmus Wriedt Larsen
6d5a8e4995
Python: Fix typos
2020-02-17 14:34:22 +01:00
Asger Feldthaus
9249b92d85
JS: Fix typo in comment
2020-02-17 12:48:13 +00:00
Esben Sparre Andreasen
8a9587fc91
JS: fix RegExp::getSuccessor/getPredecessor for sequence end/starts
2020-02-17 13:40:53 +01:00
Erik Krogh Kristensen
d1a58f1d17
Merge remote-tracking branch 'upstream/master' into CVE74
2020-02-17 13:18:52 +01:00
Erik Krogh Kristensen
b07f3d36d8
qldoc on splitPath
2020-02-17 13:17:12 +01:00
Erik Krogh Kristensen
5375604109
calling pop or shift on a SplitPath returns a PosixPath
2020-02-17 13:15:46 +01:00
Shati Patel
c5eec30713
Tidy up QLDoc spec
2020-02-17 12:07:15 +00:00
Shati Patel
2ce1ad1818
Rename "QLDoc specification" to "QLDoc comment specification"
2020-02-17 12:07:15 +00:00
Shati Patel
c846f536c4
Remove numbering
2020-02-17 12:07:15 +00:00
Esben Sparre Andreasen
c5ee436b16
JS: add RegExp::getSuccessor/getPredecessor tests
2020-02-17 13:06:55 +01:00
Erik Krogh Kristensen
3855268201
use RegExpCreationNode
2020-02-17 13:02:47 +01:00
Erik Krogh Kristensen
46cbeb0bc6
add more steps to the SplitPath label
2020-02-17 12:58:27 +01:00
semmle-qlci
23ed2bcc64
Merge pull request #2782 from asger-semmle/js/export-as-ns
...
Approved by erik-krogh, max-schaefer
2020-02-17 11:22:58 +00:00
Taus
03ae7831ad
Merge pull request #2711 from RasmusWL/python-fix-import-deprecated-module
...
Python: fix alerts for py/import-deprecated-module
2020-02-17 11:46:12 +01:00
Taus
df3ac49c28
Merge pull request #2700 from RasmusWL/python-taint-iterable-unpacking
...
Python: Handle iterable unpacking in taint tracking
2020-02-17 11:44:25 +01:00
Taus
990d1c1663
Merge pull request #2802 from RasmusWL/python-fix-fp-py/import-own-module
...
Python: Fix FP for py/import own module
2020-02-17 11:23:11 +01:00
Tom Hvitved
8e325ead91
Add change notes
2020-02-17 11:00:10 +01:00
Tom Hvitved
dcdb5299f0
C#: Update expected test output
2020-02-17 10:52:02 +01:00
Tom Hvitved
7eae5f913c
C#: Update data-flow test
2020-02-17 10:45:44 +01:00
Tom Hvitved
28307399f8
Data flow: Sync files
2020-02-17 10:45:35 +01:00
Tom Hvitved
bc6c4744b1
Data flow: Follow-up changes to FlowExploration module
2020-02-17 10:43:26 +01:00
Tom Hvitved
307ac7f0b3
Data flow: Remove UntypedAccessPath again
2020-02-17 10:32:27 +01:00
Jonas Jensen
0aba965a9e
C++: Don't mention deprecated class
...
The language tests were failing because they don't tolerate mentioning a
deprecated class anywhere.
2020-02-16 09:43:25 +01:00
Jonas Jensen
a59c0facee
C++: Accept test changes for IR libs
...
This is for the tests in the ql repo. There are also changed tests in
the internal repo.
2020-02-15 21:12:20 +01:00
Jonas Jensen
f4ba56f0c0
C++: Use IR for security.TaintTracking and GVN
2020-02-15 21:10:29 +01:00
Jonas Jensen
e95ebb25a5
C++: Ensure tainted_diff.ql keeps using old lib
...
Without this, the test will compare the IR to itself after we enable it.
2020-02-15 21:10:29 +01:00
Jonas Jensen
0628625a76
Merge pull request #2835 from MathiasVP/value-number-perf
...
C++: Value number performance fix
2020-02-15 20:40:53 +01:00
Mathias Vorreiter Pedersen
8cda847dbc
C++: Add TLoadTotalOverlapValueNumber to getKind predicate in AST GVN wrapper
2020-02-15 09:37:45 -07:00
Jonas Jensen
49d2f5a60b
C++: autoformat
2020-02-15 09:41:27 +01:00
SpaceWhite
0be6f84387
Add sample
2020-02-15 16:49:33 +09:00
SpaceWhite
1ad7bd9684
add sample code
2020-02-15 16:46:09 +09:00
SpaceWhite
a29ccd674f
Initial commit
2020-02-15 16:27:03 +09:00
Dave Bartolomeo
867581df91
Merge pull request #2844 from MathiasVP/value-numbering-performance-fix-2
...
C++: Ensure that there is just one overlap for an operand in value numbering
2020-02-14 16:40:03 -07:00
Robert Marsh
7abd289d7d
C++: reinclude IRType in total load value numbers
2020-02-14 13:34:29 -08:00
Robert Marsh
f3c788d1e9
Merge pull request #2843 from jbj/ValueNumbering-import-order
...
C++: Change import order for stable cache checksum
2020-02-14 13:34:20 -05:00
Mathias Vorreiter Pedersen
8b8a8cae5b
C++/C#: Sync identical files
2020-02-14 16:11:57 +01:00
Mathias Vorreiter Pedersen
4a7b865dc0
C++: Move overlap fix into SSAConstruction
2020-02-14 16:11:00 +01:00
semmle-qlci
8d21692caf
Merge pull request #2845 from max-schaefer/js/http2
...
Approved by esbena
2020-02-14 13:05:48 +00:00
Erik Krogh Kristensen
a6d644bac0
add support for path.normalize(path.realtive(...))
2020-02-14 13:10:35 +01:00
Erik Krogh Kristensen
94814fa721
fix typos in the test
2020-02-14 13:03:35 +01:00
Nick Rolfe
d2a0037ad0
Merge pull request #2833 from hmakholm/pr/ql-codeql
...
Don't chain to ./codeql in .codeqlmanifest.json
2020-02-14 11:44:27 +00:00
Erik Krogh Kristensen
d765a33b8d
add support for "../" prefixes in sanitizer
2020-02-14 12:36:54 +01:00
Erik Krogh Kristensen
9d61004128
remove redundant constructor on sink
2020-02-14 12:31:12 +01:00
Max Schaefer
ad83a8946c
JavaScript: Sort lines in change notes.
2020-02-14 11:15:09 +00:00
Max Schaefer
f181111886
JavaScript: Add model of http2 compatibility API.
...
Also deprecated the `httpOrHttps` predicate, which was now only used in one place and seemed a little pointless anyway.
2020-02-14 11:14:31 +00:00
Mathias Vorreiter Pedersen
121c5e436d
C++: Check that there is only one overlap
2020-02-14 11:13:53 +01:00
Erik Krogh Kristensen
3a146514ce
add sanitizer for relative ".." in js/path-injection
2020-02-14 10:51:48 +01:00
Jonas Jensen
928bdbacb0
C++: Change import order for stable cache checksum
...
Without this fix, running the full LGTM suite would get the IR evaluated
twice. That's because we have multiple IPA types and constructors with
the same name (like `TInstruction` and `MkIRFunction`), and the QL
compiler chooses how to disambiguate those names differently depending
on import order.
I've tested that the IR is only evaluated once now by running the whole
suite on a tiny project (jbj/magicrescue) and looking at the output of
perl -ne 'print if /^RESULTS IN:/ .. /^\[/ and not /^\[/' runSnapshotQueries-debug.log | sort |uniq -c |sort -n |less
2020-02-14 10:28:52 +01:00
semmle-qlci
da566a4484
Merge pull request #2828 from erik-krogh/CVE24
...
Approved by esbena
2020-02-14 09:12:48 +00:00
semmle-qlci
769dce511b
Merge pull request #2788 from erik-krogh/CVE42-sink
...
Approved by esbena
2020-02-14 08:00:00 +00:00
Mathias Vorreiter Pedersen
98db6d8fd7
C#: Fix format and sync files
2020-02-14 08:22:25 +01:00
Robert Marsh
b4ff1216cc
C++: sync identical files
2020-02-13 17:02:00 -08:00
Aditya Sharad
5e0d640f57
Merge pull request #2841 from BekaValentine/gitignore_vim_swap_files
...
Adds .gitignore entry for vim swap files.
2020-02-13 16:20:33 -08:00
Robert Marsh
0f58887396
C++: unique value number for filtered instructions
...
Instructions that are removed from the normal value numbering recursion
because they have a duplicated type or AST element get unique value
numbers rather than going unnumbered. This ensures comparisons of value
numbers using `!=` hold for filtered instructions.
2020-02-13 15:36:42 -08:00
Rebecca Valentine
2ee38f246b
Adds .gitignore entry for vim swap files.
2020-02-13 15:23:50 -08:00
Rebecca Valentine
6a04004d94
Adds test cases and qlref.
2020-02-13 14:49:01 -08:00
Rebecca Valentine
b665f54a31
Corrects query to use builtin instead of special
2020-02-13 14:48:46 -08:00
Rebecca Valentine
3b45fbc87c
Adds rough modernization.
2020-02-13 14:22:00 -08:00
Mathias Vorreiter Pedersen
d4c6f487bc
C++/C#: Fix sync config file for value numbering sharing
2020-02-13 22:32:52 +01:00
Mathias Vorreiter Pedersen
ed7888c612
C++: Sync identical files
2020-02-13 21:50:03 +01:00
Mathias Vorreiter Pedersen
57613d5507
C++: Reintroduce the type in TConstantValueNumber to avoid giving constant with different signed-ness the same value number. Instead filter those with more than one type out.
2020-02-13 21:49:40 +01:00
Dave Bartolomeo
9e1ea01be8
Fix typo
2020-02-13 13:01:09 -07:00
Tom Hvitved
09b1e8b161
C#: Update expected test output
2020-02-13 20:08:11 +01:00
james
b32683fc9f
docs: expand handbook entry on monotonic aggregates
2020-02-13 18:06:44 +00:00
Mathias Vorreiter Pedersen
cb510edcf0
C++: Sync up identical files and restore imports
2020-02-13 18:02:56 +01:00
Mathias Vorreiter Pedersen
04c5f1cbb4
C++: Perf fix for value numbering
2020-02-13 18:02:56 +01:00
Jonas Jensen
24396905a5
WIP: Try to reduce ambiguous value numbers
...
This is not enough to get genome/breakdancer working.
2020-02-13 18:02:56 +01:00
Jonas Jensen
8054cde9fc
WIP: Switch on IR
2020-02-13 18:02:56 +01:00
Tom Hvitved
332733a92e
Java/C++: Follow-up changes
2020-02-13 16:34:06 +01:00
Tom Hvitved
b5b0c2b8cf
Data flow: Sync files
2020-02-13 16:34:06 +01:00
Tom Hvitved
6be2bf8374
Address review comments
2020-02-13 16:34:06 +01:00
James Fletcher
c95f58c30d
Merge pull request #2830 from shati-patel/docs-preparation
...
Merge master into `docs-preparation` branch
2020-02-13 14:59:09 +00:00
Henning Makholm
3ec11a1089
Don't chain to ./codeql in .codeqlmanifest.json
...
This entry in `.codeqlmanifest.json` was intended to allow
unpacking the CodeQL CLI as a subdirectory of `ql`, and things
would Just Work.
However, it is not necessary anymore because recent releases of
the CLI will search their own directory as a fallback
_independently_ of the parent directory.
On the contrary, removing this link will make internal testing
easier because you then run a test build of the CLI with
`--search-path` pointing to the `ql` checkout without inadvertently
making extractors in a _different_ build that is unpacked there visible.
2020-02-13 15:30:15 +01:00
Erik Krogh Kristensen
897bb4d801
add test for chrome-remote-interface
2020-02-13 15:12:45 +01:00
Erik Krogh Kristensen
1ab5ca4e64
typo in docstring
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-02-13 14:15:28 +01:00
jack1142
e1644dd68b
Python: Handle __class_getitem__ in py/not-named-self ( #2825 )
...
Fixes #2824
2020-02-13 13:38:36 +01:00
Rasmus Wriedt Larsen
1558cf2eae
Python: Fix typo (decent => descent)
2020-02-13 13:35:29 +01:00
Tom Hvitved
8748a1218d
C#: Generate fresh TRAP ID for local functions
2020-02-13 13:02:46 +01:00
Taus
dcb41a139c
Merge pull request #2780 from RasmusWL/python-clean-qltest-options
...
Python: clean qltest options files
2020-02-13 12:14:17 +01:00
Erik Krogh Kristensen
7c69ee1aff
Merge remote-tracking branch 'upstream/master' into CVE74
2020-02-13 11:09:09 +01:00
Erik Krogh Kristensen
d6afd438ba
add model for chrome-remote-interface as a ClientRequest
2020-02-13 10:58:07 +01:00
Geoffrey White
4412cea04a
Merge pull request #2821 from jbj/ValueNumbering-var-operand
...
C++: Fix perf of IR value numbering
2020-02-13 09:11:34 +00:00
Rebecca Valentine
acb3c524dd
Updates expected results.
2020-02-12 19:46:43 -08:00
Rebecca Valentine
65cba82c7e
Fixes bug w/ use of pointsTo
2020-02-12 19:45:55 -08:00
Rebecca Valentine
bfb720c7f3
Adds range and tuple types
2020-02-12 19:36:03 -08:00
Rebecca Valentine
3ce250b2cf
Adds some debugging changes.
2020-02-12 19:29:42 -08:00
Robert Marsh
52b164434d
C++: remove accidental commit
2020-02-12 15:23:30 -08:00
Robert Marsh
1d5971f8ec
C++: accept test changes from extractor update
2020-02-12 13:29:21 -08:00
Tom Hvitved
89527766be
Merge pull request #2744 from calumgrant/cs/local-var-parent
...
C#: Distinguish between local variables extracted in different compil…
2020-02-12 19:41:29 +01:00
Felicity Chapman
39ba3dedc1
Fix build failure by moving control-flow image
2020-02-12 17:16:31 +00:00
Felicity Chapman
8db3651dfd
Add draft introductions and create map topic for Python
2020-02-12 16:38:23 +00:00
Jonas Jensen
2abe416670
Merge pull request #2799 from MathiasVP/missing-flow-in-crement
...
C++: Fix false negatives for postfix crement expressions
2020-02-12 15:03:48 +01:00
Jonas Jensen
033a4c30ea
C++: Fix perf of IR value numbering
...
On some snapshots, notably ffmpeg, the IR `ValueNumbering` recursion
would generate billions of tuples and eventually run out of space.
It turns out it was fairly common for an `Instruction` to get more than
one `ValueNumber` in the base cases for `VariableAddressInstruction` and
`InitializeParameterInstruction`, and it could also happen in an
instruction with more than one operand of the same `OperandTag`. When a
binary operation was applied to an instruction with `m` value numbers
and another instruction with `n` value numbers, the result would get
`m * n` value numbers. This led to doubly-exponential growth in the
number of value numbers in rare cases.
The underlying reason why a `VariableAddressInstruction` could get
multiple value numbers is that it was keyed on the associated
`IRVariable`, and the `IRVariable` is defined in part by the type of its
underlying `Variable` (or other AST element). If the extractor defines a
variable to have multiple types because of linker ambiguity, this leads
to the creation of multiple `IRVariable`s. That should ideally be solved
in `TIRVariable.qll`, but for now I've put a workaround in
`ValueNumberingInternal.qll` instead.
To remove the problem with instructions having multiple operands, the
construction in `Operand.qll` will now filter out any such operand. It
wasn't enough to apply that filter to the `raw` stage, so I've applied
it to all three stages.
2020-02-12 14:38:41 +01:00
Taus
895f2f74ab
Merge branch 'master' into python-clean-qltest-options
2020-02-12 13:44:41 +01:00
Taus
12113e947f
Merge pull request #2603 from RasmusWL/python-fix-http-source-sink
...
Python: Make web libs use HttpRequestTaintSource and HttpResponseTaintSink
2020-02-12 13:42:22 +01:00
Mathias Vorreiter Pedersen
c8be67ce0e
C++: Generalize PostfixCrementOperation to CrementOperation to fix false negatives reported by Geoffrey
2020-02-12 13:26:10 +01:00
Taus
de45b1a08e
Merge pull request #2767 from RasmusWL/python-six-tests
...
Python: Update expected six results
2020-02-12 12:53:36 +01:00
Erik Krogh Kristensen
d913654604
Merge remote-tracking branch 'upstream/master' into FalsySanitizer
2020-02-12 10:28:48 +01:00
Tom Hvitved
78380f5d59
Merge pull request #2658 from calumgrant/cs/serialization-check-bypass-type
...
C#: Fix cs/serialization-check-bypass
2020-02-12 10:26:01 +01:00
Anders Schack-Mulligen
5b7c150f58
Merge pull request #2813 from p-/fix-doc-java-dataflow
...
Doc: fix sample query in Java data flow documentation
2020-02-12 10:08:05 +01:00
Rebecca Valentine
2270c6c960
Adds modernized files.
2020-02-11 21:45:49 -08:00
Rebecca Valentine
178acc85b9
Adds main modifications.
2020-02-11 21:25:50 -08:00
Robert Marsh
837fe84cec
C++/C#: autoformat Opcode.qll
2020-02-11 12:18:45 -08:00
Robert Marsh
f467260815
C++: respond to PR comments.
2020-02-11 12:17:46 -08:00
Robert Marsh
5269fb713f
Merge pull request #2812 from geoffw0/nospacezero
...
C++: Improve NoSpaceForZeroTerminator.ql
2020-02-11 14:37:32 -05:00
Peter Stöckli
ddbec74b67
Doc: fix sample query in Java data flow doc
2020-02-11 20:17:53 +01:00
Mathias Vorreiter Pedersen
1dd5926f41
C++: Generalize new case in adjustedSink to all AssignOperations
2020-02-11 17:15:42 +01:00
Geoffrey White
87781a944b
C++: Change note.
2020-02-11 15:25:59 +00:00
Geoffrey White
75a50a1714
C++: Understand formatting function varargs as needing null termination.
2020-02-11 15:25:59 +00:00
Geoffrey White
de8d84dfff
C++: Clearer comments in NoSpaceForZeroTerminator.ql.
2020-02-11 15:25:59 +00:00
Geoffrey White
2f290bd528
C++: Additional test cases.
2020-02-11 15:25:59 +00:00
Calum Grant
5838df17c6
Merge pull request #2766 from hvitved/csharp/stackalloc
...
C#: Extract `stackalloc` information
2020-02-11 15:06:15 +00:00
Rasmus Wriedt Larsen
efedcd26d0
Python: Django tests need --lang=3
2020-02-11 13:16:52 +01:00
Erik Krogh Kristensen
35d8151374
add a few arrary methods to TaintedPath.qll
2020-02-11 12:23:51 +01:00
Tom Hvitved
1948446ad3
Address review comments
2020-02-11 11:56:40 +01:00
Rasmus Wriedt Larsen
1f762841ec
Python: In py/import-own-module handle from foo import *
2020-02-11 11:45:48 +01:00
Rasmus Wriedt Larsen
5cc2efef8e
Python: Fix FPs for py/import-own-module
...
Before I added `--max-import-depth=2`, there was a bit of trouble, where it
would alert on `from pkg_ok import foo2` -- since all the `pkg_ok.foo<n>`
modules were missing, I guess the analysis didn't make any assumptions on
whether `foo2` is a module or a regular attribute.
2020-02-11 11:45:48 +01:00
Rasmus Wriedt Larsen
f3f9e340d3
Python: Update tests for py/import-own-module
...
So I've been thinking a bit about import pkg_ok.foo1 after reading the Python
references for imports of submodules
https://docs.python.org/3/reference/import.html#submodules
> When a submodule is loaded using any mechanism (...) a binding is placed in the
parent module’s namespace to the submodule object. For example, if package spam
has a submodule foo, after importing spam.foo, spam will have an attribute foo
which is bound to the submodule.
That does at least explain what is going on here.
I feel that import pkg_ok.foo1 might be a very contrived example. In principle
it should be an alert, since the module pkg_ok ends up with an import of itself,
but my gut feeling is that in practice it's not a very important piece of code
to give alerts for. if we really care about giving these import related alerts,
we could probably add a new query for this pattern, as it's kind of surprising
that it works when you're just an ordinary python programmer.
2020-02-11 11:45:48 +01:00
Jonas Jensen
b9bc21637e
Merge pull request #2808 from rdmarsh2/function-with-wrappers
...
C++: fix cartesian product in FunctionWithWrapper
2020-02-11 09:31:41 +01:00
Robert Marsh
d672f8f863
C++: unflip cause strings in FunctionWithWrapper
2020-02-10 15:57:38 -08:00
Robert Marsh
d09f78db29
C++: fix cartesian product in FunctionWithWrapper
2020-02-10 13:02:58 -08:00
Dave Bartolomeo
405850e02b
Merge pull request #2805 from jbj/dataflow-sideeffect-join
...
C++: IR DataFlowUtil::modelFlow join order fix
2020-02-10 13:04:51 -07:00
Tom Hvitved
96e71c731d
C#: Add DB stats for explicitly_sized_array_creation
2020-02-10 20:33:57 +01:00
Tom Hvitved
dc27ee7b9f
C#: Add change note
2020-02-10 20:33:57 +01:00
Tom Hvitved
859e6968c1
C#: Add DB upgrade script
2020-02-10 20:32:53 +01:00
Tom Hvitved
bbf082b285
C#: Extract stackalloc information
2020-02-10 20:32:52 +01:00
Tom Hvitved
2b2bb5db80
Merge pull request #2803 from calumgrant/cs/stackalloc-expr
...
C#: Handle implicitly-typed stackallocs
2020-02-10 20:28:16 +01:00
Robert Marsh
58bba86be4
C++: autoformat
2020-02-10 09:52:23 -08:00
Calum Grant
fb6da0b701
C#: Remove condition around initializer.
2020-02-10 16:17:12 +00:00
Calum Grant
803cb3f4d1
C#: Address review comment
...
- Flow from expressions with a value is excluded.
2020-02-10 16:02:29 +00:00
Mathias Vorreiter Pedersen
af4a6e4ac6
Merge pull request #2806 from jbj/coversEntireVariable-join
...
C++: Fix coversEntireVariable perf in AliasedSSA
2020-02-10 16:38:28 +01:00
Mathias Vorreiter Pedersen
bcd84efe8d
C++: Add += and friends to adjustedSink
2020-02-10 15:50:52 +01:00
Jonas Jensen
cf1bc693b4
C++: Fix coversEntireVariable perf in AliasedSSA
...
This predicate got an unfortunate join order, leading to these tuple
counts on ElektraInitiative/libelektra:
(290s) Tuple counts for AliasedSSA::VariableMemoryLocation::coversEntireVariable_dispred#f:
57117 ~0% {3} r1 = SCAN IRType::IRType::getByteSize_dispred#ff AS I OUTPUT 0, (I.<1> * 8), I.<0>
421445272 ~0% {3} r2 = JOIN r1 WITH AliasedSSA::VariableMemoryLocation#fffffff_5601#join_rhs AS R ON FIRST 2 OUTPUT R.<3>, r1.<2>, R.<2>
103282 ~2% {1} r3 = JOIN r2 WITH AliasConfiguration::Allocation::getIRType_dispred#ff AS R ON FIRST 2 OUTPUT r2.<2>
return r3
With this commit, we get these tuple counts instead:
(0s) Tuple counts for AliasedSSA::VariableMemoryLocation::varIRTypeHasBitRange#bff:
361874 ~0% {3} r1 = SCAN AliasedSSA::VariableMemoryLocation#fffffff AS I OUTPUT I.<1>, 0, I.<0>
361874 ~0% {3} r2 = JOIN r1 WITH AliasConfiguration::Allocation::getIRType_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, 0, r1.<2>
361874 ~1% {3} r3 = JOIN r2 WITH IRType::IRType::getByteSize_dispred#ff AS R ON FIRST 1 OUTPUT r2.<2>, 0, (R.<1> * 8)
return r3
(0s) Tuple counts for AliasedSSA::VariableMemoryLocation::coversEntireVariable_dispred#f:
103282 ~2% {1} r1 = JOIN AliasedSSA::VariableMemoryLocation#fffffff_056#join_rhs AS L WITH AliasedSSA::VariableMemoryLocation::varIRTypeHasBitRange#bff AS R ON FIRST 3 OUTPUT L.<0>
103282 ~2% {1} r2 = STREAM DEDUP r1
return r2
2020-02-10 15:18:34 +01:00
Rasmus Wriedt Larsen
2bffbf0734
Python: Add testcases for py/import-own-module
...
You can try out:
python2 -c "import pkg_ok; print(pkg_ok.foo1); print(pkg_ok.foo2); print(pkg_ok.foo3); print(pkg_ok.foo4); print(pkg_ok.foo5); print(pkg_ok.Foo3); print(pkg_ok.Foo5); print(pkg_ok.pkg_ok)"
python3 -c "import pkg_ok; print(pkg_ok.foo1); print(pkg_ok.foo2); print(pkg_ok.foo3); print(pkg_ok.foo4); print(pkg_ok.foo5); print(pkg_ok.Foo3); print(pkg_ok.Foo5); print(pkg_ok.pkg_ok)"
2020-02-10 15:16:47 +01:00
Jonas Jensen
47c12817ad
C++: IR DataFlowUtil::modelFlow join order fix
...
We had these tuple counts on ElektraInitiative/libelektra (note that the
`modelFlow` predicate got inlined into
`simpleInstructionLocalFlowStep`):
(652s) Tuple counts for DataFlowUtil::simpleInstructionLocalFlowStep#ff:
...
19701 ~1% {4} r27 = JOIN r26 WITH Instruction::SideEffectInstruction::getPrimaryInstruction_dispred#3#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r26.<2>, r26.<1>, r26.<0>
7908 ~0% {3} r28 = JOIN r27 WITH SSAConstruction::Cached::getInstructionIndex#ff@staged_ext AS R ON FIRST 2 OUTPUT r27.<0>, r27.<2>, r27.<3>
4023 ~0% {3} r29 = JOIN r28 WITH Instruction::WriteSideEffectInstruction#class#ff AS R ON FIRST 1 OUTPUT r28.<1>, r28.<2>, r28.<0>
...
1060807009 ~3% {3} r34 = JOIN r33 WITH SSAConstruction::Cached::getInstructionIndex#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r33.<1>, r33.<2>
15670 ~5% {2} r35 = JOIN r34 WITH Instruction::SideEffectInstruction::getPrimaryInstruction_dispred#3#ff AS R ON FIRST 2 OUTPUT r34.<0>, r34.<2>
7973 ~0% {2} r36 = JOIN r35 WITH Instruction::ReadSideEffectInstruction::getSideEffectOperand_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r35.<1>
...
In this predicate there are two cases (`WriteSideEffectInstruction` and
`ReadSideEffectInstruction`) where we need to join on both the call and
the argument index of a side effect. It works well enough for the first
case, `WriteSideEffectInstruction`, where the call is joined on before
the index, but it explodes in the second case,
`ReadSideEffectInstruction`, where the index is joined first. To fix the
second case, and to guard against future optimizer accidents in the
first case, this commit changes both of those cases to use a new helper
predicate that makes it possible to join on both columns at once. The
resulting tuple counts are:
(3s) Tuple counts for DataFlowUtil::simpleInstructionLocalFlowStep#ff:
...
7908 ~0% {3} r27 = JOIN r26 WITH DataFlowUtil::getSideEffectFor#fff AS R ON FIRST 2 OUTPUT R.<2>, r26.<2>, r26.<0>
4023 ~0% {3} r28 = JOIN r27 WITH Instruction::WriteSideEffectInstruction#class#ff AS R ON FIRST 1 OUTPUT r27.<1>, r27.<2>, r27.<0>
...
15670 ~5% {2} r33 = JOIN r32 WITH DataFlowUtil::getSideEffectFor#fff AS R ON FIRST 2 OUTPUT R.<2>, r32.<2>
7973 ~0% {2} r34 = JOIN r33 WITH Instruction::ReadSideEffectInstruction::getSideEffectOperand_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r33.<1>
...
The bulge is now limited to a factor of two, and that's just because I
didn't write separate versions of `getSideEffectFor` for
`ReadSideEffectInstruction` and `WriteSideEffectInstruction`.
2020-02-10 15:11:30 +01:00
Erik Krogh Kristensen
67cd303a91
add change note
2020-02-10 13:51:48 +01:00
Mathias Vorreiter Pedersen
99a9d7f676
C++: Simplify
2020-02-10 13:01:40 +01:00
Erik Krogh Kristensen
8e316d2f05
add unary type-tracking predicates
2020-02-10 12:51:09 +01:00
Calum Grant
a95ef31984
C#: Analysis change notes
2020-02-10 11:36:30 +00:00
Calum Grant
5fef77bf44
C#: Handle expressions of typeImplicitStackAllocArrayCreationExpressionSyntax
2020-02-10 11:30:12 +00:00
Mathias Vorreiter Pedersen
6804018a64
C++: Accept output
2020-02-10 11:37:40 +01:00
Mathias Vorreiter Pedersen
522c629441
C++: Move fix to adjustedSink to avoid generating too many instructions
2020-02-10 11:37:26 +01:00
Pavel Avgustinov
09960e0a7d
Merge pull request #2791 from aibaars/language-spec-fixes
...
Fix a few typos in the QL grammar
2020-02-10 10:33:00 +00:00
Erik Krogh Kristensen
0f511c92b4
Merge remote-tracking branch 'upstream/master' into FalsySanitizer
2020-02-10 09:54:58 +01:00
Mathias Vorreiter Pedersen
52bc25b608
C++: Accept output
2020-02-10 08:50:29 +01:00
SpaceWhite
949914e48a
Add XPathInjection
2020-02-10 13:48:02 +09:00
Mathias Vorreiter Pedersen
bb30275e2e
C++: Fix false negatives for postfix crement expressions
2020-02-09 21:35:07 +01:00
Tom Hvitved
9b699618a8
Data flow: Improve performance of flowFwdStore()
2020-02-09 19:34:04 +01:00
Mathias Vorreiter Pedersen
bcb4759b6a
Merge pull request #2795 from agustingianni/master
...
cpp: Adds a member predicate to get a FunctionAccess from a Function
2020-02-08 10:39:36 +01:00
Robert Marsh
3266a89023
C++: document DynamicAllocationInstruction
2020-02-07 16:56:57 -08:00
Robert Marsh
3ea3519674
C++/C#: sync changes
2020-02-07 16:37:42 -08:00
Robert Marsh
7f69cdfb56
C++: Dynamic allocations in IR alias analysis
2020-02-07 16:37:36 -08:00
Robert Marsh
05c8610bbc
C++: tests for alias analysis of malloc
2020-02-07 16:35:58 -08:00
Robert Marsh
68097116b0
C++:autoformat
2020-02-07 15:51:23 -08:00
semmle-qlci
37360e7d93
Merge pull request #2794 from esbena/js/move-EnumeratedPropName
...
Approved by asgerf
2020-02-07 21:31:37 +00:00
semmle-qlci
76ba48c6fb
Merge pull request #2790 from esbena/js/model-send
...
Approved by asgerf
2020-02-07 21:30:54 +00:00
Robert Marsh
d1d19a7446
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
...
Update test expectations
2020-02-07 12:24:05 -08:00
Asger Feldthaus
e4844bfad2
JS: Fix deprecated API usage
2020-02-07 17:17:48 +00:00
Asger Feldthaus
ad10414604
JS: Update expected output of existing test
2020-02-07 16:57:57 +00:00
Agustin Gianni
033eeab41e
cpp: Adds a member predicate to get a FunctionAccess from a Function
...
- Adds a member predicate to get a FunctionAccess from a Function
- Adds QLDoc to getACallToThisFunction.
2020-02-07 16:45:14 +01:00
Erik Krogh Kristensen
06e13cb3a1
Merge branch 'master' of git.semmle.com:Semmle/ql into FalsySanitizer
2020-02-07 16:13:02 +01:00
Erik Krogh Kristensen
c6668da02e
expand how indirectCommandArguments are found
2020-02-07 15:00:05 +01:00
Asger Feldthaus
254af4f3a8
JS: Rewrite LodashUnderscore::AnalyzedThisInBoundCallback
2020-02-07 13:58:07 +00:00
Erik Krogh Kristensen
dd9e3d2fec
expose TaintTracking::arrayFunctionTaintStep and add a step for "concat"
2020-02-07 14:57:32 +01:00
Asger Feldthaus
fea5a4331d
JS: Rewrite React::AnalyzedThisInBoundCallback
2020-02-07 13:55:42 +00:00
Asger Feldthaus
3b28bdbeed
JS: Rewrite AnalyzedThisInArrayIterationFunction
2020-02-07 13:55:36 +00:00
Asger Feldthaus
f942e69482
JS: Improve flow through partial invokes
2020-02-07 13:54:14 +00:00
Anders Schack-Mulligen
85adc3be10
Java: Add String.join as default taint step.
2020-02-07 14:43:31 +01:00
Esben Sparre Andreasen
dcdaa96570
JS: remove unused imports
2020-02-07 14:10:50 +01:00
Esben Sparre Andreasen
cb30329b3d
JS: make DynamicPropertyAccess.qll from PrototypePollutionUtility.ql
2020-02-07 13:57:52 +01:00
Calum Grant
3c8aeb946a
Merge pull request #2729 from hvitved/csharp/assignment-dataflow-node
...
C#: Add new class `AssignableDefinitionNode` to the data-flow library
2020-02-07 12:53:55 +00:00
Anders Schack-Mulligen
ee3af0a247
Java: Add String.format as default taint step.
2020-02-07 13:43:35 +01:00
Erik Krogh Kristensen
1ece6b9afe
update expected output of tests
2020-02-07 12:57:51 +01:00
semmle-qlci
125c6a071c
Merge pull request #2787 from asger-semmle/js/lazy-cache-test-case
...
Approved by esbena
2020-02-07 11:53:04 +00:00
Arthur Baars
c91815f44d
Remove trailing ; in QL language spec
2020-02-07 12:47:14 +01:00
Arthur Baars
c431d47481
Fix typos in QL language spec
2020-02-07 12:46:41 +01:00
Esben Sparre Andreasen
736ccb98c2
JS: model the send library for js/path-injection
2020-02-07 12:45:32 +01:00
Shati Patel
4cbf7d2a6d
Merge pull request #2789 from jf205/codeql-178
...
QL language handbook: add link to information about module resolution in QL spec
2020-02-07 12:27:02 +01:00
Tom Hvitved
f30a42ce26
Data flow: Fix bad join-order in TPathNodeSink
...
Avoids a Cartesian product on nodes:
```
[2020-02-07 11:01:22] (432s) Tuple counts for dom#DataFlowImpl::TPathNodeSink#ff:
0 ~0% {2} r1 = JOIN DataFlowImpl::Configuration::isSource_dispred#ff AS L WITH DataFlowImpl::Configuration::isSink_dispred#ff AS R ON FIRST 2 OUTPUT R.<1>, R.<0>
101611 ~0% {2} r2 = SCAN DataFlowImpl::PathNodeMid#class#ffffff AS I OUTPUT I.<5>, I.<0>
3534537047 ~3% {3} r3 = JOIN r2 WITH DataFlowImpl::Configuration::isSink_dispred#ff AS R ON FIRST 1 OUTPUT r2.<1>, R.<1>, R.<0>
251 ~41% {3} r4 = JOIN r3 WITH project#DataFlowImpl::pathStep#fffff AS R ON FIRST 2 OUTPUT R.<2>, r3.<2>, r3.<1>
251 ~50% {2} r5 = JOIN r4 WITH DataFlowImpl::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r4.<2>, r4.<1>
251 ~50% {2} r6 = r1 \/ r5
323 ~67% {3} r7 = JOIN r6 WITH DataFlowImpl::flow#ff AS R ON FIRST 1 OUTPUT r6.<1>, r6.<0>, R.<1>
288 ~58% {3} r8 = SELECT r7 ON r7.<2> >= r7.<0>
251 ~53% {3} r9 = SELECT r8 ON r8.<2> <= r8.<0>
251 ~50% {2} r10 = SCAN r9 OUTPUT r9.<1>, r9.<0>
```
2020-02-07 12:08:31 +01:00
Calum Grant
389e6266d9
Merge pull request #2773 from hvitved/csharp/useless-assignment-to-local-default
...
C#: Remove false positives for `cs/useless-assignment-to-local`
2020-02-07 10:37:19 +00:00
james
f2320bbe56
docs: add link to module resolution in ql spec
2020-02-07 10:26:31 +00:00
Erik Krogh Kristensen
8ea6070120
add indirect command injection sink for a concatenated array
2020-02-07 11:04:34 +01:00
Asger Feldthaus
a2fa6bb41f
JS: Add test case for lazy-cache
2020-02-07 09:50:37 +00:00
Jonas Jensen
19286bd82a
Merge pull request #2765 from MathiasVP/ir-gvn-ast-wrapper-fixup
...
C++: Make AST GVN a wrapper for IR-based GVN
2020-02-07 08:49:15 +01:00
semmle-qlci
e05dd352ad
Merge pull request #2768 from asger-semmle/js/protopol-packages
...
Approved by esbena
2020-02-07 07:21:04 +00:00
yo-h
9c3fed7550
Merge pull request #2734 from aschackmull/java/taint-postupdate
...
Java: Improve taint step modeling to use postupdate nodes.
2020-02-06 21:17:55 -05:00
Robert Marsh
dac4f0fac0
Merge pull request #2763 from jbj/ir-VariableNode
...
C++: DefaultTaintTracking perf fix for globals
2020-02-06 18:54:14 -05:00
Robert Marsh
2d3a742b7f
C++: autoformat and accept test changes
2020-02-06 13:41:00 -08:00
Robert Marsh
692207472a
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-02-06 11:42:30 -08:00
Tom Hvitved
b3af3ad12f
Data flow: Fix bad join order in getReturnPosition()
...
Joining on the enclosing callable before the kind is crucial, as witnessed by this pipeline:
```
[2020-02-06 17:58:21] (1086s) Starting to evaluate predicate DataFlowImplCommon::getReturnPosition#ff/2@83c546
[2020-02-06 18:53:16] (4382s) Tuple counts for DataFlowImplCommon::getReturnPosition#ff:
385478 ~1% {3} r1 = SCAN DataFlowImplCommon::Cached::TReturnPosition0#fff@staged_ext AS I OUTPUT I.<2>, I.<0>, I.<1>
385478 ~2% {3} r2 = JOIN r1 WITH DataFlowImplCommon::Cached::TReturnPosition0#fff_2#join_rhs AS R ON FIRST 1 OUTPUT r1.<2>, r1.<1>, r1.<0>
58638116860 ~0% {3} r3 = JOIN r2 WITH DataFlowImplCommon::ReturnNodeExt::getKind_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r2.<1>, r2.<2>
914049 ~0% {2} r4 = JOIN r3 WITH DataFlowImplCommon::returnNodeGetEnclosingCallable#ff AS R ON FIRST 2 OUTPUT r3.<0>, r3.<2>
return r4
```
2020-02-06 19:06:40 +01:00
Mathias Vorreiter Pedersen
538c2b205d
C++: Accept output
2020-02-06 18:44:08 +01:00
Asger Feldthaus
91a5385e7f
JS: Add libraries to change note
2020-02-06 14:59:52 +00:00
Asger Feldthaus
a628f787e8
JS: Fix qldoc comment
2020-02-06 14:59:52 +00:00
Asger Feldthaus
f84af74d1d
JS: Handle more libraries
2020-02-06 14:59:52 +00:00
Asger Feldthaus
c559ab13e7
JS: Add test and handle parameter with source object
2020-02-06 14:59:52 +00:00
Asger Feldthaus
34a9dce33d
JS: Detect property enumeration through for-own
2020-02-06 14:59:52 +00:00
Asger Feldthaus
418f841749
JS: Handle imports through lazy-cache
2020-02-06 14:59:52 +00:00
semmle-qlci
180e9d4731
Merge pull request #2779 from asger-semmle/js/protopol-regression-fix
...
Approved by esbena
2020-02-06 14:58:19 +00:00
Mathias Vorreiter Pedersen
2017ca8154
C++/C#: Sync identical files
2020-02-06 15:53:23 +01:00
Mathias Vorreiter Pedersen
f02513e376
C++: Exclude UnknownLocation results from getLocation if there is a location that's known
2020-02-06 15:53:22 +01:00
Mathias Vorreiter Pedersen
23ca363b87
C++: Formatting
2020-02-06 15:53:22 +01:00
Mathias Vorreiter Pedersen
98969e3bf9
C++: Accepted ir_gvn output after toString change
2020-02-06 15:53:22 +01:00
Erik Krogh Kristensen
75f23a189d
update docstring
...
Co-Authored-By: Asger F <asgerf@github.com >
2020-02-06 15:53:03 +01:00
Mathias Vorreiter Pedersen
0d181a7101
C++: Add tests and accept output
2020-02-06 15:48:08 +01:00
Erik Krogh Kristensen
2865723059
add test for new barrier
2020-02-06 15:44:33 +01:00
Erik Krogh Kristensen
ade93e66e1
move the if(!x) from DataFLow to TaintTracking
2020-02-06 15:44:22 +01:00
Mathias Vorreiter Pedersen
69e085dda7
C++: Add getDebugString predicate and use it in ValueNumberPropertyProvider
2020-02-06 15:43:57 +01:00
Mathias Vorreiter Pedersen
ef89e3bdb5
C++: Added charpred to ensure that only instructions that have a source representation have a GVN
2020-02-06 15:43:57 +01:00
Mathias Vorreiter Pedersen
63f1d3ded7
C++: Replace rank[1] with min
2020-02-06 15:43:57 +01:00
Mathias Vorreiter Pedersen
2303dac0b7
C++: Implemented getKind to new GVN class and added predicates for obtaining expressions from a GVN
2020-02-06 15:43:57 +01:00
Mathias Vorreiter Pedersen
8041804bac
C#: Include TValueNumber in internal files
2020-02-06 15:39:27 +01:00
Robert Marsh
2f91778e7e
C++: add IR-based wrapper for value numbering
2020-02-06 15:35:20 +01:00
Robert Marsh
ffaaed0550
C++: separate IR ValueNumber newtype and interface
2020-02-06 15:35:20 +01:00
Asger Feldthaus
75c008eec1
JS: Change note
2020-02-06 14:33:20 +00:00
Asger Feldthaus
7090124a1d
JS: Implement type inference through export * as ns
2020-02-06 14:29:35 +00:00
Asger Feldthaus
a252a41459
JS: Rename/deprecate a predicate to loosen its return type
2020-02-06 14:27:23 +00:00
Asger Feldthaus
2b77c7969d
JS: Add tests for 'export * as ns'
2020-02-06 14:04:12 +00:00
Asger Feldthaus
f5c805bad1
JS: Move tests into one file
2020-02-06 13:55:29 +00:00
Asger Feldthaus
54c521d41c
JS: Fix typo in test query
2020-02-06 13:50:06 +00:00
Rasmus Wriedt Larsen
c0b7dcc019
Python: Remove ignored automatic_locations in qltest options files
2020-02-06 14:28:10 +01:00
Rasmus Wriedt Larsen
397c17c4ff
Python: Use --lang=3 in tests
...
With internal update to qltest it will not actually do something.
- also remove it from the tests that never needed it.
2020-02-06 14:20:59 +01:00
Jonas Jensen
4997aa7428
Merge pull request #2772 from MathiasVP/more-gvn-loads
...
C++: Better value numbering support for loading fields in IR
2020-02-06 14:15:27 +01:00
Rasmus Wriedt Larsen
cb891a1a49
Python: Clean up six tests
...
We can't understand the real `six.py` file, so we have some internal plumbing
that enables us to handle six anyway. While updating that, I had a hell of a lot
of trouble with these tests.
What we actually want, is to see that we can understand what the values imported
from six are (i.e., their points-to information). I added a few more, that I
think would be useful. If we can figure out all of these, I don't actually care
if we're doing it by understanding the real `six.py` file, or by some internal
trick.
I verified that we don't get results with the real `six.py` file by disabling
our internal tricks, and putting a copy of six.py just next to test.py.
We used to have an other file that would list all the properties we knew and
their value, but that turned out to be a fragile and annoying test, since the
results differed from which version of python you ran it with (3.5 vs 3.8) and
which machine you ran it on (my machien vs jenkins). I don't care about the
results in this file, and I can certainly not eyeball it to see if it's correct
or not.
2020-02-06 13:50:51 +01:00
Jonas Jensen
2e883ab4b2
Merge pull request #2760 from geoffw0/defaulttainttest3
...
C++: Emulate old security library's use of predictable more accurately.
2020-02-06 13:47:27 +01:00
semmle-qlci
75bdf42850
Merge pull request #2770 from asger-semmle/js/update-extractor-version-string
...
Approved by erik-krogh
2020-02-06 12:41:46 +00:00
Erik Krogh Kristensen
1f7dda7fbc
add dataflow barrier for if(xrandr)
2020-02-06 12:55:44 +01:00
Anders Schack-Mulligen
aa8ebf4fe1
Merge pull request #2764 from JLLeitschuh/patch-1
...
Add DefaultFullHttpResponse to Netty Check
2020-02-06 12:19:04 +01:00
Asger Feldthaus
0345c48503
JS: Bump extractor version string
2020-02-06 11:04:59 +00:00
Mathias Vorreiter Pedersen
19e1d82708
Merge pull request #2686 from jbj/ir-crement-load
...
C++: Move the LoadInstruction from `++` to `e` in `e++`.
2020-02-06 11:53:55 +01:00
Rasmus Wriedt Larsen
d5c6092920
Python: Fix typo (trakcing => tracking)
2020-02-06 11:50:44 +01:00
Asger Feldthaus
38ef07ce73
JS: Fix join ordering
2020-02-06 10:29:05 +00:00
Mathias Vorreiter Pedersen
aaa6233a99
C++/C#: Sync identical files
2020-02-06 11:24:07 +01:00
Mathias Vorreiter Pedersen
527181bb6f
C++: Rename CongruentCopyInstructionTotal to LoadTotalOverlapInstruction and extend LoadInstruction instead of CopyInstruction
2020-02-06 11:23:42 +01:00
Geoffrey White
2dfeafac30
C++: Interaction with another PR.
2020-02-06 10:21:55 +00:00
semmle-qlci
90f94e2e54
Merge pull request #2777 from erik-krogh/TaintedPathTests
...
Approved by esbena
2020-02-06 10:18:24 +00:00
Geoffrey White
851c1134f3
C++: Add 'strlen' back.
2020-02-06 10:17:37 +00:00
Geoffrey White
860d0aa42f
C++: Remove single argument functions.
2020-02-06 10:17:37 +00:00
Geoffrey White
539d6716f5
C++: Remove commented entries.
2020-02-06 10:17:37 +00:00
Geoffrey White
d54d7e8410
C++: Post-merge fix.
2020-02-06 10:17:37 +00:00
Geoffrey White
2fddb09a30
C++: New autoformat.
2020-02-06 10:17:37 +00:00
Geoffrey White
95c77ca3c6
C++: Update comment.
2020-02-06 10:17:37 +00:00
Geoffrey White
9c05ffeb3a
C++: Emulate old security library's use of predictable more accurately.
2020-02-06 10:17:37 +00:00
Anders Schack-Mulligen
75f7671e75
Java: Fix .expected
2020-02-06 10:27:44 +01:00
Mathias Vorreiter Pedersen
f4bbdee6c2
Merge pull request #2745 from Cornelius-Riemenschneider/cpp-range-analysis
...
C++: Fix bug in range analysis.
2020-02-06 10:10:06 +01:00
Erik Krogh Kristensen
d8a30c48a3
update expected output of TaintedPath tests
2020-02-06 09:47:15 +01:00
Mathias Vorreiter Pedersen
ba395cf11a
C++: Update test annotations and accept output
2020-02-06 09:26:33 +01:00
Mathias Vorreiter Pedersen
cfcf087d3c
C++: Add comment explaining buggy value number
2020-02-06 09:26:33 +01:00
Mathias Vorreiter Pedersen
4f2775012a
C++/C#: Sync identical files
2020-02-06 09:26:33 +01:00
Mathias Vorreiter Pedersen
5e5bd92cba
C++: Accept output
2020-02-06 09:26:33 +01:00
Mathias Vorreiter Pedersen
54f0b4a099
C++: Add more support for load instructions
2020-02-06 09:21:42 +01:00
Mathias Vorreiter Pedersen
687dcb7ad1
C++: Add testcase demonstrating unexpectly different value numbers
2020-02-06 09:21:42 +01:00
Jonas Jensen
91927c9039
Merge remote-tracking branch 'upstream/master' into ir-crement-load
...
Conflicts:
cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir.expected
cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir_unsound.expected
cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir.expected
cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir_unsound.expected
2020-02-06 08:37:09 +01:00
Jonas Jensen
c0417ac161
Merge pull request #2740 from dbartol/dbartol/InitializeNonLocal
...
C++: Prevent `AliasedVirtualVariable` from overlapping string literals
2020-02-06 08:28:01 +01:00
semmle-qlci
5125dc7939
Merge pull request #2730 from esbena/js/model-path-parse
...
Approved by asgerf
2020-02-05 21:35:55 +00:00
Dave Bartolomeo
e06f468b59
C++: Fix test expectations after EDG update
2020-02-05 14:34:29 -07:00
Cornelius Riemenschneider
7f7cc7bece
Include test output for the fixed test.
2020-02-05 22:33:26 +01:00
Cornelius Riemenschneider
c941348fea
Fix test so it actually shows up in the test output.
2020-02-05 22:29:44 +01:00
Dave Bartolomeo
c53f80175f
Merge pull request #2750 from Cornelius-Riemenschneider/cpp-range-analysis-casts
...
C++: Support implicit casts better in range analysis
2020-02-05 13:59:09 -07:00
Jonas Jensen
81b1bd4177
Merge pull request #2769 from aschackmull/java/perf-regression
...
Java: Improve performance.
2020-02-05 20:15:18 +01:00
Tom Hvitved
69d9d4122a
C#: Add change note
2020-02-05 20:12:41 +01:00
Tom Hvitved
85e6b24c49
C#: Remove false positives for cs/useless-assignment-to-local
2020-02-05 20:12:39 +01:00
Tom Hvitved
d9f9fc510f
C#: Add more tests for cs/useless-assignment-to-local
2020-02-05 20:11:22 +01:00
Dave Bartolomeo
4c31c038b8
Merge from master
2020-02-05 11:23:14 -07:00
Dave Bartolomeo
4362bdb626
C++: Accept new test output
2020-02-05 10:56:40 -07:00
Dave Bartolomeo
1b6de4b32f
C++: Fix formatting
2020-02-05 10:55:49 -07:00
Jonathan Leitschuh
60f2fa9eb9
Update java/ql/src/Security/CWE/CWE-113/NettyResponseSplitting.ql
2020-02-05 12:45:47 -05:00
Jonas Jensen
a0e2d59c01
C++: Add tests for global-var support
2020-02-05 16:31:13 +01:00
Jonas Jensen
f40acc19d2
C++: Use VariableNode in DefaultTaintTracking
2020-02-05 16:29:13 +01:00
Jonas Jensen
6d081a997a
C++: Add VariableNode
2020-02-05 16:29:13 +01:00
Jonas Jensen
73e34f1447
C++: Refactor to separate out InstructionNode
...
This commit prepares the IR data-flow library for having more than one
type of data-flow node.
2020-02-05 16:29:13 +01:00
Jonas Jensen
cdfcee3ae9
Merge remote-tracking branch 'upstream/master' into ir-crement-load
...
Conflicts:
cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir.expected
cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir_unsound.expected
2020-02-05 16:13:21 +01:00
Anders Schack-Mulligen
ba86dea657
Java: Improve taint step modeling to use postupdate nodes.
2020-02-05 15:33:29 +01:00
Anders Schack-Mulligen
07482abed7
Java/C++/C#: Sync.
2020-02-05 15:17:20 +01:00
Anders Schack-Mulligen
274919ca08
Java: Fix recent perf regressions.
2020-02-05 15:15:15 +01:00
yo-h
b5f3d776bf
Merge pull request #2759 from aschackmull/java/taint-tests
...
Java: Move some taint tests.
2020-02-05 09:09:43 -05:00
semmle-qlci
163285bee7
Merge pull request #2735 from asger-semmle/prototype-pollution-manual-dataflow
...
Approved by esbena
2020-02-05 12:52:59 +00:00
Ian Lynagh
67d7e83c17
Merge pull request #2727 from matt-gretton-dann/codeql-c-extractor/7-edg-60-upgrade
...
Update expected results for changes in Extractor FE
2020-02-05 12:23:02 +00:00
Erik Krogh Kristensen
da28d3b971
add "hash" and "search" to URL taint step
2020-02-05 12:44:10 +01:00
Felicity Chapman
d0e7bfce28
Merge pull request #2738 from aschackmull/java/ldapinjection-changenote
...
Java: Add change note for LDAP injection query.
2020-02-05 11:29:29 +00:00
semmle-qlci
a5e183bde3
Merge pull request #2619 from asger-semmle/ts-monorepo-deps
...
Approved by erik-krogh, max-schaefer
2020-02-05 10:57:55 +00:00
semmle-qlci
53763c789f
Merge pull request #2741 from esbena/js/split-and-slice-for-tainted-path
...
Approved by erik-krogh
2020-02-05 10:53:39 +00:00
Jonas Jensen
2928f9e5b2
Merge pull request #2703 from rdmarsh2/connect-ir-dataflow-models
...
C++: IR dataflow through modeled functions
2020-02-05 11:28:48 +01:00
semmle-qlci
52f34d7178
Merge pull request #2715 from erik-krogh/PrivateFields
...
Approved by asgerf
2020-02-05 10:20:28 +00:00
Erik Krogh Kristensen
88bb1dc23d
bind this in each of the step methods of UrlSearchParamsTaintStep
2020-02-05 10:58:13 +01:00
Erik Krogh Kristensen
30d5eb5a13
update docstrings
2020-02-05 10:53:34 +01:00
Erik Krogh Kristensen
ffc6fddddd
update expected test output
2020-02-05 10:52:40 +01:00
Asger F
cf18bd7bb8
Update javascript/ql/src/Security/CWE-400/PrototypePollutionUtility.ql
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-02-05 09:48:16 +00:00
Asger Feldthaus
fd9975db85
JS: Address comments
2020-02-05 09:47:51 +00:00
Esben Sparre Andreasen
f6ad22dd1f
Merge pull request #2758 from asger-semmle/js/string-concat-concat
...
JS: Model concat() calls as string concatenation
2020-02-05 10:41:02 +01:00
Erik Krogh Kristensen
ec9c37075c
address review feedback
2020-02-05 10:31:53 +01:00
Erik Krogh Kristensen
35a7e15a2f
remove private modifer on isUrlSearchParams
2020-02-05 10:30:31 +01:00
Erik Krogh Kristensen
76aca02752
change the pseudo-property on URL to a two-stage process
2020-02-05 10:27:03 +01:00
Matthew Gretton-Dann
b601908577
CPP: Update for changes in EDG IL.
2020-02-05 09:11:23 +00:00
Matthew Gretton-Dann
1b67f47918
C++: Update with improved location information
...
EDG 6.0 gives better location in some circumstances changing the results
of these tests for the better.
2020-02-05 09:11:23 +00:00
Matthew Gretton-Dann
cec6646846
C++: Update for EDG 6.0 behaviour change
...
EDG 6.0 has changed how much information it gives about invalid
expressions. Changing the output of this test.
2020-02-05 09:11:23 +00:00
Erik Krogh Kristensen
e525cf0959
generalize isAdditionalLoadStoreStep such that it loads and stores different properties
2020-02-05 09:40:16 +01:00
Anders Schack-Mulligen
7d19eb7c05
Java: Add LICENSE.txt
2020-02-05 09:38:16 +01:00
Dave Bartolomeo
73ad2e9658
Merge from master
2020-02-04 18:33:10 -07:00
Dave Bartolomeo
a23d5afc6c
C++: Add test case to demonstrate string literl aliasing change
...
Also fixed a minor bug where we should have been treating `AllNonLocalMemory` as _totally_ overlapping an access to a non-local variable, rather than _partially_ overlapping it. This fix is exhibited both in the new test case and in a couple existing test functions in `ssa.cpp`.
2020-02-04 18:24:08 -07:00
Jonathan Leitschuh
832a4f2e07
Add DefaultFullHttpResponse to Netty Check
2020-02-04 15:40:59 -05:00
Robert Marsh
1576bcfa3f
C++: remove unused predicates
2020-02-04 12:08:03 -08:00
Jonas Jensen
c77a921b06
Merge pull request #2695 from rdmarsh2/default-taint-tracking-diff-test
...
C++: add diff tests for DefaultTaintTracking
2020-02-04 20:57:55 +01:00
Robert Marsh
ac2e89317b
C++: autoformat
2020-02-04 10:41:30 -08:00
Robert Marsh
861d5eb86b
C++: update tests after merge
2020-02-04 10:29:52 -08:00
Robert Marsh
785d54ac67
Merge branch 'master' into default-taint-tracking-diff-test
2020-02-04 09:50:05 -08:00
Asger Feldthaus
b4df03767d
JS: Ignore obvious Array.prototype.concat calls
2020-02-04 16:36:41 +00:00
Asger Feldthaus
db2212e33e
TS: Only print number of errors if there were any
2020-02-04 15:31:30 +00:00
Erik Krogh Kristensen
8d37c03209
using pseudo-properties to model URL parsing
2020-02-04 16:30:07 +01:00
Anders Schack-Mulligen
cf815351a9
Java: Elaborate change note.
2020-02-04 16:18:35 +01:00
Asger Feldthaus
3ccdaa94ad
JS: Expose argumentPassing as DataFlow::argumentPassingStep
2020-02-04 15:06:45 +00:00
Asger Feldthaus
c185cededf
JS: More pruning and more data flow
2020-02-04 15:06:42 +00:00
Tom Hvitved
6e14ba4e56
C++: Follow-up changes
2020-02-04 14:09:12 +01:00
Tom Hvitved
15ee1e37b9
Java: Follow-up changes
2020-02-04 14:09:12 +01:00
Tom Hvitved
c591719df2
Data flow: Sync files
2020-02-04 14:09:12 +01:00
Tom Hvitved
7678cb0349
C#: Remove Public wrapper module from DataFlowImplCommon.qll
2020-02-04 14:09:12 +01:00
Tom Hvitved
fed6dd5324
C#: Generalize data-flow flow-through summaries
...
The predicate
```
argumentValueFlowsThrough(ArgumentNode arg, OutNode out, CallContext cc)
```
has been generalized to
```
argumentValueFlowsThrough(
DataFlowCall call, ArgumentNode arg, Node out, ContentOption contentIn,
ContentOption contentOut
)
```
This enables us to summarize normal flow-through (as before), getters, setters,
as well as getter-setters.
2020-02-04 14:09:12 +01:00
semmle-qlci
4b89eee683
Merge pull request #2757 from max-schaefer/js/resolveMainModule-extensions
...
Approved by asgerf
2020-02-04 13:07:08 +00:00
Erik Krogh Kristensen
15e26666cd
add declaration for private field in syntax error test
2020-02-04 14:05:09 +01:00
Rasmus Wriedt Larsen
de63eb1450
Merge pull request #2592 from tausbn/python-remove-manual-tc-in-ssashortcut
...
Python: Remove manual TC from `ssaShortCut`.
2020-02-04 14:04:25 +01:00
Anders Schack-Mulligen
2b1723dd88
Java: Move some taint tests.
2020-02-04 13:21:31 +01:00
Tom Hvitved
00fdc70155
Merge pull request #2710 from calumgrant/cs/short-circuit-out
...
C#: Remove false positive in cs/non-short-circuit
2020-02-04 12:09:17 +01:00
Mathias Vorreiter Pedersen
0276c97b9c
Merge pull request #2755 from jbj/BarrierGuard-SSA
...
C++: Don't use GVN in AST DataFlow BarrierNode
2020-02-04 12:00:12 +01:00
Rasmus Wriedt Larsen
c1d073a54d
Python: Add test-cases for py/hardcoded-credentials
2020-02-04 11:42:11 +01:00
Rasmus Wriedt Larsen
2837f987c5
Python: Show how pointsTo handles 0+0 == 0 (2/2)
2020-02-04 11:42:11 +01:00
Rasmus Wriedt Larsen
4231bb1bcf
Python: Show how pointsTo handles 0+0 == 0 (1/2)
2020-02-04 11:42:11 +01:00
Rasmus Wriedt Larsen
6b5b28aded
Python: Add Value.getABooleanValue and Value.getDefiniteBooleanValue
...
Replacing `Value.booleanValue`. We wanted to match `Object.booleanValue` that
only gives a result if it is either `true` or `false`, but also wanted to keep
the flexibility to see if the Value _could_ be `true`/`false`. We don't have a
motivating usecase, so let's see if we ever need it :P
+ fix modernisation regression on py/jinja2/autoescape-false
2020-02-04 11:42:11 +01:00
Rasmus Wriedt Larsen
bd1f21fb7a
Python: Fix modernisation regression on py/weak-crypto-key
...
also fixes test code to use the right argument name
2020-02-04 11:42:11 +01:00
Rasmus Wriedt Larsen
e5abfd0196
Python: Modernise Security/ queries
2020-02-04 11:42:11 +01:00
Rasmus Wriedt Larsen
2802ac2e72
Python: Add NumericValue
...
Since `IntObjectInternal` extends `TInt`, and `TInt` is defined for all
instances of `Builtin.intValue`, and `Builtin.intValue` includes both `int` and
`long`, we don't need to handles Longs in a special manner, as we did in NumericObject.
2020-02-04 11:39:16 +01:00
Asger Feldthaus
bf2c944b4f
JS: Model concat() calls as string concatenation
2020-02-04 10:20:37 +00:00
Esben Sparre Andreasen
1ec8fa24b3
JS: reformulate optimization
2020-02-04 10:52:38 +01:00
Esben Sparre Andreasen
8a2c81b41c
JS: address review comments about duplicated logic
2020-02-04 10:49:23 +01:00
Max Schaefer
43e4ed1e18
JavaScript: Teach resolveMainModule to try adding extensions.
2020-02-04 09:39:04 +00:00
Max Schaefer
e21c24c60e
JavaScript: Add failing test case.
2020-02-04 09:39:04 +00:00
Esben Sparre Andreasen
e1180495f5
JS: optimize a prefix-check
2020-02-04 09:48:56 +01:00
semmle-qlci
bd51ef35b7
Merge pull request #2731 from erik-krogh/CVE527
...
Approved by esbena
2020-02-04 08:38:26 +00:00
Jonas Jensen
b4385c6e60
C++: Don't use GVN in AST DataFlow BarrierNode
...
It turns out that the evaluator will evaluate the GVN stage even when no
predicate from it is needed after optimization of the subsequent stages.
The GVN library is expensive to evaluate, and it'll become even more
expensive when we switch its implementation to IR.
This PR disables the use of GVN in `DataFlow::BarrierNode` for the AST
data-flow library, which should improve performance when evaluating a
single data-flow query on a snapshot with no cache. Precision decreases
slightly, leading to a new FP in the qltests.
There is no corresponding change for the IR data-flow library since IR
GVN is not very expensive.
2020-02-04 08:40:36 +01:00
Robert Marsh
eafd7b6045
C++: accept test output
2020-02-03 15:27:34 -08:00
Robert Marsh
677f0f090a
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-02-03 13:06:35 -08:00
Robert Marsh
931c0e982e
Merge pull request #2748 from MathiasVP/value-numbering-indirection
...
C++: Indirection for ValueNumbering
2020-02-03 14:41:58 -05:00
Robert Marsh
f51841ac37
Merge pull request #2736 from jbj/buffer-type-size
...
C++: Workaround for problem with memcpy flow
2020-02-03 14:31:28 -05:00
Robert Marsh
3bfcf0bf46
Merge branch 'master' into connect-ir-dataflow-models
2020-02-03 11:06:45 -08:00
Cornelius Riemenschneider
36479d3fd6
Support to keep bounds derived on implicit integer casts.
2020-02-03 17:33:06 +01:00
Cornelius Riemenschneider
cf8efbb5a0
Add testcase.
2020-02-03 17:23:24 +01:00
Robert Marsh
2b10cd6228
Merge pull request #2737 from jbj/DefaultTaintTracking-indirect-parameters
...
C++: Interprocedural indirections in DefaultTaintTracking.qll
2020-02-03 11:12:38 -05:00
Esben Sparre Andreasen
bbd60f52ba
JS: add additional flow steps to js/path-injection
2020-02-03 16:36:25 +01:00
Mathias Vorreiter Pedersen
8aae2990d0
C++: Formatting
2020-02-03 16:15:49 +01:00
Mathias Vorreiter Pedersen
a8b3bcb87d
C++: Indirection for value numbering
2020-02-03 16:13:32 +01:00
Erik Krogh Kristensen
e3189aaa47
raise syntax error on declaration of private method, and add syntax tests for private fields
2020-02-03 16:00:25 +01:00
semmle-qlci
3a7845e7fc
Merge pull request #2653 from erik-krogh/exceptionFPs
...
Approved by esbena
2020-02-03 14:15:24 +00:00
Rasmus Wriedt Larsen
d30e6d2b69
Python: Value::forString and friends returns StringValue
2020-02-03 14:35:09 +01:00
Rasmus Wriedt Larsen
27a7d09c94
Python: Fix minor problems in security examples
2020-02-03 14:35:09 +01:00
Rasmus Wriedt Larsen
5bc592514a
Python: Consistenly use "a user-provided value"
...
ReflectedXss was the only query that used it with the "a"
2020-02-03 14:35:09 +01:00
Erik Krogh Kristensen
183dd68d6a
add qldoc to isPrivateField
2020-02-03 14:23:27 +01:00
Cornelius Riemenschneider
1b68f86d5b
Fix bug in CPP range analysis.
2020-02-03 14:16:48 +01:00
Rasmus Wriedt Larsen
cc73352bf6
Merge pull request #2549 from tausbn/python-fix-several-bad-join-orders
...
Python: Fix several bad join orders.
2020-02-03 13:54:36 +01:00
Calum Grant
be374816c4
C#: Distinguish between local variables extracted in different compilations.
2020-02-03 12:22:49 +00:00
Erik Krogh Kristensen
99d8b48da0
Merge pull request #2712 from asger-semmle/typescript-resolve-imports
...
TS: Resolve imports using TypeScript
2020-02-03 12:42:17 +01:00
Asger Feldthaus
3c1cbcefa5
TS: Pass virtual source root explicitly to Node.js process
2020-02-03 10:36:36 +00:00
Asger Feldthaus
513854a608
TS: Add upgrade script
2020-02-03 09:32:56 +00:00
Asger Feldthaus
9abf5f06e6
TS: Resolve imports using TypeScript symbols
2020-02-03 09:32:56 +00:00
Asger Feldthaus
abb95135c1
JS: Add UnresolvableImport metric
2020-02-03 09:32:56 +00:00
Erik Krogh Kristensen
5ff958a9cf
fix compilation of PrototypePollutionUtility after refactor
2020-02-03 09:39:41 +01:00
Dave Bartolomeo
fd2cafa95f
C++: Accept GVN test output
2020-01-31 13:36:14 -07:00
Jonas Jensen
e2da98ae24
C++: Accept autoformat and test changes
2020-01-31 20:58:53 +01:00
Robert Marsh
3e2b0328b7
C++: update test expectations post-merge
2020-01-31 11:48:51 -08:00
Robert Marsh
089dda9090
Merge branch 'buffer-type-size-test' into jbj/buffer-type-size
2020-01-31 11:31:55 -08:00
Robert Marsh
2dd368fd1f
C++: add SSA test for void* buffer parameters
2020-01-31 11:31:28 -08:00
Dave Bartolomeo
e27a0fe504
C++: Prevent AliasedVirtualVariable from overlapping string literals
...
We were hitting a combinatorial explosion in `hasDefinitionAtRank` for functions that contain a large number of string literals. The problem was that every `Chi` instruction for `AliasedVirtualVariable` was treated as a definition of every string literal. We already mark string literals as `isReadOnly()`, but we were allowing `AliasedVirtualVariable` to define read-only locations so that the `AliasedDefinition` instruction would provide the initial definition for all string literals.
To fix this, I've introduced the new `InitializeNonLocal` instruction, which is inserted in the prologue of every function right after `AliasedDefinition`. It provides the initial definition for every non-stack memory location, including read-only locations, but is never written to anywhere else. It is the conterpart of the `AliasedUse` instruction in the function epilogue, which represents the use of all non-stack memory after the function returns. I considered renaming `AliasedUse` to `ReturnNonLocal`, to match the `InitializeXXX`/`ReturnXXX` pattern we already use for parameters and indirections, but held off to avoid unnecessary churn. Any thoughts on whether I should make this name change?
This change has a significant speedup in evaluation time for a few of our troublesome databases:
`attnam/ivan`: 13%
`awslabs/s2n`: 26%
`SinaMostafanejad/OpenRDM`: 7%
`zcoinofficial/zcoin`: 8%
2020-01-31 11:33:46 -07:00
Esben Sparre Andreasen
7f25c1bf47
JS: address doc-review comments
2020-01-31 19:33:04 +01:00
Esben Sparre Andreasen
c70997febf
JS: address review comments for js/unsafe-jquery-plugin
2020-01-31 19:33:04 +01:00
Esben Sparre Andreasen
eaff78b37e
JS: change severity to warning
2020-01-31 19:33:04 +01:00
Esben Sparre Andreasen
1de1c15919
JS: minor fixups
2020-01-31 19:33:04 +01:00
Esben Sparre Andreasen
2ad9b843ae
JS: fix FP for js/unsafe-jquery-plugin
2020-01-31 19:33:04 +01:00
Esben Sparre Andreasen
cfd567f01d
JS: fix FP for js/unsafe-jquery-plugin
2020-01-31 19:33:04 +01:00
Esben Sparre Andreasen
9e247921fc
JS: add FP tests for js/unsafe-jquery-plugin
2020-01-31 19:33:04 +01:00
Esben Sparre Andreasen
fef918ac13
JS: add query "Unsafe jQuery plugin"
2020-01-31 19:33:04 +01:00
semmle-qlci
d995d5a4a0
Merge pull request #2716 from esbena/js/additional-koa-requests
...
Approved by erik-krogh
2020-01-31 18:30:42 +00:00
Anders Schack-Mulligen
7647d94068
Java: Add change note for LDAP injection query.
2020-01-31 16:48:35 +01:00
Anders Schack-Mulligen
3b81c3b95c
Merge pull request #2651 from ggolawski/java-ldap-injection
...
Java LDAP Injection (CWE-90)
2020-01-31 16:43:52 +01:00
Geoffrey White
c24651c4f8
Merge pull request #2728 from alexet/remove-recursion
...
CPP: Avoid uncessary recursion in printf.qll
2020-01-31 15:38:25 +00:00
Jonas Jensen
83f807f182
C++: Interprocedural indirection taint tracking
...
As a temporary workaround in the `DefaultTaintTracking` library, we
funnel flow across calls by conflating pointer and object both at the
caller and the callee.
The three cases in `adjustedSink` were deleted because they are now
covered by the one case for `ReadSideEffectInstruction` in
`instructionTaintStep`.
When enabling `DefaultTaintTracking`, this commit on top of #2736 has
the effect effect of recovering two lost results:
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/OverflowDestination.expected
+++ b/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/OverflowDestination.expected
@@ -1,2 +1,4 @@
| overflowdestination.cpp:30:2:30:8 | call to strncpy | To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size. |
| overflowdestination.cpp:46:2:46:7 | call to memcpy | To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size. |
+| overflowdestination.cpp:53:2:53:7 | call to memcpy | To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size. |
+| overflowdestination.cpp:64:2:64:7 | call to memcpy | To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size. |
In the internal repo, we recover one lost result. Additionally, there
are two queries that gain an extra source for an existing sink. I'll
classify that as noise. The new results look like this:
foo(argv); // this `argv` is a new source for the sink in `bar`
bar(argv); // this `argv` is the existing source for the sink in `bar`
2020-01-31 16:28:45 +01:00
Jonas Jensen
a1aed1ad93
C++: Workaround for problem with memcpy flow
...
The type of the source argument to `memcpy` is `void *`, and somehow
that meant that the copied object itself got type `void`. Since that has
size 0, the SSA construction did not model it as reading from the last
write.
This is probably not the right fix, but maybe it's good enough for now.
The right fix would ensure that the type reported by
`hasOperandMemoryAccess` is `UnknownType`.
When `DefaultTaintTracking.qll` is enabled, this commit has the effect
of restoring a lost results:
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/OverflowDestination.expected
+++ b/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/OverflowDestination.expected
@@ -1 +1,2 @@
| overflowdestination.cpp:30:2:30:8 | call to strncpy | To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size. |
+| overflowdestination.cpp:46:2:46:7 | call to memcpy | To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size. |
2020-01-31 16:04:43 +01:00
Erik Krogh Kristensen
84be6e1286
update docString on getAnAliasedSourceNode
2020-01-31 15:38:19 +01:00
Erik Krogh Kristensen
32bcb18cdf
add pragma[inline] to getAnAliasedSourceNode
2020-01-31 15:35:38 +01:00
Erik Krogh Kristensen
72114a48f5
rename getASourceAccess to getAnAliasedSourceNode
2020-01-31 15:34:58 +01:00
Rasmus Wriedt Larsen
2648e34f1a
Python: Autoformat security
2020-01-31 14:49:18 +01:00
Tom Hvitved
c31f0e955d
C#: Add more flow-through data-flow tests
2020-01-31 13:48:08 +01:00
alexet
cd688367c7
CPP: Avoid uncessary recursion
2020-01-31 12:47:03 +00:00
Rasmus Wriedt Larsen
72fddaf5ed
Merge pull request #2733 from tausbn/python-add-stringvalue
...
Python: Extend `Value` API.
2020-01-31 13:12:14 +01:00
Erik Krogh Kristensen
e6d46b9279
add test for new prefix check on TaintedPath
2020-01-31 12:35:03 +01:00
Taus Brock-Nannestad
ba2bbf1788
Python: Extend Value API.
...
Adds
- `StringValue` as a new class,
- `Value::booleanValue` which returns the boolean interpretation of the given
value, and
- `ClassValue::str` which returns the value of the `str` class, depending on the
Python version.
2020-01-31 12:33:02 +01:00
Erik Krogh Kristensen
b6611b1fb3
add "slice" as a recognized prefix method in ClientSideUrlRedirectCustomizations.qll
2020-01-31 12:24:12 +01:00
Max Schaefer
7855a0b657
Merge pull request #2732 from aschackmull/java/upgrades-qlpack
...
Java: Add qlpack.yml in upgrades.
2020-01-31 10:53:50 +00:00
Anders Schack-Mulligen
18a8c2b220
Java: Add qlpack.yml in upgrades.
2020-01-31 11:39:46 +01:00
Erik Krogh Kristensen
279c584bb8
fix FP in js/path-injection by recognizing more prefix checks
2020-01-31 11:03:11 +01:00
semmle-qlci
f8d0b4e602
Merge pull request #2618 from erik-krogh/ExceptionalPromise
...
Approved by asgerf
2020-01-31 07:59:09 +00:00
Robert Marsh
83d611de11
C++: don't conflate pointers in data flow
2020-01-30 16:18:24 -08:00
yo-h
7ca7bdfc46
Merge pull request #2725 from aschackmull/java/sqlinjection-number-barrier
...
Java: Add java.lang.Number as a sanitizer for SQL injection.
2020-01-30 18:25:24 -05:00
yo-h
b542b08c95
Merge pull request #2726 from aschackmull/java/outputstream-write-taint
...
Java: Improve taint for OutputStream.write and InputStream.read.
2020-01-30 18:24:00 -05:00
yo-h
563be9f817
Merge pull request #2719 from aschackmull/java/deprecate-parexpr
...
Java: Deprecate ParExpr
2020-01-30 18:23:13 -05:00
Grzegorz Golawski
3fd8d9eb5c
Rename CWE-90 into CWE-090
2020-01-30 22:33:20 +01:00
Grzegorz Golawski
db55ec250a
Rename CWE-90 to CWE-090
2020-01-30 22:32:36 +01:00
ggolawski
d065ebddde
Merge pull request #3 from aschackmull/java/pr-2651-unittest
...
Java: Add unit test for ldap injection.
2020-01-30 22:23:20 +01:00
Robert Marsh
209a30688a
Merge pull request #2718 from jbj/DefaultTaintTracking-isUserInput
...
C++: Fix mapping of sources from Expr to Node
2020-01-30 16:22:48 -05:00
Esben Sparre Andreasen
5f1317fa2d
JS: model path.parse and its ponyfill package: "path-parse"
2020-01-30 21:26:18 +01:00
Esben Sparre Andreasen
5b5f52979d
JS: add uniform support for path, path.posix and path.win32
2020-01-30 21:26:18 +01:00
Tom Hvitved
fdda514a51
C#: Add new class AssignableDefinitionNode to the data-flow library
2020-01-30 20:27:57 +01:00
Robert Marsh
4617940eee
Merge branch 'master' into connect-ir-dataflow-models
2020-01-30 08:49:42 -08:00
Robert Marsh
b2a87f64eb
Merge pull request #2696 from dbartol/dbartol/Indirections
...
C++/C#: Alias analysis of indirect parameters
2020-01-30 11:43:26 -05:00
Anders Schack-Mulligen
2a0a568cbb
Java: Remove duplicate class.
2020-01-30 17:04:35 +01:00
yo-h
dd517a433a
Merge pull request #2671 from aschackmull/java/null-flow
...
Java: Allow null literals as sources in data flow.
2020-01-30 09:47:46 -05:00
Erik Krogh Kristensen
8fc273b9ec
update expected output
2020-01-30 15:19:27 +01:00
Taus
b89273402d
Merge pull request #2701 from RasmusWL/python-modernise-metrics
...
Python: modernise import related queries
2020-01-30 14:37:39 +01:00
Anders Schack-Mulligen
9bea581a23
Java: Improve taint for OutputStream.write and InputStream.read.
2020-01-30 14:29:56 +01:00
semmle-qlci
3158b8401a
Merge pull request #2705 from erik-krogh/CVE75
...
Approved by asgerf
2020-01-30 13:07:05 +00:00
semmle-qlci
120b50f497
Merge pull request #2708 from asger-semmle/js/react-flow-through-imports
...
Approved by esbena
2020-01-30 13:05:07 +00:00
Erik Krogh Kristensen
162c19c348
changes based on review
2020-01-30 14:04:04 +01:00
Asger F
b88cc50cdb
Apply suggestions from code review
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-01-30 12:42:58 +00:00
Asger Feldthaus
1bf8165098
TS: Other review comments
2020-01-30 12:41:02 +00:00
Asger Feldthaus
92dbfb2858
JS: Handle LGTM_WORKSPACE and fix emptiness check
2020-01-30 12:31:25 +00:00
Asger Feldthaus
141d4bfb70
TS: Handle multiple slashes in scope name
2020-01-30 12:28:16 +00:00
Anders Schack-Mulligen
a167577551
Java: Add java.lang.Number as a sanitizer for SQL injection.
2020-01-30 12:01:36 +01:00
Jonas Jensen
d0ac846cac
Merge pull request #2721 from aschackmull/java/taintgetter-changenote
...
Java/C++/C#: Add change note for taint-getters.
2020-01-30 11:42:37 +01:00
Jonas Jensen
148e87c61d
C++: Put AliasedSSA.qll in new qlformat style
2020-01-30 11:38:16 +01:00
Anders Schack-Mulligen
ea3d7b1b2f
Java: Adjust stubs and unit test.
2020-01-30 11:27:33 +01:00
Erik Krogh Kristensen
7637ebcc03
Merge remote-tracking branch 'upstream/master' into exceptionFPs
2020-01-30 10:56:41 +01:00
Anders Schack-Mulligen
d8b842298c
Java: Autoformat.
2020-01-30 10:54:54 +01:00
Anders Schack-Mulligen
843fd37c75
Java: Add change note.
2020-01-30 10:52:16 +01:00
Anders Schack-Mulligen
75c549baa1
Java: Deprecate ParExpr.
2020-01-30 10:52:16 +01:00
Anders Schack-Mulligen
b7a8d0e903
Apply suggestions from code review
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2020-01-30 10:41:13 +01:00
Jonas Jensen
f0f752844e
Merge remote-tracking branch 'upstream/master' into dbartol/Indirections
...
Conflicts:
cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasedSSA.qll
csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll
2020-01-30 10:26:44 +01:00
Jonas Jensen
036e16af8b
Merge remote-tracking branch 'upstream/master' into ir-crement-load
...
Conflicts:
cpp/ql/src/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll
2020-01-30 09:07:30 +01:00
Jonas Jensen
c4d2163321
Merge pull request #2673 from aschackmull/ql/autoformat-comparisonterm
...
Java/C++/C#: Autoformat comparison terms
2020-01-30 08:47:50 +01:00
Robert Marsh
71d87be773
C++: add flow through partial loads in DTT
2020-01-29 17:51:42 -08:00
Dave Bartolomeo
790cbf0d6b
C#: Fix bad merge
2020-01-29 17:32:15 -07:00
Dave Bartolomeo
6249446ba0
Merge remote-tracking branch 'upstream/master' into dbartol/Indirections
2020-01-29 17:29:44 -07:00
Robert Marsh
1472101613
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-01-29 14:44:29 -08:00
Robert Marsh
74ea9bcdf4
C++: fix merge issue
2020-01-29 14:37:41 -08:00
Robert Marsh
1a458aa450
C++: IR dataflow edges through outparams
2020-01-29 14:37:41 -08:00
Dave Bartolomeo
46c414b53f
C++: Document regular expressions in InlineExpectationsTest
2020-01-29 13:24:55 -07:00
Dave Bartolomeo
1277881294
C++: Document InlineExpectationsTest
2020-01-29 13:07:34 -07:00
Esben Sparre Andreasen
31743c42e5
Update javascript/ql/src/semmle/javascript/frameworks/Koa.qll
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-01-29 20:28:29 +01:00
ggolawski
ebd2b932e8
Update java/ql/src/Security/CWE/CWE-90/LdapInjection.qhelp
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-01-29 20:05:20 +01:00
Robert Marsh
37570c7750
Merge pull request #2676 from jbj/dataflow-partial-chi
...
C++: data flow through partial chi operands where type is known
2020-01-29 13:44:06 -05:00
Jonas Jensen
52d2bebd1c
C++: Taint through most partial chi operands
...
This changes the flow to be taint rather than data flow, and it extends
it to include chi instructions with unknown type as long as they're not
for the `AliasedVirtualVariable`.
We're losing three good test results because these tests are not
affected by `DefaultTaintTracking.qll`. The taint step added here can
later be ported to `TaintTrackingUtil.qll` to recover these results, but
we probably want a better API than transitive-closure search through
instructions before doing that.
2020-01-29 18:02:03 +01:00
Geoffrey White
f673791fe8
Merge pull request #2717 from jbj/DefaultTaintTracking-memcpy
...
C++: Add taint from gets through memcpy
2020-01-29 16:28:45 +00:00
Mathias Vorreiter Pedersen
bbb0e212e3
Merge pull request #2720 from jbj/taint-diff-import
...
C++: Always use the old library for the diff test
2020-01-29 17:20:31 +01:00
Calum Grant
7caae01ad1
C#: Exclude fields that are created
2020-01-29 15:47:12 +00:00
Anders Schack-Mulligen
2039ec37e5
Java/C++/C#: Add change note for taint-getters.
2020-01-29 16:26:23 +01:00
Tom Hvitved
474815bf57
Merge pull request #2660 from calumgrant/cs/release-notes
...
C#: Add release notes and precisions to queries
2020-01-29 16:05:45 +01:00
Jonas Jensen
0436caecdc
C++: Always use the old library for the diff test
...
This change ensures that the diff test will show the difference between
the old and the new library even after we switch the default
implementation of `security.TaintTracking` to be the new one.
2020-01-29 16:03:35 +01:00
Jonas Jensen
4a77f2b53c
Merge remote-tracking branch 'upstream/master' into ir-crement-load
...
Update test output to fix semantic merge conflict.
2020-01-29 15:56:05 +01:00
Jonas Jensen
9b651ea92c
C++: Fix mapping of sources from Expr to Node
...
The code contained the remains of how `isUserInput` in `Security.qll`
used to be ported to IR. It's wrong to use that port since many queries
call `userInput` directly to get the "cause" string.
2020-01-29 15:50:08 +01:00
Jonas Jensen
7bed6ad63b
C++: Add taint from gets through memcpy
2020-01-29 15:42:43 +01:00
Esben Sparre Andreasen
a6d3afd817
JS: support additional Koa request sources
2020-01-29 14:49:01 +01:00
Esben Sparre Andreasen
d4d910b681
JS: add koa test
2020-01-29 14:41:23 +01:00
Jonas Jensen
d7e8ea7cc5
Merge pull request #2641 from marcrepo/master
...
Documentation update for Issue #2623
2020-01-29 13:37:00 +01:00
Jonas Jensen
386e8e87d1
Merge pull request #2645 from geoffw0/typo
...
CPP: Fix typo.
2020-01-29 13:35:55 +01:00
Anders Schack-Mulligen
743b612d0d
Javascript/Python: Sync XML.qll
2020-01-29 13:31:25 +01:00
Anders Schack-Mulligen
0d4b2e4bf7
C#/C++: Autoformat post rebase.
2020-01-29 13:16:46 +01:00
Anders Schack-Mulligen
726a873c3e
C#: Autoformat.
2020-01-29 13:15:00 +01:00
Anders Schack-Mulligen
96e4a57edd
C++: Autoformat.
2020-01-29 13:11:50 +01:00
Erik Krogh Kristensen
b8834ffcad
add support for private fields in classes
2020-01-29 13:10:45 +01:00
Jonas Jensen
02cb8e9cc7
Merge remote-tracking branch 'upstream/master' into dataflow-partial-chi
...
Conflicts:
cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/tainted.expected
2020-01-29 13:03:40 +01:00
Calum Grant
c0379cc3f1
C#: Address review comment: an SQL
2020-01-29 11:46:28 +00:00
Calum Grant
aff0a7534c
Update change-notes/1.24/analysis-csharp.md
...
Fix indentation
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2020-01-29 11:44:17 +00:00
Anders Schack-Mulligen
9b7a728609
Java: Autoformat.
2020-01-29 12:16:25 +01:00
semmle-qlci
fb90c2ba52
Merge pull request #2681 from asger-semmle/csrf-only-session-cookie-access
...
Approved by erik-krogh, max-schaefer
2020-01-29 10:46:48 +00:00
Anders Schack-Mulligen
9391058363
Java: Add unit test for ldap injection.
2020-01-29 11:37:33 +01:00
Jonas Jensen
27b5902258
Merge pull request #2707 from geoffw0/taint-format
...
C++: Add TaintFunction model to FormattingFunction
2020-01-29 08:20:34 +01:00
Grzegorz Golawski
bbcfbd7a28
Apply suggestion from code review
2020-01-28 22:34:01 +01:00
Robert Marsh
9504da54d1
Merge pull request #2713 from MathiasVP/dynamic-cast-taint-propagation
...
C++: Taint propagation through dynamic_cast
2020-01-28 15:09:49 -05:00
Dave Bartolomeo
60a0eff4d7
Merge remote-tracking branch 'upstream/master' into dbartol/Indirections
2020-01-28 12:06:43 -07:00
yo-h
97069a7988
Merge pull request #2683 from aschackmull/java/lshift32
...
Java: Add new query for large left shifts and bugfix ConstantExpAppearsNonConstant.
2020-01-28 13:30:26 -05:00
Dave Bartolomeo
542579de7f
C++: Accept dataflow test changes due to new alias analysis
2020-01-28 10:58:27 -07:00
Dave Bartolomeo
dda32359fa
C++: Accept IR dump test results changes due to new alias analysis
2020-01-28 10:58:05 -07:00
Dave Bartolomeo
7013bc6bf4
C++: Update escape analysis tests to new API
2020-01-28 10:57:07 -07:00
Dave Bartolomeo
bb9485d548
C++: Update points_to tests to use new framework
2020-01-28 10:56:49 -07:00
Dave Bartolomeo
af9d90cf46
C++: New test framework that allows expected results as comments in source code
2020-01-28 10:56:13 -07:00
Dave Bartolomeo
d12b140921
C++/C#: Update shared file list
2020-01-28 10:55:38 -07:00
Dave Bartolomeo
976b564b68
C++: Update AliasedSSA to use Allocation instead of IRVariable
...
This introduces a new type of `MemoryLocation`: `EntireAllocationMemoryLocation`, representing an entire contiguous allocation whose size is not known. This is used to model the memory accesses on `InitializeIndirection` and `ReturnIndirection`.
2020-01-28 10:55:24 -07:00
Dave Bartolomeo
165a45d9b5
C++/C#: Update SimpleSSA to use Allocation instead of IRVariable
2020-01-28 10:53:18 -07:00
Dave Bartolomeo
1bbc875442
C++/C#: Parameterize alias analysis based on AliasConfiguration
...
Instead of tracking `IRVariable`s directly, alias analysis now tracks instances of the `Allocation` type provided by its `Configuration` parameter. For unaliased SSA, an `Allocation` is just an `IRAutomaticVariable`. For aliased SSA, an `Allocation` is either an `IRVariable` or the memory pointed to by an indirect parameter.
2020-01-28 10:51:21 -07:00
Dave Bartolomeo
b15dd82732
C++/C#: Share alias analysis between C++ and C#
2020-01-28 10:47:37 -07:00
Dave Bartolomeo
1b1fded535
C++/C#: Add new MemoryAccessKind to represent entire allocation
2020-01-28 10:41:53 -07:00
Mathias Vorreiter Pedersen
67d29e31cc
C#: Sync identical files
2020-01-28 17:52:45 +01:00
Mathias Vorreiter Pedersen
c1091a03d0
C++: Accept output
2020-01-28 17:38:35 +01:00
Mathias Vorreiter Pedersen
46ce228bce
C++: Add instruction for CheckedConvertOrNull and handle it in alias analysis and data flow
2020-01-28 17:36:17 +01:00
Mathias Vorreiter Pedersen
928b0c50d2
C++: Add test demonstrating false negative when using dynamic_cast
2020-01-28 17:31:53 +01:00
Rasmus Wriedt Larsen
4ca72de4cd
Python: Fix recommended module for deprecated posixfile
...
$ python2 -W default -c 'import posixfile'
-c:1: DeprecationWarning: The posixfile module is deprecated; fcntl.lockf() provides better locking
https://docs.python.org/2.7/library/posixfile.html
2020-01-28 16:44:47 +01:00
Rasmus Wriedt Larsen
6c7cddf258
Python: py/import-deprecated-module handle backwards compatible code
2020-01-28 16:36:47 +01:00
Rasmus Wriedt Larsen
e92d6c0459
Python: Stop py/import-deprecated-module from double alerting
...
This changes the location from the import statement, to the actual expression
2020-01-28 16:15:46 +01:00
Rasmus Wriedt Larsen
7949acc3ef
Python: Autoformat
2020-01-28 16:15:21 +01:00
Rasmus Wriedt Larsen
194228850a
Python: Add tests for py/import-deprecated-module
2020-01-28 16:15:21 +01:00
Calum Grant
6b377d7ad4
C#: Analysis change notes
2020-01-28 14:59:25 +00:00
Geoffrey White
fc1816cbd7
C++: Update change note.
2020-01-28 14:53:18 +00:00
Geoffrey White
f02ffcbbd2
C++: Modify ParameterIndex to account for varargs.
2020-01-28 14:53:18 +00:00
Geoffrey White
d66f608d41
C++: Taint from FormattingFunction varargs.
2020-01-28 14:53:18 +00:00
Geoffrey White
8b215c155e
C++: Correct a few test comments.
2020-01-28 14:51:46 +00:00
Geoffrey White
b1f66ae825
C++: Fix warnings.
2020-01-28 14:51:46 +00:00
yo-h
95d138bf00
Merge pull request #2659 from aschackmull/java/remove-parexpr
...
Java: Update dbscheme for ParExpr removal.
2020-01-28 09:50:06 -05:00
Erik Krogh Kristensen
aea365c424
adjust API naming
2020-01-28 15:09:31 +01:00
Calum Grant
0b3821c828
C#: Remove false positive for out params
2020-01-28 13:59:33 +00:00
Jonas Jensen
24a50fceef
Merge pull request #2709 from MathiasVP/ql-tests-taint-tracking-fixup
...
C++: Fix annotations in testcase file
2020-01-28 14:52:55 +01:00
Erik Krogh Kristensen
cb16116b4d
adjust type-tracking on custom EventEmitters
2020-01-28 14:00:26 +01:00
Mathias Vorreiter Pedersen
287af2bdec
C++: Fix annotations in testcase file
2020-01-28 13:51:36 +01:00
Asger F
701d9989be
Apply suggestions from code review
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-01-28 12:46:51 +00:00
Asger F
310dd05185
Update javascript/ql/src/Security/CWE-352/MissingCsrfMiddleware.ql
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-01-28 12:46:34 +00:00
Geoffrey White
01dc3661b7
C++: Autoformat.
2020-01-28 12:17:56 +00:00
Rasmus Wriedt Larsen
c25782d6da
Python: For web tests, use more precise name HttpResponseSinks
...
Since there are also HttpRedirectTaintSink, using HttpSink is confusing
2020-01-28 13:06:48 +01:00
Rasmus Wriedt Larsen
46f4b74134
Python: Fix tornado lib: a redirect is not a http response
2020-01-28 13:06:48 +01:00
Rasmus Wriedt Larsen
ee382bb2ea
Python: Fix typo (reques => request)
2020-01-28 13:06:48 +01:00
Rasmus Wriedt Larsen
9bc72450a0
Python: Temporarily disable falcon HttpSinks test
...
I will fix this in an other PR
2020-01-28 13:06:48 +01:00
Rasmus Wriedt Larsen
9b2ca0c9c7
Python: Update web libraries to use HttpSources and HttpSinks
2020-01-28 13:06:48 +01:00
Rasmus Wriedt Larsen
2cdbae08b6
Python: Don't make duplicate sink for Tornado handler
...
`self.write(...)` would be treated as *both* TornadoConnectionWrite and
TornadoHttpRequestHandlerWrite
2020-01-28 13:06:48 +01:00
Rasmus Wriedt Larsen
effa4548ab
Python: Add toString to TurboGears HttpResponseTaintSinks
...
Naming these were a bit hard, but better than generic "Taint Sink"
2020-01-28 13:06:48 +01:00
Rasmus Wriedt Larsen
6b87458c2e
Python: Add explicit tests for HttpSources and HttpSinks
...
Some of the tests currently fail, since they can't reproduce the old tests
results (since the sinks/sources defined in the library code are not
HttpResponseTaintSink/HttpRequestTaintSource)
2020-01-28 13:06:48 +01:00
Rasmus Wriedt Larsen
b36a6aa5b5
Python: Remove unused variable from exists expression
2020-01-28 13:05:25 +01:00
Rasmus Wriedt Larsen
0a1c91fbb8
Python: Autoformat web tests QL files
2020-01-28 13:05:25 +01:00
Calum Grant
f23438ea65
C#: Add test showing false positive
2020-01-28 11:48:59 +00:00
semmle-qlci
5ab6457370
Merge pull request #2699 from asger-semmle/js/callback-doc-typo
...
Approved by max-schaefer
2020-01-28 11:00:49 +00:00
Jonas Jensen
23030aa324
Merge pull request #2706 from MathiasVP/ql-tests-taint-tracking
...
Ql tests for virtual dispatch taint tracking
2020-01-28 11:56:10 +01:00
Asger Feldthaus
b306571d52
JS: Type-track react component factories
2020-01-28 10:22:04 +00:00
Mathias Vorreiter Pedersen
611d9553dd
C++: Fix formatting
2020-01-28 10:22:33 +01:00
Anders Schack-Mulligen
0b3c90b526
Java: Fix whitespace query.
2020-01-28 10:15:48 +01:00
Anders Schack-Mulligen
34e6679afd
Java: Add upgrade script.
2020-01-28 10:15:48 +01:00
Anders Schack-Mulligen
f8805ebb24
Java: Update 2 queries.
2020-01-28 10:15:48 +01:00
Anders Schack-Mulligen
4bd332ddca
Java: Add Expr.isParenthesized, adjust VarAccess.toString, and fix tests.
2020-01-28 10:15:48 +01:00
Anders Schack-Mulligen
597d8e7d94
Java: Update dbscheme for ParExpr removal.
2020-01-28 10:15:48 +01:00
Anders Schack-Mulligen
dc7e8ad2ff
Java: Reword help according to review comment.
2020-01-28 10:13:35 +01:00
Anders Schack-Mulligen
a99a6f79cd
Apply suggestions from code review
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-01-28 10:13:35 +01:00
Anders Schack-Mulligen
4cb28d9b1d
Java: Add new query for large left shifts and bugfix ConstantExpAppearsNonConstant.
2020-01-28 10:13:34 +01:00
Mathias Vorreiter Pedersen
130911ad44
C++: Accept new output in already existing test
2020-01-28 10:00:52 +01:00
Mathias Vorreiter Pedersen
fd79e7991d
C++: Add tests demonstrating differences between AST virtual dispatch analysis and IR virtual dispatch analysis
2020-01-28 10:00:21 +01:00
Geoffrey White
1ddabee1b8
C++: Change note.
2020-01-28 08:46:46 +00:00
Geoffrey White
30580e97dc
C++: Add a TaintFunction model to FormattingFunction.
2020-01-28 08:46:46 +00:00
Geoffrey White
1d46971bb7
C++: Add an ArrayFunction model to FormattingFunction.
2020-01-28 08:46:46 +00:00
Geoffrey White
06f5720cd5
C++: Add taint tests of formatting functions.
2020-01-28 08:46:46 +00:00
Erik Krogh Kristensen
082967a629
add EventEmitter models for net.createServer() and respjs.
2020-01-28 09:38:38 +01:00
Erik Krogh Kristensen
a2e54b1477
add support for this references in classes that extend EventEmitter
2020-01-28 09:37:54 +01:00
yo-h
8c00671f24
Merge pull request #2698 from aschackmull/java/changenote-csrf-query
...
Java: Add change note for java/spring-disabled-csrf-protection.
2020-01-27 21:09:15 -05:00
Robert Marsh
1b9e375341
C++: Move getACallArgumentOrIndirection
2020-01-27 16:44:41 -08:00
Robert Marsh
fd807d46d6
C++: IR dataflow through modeled functions
2020-01-27 16:38:07 -08:00
Robert Marsh
a9bcc1dcc6
Merge pull request #2667 from dbartol/dbartol/NoEscape
...
C++/C#: Make escape analysis unsound by default
2020-01-27 19:17:33 -05:00
Robert Marsh
c7975e83a7
Merge pull request #2657 from jbj/DefaultTaintTracking-models
...
C++: wire up models library to DefaultTaintTracking
2020-01-27 17:41:54 -05:00
Grzegorz Golawski
7b2192d2e3
Apply suggestion from code review
2020-01-27 22:34:15 +01:00
ggolawski
408c49a61c
Apply suggestions from code review
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-01-27 22:31:51 +01:00
Dave Bartolomeo
7df3cf4c23
C++: Accept more test output after merge
2020-01-27 13:48:43 -07:00
Dave Bartolomeo
3b3502060b
Merge remote-tracking branch 'upstream/master' into dbartol/NoEscape
2020-01-27 13:29:18 -07:00
Robert Marsh
79a72a3496
Merge pull request #2680 from geoffw0/modelstrndup
...
CPP: Model strndup.
2020-01-27 15:19:52 -05:00
Dave Bartolomeo
40952f85a9
C++: Accept test diffs
2020-01-27 10:31:18 -07:00
Robert Marsh
4d743d2bce
Merge pull request #2692 from jbj/pure-string-read
...
C++: Model that string functions read their buffer
2020-01-27 11:40:03 -05:00
Anders Schack-Mulligen
3745388069
Merge pull request #2602 from chrisgavin/suspicious-date-format
...
Java: Add a query for suspicious date format patterns.
2020-01-27 16:29:48 +01:00
Rasmus Wriedt Larsen
d67577e66c
Python: Modernise import related queries
...
Except for Metrics/Dependencies/ExternalDependenciesSourceLinks.ql, since it is
rather tricky :D
2020-01-27 16:01:25 +01:00
Rasmus Wriedt Larsen
647b9cdcb0
Python: Autoformat query
2020-01-27 16:01:24 +01:00
Rasmus Wriedt Larsen
081d66eaa3
Python: Recognize taint for extended iterable unpacking
2020-01-27 15:28:53 +01:00
Rasmus Wriedt Larsen
1b670354b2
Python: Add tests for extended iterable unpacking
2020-01-27 15:24:55 +01:00
Geoffrey White
4778914154
CPP: Repair flow.
2020-01-27 14:08:03 +00:00
Geoffrey White
d9f6895602
CPP: 'sometimes copying' is considered data flow.
2020-01-27 14:07:39 +00:00
Rasmus Wriedt Larsen
781024d679
Python: Recognize taint for iterable unpacking
2020-01-27 14:43:07 +01:00
Rasmus Wriedt Larsen
a3f1f4cb87
Python: Add iterable unpacking tests
2020-01-27 14:43:07 +01:00
Rasmus Wriedt Larsen
fa48fb04f5
Python: Recognize nested tuple/list assignment
...
Now we recognize `[(x,y)] = [(1,2)]` -- in itself not a widely used idiom, but
more of a warmup excersize for me
2020-01-27 14:42:54 +01:00
Rasmus Wriedt Larsen
9763ec71fe
Python: Add tests for nested assignment
2020-01-27 14:39:34 +01:00
Jonas Jensen
0e3ed2dfa6
C++: Remove test for unrelated issue
...
The issue for that test is being tested and fixed on PR #2686 . Adding a
test here will cause a semantic merge conflict.
2020-01-27 14:25:28 +01:00
Rasmus Wriedt Larsen
9502756874
Python: Autoformat dataflow files
2020-01-27 13:07:01 +01:00
Asger Feldthaus
3d567eb889
JS: Close an unterminated code block
2020-01-27 12:03:58 +00:00
Chris Gavin
484333b192
Java: Update help and description of java/suspicious-date-format.
2020-01-27 11:57:59 +00:00
Chris Gavin
0e8d435ca1
Java: Add a test for java/suspicious-date-format.
2020-01-27 11:57:59 +00:00
Chris Gavin
708890add3
Java: Add a change note for java/suspicious-date-format.
2020-01-27 11:57:56 +00:00
Chris Gavin
88146295f9
Java: Add a query for suspicious date format patterns.
2020-01-27 11:57:18 +00:00
Anders Schack-Mulligen
efe8981129
Java: Add change note for java/spring-disabled-csrf-protection.
2020-01-27 11:33:31 +01:00
Anders Schack-Mulligen
816a8d1f9e
Merge pull request #2586 from ggolawski/spring_disable_csrf
...
Add check for disabled CSRF protection in Spring
2020-01-27 11:32:39 +01:00
Geoffrey White
2c7e2c4506
CPP: Not in std namespace.
2020-01-27 10:20:56 +00:00
Rasmus Wriedt Larsen
1ce77ff600
Merge pull request #2507 from tausbn/python-fix-infinite-tuple-tostring
...
Python: Fix divergence in tuple `toString`.
2020-01-27 11:14:44 +01:00
semmle-qlci
8a6de11268
Merge pull request #2689 from erik-krogh/LastEventEmitters
...
Approved by esbena
2020-01-27 08:55:33 +00:00
semmle-qlci
7d9956e3f3
Merge pull request #2675 from erik-krogh/WebSocket
...
Approved by esbena
2020-01-27 08:40:37 +00:00
Dave Bartolomeo
6988241b09
Merge from master
2020-01-26 16:38:48 -07:00
Dave Bartolomeo
708e83546f
C++: Remove acceidentally added tests
2020-01-26 16:20:27 -07:00
Robert Marsh
959ce3b355
C++: add diff tests for DefaultTaintTracking
2020-01-24 13:46:11 -08:00
Jonas Jensen
fb6ad5274f
C++: Accept test changes
2020-01-24 22:28:20 +01:00
Robert Marsh
0180672dc0
Merge pull request #2687 from jbj/DefaultTaintTracking-asExpr
...
C++: Use asExpr, not getConvertedResultExpression
2020-01-24 15:42:58 -05:00
Taus Brock-Nannestad
3cebffe820
Python: Fix divergence in tuple toString.
...
Our definition of `toString` for the internal tuple objects we create during the
points-to analysis may have been a _tad_ too ambitious. In particular, it can
easily lead to non-termination, e.g. using the following piece of code:
```python
x = ()
while True:
x = (x, x)
```
This commit cuts off the infinite recursion by replacing _nested_ tuples with
the string "...". In particular this means even non-recursive tuples will be cut
off at that point, so that the following tuples
```python
(1, "2")
((3, 4), [5, 6])
(1, 2, 3, 4, 5)
```
Get the following string representations.
```
"(int 1, '2', )"
"(..., List, )"
"(int 1, int 2, int 3, 2 more...)"
```
2020-01-24 17:08:56 +01:00
Mathias Vorreiter Pedersen
d26cf12c3a
Merge pull request #2688 from geoffw0/move-taint-test
...
C++: Add the security taint test (previously internal).
2020-01-24 15:58:20 +01:00
Jonas Jensen
b290c7b47a
C++: Model that string functions read their buffer
2020-01-24 15:53:38 +01:00
semmle-qlci
b3eada829a
Merge pull request #2690 from erik-krogh/MoreEvents2
...
Approved by asgerf
2020-01-24 14:47:04 +00:00
Taus
5a2dfd40af
Merge pull request #2639 from RasmusWL/python-improve-dict-taint
...
Python: Improve tests for tainted collections
2020-01-24 15:06:01 +01:00
Erik Krogh Kristensen
8492f6031f
reuse existing type-tracking for classes
2020-01-24 13:36:32 +01:00
Anders Schack-Mulligen
98d527c44c
Merge pull request #2685 from esbena/java/sharpen-maven-non-ssl
...
java: sharpen java/maven/non-https-url to allow localhost URLs
2020-01-24 13:19:26 +01:00
Erik Krogh Kristensen
0b55aed626
use the EventEmitter registration methods instead of just "on"
2020-01-24 13:06:00 +01:00
Erik Krogh Kristensen
148ec9aad0
fix typos
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2020-01-24 12:36:03 +01:00
Geoffrey White
af903fc30c
C++: Add the security taint test (previously internal).
2020-01-24 11:28:51 +00:00
Jonas Jensen
ee0648bb57
Merge pull request #2684 from geoffw0/rearrange-tests
...
CPP: Test cleanup
2020-01-24 11:57:58 +01:00
Asger Feldthaus
7fa0fea253
TS: Address comments in guessMainFile
2020-01-24 10:11:53 +00:00
Asger Feldthaus
1f647223e0
TS: Move definition of mainStr
2020-01-24 10:02:06 +00:00
Esben Sparre Andreasen
8deefd60a7
java: fixup whitespace/tabs in test
2020-01-24 11:01:38 +01:00
Asger Feldthaus
9ed77585a7
Merge branch 'ts-monorepo-deps' of github.com:asger-semmle/ql into ts-monorepo-deps
2020-01-24 09:58:35 +00:00
Asger F
5448bffede
Update javascript/extractor/lib/typescript/src/main.ts
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-01-24 09:58:27 +00:00
Asger Feldthaus
3ca5a3dbe4
TS: Document nodeModulesRex
2020-01-24 09:57:40 +00:00
Asger Feldthaus
804aef507f
TS: Remove unneeded alias PackageLocationMap
2020-01-24 09:51:03 +00:00
Asger Feldthaus
542ce816dc
TS: Simplify string equality check
2020-01-24 09:49:11 +00:00
Asger Feldthaus
fc04e06456
TS: Allow .js extensions in cross package imports
2020-01-24 09:48:43 +00:00
Jonas Jensen
6606b2e18a
C++: autoformat fixup
2020-01-24 10:48:03 +01:00
Asger Feldthaus
b98db62e82
JS: Recognize req.user a cookie access
2020-01-24 09:44:20 +00:00
Geoffrey White
912260b3aa
C++: Autoformat tests.
2020-01-24 09:43:58 +00:00
Rasmus Wriedt Larsen
5778764a48
Python: Stop using deprecated getName in collections taint test
2020-01-24 10:32:17 +01:00
Rasmus Wriedt Larsen
3db551d6bc
Python: Use variables in collection-taint test
...
They are not tainted in assignment, only in use.
I also adopted an attempt at a better test-setup, where it's easy to see if
everything is the way you hoped for, instead of browsing through 100 of lines of
taint-step output :P
2020-01-24 10:32:17 +01:00
Erik Krogh Kristensen
c0af3780c4
adjust the ReceiveNode docstrings
2020-01-24 10:06:28 +01:00
Jonas Jensen
5eeb5c6e67
C++: Use asExpr, not getConvertedResultExpression
...
We designed the IR's `DataFlow::Node.asExpr` very carefully so that it's
suitable for taint tracking, but then we didn't use it in
`DefaultTaintTracking.qll`. This meant that the sources in
`ArithmeticWithExtremeValues.ql` didn't get associated with any
`Instruction` and thus didn't propagate anywhere.
With this commit, the mapping of `Expr`-based sources to IR data-flow
nodes uses `asExpr`.
2020-01-24 09:42:26 +01:00
Tom Hvitved
cfbdf21d1b
Merge pull request #2682 from calumgrant/cs/format-trap-floats
...
C#: Fix outputting floats to the trap file
2020-01-24 09:13:18 +01:00
Jonas Jensen
9a45c5570d
C++: Move Load from AssignmentOperation to its LHS
...
This is analogous to what was done for `CrementOperation`.
2020-01-24 09:09:31 +01:00
Jonas Jensen
53b1068a9f
C++: Unshare code between assignment types
...
This commit undoes the code sharing between `TranslatedAssignExpr` (`=`)
and `TranslatedAssignOperation` (`+=`, `<<=`, ...). In the next commit,
when we change how the `Load` works on the LHS of
`TranslatedAssignOperation`, these classes will become so different that
sharing is no longer helpful.
2020-01-24 09:04:09 +01:00
Jonas Jensen
c5950d2c9d
C++: IR: Result of x in x++ is now the Load
...
Previously, the `Load` would be associated with the `CrementOperation`
rather than its operand, which gave surprising results when mapping
taint sinks back to `Expr`.
The changes in `raw_ir.expected` are to add `Copy` operations on the
`x++` in code like `y = x++`. This is now needed because the result that
`x++` would otherwise have (the Load) no longer belongs to the `++`
expression. Copies are inserted to ensure that all expressions are
associated with an `Instruction` result.
The changes in `*aliased_ssa_ir.expected` appear to be just wobble.
2020-01-24 09:02:50 +01:00
Esben Sparre Andreasen
57b3a55b48
java: sharpen java/maven/non-https-url to allow localhost URLs
2020-01-24 08:51:54 +01:00
Esben Sparre Andreasen
a5558809f4
java: add more tests for java/maven/non-https-url
2020-01-24 08:49:59 +01:00
Grzegorz Golawski
968c18d208
Query to detect LDAP injections in Java
...
Refactoring according to review comments.
2020-01-23 22:51:10 +01:00
Erik Krogh Kristensen
2044b4bc82
changes based on review
2020-01-23 20:29:06 +01:00
yo-h
eb6f8da080
Merge pull request #2679 from aschackmull/java/remove-depr-flow-fwd-back
...
Java/C++/C#: Remove the deprecated hasFlowForward/hasFlowBackward.
2020-01-23 14:10:28 -05:00
yo-h
50320c7828
Merge pull request #2628 from aschackmull/java/no-adhoc-testclass
...
Java: Replace ad-hoc TestClass detection.
2020-01-23 14:09:11 -05:00
Geoffrey White
795afa8160
CPP: Better location for the StackVariableReachability test.
2020-01-23 17:32:07 +00:00
Geoffrey White
b693ef51e2
C++: Put a little bit of content in the StackVariableReachability test.
2020-01-23 17:25:26 +00:00
Jonas Jensen
ed3ed5f1b6
C++: Test to show lack of flow to crement operands
2020-01-23 17:42:51 +01:00
Geoffrey White
f16870f8c6
CPP: Autoformat.
2020-01-23 16:20:18 +00:00
Asger Feldthaus
852b90a6c9
TS: Be compatible with odasa/qltest
2020-01-23 16:13:53 +00:00
Calum Grant
35bc78d666
C#: Fix outputting floats to the trap file. In some locales, the extractor output invalid floating point values to the trap file.
2020-01-23 15:43:25 +00:00
Asger Feldthaus
a68bb9ffd1
JS: Ignore calls and csrf/captcha access
2020-01-23 15:32:05 +00:00
Asger Feldthaus
b1ec3e1bf2
JS: Add test and dont check predecessors
2020-01-23 14:59:03 +00:00
Jonas Jensen
33070cc16d
Merge pull request #2678 from MathiasVP/union-access-global-virtual-dispatch
...
C++: IR virtual dispatch through union field access
2020-01-23 15:32:31 +01:00
Asger Feldthaus
406c6eb981
JS: Sharpen missing CSRF middleware query
2020-01-23 14:22:49 +00:00
Geoffrey White
edf2b54813
CPP: Model strndup.
2020-01-23 13:46:57 +00:00
Anders Schack-Mulligen
e7f7c7370a
Java/C++/C#: Remove the deprecated hasFlowForward/hasFlowBackward.
2020-01-23 14:05:18 +01:00
Taus
0627fadbff
Merge pull request #2669 from RasmusWL/python-modernise-resources
...
Python: modernise Resources/ queries
2020-01-23 13:43:33 +01:00
Taus
618a35bb7c
Merge pull request #2664 from RasmusWL/python-fix-redirect-example
...
Python: Remove unused variable in example for py/url-redirection
2020-01-23 13:42:00 +01:00
Taus
d06e86f54d
Merge pull request #2662 from RasmusWL/python-taint-on-eq-test
...
Python: Only clear taint on constant comparison in if
2020-01-23 13:41:40 +01:00
Taus
ef7eafa849
Merge pull request #2644 from RasmusWL/python-add-deprecated-keyword
...
Python: Add deprecated keyword to deprecated functions
2020-01-23 13:41:15 +01:00
Asger Feldthaus
dc30dcf1f8
TS: Only require SCRATCH_DIR when installing dependencies
2020-01-23 12:39:19 +00:00
Mathias Vorreiter Pedersen
5fd1c6fedb
C++: Remove parameter from predicate for some tiny performance benefits
2020-01-23 13:29:48 +01:00
Jonas Jensen
8a0089a875
Merge pull request #2672 from geoffw0/qualifierflow
...
CPP: Support taint flow in and out of qualifiers
2020-01-23 13:17:17 +01:00
Anders Schack-Mulligen
0bbe571064
Update change-notes/1.24/analysis-java.md
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-01-23 13:13:51 +01:00
Geoffrey White
166be063a9
C++: Rename test of the now un-deprecated StackVariableReachability.
2020-01-23 11:06:24 +00:00
Geoffrey White
0c4eabca98
C++: Merge two tests of UnusedStaticFunctions from the library-tests into the existing test in query-test.
2020-01-23 11:05:47 +00:00
Geoffrey White
f40a37cae2
C++: Move a test from library-tests to query-tests.
2020-01-23 11:05:47 +00:00
Geoffrey White
fcdb20d1fc
C++: Move the SuspiciousCallToStrncat test to the expected location.
2020-01-23 11:05:46 +00:00
Geoffrey White
f4f0f6d93e
C++: Merge the StrncpyFlippedArgs tests.
2020-01-23 11:05:46 +00:00
Geoffrey White
3aa66f5aca
C++: Merge the OverflowStatic tests.
2020-01-23 11:05:46 +00:00
Rasmus Wriedt Larsen
95f78e74d0
Merge pull request #2674 from tausbn/python-modernise-web-libraries
...
Python: Modernise remaining web libraries.
2020-01-23 12:01:02 +01:00
Geoffrey White
6743d6d6e5
C#: sync-indentical-files.
2020-01-23 10:22:36 +00:00
Anders Schack-Mulligen
fd141917c7
Java: Add change note.
2020-01-23 11:08:35 +01:00
Geoffrey White
ccf268d048
CPP: Autoformat.
2020-01-23 10:07:21 +00:00
Tom Hvitved
7e042da4f5
Merge pull request #2665 from calumgrant/cs/zipslip-alert
...
C#: ZipSlip query reports alert at source
2020-01-23 11:05:57 +01:00
Mathias Vorreiter Pedersen
77531294bf
C++: Accepted output on tests
2020-01-23 10:20:10 +01:00
Mathias Vorreiter Pedersen
9412ec7f4f
C++: Added union field flow for globals
2020-01-23 10:17:36 +01:00
Mathias Vorreiter Pedersen
256ae2fda6
C++: Add test demonstrating a flow not detected
2020-01-23 10:16:24 +01:00
Jonas Jensen
ceeb9ab718
Merge pull request #2622 from MathiasVP/implicit-function-declaration
...
C++: Add 'implicit function declaration' query
2020-01-23 09:23:44 +01:00
yo-h
9d70358ec4
Merge pull request #2640 from aschackmull/java/nullness-fp-tests
...
Java: Document two FPs with unit tests.
2020-01-22 16:28:30 -05:00
yo-h
9a939534c7
Merge pull request #2670 from aschackmull/java/remove-parityanalysis
...
Java: Remove the deprecated ParityAnalysis.
2020-01-22 16:22:34 -05:00
Grzegorz Golawski
bed6a9886f
Query to detect LDAP injections in Java
...
Autoformat
2020-01-22 21:42:47 +01:00
Grzegorz Golawski
5596944926
Add check for disabled CSRF protection in Spring
...
Fix help and correct formatting.
2020-01-22 21:27:34 +01:00
James Fletcher
f1749b3990
Merge pull request #2654 from calumgrant/cs/null-dereference
...
C#: Improvements to cs/dereferenced-value-may-be-null
2020-01-22 20:15:20 +00:00
Geoffrey White
1867d58034
CPP: Allow flow to return value.
2020-01-22 16:25:40 +00:00
Geoffrey White
704bfe7184
CPP: Support taint flow from qualifiers.
2020-01-22 16:22:29 +00:00
Geoffrey White
e6daf3b7ee
CPP: Support taint flow to qualifiers.
2020-01-22 16:16:31 +00:00
Jonas Jensen
7376daf16e
C++: Some data flow through partial chi operands
2020-01-22 17:14:32 +01:00
Geoffrey White
974994ed49
CPP: Slight rearrange.
2020-01-22 16:11:51 +00:00
Geoffrey White
1a6f7febe7
CPP: Add tests of taint through qualifiers.
2020-01-22 16:11:13 +00:00
Jonas Jensen
adc557fd66
C++: Reformat a predicate
...
This allows adding a multi-line case without the auto-formatting changes
becoming too disruptive.
2020-01-22 16:50:25 +01:00
Jonas Jensen
3827411095
Merge branch 'dbartol/NoEscape' into HEAD
2020-01-22 16:21:24 +01:00
Asger Feldthaus
7e8fb1428e
TS: Support tsconfig.json extending from ./node_modules
2020-01-22 15:03:03 +00:00
Taus Brock-Nannestad
0924a973de
Python: Modernise remaining web libraries.
2020-01-22 15:27:29 +01:00
Calum Grant
a868456628
C#: Address review comments
2020-01-22 14:21:12 +00:00
Erik Krogh Kristensen
6345e9bde1
add change note
2020-01-22 15:14:10 +01:00
Erik Krogh Kristensen
b526a2ea0f
implement a model of WebSocket and ws based on the EventEmitter model
2020-01-22 14:46:53 +01:00
semmle-qlci
007b0795ec
Merge pull request #2636 from erik-krogh/NewSocketIO
...
Approved by esbena
2020-01-22 13:46:11 +00:00
Rasmus Wriedt Larsen
772538ff46
Python: Move tests of collection-taint to own dir
2020-01-22 14:24:50 +01:00
Rasmus Wriedt Larsen
df8be438bb
Python: Show that list(tainted_string) works
2020-01-22 14:24:50 +01:00
Rasmus Wriedt Larsen
0da78f216a
Python: Show that e, f, g = tainted_list doesn't work
2020-01-22 14:24:50 +01:00
Rasmus Wriedt Larsen
a55c13e61c
Python: Improve tests for StringDictKind taint
...
+ show we handle dict.values()
+ show we don't handle dict.items()
2020-01-22 14:24:50 +01:00
Jonas Jensen
66914e52c6
C++: accept test changes
2020-01-22 14:08:05 +01:00
Jonas Jensen
5ae1e2c4e8
C++: Autoformat
2020-01-22 14:07:55 +01:00
Rasmus Wriedt Larsen
7d9f1f08ee
Python: Autoformat
2020-01-22 13:45:14 +01:00
Rasmus Wriedt Larsen
12bb05522a
Python: Make py/weak-cryptographic-algorithm a path-problem
...
and stop using deprecated hasFlow
2020-01-22 13:45:14 +01:00
Rasmus Wriedt Larsen
c5091f1ce7
Python: Make py/hardcoded-credentials a path-problem
...
and stop using deprecated hasFlow
2020-01-22 13:45:14 +01:00
Rasmus Wriedt Larsen
96d5703f2c
Python: Remove use of deprecated methods
2020-01-22 13:45:14 +01:00
Rasmus Wriedt Larsen
e6425bb4cf
Python: Add deprecated keyword to deprecated functions
2020-01-22 13:45:14 +01:00
Jonas Jensen
6cdca29aa6
C++: Flow through read side effects
...
Until we have better tracking of indirections, these flow rules conflate
pointers and their contents.
2020-01-22 13:27:10 +01:00
Jonas Jensen
c24bceddcd
C++: Add ReadSideEffectInstruction to IR
...
There was already a `WriteSideEffectInstruction` class that served as a
superclass for all the specific write side effects. This new class
serves the same purpose for read side effects.
2020-01-22 13:27:10 +01:00
Jonas Jensen
2aaf41a0d8
C++: Test lack of flow through read side effect
2020-01-22 13:27:10 +01:00
semmle-qlci
bc88c41e0b
Merge pull request #2668 from erik-krogh/MoreEvents
...
Approved by esbena
2020-01-22 11:57:11 +00:00
Erik Krogh Kristensen
1228d506b4
update change notes to reflect that library models have improved
2020-01-22 12:52:45 +01:00
Asger Feldthaus
5719b44fa5
TS: Add some documentation
2020-01-22 11:47:02 +00:00
Asger Feldthaus
a220268ad8
TS: Install deps under scratch dir
2020-01-22 11:47:02 +00:00
Asger Feldthaus
303bac9710
TS: Guess main file location
2020-01-22 11:25:24 +00:00
Tom Hvitved
d5daee4450
Merge pull request #2661 from aschackmull/java/remove-dataflowlocation
...
Java/C++/C#: Remove DataFlowLocation as it's no longer needed.
2020-01-22 12:11:24 +01:00
Anders Schack-Mulligen
b92203a87f
Java: Allow null literals as sources in data flow.
2020-01-22 12:04:42 +01:00
Asger Feldthaus
21eecc4c9c
JS: Make return type class for installDependencies()
2020-01-22 10:52:38 +00:00
Asger Feldthaus
71b540755d
TS: Print TypeScript semantic errors in log
2020-01-22 10:52:37 +00:00
Asger Feldthaus
dde0f868b3
TS: Handle monorepos by rewriting package.json
2020-01-22 10:52:37 +00:00
Anders Schack-Mulligen
cf004ac9d8
Java: Remove the deprecated ParityAnalysis.
2020-01-22 11:45:18 +01:00
Rasmus Wriedt Larsen
aeaaab6437
Python: Modernise Resources/ queries
2020-01-22 11:20:31 +01:00
Rasmus Wriedt Larsen
47b932d6ce
Python: Autoformat Resources/ queries
2020-01-22 11:20:28 +01:00
Erik Krogh Kristensen
5063e3820d
update expected output
2020-01-22 11:18:47 +01:00
Erik Krogh Kristensen
750e9786f6
add change note for EventEmitter
2020-01-22 10:31:38 +01:00
Dave Bartolomeo
9d35ff73c4
C++/C#: Make escape analysis unsound by default
...
When building SSA, we'll be assuming that stack variables do not escape, at least until we improve our alias analysis. I've added a new `IREscapeAnalysisConfiguration` class to allow the query to control this, and a new `UseSoundEscapeAnalysis.qll` module that can be imported to switch to the sound escape analysis. I've cloned the existing IR and SSA tests to have both sound and unsound versions. There were relatively few diffs in the IR dump tests, and the sanity tests still give the same results after one change described below.
Assuming that stack variables do not escape exposed an existing bug where we do not emit an `Uninitialized` instruction for the temporary variables used by `return` statements and `throw` expressions, even if the initializer is a constructor call or array initializer. I've refactored the code for handling elements that initialize a variable to share a common base class. I added a test case for returning an object initialized by constructor call, and ensured that the IR diffs for the existing `throw` test cases are correct.
2020-01-22 00:15:30 -07:00
Grzegorz Golawski
c5a974788b
Add check for disabled CSRF protection in Spring
...
Fix the help according to review comments.
2020-01-21 21:54:36 +01:00
Robert Marsh
c79d7acbfc
Merge pull request #2656 from jbj/asDefiningArgument
...
C++: Add DataFlow::Node.asDefiningArgument in IR
2020-01-21 15:42:57 -05:00
Erik Krogh Kristensen
8370699344
add support for creating a promise with another resolved promise, e.g: Promise.resolve(otherPromise)
2020-01-21 20:11:27 +01:00
Erik Krogh Kristensen
8679132624
copy data from both callbacks in Promise data-flow
2020-01-21 18:00:06 +01:00
Erik Krogh Kristensen
86477a2249
changes based on review
2020-01-21 16:45:53 +01:00
Calum Grant
3d460aeb44
C#: ZipSlip query reports alert at source
2020-01-21 15:17:06 +00:00
Erik Krogh Kristensen
fe0b6a86d7
add data-flow steps for when Promise handlers return other promises
2020-01-21 16:15:18 +01:00
Erik Krogh Kristensen
d8b25ef5a2
add data-flow steps for resolved promises using pseudo-properties
2020-01-21 15:52:50 +01:00
Erik Krogh Kristensen
6648e2751f
remove use of .getAlocalSource() i custom load/store test
2020-01-21 15:49:42 +01:00
Rasmus Wriedt Larsen
422658bbdb
Python: Remove unused variable in example for py/url-redirection
2020-01-21 15:45:05 +01:00
Rasmus Wriedt Larsen
bbe93f43d3
Python: Only comparison with constant will clear taint
...
tainted = SOURCE
if tainted == tainted:
SINK(tainted) # unsafe
before, in the body of the if statement, `tainted` was not tainted
2020-01-21 15:25:57 +01:00
Rasmus Wriedt Larsen
1498145415
Python: Highlight that any comparison will clear taint
2020-01-21 15:24:56 +01:00
Anders Schack-Mulligen
9cc0d3d1f4
Java/C++/C#: Remove DataFlowLocation as it's no longer needed.
2020-01-21 15:08:39 +01:00
Calum Grant
6692e61fa2
C#: Analysis change notes
2020-01-21 13:55:32 +00:00
Calum Grant
be68b6f938
C#: Add precision to queries
2020-01-21 13:24:48 +00:00
Jonas Jensen
84811f66a2
C++: autoformat
2020-01-21 13:21:16 +01:00
Erik Krogh Kristensen
569ee8fc8d
add support for subclasses of EventEmitter
2020-01-21 12:08:50 +01:00
Jonas Jensen
6d46e4d946
C++: Wire up models to DefaultTaintTracking
...
This adds support for arg-to-arg and arg-to-return taint.
2020-01-21 12:04:45 +01:00
Jonas Jensen
fa00e96ba8
C++: Test IR taint through library functions
2020-01-21 12:03:43 +01:00
Jonas Jensen
5ac56c2e3a
C++: Add DataFlow::Node.asDefiningArgument in IR
2020-01-21 11:52:06 +01:00
Geoffrey White
80997a3323
Merge pull request #2655 from Semmle/jbj-patch-1
...
C++: Fix typo in MallocSizeExpr
2020-01-21 09:44:41 +00:00
Jonas Jensen
cdcd3ed748
Merge pull request #2647 from geoffw0/modelpure
...
CPP: Improve strlen model
2020-01-21 09:42:10 +01:00
Jonas Jensen
0568ed6451
C++: Fix typo in MallocSizeExpr
...
The first argument is index 0, not 1.
2020-01-21 09:09:49 +01:00
Mathias Vorreiter Pedersen
c9cc459baf
C++: Rename .qlhelp to .qhelp
2020-01-20 21:17:53 +01:00
Mathias Vorreiter Pedersen
fddd3660ab
C++: Fix formatting in example
2020-01-20 16:05:16 +01:00
Geoffrey White
4f02183dc2
CPP: Re-layout test.
2020-01-20 15:00:09 +00:00
Geoffrey White
2133fbd155
CPP: Fix the nulltermination test.
2020-01-20 14:55:52 +00:00
Erik Krogh Kristensen
026092559c
changes based on review
2020-01-20 15:53:58 +01:00
Calum Grant
86fa7e5c38
C#: Analysis change notes
2020-01-20 14:37:28 +00:00
Calum Grant
9d7c9e0ba4
C#: Default parameter values are maybe null
...
C#: Update test output
2020-01-20 14:37:20 +00:00
Geoffrey White
952b9e1581
CPP: Use hasGlobalName where appropriate.
2020-01-20 14:24:38 +00:00
Erik Krogh Kristensen
6494649125
fix a number of FPs in js/exception-xss
2020-01-20 15:11:57 +01:00
Erik Krogh Kristensen
5c6134db99
a bit of self-review and an auto-format
2020-01-20 14:55:49 +01:00
Erik Krogh Kristensen
ad813ef86c
add flowsTo to the use of isAdditionalLoadStep
2020-01-20 14:16:29 +01:00
Mathias Vorreiter Pedersen
13fc8741d4
C++: Include malloc example in qlhelp
2020-01-20 13:28:00 +01:00
Geoffrey White
79811fcccd
Merge pull request #2642 from jbj/TaintTracking-indirection
...
C++: Indirection for security.TaintTracking impl
2020-01-20 12:25:51 +00:00
Geoffrey White
5a20e85598
Merge pull request #2638 from jbj/ir-dispatch
...
C++ IR: Support for global virtual dispatch
2020-01-20 12:04:09 +00:00
Calum Grant
631b4248b5
C#: Add a nullness test
2020-01-20 11:13:31 +00:00
Mathias Vorreiter Pedersen
a43131a987
C++: Fix formatting
2020-01-20 11:39:48 +01:00
Jonas Jensen
391b80eac4
C++: Show virtual inheritance problem in vdispatch
2020-01-20 11:17:44 +01:00
Jonas Jensen
2a0fc31b68
C++: Comment and rename getSrc -> getDispatchValue
...
Better clarity was requested in the PR review.
2020-01-20 11:03:03 +01:00
Erik Krogh Kristensen
ffbd0f6632
update expected test output
2020-01-20 09:56:40 +01:00
Erik Krogh Kristensen
b3b132c66d
Merge remote-tracking branch 'upstream/master' into ExceptionalPromise
2020-01-20 09:20:09 +01:00
Jonas Jensen
742bd1c6ad
Merge pull request #2648 from rdmarsh2/getMemoryOperandDefinition-perf
...
C++: Performance fix for getMemoryOperandDefinition
2020-01-20 08:49:55 +01:00
Grzegorz Golawski
00ee3d2549
Query to detect LDAP injections in Java
...
Cleanup
2020-01-18 20:21:38 +01:00
Grzegorz Golawski
95723b08e1
Query to detect LDAP injections in Java
...
Add help
2020-01-18 19:01:35 +01:00
Grzegorz Golawski
8cec46342f
Query to detect LDAP injections in Java
...
Refactoring
2020-01-18 17:14:22 +01:00
Jonas Jensen
d3a1856793
Merge pull request #2646 from geoffw0/modelinet
...
CPP: Fix a mistake in Inet.qll.
2020-01-17 22:53:43 +01:00
Geoffrey White
97c346285e
CPP: Change note.
2020-01-17 18:56:21 +00:00
Geoffrey White
fcea3693f9
CPP: Remove now redundant special cases.
2020-01-17 18:56:21 +00:00
Geoffrey White
200545d88c
CPP: Add detail to the model.
2020-01-17 18:56:21 +00:00
Geoffrey White
77a3778eef
CPP: Add some strlen variants to the PureStrFunction model.
2020-01-17 18:56:21 +00:00
Jonas Jensen
3632d51abc
Merge pull request #2635 from geoffw0/modelstrdup
...
CPP: Model strdup
2020-01-17 19:26:26 +01:00
Geoffrey White
803da339a1
CPP: Fix a mistake in Inet.qll.
2020-01-17 17:44:42 +00:00
Geoffrey White
e4139fe427
Apply suggestions from code review
...
Additional corrections.
Co-Authored-By: Dave Bartolomeo <dbartol@github.com >
2020-01-17 17:20:37 +00:00
Geoffrey White
7dbda22a29
CPP: Update change note.
2020-01-17 16:19:39 +00:00
Geoffrey White
839fd8f848
CPP: Fix typo.
2020-01-17 16:10:41 +00:00
Robert Marsh
bd98427c5a
C++: sync files
2020-01-17 08:05:40 -08:00
Robert Marsh
bbf191e857
C++: fix join order in hasMemoryOperandDefinition
2020-01-17 08:05:40 -08:00
Robert Marsh
d91bc4ba72
C++: pull out hasMemoryOperandDefinition (slow)
2020-01-17 08:05:26 -08:00
Dave Bartolomeo
c7e62b4a35
Merge pull request #2613 from rdmarsh2/getPhiOperandDefinition-perf-2
...
C++: performance fixes for getPhiOperandDefinition
2020-01-17 09:01:33 -07:00
Mathias Vorreiter Pedersen
cd644ca5f2
Merge branch 'implicit-function-declaration' of github.com:MathiasVP/ql into implicit-function-declaration
2020-01-17 14:52:23 +01:00
Mathias Vorreiter Pedersen
303c6aa5b7
C++: Added query to suites and change-notes
2020-01-17 14:51:40 +01:00
Mathias Vorreiter Pedersen
4fc325f794
C++: Raise query to warning-high
2020-01-17 13:59:25 +01:00
Mathias Vorreiter Pedersen
aaf2679bf7
Remove incorrect html tag
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2020-01-17 13:52:38 +01:00
Mathias Vorreiter Pedersen
e79c0820ef
Fix reference
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2020-01-17 13:51:14 +01:00
Erik Krogh Kristensen
a25c5d7090
outlining a predicate to give hints about join ordering
2020-01-17 13:42:08 +01:00
Jonas Jensen
53e10e4c7f
Merge pull request #2634 from MathiasVP/overrideable-taint-sources
...
C++: Overrideable taint sources in DefaultTaintTracking
2020-01-17 13:01:03 +01:00
Mathias Vorreiter Pedersen
9e71e7f2ef
C++: Added .qlhelp file
2020-01-17 12:58:10 +01:00
Erik Krogh Kristensen
6ad62e32e0
copyPropertyStep works interprocedurally
2020-01-17 12:24:29 +01:00
Jonas Jensen
d19c77d473
C++: Indirection for security.TaintTracking impl
...
This change should make it easier to switch to the IR-based
`DefaultTaintTracking` code without getting a large and conflict-prone
diff.
2020-01-17 12:04:53 +01:00
Marc Waldman
dbe51e070f
Merge pull request #2 from marcrepo/patch-2
...
Documentation update for Issue #2623
2020-01-17 04:55:34 -05:00
Marc Waldman
a9b6b2c4cd
Merge pull request #1 from marcrepo/patch-1
...
Removed word "file" from description (see Issue 2623)
2020-01-17 04:55:06 -05:00
Marc Waldman
0d409b2d69
Documentation update for Issue #2623
...
Changes based on Issue #2623 - DescriptorNeverClosed.ql identifies only sockets (not file handles)
2020-01-17 04:46:10 -05:00
Marc Waldman
140051cc9a
Removed word "file" from description (see Issue 2623)
...
This pull request is in reference to Issue #2623 - "DescriptorNeverClosed.ql identifies only sockets (not file handles)"
2020-01-17 04:38:15 -05:00
Anders Schack-Mulligen
2dca188288
Java: Document two FPs with unit tests.
2020-01-17 09:57:11 +01:00
Jonas Jensen
5d08a0e338
Merge pull request #2558 from MathiasVP/ast-classes-should-not-be-abstract
...
C++: Ast classes should not be abstract
2020-01-17 08:47:55 +01:00
Mathias Vorreiter Pedersen
e4def730fd
C++: Fix alert message
2020-01-16 21:30:14 +01:00
Geoffrey White
3c41ed56a1
CPP: Support taint to return value derefs instead.
2020-01-16 18:15:21 +00:00
semmle-qlci
8dff8e77e1
Merge pull request #2637 from hvitved/csharp/non-assigned-fields-bad-magic
...
Approved by calumgrant
2020-01-16 15:44:25 +00:00
Robert Marsh
e0406190a1
Merge branch 'master' into getPhiOperandDefinition-perf-2
2020-01-16 07:23:59 -08:00
Robert Marsh
c942da524c
C++/C#: Sync
2020-01-16 07:16:57 -08:00
Robert Marsh
1b5d33023e
C++: actually fix Chi total operands
2020-01-16 07:15:08 -08:00
Mathias Vorreiter Pedersen
c1fcf78f16
C++: Fold predicate sameLocation
2020-01-16 16:14:55 +01:00
Erik Krogh Kristensen
06e898f53b
only use .getALocalSource in copyPropertyStep
2020-01-16 16:04:45 +01:00
Mathias Vorreiter Pedersen
04ef4d102d
C++: Remove unnecessary testcase
2020-01-16 15:10:37 +01:00
Jonas Jensen
f4d0c5e905
C++ IR: Support for global virtual dispatch
...
The IR data flow library now supports virtual dispatch with a library
that's similar to `security.TaintTracking`. In particular, it should
have the same performance characteristics. The main difference is that
non-recursive callers of `flowsFrom` now pass `_` instead of `true` for
`boolean allowFromArg`. This change allows flow through `return` to
actually work.
2020-01-16 14:51:28 +01:00
Erik Krogh Kristensen
9998059d59
add pragma to fix performance (same issue as in #2512 )
2020-01-16 14:16:04 +01:00
semmle-qlci
4efc418e2c
Merge pull request #2617 from asger-semmle/prototype-pollution-utility
...
Approved by esbena, mchammer01
2020-01-16 13:02:07 +00:00
Tom Hvitved
f4c255cb62
C#: Fix bad magic optimization in NonAssignedFields.ql
2020-01-16 12:31:14 +01:00
Geoffrey White
f4aba14d3a
CPP: Change note.
2020-01-16 11:08:19 +00:00
Geoffrey White
ef47563139
CPP: Support flow of pointed-to things through function calls.
2020-01-16 11:08:19 +00:00
Mathias Vorreiter Pedersen
87c59e0017
C++: Overrideable taint sources in DefaultTaintTracking
2020-01-16 11:10:43 +01:00
Erik Krogh Kristensen
4e880e2f96
implement SocketIO on top of the EventEmitter model
2020-01-16 11:02:36 +01:00
Asger F
7a1d068f1c
Update javascript/ql/src/Security/CWE-400/PrototypePollutionUtility.qhelp
...
Co-Authored-By: mc <42146119+mchammer01@users.noreply.github.com >
2020-01-16 09:47:18 +00:00
Mathias Vorreiter Pedersen
603b1c26a7
Merge branch 'master' into ast-classes-should-not-be-abstract
2020-01-16 10:16:03 +01:00
semmle-qlci
8128d23b6e
Merge pull request #2505 from erik-krogh/EventEmitter
...
Approved by esbena, max-schaefer
2020-01-16 08:47:38 +00:00
semmle-qlci
18879386bf
Merge pull request #2627 from asger-semmle/js-useless-expression-trycatch
...
Approved by esbena
2020-01-16 08:40:57 +00:00
Dave Bartolomeo
48301e1187
Merge pull request #2594 from rdmarsh2/ir-overlappingVariableMemoryLocations
...
C++: compute overlap on irvars with vvar indexes
2020-01-15 13:06:33 -07:00
Tom Hvitved
e5abaa79ae
Merge pull request #2585 from calumgrant/cs/serialization-check-bypass
...
C#: Improvements to cs/serialization-check-bypass
2020-01-15 20:40:51 +01:00
Geoffrey White
04af2ace94
CPP: Add DataFlow to strdup.
2020-01-15 19:18:37 +00:00
Geoffrey White
9b5be995d2
CPP: Split Strdup model into it's own class and file.
2020-01-15 18:38:33 +00:00
Geoffrey White
ce389ca791
CPP: Add tests for strdup.
2020-01-15 18:26:24 +00:00
Robert Marsh
a91f10fe40
Merge pull request #2629 from dbartol/dbartol/missing-vvars
...
C++/C#: Fix missing virtual variables
2020-01-15 08:32:43 -08:00
Calum Grant
6790028d4c
C#: Use guards library
2020-01-15 15:46:19 +00:00
Erik Krogh Kristensen
a76ab39a39
no longer need for .getALocalSource() in custom load/store
2020-01-15 16:00:57 +01:00
Erik Krogh Kristensen
e08fc08337
don't use pseudo-properties for resolved promise data-flow
2020-01-15 14:56:58 +01:00
Erik Krogh Kristensen
830100d2ed
support interprocedural flow with custom load/store steps
2020-01-15 14:23:17 +01:00
Asger Feldthaus
7141f15858
JS: Add change note
2020-01-15 11:49:57 +00:00
Asger Feldthaus
6d9306366c
JS: ignore useless-expr in first stmt in try block
2020-01-15 11:49:23 +00:00
Tom Hvitved
f7278d36e1
Merge pull request #2498 from aschackmull/java/taint-getter
...
Java/C++/C#: Add support for taint-getter/setter summaries in data flow.
2020-01-15 09:55:19 +01:00
Dave Bartolomeo
e60f902c36
C++/C#: Fix missing virtual variables
...
The aliased SSA code was assuming that, for every automatic variable, there would be at least one memory access that reads or writes the entire variable. We've encountered a couple cases where that isn't true due to extractor issues. As a workaround, we now always create the `VariableMemoryLocation` for every local variable.
I've also added a sanity test to detect this condition in the future.
Along the way, I had to fix a perf issue in the PrintIR code. When determining the ID of a result based on line number, we were considering all `Instruction`s generated for a particular line, regardless of whether they were all in the same `IRFunction`. In addition, the predicate had what appeared to be a bad join order that made it take forever on large snapshots. I've scoped it down to just consider `Instruction`s in the same function, and outlined that predicate to fix the join order issue. This causes some numbering changes, but they're for the better. I don't think there was actually any nondeterminism there before, but now the numbering won't depend on the number of instantiations of a template, either.
2020-01-14 17:57:15 -07:00
Grzegorz Golawski
b7325232d7
Query to detect LDAP injections in Java
...
Consider DNs as injection points as well
Add more taint steps
2020-01-14 23:07:21 +01:00
Robert Marsh
42be28b211
C++: autoformat
2020-01-14 13:17:57 -08:00
Robert Marsh
5a5832b7de
Merge pull request #2569 from jbj/ir-total-chi-flow
...
C++: IR data flow through total chi operands
2020-01-14 12:47:58 -08:00
Erik Krogh Kristensen
d09bce5cd7
custom load/store steps to implement promise flow
2020-01-14 21:37:55 +01:00
Geoffrey White
170981ef41
CPP: Change note.
2020-01-14 14:36:44 +00:00
Geoffrey White
e8139c0f31
CPP: Autoformat.
2020-01-14 14:35:58 +00:00
Geoffrey White
2fa846d1a6
CPP: Correct test.
2020-01-14 14:33:43 +00:00
Geoffrey White
d98d80b07d
CPP: Improve locations for AV Rule 114.ql.
2020-01-14 14:33:43 +00:00
Anders Schack-Mulligen
a6526c60cb
Java: Replace ad-hoc TestClass detection.
2020-01-14 14:26:22 +01:00
semmle-qlci
3c4749be88
Merge pull request #2624 from asger-semmle/js-duplicate-alert-strict-mode
...
Approved by max-schaefer
2020-01-14 11:59:45 +00:00
Anders Schack-Mulligen
241b8a05e4
Java/C++/C#: Address review comment.
2020-01-14 11:59:55 +01:00
Asger Feldthaus
2245882441
JS: Add change note and fix cwe tags
2020-01-14 10:53:40 +00:00
Asger Feldthaus
d76859b7df
JS: Address review comments
2020-01-14 10:53:00 +00:00
Asger F
2c05ee8ab8
JS: Add regression test
2020-01-14 10:53:00 +00:00
Asger F
9bd3c4a11c
JS: Add sanitizer for "in" exprs
2020-01-14 10:53:00 +00:00
Asger Feldthaus
7ac30e2289
JS: Add test for rephinement nodes
2020-01-14 10:53:00 +00:00
Asger F
a447645c10
JS: Add test with typeof on value
2020-01-14 10:52:59 +00:00
Asger F
bd9405ab84
JS: Guard against more FPs
2020-01-14 10:52:59 +00:00
Asger F
738123d3f5
JS: More sanitizers
2020-01-14 10:52:59 +00:00
Asger F
f7543aec95
JS: Support Reflect.ownKeys
2020-01-14 10:52:59 +00:00
Asger F
8af233307a
JS: Support enumeration through Object.entries
2020-01-14 10:52:59 +00:00
Asger F
ac2f0a8e11
JS: Do not require flow from key -> rhs
2020-01-14 10:52:59 +00:00
Asger F
96bf9db200
JS: Add another test and more barriers
2020-01-14 10:52:59 +00:00
Asger F
bc7871078a
JS: Fix FPs from Object.create(null)
2020-01-14 10:52:59 +00:00
Asger F
c889420dd3
JS: Add qhelp samples to test suite
2020-01-14 10:52:59 +00:00
Asger F
654f145772
JS: Add PrototypePollutionUtility query
2020-01-14 10:52:59 +00:00
Asger F
52cec25035
JS: Build access paths for array accesses
2020-01-14 10:52:59 +00:00
Tom Hvitved
5a4be67d81
Merge pull request #2597 from calumgrant/cs/multiline-alert-suppression
...
C#: Alert suppression through single-line /* */ style comments
2020-01-14 10:35:11 +01:00
Asger Feldthaus
73e60a7400
JS: Ignore strict-mode-call-stack-introspection for expr stmts
2020-01-13 16:03:03 +00:00
Anders Schack-Mulligen
041bcc5812
Java/C++/C#: Small perf improvement and simplification.
2020-01-13 17:00:56 +01:00
Jonas Jensen
b8ee5a63db
Merge pull request #2614 from geoffw0/arithun
...
CPP: Speed up ArithmeticUncontrolled.ql
2020-01-13 15:25:12 +01:00
Jonas Jensen
3183893a98
Merge pull request #2530 from geoffw0/hiddenqueries2
...
CPP: Speed up nullCheckAssert in InconsistentCheckReturnNull.ql.
2020-01-13 15:23:55 +01:00
Mathias Vorreiter Pedersen
1bc3829a72
C++: Use newly created library versions of the 'Underspecified Functions' queries in new ImplicitFunctionDeclaration query
2020-01-13 14:01:01 +01:00
Mathias Vorreiter Pedersen
acb106be44
C++: Fix formatting
2020-01-13 13:20:23 +01:00
semmle-qlci
40de391490
Merge pull request #2616 from asger-semmle/promise-missing-await-change-note
...
Approved by mchammer01
2020-01-13 12:03:11 +00:00
Asger F
6c4da30a64
Update change-notes/1.24/analysis-javascript.md
...
Co-Authored-By: mc <42146119+mchammer01@users.noreply.github.com >
2020-01-13 11:05:03 +00:00
Mathias Vorreiter Pedersen
394a864b0a
C++: Factored the body of TooManyArguments.ql out into a library file
2020-01-13 11:44:58 +01:00
Mathias Vorreiter Pedersen
6cff36b9c9
C++: Factored the body of TooFewArguments.ql out into a library file
2020-01-13 11:36:22 +01:00
Mathias Vorreiter Pedersen
e2244d41f5
C++: Factored the body of MistypedFunctionArguments.ql out into a library file
2020-01-13 11:34:01 +01:00
Anders Schack-Mulligen
183fd91a01
Merge pull request #2615 from yo-h/java-add-change-note
...
Java: add change note for `java/maven/non-https-url`
2020-01-13 09:54:48 +01:00
Grzegorz Golawski
3e86dd1182
Query to detect LDAP injections in Java
...
Apache LDAP API sink
2020-01-12 20:19:25 +01:00
Mathias Vorreiter Pedersen
c9439df914
C++: Added query that detects implicit function declarations
2020-01-12 16:28:30 +01:00
Grzegorz Golawski
c01aa3d2ee
Query to detect LDAP injections in Java
...
Spring LDAP sink
2020-01-12 13:28:29 +01:00
Grzegorz Golawski
7570fa9137
Query to detect LDAP injections in Java
...
JNDI and UnboundID sinks
JNDI, UnboundID and Spring LDAP sanitizers
2020-01-11 21:55:54 +01:00
Erik Krogh Kristensen
c50de3a7e8
update expected output of tests
2020-01-10 17:49:24 +01:00
Erik Krogh Kristensen
1619a98bc8
make the default registration/dispatch extend DataFlow::InvokeNode
2020-01-10 17:40:16 +01:00
yo-h
bf8ef42c1a
Java: add change note for java/maven/non-https-url
2020-01-10 11:03:48 -05:00
Taus
cfb84be7b1
Merge pull request #2540 from RasmusWL/python-modernise-variables-queries
...
Python: modernise variables queries
2020-01-10 14:45:12 +01:00
Geoffrey White
9176529799
Merge pull request #2599 from MathiasVP/assign-where-compare-meant-false-positives
...
Assign where compare meant false positives
2020-01-10 13:39:39 +00:00
Erik Krogh Kristensen
ec5896abba
add additional data-flow edges to data-flow related to promises
2020-01-10 14:12:53 +01:00
Mathias Vorreiter Pedersen
111f1dbd19
Merge branch 'assign-where-compare-meant-false-positives' of github.com:MathiasVP/ql into assign-where-compare-meant-false-positives
2020-01-10 13:14:00 +01:00
Mathias Vorreiter Pedersen
f80c13abd7
C++: Fixed incorrect comments in testcases
2020-01-10 12:24:43 +01:00
Asger Feldthaus
18db551e10
JS: Add change note for js/missing-await
2020-01-10 11:10:57 +00:00
Mathias Vorreiter Pedersen
f181753c35
Typo fix
...
Co-Authored-By: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2020-01-10 11:49:03 +01:00
Mathias Vorreiter Pedersen
21c99d1827
Typo fix
...
Co-Authored-By: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2020-01-10 11:46:14 +01:00
Anders Schack-Mulligen
ad92d6fe0f
Merge pull request #2607 from yo-h/java-alert-suppression-block-comment
...
Java: allow single-line `/* ... */` comments for alert suppression
2020-01-10 11:05:23 +01:00
yo-h
7ffa517803
Merge pull request #2584 from aschackmull/java/nonnull-final-field
...
Java: Include non-null final fields in clearlyNotNull.
2020-01-09 18:48:45 -05:00
Robert Marsh
d2b225790a
C++: fix chi instr oeprands to chi instrs
2020-01-09 11:48:18 -08:00
Erik Krogh Kristensen
87bbbd643c
changes based on review feedback
2020-01-09 16:18:32 +01:00
Erik Krogh Kristensen
af8b36b750
Merge remote-tracking branch 'upstream/master' into EventEmitter
2020-01-09 15:09:43 +01:00
Geoffrey White
1d615d311c
CPP: Autoformat.
2020-01-09 13:48:58 +00:00
Geoffrey White
f6f7df4e8f
CPP: Speed up nullCheckAssert in InconsistentCheckReturnNull.ql.
2020-01-09 13:48:13 +00:00
Geoffrey White
50c0ec1cb1
CPP: Optimize isRandValue.
2020-01-09 12:12:00 +00:00
semmle-qlci
f1f69ef85d
Merge pull request #2589 from esbena/js/ignore-duplicate-params-for-empty-functions
...
Approved by erik-krogh
2020-01-09 11:58:04 +00:00
Robert Marsh
5007fd2aa8
C++: Autoformat and sync
2020-01-08 12:49:51 -08:00
Robert Marsh
e416d75f6f
C++: add noopt on getPhiOperandDefinition
2020-01-08 11:36:57 -08:00
Jonas Jensen
8acbb3bfb9
C++: Further simplify a bit
...
This changes tuple counts!?
2020-01-08 11:36:50 -08:00
Jonas Jensen
5072201b7e
C++: Fix join order
2020-01-08 11:36:40 -08:00
Jonas Jensen
838720bef0
C++: de-inline getDefinitionOrChiInstruction
...
Still has bad join order
2020-01-08 11:36:34 -08:00
Jonas Jensen
3d2cc7bbce
C++: make hasPhiOperandDefinition feasible
2020-01-08 11:36:14 -08:00
Jonas Jensen
55f157e06d
C++: Fix overlappingVariableMemoryLocations perf
...
The `overlappingVariableMemoryLocations` predicate was a helper
predicate introduced to fix a join-order issue in
`overlappingIRVariableMemoryLocations`. Unfortunately it caused a
performance issue of its own because it could grow too large. On the
small project (38MB zip) awslabs/s2n there were 181M rows in
`overlappingVariableMemoryLocations`, and it took 134s to evaluate.
The fix is to collapse the two predicates into one and fix join ordering
by including an extra column in the predicates being joined.
In addition, some parameters were reordered to avoid the overhead of
auto-generated `join_rhs` predicates.
Tuple counts of `overlappingVariableMemoryLocations` before:
623285 ~176% {2} r1 = JOIN AliasedSSA::isCoveredOffset#fff_120#join_rhs AS L WITH AliasedSSA::isCoveredOffset#fff_120#join_rhs AS R ON FIRST 2 OUTPUT L.<2>, R.<2>
119138 ~3% {2} r2 = SCAN AliasedSSA::VariableMemoryLocation::getVirtualVariable_dispred#ff AS I OUTPUT I.<1>, I.<0>
172192346 ~0% {2} r3 = JOIN r2 WITH AliasedSSA::hasUnknownOffset#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r2.<1>
172815631 ~0% {2} r4 = r1 \/ r3
172192346 ~0% {2} r5 = JOIN r2 WITH AliasedSSA::hasUnknownOffset#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r2.<1>, R.<1>
345007977 ~87% {2} r6 = r4 \/ r5
return r6
Tuple counts of `overlappingIRVariableMemoryLocations` after:
117021 ~134% {2} r1 = JOIN AliasedSSA::isCoveredOffset#ffff AS L WITH AliasedSSA::isCoveredOffset#ffff AS R ON FIRST 3 OUTPUT L.<3>, R.<3>
201486 ~1% {2} r2 = JOIN AliasedSSA::hasUnknownOffset#fff AS L WITH AliasedSSA::hasVariableAndVirtualVariable#fff AS R ON FIRST 2 OUTPUT L.<2>, R.<2>
318507 ~26% {2} r3 = r1 \/ r2
201486 ~3% {2} r4 = JOIN AliasedSSA::hasUnknownOffset#fff AS L WITH AliasedSSA::hasVariableAndVirtualVariable#fff AS R ON FIRST 2 OUTPUT R.<2>, L.<2>
519993 ~92% {2} r5 = r3 \/ r4
return r5
2020-01-08 11:07:20 -08:00
Robert Marsh
9b361f1701
Merge pull request #2601 from dbartol/dbartol/OpcodeProperties
...
C++: Consolidate opcode properties onto `Opcode` class
2020-01-08 11:05:41 -08:00
Geoffrey White
cf5dd85944
Merge pull request #2577 from MathiasVP/multiplication-overflow-not-possible-due-to-type-width
...
Multiplication overflow not possible due to type width
2020-01-08 17:18:33 +00:00
shati-patel
ad0ad3a3e4
Merge pull request #2612 from jf205/recent-changes
...
CodeQL docs: port recent fixes to rc/1.23
2020-01-08 16:36:27 +00:00
james
2407eb103a
docs: fix list
...
(cherry picked from commit 618a3f91d8 )
2020-01-08 16:16:39 +00:00
Rasmus Wriedt Larsen
cdcca630f3
docs: remove extra comma in dataflow articles
...
(cherry picked from commit e882060839 )
2020-01-08 16:16:39 +00:00
Rasmus Wriedt Larsen
24e551905e
docs: Fix Python taint tracking links
...
at some point we moved security/TaintTracking.qll to dataflow/TaintTracking.qll
(cherry picked from commit f44ce7d647 )
2020-01-08 16:16:39 +00:00
james
97d3d1fca3
docs: fix ast node link
...
(cherry picked from commit cff5df0779 )
2020-01-08 16:16:39 +00:00
shati-patel
3cfc7d2e54
Merge pull request #2611 from jf205/mergeback-123
...
Merge rc/1.23 into master
2020-01-08 16:12:47 +00:00
Dave Bartolomeo
6c8de44800
Merge pull request #2604 from geoffw0/returnthis
...
CPP: Exclude template classes from cpp/assignment-does-not-return-this
2020-01-08 09:12:22 -07:00
james
490e13060c
Merge branch 'rc/1.23' into mergeback-123
2020-01-08 16:00:19 +00:00
shati-patel
e103527d32
Merge pull request #2610 from jf205/python-link
...
docs: fix link in Python topic
2020-01-08 15:48:37 +00:00
james
cff5df0779
docs: fix ast node link
2020-01-08 15:30:04 +00:00
Max Schaefer
308da0774d
Merge pull request #2525 from asger-semmle/promise-missing-await
...
JS: New query: missing await
2020-01-08 15:29:45 +00:00
Max Schaefer
de15ecf47b
Merge pull request #2593 from asger-semmle/regexp-always-matches
...
JS: Add RegExpAlwaysMatches query
2020-01-08 15:21:39 +00:00
James Fletcher
8e700081f1
Merge pull request #2609 from RasmusWL/doc-fix-python-taint-links
...
docs: Fix Python taint tracking links
2020-01-08 15:21:07 +00:00
Rasmus Wriedt Larsen
f44ce7d647
docs: Fix Python taint tracking links
...
at some point we moved security/TaintTracking.qll to dataflow/TaintTracking.qll
2020-01-08 16:10:27 +01:00
yo-h
1078424f79
Java: allow single-line /* ... */ comments for alert suppression
2020-01-08 09:19:25 -05:00
shati-patel
9b4f6af007
Merge pull request #2605 from RasmusWL/small-doc-fix
...
docs: remove extra comma in dataflow articles
2020-01-08 14:01:41 +00:00
Rasmus Wriedt Larsen
e882060839
docs: remove extra comma in dataflow articles
2020-01-08 14:53:31 +01:00
Geoffrey White
b6e1f35ff6
CPP: Generalize the fix to all template code.
2020-01-08 13:36:59 +00:00
Geoffrey White
8044fefb1f
CPP: Change note.
2020-01-08 13:19:11 +00:00
Geoffrey White
527d29ba23
CPP: Exclude template classes from the query.
2020-01-08 13:16:38 +00:00
Geoffrey White
d527dbe47a
CPP: Add test case.
2020-01-08 13:13:06 +00:00
Asger Feldthaus
775e63d9c0
JS: Fix qhelp validation error
2020-01-08 10:38:10 +00:00
Asger F
ef79023e52
Update javascript/ql/src/Expressions/MissingAwait.qhelp
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-01-08 10:23:30 +00:00
Tom Hvitved
85f6e5fe22
Merge pull request #2450 from calumgrant/cs/expr-nullability
...
C#: Expression nullability
2020-01-08 09:50:03 +01:00
Mathias Vorreiter Pedersen
100ace532f
C++: Fixed handling of false negative. Query now supports global variables
2020-01-07 22:57:21 +01:00
Mathias Vorreiter Pedersen
db08076fed
C++: Fixed false negative
2020-01-07 22:20:04 +01:00
Mathias Vorreiter Pedersen
229da0a9c0
C++: Add testcase demonstrating false negative
2020-01-07 22:12:34 +01:00
Dave Bartolomeo
690d23d15e
C++: Fix formatting
2020-01-07 13:23:36 -07:00
Dave Bartolomeo
9df37399f8
C++: Consolidate opcode properties onto Opcode class
...
Previously, we had several predicates on `Instruction` and `Operand` whose values were determined solely by the opcode of the instruction. For large snapshots, this meant that we would populate large tables mapping each of the millions of `Instruction`s to the appropriate value, times three (once for each IR flavor).
This change moves all of these opcode properties onto `Opcode` itself, with inline wrapper predicates on `Instruction` and `Operand` where necessary. On smaller snapshots, like ChakraCore, performance is a wash, but this did speed up Wireshark by about 4%.
Even ignoring the modest performance benefit, having these properties defined on `Opcode` seems like a better organization than having them on `Instruction` and `Operand`.
2020-01-07 13:17:27 -07:00
Calum Grant
bc1b2c3ead
C#: Address review comment
2020-01-07 18:39:52 +00:00
Calum Grant
d0d7ed620c
C#: Update comments in test file to reflect fixed test output.
2020-01-07 18:39:52 +00:00
Calum Grant
359dea2c2b
C#: Fixed test output.
2020-01-07 18:39:52 +00:00
Calum Grant
bcd8dca780
C#: When creating conditionally accessed expressions, use the typeinfo from the conditional expression to ensure correct flow state and type nullability.
2020-01-07 18:39:51 +00:00
Calum Grant
85c9459b35
C#: Add more tests showing incorrect extraction.
2020-01-07 18:39:51 +00:00
Calum Grant
10181e93e2
C#: Update QLtest output
2020-01-07 18:39:51 +00:00
Calum Grant
a1bedf2e06
C#: Use expression flow state to determine non-null guards
2020-01-07 18:39:51 +00:00
Calum Grant
2eb29224e8
C#: Update guards tests.
2020-01-07 18:39:51 +00:00
Calum Grant
ecb22f1379
C#: Fix typo in dbscheme.
2020-01-07 18:39:51 +00:00
Calum Grant
f67240a316
C#: Analysis change notes
2020-01-07 18:39:51 +00:00
Calum Grant
1036640e24
C#: Update db stats
2020-01-07 18:38:58 +00:00
Calum Grant
4e710e9685
C#: DB upgrade script
2020-01-07 18:38:58 +00:00
Calum Grant
8db46bc8ec
C#: More tests for nullable flow state.
2020-01-07 18:38:58 +00:00
Calum Grant
6c9ebaba0b
C#: Populate expression type nullability and nullable flow state.
2020-01-07 18:38:58 +00:00
Calum Grant
0327b83958
C#: Update nullability tests.
2020-01-07 18:38:58 +00:00
Dave Bartolomeo
3072e9c7da
Merge pull request #2598 from geoffw0/av114_asm
...
CPP: Exclude functions containing asm from cpp/missing-return
2020-01-07 09:04:14 -07:00
Mathias Vorreiter Pedersen
633c42ced0
C++: Removed comment
2020-01-07 14:41:37 +01:00
Anders Schack-Mulligen
d918cb1f6f
Merge pull request #2550 from JLLeitschuh/task/JLL/improve_netty_response_splitting_detection
...
Add io.netty.handler.codec.http.DefaultHttpResponse to Netty Response Splitting Detection
2020-01-07 14:28:01 +01:00
Mathias Vorreiter Pedersen
d9f931da3c
C++: Fix false positives
2020-01-07 14:16:50 +01:00
Mathias Vorreiter Pedersen
6bbe2c48bf
C++: Add testcase demonstrating false positive
2020-01-07 14:13:34 +01:00
Geoffrey White
c584ceb2f4
CPP: Change note.
2020-01-07 12:46:07 +00:00
Geoffrey White
72b4792391
CPP: Exception for AsmStmts.
2020-01-07 12:46:07 +00:00
Geoffrey White
0a85637fef
CPP: Add a test.
2020-01-07 12:46:07 +00:00
Mathias Vorreiter Pedersen
9a841636dc
C++: Fix false positive
2020-01-07 13:22:07 +01:00
Mathias Vorreiter Pedersen
faa9d83567
C++: Add testcase demonstrating false positive
2020-01-07 13:18:38 +01:00
Mathias Vorreiter Pedersen
bdd0589223
C++: Fix false positive
2020-01-07 13:16:47 +01:00
Calum Grant
d8f5450b67
C#: Alert suppression comments can be in C89-style comments
2020-01-07 11:52:52 +00:00
Mathias Vorreiter Pedersen
428e357488
C++: Add testcase demonstrating false positive
2020-01-07 11:41:48 +01:00
semmle-qlci
0e16969e15
Merge pull request #2591 from max-schaefer/js/fix-16
...
Approved by asgerf
2020-01-07 10:36:19 +00:00
Asger Feldthaus
d55d5cc4ed
JS: Address comments from doc review
2020-01-07 10:27:46 +00:00
Asger Feldthaus
66a16d21a9
JS: Fix buggy test cases
2020-01-07 10:19:09 +00:00
Asger Feldthaus
2d534163d0
JS: Add test for empty regex
2020-01-07 10:10:29 +00:00
Asger Feldthaus
9f6e04887b
JS: Fix FP from word boundaries
2020-01-07 10:09:17 +00:00
Tom Hvitved
5552c2e912
Merge pull request #2563 from calumgrant/cs/tuple-expr
...
C#: Handle tuple expressions
2020-01-07 09:31:17 +01:00
Robert Marsh
367d13c0ad
Merge pull request #2570 from jbj/ir-overlappingVariableMemoryLocations
...
C++: Fix overlappingVariableMemoryLocations perf
2020-01-06 10:57:48 -08:00
Robert Marsh
ba9741f552
C++: compute overlap on irvars with vvar indexes
2020-01-06 09:14:03 -08:00
Anders Schack-Mulligen
9ba169b346
Java: Fix bad join-order.
2020-01-06 16:52:06 +01:00
Calum Grant
c145e32625
C#: Tests for multiline alert suppression comments
2020-01-06 15:45:00 +00:00
Asger F
b604be5cfb
Apply suggestions from code review
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-01-06 14:44:02 +00:00
Asger Feldthaus
4c25d84b6e
JS: Fix and expand test cases
2020-01-06 14:43:29 +00:00
Tom Hvitved
ed2125969e
Merge pull request #2568 from calumgrant/cs/assignment-to-_
...
C#: Remove FP in useless assignment to _
2020-01-06 15:39:45 +01:00
Max Schaefer
9160fbf106
Merge pull request #2435 from asger-semmle/phi-edge-barrier-guards
...
JS: Phi edge barrier guards
2020-01-06 14:14:18 +00:00
semmle-qlci
f48e4bc2a0
Merge pull request #2580 from asger-semmle/typescript-unbounded-recursion
...
Approved by max-schaefer
2020-01-06 14:00:55 +00:00
semmle-qlci
0c0073fb02
Merge pull request #2582 from asger-semmle/spurious-css-import
...
Approved by max-schaefer
2020-01-06 14:00:08 +00:00
semmle-qlci
7e9b5b1036
Merge pull request #2590 from asger-semmle/ts-install-deps-unverbose
...
Approved by max-schaefer
2020-01-06 13:57:43 +00:00
Asger F
9928762769
JS: Add RegExpAlwaysMatches query
2020-01-06 13:48:02 +00:00
Mathias Vorreiter Pedersen
9ed1510a8c
C++: Improved query precision using SimpleRangeAnalysis
2020-01-06 14:16:52 +01:00
semmle-qlci
39531c6516
Merge pull request #2574 from max-schaefer/js/fix-17
...
Approved by erik-krogh
2020-01-06 12:43:56 +00:00
Taus Brock-Nannestad
851d692996
Python: Remove manual TC from ssaShortCut.
...
This caused a massive slowdown on certain snapshots.
2020-01-06 13:40:52 +01:00
Rasmus Wriedt Larsen
5d01cb7c28
Python: Fix bad QL-rewriting
...
Original code:
exists(Expr e, For forloop | forloop = loop and e.pointsTo(_, _, capturing) |
not loop.contains(e)
)
The new version will preserve the same semantics. The problem with the first
rewrite was that `not loop.(For).somethingMore` would hold for any AstNode that
was not a For
2020-01-06 13:30:37 +01:00
Asger F
79f8d02019
JS: Add change note
2020-01-06 11:38:13 +00:00
Asger F
4d25bfc038
JS: Fix copy pasta
2020-01-06 11:37:21 +00:00
Asger F
142c83f38f
JS: Add negative dominance test
2020-01-06 11:37:21 +00:00
Asger F
aa6572b5c8
JS: Sanitize phi edges from barrier guards
2020-01-06 11:37:21 +00:00
Asger F
0b04f0d8f7
JS: Add test case for phi input
2020-01-06 11:37:20 +00:00
Max Schaefer
9391d36699
JavaScript: Teach extractor to tolerate assignment patterns in AST.
...
Our database representation of ASTs does not use assignment patterns, instead encoding the relevant information directly in the associated function/loop/assignment. We convert from an AST with assignment patterns to one without during parsing, so the extractor does not expect any assignment patterns to be present in the AST.
Due to a bug in the parser, this can currently happen for malformed programs. While we should fix that bug once it gets fixed in Acorn, it also makes sense for the extractor to be more robust, so this PR teaches the `ASTExtractor` pass to raise a parse error when it encounters an assignment pattern, and all other passes to simply ignore them.
2020-01-06 11:31:36 +00:00
Asger F
a3481b3713
TS: Do not pass --verbose to yarn
2020-01-06 11:18:58 +00:00
semmle-qlci
48deb30756
Merge pull request #2573 from max-schaefer/js/generalise-alert-suppression
...
Approved by asgerf
2020-01-06 10:43:17 +00:00
Rasmus Wriedt Larsen
9b0b0c338f
Python: Cleanup overrides tests
2020-01-06 10:55:37 +01:00
Mathias Vorreiter Pedersen
7b5dd56009
C++: Added .stats file
2020-01-06 09:45:58 +01:00
semmle-qlci
5dcc5b3b1e
Merge pull request #2581 from erik-krogh/FlowUselessExpr
...
Approved by max-schaefer
2020-01-06 08:33:36 +00:00
Esben Sparre Andreasen
9279bfc8a2
JS: add test case for arrow functions with duplicate parameter names
2020-01-06 09:21:36 +01:00
Esben Sparre Andreasen
96748ca32e
JS: sharpen js/duplicate-parameter-name
2020-01-06 08:51:00 +01:00
Esben Sparre Andreasen
5718fbd98a
JS: update test
2020-01-06 08:33:38 +01:00
Grzegorz Golawski
4ce25c045d
Simplify the query
2020-01-05 22:05:00 +01:00
Grzegorz Golawski
ab49397bb8
Add check for disabled CSRF protection in Spring
2020-01-03 21:52:50 +01:00
Calum Grant
41b4d70504
C#: Refactor, improve documentation and add tests for cs/serialization-check-bypass
2020-01-03 18:46:39 +00:00
shati-patel
9b9d7121e8
Merge pull request #2583 from jf205/advanced-ql
...
CodeQL documentation: reorganize 'Advanced QL' topics
2020-01-03 16:02:28 +00:00
James Fletcher
47f61f3569
Update docs/language/learn-ql/writing-queries/debugging-queries.rst
...
Co-Authored-By: shati-patel <42641846+shati-patel@users.noreply.github.com >
2020-01-03 15:55:14 +00:00
james
537739c42d
docs: address review comments
2020-01-03 15:31:31 +00:00
Anders Schack-Mulligen
e74aa33f9d
Java: Include non-null final fields in clearlyNotNull.
2020-01-03 16:24:54 +01:00
Asger F
503bcdc5d7
JS: Dont capitalize Promise in prose
2020-01-03 14:16:31 +00:00
Asger F
3c601fce74
Apply suggestions from code review
...
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com >
2020-01-03 14:15:52 +00:00
Asger F
30a8769dad
JS: Add more bad promise contexts
2020-01-03 14:12:55 +00:00
Mathias Vorreiter Pedersen
e926966e73
C++: Added more tests
2020-01-03 14:08:12 +01:00
Mathias Vorreiter Pedersen
cea78879b2
C++: Rename variables in tests to reflect their types
2020-01-03 14:07:19 +01:00
semmle-qlci
dc7863ce29
Merge pull request #2579 from asger-semmle/typescript-trace-resolution
...
Approved by max-schaefer
2020-01-03 12:57:43 +00:00
Jonathan Leitschuh
0e2c5db7b1
Netty Response Splitting use CompileTimeConstantExpr
...
Co-Authored-By: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-01-03 07:51:55 -05:00
james
23d1e06aa4
docs: move abstract classes topic to handbook
2020-01-03 12:07:01 +00:00
james
e8016a2303
docs: delete equivalence topic
2020-01-03 12:07:01 +00:00
james
fe18c18619
docs: move folding predicates topic
2020-01-03 12:06:55 +00:00
Asger F
4772798d7b
JS: do not resolve arbitrary extensions to JavaScript files
2020-01-03 11:37:51 +00:00
Asger F
c5f73cb868
JS: Add test showing spurious .css import
2020-01-03 10:59:10 +00:00
semmle-qlci
29be46169a
Merge pull request #2576 from asger-semmle/typescript-cyclic-prop-fallthroughnode
...
Approved by max-schaefer
2020-01-03 10:50:05 +00:00
Asger F
f31d47c66e
TS: explain test case
2020-01-03 10:48:15 +00:00
Asger F
36546ce7fe
TS: Print warning when bailing out of symbol type
2020-01-03 10:45:18 +00:00
Erik Krogh Kristensen
c22d3d0b3a
add test for block-level flow type annotations
2020-01-03 11:07:35 +01:00
semmle-qlci
06d812a6ff
Merge pull request #2556 from erik-krogh/RegexpVoidCxt
...
Approved by max-schaefer
2020-01-03 08:38:56 +00:00
Asger F
3a4771c29c
TS: Wrap getTypeOfSymbolAtLocation in try/catch
2020-01-02 16:55:17 +00:00
Asger F
202746e92d
TS: Guard getTypeAtLocation with try/catch
2020-01-02 16:31:23 +00:00
Asger F
0388e9ca0c
TS: Add regression test
2020-01-02 16:28:49 +00:00
shati-patel
564013d188
Merge pull request #2578 from jf205/ql-spec-fixes
...
QL spec: fix bullet list in 'Aggregations' section
2020-01-02 15:55:49 +00:00
james
618a3f91d8
docs: fix list
2020-01-02 15:48:57 +00:00
Asger F
2ca0e7d232
TS: Disable output from tracing
2020-01-02 15:38:10 +00:00
Asger F
8f478f7caf
TS: Add test with traceResolution: true
2020-01-02 15:04:30 +00:00
Mathias Vorreiter Pedersen
7dbb191531
C++: Improve query precision
2020-01-02 15:53:22 +01:00
Mathias Vorreiter Pedersen
cfb839a8f9
C++: Add test demonstrating the false positive
2020-01-02 15:48:01 +01:00
James Fletcher
f48b8fef20
Merge pull request #2575 from shati-patel/qlhb/bindingset
...
QL HB: Add bindingset example
2020-01-02 14:46:21 +00:00
shati-patel
f38ae3c677
QL HB: Reword description
...
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2020-01-02 14:41:58 +00:00
Shati Patel
94d55e90b0
QL HB: Use "real" example
2020-01-02 14:25:44 +00:00
Asger F
bcf1533e71
TS: Blacklist cyclic property fallthroughFlowNode
2020-01-02 14:13:48 +00:00
Anders Schack-Mulligen
7e987c570f
Merge pull request #2413 from JLLeitschuh/feature/JLL/maven_insecure_artifact_resolution
...
Java: Use of HTTP/FTP to download/upload Maven artifacts
2020-01-02 14:47:30 +01:00
Shati Patel
b68f9f7e00
QL HB: Add bindingset example
2020-01-02 13:06:17 +00:00
Max Schaefer
8d1ad5c5f3
JavaScript: Alert suppression through single-line /* */ style comments.
2020-01-02 10:45:20 +00:00
Erik Krogh Kristensen
d1a77d6993
refactor isInterpretedAsRegExp to directly work on a DataFlow node
2020-01-02 11:18:14 +01:00
Max Schaefer
de02bb4a0d
JavaScript: Prevent joining on configuration in onPath.
2020-01-02 09:49:09 +00:00
Max Schaefer
2a55ba5d4f
JavaScript: Fix join order in PathNode.getASuccessor.
2020-01-02 09:48:57 +00:00
Jonas Jensen
4830e43b3e
C++: Fix overlappingVariableMemoryLocations perf
...
The `overlappingVariableMemoryLocations` predicate was a helper
predicate introduced to fix a join-order issue in
`overlappingIRVariableMemoryLocations`. Unfortunately it caused a
performance issue of its own because it could grow too large. On the
small project (38MB zip) awslabs/s2n there were 181M rows in
`overlappingVariableMemoryLocations`, and it took 134s to evaluate.
The fix is to collapse the two predicates into one and fix join ordering
by including an extra column in the predicates being joined.
In addition, some parameters were reordered to avoid the overhead of
auto-generated `join_rhs` predicates.
Tuple counts of `overlappingVariableMemoryLocations` before:
623285 ~176% {2} r1 = JOIN AliasedSSA::isCoveredOffset#fff_120#join_rhs AS L WITH AliasedSSA::isCoveredOffset#fff_120#join_rhs AS R ON FIRST 2 OUTPUT L.<2>, R.<2>
119138 ~3% {2} r2 = SCAN AliasedSSA::VariableMemoryLocation::getVirtualVariable_dispred#ff AS I OUTPUT I.<1>, I.<0>
172192346 ~0% {2} r3 = JOIN r2 WITH AliasedSSA::hasUnknownOffset#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r2.<1>
172815631 ~0% {2} r4 = r1 \/ r3
172192346 ~0% {2} r5 = JOIN r2 WITH AliasedSSA::hasUnknownOffset#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r2.<1>, R.<1>
345007977 ~87% {2} r6 = r4 \/ r5
return r6
Tuple counts of `overlappingIRVariableMemoryLocations` after:
117021 ~134% {2} r1 = JOIN AliasedSSA::isCoveredOffset#ffff AS L WITH AliasedSSA::isCoveredOffset#ffff AS R ON FIRST 3 OUTPUT L.<3>, R.<3>
201486 ~1% {2} r2 = JOIN AliasedSSA::hasUnknownOffset#fff AS L WITH AliasedSSA::hasVariableAndVirtualVariable#fff AS R ON FIRST 2 OUTPUT L.<2>, R.<2>
318507 ~26% {2} r3 = r1 \/ r2
201486 ~3% {2} r4 = JOIN AliasedSSA::hasUnknownOffset#fff AS L WITH AliasedSSA::hasVariableAndVirtualVariable#fff AS R ON FIRST 2 OUTPUT R.<2>, L.<2>
519993 ~92% {2} r5 = r3 \/ r4
return r5
2019-12-27 16:06:24 +01:00
Calum Grant
68f42a6f47
C#: Analysis change notes
2019-12-27 12:07:26 +00:00
Calum Grant
3db900b183
C#: Remove false positive and update test output
...
C#: Mark results as GOOD
2019-12-27 12:07:19 +00:00
Calum Grant
fd0225ca59
C#: Add test
2019-12-27 11:44:39 +00:00
Jonas Jensen
618bf2e29e
C++: IR data flow through total chi operands
2019-12-27 11:44:41 +01:00
Jonas Jensen
64c79bf9e1
C++: Deprecate UninitializedNode in IR data flow
...
It's not used outside of tests, and it's not useful. It will break the
tests when we start allowing flow through chi nodes.
2019-12-27 11:21:33 +01:00
Calum Grant
0f178be12e
C#: Update change notes.
2019-12-23 15:29:20 +00:00
Calum Grant
a059c13f6c
C#: Add test for tuple expressions.
2019-12-23 15:18:28 +00:00
Calum Grant
63afb30797
C#: Tests for tuple expressions.
2019-12-23 15:18:21 +00:00
Calum Grant
e83b159bf8
C#: Handle TupleType expression.
2019-12-23 15:18:21 +00:00
Calum Grant
ad764b1dc6
C#: Update .gitignore
2019-12-23 14:31:54 +00:00
Mathias Vorreiter Pedersen
c9fe3e4d2d
C++: Updated upgrade script
2019-12-23 14:13:12 +01:00
Mathias Vorreiter Pedersen
bb282f403e
Fix comments
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-12-23 12:37:18 +01:00
Mathias Vorreiter Pedersen
11a545e08e
C++: Removed abstract classes from binary and assignment operations
2019-12-23 11:52:12 +01:00
Mathias Vorreiter Pedersen
6998336fb9
C++: Format .dbscheme file
2019-12-23 10:57:38 +01:00
Mathias Vorreiter Pedersen
46421efcef
C++: Rename crement operations
2019-12-23 10:41:14 +01:00
Mathias Vorreiter Pedersen
1b29e6c082
Remove @prefix_crement_oper_expr and @postfix_crement_oper_expr clauses
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-12-23 10:28:35 +01:00
Jonas Jensen
7e84453ec9
Merge pull request #2542 from geoffw0/datetime
...
C++: Sort through the leap year and japanese era queries
2019-12-23 10:13:12 +01:00
semmle-qlci
f921cf7d01
Merge pull request #2512 from erik-krogh/moarExceptions
...
Approved by esbena, max-schaefer
2019-12-20 20:31:50 +00:00
Dave Bartolomeo
5b5d2f2b67
Merge pull request #2154 from rdmarsh2/rdmarsh/cpp/ir-callee-side-effects
...
C++: add InitializeIndirection for pointer params
2019-12-20 13:13:54 -07:00
Mathias Vorreiter Pedersen
cb22702908
C++: Added update script
2019-12-20 18:38:14 +01:00
Mathias Vorreiter Pedersen
006c8bb0cd
C++: Remove abstract classes from unary operations
2019-12-20 18:38:09 +01:00
Rasmus Wriedt Larsen
92e272cc03
Python: Address comments for modernising Variables/
2019-12-20 15:58:51 +01:00
Rasmus Wriedt Larsen
b8a9a353b8
Python: Autoformat Variables/*
2019-12-20 15:08:20 +01:00
Rasmus Wriedt Larsen
25ab0ed20f
Python: Modernise Variables/MonkeyPatched.qll
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
994ad197c4
Python: Add Module::builtinModule()
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
58bb16e5dd
Python: Modernise Variables/Undefined.qll
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
34f9135492
Python: Modernise py/unused-parameter
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
15bc4cd090
Python: Add override helpers to Value classes
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
aba3ac7b66
Python: Modernise py/uninitialized-local-variable
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
697a006ef2
Python: Modernise py/undefined-global-variable
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
5faa7e7127
Python: Add ModuleValue::hasCompleteExportInfo
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
3ffea599f1
Python: Rewrite casts for py/undefined-global-variable
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
81e27aab8d
Python: Modernise py/unused-loop-variable
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
8f7ba0a06d
Python: Modernise py/local-shadows-global
2019-12-20 15:05:49 +01:00
Rasmus Wriedt Larsen
9f4088413a
Python: Modernise py/local-shadows-builtin
...
+ moved `scope instanceof Function` so it makes more sense :)
2019-12-20 15:05:49 +01:00
yo-h
cc7f98e0f6
Merge pull request #2555 from hvitved/csharp/xml-sync
...
C#: Sync `XML.qll` with other languages
2019-12-20 09:03:55 -05:00
Jonas Jensen
de55a6846f
Merge pull request #2204 from alexet/cache-to-string
...
Cache the computation of core toString predicates for cpp c# and java.
2019-12-20 14:54:46 +01:00
Tom Hvitved
665d38647d
Merge pull request #2557 from calumgrant/cs/extractor-label-catch
...
C# extractor: Catch exceptions when generating trap
2019-12-20 13:09:21 +01:00
Erik Krogh Kristensen
a0b5aa5ae4
more precise heuristic to identify allowed call targets
2019-12-20 10:51:39 +01:00
Jonas Jensen
18d4772508
Merge pull request #2463 from geoffw0/overflowcalc
...
CPP: Allocation and Deallocation libraries
2019-12-19 21:27:42 +01:00
Jonas Jensen
939979ddef
Merge branch 'master' into overflowcalc
2019-12-19 14:12:00 +01:00
Jonas Jensen
a13748f484
Merge pull request #2259 from rdmarsh2/rdmarsh/cpp/default-taint-tracking-sources
...
C++: move sources into DefaultTaintTracking.qll
2019-12-19 14:09:41 +01:00
Jonas Jensen
4fffaabab9
Merge pull request #2551 from MathiasVP/argument-suppresion-c89-style
...
C++: Alert suppression through single-line /* */ style comments
2019-12-19 13:19:49 +01:00
Calum Grant
3c76346635
C#: WIP Adding exception handlers.
...
C#: Improve robustness by catching and logging exceptions when generating trap IDs.
2019-12-19 11:28:05 +00:00
Erik Krogh Kristensen
15d74b7d03
remove FP from js/regexpinjection where no regexp was constructed
2019-12-19 10:47:03 +01:00
Tom Hvitved
29cd6a9e30
Sync XML.qll
2019-12-19 10:29:30 +01:00
Tom Hvitved
1b6bd7a0fa
C#: Update XML.qll for backwards compatibility
2019-12-19 10:27:59 +01:00
Tom Hvitved
82c368e13e
C#: Sync XML.qll with other languages
2019-12-19 10:26:08 +01:00
James Fletcher
5a6a2e8a68
Merge pull request #2547 from shati-patel/ql/tutorial
...
QL tutorials: Update formatting and style
2019-12-19 09:06:08 +00:00
Mathias Vorreiter Pedersen
30822f1d98
C++: Alert suppresion through single-line /* */ style comments
2019-12-19 09:10:09 +01:00
Robert Marsh
33067c8e31
Merge pull request #2519 from jbj/ir-backedge-notc
...
C++: Get rid of a fastTC and noopt in IR
2019-12-18 14:20:43 -08:00
Jonas Jensen
e7283afa3e
Merge pull request #2531 from dbartol/dbartol/MissingToString
...
C++: Fix `toString()` predicates that don't hold
2019-12-18 19:09:48 +01:00
semmle-qlci
339066ce04
Merge pull request #2552 from erik-krogh/ImportMeta
...
Approved by max-schaefer
2019-12-18 15:38:58 +00:00
Jonathan Leitschuh
75939afe9c
Update java/ql/src/Security/CWE/CWE-829/InsecureDependencyResolution.qhelp
...
Co-Authored-By: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2019-12-18 09:53:36 -05:00
Erik Krogh Kristensen
0611dc3f60
move change notes to extractor-javascript.md
2019-12-18 14:21:43 +01:00
Taus
52d231c219
Merge pull request #2469 from RasmusWL/python-modernise-twisted-library
...
Python: modernise twisted library
2019-12-18 13:55:50 +01:00
Taus
eb6feeeaf8
Merge pull request #2482 from RasmusWL/python-include-zope-web-tests
...
Python: include zope web tests from internal repo
2019-12-18 13:55:23 +01:00
Rasmus Wriedt Larsen
48f873e3d9
Python: Add getAReturnedNode to PythonFunctionValue
2019-12-18 12:00:43 +01:00
Erik Krogh Kristensen
43e9d11f75
inline definition of importIdentifier
2019-12-18 11:43:10 +01:00
Erik Krogh Kristensen
76d4db2552
changes based on review
2019-12-18 11:39:46 +01:00
Erik Krogh Kristensen
807664e545
add change note
2019-12-18 11:35:16 +01:00
Erik Krogh Kristensen
4fdfa51e44
add support for import.meta expressions in JavaScript
2019-12-18 10:45:54 +01:00
Rasmus Wriedt Larsen
582ef6cec9
Python: Restructure logic in Twisted.qll
2019-12-18 10:42:39 +01:00
Rasmus Wriedt Larsen
9942c3fd8b
Python: Autoformat twisted library
2019-12-18 10:42:39 +01:00
Rasmus Wriedt Larsen
ac55e6aba6
Python: Modernise twisted library
2019-12-18 10:42:39 +01:00
Rasmus Wriedt Larsen
4e3c183676
Python: Adapt twisted tests so they pass
2019-12-18 10:42:39 +01:00
Rasmus Wriedt Larsen
6011cb74f8
Python: Add twisted tests from internal repo
2019-12-18 10:42:39 +01:00
Anders Schack-Mulligen
2443f10823
C#: Update .expected file.
2019-12-18 10:40:18 +01:00
Jonas Jensen
367827a2ef
Merge pull request #2541 from max-schaefer/unify-xml-qlls
...
C++/Java/JavaScript/Python: Unify XML libraries.
2019-12-18 10:35:34 +01:00
Jonas Jensen
66d49a4a8a
Merge pull request #2546 from MathiasVP/arguments-source-qltest
...
C++: Added test for 333d0a69
2019-12-18 09:11:11 +01:00
Robert Marsh
e209ed961a
Merge branch 'master' into rdmarsh/cpp/ir-callee-side-effects
2019-12-17 15:11:02 -08:00
Robert Marsh
93ace5be35
C++: remove Chi node flow in DefaultTaintTracking
2019-12-17 14:23:11 -08:00
semmle-qlci
8ad11b98d0
Merge pull request #2538 from hvitved/csharp/missing-to-string
...
Approved by calumgrant
2019-12-17 19:23:47 +00:00
Dave Bartolomeo
240823019a
Merge remote-tracking branch 'upstream/master' into dbartol/MissingToString
2019-12-17 11:50:36 -07:00
Geoffrey White
ab0be19cc5
C++: Autoformat.
2019-12-17 17:51:55 +00:00
Jonathan Leitschuh
b218374772
Add io.netty.handler.codec.http.DefaultHttpResponse to Netty Response Splitting Detection
...
Related: #2185
Related: https://github.com/github/security-lab/issues/22
2019-12-17 12:12:04 -05:00
Robert Marsh
7468facb34
C++: autoformat more
2019-12-17 09:06:52 -08:00
Rasmus Wriedt Larsen
8b5d6ae2cf
Python: Modernise zope web tests
2019-12-17 17:42:03 +01:00
Rasmus Wriedt Larsen
e257ba40c4
Python: Make zope web tests pass
2019-12-17 17:42:03 +01:00
Erik Krogh Kristensen
2e5b7273ab
changes based on review feedback.
2019-12-17 17:30:05 +01:00
Taus Brock-Nannestad
1d94f6d303
Python: Fix several bad join orders.
...
Performance on `taers232c/GAMADV-X` (which exhibited pathological behaviour in
the most recent dist upgrade) went from ~670s to ~313s on
`py/hardcoded-credentials`.
There are still a few tuple counts in the 10-100 million range, but this commit
takes care of all of the ones that numbered in the billions. (A single tuple
count in the 100-1000 million range remains, but it appears to be less critical,
taking only two seconds to calculate.)
2019-12-17 17:19:49 +01:00
Geoffrey White
eaf00c6683
C++: Fix override related warning.
2019-12-17 15:39:29 +00:00
Erik Krogh Kristensen
0a8a2ecc61
make EventEmitter classses non final, and add a comment about extending EventEmitter::Range
2019-12-17 16:37:03 +01:00
Erik Krogh Kristensen
fed9302996
uppercase E in Electron
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2019-12-17 16:29:55 +01:00
Geoffrey White
9986206dc6
C++: Placement new does not necessarily require a delete.
2019-12-17 15:28:21 +00:00
Erik Krogh Kristensen
bf56797ad7
update expected output of tests
2019-12-17 16:27:55 +01:00
Erik Krogh Kristensen
f140820511
fix FP related to block-level flow type annotations
2019-12-17 16:10:20 +01:00
Shati Patel
6a1d0b016c
QL tutorials: Update formatting and style
2019-12-17 14:59:50 +00:00
Anders Schack-Mulligen
0880b57372
Merge pull request #1 from hvitved/csharp/no-ternary-cond-taint-tracking
...
C#: No taint-tracking steps for ternary conditionals
2019-12-17 15:29:24 +01:00
Mathias Vorreiter Pedersen
1d3ee71f73
C++: Added test for 333d0a69
2019-12-17 13:54:41 +01:00
Tom Hvitved
9dde1ce76a
C#: No taint-tracking steps for ternary conditionals
...
Ternary conditionals `b ? x : y` mistakenly had taint-tracking steps from both
`b`, `x`, and `y` to the conditional expression itself. Flow from `b` was not
intented, and flow from `x` and `y` is already part of ordinary data flow.
2019-12-17 13:53:39 +01:00
Erik Krogh Kristensen
9dd7d1c6d7
changes based on review feedback
2019-12-17 13:19:53 +01:00
Erik Krogh Kristensen
f9ddd5891a
minor documentation fixes
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2019-12-17 13:05:20 +01:00
Geoffrey White
a5e10a7ae2
C++: More change notes.
2019-12-17 11:56:23 +00:00
Geoffrey White
520ff39349
C++: Update MemoryMayNotBeFreed.ql similarly.
2019-12-17 11:56:23 +00:00
Geoffrey White
9a944a947a
C++: Update MemoryNeverFreed.ql to exclude alloca (and use the new allocation model directly).
2019-12-17 11:10:03 +00:00
Geoffrey White
a8c31c6590
C++: Add AllocationFunction/AllocationExpr.requiresDealloc().
2019-12-17 11:07:08 +00:00
Anders Schack-Mulligen
ca08097b56
Java/C++/C#: Fix Java Content.getType and getContainerType to match C# and fix C# tests.
2019-12-17 11:51:58 +01:00
Geoffrey White
b2e2db1e5c
CPP: Autoformat.
2019-12-17 10:39:52 +00:00
Geoffrey White
19835cd11d
C++: Change note.
2019-12-17 10:27:13 +00:00
Max Schaefer
81f51e4e2b
Ensure that XML libraries for C++, Java, JavaScript and Python stay in sync.
2019-12-17 10:15:43 +00:00
Max Schaefer
09ee106333
Java/JavaScript: Add two deprecated predicates to XML.qll.
...
This makes XML.qll identical across C++, Java, JavaScript and Python.
2019-12-17 10:15:43 +00:00
Max Schaefer
a17b615ae5
C++/Python: Deprecate XMLFile.getPath and XMLFile.getFolder.
...
Both can be expressed using predicates inherited from `File`.
2019-12-17 10:15:43 +00:00
Max Schaefer
47c1fc7358
C++/Python: Fix XMLFile.getPath and XMLFile.getFolder.
...
Previously, the former returned the file's stem (that is, basename without extension), and the latter never held.
2019-12-17 10:15:43 +00:00
Max Schaefer
bf30f9cdd2
Python: Remove use of deprecated predicate.
2019-12-17 10:15:43 +00:00
Max Schaefer
bccdf59631
C++: Remove an unecessary unresolveElement.
...
As far as I can see, `@file` is not a `@usertype`, so this shouldn't be needed.
2019-12-17 10:15:43 +00:00
Max Schaefer
ef453db225
Python: Adjust XMLParent.getName to match other languages.
2019-12-17 10:15:43 +00:00
Max Schaefer
3068a89ab2
Python: Adjust implementation of allCharactersString to match other languages.
2019-12-17 10:15:43 +00:00
Max Schaefer
923e36ba4f
C++/Java/JavaScript/Python: Make qldoc consistent.
2019-12-17 10:15:43 +00:00
Max Schaefer
a2fe678464
C++/Java/JavaScript/Python: Unify imports in XML.qll.
2019-12-17 10:15:43 +00:00
Max Schaefer
49abffa477
Python: Autoformat XML.qll.
2019-12-17 10:15:43 +00:00
Geoffrey White
4d3fa3ac1d
C++: Demote UnsafeArrayForDaysOfYear.ql.
2019-12-17 10:14:24 +00:00
Geoffrey White
c1be4c78af
C++: Add tags to the leap year + japanese era queries.
2019-12-17 10:14:20 +00:00
Geoffrey White
6d516e0192
C++: Make some implementations in DatTime.qll more robust (and cope with 'const').
2019-12-17 10:14:08 +00:00
Jonas Jensen
9193a81e1a
Merge pull request #2534 from geoffw0/xml
...
C++: Fix characteristic predicate of `XMLParent`.
2019-12-17 10:57:40 +01:00
Max Schaefer
45d0e5971f
Merge pull request #2535 from RasmusWL/python-fix-xml-charpred
...
Python: Fix characteristic predicate of `XMLParent`
2019-12-17 07:17:42 +00:00
yo-h
69a2632806
Merge pull request #2341 from aschackmull/java/cached-tostring-perf-fixes
...
Java: Fix a number of performance issues when toString is cached.
2019-12-16 22:01:35 -05:00
yo-h
f418086992
Merge pull request #2529 from aschackmull/java/xmlparent-charpred
...
Java: Fix characteristic predicate of `XMLParent`.
2019-12-16 21:56:03 -05:00
Robert Marsh
fdaa06ce92
C++:autoformat
2019-12-16 12:54:31 -08:00
Robert Marsh
3c9d7953b6
Merge branch 'master' into rdmarsh/cpp/default-taint-tracking-sources
2019-12-16 11:49:22 -08:00
Tom Hvitved
f1193d084b
C#: Add missing toString() relations
2019-12-16 19:38:46 +01:00
Dave Bartolomeo
60c40adf31
C++: Fix formatting
2019-12-16 10:00:54 -07:00
Anders Schack-Mulligen
a97e7bd3b2
Java/C++/C#: Some review fixes.
2019-12-16 16:17:19 +01:00
Anders Schack-Mulligen
0eacadb309
C#: Fix unit test.
2019-12-16 16:17:19 +01:00
Anders Schack-Mulligen
a1a875e3e1
Java/C++/C#: Fix autoformat.
2019-12-16 16:15:48 +01:00
Anders Schack-Mulligen
02068ecdcd
Java/C++/C#: Sync.
2019-12-16 16:15:48 +01:00
Anders Schack-Mulligen
bca79cd4d6
Java/C++/C#: Add support for taint-getter/setter summaries.
2019-12-16 16:15:48 +01:00
Rasmus Wriedt Larsen
cd1a3e9bf0
Merge pull request #2537 from tausbn/action-disable-labeler
...
Actions: Disable labeler action.
2019-12-16 16:04:54 +01:00
Geoffrey White
25dc2ad273
C++: Support '__builtin_alloca'.
2019-12-16 14:19:33 +00:00
Geoffrey White
acca39bfc7
C++: Repair following merge.
2019-12-16 14:12:32 +00:00
Geoffrey White
0da826f0c3
Merge branch 'master' into overflowcalc
2019-12-16 13:48:38 +00:00
Erik Krogh Kristensen
8f17db6670
changes based on review feedback
2019-12-16 14:43:29 +01:00
Jonas Jensen
8b1892d900
Merge pull request #2533 from m00nbsd/master
...
Add NetBSD/Solaris allocation functions.
2019-12-16 14:42:12 +01:00
Geoffrey White
0a1fa08488
Update cpp/ql/test/library-tests/files/Files.ql
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2019-12-16 13:38:36 +00:00
Calum Grant
a5b2549f6f
Merge pull request #2514 from hvitved/csharp/code-contracts
...
C#: Recognize Code Contract assertions
2019-12-16 13:00:01 +00:00
Taus Brock-Nannestad
d5d6093e75
Actions: Disable labeler action.
...
I've left the `labeler.yml` configuration file, in case this ever starts working
properly with forks.
2019-12-16 13:53:00 +01:00
Erik Krogh Kristensen
7c931452d9
autoformat
2019-12-16 13:45:42 +01:00
Rasmus Wriedt Larsen
6a73479ea3
Python: Modernise py/loop-variable-capture
2019-12-16 13:36:59 +01:00
Rasmus Wriedt Larsen
9004a8e71f
Python: Fix characteristic predicate of XMLParent
...
Like in https://github.com/Semmle/ql/pull/2520
2019-12-16 13:32:28 +01:00
Erik Krogh Kristensen
3ca3fa7e9e
add quotes on code in documentation
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2019-12-16 13:32:01 +01:00
Geoffrey White
f990634481
C++: Fix the XMLParent Constructor.
2019-12-16 11:07:16 +00:00
Geoffrey White
a6407f00a7
C++: Extend the files test to cover the issue with XMLParent.
2019-12-16 11:07:12 +00:00
Geoffrey White
c4c1dfa2b9
C++: Modernize the files tests.
2019-12-16 11:07:07 +00:00
Jonas Jensen
5cea452123
Merge pull request #2491 from rdmarsh2/rdmarsh/cpp/ir-taintedIncludingGlobalVars
...
C++: handle global vars in DefaultTaintTracking
2019-12-16 11:00:34 +01:00
m00nbsd
f7484171c9
Add NetBSD/Solaris allocation functions.
...
* kmem_{z}alloc is used by Solaris and NetBSD
* pool_{cache_}get is used by NetBSD
2019-12-16 10:32:18 +01:00
Erik Krogh Kristensen
c19d8ecb73
refactorizations and preparations for SocketIO implementation
2019-12-16 10:13:27 +01:00
Erik Krogh Kristensen
8c0b6f26da
Merge remote-tracking branch 'upstream/master' into moarExceptions
2019-12-16 08:35:45 +01:00
Erik Krogh Kristensen
904976c7ac
update tests after removing control-flow checks from error-callbacks
2019-12-16 08:30:21 +01:00
Jonas Jensen
648c19978a
Merge pull request #2528 from geoffw0/hiddenqueries
...
CPP: Resolve some hidden queries
2019-12-14 09:39:13 +01:00
Dave Bartolomeo
914288d3c5
C++: Fix toString() predicates that don't hold
2019-12-13 17:06:05 -07:00
Erik Krogh Kristensen
1efe2ba167
inline ifStmt field
2019-12-13 19:00:54 +01:00
Geoffrey White
91af51cf46
CPP: Change note.
2019-12-13 16:58:37 +00:00
Jonathan Leitschuh
d24d1a11d0
Merge pull request #1 from aschackmull/java/cwe-829-qltest
...
Java: Add .expected file to qltest.
2019-12-13 10:55:17 -05:00
Anders Schack-Mulligen
13f12c5332
Java: Fix characteristic predicate of XMLParent.
2019-12-13 15:20:52 +01:00
Anders Schack-Mulligen
f88623ccb4
Java: Add .expected file to qltest.
2019-12-13 14:34:29 +01:00
semmle-qlci
9b6c394ac7
Merge pull request #2520 from max-schaefer/js/fix-2517
...
Approved by esbena
2019-12-13 12:59:37 +00:00
Erik Krogh Kristensen
3b2cc4674e
autoformat
2019-12-13 11:44:52 +01:00
Erik Krogh Kristensen
e164f46330
changes based on review feedback
2019-12-13 11:44:31 +01:00
Geoffrey White
d1530ddef9
CPP: Reduce precision of ClassesWithManyFields.ql.
2019-12-13 08:40:59 +00:00
Geoffrey White
49b5d9283f
CPP: Reduce precision of FeatureEnvy.ql.
2019-12-13 08:40:59 +00:00
Geoffrey White
896ec9de72
CPP: Reduce precision of InappropriateIntimacy.ql.
2019-12-13 08:40:58 +00:00
Geoffrey White
acb011de04
CPP: Reduce precision of JapaneseEraDate.ql.
2019-12-13 08:40:58 +00:00
Jonas Jensen
12c11d079b
Merge pull request #2523 from jf205/mergeback-123-ql
...
Mergeback 1.23 -> master
2019-12-13 09:08:27 +01:00
Robert Marsh
53988b4b6c
Merge pull request #2527 from Semmle/fix-labeler-yaml-escaping
...
Actions: Fix broken escaping in PR labeller action.
2019-12-12 16:00:17 -08:00
Taus
c1b5389d96
Actions: Fix broken escaping in PR labeler action.
...
TL;DR: YAML escaping is complicated. I think this should fix the problems.
2019-12-12 22:24:23 +01:00
Jonathan Leitschuh
0c2da8af40
Update java/ql/src/Security/CWE/CWE-829/InsecureDependencyResolution.ql
2019-12-12 14:10:11 -05:00
Robert Marsh
57d891e3b4
C++: autoformat
2019-12-12 11:03:18 -08:00
Asger F
45524d8b19
JS: Add to correctness-core suite
2019-12-12 16:05:05 +00:00
Asger F
e8f0e3811a
JS: Replace backticks with <code>
2019-12-12 15:52:09 +00:00
Asger F
eb82b17f16
JS: QHelp and a bit of qldoc
2019-12-12 15:40:41 +00:00
Rasmus Wriedt Larsen
43301505f5
Merge pull request #2521 from tausbn/automatically-label-pull-requests
...
Actions: Automatically add language-specific labels to pull requests.
2019-12-12 15:35:51 +00:00
Taus Brock-Nannestad
2fec0d0294
Escape labels with potentially problematic characters.
2019-12-12 16:29:04 +01:00
Erik Krogh Kristensen
f35dc5d274
Merge remote-tracking branch 'upstream/master' into moarExceptions
2019-12-12 16:13:52 +01:00
Erik Krogh Kristensen
17358606cb
change callback to rely on an behavior heuristic rather than a naming heuristic
2019-12-12 16:12:37 +01:00
Asger F
f398247d2f
JS: Step through rephinements in getImmediatePredecessor
2019-12-12 15:11:25 +00:00
Asger F
a30f991b5e
JS: Add query for missing await
2019-12-12 15:11:25 +00:00
james
f6029bd55c
Merge branch 'rc/1.23' into mergeback-123-ql
2019-12-12 15:05:28 +00:00
Erik Krogh Kristensen
08d0cb795b
revert the introduction of getEnclosingCall
2019-12-12 15:14:02 +01:00
Taus Brock-Nannestad
51315217ff
Add documentation label to docs/**/*.
2019-12-12 15:10:21 +01:00
Taus Brock-Nannestad
558c0a440e
Actions: Automatically add language-specific labels to pull requests.
2019-12-12 14:42:45 +01:00
Rasmus Wriedt Larsen
e3b502085b
Merge pull request #2515 from tausbn/python-fix-bad-join-order-in-statement-no-effect
...
Python: Fix bad join order in `py/ineffectual-statement`.
2019-12-12 13:41:18 +00:00
Max Schaefer
dfeca63677
JavaScript: Fix characteristic predicate of XMLParent.
...
The database type `@xmlparent` is defined a bit too loosely in that it includes all of `@file`, not just XML files. Fixing that would involve fiddling with the extractor/dbscheme, so I have opted to fix it at the QL level instead.
2019-12-12 12:38:29 +00:00
Jonas Jensen
fd48dcf63e
C++: Get rid of a fastTC and noopt in IR
...
The `getAChild*` fastTC was causing OOM on a `make allyesconfig` Linux
database with 8GB RAM, and I've observed it to be slow on other
databases too.
2019-12-12 09:31:39 +01:00
Tom Hvitved
374b0c063e
C#: Autoformat
2019-12-11 20:36:54 +01:00
Erik Krogh Kristensen
e818f4c08b
refactored some duplicated methods into the abstract class, and specialized the type of emitter in NodeJS EventEmitter dispatch/registration
2019-12-11 18:25:03 +01:00
Taus Brock-Nannestad
d5cc42e34c
Python: Fix bad join order in py/ineffectual-statement.
...
This used to take 30s on `cpython`.
```
Tuple counts for StatementNoEffect::side_effecting_binary#f:
46522 ~0% {2} r1 = ClassObject::ClassObject::hasAttribute_dispred#fb AS L AND NOT StatementNoEffect::side_effecting_binary#f#antijoin_rhs AS R(L.<0>, L.<1>)
46522 ~2% {2} r2 = SCAN r1 OUTPUT r1.<1>, r1.<0>
950960 ~2% {2} r3 = JOIN r2 WITH Operations::Operator::getSpecialMethodName_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r2.<1>
950960 ~2% {2} r4 = JOIN r3 WITH py_operators AS R ON FIRST 1 OUTPUT R.<2>, r3.<1>
950960 ~0% {3} r5 = JOIN r4 WITH AstGenerated::BinaryExpr_::getLeft_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r4.<1>, r4.<0>
122934382 ~0% {2} r6 = JOIN r2 WITH Operations::Cmpop::getSpecialMethodName_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r2.<1>
122934382 ~3% {3} r7 = JOIN r6 WITH project#Operations::Compare::compares_dispred#ffff#3_201#join_rhs AS R ON FIRST 1 OUTPUT R.<2>, r6.<1>, R.<1>
123885342 ~3% {3} r8 = r5 \/ r7
300 ~8% {1} r9 = JOIN r8 WITH project#Exprs::Expr::refersTo_dispred#ffff AS R ON FIRST 2 OUTPUT r8.<2>
return r9
```
With this commit, it takes a few milliseconds.
2019-12-11 17:58:30 +01:00
semmle-qlci
3d8c35e523
Merge pull request #2509 from asger-semmle/typescript-full-json
...
Approved by max-schaefer
2019-12-11 16:31:26 +00:00
Tom Hvitved
78f63a3679
C#: Add change note
2019-12-11 16:57:35 +01:00
Tom Hvitved
b7484e63ee
C#: Recognize Code Contract assertions
2019-12-11 16:54:42 +01:00
Tom Hvitved
5429448eeb
C#: Add tests for Code Contracts
2019-12-11 16:51:42 +01:00
Erik Krogh Kristensen
f537e28389
add pragma to internalBlocks predicate to fix performance
2019-12-11 15:19:30 +01:00
Asger F
063abb5cbc
TS: Avoid name clash between tsconfig.json and type table
2019-12-11 12:15:44 +00:00
semmle-qlci
cb8e5fa3fc
Merge pull request #2411 from asger-semmle/regexp-sanitizer-guards
...
Approved by esbena, max-schaefer
2019-12-11 12:00:21 +00:00
Erik Krogh Kristensen
62512dd3e9
expand the js/exception-xss to handle more types of exceptional flow
2019-12-11 10:43:50 +01:00
yo-h
837b1e2f9b
Merge pull request #2501 from hmakholm/test-extractors
...
Prepare for `codeql test`:
2019-12-10 16:49:14 -05:00
Calum Grant
3e0045f435
Merge pull request #2308 from hvitved/csharp/dataflow/types
...
C#: Type-based pruning for data flow
2019-12-10 20:16:20 +00:00
Erik Krogh Kristensen
267c4c07ed
refactor EventEmitter model to use the ::Range pattern
2019-12-10 15:54:14 +01:00
Tom Hvitved
abcb6b8aab
C#: Type-based pruning for data flow
2019-12-10 15:48:48 +01:00
Tom Hvitved
54088248a1
C#: Use source declarations in field flow
2019-12-10 15:46:31 +01:00
Tom Hvitved
a344707baa
C#: Add more data flow tests
...
Add tests that exhibit missing type pruning.
2019-12-10 15:46:31 +01:00
Tom Hvitved
78ddb37a8c
C#: Track type information in data flow
...
This commit adds type information to data flow paths, by mapping node types onto
the smaller set of GVN types, and implementing `ppReprType()`.
The effect is a mere change in `DataFlow::PathNode::toString()`; no type-based
pruning is done yet.
2019-12-10 15:46:28 +01:00
Erik Krogh Kristensen
c4fd80d12b
some review feedback
2019-12-10 14:53:01 +01:00
Erik Krogh Kristensen
e5d465da9a
documentation fixes from @max-schaefer
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2019-12-10 12:01:51 +01:00
Erik Krogh Kristensen
59bafab6c3
update test to not use private class
2019-12-10 10:39:01 +01:00
Erik Krogh Kristensen
72cf14989a
update expected output of test
2019-12-10 10:33:37 +01:00
Jonathan Leitschuh
229622459c
Update InsecureDependencyResolution with code review comments
2019-12-09 20:37:53 -05:00
Jonathan Leitschuh
f341234edb
Apply suggestions from code review
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
Co-Authored-By: yo-h <55373593+yo-h@users.noreply.github.com >
2019-12-09 19:17:23 -05:00
Robert Marsh
18e7eff43c
C++: autoformat
2019-12-09 13:47:38 -08:00
Robert Marsh
b9f8c39fe2
C++: respond to PR comments
2019-12-09 10:55:56 -08:00
Erik Krogh Kristensen
60a825cf66
fix tabs and spaces
2019-12-09 16:06:17 +01:00
Erik Krogh Kristensen
110302678c
add model for EventEmitter in NodeJS, and base the Electron::IPC model on top of the new EventEmitter model
2019-12-09 14:27:35 +01:00
Calum Grant
3049bf2c85
Merge pull request #2358 from cldrn/ASPNetPagesValidateRequest
...
Adds CodeQL query to check for Pages with disabled built-in validation
2019-12-09 13:05:03 +00:00
Tom Hvitved
25265bddc7
Merge pull request #2494 from calumgrant/cs/roslyn-3.4
...
C#: Upgrade Roslyn to 3.4
2019-12-09 12:21:30 +01:00
Henning Makholm
073563a19b
Python tests: explicitly specify --lang2 for python2 tests
...
This allows them to work with the `LegacyQltLanguage.PYTHON3` extraction recipe.
2019-12-07 02:38:02 +01:00
Henning Makholm
baacc6f66b
Java tests: add queries.xml
...
The `queries.xml` file defines which extractor the `codeql test` runner will use
to extract databases for the tests. In the future one will be able to write this
information in `qlpack.yml`, but we can't do that immediately because the
_existing_ CodeQL tooling would refuse to parse a `qlpack.yml` that has
the new field in it.
2019-12-07 02:38:02 +01:00
Henning Makholm
66b3c7cf07
JS tests: add queries.xml
...
The `queries.xml` file defines which extractor the `codeql test` runner will use
to extract databases for the tests. In the future one will be able to write this
information in `qlpack.yml`, but we can't do that immediately because the
_existing_ CodeQL tooling would refuse to parse a `qlpack.yml` that has the new
field in it.
Adding a queries.xml file means that the normalization of file names in the test
output changes even with the old QLTest, so there are a number of consequential
updates of expected output files.
2019-12-07 02:38:02 +01:00
yo-h
ed97be459f
Merge pull request #2454 from aschackmull/java/explicit-mul-zero
...
Java: Allow explicit zero multiplication in java/evaluation-to-constant.
2019-12-06 18:13:43 -05:00
Jonas Jensen
0012fef504
Merge pull request #2497 from hvitved/csharp/remove-cp
...
C#: Remove a Cartesian product
2019-12-06 13:58:33 +00:00
Calum Grant
964f2f25dc
Merge pull request #2462 from hvitved/csharp/localvars-refactor
...
C#: Handle tuple patterns in `is` expressions
2019-12-06 12:59:14 +00:00
Calum Grant
4b0a149704
C#: Update qltest output.
2019-12-06 12:41:20 +00:00
Calum Grant
5e6b7be5b8
C#: Update nullability tests.
2019-12-06 12:41:20 +00:00
Calum Grant
5f6527a183
C#: Compare symbols using SymbolEqualityComparer.
2019-12-06 12:41:20 +00:00
Calum Grant
ca195e9340
C#: Update project files to Roslyn 3.4
2019-12-06 12:41:20 +00:00
shati-patel
a5274ad5f2
Merge pull request #2496 from jf205/jf-mergeback-123
...
Merge rc/1.23 into master
2019-12-06 12:24:07 +00:00
Asger F
abec4badb5
Apply suggestions from code review
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2019-12-06 11:53:09 +00:00
Asger F
344f0b4995
Fix typo in qldoc
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2019-12-06 11:53:09 +00:00
Asger F
c1da83bf6c
Fix typo in qldoc
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2019-12-06 11:53:09 +00:00
Asger F
2acd616e6f
JS: Review comments
2019-12-06 11:53:06 +00:00
Anders Schack-Mulligen
5a2ed9fd81
Java: Add change note.
2019-12-06 11:50:27 +00:00
Asger F
bbb6dad726
JS: Update koa testcase
2019-12-06 11:49:59 +00:00
Asger F
b407de01f8
JS: Update TaintBarriers test
2019-12-06 11:49:59 +00:00
Asger F
a6e75259d6
JS: More fine-grained regexp-based sanitizer guards
2019-12-06 11:49:59 +00:00
Asger F
ad6e949bad
JS: Introduce RegExpCreationNode
2019-12-06 11:49:59 +00:00
Asger F
4354945c26
JS: Factor out recognition of RegExp flags
2019-12-06 11:49:59 +00:00
Tom Hvitved
3a95cd5e9c
C#: Remove a Cartesian product
2019-12-06 10:42:59 +00:00
james
67eea44678
Merge branch 'rc/1.23' into jf-mergeback-123
2019-12-06 09:16:39 +00:00
Geoffrey White
a3efcf66a6
Merge pull request #2495 from hmakholm/pr/update-c-test
...
C++ tests: generalize arguments tests
2019-12-06 09:10:17 +00:00
Henning Makholm
6bdf186d1e
C tests: generalize arguments tests
...
With the coming `codeql test` support, the `predefined_macros` file will not
necessarily be located under a `tools` directory. Change the test to hide more
of its actual path, so it will work in both cases.
2019-12-06 01:21:17 +01:00
Tom Hvitved
3e93aa9787
C#: Address review comments
...
- Undo split of `localvars` relation.
- Properly extract tuple declarations in `is` expressions.
2019-12-05 22:31:38 +00:00
Robert Marsh
28fb3d606a
C++: add fread and printf alias models
2019-12-05 12:14:33 -08:00
Robert Marsh
52a74718da
C++: Move sources into DefaultTaintTracking
2019-12-05 12:14:25 -08:00
Robert Marsh
39b400ca69
C++: Add DefinitionByReferenceNode to IR dataflow
2019-12-05 11:56:57 -08:00
Calum Grant
59ce8842bb
Merge branch 'master' of git.semmle.com:Semmle/ql into ASPNetPagesValidateRequest
...
# Conflicts:
# change-notes/1.24/analysis-csharp.md
2019-12-05 15:58:47 +00:00
Felicity Chapman
fa8e5e6793
Merge pull request #2489 from jf205/deprecate-cobol-master
...
Supported languages: update COBOL info
2019-12-05 15:08:53 +00:00
Robert Marsh
055c1d0efa
Merge pull request #2488 from geoffw0/speedup2
...
CPP: Speed up SensitiveExprs.qll
2019-12-04 14:09:32 -08:00
Robert Marsh
420a0bb74c
C++: handle namespace vars in DefautlTaintTracking
2019-12-04 13:16:12 -08:00
Robert Marsh
ec95197d6d
Merge pull request #2451 from dbartol/dbartol/May-Must
...
C++/C#: Consistent handling of "may" vs. "must" memory accesses
2019-12-04 12:32:53 -08:00
Dave Bartolomeo
cbb6797ca8
Merge from master and resolve conflicts
2019-12-04 10:14:52 -07:00
Calum Grant
73c8888361
Merge pull request #2356 from cldrn/ASPNetRequestValidationMode
...
Adds CodeQL query to check for insecure RequestValidationMode in ASP.NET
2019-12-04 17:02:08 +00:00
shati-patel
343385bd2e
Merge pull request #2492 from Semmle/revert-2487-deprecate-cobol
...
Revert "Learning CodeQL docs: add COBOL notes and remove links"
2019-12-04 16:41:00 +00:00
James Fletcher
d47f08488f
Revert "Learning CodeQL docs: add COBOL notes and remove links"
2019-12-04 16:34:00 +00:00
Dave Bartolomeo
50dc5e2ba3
Merge pull request #2438 from rdmarsh2/rdmarsh/ir-line-number-ids
...
C++/C#: use line numbers for instruction IDs
2019-12-03 18:48:28 -08:00
Robert Marsh
d99a90bfea
C++: handle global vars in DefaultTaintTracking
2019-12-03 16:08:43 -08:00
Robert Marsh
722cc91eae
C++: make getLineRank private
2019-12-03 10:53:08 -08:00
Jonas Jensen
57917bec17
Merge pull request #2480 from hvitved/dataflow/performance-tweaks
...
Data flow: Various performance tweaks
2019-12-03 18:44:11 +01:00
Felicity Chapman
37e9ff1197
Merge pull request #2487 from jf205/deprecate-cobol
...
Learning CodeQL docs: add COBOL notes and remove links
2019-12-03 17:31:44 +00:00
Calum Grant
8018db3f66
Merge pull request #2474 from hvitved/csharp/dispatch-perf
...
C#: Improve performance of dispatch library
2019-12-03 15:47:43 +00:00
james
971db7126b
docs: delete link to query console
2019-12-03 14:37:33 +00:00
Geoffrey White
8ddf877756
CPP: Autoformat.
2019-12-03 12:17:37 +00:00
james
f602c78242
docs: update cobol info
2019-12-03 11:58:30 +00:00
james
a560b6caa5
docs: increase trainig project version number
2019-12-03 10:57:12 +00:00
Geoffrey White
cc43e1116b
CPP: Do the logic at the target, rather than the access, as there are likely fewer.
2019-12-03 10:52:40 +00:00
james
25e779913f
docs: add cobol notes
2019-12-03 10:52:06 +00:00
Geoffrey White
20eb39d37e
CPP: Bypass some of the complexity in 'toString'.
2019-12-03 10:44:59 +00:00
Geoffrey White
6e6c1693f4
CPP: Speed up SensitiveExprs.qll 'suspicious' and 'nonSuspicious' mechanism.
2019-12-03 10:43:36 +00:00
Geoffrey White
b752a6c8ed
Merge pull request #2381 from jbj/StackVariable
...
C++: Add StackVariable class, preferred over LocalScopeVariable
2019-12-03 10:35:16 +00:00
Geoffrey White
2faae4dcb1
CPP: Autoformat.
2019-12-03 09:00:43 +00:00
semmle-qlci
cfcd18b411
Merge pull request #2429 from erik-krogh/typeAheadSink
...
Approved by esbena
2019-12-03 08:07:25 +00:00
Robert Marsh
1b802c7e18
C#: accept test change
2019-12-02 13:59:19 -08:00
Paulino Calderon
5fd0662264
Update csharp/ql/src/Security Features/CWE-016/ASPNetPagesValidateRequest.qhelp
...
Fixes typo
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2019-12-02 16:44:39 -05:00
Paulino Calderon
24b2471533
Update change-notes/1.24/analysis-csharp.md
...
tag update
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2019-12-02 16:44:25 -05:00
Paulino Calderon
9576e2a698
Update csharp/ql/src/Security Features/CWE-016/ASPNetPagesValidateRequest.qhelp
...
Adds missing code tags
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2019-12-02 16:43:51 -05:00
Dave Bartolomeo
acc3d23877
Clarify comment
2019-12-02 11:53:43 -08:00
Henning Makholm
e441e432ff
Merge pull request #2484 from asger-semmle/typescript-codeql-env-var
...
JS: Make extractor aware of CodeQL env vars
2019-12-02 18:36:45 +01:00
Asger F
f162749044
Merge pull request #2418 from max-schaefer/js/file-locatable
...
JavaScript: Make `File` not extend `Locatable` anymore.
2019-12-02 16:15:14 +00:00
Asger F
f988e9004f
JS: Autoformat FileExtractor.java
2019-12-02 16:06:37 +00:00
Asger F
c931beb853
TS: Make AutoBuild aware of CodeQL env vars
2019-12-02 16:06:27 +00:00
Anders Schack-Mulligen
2f8e92571a
Merge pull request #2483 from hmakholm/pr/move-test
...
remove java test EmptyInterface
2019-12-02 16:18:08 +01:00
Henning Makholm
95c26a51af
remove java test EmptyInterface
...
This is a test of an internal query for the Semmle repository. It cannot
run against the public QL repository alone, and therefore should not be
tested here.
https://git.semmle.com/Semmle/code/pull/35690 adds the test back to the
internal repo.
2019-12-02 15:29:42 +01:00
Rasmus Wriedt Larsen
387ab52855
Python: Add zope web tests from internal repo
2019-12-02 14:38:03 +01:00
Tom Hvitved
b3990c5a1d
Data flow: Revert reordering changes in flowStore and flowRead
2019-12-02 14:25:59 +01:00
Tom Hvitved
5baa133e6c
Data flow: Sync files
2019-12-02 13:41:17 +01:00
Max Schaefer
ec2ba735de
JavaScript: Update Dependencies library to not rely on Files being Locatable.
...
Previously, we would consider an HTML file to be a dependent of all scripts embedded in it. Now we instead consider each JavaScript toplevel inside the HTML file to be a dependent, which is more sensible anyway.
2019-12-02 12:40:49 +00:00
Tom Hvitved
b1245eeac8
Data flow: Various performance tweaks
2019-12-02 13:38:10 +01:00
Nick Rolfe
d293418672
Merge pull request #2478 from jbj/mergeback-20191202
...
Mergeback from rc/1.23 to master
2019-12-02 12:28:20 +00:00
Calum Grant
fcd13dc595
Merge remote-tracking branch 'upstream/master' into ASPNetRequestValidationMode
...
# Conflicts:
# change-notes/1.24/analysis-csharp.md
2019-12-02 12:03:11 +00:00
Erik Krogh Kristensen
ea9d6189de
update expected test outpu
2019-12-02 12:52:39 +01:00
semmle-qlci
ceb9fff70c
Merge pull request #2479 from max-schaefer/localTaintStep
...
Approved by asgerf
2019-12-02 11:35:43 +00:00
semmle-qlci
dc7a0c1b91
Merge pull request #2442 from hvitved/csharp/dataflow/conversion-operator
...
Approved by calumgrant
2019-12-02 11:01:35 +00:00
Max Schaefer
aeda2d68f8
JavaScript: Introduce localTaintStep predicate.
...
It's sometimes useful for exploratory queries, and the other languages have it as well.
2019-12-02 09:43:08 +00:00
Jonas Jensen
5b24b1efc3
Merge remote-tracking branch 'upstream/rc/1.23' into mergeback-20191202
...
Conflicts solved:
javascript/extractor/src/com/semmle/js/extractor/Main.java
javascript/ql/test/query-tests/Statements/UseOfReturnlessFunction/tst.js
2019-12-02 09:57:34 +01:00
Erik Krogh Kristensen
c6c1ebe81a
Merge remote-tracking branch 'upstream/master' into typeAheadSink
2019-12-02 08:41:49 +01:00
Paulino Calderon
8026925a3a
Update csharp/ql/src/Security Features/CWE-016/ASPNetRequestValidationMode.ql
...
Added missing quotes.
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2019-11-29 22:39:50 -05:00
Paulino Calderon
879d34d24d
Update csharp/ql/src/Security Features/CWE-016/ASPNetRequestValidationMode.qhelp
...
Missing comma.
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2019-11-29 22:39:29 -05:00
Paulino Calderon
22964cba74
Update csharp/ql/src/Security Features/CWE-016/ASPNetRequestValidationMode.qhelp
...
Rephrasing.
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2019-11-29 22:39:04 -05:00
Paulino Calderon
a2dfd551f6
Update csharp/ql/src/Security Features/CWE-016/ASPNetRequestValidationMode.qhelp
...
built in to built-in
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2019-11-29 22:38:42 -05:00
Tom Hvitved
c845a1ba91
C#: Improve performance of dispatch library
2019-11-29 15:32:00 +01:00
Calum Grant
a4251f67a2
C#: Analysis change notes.
2019-11-29 10:32:04 +00:00
Calum Grant
30a2620a8c
C#: Tidy up docs, query metadata and add tests.
2019-11-29 10:31:58 +00:00
Tom Hvitved
a062d7d41c
C#: Add regression test
2019-11-29 10:10:24 +01:00
Max Schaefer
f958916c76
Merge pull request #2330 from erik-krogh/exceptionXss
...
JS: Added query for detecting XSS that happens through an exception
2019-11-29 09:04:45 +00:00
Geoffrey White
3477c4a8fb
Update cpp/ql/src/semmle/code/cpp/commons/Alloc.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-28 17:30:36 +00:00
Geoffrey White
aae9f88413
CPP: Model 'alloca'.
2019-11-28 17:27:37 +00:00
semmle-qlci
73e08eba43
Merge pull request #2468 from max-schaefer/js/regexp-predecessor
...
Approved by asgerf
2019-11-28 16:57:31 +00:00
Jonas Jensen
763b18cd11
Merge remote-tracking branch 'upstream/master' into StackVariable
...
Conflicts:
change-notes/1.24/analysis-cpp.md
cpp/ql/src/Security/CWE/CWE-131/NoSpaceForZeroTerminator.ql
2019-11-28 17:51:20 +01:00
Jonas Jensen
d816701e07
Revert "C++: Use StackVariable in Nullness.qll"
...
It looks like allowing statics in `Nullness.qll` is fine since it's a
"may be null" analysis rather than a "must be null" analysis.
This reverts commit f5b9837e19 .
2019-11-28 17:44:42 +01:00
Jonas Jensen
d22df24cab
Merge pull request #2467 from geoffw0/speedup1
...
CPP: Speed up isCompiledAsC.
2019-11-28 17:31:27 +01:00
semmle-qlci
198b3b34a3
Merge pull request #2432 from asger-semmle/install-typescript-deps
...
Approved by max-schaefer
2019-11-28 16:08:46 +00:00
Max Schaefer
7487c79271
JavaScript: Add missing qldoc.
2019-11-28 15:54:52 +00:00
Max Schaefer
47cbf0bf88
JavaScript: Override Locatable.getLocation() for @files.
2019-11-28 15:54:03 +00:00
Max Schaefer
a788bf87a0
JavaScript: Fix RegExpTerm.getPredecessor and getSuccessor.
...
These were originally meant to give you the term that is textually matched right before/right after the receiver. When I introduced support for lookbehinds, I changed the behaviour to give you the term that is _operationally_ matched before/after the receiver (remember that lookbehinds are implemented by reverse-matching).
However, I think that's rarely ever what you want, and is wrong for the only two uses of these predicates, where it's the textual matching order that we are after, not the operational order.
Consequently, I've changed the semantics back and updated the comments to hopefully clarify the intention.
2019-11-28 15:14:50 +00:00
Tom Hvitved
04cecc04dd
C#: Update EntityFrameworkCore test
2019-11-28 15:28:50 +01:00
Paulino Calderon
eeffd7cf8d
Adds CodeQL query to check for Pages validateRequest directive
2019-11-28 14:22:08 +00:00
Tom Hvitved
af453d081e
C#: Only track taint through conversion operators defined in libraries
2019-11-28 15:21:04 +01:00
Taus
20513561a0
Merge pull request #2459 from RasmusWL/python-modernise-TurboGears-library
...
Python: modernise TurboGears library
2019-11-28 14:36:01 +01:00
Tom Hvitved
ba4fb82a08
C#: Add DB upgrade script
2019-11-28 14:30:21 +01:00
Tom Hvitved
b79fc87961
C#: Split up localvars database relation into two relations
2019-11-28 14:30:21 +01:00
semmle-qlci
2b0eef3b14
Merge pull request #2448 from tausbn/python-use-import-python-consistently
...
Approved by RasmusWL
2019-11-28 12:47:00 +00:00
Geoffrey White
b1c992e85f
CPP: Speed up isCompiledAsC (x3).
2019-11-28 11:28:38 +00:00
Calum Grant
5833b15f0e
C#: Analysis change notes.
2019-11-27 17:30:02 +00:00
Calum Grant
d001c3c2d2
C#: Restructure files.
2019-11-27 17:29:53 +00:00
Calum Grant
c906a8238d
C#: Edit qhelp for cs/insecure-request-validation-mode
2019-11-27 16:37:37 +00:00
Calum Grant
4b19f3b6a4
C#: Whitespace edit and edit query metadata.
2019-11-27 16:37:37 +00:00
Paulino Calderon
6f346c6676
Adds CodeQL query to check for insecure RequestValidationMode in ASP.NET
2019-11-27 16:37:37 +00:00
Erik Krogh Kristensen
d212394058
update expected output
2019-11-27 15:21:47 +01:00
Erik Krogh Kristensen
34e44e89fd
Merge remote-tracking branch 'upstream/master' into typeAheadSink
2019-11-27 15:19:06 +01:00
Rasmus Wriedt Larsen
44cc9dd0be
Python: Add TurboGears templating example
2019-11-27 15:07:32 +01:00
Rasmus Wriedt Larsen
b526421072
Python: Autoformat TurboGears library
2019-11-27 14:19:51 +01:00
Rasmus Wriedt Larsen
9ef270fc92
Python: Modernise TurboGears library
2019-11-27 14:19:04 +01:00
Tom Hvitved
ce16bc553a
C#: Autoformat
2019-11-27 13:47:24 +01:00
Erik Krogh Kristensen
9351cd44e4
Merge remote-tracking branch 'githubsemmle/master' into HEAD
2019-11-27 13:45:59 +01:00
semmle-qlci
a2827e9503
Merge pull request #2362 from erik-krogh/promiseAll
...
Approved by max-schaefer
2019-11-27 12:35:04 +00:00
Erik Krogh Kristensen
bafd57d7d5
refactor classes in typeahead.js model
2019-11-27 13:33:38 +01:00
Rasmus Wriedt Larsen
3e5e14a14b
Merge pull request #2431 from tausbn/python-cyclic-import-future-annotations
...
Python: Account for non-evaluation of annotations in cyclic imports.
2019-11-27 13:31:53 +01:00
Erik Krogh Kristensen
4f75986274
update test to not use private classes
2019-11-27 12:59:10 +01:00
semmle-qlci
4916bed9cd
Merge pull request #2433 from asger-semmle/import-js-file
...
Approved by max-schaefer
2019-11-27 10:55:59 +00:00
semmle-qlci
9ca4f6aecb
Merge pull request #2392 from asger-semmle/window-name-flow
...
Approved by max-schaefer
2019-11-27 10:55:26 +00:00
semmle-qlci
793988afe4
Merge pull request #2344 from asger-semmle/element-pattern-prop-read
...
Approved by max-schaefer
2019-11-27 10:54:46 +00:00
Anders Schack-Mulligen
2c3a6d7359
Java: Allow explicit zero multiplication in java/evaluation-to-constant.
2019-11-27 11:49:43 +01:00
Erik Krogh Kristensen
967ecbad24
Merge remote-tracking branch 'upstream/master' into promiseAll
2019-11-27 11:28:37 +01:00
Felicity Chapman
38f6f05f12
Merge pull request #2452 from yo-h/docs-query-metadata-precision-fix
...
Documentation: fix invalid `@precision` value
2019-11-27 10:26:49 +00:00
Erik Krogh Kristensen
e27a69960d
update description
2019-11-27 11:17:19 +01:00
Erik Krogh Kristensen
42fbcbf007
update expected test output
2019-11-27 11:14:04 +01:00
Erik Krogh Kristensen
60f7a7a274
changes based on review feedback
2019-11-27 11:11:49 +01:00
Erik Krogh Kristensen
6d63d75d87
remove superfluous line break
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2019-11-27 10:52:01 +01:00
Tom Hvitved
39aaa38486
C#: Update EntityFramework test
2019-11-27 10:28:12 +01:00
Anders Schack-Mulligen
3d0e3aa1fd
Java: Fix a number of performance issues when toString is cached.
2019-11-27 09:06:15 +01:00
Asger F
6eb2c26ea4
TS: Pass --no-default-rc and --non-interactive to yarn
2019-11-27 06:42:03 +00:00
Asger F
605c8834c6
JS: Avoid redundant window.name sources
2019-11-27 06:15:12 +00:00
yo-h
8a8b795696
Merge pull request #2447 from aschackmull/java/cache-perf
...
Java: Improve performance by normalizing import order to reduce cache invalidation.
2019-11-26 16:26:53 -05:00
Dave Bartolomeo
aa6bd07971
Merge remote-tracking branch 'upstream/master' into dbartol/May-Must
2019-11-26 14:07:13 -07:00
Robert Marsh
e368d5dda0
C++: simplify getDisplayOrderInBlock
2019-11-26 16:02:30 -05:00
Jonas Jensen
c05cc77a91
Merge pull request #2421 from dbartol/dbartol/IndirectAlias
...
C++/C#: Cleanup in preparation for indirect alias analysis
2019-11-26 21:59:17 +01:00
Erik Krogh Kristensen
9b608e9ec4
simplify multiple parameter selection
2019-11-26 21:07:37 +01:00
Dave Bartolomeo
f3b4140948
C++/C#: Consistent handling of "may" vs. "must" memory accesses
...
In the IR, some memory accesses are "must" accesses (the entire memory location is always read or written), and some are "may" accesses (some, all, or none of the bits in the location are written). We previously had to special case specific "may" accesses in a few places. This change regularizes our handling of "may" accesses.
The `MemoryAccessKind` enumeration now describes only the extent of the access (the set of locations potentially accessed), but does not distinguish "must" from "may". The new predicates `Operand.hasMayMemoryAccess()` and `Instruction.hasResultMayMemoryAccess()` hold when the access is a "may" access.
Unaliased SSA now correctly ignores variables that are ever accessed via a "may" access.
Aliased SSA now distinguishes `MemoryLocation`s for "may" and "must" accesses. I've refactored `getOverlap()` into the core `getExtentOverlap()`, which considers only the extent, but not the "may" vs. "must", and `getOverlap()`, which tweaks the result of `getExtentOverlap()` based on "may" vs. "must" and read-only locations.
When determining the overlap between a `Phi` operand and its definition, we now use the result of the defining `Chi` instruction, if one exists. This gives exact definitions for `Phi` operands for virtual variables.
2019-11-26 12:13:07 -07:00
yo-h
2eea94c3dc
Documentation: fix invalid @precision value
2019-11-26 14:11:54 -05:00
Dave Bartolomeo
4e1ee7a998
C++/C#: Fix formatting
2019-11-26 10:48:24 -07:00
Taus Brock-Nannestad
118275e948
Python: Use import python consistently in all queries.
2019-11-26 17:37:09 +01:00
Anders Schack-Mulligen
deb6a6e5c6
Java: Improve performance by normalizing import order to reduce cache invalidation.
2019-11-26 17:20:01 +01:00
Erik Krogh Kristensen
b5a57986c6
small changes based on review feedback
2019-11-26 15:57:31 +01:00
Erik Krogh Kristensen
7b262fa9cf
update expected output
2019-11-26 14:39:09 +01:00
Erik Krogh Kristensen
5a0cabb039
Merge remote-tracking branch 'upstream/master' into typeAheadSink
2019-11-26 14:37:40 +01:00
Erik Krogh Kristensen
ace484a519
change the typeahead.js model to be semantically correct
2019-11-26 14:35:13 +01:00
Tom Hvitved
355c4f7154
C#: Add change note
2019-11-26 13:54:19 +01:00
Tom Hvitved
71e958eabc
C#: Add taint-tracking steps through conversion operator calls
2019-11-26 13:53:50 +01:00
Tom Hvitved
acb069f69b
C#: Add data flow tests for conversion operators
2019-11-26 13:53:17 +01:00
Erik Krogh Kristensen
4a94c49d37
changes based on review feedback
2019-11-26 13:40:48 +01:00
Jonas Jensen
b1745f588c
Merge pull request #2402 from geoffw0/nospace
...
CPP: Make NoSpaceForZeroTerminator.ql more conservative.
2019-11-26 13:36:05 +01:00
Erik Krogh Kristensen
97718bf1d4
the callback function can both be the second and third argument
2019-11-26 13:00:00 +01:00
Erik Krogh Kristensen
b06acd1ed0
add change note
2019-11-26 12:52:41 +01:00
Erik Krogh Kristensen
0f948339af
add change note
2019-11-26 11:23:30 +01:00
Erik Krogh Kristensen
b6106f9638
keep the ResolvedPromiseDefinition class as a subclass of PromiseCreationCall
2019-11-26 11:16:59 +01:00
Erik Krogh Kristensen
f284b3a2bb
Merge remote-tracking branch 'upstream/master' into exceptionXss
2019-11-26 10:54:04 +01:00
Erik Krogh Kristensen
7ee12a3420
change doc based on review feedback
2019-11-26 10:48:24 +01:00
Anders Schack-Mulligen
18e1708036
Merge pull request #2412 from Cornelius-Riemenschneider/nullness-corr-cond
...
Java: Nullness library: track instanceof expressions in correlated conditions
2019-11-26 10:33:34 +01:00
semmle-qlci
fb44aa18bd
Merge pull request #2428 from erik-krogh/useOfReturnlessFunctionSuperCalls
...
Approved by max-schaefer
2019-11-26 09:14:08 +00:00
semmle-qlci
cf92022c89
Merge pull request #2420 from erik-krogh/safeStringSink
...
Approved by asgerf
2019-11-26 08:09:05 +00:00
Robert Marsh
60b384a6e5
C++/C#: use line numbers for instruction IDs
...
This should reduce the number of merge conflicts in the IR tests resulting
from instruction ID changes due to inserting or removing instructions
2019-11-25 18:27:59 -05:00
Calum Grant
113df4ea1d
Merge pull request #2278 from hvitved/csharp/autobuilder/shared-compilation
...
C#: Only set `UseSharedCompilation=false` in autobuilder when needed
2019-11-25 18:37:09 +00:00
Dave Bartolomeo
7d48220a76
C++/C#: Make QLDoc conform to style guide
2019-11-25 11:26:45 -07:00
Dave Bartolomeo
44c1c5a7ab
C++: Update points_to.ql test to use new bit offset format
2019-11-25 11:13:02 -07:00
Dave Bartolomeo
521fbb125e
C++/C#: Fix formatting
2019-11-25 11:12:23 -07:00
Asger F
e3e15a6015
JS: Rephrase change note
2019-11-25 17:20:42 +00:00
Asger F
df97ab2cb8
TS: Add INDEX prefix to env variables
2019-11-25 17:10:00 +00:00
Asger F
2508da7971
JS: Add change note
2019-11-25 17:01:32 +00:00
Asger F
7e515aeb72
TS: Verify yarn installation
2019-11-25 16:22:21 +00:00
Cornelius Riemenschneider
37f162106a
Fix formatting of file.
2019-11-25 17:04:38 +01:00
Tom Hvitved
fede9aed04
Merge pull request #2355 from cldrn/AspNetMaxRequestLength
...
CodeQL query to check for insecure MaxLengthRequest values in ASP.NET applications
2019-11-25 17:02:22 +01:00
Tom Hvitved
07e18c88a8
C#: Address review comments
2019-11-25 16:51:09 +01:00
semmle-qlci
d58a6b02bf
Merge pull request #2396 from hvitved/dataflow/erased-type-class
...
Approved by aschackmull, jbj
2019-11-25 15:22:13 +00:00
Asger F
e5ba80b18c
JS: Add test
2019-11-25 15:05:33 +00:00
Asger F
82b35a116c
JS: Handle .js import of .ts file
2019-11-25 14:58:12 +00:00
Asger F
b306eeeb6e
TS: Option to install dependencies
2019-11-25 14:42:17 +00:00
Taus Brock-Nannestad
036e0f75c8
Python: Account for non-evaluation of annotations in cyclic imports.
...
Should fix #2426 .
Essentially, we disregard expressions used inside annotations, if these
annotations occur in a file that has `from __future__ import annotations`, as
this prevents the annotations from being evaluated.
2019-11-25 15:32:52 +01:00
Cornelius Riemenschneider
3368169df8
Address review.
2019-11-25 14:54:50 +01:00
Erik Krogh Kristensen
9bd6363521
Merge remote-tracking branch 'upstream/master' into promiseAll
2019-11-25 14:34:58 +01:00
Tom Hvitved
795959ef8d
C#: Update expected test output
2019-11-25 13:41:12 +01:00
Tom Hvitved
71fd5379c9
C#: Remove tabs from qhelp file
2019-11-25 13:40:44 +01:00
Rasmus Wriedt Larsen
0f91139055
Merge pull request #2419 from tausbn/python-fix-use-of-input-fp
...
Python: Fix false positive for `py/use-of-input`.
2019-11-25 12:08:39 +01:00
Erik Krogh Kristensen
4efc71b7a2
remove FP in use-of-returnless-function FP related to calls to super()
2019-11-25 11:48:16 +01:00
Tom Hvitved
a26efdf4c1
Java/C++/C#: Rename DataFlowErasedType back to DataFlowType
2019-11-25 11:43:58 +01:00
Erik Krogh Kristensen
c7235bb372
add sources and sinks for typeahead.js
2019-11-25 10:46:54 +01:00
Jonas Jensen
8f3998915b
Merge pull request #2376 from geoffw0/qhelpms2
...
CPP: Recommendations and examples for TlsSettingsMisconfiguration.qhelp and UseOfDeprecatedHardCodedProtocol.qhelp
2019-11-25 08:17:32 +01:00
Rebecca Valentine
a8204385c3
Adds fix for __init_subclass__ bug. ( #2390 )
...
* Adds fix for __init_subclass__ bug.
* Adds test case.
* Move test on name.
I think it makes more sense here, alongside the other "special" method names.
2019-11-24 12:18:17 +01:00
Dave Bartolomeo
eda47bfc51
C++: Add SSA sanity tests to IR tests
2019-11-22 16:10:51 -07:00
Dave Bartolomeo
bd78f68975
C++/C#: Fix formatting
2019-11-22 16:08:49 -07:00
Dave Bartolomeo
df21835759
C++/C#: Refactor some integer constant code
...
Make `bitsToBytesAndBits` omit the leftover bits if zero.
2019-11-22 13:23:00 -07:00
Dave Bartolomeo
51ff262cbc
C++/C#: Add IR SSA sanity tests
2019-11-22 13:16:05 -07:00
Dave Bartolomeo
bc48c25690
C++/C#: Make IRVariable and its derived classes non-abstract
2019-11-22 12:13:39 -07:00
Dave Bartolomeo
12daa76b70
C++: Make duplicateOperand query report function name
2019-11-22 11:00:01 -07:00
Geoffrey White
cdbe920067
CPP: Remove second overview paragraph.
2019-11-22 16:22:08 +00:00
Geoffrey White
5a346c357b
Update cpp/ql/src/Likely Bugs/Protocols/UseOfDeprecatedHardcodedProtocolGood.cpp
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-22 16:21:24 +00:00
Geoffrey White
0c07fa44a1
Update cpp/ql/src/Likely Bugs/Protocols/UseOfDeprecatedHardcodedProtocol.qhelp
...
Co-Authored-By: Alistair <54933897+hubwriter@users.noreply.github.com >
2019-11-22 16:21:05 +00:00
Geoffrey White
ac1010872b
Update cpp/ql/src/Likely Bugs/Protocols/UseOfDeprecatedHardcodedProtocol.qhelp
...
Co-Authored-By: Alistair <54933897+hubwriter@users.noreply.github.com >
2019-11-22 16:20:54 +00:00
Geoffrey White
e274e01432
CPP: More consistency.
2019-11-22 16:08:00 +00:00
Geoffrey White
d4f75c1c2a
CPP: Consistency.
2019-11-22 16:07:59 +00:00
Geoffrey White
384cf4b233
CPP: Recommendation and example for UseOfDeprecatedHardcodedProtocol.qhelp.
2019-11-22 16:07:59 +00:00
Geoffrey White
8fc59ebac4
CPP: I believe these BUG labels were incorrect.
2019-11-22 16:07:59 +00:00
Geoffrey White
21d8264d80
CPP: Fix typo.
2019-11-22 16:07:59 +00:00
Geoffrey White
a1b603e73c
CPP: Add the examples to the test.
2019-11-22 16:07:59 +00:00
Geoffrey White
3cd545d186
CPP: Recommendation and example for TlsSettingsMisconfiguration.qhelp.
2019-11-22 16:07:59 +00:00
Geoffrey White
794a3deba9
CPP: Break up a long sentence in query description.
2019-11-22 16:07:59 +00:00
Taus Brock-Nannestad
67647bda66
Python: Fix false positive for py/use-of-input.
...
Fixes #1969 .
The points-to analysis does not know that the assignment `input = raw_input`
cannot fail under Python 2, and so there are two possible values that `input`
could point-to after exiting the exception handler: the built-in `input`, or the
built-in `raw_input`. In the latter case we do not want to report the alert, and
so adding a check that the given function does not point-to the built-in
`raw_input` suffices.
2019-11-22 16:46:20 +01:00
Geoffrey White
6fc415485b
CPP: Autoformat.
2019-11-22 15:34:51 +00:00
Geoffrey White
c73d3ebbb6
CPP: Pre-autoformat.
2019-11-22 15:34:50 +00:00
Geoffrey White
1d233f2f9e
CPP: Change notes for the queries.
2019-11-22 15:27:08 +00:00
Geoffrey White
62008597d4
CPP: Change notes for the library.
2019-11-22 15:27:08 +00:00
Geoffrey White
3895a7e1f0
CPP: Queries: Improve NoSpaceForZeroTerminator query.
2019-11-22 15:27:08 +00:00
Geoffrey White
3c9432d7b7
CPP: Queries: Improve OverflowCalculated query.
2019-11-22 15:19:00 +00:00
Geoffrey White
1e7bd9e987
CPP: Queries: Similar dataflow simplification in OverflowCalculated.ql to that made recently in NoSpaceForZeroTerminator.ql.
2019-11-22 15:19:00 +00:00
Geoffrey White
1fa30306dc
CPP: Libraries: Separate deallocation libraries.
2019-11-22 15:18:59 +00:00
Geoffrey White
a51da53013
CPP: Libraries: Split into interface and implementation.
2019-11-22 15:18:59 +00:00
Geoffrey White
356356f71b
CPP: Libraries: Overridable classes.
2019-11-22 15:18:59 +00:00
Geoffrey White
0d01ea66c6
CPP: Libraries: Move interfaces into the models directory.
2019-11-22 15:18:59 +00:00
Geoffrey White
64ed97b584
CPP: Libraries: Add FreeFunction and DeallocationExpr to malloc.qll.
2019-11-22 15:18:59 +00:00
Geoffrey White
5dab91cb51
CPP: Libraries: Update uses of the Alloc.qll library.
2019-11-22 15:18:59 +00:00
Geoffrey White
376ef2fc8e
CPP: Libraries: Add MallocFunction and AllocationExpr to malloc.qll.
2019-11-22 15:18:59 +00:00
Geoffrey White
5f798314d1
CPP: Tests: NoSpaceForZeroTerminator test cases for calloc and realloc.
2019-11-22 15:18:59 +00:00
Geoffrey White
a2c0532a84
CPP: Tests: CWE-120 test cases for calloc, realloc and new.
2019-11-22 15:16:32 +00:00
Geoffrey White
d67ea4d768
CPP: Tests: AV Rule 79 test cases for calloc, realloc and new.
2019-11-22 15:16:32 +00:00
Geoffrey White
7190dd2ef4
CPP: Tests: Rearrange a test prior to changes.
2019-11-22 15:16:32 +00:00
Geoffrey White
5014432472
CPP: Tests: Add a test of NewArrayExpr.getAllocatedType() and NewArrayExpr.getExtent().
2019-11-22 15:16:32 +00:00
Geoffrey White
d6cbc674b6
CPP: Autoformat.
2019-11-22 15:13:06 +00:00
Geoffrey White
bbe6a1aa76
CPP: Additional test case.
2019-11-22 15:13:05 +00:00
Erik Krogh Kristensen
9fc20cd9b0
add change note
2019-11-22 15:58:00 +01:00
Erik Krogh Kristensen
7d825af9a3
Added an XSS sink for Handlebars.SafeString
2019-11-22 15:56:21 +01:00
semmle-qlci
5c3c8eb35d
Merge pull request #2406 from erik-krogh/returnlessFp
...
Approved by asgerf
2019-11-22 13:06:03 +00:00
Erik Krogh Kristensen
f40d79271d
cleanup module imports and update expected outputs
2019-11-22 13:55:47 +01:00
Erik Krogh Kristensen
85b22536d0
adjust formatting
2019-11-22 13:36:16 +01:00
Esben Sparre Andreasen
5d34806e50
Merge pull request #2379 from asger-semmle/typescript-fixes
...
TS: A bunch of TypeScript fixes
2019-11-22 13:31:30 +01:00
Max Schaefer
6fbaa7a5ea
JavaScript: Make File not extend Locatable anymore.
...
Files have strange `:0:0:0:0` locations for... reasons. This makes the predicates inherited from `Locatable` meaningless. A particularly bad case is `getNumLines()`, which will always return one. The right predicate to use is, of course, `getNumberOfLines()`, which is defined in `File` itself.
2019-11-22 11:57:06 +00:00
Calum Grant
846600e855
Merge pull request #2410 from shati-patel/fix-heading
...
C# change notes: Remove duplicated heading
2019-11-22 11:52:53 +00:00
semmle-qlci
ec9b65ee61
Merge pull request #2369 from max-schaefer/js/odasa-8179
...
Approved by esbena
2019-11-22 11:26:54 +00:00
Cornelius Riemenschneider
0e7a08201f
Address review by Anders.
2019-11-22 12:19:06 +01:00
Rasmus Wriedt Larsen
46b6e6d722
Merge pull request #2409 from tausbn/python-typing-forward-reference-fp
...
Python: Support forward references inside return type annotations.
2019-11-22 11:18:04 +01:00
Rasmus Wriedt Larsen
536c211a73
Merge pull request #2401 from tausbn/python-fix-non-iterable-class-confusion-fp
...
Python: Fix false positive in `py/non-iterator-in-for-loop`
2019-11-22 11:15:16 +01:00
Max Schaefer
a3a46bfdc2
JavaScript: Add change note.
2019-11-22 09:27:14 +00:00
Max Schaefer
83f5b614e9
JavaScript: Switch detection of callback-based string replacement to data flow.
2019-11-22 09:24:34 +00:00
Max Schaefer
1951461f55
JavaScript: Simplify DoubleEscaping.
...
Undo previous work on generalising the concept of a replacement, which did not work out.
2019-11-22 09:24:34 +00:00
Max Schaefer
ff002a7af4
JavaScript: Whitelist more harmless incomplete escapes.
2019-11-22 09:24:34 +00:00
Max Schaefer
659cc812fe
JavaScript: Rephrase two predicates to help the optimiser.
2019-11-22 09:24:34 +00:00
Max Schaefer
db3eaa23ef
JavaScript: Introduce modelling of String.prototype.replace and use it in two queries.
2019-11-22 09:24:34 +00:00
Max Schaefer
f43e843b20
JavaScript: Introduce class RegExpLiteralNode.
2019-11-22 09:24:34 +00:00
Max Schaefer
12ea81af9c
JavaScript: Move getAMatchedConstant(RegExpTerm) into the library.
2019-11-22 09:24:34 +00:00
Max Schaefer
a5a5debdc7
JavaScript: Move getStringValue(RegExpLiteral) into the library.
2019-11-22 09:24:34 +00:00
Max Schaefer
0edb70f373
JavaScript: Deal with escape-unescape-escape (and similar) chains.
2019-11-22 09:24:34 +00:00
Max Schaefer
cb54618a5d
JavaScript: Deal with (un-)escaping on captured variables.
2019-11-22 09:24:34 +00:00
Max Schaefer
61aa075e8d
JavaScript: Fix regexes for escaping schemes.
2019-11-22 09:24:34 +00:00
Max Schaefer
4f899a9b0d
JavaScript: Recognize string escaping using .replace with a callback.
2019-11-22 09:24:34 +00:00
Max Schaefer
5dcf55e113
JavaScript: Refactor DoubleEscaping.ql.
2019-11-22 09:24:34 +00:00
semmle-qlci
62859d140d
Merge pull request #2394 from esbena/js/support-getDerivedFromError
...
Approved by max-schaefer
2019-11-22 07:45:45 +00:00
semmle-qlci
2c623372b6
Merge pull request #2405 from esbena/js/another-bind-model
...
Approved by asgerf
2019-11-22 07:35:58 +00:00
Robert Marsh
05aebeff79
Merge branch 'master' into rdmarsh/cpp/ir-callee-side-effects
2019-11-21 13:45:31 -08:00
Jonathan Leitschuh
21193bd780
Java: Use of HTTP/FTP to download/upload Maven artifacts
...
This adds a security alert for the use of HTTP or FTP to download or upload
artifacts using Maven.
2019-11-21 13:35:29 -05:00
Cornelius Riemenschneider
5d4b6c3a8c
Nullness: Track correlated conditions of equality tests of variables.
2019-11-21 19:24:40 +01:00
Cornelius Riemenschneider
92f32a12d8
Add tests for nullness tracking by comparing variables.
2019-11-21 19:23:39 +01:00
Robert Marsh
dbe885fd38
Merge pull request #1926 from jbj/ir-dataflow-toString
...
C++: DataFlow::Node.toString consistency
2019-11-21 10:20:35 -08:00
Geoffrey White
676e8a2c2e
Merge pull request #2399 from jbj/ExprHasNoEffect-templates
...
C++: Suppress ExprHasNoEffect on template code
2019-11-21 18:01:41 +00:00
Cornelius Riemenschneider
3e5324e772
More precise Nullness tracking by taking correlated instanceof expressions into account.
...
Fixes #2238 .
2019-11-21 18:38:27 +01:00
Cornelius Riemenschneider
d8aae1c126
Add tests to track nullness by instanceof checks.
2019-11-21 18:38:27 +01:00
Erik Krogh Kristensen
94e9c0203d
add test for exceptional taint-flow
2019-11-21 17:16:13 +01:00
shati-patel
b6a05399da
C# change notes: Remove duplicated heading
2019-11-21 16:08:44 +00:00
semmle-qlci
8cca9b05ea
Merge pull request #2393 from max-schaefer/js/improve-incomplete-sanitization-docs
...
Approved by mchammer01
2019-11-21 16:04:19 +00:00
Asger F
ec8ced7963
TS: Fix a typos and leftover todo
2019-11-21 15:39:37 +00:00
Asger F
01ab8f07eb
TS: Fix a crash when allowJs: true was set
2019-11-21 15:39:37 +00:00
Asger F
7d558d165a
JS: Update extractor version string
2019-11-21 15:39:37 +00:00
Asger F
33a44de47d
TS: Add upgrade script
2019-11-21 15:39:37 +00:00
Asger F
2c916cb4f3
TS: Update stats
2019-11-21 15:39:37 +00:00
Asger F
dd50d29827
TS: Fix crash in case of missing type roots
2019-11-21 15:39:37 +00:00
Asger F
4a885cbf92
TS: Expose optional parameters at syntax level
2019-11-21 15:39:37 +00:00
Asger F
b6b8213e13
TS: Handle rest parameters in call signatures
2019-11-21 15:39:37 +00:00
Asger F
f2c3d734ea
TS: Update some more tests
2019-11-21 15:39:37 +00:00
Asger F
0c41d6910f
TS: Pass tsconfig options correctly
2019-11-21 15:39:37 +00:00
Asger F
23f8d27447
TS: Simplify debugging
2019-11-21 15:39:37 +00:00
Asger F
8205a59688
TS: Unfold aliases in Type.unfold()
2019-11-21 15:39:37 +00:00
Asger F
e25ee182a0
TS: Extract type alias relation
2019-11-21 15:39:37 +00:00
Asger F
f11dc11ade
TS: Fix type of RHS of TypeAliasDeclaration
2019-11-21 15:39:37 +00:00
Asger F
a3aef1e4e0
TS: Update TypeAlias test
2019-11-21 15:39:37 +00:00
Taus Brock-Nannestad
033524ce63
Python: Support forward references inside return type annotations.
...
Should fix #2407 .
Also allows for the string containing the forward reference to appear inside a
subexpression of the type annotation.
2019-11-21 15:37:32 +01:00
Erik Krogh Kristensen
42a0a62e4c
remove 3 FP sources from use-of-returnless-function
2019-11-21 14:27:04 +01:00
Esben Sparre Andreasen
edb94db6ef
JS: add change notes
2019-11-21 13:20:08 +01:00
Esben Sparre Andreasen
03c83c9c9d
JS: model React's getDerivedStateFromError
2019-11-21 13:18:43 +01:00
Esben Sparre Andreasen
23d29a80db
JS: improve comment syntax
2019-11-21 13:16:40 +01:00
Esben Sparre Andreasen
6328a0a8b9
JS: improve FP filter for js/unbound-event-handler-receiver
2019-11-21 13:13:40 +01:00
Taus Brock-Nannestad
9fda4ab480
Python: Fix false positive in py/non-iterator-in-for-loop
...
Should fix #1833 , #2137 , and #2187 .
Internally, comprehensions are (at present) elaborated into local functions and
iterators as described in [PEP-289](https://www.python.org/dev/peps/pep-0289/ ).
That is, something like:
```
g = (x**2 for x in range(10))
```
becomes something akin to
```
def __gen(exp):
for x in exp:
yield x**2
g = __gen(iter(range(10)))
```
In the context of the top-level of a class, this means `__gen` looks as if it is
a method of the class, and in particular `exp` looks like it's the `self`
argument of this method, which leads the points-to analysis to think that `exp`
is an instance of the surrounding class itself.
The fix in this case is pretty simple: we look for occurrences of `exp` (in fact
called `.0` internally -- carefully chosen to _not_ be a valid Python
identifier) and explicitly exclude this parameter from being classified as a
`self` parameter.
2019-11-21 11:49:29 +01:00
Rasmus Wriedt Larsen
53576a4781
Merge pull request #2397 from tausbn/python-make-tostrings-visible
...
Python: Add `toString` information for all classes without such.
2019-11-21 11:46:22 +01:00
Robert Marsh
34593701b2
Merge branch 'master' into rdmarsh/cpp/ir-callee-side-effects
2019-11-20 10:03:32 -08:00
Geoffrey White
403899ecbc
Merge pull request #2391 from jbj/CompareWhereAssignMeant-decltype
...
C++: Fix FP for expression SFINAE with decltype
2019-11-20 17:34:09 +00:00
Geoffrey White
5c855fc925
CPP: Change note.
2019-11-20 15:34:41 +00:00
Geoffrey White
2212c47db2
CPP: Use dataflow more consistently.
2019-11-20 15:34:40 +00:00
Geoffrey White
e6ea705ff2
CPP: Switch from a blacklist to whitelist approach for determining null termination.
2019-11-20 15:34:38 +00:00
Geoffrey White
fbd9d9bdab
CPP: Add a test case involving the std::string constructor.
2019-11-20 15:20:21 +00:00
Jonas Jensen
ff96e3a8ea
C++: Also suppress ExprHasNoEffect in declspec etc
2019-11-20 15:44:39 +01:00
Geoffrey White
6fc9cc5952
CPP: Add a test case using 'new'.
2019-11-20 14:27:19 +00:00
Geoffrey White
57c7a87af9
CPP: Add tests with different proof of zero-termination.
2019-11-20 14:27:19 +00:00
Geoffrey White
3c9fe91581
CPP: Add proof of zero-termination to tests.
2019-11-20 14:27:19 +00:00
Jonas Jensen
b325427d29
C++: Suppress ExprHasNoEffect on template code
2019-11-20 15:12:25 +01:00
Taus Brock-Nannestad
c525ab325f
Python: Add toString information for all classes without such.
...
Having `toString()` defined to be `none()` is a major headache when debugging,
as `toString`-less results are silently elided. This PR puts dummy `toString`s
in place of the `none()`s.
(I am mostly creating this to see if it impacts our tests and/or the
performance. If not, we may as well merge it.)
2019-11-20 14:47:20 +01:00
semmle-qlci
77c869f528
Merge pull request #2220 from erik-krogh/processEnvTaint
...
Approved by esbena, max-schaefer
2019-11-20 13:16:43 +00:00
Tom Hvitved
acc7d5298d
Data flow: Sync files
2019-11-20 14:10:02 +01:00
Tom Hvitved
6c0dbcfca2
Java/C++: Add DataFlowErasedType aliases
2019-11-20 14:09:53 +01:00
Tom Hvitved
d0b4653e32
C#: Introduce DataFlowErasedType
2019-11-20 14:09:46 +01:00
Max Schaefer
cb20de8070
JavaScript: Add a warning to IncompleteSanitization help.
...
Sanitizing away multi-character strings using regular expressions is tricky business, and we should probably warn about it.
2019-11-20 11:57:50 +00:00
Jonas Jensen
4dafa16572
C++: Fix FP on unevaluated code
...
This fixes false positives on tenzir/vast.
2019-11-20 10:42:36 +01:00
Geoffrey White
9cf819929d
Merge pull request #2383 from jbj/field-isStatic
...
C++: Don't check if a Field is static
2019-11-20 09:05:03 +00:00
Paulino Calderon
63884c1a86
Mixed spaces and tabs
2019-11-19 13:06:55 -05:00
Paulino Calderon
85eda8c978
Brings security tests from other PRs
2019-11-19 13:04:19 -05:00
Paulino Calderon
96a02aba3f
Adds quotes on name and additional info tags
2019-11-19 12:39:10 -05:00
semmle-qlci
51a51d7e0c
Merge pull request #2387 from max-schaefer/js/incomplete-dotdot-sanitization
...
Approved by asger-semmle
2019-11-19 16:39:35 +00:00
Jonas Jensen
a1af96e521
C++: Reproduce a reported FP
2019-11-19 16:17:49 +01:00
Max Schaefer
5565be14fc
JavaScript: Teach IncompleteSanitization to flag incomplete path sanitizers.
2019-11-19 15:06:16 +00:00
Erik Krogh Kristensen
1ba777a45d
remove deep taint of objects
2019-11-19 15:50:50 +01:00
Erik Krogh Kristensen
c2b48eb546
rename getExceptionalNode to getExceptionTarget
2019-11-19 15:32:17 +01:00
Jonas Jensen
c41114334f
Merge remote-tracking branch 'upstream/master' into ir-dataflow-toString
...
Solved conflicts in `*.expected` by re-running the tests.
2019-11-19 14:27:27 +01:00
Erik Krogh Kristensen
d8a5554666
update doc on getExceptionalNode
2019-11-19 14:10:35 +01:00
Erik Krogh Kristensen
abd58ba905
rename 'getThrowsToNode' to 'getExceptionalNode'
2019-11-19 14:08:36 +01:00
Erik Krogh Kristensen
9fa7393d56
add support for try-statements with no catch block
2019-11-19 13:37:35 +01:00
Rasmus Wriedt Larsen
b39bcde31c
Merge pull request #2375 from tausbn/python-fix-mutable-value-type-coercion-fp
...
Python: Don't report mutable parameters that are in fact immutable.
2019-11-19 13:26:23 +01:00
Jonas Jensen
fbf2ef8625
C++: Don't check if a Field is static
...
A `Field` in the C++ QL libraries can't be static, but I'd for some
reason written two checks for `Field`s being static in the data-flow
library.
2019-11-19 13:20:21 +01:00
Rasmus Wriedt Larsen
231414ceaf
Merge pull request #2374 from tausbn/python-fix-mappingproxytype-fp
...
Python: Fix non-container FP relating to `MappingProxyType`.
2019-11-19 13:13:26 +01:00
Jonas Jensen
b43cbeb17f
Merge pull request #2372 from geoffw0/qhelpms
...
CPP: Improve TlsSettingsMisconfiguration qhelp
2019-11-19 13:05:52 +01:00
Erik Krogh Kristensen
0a428a8f44
typo
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2019-11-19 13:05:13 +01:00
Erik Krogh Kristensen
2f08ee9faf
fix typo
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2019-11-19 12:53:50 +01:00
Jonas Jensen
0731309b1e
C++: Change note for StackVariable
2019-11-19 11:44:03 +01:00
Jonas Jensen
4d97534308
C++: Deprecate LocalScopeVariableReachability
2019-11-19 11:43:41 +01:00
Jonas Jensen
1498499994
C++: Relax type in two tests
2019-11-19 11:31:34 +01:00
Jonas Jensen
f5b9837e19
C++: Use StackVariable in Nullness.qll
...
This might cause fewer variables to be analysed because not every use of
`LocalScopeVariable` was constrained by the def-use library. Hopefully
this leads to an improved nullness analysis since it avoids treating
`static T *x = nullptr;` the same as `static T *x; x = nullptr;`.
2019-11-19 11:31:34 +01:00
Jonas Jensen
140575ee71
C++: Use StackVariable where SSA/def-use are used
...
These changes should not affect semantics since these uses of
`LocalScopeVariable` were already constrained to stack variables by
their use of SSA or def-use.
2019-11-19 11:31:34 +01:00
Jonas Jensen
6f9ec0409e
C++: Use StackVariable in code that uses RangeSSA
2019-11-19 11:31:33 +01:00
Jonas Jensen
29f66ff095
C++: Use StackVariable, remove not v.isStatic()
...
In these files it was possible to remove calls to `isStatic` by
switching from `LocalScopeVariable` to `StackVariable`. This changes
semantics, hopefully for the better, to treat `thread_local` locals the
same as `static` locals.
2019-11-19 11:30:59 +01:00
Jonas Jensen
e57f98ca64
C++: Use StackVariable in def-use libraries
...
Most of the implementation was already in terms of
`SemanticStackVariable`, so not much should have changed.
2019-11-19 11:30:59 +01:00
Jonas Jensen
95a333d28c
C++: Use StackVariable in SSA libraries
...
This means we'll no longer get SSA definitions for thread-local
local-scope variables.
2019-11-19 11:30:59 +01:00
Jonas Jensen
c1ed908834
C++: Use StackVariableReachability
...
This library is a drop-in replacement for
`LocalScopeVariableReachability`, so no changes are expected.
2019-11-19 11:30:59 +01:00
Jonas Jensen
01ca63ae92
C++: Bring back StackVariableReachability.qll
...
This is now a copy of `LocalScopeVariableReachability.qll`, just with
`s/LocalScopeVariable/StackVariable/g`. It can be used as a drop-in
replacement since the `LocalScopeVariableReachability.qll` library
implementation was already restricted to `SemanticStackVariable`.
2019-11-19 11:30:59 +01:00
Jonas Jensen
8110039e0a
C++: Bring back the StackVariable QL class
...
The new `StackVariable` class actually denotes what its name suggests.
2019-11-19 11:23:34 +01:00
Erik Krogh Kristensen
d4f42d872a
change change-note to target 1.24 instead of 1.23
2019-11-19 11:10:34 +01:00
Taus
4c700882b6
Merge pull request #2190 from RasmusWL/python-modernise-tornado-library
...
Python: modernise tornado library
2019-11-19 09:36:30 +01:00
Erik Krogh Kristensen
de8ed3f508
update test code
2019-11-19 09:04:30 +01:00
Erik Krogh Kristensen
91674f681b
refactoring to remove duplicated code and simplify the ExceptionXss query
2019-11-19 08:54:51 +01:00
Robert Marsh
ae47eab727
C++: autoformat
2019-11-18 15:36:08 -08:00
Taus Brock-Nannestad
3491d90b1e
Python: Apply auto-format.
2019-11-18 16:50:32 +01:00
Taus Brock-Nannestad
1385f3c018
Python: Fix non-container FP relating to MappingProxyType.
...
Fixes #2307 .
Also modernises the query to use the `Value` API.
2019-11-18 16:50:32 +01:00
Taus Brock-Nannestad
3c47394b7a
Python: Apply auto-format.
2019-11-18 16:28:54 +01:00
Taus Brock-Nannestad
cac261858c
Python: Don't report mutable parameters that are in fact immutable.
...
Fixes #1832 .
In the taint sink, we add an additional check that the given control-flow node
can indeed point to a value that is mutable. This takes care of the guard on the
type.
If and when we get around to adding configurations for all of the taint
analyses, we may want to implement this as a barrier instead, pruning any steps
that go through a type test where the type is not mutable.
2019-11-18 16:18:44 +01:00
Calum Grant
b9d1c38753
Merge pull request #2371 from max-schaefer/rc/1.23
...
Merge rc/1.23 into master
2019-11-18 14:15:31 +00:00
semmle-qlci
ed4657c201
Merge pull request #2340 from hvitved/csharp/nunit-assertions
...
Approved by calumgrant
2019-11-18 13:02:49 +00:00
Nick Rolfe
9828315b6e
Merge pull request #2033 from ian-semmle/edg
...
C++: Changes following EDG upgrade
2019-11-18 12:46:11 +00:00
Erik Krogh Kristensen
853c86685b
remove some false positives
2019-11-18 13:32:47 +01:00
Geoffrey White
ff15c01ab9
CPP: Comma.
2019-11-18 11:51:54 +00:00
Geoffrey White
9a53706e87
CPP: Reword TlsSettingsMisconfiguration.qhelp.
2019-11-18 11:49:28 +00:00
Geoffrey White
2789c2dbac
CPP: Fix typos.
2019-11-18 11:48:13 +00:00
Tom Hvitved
3d1ce55642
C#: Address review comments
2019-11-18 10:53:02 +01:00
Erik Krogh Kristensen
5a6958a1cd
add promise aggregators
2019-11-17 11:22:29 +01:00
Erik Krogh Kristensen
b3e88cdf31
refactored multiple implementations of getEnclosingTryStmt into a single predicate
2019-11-17 09:50:41 +01:00
Erik Krogh Kristensen
1b81526691
Merge remote-tracking branch 'upstream/master' into exceptionXss
2019-11-17 09:29:54 +01:00
Erik Krogh Kristensen
525da97dd4
changes based on review feedback
2019-11-17 09:24:00 +01:00
Erik Krogh Kristensen
3b9847e075
apply suggestions from max
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2019-11-17 09:01:48 +01:00
Paulino Calderon
56c12adab7
Adds check for insecure MaxLengthRequest values
2019-11-16 14:21:39 -05:00
Erik Krogh Kristensen
a59a414e0b
update expected output
2019-11-16 15:20:42 +01:00
Erik Krogh Kristensen
8ff515a58d
address review feedback on MaskingReplacer
2019-11-16 15:20:42 +01:00
Erik Krogh Kristensen
4ec2070e48
remove property reads on process.env as a taint step, and add a barrier for masking replace calls
2019-11-16 15:20:42 +01:00
Erik Krogh Kristensen
052a331395
rename ProcessEnvLabel to PartiallySensitiveMap
2019-11-16 15:20:42 +01:00
Erik Krogh Kristensen
2bd48db8cd
refactor isSanitizerEdge in clear-text-logging
2019-11-16 15:20:42 +01:00
Erik Krogh Kristensen
92dc759cf9
remove type cast, and fix expected test results
2019-11-16 15:20:42 +01:00
Erik Krogh Kristensen
850278c62f
some changes based on review. And change to only flag unknown reads of process.env
2019-11-16 15:20:42 +01:00
Erik Krogh Kristensen
68c30aaef3
add flowlabels to js/clear-text-logging
2019-11-16 15:20:42 +01:00
Erik Krogh Kristensen
14e4decffa
changes based on review feedback. No flow-labels yet
2019-11-16 15:20:42 +01:00
Erik Krogh Kristensen
1766f6a6d8
simplify global var "process"
...
Co-Authored-By: Esben Sparre Andreasen <esbena@github.com >
2019-11-16 15:20:41 +01:00
Erik Krogh Kristensen
e1039d3a56
change note
2019-11-16 15:20:41 +01:00
Erik Krogh Kristensen
297c71a64b
add process.env as source for js/clear-text-logging
2019-11-16 15:20:41 +01:00
Erik Krogh Kristensen
b12e255fd8
add indirect calls to logging methods as logging methods
2019-11-16 15:20:41 +01:00
Robert Marsh
180a3c9f26
C++: accept test changes
2019-11-15 11:01:18 -08:00
James Fletcher
351cb46bb9
Merge pull request #2349 from shati-patel/docs/readme
...
Docs: Update readme in docs folder
2019-11-15 16:52:52 +00:00
shati-patel
37931f2bcf
Docs: Update readme in docs folder
2019-11-15 16:26:43 +00:00
yh-semmle
de65f023d6
Merge pull request #2167 from aschackmull/java/dataflow-out-of-arg-refactor
...
Java/C++/C#: Refactor dataflow to simplify return flow.
2019-11-15 11:10:06 -05:00
Erik Krogh Kristensen
4073dfaf24
remove redundant code
2019-11-15 16:17:18 +01:00
Erik Krogh Kristensen
d36312cf9f
update expected output
2019-11-15 16:08:13 +01:00
Erik Krogh Kristensen
3edd65f9ab
changed the exceptional taint-steps to step through each call-site
2019-11-15 16:05:15 +01:00
Ian Lynagh
4442fd8407
C++: Accept changes to syntax-zoo tests
2019-11-15 14:42:36 +00:00
Ian Lynagh
2cf714a923
C++: Follow changes in lambda locations
2019-11-15 14:42:36 +00:00
Ian Lynagh
8e00516ecf
C++: Accept changes in ir test
2019-11-15 14:42:36 +00:00
Erik Krogh Kristensen
e95cceef1d
import all the shared XSS sources and sinks
2019-11-15 15:41:53 +01:00
Erik Krogh Kristensen
65a018ceed
use flow labels to avoid dual configurations
2019-11-15 14:37:46 +01:00
Tom Hvitved
20a1cb6fc8
C#: Teach assertion library about (classical) NUnit assertions
...
This commit adds support for (classical) NUnit assertions (see
https://github.com/nunit/docs/wiki/Assertions ). Modern constraint-based assertions,
such as `Assert.That(o, Is.Not.Null)` are currently not supported, because they
would require a restructuring of the assertion library.
2019-11-15 14:07:28 +01:00
Erik Krogh Kristensen
8d2ae136b0
move String.prototype.match taint step to a general AdditionalTaintStep
2019-11-15 12:52:54 +01:00
Asger F
e3b15a98c4
JS: Add prop names for array element pattern PropReads
2019-11-15 11:16:50 +00:00
Robert Marsh
facbd32062
Merge branch 'master' into rdmarsh/cpp/ir-callee-side-effects
2019-11-14 11:09:13 -08:00
Robert Marsh
2fb1d4d1b1
C++: fix IR return block successors
2019-11-14 10:29:48 -08:00
Erik Krogh Kristensen
e49b5e4afc
up precision from low to medium, and fix tab/spaces
2019-11-14 17:42:16 +01:00
Erik Krogh Kristensen
7137a64b7d
Added query for detecting XSS that happens through an exception
2019-11-14 17:04:00 +01:00
Anders Schack-Mulligen
106b8cfbca
Java/C++/C#: Fix bad magic and bad join-order.
2019-11-14 13:17:17 +01:00
Tom Hvitved
a9f08671ca
C#: Address review comments
2019-11-14 11:00:19 +01:00
Tom Hvitved
dee4ddbb5b
C#: Only set UseSharedCompilation=false in autobuilder when needed
...
Since we are now able to trace shared compilation builds on Linux and macOS
(starting from .NET Core 3), and always were able to on Windows, there is
no need to set `UseSharedCompilation=false` in those cases. This may have a
positive performance impact, as shared compilation is generally faster then
non-shared compilation.
2019-11-08 10:28:20 +01:00
alexet
924d23f657
Cache the computation of core toString predicates.
2019-10-29 14:48:27 +00:00
Robert Marsh
8076156cb1
Merge branch 'master' into rdmarsh/cpp/ir-callee-side-effects
2019-10-28 16:50:34 -07:00
Robert Marsh
120fa6c330
C++: alias fixes for ReturnIndirection
2019-10-28 15:09:35 -07:00
Robert Marsh
5e946cc9f3
C++: add param read side effects to IR exit blocks
2019-10-28 15:09:04 -07:00
Anders Schack-Mulligen
d0842fc35d
Java/C++/C#: Minor refactor following review comment.
2019-10-28 16:31:22 +01:00
Anders Schack-Mulligen
379ef1d2f9
Java: Fix bad magic and join-order.
2019-10-28 10:40:06 +01:00
Rasmus Wriedt Larsen
5b6675aa71
Python: Select location first in tornado Classes test
...
so it conforms with the general scheme in tests
2019-10-24 15:01:40 +02:00
Rasmus Wriedt Larsen
e7eaf2b7d9
Python: Autoformat (4 spaces) tornado library
2019-10-24 15:01:40 +02:00
Rasmus Wriedt Larsen
2bb933fef0
Python: Modernise tornado library
2019-10-24 15:01:40 +02:00
Rasmus Wriedt Larsen
3e3833927b
Python: Remove unused getTornadoRequestHandlerMethod
...
It was only used in a test, and with the mock, it gives no results anyway.
2019-10-24 15:01:40 +02:00
Rasmus Wriedt Larsen
bc50e90f5b
Python: Use mock for tornado tests
2019-10-24 15:01:40 +02:00
Rasmus Wriedt Larsen
4248a8418b
Python: Move tornado tests from internal repo
2019-10-24 15:01:35 +02:00
Robert Marsh
e8dd0227ae
C++: accept test changes
2019-10-22 14:27:43 -07:00
Anders Schack-Mulligen
c37195b226
Java/C++/C#: Sync.
2019-10-22 11:42:35 +02:00
Anders Schack-Mulligen
2ffbb2ecd6
Java: Refactor dataflow to simplify return flow.
2019-10-22 11:42:35 +02:00
Robert Marsh
bea9a1cbb2
autoformat
2019-10-18 12:15:21 -07:00
Robert Marsh
8905159de7
C++: add InitializeIndirection for pointer params
2019-10-18 11:06:09 -07:00
Jonas Jensen
7cfbe88e7b
C++: IR DataFlow::Node.toString consistency
...
The `toString` for IR data-flow nodes are now similar to AST data-flow
nodes. This should make it easier to use the IR as a drop-in replacement
in the future. There are still differences because the IR data flow
library takes conversions into account.
I did not attempt to align the new nodes we use for field flow. That can
come later, when we add field flow to IR data flow.
2019-09-13 14:33:31 +02:00
Jonas Jensen
562bffe710
C++: Simplify toString of ImplicitParameterNode
...
This string looked out of place compared to `ExplicitParameterNode`,
whose string is simply the name of the parameter and therefore
indistinguishable from an access to the parameter without looking at the
location also. This has not been a problem so far, and if we want to
distinguish more clearly between initial values and accesses at some
point, we should do it for `ExplicitParameterNode` and
`UninitializedNode` too.
2019-09-13 14:33:26 +02:00
Joshua Hale
707f75f7ba
doc: remove - from command arguments
2019-01-30 11:36:48 +00:00