Spaces:
Sleeping
Sleeping
Commit Β·
0650784
1
Parent(s): 1d6ebcd
Fix over-aggressive Open Redirect suppression
Browse filesPrevious rule suppressed ALL variable assignments from req.query which
would hide real Open Redirect vulnerabilities in other repos.
Replaced with targeted suppression: only suppress res.redirect() calls
that use explicit relative paths (./callback, etc.) which are safe by
definition. Variable assignments are now correctly flagged with LOW
confidence and require context analysis to determine if validation exists.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -1561,11 +1561,11 @@ _FP_SUPPRESSIONS = [
|
|
| 1561 |
re.compile(r'CREATE\s+\$\{\s*\w+\s*\?\s*[\'"]UNIQUE\s*[\'"]\s*:\s*[\'"][\'"]', re.IGNORECASE),
|
| 1562 |
"CREATE INDEX with internal boolean flag β not user-controlled"),
|
| 1563 |
|
| 1564 |
-
# ββ Open Redirect:
|
| 1565 |
-
#
|
| 1566 |
("Open Redirect",
|
| 1567 |
-
re.compile(r'
|
| 1568 |
-
"
|
| 1569 |
]
|
| 1570 |
|
| 1571 |
|
|
|
|
| 1561 |
re.compile(r'CREATE\s+\$\{\s*\w+\s*\?\s*[\'"]UNIQUE\s*[\'"]\s*:\s*[\'"][\'"]', re.IGNORECASE),
|
| 1562 |
"CREATE INDEX with internal boolean flag β not user-controlled"),
|
| 1563 |
|
| 1564 |
+
# ββ Open Redirect: res.redirect() with a SAFE internal URL β
|
| 1565 |
+
# res.redirect(303, `./callback?${...}`) β relative URL, safe
|
| 1566 |
("Open Redirect",
|
| 1567 |
+
re.compile(r'res\.redirect\s*\(\s*\d+\s*,\s*[\'"`]\./|res\.redirect\s*\(\s*[\'"`]\./', re.IGNORECASE),
|
| 1568 |
+
"Redirect target is a relative path β not user-controlled"),
|
| 1569 |
]
|
| 1570 |
|
| 1571 |
|