Skip to content

Java/C#: Introduce kind for neutrals.#12931

Merged
michaelnebel merged 13 commits intogithub:mainfrom
michaelnebel:neutralkinds
May 9, 2023
Merged

Java/C#: Introduce kind for neutrals.#12931
michaelnebel merged 13 commits intogithub:mainfrom
michaelnebel:neutralkinds

Conversation

@michaelnebel
Copy link
Copy Markdown
Contributor

In this PR we introduce a kind for neutrals.

The kind of a neutral is used to describe, whether the neutral is neutral with respect to

  • summary: They neutral does not have flow through it (ie. no summary flow).
  • source: The neutral is not a source (of any source kind).
  • sink: The neutral is not a sink (of any sink kind).

@michaelnebel
Copy link
Copy Markdown
Contributor Author

DCA looks good.

Copy link
Copy Markdown
Contributor

@jcogs33 jcogs33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a few minor suggestions about updating comments, otherwise looks reasonable to me.

@michaelnebel
Copy link
Copy Markdown
Contributor Author

I added a few minor suggestions about updating comments, otherwise looks reasonable to me.
Thank you very much!!

hvitved
hvitved previously approved these changes May 8, 2023
Copy link
Copy Markdown
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michaelnebel michaelnebel merged commit f2f9944 into github:main May 9, 2023
@michaelnebel michaelnebel deleted the neutralkinds branch May 9, 2023 06:42
koesie10 added a commit to github/vscode-codeql that referenced this pull request Jun 1, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants