Skip to content

ci: adopt OSSF Scorecard for automated security-posture scoring (#190) - #256

Merged
Chris-Wolfgang merged 2 commits into
mainfrom
fix/190-ossf-scorecard
Jul 15, 2026
Merged

ci: adopt OSSF Scorecard for automated security-posture scoring (#190)#256
Chris-Wolfgang merged 2 commits into
mainfrom
fix/190-ossf-scorecard

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Summary

Adopts OSSF Scorecard per #190. Complements CodeQL / DevSkim / Gitleaks (which scan the code) by scoring the repo configuration + release-engineering practices against ~20 best practices (branch protection, pinned actions, signed commits, dangerous-workflow patterns, vulnerability response time, …).

Changes

  • .github/workflows/scorecard.ymlossf/scorecard-action@v2.4.2. Weekly Mon 06:00 UTC + push to main + workflow_dispatch. Results upload to Code Scanning (SARIF) and to the OpenSSF public database (only on non-PR runs, so in-flight PR scores don't pollute the badge). Job permissions: security-events:write, id-token:write (OIDC-based public publish), contents:read, actions:read. Top-level permissions: read-all.
  • README.md — added scorecard.dev badge in the existing badge row (between Release and License).
  • docs/SECURITY-SCORECARD.md — baseline + policy doc. Score-floor is 7.5 as a soft gate (reviewer attention + CHANGELOG note on regression, not a hard CI block — Scorecard is strict enough that transient dependency drift can drop the score temporarily while a fix is in flight). Below 6.0 is an incident. Baseline table + known-acceptable-findings table are stubbed for population after the first successful main-push run.

Protected-file note

Adds .github/workflows/scorecard.yml — a new workflow file. Detect .NET Projects will fail as expected → admin-bypass required at merge.

After merge

  1. Push to main triggers first scan → populates the public badge + Security tab.
  2. Fill in the baseline table in docs/SECURITY-SCORECARD.md (score, failed/passing checks).
  3. Add any legitimately-acceptable findings to the known-acceptable table with rationale.

Test plan

  • YAML parses; workflow has 4 steps (checkout / scorecard / upload artifact / upload SARIF)
  • Job permissions correct (security-events + id-token)
  • publish_results gated to non-PR events
  • First main-push run completes green (verify after merge)

Closes #190

New: `.github/workflows/scorecard.yml`
- ossf/scorecard-action@v2.4.2 on weekly schedule (Mon 06:00 UTC) +
  push to main + workflow_dispatch for on-demand audits.
- Job permissions floor: security-events:write (SARIF upload),
  id-token:write (OIDC-based publish to OpenSSF public database),
  contents:read, actions:read. Top-level permissions: read-all.
- publish_results gated to non-PR events so in-flight PR scores
  don't pollute the badge / public API.
- SARIF uploaded to Code Scanning (Security tab) alongside CodeQL
  + DevSkim.
- Also archived as workflow artifact (30-day retention) for
  post-hoc analysis.

README.md: added the scorecard.dev badge in the badge row.

docs/SECURITY-SCORECARD.md: baseline + policy doc.
- Score floor 7.5 documented as a SOFT gate (reviewer attention,
  CHANGELOG note on regression), not a hard CI block. Hard-gating
  would produce persistent noise from strict rules + transient
  false positives.
- Sub-6.0 treated as an incident.
- Baseline table stubbed for population after first successful run.
- Known-acceptable findings table stubbed.
- Cross-references the other four scanners (CodeQL, DevSkim,
  Gitleaks, InspectCode) so future contributors know Scorecard
  is distinct — it scans repo CONFIGURATION, not code.

Closes #190
Copilot AI review requested due to automatic review settings July 15, 2026 00:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Maintenance] CI/CD: OSSF Scorecard adoption (automated security-posture scoring)

2 participants