Skip to content

ci: OpenSSF Scorecard + zizmor workflow SAST + branch-protection script - #21

Merged
ul0gic merged 1 commit into
mainfrom
ci-hardening
May 31, 2026
Merged

ci: OpenSSF Scorecard + zizmor workflow SAST + branch-protection script#21
ul0gic merged 1 commit into
mainfrom
ci-hardening

Conversation

@ul0gic

@ul0gic ul0gic commented May 31, 2026

Copy link
Copy Markdown
Owner

Summary

CI/CD security hardening — three additions. The runtime binary stays zero-dependency; this is CI tooling only.

  • OpenSSF Scorecard (.github/workflows/scorecard.yml, scheduled + push to main) — scores supply-chain posture (branch protection, pinned deps, token perms, …) and backs a README badge. OIDC (no secret), SHA-pinned, own file (different trigger/cadence).
  • zizmor (job in ci.yml) — GitHub Actions SAST over our workflows (injection sinks, excessive permissions, unpinned actions, credential persistence). Run as a pinned CLI (pipx run zizmor==1.25.2) — no new marketplace action. Gated at --min-severity medium. First real run is this PR.
  • scripts/setup-branch-protection.sh — applies main protection: require PR + green CI, 0 required reviews (solo maintainer; CI is the gate), linear history, no force-push/deletion, enforce for admins. Maintainer runs it.

All actions SHA-pinned (SEC-011); least-privilege per-job permissions.

After merge (maintainer)

  1. Run scripts/setup-branch-protection.sh (needs repo-admin gh auth).
  2. Enable Settings → Security → Code scanning so the Scorecard SARIF upload has a destination.
  3. The Scorecard badge resolves after the first scheduled/push run publishes to api.securityscorecards.dev.

Sequencing note: this lands the workflows first so the zizmor/scorecard checks exist; branch protection is applied after.

…ript

Scorecard (scheduled, own file) scores supply-chain posture and backs a
README badge; zizmor (pinned CLI via pipx, no new marketplace action)
statically analyzes the workflows for injection/permissions/pinning
footguns, gated at medium+. setup-branch-protection.sh applies main
protection (require PR + green CI, 0 reviews for a solo maintainer, linear
history, no force-push) — the maintainer runs it.

All actions SHA-pinned; least-privilege per-job permissions. The runtime
binary stays zero-dependency — this is CI tooling only.
@ul0gic
ul0gic merged commit 853e0c7 into main May 31, 2026
10 checks passed
@ul0gic
ul0gic deleted the ci-hardening branch May 31, 2026 18:54
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