Run a Dastardly vulnerability scan
mainLOW, MEDIUM, or HIGH severity are detected.repository·main·Indexed 43 days ago
https://github.com/portswigger/dastardly-github-actionA 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.
LOW, MEDIUM, or HIGH severity are detected.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: trueTo run a basic scan, use the PortSwigger/dastardly-github-action@main action and provide the target-url input.
steps:
- name: Run Dastardly Action Step
uses: PortSwigger/dastardly-github-action@main
with:
target-url: 'https://ginandjuice.shop'The action accepts the following inputs in your GitHub Actions workflow:
| Input | Required | Description |
|---|---|---|
target-url | Yes | The full URL (including scheme, e.g., https://) of the site to scan. |
output-filename | No | The name of the output JUnit XML report file. This file is stored in the GITHUB_WORKSPACE directory. Default: dastardly-report.xml |