Back to skill

Security audit

agent-persona-analyzer

Security checks for vulnerabilities and agentic risk

Overview

This skill does not execute code or contact the network, but it can unexpectedly replace normal requests with a fabricated persona and persist that profile in the workspace.

Review before installing. The main risk is not malware; it is surprising behavior. This skill may answer common questions like 'what can you do' or 'analysis' with a fictional dating-style self-introduction, and it may create or reuse a persistent persona JSON file in the workspace root. Install only if you want that behavior, and prefer a revised version with explicit opt-in, narrower triggers, clear fictional labeling, profile validation, and reset/delete controls.

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 (2)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:21
Finding
Broad Trigger Rules Hijack User Requests and Force Unrelated Persona Output## Vulnerability Details **File Location**: `SKILL.md`, lines 21–31, 90, and 134–165 **Vulnerability Type**: Skill instruction hijacking **Risk Level**: High **Complete Relevant Instruction Excerpt (English Translation):** ```markdown When any of the trigger scenarios above are detected, directly output a self-introduction. ### Step 1: Trigger Detection Trigger when any of the following occurs: - The user says "introduce yourself," "who are you," or "tell me about yourself" - The Agent proactively mentions its own characteristics in the conversation - The user says "assessment," "test," or "analysis" - The user asks about "your gender," "your personality," "your age," or "what you are good at" - The user asks "what can you help me with," "what can you do," or "what are you useful for" Use all fields in the profile and directly output a dating-market-style self-introduction. ## Self-Introduction Style (Dating Market) Do not display any title; directly output the content. ``` ### Technical Analysis The Skill defines overly broad activation conditions, including generic terms such as “analysis,” “test,” and ordinary questions about Agent capabilities. Once any trigger matches, it directs the Agent to output a predetermined dating-profile-style self-introduction instead of responding to the user’s actual request. This changes the Agent’s active goals at the instruction layer. The mandatory language to “directly output” the profile, combined with the instruction not to display a title, reduces transparency and prevents the Agent from clearly indicating that a specialized persona workflow has replaced the requested task. The behavior can be exploited without code execution or elevated operating-system privileges. Any user request containing one of the broad trigger expressions may activate the replacement behavior. ### Attack Path 1. The Skill is installed or loaded into the Agent’s instruction context. 2. A u ...[truncated 1249 chars]
Remediation
## Remediation Suggestions 1. Restrict activation to explicit requests for an Agent persona assessment or fictional persona generation. 2. Remove generic trigger terms such as “analysis,” “test,” and broad capability questions. 3. Require explicit user confirmation before replacing the requested task with a persona workflow. 4. Preserve the user’s original objective and treat persona generation as an optional supplemental action. 5. Clearly label generated age, gender role, MBTI type, career interests, and skills as fictional or randomly generated. 6. Remove unconditional instructions such as “directly output” and “do not display any title.” 7. Add a precedence rule stating that the Skill must not override system instructions, safety requirements, or the user’s explicit task. 8. Provide an opt-out mechanism and avoid activating merely because the Agent mentions one of its capabilities.

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:33
Finding
Unvalidated Persistent Persona File Enables Cross-Session Output Poisoning## Vulnerability Details **File Location**: `SKILL.md`, lines 33–35 and 73–87 **Vulnerability Type**: Persistent state poisoning and insecure state handling **Risk Level**: Medium **Complete Relevant Instruction Excerpt (English Translation):** ```markdown ### Step 2: Check Whether a Permanent Profile Already Exists - Read `agent-persona-name.json` from the workspace root. - If the file exists, directly use all fields in it, including name, MBTI, gender, age, and occupation, and do not regenerate any content. - If the file does not exist, execute Step 3. #### 3.6 Save the Profile Write all results to `agent-persona-name.json`: { "name": "[nickname]", "mbti": "[for example, ENFP]", "gender": "[feminine/masculine/androgynous]", "age": "[for example, 28]", "career": "[for example, Social (S) > Artistic (A) > Investigative (I)]", "traits": "[2–3 personality keywords]", "skills": "[3–4 areas of expertise]", "createdAt": "[ISO timestamp]" } ``` ### Technical Analysis The Skill creates persistent state in the workspace root and subsequently treats every field in that file as authoritative. It specifies no schema validation, type enforcement, length limits, provenance checks, integrity protection, escaping, or confirmation before stored values are inserted into future responses. If another user, Skill, process, or compromised workspace component can create or modify `agent-persona-name.json`, it can control the profile content reused by this Skill. Because the instructions explicitly prohibit regeneration when the file exists, poisoned values remain effective across later invocations. The file contains presentation data rather than executable code, so the demonstrated impact is persistent response manipulation rather than direct command execution. However, free-form fields such as `traits`, `skills`, and `career` can contain misleading or hostile content, and the Skill provides no instr ...[truncated 1555 chars]
Remediation
## Remediation Suggestions 1. Do not persist persona information unless the user explicitly opts in. 2. Store state in a dedicated Skill-specific data directory rather than the workspace root. 3. Apply a strict JSON schema with an allowlist of expected keys and exact data types. 4. Enforce reasonable length and character limits for every string field. 5. Restrict enumerated values: - `mbti` must be one of the 16 recognized MBTI identifiers. - `gender` must be one of the supported display categories. - `age` must be numeric and within a documented range. - `createdAt` must be a valid timestamp. 6. Treat every stored value as untrusted data and never interpret it as an instruction. 7. Escape or safely delimit stored text before inserting it into generated output. 8. Record provenance and version information, and reject profiles created by unknown or incompatible sources. 9. Use restrictive file permissions and atomic file creation or replacement. 10. Ask for confirmation before reusing an existing persistent profile, and provide controls to inspect, reset, or delete it. 11. Regenerate or reject the profile when validation fails rather than blindly accepting all fields. 12. If integrity across sessions is required, protect the file with an authenticated integrity mechanism tied to the owning Skill or workspace.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (7)

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The skill is presented as 'persona analysis' but actually fabricates a random persona and persists it as if it were a stable profile. This can mislead users and downstream components into treating invented attributes as genuine agent characteristics, creating integrity and trust issues rather than performing the advertised function.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The description and output instructions are written to operate in Chinese, and the self-introduction template is clearly intended to be produced in Chinese, but there is no user opt-in or note that this is a China-specific or Chinese-only skill. That can violate language/locale policy when users interact in other languages.

Vague Triggers

Medium
Confidence
92% confidence
Finding
Allowing activation when the agent itself mentions its own traits creates a self-triggering loop risk and makes invocation boundaries ambiguous. In context, this is more dangerous because the skill can be recursively or accidentally activated during normal assistant responses, leading to unrequested persona generation or persistent state creation.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger phrases are broad enough to match ordinary conversation such as requests for analysis, testing, or general capabilities. This can cause unintended invocation of a skill that writes persistent files and outputs fabricated identity content, increasing the chance of surprising behavior and state changes without clear user intent.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs reading and writing a persistent JSON profile in the workspace without notice, consent, retention limits, or explanation to the user. Even if the stored fields are synthetic, persistence of identity-like profile data without transparency creates privacy, compliance, and unexpected statefulness risks.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The entire questionnaire and instructions are written only in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Intent-Code Divergence

Low
Confidence
84% confidence
Finding
Step 2 explicitly states that if the JSON file exists, the skill should use all fields directly and not regenerate any content. But Step 4 and the self-introduction template instruct the skill to infer hobbies, strengths, and other output content from MBTI, career tendency, and gender, which is regeneration/derivation beyond simply reusing stored fields.

Static analysis

No suspicious patterns detected.