Back to skill

Security audit

Shadows Oneshot Fix

Security checks for vulnerabilities and agentic risk

Overview

This quick-fix skill is not malicious, but it needs review because its verification commands can run unsafe shell strings and may fetch npm tooling despite claiming no network access.

Review this skill before installing. It is suitable only for trusted repositories and simple, clearly targeted edits. Verification commands should be run with argument-safe execution and trusted local tools; avoid unpinned npx resolution, and be cautious about broad phrases that might trigger the skill on tasks needing deeper investigation.

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
SKILL.md:79
Finding
Shell Command Injection Through Unquoted File Path Placeholders<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:79-87` **Vulnerability Type**: Unquoted shell argument injection **Risk Level**: High ### Vulnerable Code ```bash # Python — syntax check python -m py_compile {file} # TypeScript — type check (suppress non-critical output) npx tsc --noEmit {file} 2>/dev/null # Run specific test if applicable python -m pytest {test_file} -x -q 2>/dev/null ``` ### Technical Analysis The Skill instructs the agent to interpolate `{file}` and `{test_file}` directly into shell command strings without argument-safe execution, path validation, or shell quoting. If either value contains shell metacharacters, the shell can interpret part of the filename as a separate command, redirection, pipeline, or command substitution. This affects all three documented verification commands. Merely surrounding a value with ordinary quotes may also be insufficient if the quoting implementation does not safely handle embedded quote characters. The robust approach is to invoke the executable with an argument array and without a shell. ### Attack Path 1. An attacker creates a repository file whose path contains shell syntax, or persuades the user to identify such a path as the target or test file. 2. The Skill reads or edits that file and reaches the mandatory verification phase. 3. The agent replaces `{file}` or `{test_file}` with the attacker-influenced path. 4. The resulting string is passed to a shell. 5. The shell interprets metacharacters in the path and executes the injected command in addition to, or instead of, the intended compiler or test command. For example, a malicious path containing a command separator could transform the verification operation into multiple shell commands if interpolated verbatim. ### Impact Assessment Successful exploitation can execute arbitrary local commands with the same operating-system identity and permissions as the agent process. The accessible scope can include repository contents, fil ...[truncated 442 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Do not construct verification commands through string interpolation. - Invoke executables directly with argument arrays, such as `["python", "-m", "py_compile", file]`, with shell processing disabled. - Apply the same argument-safe method to TypeScript and test-runner commands. - Validate that target paths resolve within the intended repository root. - Reject paths containing NUL bytes or paths that escape the repository through traversal or symbolic links. - If the available tool API only accepts shell strings, use a platform-appropriate, well-tested shell-escaping routine rather than manual quoting. - Add test cases covering spaces, quotes, command separators, command substitutions, leading hyphens, and newline characters in filenames. - Where supported, place `--` before positional paths to prevent filenames beginning with `-` from being interpreted as options. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:83
Finding
Unpinned npx Package Resolution May Execute Untrusted Dependency Code<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:35, 83, 105-111` **Vulnerability Type**: Unsafe and unpinned dependency execution **Risk Level**: Medium ### Vulnerable Code ```markdown - `npx` — Used for `npx tsc --noEmit {file}` type check on `.ts` files. Detected via `which npx`. ``` ```bash # TypeScript — type check (suppress non-critical output) npx tsc --noEmit {file} 2>/dev/null ``` ```markdown - **Commands executed**: Optional compile check (`python -m py_compile`, `npx tsc --noEmit`) or test run (`pytest`, `jest`, `vitest`) in the verification step. These execute local code in the repository. - **Data read**: Source files in the local repository (1-2 files maximum). - **File modification**: Edits the target source file with a minimal diff. - **Network access**: None. - **Persistence**: None. - **Credentials**: None required. - **Sandboxing**: The verification step runs local code (compile/test). Safe for trusted repositories. For untrusted code, skip verification or run in a sandbox. ``` ### Technical Analysis The prerequisite check establishes only that `npx` is installed. It does not verify that a trusted, lockfile-pinned local `typescript` package or compiler binary exists. Depending on the installed npm/npx version and configuration, invoking `npx tsc` without a suitable local executable may trigger package resolution and downloading. The command does not pin a package name and version, require a lockfile-installed dependency, disable installation, verify package integrity, or confirm that the resolved `tsc` executable belongs to the intended TypeScript package. Consequently, verification may execute package code that was not part of the audited repository state. This behavior also conflicts with the explicit declaration that the Skill performs no network access. Redirecting standard error to `/dev/null` can conceal warnings or package-resolution diagnostics that would otherwise alert the operator. ### Attack Path 1. The S ...[truncated 1360 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Require TypeScript to be installed locally from the project's lockfile before running verification. - Invoke the verified local compiler binary directly, such as `node_modules/.bin/tsc`, using an argument array and with shell processing disabled. - If `npx` must be retained, use installation-disabled behavior such as `npx --no-install tsc`, subject to the installed npm version, and fail safely if the executable is unavailable. - Verify that the local executable resolves inside the expected project dependency directory and corresponds to the lockfile-pinned `typescript` package. - Do not automatically download a compiler during verification. - Remove `2>/dev/null`; preserve diagnostics so package-resolution and verification failures remain visible. - Skip TypeScript verification and recommend manual verification when a trusted local compiler cannot be established. - Update the network-access documentation to reflect actual behavior, or technically enforce the stated no-network policy through sandboxing and package-manager configuration. - Run compiler and test commands in a restricted sandbox for untrusted repositories, with unnecessary credentials removed and outbound network access disabled. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrases include broad everyday language such as 'just fix it' and 'quick fix', which can cause the skill to activate in contexts that are not actually small, well-understood changes. Because this skill emphasizes zero exploration and minimal analysis, accidental activation can lead to under-scoped changes or unsafe edits in situations that require deeper review.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The skill instructs use of `npx tsc --noEmit {file}` without pinning a specific package/version. In environments where `tsc` is not already installed locally, `npx` may resolve and execute an unexpected package version, introducing supply-chain risk and non-deterministic behavior during verification.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
This verification command runs `npx tsc --noEmit {file}` without version pinning. That can fetch or invoke an unintended TypeScript package, which is especially risky because the skill is designed for autonomous execution and presents the command as a standard safe verification step.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
python -m pytest {test_file} -x -q 2>/dev/null
```

If no verification tool is available, report: "No compiler/test runner detected for this file type. Manual verification recommended."

---
Confidence
75% 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.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
The security section normalizes `npx tsc --noEmit` as an executed command even though it is not pinned. This increases the chance that operators will treat it as low-risk despite potential package resolution and supply-chain exposure from `npx`.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- **Network access**: None.
- **Persistence**: None.
- **Credentials**: None required.
- **Sandboxing**: The verification step runs local code (compile/test). Safe for trusted repositories. For untrusted code, skip verification or run in a sandbox.

---
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.

Static analysis

No suspicious patterns detected.