Back to skill

Security audit

飞书知识库整理专家

Security checks for vulnerabilities and agentic risk

Overview

This Feishu wiki organizer mostly matches its stated purpose, but it needs review because it ambiguously describes an hourly background checker that could keep accessing and logging wiki data after the session.

Install only if you intend to let the skill reorganize Feishu wiki content. Require a dry-run plan, specific target knowledge bases, explicit approval for each move batch, and separate approval for any cross-library moves. Treat automatic hourly checks as disabled unless you personally set them up, and verify/remove any cron entry and local .kb_organizer logs or status files when finished.

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

Warning
Location
SKILL.md:460
Finding

Persistent Hourly Cron Task with Contradictory Opt-In State

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 460–469; corroborating status declaration at line 557
Vulnerability Type: Persistent scheduled execution
Risk Level: Medium

Relevant Skill Instructions

The relevant source segment defines the following behavior:

text
Scheduled task configuration — manual enablement required

Disabled by default. Enable only after the user explicitly requests automatic checks.

Trigger time: Every hour at minute zero (`0 * * * *`)
State file: `~/.openclaw/workspace/.kb_organizer/status.json`
Log file: `~/.openclaw/workspace/.kb_organizer/organizer.log`
Automatically pause during manual organization
Record every automatic change in the log
Disable command: The user says “disable automatic checks”

A later status table contradicts the default-disabled statement:

text
Cron | Add scheduled task | Completed — automatic check every hour

Technical Analysis

The Skill specifies an hourly cron task that can survive the initiating Skill run and continue operating in later sessions. Cross-session scheduled execution is a persistence mechanism and therefore falls under T06: System Persistence.

Scheduled monitoring may be a legitimate optional feature for maintaining organized knowledge bases. However, it is not required for the Skill's primary one-time organization function and therefore exceeds the minimum privileges necessary unless the user separately and explicitly opts in.

The main security concern is the contradiction between the configuration sections, which say that scheduling is disabled by default and requires explicit consent, and line 557, which states that the cron task has already been added and is checking hourly. An agent could interpret the latter declaration as authorization to install, retain, or assume the existence of the scheduled task without obtaining fresh consent.

The scheduled workflow can repeatedly access Feishu kno ...[truncated 2842 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the contradictory completion claim. Delete or correct line 557 so it does not state that an hourly cron task has already been added.
  2. Require immediate, explicit opt-in. Ask for confirmation directly before creating a scheduled task. General approval to organize a knowledge base must not authorize persistence.
  3. Separate one-time and scheduled modes. Keep scheduled monitoring in a distinct setup procedure or separate Skill that is not loaded during ordinary one-time organization.
  4. Display the exact cron configuration. Before installation, show the schedule, executable command, accessed Feishu spaces, state files, log files, expiration time, and uninstall command.
  5. Use bounded persistence. Assign an expiration date or maximum execution count and automatically remove the cron entry when the organization task is complete.
  6. Scope recurring access narrowly. Restrict scheduled checks to knowledge-base spaces explicitly selected by the user rather than scanning every accessible space.
  7. Require per-batch authorization. Never treat approval from a previous session or batch as authorization for later document movements.
  8. Provide a concrete uninstall operation. Identify the exact cron entry and supply a deterministic command or procedure to remove it and verify removal.
  9. Minimize persistent metadata. Avoid storing document titles when node identifiers are sufficient. Protect all state and log files with mode 0600.
  10. Implement retention controls. Delete state, logs, document identifiers, and lock files after completion or after a short user-approved retention period.
  11. Audit scheduled executions. Record whether each run only inspected metadata or performed a mutation, and make this history readily visible to the user.
  12. Preserve least-privilege content access. Continue limiting feishu_fetch_doc calls to ambiguous documents and do not transmit fe ...[truncated 37 chars]
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 (6)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill advertises a strict non-destructive scope ('不合并、不删除原文'), but later instructions discuss merge workflows and manual deletion of placeholders. This mismatch can mislead users and downstream agents about the actual operational risk, causing destructive or semantically broader actions than the manifest suggests.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation phrases include very broad everyday language such as '帮我整理一下' and '知识库太乱了', which can trigger the skill in ambiguous contexts. Because this skill performs organizational and potentially state-changing operations, over-broad invocation increases the risk of unintended activation and unapproved document movement.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The core rules forbid cross-library moves, but later sections permit them with user approval. In a tool that reorganizes large document sets, this inconsistency can cause unintended data movement across knowledge boundaries, increasing the chance of misfiling, overexposure, or violating retention/ownership expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document mandates a unified naming format using Chinese numerals ("一、二、三") for directory names, which imposes a specific language/locale convention. The file does not indicate that this is optional, user-selected, or justified as a region-specific requirement, so it conflicts with the policy against forcing a language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The naming rule requires the knowledge base format [产品名/项目名]-[文档性质] and prohibits mixed Chinese/English naming, effectively enforcing a specific language/locale style. No user choice or documented regional justification is provided, so this is a natural-language locale policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill gives conflicting failure handling: one part says failed moves must fall back into '其他', while another says failures should be logged and skipped. Inconsistent error behavior can produce silent data integrity problems, such as misplaced documents or incomplete reorganization that the operator believes succeeded.

Content

No source excerpt is available for this finding.