Back to skill

Security audit

MyCompanyDueDiligence

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent due-diligence purpose, but it ships sensitive browser session material and contains unsafe command execution paths.

Do not install this version without removing all bundled session/cookie files, rotating any exposed accounts, replacing shell=True command construction with argument-list subprocess calls, pinning dependencies, and adding clear controls for where reports, screenshots, raw data, and browser sessions are stored.

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
scripts/query_all_v2.py:35
Finding

Shell Command Injection Through User-Controlled and Browser-Derived Values

Content
View full analysis
' 'a.innerText.includes(\'' + company_name + '\') && a.href.includes(\'firm\'))?.href || \'\'"' ) if detail_url and "qcc.com/firm/" in detail_url: run_agent_browser(f'open "{detail_url}"') ``` The PDF conversion path independently invokes a shell with the company name: ```python result = subprocess.run( f'pandoc "{md_file}" -o "{html_file}" --standalone --metadata title="{company_name}"', shell=True, capture_output=True, text=True, timeout=30 ) ``` ### Technical Analysis The application constructs command strings by concatenating `company_name`, URLs, file paths, and browser-returned data, and then executes those strings with `shell=True`. Double quotes around a value do not neutralize shell command substitution, embedded quote characters, or other shell syntax. The company name originates directly from `sys.argv[1]`. It reaches both `run_agent_browser()` and the Pandoc command without shell-safe arg ...[truncated 1786 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
session/due-diligence.json:1
Finding

Plaintext Authentication Sessions and Personal Identifiers Distributed With the Skill

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/tianyancha_login.py:38
Finding

Browser Session Files Are Saved Without Explicit Restrictive Permissions

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:4
Finding

Unpinned Executable Dependencies and Global Tool Installation

Content
View full analysis
=1.40.0 requests>=2.28.0 aiohttp>=3.8.0 beautifulsoup4>=4.12.0 lxml>=4.9.0 cryptography>=40.0.0 markdown>=3.4.0 ``` The Skill instructions also direct users to install an unpinned global executable: ```bash npm install -g agent-browser brew install pandoc ``` ### Technical Analysis Minimum-version constraints allow package managers to install any later version satisfying the range. Consequently, the dependency graph executing after review may differ substantially from the reviewed graph. The requirements do not provide integrity hashes. The globally installed `agent-browser` command is particularly security-sensitive because the Skill invokes it repeatedly and grants it access to authenticated browser state. An upstream compromise, dependency compromise, or unexpected future release could execute code during installation or runtime. No evidence was found that the named dependencies are currently malicious. The issue is the absence of reproducible version and integrity controls. ### Attack Path 1. A user follows the installation instructions. 2. The package manager resolves the newest package versions available at that time. 3. A compromised, replaced, or unexpectedly changed release is selected. 4. Installation hooks or imported runtime code execute under the user's account. 5. The dependency gains access to the files, browser state, and network authority available to the Skill. ### Impact Assessment A compromised dependency could execute arbitrary code with the privileges of the installing or running user. Because the Skill handles authenticated browser sessions, the reachable impact includes credential theft, report manipulation, data exfiltration, and modificatio ...[truncated 134 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/query_all_v2.py:217
Finding

Sensitive Company and Legal Research Uses Plaintext HTTP Endpoints

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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (96)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

As with other mismatch findings, the most security-relevant aspect is the undeclared login credential/session management. In a due-diligence context, authenticated access to commercial/legal data sources can be sensitive, so hidden persistence or narrower-than-claimed behavior makes review and containment harder.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

This is a direct tool-parameter abuse issue: the helper forwards dynamically built parameters into a shell command for agent-browser. Since multiple higher-level functions pass user-influenced strings into this helper, the browser tool can be abused as a vehicle for arbitrary shell execution rather than only browser automation.

Content

Scanner excerpt · scripts/query_all_v2.py (reported line 39)May include surrounding context.

python
"""执行 agent-browser 命令"""
    full_cmd = f"agent-browser --session-name {DEFAULT_SESSION} {cmd}"
    try:
        result = subprocess.run(
            full_cmd,
            shell=True,
            capture_output=True,

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The pandoc command accepts a title derived from company_name and is run through the shell, allowing crafted input to break out of quoting and append attacker-controlled shell syntax. In this context, a seemingly harmless company name parameter becomes a local code execution vector during document conversion.

Content

Scanner excerpt · scripts/query_all_v2.py (reported line 398)May include surrounding context.

python
html_file = md_file.with_suffix('.html')
        
        # 转为基础 HTML
        result = subprocess.run(
            f'pandoc "{md_file}" -o "{html_file}" --standalone --metadata title="{company_name}"',
            shell=True, capture_output=True, text=True, timeout=30
        )

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file contains a live authenticated Tianyancha browser session, including an auth token and associated cookies, bundled directly with the skill. Anyone who can access this repository or deployed artifact may be able to reuse the session to impersonate the account, access paid or private data, and potentially perform actions as that user. In a due-diligence scraping skill, embedded third-party account credentials are especially dangerous because the skill is designed to automate access at scale.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The session file embeds a live authenticated Tianyancha browser state, including an auth token, CSRF token, user identifiers, and cookies/localStorage values that appear sufficient to impersonate the account. In a scraping/automation skill, distributing reusable authenticated state is especially dangerous because anyone with access to the skill files may replay the session, access paid or private data, or abuse the account until expiration.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This file contains a persisted authenticated Tianyancha browser session, including an auth token, CSRF token, user identifiers, cookies, and localStorage data for a real account. Anyone with access to the skill can reuse the embedded session to impersonate the account holder, access third-party data under that identity, and potentially violate privacy, account security, or service terms.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly instructs users to save an authenticated browser session state to a local JSON file and also documents automatic screenshot collection, but it does not warn that these artifacts can contain active authentication tokens, personal data, company-sensitive information, and litigation records. In a due-diligence workflow that accesses multiple logged-in data sources, retained session files and screenshots materially increase the risk of credential theft, account reuse, unauthorized access, and privacy/compliance exposure if the files are copied, committed, or stored insecurely.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documentation describes capabilities that imply shell execution, network access, and reading/writing files, but it declares no explicit tool scope or permission boundary. That creates an authorization ambiguity: an agent or user may invoke a broadly capable skill without clear constraints, increasing the chance of unintended filesystem access, network scraping, or command execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs users to save browser session state and also writes screenshots, reports, and raw JSON to disk, but it does not provide a clear warning about the sensitivity of those artifacts. Session state may contain active cookies or tokens, and due-diligence reports can contain sensitive business, legal, or personal information that is exposed through predictable local paths.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown template collects and presents sensitive business and personal information, including company identifiers, legal representative names, shareholding structure, and actual controller details. While it contains a general decision-use disclaimer at L417, it does not warn users about handling confidential or personal data, which is relevant for a due-diligence reporting template.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says the skill supports comprehensive scraping for exactly four sites: 企查查、天眼查、东方财富、中国裁判文书网. This file documents and provides automation/query guidance for additional sources including 巨潮资讯、上交所、深交所、执行信息公开网、国家企业信用网 and 百度搜索, indicating a broader operational scope than the manifest describes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document provides concrete browser automation and scraping guidance for third-party services, including login flows, anti-bot evasion tactics, random delays, and proxy IP pools, but omits legal, compliance, account-lockout, and data-handling warnings. In a due-diligence skill handling potentially sensitive corporate and litigation data, this increases the risk of unauthorized access patterns, terms-of-service violations, credential misuse, and blocking or sanctions against the operator.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest explicitly lists 东方财富 as one of the four supported sources, but this file provides concrete HTTP automation examples for 巨潮资讯 and does not document 东方财富 at all. That creates a semantic mismatch between the advertised supported sources and the actual documented behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.