Formatting

This commit is contained in:
Benjamin Muskalla
2021-10-08 12:31:42 +02:00
parent 2654e27123
commit be150f269b
3 changed files with 10 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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() + "]"
}
}