Remove Hardcoded Default Admin Username in Node.js Environment Config
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- docker, node.js, typescript
- Área
- authentication, devops, security
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 125
- Forks
- 23
- Merge medio
- 2 d 13 h
- PR fusionados (30 d)
- 12
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de devarshishimpi/codra
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
devarshishimpi/codra#178 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
devarshishimpi/codra#176 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
devarshishimpi/codra#186 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
devarshishimpi/codra#185 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 58/100
devarshishimpi/codra#184 ·
Los mantenedores suelen responder en 1 día
Todos los issues de devarshishimpi/codra
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 83/100
gofish-graphics/gofish-graphics#1384 ·
Los mantenedores suelen responder en 1 día
-
adapter bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Olanetsoft/agent-lookout#353 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
vicharanashala/vibe#1542 ·
Los mantenedores suelen responder en 1 día
-
bug chore P2 size:XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
josephfung/curia#2666 ·
Los mantenedores suelen responder en 1 día
-
area: batch
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
inabagumi/shinju-date#7294 ·
Los mantenedores suelen responder en 1 día