Repository navigation
ci: fail on known vulnerabilities with pnpm audit - #30
Merged
Merged
Conversation
knip pulls zod ^4.6.5; 4.6.5 is affected by a high-severity memory exhaustion advisory. Refresh the lockfile within knip's range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run pnpm audit in the audit job and in the local check script. Keep the default threshold (any severity) and include dev dependencies, since the toolchain runs on developer machines and CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
furedea
approved these changes
Nov 2, 2026
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.
CI の
auditジョブにpnpm auditを追加し,既知の脆弱性がある依存で CI を失敗させます.追加時点で検出された
zod@4.6.5(knip 経由,high)は lockfile 更新で解消しています.判断ポイント:しきい値は全 severity,dev 依存も対象にしています(理由は下記).
auditジョブpnpm run knipのみ(未使用ファイル・依存の検出)knipに加えてpnpm auditを実行pnpm run checkpnpm auditを追加zod(knip の依存)4.6.5(GHSA-mrhx-c7xc-m3w5 該当)4.6.7検証
pnpm auditが exit 1(high 1 件:GHSA-mrhx-c7xc-m3w5)になり,CI を失敗させられることを確認zodを knip の範囲^4.6.5内で4.6.7に更新後,pnpm auditがNo known vulnerabilities foundpnpm run check(format:check,lint,typecheck,test,knip,audit)がローカルで全て成功Run pnpm auditステップを含む)全ジョブ成功設計判断と根拠
pnpm auditを採用し,追加依存はありません.osv-scanner も検討しましたが,別バイナリと action の導入・pin 管理が増える一方,npm エコシステム単体のテンプレートでは GitHub Advisory Database を参照するpnpm auditで十分と判断しました.pnpm auditis no longer working (ERR_PNPM_AUDIT_BAD_RESPONSE) pnpm/pnpm#13033 は 10.32.1 で 410 を報告).新しい/-/npm/v1/security/advisories/bulkへの移行は fix: adapt audit client to npmjs /advisories/bulk endpoint pnpm/pnpm#11268(マージコミットff28085)で入っており,固定中のpnpm@11.28.6がそのコミットを含むことを compare API で確認しました.ローカルの 11.28.6 でも正常に応答したため,pin の更新は不要です.--audit-levelは既定(low 以上 = 全 severity)のままです.緩める具体的な理由がなく,例外は既存のpnpm-workspace.yamlのauditConfig.ignoreCvesで個別に除外できます.--prodは付けず dev 依存も対象にしています.このテンプレートの依存は全て devDependencies で,ツールチェーンは開発者のマシンと CI 上で実行されるためです.🤖 Generated with Claude Code