ci: add OpenSSF Scorecard workflow + badge (P13.1) (#90)

This commit is contained in:
kingchenc
2026-05-31 22:05:00 +02:00
committed by GitHub
parent dc2e19e762
commit c8e5d8a658
2 changed files with 50 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
name: OpenSSF Scorecard
# Supply-chain / security-posture analysis (findings P13.1). Runs on a weekly
# schedule, on branch-protection changes, and on push to main. `publish_results`
# uploads the score to the public OpenSSF API so the README badge resolves, and
# the SARIF is surfaced under the repo's Security → Code scanning tab.
on:
branch_protection_rule:
schedule:
- cron: '27 7 * * 2' # Tuesdays 07:27 UTC
push:
branches: [main]
workflow_dispatch:
# Read-only by default; the analysis job widens to exactly what it needs.
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
security-events: write # upload the SARIF result to code-scanning
id-token: write # OIDC token to publish results to the OpenSSF API
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Run Scorecard analysis
uses: ossf/scorecard-action@v2.4.3
with:
results_file: results.sarif
results_format: sarif
# Publish to the public OpenSSF endpoint that backs the README badge.
publish_results: true
- name: Upload SARIF artifact
uses: actions/upload-artifact@v4
with:
name: SARIF file
path: results.sarif
retention-days: 5
- name: Upload SARIF to code-scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
+1
View File
@@ -6,6 +6,7 @@
[![PyPI](https://img.shields.io/pypi/v/wickra.svg?logo=pypi&color=blue)](https://pypi.org/project/wickra/)
[![npm](https://img.shields.io/npm/v/wickra.svg?logo=npm&color=red)](https://www.npmjs.com/package/wickra)
[![License: PolyForm-NC](https://img.shields.io/badge/license-PolyForm--NC--1.0.0-purple)](LICENSE)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/wickra-lib/wickra/badge)](https://scorecard.dev/viewer/?uri=github.com/wickra-lib/wickra)
**Streaming-first technical indicators. Install with `pip install wickra` — no system dependencies.**