Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/workflows/reusable-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
required: false
default: ''
type: string
deploy_pages:
description: Deploy dashboard to GitHub Pages
required: false
default: false
type: boolean

permissions:
contents: read
Expand All @@ -34,27 +39,45 @@ jobs:

- name: Aggregate findings
run: |
set -euo pipefail
mkdir -p reports/normalized
python scripts/aggregate_results.py \
--input-dir reports/raw \
--output-file reports/normalized/dashboard-data.json \
--repo-name "${{ inputs.repo_name }}"
--repo-name "${{ inputs.repo_name || github.repository }}"

- name: Build static dashboard package
run: |
set -euo pipefail
python scripts/generate_dashboard.py \
--data-file reports/normalized/dashboard-data.json \
--dashboard-dir dashboard \
--output-dir reports/dashboard

- name: Verify dashboard output
run: |
set -euo pipefail
test -f reports/dashboard/index.html
ls -R reports/dashboard

- name: Upload dashboard artifact
uses: actions/upload-artifact@v4
with:
name: security-dashboard
path: reports/dashboard
if-no-files-found: error

- name: Configure Pages
if: inputs.deploy_pages
uses: actions/configure-pages@v5

- name: Upload Pages artifact
if: inputs.deploy_pages
uses: actions/upload-pages-artifact@v3
with:
path: reports/dashboard

- name: Deploy to GitHub Pages
if: inputs.deploy_pages
id: deployment
uses: actions/deploy-pages@v4
21 changes: 11 additions & 10 deletions .github/workflows/security-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ jobs:
uses: hel-isa/security-gate/.github/workflows/reusable-sbom.yml@main

dashboard:
name: Security Dashboard
needs:
- secrets
- sast
- sca
- sbom
if: always()
uses: hel-isa/security-gate/.github/workflows/reusable-dashboard.yml@main
with:
repo_name: ${{ github.repository }}
name: Security Dashboard
needs:
- secrets
- sast
- sca
- sbom
if: always()
uses: hel-isa/security-gate/.github/workflows/reusable-dashboard.yml@hel-isa-add-sast
with:
repo_name: ${{ github.repository }}
deploy_pages: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}