ci: security-auto-fix ワークフロー追加(脆弱性自動修正PR)#40
Open
pi-kari wants to merge 1 commit into
Open
Conversation
pnpm audit --fix=override で transitive 依存の脆弱性を自動修正し PR を作成する。 - package.json も add 対象に含め、overrides 取りこぼし・lockfile 不整合を防止 - 変更検知をマニフェスト差分に限定し、lockfile 整形のみの空 PR を抑止 - git push -f を廃止し --force-with-lease --force-if-includes + 所有者ガード + concurrency に置換(人間のコミットを破棄しない安全な更新) Co-Authored-By: Claude Opus 4.8 (1M context) <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.
PR #39 のレビューで指摘した
security-auto-fix.ymlを本ブランチへ分離し、修正したうえで追加します。pnpm audit --fix=overrideが直せない transitive 依存の脆弱性を週次で自動修正し、PR を作成するワークフローです。レビュー指摘の反映
git addにpackage.jsonを含める。pnpm 11.2.2 のpnpm audit --helpどおり--fix=overrideは overrides をpackage.jsonに書くため、これを取りこぼすと lockfile とマニフェストが不整合(ERR_PNPM_LOCKFILE_CONFIG_MISMATCH)になる。3 点を退避→復元して確実にコミット。package.json/pnpm-workspace.yamlのマニフェスト差分に限定。pnpm install --no-frozen-lockfileの lockfile 整形だけで空 PR が量産されるのを防止。git push -fを廃止し--force-with-lease --force-if-includes+ ブランチ所有者ガード(先端が bot 以外なら中断)+concurrencyに置換。--force-if-includesを成立させるため、既存ブランチは一度origin/$BRANCHを checkout して reflog に remote tip を残してから main 内容に作り直す。検証
actionlint(埋め込み shellcheck 含む)パス済み。前提
🤖 Generated with Claude Code