pullrequests Search Results · repo:github/codeql path:docs/codeql "MethodAccess"
Filter by
3 results
ingithub/codeql (press backspace or delete to remove)The path qualifier is not supported when searching pull requests. Try searching for code instead?
This can be simplified:
exists(Method method, MethodAccess call |
method.getDeclaringType().hasQualifiedName( java.math , BigDecimal ) and
method.hasName([ add , subtract ]) and
call.getMethod() = method and
sink.asExpr() = call.getArgument(0)
)
documentation
Java
... more cleanly like:
exists(MethodAccess ma |
ma.getMethod().hasQualifiedName( java.text , Normalizer , normalize ) and
ma.getArgument(1).(FieldAccess).getField() instanceof ComposingUnicodeForm and
sink.asExpr() = ma.getArgument(0)
) and
documentation
Java
I had to make some modifications to your proposal above but this ended up working:
predicate isUnsafeUseUnconstrainedByIfCheck(DataFlow::Node sink, Expr unsafeUse) {
exists(Guard g, MethodAccess ...
documentation
Java