fix(security): include webhook endpoint secrets in encryption key rotation
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 77/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- next.js, typescript
- 領域
- backend, documentation, security, testing
調査の方向性
Start with src/lib/crypto/rotation.ts and its tests; trace how the existing sealed tables are read, re-encrypted, and counted, then inspect webhookEndpointSecretAad in src/lib/data/webhook-endpoints.ts. Add coverage for rotating an endpoint secret and delivering with only the new key, and update the Key rotation section of docs/operations/deploy.md to list every sealed table. Done means the rotation counts and re-encrypts endpoint secrets and the documented table list is complete.
索引モデルが issue の本文から書いたものです。
説明
Context
Found by the Fable pre-production review on 2026-12-02 (main at cedc1914; every line reference below re-checked on main at cde5aa3b). Source: security and privacy readiness report, new issue 4.
npm run keys:rotate re-encrypts only two tables: sealedTables covers connection_credentials and notification_destination_secrets (src/lib/crypto/rotation.ts:43-111). Per-connection webhook endpoint secrets are sealed with the same key (sealSecret, src/lib/data/webhook-endpoints.ts:107-109) and are not rotated. An unreadable secret logs webhook_endpoint.secret_unreadable and returns null (webhook-endpoints.ts:209-212), which the webhook route answers with 404 (src/lib/webhooks/receive.ts:163-167). The procedure removes the old key once the script reports nothing remaining (docs/operations/deploy.md:294-300).
Impact: after a rotation and removal of the old key, every Polar, Resend, and GitLab per-connection delivery gets 404 and the script output shows nothing wrong; the timeline silently stops receiving those events until each connection's webhook is set up again. After a rotation prompted by a compromise, those secrets stay sealed under the compromised key.
Plan
- Add
webhook_endpointstosealedTables, with the same read, re-encrypt, and count steps as the other two, using its associated data (webhookEndpointSecretAad). - Count it in "remaining", so the script never reports done while an endpoint secret is under an old key.
- List every sealed table in
deploy.md"Key rotation".
Acceptance criteria
-
npm run keys:rotatere-encryptswebhook_endpointssecrets and counts them in "remaining". - A test rotates an endpoint secret, removes the old key, and verifies a delivery under the new key only.
-
deploy.md"Key rotation" lists every sealed table. - Playwright e2e: none needed, no screen changes.
Files and areas
src/lib/crypto/rotation.ts, its tests, docs/operations/deploy.md (Key rotation).
Non-goals: rotating other secrets, the incident runbook (separate issue).
Verification
npm run typecheck, npm run lint, npx vitest run src/lib/crypto src/lib/data.
Branch: <issue-number>-rotate-webhook-secrets
Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown
- 主要言語
- TypeScript
- スター
- 13
- フォーク
- 2
- 平均マージ
- 5時間 20分
- マージ済み PR(30日)
- 287
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eddiejaoude/StackDash のほかの issue
-
area: integrations documentation priority: P2 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
eddiejaoude/StackDash#798 ·
メンテナーはふだん 1 日以内に返信
-
area: ops documentation priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
eddiejaoude/StackDash#796 ·
メンテナーはふだん 1 日以内に返信
-
area: docs documentation impact: low priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
eddiejaoude/StackDash#790 ·
メンテナーはふだん 1 日以内に返信
-
area: ops bug impact: low priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
eddiejaoude/StackDash#785 ·
メンテナーはふだん 1 日以内に返信
-
area: connections enhancement impact: low priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
eddiejaoude/StackDash#768 ·
メンテナーはふだん 1 日以内に返信
eddiejaoude/StackDash の issue をすべて見る
似ている issue
-
bot:ai-assisted component:midnight-js status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
midnightntwrk/midnight-js#1790 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area:vscode bug has repro platform:macos platform:vscode regression
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDオープンcheck:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
effort/l priority/p1 risk/high triage/core
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
iflytek/skillhub#1188 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信