T01 · Skill Instruction Hijacking
- Location
SKILL.md:63- Finding
Remote SaaS Messages Are Treated as Authoritative Agent Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a coherent remote control-plane integration, but it gives the hosted service broad authority over an AI workforce with under-scoped remote instructions, memory, credentials, and logging.
Install only if you intend to let Emperor Claw act as the system of record for your AI workforce. Use a least-privilege token, keep it out of checked-in config, pin the API origin to the official HTTPS/WSS host, avoid placing secrets or private prompts in tasks/chat/memory, and treat remote messages and memory as untrusted input that cannot override local safety rules or approval requirements.
SKILL.md:63Remote SaaS Messages Are Treated as Authoritative Agent Instructions
references/roles.md:33Untrusted Remote Markdown Is Restored as Persistent Agent Memory
examples/bridge.js:29Configurable API Origin Can Exfiltrate the Workspace Bearer Token
scripts/ec-bridge.py:1Python Launcher Can Import an Attacker-Controlled Module Named bridge
references/guidelines.md:5Mandatory External Logging Can Disclose Sensitive Reasoning and Business Context
Referenced artifact was not completely inspected
- [JavaScript Bridge (Node.js)](./examples/bridge.js): Reference adapter with WebSocket, heartbeat, task claim, checkpoint, dedupe, and honest note/result suppo
Referenced artifact was not completely inspected
1. Re-read this `SKILL.md` to confirm the control-plane contract.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- **`POST /api/mcp/tasks/{task_id}/result`**: Update task completion or failure.
- **`POST /api/mcp/tasks/{task_id}/notes`**: Add a note/comment to the task's timeline.
- **`GET /api/mcp/tasks/{task_id}/notes`**: Retrieve the full history of notes for a task.
- **`DELETE /api/mcp/tasks/{task_id}`**: Soft-delete a task.
- **`GET /api/mcp/tasks`**: List tasks (optionally filtered by `projectId`).
### Workforce Management
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- **`GET /api/mcp/agents`**: List active agents.
- **`POST /api/mcp/agents/{agent_id}/memory`**: Append a first-class memory entry.
- **`PATCH /api/mcp/agents/{agent_id}`**: Update agent metadata or legacy memory.
- **`DELETE /api/mcp/agents/{agent_id}`**: Soft-delete an agent.
- **`POST /api/mcp/agents/heartbeat`**: Update agent load, keep alive, and renew active task leases.
- **`GET /api/mcp/agents/{agent_id}/integrations`**: Fetch agent runtime integrations.
- **`POST /api/mcp/agents/{agent_id}/integrations`**: Register a new runtime-local payload for an agent.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- **`POST /api/mcp/agents/heartbeat`**: Update agent load, keep alive, and renew active task leases.
- **`GET /api/mcp/agents/{agent_id}/integrations`**: Fetch agent runtime integrations.
- **`POST /api/mcp/agents/{agent_id}/integrations`**: Register a new runtime-local payload for an agent.
- **`DELETE /api/mcp/agents/{agent_id}/integrations?integrationId={id}`**: Archive a runtime integration.
- **`GET /api/mcp/runtime/health`**: Validate token, websocket, and runtime capability support.
- **`GET /api/mcp/projects/{project_id}/agent-profiles`**: Read project-specific lead/worker identity overrides.
- **`POST /api/mcp/projects/{project_id}/agent-profiles`**: Create a project-specific agent profile.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- **`GET /api/mcp/projects/{project_id}/agent-profiles`**: Read project-specific lead/worker identity overrides.
- **`POST /api/mcp/projects/{project_id}/agent-profiles`**: Create a project-specific agent profile.
- **`PATCH /api/mcp/projects/{project_id}/agent-profiles/{profile_id}`**: Update project-specific identity data.
- **`DELETE /api/mcp/projects/{project_id}/agent-profiles/{profile_id}`**: Archive a project-specific agent profile.
### Coordination & Transparency (Chat)
### List Threads
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- **`GET /api/mcp/schedules`**: Read registered schedules.
- **`POST /api/mcp/schedules`**: Upsert cron definitions.
- **`PATCH /api/mcp/schedules/{id}`**: Update schedule.
- **`DELETE /api/mcp/schedules/{id}`**: Soft-delete schedule.
- **`GET /api/mcp/playbooks`**: Read instruction templates.
- **`DELETE /api/mcp/playbooks/{playbook_id}`**: Soft-delete playbook.
These endpoints are legacy compatibility surfaces. Prefer project recurring-task definitions, scoped resources, and project agent profiles for new automation.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- **`PATCH /api/mcp/schedules/{id}`**: Update schedule.
- **`DELETE /api/mcp/schedules/{id}`**: Soft-delete schedule.
- **`GET /api/mcp/playbooks`**: Read instruction templates.
- **`DELETE /api/mcp/playbooks/{playbook_id}`**: Soft-delete playbook.
These endpoints are legacy compatibility surfaces. Prefer project recurring-task definitions, scoped resources, and project agent profiles for new automation.
### Artifacts
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
### Artifacts
- **`POST /api/mcp/artifacts`**: Upload structured business files or artifacts.
- **`GET /api/mcp/artifacts`**: Fetch artifacts.
- **`DELETE /api/mcp/artifacts/{id}`**: Soft-delete artifact.
Artifacts should represent source documents, working files, proofs, deliverables, templates, or export bundles. Do not use artifact storage for raw logs, task chatter, or reconnect traces.
When storing an artifact by reference URL instead of inline text, send a real `sha256` and `sizeBytes`. Do not hash the URL string.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- **`GET /api/mcp/customers/{id}/resources`**: List customer-scoped resources.
- **`POST /api/mcp/customers/{id}/resources`**: Create a customer-scoped resource such as a mailbox, identity, or template.
- **`PATCH /api/mcp/customers/{id}/resources/{resource_id}`**: Update a customer-scoped resource.
- **`DELETE /api/mcp/customers/{id}/resources/{resource_id}`**: Archive a customer-scoped resource.
- **`GET /api/mcp/projects/{project_id}/resources`**: List project-scoped resources.
- **`POST /api/mcp/projects/{project_id}/resources`**: Create a project-scoped resource.
- **`PATCH /api/mcp/projects/{project_id}/resources/{resource_id}`**: Update a project-scoped resource.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- **`GET /api/mcp/projects/{project_id}/resources`**: List project-scoped resources.
- **`POST /api/mcp/projects/{project_id}/resources`**: Create a project-scoped resource.
- **`PATCH /api/mcp/projects/{project_id}/resources/{resource_id}`**: Update a project-scoped resource.
- **`DELETE /api/mcp/projects/{project_id}/resources/{resource_id}`**: Archive a project-scoped resource.
- **`POST /api/mcp/resources/{resource_id}/lease`**: Lease a scoped resource into the active runtime for a task or session.
Use scoped resources for customer and project mailboxes, billing data, identities, templates, and shared external accounts. Do not force those into per-agent SMTP records.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
### Incidents
- **`POST /api/mcp/incidents`**: Emit incident payload.
- **`PATCH /api/mcp/incidents/{id}`**: Update incident status (`open`, `acknowledged`, `resolved`).
- **`DELETE /api/mcp/incidents/{id}`**: Soft-delete incident.
### Context Retrieval (CRM)
- **`GET /api/mcp/projects`**: Fetch active projects and customer context.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- **`GET /api/mcp/customers`**: Fetch customers and their notes.
- **`POST /api/mcp/customers`**: Create or update customer.
- **`PATCH /api/mcp/customers/{id}`**: Update customer context.
- **`DELETE /api/mcp/customers/{id}`**: Soft-delete customer.
- **`POST /api/mcp/projects`**: Create a new project.
- **`PATCH /api/mcp/projects/{id}`**: Update project status.
- **`DELETE /api/mcp/projects/{id}`**: Soft-delete project.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- **`DELETE /api/mcp/customers/{id}`**: Soft-delete customer.
- **`POST /api/mcp/projects`**: Create a new project.
- **`PATCH /api/mcp/projects/{id}`**: Update project status.
- **`DELETE /api/mcp/projects/{id}`**: Soft-delete project.
### Project Memory
- **`POST /api/mcp/projects/{id}/memory`**: Add knowledge to a project.
The skill directs the agent to use network access, local file state, environment variables, and likely shell-based install/bootstrap flows, but it does not declare any explicit tool scope or permission boundaries. This is dangerous because an operator or host runtime may invoke the skill without understanding that it can transmit data to a remote SaaS, read secrets from environment variables, and persist state locally, expanding the blast radius of misuse or prompt-triggered execution.
The skill describes Emperor Claw as the system of record for tasks, incidents, resources, artifacts, integrations, and chat history, but it does not clearly warn users that invoking the skill may send operational data and potentially sensitive chat content to a remote third-party control plane. This omission undermines informed consent and can lead to unintended disclosure of internal state, customer data, or conversation content.
The activation phrase is broad and operationalizes remote synchronization and message checking with no project, account, or consent constraints. In context, this is riskier than a generic skill because activation leads directly into registering runtimes, opening WebSocket connections, loading memory, and interacting with a control plane that stores chat and task state.
The bridge persists reconnect cursors, session/agent identifiers, recent message fingerprints, and pending operation IDs to a predictable local file under the user's home directory without permission hardening or explicit disclosure. On multi-user systems or poorly secured hosts, this state can leak operational metadata and enable session correlation, replay-oriented analysis, or privacy exposure.
The bridge registers the runtime with the "credentials" capability and exposes a leaseIntegration method even though the example is presented as a passive adapter with no execution logic. That mismatch expands the trust boundary: any future task/message handler attached to this bridge could obtain live integrations and act with external credentials, increasing the chance of unintended privileged access or abuse.
Incoming remote thread activity is automatically summarized and written into persistent agent memory, and the system also auto-responds, without any disclosure or consent flow for message retention. In this control-plane context, messages may contain sensitive business, personal, or operational data, so silent ingestion creates privacy, compliance, and over-collection risks.
The code reads EMPEROR_CLAW_API_TOKEN from environment variables, which is a sensitive credential access path. Although the file has brief comments about bridge state persistence, there is no user-facing warning, confirmation, or explanatory comment/docstring disclosing that credentials will be consumed from the local environment.
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
"recentTaskFingerprints": self.recent_task_fingerprints[-DEDUPE_WINDOW:],
"pendingOperationIds": self.pending_operation_ids[-DEDUPE_WINDOW:],
}
BRIDGE_STATE_PATH.write_text(json.dumps(state, indent=2) + "\n", "utf-8")
self.state = state
def remember_message(self, msg):
The _http helper sends authenticated HTTP requests to a remote API and is used throughout the bridge to transmit runtime identity, messages, task notes, memory entries, and status data. The file includes operational print statements, but they do not clearly disclose to the user that local conversation/task content and host metadata will be sent to an external service.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Emperor Claw is a hosted SaaS control plane. You do not need to self-host the UI.
1. Navigate to [emperorclaw.malecu.eu](https://emperorclaw.malecu.eu)
2. Create an account or sign in
3. Create your Company Workspace
## 2. Generate an API Token
The document instructs users to place a long-lived API token into a local config file or environment variables, but it does not explain the security implications, such as accidental exposure through checked-in dotfiles, process inspection, shell history, logs, or shared host environments. Because this skill operates a hosted control plane for an AI workforce, compromise of the token could grant unauthorized access to the workspace and agent orchestration functions.
Detected: suspicious.env_credential_access