Back to skill

Security audit

Datafast Analytics

Security checks for vulnerabilities and agentic risk

Overview

This is a real DataFast analytics helper, but it needs Review because it can delete goals and payments and gives incomplete credential-safety guidance.

Install only if you are comfortable giving the agent DataFast API access that may include visitor details and goal/payment mutations. Prefer a least-privilege or read-only key if DataFast supports it, store the key with owner-only permissions, understand it is sent over HTTPS to DataFast for API calls, and require explicit human approval before any delete operation, especially payment deletion or broad time ranges.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:27
Finding

API Key Stored Without Enforced Restrictive File Permissions

Content
View full analysis
~/.config/datafast/api_key ``` ### Technical Analysis The documented setup procedure writes a long-lived DataFast API key to a plaintext file without explicitly setting restrictive directory or file permissions. The effective permissions therefore depend on the user's current `umask` and any pre-existing permissions on `~/.config/datafast`. If the file is readable by another local account or an untrusted process running under a context that can access the user's files, the Bearer token can be recovered. The instructions subsequently use this token to authenticate requests to analytics, visitor, goal, and payment endpoints. The project does not contain executable code that independently creates this file; the exposure arises when a user follows the documented configuration procedure. ### Attack Path 1. A user follows the documented setup commands and creates `~/.config/datafast/api_key`. 2. The user's environment has a permissive `umask`, or the configuration directory already has insufficiently restrictive permissions. 3. A local attacker or untrusted process enumerates readable files under the user's configuration directory. 4. The attacker reads the DataFast API key from `~/.config/datafast/api_key`. 5. The attacker submits the stolen key in an `Authorization: Bearer` header to the DataFast API. 6. Subject to the permissions associated with the key, the attacker accesses analytics and visitor information or invokes goal and payment operations. ### Impact Assessment Successful exploitation exposes the privileges granted to the compromised DataFast API key. Potential scope includes unauthorized access to website analytics and visitor information ...[truncated 227 chars]
Remediation
View remediation
~/.config/datafast/api_key chmod 600 ~/.config/datafast/api_key ``` Additional hardening measures: 1. Avoid placing the literal secret in shell history; read it silently or obtain it from an environment variable populated by a trusted secret manager. 2. Prefer an operating-system credential store or dedicated secret-management service where supported. 3. Validate file ownership and permissions before reading the key, and refuse to use files writable or readable by unintended users. 4. Document API-key rotation and immediate revocation procedures. 5. Apply the corrected setup procedure consistently in both `SKILL.md` and `README.md`. ]]>

other

Note
Location
README.md:71
Finding

Misleading Claim That the API Key Never Leaves the User's Machine

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
84% confidence
Finding

Exposing a DELETE /goals capability in an agent skill creates a high-risk action surface because a model or user prompt could trigger deletion of analytics configuration or business logic state. The danger is elevated by the README's lack of mention of confirmations, authorization scoping, or parameter validation safeguards around destructive operations.

Content

Scanner excerpt · README.md (reported line 64)May include surrounding context.

md
- `GET /analytics/hostnames`
- `GET /visitors/{datafast_visitor_id}`
- `POST /goals`
- `DELETE /goals`
- `POST /payments`
- `DELETE /payments`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
87% confidence
Finding

A DELETE /payments operation is especially sensitive because it can affect financial records or revenue tracking, and an agent-mediated interface can make such actions easier to invoke accidentally or through prompt manipulation. Without documented safeguards, this capability presents substantial integrity and business-risk concerns.

Content

Scanner excerpt · README.md (reported line 66)May include surrounding context.

md
- `POST /goals`
- `DELETE /goals`
- `POST /payments`
- `DELETE /payments`

## Filters and Time Ranges

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill enables destructive DELETE /goals operations based on user-supplied filters and time ranges. Although it advises confirmation, it lacks stronger safety controls such as dry-run verification, immutable scoping rules, or prevention of overly broad parameter combinations, so an agent could still delete the wrong records through ambiguity or prompt manipulation.

Content

Scanner excerpt · SKILL.md (reported line 84)May include surrounding context.

md
### Goals
- Create goal: `POST /goals`
- Delete goals: `DELETE /goals` (requires at least one filter or time range; confirm scope)

### Payments
- Create payment: `POST /payments`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill exposes DELETE /payments, a destructive financial-data action, with only generic 'confirm scope' guidance. Because payment deletions can affect reporting, auditability, or financial integrity, weak parameter validation and confirmation create a substantial risk of accidental or manipulated destructive actions.

Content

Scanner excerpt · SKILL.md (reported line 88)May include surrounding context.

md
### Payments
- Create payment: `POST /payments`
- Delete payments: `DELETE /payments` (confirm scope)

## Destructive Actions

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

The same destructive-actions guidance applies to DELETE /payments and suffers from the same weakness: confirmation is advisory rather than enforced, and there is no robust guardrail against overly broad or attacker-influenced parameters. In a financial context this is particularly dangerous because data loss may be operationally significant and difficult to recover from.

Content

Scanner excerpt · SKILL.md (reported line 92)May include surrounding context.

md
## Destructive Actions

For `DELETE /goals` or `DELETE /payments`:
- Always confirm exact filters and time range in plain English before executing.
- If user asks for "all time" deletion, ask for explicit confirmation.
- Echo the final URL that will be called (without the API key).

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

The same destructive-actions guidance applies to DELETE /payments and suffers from the same weakness: confirmation is advisory rather than enforced, and there is no robust guardrail against overly broad or attacker-influenced parameters. In a financial context this is particularly dangerous because data loss may be operationally significant and difficult to recover from.

Content

Scanner excerpt · SKILL.md (reported line 92)May include surrounding context.

md
## Destructive Actions

For `DELETE /goals` or `DELETE /payments`:
- Always confirm exact filters and time range in plain English before executing.
- If user asks for "all time" deletion, ask for explicit confirmation.
- Echo the final URL that will be called (without the API key).

Session Persistence

Medium
Category
Rogue Agent
Confidence
71% confidence
Finding

Persisting a long-lived API key in a plaintext file under the user's home directory increases exposure if local filesystem permissions are weak, backups are shared, or other local processes can read the file. The README also does not instruct users to set restrictive permissions, which makes accidental credential leakage more likely.

Content

Scanner excerpt · README.md (reported line 25)May include surrounding context.

Store your API key in a config file:

bash
mkdir -p ~/.config/datafast
echo "df_your_api_key_here" > ~/.config/datafast/api_key

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README documents destructive endpoints for deleting goals and payments but does not warn users that the skill can perform irreversible or business-impacting mutations. In an agent setting, missing safety disclosure increases the chance of accidental destructive actions from ambiguous prompts or operator misunderstanding.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README makes a materially misleading security claim: although the key is stored locally, it must be transmitted to the remote DataFast service to authenticate API requests. This can cause users to underestimate exposure, mishandle trust assumptions, or disclose the key under the false belief it never leaves the host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill explicitly supports visitor-level analytics and GET /visitors/{datafast_visitor_id} but never warns that these requests may expose personal or sensitive behavioral data. In an agent setting, omission of a privacy caution increases the chance of over-collection, over-disclosure, or use without appropriate authorization, especially when summarizing or sharing results back to a user.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
87% confidence
Finding

The instructions persist the API key in ~/.config/datafast/api_key without any access-control guidance. On multi-user systems, backups, or agent-accessible environments, plaintext session persistence can expose reusable credentials and enable unauthorized API access.

Content

Scanner excerpt · SKILL.md (reported line 26)May include surrounding context.

  1. Get your API key from DataFast (starts with df_).
  2. Store it:
bash
mkdir -p ~/.config/datafast
echo "df_your_key_here" > ~/.config/datafast/api_key

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 35)May include surrounding context.

All requests need:

bash
DATAFAST_API_KEY=$(cat ~/.config/datafast/api_key)
curl ... \
  -H "Authorization: Bearer $DATAFAST_API_KEY" \
  -H "Content-Type: application/json"

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The setup/authentication guidance tells users to store an API key in a plaintext file and reuse it in shell commands, but it does not include any warning about protecting the credential, file permissions, or avoiding accidental disclosure in logs and transcripts. While common in examples, this omission weakens operational security and can lead to credential leakage if copied into insecure environments.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.