This uploads reports to your DefectDojo. It allows to execute the following actions:
- Check productType. It will not create it. You need to preconfigure it manually with necessary permissions.
- Check and create product for setted productType if needed.
- Check and create engagement inside product if needed.
- Check and create environment.
- Integrate SonarQube API and use it for importing the tests.
- Get Github Vulnerability report.
- Import reports/api scan
See action.yml
steps:
- name: Clone code repository
uses: actions/checkout@v4
- name: DefectDojo
id: defectdojo
uses: C4tWithShell/defectdojo-action@1.0.5
with:
token: ${{ secrets.DEFECTOJO_TOKEN }}
defectdojo_url: ${{ secrets.DEFECTOJO_URL }}
product_type: example
product: ${{ github.repository }}
engagement: ${{ github.ref_name }}
tools: "SonarQube API Import,Github Vulnerability Scan"
sonar_projectKey: example:project
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repository: ${{ github.repository }}
environment: Dev
reports: '{"Github Vulnerability Scan": "github.json"}'
- name: Show response
run: |
set -e
printf '%s\n' '${{ steps.defectdojo.outputs.response }}'
For SonarQube API Import
don't forget to create a Tool config in your DefectDojo!