Back to skill

Security audit

MindStudio To API Custom Function Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is a documented generator for MindStudio API functions; its risks are normal API-integration risks plus weaker guidance around query-string API keys and broad activation, not hidden malicious behavior.

Before installing or using this skill, review every generated URL, header, request body, and output mapping before running it in MindStudio. Prefer header-based authentication when the API supports it, avoid sending personal or regulated data unless the destination service is approved, and treat query-string API keys as log-exposure risks that should use scoped, revocable credentials.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
EXAMPLES.md:134
Finding

API Credential Exposed Through URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: EXAMPLES.md:134-142
Additional Locations: README.md:96, SKILL.md:223
Vulnerability Type: API key disclosure through URL query parameters
Risk Level: Medium

Vulnerable Code

javascript
let query = "?token=" + apiKey;
if (symbol) query += "&symbol=" + encodeURIComponent(symbol);
if (isin)   query += "&isin="   + encodeURIComponent(isin);
if (cusip)  query += "&cusip="  + encodeURIComponent(cusip);

const url = "https://finnhub.io/api/v1/stock/profile2" + query;

try {
  const res = await fetch(url);

The same unsafe authentication pattern is also promoted as a supported general pattern:

javascript
"?token=" + apiKey

Technical Analysis

The generated example interpolates a secret API key directly into the request URL. Although the corresponding MindStudio configuration field is declared as a secret, that protection applies only while the value remains in configuration storage. Once inserted into a URL, the credential may be captured by infrastructure that records request URLs.

Potential exposure points include application diagnostics, proxy and gateway logs, observability platforms, exception reports, network monitoring systems, and provider-side access logs. TLS protects the URL while it is in transit but does not prevent either endpoint or authorized intermediaries from recording it.

The behavior is related to the Skill's declared API-integration functionality and does not represent an unrelated exfiltration channel. Nevertheless, teaching query-string authentication as a general pattern exceeds the safest minimum disclosure necessary when an API supports header-based authentication.

The flagged btoa(user + ":" + pass) pattern elsewhere in the documentation is conventional HTTP Basic authentication encoding. It is not evidence of covert encoding or an independent exfiltration vulnerability.

Attack Path

...[truncated 1259 chars]

Remediation
View remediation

Remediation Suggestions

  1. Prefer an authorization header whenever the target API supports one:

    javascript
    const res = await fetch("https://api.example.com/endpoint", {
      headers: {
        "Authorization": "Bearer " + apiKey
      }
    });
    
  2. Do not present query-string authentication as a general-purpose authentication pattern in README.md or SKILL.md. Document it only for APIs that explicitly require it.

  3. Where query authentication is unavoidable:

    • Display a clear warning that the URL contains a secret.
    • Use a dedicated, least-privileged API key.
    • Prefer short-lived or readily rotatable credentials.
    • Disable URL logging where possible.
    • Configure proxies, gateways, error trackers, and monitoring systems to redact sensitive query parameters such as token, key, api_key, and access_token.
    • Never include the complete request URL in ai.log(), exceptions, or diagnostic output.
  4. Add generation rules requiring header-based authentication by default and requiring explicit confirmation before generating query-parameter credentials.

  5. Update the Finnhub example to follow the provider's safest supported authentication mechanism. If Finnhub mandates a query token for that endpoint, preserve the required behavior but add provider-specific warnings and log-redaction guidance.

  6. Add a generated-code review check that detects secrets interpolated into URLs before presenting the final MindStudio function.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The examples instruct users to send workflow-provided queries and identifiers to third-party APIs but do not disclose that user data leaves the platform. In a skill explicitly designed to build external API integrations, this omission can cause accidental leakage of sensitive prompts, identifiers, or regulated data to external services without informed user consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · EXAMPLES.md (reported line 23)May include surrounding context.

md
ai.log("Sending research request to You.com...");

const url = "https://api.you.com/v1/research";
const res = await fetch(url, {
  method: "POST",
  headers: {

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The Finnhub example places the API key in the URL query string, which is more likely to be logged by intermediaries, proxies, browser history, observability tools, and server logs than an authorization header. The example also lacks any warning to users about this exposure, increasing the chance that credentials are handled unsafely or copied into less secure contexts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The README encourages generating ready-to-paste API integrations that will send API keys and user-supplied data to external services, but it does not instruct users to review generated endpoints, headers, payloads, or data flows before running them. In a skill that auto-builds API-calling code from pasted docs or descriptions, this omission increases the risk of accidental credential exposure, unintended third-party requests, or transmission of sensitive workflow data to the wrong destination.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
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.

Content

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

md
> "I want to connect the OpenAI chat completions endpoint to MindStudio"

> "Write me a MindStudio Run Function for Airtable — here are the docs: [url]"

> "Build a MindStudio function for Stripe to look up a customer by email"

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

Claude Code

bash
mkdir -p ~/.claude/skills/mindstudio-to-api-custom-function-builder
cp SKILL.md ~/.claude/skills/mindstudio-to-api-custom-function-builder/SKILL.md

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

Claude Code

bash
mkdir -p ~/.claude/skills/mindstudio-to-api-custom-function-builder
cp SKILL.md ~/.claude/skills/mindstudio-to-api-custom-function-builder/SKILL.md

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description says to use the skill whenever the user mentions MindStudio, wants to connect an API, asks for a Run Function, or says broad phrases like "write me a script for MindStudio," followed by "Always use this skill." This trigger scope is expansive and lacks exclusion conditions or negative examples, increasing the chance of unintended invocation for general MindStudio or scripting requests.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 63)May include surrounding context.

md
ai.log("Calling [API name]...");

// --- Request ---
const url = "https://api.example.com/endpoint";
const res = await fetch(url, {
  method: "POST",           // or GET, etc.
  headers: {

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 225)May include surrounding context.

md
ai.log("Calling [API name]...");

// --- Request ---
const url = "https://api.example.com/endpoint";
const res = await fetch(url, {
  method: "POST",           // or GET, etc.
  headers: {

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill gives contradictory instructions about workflow-variable inputs: earlier sections correctly say inputVariable values are resolved and should be read from ai.config.fieldName, but the later 'Common Mistakes to Avoid' says values set via a workflow variable should be read from ai.vars. This inconsistency can cause generated code to pull data from the wrong source, leading to broken behavior, accidental use of stale/global workflow state, or misrouting of sensitive data between steps.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger list contains broad phrases such as "MindStudio" and "Run Function" that can cause the skill to activate for general discussion rather than a clear user request to use this specific skill. This increases the chance of over-invocation, which can steer conversations unnecessarily, reduce user control, and create an attack surface for prompt-routing abuse if an adversary intentionally mentions these generic terms.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
EXAMPLES.md:14

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:52