Back to skill

Security audit

Feishu Task Workbench

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for a Feishu task workbench, but it asks for broad cross-session authority and stores or may reveal session routing identifiers without enough scoping safeguards.

Install only if you are comfortable granting the skill cross-session messaging/history access and storing per-task session keys in local registry files. Prefer a host configuration that restricts session visibility to sessions spawned for the current user/workbench, redacts sessionKey and registry paths in normal responses, and invokes the registry helper without shell interpolation.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:45
Finding
Overly Broad Cross-Session Visibility<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:45-66` **Vulnerability Type**: Excessive session permissions and violation of least privilege **Risk Level**: Medium ### Vulnerable Code Snippet ```json { "tools": { "agentToAgent": { "enabled": true }, "sessions": { "visibility": "all" } }, "agents": { "list": [ { "id": "main", "tools": { "allow": [ "sessions_spawn", "sessions_send", "sessions_history", "sessions_list" ] } } ] } } ``` ### Technical Analysis The recommended host configuration grants the main agent visibility into all sessions while also permitting it to read session history and send cross-session messages. This is broader than the Skill's stated requirement of managing only the task sessions associated with a particular Feishu account and peer. The registry contains session keys used as routing capabilities. However, the documented workflow does not require the runtime to verify that a session key belongs to the current channel, account, peer, or registry before calling `sessions_send` or `sessions_history`. With `sessions.visibility=all`, an incorrectly selected, attacker-influenced, or leaked session key could therefore reference an unrelated session. The issue is an access-control weakness rather than evidence of intentionally malicious behavior. Exploitation depends on the host applying the recommended global visibility configuration and an attacker being able to influence or obtain a session identifier. ### Attack Path 1. An operator enables `sessions.visibility=all` using the configuration recommended by the Skill. 2. The main agent receives permission to use `sessions_send` and `sessions_history` against globally visible sessions. 3. An attacker causes an unrelated session key to enter the active task registry, manipulates routing context, or supplies a session identifier through another agen ...[truncated 816 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace global session visibility with the narrowest supported scope, preferably sessions spawned by the current parent agent. 2. Maintain an authoritative mapping of each spawned session key to its channel, account, peer, and task ID. 3. Before every `sessions_send` or `sessions_history` call, verify that: - the session key exists in the current peer's registry; - the session was created by this workbench; - the channel, account, and peer match the active request; - the task has not been archived or otherwise made inaccessible. 4. Do not accept session keys directly from user messages. 5. If the platform supports only global visibility, add an application-level session allowlist and deny access by default. 6. Avoid displaying session keys in normal task status output. Expose them only through a separately authorized diagnostic mode with appropriate redaction and audit logging. 7. Log rejected cross-session access attempts without recording complete session keys or private message contents. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:169
Finding
Potential Shell Command Injection Through User-Controlled Registry Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:169-174` **Vulnerability Type**: Unsafe shell-oriented command construction guidance **Risk Level**: Medium ### Vulnerable Code Snippet ```bash python3 scripts/task_registry.py --registry <path> close <id> --summary "..." python3 scripts/task_registry.py --registry <path> archive <id> --summary "..." ``` Related creation and update workflows similarly place task titles, summaries, session keys, and registry paths into command-line arguments. ### Technical Analysis The Skill documents shell command templates into which runtime values are expected to be substituted. Task titles and summaries can contain user-controlled text, while account and peer identifiers influence the registry path. Quoting a value with double quotes is not sufficient if an agent builds a command by direct string interpolation. An input containing a closing quote, command substitution, shell metacharacters, or a newline can alter the resulting shell command. For example, a malicious summary could terminate the quoted argument and append an additional command. The Python registry script itself does not invoke a shell; `argparse` receives already parsed arguments. The vulnerability arises when the documented command templates are executed through a shell after unsafe interpolation. Consequently, exploitability depends on how the hosting agent invokes these examples. An argument-array API with shell interpretation disabled would prevent this attack. ### Attack Path 1. An attacker provides a task title or summary containing quote termination and shell syntax. 2. The agent directly inserts that content into one of the documented command strings. 3. The agent executes the resulting string through a shell-capable tool. 4. The shell parses part of the attacker-controlled value as command syntax rather than as one argument. 5. The injected command runs with the operating-system privileges of the host agent. The same pattern can ...[truncated 726 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Invoke `task_registry.py` using an argument-array process API with shell interpretation disabled. For example, pass each of the following as a distinct argument: - `python3` - `scripts/task_registry.py` - `--registry` - the validated registry path - the selected subcommand and its arguments 2. Add an explicit instruction that implementations must not build shell commands by concatenating or interpolating user-controlled strings. 3. If the host exposes only a shell interface, use a proven platform-specific quoting function for every dynamic argument. Do not rely on manually surrounding values with double quotes. 4. Prefer passing complex user content through standard input or a structured JSON request rather than through shell command text. 5. Canonicalize and validate registry paths before use. Restrict them to an approved root such as `tasks/feishu`, and reject absolute paths, `..` components, path separators in account or peer identifiers, control characters, and symbolic-link escapes. 6. Apply conservative length limits to titles, summaries, tags, session keys, and path components. 7. Add tests using quotes, command substitutions, semicolons, newlines, Unicode control characters, and path traversal sequences to confirm that each value remains a single inert argument. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The skill claims to provide isolated task routing through session tools, but the described behavior is largely local registry management and does not actually demonstrate the promised session isolation. This mismatch can cause users or operators to trust security and isolation properties that are not really implemented, leading to task cross-contamination, incorrect routing, or unsafe operational assumptions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding
The skill describes filesystem-backed registry operations but does not declare an explicit tool scope or allowed-tools boundary. That increases the risk of overbroad tool access and makes it harder for the host to enforce least privilege, especially because the skill persists per-user task state to disk.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill instructs the agent to create, update, close, and archive persistent task records on disk, but it does not clearly warn users that these actions modify durable state. In conversational environments, hidden persistence can surprise users, create privacy issues, and make accidental or unauthorized state changes more likely.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill says `sessionKey` and registry path may be returned for troubleshooting, but these identifiers are sensitive operational metadata. Exposing them without warning or access control can leak internal topology, user/account identifiers embedded in paths, or enable misuse of session references by anyone who sees the conversation.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The document specifies Chinese-only invocation phrases such as `新建任务:<title>`, `任务状态`, and `任务列表`, and even mandates a Chinese task header format `[任务:#2 周报]`. This is a natural-language locale constraint, but the file does not offer any user language choice or explain why Chinese is required for this skill.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
The canonical commands are prescribed in Chinese and the protocol directs alignment to that command set for Feishu, but the document does not offer an alternative language or indicate user opt-in. This can violate language/locale policy when users are forced into a specific language interaction model.

Vague Triggers

Medium
Confidence
95% confidence
Finding
Treating ordinary plain-text follow-up as an implicit routing trigger creates ambiguous control boundaries in a multi-task environment. Users can easily send messages that are unintentionally attached to the current task, causing context bleed, misexecution, or accidental disclosure of task-specific content into the wrong workstream.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The fallback rule routes all unmatched input to currentTaskId, which is an overly broad default for a system designed to isolate multiple workstreams. This can cause unintended task actions, accidental data mixing between sessions, and makes prompt-injection or social-engineering attacks easier because arbitrary text automatically gains task context.

Static analysis

No suspicious patterns detected.