Back to skill

Security audit

Audit Code

Security checks for vulnerabilities and agentic risk

Overview

The skill’s audit instructions are coherent, but its bundled install/sync script can overwrite or delete user-writable agent skill directories with weak path guardrails.

Review this before installing if you plan to use the bundled sync script. Prefer the platform’s normal reviewed install flow, avoid unpinned npx execution, do not run the script with untrusted --skill-name or --source values, and expect the script to modify persistent agent skill directories. The audit instructions themselves do not show malicious behavior.

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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sync-to-agents.sh:60
Finding
Unvalidated skill name permits out-of-root deletion and overwrite## Vulnerability Details **File Location**: `scripts/sync-to-agents.sh`, lines 60-61 and 105-129 **Vulnerability Type**: Path traversal leading to arbitrary deletion or overwrite within the current user's permissions **Risk Level**: High ### Vulnerable Code ```bash --skill-name) SKILL_NAME="$2" shift 2 ;; ``` ```bash dest="$root/$SKILL_NAME" if [[ "$dest" == "$SOURCE_DIR" ]]; then echo "[$agent] source already at target ($dest), skipping" continue fi mkdir -p "$root" if [[ "$METHOD" == "symlink" ]]; then if [[ -e "$dest" || -L "$dest" ]]; then rm -rf "$dest" fi ln -s "$SOURCE_DIR" "$dest" echo "[$agent] symlinked $dest -> $SOURCE_DIR" else if [[ -L "$dest" ]]; then rm -f "$dest" fi mkdir -p "$dest" rsync -a --delete \ --exclude '.git' \ --exclude '.git/*' \ --exclude '.DS_Store' \ "$SOURCE_DIR/" "$dest/" echo "[$agent] copied to $dest" fi ``` ### Technical Analysis The script accepts `--skill-name` as an unrestricted string and appends it directly to an agent-specific root directory. It does not reject path separators, `..` components, control characters, or names that resolve outside the intended skill directory. The resulting path is passed to security-sensitive filesystem operations: - `rm -rf "$dest"` recursively deletes an existing destination in symlink mode. - `mkdir -p "$dest"` creates attacker-selected directory paths. - `rsync -a --delete` overwrites the destination and removes files that do not exist in the source tree. - `ln -s` creates a link at the attacker-selected location. Shell quoting prevents word splitting and command substitution, but it does not prevent filesystem path traversal. The equality check against `SOURCE_DIR` protects only one exact path and does not establish that the destination remains beneath the selected agent root. ### Attack Path 1. An attacker influences arguments pas ...[truncated 1475 chars]
Remediation
## Remediation Suggestions 1. Treat `--skill-name` strictly as a directory basename. Permit only a narrow character set, such as letters, digits, periods, underscores, and hyphens. 2. Explicitly reject empty names, `.`, `..`, slash characters, backslashes, control characters, and names beginning with traversal components. 3. Canonicalize the agent root and candidate destination before performing any destructive operation. 4. Verify that the canonical destination is a direct child of the canonical agent root, rather than merely sharing a textual prefix. 5. Add a second boundary check immediately before every `rm`, `rsync`, and `ln` operation. 6. Prefer deleting only a known skill directory instead of using unrestricted `rm -rf`. 7. Consider requiring confirmation before replacing an existing non-symlink directory. 8. Add regression tests using empty names, `.` and `..`, nested paths, absolute-looking values, repeated traversal components, and destinations involving symlinks. Every test should assert that no path outside the agent skill root was modified.

T08 · Insecure Dependencies

Warning
Location
README.md:49
Finding
Documentation recommends executing an unpinned package through npx## Vulnerability Details **File Location**: `README.md`, lines 49-55 **Vulnerability Type**: Mutable third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```markdown ## Optional: install via `npx skills` If this repo is published remotely, you can install/update with the open installer: ```bash npx skills add <owner>/<repo> -a codex -a claude-code -a cursor --method copy ``` ``` ### Technical Analysis The documented installation command invokes the `skills` npm package without an exact version. Depending on the local npm and `npx` state, the command can download and execute the package version currently resolved by the registry. Consequently, the executed installer is not fixed to the version that was reviewed when this repository was published. Its effective behavior can change due to a new release, maintainer account compromise, package takeover, registry compromise, or a malicious dependency introduced into a later release. This is a supply-chain risk rather than evidence that the current `skills` package is malicious. The unsafe property is that the documentation asks users to execute mutable third-party code without version or integrity constraints. ### Attack Path 1. A user follows the optional installation instructions in the README. 2. The user's environment does not already have a verified, trusted copy of the required package version. 3. `npx` resolves and downloads the package version available from the configured npm registry. 4. A compromised or malicious resolved package executes with the user's operating-system permissions. 5. The package can access user-readable data and modify user-writable files, including global agent skill directories. Exploitation depends on compromise or malicious publication within the package's registry supply chain; no such compromise was established during this audit. ### Impact Assessment Code executed through `npx` receives ...[truncated 611 chars]
Remediation
## Remediation Suggestions 1. Pin the installer to an audited exact version rather than relying on the registry's current default version. 2. Document the expected package publisher, repository, exact version, and integrity information so users can verify provenance. 3. Prefer a lockfile-backed installation workflow where practical. 4. Avoid recommending flags that suppress installation review or confirmation. 5. Make the corrected local synchronization script the primary installation method, with the external installer clearly identified as an optional trust boundary. 6. Establish a dependency review process before updating the documented version. 7. Verify in a clean environment that the documented command resolves only the expected version and integrity digest.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
There is a clear mismatch between the declared purpose and the actual behavior. The description claims the skill performs a sophisticated code audit and generates a prioritized report, but the code shown does not inspect code quality, security, performance, UX, DX, APIs, infra, or edge cases at all. Instead, it is an installation/synchronization script for distributing the skill files into agent-specific directories under the user's home folder. This is a materially different primary purpose and involves filesystem modification capabilities that are not reflected in the description.

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.

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.

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.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The description says to use the skill when the user asks to "audit code," "perform a deep review," "stress-test a codebase," or produce a remediation plan across many areas. These phrases are broad and common in ordinary development conversation, and the file does not provide negative examples or clearer constraints for when this skill should vs. should not activate.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The skill manifest describes a code-auditing capability that produces review findings, but this script creates directories, deletes existing destinations, creates symlinks, and copies repository contents into agent skill folders. Those local installation and deployment behaviors are not a direct or obvious requirement of auditing code itself.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
In symlink mode, the script unconditionally runs rm -rf on the destination path if it already exists. Because the destination incorporates user-controlled inputs such as --skill-name, a mistaken or unsafe value can cause deletion of an unintended directory under the agent root with no confirmation, backup, or path safety guardrails.

Description-Behavior Mismatch

Low
Confidence
94% confidence
Finding
The manifest describes a skill whose purpose is to perform a two-pass multidisciplinary code audit, but most of this file is devoted to copying or symlinking the skill into agent-specific directories and using installer tooling. That operational distribution behavior is distinct from the audit functionality the skill claims as its primary purpose.

Missing User Warnings

Low
Confidence
85% confidence
Finding
The script invokes `rsync -a --delete`, which performs file synchronization and deletes files in the destination that are absent from the source. While this behavior fits the sync purpose, the help text does not explicitly warn that destination contents may be removed during copy mode.

Static analysis

No suspicious patterns detected.