This is the reference doc I have followed to set up the Azure pipeline https://medium.com/adessoturkey/owasp-zap-security-tests-in-azure-devops-fe891f5402a4
below i am sharing screenshort of the pipeline failed:
Could you please help here to resolve the issue I have exactly followed the medium article to implement the task....
Those who aware on this could you please share your taughts.
This is the pipeline script i am using.
trigger: none
stages:
- stage: 'buildstage'
jobs:
job: buildjob pool: vmImage: ubuntu-latest steps:
- checkout: self
- checkout: owasap-zap
bash: "docker run -d -p 80:80 nginx:1.14.2" displayName: "App Container"
bash: | chmod -R 777 ./ docker run --rm -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-full-scan.py -t http://$(ip -f inet -o addr show docker0 | awk '{print $4}' | cut -d '/' -f 1):80 -x xml_report.xml true displayName: "Owasp Container Scan"
- displayName: "PowerShell Script"
powershell: | $XslPath = "owasp-zap/xml_to_nunit.xslt" $XmlInputPath = "xml_report.xml" $XmlOutputPath = "converted_report.xml" $XslTransform = New-Object System.Xml.Xsl.XslCompiledTransform $XslTransform.Load($XslPath) $XslTransform.Transform($XmlInputPath, $XmlOutputPath) displayName: "PowerShell Script"
task: PublishTestResults@2 displayName: "Publish Test Results" inputs: testResultsFiles: converted_report.xml testResultsFormat: NUnit # task: PublishTestResults@2
stage: buildstage

