Back to skill

Security audit

Wip Readme Format

Security checks for vulnerabilities and agentic risk

Overview

This README formatter is mostly purpose-aligned, but its deploy path contains a real command-injection risk when run on an untrusted repository.

Install only if you trust the source and use it on repositories you control. Run --dry-run first, review generated README-init-* files, and avoid --deploy on untrusted checkouts until the shell command construction is fixed to use an argument-array API such as execFileSync.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T01 · Skill Instruction Hijacking

Warning
Location
format.mjs:93
Finding

Generated README Injects Persistent Instructions into Downstream AI Sessions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
format.mjs:350
Finding

Repository-Controlled Filename Enables Shell Command Injection During Deployment

Content
View full analysis
f.startsWith('README-init-')); const allUntracked = initFiles.every(f => { try { const status = execSync(`git status --porcelain "${f}"`, { cwd: repoPath, encoding: 'utf8' }).trim(); return status.startsWith('??'); } catch { return false; } }); if (allUntracked && initFiles.length > 0) { fail('Init files have not been reviewed. They are all untracked (just generated).'); console.log(' Review the README-init-*.md files, edit as needed, then git add them before deploying.'); console.log(' Or commit them first so there is a review trail.'); process.exit(1); } } catch {} ``` ### Technical Analysis `readdirSync(repoPath)` obtains filenames directly from the target repository. Every filename beginning with `README-init-` is interpolated into a command string passed to `execSync`. Although the filename is placed inside double quotes, double-quoted shell strings still process constructs such as command substitution using `$(...)` or backticks. Repository filenames can contain these shell metacharacters on supported filesystems. The application therefore treats untrusted filename data as shell syntax. For example, a filename shaped like the following satisfies the prefix filter: ```text README-init-$(touch injected-marker).md ``` When interpolated, the resulting shell command is equivalent to: ```bash git status --porcelain "README-init-$(touch injected-marker).md" ``` The shell executes `touch injected-marker` before invoking Git. More damaging commands could be substituted. The surrounding `try`/`catch` blocks do not mitigate the vulnerability because injected commands execute before an exception i ...[truncated 1747 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description says the skill can "Reformat any repo's README," which is a broad natural-language activation description without constraints on when it should or should not be invoked. Because this is a markdown/manifest file, the lack of narrower trigger conditions or exclusion examples increases the chance of unintended invocation for general README-related requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly states that it rewrites README.md and moves technical content to TECHNICAL.md, but it lacks a prominent warning about these destructive file modifications. In agent-driven workflows, unclear write-side effects can cause unintended documentation changes, content relocation, and CI/review disruption, especially if invoked automatically or on the wrong repository.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description says the skill can reformat "any repo's README," but it does not define activation constraints, trigger phrases, or exclusion conditions. In a manifest file, this broad natural-language scope can make invocation boundaries unclear and increases the chance of unintended activation for general README-related requests.

Content

No source excerpt is available for this finding.