Back to skill

Security audit

Pencil Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Pencil design-file helper; it can modify .pen files as advertised, with a normal supply-chain caution around the unpinned npx installer.

Install only from a trusted source and prefer a pinned or organization-approved skills installer instead of an unpinned npx command. When using the write tools, run them only against intended .pen files, review operations before execution, and keep the generated .pen.bak backups until changes are verified.

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
README.md:38
Finding

Unpinned Third-Party Package Execution During Installation

Content
View full analysis

Vulnerability Details

File Location: README.md:38-42
Vulnerability Type: Unpinned third-party package execution through npx
Risk Level: Medium

Vulnerable Code

markdown
## Installation

```bash
npx skills add de-novo/pencil-skill
text

### Technical Analysis

The documented installation command invokes `npx` without pinning the `skills` package to a reviewed version or verifying its integrity. If the package is not already available locally, `npx` may retrieve the current package release from the configured npm registry and immediately execute its command-line entry point.

Consequently, the code executed during installation can differ from the code reviewed in this project. This creates a supply-chain trust boundary involving the registry, package maintainers, publisher credentials, and the user's npm configuration. The audited project itself does not contain a malicious dependency or remote-execution implementation; the risk arises from the unpinned installation guidance.

### Attack Path

1. An attacker compromises the upstream `skills` package, its maintainer account, publishing credentials, or the package source delivered by the configured registry.
2. The attacker publishes a malicious or backdoored release under the expected package name.
3. A user follows the documented command without specifying a trusted version.
4. `npx` resolves and downloads the attacker-controlled release.
5. `npx` executes the package entry point with the privileges and environment of the invoking user.
6. The malicious package can perform actions allowed to that user before or while installing the requested skill.

### Impact Assessment

Successful exploitation permits arbitrary code execution with the invoking user's privileges. Depending on that user's permissions and environment, the malicious package could read or alter accessible files, steal environment-held credentials, modify development projects, t
...[truncated 297 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the installer to an explicitly reviewed version:
    bash
    npx skills@<verified-version> add de-novo/pencil-skill
    
  2. Document the expected npm registry and advise users to verify that their npm configuration does not redirect package resolution to an untrusted source.
  3. Publish and document the expected package integrity digest or signed provenance where supported.
  4. Prefer a previously installed, organization-approved installer in controlled environments instead of allowing npx to retrieve executable code on demand.
  5. Use lockfiles, registry allowlists, package provenance verification, and restricted installation environments in automated deployments.
  6. Avoid running the installation command with elevated privileges and minimize credentials exposed to the installation process.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (14)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 186)May include surrounding context.

md
1. Check existing variables with `get-variables.mjs`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 237)May include surrounding context.

md
1. Check existing variables with `get-variables.mjs`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 204)May include surrounding context.

md
2. If found, duplicate using `batch-design.mjs` `copy` op

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 243)May include surrounding context.

md
2. If found, duplicate using `batch-design.mjs` `copy` op

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 264)May include surrounding context.

md
2. If found, duplicate using `batch-design.mjs` `copy` op

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 235)May include surrounding context.

md
| `read-tree.mjs` | Print node tree structure | `node scripts/read-tree.mjs file.pen [--depth 2] [--id nodeId]` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 236)May include surrounding context.

md
| `search-nodes.mjs` | Search nodes | `node scripts/search-nodes.mjs file.pen --type frame [--reusable] [--name regex]` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 238)May include surrounding context.

md
| `find-space.mjs` | Find empty-space coordinates | `node scripts/find-space.mjs file.pen --width 300 --height 200` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 244)May include surrounding context.

md
| `replace-props.mjs` | Bulk property replacement | `node scripts/replace-props.mjs file.pen --match '{"fill":"#FF0000"}' --replace '{"fill":"$color.primary"}'`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 437)May include surrounding context.

md
- [pen-types.ts](references/pen-types.ts): TypeScript type definitions

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The README instructs users to run npx skills add de-novo/pencil-skill, which relies on resolving and executing the latest skills package at install time without a pinned version or integrity constraint. This creates a supply-chain risk: if the upstream package is compromised, typosquatted, or changes behavior, users may execute unintended code during installation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file documents write tools that can insert, update, delete, move, and copy nodes in .pen files, including a dedicated delete operation. While the tool behavior is explained, the skill description does not include a clear user-facing warning that these actions modify user design files and may remove content, which is the kind of data-affecting behavior SQP-2 expects to be disclosed.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

L010 explicitly defines the allowed spacing values as 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96. However, the example later marks space.page: 120 as part of the correct configuration, which contradicts the documented rule rather than merely omitting detail.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This is a markdown file, so SQP-2 applies to descriptions and examples that could affect user data or system integrity. The example explicitly tells the user to run a CLI command to set variables in a design file, but the surrounding text does not warn that it will modify the file or advise caution/backups.

Content

No source excerpt is available for this finding.