Dastardly Scan Action

repository·main·Indexed 43 days ago

https://github.com/portswigger/dastardly-github-action

A GitHub Action that integrates the Dastardly web security scanner into CI/CD pipelines to automatically detect common web vulnerabilities. It performs lightweight scans against a target URL and generates a JUnit XML report with vulnerability details and remediation suggestions.

Tokens
732
Snippets
2
Records
4
Agent score
5%

What's inside Dastardly

  1. Run a Dastardly vulnerability scan

    main
    The Dastardly Scan Action runs a lightweight web application security scan against a target site. Upon completion, it generates a JUnit XML report containing vulnerability details, locations, and remediation suggestions. By default, the action will fail the workflow build if any vulnerabilities with LOW, MEDIUM, or HIGH severity are detected.
  2. Suggested usage: Pairing Dastardly with a JUnit XML parser

    main

    Because Dastardly fails the build when vulnerabilities are found, you may want to use continue-on-error: true to ensure subsequent steps (like report publishing) still execute.

    To view the scan results in the GitHub UI, pair this action with a JUnit XML parser (such as mikepenz/action-junit-report@v3). Use if: always() on the parser step to ensure it runs even if the Dastardly scan fails due to detected vulnerabilities.

    steps:
      - name: Run Dastardly Action Step
        continue-on-error: true                        # This allows subsequent steps to run even if this step fails
        uses: PortSwigger/dastardly-github-action@main
        with:
          target-url: 'https://ginandjuice.shop'
    
      # You can replace this next step with any JUnit XML parser of your choosing
      - name: Publish Test Report
        if: always()                                    # Forces this step to always run
        uses: mikepenz/action-junit-report@v3
        with:
          report_paths: '**/dastardly-report.xml'       # Update this path if you provide a custom output-filename
          require_tests: true
  3. Configure Dastardly Scan Action inputs

    main

    The action accepts the following inputs in your GitHub Actions workflow:

    InputRequiredDescription
    target-urlYesThe full URL (including scheme, e.g., https://) of the site to scan.
    output-filenameNoThe name of the output JUnit XML report file. This file is stored in the GITHUB_WORKSPACE directory. Default: dastardly-report.xml