Skip to content

Harden supply chain: pin actions, Dependabot, CodeQL workflow, property tests - #94

Merged
vsn411 merged 1 commit into
mainfrom
feat/scorecard-hardening
Nov 11, 2026
Merged

vsn411 merged 1 commit into
mainfrom
feat/scorecard-hardening

Conversation

@vsn411

@vsn411 vsn411 commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Driven by the OpenSSF Scorecard results (4.6/10). Each item maps to a check.

Check Was Change
Token-Permissions 0 release.yml had no top-level permissions:, so jobs without their own grant ran with full write. Now contents: read by default; the release and GHCR jobs keep their scoped writes.
Pinned-Dependencies 1 All 16 actions in ci.yml/release.yml pinned to commit SHAs (version in a comment); Docker base image pinned to its digest.
Dependency-Update-Tool 0 .github/dependabot.yml: github-actions, pip, docker, npm; weekly, grouped per ecosystem. Keeps the SHAs above fresh.
SAST 4 CodeQL default setup only scanned PRs (12 of the last 30 commits covered). codeql.yml runs on push to main, PRs and weekly. Default setup has been disabled on the repo so the two don't conflict.
Fuzzing 0 Hypothesis property tests (tests/test_property_parsers.py) for the report severity/risk-rating parsers, skill frontmatter parsing and severity normalisation. Scorecard recognises property-based testing for Python.
Branch-Protection 3 CODEOWNERS (@vsn411). The ruleset changes themselves (1 required approval, up-to-date branches, last-push approval) are repo settings, applied after this merges.

Not in this PR, on purpose: hashed pip lockfiles (--require-hashes) for the four pip install commands. That would take Pinned-Dependencies from ~7 to 10 but adds a lockfile to regenerate on every dependency change.

Made with Cursor

…ty tests

Driven by the OpenSSF Scorecard results (4.6/10):

- Token-Permissions (0): release.yml had no top-level permissions block,
  so every job without its own grant ran with full write access. Default
  to contents: read; the release and GHCR jobs keep their scoped writes.
- Pinned-Dependencies (1): every action in ci.yml and release.yml is now
  pinned to a commit SHA with the version in a comment, and the Docker
  base image to its digest. 13 GitHub-owned and 3 third-party actions
  were floating on major tags.
- Dependency-Update-Tool (0): .github/dependabot.yml for github-actions,
  pip, docker and npm, weekly and grouped per ecosystem.
- SAST (4): CodeQL default setup scanned PRs only, leaving 18 of the last
  30 commits unchecked. codeql.yml runs on push to main, PRs and weekly
  for python, javascript-typescript and actions.
- Fuzzing (0): Hypothesis property tests for the severity/risk-rating
  report parsers, skill frontmatter parsing and severity normalisation,
  covering round-trips and never-raises-on-garbage.
- Branch-Protection: CODEOWNERS so code-owner review can be required once
  a second owner is listed.
@vsn411
vsn411 merged commit 954e2d5 into main Nov 11, 2026
6 checks passed
@vsn411
vsn411 deleted the feat/scorecard-hardening branch November 11, 2026 21:44
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.

1 participant