Back to skill

Security audit

Qstar Video Ecom

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated e-commerce video purpose, but its instructions use unsafe shell command templates that could let crafted user input run local commands.

Review before installing. The service sends product and account-linked data to Q-star's backend and may initiate a payment QR flow, which is disclosed and purpose-aligned. The main issue is implementation safety: the skill should replace shell curl templates with a structured HTTP client or safely serialized JSON before being trusted in an agent environment that can run local commands.

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
SKILL.md:124
Finding

Shell Command Injection Through Direct Interpolation of User-Controlled Values

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 75–77, 124–133, 299–302, and 322–331
Vulnerability Type: Shell command injection caused by unsafe interpolation into curl commands
Risk Level: High

Vulnerable Code

The Skill explicitly instructs the agent to inline values directly into commands:

text
Always inline the real value into commands. Do not rely on shell variables.

The onboarding request directly interpolates user-provided profile and contact data:

bash
curl -s -X POST https://bot.guanma.top/sora-api/user/onboard \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "{USER_ID}",
    "main_platform": "{用户回答1}",
    "category": "{用户回答2}",
    "contact": "{用户回答3}"
  }'

The image upload request directly interpolates a user-controlled public URL:

bash
curl -s -X POST "https://bot.guanma.top/sora-api/upload-image?user_id={USER_ID}" \
  -H "Content-Type: application/json" \
  -d '{"image_url": "{用户图片的公网URL}"}'

The generation request directly interpolates structured product text, the platform-linked identifier, platform selection, voice selection, and image URL:

bash
curl -s -X POST https://bot.guanma.top/sora-api/generate \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "{USER_ID}",
    "platform": "{platform_key}",
    "product": "{结构化产品描述}",
    "voice": "{voice_key}",
    "image_url": "{产品图URL或空字符串}"
  }' \
  --max-time 400

Technical Analysis

The documented implementation builds shell commands by textual substitution rather than passing values through a structured HTTP API or a safe JSON serializer. Several substituted fields are wholly or partially controlled by the user, including contact information, product descriptions, uploaded image URLs, and values derived from the session identifier.

The JSON request bodies are enclosed in single-quoted shell arguments. A supplied value c ...[truncated 3141 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace shell command templates with a structured HTTP client. Use an API that accepts the URL, headers, query parameters, and JSON body as separate typed values. Serialize request bodies with a standard JSON encoder rather than manually assembling JSON.

  2. Remove the instruction to inline values directly into commands. Replace it with an explicit prohibition against concatenating or substituting untrusted values into shell source.

  3. If command-line curl is unavoidable, generate JSON safely. For example, construct the body with jq using separate --arg parameters:

    bash
    jq -n \
      --arg user_id "$USER_ID" \
      --arg platform "$PLATFORM" \
      --arg product "$PRODUCT" \
      --arg voice "$VOICE" \
      --arg image_url "$IMAGE_URL" \
      '{user_id:$user_id, platform:$platform, product:$product, voice:$voice, image_url:$image_url}' \
      | curl -sS -X POST "https://bot.guanma.top/sora-api/generate" \
          -H "Content-Type: application/json" \
          --data-binary @- \
          --max-time 400
    

    Values must be passed as arguments by the runtime rather than generated as part of a shell command string. The runtime must not use eval, sh -c, or an equivalent reparsing mechanism.

  4. Encode URL components independently. Platform-linked user IDs and other path or query values should be passed through a proper URL encoder. Do not interpolate raw values into paths or query strings.

  5. Validate inputs using allowlists. Restrict platform and voice values to the documented enumerations. Validate public image URLs as HTTPS URLs and reject control characters. Apply reasonable length limits to product descriptions, contact fields, identifiers, and URLs.

  6. Treat validation as defense in depth. Input validation must not replace context-appropriate shell escaping, JSON serialization, and URL encoding.

  7. **Run the integration with minimal privile ...[truncated 526 chars]

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The skill instructs the agent to send a platform-linked user ID, onboarding data, product descriptions, optional contact info, payment metadata, and potentially public image URLs to an external domain (bot.guanma.top). This is a real data exfiltration boundary: even if intended for service functionality, it transfers user-associated data to a third-party backend and broadens privacy, compliance, and trust risk.

Content

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

Step 2 — Check profile

bash
curl -s https://bot.guanma.top/sora-api/user/profile/{USER_ID}

If onboarded: false, run the onboarding flow before generation.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The onboarding and subsequent prompts are written as fixed Chinese-only user-facing messages and questions, with no indication that the user can choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is explicitly justified and documented.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
95% confidence
Finding

The absolute local path /Users/tiger/.codex/skills/qstar-video-ecom/TEMPLATES.md discloses host filesystem structure and the local username. While not directly exploitable on its own, it leaks environment details that can aid reconnaissance and confirms development/deployment conventions that should remain private.

Content

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

md
## Step 5 — Script style template

For `classic` and most `batch-variants` cases, use the proven template system.
Template details live in [TEMPLATES.md](/Users/tiger/.codex/skills/qstar-video-ecom/TEMPLATES.md).

Prompt:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file is primarily Chinese, but the section labeled for TikTok/overseas use provides fixed English copy templates such as "Wait— you need to see this" and "link in bio". Because the file does not state that English output is optional or selected by user preference, it effectively imposes a language/locale choice in part of the skill content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The interface metadata and default prompt strongly steer usage toward Chinese e-commerce video generation without indicating user choice or language negotiation. While not directly a code-execution issue, this can override user intent, cause undesired disclosure of product or business content into a language-specific workflow, and reduce transparency about how outputs will be produced.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill enables implicit invocation without any visible trigger constraints, narrowing rules, or consent boundaries. In practice, this can cause the agent to invoke a video-generation workflow unexpectedly based on loose relevance matching, which may route user data or initiate actions the user did not explicitly request.

Content

No source excerpt is available for this finding.