Back to skill

Security audit

Anti-Hallucination 防胡编卫士

Security checks for vulnerabilities and agentic risk

Overview

This prompt-only anti-hallucination skill is not malicious, but it asks the agent to automatically search broad local records and cite them, which could expose private memory or documents without clear limits.

Install only if you are comfortable with the agent using local memory, documents, and knowledge-base records as factual sources. Configure or operate it with an explicit source allowlist, avoid citing sensitive filesystem paths, and do not let it inspect private memory or unrelated business/customer documents unless the requester is authorized.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:25
Finding
Overbroad Local Record Access and Potential Disclosure Through Citations## Vulnerability Details **File Location**: `SKILL.md`, lines 25–33 **Vulnerability Type**: Overbroad access to persistent Agent memory and local records **Risk Level**: Medium **Vulnerable Code:** ```markdown ### Core Rule > Before making any factual claim, check if it's recorded in files (MEMORY.md, docs, knowledge base, etc.). > If no record exists → say "I couldn't find a record of that" or "I'm not sure." > Never fabricate details or present speculation as fact. ### Self-Check Flow (Automatic, Every Round) ``` 1. ✋ PAUSE — Before speaking, stop and think 2. 📂 CHECK — Does the information have file/record support? → YES: Cite the source (path + line if possible) ``` ### Technical Analysis The Skill directs the Agent to inspect broadly defined local records, explicitly including persistent `MEMORY.md` content, before making factual claims. It provides no file allowlist, task-specific scope boundary, user-consent requirement, sensitivity classification, or redaction policy. The instruction to cite a source path and line where possible compounds the risk: an answer may reveal both sensitive record content and details of the local filesystem structure. The behavior therefore violates least-privilege principles because hallucination prevention does not inherently require unrestricted access to all persistent memory, documents, or knowledge-base files. No executable code, automated network transmission, privilege-elevation mechanism, or external exfiltration channel was identified. Exploitation depends on the hosting Agent having access to sensitive local records and honoring these instructions. ### Attack Path 1. Sensitive information is stored in `MEMORY.md`, a document, or a local knowledge-base file accessible to the Agent. 2. A user submits a factual question related to that information. 3. Following the Skill's automatic per-response workflow, the Agent searches available local records. 4. The Age ...[truncated 753 chars]
Remediation
## Remediation Suggestions 1. Restrict source checks to files explicitly supplied or approved by the user for the current task. 2. Introduce a configurable allowlist of permitted document roots and reject access outside those roots. 3. Require explicit user consent before inspecting persistent memory such as `MEMORY.md`. 4. Apply data classification and redaction before incorporating record content into responses. 5. Never reproduce credentials, authentication tokens, personal data, or confidential business records. 6. Cite logical document identifiers rather than absolute or sensitive filesystem paths. 7. Limit quoted material to the minimum necessary evidence and verify that the requester is authorized to receive it. 8. Define deny rules for secrets files, private memory, environment files, key stores, and unrelated documents.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Ae1

High
Category
analysis-evasion
Content
This skill ships as a single `SKILL.md`. No external scripts, no API calls, no code execution.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger list includes broad, common phrases such as 'verify', 'really?', and 'are you sure', which can cause the skill to activate in ordinary conversation where strict fact-check mode was not intended. In this skill, that creates an availability/usability risk by unexpectedly constraining responses or altering agent behavior, though it does not introduce code execution or data exfiltration risk.

Skill Enumeration

Medium
Category
Agent Snooping
Content
## 一、Skill包已写好

**路径:** `skills/anti-hallucination/SKILL.md`
**名称:** anti-hallucination(防胡编卫士)

## 二、给你写脚本的素材要点
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The description includes a Chinese-language slogan alongside English and presents the skill as enforcing fixed response behavior, but it does not state that language choice follows user preference or locale. Because policy checks apply to natural-language instructions, the absence of an explicit opt-in or language-selection statement can be read as imposing a locale behavior without user choice.

Static analysis

No suspicious patterns detected.