Chris Smowton
b6622d2f5b
usesType: support pattern cases
2023-11-30 11:23:58 +00:00
Chris Smowton
0f434e7f08
Add test for dataflow vs. pattern-switch
2023-11-30 11:23:58 +00:00
Chris Smowton
6c990c2cf6
Add pattern-case support and generally debug switch CFGs
...
These were reasonably broken beforehand, due to not taking switch rules into account in enough places, and confusing the expression/statement switch rule distinction with the distinction between switch statements and expressions.
(For example, `switch(x) { 1 -> System.out.println("Hello world") ... }` is a statement, but has a rule expression).
2023-11-30 11:23:58 +00:00
Chris Smowton
f4b45fa511
Support switch cases with binding patterns
2023-11-30 11:23:58 +00:00
Jami Cogswell
d5fd2db1bd
Java update UrlPathHelper tests
2023-11-29 15:23:11 -05:00
Chris Smowton
e110db58f8
Add test for empty argfile
2023-11-29 12:51:22 +00:00
Anders Schack-Mulligen
0d8986cfad
Java: Accept test changes.
2023-11-10 14:04:45 +01:00
Anders Schack-Mulligen
657c29f409
Java/C++: Share valueFlowStep.
2023-11-09 20:24:28 +01:00
Chris Smowton
24b4b05be8
Add models for new Collections methods
2023-11-06 16:44:40 +00:00
Chris Smowton
5b72aee3ae
Java: model JDK21 SequencedCollection, Set and Map
2023-11-06 16:04:13 +00:00
Dave Bartolomeo
d2afb20f3f
Merge remote-tracking branch 'origin/main' into dbartol/threat-models-2
2023-10-26 14:05:40 -04:00
Anders Schack-Mulligen
35f6e6ebb4
Java: Update tests to new partial flow api
2023-10-26 14:09:03 +02:00
Michael Nebel
b3e5b86f0a
Java: Cleanup threat models tests.
2023-10-25 14:02:31 +02:00
Chris Smowton
b849a66c97
Update test expectations
2023-10-24 14:02:30 +01:00
Chris Smowton
e8c9708282
Autoformat
2023-10-24 11:06:19 +01:00
Chris Smowton
ac38d4c9c6
Mass rename L/RValue -> VarWrite/Read
2023-10-24 10:58:29 +01:00
Chris Smowton
f552a15aae
Mass-rename MethodAccess -> MethodCall
2023-10-24 10:30:26 +01:00
Dave Bartolomeo
fb1b41b649
Fix formatting
2023-10-19 17:20:38 -04:00
Dave Bartolomeo
bd7de83aab
Use extension packs for threat models
2023-10-19 17:07:26 -04:00
Chris Smowton
bd77f572f1
Compile collections test for Java 11
2023-10-16 21:54:09 +01:00
Chris Smowton
8f985e0045
Java: restrict test to source classes
2023-10-13 20:30:28 +01:00
Chris Smowton
0510b0c825
Java: restrict test to source methods
...
Otherwise it finds standard library methods that depend on stdlib internals as to what happens to get extracted. In particular the extractor bump to JDK21 led to MethodHandles being in scope and a new method being found; seems better to avoid considering the standard library at all.
2023-10-13 20:30:28 +01:00
Michael Nebel
5c44f8bbad
Merge pull request #14370 from michaelnebel/java/enablethreatmodels
...
Java: Enable threat models for most Java queries.
2023-10-10 09:25:47 +02:00
Marcono1234
f3e5045259
Java: Add predicate MemberRefExpr::getReceiverExpr
2023-10-07 14:53:07 +02:00
Michael Nebel
40e63a63e2
Java: Re-factor most queries and tests to use threat models.
2023-10-04 14:01:58 +02:00
Michael Nebel
5b949b19f7
Java: Cleanup threat model taxanomy to align with the EDR.
2023-10-03 09:16:39 +02:00
Michael Nebel
5c700afa27
Java: Add some threat model dataflow tests.
2023-10-03 09:16:39 +02:00
Michael Nebel
537965c0e8
Java: Add some testfiles.
2023-10-03 09:16:39 +02:00
Michael Nebel
9a112dde66
Java: Introduce a class of dataflow nodes for the threat modeling.
2023-10-03 09:16:38 +02:00
Anders Schack-Mulligen
efb49fcd3e
Merge pull request #14336 from aschackmull/java/switch-rule-stmt-cfg
...
Java: Fix CFG for case rule statements.
2023-09-29 12:02:48 +02:00
Anders Schack-Mulligen
94556078f1
Java: Add guards logic for SwitchExpr default cases.
2023-09-28 14:21:04 +02:00
Anders Schack-Mulligen
917a15647e
Java: Fix CFG for rule statements.
2023-09-28 14:19:36 +02:00
Anders Schack-Mulligen
922a4e8ddf
Java: Add failing test
2023-09-28 14:15:56 +02:00
Asger F
6792592a15
Shared: add late checks for stateful in/out barriers
2023-09-27 14:38:28 +02:00
Asger F
6d6cdf89ce
Java: add a failing test for stateful in/out barriers
2023-09-27 14:38:21 +02:00
Anders Schack-Mulligen
13f7daf71e
Merge pull request #13982 from aschackmull/dataflow/typeflow-calledge-pruning
...
Dataflow: Add type-based call-edge pruning.
2023-09-21 13:33:08 +02:00
Chris Smowton
c5001a86f6
Fix test expectations
2023-09-14 20:45:54 +01:00
Chris Smowton
d9f7180b5c
Add missing diagnostic expectations
2023-09-14 17:42:00 +01:00
Chris Smowton
8f940c311a
Update expectations and add expected diagnostics
2023-09-14 17:42:00 +01:00
Chris Smowton
9670f20bd7
Add test for method reference whose LHS has unknown type
...
This can happen when imports or source classes are missing.
2023-09-14 17:42:00 +01:00
Chris Smowton
6ea7b195db
Add test for a module declaration made in a file named other than module-info.java
...
This triggers a weird corner case in our extractor, which used to throw a null pointer exception.
2023-09-14 17:42:00 +01:00
Chris Smowton
c47ba000d6
Add test exercising the case of a missing type used as an interface
...
This induces the TypeEnter phase to create an ErrorType with a parameter, which in turn used to cause a stack overflow in comparing the TypeWrapper objects involved.
Note the output remains somewhat broken, exposing an <any> type, but at least the overflow is resolved.
2023-09-14 17:42:00 +01:00
Chris Smowton
4b5651bde9
Add test for Java extracting ErrorType
2023-09-14 17:42:00 +01:00
Chris Smowton
c0f8973749
Add test for extracting a Java AST with an error expression
...
Also note that ErrorExpr can occur outside upgrade/downgrade scripts
2023-09-14 17:42:00 +01:00
Anders Schack-Mulligen
e677c1ffe6
Java: Add qltest
2023-09-13 15:43:46 +02:00
Kasper Svendsen
4bc6ca3d84
Java: Delete java test query which fails to compile
2023-09-01 11:21:06 +02:00
Jeroen Ketema
9d573e5544
Consolidate all InlineFlowTest libraries in the dataflow qlpack
2023-08-24 21:38:46 +02:00
Asger F
6c664e93ef
Merge pull request #14035 from asgerf/shared/variable-capture-nested
...
Variable capture: synchronize with aliases in nested scopes
2023-08-24 15:39:34 +02:00
Anders Schack-Mulligen
7af1e96943
Merge pull request #14032 from aschackmull/java/mad-nestednames
...
Java: Use nested names in MaD signatures.
2023-08-24 13:53:55 +02:00
Tony Torralba
6b58d11eeb
Merge pull request #13900 from atorralba/atorralba/java/jaxws-getaremotemethod-improv
...
Java: Improve `JaxWsEndpoint::getARemoteMethod`
2023-08-24 13:37:15 +02:00