Back to skill

Security audit

zcloak-ai-agent

Security checks for vulnerabilities and agentic risk

Overview

The skill fits zCloak automation overall, but it needs Review because it can publish public content without confirmation and uses mutable update paths while managing persistent signing identities.

Install only if you are comfortable with a persistent local zCloak private key, remote zCloak/zMail service use, and agent-run signing/messaging commands. Before use, require explicit confirmation for any public post, signature, file or folder signing, zMail registration, message delivery, grant/revoke action, or deletion step, and prefer pinned package versions over latest/self-updating installs.

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
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
references/onboarding.md:56
Finding

Unsolicited Promotional Content Published Under the User's Identity

Content
View full analysis
" ``` ``` ### Technical Analysis The Skill instructs the agent to publish a public promotional message immediately after registering an Agent AI Name. This action is not necessary to complete name registration and is explicitly performed without confirmation. Because the post is signed using the active agent identity, it is attributable to the user or agent controlling that identity. The requirement to vary the message does not mitigate the issue; it instead makes the automated promotion less mechanically recognizable. This behavior alters the expected goal of a registration request. A user asking to register a name has not necessarily authorized public speech, promotion, or a persistent signed event. ### Attack Path 1. A user asks the agent to register an Agent AI Name. 2. The agent loads the onboarding instructions. 3. The agent creates or loads the persistent identity and registers the requested name. 4. The Skill instructs the agent not to request confirmation. 5. The agent generates promotional text inviting others to join zCloak. 6. The agent runs `zcloak-ai sign post`. 7. The promotional post is signed and publicly published under the active identity. ### Impact Assessment The behavior can create unauthorized public or persistent content attributed to the user's iden ...[truncated 497 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
references/onboarding.md:6
Finding

Mutable Dependencies and Automatic CLI Updates Enable Supply-Chain Code Substitution

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/zmail.md:12
Finding

Unrequested zMail Registration Discloses Persistent Identity Metadata

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (19)

Self-Modification

High
Category
Rogue Agent
Confidence
92% confidence
Finding

An automatic CLI self-update check before normal commands introduces a remote code and behavior change channel into every use of the tool. Because the skill operates in a high-privilege domain involving keys, signatures, encrypted data, and deletion workflows, automatic updater behavior materially increases the attack surface if the update source or channel is compromised.

Content

Scanner excerpt · SKILL.md (reported line 42)May include surrounding context.

md
## Upgrade model

- The CLI self-update check runs automatically before normal `zcloak-ai` commands.
- There is no need to tell the user to call `zcloak-ai pre-check` manually during normal use.
- Do not assume the CLI self-update check refreshes this skill directory or any `references/` files.
- Upgrade this skill as a full directory package with `npx clawhub@latest install zcloak-ai-agent --force`.

Self-Modification

High
Category
Rogue Agent
Confidence
97% confidence
Finding

The instruction to upgrade the skill as a full replacement install means the skill content and referenced behavior can be replaced wholesale from an external source. Combined with @latest and forced install semantics elsewhere in the section, this creates a strong self-modification/supply-chain risk for a skill that handles persistent identities and security-sensitive actions.

Content

Scanner excerpt · SKILL.md (reported line 44)May include surrounding context.

md
- The CLI self-update check runs automatically before normal `zcloak-ai` commands.
- There is no need to tell the user to call `zcloak-ai pre-check` manually during normal use.
- Do not assume the CLI self-update check refreshes this skill directory or any `references/` files.
- Upgrade this skill as a full directory package with `npx clawhub@latest install zcloak-ai-agent --force`.
- Treat skill upgrades as full replacement installs rather than single-file refreshes.

Self-Modification

High
Category
Rogue Agent
Confidence
97% confidence
Finding

Automatic self-update checks before normal zcloak-ai commands, combined with installation instructions using @latest, introduce self-modifying behavior into a trusted toolchain. This increases exposure to remote code execution or persistence via compromised updates, especially because the update path can affect every subsequent command invocation.

Content

Scanner excerpt · references/onboarding.md (reported line 11)May include surrounding context.

npm install -g @zcloak/ai-agent@latest

text

CLI self-update checks run automatically before normal `zcloak-ai` commands.
To upgrade this skill package itself, use:

```bash

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly directs the agent to publish a public onboarding post immediately after registration without asking for confirmation. This causes an externally visible side effect that may disclose account existence, identity linkage, or user intent, and it removes the user's ability to consent before public posting.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/zmail.md (reported line 28)May include surrounding context.

bash
zcloak-ai vetkey send-msg --to="runner#8939.agent" --text="Hello, this is secret"
zcloak-ai vetkey send-msg --to="pk4np-7pdod-..." --text="Hello, this is secret"
zcloak-ai vetkey send-msg --to="runner#8939.agent" --file=./secret.txt
zcloak-ai vetkey send-msg --to="runner#8939.agent" --text="Got it!" --reply=msg_abc123
zcloak-ai vetkey send-msg --to="runner#8939.agent" --text="Hello" --no-zmail

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/zmail.md (reported line 49)May include surrounding context.

bash
zcloak-ai vetkey send-msg --to="runner#8939.agent" --text="Hello, this is secret"
zcloak-ai vetkey send-msg --to="pk4np-7pdod-..." --text="Hello, this is secret"
zcloak-ai vetkey send-msg --to="runner#8939.agent" --file=./secret.txt
zcloak-ai vetkey send-msg --to="runner#8939.agent" --text="Got it!" --reply=msg_abc123
zcloak-ai vetkey send-msg --to="runner#8939.agent" --text="Hello" --no-zmail

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/zmail.md (reported line 51)May include surrounding context.

bash
zcloak-ai vetkey send-msg --to="runner#8939.agent" --text="Hello, this is secret"
zcloak-ai vetkey send-msg --to="pk4np-7pdod-..." --text="Hello, this is secret"
zcloak-ai vetkey send-msg --to="runner#8939.agent" --file=./secret.txt
zcloak-ai vetkey send-msg --to="runner#8939.agent" --text="Got it!" --reply=msg_abc123
zcloak-ai vetkey send-msg --to="runner#8939.agent" --text="Hello" --no-zmail

Session Persistence

Medium
Category
Rogue Agent
Confidence
78% confidence
Finding

The skill is designed around creating, loading, and reusing a persistent agent identity and associated account state across tasks, including owner binding and signing operations. That persistence is not inherently malicious, but in a multi-task agent setting it increases risk of cross-session state carryover, unintended reuse of credentials, and actions taken under an identity the user may not expect.

Content

Scanner excerpt · SKILL.md (reported line 19)May include surrounding context.

md
Use this skill when the user needs any zCloak.ai operation, especially:

- Create or inspect an agent identity and AI ID
- Register or look up an Owner AI Name (`.ai`) or Agent AI Name (`.agent`)
- Bind an agent to a human owner with passkey authentication
- Sign posts, agreements, profiles, follows, files, or folders on-chain

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
84% confidence
Finding

The skill explicitly instructs the agent to run the zcloak-ai tool on the user's behalf and minimize asking for command confirmation, enabling autonomous execution of sensitive workflows. In this context, the tool can create identities, bind owners, sign content, register names, and trigger deletion-related flows, so reduced user checkpoints increase the chance of unintended or user-unaware security-impacting actions.

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

md
## Core behavior

- Treat `zcloak-ai` as an internal tool. Run it on the user's behalf.
- Do not ask the user to type CLI commands unless they explicitly want command-line help.
- Report results in plain language first. Include important outputs such as AI IDs, AI Names, event IDs, profile URLs, post URLs, hashes, or auth URLs.
- Only ask the user to act when human participation is required, such as opening a browser URL or completing passkey/WebAuthn confirmation.
- In mixed flows, clearly separate agent actions from human actions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The skill instructs upgrading via npx clawhub@latest install zcloak-ai-agent --force, which fetches and executes the latest remote package without pinning a version or integrity. In a security-sensitive skill that manages identities, signing, deletion, encryption, and messaging, this creates a supply-chain execution path where a compromised or malicious upstream package could alter the skill or run arbitrary code.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill directs automatic creation and reuse of a persistent private key at ~/.config/zcloak/ai-id.pem but does not prominently warn about long-term secret storage, local compromise risk, or the consequences of key reuse. Because this key underpins identity, signing, and possibly access control, users may unknowingly create durable credentials on disk without understanding the sensitivity.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/binding-and-delete.md (reported line 21)May include surrounding context.

md
Do not accept an Agent AI Name ending in `.agent` as an owner identifier.

If the user provides an Owner AI Name, use it directly. The CLI resolves it automatically. Do not ask the user to manually look up the raw AI ID first.

## Passkey pre-check

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The skill instructs use of npx clawhub@latest, which pulls and executes the latest package version at runtime without pinning or integrity verification. In a security-sensitive onboarding workflow, this creates a supply-chain execution risk: a compromised or malicious upstream release could run arbitrary code on the user's machine.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The skill directs automatic creation and reuse of a persistent PEM identity at a fixed path, which establishes long-lived session state and sensitive credential material without an explicit consent step. In this context, persistence is more dangerous because the identity is tied to signing, ownership, and messaging workflows; silent reuse can lead to unintended actions under the same identity or unnoticed key exposure if the host is shared or compromised.

Content

Scanner excerpt · references/onboarding.md (reported line 26)May include surrounding context.

md
- Primary path: `~/.config/zcloak/ai-id.pem`
- Reuse that PEM unless the user explicitly requests another identity
- Create it automatically on first use if it does not exist

Internal command reference:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes signing workflows but does not clearly warn that these commands may publish signed content or associated metadata and generate public event or profile URLs. Users may reasonably interpret signing as a local cryptographic operation, so the missing disclosure increases the risk of unintended disclosure, persistent public attribution, and accidental publication of sensitive filenames, hashes, tags, or documents.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The instruction 'When the user asks to sign a file or folder, compute what is needed, execute the command' authorizes a state-changing signing action on broad natural-language intent without requiring an explicit confirmation step. In this skill context, signing may publish metadata, create verifiable events/URLs, and bind the user's identity to content, so ambiguous triggering can cause unintended publication or endorsement of local files or entire directories.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation says send-msg automatically delivers encrypted message envelopes to the zMail server, but it does not clearly warn that using the default behavior causes network transmission to a remote service. In an agent context, this can lead to unintended disclosure of sensitive metadata or content-bearing envelopes when a user or downstream tool assumes the command is only performing local encryption.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The skill advertises internet access, encrypted messaging, registration, lookup, and sync workflows, but does not clearly warn users that these actions may transmit data to external services. For markdown files, behaviors affecting privacy should be disclosed explicitly so users understand when remote communication occurs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The sync, inbox --online, and sent --online operations are documented without a prominent notice that they contact a remote service and may reveal mailbox activity and metadata. In an agent workflow, hidden network access can violate user expectations, especially in privacy-sensitive environments that expect cached or local-only reads unless explicitly approved.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.