diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml new file mode 100644 index 0000000..38e7269 --- /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@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@e0647621c2984b5ed2f768cb892365bf2a616ad1 # 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) ---