MEDIUM: Webview proxy allows proxying to any container port without restriction #31
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#31
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 webview proxy endpoints (
/sessions/{id}/webview/{port}) allow proxying HTTP requests to ANY port inside a session container. There is no port whitelist or restriction, meaning any internal service is accessible via the proxy.Location
services/api/app/main.py:1476-1891— All proxy_webview_* endpointsCurrent Implementation
The
portparameter is an arbitrary integer — the API will proxy requests tolocalhost:{port}inside the container, regardless of what service is there. It simply does:Risk
Proposed Fix
Priority: Medium
Type: Security
GSD VERIFY phase failed after 3 attempts.
═══ Gate: verify-passed (devforge#31) ═══
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 19:43:13
[2m Duration [22m 715ms[2m (transform 508ms, setup 0ms, import 141ms, tests 12ms, 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-21T02:43:15Z
Class: test-failure
Evidence: Verification failed: 1 failures
Git tag: devforge#31-gate-verify-fail-01e7293e8dbd (use gate-retry after fixing)
GSD PLAN: response missing GATE: line.