Back to skill

Security audit

cross-border-listing-optimizer

Security checks for vulnerabilities and agentic risk

Overview

This listing-generation skill is not outright malicious, but it needs Review because it stores usage history and preferences across sessions and can feed them back into future behavior without clear consent or limits.

Install only if you are comfortable with the skill keeping local cross-session records of usage, errors, notes, and preferences. Treat learned_patterns.json as untrusted data, avoid storing sensitive product strategy or customer information in notes/preferences, and do not let automated reflections rewrite SKILL.md without human review.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:176
Finding

Unvalidated Persistent Preferences Can Poison Future Agent Behavior

Content
View full analysis
--key 输出语言 --val 中文 # 查看累计洞察(高频能力 / 反复错误) python scripts/learner.py insight <本技能目录> # 自动复盘(错误≥3次 或 操作≥10次 时给出改进建议) python scripts/learner.py reflect <本技能目录> ``` ```markdown ### 迭代规则 - **错误累计 ≥3 次** → 主动增加预检/兜底步骤,并将经验回写本 SKILL.md。 - **操作数 ≥10 次** → 分析高频能力优先打磨示例与质量,低频能力评估精简或合并。 - **重要用户偏好** → 写入 `learned_patterns.json`,下次调用直接采用,减少重复询问。 ``` The corresponding persistence implementation accepts arbitrary keys and values: ```python def record_preference(skill_dir, key, value): data = load_learning(skill_dir) data["preferences"][key] = value save_learning(skill_dir, data) return data ``` ### Technical Analysis The `prefer` command persists arbitrary command-line strings as preference keys and values. There is no schema, allowlist, length restriction, content validation, trust designation, or distinction between harmless presentation preferences and executable behavioral instructions. The skill documentation instructs the agent to apply stored preferences during later invocations. It also directs the agent to write accumulated experience back into `SKILL.md`. Although the Python helper does not itself edit `SKILL.md`, an agent following the documented workflow may promote untrusted runtime content into persistent skill-level instructions. This creates a memory-poisoning boundary failure: content originating from a user or product input can be stored as trusted state and subsequently influence unrelated sessions. ### Attack Path 1. An attacker submits an instruction-like value while presenting it as a user preference, error note, or optimization rule. 2. The agent invokes: ```bash python script ...[truncated 1217 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/learner.py:25
Finding

Unrestricted Skill Directory Allows Unsafe File Overwrite

Content
View full analysis
{count, success, fail} "errorPatterns": {}, # 错误类型 -> {count, lastNote, lastTime} "preferences": {}, # 用户偏好 key->value "recentOps": [], # 最近 20 条操作 "optimizations": {}, # 已采纳的优化 "lastUpdated": "" } def load_learning(skill_dir): p = learn_path(skill_dir) try: return json.loads(open(p, encoding="utf-8").read()) except Exception: return default_data(os.path.basename(skill_dir)) def save_learning(skill_dir, data): data["lastUpdated"] = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M") p = learn_path(skill_dir) with open(p, "w", encoding="utf-8") as f: f.write(json.dumps(data, indent=2, ensure_ascii=False)) ``` ### Technical Analysis `resolve_skill_dir()` accepts any existing directory supplied by the caller. It does not canonicalize the path or verify that the directory is beneath an approved skill root. If the supplied path does not exist, the unvalidated string is still returned. `save_learning()` then opens `/learned_patterns.json` in truncating write mode. It does not verify directory ownership, reject symbolic links, inspect the final canonical path, or use a safe atomic replacement pr ...[truncated 1951 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a listing-generation tool, but the embedded learner subsystem adds cross-session telemetry and persistent storage of usage history, errors, and user preferences. This expands behavior beyond the declared purpose and creates a hidden data-retention surface, which is dangerous because users may provide business-sensitive product data or preferences without realizing they are being logged and reused.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad enough to activate during ordinary cross-border e-commerce discussions, which can cause the skill to engage unexpectedly. In this skill's context, accidental activation is more dangerous because the same document also instructs persistent recording of usage and preferences, so unintended invocation may also mean unintended data capture or file writes.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The self-evolution and usage-tracking subsystem is unrelated to the core listing-optimization function and instructs the agent to maintain persistent memory in local files. Unrelated persistence mechanisms are risky because they can silently accumulate user or operational data, enlarge attack surface, and enable behavior drift not expected from the skill's advertised purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation states that the skill records operation counts, error patterns, user preferences, and improvement suggestions in a persistent file, but it does not provide a clear user warning or consent flow. This is dangerous because it normalizes silent retention of potentially sensitive business preferences and workflow history across sessions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill includes natural-language instructions to persist user preferences and usage history across sessions via a local JSON file. Cross-session memory without strict scoping, consent, and deletion controls is dangerous because it can retain sensitive commercial preferences, failure details, or derived behavioral profiles longer than users expect.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module advertises itself as a generic self-evolving learner usable by any skill, which materially exceeds the stated purpose of a cross-border listing optimizer. This broad, skill-agnostic telemetry design increases the chance of undisclosed collection and reuse of operational/user data outside the expected scope, violating least-privilege and purpose-limitation principles.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code persistently writes behavior history, error notes, and user preferences into learned_patterns.json in the skill directory without any access control, minimization, or disclosure. If notes or preferences contain sensitive business data, product information, or user-specific instructions, this creates a local privacy and data-governance risk and may expose data to other processes or users with filesystem access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The persistence path and save operation write telemetry to disk with no nearby privacy, retention, or sensitivity warning, which increases the likelihood that developers and users will unknowingly store sensitive operational data indefinitely. While the absence of a warning alone is not exploitation, here it accompanies actual undisclosed persistence of notes and preferences, making it a real privacy/security weakness.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module collects skill-agnostic preferences and operational telemetry such as capabilities used, failures, error types, and notes, even though the declared skill purpose is listing generation/optimization. This mismatch makes the skill more dangerous because e-commerce workflows often involve commercially sensitive product, pricing, and marketplace strategy data that may end up in logs or notes.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The learner command examples tell users to record capabilities such as “简历优化” and mention errors like format recognition failure, which belong to a resume/document-processing workflow rather than cross-border listing optimization. This inline documentation indicates copied intent from another skill and conflicts with the declared purpose of this one.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The example preference command sets 输出语言 to 中文, and the document is predominantly written as a Chinese-first experience. Although the skill mentions bilingual output capability elsewhere, it does not clearly instruct that language choice should be user-selected before persisting or defaulting to a locale preference.

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 docstring, usage instructions, and later user-facing strings are all presented only in Chinese. Per the policy, forcing a specific language without opt-in is a locale/language policy issue unless the constraint is documented and justified, which it is not here.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.