Back to skill

Security audit

档案文件

Security checks for vulnerabilities and agentic risk

Overview

The skill is an archive-industry report helper, but its examples tell users to create a recurring system task without enough safety controls or removal guidance.

Review this carefully before installing. Do not let an agent create the Windows scheduled task or a cron job unless you explicitly want ongoing automatic execution, have verified the script and config paths, and know how to disable or delete the task. Also note that the bundled script currently does not collect real intelligence and appears syntactically broken, so it may not work as advertised.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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)

T06 · System Persistence

Error
Location
examples.md:64
Finding

Persistent Code Execution Through a Windows Scheduled Task

Content
View full analysis

Vulnerability Details

File Location: examples.md, line 64
Vulnerability Type: Windows scheduled-task persistence
Risk Level: High

Vulnerable Code

powershell
# Create scheduled task
schtasks /create /tn "档案日报" /tr "node C:\Users\PC\.qoder\skills\archive-intelligence\scripts\collect-intelligence.js C:\Users\PC\.qoder\skills\archive-intelligence\examples\daily-config.json" /sc daily /st 09:00

Technical Analysis

The documentation instructs the user or agent to register the Skill's JavaScript collector with Windows Task Scheduler. The task survives the current Skill invocation and executes the referenced script automatically every day.

Recurring execution is consistent with the Skill's declared scheduling feature, but the documented mechanism introduces system persistence without an explicit confirmation checkpoint, constrained execution identity, integrity verification, expiration policy, or removal procedure. It also uses files stored in a user profile as the persistent execution target. Any process capable of modifying the referenced script or configuration can affect subsequent scheduled executions.

The command does not explicitly request administrator or SYSTEM privileges. Therefore, the scheduled task would ordinarily operate within the registering user's security context, and no privilege escalation is demonstrated. Nevertheless, persistent execution exceeds the permissions required for single-run intelligence collection and should only be configured following explicit, informed authorization.

Attack Path

  1. A user or agent follows the instructions in examples.md.
  2. schtasks registers the named task to execute every day at 09:00.
  3. The task remains registered after the initial Skill session ends.
  4. A local process or account with write access to the referenced JavaScript or configuration file modifies or replaces that file.
  5. At the next scheduled execution, Windows launc ...[truncated 917 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require explicit, informed user confirmation immediately before creating any scheduled task.

  2. Clearly display the task name, schedule, executable, configuration file, execution identity, output location, and persistence implications before registration.

  3. Prefer an application-scoped scheduler that can be managed and revoked through the hosting agent rather than creating an operating-system task.

  4. If Windows Task Scheduler is necessary, run the task under a dedicated least-privileged account with access limited to the required script, configuration, and report directory.

  5. Store the script and configuration in a protected directory that untrusted users and processes cannot modify.

  6. Use fully quoted absolute paths for Node.js, the script, the configuration, and the output directory.

  7. Validate the integrity or signature of the script and configuration before each scheduled execution.

  8. Add an expiration policy or require periodic renewal instead of registering an indefinite task.

  9. Document how to inspect and remove the task, including:

    powershell
    schtasks /query /tn "档案日报"
    schtasks /delete /tn "档案日报" /f
    
  10. Offer a non-persistent, single-run collection mode as the default and create recurring tasks only when the user specifically requests scheduling.

Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明的核心能力是“获取档案行业最新情报、政策法规、技术动态和行业资讯”,并可用于“设置定时情报收集任务”。但提供的代码实际只做了以下事情:读取可选本地JSON配置、拼接一份包含若干占位文本的Markdown报告、创建输出目录并写入本地文件。虽然代码中定义了若干来源URL和关键词,但这些配置从未被用于发起网络请求、爬取、搜索、解析或汇总任何外部信息,因此并未实现“获取最新情报”的主要目的。此外,也没有任何定时器、cron、任务调度或持久化任务设置逻辑,通知功能也只是打印“待实现”。因此,代码实际行为与声明用途存在明显且实质性的不匹配。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The activation description is broad enough that an agent may invoke this skill in loosely related contexts involving news, policy, research, or scheduled collection, increasing the chance of unintended tool use or overbroad data gathering. In an agentic environment, unclear invocation boundaries can cause scope creep, unnecessary external lookups, or execution of recurring tasks without sufficiently specific user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The example instructs users to create scheduled tasks that automatically run a local script and generate files on an ongoing basis, but it does not warn that this changes the host system state or continues executing after the initial interaction. In an agent-skill context, normalizing unattended persistence-like behavior without explicit user confirmation or safety guidance can lead to unintended automation, surprise execution, and misuse if the referenced script or config is later modified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The task name, source categories, and all keywords are specified only in Chinese, which indicates the skill is configured to operate in a single language/locale. There is no accompanying field or note offering a language choice, opt-in, or justification that this is a region-specific skill, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level comment describes the file as '档案行业情报收集脚本', and later logs say '情报收集完成', implying real collection work. In reality, the code never fetches or processes any source data and only writes a prefilled markdown skeleton.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill description says it obtains latest industry intelligence, policy updates, technical trends, and news. However, the implemented logic only builds a static template with '正在收集...' placeholder text and writes it to disk; there is no network access, scraping, querying, or data ingestion from the declared sources.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file presents all instructions, requests, and outputs in Chinese and does not indicate that the user may choose another language or that the skill is intentionally restricted to a Chinese-language context. Under the policy, forcing a specific language without user 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
89% confidence
Finding

The configuration hard-codes a Chinese task name and Chinese source/keyword values, indicating the skill is scoped to a specific language/locale. Because the file provides no user opt-in or documented justification for this locale restriction, it may violate the language-choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The report timestamp is hard-coded to use the 'zh-CN' locale via toLocaleString('zh-CN'). This imposes a specific language/locale choice in user-visible output without offering configuration or opt-in, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.