Back to skill

Security audit

text-replace

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward bulk text replacement utility with user-directed writes, dry-run defaults, and backups before changes.

Install from a reviewed commit or release rather than a mutable branch or unpinned npx command. Before using --apply, run the default dry-run first, keep the glob narrow, and review the generated .bak backups for important files.

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 External Installer and Mutable Remote Skill Source## Vulnerability Details **File Location**: `SKILL.md`, lines 80–84 **Vulnerability Type**: Supply-chain risk caused by unpinned external dependencies and mutable remote sources **Risk Level**: Medium ### Vulnerable Code ```bash # One-command installation using the skills CLI npx skills add zhaoxinghua09-cell/agent-skills -g # Alternatively, clone and copy the skill manually git clone https://github.com/zhaoxinghua09-cell/agent-skills.git cp -r agent-skills/skills/text-replace ~/.workbuddy/skills/ ``` ### Technical Analysis The installation instructions invoke `npx skills` without specifying a reviewed package version or verifying package integrity. Depending on the local npm environment, `npx` may retrieve and execute the currently published version of the `skills` package. The effective installer can therefore differ from the component examined during this audit. The alternative installation method clones the mutable default branch of a remote Git repository. It does not check out a fixed commit or signed release and does not validate a checksum before copying files into a trusted Agent skill directory. Consequently, the installed content may differ from this audited artifact. This is classified as an insecure dependency and supply-chain issue rather than evidence that the currently bundled script is malicious. The reviewed `scripts/text_replace.py` contains no remote retrieval or malicious payload. ### Attack Path 1. An attacker compromises the relevant npm package, publisher account, Git repository, maintainer account, or upstream release process. 2. The attacker publishes or commits a modified installer, skill instruction file, or executable script. 3. A user follows the documented unpinned `npx` or `git clone` installation procedure. 4. The installation retrieves content that was not included in or validated by this audit. 5. The package installer may execute attacker-controlled code during installation, ...[truncated 898 chars]
Remediation
## Remediation Suggestions 1. Pin the npm CLI package to an explicitly reviewed version rather than invoking an unspecified current release: ```bash npx --yes skills@<reviewed-version> add zhaoxinghua09-cell/agent-skills@<reviewed-version-or-commit> -g ``` 2. Publish and verify the expected npm integrity digest or SHA-256 checksum before executing downloaded tooling. 3. Replace the mutable Git clone procedure with a checkout of a reviewed commit: ```bash git clone https://github.com/zhaoxinghua09-cell/agent-skills.git cd agent-skills git checkout --detach <reviewed-full-commit-hash> ``` 4. Prefer signed release tags and require successful signature verification before installation. 5. Publish checksums for release archives and instruct users to compare them before copying skill files. 6. Avoid global installation unless operationally necessary. Prefer a project-scoped or otherwise isolated installation with least-privilege permissions. 7. Review the retrieved tree after verification and before placing it in a trusted Agent skill directory.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (4)

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill describes and promotes file read/write behavior, including cross-file replacement and backup creation, but does not declare any explicit tool scope or permissions boundary. In agent environments, this can lead to over-broad file access being implicitly granted, increasing the chance of unintended modification of sensitive files or misuse if the skill is invoked in the wrong directory or with unsafe patterns.

Rp1

Medium
Category
MCP Rug Pull
Confidence
82% confidence
Finding
The installation instruction references `npx skills` without pinning a specific package version, which introduces a supply-chain risk because a future or compromised published package could execute unexpected code at install time. This is more concerning in a skill distribution context because users are encouraged to run the command directly from documentation, often with high trust and little review.

Natural-Language Policy Violations

Low
Confidence
79% confidence
Finding
Line L09 uses the category value "效率工具" in Chinese, which may impose a language-specific experience without any indication that users can choose their preferred language. The manifest does not document a locale-specific purpose that would justify this constraint.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
The argument parser description and multiple help/output strings are written in Chinese, which imposes a specific language on users. The file does not provide an alternative language option or explain that the skill is intentionally region- or locale-specific.

Static analysis

No suspicious patterns detected.