Remove Hardcoded Default Admin Username in Node.js Environment Config
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
- 領域
- authentication, devops, security
調査の方向性
Start with apps/node/src/env.ts and trace how environment variables are validated and consumed at startup. Check .env.test.example, .dev.vars.example, and the Node/Docker self-hosting documentation for the required variable. Done means a missing or blank value produces the stated actionable error and the examples and documentation explain how to set it; run the listed typecheck, tests, and lint commands.
索引モデルが issue の本文から書いたものです。
説明
Summary
When running Codra in Node.js / Docker mode without explicitly setting DASHBOARD_ALLOWED_USERS, the application defaults to granting dashboard admin access to a hardcoded GitHub username (devarshishimpi). Self-hosting operators who do not set this variable are locked out of their own dashboard while an unintended user may have access.
Affected File
apps/node/src/env.ts lines 59-60:
DASHBOARD_ALLOWED_USERS:
process.env.DASHBOARD_ALLOWED_USERS || "devarshishimpi",
Impact
- A self-hoster who follows the quickstart (
docker run -p 3000:3000 devarshishimpi/codra) without reading.env.exampleconfigures an instance that only allowsdevarshishimpito log in. - The self-hoster cannot access their own dashboard.
- If someone follows the Docker quickstart exactly as documented, they get a broken, inaccessible dashboard with no error message explaining why.
Proposed Fix
Replace the silent default with an explicit startup error:
const allowedUsers = process.env.DASHBOARD_ALLOWED_USERS;
if (!allowedUsers || allowedUsers.trim() === "") {
throw new Error(
"Missing required environment variable: DASHBOARD_ALLOWED_USERS\n" +
"Set it to a comma-separated list of GitHub usernames that are allowed to access the dashboard.\n" +
"Example: DASHBOARD_ALLOWED_USERS=your-github-username"
);
}
DASHBOARD_ALLOWED_USERS: allowedUsers,
Additionally:
- Update
.env.test.exampleand.dev.vars.exampleto include a clear placeholder forDASHBOARD_ALLOWED_USERS - Update the Node/Docker setup documentation to call out this variable as required
Done When
- Starting the Node server without
DASHBOARD_ALLOWED_USERSset throws a clear, actionable startup error -
.env.test.exampleand.dev.vars.exampleinclude a documented placeholder for this variable - The self-hosting documentation explains this variable is required
-
npm run typecheck,npm test, andnpm run lintall pass
- 主要言語
- TypeScript
- スター
- 125
- フォーク
- 23
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
devarshishimpi/codra のほかの issue
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
devarshishimpi/codra#178 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
devarshishimpi/codra#176 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
devarshishimpi/codra#186 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
devarshishimpi/codra#185 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
devarshishimpi/codra#184 ·
メンテナーはふだん 1 日以内に返信
devarshishimpi/codra の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 83/100
gofish-graphics/gofish-graphics#1384 ·
メンテナーはふだん 1 日以内に返信
-
adapter bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
Olanetsoft/agent-lookout#353 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
vicharanashala/vibe#1542 ·
メンテナーはふだん 1 日以内に返信
-
bug chore P2 size:XS
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
josephfung/curia#2666 ·
メンテナーはふだん 1 日以内に返信
-
area: batch
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
inabagumi/shinju-date#7294 ·
メンテナーはふだん 1 日以内に返信