zaproxy / action-baseline

A GitHub Action for running the ZAP Baseline scan
Apache License 2.0
314 stars 58 forks source link

xml placeholder file not created as part of execution causing -x flag #104

Closed DPleckauskas closed 7 months ago

DPleckauskas commented 1 year ago

The -x flag does not seem to work when used as is.

Here is the basic config I'm using:

- name: OWASP ZAP
         uses: zaproxy/action-baseline@v0.7.0
         with:
           target: "http://localhost:3000"
           fail_action: false
           cmd_options: "-x report_xml.xml"

Here is the error:

Automation plan failures:
    Job report failed to generate report: /zap/wrk/report_xml.xml

Workaround: Noticed that .json, .html, and .md files are automatically created prior to the scan.

- name: Create XML placeholder file
         run: |
          touch report_xml.xml
          chmod a+w report_xml.xml

This works with the -x flag but it means I have to manually upload the .xml as a separate artifact.

thc202 commented 7 months ago

Closing with the change done in #124.