T09 · Insecure Skill Coding Practices
- Location
scripts/server.cjs:162- Finding
Unauthenticated HTTP and WebSocket Access to the Visual Companion Server
- Content
View full analysis
{ const info = JSON.stringify({ type: 'server-started', port: Number(PORT), host: HOST, url_host: URL_HOST, url: 'http://' + URL_HOST + ':' + PORT, screen_dir: CONTENT_DIR, state_dir: STATE_DIR }); console.log(info); fs.writeFileSync(path.join(STATE_DIR, 'server-info'), info + '\n'); }); ``` The launcher explicitly permits binding the service to a non-loopback interface: ```bash BIND_HOST="127.0.0.1" URL_HOST="" while [[ $# -gt 0 ]]; do case "$1" in --host) BIND_HOST="$2" shift 2 ;; --url-host) URL_HOST="$2" shift 2 ;; ``` ```bash env BRAINSTORM_DIR="$SESSION_DIR" BRAINSTORM_HOST="$BIND_HOST" BRAINSTORM_URL_HOST="$URL_HOST" BRAINSTORM_OWNER_PID="$OWNER_PID" node server.cjs ``` ### Technical Analysis The visual companion can be bound to `0.0.0.0` or another network-accessible interface, but neith ...[truncated 2603 chars]- Remediation
View remediation
