Back to skill

Security audit

敏感内容处置器

Security checks for vulnerabilities and agentic risk

Overview

This skill needs Review because its advertised redaction and encryption can leave sensitive data exposed, including by sending encryption passwords to external chat webhooks.

Review carefully before installing. Do not rely on this skill for high-sensitivity PDF or DOCX redaction, avoid its encryption for confidential files, and do not enable Feishu or WeCom notifications with passwords. Keep backups before overwrite mode and pin/audit dependencies if you run it.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/disposal.py:477
Finding

Plaintext encryption password transmitted to unrestricted webhook destinations

Content
View full analysis
bool: if not self.feishu_webhook: return False message = { "msg_type": "text", "content": { "text": f"**{title}**\n{content}" + (f"\n\n密码: `{password}`" if password else "") } } try: import requests response = requests.post(self.feishu_webhook, json=message, timeout=10) return response.status_code == 200 except Exception: return False def send_wecom(self, title: str, content: str, password: str = None) -> bool: if not self.wecom_webhook: return False message = { "msgtype": "text", "text": { "content": f"{title}\n{content}" + (f"\n\n密码: {password}" if password else "") } } try: import requests response = requests.post(self.wecom_webhook, json=message, timeout=10) return response.status_code == 200 except Exception: return False ``` The password is propagated to the notification service after encryption: ```python if result['status'] == 'success' and kwargs.get('notify_channels'): self.notification.send_notification( action=action, file_count=1, password=result.get('password'), notify_channels=kwargs.get('notify_channels') ) ``` Webhook destinations are accepted through configuration or command-line arguments: ```python parser.add_argument('--feishu-webhook', type=str, help='飞书Webhook地址') parser.add_argument('--wecom-webhook', type=str, help='企业微信Webhook地址') config.setdefault('feishu_webhook', args.feishu_webhook) config.setdefault('wecom_webhook', args.wecom_webhook) ``` ### Techn ...[truncated 2159 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/disposal.py:195
Finding

Custom repeated-key XOR construction does not provide secure authenticated encryption

Content
View full analysis
Tuple[Path, str]: if output_path is None: output_path = input_path.with_suffix(input_path.suffix + '.enc') import secrets salt = secrets.token_hex(16) key = hashlib.pbkdf2_hmac( 'sha256', self.password.encode('utf-8'), salt.encode('utf-8'), 100000 ) with open(input_path, 'rb') as f: original_data = f.read() encrypted_data = bytearray(original_data) for i in range(len(encrypted_data)): encrypted_data[i] ^= key[i % len(key)] with open(output_path, 'wb') as f: f.write(salt.encode('utf-8')) f.write(encrypted_data) return output_path, self.password ``` ### Technical Analysis PBKDF2 derives a 32-byte value, but the code repeatedly applies that same value to the entire file as an XOR keystream. This is not a secure stream cipher. Repeating the key leaks relationships between plaintext blocks and enables known-plaintext analysis, particularly for supported formats with predictable headers and structured contents. The construction also has no message authentication code or authenticated-encryption tag. An attacker can modify ciphertext bytes and cause corresponding predictable changes in decrypted plaintext without detection. Incorrect passwords and corrupted ciphertext are likewise not reliably detected. A salt protects against direct reuse of precomputed password hashes, but it does not make the repeated-key XOR operation cryptographically safe. ### Attack Path 1. An attacker obtains a generated encrypted file. 2. The attacker identifies predictable plaintext bytes, such as ZIP-based Office file headers, PDF headers, JSON syntax, or common document templates. ...[truncated 869 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/disposal.py:438
Finding

PDF redaction reports success while retaining the original sensitive content

Content
View full analysis
Tuple[Path, List[Dict]]: try: import fitz except ImportError: raise ImportError("请安装 PyMuPDF: pip install pymupdf") doc = fitz.open(input_path) all_records = [] for page_num in range(len(doc)): page = doc[page_num] text = page.get_text() if text: original = text processed, records = self.redactor.redact_text(original) if custom_keywords: processed, kw_records = self.redactor.redact_custom_keywords(processed, custom_keywords) records.extend(kw_records) if processed != original: all_records.extend(records) doc.save(output_path) doc.close() return output_path, all_records ``` ### Technical Analysis The method extracts text and calculates a redacted string in `processed`, but it never applies that string to the PDF. It does not locate text coordinates, create redaction annotations, invoke a redaction operation, replace page content, rasterize pages, or sanitize hidden objects. The original PDF object is saved to the output path with its sensitive text intact. The method nevertheless returns normally and can provide redaction records, causing callers to treat the operation as successful. This is especially dangerous because the output filename and documentation represent the result as a redacted document. ### Attack Path 1. A user supplies a PDF containing an identification number, phone number, bank-card number, email address, IP address, or custom sensitive keyword. 2. The method extracts the text and detects a match. 3. It computes a masked in-memory string but discar ...[truncated 745 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/disposal.py:335
Finding

DOCX paragraph processing can preserve sensitive content in remaining formatting runs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/disposal.py:277
Finding

Encryption passwords are exposed through command-line arguments, result objects, and terminal output

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:4
Finding

Unbounded and unhashed third-party dependencies reduce build integrity

Content
View full analysis
=0.8.11 # Word document processing openpyxl>=3.0.10 # Excel processing python-pptx>=0.6.21 # PowerPoint processing PyMuPDF>=1.23.0 # PDF processing requests>=2.28.0 # HTTP requests for notifications ``` The documentation also recommends resolving packages directly without version or hash controls: ```bash pip install python-docx openpyxl python-pptx PyMuPDF requests ``` ### Technical Analysis Every dependency uses a lower bound without an upper bound or exact version. Consequently, installations at different times can resolve to different future package versions that were not reviewed with this Skill. No lock file or cryptographic package hashes are provided. This prevents reproducible installation and weakens verification that users receive the same artifacts that were audited. The reviewed package names correspond to expected public packages, and no confirmed typosquatted or malicious package was identified. The risk arises from uncontrolled future resolution and lack of artifact integrity controls rather than from a known malicious dependency. ### Attack Path 1. A user follows the documented installation procedure. 2. The package resolver selects the newest versions satisfying the lower-bound constraints. 3. A future compromised, malicious, or unexpectedly incompatible release is selected without project review. 4. Package installation or import executes code with the user's permissions. 5. The affected dependency may access the same sensitive documents and network capabilities available to the Skill. ### Impact Assessment A compromised dependency could execute with the permissions of the user running the Skill, potentially reading processed documents, modifying files, or making network requests. The exac ...[truncated 226 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (20)

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documentation creates an operational pattern in which a secret used to protect sensitive files is intentionally disclosed via external messaging channels. In this skill context, that is especially dangerous because the whole purpose of the skill is sensitive-content remediation; instructing users to leak the encryption password undermines the security objective and increases the chance of broad unauthorized access to the protected files.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The tool advertises notification support while the implementation includes the encryption password in Feishu and WeCom messages. Sending decryption material through external messaging channels defeats the protection provided by encryption and can expose protected files to anyone with access to those webhook destinations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The PDF redaction routine extracts text and computes a redacted version in memory, but never writes those redactions back onto the PDF pages. It then saves the original document, creating a dangerous mismatch between the tool's stated purpose and its actual behavior: users may believe sensitive data was removed when it remains fully present.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The Feishu notification path sends disposal details and optionally the encryption password to an external webhook endpoint. In a tool explicitly handling sensitive content, exporting secrets and processing metadata to third-party services without strong safeguards materially increases data exposure risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The WeCom notification path includes the encryption password in plaintext in a message sent to an external webhook. This can leak access to encrypted outputs to webhook operators, chat participants, logs, or intermediary systems, undermining confidentiality.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill description is written entirely in Chinese, including headings and usage guidance, with no indication that users may choose another language or that the tool is restricted to a Chinese-only compliance context. Under the policy rule for natural-language violations, a forced locale without opt-in or justification is reportable.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly documents that the encryption password may be included in notifications sent through email, Feishu, or WeChat. Sending the same secret that protects the encrypted file over separate but often insecure or broadly accessible channels defeats much of the protection provided by encryption and can expose the password to unintended recipients, chat retention systems, logs, or compromised integrations.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

This code performs an external HTTP POST to a user-configured Feishu webhook, causing data to leave the local trust boundary. External transmission is expected for notifications, but in this skill's context it is security-relevant because the transmitted content can include sensitive processing metadata and even passwords.

Content

Scanner excerpt · scripts/disposal.py (reported line 490)May include surrounding context.

python
try:
            import requests
            response = requests.post(self.feishu_webhook, json=message, timeout=10)
            return response.status_code == 200
        except Exception:
            return False

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

This code sends notification data to an external WeCom webhook, moving information outside the host environment. In a sensitive-data disposal tool, such egress is dangerous when notification content includes confidential details or secrets that can be retained by external systems.

Content

Scanner excerpt · scripts/disposal.py (reported line 508)May include surrounding context.

python
try:
            import requests
            response = requests.post(self.wecom_webhook, json=message, timeout=10)
            return response.status_code == 200
        except Exception:
            return False

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code accepts an overwrite flag and proceeds to process and write output files, including encrypted output, without any runtime confirmation prompt or stronger user-facing disclosure before the write occurs. Because file modification is a safety-relevant operation in a disposal tool, the lack of an explicit warning increases the risk of unintended data changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide demonstrates an --overwrite option without clearly warning that it will directly modify or replace the original file, which can cause irreversible data loss if users run it on the wrong document or if redaction behaves unexpectedly. In a document-disposal context, preserving evidentiary or source copies is especially important, so omission of this warning increases operational risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation encourages sending results to a Feishu webhook but does not warn that this transmits files or related metadata to an external service, which may violate privacy, data-handling, or regulatory requirements. Even if the file is encrypted, filenames, timing, destination URLs, or misconfiguration can still expose sensitive information or create unauthorized disclosure channels.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

该文件从标题“更新日志”开始整体仅使用中文表述,且未说明这是面向特定中文用户群或区域场景的限定。按规则,若技能内容强制特定语言而没有用户选择或明确、合理的区域性说明,可视为语言/locale 策略问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file presents the skill entirely in Chinese and specifies Chinese trigger phrases such as "脱敏处理" and "加密文件" for use, but it does not indicate that this is a China-specific tool or offer an alternative language/locale option. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: python-docx has 2 known advisory(ies) (CVE-2016-5851 (Improper Restriction of XML External Entity Reference in python-docx); CVE-2016-5851 (python-docx before 0.8.6 allows context-dependent attackers to conduct XML Exter)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with a minimum version only, not an exact pinned version, so builds are not reproducible and may resolve to versions with known vulnerabilities depending on the installation environment. Because python-docx has historical XXE issues, using an unpinned constraint weakens assurance that deployed environments consistently avoid affected releases.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: openpyxl has 2 known advisory(ies) (CVE-2017-5992 (Improper Restriction of XML External Entity Reference in Openpyxl); CVE-2017-5992 (Openpyxl 2.4.1 resolves external entities by default, which allows remote attack)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The requirement uses a non-pinned lower-bound specifier, which means different environments may install different openpyxl versions, including potentially vulnerable ones if constraints are modified or mirrors behave unexpectedly. Given openpyxl's history of XXE-related issues in document parsing, this creates supply-chain and patch-verification risk for a file-processing skill.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: PyMuPDF has 2 known advisory(ies) (CVE-2026-3029 (PyMuPDF has a path traversal in _main_.py); CVE-2026-3029 (PyMuPDF has a path traversal in _main_.py)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
89% confidence
Finding

PyMuPDF is not pinned to an exact version, so the actual installed release cannot be verified from this manifest alone and may vary across deployments. Because this skill processes PDFs, any unresolved vulnerable version in that parser library would be especially relevant and could expose file-handling attack surface.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
97% confidence
Finding

Requests is declared with a minimum version only, so the installed package version is not guaranteed and may expose known issues in some environments. Since this skill uses requests for outbound notifications, vulnerabilities affecting credential handling, redirects, or URL parsing could have security consequences if an unsafe version is resolved.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The top-level user-facing description is presented only in Chinese, which can impose a language constraint without explicit user opt-in. Under the policy, language-specific behavior should either offer choice or clearly justify the locale limitation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The config example stores Feishu and WeCom webhook URLs without noting that these URLs are sensitive credentials-like endpoints that can be abused if leaked. Users may copy the example into source-controlled files or shared directories, enabling unauthorized message delivery, data exfiltration workflows, or misuse of corporate integrations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.