Back to skill

Security audit

Windsor.ai Analytics

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:199
Finding
Unsafe Bulk Import of Environment Variables<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:199` **Vulnerability Type**: Unsafe shell-based environment-file parsing and excessive secret propagation **Risk Level**: Medium ### Vulnerable Code ```bash export $(grep -v '^#' ~/.clawdbot/.env | xargs) && npx mcporter list ``` ### Technical Analysis The troubleshooting command parses the entire `~/.clawdbot/.env` file using `grep`, `xargs`, shell expansion, and word splitting. This is not a reliable `.env` parser and does not limit access to the single variable required by the Skill, `WINDSOR_API_KEY`. Values containing spaces, quotes, wildcard characters, malformed assignments, or option-like tokens may be transformed unexpectedly. More importantly, every assignment in the file is exported to `mcporter`, including unrelated credentials or configuration values. Any process executed by `npx` or `mcporter` inherits those variables. This exceeds least privilege because the declared functionality requires only `WINDSOR_API_KEY`, not every secret stored in the Clawdbot environment file. ### Attack Path 1. Another application, tool, or attacker with write access adds malicious or sensitive entries to `~/.clawdbot/.env`. 2. The user follows the documented troubleshooting instruction. 3. `grep` and `xargs` transform the file contents into shell words without applying proper `.env` parsing rules. 4. The shell exports all resulting assignments, not only `WINDSOR_API_KEY`. 5. `npx` starts `mcporter` with the expanded environment. 6. A compromised, replaced, or vulnerable dependency can read unrelated inherited credentials or use attacker-controlled environment configuration. This command does not, by itself, cause shell syntax embedded in the file to be recursively evaluated as arbitrary commands. The primary risks are unsafe parsing, unintended variable alteration, and unnecessary propagation of secrets. ### Impact Assessment The issue operates with the privileges of the user running the comma ...[truncated 502 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Remove the bulk-export command and load only the required variable with a parser that understands the environment-file format. Recommended hardening measures: 1. Prefer a system keychain or dedicated secrets manager. 2. If a file must be used, create it with restrictive permissions before writing: ```bash mkdir -p ~/.clawdbot touch ~/.clawdbot/.env chmod 600 ~/.clawdbot/.env ``` 3. Retrieve only `WINDSOR_API_KEY`, validate that it is non-empty, and pass only that variable to the process. 4. Do not use `export $(...)`, `xargs`, or equivalent shell word splitting to parse `.env` files. 5. Avoid inheriting unrelated environment secrets when launching third-party tools. 6. Use a trusted environment-file library or the platform's native secrets integration if automated loading is required. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:77
Finding
Unpinned Package Execution Through npx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:77` **Additional Occurrences**: `SKILL.md:198-199` **Vulnerability Type**: Execution of an unpinned third-party package **Risk Level**: Medium ### Vulnerable Code Primary occurrence: ```bash npx mcporter list ``` Troubleshooting occurrences: ```bash export WINDSOR_API_KEY=your_api_key_here && npx mcporter list ``` ```bash export $(grep -v '^#' ~/.clawdbot/.env | xargs) && npx mcporter list ``` ### Technical Analysis The documentation invokes `mcporter` through `npx` without specifying a reviewed version, lockfile, integrity value, or local-installation requirement. Depending on the local environment and `npx` behavior, the package may be resolved and downloaded from a configured package registry when no local binary is available. This creates supply-chain risk because the code executed by the instruction can change after the Skill itself has been reviewed. A compromised package release, registry account, registry configuration, or dependency could execute arbitrary code under the user's account. The package name is consistent with the Skill metadata, and the audited content contains no evidence of deliberate dependency confusion or typosquatting. The finding concerns the unsafe, mutable execution method rather than a confirmed malicious package. ### Attack Path 1. The user follows the verification or troubleshooting instructions. 2. No trusted local `mcporter` binary is installed, or package resolution selects registry content. 3. `npx` resolves an unpinned version from the configured package source. 4. A compromised or unexpectedly changed package version is downloaded and executed. 5. The package runs with the invoking user's permissions. 6. During the troubleshooting variants, the process also inherits `WINDSOR_API_KEY`; in the line 199 variant, it may inherit every exported value from `~/.clawdbot/.env`. 7. Malicious dependency code can read accessible files, steal inherited cred ...[truncated 691 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Add `mcporter` as a reviewed project dependency with an exact or tightly constrained version. 2. Commit and enforce a lockfile containing package integrity metadata. 3. Install dependencies from a trusted, explicitly configured registry. 4. Invoke only the locally installed binary. For example: ```bash npx --no-install mcporter list ``` 5. Verify the installed package version and provenance before use. 6. Use automated dependency scanning and update dependencies through a controlled review process. 7. Pass only `WINDSOR_API_KEY` to the process rather than exporting the complete contents of an environment file. 8. Avoid running package installation or verification commands with elevated privileges. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (10)

Credential Access

High
Category
Privilege Escalation
Content
Add your API key to the clawdbot environment file:

```bash
echo 'WINDSOR_API_KEY=your_api_key_here' >> ~/.clawdbot/.env
```

Replace `your_api_key_here` with the key you copied.
Confidence
78% confidence
Finding
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.

Credential Access

High
Category
Privilege Escalation
Content
**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
Confidence
90% confidence
Finding
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.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
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.

Vague Triggers

Medium
Confidence
92% confidence
Finding
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.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
> **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
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Session Persistence

Medium
Category
Rogue Agent
Content
### Step 3: Configure mcporter

Add Windsor.ai to your mcporter configuration. Open or create `config/mcporter.json` in your project and add the following inside the `mcpServers` object:

```json
{
Confidence
60% confidence
Finding
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.

Rp1

Medium
Category
MCP Rug Pull
Confidence
80% confidence
Finding
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.

Rp1

Medium
Category
MCP Rug Pull
Confidence
80% confidence
Finding
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.

Rp1

Medium
Category
MCP Rug Pull
Confidence
80% confidence
Finding
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.

Rp1

Medium
Category
MCP Rug Pull
Confidence
80% confidence
Finding
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.

Static analysis

No suspicious patterns detected.