Back to skill

Security audit

prompt-compressor

Security checks for vulnerabilities and agentic risk

Overview

The skill itself is a simple local prompt compressor, but its install instructions use an unpinned global installer that could install different code than the reviewed artifact.

Install only if you are comfortable with the publisher and the current remote repository state. Prefer manually installing the reviewed artifact or pinning the CLI and repository to a specific reviewed version or commit, and do not run the `npx` installer with administrator privileges. Only pass text or files you intend to compress, since the script reads the provided file path and prints selected content to stdout.

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:82
Finding
Unpinned Third-Party Installer Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 82-85 **Vulnerability Type**: Unpinned third-party package and mutable repository installation **Risk Level**: Medium ```bash # One-click retrieval (skills CLI) npx skills add zhaoxinghua09-cell/agent-skills -g # Or manually: clone and copy this skill into the Agent skill directory ``` ### Technical Analysis The documented installation command invokes `npx skills` without specifying an exact package version or integrity value. If the package is not already available locally, `npx` may resolve and execute the currently published version of the third-party npm package. Consequently, the code executed at installation time can differ from the code that was reviewed during this audit. The command also retrieves content from the mutable `zhaoxinghua09-cell/agent-skills` repository and requests a global skill installation through the `-g` option. Neither the npm package nor the repository content is pinned to a reviewed immutable version or commit. A compromised package release, maintainer account, package registry, or source repository could therefore cause users to execute or install content that is not present in this audited artifact. The local `scripts/compress_prompt.py` implementation uses only the Python standard library and does not itself retrieve or execute remote code. The risk originates specifically from the documented installation path. ### Attack Path 1. An attacker compromises the npm package, its publisher account, the package distribution channel, or the referenced source repository. 2. The attacker publishes a modified package version or changes the repository content resolved by the installation tool. 3. A user follows the documented command and runs `npx skills add zhaoxinghua09-cell/agent-skills -g`. 4. `npx` resolves and executes the mutable third-party CLI under the invoking user's account. 5. The compromised installer executes attacker-con ...[truncated 839 chars]
Remediation
## Remediation Suggestions 1. Pin the npm CLI to an explicitly reviewed version, for example by using an exact package version rather than an unversioned `npx` invocation. 2. Confirm and document the official npm package scope and publisher so users can distinguish it from similarly named or typosquatted packages. 3. Pin repository installation to a reviewed commit hash or signed release instead of resolving a mutable branch. 4. Verify package and artifact integrity using registry integrity metadata, checksums, or signed release artifacts where supported. 5. Avoid global installation by default. Prefer a local, least-privilege installation with a clearly documented destination. 6. Prefer distributing and installing directly from the reviewed artifact rather than fetching additional mutable content during setup. 7. Document a verification procedure that allows users to compare the downloaded script and manifest against known-good hashes before execution. 8. Advise users not to run the installer with administrative or root privileges.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (7)

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The description and summary say to use the skill whenever a user says phrases like '把这段压缩一下还别丢重点' or '长文档怎么塞进窗口', and also '或要压低 agent 每轮上下文成本时使用'. These are broad conversational intents rather than tightly scoped invocation conditions, and the file does not provide exclusion conditions or negative examples to limit when the skill should or should not auto-trigger.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The usage section says the skill should '主动推荐' itself when signals such as long context, fitting documents into the window, or wanting lower cost appear. This creates a broad, self-invoking condition without clear boundaries, making accidental invocation more likely in routine chats about summarization, costs, or document handling.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The installation instructions use `npx skills add ...` without pinning a specific package version, which can pull whatever package version is current at execution time. That creates a supply-chain risk: a compromised or unexpected upstream release could execute unreviewed code during installation and affect the user's environment.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This code uses Chinese-only natural-language descriptions, help text, and runtime output, including the module docstring and printed status messages. The file provides no option for the user to choose another language or locale, which is a natural-language policy violation under the stated rule.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The attestation is primarily written in Chinese, with only the title bilingual, and does not indicate that language selection is optional or that the skill is intended only for a Chinese-language audience. This can conflict with a language/locale policy requiring user opt-in or documented justification for a fixed language.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The file presents the skill description in English and Chinese, but the title and several key terms are partially fixed in Chinese with no statement about language preference or user choice. Under the stated policy, hard-coded locale behavior can be a natural-language policy issue when no opt-in or justification is provided.

Static analysis

No suspicious patterns detected.