python: require local protection to be absent

for CSRF to be likely
This commit is contained in:
Rasmus Lerchedahl Petersen
2022-03-22 13:42:52 +01:00
parent f5b53083ae
commit 0f2c21c8bd
4 changed files with 59 additions and 3 deletions

View File

@@ -15,5 +15,7 @@ import python
import semmle.python.Concepts
from CSRFProtectionSetting s
where s.getVerificationSetting() = false
where
s.getVerificationSetting() = false and
not exists(CSRFProtection p)
select s, "Potential CSRF vulnerability due to forgery protection being disabled or weakened."