Back to skill

Security audit

AI Ethics Check - AI 科技伦理审查合规检查

Security checks for vulnerabilities and agentic risk

Overview

The skill’s cloud compliance scoring is mostly disclosed and purpose-aligned, but its HTML report can render unescaped cloud-controlled content.

Install only if you are comfortable sending compliance checklist answers and any API key authentication to compliancehub.cn. Prefer text or JSON output over HTML until the report renderer escapes remote fields, and avoid opening generated HTML reports from untrusted or unexpected runs.

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

Warning
Location
scripts/ai-ethics-check.py:385
Finding

Stored HTML Injection Through Unescaped Cloud-Controlled Report Fields

Content
View full analysis
= 80 else "#ff9800" if score >= 60 else "#f44336" rows = "" current_cat = "" for r in items: if r.get("category_name") != current_cat: current_cat = r.get("category_name", "") rows += f'{current_cat}\n' icon = "✅" if r.get("passed") else "❌" cls = "pass" if r.get("passed") else "fail" rec = r.get("recommendation") or "继续保持" rows += f"""{icon}{r.get('name')}{r.get('legal_ref') or ''}{cls.upper()}{rec}\n""" ``` ### Technical Analysis The HTML report renderer inserts dynamic values directly into HTML without context-appropriate escaping. The affected values include: - `category_name` - `name` - `legal_ref` - `recommendation` These fields can originate from the remote rules endpoint or cloud evaluation response. The application parses remote JSON and later passes response items into `render_html()`. Because the values are interpolated into markup without `html.escape()` or equivalent sanitization, a malicious value such as an element with an event handler can terminate the expected table-cell context and introduce arbitrary HTML. The vulnerability does not require remote Python code execution. Exploitation requires control over, or compromise of, the pinned `compliancehub.cn` service or its response path. The fixed HTTPS endpoint and default certificate verification reduce exposure to ordinary network interception, but they do not protect against a compromised server, backend data store, or operator account. Other server-provided values rende ...[truncated 1709 chars]
Remediation
View remediation
``` This is defense in depth and must not replace output escaping. 5. Add regression tests using payloads containing `<`, `>`, `"`, `'`, event-handler attributes, script elements, and external resource tags. Verify that the generated report contains encoded text rather than executable markup. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The agent guide states activation in terms of a Chinese-language compliance check request and the document consistently frames operation in Chinese without indicating that users may choose another language. This can violate language/locale policy when a skill implicitly requires a specific language without explicit opt-in or alternatives.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest explicitly advertises cloud-based 'real scoring', anonymous trial usage, local filesystem writes, and access to an API key, but it does not clearly disclose what user/project data will be transmitted to the remote service or what local state will be persisted. In a compliance-review skill, this is especially risky because users may submit sensitive internal policy, model, or governance information, creating a meaningful privacy and confidentiality concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code presents its title, prompts, reports, and rendered HTML language as Chinese-only, beginning with the module docstring and continuing throughout the skill. The file does not offer a user opt-in or alternate locale selection, and no region-specific justification is documented, which fits the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest description is entirely in Chinese and presents the skill as a China-specific compliance checker, but it does not explicitly state that language/locale is optional or limited to users who want Chinese output. This can violate language/locale policy when a skill appears to impose a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.