Back to skill

Security audit

content-stock

Security checks for vulnerabilities and agentic risk

Overview

This stock-analysis skill is purpose-aligned, but it sends the API key and user queries over unencrypted HTTP, which puts credentials and potentially sensitive research at risk.

Review before installing. Only use this skill if the endpoint is changed to HTTPS with a trusted hostname, the API key is scoped and rotatable, and users understand that their stock-analysis queries are sent to an external service. Remove the malformed trailing NUL bytes from SKILL.md before publishing.

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

Error
Location
content_stock.js:15
Finding

API Credential and Query Data Transmitted Over Plaintext HTTP

Content
View full analysis

Vulnerability Details

File Location: content_stock.js:15-25
Vulnerability Type: Plaintext transmission of sensitive information
Risk Level: High

Vulnerable Code

javascript
const url = "http://[IP_ADDRESS]/api/v1/alpha/content_stock";
const headers = {
    "Authorization": `Bearer ${EASYALPHA_API_KEY}`,
    "Content-Type": "application/json"
};
const payload = {
    query: request.query,
    type: request.type || "deep"
};

try {
    const response = await fetch(url, {

The subsequent request configuration at lines 23-27 sends both the authorization header and serialized payload to this plaintext HTTP URL:

javascript
const response = await fetch(url, {
    method: "POST",
    headers: headers,
    body: JSON.stringify(payload)
});

Technical Analysis

The skill sends EASYALPHA_API_KEY as a Bearer credential in the HTTP Authorization header. It also sends the user-provided stock-analysis query in the request body. Because the destination uses http:// rather than https://, transport encryption and authenticated server identity are absent.

Any party able to observe or manipulate traffic between the host and the API endpoint can read the credential and request content. Such a party can also alter requests or streamed responses without reliable detection. The placeholder-style IP address further provides no verifiable service identity in the reviewed implementation.

Attack Path

  1. A user configures a valid EASYALPHA_API_KEY and invokes get_content_stock.
  2. The skill creates a plaintext HTTP request containing Authorization: Bearer <API_KEY> and the user-controlled analysis query.
  3. An attacker with a network interception position, such as control of an untrusted access point, compromised router, proxy, or relevant network segment, captures or modifies the HTTP traffic.
  4. The attacker extracts the Bearer credential and submitted quer ...[truncated 1115 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the plaintext endpoint with an https:// URL served under an explicitly trusted hostname.
  2. Require normal TLS certificate and hostname validation. Do not disable certificate verification or accept arbitrary self-signed certificates in production.
  3. Reject any configured endpoint whose protocol is not HTTPS, preferably through strict URL validation and an allowlist of approved hosts.
  4. Avoid using a raw or placeholder IP address when a stable authenticated service hostname is available.
  5. Rotate any API key that may already have been transmitted through this implementation, because its confidentiality cannot be guaranteed.
  6. Restrict API keys to the minimum required operations, apply short expiration periods where possible, and enforce server-side rate limits and usage monitoring.
  7. Avoid logging authorization headers or full request payloads, and document clearly that user queries are transmitted to an external service.
  8. Consider response authentication or application-level integrity protections if the analysis output drives security-sensitive or automated financial actions.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Ae3

High
Category
analysis-evasion
Confidence
96% confidence
Finding

The embedded NUL bytes indicate the Markdown artifact is malformed or has been contaminated with non-text data. While not automatically malicious, such bytes can cause parser inconsistencies, truncation, or downstream tooling errors that may let scanners, loaders, or display layers interpret different content than reviewers see.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares environment-variable and likely network-dependent behavior via an API key requirement, but it does not define explicit tool scope restrictions such as permissions or allowed-tools. This weakens least-privilege guarantees and makes it harder for operators to understand or constrain what external access the skill may use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation instructs users to provide an API key for external analysis but does not warn that user queries may be transmitted to a third-party service. In a stock-analysis context, queries may contain proprietary research interests, trading theses, or sensitive business information, so the missing disclosure creates a meaningful privacy and data-governance risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes a skill for analyzing themes/news for stock selection. While calling an external analysis service is plausible, directly accessing process environment secrets is a separate privileged capability that is not justified or declared by the stated purpose alone.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill transmits arbitrary user-provided query content and an authorization bearer token to a remote HTTP endpoint, but the connection is not encrypted because it uses plain HTTP. This creates a real confidentiality risk: user inputs and the API credential could be intercepted or modified in transit by a network attacker.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The natural-language instructions and parameter descriptions are written in Chinese, while the file does not indicate that the skill is intentionally region-specific or provide an opt-in language choice. This can violate language/locale policy when a skill forces a specific language without user consent or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The natural-language comments and parameter descriptions are written in Chinese, which indicates a fixed language context without any stated user choice or opt-in. Under the language/locale policy, skills should not impose a specific language unless the constraint is explicitly justified or optional.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.