Back to skill

Security audit

飞书任务智能体

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real Feishu task automation workflow, but it also installs persistent automation, changes workspace-wide agent routing, and can publish local file-derived summaries to Feishu without enough user control.

Install only if you intentionally want this skill to create and update Feishu tasks, run recurring OpenClaw jobs, update scheduler messages, and change workspace routing behavior. Before use, review the cron jobs, AGENTS.md changes, hidden scheduled-message block, and daily.json upload path; use a constrained workspace that contains only intended journal files and avoid sensitive date-named Markdown files under the app root.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (5)

T01 · Skill Instruction Hijacking

Error
Location
workflows/reg.md:65
Finding

Persistent Agent-Wide Instruction Hijacking Through AGENTS.md Modification

Content
View full analysis
Remediation
View remediation

T06 · System Persistence

Error
Location
workflows/reg.md:31
Finding

Installation of Recurring Cross-Session Background Jobs

Content
View full analysis
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
references/task-decision-rules.md:127
Finding

Concealed Control Instructions Embedded in Scheduled Messages

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
workflows/polled-task-execution.md:75
Finding

Shell Command Injection Risk During Cron Message Updates

Content
View full analysis
--patch '{ "payload": { "message": "<这里换成替换了新 task_guid 后的完整 message 文案>" } }' ``` ### Technical Analysis The workflow tells the model to read an existing cron message, replace the task GUID, and interpolate the resulting complete message into a single-quoted shell argument. It does not define shell escaping, JSON encoding, identifier validation, or a shell-free invocation method. If an attacker can influence the existing cron message, a single quote can terminate the shell string. Additional shell syntax can then be interpreted as commands. Even without command execution, unescaped quotes, backslashes, or line breaks can corrupt the JSON patch and cause unintended scheduler changes. The vulnerable pattern is especially dangerous because cron messages may contain user-derived task content. The workflow places responsibility for constructing executable shell syntax on the language model rather than a deterministic serializer. ### Attack Path 1. An attacker or untrusted user causes a recurring task's cron message to contain a single quote and shell metacharacters. 2. The recurring task completes and produces a `next_task_guid`. 3. The workflow retrieves the existing cron message. 4. It replaces the old GUID but otherwise preserves attacker-controlled content. 5. The model inserts the resulting message into the documented single-quoted `--patch` command. 6. The shell terminates the quoted argumen ...[truncated 725 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/build_daily_json.py:195
Finding

Overbroad Local File Discovery Followed by Remote Profile Publication

Content
View full analysis
JournalCandidate | None: candidates: list[JournalCandidate] = [] for root, dirs, files in os.walk(app_root, topdown=True): dirs[:] = [name for name in dirs if name not in IGNORE_DIRS] root_path = Path(root) for filename in files: match = DATE_FILE_RE.match(filename) if not match: continue file_path = root_path / filename relpath = file_path.relative_to(app_root).as_posix() stat = file_path.stat() candidates.append( JournalCandidate( date_text=match.group("date"), journal_score=journal_path_score(relpath), relpath_length=len(relpath), mtime=stat.st_mtime, path=file_path, relpath=relpath, ) ) if not candidates: return None latest_date = max(candidate.date_text for candidate in candidates) same_day = [candidate for candidate in candidates if candidate.date_text == latest_date] ``` ```markdown 1. 运行 `python3 scripts/build_daily_json.py --app-root .` 2. 写入完成后,调用工具 `feishu_task_agent`,执行 Action 为 `update_profile`,将生成的 `daily.json` 序列化内容作为参数 `profile_content` 写入飞书任务的智能体主页, 参数 `profile_content` 整个是一个 JSON 字符串,不是嵌套 JSON 对象。返回时明确告知本次操作的结果。 ``` ### Technical Analysis The profile builder recursively scans the entire application root for every Markdown file named in `YYYY-MM-DD.md` format. It does not require candidates to be inside a dedicated journal directory. Path hints such as `daily` and `journal` are only tie-break scores, so an unre ...[truncated 1781 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This is the same core issue in Chinese: the skill claims to be the main entry for task creation, polling, registration, and daily.json generation, but the observed capabilities are much narrower. Overstated functionality in a routing skill can mislead reviewers and users, causing unsafe reliance, over-permissioning, and hidden access to local application context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This is the same core issue in Chinese: the skill claims to be the main entry for task creation, polling, registration, and daily.json generation, but the observed capabilities are much narrower. Overstated functionality in a routing skill can mislead reviewers and users, causing unsafe reliance, over-permissioning, and hidden access to local application context.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
77% confidence
Finding

The skill declares no explicit tool scope even though it is documented as using file read/write and environment-backed capabilities. In an agent ecosystem, missing permission boundaries can let the skill access broader resources than callers expect, increasing the blast radius if downstream workflow content is compromised or misrouted.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill enables implicit invocation without any visible trigger constraints, exclusions, or narrowing conditions in this file. Because this agent can create tasks, process unfinished tasks, perform registration/initialization flows, and generate or refresh daily.json, broad auto-routing increases the chance of unintended activation and execution on ambiguous user input, which could lead to unauthorized task creation, unwanted workflow actions, or disclosure/modification of operational summaries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire rule file is written as mandatory operational guidance in Chinese, including required user-facing reply behavior, but it does not indicate that language selection depends on user preference or locale. Because these instructions govern final user replies and confirmations, they effectively impose a specific language without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The example explicitly instructs creation of a scheduled task whose trigger message contains hidden, non-user-visible processing instructions and references automatic execution via a polling workflow. That creates a transparency and consent problem: background jobs may later act on Feishu messages, tasks, or calendar context without the user being clearly informed at setup time, increasing the risk of confused-deputy behavior or overbroad data access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The workflow explicitly sends the generated daily.json content to an external Feishu task agent via update_profile, but the skill text provides no privacy notice, consent gate, or data-classification limits before exporting potentially sensitive project summaries. Because daily.json is derived from the latest日报 and may include internal plans, deliverables, and upcoming work, this creates a real data-sharing risk rather than a purely documentation issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire workflow content is authored in Chinese and presents the procedure as the required operating language, with no opt-in, fallback, or note that the skill is limited to a Chinese-speaking environment. Under the policy, language constraints should either be optional for the user or explicitly justified as region- or compliance-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow goes beyond Feishu task execution and directs the agent to modify external scheduler state by discovering cronjob IDs, rewriting payload messages, and issuing openclaw cron update. This expands the skill's authority from task processing into host automation control, creating a cross-boundary side effect that could alter future execution behavior or retarget scheduled jobs if task data or matching logic is wrong or manipulated.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Using host CLI commands to enumerate all cronjobs and update one is broader than the stated purpose of handling Feishu tasks, and it grants unnecessary access to scheduler configuration. Enumeration plus free-form message replacement increases the chance of touching unrelated jobs, leaking scheduler metadata, or enabling abuse if an attacker can influence the selected cronjob or replacement content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The workflow performs scheduler configuration changes through shell commands without any user-facing warning, approval checkpoint, or audit-oriented disclosure. Silent modification of cron configuration is risky because it changes persistent automation behavior outside the visible Feishu task domain, making misuse or mistakes hard for users to detect until later executions occur.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow creates persistent cron jobs and modifies AGENTS.md without any explicit user-facing warning or confirmation that it will change the workspace and schedule ongoing automated actions. This can surprise users, create durable side effects, and establish recurring execution paths that continue after the initial request, increasing the risk of unauthorized persistence.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · workflows/reg.md (reported line 39)May include surrounding context.

text
   - 判断规则固定为:返回结果中 `name` 等于对应 `Task ID`,即视为该任务已存在,必须跳过,不得重复创建。
   - 根据以下明确任务列表,按顺序逐个执行“先查是否存在,再决定创建/跳过”:
     | 任务唯一 ID (Task ID)                 | 任务描述 (Description)                                                                                 | Cron 表达式              |
     | --------------------------------- | -------------------------------------------------------------------------------------------------- | ---------------------- |
     | feishu-task-daily-report-genarate | 使用技能 `feishu-task-agent`,按 `workflows/agent-profile.md` 的规则在当前应用目录生成或更新 `daily.json`,输出“Todo_Agent_RecentHighlights_Field”和“Todo_Agent_TomorrowsFocus_Field” | `30 23 * * *`          |
     | get-agent-unfinished-tasks        | 使用技能 `feishu-task-agent`,流转到 `workflows/polled-task-execution.md` 执行未开始任务轮询流程 | `*/10 * * * *`          |

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Hard-coding the timezone to Asia/Shanghai without user opt-in can cause scheduled jobs to run at unintended local times, which may lead to missed deadlines, unexpected automation, or execution outside approved operating windows. In a task automation skill, scheduling semantics are security-relevant because they control when persistent automated actions occur.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The registration workflow changes the workspace-level AGENTS.md to enforce global routing behavior for future user inputs, which is far broader than simple Feishu task registration. This creates persistent behavior modification and can silently redirect unrelated future requests into this skill, expanding privilege and control beyond the user’s immediate registration intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The display and description text include Chinese while the default prompt is in English, but the manifest does not say whether language is selected based on user preference. This can create a locale-policy issue if the skill presents or enforces a language without explicit opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document is entirely written in Chinese and does not state that the language is optional, user-selectable, or limited to a China-specific workflow. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language content throughout the file is Chinese-only, including headings, examples, and expected behavior, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking environment. Per the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python file contains multiple inline comments written only in Chinese while the surrounding code and CLI interface are otherwise English-oriented. That creates a language/locale constraint in the natural-language content of the skill without offering any choice or documenting a justified region-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

All natural-language instructions in this workflow are Chinese-only, which can amount to a language policy violation when no user opt-in or alternative locale is offered. The file does not document that the workflow is intentionally region-specific or provide any language choice.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The overview and dependencies state that the full registration/initialization flow relies on OpenClaw built-in Tool capabilities for subsequent registration operations. But the actual steps culminate in directly calling the feishu_task_agent tool for register, which is a distinct tool dependency not reflected by the earlier wording and creates a documentation-to-execution contradiction.

Content

No source excerpt is available for this finding.