Skip to content

Commit ae58c95

Browse files
committed
Update vuln test cases
1 parent b63e77e commit ae58c95

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

aikido_zen/vulnerabilities/init_test.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,13 @@ def test_ssrf_vulnerability_scan_bypassed_ip(get_context):
198198
run_vulnerability_scan(kind="ssrf", op="test", args=(dns_results, hostname, port))
199199
assert get_cache().stats.get_record()["requests"]["attacksDetected"]["total"] == 0
200200

201-
# Verify that hostnames.add was not called due to bypassed IP
202-
assert get_cache().hostnames.as_array() == []
201+
assert get_cache().hostnames.as_array() == [
202+
{
203+
"hits": 1,
204+
"hostname": "example.com",
205+
"port": 80,
206+
},
207+
]
203208

204209

205210
def test_ssrf_vulnerability_scan_protection_gets_forced_off(get_context):
@@ -211,7 +216,7 @@ def test_ssrf_vulnerability_scan_protection_gets_forced_off(get_context):
211216
port = 80
212217
assert get_context.should_skip_attack_scan is None
213218
run_vulnerability_scan(kind="ssrf", op="test", args=(dns_results, hostname, port))
214-
assert get_context.should_skip_attack_scan is False
219+
assert get_context.should_skip_attack_scan is True # Bypassed IP
215220

216221

217222
def test_sql_injection_with_protection_forced_off(caplog, get_context, monkeypatch):

0 commit comments

Comments
 (0)