Commit Graph

57445 Commits

Author SHA1 Message Date
Harry Maclean
ca5456a54a Ruby: Remove duplicate disjuncts 2023-08-14 09:45:57 +01:00
Harry Maclean
6011d26823 Ruby: Restrict parameter nodes 2023-08-11 15:14:32 +01:00
Harry Maclean
b365ff095a Ruby: Fix SynthSplatParameterElementNode
Make this class into a proper subclass of `ParameterNodeImpl`, to
prevent some consistency test failures.
2023-08-10 12:35:12 +01:00
Harry Maclean
5fff9fa8da More precise flow into splat parameters
We now precisely track flow from positional arguments to splat
parameters, provided that splat arguments are not used and there are no
positional parameters after the splat parameter. For example, in this
case:

    def f(x, y, *z); end

    f(a, b, c, d)

we get flow from `c` to `z[0]` and `d` to `z[1]`.

We get false flow if there are positional parameters after the splat
parameter. For example in this case:

    def g(x, y, *z, w); end

    g(a, b, c, d)

we get flow from `d` to `z[0]` instead of `w`.

We also track flow in this case

    def f(a, *b)
      sink b[0]
    end

    f(1, *[taint, 2])
2023-08-10 12:02:47 +01:00
Harry Maclean
a58aa17c7a Merge pull request #13878 from hmac/splat-flow
Ruby: Track flow from splat arguments to positional parameters
2023-08-10 12:01:38 +01:00
Jeroen Ketema
2e338cc7b4 Merge pull request #13929 from jketema/buffer
C++: Only consider the maximum buffer size for badly bounded write
2023-08-10 10:40:37 +02:00
Rasmus Wriedt Larsen
51a05286fa Merge pull request #13731 from pwntester/py/aiohttp_improvements
Python: Aiohttp improvements
2023-08-09 16:37:20 +02:00
Harry Maclean
b03f6efa60 Ruby: Refactor 2023-08-09 15:01:40 +01:00
Harry Maclean
142393b599 Ruby: Handle unknown content in splat flow 2023-08-09 15:01:40 +01:00
Harry Maclean
4239268efd Ruby: Prevent some false flow into splat params
In cases where there are positional parameters after a splat parameter,
don't attempt to match the splat parameter to a splat argument. We need
more sophisticated modelling to handle these cases, which is future
work.
2023-08-09 15:01:40 +01:00
Harry Maclean
6f3e2cdde3 Ruby: Add change note 2023-08-09 15:01:40 +01:00
Harry Maclean
c0baa5116f Ruby: add test for example splat arg/param matches 2023-08-09 15:01:40 +01:00
Harry Maclean
72356d1515 Ruby: track flow from *args to positional params
This models flow in the following case:

    def foo(x, y)
      sink x # 1
      sink y # 2
    end

    args = [source 1, source 2]
    foo(*args)

We do this by introducing a SynthSplatParameterNode which accepts
content from the splat argument, if one is given at the callsite.
From this node we add read steps to each positional parameter.
2023-08-09 15:01:40 +01:00
Jeroen Ketema
e04d30a676 C++: Update expected test changes due to the line in test2.cpp having shifted 2023-08-09 15:50:07 +02:00
Jeroen Ketema
6100425274 C++: Add change note 2023-08-09 15:47:19 +02:00
Michael B. Gale
01ff690d51 Merge pull request #13923 from github/mbg/go/bump-go-libraries 2023-08-09 11:36:35 +01:00
Mathias Vorreiter Pedersen
da66136ded Merge pull request #13911 from MathiasVP/fix-taint-for-frontend-upgrade
C++: Fix taint-flow in preparation for frontend upgrade
2023-08-09 11:30:07 +01:00
Jeroen Ketema
d0e7354a1b C++: Only consider the maximum buffer size for badly bounded write 2023-08-09 12:30:00 +02:00
Jeroen Ketema
9572b9d308 C++: Add test where buffer initialized with literal is reassigned an allocation 2023-08-09 12:26:10 +02:00
Rasmus Wriedt Larsen
c0dec21546 Merge pull request #13925 from RasmusWL/fixup-script
Misc: Fixup `accept-expected-changes-from-ci.py`
2023-08-09 11:45:34 +02:00
Rasmus Wriedt Larsen
69aa099ed1 Misc: Fixup accept-expected-changes-from-ci.py
I guess there has been a rename of the URL from `/jobs/` to `/job/`, since the script has been working previously.
2023-08-09 10:44:31 +02:00
Mathias Vorreiter Pedersen
499b6f35e5 C++: Also key SSA defs and uses by the base address. 2023-08-09 08:44:16 +01:00
Mathias Vorreiter Pedersen
e2feed78a0 C++: Generate SSA variables for all calls instead of just for calls to
allocators.
2023-08-09 08:44:10 +01:00
Michael Nebel
560b876c01 Merge pull request #13891 from felickz/csharp-hardcoded-cred-identity-fp
cs/hardcoded-credentials - Removes false positive matches on benign Microsoft.AspNetCore.Identity properties
2023-08-09 08:32:36 +02:00
Chad Bentz
fa23a45f9d Merge branch 'main' into csharp-hardcoded-cred-identity-fp 2023-08-08 17:48:27 -04:00
Michael B. Gale
9da749ad77 Bump Go extractor dependencies 2023-08-08 22:23:47 +01:00
Mathias Vorreiter Pedersen
389294bded Merge pull request #13920 from MathiasVP/fix-out-nodes
C++: Remove unnecessary predicates
2023-08-08 20:11:36 +01:00
Geoffrey White
a1234d4235 Merge pull request #13905 from geoffw0/forceunwrap
Swift: Flow through ForceValueExpr on LHS of assignment
2023-08-08 18:36:50 +01:00
Mathias Vorreiter Pedersen
2a1d5b7481 Merge branch 'main' into fix-out-nodes 2023-08-08 16:32:03 +01:00
Geoffrey White
2b0fcab182 Swift: Update test annotations following merge. 2023-08-08 16:06:52 +01:00
Geoffrey White
e9f0b535ea Merge branch 'main' into forceunwrap 2023-08-08 16:03:31 +01:00
Anders Schack-Mulligen
0ca3f3308b Merge pull request #13478 from aschackmull/java/varcapture
Java: Add proper support for variable capture flow.
2023-08-08 16:22:56 +02:00
Anders Starcke Henriksen
7da6da1c93 Merge pull request #13852 from github/starcke/automodel-package-filter
Add option to filter automodel queries
2023-08-08 14:59:00 +02:00
Anders Schack-Mulligen
1cd32722be Java: More review fixes. 2023-08-08 14:32:48 +02:00
Mathias Vorreiter Pedersen
f4f5d43bcb C++: indirectReturnOutNodeOperand0 and indirectReturnOutNodeInstruction0
were broken and for some reason only handled the case where calls mapped
to raw indirect nodes :wat:. It turns out these predicates weren't
actually needed anyway.
2023-08-08 13:23:10 +01:00
Alexandre Boulgakov
28863f39b0 Merge pull request #13917 from github/revert-13869-sashabu/swift-logging-compiler
Revert "Swift: Route compiler diagnostics through our log."
2023-08-08 12:45:58 +01:00
Anders Schack-Mulligen
9d59f50340 Java: Review fixes. 2023-08-08 13:37:40 +02:00
AlexDenisov
75dad4764f Revert "Swift: Route compiler diagnostics through our log." 2023-08-08 11:25:13 +02:00
Rasmus Lerchedahl Petersen
f865fa3050 Python: simplify using getSubscript 2023-08-08 11:16:35 +02:00
Rasmus Wriedt Larsen
4f47461f60 Python: Add requested test 2023-08-08 10:44:48 +02:00
Anders Schack-Mulligen
ab334f6c1b Java: Always apply heuristic query regardless of existing models. 2023-08-08 10:01:43 +02:00
Anders Schack-Mulligen
cd22bb3505 Java: Add another test case. 2023-08-08 10:00:55 +02:00
Chad Bentz
d4b5a4d4f4 Merge branch 'main' into csharp-hardcoded-cred-identity-fp 2023-08-07 15:09:01 -04:00
Chad Bentz
7b33574b85 pull dependencies from Microsoft.AspNetCore.App 2023-08-07 18:45:16 +00:00
Geoffrey White
022a06659c Merge pull request #13838 from rdmarsh2/rdmarsh2/swift/set-content
Swift: add SetContent for data flow
2023-08-07 19:15:30 +01:00
Robert Marsh
eeaa361b12 Merge pull request #13907 from MathiasVP/cleanup-ssa-internals
C++: Small cleanup of `SsaInternals`
2023-08-07 13:16:59 -04:00
Robert Marsh
07650af357 Swift: accept test for CollectionContent rename 2023-08-07 15:04:21 +00:00
Robert Marsh
146c50049c Finish CollectionContent rename
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-08-07 10:26:40 -04:00
Mathias Vorreiter Pedersen
f2f4e1f882 C++: Add more QLDoc. 2023-08-07 15:22:46 +01:00
Mathias Vorreiter Pedersen
e9750af89f Merge pull request #13783 from MathiasVP/type-bounds-for-new-range-analysis
C++: Constant type-bounds in the new range analysis
2023-08-07 15:20:45 +01:00