Skip to content

Commit b63e77e

Browse files
committed
Add in context exists checks
1 parent db64b94 commit b63e77e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

aikido_zen/vulnerabilities/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ def run_vulnerability_scan(kind, op, args):
3737
raises error if blocking is enabled, communicates it with connection_manager
3838
"""
3939
context = get_current_context()
40+
if not context and kind != "ssrf":
41+
# Make a special exception for SSRF:
42+
# For stored ssrf we don't need a context
43+
return
4044
if should_skip_attack_scan(context) and kind != "ssrf":
4145
# Make a special exception for SSRF:
4246
# For stored ssrf we don't want to check bypassed IPs or protection forced off.

aikido_zen/vulnerabilities/ssrf/inspect_getaddrinfo_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def inspect_getaddrinfo_result(dns_results, hostname, port):
2828
return
2929

3030
context = get_current_context()
31-
if should_skip_attack_scan(context):
31+
if not context or should_skip_attack_scan(context):
3232
return
3333

3434
# attack_findings is an object containing source, pathToPayload and payload.

0 commit comments

Comments
 (0)