Back to skill

Security audit

Parallel Task Executor

Security checks for vulnerabilities and agentic risk

Overview

This skill is a broad parallel task runner that could execute destructive file, shell, network, API, and database actions without clearly documented safety gates.

Install only if you intentionally want a skill that can coordinate multiple local and external actions at once. Before use, set strict limits and require explicit confirmation for file deletion, uploads, shell/script execution, API calls, database operations, cleanup, and archival tasks; do not rely on its documented scheduler examples as safe production code without fixing the concurrency and result-handling issues.

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

Warning
Location
references/scheduler.md:68
Finding
Concurrency Limit Is Not Enforced by the Resource Allocation Algorithm## Vulnerability Details **File Location**: `references/scheduler.md:68-79` **Vulnerability Type**: `T09: Insecure Skill Coding Practices` **Risk Level**: Medium **Vulnerable Code**: ```python def allocate_resources(tasks, max_concurrent): """ 分配执行槽 按优先级顺序分配 """ allocated = [] for task in tasks: if len(allocated) >= max_concurrent: allocated.append(task) else: allocated.append(task) return allocated ``` ### Technical Analysis The resource allocation algorithm does not enforce the `max_concurrent` parameter. Both branches of the conditional append the current task to `allocated`, including when the number of allocated tasks has already reached or exceeded the configured limit. Consequently, the function returns every submitted task rather than limiting the allocation to the available execution slots. This contradicts the Skill's documented concurrency controls and removes an intended defense against excessive CPU, memory, I/O, network, and external-service consumption. Although the project contains documentation and example algorithms rather than an executable implementation, directly implementing or following this algorithm would reproduce the flaw. ### Attack Path 1. An attacker or untrusted user submits a large collection of resource-intensive tasks. 2. The scheduler parses and sorts the tasks. 3. The scheduler passes the complete task collection to `allocate_resources()`. 4. Once `len(allocated)` reaches `max_concurrent`, the true branch continues to append tasks instead of deferring them. 5. Every task is returned as allocated. 6. If the downstream execution pool accepts this allocation without an independent limit, excessive tasks run or become active simultaneously. 7. CPU, memory, I/O, network capacity, API quotas, or external-service limits may be exhausted. ### Impact Assessment The issue primarily affects availab ...[truncated 460 chars]
Remediation
## Remediation Suggestions Correct the allocator so it only selects tasks up to the configured capacity and leaves remaining tasks in a pending queue. For example: ```python def allocate_resources(tasks, max_concurrent): if not isinstance(max_concurrent, int) or max_concurrent < 1: raise ValueError("max_concurrent must be a positive integer") allocated = [] pending = [] for task in tasks: if len(allocated) < max_concurrent: allocated.append(task) else: pending.append(task) return allocated, pending ``` Additional hardening should include: - Enforce the same concurrency limit at the actual worker-pool or semaphore boundary rather than relying only on scheduling logic. - Apply per-user and global queue-size limits. - Reject or throttle task batches that exceed configured thresholds. - Apply CPU, memory, I/O, network, and execution-time limits independently. - Require explicit confirmation for large batches containing destructive or externally visible operations. - Add tests proving that active allocations never exceed `max_concurrent`. - Add stress tests covering very large task collections and concurrent submissions. - Monitor active workers, queue depth, resource utilization, rate-limit errors, and task admission failures.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (13)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly supports potentially destructive and system-affecting actions such as file deletion, shell/script execution, application launch, downloads, and network/database operations, but it provides no requirement for confirmation, authorization checks, allowlisting, or safety gating. In a parallel executor, this is more dangerous because multiple risky actions could be launched concurrently, amplifying accidental damage or abuse from a single user instruction.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The P1 trigger conditions use broad phrases like '重要业务功能' and '重要文件' without objective criteria, which can cause the scheduler to misclassify tasks and invoke the skill in unintended situations. In a parallel task executor, incorrect priority assignment can amplify unsafe actions by expediting execution of sensitive operations before sufficient review or user confirmation.

Vague Triggers

Medium
Confidence
97% confidence
Finding
The P2/P3 sections classify broad categories such as cleanup, archival, and optional/background work without clear boundaries or safeguards. Because these categories include potentially destructive operations like log cleanup and archival, vague matching can cause accidental execution or downplay the risk of data-altering tasks in a concurrent execution environment.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The document presents log cleanup, temporary-file cleanup, and historical-data archival as routine work while providing no indication that these actions may erase forensic evidence or affect data integrity. In a parallel executor, treating these as ordinary tasks increases the chance they are batched and run automatically, compounding the impact of mistakes.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The automatic priority mapping is overly abstract and lacks concrete detection rules, making it easy for loosely described tasks to be elevated or misrouted. In this skill, auto-prioritization directly influences execution order and resource allocation, so abstraction errors can turn benign-looking text into privileged or urgent actions.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The examples explicitly show destructive or integrity-affecting operations such as deleting urgent log files and archiving historical data, but omit any warning, approval step, or rollback guidance. In an agent skill, examples often become implementation guidance, so unsafe examples can normalize direct execution of data-destructive commands without proper safeguards.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This markdown file defines the skill's report structure and examples exclusively in Chinese, including headings, field explanations, and status descriptions. Under the language/locale policy rule, forcing a single language without user opt-in or documented regional justification is a natural-language policy violation.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The resource-allocation algorithm claims to enforce execution-slot limits, but both branches append the task, so max_concurrent is never enforced. In a parallel task executor, this can lead to unbounded or unintended task fan-out, increasing the risk of resource exhaustion, denial of service, and unsafe simultaneous execution of user-supplied tasks.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
L253-L256 的函数名和文档明确声称会“并发执行任务”,但实现仅使用普通 for 循环逐个调用 `execute_with_retry(task)`,没有线程、协程、任务池或任何并发机制。这不是简单的实现细节缺失,而是文档对执行语义作出了与代码相反的陈述。

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The entire skill description is written in Chinese and does not indicate that language is selectable or that the skill is intended only for a Chinese-speaking or region-specific context. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
整份技能文档以中文编写,并在任务命令、规则和示例中默认要求中文表述,但没有声明这是特定区域/用户群的限定文档,也没有提供语言选择。根据该规则,未说明理由的单一语言约束可能构成语言/区域政策问题。

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
This markdown file presents all instructions, labels, and examples exclusively in Chinese. Under the policy-violation rule, forcing a single language without user opt-in or documented justification can violate language or locale policy.

Intent-Code Divergence

Low
Confidence
85% confidence
Finding
L257-L264 中 `execute_tasks` 将结果保存为字典列表,但 L275-L280 在 `collect_results` 中又以 `r.status` 的对象属性形式访问这些结果。文档声称这是“收集并整理结果”的实现,但代码各阶段对结果结构的约定彼此冲突,导致该说明对应的实现不可按描述工作。

Static analysis

No suspicious patterns detected.