-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run on target rest api #30
Comments
I'm not really clear about your question. But to give some context. What this task does is to call the OWASP ZAP API that is hosted externally. Be it on a VM or on a Docker Container somewhere. So if you don't want to add the task to the release definition, you can call the API on your own as well. But that involves writing code to parse the responses etc. This task is created to make that process easier. And to be clear, if you are trying to use this as part of a pipeline, it should be in a release definition rather than the build, since OWASP ZAP runs on an endpoint (e.g your website/.API after its deployed) Here is an example where, I am directly calling the OWASP ZAP API in side of a Unit test project to run the tests. This is ASP.Net and C# but the idea should be the same. |
I am sorry for my bad explanation. |
From the looks of it, it seems it's a capability only available in the docker image. And its run on the docker image itself and does not have an endpoint that we can access to run it on a CI/CD Pipeline. But I am not absolutely sure about it since i have not used it. You may need to do some more research into this. |
That's what i was thinking, But I thought maybe you of any one else already setted this up and knows already how to do this. |
Looking at the link you provided, if you install the extension to support OpenAPI or SOAP you should be able to access using the OWASP ZAP api on your VM. And I should be able to add support to use OpenAPI json or WSDL in to the Azure DevOps extension. It doesn't support this at the moment. So you may have to find a workaround for now. Thanks for bringing this to my attention. |
I tried this but got stuck at the authentication of the url. PS: nice thinking to put this support in your Azure DevOps extension that woul help me and i think others a lot |
It depends on how authentication is supposed to happen. In some cases, you can create a context for the API using the ZAP desktop app and export it to a context file. You can provide the context to a scan, so it'll know how to authenticate and using which credentials. Alternatively, if the API depends on something like a JWS in a header, you can provide a Replacer rule that inserts the JWS header into each request. |
Azure calls can be made via powershell. Invoke-WebRequest -Uri "http://localhost:$(Port)/JSON/core/action/shutdown/?apikey=$(keyOwaspZapProxy)" then with this method you can make any type of call. |
Is it possible to run the Owasp Zap azure devops task on rest api's.
I found in the documentation of Owasp zap that this is possible through docker but I was hoping of this could work through the owasp zap azure devops task. without changing my entire build.
The text was updated successfully, but these errors were encountered: