mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Formatting
This commit is contained in:
@@ -21,7 +21,7 @@ class PropagateToSinkConfiguration extends TaintTracking::Configuration {
|
||||
isRelevantForModels(source.getEnclosingCallable())
|
||||
}
|
||||
|
||||
override predicate isSink(DataFlow::Node sink) { sinkNode(sink, _)}
|
||||
override predicate isSink(DataFlow::Node sink) { sinkNode(sink, _) }
|
||||
}
|
||||
|
||||
string asInputArgument(DataFlow::Node source) {
|
||||
@@ -38,6 +38,5 @@ string captureSink(Callable api) {
|
||||
}
|
||||
|
||||
from TargetAPI api, string sink
|
||||
where
|
||||
sink = captureSink(api)
|
||||
where sink = captureSink(api)
|
||||
select sink order by sink
|
||||
|
||||
@@ -48,6 +48,5 @@ string captureSource(Callable api) {
|
||||
}
|
||||
|
||||
from TargetAPI api, string sink
|
||||
where
|
||||
sink = captureSource(api)
|
||||
where sink = captureSource(api)
|
||||
select sink order by sink
|
||||
|
||||
@@ -9,10 +9,11 @@ class TargetAPI extends Callable {
|
||||
this.getDeclaringType().isPublic() and
|
||||
isRelevantForModels(this)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private string isExtensible(RefType ref) { if ref.isFinal() then result = "false" else result = "true" }
|
||||
private string isExtensible(RefType ref) {
|
||||
if ref.isFinal() then result = "false" else result = "true"
|
||||
}
|
||||
|
||||
predicate isRelevantForModels(Callable api) {
|
||||
not isInTestFile(api.getCompilationUnit().getFile()) and
|
||||
@@ -26,7 +27,9 @@ private predicate isInTestFile(File file) {
|
||||
}
|
||||
|
||||
private predicate isJdkInternal(CompilationUnit cu) {
|
||||
cu.getPackage().getName().matches("com.sun") or cu.getPackage().getName().matches("sun") or cu.getPackage().getName().matches("")
|
||||
cu.getPackage().getName().matches("com.sun") or
|
||||
cu.getPackage().getName().matches("sun") or
|
||||
cu.getPackage().getName().matches("")
|
||||
}
|
||||
|
||||
bindingset[input, output]
|
||||
@@ -81,4 +84,4 @@ string parameterAccess(Parameter p) {
|
||||
if p.getType() instanceof ContainerType
|
||||
then result = "Element of Argument[" + p.getPosition() + "]"
|
||||
else result = "Argument[" + p.getPosition() + "]"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user