Skip to content

Commit f7219a7

Browse files
committed
fix: add CWE mapping for SQL injections and clean up redundant XSS false-positive check
1 parent 81228cf commit f7219a7

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ class OWASP:
525525
CWE_MAPPINGS = {
526526
"xss": ["CWE-79", "CWE-80", "CWE-81", "CWE-82", "CWE-83", "CWE-84", "CWE-85"],
527527
"sqli": ["CWE-89", "CWE-90", "CWE-564", "CWE-656"],
528+
"sql": ["CWE-89", "CWE-90", "CWE-564", "CWE-656"],
528529
"idor": ["CWE-639", "CWE-22", "CWE-862"],
529530
"csrf": ["CWE-352"],
530531
"ssrf": ["CWE-918"],

socrates-blade.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,6 @@ def test_xss(self, url, params, method='GET'):
416416
if self.is_false_positive(url, param, payload):
417417
continue
418418

419-
# Check if it's in a dangerous context (not escaped)
420-
# Look for unescaped < and > characters
421-
if '<' in payload and f'&lt;{payload.replace("<", "")}' in resp.text:
422-
# Safe - was HTML-escaped
423-
continue
424-
425419
self.add_finding(
426420
'Reflected XSS',
427421
url,

0 commit comments

Comments
 (0)