From e722fdf7a5c55533e0ddf4fa73f5d6cdafd03652 Mon Sep 17 00:00:00 2001 From: Chris Wolfgang <210299580+Chris-Wolfgang@users.noreply.github.com> Date: Tue, 21 Jul 2026 15:10:24 -0400 Subject: [PATCH 1/2] ci: add OSSF Scorecard security-posture scan (#142) Adds scorecard.yaml (weekly + push-to-main + branch-protection-rule) that scores the repo against supply-chain best practices and uploads SARIF to Code Scanning. Adds the Scorecard badge to README. Ported from D20-Dice. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/scorecard.yaml | 50 ++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/scorecard.yaml diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml new file mode 100644 index 0000000..2732c8e --- /dev/null +++ b/.github/workflows/scorecard.yaml @@ -0,0 +1,50 @@ +name: OSSF Scorecard + +# Automated security-posture scoring via the OpenSSF Scorecard (#142). +# +# Scorecard evaluates the repo against supply-chain / security best practices +# (branch protection, pinned dependencies, token permissions, dangerous +# workflow patterns, ...) and uploads findings to Code Scanning. Runs on a +# weekly schedule and on branch-protection changes; not per-PR (it scores the +# repository, not a diff). + +on: + branch_protection_rule: + schedule: + - cron: '31 6 * * 1' # Mondays at 06:31 UTC + push: + branches: [main] + workflow_dispatch: + +permissions: read-all + +concurrency: + group: scorecard-${{ github.ref }} + cancel-in-progress: true + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + security-events: write # upload the SARIF results + id-token: write # publish results to the OpenSSF API + contents: read + steps: + - name: Checkout code + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + with: + persist-credentials: false + + - name: Run Scorecard + uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 + with: + results_file: results.sarif + results_format: sarif + publish_results: true + + - name: Upload SARIF to Code Scanning + uses: github/codeql-action/upload-sarif@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4 + with: + sarif_file: results.sarif diff --git a/README.md b/README.md index a87cce2..33ee33d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ An Extractor, Transformer and Loader designed to be used in testing libraries bu [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![.NET](https://img.shields.io/badge/.NET-Multi--Targeted-purple.svg)](https://dotnet.microsoft.com/) [![GitHub](https://img.shields.io/badge/GitHub-Repository-181717?logo=github)](https://github.com/Chris-Wolfgang/ETL-Test-Kit) +[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Chris-Wolfgang/ETL-Test-Kit/badge)](https://scorecard.dev/viewer/?uri=github.com/Chris-Wolfgang/ETL-Test-Kit) --- From 67c1c7fbf167cd56506e6da0accc1d5a54ba29ec Mon Sep 17 00:00:00 2001 From: Chris Wolfgang <210299580+Chris-Wolfgang@users.noreply.github.com> Date: Tue, 21 Jul 2026 16:17:58 -0400 Subject: [PATCH 2/2] ci: SHA-pin actions to current major-tag commits in scorecard.yaml (#143) Aligns with the fleet SHA-pin migration (#219): checkout v7.0.0 -> v7, setup-dotnet v5 -> v6, upload-artifact v4 -> v7, upload-sarif v3/v4 -> v4. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/scorecard.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 2732c8e..38e7269 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -33,7 +33,7 @@ jobs: contents: read steps: - name: Checkout code - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: persist-credentials: false @@ -45,6 +45,6 @@ jobs: publish_results: true - name: Upload SARIF to Code Scanning - uses: github/codeql-action/upload-sarif@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4 + uses: github/codeql-action/upload-sarif@e0647621c2984b5ed2f768cb892365bf2a616ad1 # v4 with: sarif_file: results.sarif