From cea3b53a44507393a195735eaf6df3fb15e0949a Mon Sep 17 00:00:00 2001 From: Fiachra Corcoran Date: Fri, 21 Feb 2025 09:53:16 +0000 Subject: [PATCH] Add OpenSSF scorecard gh action Signed-off-by: Fiachra Corcoran --- .github/workflows/openssf_scorecard.yaml | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/openssf_scorecard.yaml diff --git a/.github/workflows/openssf_scorecard.yaml b/.github/workflows/openssf_scorecard.yaml new file mode 100644 index 00000000..d8e5ddb3 --- /dev/null +++ b/.github/workflows/openssf_scorecard.yaml @@ -0,0 +1,46 @@ +name: OpenSSF Scorecard + +# Declare default permissions as read only. +permissions: read-all + +on: + schedule: + - cron: '30 1 * * 6' + push: + branches: + - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + analysis: + runs-on: ubuntu-latest + permissions: + security-events: write + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4.2.2 + with: + persist-credentials: false + - name: Run analysis + uses: ossf/scorecard-action@v2.4.0 + with: + results_file: results.sarif + results_format: sarif + publish_results: true + - name: Upload artifact + uses: actions/upload-artifact@v4.6.0 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + - name: Upload to code-scanning + uses: github/codeql-action/upload-sarif@v3.28.9 + with: + sarif_file: results.sarif + token: ${{ secrets.GITHUB_TOKEN }} + \ No newline at end of file