Fix neutral definition for CodeQL 2.13.3#2467
Merged
Conversation
In CodeQL 2.13.3, the definition of the neutralModel predicate has changed to include the `kind`. This updates the definition of the data extensions editor to match the new definition. One caveat is that when selecting a `kind` other than `summary`, the method will not be shown as supported. This is because a `NeutralCallable` only calls into `neutralSummaryElement`. This matches the previous behavior because setting the `kind` to `source` or `sink` only says that the method is either not a source or not a sink, but not both. Only `summary` fully models the method. See: github/codeql#12931 See: https://github.com/github/codeql/blob/ff78ac98d27c7b9f1adffcf235c56855f8348ad0/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll#L338 See: https://github.com/github/codeql/blob/ff78ac98d27c7b9f1adffcf235c56855f8348ad0/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll#L160
starcke
approved these changes
Jun 1, 2023
Contributor
starcke
left a comment
There was a problem hiding this comment.
Nice! I am impressed that the change is so small.
One caveat is that when selecting a kind other than summary, the method will not be shown as supported. This is because a NeutralCallable only calls into neutralSummaryElement. This matches the previous behavior because setting the kind to source or sink only says that the method is either not a source or not a sink, but not both. Only summary fully models the method.
Good to know, this ties into the whole discussion of whether we should model functions or arguments and how to deal with things that have have multiple classifications (e.g. an argument that is both a sink and a flow summary)
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 CodeQL 2.13.3, the definition of the neutralModel predicate has changed to include the
kind. This updates the definition of the data extensions editor to match the new definition.One caveat is that when selecting a
kindother thansummary, the method will not be shown as supported. This is because aNeutralCallableonly calls intoneutralSummaryElement. This matches the previous behavior because setting thekindtosourceorsinkonly says that the method is either not a source or not a sink, but not both. Onlysummaryfully models the method.Checklist
ready-for-doc-reviewlabel there.