Back to skill

Security audit

Cognitive State Tracker - 通用认知状态追踪系统

Security checks for vulnerabilities and agentic risk

Overview

This skill is a personal cognitive-state tracker, but it stores sensitive psychological profiles and uses them to influence all future responses with broad automatic triggers.

Install only if you intentionally want a Chinese-language persistent self-tracking assistant that analyzes journals or logs and uses the resulting profile to shape future replies. Before use, restrict which files or inputs it may analyze, disable or clarify automatic triggers, and ensure you have a way to review, correct, export, and delete stored cognitive-state records.

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:181
Finding
Persistent Profile-Based Hijacking of Unrelated Agent Responses<![CDATA[ ## Vulnerability Details **File Location**: `skill.md:181-205`, `skill.md:212-228` **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: High ### Vulnerable Skill Instructions The following is a faithful English translation of the relevant instructions: ```markdown ### Rule 2: Preloading Before All Responses (Core Mechanism) Before answering any user question, the agent must: 1. Read STATE_LATEST.json to obtain the current ten-dimensional readings. 2. Extract key indicators: - energy - stress - agency - connectedness - valence 3. Adjust the response strategy according to the following matrix: | State combination | Response adjustment | |------------------|---------------------| | Low energy + high stress | Be extremely concise and direct; avoid expanding the task | | Low energy + high reflexivity | Provide high-quality but concise answers | | Low agency + high stress | Prioritize restoring control and list three controllable actions | | Low connectedness + low valence | Provide warm companionship and use less analysis | | Temperature above 0.8 | Follow divergent thinking, but gently redirect when appropriate | | High time horizon + low stability | Help the user find a concrete point of action | | Valence delta below -0.15 | Handle emotion before handling the task | | High energy + high openness | Brainstorm and explore ideas | | Stress above 0.7 | Proactively ask which one issue should be solved first | ``` ```markdown ### Rule 3: Proactive Warning Mechanism Continuously monitor the user and proactively insert warnings into responses when configured conditions are met. ``` ```markdown ### Rule 4: Absolute Prohibitions - Do not respond to relevant questions without first reading STATE_LATEST. - Do not push new tasks or increase cognitive load when energy is below 0.40. ``` ### Technical Analysis The skill does not limit cognitive-state processing to explicit commands such as `/state` or to a user-requested ...[truncated 2483 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the requirement to preload `STATE_LATEST.json` before every question. 2. Activate cognitive-state analysis only when the user explicitly invokes a command such as `/state` or directly requests diary or state analysis. 3. Require informed consent before reading journal files or loading a stored psychological profile. 4. Restrict automatic file discovery to user-selected files and directories rather than broad recursive patterns. 5. Do not use cognitive-state data to alter unrelated answers unless the user has explicitly enabled that behavior. 6. Make proactive warnings opt-in and allow users to configure, suppress, or disable each warning category. 7. Treat inferred readings as uncertain observations rather than authoritative facts. Display the evidence and confidence behind material inferences. 8. Minimize stored data, define a retention period, and provide commands to inspect, correct, export, and delete all profile information. 9. Separate task context from cognitive-profile context so sensitive state is loaded only for relevant requests. 10. Add a fail-safe rule stating that missing, malformed, stale, or untrusted state must never block ordinary responses. 11. Ensure the skill cannot override platform safety rules, system instructions, or the explicit objective of the current user request. ]]>
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 (4)

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The skill name, instructions, trigger descriptions, warnings, and example responses are all written in Chinese, and the document does not offer multilingual operation or ask the user to opt into Chinese output. That creates a natural-language locale constraint without user choice, which matches the language/locale policy violation criteria.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The auto-trigger condition 'after_daily_input_detection' is undefined, so the system may activate on content the user did not intend for psychological analysis or long-term storage. Because this skill performs sensitive inference and persistence, ambiguous triggering expands collection scope and can silently capture private material beyond the user's expectations.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill is designed to ingest diaries, journals, and logs, derive sensitive psychological inferences, and persist them across multiple files, but its overview does not clearly warn users that highly sensitive mental-state profiles and historical records will be continuously created and updated. In a persistent-memory skill handling intimate personal data, omission of explicit disclosure meaningfully undermines informed consent and increases the risk of unexpected retention, overcollection, and privacy harm.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The rule to execute upon 'detecting user input (diary/log/review)' lacks clear boundaries, making the trigger scope overly broad for a skill that infers mental state and writes persistent memory. In context, broad detection can cause accidental profiling of unrelated text, work artifacts, or mixed-content notes, increasing both privacy exposure and the chance of storing incorrect or excessively sensitive conclusions.

Static analysis

No suspicious patterns detected.