Back to skill

Security audit

CCPA-Compliance(CCPA合规工具)

Security checks for vulnerabilities and agentic risk

Overview

This looks like a local CCPA/CPRA compliance helper, but it relies on undeclared code outside the reviewed package, so users should review it before installing.

Install only if you are comfortable reviewing or supplying the external compliance_core module yourself. Run it in a controlled directory and avoid running the security checker or main checker with elevated privileges until the dependency path issue is fixed or the missing module is bundled and verified.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Error
Location
scripts/ccpa-check.py:9
Finding

Undeclared Parent-Directory Python Import Enables Dependency Hijacking

Content
View full analysis

Vulnerability Details

File Location: scripts/ccpa-check.py:9-12
Vulnerability Type: Dependency confusion through an untrusted Python import path
Risk Level: High

Vulnerable Code

python
import sys
import os

# Ensure compliance_core can be imported
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))

from compliance_core import UnifiedCLI, CheckEngine, CheckResult, Severity

The imported compliance_core package is not included in the audited project, while the code explicitly prepends the project's grandparent directory to Python's module search path. Because the inserted directory has the highest import priority, a package named compliance_core located there will be selected before packages from ordinary trusted locations.

Python executes package initialization code during import. Therefore, importing a malicious or compromised compliance_core package can execute arbitrary Python code before the CCPA checker performs its intended operation.

This behavior also contradicts the project's repeated claims that it has no external dependencies and uses only the Python standard library. The bundled security checker invokes ccpa-check.py --help, so running the security check can trigger the same external import.

Technical Analysis

Python resolves modules by searching directories in sys.path in order. Calling sys.path.insert(0, ...) gives the selected grandparent directory precedence over the standard import locations. The code does not verify:

  • The origin or canonical path of compliance_core.
  • The integrity or expected version of the package.
  • Whether the package is part of a trusted installation.
  • Whether the parent directory is writable by another user, process, installer, or extracted archive.

An attacker who can place a matching package in that directory can define malicious behavior in compliance_core/__init__.py. That behavior runs immediately w ...[truncated 1938 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the parent-directory path modification

    • Delete the sys.path.insert(0, ...) statement.
    • Do not search directories outside the audited package with elevated import priority.
  2. Bundle the required component

    • Include compliance_core within the Skill's audited source tree.
    • Use explicit package-relative imports so module resolution cannot escape the package boundary.
  3. Declare and pin the dependency if it must remain external

    • Publish it through a trusted package source.
    • Pin an exact version and cryptographic hashes.
    • Document it accurately in requirements.txt, package.json, README.md, and SKILL.md.
    • Remove the inaccurate “zero external dependencies” and “standard library only” claims.
  4. Verify dependency provenance

    • Resolve the imported module's canonical path and reject modules outside an approved installation directory.
    • Validate package signatures or hashes before execution.
    • Review and audit the external component as part of every release.
  5. Harden deployment

    • Install the Skill and its dependencies in directories that are not writable by untrusted users.
    • Run it under a dedicated, least-privileged account.
    • Avoid running the checker with administrator or root privileges.
  6. Correct the security checker

    • Ensure its functional test does not execute unaudited external imports.
    • Make the checker report missing or externally resolved runtime components as a security failure rather than treating successful execution as evidence of safety.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (29)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documented purpose says this is a CCPA/CPRA compliance aid, but the referenced behavior includes codebase security scanning, packaging checks, and subprocess-based functional testing that are outside the stated role. Hidden or undisclosed operational behaviors are risky because users may grant trust or permissions under false assumptions, especially when the skill is presented as pure-local, narrowly purposed compliance tooling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documented purpose says this is a CCPA/CPRA compliance aid, but the referenced behavior includes codebase security scanning, packaging checks, and subprocess-based functional testing that are outside the stated role. Hidden or undisclosed operational behaviors are risky because users may grant trust or permissions under false assumptions, especially when the skill is presented as pure-local, narrowly purposed compliance tooling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented purpose says this is a CCPA/CPRA compliance aid, but the referenced behavior includes codebase security scanning, packaging checks, and subprocess-based functional testing that are outside the stated role. Hidden or undisclosed operational behaviors are risky because users may grant trust or permissions under false assumptions, especially when the skill is presented as pure-local, narrowly purposed compliance tooling.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python scripts/security_check_ccpa.py

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python scripts/security_check_ccpa.py

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python scripts/security_check_ccpa.py

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The heading and document content are presented in Chinese, and there is no indication that users may choose another language or that the file is intentionally restricted to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in 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
97% confidence
Finding

The natural-language content, usage instructions, and warnings are presented in Chinese only, which effectively forces a specific language on users. The policy allows locale constraints only when users are given a choice or when the restriction is explicitly justified, neither of which is stated here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire guide is written in Chinese, including headings and operational instructions, but it does not indicate that the skill is region-specific or provide any user opt-in or alternative language. Under the policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill advertises safety properties and executable workflows but does not declare any explicit tool scope such as permissions or allowed-tools. When a skill can read/write files, invoke shell commands, or potentially reach the network without an explicit scope contract, callers and review systems cannot reliably constrain execution, increasing the chance of unintended or over-privileged actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest description and usage guidance are predominantly in Chinese, which effectively imposes a language preference on users. Under the language/locale policy, this should either offer a language option or clearly justify the language constraint as intentional and region-specific.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Overly broad trigger keywords like general privacy/compliance terms can cause the skill to activate in contexts where it is not appropriate. In a compliance workflow, accidental invocation can expose local data to unnecessary processing, create confusing or misleading outputs, or crowd out better-matched tools.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This manifest contains user-facing natural language in Chinese for the primary description, but it does not indicate that the user can choose another language or that Chinese is an intentional opt-in requirement. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This file's natural-language content, including headings and usage instructions, is entirely in Chinese. Under the policy, forcing a specific language without user opt-in or a documented regional 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
95% confidence
Finding

This Python file presents its docstrings, scenario names, descriptions, recommendations, and success messages in Chinese, while the tool itself is for California privacy compliance and does not document a region-specific language requirement. The file does not offer a language/locale option or opt-in, which matches the policy-violation criterion for forcing a specific language without user choice.

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 force a specific language/locale for the user experience. Under the policy, locale-specific behavior should either offer user opt-in/choice or be clearly justified as region-specific; this file does neither.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s user-facing description and all visible CLI/output strings are written in Chinese, indicating the tool is designed to operate in a fixed language. The file does not offer any language selection or explain that the skill is intentionally region- or locale-specific, which matches the policy concern for forced language without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The CLI advertises support for multiple opt-out check types, but the filtering logic references result categories such as 'sharing_restrictions' and 'marketing_opt_out' that are never produced by check_opt_out_mechanism(). When invoked with those modes, the tool can raise a KeyError or emit incomplete results, creating a false sense of CCPA/CPRA compliance and potentially causing users to miss required controls.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The module docstring describes the script as being used to verify safety and pure local execution properties, which suggests an inspection-oriented check. In practice, run_ccpa_functional_tests actively invokes ccpa-check.py through subprocess.run, introducing behavior beyond simple verification and potentially executing arbitrary project code. This is a meaningful contradiction in intent documentation versus implementation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Natural-language strings throughout the file, including the module description and console output, are written in Chinese with no apparent language selection or opt-in. This can violate language/locale policy because the skill effectively forces one language on users rather than offering a choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest positions this skill as a CCPA/CPRA compliance checking and documentation tool, and this file's docstring says it verifies security and local-only characteristics. However, this script also launches ccpa-check.py with subprocess.run, adding code-execution capability beyond passive inspection. Spawning another program is not obviously required for a security audit helper and expands the operational capability of the skill.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/security_check_ccpa.py (reported line 273)May include surrounding context.

python
for cmd in test_commands:
                try:
                    result = subprocess.run(
                        cmd,
                        capture_output=True,
                        text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script executes another local program automatically during a 'security check' flow without an explicit confirmation or opt-in. In a skill advertised as a local safety verification tool, this can cause users to run unreviewed code under the false assumption that the checker is only inspecting files, increasing the risk of unintended code execution if ccpa-check.py is malicious or compromised.

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 file includes user-facing natural-language content and docstrings entirely in Chinese, including the generated templates, but does not provide any indication that the user can choose another language. Under the policy, forcing a specific language without opt-in is a natural-language locale violation unless clearly justified as region-specific and documented.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

L390的注释明确表示“不自动创建目录,遵守'不执行任何系统修改'声明”,但紧接着L394-L395实际以写模式打开并写入 output_path,直接修改了文件系统。这不是单纯信息缺失,而是注释表达的意图与函数真实行为相矛盾。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.