Back to skill

Security audit

Story English

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent English-learning prompt generator with no evidence of hidden execution, credential access, persistence, or data exfiltration.

Install only if you want an English-learning story prompt tool. Treat pasted story state or vocabulary lists as prompt input: avoid using state strings from untrusted people, and review generated prompts before giving them to an agent with powerful tools.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/episode.js:66
Finding

Untrusted Story State Is Embedded Directly into Agent Instructions

Content
View full analysis
{ const i = args.indexOf(flag); return i !== -1 && args[i+1] ? args[i+1] : def; }; const series = get('--series', 'shanghai'); const level = get('--level', 'B1').toUpperCase(); const chapter = parseInt(get('--chapter', '1'), 10); const state = get('--state', ''); const lang = get('--lang', 'zh'); ``` ```js ${state ? `STORY SO FAR (continue from this state): ${state} ` : `This is Episode 1. Introduce the world and main character. End on a hook that makes the reader want Episode 2.`} ``` ### Technical Analysis The `--state` argument is accepted as an arbitrary string and interpolated verbatim into a prompt intended for an AI agent. Although the documented input is JSON, the script does not call `JSON.parse`, validate a schema, impose a size limit, or separate the supplied data from executable prompt instructions. Consequently, a state value can contain newlines and imperative text that terminates the intended story-state context and introduces competing instructions. The `--level` and raw `--series` values are also reflected in the generated prompt without strict allowlist validation, although `--state` is the most direct and substantial injection surface. This script only prints the resulting prompt. It does not itself execute shell commands or invoke tools. Exploitation therefore depends on the generated output being passed to an AI agent, as intended by the Skill workflow. ### Attack Path 1. An attacker creates or shares a purported continuation-state JSON value containing embedded prompt instructions. 2. A user follows the documented workflow and passes that value to `episode.js` through `--state`. 3. The script inserts the complete value directly below the `ST ...[truncated 1008 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/vocab.js:8
Finding

Unvalidated Vocabulary Arguments Permit Agent Prompt Injection

Content
View full analysis
{ const i = args.indexOf(flag); return i !== -1 && args[i+1] ? args[i+1] : def; }; const words = get('--words', ''); const mode = get('--mode', 'quiz'); const lang = get('--lang', 'zh'); const isZh = lang === 'zh'; console.log(` You are a vocabulary coach for an English learning story skill. Run a ${mode} session. MODE: ${mode === 'quiz' ? 'QUIZ — test the user on vocabulary' : 'REVIEW — flashcard-style review'} LANGUAGE: ${lang} ${words ? `WORDS TO COVER: ${words}` : 'Generate a general vocabulary exercise using common English learning words at B1 level.'} ``` ### Technical Analysis The `--words`, `--mode`, and `--lang` command-line values are incorporated directly into an AI-agent prompt. The script performs no allowlist validation, character filtering, length checking, or structural encoding. In particular, `--words` can contain arbitrary multiline text rather than a bounded comma-separated vocabulary list. An attacker can therefore insert new headings or imperative instructions that compete with the intended quiz or review instructions. Arbitrary `--mode` and `--lang` values provide additional reflected prompt content. The script prints text only and does not directly execute commands. The security consequence arises when its output is consumed as an instruction prompt by an AI agent. ### Attack Path 1. An attacker supplies a crafted `--words` value or convinces a user to run a command containing it. 2. The value includes newline-delimited instructions disguised as vocabulary input. 3. `vocab.js` embeds the value directly after `WORDS TO COVER`. 4. The generated prompt is passed to an AI agent for quiz or review generation. 5. The agent may treat the injected content as a ...[truncated 828 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/series.js

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill description repeatedly frames the experience exclusively as English learning content and provides no indication that users can choose another language or opt into an English-only mode. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script sets --lang to zh by default and then uses that setting to require Chinese meanings, grammar explanations, and answer hints. This enforces a specific locale/language behavior unless the user explicitly overrides it, which is a natural-language policy concern when no opt-in is obtained first.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script defaults to zh when --lang is not provided, which imposes a specific language choice on users by default. The policy only permits locale constraints when the user is given a clear choice or the restriction is explicitly justified; here the user can override it, but there is no opt-in before the default Chinese output is selected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script defaults --lang to zh and then branches behavior based on that choice, causing Chinese-language output unless the user explicitly overrides it. This is a natural-language locale policy concern because the skill imposes a specific language by default rather than offering a neutral default or prompting for preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The documentation explicitly presents an English-output mode and the overall skill is framed around English learning, but it does not clearly state that language choice is optional or user-controlled beyond this one command example. This can be interpreted as steering output to a specific language/locale without an explicit opt-in policy statement.

Content

No source excerpt is available for this finding.