T09 · Insecure Skill Coding Practices
- Location
auto_model_switch.js:149- Finding
Gateway bearer token may be transmitted over unencrypted HTTP
- Content
View full analysis
{ ``` The same credential is transmitted when changing the configured model: ```javascript const options = { method: 'POST', headers: { 'Authorization': `Bearer ${this.gatewayToken}`, 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(data) } }; const req = client.request(url, options, (res) => { ``` The documentation explicitly demonstrates `OPENCLAW_GATEWAY_URL="http://localhost:3000"`. While loopback traffic has less exposure than traffic crossing a network, the code does not enforce loopback-only use for HTTP. An operator can configure a remote or shared-network HTTP endpoint, causing the bearer token and gateway responses to travel without transport encryption. Bearer tokens are replayable credentials. HTTP provides no confidentiality or server authentication, so an on-path party may observe the token or impersonate the gateway. The implementation also does not issue a warning when a non-loopback HTTP URL is used. ### Attack Path 1. An operator follows the documented configuration pattern but sets `OPENCLAW_GATEWAY_URL` to an `http://` addr ...[truncated 1431 chars]- Remediation
View remediation
