From cc90f5841cd25fcc1a9c1f509a831cc685683ad7 Mon Sep 17 00:00:00 2001 From: Race Tester Date: Wed, 10 Jun 2026 02:27:21 +0530 Subject: [PATCH] ci: add OpenSSF Scorecard workflow --- .github/workflows/scorecard.yml | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/scorecard.yml diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 0000000..b58802a --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,42 @@ +name: Scorecard + +on: + branch_protection_rule: + schedule: + - cron: '37 9 * * 1' + push: + branches: [main] + +permissions: + security-events: write + id-token: write + contents: read + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Run analysis + uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 + with: + results_file: scorecard-results.sarif + results_format: sarif + publish_results: false + + - name: Upload artifact + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: SARIF file + path: scorecard-results.sarif + retention-days: 5 + + - name: Upload to code-scanning + uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4 + with: + sarif_file: scorecard-results.sarif