T09 · Insecure Skill Coding Practices
- Location
SKILL.md:199- Finding
Unsafe Bulk Import of Environment Variables
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its stated Windsor.ai analytics purpose, but it needs Review because its setup runs an unpinned package and includes a troubleshooting command that can expose more local secrets than necessary.
Install only if you are comfortable connecting Windsor.ai business data to an external MCP service. Prefer a keychain or secrets manager, avoid the bulk `.env` export command, and use a pinned or locally reviewed `mcporter` binary rather than unpinned `npx` commands.
SKILL.md:199Unsafe Bulk Import of Environment Variables
SKILL.md:77Unpinned Package Execution Through npx
The skill instructs users to place the API key into a plaintext ~/.clawdbot/.env file via shell redirection. Although common, this creates a durable local secret exposure path through filesystem access, backups, shell history practices, and accidental disclosure from developer tooling.
Add your API key to the clawdbot environment file:
echo 'WINDSOR_API_KEY=your_api_key_here' >> ~/.clawdbot/.env
Replace your_api_key_here with the key you copied.
The troubleshooting command export $(grep -v '^#' ~/.clawdbot/.env | xargs) && npx mcporter list loads secrets from a plaintext file and immediately exposes them to a newly executed process. This pattern is brittle, may mis-handle values, and increases the risk that credentials are available to unintended code, especially because the invoked package is not version-pinned.
**Failed to resolve header 'Authorization' / WINDSOR_API_KEY must be set:**
- mcporter requires the variable to be exported in your shell, not just stored in `.env`
- Run: `export WINDSOR_API_KEY=your_api_key_here && npx mcporter list`
- To load from your `.env` file: `export $(grep -v '^#' ~/.clawdbot/.env | xargs) && npx mcporter list`
**No data sources found:**
- You must connect at least one data source in your Windsor.ai dashboard before querying
The skill description emphasizes capabilities but does not clearly disclose that user prompts and business-data queries are sent to an external Windsor.ai MCP endpoint. This can lead to unintended third-party disclosure of sensitive commercial, CRM, or analytics information.
The trigger scope is broad enough to auto-invoke the skill for many generic analytics, advertising, or CRM questions. That increases the chance of unnecessary routing of sensitive business prompts and metadata to the external Windsor.ai service when a local answer or clarification would have sufficed.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
> **Note:** mcporter requires `WINDSOR_API_KEY` to be exported as a shell environment variable. Simply storing it in `~/.clawdbot/.env` is not enough — it must be available in your active shell session.
>
> **Security note:** Avoid appending the key to `~/.zshrc` or other shell rc files, as this stores your secret in plaintext and loads it into every shell session. Prefer your system keychain, a secrets manager, or a `.env` file with restricted permissions (`chmod 600 ~/.clawdbot/.env`). If you do add it to your shell rc file, remove it once no longer needed.
### Step 3: Configure mcporter
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Add Windsor.ai to your mcporter configuration. Open or create config/mcporter.json in your project and add the following inside the mcpServers object:
{
The skill instructs users to run npx mcporter without pinning an exact package version. Because npx may fetch the latest package at execution time, a compromised or unexpectedly changed upstream release could execute unreviewed code in the user's environment.
This troubleshooting command again uses unpinned npx mcporter, which preserves supply-chain risk during incident handling. Users often paste troubleshooting commands directly, so fetching the latest package at runtime can lead to execution of unintended code.
The command combining environment export with npx mcporter list still executes an unpinned package, adding supply-chain risk in a context where secrets are present in the shell environment. If a malicious package version were fetched, it could access the exported API key.
This is another reference to npx mcporter without version pinning, creating the same dependency confusion or malicious-update risk. Repetition across the document increases the chance that users will run at least one unsafe variant.
No suspicious patterns detected.