Back to skill

Security audit

AI情报飞书文档

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward RSS-to-Markdown AI news digest generator, with some disclosure and hardening gaps but no evidence of hidden, destructive, or credential-seeking behavior.

Install only if you are comfortable with the skill contacting the configured RSS providers and creating local Markdown files. Treat generated reports as untrusted content from the internet, disable or review remote images in Markdown viewers, and only add the cron schedule if you want unattended daily runs. Prefer installing PyYAML in an isolated environment with a pinned version.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate-ai-news.py:166
Finding
Untrusted RSS Content Is Embedded in Markdown Without Escaping or URL Validation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/generate-ai-news.py`, lines 166-181 **Vulnerability Type**: Markdown injection and unsafe remote-resource embedding **Risk Level**: Medium ### Vulnerable Code ```python # Headlines for article in top_articles[:3]: content += f"""### {article['title']} 📍 **{article['source']}** | 🕐 {article['pubDate']} 💡 {article['summary']} 🔗 [Read full article]({article['link']}) """ if article['images']: for img in article['images']: content += f"![Image]({img})\n" content += "\n" ``` The translated labels above correspond to the original user-facing labels; the interpolation and executable behavior are unchanged. ### Technical Analysis The values in `article['title']`, `article['summary']`, `article['link']`, and `article['images']` originate from externally retrieved RSS or Atom documents. They are interpolated directly into the generated Markdown document. The summary function removes HTML-like tags with a regular expression, but it does not escape Markdown metacharacters. Titles and URLs receive no sanitization at all. The implementation also does not restrict URL schemes, validate hostnames, or prevent control characters and crafted delimiters from changing the Markdown structure. Consequently, a malicious or compromised feed can inject: - Additional Markdown headings, links, images, or quoted instructions. - Deceptive links whose displayed text does not represent their destination. - Attacker-controlled remote images used for tracking. - Unsafe URI schemes if the selected Markdown renderer permits them. - Prompt-like content that could influence an AI agent consuming the generated digest without treating it as untrusted data. Actual script execution depends on the security behavior of the Markdown renderer. The generator itself does not execute content received from the feed. ### Attack Path 1. An attacker gains control of a configured RSS source, compromi ...[truncated 1534 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Escape Markdown metacharacters in all untrusted textual fields, including titles, summaries, source names, and publication dates. 2. Parse links and image URLs with `urllib.parse.urlsplit()` and permit only explicitly approved schemes, preferably `https`. 3. Reject URLs containing control characters, invalid delimiters, embedded credentials, or malformed hostnames. 4. Consider restricting links and images to the hostname of the configured feed or to a maintained allowlist. 5. Disable external images by default. If images are required, download and validate them through a trusted proxy that enforces content type, size, redirect, and destination restrictions. 6. Do not pass the digest to an AI agent as trusted instructions. Clearly delimit feed content as untrusted data and instruct downstream agents not to follow instructions contained within articles. 7. Use a Markdown-aware escaping library rather than regular expressions intended only to remove HTML tags. 8. Add tests containing crafted titles, descriptions, and URLs to confirm that injected Markdown cannot alter document structure. ]]>

T08 · Insecure Dependencies

Note
Location
SKILL.md:91
Finding
PyYAML Installation Is Unpinned and Lacks Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 91-94 **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Low ### Vulnerable Code ```markdown ## Dependencies - Python 3.7+ - PyYAML: `pip install pyyaml` ``` ### Technical Analysis The documented installation command asks `pip` to install the latest version of PyYAML available from the configured package index. It does not specify an reviewed version, lock transitive dependencies, or verify an expected distribution hash. Although `pyyaml` is the conventional package name and there is no evidence that the project intentionally references a malicious package, the installation is mutable and not reproducible. Future releases, package-index compromise, dependency-source compromise, or changes in the user's configured index could cause different code to be installed than the version originally audited. Python packages can execute code during installation or when imported. The script imports `yaml` at startup, so compromised dependency code would execute with the privileges of the user running the digest generator. ### Attack Path 1. A user follows the documented command and executes `pip install pyyaml`. 2. `pip` resolves the package from the user's configured package index without enforcing a reviewed version or expected hash. 3. The package source, release, index, or package-resolution configuration supplies compromised or unexpectedly changed content. 4. The package is installed in the selected Python environment. 5. Malicious code can execute during package installation or when `generate-ai-news.py` imports `yaml`. 6. The code operates with the permissions of the user or automation account that performed the installation or launched the generator. This attack path requires compromise or malicious control of a dependency distribution channel or package-index configuration; no such compromise is present in the audited project itself. ### Impact Assessment If the ...[truncated 554 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin PyYAML to a reviewed, supported version using an exact version constraint. 2. Maintain dependencies in a lock file or pinned requirements file. 3. Generate and enforce cryptographic hashes, for example with `pip install --require-hashes -r requirements.txt`. 4. Review and update the pinned version regularly to incorporate security patches. 5. Install dependencies in an isolated virtual environment rather than a system-wide Python environment. 6. Use a trusted package index and ensure that unexpected user-level or environment-level index overrides cannot redirect dependency resolution. 7. In automated deployments, build from a verified dependency artifact or a controlled internal package mirror. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The metadata says '飞书AI情报', which suggests a Feishu/Lark integration or intelligence workflow, but the documented behavior is actually external RSS fetching and local report generation with no Feishu interaction. Misleading descriptions are dangerous because they undermine informed consent, can bypass review expectations, and hide that the skill reaches out to third-party sources and processes remote content.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill documentation describes behavior that reads configuration, fetches external RSS feeds over the network, and writes Markdown output, but it does not declare any explicit tool scope or permissions. This creates a transparency and containment problem: users or platforms may authorize or run the skill without realizing it needs network and filesystem access, increasing the risk of overbroad execution and unsafe deployment.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The description and operational instructions are presented in Chinese, and the file does not indicate that language selection is optional or user-configurable. Under the language/locale policy, forcing a specific language without opt-in is a natural-language policy violation unless clearly justified as region-specific.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The script defaults article language to 'zh' and generates the overall output, headings, status messages, date format, and summary framing in Chinese. This is a natural-language locale constraint embedded in the skill without any visible user choice or opt-in, which can violate language/locale policy requirements.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The quick-start section shows commands that generate an output file, but it does not clearly warn that running the skill performs local writes and may be scheduled for recurring execution. This can lead to unexpected file creation, storage growth, or unattended operation in environments where users assumed a read-only or one-shot action.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The configuration section lists RSS sources and filtering options but does not warn that the skill automatically contacts external servers and ingests remote content. Without a network/privacy warning, users may not realize that using the skill leaks access metadata to third-party feeds and exposes the workflow to untrusted content from the internet.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
This manifest encodes feed sources and language buckets only for zh and en, and the comments/output imply the skill is designed around those locales. Because there is no documented user choice, opt-in, or justification for restricting supported languages, this is a natural-language locale policy concern.

Static analysis

No suspicious patterns detected.