mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Java: Improve java/spring-disabled-csrf-protection
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import java
|
||||
import semmle.code.java.security.SpringCsrfProtection
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
module SpringCsrfProtectionTest implements TestSig {
|
||||
string getARelevantTag() { result = "hasSpringCsrfProtectionDisabled" }
|
||||
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "hasSpringCsrfProtectionDisabled" and
|
||||
exists(MethodAccess call | disablesSpringCsrfProtection(call) |
|
||||
call.getLocation() = location and
|
||||
element = call.toString() and
|
||||
value = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<SpringCsrfProtectionTest>
|
||||
Reference in New Issue
Block a user