Back to skill

Security audit

ai-usage-policy

Security checks for vulnerabilities and agentic risk

Overview

The skill itself is a simple offline policy generator, but its documented installation path uses unpinned global commands that could install different code than the reviewed artifact.

Review the skill content directly and prefer installing from a pinned, verified release or reviewed commit. The generator script appears local and narrow, but avoid the documented unpinned global install path unless you trust the npm package, GitHub repository, and future updates from the publisher.

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:80
Finding
Unpinned Third-Party Installation Chain<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:80-84` **Vulnerability Type**: Unpinned npm CLI and mutable Git repository installation **Risk Level**: Medium ### Vulnerable Code ```bash npx skills add zhaoxinghua09-cell/agent-skills -g git clone https://github.com/zhaoxinghua09-cell/agent-skills.git cp -r agent-skills/skills/ai-usage-policy ~/.workbuddy/skills/ ``` ### Technical Analysis The documented installation process relies on two third-party components whose exact contents are not pinned: 1. `npx skills` resolves and executes an unspecified version of the `skills` npm package. 2. `git clone` retrieves the external repository's mutable default branch without specifying a reviewed commit hash or immutable release tag. No checksum, signature, lock file, or commit verification is required before the retrieved content is installed. Consequently, the effective installer and skill contents may differ from the artifact covered by this audit. The global installation option (`-g`) can also expose all compatible agent sessions for the invoking user to compromised skill content. The local Python script reviewed in this artifact does not retrieve or execute remote payloads. The risk arises specifically from the installation instructions and their reliance on mutable external supply-chain sources. ### Attack Path 1. An attacker compromises the npm package, its maintainer account, the source repository, or another component in the publishing chain. 2. The attacker publishes a malicious version of the unpinned `skills` package or modifies the repository's default branch. 3. A user follows the documented installation instructions. 4. `npx` resolves and executes the altered npm package, or `git clone` downloads the altered skill content. 5. The modified content is installed globally or copied into the user's agent skill directory. 6. When the installed skill is loaded or invoked, attacker-controlled instructions or scripts may execute with the p ...[truncated 728 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the npm CLI to an explicitly reviewed version, for example: ```bash npx --yes skills@X.Y.Z add ... ``` 2. Pin repository installation to a reviewed commit hash rather than the mutable default branch: ```bash git clone https://github.com/zhaoxinghua09-cell/agent-skills.git cd agent-skills git checkout --detach <reviewed-commit-hash> ``` 3. Publish SHA-256 checksums or cryptographic signatures for release artifacts and require verification before installation. 4. Prefer immutable, signed release archives or verified tags over direct installation from a development branch. 5. Avoid global installation by default. Install into a restricted per-project skill directory unless global availability is explicitly required. 6. Document the expected npm package version, repository commit, and artifact digest together so users can verify that they are installing the audited release. 7. Review fetched skill instructions and executable scripts before loading or invoking them, especially when their content differs from the audited artifact. ]]>
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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
Findings (6)

Natural-Language Policy Violations

Medium
Confidence
86% confidence
Finding
The file mixes English and Chinese but prominently frames the skill and key operational context in Chinese, including the title and governance descriptions. Because there is no stated user opt-in, language-selection mechanism, or justification that the skill is intended only for Chinese-speaking users, this may violate language/locale policy requirements.

Lp3

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding
The skill advertises operational usage and installation guidance but does not declare any explicit tool scope such as permissions or allowed-tools, even though static analysis detected file-writing capability. In an agent ecosystem, missing tool constraints can let a model invoke broader file modification behavior than users expect, increasing the chance of unintended writes or policy bypass through ambiguous execution boundaries.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The skill's display names, description, usage guidance, and operational instructions are all written in Chinese, and the file does not provide an alternative language option or indicate that the skill is intentionally limited to Chinese-speaking users. This can violate a language/locale policy when users are not given a choice or explicit opt-in.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The installation instructions reference 'npx skills' without pinning a specific version, which makes execution dependent on whatever package version is current at install time. This creates a supply-chain and reproducibility risk: a compromised, renamed, or future-breaking package could run arbitrary code on the user's machine during installation.

Natural-Language Policy Violations

Low
Confidence
77% confidence
Finding
This file contains natural-language content primarily in Chinese, with only the title mirrored in English. Under the policy rule for language or locale constraints, this can be seen as a language preference imposed without explicit user opt-in or a documented justification.

Missing User Warnings

Low
Confidence
82% confidence
Finding
This code performs a filesystem write by creating parent directories and writing Markdown to the user-supplied path. While the CLI flag implies output behavior, the file-modifying action is not accompanied by an inline warning, comment, or docstring disclosure near the write operation.

Static analysis

No suspicious patterns detected.