Back to skill

Security audit

kb-sync

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it claims cloud knowledge-base sync while shipping only a local scanner plus an unrelated persistent learning logger, with weak controls around broad file scanning and future uploads.

Review before installing. Use this only on a narrow notes-only directory, inspect the dry-run file list carefully, avoid JSON/text files that may contain secrets, and do not let the agent call cloud connectors or API upserts until you have confirmed the exact destination and files. Be aware that the learner script can persist local usage notes and preferences in learned_patterns.json.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/kb_sync.py:14
Finding

Cloud synchronization workflow does not enforce sensitive-file filtering

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code implements a dry-run/local diff utility based on file hashes and a stored manifest. Its primary behavior is to detect local adds, updates, and deletes and optionally write a new manifest. This is only a small subset of the declared functionality ('change preview' / diff), but the core advertised purpose—syncing with a cloud knowledge base, including bidirectional diff and conflict handling—is absent. Therefore the description materially overstates and misrepresents the actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个面向笔记与云端知识库的数据同步工具,核心能力应包括扫描本地笔记、访问远程知识库/API、比较差异、处理冲突并执行同步。实际代码完全没有网络请求、文件同步、diff、冲突处理或云端知识库接口调用。相反,它提供的是一个独立的通用“自进化学习模块”CLI:init/record/prefer/insight/reflect,用于记录技能使用情况和偏好,并生成统计洞察与改进建议。其主要目的、操作对象和资源访问范围都与声明严重不符,因此属于明显的描述-行为不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises file read/write behavior through example commands and manifest updates, but it does not declare any explicit tool scope or permission boundary. That creates an authorization and review gap: a caller or platform may not understand that the skill can read local files and persist state, increasing the risk of unintended file access or writes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Broad natural-language triggers can cause the skill to activate on ordinary requests involving notes, comparison, or sync, even when the user did not intend file or cloud operations. In a skill that may read local directories, write manifests, or initiate remote updates, overbroad routing increases the chance of unintended data access or transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill describes uploading local notes to remote knowledge bases and persisting manifest state, but it does not clearly warn that user data may be transmitted externally or that remote content may be modified. In a knowledge-sync context, that omission is dangerous because users may unknowingly expose sensitive notes, overwrite cloud documents, or trigger deletions without informed consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill manifest describes synchronizing between a local notes directory and cloud knowledge bases such as IMA, 腾讯乐享, or a generic API, including bidirectional diff, conflict detection, and cloud document updates. This script never accesses any network service or cloud API; it only scans local files, compares them to a local JSON manifest, and prints add/update/delete candidates.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

When dry-run is disabled, the only side effect is writing the current file-hash map to the provided manifest path. For a skill advertised as updating cloud documents and syncing local notes with remote knowledge bases, persisting a local JSON state file is materially different from performing actual remote synchronization.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file implements a generic cross-skill 'self-evolving learning' component rather than functionality needed for note/knowledge-base synchronization. In this skill context, unrelated reusable logic expands the skill's scope and creates an unnecessary channel for persistent data collection and future behavior shaping, which increases attack surface and violates least-privilege expectations for a sync assistant.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file’s user-facing documentation and CLI descriptions are entirely in Chinese, presenting the skill as a general-purpose module rather than a region-specific tool. This creates a language/locale policy concern because the skill implicitly requires a specific language without offering user opt-in or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This module persistently stores user preferences, capabilities used, error history, notes, and recent operations in learned_patterns.json, which goes beyond what is required to synchronize notes with a knowledge base. Because notes and error messages may contain sensitive content, this creates a local telemetry store that can accumulate private user data and operational metadata without clear minimization, retention control, or consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

All user-facing natural-language instructions and invocation examples are presented only in Chinese, which can amount to a language/locale constraint without user opt-in. The file does not state that the skill is region-specific or offer multilingual usage guidance.

Content

No source excerpt is available for this finding.