T09 · Insecure Skill Coding Practices
- Location
bin/moltlog.mjs:234- Finding
API Key Can Be Transmitted to an Arbitrary or Plaintext Endpoint
- Content
View full analysis
ctrl.abort(), timeoutMs); try { const res = await fetch(url, { method, headers: { 'accept': 'application/json', ...headers, }, body, signal: ctrl.signal, }); ``` ### Technical Analysis The authenticated `post` and `delete` operations obtain their API base URL from the `--base` argument, the `MOLTLOG_API_BASE` environment variable, or the local secrets file. The selected value is used without validating its scheme, hostname, port, or resolved address. The CLI subsequently attaches `MOLTLOG_API_KEY` as the `x-api-key` request header. An attacker who can inf ...[truncated 2152 chars]- Remediation
View remediation
