Java: add neutral models - #15766
Merged
Merged
Conversation
See comment in java/ql/src/Metrics/Summaries/TopJdkApis.qll * Note: the following top JDK APIs are not modeled with MaD: * `java.lang.System#getProperty(String)`: needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs * `java.lang.System#setProperty(String,String)`: needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
…ormat See comment in java/ql/src/Metrics/Summaries/TopJdkApis.qll * Note: the following top JDK APIs are not modeled with MaD: * `java.text.Format#format(Object)`: similar issue as `Object.toString`; depends on the object being passed as the argument * `java.text.MessageFormat#format(String,Object[])`: similar issue as `Object.toString`; depends on the object being passed as the argument
See comment in java/ql/src/Metrics/Summaries/TopJdkApis.qll * Note: the following top JDK APIs are not modeled with MaD: * `java.util.stream.Collectors#joining(CharSequence)`: cannot be modeled completely without a model for `java.util.stream.Stream#collect(Collector)` as well * `java.util.stream.Collectors#toMap(Function,Function)`: specialized collectors flow * `java.util.stream.Stream#collect(Collector)`: handled separately on a case-by-case basis as it is too complex for MaD
owen-mc
force-pushed
the
java/add-neutral-models
branch
from
March 1, 2024 13:23
106639e to
de809a7
Compare
owen-mc
marked this pull request as ready for review
March 1, 2024 14:04
owen-mc
force-pushed
the
java/add-neutral-models
branch
from
March 1, 2024 14:09
de809a7 to
0e1c45e
Compare
atorralba
reviewed
Mar 1, 2024
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
atorralba
approved these changes
Mar 1, 2024
atorralba
added a commit
to atorralba/codeql
that referenced
this pull request
Mar 13, 2024
This is similar to github#15766, in the sense that it adds neutral models to prevent the model generator from generating summaries for them. These models were spotted while evaluating github#14919.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
java/ql/src/Metrics/Summaries/TopJdkApis.qllthere is a comment listing some APIs that we don't want models for, with reasons. Some of the commits in this PR add manual neutral models for those APIs, so that we won't accidentally generate models for them. (The APIs relating to lambda flow shouldn't have models of any kind, so they will be excluded from model generation in this PR.) The final two commits add neutral models for four methods that I noticed had erroneous generated summary models in #14919.