I'm running a ZAP API scan using zap-api-scan.py
, but it fails with NoUrlsException
. The logs show that no URLs were imported, and there's an illegal_parameter
warning:
2025-03-17 07:04:45,019 Number of Imported URLs: 0
2025-03-17 07:04:45,019 Import warnings: illegal_parameter
2025-03-17 07:04:45,019 Failed to import any URLs
Traceback (most recent call last):
File "/zap/zap-api-scan.py", line 482, in main
raise NoUrlsException()
NoUrlsException
2025-03-17 07:04:45,020 Failed to find zap_log /zap/zap.out
2025-03-17 07:04:45,020 Trigger hook: pre_exit, args: 3
Scan returned non-zero exit code
What I've tried:
- Verified that ZAP is running and accessible.
- Checked the API definition URL (OpenAPI/Swagger) to ensure it's valid.
- Ensured the correct parameters are passed to zap-api-scan.py.
- Tried running with different API definitions and scan configurations.