Skip to content

ci: secure GitHub Actions workflows#1302

Merged
henryiii merged 7 commits into
scikit-build:mainfrom
henryiii:henryiii/ci/secure-gha
May 22, 2026
Merged

ci: secure GitHub Actions workflows#1302
henryiii merged 7 commits into
scikit-build:mainfrom
henryiii:henryiii/ci/secure-gha

Conversation

@henryiii
Copy link
Copy Markdown
Collaborator

@henryiii henryiii commented May 20, 2026

Used my secure-ci skill, and tweaked a bit.

🤖 Human guided, AI assisted PR (using this skill). AI text below. 🤖

Summary

Secures GitHub Actions workflows following zizmor pedantic audit and best practices.

Changes

  • Pin all GHA actions to SHA with version comments (38 actions across 4 workflows) using actions-up
  • Pin codecov/codecov-action to SHA e79a6962e0d4c0c17b229090214935d2e33f8354 (was unpinned @v6)
  • Pin musllinux container image to SHA digest (was :latest)
  • Add zizmor pre-commit hook with --persona=pedantic
  • Add .github/zizmor.yaml config to ignore copilot-setup-steps concurrency (special file per zizmor docs)
  • Add concurrency group to cd.yml
  • Add name: labels to dist, deploy (cd.yml) and pass (ci.yml) jobs
  • Add explanatory comments to cd.yml deploy job permissions (id-token: write, attestations: write)
  • Add permissions: {} to nightlies.yml at workflow level and contents: read at job level
  • Add persist-credentials: false to checkout in nightlies.yml
  • Freeze all pre-commit hooks to SHA via prek auto-update --freeze --cooldown-days 7
  • Update dependabot.yml: monthly schedule, renamed group to github-actions, added pre-commit ecosystem, added 7-day cooldowns
  • Add exclude-newer = "7 days" to [tool.uv] in pyproject.toml
  • Update mypy python_version from 3.9 to 3.10 (required by mypy 2.1.0)
  • Fix mypy PackageMetadata.get error in test file

Assisted-by: OpenCode:glm-5

- Pin all GHA actions to SHA with version comments (38 actions)
- Pin codecov/codecov-action to SHA (was unpinned @v6)
- Pin musllinux container image to SHA digest (was :latest)
- Add zizmor pre-commit hook with pedantic persona
- Add .github/zizmor.yaml config (ignore copilot-setup-steps concurrency)
- Add concurrency group to cd.yml
- Add name: labels to dist, deploy, and pass jobs
- Add explanatory comments to cd.yml deploy permissions
- Add permissions: {} to nightlies.yml workflow and job levels
- Add persist-credentials: false to nightlies.yml checkout
- Freeze all pre-commit hooks to SHA via prek auto-update
- Update dependabot.yml: monthly schedule, github-actions group name,
  add pre-commit ecosystem, add 7-day cooldowns
- Add uv exclude-newer = "7 days" cooldown to pyproject.toml
- Update mypy python_version from 3.9 to 3.10 (required by mypy 2.1.0)
- Fix mypy PackageMetadata.get error in test file

Assisted-by: OpenCode:glm-5
Comment thread .pre-commit-config.yaml
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
henryiii and others added 3 commits May 20, 2026 19:54
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Copy link
Copy Markdown
Collaborator

@LecrisUT LecrisUT left a comment

Choose a reason for hiding this comment

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

Looks good other than the CI failures

Comment thread .github/workflows/nightlies.yml
Comment thread .github/workflows/nightlies.yml Outdated
henryiii and others added 2 commits May 22, 2026 08:17
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii henryiii merged commit 71fa18d into scikit-build:main May 22, 2026
66 checks passed
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.

2 participants