Back to skill

Security audit

中国节假日检测

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Chinese holiday checker with disclosed dependency checks, though users should install its unpinned Python dependency cautiously.

Install this only in a normal isolated Python environment, review or pin the `chinesecalendar` package version if supply-chain control matters, and treat any package upgrade as a user-approved maintenance action rather than something to retry automatically.

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

Warning
Location
SKILL.md:4
Finding
Unpinned Third-Party Dependency Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:4` and `SKILL.md:22-25` **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium The Skill declares and recommends installation of the `chinesecalendar` package without pinning a reviewed version or verifying its integrity. ```yaml metadata: {"clawdbot":{"emoji":"📅","requires":{"packages":["chinesecalendar"]}}} ``` ```markdown Installation: ```bash pip install chinesecalendar ``` ``` ### Technical Analysis The dependency declaration contains only a package name, while the documented installation command allows `pip` to resolve the latest compatible release from the configured package index. The project does not include a lockfile, exact version constraint, integrity hash, trusted-index restriction, or vendored copy of the dependency. Consequently, the code installed at deployment time can differ from the code reviewed during this audit. If the upstream package, maintainer account, package index, or local package-index configuration is compromised, installation may retrieve attacker-controlled content. Python package installation can execute build backend or installation-related code, and the installed package is subsequently imported by `check.py`. This finding does not establish that the current `chinesecalendar` package is malicious. It identifies the absence of controls that would prevent a compromised or unexpectedly changed future release from entering the execution environment. ### Attack Path 1. An attacker compromises the upstream package, its publishing credentials, or a package source trusted by the target environment. 2. The attacker publishes a malicious release under the dependency name. 3. A user or automated Agent follows the Skill metadata or documented command and installs `chinesecalendar` without an exact version and integrity hash. 4. `pip` downloads the attacker-controlled release from the configured index. 5. Malicious code may execute during package ...[truncated 907 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an explicitly reviewed version, for example: ```text chinesecalendar==<reviewed-version> ``` 2. Store dependencies in a requirements or lock file with cryptographic hashes and install them using hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Generate and review hashes from a trusted package source before deployment. 4. Configure `pip` to use an explicitly trusted package index and prevent unintended fallback to untrusted or privately controlled indexes. 5. Run dependency installation and the Skill under a dedicated, least-privileged account or isolated virtual environment. 6. Review package source code and release provenance before changing the pinned version. 7. Use dependency and software-composition scanning in the release process, and update the pin only after testing and security review. 8. Keep the metadata dependency declaration consistent with the reviewed lock file so automated installers cannot silently select a different release. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill includes shell-capable behavior via subprocess and pip commands, but the manifest declares no tool scope or permissions. That mismatch can cause the agent runtime or reviewer to underestimate what the skill may invoke, increasing the chance of unauthorized command execution or unsafe package-management actions in environments where shell access is available.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
This markdown file contains user-facing instructions, descriptions, and response examples exclusively in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the restriction is explicitly documented and justified as region-specific.

Intent-Code Divergence

Medium
Confidence
87% confidence
Finding
The skill contains conflicting guidance: earlier sections instruct upgrading the package when unsupported-year detection occurs, while the SOP later warns against repeated upgrades for out-of-range years. This ambiguity can lead agents to perform unnecessary or repeated package update attempts, creating denial-of-service-like loops, inconsistent behavior, or unsafe environment changes.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The file-level docstring is written entirely in Chinese and describes a China-specific holiday check, which imposes a language/locale assumption in natural-language content. The file does not offer any user language choice or explain a justified region-specific constraint as required by the policy.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
def get_installed_version():
    """获取已安装的版本"""
    result = subprocess.run(
        [sys.executable, '-m', 'pip', 'show', 'chinesecalendar'],
        capture_output=True, text=True
    )
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
Checking whether a date is a Chinese holiday does not inherently require spawning a subprocess to run `python -m pip show`. This adds an execution capability unrelated to the core purpose and expands the skill's operational surface beyond straightforward calendar evaluation.

Context-Inappropriate Capability

Low
Confidence
88% confidence
Finding
The documentation expands the skill from simple holiday lookup into subprocess-driven package inspection and upgrade guidance. Introducing package-management workflows increases attack surface and operational risk, because it encourages shell execution and environment mutation unrelated to the core user task.

Description-Behavior Mismatch

Low
Confidence
93% confidence
Finding
The manifest says this skill is for determining whether a date is a Chinese holiday or adjusted workday. However, the file includes additional operational behavior to invoke pip, inspect the installed package version, and gate execution on package freshness, which goes beyond simple date-status detection.

Static analysis

No suspicious patterns detected.