Back to skill

Security audit

AI珠宝鉴定与选购

Security checks for vulnerabilities and agentic risk

Overview

This jewelry appraisal skill is mostly coherent, but its report generator has avoidable file-writing and HTML-injection risks that users should review before installing.

Install only if you are comfortable with a Chinese-language jewelry assistant that may search the web for market data and generate local HTML reports. Avoid passing untrusted HTML-like text into report queries, and do not let untrusted users control the report output path. Treat price and investment content as informational and verify important purchases with independent appraisers and current market sources.

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

Warning
Location
scripts/generate_report.py:96
Finding

Stored HTML Injection Through the User-Supplied Report Query

Content
View full analysis
", "ANALYSIS_CONTENT": "", "SCORE_SECTION": "", "PRICE_CONTENT": "", "ADVICE_TITLE": "选购与鉴定建议", "ADVICE_ITEMS": "", "WARNING_ITEMS": "", "CHECKLIST_ITEMS": "", "CERT_SECTION": "", } html = template for key, val in content.items(): html = html.replace("{{" + key + "}}", val) return html ``` The corresponding template sink is: ```html

{{HERO_SUBTITLE}}

``` ### Technical Analysis The `--query` command-line argument is treated as untrusted user input. It is assigned to `hero_subtitle` and then inserted directly into an HTML document through raw string replacement. No context-sensitive HTML escaping or sanitization is applied before the value reaches the template. Consequently, HTML metacharacters in the q ...[truncated 1748 chars]
Remediation
View remediation
``` 5. Add regression tests using payloads containing angle brackets, quotation marks, event handlers, script elements, and encoded variants. Verify that each payload is rendered as inert text. 6. Prefer a template engine with automatic escaping enabled rather than manual `str.replace()` interpolation. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/generate_report.py:193
Finding

Arbitrary Writable-File Overwrite Through the Output Path

Content
View full analysis
占位符。参考 references/ 目录下的对应知识库文件。" } # Write metadata alongside meta_path = out_path.with_suffix(".meta.json") with open(meta_path, "w", encoding="utf-8") as f: json.dump(result, f, ensure_ascii=False, indent=2) ``` ### Technical Analysis The caller fully controls `args.output`. The path is passed to `open(..., "w")`, which creates a new file or truncates an existing file. The code does not: - Confine output to a dedicated report directory. - Reject absolute paths or traversal outside an approved directory. - Check whether the destination already exists. - Reject symbolic links. - Request explicit overwrite confirmation. - Use exclusive or atomic file creation. The script also derives a second destination by replacing the suffix with `.meta.json`, creating an additional predictable overwrite target. This weakness becomes exploitable when an untrusted user, upstream agent, or a ...[truncated 1502 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list includes many broad, everyday terms such as “钻石”, “证书”, “婚戒”, “投资收藏”, and “金价”, which can cause the skill to activate in contexts where the user did not intend to invoke a jewelry appraisal workflow. This increases the chance of accidental tool use, unnecessary web searches, and generation of authoritative-seeming appraisal or investment guidance without 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 HTML declares lang="zh-CN" and the visible section headings, warnings, and disclaimer are all written in Chinese. Under the policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file is written entirely in Chinese and provides no indication that other languages are supported or that the language choice is optional. Under the policy rule for language or locale constraints, a skill/reference that effectively forces one language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains natural-language strings that enforce a specific language/locale policy: usage text, labels, and generated report content are all in Chinese. Under the policy, forcing a language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all guidance in Chinese and does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy criteria, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The document is written entirely in Chinese and does not indicate that language selection is optional or configurable. Under the policy rule for language or locale constraints, this can be considered a forced locale presentation unless explicitly justified or offered as opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file is entirely written in Chinese and does not indicate that the language is optional, selectable, or required for a specific region-specific use case. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. This file presents all guidance exclusively in Chinese and does not indicate that the skill is region-specific or that users may opt into this language, which can amount to forcing a specific language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents all guidance in Chinese and does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy for natural-language issues, forcing a specific language without user opt-in can be a locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

A language or locale policy issue can arise when a skill forces a specific language without user opt-in. This file presents all guidance exclusively in Chinese and does not indicate that the content is intentionally limited to Chinese-speaking users or provide an alternative language option.

Content

No source excerpt is available for this finding.