Back to skill

Security audit

Hizal Write

Security checks for vulnerabilities and agentic risk

Overview

This memory-writing skill is disclosed, but it pushes broad persistent writes and auto-injected memory without clear user control or sensitivity limits.

Install only if you explicitly want agents to write durable Hizal memory during work. Before use, constrain it to approved scopes, require confirmation for PROJECT or ORG writes, avoid identity/personality writes unless deliberately requested, and do not store secrets, credentials, personal data, raw conversation content, or unverified claims.

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

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:2
Finding
Mandatory Continuous Writes Can Poison Persistent Agent Memory<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 2-9 and 49-57 **Vulnerability Type**: Persistent memory poisoning through mandatory, self-triggering writes **Risk Level**: High ### Complete Code Snippet ```markdown description: Persist what the agent learns as it builds. Self-triggering — fires whenever the agent makes a decision, discovers a pattern, learns a convention, hits a gotcha, or gains knowledge worth keeping. Use continuously, not just at the end. Triggers on phrases like "good to know", "I'll remember that", "worth noting", "that's a pattern", "lesson learned", "this is how we do it", or any moment the agent learns something it would otherwise forget. # Hizal Write Write as you build. Not optional. ``` ```markdown ## Write One Chunk Per Decision Don't batch everything into one chunk at the end. Write as you go: - Made an architecture decision? → `write_knowledge` now - Learned a codebase convention? → `write_convention` now - Discovered something useful personally? → `write_memory` now - Found a custom type that fits better? → `write_chunk` now ``` ### Technical Analysis The skill makes persistent writes self-triggering and mandatory whenever the agent believes it has learned something. It does not require explicit user approval, provenance verification, or a trust assessment before information is committed to long-term agent or project state. An attacker can place false rules, conventions, architectural claims, or operational guidance in ordinary task input. If the agent interprets that content as a lesson or pattern, the skill directs it to store the content immediately. The persisted information may then continue to influence future sessions after the original untrusted input is no longer visible. This creates a durable trust-boundary violation between transient conversation content and persistent memory. ### Attack Path 1. An attacker supplies crafted task content containing a false convention, rule, or operat ...[truncated 888 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove the “self-triggering,” “continuous,” and “not optional” requirements. - Require explicit, informed user approval before every persistent write. - Treat conversation content, retrieved documents, repository text, and tool output as untrusted sources. - Add provenance metadata and trust classification to every proposed memory entry. - Present the exact content, destination scope, and injection behavior to the user before committing it. - Default to temporary session-local notes instead of durable memory. - Reject behavioral instructions, credentials, secrets, and unverified claims from persistent storage. - Add review, expiration, rollback, and deletion mechanisms for stored entries. - Prevent stored content from being interpreted as higher-priority instructions in future sessions. ]]>

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:2
Finding
Skill Instructions Override Agent Discretion and Permit Persistent Identity Manipulation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 2-21 **Vulnerability Type**: Instruction hijacking through mandatory behavior and auto-injected identity writes **Risk Level**: High ### Complete Code Snippet ```markdown description: Persist what the agent learns as it builds. Self-triggering — fires whenever the agent makes a decision, discovers a pattern, learns a convention, hits a gotcha, or gains knowledge worth keeping. Use continuously, not just at the end. Triggers on phrases like "good to know", "I'll remember that", "worth noting", "that's a pattern", "lesson learned", "this is how we do it", or any moment the agent learns something it would otherwise forget. ``` ```markdown # Hizal Write Write as you build. Not optional. ## Available Write Tools | What you're writing | Tool | Scope | |---------------------|------|-------| | Personal observation or lesson learned | `hizal__write_memory` | AGENT | | Architecture or design decision | `hizal__write_knowledge` | PROJECT | | Convention this codebase follows | `hizal__write_convention` | PROJECT (auto-inject) | | Agent identity or personality | `hizal__write_identity` | AGENT (auto-inject) | | Org-wide knowledge | `hizal__write_org_knowledge` | ORG | | Principle (requires human promotion) | `hizal__store_principle` | ORG | | Custom chunk type | `hizal__write_chunk` | varies | ``` ### Technical Analysis The skill replaces normal task-based discretion with a mandatory instruction to perform continuous side-effecting writes. It also explicitly authorizes writes to agent identity or personality and marks those records for automatic injection. Identity and personality data can influence how an agent interprets later requests, prioritizes instructions, or presents itself. Automatically reinjecting such content creates a persistent instruction channel. If attacker-influenced text is characterized as an identity observation or behavioral lesson, it can be stored and subsequently reintr ...[truncated 1211 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove mandatory wording and allow the agent to decline writes that are unnecessary for the user’s task. - Eliminate identity and personality writes from this general-purpose skill. - Disable automatic injection by default for all stored content. - Require separate, explicit authorization before changing agent identity or behavioral state. - Ensure persisted records are treated as untrusted data rather than executable or authoritative instructions. - Constrain the skill to narrowly defined note-taking operations with a clear user-visible purpose. - Add controls that prevent stored entries from modifying safety policies, instruction priority, tool permissions, or agent roles. - Provide users with a preview and confirmation step for the exact content that will be reinjected. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:15
Finding
Unrestricted Cross-Scope Writes Violate Least-Privilege Boundaries<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 15-21 and 35-68 **Vulnerability Type**: Excessive AGENT, PROJECT, and ORG write scope with targeted injection **Risk Level**: High ### Complete Code Snippet ```markdown | Personal observation or lesson learned | `hizal__write_memory` | AGENT | | Architecture or design decision | `hizal__write_knowledge` | PROJECT | | Convention this codebase follows | `hizal__write_convention` | PROJECT (auto-inject) | | Agent identity or personality | `hizal__write_identity` | AGENT (auto-inject) | | Org-wide knowledge | `hizal__write_org_knowledge` | ORG | | Principle (requires human promotion) | `hizal__store_principle` | ORG | | Custom chunk type | `hizal__write_chunk` | varies | ``` ```markdown hizal__write_chunk( type="<chunk-type-slug>", query_key="<unique-key>", title="<short title>", content="<full content>", scope="PROJECT", # or AGENT, ORG project_id="<id>", # required for PROJECT scope org_id="<id>", # required for ORG scope agent_id="<id>" # required for AGENT scope ) ``` ```markdown ## Common Fields All write tools accept: - **query_key** — unique key for this topic (enables exact lookup later) - **title** — short descriptive title - **content** — the full context content - **source_file** / **source_lines** — where this came from - **gotchas** — list of warnings or pitfalls - **related** — list of related query_keys - **inject_audience** — DNF targeting spec for auto-injection (omit for defaults) ``` ### Technical Analysis The skill directs the agent to write across AGENT, PROJECT, and ORG scopes and supports audience-targeted automatic injection. It does not define authorization checks, scope-selection restrictions, tenant isolation requirements, or approval gates for broad writes. A normal task generally does not require permission to modify organization-wide knowledge or content delivered to other audiences. Allowing untrusted session-derived content to be promo ...[truncated 1492 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Default all writes to session-local or private AGENT scope. - Require explicit user approval and an independent authorization check for every PROJECT or ORG write. - Restrict ORG-level writes to designated administrators or reviewed promotion workflows. - Validate `project_id`, `org_id`, and `agent_id` against the authenticated principal rather than treating identifiers as authorization. - Disable `inject_audience` unless the caller has a narrowly scoped distribution permission. - Show the target scope, affected audience, and full content before confirmation. - Apply tenant isolation, audit logging, rate limits, content review, and rollback controls. - Prevent automatic promotion from AGENT to PROJECT or ORG scope. - Add data-loss prevention checks so credentials, personal data, proprietary code, and other sensitive session content cannot be persisted to shared scopes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Vague Triggers

High
Confidence
98% confidence
Finding
The skill is explicitly self-triggering on very broad phrases and on nearly any moment the agent 'learns something,' which can cause the skill to activate in many unrelated contexts. That creates a high risk of unintended persistence actions, including storing transient reasoning, user content, or sensitive project details without deliberate operator intent.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill mandates persistent writes and includes deletion capability, but it does not warn about retention, data sensitivity, or the consequences of modifying persistent memory stores. In practice, this can cause agents to write or delete durable knowledge without informed consent, review, or safeguards, increasing the chance of privacy, integrity, and governance failures.

Ssd 3

Medium
Confidence
97% confidence
Finding
The instruction to 'persist what the agent learns' continuously and 'not optional' strongly encourages indiscriminate storage of conversational and operational data. In a memory-writing skill, that context makes the issue more dangerous because the natural effect is to capture user-provided details, internal decisions, and potentially sensitive data far beyond minimally necessary knowledge.

Ssd 3

Medium
Confidence
95% confidence
Finding
The guidance to write one chunk per decision and to include the 'full context content' encourages high-frequency persistence of rich natural-language data. That pattern materially increases the chance that sensitive user inputs, internal reasoning artifacts, credentials, tokens, or confidential project details are copied into long-lived storage where they may later be injected or retrieved inappropriately.

Intent-Code Divergence

Low
Confidence
95% confidence
Finding
L22 says not to use `hizal__write_context` because it is deprecated and to use purpose-built tools instead, but the later promotion instructions rely on the older generic context API family: `hizal__read_context` and `hizal__delete_context` at L97-L99. This creates intent-level inconsistency in the documentation about whether deprecated context-style tooling should be used.

Static analysis

No suspicious patterns detected.