Back to skill

Security audit

task killer

Security checks for vulnerabilities and agentic risk

Overview

This skill is meant to stop running work, but it can terminate all visible subagents and process sessions from broad trigger phrases without effective confirmation or scoping.

Install only if you are comfortable with a stop command that may kill active agent work and background sessions without a reliable preview or confirmation. Prefer a version that uses explicit slash commands, confirms ambiguous requests, and limits cleanup to resources created by the current task.

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

T09 · Insecure Skill Coding Practices

Error
Location
index.js:18
Finding
Unscoped Termination of All Visible Agents and Processes Without Effective Confirmation<![CDATA[ ## Vulnerability Details **File Location**: `index.js:18-24`, `index.js:35-62`, and `index.js:101-108` **Vulnerability Type**: Unscoped destructive resource management and ineffective authorization confirmation **Risk Level**: High ### Vulnerable Code ```javascript const { confirm = true, cleanupSubagents = true, cleanupProcesses = true, cleanupTempFiles = true, tempDir = './.temp' } = options; ``` ```javascript if (cleanupSubagents) { try { const subagentsList = await subagents({ action: 'list' }); if (subagentsList.active && subagentsList.active.length > 0) { for (const agent of subagentsList.active) { await subagents({ action: 'kill', target: agent.id }); result.killedSubagents++; } } } catch (error) { console.warn(error.message); } } if (cleanupProcesses) { try { const processList = await process({ action: 'list' }); if (processList.sessions && processList.sessions.length > 0) { for (const session of processList.sessions) { await process({ action: 'kill', sessionId: session.id }); result.killedProcesses++; } } } catch (error) { console.warn(error.message); } } ``` ```javascript export async function quickKill() { console.log('Quick interruption...'); const result = await killTask({ confirm: false, cleanupTempFiles: false }); console.log(result.message); return result; } ``` ### Technical Analysis The `confirm` option is accepted by `killTask`, but it is never evaluated before destructive operations begin. Consequently, its default value of `true` does not cause a confirmation check, and setting it to `false` in `quickKill` has no meaningful control-flow effect. The cleanup logic requests global-looking lists from the `subagents` and `process` tools and iterates over every returned active agent and process session. It performs no ownership, task, tenant, sessi ...[truncated 2483 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Implement real confirmation enforcement** - Require an explicit, authenticated confirmation response before any destructive tool call. - Do not represent confirmation as a boolean supplied by the same caller initiating termination. - Use a short-lived confirmation token tied to the requesting user, current task, and proposed resource IDs. 2. **Restrict cleanup to resources owned by the current task** - Record subagent IDs and process session IDs when the task creates them. - Terminate only IDs found in that task-specific registry. - Verify task ID, session ID, owner ID, or an equivalent immutable ownership attribute before each termination call. 3. **Remove global list-and-kill behavior** - Avoid enumerating all visible resources. - If enumeration is unavoidable, filter the results by trusted ownership metadata and reject resources without verifiable ownership. - Never assume that visibility implies authorization to terminate. 4. **Separate local and global cleanup** - Make task-local cleanup the default. - Place administrator-wide cleanup behind a separate privileged operation with explicit warnings, reauthentication, and audit logging. - Do not expose global cleanup through broad natural-language triggers. 5. **Narrow activation conditions** - Prefer explicit commands or exact interruption requests over ambiguous terms. - Require additional confirmation when activation comes from ordinary conversational text. - Bind interruption commands to the user who owns the active task. 6. **Improve failure handling and auditability** - Record each proposed resource, ownership decision, termination result, and error. - Do not set `interrupted` to `true` unconditionally when termination operations fail. - Return partial-failure status so callers can distinguish complete, partial, and unsuccessful cleanup. 7. **Add security tests** - Verify that resources belonging to other ...[truncated 308 chars]
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 (18)

Vague Triggers

High
Confidence
96% confidence
Finding
The auto-trigger keyword list includes broad, context-ambiguous terms such as '不对', '错了', 'stop', and 'kill', which can appear in normal conversation rather than an explicit cancellation request. In an agent skill, this can cause unintended task termination, disrupt workflows, and potentially suppress safety-relevant or user-requested actions simply because a phrase matched loosely.

Vague Triggers

High
Confidence
96% confidence
Finding
The trigger list contains broad everyday phrases such as '停止', '取消', '别做了', and '重新来', which can appear in ordinary conversation or in quoted/contextual text. This creates a prompt-trigger vulnerability where benign user content can unintentionally activate destructive cleanup behavior, including terminating subagents or processes and possibly deleting files.

Vague Triggers

High
Confidence
95% confidence
Finding
The manifest trigger uses a broad free-form expression with no scope constraints, making accidental activation likely across multilingual conversation. In context, this is dangerous because activation leads to destructive operations on subagents, processes, and temporary files.

Vague Triggers

High
Confidence
97% confidence
Finding
The trigger list is overly broad and includes common conversational phrases such as 'stop', 'cancel', '别做了', and especially context-ambiguous terms like '方向错了' and '任务不对'. In a high-priority skill that can terminate subagents and processes, this creates a real risk of unintended activation, allowing ordinary user feedback or mid-task discussion to abort work unexpectedly.

Natural-Language Policy Violations

Medium
Confidence
83% confidence
Finding
All user-facing instructions, examples, triggers, and confirmations are presented exclusively in Chinese, and the document does not indicate that language choice is optional or region-specific. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The README states that an interruption record file is automatically written to disk, including timestamp and reason, without any warning about persistence, retention, or possible inclusion of task metadata. This creates a privacy and data-handling risk because operational details may be stored locally without user awareness, and could later be exposed through logs, backups, or shared workspaces.

Natural-Language Policy Violations

Medium
Confidence
71% confidence
Finding
All instructions, triggers, and user-facing responses are specified in Chinese, and the examples assume Chinese-language operation. There is no indication that the user can opt into another language or that the Chinese-only behavior is required for a region-specific purpose.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs the agent to kill subagents/processes and optionally delete temporary files without a clear upfront warning about destructive side effects. Users may invoke a seemingly simple 'stop' action without understanding that broader cleanup may terminate unrelated work or remove recoverable artifacts.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The '最佳实践' section states that after the user says stop, the agent should reply within 1 second and '不要继续执行任何工具调用'. However, the documented interrupt workflow explicitly requires calling subagents(action="list"/"kill") and process(action="list"/"kill"), plus optional file cleanup. This is an active contradiction in the skill's own instructions about what the agent should do after interruption.

Missing User Warnings

Medium
Confidence
99% confidence
Finding
The skill performs destructive termination of agents and background processes without effective user confirmation, despite presenting a confirmation-related option. In an agent environment, this can abruptly kill unrelated work, interrupt workflows, and be abused to sabotage running tasks.

Intent-Code Divergence

Medium
Confidence
99% confidence
Finding
A confirm option is exposed and documented, but no confirmation is ever enforced before terminating subagents and processes. This creates a dangerous mismatch between API contract and behavior, making callers believe destructive actions are gated when they are not.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The code advertises temporary-file cleanup but instead writes a new interruption marker file into the temp directory. This is misleading behavior that can cause resource accumulation and create a false sense that cleanup occurred, but it is not directly a security exploit by itself.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
When run directly, the file immediately invokes quickKill and terminates tasks/processes after only a generic log message, with no warning, prompt, or review step. This lowers the barrier to accidental or unauthorized destructive execution and makes misuse easier in operational environments.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The keyword list contains short, ambiguous terms like '不对', '错了', and '重新来' that commonly appear in normal conversation and revision requests. Because these terms can be interpreted as activation signals for a destructive interrupt skill, the manifest increases the chance of accidental cancellation rather than a deliberate user-requested stop.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The cleanup configuration explicitly targets subagents and processes for termination, but the skill provides no warning, preview, or confirmation to the user about the scope of what will be killed. In combination with broad triggers and high priority, this can abruptly stop active execution chains and background tasks, causing loss of work, inconsistent state, or denial of service within the agent workflow.

Intent-Code Divergence

Low
Confidence
88% confidence
Finding
The trigger section says that when the user says any listed phrase, the skill should be used immediately. Later documentation states '除非用户明确说"立即中断",否则先确认', and the YAML also says confirmation is required. These instructions conflict on whether listed stop words cause immediate interruption or require confirmation first.

Natural-Language Policy Violations

Low
Confidence
98% confidence
Finding
The file's comments and user-facing console/result strings are written exclusively in Chinese, with no indication that the user can choose a preferred language. This can violate language/locale policy when a skill imposes a language rather than offering an opt-in or documenting a justified locale restriction.

Natural-Language Policy Violations

Low
Confidence
71% confidence
Finding
The user-facing description and auto-response are written only in Chinese, and the manifest does not indicate that language is configurable or intentionally limited to a Chinese-speaking context. This can violate language/locale policy when users are not given an opt-in or alternative language option.

Static analysis

No suspicious patterns detected.