Back to skill

Security audit

小天铺货AI助手

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed ecommerce assistant for shop authorization, 1688 sourcing, previews, and publishing, with sensitive actions described and gated by workflow rules.

Install only if you intend to connect this assistant to a real 小天铺货 seller workflow. It stores a local shop session token and can publish products when you confirm a preview or explicitly request automatic publishing, so use it on a trusted machine and review previews, selected items, and fallback manual-restock links carefully.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (12)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

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

md
- Development channel: technical details, code, scripts, commands, and implementation terminology may be shown when useful for testing or debugging.
- Never reveal private chain-of-thought or hidden reasoning in either channel.
- The production debug override may expose structured diagnostic fields only when the user explicitly requests troubleshooting; it does not permit revealing private reasoning, credentials, or session tokens.
- Do not restate this policy separately for each capability. It is the package-wide output rule.

## User-Facing Capability Introduction

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
ude Code, Trae, or OpenClaw), the package may be distributed in protocol mode: `SKILL.md` plus `references/api-protocol.md`, without any `scripts/` directory or

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

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

md
- Use the agent's own HTTP, browser, file, and base64 tools to call the backend directly according to `references/api-protocol.md`.
- Keep the same dev/prod channel identity and environment separation: `xtph-ecommerce-assistant-dev` must use `test` only, and `xtph-ecommerce-assistant` must use `prod` only.
- Store protocol-mode session state under the slug-scoped paths in `references/api-protocol.md`, never in the WorkBuddy `~/.workbuddy/skills/...` session file.
- The self-update policy in this file only applies when `scripts/version_check.py` exists. Protocol-only packages have no script runtime and no self-update; version updates are managed by the host registry/installer.
- Never expose `sessionToken`, `authCode`, `authCommitmentDesc`, `imageSearchUrl`, full raw `publishDraft` payloads, or image base64 data in user-visible output.
- If the host cannot perform a required deterministic step, report a business-friendly failure instead of guessing or skipping the step.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The policy states the production channel must 'speak in concise, conversational Chinese' for every user-visible response. This imposes a fixed language choice and does not offer the user any language or locale selection, which matches the language/locale policy-violation criterion.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
78% confidence
Finding

The skill explicitly requires multi-step write workflows and elsewhere instructs storing protocol-mode session state under slug-scoped paths, which implies persistence of workflow/session artifacts across turns. Any persisted authorization or workflow state in a production ecommerce assistant increases the attack surface for token leakage, cross-session confusion, or unauthorized reuse if storage isolation, encryption, expiry, and access controls are weak.

Content

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

md
- Capabilities may be grouped internally by domain for routing and documentation.
- The grouping must stay inside this package and must not become separate Skill packages.
- Read capabilities may stay lightweight.
- Write capabilities must follow `preview -> confirm -> execute -> recover` and must not be submitted as blind one-shot actions.
- Detailed capability mappings should stay in `references/api-protocol.md` so the main skill text remains stable.

## Release Channel Policy

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The default prompt defines a very broad trigger surface for 'ecommerce intent' and multiple loosely bounded actions, which can cause the skill to activate for generic commerce-related requests beyond its intended scope. In a production-channel skill tied to shop authorization and publishing workflows, overbroad invocation increases the risk of misrouting users into sensitive operations or exposing seller-facing actions without sufficiently clear user intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction 'Always reply in concise, conversational Chinese' forces a specific language regardless of the user's preference. This is a natural-language policy concern because it imposes a locale/language constraint without opt-in or an explicit documented justification in the file.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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 · references/api-protocol.md (reported line 216)May include surrounding context.

Trigger: 查询授权状态 / 查看授权状态 / 看看授权店铺 / 当前授权情况.

http
POST https://puhuoapi.huitun.com/shop/getAuthShopList
X-Session-Token: {sessionToken}
Accept: application/json
Content-Type: application/json

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger activates on general phrases like '这张图 / 上面的图片 / 附件' combined with broad shopping intents, and explicitly says it is 'intent routing, not exact keyword matching.' In a markdown protocol reference, this lacks negative examples or tighter constraints, increasing the risk that normal conversation about an image could invoke the skill unexpectedly.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

The protocol instructs the agent to make a terminal workflow decision and direct the user into manual restock flow without further confirmation when publication is blocked by missing required attributes. In an e-commerce publishing context, this increases the chance of the agent taking consequential workflow actions that the user did not explicitly approve at that stage, especially because adjacent sections also allow automatic transitions from preview to repair to submit logic.

Content

Scanner excerpt · references/api-protocol.md (reported line 528)May include surrounding context.

10.2 Need manual goods restock

When required product attributes remain missing and the selected products cannot be published, do not ask the user to resume the agent workflow or reply with 确认铺货. Render the exact sentence, one fenced code block per selected 1688 link, and the client entry:

text
请复制以下商品链接去手动铺货:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This line instructs the agent to 'explain the business reason in conversational Chinese,' which forces a specific language regardless of user preference. That is a natural-language policy issue unless the skill is explicitly documented as Chinese-only with user opt-in or clear regional justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The section lists several trigger phrases and then adds 'or the user-selected products from image search,' which broadens activation without clear constraints or negative examples. Because this is a markdown file, ambiguous invocation guidance can lead to unintended preview-task creation from loosely related prior context.

Content

No source excerpt is available for this finding.