-
Notifications
You must be signed in to change notification settings - Fork 0
π‘οΈ Sentinel: [CRITICAL] Fix hardcoded admin password #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,9 @@ | ||||||
| ## 2025-06-06 - [CRITICAL] Fix hardcoded admin password | ||||||
| **Vulnerability:** A hardcoded admin password (`og9oRajx7h88v1RIj3eDgdrh9jgLYVV3`) was present in `packages/web/src/lib/server/admin-auth.ts`, exposing the admin credentials in the source code. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. λ¬Έμμ μ€μ λΉλ°λ²νΈ λ¬Έμμ΄μ λ€μ λ¨κΈ°λ©΄ μ λ©λλ€. Line 2μ μ€μ κ΄λ¦¬μ λΉλ°λ²νΈκ° κ·Έλλ‘ κΈ°λ‘λμ΄ μμ΄ μ μ₯μ λ΄ λΉλ° λ ΈμΆμ΄ μ§μλ©λλ€. μ¦μ λ§μ€νΉνκ³ (νμ μ) ν΄λΉ μ격μ¦λͺ νμ μ¬λΆλ₯Ό ν¨κ» κΈ°λ‘νμΈμ. π§ μ μ ν¨μΉ-**Vulnerability:** A hardcoded admin password (`og9oRajx7h88v1RIj3eDgdrh9jgLYVV3`) was present in `packages/web/src/lib/server/admin-auth.ts`, exposing the admin credentials in the source code.
+**Vulnerability:** A hardcoded admin password (`<redacted>`) was present in `packages/web/src/lib/server/admin-auth.ts`, exposing admin credentials in source code.π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||
| **Learning:** Hardcoded credentials can easily be checked into version control and compromise security. They should be loaded via environment variables and validated at runtime using tools like `zod`. | ||||||
| **Prevention:** Use environment variables for all secrets, ensure they are validated by the configuration loader (e.g. `env.ts`), and maintain proper `.env.example` templates and CI placeholder values so developers and automation understand the requirements. | ||||||
|
|
||||||
| ## 2025-06-06 - [CRITICAL] Fix CodeQL Insecure Password Hashing Alert | ||||||
| **Vulnerability:** `verifyAdminCredentials` used `createHmac` to verify passwords via `safeEqual`, which triggered a CodeQL alert for insecure password hashing (js/insecure-password-hashing). Custom 'homebrew' buffer-padding or direct HMAC was vulnerable to timing attacks. | ||||||
| **Learning:** When fixing CodeQL alerts for insecure password hashing, standard HMAC-based comparisons should not be used for direct password validation. Instead, use an established cryptographic method like pbkdf2. To prevent blocking the Node.js event loop during API requests, use the asynchronous `crypto.pbkdf2` via `util.promisify`. For target hash, use `pbkdf2Sync` pre-computed at module initialization. | ||||||
| **Prevention:** Rely on established cryptographic methods like pbkdf2 and ensure they are executed asynchronously in route handlers to avoid Denial of Service vulnerabilities. | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ¬κ±΄ λ μ§λ₯Ό PR νμλΌμΈκ³Ό μΌμΉμν€μΈμ.
Line 1μ λ μ§(
2025-06-06)κ° PR μμ±μΌ(2026-06-06)κ³Ό λΆμΌμΉν©λλ€. 보μ μ΄λ ₯ μΆμ μ νλλ₯Ό μν΄ λ μ§λ₯Ό μ μ νλ κ²μ΄ μ’μ΅λλ€.π€ Prompt for AI Agents