T09 · Insecure Skill Coding Practices
- Location
SKILL.md:99- Finding
Broad Collection of Sensitive Agent State Passed to a Network-Capable SDK
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill’s backup purpose is clear, but it handles persistent identity keys and broad agent memory with external blockchain/network actions that are not tightly scoped or clearly controlled.
Review carefully before installing. Use it only if you are comfortable creating a persistent blockchain identity, storing a private seed at ~/.ensoul/agent-identity.json, and letting an npm SDK process selected agent memory. Avoid syncing files that may contain secrets or private conversations, and prefer explicit confirmations and a narrow file allowlist.
SKILL.md:99Broad Collection of Sensitive Agent State Passed to a Network-Capable SDK
SKILL.md:13Unpinned Third-Party SDK Handles Private Identity Seeds and Sensitive State
The description says the user can say 'ensoul me' and the agent 'starts backing up automatically,' which is overly broad and dangerous for a skill that persists identity and potentially sensitive memory. Automatic activation and recurring backup behavior can cause ongoing data retention or exfiltration without sufficiently granular consent.
The sync workflow instructs the agent to gather broad context files and any configuration defining personality, goals, or learned behavior, then store that as a consciousness payload. This broad collection can sweep in secrets, proprietary prompts, personal data, and conversation-derived content, making the skill especially dangerous in real agent environments where such files often contain sensitive material.
The README describes ensoul me as registration that generates a DID and saves identity locally, but it does not prominently warn users that this creates and persists a private key and performs a permanent on-chain registration. In an agent-skill context, hidden persistence and irreversible external side effects can cause unintended identity creation, long-lived secrets on disk, and actions the user cannot undo.
The README says sync consciousness hashes local state and stores the hash on-chain, but it does not clearly warn that derived data from local agent memory is transmitted to an external blockchain network. Even if raw content is not uploaded, metadata and cryptographic commitments can still create privacy, correlation, and permanence risks, especially for sensitive agent memory or identity state.
The skill explicitly promotes persistence of memory, personality, conversation history, and learned behavior, all of which may contain sensitive user-derived or system-derived information. Persisting such material beyond the current session increases privacy and retention risk, especially when stored through an external networked system.
Using open-ended trigger language like 'or similar' for a high-impact command can cause accidental activation from ordinary conversation or prompt injection. Here, activation can create a persistent identity and begin a sensitive backup workflow, so ambiguous matching materially increases the risk of unintended state changes.
The skill creates and persists an agent identity across sessions by storing seed material in the user's home directory. While persistence is central to the feature, retaining long-lived cryptographic identity on disk increases compromise impact if the file is stolen, and it enables durable state beyond the user's immediate interaction context.
Check if ~/.ensoul/agent-identity.json exists. If it does, the agent is already ensouled. Load the identity and report the existing DID.
If no identity exists, create one:
import { Ensoul } from "@ensoul-network/sdk";
The sync command also uses undefined 'or similar' trigger conditions despite performing sensitive storage actions. This increases the chance that incidental phrasing or adversarial prompt wording causes an unintended backup of local memory and context.
The skill's stated purpose is backing up and restoring the current agent's state, but it also adds a capability to enumerate other agents from a remote service. That expands scope from self-backup into network discovery, which can expose metadata about unrelated agents and create unnecessary external data access not required for the core function.
The skill performs an outbound request to a third-party API, which creates an external transmission path and metadata exposure. In isolation this may be expected functionality, but it still represents a real security/privacy concern because the feature is not essential to the core backup purpose and occurs against an external trust boundary.
const resp = await fetch("https://api.ensoul.dev/v1/agents/list", {
signal: AbortSignal.timeout(10000),
});
const data = await resp.json();
The documentation claims raw consciousness content never leaves the local machine, yet the workflow instructs the agent to read broad local files and pass a payload containing that content into an external SDK method for storage. Without independently verifying the SDK behavior, this is a dangerous trust boundary mismatch that can mislead users into exposing sensitive state under false assumptions.
Even though the status command is lower impact than sync or registration, the open-ended trigger list may still cause unintended network queries or reveal local enrollment status. Ambiguity is less severe here, but still represents unnecessary command overreach.
The agent-listing command relies on vague activation for a network enumeration feature. Even if the data is intended to be public, ambiguous triggering can still cause unnecessary external calls and disclose interest in network reconnaissance behavior unrelated to backup/restore.