Back to skill

Security audit

QQ邮箱发票下载器

Security checks for vulnerabilities and agentic risk

Overview

The skill is an invoice-email downloader, but it includes hardcoded account secrets and poorly scoped network/reporting behavior that require careful review before use.

Install only after removing and rotating all embedded QQ and Telegram credentials, disabling or explicitly scoping Telegram reporting, keeping TLS verification enabled, adding trusted-domain checks for email links, and deciding whether MiniMax processing of mailbox content is acceptable for your privacy/compliance needs.

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

T09 · Insecure Skill Coding Practices

Error
Location
invoice_analyzer.py:328
Finding

Untrusted Email URLs Permit Server-Side Request Forgery and Arbitrary Browser Navigation

Content
View full analysis
List[str]: """Extract all URLs.""" urls = [] standard = re.findall( r'https?://[^\s<>"{}|\\^`\[\]]+', content ) urls.extend(standard) encoded = re.findall( r'https?%3A%2F%2F[^\s<>"{}|\\^`\[\]]+', content ) from urllib.parse import unquote for url in encoded: try: urls.append(unquote(url)) except: pass hrefs = re.findall( r'href=["\'](https?://[^"\']+)["\']', content ) urls.extend(hrefs) seen = set() unique = [] for url in urls: url = url.strip().rstrip('>"\'') if url not in seen and len(url) > 20: seen.add(url) unique.append(url) return unique ``` ```python @staticmethod def is_valid_download_url(url: str) -> bool: if not url or len(url) < 15: return False url_lower = url.lower() exclude_patterns = [ 'login', 'register', 'captcha', 'verify', 'auth', 'news', 'article', 'blog', 'help', 'support', 'account', 'password', 'reset', 'signup', 'signin' ] allowed_patterns = [ 'download', 'pdf', 'invoice', 'fapiao', 'fp', 'file', 'attach', 'view', 'preview', 'open', 'nnfp', 'jss.com.cn', 'chinatax', 'dppt' ] if any(pattern in url_lower for pattern in allowed_patterns): return True for pattern in exclude_patterns: if pattern in url_lower: return False if url_lower.endswith('.pdf'): return True try: parsed = urlparse(url) if not parsed.netloc or not parsed.scheme: return False except: r ...[truncated 2698 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
invoice_analyzer_v9.py:114
Finding

Sensitive Email and Page Content Is Submitted to an External LLM Without Redaction

Content
View full analysis
'LLMAnalysisResult': user_prompt = f"""## Email information - Subject: {subject} - Body: {text[:2000] if text else '(no body)'} - HTML: {html[:2000] if html else '(no HTML)'} - Attachments: {'yes' if has_attachments else 'no'} Analyze this invoice email and return JSON.""" try: raw = self.llm.chat( [ {"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": user_prompt} ], temperature=0.2, max_tokens=1024 ) ``` ```python need_llm = ( base_result.confidence < self.LLM_CONFIDENCE_THRESHOLD or base_result.invoice_type.value == "unknown" ) if not need_llm: return base_result if not self._llm_available: return base_result llm_result = self.llm_analyzer.analyze( subject, text, html, has_attachments ) ``` ```python if html_content: prompt_parts.extend([ "Page HTML fragment:", "```html", html_content[:3000], "```", "", ]) ``` ```python response = requests.post( MINIMAX_BASE_URL, headers=headers, json=payload, timeout=30 ) ``` ### Technical Analysis When a MiniMax API key is configured, the enhanced analyzer automatically invokes a remote LLM for emails with confidence below `0.7` or an unknown platform. The request includes: - The complete email subject. - Up to 2,000 characters of plaintext email content. - Up to 2,000 characters of HTML. - Attachment-presence metadata. The standalone selector generator similarly transmits up to 3,000 characters of page HTML. No redaction layer ...[truncated 2050 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
invoice_downloader_v82.py:852
Finding

TLS Certificate Verification Is Disabled for Provider Downloads

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
send_report.py:12
Finding

Hard-Coded Telegram Bot Credential and Unverified Recipient Selection Can Expose Invoice Reports

Content
View full analysis
" ``` ```python url = f"https://api.telegram.org/bot{TOKEN}/getUpdates" r = requests.get(url, timeout=10) if r.status_code == 200: data = r.json() updates = data.get('result', []) if updates: for u in updates[-5:]: msg_data = u.get( 'message', u.get('edited_message', {}) ) chat = msg_data.get('chat', {}) chat_id = chat.get('id') if chat_id: send_url = ( f"https://api.telegram.org/" f"bot{TOKEN}/sendMessage" ) send_data = { "chat_id": chat_id, "text": msg, "parse_mode": "Markdown" } send_r = requests.post( send_url, json=send_data, timeout=10 ) ``` ```python def get_chat_id(): try: url = f"https://api.telegram.org/bot{TOKEN}/getUpdates" r = requests.get(url, timeout=10) if r.status_code == 200: data = r.json() updates = data.get('result', []) if updates: for u in reversed(updates): if 'message' in u: chat = u['message'].get('chat', {}) chat_id = chat.get('id') if chat_id: return chat_id except Exception as e: print(f"Failed to obt ...[truncated 2511 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:26
Finding

Unpinned Third-Party Dependencies Create a Mutable Supply-Chain Risk

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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (91)

Tainted flow: 'headers' from os.environ.get (line 44, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · generate_selector.py (reported line 56)May include surrounding context.

python
"temperature": 0.3,
            "max_tokens": 1024
        }
        response = requests.post(
            MINIMAX_BASE_URL,
            headers=headers,
            json=payload,

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The document exposes a real-looking QQ mailbox account and authorization code directly in plaintext. Even if included for convenience or internal use, embedded credentials can enable unauthorized mailbox access, data exfiltration, account abuse, and pivoting into other services tied to the email account.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill advertises automatic SSL downgrade by disabling certificate verification on failure, but the description does not warn users about the resulting man-in-the-middle risk. Disabling TLS verification can allow an attacker on the network path to intercept, alter, or replace downloaded invoice files and related session traffic.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script contains hardcoded email credentials and uses them to log into a live mailbox. Embedding secrets in source code risks credential theft, unauthorized mailbox access, account takeover, and exposure of all accessible email data if the file is shared, committed, or exfiltrated.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Hardcoded email credentials expose a live secret directly in source code, making account compromise likely if the file is shared, logged, committed, or reused in another environment. Because the credential grants mailbox access, an attacker could read messages, harvest sensitive invoice data, and potentially abuse the account beyond this script's intended purpose.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script advertises itself as only handling browser downloads, but it also authenticates to an email account and scans mailbox contents to extract invoice links. This mismatch reduces informed consent and can mislead operators about the scope of data access, which is a security and privacy risk even if the behavior is functional for the workflow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script contains hardcoded IMAP credentials, including an email address and password/app password, which grants direct access to a real mailbox. Anyone ով can read or reuse this file can access the account, search messages, and potentially retrieve sensitive data far beyond invoice downloads, making this an account-compromise risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code silently uses embedded email credentials without warning the user, giving the script undisclosed access to a mailbox. In the context of an agent skill, hidden credential use is especially risky because it enables secret account access and data collection without transparent authorization.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script downloads content from links extracted out of emails, writes files to disk, extracts ZIP archives, copies PDFs, and deletes ZIPs without prior disclosure or validation of the remote content. This is dangerous because email-derived links are attacker-influenced input; they can lead to malicious payload delivery, unsafe archive extraction, or unintended filesystem changes under the guise of invoice processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A hardcoded email account and password are used without any disclosure, prompt, or secure handling. This creates immediate credential-compromise risk and may enable unauthorized mailbox access, especially because the secret is stored in plain text and bundled into a script that appears to do something else.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The request for CNOOC downloads explicitly sets verify=False, disabling TLS certificate validation. That enables man-in-the-middle interception or content tampering, which is especially risky here because the tool automatically downloads and stores invoice files from external sites without any integrity check beyond basic file signatures.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The analyzer sends full email subject, plain text, and HTML content to a third-party LLM service, which can expose sensitive business, personal, or financial data outside the local processing boundary. In an invoice-email workflow, mailbox contents are especially likely to contain confidential identifiers, billing details, and embedded links, so undisclosed exfiltration to an external API is a real confidentiality risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script contains hardcoded email credentials, including a mailbox password/app-specific password, directly in source code. This is dangerous because anyone with access to the file or repository can reuse the credentials to access the mailbox, read sensitive invoice data, and potentially pivot into other systems tied to that account.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script hard-codes a real email address, app password, and IMAP server, then uses them to access a mailbox. Embedded credentials are highly sensitive because anyone who can read the file can reuse them to access email contents, attachments, and potentially reset other accounts tied to that mailbox.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script accesses a sensitive mailbox using embedded credentials without any consent, warning, or runtime prompt indicating that email contents and attachments will be read. In skill context, mailbox access is especially dangerous because email often contains invoices, personal data, and authentication flows, so silent access materially increases privacy and account-compromise risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
75% confidence
Finding

The entire document is written only in Chinese and does not offer any language choice, opt-in, or justification for a locale-specific constraint. Per the policy rule, forcing a specific language without user choice can constitute a language/locale policy violation unless clearly documented as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

This markdown file describes behaviors such as downloading attachments and links, unzipping files, and generating Excel reports, all of which can modify the user's filesystem. Under the markdown-specific warning rule, the description should clearly warn users that the skill will create and extract files locally before use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The document instructs maintainers to check mailbox credentials and QQ Mail authorization codes, indicating the skill handles sensitive account data. The markdown does not include an explicit warning that the skill accesses email account credentials and mailbox contents, which is relevant to user privacy and security.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The report explicitly recommends production use of an email invoice downloader that processes potentially sensitive financial documents, but it does not mention privacy, consent, credential handling, retention, or compliance risks. In this context, encouraging deployment without those safeguards can normalize unsafe handling of personal and financial data and increase the chance of misuse or noncompliant operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document describes a tool that automatically logs into QQ Mail, searches invoice emails, and downloads PDF attachments, but it provides no visible warning about privacy, account access scope, or data handling risks. Because this skill operates on sensitive mailbox contents and financial documents, users may not understand that it can access, classify, and persist personal or corporate data, increasing the risk of unintended disclosure or misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The quickstart instructs users to run an email-downloading automation tool without clearly warning that it requires QQ mailbox credentials, reads mailbox contents, downloads invoice attachments, and writes files to disk at a specific location. This is dangerous because users may execute the skill without informed consent about access to sensitive email data and local file system modifications, increasing the risk of privacy, credential-handling, and data exposure issues.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README explicitly promotes automated IMAP login to a personal QQ mailbox, bulk email searching, attachment extraction, and browser automation against invoice portals, but it does not prominently warn users about privacy, account access scope, retention of downloaded financial documents, or the risks of handling third-party links and attachments. Because invoices and mailbox contents are sensitive financial data, the lack of an explicit privacy/data-impact warning can lead users to run the skill with broad mailbox credentials without understanding the exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill automates login to QQ Mail and downloads email attachments, but the description omits any privacy or security warning about handling mailbox credentials and potentially sensitive documents. This increases the risk of users exposing account access, processing confidential mail content without informed consent, or running the tool in environments where downloaded attachments could contain malicious files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly states that ZIP files are automatically deleted after extraction, but it does not prominently warn users about this destructive behavior. This can cause loss of original artifacts needed for verification, chain-of-custody, or recovery if extraction is incomplete or tampered with.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The report documents a capability set that accesses a user's mailbox, downloads invoice attachments, automates browser actions, extracts ZIP files, and writes files locally, yet it provides no user-facing warning, consent language, or safety constraints. These actions involve sensitive financial data and filesystem changes, so omission of privacy and system-impact disclosures increases the risk of unsafe or uninformed use.

Content

No source excerpt is available for this finding.