Security: Replace default hardcoded API key #1
Labels
No labels
blocked:gate-plan
blocked:gate-research
blocked:lint-failed
blocked:needs-attention
blocked:needs-decision
blocked:no-changes
blocked:no-procedure
blocked:verify-failed
bug
chore
feature-request
in-progress
needs-research
ops-task
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/devforge#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue
The application uses a hardcoded default API key (
devforge-dev-key) which is a significant security vulnerability.Location
services/api/app/config.py:94services/api/app/auth.py:7,17docker-compose.yml:37Risk
Proposed Solution
Acceptance Criteria
Priority: High
Type: Security
GSD VERIFY phase failed after 3 attempts.
═══ Gate: verify-passed (devforge#1) ═══
Mode: Tier 1 (functional only)
GATE OK: All gates up to 'implement' pass
── Tier 1: Functional ────────────────────────────────
Running tests...
❌ Tests failed (exit 1)
[41m[1m FAIL [22m[49m services/web/src/utils/terminalUtils.test.ts[2m > [22mterminalUtils[2m > [22mdecodeTerminalMessage[2m > [22mshould return empty Uint8Array for Blob input in sync decoder
[41m[1m FAIL [22m[49m services/web/src/utils/terminalUtils.test.ts[2m > [22mterminalUtils[2m > [22mdebug mode[2m > [22mshould return false when debug is not enabled
[41m[1m FAIL [22m[49m services/web/src/utils/terminalUtils.test.ts[2m > [22mterminalUtils[2m > [22mdebug mode[2m > [22mshould return true when debug is enabled
[41m[1m FAIL [22m[49m services/web/src/utils/terminalUtils.test.ts[2m > [22mterminalUtils[2m > [22mdebug mode[2m > [22mshould disable debug mode
[31m[1mReferenceError[22m: localStorage is not defined[39m
[36m [2m❯[22m services/web/src/utils/terminalUtils.test.ts:[2m12:5[22m[39m
[90m 10| [39m [34mbeforeEach[39m(() [33m=>[39m {
[90m 11| [39m vi[33m.[39m[34mrestoreAllMocks[39m()[33m;[39m
[90m 12| [39m localStorage[33m.[39m[34mclear[39m()[33m;[39m
[90m | [39m [31m^[39m
[90m 13| [39m })[33m;[39m
[90m 14| [39m
[31m[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/9]⎯[22m[39m
[2m Test Files [22m [1m[31m4 failed[39m[22m[2m | [22m[1m[32m1 passed[39m[22m[90m (5)[39m
[2m Tests [22m [1m[31m6 failed[39m[22m[2m | [22m[1m[32m4 passed[39m[22m[90m (10)[39m
[2m Start at [22m 02:54:09
[2m Duration [22m 642ms[2m (transform 481ms, setup 0ms, import 129ms, tests 9ms, environment 1ms)[22m
Running linter...
✅ Lint clean
⚠️ No type checker discovered
Previous test count: unknown
❌ GATE FAIL: verify-passed
- Tests failed with exit code 1
GATE FAIL: verify — blocked at 2026-05-21T09:54:11Z
Class: test-failure
Evidence: Verification failed: 1 failures
Git tag: devforge#1-gate-verify-fail-0d2f3edcf9f7 (use gate-retry after fixing)
Fixed: Removed all default fallback values for
DEVFORGE_API_KEY. Now fails closed — if the env var is not set, all API requests are rejected with 401.Changes:
auth.py:os.environ.get("DEVFORGE_API_KEY", "devforge-dev-key")→os.environ.get("DEVFORGE_API_KEY")withnot expectedcheckmain.py: Same treatment in websocket_terminal, ws_echo, _ws_auth_okorchestrator.py: Same, plus loud startup warningdocker-compose.yml: Removed both:-devforge-dev-keydefaultsAGENTS.md,README.md: Updated docs