security: SHA-pin release actions and tighten workflow permissions#19
Open
hinanohart wants to merge 1 commit into
Open
security: SHA-pin release actions and tighten workflow permissions#19hinanohart wants to merge 1 commit into
hinanohart wants to merge 1 commit into
Conversation
Fixes MEDIUM audit finding: the release workflow (contents:write + id-token:write, PYPI_API_TOKEN exposed) ran several third-party actions via mutable refs. A compromised upstream tag/branch could exfiltrate the PyPI token or abuse write scopes. Changes to .github/workflows/release.yml: - Pin all previously-mutable actions to full commit SHAs: - actions/upload-artifact @v7 -> 043fb46 # v7.0.1 - actions/download-artifact @v8 -> 3e5f45b # v8.0.1 - sigstore/cosign-installer @V3 -> 398d4b0 # v3.9.1 - pypa/gh-action-pypi-publish @release/v1 -> cef2210 # release/v1 (v1.14.0) - softprops/action-gh-release @V3 -> b430933 # v3.0.0 - Move permissions from workflow level to per-job least privilege: default contents:read; id-token:write only in the sign job; contents:write only in the github-release job. - Set persist-credentials: false on both actions/checkout steps. Changes to .github/workflows/ci.yml: - Set persist-credentials: false on actions/checkout (artipacked). Dependabot (github-actions ecosystem, already configured) will keep the SHA pins updated. Validated with zizmor: 0 errors, 0 warnings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
セキュリティ監査修正 (HIGH/MEDIUM)
自動セキュリティ監査で検出された HIGH/MEDIUM 所見に対する最小修正です。
security: pin release workflow actions to SHAs and tighten permissions
Fixes MEDIUM audit finding: the release workflow (contents:write +
id-token:write, PYPI_API_TOKEN exposed) ran several third-party actions
via mutable refs. A compromised upstream tag/branch could exfiltrate the
PyPI token or abuse write scopes.
Changes to .github/workflows/release.yml:
default contents:read; id-token:write only in the sign job;
contents:write only in the github-release job.
Changes to .github/workflows/ci.yml:
注: 本PRは監査所見のみを対象とした最小変更です。リポジトリに既存のCI/lint/未pin action等の指摘が残る場合がありますが、本PRの範囲外です。
🤖 Generated with Claude Code