Back to skill

Security audit

enterprise-diagnosis-report

Security checks for vulnerabilities and agentic risk

Overview

The skill largely does what it says, but its PDF parser can fetch any URL and write extracted content to caller-chosen paths without enough safeguards.

Review before installing. Use this only with trusted local PDFs or trusted HTTPS report sources, avoid attacker-supplied URLs, keep outputs in a dedicated workspace directory, and treat generated text files as sensitive because they may contain enterprise financial and tax data.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/pdf_parser.py:56
Finding

Unrestricted URL Fetching Enables Server-Side Request Forgery

Content
View full analysis
bool: """判断输入是否为URL""" return path.startswith('http://') or path.startswith('https://') ``` ```python # 判断输入类型 if is_url(args.url): # URL输入:下载PDF temp_dir = "/tmp/pdf_downloads" os.makedirs(temp_dir, exist_ok=True) # 生成简短文件名(避免文件名过长问题) import hashlib url_hash = hashlib.md5(args.url.encode()).hexdigest()[:12] filename = f"report_{url_hash}.pdf" pdf_path = os.path.join(temp_dir, filename) pdf_path = download_pdf(args.url, pdf_path) ``` ### Technical Analysis The parser treats every string beginning with `http://` or `https://` as a valid remote PDF location and passes it directly to `requests.get()`. It does not validate the destination hostname, resolved IP address, port, or URL credentials. Consequently, the caller can direct the process to loopback, private, link-local, or otherwise restricted network destinations. Examples of potentially reachable targets include: - Loopback services such as `127.0.0.1` - RFC1918 private network services - Link-local cloud metadata services such as `169.254.169.254` - Internal services reachable only from the Agent's execution environment In addition, `requests` follows HTTP redirects by default. A URL initially resolving to a public address can therefore redirect the request to an internal destination unless every redirect target is separately validated. Although the response is expected to be a PDF, the implementation does not verify the response media type or file signature before saving and parsing it. Internal responses may consequently be written to disk and passed to ...[truncated 1532 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/pdf_parser.py:56
Finding

Unbounded Remote Downloads Can Exhaust Temporary Storage

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared behavior says the skill performs enterprise-report synthesis, but the actual implemented capability includes downloading remote PDFs, reading local PDFs, and writing extracted text files. This mismatch can conceal data-ingestion and exfiltration-adjacent behavior from reviewers and users, and it is particularly risky because the inputs may contain sensitive enterprise financial and tax information.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill invokes a Python script that can fetch remote PDFs via requests and write extracted contents to local files, but the manifest does not declare any explicit tool scope or permissions. This weakens least-privilege controls and makes the skill harder to sandbox or review, especially because it processes user-supplied URLs and local paths.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill’s natural-language description and all operating instructions are written entirely in Chinese, with no indication that users may choose another language or locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file uses Chinese throughout for headings, instructions, examples, and disclaimers, which effectively forces a specific language for skill outputs or usage. Under the policy, a fixed language is a natural-language policy concern unless the file offers user language choice or clearly documents a justified regional constraint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script can fetch and process arbitrary remote URLs, which extends the skill beyond simple report aggregation into generic network retrieval. In an agent environment, this can enable SSRF-style access to internal resources, unapproved external data ingestion, or retrieval of attacker-controlled PDFs that may trigger downstream parser risk or data exfiltration workflows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This is a natural-language policy concern because the skill forces a specific language/locale in its docstring and CLI help text rather than giving the user a choice. The same pattern appears throughout the file, making the tool effectively Chinese-only by default.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

Allowing arbitrary output file paths lets the script write extracted content to any filesystem location the process can access. In an agent or automation context, this can overwrite unintended files, leak sensitive parsed content into unsafe locations, or be abused as a primitive for tampering with local state.

Content

No source excerpt is available for this finding.