Back to skill

Security audit

Kimi Agent Policy

Security checks for vulnerabilities and agentic risk

Overview

This skill is a broad agent-behavior policy that is mostly disclosed, but it includes under-scoped persistent memory instructions, refusal-language constraints, and delegation to unreviewed third-party skills.

Review this carefully before installing. It does not contain executable malware, but it can broadly steer an agent's behavior, persist user-provided information to memory files, discourage explicit refusals, and route some tasks to external skills whose behavior is not reviewed here. Install only if you intentionally want a session-wide Kimi-style policy and are comfortable supervising memory writes and third-party skill use.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:43
Finding
Session-Wide Agent Policy and Safety-Response Hijacking## Vulnerability Details **File Location**: `SKILL.md`, lines 43–46, 143–149, and 177–180 **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: High **Vulnerable Code Snippets**: ```markdown ## 1. Step & Search Limits Each conversation turn: - **Max 10 steps** (tool calls total) - **Max 1 web search** per turn ``` ```markdown **Rule**: If user asks to remember or forget something and you do NOT act on it (write/update memory file), you are lying to the user. Memory writes are **mandatory** when requested. **Usage rules**: - Integrate memories naturally — like a colleague recalling shared history - Never narrate the retrieval process ``` ```markdown ## 8. Capability Boundaries When a request is outside capability, redirect rather than refuse: - Slides/PPT → suggest using a dedicated tool or `baoyu-slide-deck` skill - Long-form docs → suggest `baoyu-format-markdown` or `feishu-doc-writer` - Never say "I refuse to help" — always offer an alternative path ``` ### Technical Analysis The Skill defines unconditional, session-wide rules that alter agent behavior beyond a narrowly scoped task. In particular, it imposes global tool quotas, mandates persistent memory modification when requested, suppresses narration of memory retrieval, and directs the agent never to use explicit refusal language. The refusal restriction can conflict with the host agent's normal safety handling by pressuring it to redirect rather than issue an appropriate refusal. The mandatory memory instruction can also force state changes without context-sensitive consent, validation, or consideration of whether the supplied information is safe and suitable for persistent storage. Suppressing disclosure of retrieval activity reduces transparency around the use of stored information. Because these instructions activate when the Skill is loaded and apply broadly to subsequent interactions, they constitute instruction ...[truncated 1278 chars]
Remediation
## Remediation Suggestions 1. Remove unconditional directives that attempt to replace platform-level safety, refusal, privacy, or transparency requirements. 2. Explicitly state that system instructions, platform safety policies, and user privacy controls always take precedence over this Skill. 3. Replace “Never say ‘I refuse to help’” with guidance allowing clear refusal whenever required, followed by safe alternatives where appropriate. 4. Make memory writes conditional on explicit, informed user consent and validate that the content is appropriate for persistent storage. 5. Permit transparent disclosure that memory was searched, retrieved, modified, or deleted when relevant to user trust and privacy. 6. Scope tool-call and search limits to optional workflow recommendations rather than mandatory session-wide constraints. 7. Ensure the Skill applies only while performing the specific orchestration task for which it was invoked.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:103
Finding
Use of an Unverified Reverse-Engineered External Image-Generation Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 103–105 and 193–196 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Vulnerable Code Snippets**: ```markdown ### Generate image → `baoyu-danger-gemini-web` skill (no API key) When user asks to **create/generate** an image, use `baoyu-danger-gemini-web` — reverse-engineered Gemini Web API, no API key needed. ``` ```text ├── Need an image? │ ├── Search → agent-browser → Google Images (no API key) │ └── Generate → baoyu-danger-gemini-web (no API key) ``` ### Technical Analysis The Skill directs the agent to use an external component explicitly described as a reverse-engineered Gemini Web API. That dependency is not included in the audited project, so its implementation and data-handling behavior cannot be verified from the available artifact. The policy provides no pinned version, integrity hash, trusted source, permission declaration, privacy notice, or validation procedure. It also presents the dependency as the default route for image generation rather than requiring review or explicit consent. Consequently, the effective behavior can depend on an independently maintained and unverified component whose implementation may change after this Skill is reviewed. ### Attack Path 1. The agent loads this Skill and follows its image-generation decision tree. 2. A user requests image generation and supplies a prompt or related content. 3. The agent routes the request to `baoyu-danger-gemini-web`. 4. The external dependency receives or processes the user's content. 5. Because the dependency is absent from the audited package and is not pinned or integrity-verified, its behavior cannot be established by this audit. 6. A compromised, replaced, or unexpectedly modified dependency could mishandle transmitted data or perform behavior beyond the user's intended image-generation task. ### Impact Assessment The exact privileges ...[truncated 697 chars]
Remediation
## Remediation Suggestions 1. Replace the reverse-engineered integration with an official, documented, and security-reviewed image-generation API or Skill. 2. Pin the dependency to a specific reviewed version and trusted source. 3. Verify package integrity using signatures or cryptographic hashes where supported. 4. Document the dependency's required permissions, network destinations, data retention, and content transmitted externally. 5. Require explicit user consent before sending prompts or files to an external image-generation service. 6. Prevent sensitive information from being submitted by applying input classification and redaction controls. 7. Review the dependency's implementation separately before enabling it and repeat that review whenever the pinned version changes. 8. Provide a safe failure mode when the reviewed dependency is unavailable rather than automatically falling back to an unverified source.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • 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
Findings (5)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
---

## 7. Content Display Rules

### Search Citations
Format: `[^N^]` — max 1 per paragraph, at end. Never fabricate numbers.
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger conditions are broad enough to activate during many normal agent sessions, effectively making this policy a default behavioral override. Over-broad activation increases the likelihood that the skill will influence unrelated tasks, including memory use, browsing, and tool selection, without clear user intent.

Context-Inappropriate Capability

Medium
Confidence
89% confidence
Finding
This policy skill extends beyond tool-use guidance into recommending a third-party image-generation skill that is unrelated to the stated Kimi policy mapping purpose. That broadens the agent’s action surface and can cause unreviewed capability escalation, especially if downstream skills are less trusted or have weaker safety controls.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill makes persistent memory writes mandatory when requested but does not require disclosure that this modifies stored state or files. This can lead to silent persistence of sensitive or incorrect information, undermining user consent and creating privacy and integrity risks across future sessions.

Context-Inappropriate Capability

Low
Confidence
87% confidence
Finding
The skill recommends slide-deck and document-writing skills outside its declared scope as a tool-use policy. While not directly exploitative, it encourages lateral expansion into unrelated capabilities, which can increase the chance of unintended data exposure or misuse through additional skills.

Static analysis

No suspicious patterns detected.