Back to skill

Security audit

Knowledge Organizer

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated knowledge-base purpose, but its image and sync handling is broad enough to warrant user review before installation.

Review before installing. Use a test vault and dry-run first, avoid importing drafts from untrusted sources, keep custom Feishu/IMA endpoints unset unless you control them, and restrict the agent to the intended vault path and trusted image sources where possible.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/image_assets.py:50
Finding

Unrestricted Remote Image Fetching Enables Server-Side Request Forgery and Resource Exhaustion

Content
View full analysis
None: destination.parent.mkdir(parents=True, exist_ok=True) with urllib.request.urlopen(url) as response, destination.open("wb") as handle: shutil.copyfileobj(response, handle) ``` The function is reached using imported image metadata: ```python if remote_target: filename = Path(urllib.parse.urlparse(remote_target).path).name or "image" if not Path(filename).suffix: filename = f"{Path(filename).stem or 'image'}.png" destination = _unique_path(asset_dir / filename) try: destination.parent.mkdir(parents=True, exist_ok=True) (download_image or download_remote_image)(remote_target, destination) ``` ### Technical Analysis Remote image URLs supplied through an imported draft are passed directly to `urllib.request.urlopen()` without validating the destination host. The URL classification logic accepts both HTTP and HTTPS URLs, while the downloader does not: - Reject loopback, private, link-local, reserved, or multicast addresses. - Revalidate destinations after DNS resolution. - Validate redirect targets. - Require HTTPS. - Set a network timeout. - Restrict response size. - Validate the response content type. Because `urlopen()` follows HTTP redirects, an initially public URL may redirect to a private or link-local resource. The lack of a response-size limit also permits an attacker-controlled server to stream excessive data into the vault. ### Attack Path 1. An attacker supplies an article or structured draft containing an image such as `images[].src`. 2. The image URL points directly to an internal service, localhost, a cloud metadata address, or a public redirector that redirects to such an address. 3. `render_obsidian_note()` calls ...[truncated 916 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/image_assets.py:69
Finding

Untrusted Image Paths Can Copy Arbitrary Readable Local Files into the Vault

Content
View full analysis
/`. 5. The generated note references the copied file, making it visible to vault users and potentially to external tools that synchronize the vault. ### Impact Assessment The issue permits disclosure of any regular file r ...[truncated 470 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ima_kb.py:41
Finding

Configurable IMA Endpoint Can Exfiltrate API Credentials and Note Content

Content
View full analysis
ImaImportConfig: return ImaImportConfig( base_url=(base_url or os.environ.get("IMA_OPENAPI_BASE_URL", "")).strip() or "https://ima.qq.com/openapi/note/v1", client_id=os.environ.get("IMA_OPENAPI_CLIENTID", "").strip() or None, api_key=os.environ.get("IMA_OPENAPI_APIKEY", "").strip() or None, folder_id=os.environ.get("IMA_OPENAPI_FOLDER_ID", "").strip() or None, timeout=timeout, ) ``` The selected endpoint then receives both credentials and the complete import payload: ```python def _default_transport(payload: dict[str, Any], config: ImaImportConfig) -> dict[str, Any]: if not config.client_id or not config.api_key: raise ValueError("IMA client_id/api_key are required (IMA_OPENAPI_CLIENTID/IMA_OPENAPI_APIKEY)") url = f"{config.base_url.rstrip('/')}/import_doc" headers = { "Content-Type": "application/json", "ima-openapi-clientid": config.client_id, "ima-openapi-apikey": config.api_key, } body = json.dumps(payload, ensure_ascii=False).encode("utf-8") req = request.Request(url, data=body, headers=headers, method="POST") try: with request.urlopen(req, timeout=config.timeout) as resp: raw = resp.read().decode("utf-8") ``` ### Technical Analysis `IMA_OPENAPI_BASE_URL` and programmatic configuration overrides may specify an arbitrary endpoint. The value is not constrained to Tencent IMA, and the code does not require HTTPS or validate the hostname, port, URL authority, or redirect destination. The API client ID and API key are placed in request headers, while the complete imported note is placed in the request body. T ...[truncated 1634 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (34)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The declared description suggests a content-management or synchronization skill for knowledge bases across multiple platforms. However, the supplied code does not import articles, organize notes, or perform any syncing. Its sole behavior is to inspect the local runtime environment and filesystem for Python availability and the presence of a configured knowledge base directory. That is a materially different primary purpose from the declared description, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The declared description presents a broad cross-platform knowledge-base import/sync/organization skill, but the supplied code only implements related-article lookup. It reads/scans a local knowledge base, computes similarity scores from tags/keywords/title/frontmatter, and returns recommended related notes. There is no code for importing content, syncing data between systems, or interacting with Obsidian, Feishu, Tencent IMA, OpenClaw, or Codex. This is a materially different primary purpose, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description suggests a cross-platform article import and knowledge-base synchronization skill. However, the supplied code chunk only provides low-level helper functions for resolving image targets and labels from strings or mapping objects. It does not implement article import, note organization, syncing, or any platform-specific integration with Obsidian, Feishu, Tencent IMA, OpenClaw, or Codex. This is a materially different primary purpose, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose describes a user-facing integration/synchronization skill for knowledge-management platforms. However, the supplied code only adjusts Python's import path in a test conftest file. This is a development/testing support function, not an implementation of article import, note organization, or cross-platform syncing. Because the actual code chunk's primary purpose is materially different from the declared description, this is a mismatch.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 84)May include surrounding context.

md
For WeChat public-account imports, read `references/wechat-import.md` before doing browser extraction, image handling, or final write.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 112)May include surrounding context.

md
For WeChat public-account imports, read `references/wechat-import.md` before doing browser extraction, image handling, or final write.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 149)May include surrounding context.

md
- Install this repository as a directory skill so OpenClaw can discover `SKILL.md`, `scripts/`, `references/`, and `tests/` together

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explicitly promotes direct writes to a local Obsidian vault and synchronization to Feishu/IMA, but it does not clearly warn users that the tool can modify local files and transmit note content, metadata, and downloaded assets to external services. In a knowledge-management skill, this omission increases the risk of unintended data disclosure or accidental overwrites because users may treat the workflow as passive organization rather than an active import/sync operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README prominently advertises direct vault writes, image downloads, and remote synchronization to Feishu and Tencent IMA, but does not pair these capabilities with strong warnings about destructive or privacy-impacting side effects. In a skill context, this increases the chance that an agent or user invokes operations that modify local files or upload content to external services without sufficiently informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The listed use cases and trigger phrases are broad, generic actions like storing, organizing, tagging, and summarizing notes. In an agent ecosystem, overly broad triggers can cause the skill to activate for many ordinary requests, leading to unintended file writes or sync actions to Obsidian, Feishu, or IMA when the user did not explicitly ask for those side effects.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises capabilities that imply access to environment variables, local file reads/writes, network access, and shell execution, but it does not declare any explicit tool scope or permissions boundary. In an agent ecosystem, this increases the chance of over-privileged execution and makes it harder for users or hosts to understand and constrain what the skill may do.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill documents that remote images may be downloaded into the local vault, but it does not present this as a clear user-facing warning with associated risks. Downloading attacker-controlled remote content into a local knowledge base can enable privacy leakage, unsafe content ingestion, storage abuse, and unexpected writes to trusted note directories.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document explicitly recommends preserving publicly accessible image and file URLs so the Feishu plugin can automatically download and upload them, but it does not warn that doing so transmits third-party content and metadata to Feishu/OpenClaw infrastructure. This can cause unintended data exfiltration, import of untrusted external content, and accidental syncing of sensitive resources if users include URLs they did not intend to upload.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The auto-matching rules use broad keywords such as 文档, 教程, 实践, 工具, and 交易 without scope or disambiguation constraints. In a skill that automatically organizes and writes knowledge-base content, this can cause over-triggering and misclassification of notes, which may propagate incorrect metadata across Obsidian, Feishu, and Tencent IMA.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The taxonomy is presented as mandatory for validation before writing to the vault, but the automatic keyword mapping includes 记忆系统, which is not defined in the approved tag list. This creates a policy/implementation mismatch that can cause invalid tags to be emitted or force downstream remapping logic into inconsistent behavior, undermining the integrity of note classification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains user-facing natural-language documentation exclusively in Chinese, and later CLI descriptions and output are also Chinese-only. The file does not indicate that the tool is region-specific or provide any user opt-in or language choice, which can violate a language/locale policy requiring neutrality or explicit selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The argparse descriptions, help text, and printed status messages are all Chinese-language strings, which forces a specific language on users. There is no flag, environment setting, or documented constraint indicating that the tool is intentionally limited to a Chinese locale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This code accesses sensitive credentials and tokens from environment variables, including app secrets and access tokens, but provides no comment, docstring, logging, or prompt indicating that credential material will be consumed. Under the code-file criteria, access to sensitive environment variables should be disclosed unless already clearly warned elsewhere, which is not visible in this file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The import_to_feishu function constructs a payload containing document title, content, source URL, tags, attachments, and images, then sends it through a transport to Feishu. There is no confirmation prompt, visible log, or explanatory docstring/comment warning that user or system data will be sent to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code serializes the full import payload, including markdown content, source identifiers, URLs, tags, images, and attachments, and transmits it to the Tencent IMA OpenAPI. There is no confirmation prompt, user-facing log/print, or inline warning in this file disclosing that user or system data will be sent to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file performs network retrieval via urllib.request.urlopen and writes the response to disk, and elsewhere copies local files into the vault asset directory. There is no confirmation prompt, logging/print statement, or explanatory docstring/comment in this file disclosing these safety-relevant actions to the user.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The function creates directories and writes rendered note content to disk when dry_run is false, but this operation has no confirmation prompt and no user-facing disclosure near the write path. For a code file, file writes should have at least some visible warning, logging, or explanatory comment unless the warning is documented elsewhere.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tests/test_matching.py (reported line 138)May include surrounding context.

python
)

    script = check_duplicate_module.__file__
    result = subprocess.run(
        [
            sys.executable,
            script,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This test requires references/tag-system.md to contain specific Chinese phrases, which effectively enforces a fixed language/locale in project content. The file does not indicate that this locale requirement is optional, user-selected, or justified as region-specific, so it appears to 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
78% confidence
Finding

The primary documentation in this file is entirely in Chinese, and within this file there is no indication that the user can choose another language. A skill that effectively forces one language without opt-in can violate language or locale policy, even if an alternate README is linked elsewhere.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.