security: address 22 of 25 OSSF Scorecard findings#13
Merged
Conversation
627aa9f to
e10b36b
Compare
2 tasks
Pin GitHub Actions by commit SHA and container images by digest so reproducible builds survive upstream tag mutation (OSSF Scorecard Pinned-Dependencies, alerts 7-18, 23-26). - .github/workflows/pages.yml: pin checkout/configure-pages/ upload-pages-artifact/deploy-pages by SHA. - .github/workflows/validate-docs.yml: pin markdownlint-cli2@0.22.0, markdown-link-check@3.14.2, cspell@10.0.0. - .github/workflows/ci.yml: pin cryptography==46.0.7 for cross-language interop tests. - demo/record-demo.sh: npm install -> npm ci to enforce lockfile. - demo/package.json: @playwright/test ^1.48.0 -> 1.57.0 (exact). - Dockerfiles (Dockerfile.build + 4 test-host variants): pin image digests for rust:1.88-slim-bookworm, rust:1.85-bookworm, ubuntu:22.04, ubuntu:24.04, jrei/systemd-ubuntu:22.04. Refs: prodnull/prmana code-scanning alerts 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 23, 24, 25, 26.
Move write-scope GITHUB_TOKEN permissions from workflow top level to only the jobs that actually require them (OSSF Scorecard Token-Permissions, alerts 4, 5, 6, and CodeQL actions/missing-workflow-permissions alerts 30, 31). - release.yml: top level contents:read; build job adds id-token:write + attestations:write (SLSA provenance); package/test jobs are contents:read. release job retains contents:write (required to create the GitHub Release and upload assets). - publish-repo.yml: top level contents:read; publish job adds contents:write (gh-pages push) + actions:read. - mac-policy.yml: add explicit top-level + per-job contents:read. Previously had no permissions block at all, which left the token at the installation default. Refs: prodnull/prmana code-scanning alerts 4, 5, 6, 30, 31.
e10b36b to
04eaeff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remediates 22 of the 25 open OSSF Scorecard code-scanning findings on
main(d2744fe baseline). Splits into two logical commits:npm install→npm ciin the demo recorder.GITHUB_TOKENpermissions off the workflow top level and onto only the jobs that actually need them. Adds an explicitpermissions: contents: readblock tomac-policy.yml, which previously had none.Not remediated in this PR
deny.tomlwith rationale. Needs a focused audit pass — separate PR.contents: writeinrelease.ymlrelease job)releasejob must create the GitHub Release and upload assets. Not a Scorecard false positive but a genuinely required write.Refresh query
Scorecard alerts addressed
Test plan
python3 -c 'import yaml; yaml.safe_load(open(f))').gh api.Signed commits (GPG 9D5E79FBDC9AB54D).
🤖 Generated with Claude Code