Back to skill

Security audit

01 Tomato Ip Parse

Security checks for vulnerabilities and agentic risk

Overview

This skill performs its core novel-analysis task, but it sends full user text and an API key to a configurable external endpoint and falsely reports every compliance check as safe.

Review this skill carefully before installing. Only use it with non-sensitive novel text or with a trusted HTTPS API endpoint that you control, and do not rely on its compliance_check result because the inspected code always marks content as safe.

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

Error
Location
skill.js:22
Finding
Unrestricted API endpoint receives user content and bearer credentials<![CDATA[ ## Vulnerability Details **File Location**: `skill.js`, lines 22–32 **Vulnerability Type**: Unrestricted outbound transmission of sensitive data and credentials **Risk Level**: High ### Vulnerable Code ```javascript const res = await fetch(`${API_BASE}/chat/completions`, { method: "POST", headers: { "Authorization": "Bearer " + API_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ model: MODEL_NAME, messages: [{ role: "user", content: prompt }] }) }); ``` ### Technical Analysis The Skill sends an outbound request to a URL derived directly from the environment-controlled `API_BASE` value. It does not validate the URL scheme, destination hostname, port, resolved IP address, or whether the endpoint belongs to an approved model provider. The request contains two sensitive elements: 1. The `Authorization` header carries `API_KEY` as a bearer credential. 2. The request body carries `prompt`, which incorporates the user-provided novel title, full novel text, and style tag. A remote model call is consistent with the declared functionality, but allowing an arbitrary destination exceeds the minimum privileges required. The Skill only needs access to a specific trusted model provider, not unrestricted network destinations. If `API_BASE` is maliciously configured or accidentally points to an untrusted service, both the submitted content and bearer credential are disclosed. Because non-HTTPS schemes are not rejected, the current implementation may also send the credential and content without transport encryption. Depending on the execution environment and network controls, an unrestricted destination may additionally enable server-side requests to internal or loopback services. ### Attack Path 1. An attacker gains control over the Skill's `API_BASE` configuration, or convinces an operator to use an attacker-controlled endpoint. 2. The attacker sets `API_BASE` to a server they operate, a plaintext HTTP endpoint, o ...[truncated 1279 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace arbitrary endpoint support with an explicit allowlist of trusted HTTPS origins. 2. Parse `API_BASE` with the standard `URL` API and reject: - Any scheme other than HTTPS. - URLs containing embedded credentials. - Unexpected ports. - Loopback, link-local, private, multicast, and otherwise reserved IP destinations. - Hostnames or resolved addresses outside the approved provider list. 3. Pin the expected API path instead of allowing configuration to influence the entire destination. 4. Disable redirects, or validate every redirect target before following it. 5. Use a provider-scoped API key with the minimum required permissions, strict spending limits, and routine rotation. 6. Keep model credentials isolated per environment and per Skill where possible. 7. Clearly disclose that the title and full novel text are transmitted to an external model provider. 8. Apply request timeouts, response-size limits, and controlled error handling. 9. Avoid logging authorization headers, complete prompts, or raw model responses. 10. If arbitrary providers must be supported, require explicit administrative approval and enforce equivalent destination and TLS validation for each configured provider. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
skill.js:37
Finding
Compliance check always reports submitted content as safe<![CDATA[ ## Vulnerability Details **File Location**: `skill.js`, lines 37–40 **Vulnerability Type**: Hard-coded security decision and moderation bypass **Risk Level**: High ### Vulnerable Code ```javascript return { ip_info, compliance_check: { is_safe: true, risk_words: [] } }; ``` ### Technical Analysis The Skill's documentation and manifest claim that it performs an automatic content-compliance check. However, the returned `compliance_check` object is constant and is not derived from the submitted content, a moderation service, a validated model result, or any local policy evaluation. Every invocation therefore returns: - `is_safe: true` - An empty `risk_words` array This creates a fail-open security control. Any downstream workflow that trusts the declared compliance result can treat prohibited or risky content as approved. The IP extraction response does not include a compliance result, and the code does not inspect the input or generated output for policy violations. This is particularly hazardous because the result has the shape of a genuine moderation decision, making it difficult for downstream callers to distinguish an actual assessment from a placeholder value. ### Attack Path 1. An attacker submits content that violates the policy expected by a downstream publishing, adaptation, or generation workflow. 2. The Skill sends the content for IP extraction but performs no moderation or compliance analysis. 3. The Skill unconditionally returns `compliance_check.is_safe` as `true`. 4. A downstream component trusts this field as the advertised compliance-screening result. 5. The prohibited content proceeds to later processing, publication, generation, or review stages without the intended intervention. No special system access is required to exploit this issue; the attacker only needs permission to submit ordinary Skill input. ### Impact Assessment The issue can completely bypass the compliance control represented by this Skill. Potential c ...[truncated 575 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Implement a real compliance evaluation based on a documented policy. 2. Use either: - A dedicated moderation endpoint; - Deterministic local policy checks; or - A separately validated structured model response with appropriate safeguards. 3. Derive `is_safe` and `risk_words` from actual analysis rather than constant values. 4. Fail closed when moderation cannot be completed. Return an explicit `unknown`, `error`, or `requires_review` state instead of reporting the content as safe. 5. Define and validate a strict schema for the moderation response. 6. Include relevant categories, evidence, confidence, and policy version where appropriate. 7. Treat model output as untrusted and validate all fields before using them as security decisions. 8. Add tests covering prohibited content, ambiguous content, malformed model responses, network failures, and moderation-service failures. 9. If compliance screening is outside the intended scope, remove the compliance claims from `SKILL.md` and `manifest.json`, and remove the misleading output field. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The entire skill description is written only in Chinese and presents the skill as Chinese-language specific without any opt-in, alternative locale, or statement that users may choose another language. Per the policy, forcing a specific language or locale without user choice is a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The manifest description is entirely in Chinese and describes the skill's behavior only in that language, which indicates a language-specific constraint without offering the user a language choice or documenting that the skill is intentionally region-specific. Under the policy, language or locale restrictions should be opt-in or clearly justified.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The embedded prompt is entirely in Chinese and instructs the model using Chinese-only output labels, effectively imposing a specific language/locale behavior. There is no opt-in, fallback, or documented justification that this skill is intentionally limited to Chinese-language operation.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill transmits the full `novel_text` and title to an external chat completion API, which can expose proprietary, copyrighted, personal, or otherwise sensitive user content to a third party. In this skill, the transmission is functionally necessary for the feature, but there is no minimization, consent flow, or disclosure, so the data exposure risk is real rather than theoretical.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The code sends full novel content to an external service without any user-facing warning, disclosure, or indication in the return value that third-party transmission occurred. This creates a transparency and privacy problem because users may reasonably assume their text is processed locally or within a trusted boundary when it is actually exported off-platform.

Static analysis

No suspicious patterns detected.