In this page we are going to add some tasks in Azure Release pipeline to do the tests.
There is already a docker image containing Zap2 files and a Python file called zap-baseline.py to run the process. The image is called owasp/zap2docker-stable requires a shared folder to put the report in it. To mount a file share I use a storage account in azure containing the shared location called security. I generate the Key to access the shared location and start the process.
When process has been completed you need to have a file called OWASPToNUnit3.xslt to convert the report into an NUnit file that can be published as a test result.
OWASP Stage Tasks
There are 3 tasks in this stage:
- OWASP in Azure CLI
which stes up a Container Instance that runs the tests
- Transforming PowerShell Script
which uses a PowerShell script to transform the result into NUnit
- Publish Test Results
which makes the result visible in the pipeline as Test Results