github-actions[bot]
37f8fa3413
Post-release preparation for codeql-cli-2.16.3
2024-02-20 16:50:47 +00:00
github-actions[bot]
6d061fbc35
Release preparation for version 2.16.3
2024-02-20 14:26:23 +00:00
Max Schaefer
139ef60f69
Automodel: Release query pack.
2024-02-19 11:47:31 +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
a9c0fed4f5
Add test showing spurious sink candidate from method overriding a method for which we have a model.
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
github-actions[bot]
b5139078d0
Post-release preparation for codeql-cli-2.16.2
2024-02-06 19:22:35 +00:00
github-actions[bot]
c1b35fbf47
Release preparation for version 2.16.2
2024-02-05 17:58:57 +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
github-actions[bot]
d0b74c00fe
Post-release preparation for codeql-cli-2.16.1
2024-01-23 23:02:29 +00:00
github-actions[bot]
7ef611e6dc
Release preparation for version 2.16.1
2024-01-23 19:45:16 +00:00
Max Schaefer
5c43a0b1e4
Merge pull request #15356 from github/max-schaefer/automodel-void-source-candidates
...
Automodel: Switch tests to inline expectations
2024-01-22 17:05:10 +00:00
Max Schaefer
99c99145a2
Rename {source,sink}Model to {source,sink}ModelCandidate.
2024-01-22 13:10:51 +00:00
Max Schaefer
a3816d75b3
Remove redundant imports.
2024-01-22 10:54:01 +00:00
Max Schaefer
78e5a1a546
Autoformat.
2024-01-22 10:45:33 +00:00
Max Schaefer
7bc03040ec
Make tags for positive and negative examples more precise.
2024-01-17 15:57:27 +00:00
Max Schaefer
3ae484868a
Merge pull request #15326 from github/max-schaefer/automodel-negative-sink-models
...
Automodel: Apply negative characteristics only to endpoints of the right kind.
2024-01-17 15:54:28 +00:00
Max Schaefer
ae23920a6d
Fix spurious source models for primitive types in framework mode.
2024-01-17 15:36:31 +00:00
Max Schaefer
9975f974ee
Autoformat.
2024-01-17 14:53:09 +00:00
Max Schaefer
6d2bf68a86
Use inline expectations for all framework-mode tests.
2024-01-17 14:52:42 +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
adea805546
Refactor application-mode tests so we can reuse most of it for framework mode.
2024-01-17 14:49:19 +00:00
Max Schaefer
312dd16956
Consolidate application mode tests.
2024-01-17 14:48:27 +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
18e44b6f5c
Turn AutomodelApplicationModeExtractCandidates into an inline-expectations test.
2024-01-17 14:40:46 +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
90a4552c4f
Fix omittable exists.
2024-01-15 13:45:03 +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
919330fb53
Some more performance refactoring.
2024-01-12 17:38:58 +00:00
Max Schaefer
bb63fcde43
Refactor to avoid bad join order.
2024-01-12 15:24:24 +00:00
Max Schaefer
45ca301593
Rename a predicate.
2024-01-12 13:18:05 +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
6e9c90a6bb
Properly distinguish negative source and sink characteristics.
...
In particular, `IsSanitizerCharacteristic` is a negative _source_ characteristic (not a negative sink characteristic), while `NeutralModelCharacteristic` is both.
This eliminates the erroneous test results.
2024-01-11 12:36:48 +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
a6d996b478
Add an example of a missed source candidate.
...
`Files.list` has a taint step from its first argument to its result, so that first argument should not be considered a sink candidate (and it is not). However, due to a bug in `IsMaDTaintStepCharacteristic` it is also not considered a source candidate, which is wrong: as the example shows, if that argument is a call we do very much want to consider it as a source candidate.
2024-01-11 11:27:34 +00:00