Last active
July 6, 2021 12:49
-
-
Save ManasPecenek/6b3cfd0a189932e1788079f0960d2ffb to your computer and use it in GitHub Desktop.
owasp-overall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources: | |
repositories: | |
- repository: <repo_name> | |
type: git | |
name: <project_name>/<repo_name> | |
ref: refs/heads/master | |
trigger: none | |
stages: | |
- stage: 'buildstage' | |
jobs: | |
- job: 'buildjob' | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- checkout: self | |
- checkout: <repo_name> | |
- bash: docker run -d -p <container_port>:<target_port> <your_image> | |
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):<container_port> -x | |
xml_report.xml | |
true | |
displayName: 'Owasp Container Scan' | |
- powershell: | | |
$XslPath = "<repo_name>/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: | |
testResultsFormat: 'NUnit' | |
testResultsFiles: 'converted_report.xml' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment