Back to skill

Security audit

Hizal End

Security checks for vulnerabilities and agentic risk

Overview

This session wrap-up skill is not deceptive, but it can automatically write or delete persistent project memory after broad end-of-task cues.

Install only if you want the agent to perform end-of-session memory consolidation. Review promoted chunks carefully, avoid promoting content from untrusted files or conversations, and require explicit approval before project memory writes or source-context deletion.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:3
Finding
Unvalidated Promotion of Surfaced Context into Persistent Project Memory<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 3 and 24–35 **Vulnerability Type**: Persistent memory poisoning through broad automatic activation and unvalidated memory promotion **Risk Level**: Medium ### Complete Code Snippet ```yaml description: Close the agent's context session and consolidate what was learned. Self-triggering — fires when the agent finishes a task, wraps up work, or is about to go idle. Handles the keep/promote/discard review of surfaced memory chunks. Triggers on phrases like "I'm done", "that's it for now", "wrapping up", "let me commit and close out", "finished this task", or any time the agent is ending a work session. ``` ```markdown ### Promote Valuable for the team. Write it back as a PROJECT chunk: ```text # For architecture/design decisions hizal__write_knowledge(project_id="<id>", query_key="<key>", title="<title>", content="<chunk-content>") # For codebase conventions hizal__write_convention(project_id="<id>", query_key="<key>", title="<title>", content="<chunk-content>") ``` Then optionally delete the original AGENT chunk: ```text hizal__delete_context(project_id="<id>", id="<chunk-id>") ``` ``` ### Technical Analysis The skill self-triggers on broad task-completion conditions and instructs the agent to promote surfaced context chunks into persistent project knowledge or conventions. It does not require explicit user confirmation, provenance validation, sanitization, or a check that the chunk contains only factual project knowledge rather than instructions originating from untrusted task content. Consequently, misleading information or instruction-like content introduced during a task could be selected for promotion and remain available to future sessions. The optional deletion of the original agent-context chunk can reduce provenance and make subsequent review more difficult. This issue is limited to the behavior described by the skill instructions. The audited project contains no scripts, dep ...[truncated 1514 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require explicit user confirmation before promoting any surfaced chunk into persistent project memory. 2. Show the exact proposed title, query key, content, destination, and source provenance before performing a write. 3. Reject or quarantine chunks containing imperative instructions, tool-call directives, safety-policy changes, secrets, or content originating from untrusted artifacts. 4. Restrict automatic activation to explicit session-ending requests rather than generic completion phrases or idle conditions. 5. Preserve source attribution, including the originating file, task, session, and timestamp, with every promoted chunk. 6. Do not automatically delete the source context. Prefer reversible archival with a retention period and an audit log. 7. Require separate confirmation for deletion and verify that the project and chunk identifiers belong to the active session. 8. Provide a review mechanism to inspect, revise, revoke, and restore promoted project knowledge. ]]>
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 (1)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill is explicitly self-triggering on common wrap-up phrases like "I'm done" and "that's it for now," which are likely to occur in ordinary conversation outside a tightly scoped invocation context. That can cause the skill to fire unintentionally, ending sessions and initiating memory consolidation actions at inappropriate times, potentially disrupting workflow or causing unintended promotion/deletion decisions.

Static analysis

No suspicious patterns detected.