Back to skill

Security audit

CCPA Check - CCPA合规检查

Security checks for vulnerabilities and agentic risk

Overview

This CCPA checker mostly does what it says, but it sends sensitive compliance answers to a cloud service and has a verified HTML-report injection risk from cloud-returned content.

Install only if you are comfortable sending CCPA/CPRA yes/no assessment answers, an anonymous trial ID or API key, and quota metadata to compliancehub.cn. Prefer the offline preview first. Avoid opening HTML reports from untrusted or unexpected cloud results until the publisher escapes report fields or adds equivalent sanitization/CSP protections.

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/ccpa-check.py:316
Finding

Unescaped Cloud-Controlled Data in Generated HTML Report

Content
View full analysis
= 80 else "#ff9800" if score >= 60 else "#f44336" rows = "" current_cat = "" for r in items: if r.get("category") != current_cat: current_cat = r.get("category", "") rows += f'{current_cat}\n' icon = "✅" if r.get("passed") else "❌" cls = "pass" if r.get("passed") else "fail" rec = r.get("recommendation") or "Keep it up" rows += f"""{icon}{r.get('name')}{r.get('legal_ref') or ''}{cls.upper()}{rec}\n""" ``` ### Technical Analysis The `category`, `name`, `legal_ref`, and `recommendation` values are taken from the cloud evaluation response and concatenated directly into an HTML document. The code does not perform HTML escaping, sanitization, or type validation before placing these values into element content. Consequently, values containing HTML elements or event handlers are interpreted as markup rather than displayed as text. For example, a malicious recommendation value could contain: ```html ``` Exploitation requires control over, or compromise of, the response returned by the configured cloud service. Ordinary network spoofing is constrained by HTTPS certificate validation and the pinned hostname, but compromise of the service, its data source, or a trusted TLS endpoint could still supply a malicious response. The generated report also lacks a restrictive Content Security Policy that could mitigate injected active content. ### Attack Path 1. The user invokes the Skill ...[truncated 1915 chars]
Remediation
View remediation
' f'{category}' f'\n' ) rows += ( f'' f'{icon}' f'{name}' f'{legal_ref}' f'{cls.upper()}' f'{recommendation}' f'\n' ) ``` 2. Validate the cloud response schema before rendering: - Require `items` to be a list. - Require textual fields to be strings. - Enforce reasonable maximum lengths. - Reject unexpected structures rather than coercing them into report content. - Validate numeric summary fields and the `passed` value against expected types and ranges. 3. Add a restrictive Content Security Policy to generated reports as defense in depth: ```html ``` This should not replace output escaping, but it reduces the impact of a missed injection sink. 4. Add regression tests using payloads containing tags, quotes, event handlers, and encoded markup. Verify that generated reports contain escaped text such as `<script>` and never executable markup. 5. Treat all cloud-returned report fields as untrusted, even though the destination hostname is fixed and HTTPS certificate validation is enabled. ]]>
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest states Locale: zh-CN and says interactions and prompts are primarily in Chinese, with English only provided on demand. This imposes a language default rather than offering an explicit user choice up front, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The package description is written entirely in Chinese while the manifest declares a global region, and it does not indicate that users can choose another language. This creates a natural-language policy concern because it imposes a specific language on users without opt-in or documented locale justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code file includes user-facing prompts in Chinese for anonymous trial and privacy disclosure, while other output in the script is in English. Forcing a specific language without user opt-in can violate language/locale policy because users are not given a choice or documented reason for the locale switch.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.