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
Jonas Jensen
7f26f078eb
C++: Fix isFromMacroDefinition join order
...
This fixes the performance of `SignedOverflowCheck.ql` on
jluttine/suitesparse.
2019-11-21 11:01:50 +01:00
Jonas Jensen
82499b035b
C++: Use isFromMacroDefinition for exclusion
...
The `SignedOverflowCheck.ql` query was very slow on certain snapshots
(jluttine/suitesparse and Chromium) due to bad magic in
`MacroInvocation::getAnAffectedElement_dispred#fb`. This commit doesn't
fix the bad magic but changes the exclusion mechanism to use a predicate
where we can better control the magic and optimization.
The query should also give more good results due to this new exclusion
mechanism, which is the same one used in its sibling,
`PointerOverflow.ql`.
2019-11-21 10:40:36 +01:00
Robert Marsh
15f50e6a38
Update docs/language/learn-ql/cpp/dataflow.rst
...
Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com >
2019-11-20 15:44:29 -08: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
Jonas Jensen
6616eb852e
C++: Mention flow through fields
2019-11-20 16:25:13 +01: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
Jonas Jensen
4ad8995440
C++: Group all the 1.23 data flow changes
2019-11-20 15:34:49 +01:00
Jonas Jensen
a48f347db9
C++: Don't mention predicate hasStdName
...
This predicate was removed before #1585 was merged, but we forgot to
remove it from the change note.
2019-11-20 15:33:32 +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
Robert Marsh
53709deb9d
Merge pull request #2342 from jbj/overflow-doc-fixes
...
C++: Signed Overflow Check qhelp improvements
2019-11-19 15:37:52 -08: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
Shati Patel
49c2398bda
QL docs: Update links to blog/demos
2019-11-19 15:06:26 +00: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