Files
codeql/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql
2023-03-08 13:35:25 +01:00

20 lines
566 B
Plaintext

import java
import semmle.code.java.security.RequestForgeryConfig
import TestUtilities.InlineExpectationsTest
class HasFlowTest extends InlineExpectationsTest {
HasFlowTest() { this = "HasFlowTest" }
override string getARelevantTag() { result = "SSRF" }
override predicate hasActualResult(Location location, string element, string tag, string value) {
tag = "SSRF" and
exists(DataFlow::Node sink |
RequestForgeryFlow::hasFlowTo(sink) and
sink.getLocation() = location and
element = sink.toString() and
value = ""
)
}
}