mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Eliminate false positives\
This commit is contained in:
@@ -41,10 +41,12 @@ private class CompareSink extends UseOfLessTrustedSink {
|
||||
ma.getMethod().getNumberOfParameters() = 1 and
|
||||
(
|
||||
ma.getArgument(0) = this.asExpr() and
|
||||
ma.getQualifier().(CompileTimeConstantExpr).getStringValue() instanceof PrivateHostName
|
||||
ma.getQualifier().(CompileTimeConstantExpr).getStringValue() instanceof PrivateHostName and
|
||||
not ma.getQualifier().(CompileTimeConstantExpr).getStringValue() = "0:0:0:0:0:0:0:1"
|
||||
or
|
||||
ma.getQualifier() = this.asExpr() and
|
||||
ma.getArgument(0).(CompileTimeConstantExpr).getStringValue() instanceof PrivateHostName
|
||||
ma.getArgument(0).(CompileTimeConstantExpr).getStringValue() instanceof PrivateHostName and
|
||||
not ma.getArgument(0).(CompileTimeConstantExpr).getStringValue() = "0:0:0:0:0:0:0:1"
|
||||
)
|
||||
)
|
||||
or
|
||||
@@ -79,7 +81,8 @@ private class CompareSink extends UseOfLessTrustedSink {
|
||||
.hasQualifiedName(["org.apache.commons.lang3", "org.apache.commons.lang"], "StringUtils") and
|
||||
ma.getMethod().getNumberOfParameters() = 2 and
|
||||
ma.getAnArgument() = this.asExpr() and
|
||||
ma.getAnArgument().(CompileTimeConstantExpr).getStringValue() instanceof PrivateHostName
|
||||
ma.getAnArgument().(CompileTimeConstantExpr).getStringValue() instanceof PrivateHostName and
|
||||
not ma.getAnArgument().(CompileTimeConstantExpr).getStringValue() = "0:0:0:0:0:0:0:1"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user