Re: [zaproxy-users] ZAP API Scan stuck

18 views
Skip to first unread message

psiinon

unread,
Jun 27, 2022, 3:47:33 AMJun 27
to zaprox...@googlegroups.com
Please dont delete posts you make to this group.
If you work out what went wrong then just reply explaining what the problem was - that will help other people who hit the same thing...

Cheers,

Simon

On Fri, Jun 24, 2022 at 6:26 PM Rohit Kumar <ro...@clouddefense.ai> wrote:
I made a wrapper on top of zap api scan, we're running below command interanlly, can you tell me why it's not moving ahead?

 /usr/bin/python3 /zap/zap-api-scan.py -t https://petstore.swagger.io/v2/swagger.json -f openapi -P 8070 -d -J scanreport_v2.json -T 2 -S --hook=/zap/alerts_hook.py

alerts_hook.py
========

import subprocess
import os
import logging

def zap_pre_shutdown(zap):
verbose = os.getenv('LOGS_VERBOSE')

if verbose:
logging.info("Zap pre shutdown: Send request to: http://localhost:8070/JSON/core/view/alerts")
logging.info("Zap pre shutdown. Send request to: http://localhost:8070/JSON/core/view/messages")

subprocess.call(['curl', '-k', '-s', 'http://localhost:8070/JSON/core/view/alerts', '--output', '/zap/wrk/scanreport.json'])
subprocess.call(['curl', '-k', '-s', 'http://localhost:8070/JSON/core/view/messages', '--output', '/zap/wrk/messages_report.json'])
return zap

--
You received this message because you are subscribed to the Google Groups "OWASP ZAP User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zaproxy-users/e4324e94-748b-4886-b2e5-a43abbd8c6ddn%40googlegroups.com.


--
OWASP ZAP Project leader
Reply all
Reply to author
Forward
0 new messages