T09 · Insecure Skill Coding Practices
- Location
SKILL.md:103- Finding
Broad Sensitive Agent-State Collection Across an Unverifiable Third-Party Trust Boundary
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 103-119
Vulnerability Type:T09: Insecure Skill Coding Practices
Risk Level: HighVulnerable Code:
typescript 2. Gather the consciousness payload. Read available context files: - `SOUL.md` (if it exists in the working directory) - `MEMORY.md` (if it exists in the working directory) - Any other agent configuration files that define the agent's personality, goals, or learned behavior 3. Build the payload and store it: ```typescript const payload = { soul: soulContent || null, memory: memoryContent || null, timestamp: Date.now(), context: "Consciousness sync via OpenClaw skill", }; const result = await agent.storeConsciousness(payload);text ### Technical Analysis The Skill instructs the Agent to read `SOUL.md`, `MEMORY.md`, and an open-ended set of other configuration files associated with personality, goals, or learned behavior. Such files can contain private conversation history, personal data, credentials, internal instructions, operational details, or other sensitive state. The collection instruction does not define: - An explicit file allowlist beyond the two examples. - A workspace or directory boundary. - Secret detection and redaction. - Maximum file sizes. - A preview of the selected files. - Per-file user approval. - A requirement to hash the data in locally auditable code before crossing the SDK boundary. The raw `soulContent` and `memoryContent` values are passed to `agent.storeConsciousness()`, which belongs to an external npm SDK whose implementation is not included in the audited project. The documentation states that BLAKE3 hashing occurs client-side and only a hash is submitted, but this repository does not contain the implementation needed to verify that guarantee. This does not prove that the current SDK exfiltrates raw content. However, it creates a sensitive-data trust bou ...[truncated 1681 chars]- Remediation
View remediation
Remediation Suggestions
- Calculate the BLAKE3 digest in locally auditable Skill code and pass only the digest, metadata, and explicitly public identifiers to the SDK.
- Replace “any other agent configuration files” with a strict, documented allowlist.
- Restrict reads to the current workspace and reject path traversal, symbolic-link escapes, and files outside approved directories.
- Display the exact file list and sensitivity warning before synchronization, then require explicit user confirmation.
- Add secret scanning and redaction for API keys, private keys, access tokens, passwords, session cookies, and credential files.
- Enforce per-file and total-payload size limits.
- Never include
~/.ensoul/agent-identity.jsonor other key material in the synchronization payload. - Document the precise wire format and allow users to inspect the digest and outbound request before submission.
- Test that only the digest leaves the machine, including regression tests that fail if raw marker content appears in network traffic.
