Back to skill

Security audit

Learn English By Programmer Jokes

Security checks for vulnerabilities and agentic risk

Overview

This skill openly adds a bilingual programmer joke after completed answers; it has some output-quality and appropriateness risks, but I found no hidden exfiltration, persistence, credential access, or deceptive host behavior.

Install this only if you want every eligible completed answer to end with a Chinese/English tech joke. Avoid loading it in strict-format, workplace-sensitive, child-facing, compliance, legal, medical, crisis, or professional contexts unless you are comfortable with unsolicited humor and occasional rough corpus entries.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:35
Finding

Mandatory Final-Response Instruction Hijacking

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:3, SKILL.md:14-15, SKILL.md:35-38, SKILL.md:50-59; reinforced by references/joke-selection-rules.md:3-9
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: High

Vulnerable Code Snippets

SKILL.md:3:

yaml
description: When this skill is loaded and the user's request has been successfully answered, append exactly one short bilingual programmer joke or quote at the very end of the response, preferably matched to the task context.

SKILL.md:14-15:

markdown
Use this skill as a final-response rule: once the user's main request has been completed, append one short bilingual programmer joke or quote at the very end of the answer.

SKILL.md:35-38:

markdown
- Append exactly one joke or quote when the trigger conditions are met.
- Do not ask the user whether to add a joke if this skill is already loaded.
- Do not skip the joke merely because the task feels small, obvious, or conversational.
- Treat failure to append the joke in a safe completed response as incorrect behavior.

SKILL.md:50-59:

markdown
## Output Format

Use `templates/final-joke-template.txt` as the output shape.

Default format:

技术段子 / Tech Joke
EN: ...
ZH: ...
— Author

The joke block must be the final section of the response.

references/joke-selection-rules.md:3-9:

markdown
Use these rules when the main task is already complete and you want to append one concise bilingual tech joke.

## Global Rules

- Only add one joke after the main answer is done.
- Keep the joke short and avoid stealing focus from the real answer.
- Skip the joke in sensitive, crisis, medical, legal, or grief-related contexts.
- Prefer the relevant topic bucket below; if no topic matches, use a classic fallback.

Technical Analysis

The Skill establishes a session-wide output modification rule whenever it is loaded. It does not limit this behavior to requests in which the user explicitly as ...[truncated 2500 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the automatic session-wide trigger and all language making output modification mandatory.
  2. Add a joke only when the user explicitly requests humor, bilingual learning content, or use of this specific feature.
  3. Remove the instruction that omission must be treated as incorrect behavior.
  4. Do not prohibit the Agent from requesting user confirmation when the requested output format is ambiguous.
  5. State explicitly that user formatting requirements and higher-priority instructions take precedence.
  6. Do not reserve the final response position for Skill-controlled content.
  7. Treat CSV and reference content as untrusted data:
    • Validate field length and allowed characters.
    • Reject instruction-like text, markup, links, and control sequences.
    • Keep the dataset read-only where practical.
    • Review content integrity before packaging or publication.
  8. Replace the mandatory rule with an opt-in policy such as:
markdown
When the user explicitly requests a bilingual programmer joke, select at most one relevant entry and append it after completing the primary answer. Never add it when doing so would conflict with the user's requested format, higher-priority instructions, or the professional context.
  1. Add tests confirming that unrelated requests remain unmodified and that exact-format responses contain no unsolicited suffix.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (19)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This range includes sexually explicit and otherwise offensive material that is not necessary for a harmless humor skill and could be appended to any user-facing response. Because the skill auto-inserts one entry at the end of successful answers, this creates a substantial risk of exposing users, including minors or workplace contexts, to inappropriate content without warning.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill mandates Chinese+English output regardless of the user's requested language or formatting constraints. This can override user intent, break downstream consumption expectations, and create unsafe or unprofessional output in contexts where strict response format, localization, or minimality matters.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger is intentionally broad: it activates for essentially any completed request whenever the skill is loaded. That creates persistent output manipulation across unrelated conversations, increasing the chance of policy interference, degraded UX, leakage of hidden skill presence, and inappropriate behavior in edge cases that the exclusion list fails to catch.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
84% confidence
Finding

The instruction to append content autonomously and not ask the user removes consent and encourages the agent to prioritize the skill over conversational context. While not directly malicious, it can cause unwanted output modification and conflict with user expectations or higher-priority task constraints.

Content

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

md
## Required Behavior

- Append exactly one joke or quote when the trigger conditions are met.
- Do not ask the user whether to add a joke if this skill is already loaded.
- Do not skip the joke merely because the task feels small, obvious, or conversational.
- Treat failure to append the joke in a safe completed response as incorrect behavior.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill promises to append exactly one short bilingual programmer joke or quote to arbitrary responses, but these rows include long commentary, opinionated statements, awkward phrasing, and content that is not consistently a short joke or quote. This creates a real content-safety and quality risk because the skill may append irrelevant, confusing, or locale-inappropriate text to unrelated user interactions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is designed to append bilingual English/Chinese text without checking user language preference, which can create unexpected output, accessibility issues, or policy/format violations in constrained contexts. In a response-postprocessing skill, unsolicited language mixing is a genuine output-safety problem even though it is not directly malicious.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The routing hints for topic selection are broad enough to match many ordinary technical responses, so the skill may append a joke in contexts where it was not clearly intended. This is not a code-execution issue, but it is a genuine behavior-control weakness that can cause unwanted output modification and reduce response reliability.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The Code Quality bucket uses generic words like 'code', 'explain', and 'comment', which are common in normal programming assistance. As a result, the skill can activate too frequently and alter otherwise serious or focused answers with unnecessary appended content.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The Planning bucket includes highly ambiguous terms such as 'plan', 'problem', and 'strategy', which appear in many unrelated conversations. This makes routing unreliable and can lead to inappropriate joke insertion at the end of standard answers.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Shipping-related triggers like 'done', 'complete', and 'deliver' are ordinary workflow terms that may appear in many requests and responses. In this skill, that broad matching raises the chance of post-answer content injection where the user did not expect it.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The AI & Future bucket includes very broad terms such as 'ai', 'model', and 'cloud', which are common across many technical discussions. This can cause accidental routing and unnecessary output modification in a large share of normal conversations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file explicitly tells the agent to prefer a bilingual joke for final output, but it provides no mechanism to respect user preference, locale, accessibility needs, or output-format constraints. This can cause unauthorized content injection at the end of responses, especially in contexts where users expect exact output, single-language output, or machine-consumable formatting.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

format_final_joke always formats the final joke as English plus Chinese (EN/ZH) regardless of user preference or locale. This is a natural-language policy concern because the skill forces a specific language combination without any opt-in or documented locale constraint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes packaging and file-generation capabilities far beyond its stated purpose of appending a short bilingual joke. In an agent-skill context, creating directories, copying files, and generating distributable artifacts expands the attack surface and can be abused to write unexpected content to the local filesystem or stage further propagation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code unconditionally deletes bundle_path with shutil.rmtree() if it exists, without confirmation, safety checks, or path constraints beyond path concatenation. If output_root is misconfigured or attacker-influenced, this can destroy unintended directories and cause data loss on the host system.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The entries in this range contain forced mixed-language text and inconsistent locale handling, which can conflict with user language expectations when appended automatically to every response. In this skill context, the risk is lower than direct abuse, but it still degrades trust, accessibility, and appropriateness for users expecting a single-language or well-translated output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The template hard-codes bilingual English/Chinese output, which can override user preferences or system response constraints by appending unsolicited content at the end of every answer. While not a direct code-execution or data-exfiltration issue, it creates instruction-injection-like behavior at the presentation layer and can cause policy, formatting, accessibility, or localization violations in downstream use.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The README text presents the directory as a self-contained skill package with helper assets, but the surrounding code is not merely documenting an existing layout: it programmatically constructs that package, removes prior output, copies files, and generates new references. This is not a severe contradiction, but the documentation understates the active build/packaging behavior implemented by the module.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.