You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Pipeline中OWASP ZAP安全测试失败,请求协助排查

Azure Pipeline配置OWASP ZAP安全测试失败排查求助

我参照一篇介绍在Azure DevOps中执行OWASP ZAP安全测试的文档完成配置,但Pipeline执行失败,失败截图如下:
失败截图

我严格遵循文档步骤操作仍未解决问题,以下是当前使用的Pipeline脚本,希望有相关经验的开发者帮忙排查问题:

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

内容的提问来源于stack exchange,提问作者regarding the Zap security

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 23:05:24