T09 · Insecure Skill Coding Practices
- Location
src/config.js:19- Finding
Bearer Tokens and Sensitive API Data Transmitted over Plaintext HTTP by Default
- Content
View full analysis
Vulnerability Details
File Location:
src/config.js:19; credential-bearing request flow insrc/client.js:51-75andcli.js:298-300
Vulnerability Type: Plaintext transmission of credentials and sensitive data
Risk Level: HighVulnerable Code
javascript // src/config.js:19 const DEFAULT_BASE_URL = 'http://st.aidata366.com';javascript // src/client.js:51-75 if (!_httpWarned && this.token && this.baseUrl.startsWith('http://')) { _httpWarned = true; process.stderr.write('[warn] Current service address uses plaintext HTTP; the token will be transmitted in plaintext...\n'); } res = await fetch(this.baseUrl + '/api/v1' + apiPath, { method, headers: { ...(body ? { 'Content-Type': 'application/json' } : {}), ...(this.token ? { Authorization: `Bearer ${this.token}` } : {}), ...headers, }, body: body ? JSON.stringify(body) : undefined, signal: ctrl.signal, });javascript // cli.js:298-300 const res = await fetch( `${cfg.baseUrl}/api/v1/platform/exports/${encodeURIComponent(info.export_id)}/file`, { headers: { Authorization: `Bearer ${cfg.token}` }, signal: dlCtrl.signal } );Technical Analysis
The built-in service endpoint uses
http://, while authenticated API calls attach a bearer token in theAuthorizationheader. Export downloads likewise send the token to the configured endpoint. The application only writes a warning to standard error; it does not block credential-bearing requests over plaintext HTTP.Because HTTP provides neither confidentiality nor integrity, a network-path attacker can observe the bearer token or modify requests and responses. This affects authenticated commands such as task submission, task queries, quota queries, logout, and export. Login and registration session exchanges also use the default plaintext service endpoint.
The behavior is explicitly disclosed in
SKILL.md:55-62, which confirms reachability but does not mitigate it. There is no evidence that ...[truncated 1343 chars]- Remediation
View remediation
Remediation Suggestions
- Provision a valid TLS certificate for the service and change the built-in endpoint to an
https://URL. - Reject credential-bearing requests over plaintext HTTP instead of merely displaying a warning.
- If development compatibility is required, permit HTTP only through an explicit opt-in restricted to loopback or other tightly controlled endpoints.
- Apply the same transport-policy check to the direct export download path in
cli.js, not only requests made throughApiClient. - Avoid disabling TLS certificate validation in production. Replace self-signed or hostname-mismatched certificates with a valid certificate chain.
- Rotate bearer tokens that have previously been transmitted over plaintext networks and consider short token lifetimes and revocation support.
- Provision a valid TLS certificate for the service and change the built-in endpoint to an
