Commit Graph

53865 Commits

Author SHA1 Message Date
Paolo Tranquilli
62f4e48433 Swift: fix comments in PrintAst library 2023-02-22 16:46:46 +01:00
Mathias Vorreiter Pedersen
676f4125c3 Merge pull request #12282 from MathiasVP/float-and-array-padding
QL: Handle large numbers and -1 padding
2023-02-22 15:16:54 +00:00
Chris Smowton
9155e08b65 Merge remote-tracking branch 'origin/rc/3.8' into smowton/admin/merge-rc38-into-main-2023 2023-02-22 15:12:06 +00:00
Chris Smowton
2c7a2fc6d7 Merge pull request #12272 from smowton/smowton/admin/rc38-ci-fixes
Merge rc/3.7 into rc/3.8
2023-02-22 15:10:35 +00:00
Mathias Vorreiter Pedersen
498d0c359e QL: Convert various int getters to float (to avoid overflow) and correctly handle '-1' padding. 2023-02-22 14:54:40 +00:00
Rasmus Wriedt Larsen
8eaaf8e3e5 Python: Ignore trace.py in ModuleExport.ql test
I guess we could have done this at the very start of introducing this
test in this PR, but I think the last commit was mostly inspired from
looking at all the things that evidently was re-exported from the trace
import, even when I knew they were not available because of the
`__all__` definition.
2023-02-22 15:42:28 +01:00
Rasmus Wriedt Larsen
c8a76246d8 Python: Take __all__ into consideration for re-export of from <pkg> import *
However, we can see that `from <pkg> import *` and `import pkg` are
handled differently. Would have liked `has_defined_all_indirection` to
behave in the same way no matter how the import was made.
2023-02-22 15:39:57 +01:00
Rasmus Wriedt Larsen
be5812cf91 Python: from <pkg> import * ignores __all__ regression
Notice that `has_defined_all_indirection` all have both
`all_defined_bar_copy` and `all_defined_foo_copy` marked as exported,
even though only `all_defined_foo_copy` is available.
2023-02-22 15:38:24 +01:00
Mathias Vorreiter Pedersen
b738c2684b Merge pull request #12279 from MathiasVP/kind-predicate-logs
QL: Start of the AST for `kind: predicates` evaluator logs
2023-02-22 14:25:11 +00:00
Mathias Vorreiter Pedersen
5e3289a089 Merge pull request #12280 from github/tausbn/ql-make-json-parsing-a-bit-more-robust
QL: Make the JSON parser a bit more robust
2023-02-22 14:16:48 +00:00
Mathias Vorreiter Pedersen
d64d03ec48 QL: Fix Code Scanning warning. 2023-02-22 14:15:47 +00:00
Mathias Vorreiter Pedersen
f155f19725 QL: Respond to comments. 2023-02-22 14:15:18 +00:00
Rasmus Wriedt Larsen
d77ce4f3d7 Python: minor rewrite of from <pkg> import * handling 2023-02-22 15:00:55 +01:00
Rasmus Wriedt Larsen
4df7dfbff6 Python: Don't import module as module_attr
For `from <pkg> import <attr>` we would use to treat the `<pkg>`
(ImportExpr) as a definition of the name `<attr>`.

Since this removes bad import-flow, and nothing broke, I'm guessing this
was never intentional.
2023-02-22 14:52:35 +01:00
Rasmus Wriedt Larsen
6ba39d5fb3 Python: Add import regression for re-exported things 2023-02-22 14:50:42 +01:00
Taus
2cdec47585 QL: Make the JSON parser a bit more robust
Updates the grammar to allow trailing commas in objects and arrays.

Also bumps the file size limit to 10MB.
2023-02-22 13:45:47 +00:00
Mathias Vorreiter Pedersen
161acf0ebe QL: Add more getters. 2023-02-22 13:43:51 +00:00
Mathias Vorreiter Pedersen
2c31d6863c QL: Start on the AST for kind: predicates evaluator logs. 2023-02-22 13:26:47 +00:00
Michael B. Gale
93b7a2bc92 Fix: drop please 2023-02-22 12:32:11 +00:00
Michael B. Gale
c3e25d2549 Add docs link for missing Xamarin SDKs 2023-02-22 12:32:10 +00:00
Michael B. Gale
08b51c3b06 Link to docs for autobuild failures 2023-02-22 12:32:10 +00:00
Michael B. Gale
0f320996cf Make improvements based on PR feedback 2023-02-22 12:32:07 +00:00
Mathias Vorreiter Pedersen
5b1288143f Merge pull request #12277 from github/tausbn/clean-up-structured-logs-module
QL: Clean up structured logs module
2023-02-22 12:27:07 +00:00
Rasmus Wriedt Larsen
6a5eebe891 Python: Add test of module_export 2023-02-22 12:26:01 +01:00
Taus
5304fe2bcb QL: Clean up structured logs module
Pushes it into an internal module and removes the abstract class.
2023-02-22 11:07:48 +00:00
Jeroen Ketema
eb6c8480f8 Make "Detecting a potential buffer overflow" example more uniform
All queries that use SSA import `semmle.code.cpp.controlflow.SSA` explicitly,
except for the last one. Also import the library there. Note that this is not
strictly necessary, as the library is transitively imported via `import cpp`.
2023-02-22 10:02:12 +01:00
Mathias Vorreiter Pedersen
dffb12070e Merge pull request #12271 from github/tausbn/ql-fix-json-extraction
QL: Fix JSON extraction
2023-02-22 08:50:49 +00:00
Chris Smowton
b28f1a562a Merge pull request #12273 from intrigus-lgtm/patch-8
Fix grammar
2023-02-22 08:43:07 +00:00
Michael Nebel
47c69d924b C#: Update comment on the isSupported predicate. 2023-02-22 09:05:28 +01:00
Michael Nebel
b4a6d1e1b6 C#: Add change note. 2023-02-22 08:59:14 +01:00
Michael Nebel
3e0aacd36b C#: Generalize modifier extraction from symbols. 2023-02-22 08:53:29 +01:00
intrigus-lgtm
540d3a3a99 Fix grammar 2023-02-22 00:42:50 +01:00
Taus
a3a099cf56 QL: Add a few more methods
Still need to implement something to encapsulate RA, link it up, etc.
2023-02-21 21:27:17 +00:00
Chris Smowton
7106f7d52e Add gradle wrappers to compiler_arguments and kotlin_kfunction tests
`
2023-02-21 21:20:43 +00:00
Chris Smowton
8bb068f3a9 Merge remote-tracking branch 'origin/rc/3.7' into smowton/admin/rc38-ci-fixes 2023-02-21 21:17:30 +00:00
Taus
729563c9a3 QL: Add preliminary support for structured logs 2023-02-21 21:09:34 +00:00
Chris Smowton
d849e27b37 Merge pull request #12259 from smowton/smowton/admin/gradle-wrappers-rc37
[rc/3.7]: Add Gradle wrappers for Kotlin tests
2023-02-21 21:04:39 +00:00
Taus
cf734919b9 QL: Fix bad string grammar
What was there before made it so that you couldn't actually extract the
contents of a string.
2023-02-21 20:20:58 +00:00
Taus
bab53b5736 QL: Fix JSON extraction
I had forgotten about this extra filtering that takes place in the
extractor.
2023-02-21 19:50:27 +00:00
Rasmus Wriedt Larsen
4a66e48dc5 Python: Allow import resolution with recursive phi/refine steps 2023-02-21 17:46:39 +01:00
Rasmus Wriedt Larsen
e522009666 Python: More complex import examples
We need some recursive unwinding to get all of these right
2023-02-21 17:46:28 +01:00
Rasmus Wriedt Larsen
00eec6986c Python: Allow import of refined variable
However, as illustrated by the `CWE-327-InsecureProtocol` test, this fix
is NOT good enough, since now even the `secure_context` is considered to
be insecure (for both versions). Ouch.

Will fix this in a later commit, since it was only discoverd late on.
2023-02-21 17:45:58 +01:00
Rasmus Wriedt Larsen
fb425b73fc Python: Add import test of py/insecure-protocol 2023-02-21 17:43:04 +01:00
Mathias Vorreiter Pedersen
ad8d9c5b91 Merge pull request #12269 from github/tausbn/ql-add-json-extraction
QL: Add JSON (+C/L) extraction
2023-02-21 16:42:19 +00:00
Arthur Baars
aac65b0df0 Merge pull request #12268 from aibaars/update-erb
Ruby: update tree-sitter-embedded-template
2023-02-21 14:31:30 +01:00
Taus
b5ebd1a0fd QL: Add JSON (+C/L) extraction 2023-02-21 12:59:30 +00:00
Arthur Baars
814bef021d Ruby: update tree-sitter-embedded-template 2023-02-21 13:49:33 +01:00
Anders Schack-Mulligen
46d6f5af7e Java: Update some tests. 2023-02-21 13:14:35 +01:00
Geoffrey White
c462e010d1 Merge pull request #12266 from geoffw0/taintplusequals
Swift: Taint through arithmetic
2023-02-21 09:32:53 +00:00
Anders Schack-Mulligen
acf6a77c6b Dataflow: Amend qldoc 2023-02-21 10:20:42 +01:00