Skip to content

Commit

Permalink
github: generate codeql report on release tags
Browse files Browse the repository at this point in the history
  • Loading branch information
marquiz committed Jan 5, 2024
1 parent ff17c2d commit ddbb011
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/common-codeql.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: CodeQL scanning
on:
workflow_call:
inputs:
export-report:
default: false
required: false
type: boolean

jobs:
codeql-scan:
Expand All @@ -17,3 +22,17 @@ jobs:

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

- name: Generate CodeQL Security Report
if: ${{ inputs.export-report }}
uses: rsdmike/github-security-report-action@v3.0.4
with:
template: report
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload PDF report as an artifact
if: ${{ inputs.export-report }}
uses: actions/upload-artifact@v3
with:
name: codeql-report
path: report.pdf
5 changes: 5 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
with:
export-csv: true

codeql:
uses: "./.github/workflows/common-codeql.yaml"
with:
export-report: true

publish-images:
uses: "./.github/workflows/common-build-images.yaml"
needs: [trivy-scan]
Expand Down

0 comments on commit ddbb011

Please sign in to comment.