packages/stats/core/drizzle.config.ts disables TLS certificate verification for the stats MySQL connection
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bun, mysql, typescript
調査の方向性
packages/stats/core/drizzle.config.ts と packages/stats/core/package.json の db:generate、db:push、db:studio スクリプトを読みます。stats データベースがどの CA を使用しているか確認し、検証を有効にして bun run --cwd packages/stats/core db:studio または db:generate を実行します。ツールがデータベース証明書を検証し、正常に接続できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
packages/stats/core/drizzle.config.ts sets rejectUnauthorized: false in its MySQL ssl options (lines 16-18). The db:generate, db:push and db:studio scripts in packages/stats/core/package.json use this config, so the connection to the stats database skips server certificate verification whenever those scripts run.
Why it matters
A connection that skips certificate verification will accept any certificate presented by the server. Someone positioned on the network path between the machine running these scripts and the database could impersonate the database, read or alter the traffic, and capture the database credentials that the config reads from SST resources. Real-world exposure depends on where these scripts run and how the database is reached, which is why this is a hardening request rather than a confirmed exploit.
Suggested change
- Remove
rejectUnauthorized: false, so verification is on by default. - If the database uses a private or self-signed CA, configure that CA explicitly (for example, a
cavalue read from a resource), rather than disabling verification.
How to check
Confirm that the stats database presents a certificate issued by a CA the tooling trusts, then run bun run --cwd packages/stats/core db:studio or db:generate with verification enabled.
Notes
- Found with static analysis; the connection was not exercised.
- No CI job invokes this config directly, as far as the repository shows.
- 主要言語
- TypeScript
- スター
- 221k
- フォーク
- 29.6k
- 平均マージ
- 5時間 32分
- マージ済み PR(30日)
- 492
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anomalyco/opencode#60174 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
anomalyco/opencode#60143 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode#60121 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
anomalyco/opencode#59973 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
triaging
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode#59942 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
anomalyco/opencode の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
better-auth/better-auth#12132 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hurttlocker/o8#5112 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
webrecorder/wabac.js#386 ·
-
needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
agent-of-empires/agent-of-empires#5098 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信