Commit Graph

41418 Commits

Author SHA1 Message Date
Rebecca Valentine
3ce250b2cf Adds some debugging changes. 2020-02-12 19:29:42 -08:00
Sauyon Lee
ed3971af47 Makefile: make tools-ARCH no longer build the tokenizer 2020-02-12 15:52:43 -08:00
Sauyon Lee
bf2b655586 Makefile: make all target build extractor instead of tools 2020-02-12 15:52:42 -08:00
Sauyon Lee
dc9d790bd3 Makefile: Make better use of built-in variables 2020-02-12 15:52:42 -08:00
Sauyon Lee
1262935085 Update stats 2020-02-12 15:52:41 -08:00
Sauyon Lee
01f4bfe4b8 Makefile: Use codeql to create stats database 2020-02-12 15:52:40 -08:00
Robert Marsh
52b164434d C++: remove accidental commit 2020-02-12 15:23:30 -08:00
Sauyon Lee
92025ad9bd Add a RuneLit alias for CharLit
Also change the doc comment on CharLit to RuneLit
2020-02-12 15:17:14 -08:00
Sauyon Lee
eb990c9de7 BadRedirectCheck: Use new rune literal string values 2020-02-12 15:14:59 -08:00
Sauyon Lee
74bb4f707d Make rune literal string value its value 2020-02-12 15:14:58 -08:00
Robert Marsh
1d5971f8ec C++: accept test changes from extractor update 2020-02-12 13:29:21 -08:00
Max Schaefer
cb1d2935d4 Merge pull request #23 from github/sauyon-actions-1
Implement Actions CI
2020-02-12 20:41:59 +00:00
Sauyon Lee
1365da2224 examples/variable: Select declaration as well as the variable
This makes the test platform-independent
2020-02-12 10:41:58 -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
Shati Patel
bd94e80271 Merge pull request #2809 from jf205/update-rc123
docs: port some more changes onto rc/1.23
2020-02-11 11:26:36 +01:00
James Fletcher
cb94c95115 Merge pull request #2807 from shati-patel/sphinx-blog
Remove link to blog
2020-02-11 09:16:42 +00:00
Arthur Baars
a460d90434 Remove trailing ; in QL language spec
(cherry picked from commit c91815f44d)
2020-02-11 09:13:30 +00:00
Arthur Baars
b56b10b0d9 Fix typos in QL language spec
(cherry picked from commit c431d47481)
2020-02-11 09:13:30 +00:00
James Fletcher
d8f31068d5 Update docs/language/learn-ql/writing-queries/debugging-queries.rst
Co-Authored-By: shati-patel <42641846+shati-patel@users.noreply.github.com>
(cherry picked from commit 47f61f3569)
2020-02-11 09:04:45 +00:00
james
f3d2588dae docs: address review comments
(cherry picked from commit 537739c42d)
2020-02-11 09:04:45 +00:00
james
646670708c docs: move abstract classes topic to handbook
(cherry picked from commit 23d1e06aa4)
2020-02-11 09:04:45 +00:00