Back to skill

Security audit

China Holiday Calculator

Security checks for vulnerabilities and agentic risk

Overview

This is a simple China holiday/date utility with no hidden persistence or data access; the main caution is an unpinned third-party dependency.

Install this only in a normal low-privilege Python environment and consider pinning or reviewing the chinese-calendar package before use. Expect China-specific holiday logic and Chinese-language CLI output.

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
requirements.txt:1
Finding
Unpinned Third-Party Dependency Permits Unreviewed Package Updates## Vulnerability Details **File Location**: `requirements.txt:1`; dependency imported at `holiday.py:10-13` **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code ```text chinese-calendar ``` ### Technical Analysis The project declares `chinese-calendar` without an exact version constraint or integrity hash. Package installation therefore resolves whichever compatible release is available from the configured package index at installation time. This makes builds non-reproducible and prevents the audited source from guaranteeing which dependency code users will execute. The application imports this dependency when `holiday.py` starts. Python executes package-level initialization code during import, so a compromised or maliciously replaced release could execute arbitrary code without requiring an additional explicit call into the package. This finding does not establish that the current `chinese-calendar` package is malicious. The risk arises from accepting mutable, unverified third-party releases. ### Attack Path 1. An attacker compromises the dependency's publisher account, release infrastructure, package-index entry, or another part of its distribution chain. 2. The attacker publishes a malicious release under the legitimate package name. 3. A user or deployment pipeline runs `pip install -r requirements.txt`. 4. Because no exact version or hash is specified, the installer may retrieve the attacker-controlled release. 5. The user runs `holiday.py`. 6. Python imports `chinese_calendar`, executing attacker-controlled package initialization code with the privileges and environment access of the current process. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the account that installs or runs the project. The accessible scope may include that account's files, environment variables, credentials available to the process, and network ...[truncated 214 chars]
Remediation
## Remediation Suggestions 1. Pin the dependency to a reviewed exact version, for example: ```text chinese-calendar==<reviewed-version> ``` 2. Generate and verify cryptographic hashes for the selected distribution, and install with `pip --require-hashes`. 3. Maintain a lock file or fully pinned requirements file so development, CI, and production resolve identical artifacts. 4. Restrict package installation to a trusted index or an internally controlled package mirror. 5. Run dependency vulnerability and provenance checks in CI before accepting updates. 6. Review dependency updates explicitly rather than automatically accepting the newest published release. 7. Execute the application with least privilege and avoid exposing unnecessary credentials through environment variables.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file describes the skill exclusively as a Chinese mainland calendar service and presents the documentation primarily in Chinese, with no indication that users can choose another language or locale. Under the policy, locale or language constraints should be opt-in or explicitly justified as region-specific; here the skill is tied to mainland China throughout the description without such clarification.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The module description states the service in Chinese, and all user-facing strings throughout the CLI are Chinese-only. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation unless the locale restriction is explicitly justified.

Unpinned Dependencies

Low
Category
Supply Chain
Content
chinese-calendar
Confidence
92% confidence
Finding
The dependency is specified without a version pin, which makes builds non-reproducible and allows future installs to pull in unexpected upstream changes. If the package is compromised, yanked, or a breaking/malicious release is published, this skill could silently consume that version during installation.

Static analysis

No suspicious patterns detected.