T09 · Insecure Skill Coding Practices
- Location
index.js:34- Finding
Configurable API Endpoint Can Expose Bearer Credentials and Monitoring Data
- Content
View full analysis
args[k] === undefined && delete args[k]); if (!CONFIG.apiKey) { throw new Error( "WATCHDOG_API_KEY is not configured. " + "Please configure it in the .env file of the skill or as an environment variable.", ); } const response = await fetch(CONFIG.apiUrl, { method: "POST", headers: { "Content-Type": "application/json", Accept: "application/json", Authorization: `Bearer ${CONFIG.apiKey}`, }, body: JSON.stringify({ jsonrpc: "2.0", id: `req_${Date.now()}`, method: "tools/call", params: { name: toolName, arguments: args }, }), }); ``` ### Technical Analysis `WATCHDOG_API_URL` controls the destination of every remote tool request. The value is accepted without HTTPS enforcement, hostname allowlisting, private-network address rejection, or explicit confirmation before credentials are transmitted. Each request sends `WATCHDOG_API_KEY` as a bearer token. Tool arguments can also contain sensitive infrastructure information, including monitored URLs, hostnames, monitor names, identifiers, and tracker-page configuration. Because the Skill documentation and embedded prompt allow the user-supplied API URL to be persisted and immediately tested with `list_monitors`, a malicious, compromised, or mistyped endpoint can receive the credential as soon as configuration is completed. An HTTP endpoint could additionally expose the credential to network interception. A local or private-network endpoint could cause ...[truncated 1258 chars]- Remediation
View remediation
