Skip to content

security: patch runtime dependencies flagged since the last audit - #78

Merged
yufoxda merged 1 commit into
developfrom
claude/epic-wright-9zzc8u-deps
Nov 1, 2026
Merged

yufoxda merged 1 commit into
developfrom
claude/epic-wright-9zzc8u-deps

Conversation

@yufoxda

@yufoxda yufoxda commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

CI の npm audit --omit=dev --audit-level=high が、現在すべてのブランチで失敗しています(#77 で判明)。前回 CI が通った後に公開された脆弱性情報が原因です。develop と main は同じバージョンを使っているので、本番にも同じ脆弱性があります。

更新したもの

パッケージ 変更 深刻度 対象
better-auth 1.6.23 → 1.7.15 critical(OAuth Proxy / Magic Link 経由で他人としてサインインできる 等) community, frontend
next 16.3.4 → 16.4.3 critical(Image Optimization / use cache の認証不要 RCE 等) frontend
zod 4.4.3 → 4.6.7 high(巨大な入力の検証でメモリを使い切る) 全ワークスペース
sharp / source-map-js 0.35.5 / 1.2.2 high frontend
hono 4.13.5 → 4.13.16 moderate 全ワークスペース
  • next は package.json でバージョンを完全固定しているため、手で書き換えました。それ以外の変更は package-lock.json だけです
  • better-auth:脆弱性があるのは OAuth Proxy・Magic Link・Device 認証のプラグインですが、このリポジトリではどれも設定していません。悪用される可能性は低いものの、修正版が指定範囲内にあるため更新しました。minor 更新なので、better-auth が要求する DB スキーマを新旧で比べ、差分がないことを確認しました(getAuthTables の出力 30 カラムがすべて一致)

更新しなかったもの

  • drizzle-kit 経由の esbuild 系(moderate、community):修正するには --force で drizzle-kit 0.18.1 へダウングレードする必要があり、互換性を壊します。CI の基準(high 以上)にも達していないため、今回は対象外にしました

検証(手元で、CI と同じ手順)

audit (high) テスト 型チェック その他
member 0 件 21 件すべて成功 OK wrangler deploy --dry-run OK
community 0 件(moderate 4 件は上記) 39 件成功 / 1 件スキップ OK wrangler deploy --dry-run OK
frontend 0 件 25 件すべて成功 OK lint OK、opennextjs-cloudflare build OK

まだ確かめていないこと:next 16.4 と better-auth 1.7 を入れた状態で、実際にログインしてみる確認はしていません。マージ前に、ステージングかローカルでログインの流れを一度試すことを勧めます。


Generated by Claude Code

CI's `npm audit --omit=dev --audit-level=high` now fails on every branch:
advisories published after the last green run cover packages all three
workspaces ship.

- better-auth 1.6.23 -> 1.7.15 (critical: sign-in as another user via OAuth
  Proxy / Magic Link state). Neither plugin is configured here, but the fix
  is in range. The schema better-auth requires is unchanged between the two.
- next 16.3.4 -> 16.4.3 (critical: unauthenticated RCE in Image Optimization
  and `use cache`, among others). The pin is exact, so it is bumped by hand.
- zod 4.4.3 -> 4.6.7 (high), hono 4.13.5 -> 4.13.16 (moderate),
  sharp 0.35.4 -> 0.35.5 and source-map-js -> 1.2.2 (high, frontend).

Left alone: drizzle-kit's esbuild chain (moderate). Its only fix is a
downgrade to drizzle-kit 0.18.1 via --force, which is a breaking change and
below the CI threshold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vm1iXpgdwQfcWuyNzX9KF7
@yufoxda
yufoxda merged commit b61838f into develop Nov 1, 2026
3 checks passed
yufoxda added a commit that referenced this pull request Nov 1, 2026
Production runs main, which is 52 commits behind develop, so the dependency
fixes merged there (#75, bf6eb45, #78) have not reached it. Releasing develop
would ship unreleased work such as the role migrations, so this applies only
what closing the advisories needs, on main's own versions.

- next 16.2.10 -> 16.4.3 (critical: unauthenticated RCE in Image Optimization
  and `use cache`). Pinned exactly, as before.
- better-auth 1.6.23 -> 1.7.15 (critical: sign-in as another user). The
  schema it requires is unchanged between the two versions.
- zod -> 4.6.7 (high), hono -> 4.13.16 (moderate), plus transitive fixes.
- Same changes as develop's bf6eb45, already reviewed there:
  @opennextjs/cloudflare moves to devDependencies (only next.config.ts,
  open-next.config.ts and the build scripts use it), the postcss override
  moves from the vulnerable 8.5.13 to ^8.5.23, and sharp is pinned to
  ^0.35.3.

Left alone: drizzle-kit's esbuild chain in community (moderate, fix is a
breaking downgrade), as on develop.


Claude-Session: https://claude.ai/code/session_01Vm1iXpgdwQfcWuyNzX9KF7

Co-authored-by: Claude <noreply@anthropic.com>
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