Back to skill

Security audit

Task Management

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real task-management skill, but it needs Review because its web interface can expose and change tasks over the network without login and has avoidable data-handling weaknesses.

Install only if you are comfortable reviewing and operating it as a local task database tool. Do not run the Web server on an untrusted network unless it is bound to localhost or placed behind authentication; prefer pinned, verified releases; and avoid storing sensitive business or personal task data until the API authentication, status validation, XSS, and database-permission issues are fixed.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
server.go:67
Finding
Unauthenticated Task Management API Exposed on All Network Interfaces<![CDATA[ ## Vulnerability Details **File Location**: `server.go:67-86` **Vulnerability Type**: Missing authentication and network access restrictions **Risk Level**: High ### Vulnerable Code ```go // Routes e.GET("/", indexHandler) e.GET("/tasks", tasksHandler) e.GET("/tasks/:uuid", taskDetailHandler) e.POST("/api/tasks", createTaskAPI) e.GET("/api/tasks", queryTasksAPI) e.PUT("/api/tasks/:uuid", updateTaskAPI) e.PUT("/api/tasks/:uuid/status", updateTaskStatusAPI) e.GET("/api/stats", getStatsAPI) // Start server addr := fmt.Sprintf(":%d", port) fmt.Printf("Server started at http://localhost:%d\n", port) fmt.Println("The port can be configured through TASK_SKILL_PORT") e.Logger.Fatal(e.Start(addr)) ``` The status endpoint also accepts any caller-supplied status without authorization or transition validation: ```go var err error if input.ReviewComment != "" { err = database.UpdateTaskStatusWithComment( uuid, input.NewStatus, input.ReviewComment, ) } else { err = database.UpdateTaskStatus(uuid, input.NewStatus) } ``` ### Technical Analysis The address `:<port>` listens on all available network interfaces, not only the loopback interface. The displayed `localhost` URL therefore gives a misleading impression that the service is locally restricted. None of the task-management routes require authentication, authorization, an API token, or user-role checks. Any client that can reach the port can: - Enumerate tasks and their contents. - Create new tasks. - Modify task titles, priorities, and projects. - Change task status. - Mark a task as completed without human approval. The implementation also fails to enforce the documented workflow transitions. In particular, the status endpoint passes arbitrary `new_status` values directly to the database. This contradicts the documented requirement that an AI agent must not approve a task without explicit human authorization. ### Attack Path 1. An attacker discovers port 8080 on a w ...[truncated 1007 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Bind to loopback by default: ```go addr := fmt.Sprintf("127.0.0.1:%d", port) ``` 2. Require explicit configuration before listening on non-loopback interfaces. 3. Add authentication to every API and page that exposes task data. 4. Enforce authorization separately for read, edit, approval, and administrative operations. 5. Implement a server-side transition matrix, for example: - `pending` → `agent_working` - `agent_working` → `agent_review` - `agent_review` → `human_review` - `human_review` → `done` only for an authenticated human reviewer 6. Reject unknown status strings and invalid transitions with HTTP 400 or 403. 7. Add CSRF protection when browser cookies or sessions are introduced. 8. Place the service behind a firewall or authenticated reverse proxy when remote access is required. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
templates/tasks.html:114
Finding
Stored Cross-Site Scripting Through Task Fields<![CDATA[ ## Vulnerability Details **File Location**: `templates/tasks.html:114-180`; `templates/index.html:66-77` **Vulnerability Type**: Stored cross-site scripting through unsafe `innerHTML` construction **Risk Level**: High ### Vulnerable Code The task list inserts database-controlled assignee and tag values directly into an HTML string: ```javascript return ` <tr> <td><a href="/tasks/${task.uuid}">${titlePrefix}${escapeHtml(task.title)}</a> ${titleBadge}</td> <td>${task.project ? `<span class="badge badge-project">${escapeHtml(task.project)}</span>` : '-'}</td> <td><span class="badge badge-${task.status}">${task.status}</span></td> <td>P${task.priority}</td> <td>${task.assignee_name || '-'}</td> <td>${task.tags ? task.tags.split(',').map(t => `<span class="badge badge-tag">${t}</span>`).join('') : '-'}</td> <td>${actions}</td> </tr> `; ``` The resulting strings are assigned to `innerHTML`: ```javascript container.innerHTML = '<table class="table"><thead><tr><th>Title</th><th>Project</th>' + '<th>Status</th><th>Priority</th><th>Assignee</th><th>Tags</th>' + '<th>Actions</th></tr></thead><tbody>' + rows.join('') + '</tbody></table>'; ``` The dashboard contains an additional unsafe assignee sink: ```javascript container.innerHTML = '<table class="table"><thead><tr><th>Title</th><th>Project</th>' + '<th>Status</th><th>Priority</th><th>Assignee</th><th>Created</th>' + '</tr></thead><tbody>' + data.tasks.map(task => ` <tr> <td><a href="/tasks/${task.uuid}">${escapeHtml(task.title)}</a></td> <td>${task.project ? `<span class="badge badge-project">${escapeHtml(task.project)}</span>` : '-'}</td> <td><span class="badge badge-${task.status}">${task.status}</span></td> <td>P${task.priority}</td> <td>${task.assignee_name || '-'}</td> <td>${formatDate(task.created_at)}</td> </tr> ...[truncated 2059 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Stop generating task rows through HTML string concatenation. 2. Create DOM nodes with `document.createElement` and assign untrusted values using `textContent`. 3. If HTML rendering is unavoidable, use a maintained sanitizer with a restrictive policy. 4. Do not place database-controlled data into inline event handlers. Register handlers through `addEventListener`. 5. Validate UUIDs, statuses, priorities, and tags against strict allowlists. 6. Apply context-specific encoding for HTML text, HTML attributes, URLs, CSS classes, and JavaScript strings. 7. Add a restrictive Content Security Policy that disallows inline script and inline event handlers. 8. Add regression tests using payloads in every user-controlled task field, including title, project, assignee, tags, description, and review comments. ]]>

T03 · Remote Payload Retrieval and Execution

Warning
Location
SKILL.md:48
Finding
Unpinned and Unverified Remote Package and Executable Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:48-66` **Vulnerability Type**: Remote payload retrieval and execution without integrity verification **Risk Level**: Medium ### Vulnerable Code ```bash # Install the latest version from GitHub pip install git+https://github.com/xfwgithub/aitask-skill.git # Or install from local source git clone https://github.com/xfwgithub/aitask-skill.git cd aitask-skill pip install -e . ``` The binary installation instructions also retrieve a mutable release and execute it: ```bash # Download the latest complete package wget https://github.com/xfwgithub/aitask-skill/releases/latest/download/task-skill.zip unzip task-skill.zip cd task-skill ./task-skill --version # Or download a specified version # wget https://github.com/xfwgithub/aitask-skill/releases/download/v0.4.3/task-skill-v0.4.3.zip ``` ### Technical Analysis The recommended installation methods retrieve code from a personal GitHub repository without pinning an immutable commit and without checking a cryptographic checksum or signature. The `latest` release URL is explicitly mutable. The Git-based pip command also follows the repository's current default branch. Consequently, the code reviewed in this audit is not guaranteed to be the code installed later. The downloaded archive contains an executable that is run immediately after extraction. HTTPS protects transport but does not protect against repository compromise, malicious release replacement, maintainer-account compromise, or an intentionally changed upstream payload. Although the download supports the declared installation functionality, mutable and unverified executable retrieval is not the minimum-risk mechanism necessary to distribute the Skill. ### Attack Path 1. An attacker compromises the upstream repository, maintainer account, release workflow, or release asset. 2. The attacker replaces the latest archive or modifies the default branch. 3. A user follows the documented `wget`, `p ...[truncated 764 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `latest` URLs with immutable, versioned release URLs. 2. Pin Git installations to a full commit hash rather than a branch or tag alone. 3. Publish SHA-256 or stronger checksums through an independently protected channel. 4. Verify the checksum before extraction or execution: ```bash sha256sum -c task-skill-v0.4.3.zip.sha256 ``` 5. Sign release artifacts using Sigstore, GPG, or another verifiable release-signing mechanism. 6. Prefer reproducible source builds over distributing opaque executables. 7. Document the exact expected version, commit, checksum, and signer identity. 8. Avoid automatically executing a downloaded binary solely to check its version. ]]>

T08 · Insecure Dependencies

Warning
Location
templates/base.html:10
Finding
Third-Party JavaScript Loaded Without Subresource Integrity<![CDATA[ ## Vulnerability Details **File Location**: `templates/base.html:10` **Vulnerability Type**: Browser-side supply-chain dependency without integrity enforcement **Risk Level**: Medium ### Vulnerable Code ```html <script src="https://unpkg.com/htmx.org@1.9.10"></script> ``` ### Technical Analysis Every Web UI visit retrieves and executes JavaScript from the unpkg content delivery network. No Subresource Integrity hash is supplied, and no restrictive Content Security Policy limits the script's behavior. Versioning the URL reduces accidental upgrades, but it does not cryptographically bind the browser response to a reviewed file. A compromised CDN, package publication, DNS path, or upstream account could deliver modified JavaScript. The dependency also contradicts the Skill's description as “zero dependency.” ### Attack Path 1. An attacker compromises the CDN response path or the relevant package asset. 2. A user opens the task manager Web UI. 3. The browser downloads the altered script from unpkg. 4. The browser executes it in the task manager's origin. 5. The script sends same-origin requests to the task API or reads task data exposed to the page. ### Impact Assessment A malicious dependency executes with the same browser-origin privileges as the application frontend. It can enumerate, create, and modify tasks, manipulate the interface, and access any authentication material that may later be made available to JavaScript. The finding does not establish that the current htmx asset is malicious; it identifies the absence of controls that bind the executed dependency to the reviewed content. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Vendor the reviewed JavaScript file under `static/js` and serve it from the application. 2. If a CDN is required, add a verified Subresource Integrity hash and the appropriate `crossorigin` attribute. 3. Deploy a Content Security Policy that restricts `script-src` to trusted sources and disallows unsafe inline code. 4. Pin dependency versions and regularly review updates. 5. Include frontend assets in release checksums and software bills of materials. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
utils.go:17
Finding
Weak Task Database Directory Permissions and Predictable Shared Temporary Fallback<![CDATA[ ## Vulnerability Details **File Location**: `utils.go:17-39` **Vulnerability Type**: Insecure local data storage and predictable temporary file path **Risk Level**: Medium ### Vulnerable Code ```go func getDatabasePath() string { // Check environment variable if dbPath := os.Getenv("TASK_SKILL_DB_PATH"); dbPath != "" { return dbPath } // Default path: ~/.task-skill/tasks.db homeDir, err := os.UserHomeDir() if err != nil { // Fall back to /tmp if the home directory cannot be found return "/tmp/task-skill_tasks.db" } dbDir := filepath.Join(homeDir, ".task-skill") dbPath := filepath.Join(dbDir, "tasks.db") // Ensure the directory exists if err := os.MkdirAll(dbDir, 0755); err != nil { // Fall back to /tmp if directory creation fails return "/tmp/task-skill_tasks.db" } return dbPath } ``` ### Technical Analysis The default task database directory is created with mode `0755`, allowing other local users to traverse and inspect directory metadata. The code does not explicitly enforce mode `0600` on the SQLite database, so its final permissions depend on the process umask and SQLite file-creation behavior. If the home directory cannot be resolved or the application directory cannot be created, the code silently falls back to the fixed path `/tmp/task-skill_tasks.db`. A shared and predictable temporary path can be pre-created or replaced with a symbolic link by another local user if platform protections do not prevent it. The `TASK_SKILL_DB_PATH` override is also accepted without ownership, file-type, or symlink validation. ### Attack Path 1. Another local user predicts the fallback path `/tmp/task-skill_tasks.db`. 2. Before the application starts, the user creates that path or places a symbolic link at it. 3. The application encounters a home-directory or directory-creation failure and opens the predictable fallback path. 4. Depending on filesystem protectio ...[truncated 619 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create the application directory with mode `0700`. 2. Explicitly create or chmod the database file to mode `0600`. 3. Do not silently fall back to a fixed path in a shared temporary directory. 4. If temporary storage is unavoidable, create a private directory with `os.MkdirTemp`, verify ownership, and use restrictive permissions. 5. Reject symbolic links and non-regular files before opening a configured database path. 6. Validate that `TASK_SKILL_DB_PATH` resolves to a user-owned, trusted location. 7. Fail securely with a clear error if protected storage cannot be established. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The documented purpose frames this as a simple task-management skill, but the content also includes operationally significant behavior such as launching a web server and obtaining binaries/static assets. This mismatch can mislead users or agents about the actual attack surface and trust assumptions, making risky actions appear routine.

Vague Triggers

High
Confidence
95% confidence
Finding
Update and delete trigger phrases are ambiguous, and some phrases overlap across different destructive or state-changing actions. In this skill context, ambiguous activation is especially dangerous because it can lead to cancellation, review submission, completion, or deletion of tasks without clear user intent.

YARA rule 'agent_skill_remote_bootstrap_execution': Remote script or code download followed by execution/bootstrap installation [agent_skills]

High
Category
YARA Match
Content
�况如何"

### 任务详情
- "任务详情"、"查看某个任务"、"任务信息"

### 回收任务
- "回收任务"、"任务到期"、"重置任务状态"

### 删除任务
- "彻底删除"、"物理删除"、"删除任务"

### 更新技能
- "更新技能"、"升级技能"、"检查更新"


## 安装

### 方式一:通过 pip 安装(推荐)

```bash
# 从 GitHub 安装最新版本
pip install git+https://github.com/xfwgithub/aitask-skill.git

# 或从本地源码安装
git clone https://github.com/xfwgithub/aitask-skill.git
cd aitask-skill
pip install -e .
```

### 方式二:直接下载二进制

```bash
# 下载最新版本的完整包(包含 Web UI 静态资源)
wget https://github.com/xfwgithub/aitask-skill/releases/latest/download/task-skill.zip
unzip task-skill.zip
cd task-skill
./task-skill --version

# 或者下载指定版本
# wget https://github.com/xfwgithub/aitask-skill/releases/download/v0.4.3/task-skill-v0.4.3.zip
```

## 配置 AI Agent 技能

安
Confidence
97% confidence
Finding
The skill instructs users or agents to install directly from a remote Git repository and download executable/binary packages from the network. This creates a classic supply-chain/bootstrap risk: a compromised repository, release asset, or transit path could result in untrusted code execution under the user's or agent's privileges.

Ae1

High
Category
analysis-evasion
Content
安装完成后,将 `SKILL.md` 复制到你的 AI Agent 技能目录:
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
安装完成后,将 `SKILL.md` 复制到你的 AI Agent 技能目录:
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill declares no explicit tool restrictions while its documented behavior includes network access, shell execution, downloading artifacts, and starting a server. In an agent setting, missing scope boundaries increases the chance that the skill is invoked with broader-than-necessary capabilities, enabling unintended command execution or remote retrieval during normal task-management flows.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
文件整体以中文描述技能用途和触发方式,且未说明是否支持用户选择其他语言或是否仅适用于特定中文区域场景。按照语言/locale 策略,若技能隐含强制特定语言而无用户 opt-in 或明确合理性说明,属于自然语言策略问题。

Vague Triggers

Medium
Confidence
94% confidence
Finding
Broad trigger phrases like everyday reminders can cause the skill to activate in contexts where the user did not intend task creation. In an agent environment, overbroad activation can chain into state-changing shell commands, producing unauthorized task creation or workflow transitions.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The query triggers are also broad and lack boundaries, which can cause unintended invocation when a user casually asks about work or status. While read-oriented actions are less severe than writes, accidental activation still exposes task metadata and can normalize unsafe auto-execution behavior.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The natural-language comment '只支持 macOS Apple Silicon (ARM64)' imposes a hard platform constraint in the skill text. Under the policy rule, forced constraints without user opt-in or a documented justification can be considered a natural-language policy violation.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The manifest markets the skill as basic task CRUD/statistics, but the exposed API includes privileged workflow actions such as claim, review, approve, and recycle. This mismatch can cause an orchestrator or user to invoke higher-impact operations without understanding that the skill can alter ownership or approval state, increasing the chance of unintended authorization or business-process abuse.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The manifest's user-facing description and all listed trigger phrases are exclusively in Chinese, with no indication that users may interact in other languages or choose their preferred locale. This creates a natural-language policy concern because the skill appears to force a specific language without opt-in or documented justification.

Vague Triggers

Medium
Confidence
93% confidence
Finding
Broad trigger phrases like '查看任务', '我的任务', or '更新任务' are likely to match ordinary conversation and cause over-invocation of the skill. In an agent setting, this can route benign chat into a state-changing backend, creating opportunities for accidental task disclosure, reassignment, cancellation, or other unintended operations.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The implementation and its comment/schema are inconsistent: the function claims to recycle overdue tasks based on due_date, but actually resets all agent_working tasks whose created_at is earlier than the supplied value. Because the table has no due_date column, callers may believe they are performing a safe overdue-task recovery while the code can prematurely reassign active work, causing workflow integrity issues and unintended state changes.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill exposes permanent deletion through DeleteTask without any confirmation step, soft-delete safeguard, or explicit execution-time warning. In an agent-integrated context, mistaken calls, prompt-influenced actions, or misuse of a task UUID can cause irreversible loss of task records and associated workflow state.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The manifest describes a task-management skill used to create, query, update, delete, and get statistics for tasks. In addition to those operations, the code can start a web server via the `server`/`--server` command, which is a broader runtime capability not reflected in the manifest description.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
Starting a web server is a deployment/runtime capability rather than an obvious requirement for a zero-dependency task CRUD/statistics skill. The manifest does not indicate that the skill should listen for network requests or expose an HTTP service, making this capability context-inappropriate for the stated purpose.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The date formatting is hard-coded to use the zh-CN locale via toLocaleString('zh-CN'). This imposes a specific language/locale in user-facing output without any opt-in, choice, or documented region-specific requirement, which matches the natural-language policy violation criteria.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The HTML root sets `lang="zh-CN"`, and the visible UI text throughout the template is in Chinese, which indicates the skill is hard-wired to a specific language/locale. The provided file does not offer a user opt-in or language selection, and no region-specific justification is documented here.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This file contains user-facing labels, help text, alerts, and confirmation dialogs exclusively in Chinese, such as '返回列表', '审核意见', and the confirmation prompt. The policy for natural-language violations applies to all file types, and there is no indication that the skill is region-specific or that users can opt into this locale.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This HTML/JS template presents user-facing labels, statuses, buttons, and alerts in Chinese only, such as '总任务数', '待办', and later action text tied to the same UI. The policy explicitly flags skills that force a specific language without user opt-in, and this file provides no visible mechanism for language selection or justification for a Chinese-only locale.

Natural-Language Policy Violations

Low
Confidence
97% confidence
Finding
The user-facing echo messages throughout the script are in Chinese, including startup, build, and server instructions. This imposes a specific language on users without opt-in or documentation that the skill is intended only for a Chinese-speaking or region-specific environment.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The visible UI labels and status text are presented only in Chinese (for example, the page title and task labels), which indicates a fixed language choice in the skill output. The policy allows locale constraints only when users are given a choice or when the restriction is clearly documented and justified, neither of which is present in this file.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The code comments are written in Chinese, which imposes a specific language choice in the skill file without indicating user choice or a documented region-specific requirement. This matches the policy category for language or locale constraints expressed in natural language.

Static analysis

No suspicious patterns detected.