Anders Schack-Mulligen
2925e45434
Java/Dataflow: Propagate MaD-id/model-id to PathGraph.
2024-04-12 09:19:51 +02:00
Max Schaefer
32ebd4eebb
Automodel: Filter unexploitable types in application mode.
...
We already did this in framework mode.
2024-03-27 12:22:24 +00:00
Max Schaefer
a95f4128d9
Merge pull request #15554 from github/max-schaefer/automodel-candidate-fixes
...
Automodel: Improve handling of varargs and overriding in extraction queries
2024-02-16 08:51:54 +00:00
Max Schaefer
652b6bb8e1
Fix bugs revealed by omittable exists variables.
2024-02-15 16:29:20 +00:00
Max Schaefer
104a8d980c
Automodel: Make description of some negative characteristics more explicit.
2024-02-13 08:18:13 +00:00
Max Schaefer
48105db5b0
Fix isNeutral predicates.
2024-02-08 13:22:53 +00:00
Max Schaefer
4b9443eb15
Properly recognise existing models involving subtypes.
...
If an existing source/sink model specifies `subtypes=True` we should apply it to endpoints on overriding methods.
2024-02-08 13:22:53 +00:00
Max Schaefer
02547d3839
Improve representation of implicit varargs arrays to more reliably filter out known flow steps.
2024-02-08 13:22:52 +00:00
Max Schaefer
e47b021050
Do not consider expressions as candidates whose type is annotated with @FunctionalInterface.
2024-02-01 11:04:14 +00:00
Max Schaefer
6c47a5d5f9
Refactor framework-mode queries to make them more easily testable.
2024-01-17 14:51:58 +00:00
Max Schaefer
692d5e55a2
Use inline expectations for positive examples.
2024-01-17 14:48:22 +00:00
Max Schaefer
83c567385f
Use inline expectations for negative-example tests as well.
2024-01-17 14:47:39 +00:00
Max Schaefer
1ebd0747a8
Fix treatment of void method calls.
2024-01-17 14:40:47 +00:00
Max Schaefer
587d69e88c
Refactor application-mode candidate-extraction query so we can test its results before sampling.
2024-01-17 14:40:46 +00:00
Max Schaefer
800a78d258
Treat unexploitable types more centrally.
...
The apparently missing test result is due to sampling.
2024-01-17 14:40:37 +00:00
Max Schaefer
8614d7bddb
Address review feedback.
2024-01-17 14:29:52 +00:00
Max Schaefer
fee44074f7
Autoformat.
2024-01-15 13:44:45 +00:00
Max Schaefer
3befce98b3
When checking whether an endpoint has already been modelled, make sure to take the extensibleType into account.
2024-01-15 12:09:39 +00:00
Max Schaefer
68cf9aca12
Remove a few getExtensibleType checks which are now unnecessary.
2024-01-15 11:50:59 +00:00
Max Schaefer
bb63fcde43
Refactor to avoid bad join order.
2024-01-12 15:24:24 +00:00
Max Schaefer
ea26e21454
Extend negative characteristics for exceptions to source models.
2024-01-12 12:20:22 +00:00
Max Schaefer
06ba5ea9f8
Eliminate GetCallable modules and use getCallable instead.
2024-01-12 12:03:49 +00:00
Max Schaefer
76b84301e3
Share some code.
2024-01-12 12:03:49 +00:00
Max Schaefer
9f443d4f83
Make Unexploitable*Characteristic more precise.
2024-01-12 12:03:41 +00:00
Max Schaefer
ff4555ac5b
Get rid of negative sink types.
...
Instead of positively implying the negative sink type, negative sink characteristics now negatively imply all sink types (but not source types). This is simpler and sice we will never have a huge number of sink types it doesn't impact performance either.
Changes to test results:
- The call to `createDirectories` at `Test.java:87` is now correctly classified as a source candidate, having previously been erroneously excluded by a negative _sink_ characteristic.
- The call to `compareTo` at `Test.java:48` is now erroneously classified as a source candidate; it should be suppressed by `IsSanitizerCharacteristic`, which is a negative sink characteristic, but should really be a negative source characteristic.
- In framework mode, several endpoints are now erroneously classified as source candidates even though they have neutral models, because `NeutralModelCharacteristic` is currently only a negative sink characteristic and not a negative source characteristic.
2024-01-11 12:19:53 +00:00
Max Schaefer
bcf4f4febd
Drop a conjunct which is now spurious.
2024-01-11 11:56:59 +00:00
Max Schaefer
03ca244df2
Associate endpoints with their potential endpoint types and check these when determining candidates.
...
This prevents us from associating a sink candidate with a source type and vice versa.
However, this does not fix the problem of negative characteristics for sink types excluding source candidates.
2024-01-11 11:44:14 +00:00
Max Schaefer
3e8775daaa
Automodel: Do not generate features for compiler-generated program elements.
...
These have dummy locations, which breaks certain invariants that break downstream processing.
2024-01-09 13:39:46 +00:00
Stephan Brandauer
74a195b4f4
Java Automodel extraction: fix extracted meta information by using Object for the type of generic parameters
2023-11-16 16:08:04 +01:00
Stephan Brandauer
d7c97d9d92
Java Automodel: remove constructor instance arguments from endpoints and update test expectations
2023-11-16 12:27:23 +01:00
Stephan Brandauer
30925da7d9
Java Automodel: tests that demonstrate that there is no sink candidate of an object being constructed in app mode
2023-11-16 12:24:41 +01:00
Stephan Brandauer
32502d5e2c
Java: Automodel, remove erroneousEndpoints predicate from production queries
2023-09-26 10:45:54 +02:00
Stephan Brandauer
8121c7fefa
Java: Automodel application mode: add method doc and class doc as related locations
2023-09-12 14:08:55 +02:00
Stephan Brandauer
bbedd72260
Java: Automodel App Mode: rename MethodCall to MethodReturnValue
2023-09-08 13:57:21 +02:00
Stephan Brandauer
704c7ee104
Java: Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2023-09-08 13:54:26 +02:00
Stephan Brandauer
4effc11fdb
Java: comments
2023-09-08 09:16:56 +02:00
Stephan Brandauer
836a5822f3
Java: Automodel App Mode: remove bogus implementation
2023-09-07 15:49:58 +02:00
Stephan Brandauer
c173d9ae40
Java: automodel application mode: generate models for overridden method candidates
2023-09-07 15:49:58 +02:00
Stephan Brandauer
3121949123
Java: automodel application mode: test case for overridden method candidate
2023-09-07 15:49:58 +02:00
Stephan Brandauer
6f7d78183f
Java: add endpoints for parameters of overridden methods in automodel application mode
2023-09-07 15:49:57 +02:00
Stephan Brandauer
dff8259e78
Java: support remote sources in automodel positive example extraction
2023-09-07 15:49:57 +02:00
Stephan Brandauer
fcabca4581
Java: Export MaD output in application mode extraction queries
2023-09-07 15:49:57 +02:00
Stephan Brandauer
8d133f86c7
Java: replace getArgIndex by getMaDInput
2023-09-07 15:49:57 +02:00
Stephan Brandauer
902a585b47
Java: remove isArgOf predicate
2023-09-07 15:49:57 +02:00
Stephan Brandauer
caaf2f83d7
Java: enable model exclusion characteristic also for source candidates
2023-09-07 15:49:57 +02:00
Stephan Brandauer
344aa9cb6b
Java: enable local call characteristic also for source candidates
2023-09-07 15:49:57 +02:00
Stephan Brandauer
afc5aedd0a
Java: enable exception characteristic also for source candidates
2023-09-07 15:49:57 +02:00
Stephan Brandauer
a526b79211
Java: enable unexploitable is/exists characteristics also for source candidates
2023-09-07 15:49:57 +02:00
Stephan Brandauer
eb1e29d284
Java: add new endpoint class for source candidates in application mode
2023-09-07 15:49:57 +02:00
Stephan Brandauer
7cfcbf6b71
Java: add extensible type to endpoint class in application mode
2023-09-07 15:49:56 +02:00