fix(docs): client-side nonce in SIWE example is insecure — add server-side nonce warning
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 58/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- javascript, typescript
調査の方向性
docs/mini-apps/quickstart/migrate-to-standard-web-app.mdx を開き、「Replace auth and identity」セクションとその SignIn.tsx の例を見つけます。既存の disclaimer を確認し、例の説明を更新して、クライアントで生成した nonce によるリプレイ攻撃対策上のリスクを明確に説明するか、サーバー発行 nonce パターンを読者に案内するようにします。警告が目立つ形で表示され、ドキュメントが正しくレンダリングされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
File: docs/mini-apps/quickstart/migrate-to-standard-web-app.mdx
Section: "Replace auth and identity" → SignIn.tsx code example
The example uses generateSiweNonce() on the client side:
const nonce = generateSiweNonce();
A client-generated nonce provides no replay protection. Any attacker who
intercepts a valid SIWE message+signature pair can reuse it, because the
server has no record of which nonces it issued.
Current behavior
The nonce is generated in the browser and never validated server-side.
The existing disclaimer is easy to miss and does not explain why the
current pattern is unsafe.
Expected behavior
Add a prominent warning block above the code example explaining that
client-side nonces offer no replay protection, OR replace the example
with a server-issued nonce pattern.
Impact
Developers following this migration guide verbatim will ship apps with
broken replay protection, exposing users to signature replay attacks.
References
- SIWE spec: https://eips.ethereum.org/EIPS/eip-4361
- Related fix merged in this repo: #1398
- 主要言語
- JavaScript
- スター
- 337
- フォーク
- 798
- 平均マージ
- 13時間 7分
- マージ済み PR(30日)
- 57
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
base/docs のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
antfu-collective/icones#398 ·
-
ECmail.com オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
wesbos/burner-email-providers#554 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
components-web-app/docs#92 ·