Back to skill

Security audit

Ai Imggen2

Security checks for vulnerabilities and agentic risk

Overview

The skill appears intended for image generation, but it under-discloses where prompts and API keys are sent and exposes the API key through command-line arguments.

Review this skill carefully before installing. Use only non-sensitive prompts, prefer a limited or disposable API key, and be aware that the key and prompt are sent to api.heybossai.com even though the setup note references skillboss.co. The documented command can expose the API key through shell history, process listings, logs, or monitoring tools; rotate the key if it may have been captured.

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:14
Finding
API Credential Exposed Through Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:14` **Vulnerability Type**: Sensitive credential exposure through process arguments **Risk Level**: Medium ### Vulnerable Code ```bash node {baseDir}/scripts/generate.mjs "$SKILLBOSS_API_KEY" "A sunset over mountains" ``` ### Technical Analysis The documented invocation passes `SKILLBOSS_API_KEY` as a positional command-line argument. The script subsequently reads the credential from `process.argv`. Command-line arguments can be exposed through process inspection interfaces, local monitoring agents, diagnostic tooling, audit records, or execution logs. Whether another local user can read them depends on operating-system configuration, but passing secrets through process arguments unnecessarily expands credential exposure. This is not required for the declared image-generation functionality. The Skill already declares `SKILLBOSS_API_KEY` as a required environment variable, so the script can read it directly from `process.env` without copying it into the process argument list. ### Attack Path 1. A user invokes the Skill using the documented command. 2. The shell expands `$SKILLBOSS_API_KEY` and places its value in the Node process argument list. 3. An attacker or monitoring system with permission to inspect process metadata or execution records captures the command-line arguments while the process is running. 4. The attacker extracts the API key. 5. The attacker reuses the key against the associated API, subject to the permissions and limits assigned to that credential. ### Impact Assessment Successful exploitation discloses the API credential. The attacker could consume the associated image-generation service, incur account charges, exhaust quotas, or perform any other operation authorized by that key. This issue does not directly grant operating-system privileges. Its scope is limited to the permissions of the exposed API credential and any information available through the correspondin ...[truncated 24 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove the API key from the documented positional arguments. - Read the credential directly from the declared environment variable: ```js const apiKey = process.env.SKILLBOSS_API_KEY?.trim(); if (!apiKey) { console.error("Missing SKILLBOSS_API_KEY"); process.exit(1); } const prompt = process.argv[2]; ``` - Change the documented invocation to: ```bash node {baseDir}/scripts/generate.mjs "A sunset over mountains" ``` - Ensure command execution, telemetry, and error logging systems redact credential values. - Rotate any credential suspected of having been recorded in process telemetry or logs. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate.mjs:14
Finding
Credential and User Prompt Sent in Request Body to an Undisclosed Separately Branded Domain<![CDATA[ ## Vulnerability Details **File Location**: `scripts/generate.mjs:14-18` **Vulnerability Type**: Sensitive information transmitted to an insufficiently disclosed external endpoint **Risk Level**: Medium ### Vulnerable Code ```js const resp = await fetch("https://api.heybossai.com/v1/run", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ api_key: apiKey, model: "mm/img", inputs: { prompt: args[1] } }), }); ``` ### Technical Analysis The script sends both the API credential and the complete user prompt to `https://api.heybossai.com/v1/run`. However, `SKILL.md` tells users to obtain the credential from `https://www.skillboss.co` and does not disclose or explain the relationship between the two domains. Sending the prompt to an external service is functionally necessary for API-based image generation. Sending a credential is also normally necessary for authentication. The security concern is that the actual recipient is not clearly documented and the credential is placed inside the JSON request body. Request bodies are more likely than standard authentication headers to be captured by application debugging, reverse-proxy body logging, error telemetry, or request tracing. HTTPS protects the data in transit from ordinary network interception, but it does not protect it from the destination service or infrastructure that records decrypted requests. The prompt may also contain confidential information supplied by the user. The Skill provides no notice about the recipient's retention, logging, or privacy behavior. ### Attack Path 1. A user supplies an API key and an image prompt to the Skill. 2. The script constructs a JSON request containing the plaintext API key and complete prompt. 3. The request is transmitted over HTTPS to `api.heybossai.com`. 4. The destination application, reverse proxy, diagnostics platform, or another component with access to decrypted request bodies records or exposes the paylo ...[truncated 950 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Verify and document the ownership and operational relationship between `skillboss.co` and `heybossai.com`. - Clearly disclose in `SKILL.md` the exact external endpoint that receives credentials and prompts. - Prefer a single documented first-party API domain to reduce trust ambiguity. - Send the API key using a conventional authentication header rather than embedding it in the JSON body: ```js const resp = await fetch("https://api.example.com/v1/run", { method: "POST", headers: { "Authorization": `Bearer ${apiKey}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "mm/img", inputs: { prompt }, }), }); ``` - Configure application servers, proxies, observability systems, and error reporting tools to redact authorization headers and avoid recording prompt bodies. - Publish prompt retention, use, and deletion policies so users can make informed decisions before submitting sensitive content. - Apply narrowly scoped credentials, usage limits, expiration, and rotation procedures to reduce the impact of disclosure. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Lp1

High
Category
MCP Least Privilege
Confidence
94% confidence
Finding
This script performs outbound network access to a third-party API but the capability is not covered by declared permissions. In an agent/skill environment, undeclared network behavior is dangerous because it can exfiltrate user-supplied data and secrets without the platform or user having transparent permission visibility.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill instructs the user to pass an API key on the command line and to download a returned URL, but it does not warn about credential exposure or external network transfer. Command-line secrets can leak via shell history or process inspection, and blindly fetching a URL from script output can cause unintended data transfer to untrusted destinations.

External Transmission

Medium
Category
Data Exfiltration
Content
process.exit(1);
}

const resp = await fetch("https://api.heybossai.com/v1/run", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ api_key: apiKey, model: "mm/img", inputs: { prompt: args[1] } }),
Confidence
87% confidence
Finding
The script sends user input and a provided API key to an external service at api.heybossai.com. This is expected for an image-generation integration, but it is still a real security/privacy concern because sensitive prompts or credentials are transmitted off-platform to a third party.

External Transmission

Medium
Category
Data Exfiltration
Content
process.exit(1);
}

const resp = await fetch("https://api.heybossai.com/v1/run", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ api_key: apiKey, model: "mm/img", inputs: { prompt: args[1] } }),
Confidence
87% confidence
Finding
The script sends user input and a provided API key to an external service at api.heybossai.com. This is expected for an image-generation integration, but it is still a real security/privacy concern because sensitive prompts or credentials are transmitted off-platform to a third party.

Static analysis

No suspicious patterns detected.