Skip to content

Commit 4170e7f

Browse files
authored
Merge pull request #2338 from github/starcke/update-java-lib
Update library used by java query.
2 parents 8d016a8 + 0d11075 commit 4170e7f

File tree

1 file changed

+12
-2
lines changed
  • extensions/ql-vscode/src/data-extensions-editor/queries

1 file changed

+12
-2
lines changed

extensions/ql-vscode/src/data-extensions-editor/queries/java.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ private import semmle.code.java.dataflow.ExternalFlow
3939
private import semmle.code.java.dataflow.FlowSources
4040
private import semmle.code.java.dataflow.FlowSummary
4141
private import semmle.code.java.dataflow.internal.DataFlowPrivate
42+
private import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
4243
private import semmle.code.java.dataflow.TaintTracking
4344
4445
pragma[nomagic]
@@ -124,8 +125,17 @@ class ExternalApi extends Callable {
124125
pragma[nomagic]
125126
predicate isSink() { sinkNode(this.getAnInput(), _) }
126127
127-
/** Holds if this API is supported by existing CodeQL libraries, that is, it is either a recognized source or sink or has a flow summary. */
128-
predicate isSupported() { this.hasSummary() or this.isSource() or this.isSink() }
128+
/** Holds if this API is a known neutral. */
129+
pragma[nomagic]
130+
predicate isNeutral() { this = any(FlowSummaryImpl::Public::NeutralCallable nsc).asCallable() }
131+
132+
/**
133+
* Holds if this API is supported by existing CodeQL libraries, that is, it is either a
134+
* recognized source, sink or neutral or it has a flow summary.
135+
*/
136+
predicate isSupported() {
137+
this.hasSummary() or this.isSource() or this.isSink() or this.isNeutral()
138+
}
129139
}
130140
131141
/** DEPRECATED: Alias for ExternalApi */

0 commit comments

Comments
 (0)