Java: Fix tests and make modules private

This commit is contained in:
Anders Schack-Mulligen
2023-03-08 13:35:25 +01:00
parent 2288eab0fd
commit e7f85673e9
4 changed files with 7 additions and 10 deletions

View File

@@ -2,14 +2,10 @@ import java
import TestUtilities.InlineFlowTest
import semmle.code.java.security.SensitiveLoggingQuery
class EnableLegacy extends EnableLegacyConfiguration {
EnableLegacy() { exists(this) }
}
class HasFlowTest extends InlineFlowTest {
override DataFlow::Configuration getTaintFlowConfig() {
result instanceof SensitiveLoggerConfiguration
override predicate hasTaintFlow(DataFlow::Node src, DataFlow::Node sink) {
SensitiveLoggerFlow::hasFlow(src, sink)
}
override DataFlow::Configuration getValueFlowConfig() { none() }
override predicate hasValueFlow(DataFlow::Node src, DataFlow::Node sink) { none() }
}

View File

@@ -9,7 +9,8 @@ class HasFlowTest extends InlineExpectationsTest {
override predicate hasActualResult(Location location, string element, string tag, string value) {
tag = "SSRF" and
exists(RequestForgeryConfiguration conf, DataFlow::Node sink | conf.hasFlowTo(sink) |
exists(DataFlow::Node sink |
RequestForgeryFlow::hasFlowTo(sink) and
sink.getLocation() = location and
element = sink.toString() and
value = ""