Back to skill

Security audit

@kanyun/rush-reskill-usage

Security checks for vulnerabilities and agentic risk

Overview

This skill is not malicious, but it gives an agent broad skill-management powers through a mutable third-party CLI and weakly scoped confirmation and token guidance.

Install only if you intend to let an agent manage skills and possibly publish to the reskill registry. Prefer a pinned, reviewed reskill version; avoid `npx ...@latest`, `--all`, global installs, and `-y` unless you explicitly want that scope; do not paste real tokens into command lines or shared agent transcripts.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T08 · Insecure Dependencies

Error
Location
SKILL.md:23
Finding
Unpinned Third-Party Package Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 23-31 **Vulnerability Type**: Unpinned and mutable third-party dependency execution **Risk Level**: High ### Vulnerable Code ```markdown **CLI execution approach:** To avoid downloading remote code on every invocation, we recommend installing reskill globally first: ```bash npm install -g reskill ``` If a global installation is not available, `npx reskill@latest` can be used as a fallback. The agent should check for a global install (`which reskill`) before falling back to npx. ``` ### Technical Analysis The instructions direct agents to install or execute the third-party `reskill` npm package without pinning it to a reviewed version or verifying an integrity digest. `npm install -g reskill` resolves a mutable package version and installs it globally. Depending on the package contents and npm configuration, installation can also execute lifecycle scripts. The global installation persists an executable in the user's environment. The fallback, `npx reskill@latest`, is especially sensitive because it downloads and executes whichever package release carries the `latest` tag at invocation time. Consequently, the effective executable code can change after this Skill has been reviewed. Checking for an existing executable with `which reskill` confirms only its presence, not its origin, version, or integrity. This creates a third-party supply-chain trust boundary. Package-account compromise, malicious publication, dependency confusion within the package's dependency graph, or registry compromise could convert the documented workflow into arbitrary code execution. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, registry response, or a transitive dependency used by `reskill`. 2. The attacker publishes a malicious release or causes the mutable `latest` resolution to select attacker-controlled content. 3. An agent follows the Skill and runs `npm ...[truncated 1033 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `reskill` to a specific, reviewed version rather than an unbounded package name or the `latest` tag. 2. Verify the package tarball against a trusted integrity digest before execution. 3. Prefer a project-local installation with a reviewed lockfile over a global installation. 4. Avoid `npx ...@latest`; if `npx` is necessary, use an exact version and disable interactive package substitution. 5. Disable npm lifecycle scripts during installation where the package's documented functionality permits it, and separately review any required scripts. 6. Verify an existing `reskill` executable by resolving its path, version, package origin, and integrity rather than relying only on `which reskill`. 7. Require explicit user approval before downloading or executing third-party package-manager code. 8. Run the CLI in a restricted environment with only the filesystem and network permissions required for the requested operation. 9. Document the exact trusted registry and consider enforcing npm provenance or signed-release verification. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:263
Finding
Registry Authentication Token Exposed Through Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 263-270 **Vulnerability Type**: Sensitive credential supplied as a command-line argument **Risk Level**: Medium ### Vulnerable Code ```markdown ### Authentication ```bash # Login with a token (obtain from the registry web UI) reskill login --registry https://rush.zhenguanyu.com --token <token> # Check current login status reskill whoami ``` ``` ### Technical Analysis The documented authentication command instructs users to place a registry token directly in a command-line argument. When the placeholder is replaced with a real secret, that secret can be exposed through several channels: - Interactive shell history - Terminal session recording - CI/CD command logs - Agent transcripts and tool-call records - Process-argument inspection by other local processes, depending on the operating system - Diagnostic or monitoring products that capture process command lines Although the document also mentions the `RESKILL_TOKEN` environment variable elsewhere, environment variables are not a complete mitigation because they can be inherited by child processes or exposed through diagnostics. A non-echoing interactive prompt, protected standard input, or a dedicated secret-manager integration is preferable. ### Attack Path 1. A user obtains a valid registry token. 2. Following the Skill, the user replaces `<token>` with the real credential and executes the command. 3. The complete command is retained in shell history, CI logs, terminal recordings, an agent transcript, or process-monitoring data. 4. An attacker with access to one of those records retrieves the token. 5. The attacker authenticates to the configured registry as the victim. 6. Subject to the token's assigned scope, the attacker publishes or replaces skills, accesses private registry resources, or impersonates the account. ### Impact Assessment The privileges obtained are limited by the exposed token's registry scopes. Potential co ...[truncated 452 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove examples that place authentication tokens directly in command-line arguments. 2. Make `reskill login` read the token from a non-echoing interactive prompt. 3. For automation, accept the token through protected standard input or a supported secret-manager integration. 4. If an environment variable must be used, inject it only for the required process, prevent diagnostic output from printing it, and unset it immediately afterward. 5. Redact tokens from CLI output, errors, telemetry, agent transcripts, and CI logs. 6. Ensure stored credentials such as `~/.reskillrc` are created with permissions that restrict access to the owning user. 7. Recommend narrowly scoped, short-lived publishing tokens and provide a clear revocation and rotation procedure. 8. Add an explicit warning that users must not substitute real secrets into commands that can be retained in shell history or logs. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Self-Modification

High
Category
Rogue Agent
Content
| `install [skills...]` | `i`                  | Install one or more skills                |
| `list`                | `ls`                 | List installed skills                     |
| `info <skill>`        | -                    | Show skill details                        |
| `update [skill]`      | `up`                 | Update skills                             |
| `outdated`            | -                    | Check for outdated skills                 |
| `uninstall <skill>`   | `un`, `rm`, `remove` | Remove a skill                            |
| `publish [path]`      | `pub`                | Publish a skill to the registry ¹         |
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Ae1

High
Category
analysis-evasion
Content
**Requirements**: The specified directory must contain a valid `SKILL.md` file following the [Agent Skills Specification](https://agentskills.io).
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
**Requirements**: The specified directory must contain a valid `SKILL.md` file following the [Agent Skills Specification](https://agentskills.io).
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Self-Modification

High
Category
Rogue Agent
Content
reskill update

# Update a specific skill
reskill update skill-name
```

### Global vs Project-Level Installation
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| `-a, --agent <agents...>` | `install`                            | Specify target agents (e.g., `cursor`, `claude-code`)         |
| `--mode <mode>`           | `install`                            | Installation mode: `symlink` (default) or `copy`              |
| `--all`                   | `install`                            | Install to all agents                                         |
| `-y, --yes`               | `install`, `uninstall`, `publish`    | Skip confirmation prompts                                     |
| `-f, --force`             | `install`                            | Force reinstall even if already installed                     |
| `-s, --skill <names...>`  | `install`                            | Select specific skill(s) by name from a multi-skill repo      |
| `--list`                  | `install`                            | List available skills in the repository without installing    |
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| `-a, --agent <agents...>` | `install`                            | Specify target agents (e.g., `cursor`, `claude-code`)         |
| `--mode <mode>`           | `install`                            | Installation mode: `symlink` (default) or `copy`              |
| `--all`                   | `install`                            | Install to all agents                                         |
| `-y, --yes`               | `install`, `uninstall`, `publish`    | Skip confirmation prompts                                     |
| `-f, --force`             | `install`                            | Force reinstall even if already installed                     |
| `-s, --skill <names...>`  | `install`                            | Select specific skill(s) by name from a multi-skill repo      |
| `--list`                  | `install`                            | List available skills in the repository without installing    |
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Missing User Warnings

Low
Confidence
87% confidence
Finding
The authentication section shows passing a token directly on the command line and notes token storage in `~/.reskillrc`, but it does not warn that CLI arguments may be captured in shell history, process listings, CI logs, or transcripts. This can lead to accidental credential disclosure, especially when an AI agent echoes commands or users copy-paste them into shared environments.