Problems with passing parameters when scanning the API using automation framework

135 views
Skip to first unread message

Kseniya Sharova

unread,
Oct 5, 2023, 5:15:21 AM10/5/23
to ZAP User Group
Good day everyone! 

I want to scan API with openapi.yaml .  In API I have some urls like this: https://10.10.10.11//api/configs/{language} - where I need to pass the parameter 'language' by myself. I used automation framework to make scan plan (I attached the example of plan to the message ). 
When I tried to scan API, I got an error:  "Job openapi target: https://10.10.10.11// error: paths.'/api/configs/{language}'. Declared path parameter language needs to be defined as a path parameter in path or operation level " (I attached the printscreen  to the message )

Is there a way to pass parameters to ZAP using automation framework?
scan_file_api.yaml
Снимок экрана 2023-10-05 в 11.52.20.png

thc...@gmail.com

unread,
Oct 5, 2023, 9:58:04 AM10/5/23
to zaprox...@googlegroups.com
Hi.

I'd suggest fix the OpenAPI definition to properly declare the path
parameter. If it was correct you could use the value generator:
https://www.zaproxy.org/docs/desktop/addons/value-generator/

Otherwise, you have to replace that before the requests are sent, e.g.:
https://www.zaproxy.org/docs/desktop/addons/replacer/automation/

Best regards.
Reply all
Reply to author
Forward
0 new messages