T09 · Insecure Skill Coding Practices
- Location
scripts/fabric.mjs:164- Finding
Fabric API Key Can Be Exfiltrated Through a User-Controlled Base URL in the Node.js Helper
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Fabric API skill is mostly purpose-aligned, but its helpers can send the user's Fabric API key to untrusted URLs and the bundled API surface includes destructive workspace actions without strong guardrails.
Review this skill carefully before installing. It needs a Fabric API key and can make lasting changes to your Fabric workspace, including deletes through the exposed API. Do not use custom FABRIC_BASE or --base values unless you fully trust the endpoint, avoid --with-key for absolute URLs, and require explicit review before delete, recover, space, or bulk operations.
scripts/fabric.mjs:164Fabric API Key Can Be Exfiltrated Through a User-Controlled Base URL in the Node.js Helper
scripts/fabric.py:84Fabric API Key Can Be Exfiltrated Through a User-Controlled Base URL in the Python Helper
The skill clearly uses sensitive capabilities—environment access for FABRIC_API_KEY, file reads for local helper/spec files, and network access to the Fabric API—but does not declare permissions. Missing permission declarations reduce transparency and policy enforcement, making it easier for an agent or user to invoke a capability-rich skill without understanding its access scope.
The documented skill scope says it manages Fabric resources such as notepads, folders, bookmarks, files, and tags, but the OpenAPI also exposes space management and subscription/profile endpoints. This scope expansion can cause an agent or user to invoke account- or workspace-level actions they would not reasonably expect from the manifest description, increasing the risk of unintended data exposure or administrative changes.
The skill advertises management of specific content types, but it also exposes generic bulk resource delete and recover operations. Because these actions are broad and destructive, an agent may apply them to arbitrary resources beyond what the user intended, especially when the manifest does not prominently disclose this capability.
The --with-key option allows the Fabric API key to be attached to any attacker-controlled absolute URL, which can exfiltrate the secret via a normal HTTP request. In an agent skill context, this is especially dangerous because an LLM or downstream tool invocation could be induced to call an arbitrary URL and leak the credential without additional safeguards.
The skill is designed to create and modify remote Fabric resources, but it does not provide an explicit user-facing warning that actions may change persistent data in the user's workspace. Without a clear warning or confirmation requirement, an agent could perform destructive or unintended writes based on ambiguous prompts.
The bulk delete endpoint performs destructive operations and the specification provides no warning, confirmation guidance, or guardrails. In an agent setting, lack of explicit confirmation requirements materially increases the chance of accidental mass deletion from prompt misunderstanding, ambiguous user intent, or overbroad automation.
The space deletion endpoint is a clearly destructive workspace-level action, yet the API description does not include warnings or confirmation expectations. In an agent-integrated skill, this omission makes accidental deletion of an entire space more plausible and more damaging than ordinary content edits.
The skill explicitly supports writing to a user's Fabric workspace, which introduces session persistence and lasting side effects beyond the current interaction. Persistent remote-state changes are not inherently malicious, but they are risky when guardrails such as confirmation, change preview, or rollback guidance are absent.
# Fabric API (HTTP via Node/Python)
Use this skill when you need to **read or write content in a user's Fabric workspace** using the Fabric HTTP API (`https://api.fabric.so`).
This version avoids bash-only wrapper scripts. It ships **cross-platform** helpers:
Detected: suspicious.env_credential_access