Back to skill

Security audit

Union Search Skill

Security checks for vulnerabilities and agentic risk

Overview

This multi-platform search skill has a coherent purpose, but it includes unsafe command handling and token-routing risks that require review before installation.

Install only after reviewing the Exa helper and TikHub host handling. Avoid using the Exa mcporter script with untrusted queries, do not set TIKHUB_HOST to anything except the real TikHub API host, use least-privilege API keys, avoid browser/session cookies unless needed, and treat search_logs, responses, downloads, and image metadata as potentially sensitive local data.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/exa_search/exa_search.py:18
Finding

OS Command Injection Through Exa Search Queries

Content
View full analysis
Dict[str, Any]: """执行 mcporter 命令并返回结果""" try: # 需要用反斜杠转义内部双引号 escaped_arg = call_arg.replace('"', '\\"') cmd_str = f'mcporter call "exa.{escaped_arg}"' result = subprocess.run( cmd_str, shell=True, capture_output=True, text=True, timeout=120 ) ``` Attacker-controlled values are inserted into `call_arg` by functions such as: ```python def search_web(query: str, num_results: int = 8, search_type: str = "auto") -> Dict[str, Any]: """网页搜索""" call_arg = f'web_search_exa(query: "{query}", numResults: {num_results}, type: "{search_type}")' return run_mcporter(call_arg) def search_code(query: str, tokens: int = 5000) -> Dict[str, Any]: """代码搜索""" call_arg = f'get_code_context_exa(query: "{query}", tokensNum: {tokens})' return run_mcporter(call_arg) ``` The value originates from an unrestricted positional CLI argument: ```python parser.add_argument("query", help="搜索关键词/URL/研究ID") ``` ### Technical Analysis The implementation converts an argument containing user-controlled search text into a shell command string and invokes it with `shell=True`. Replacing double quotation marks with `\"` is not sufficient shell escaping. Shell substitutions such as `$(command)` and backtick substitution are still evaluated inside double-quoted shell strings. Shell metacharacters can consequently cause the shell to run commands before or while invoking `mcporter`. The issue affects all operations routed through `run_mcporter()`, including web searches, code searches, company a ...[truncated 1418 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/twitter/tikhub_twitter_search.py:62
Finding

TikHub Bearer Token Disclosure Through Attacker-Controlled API Host

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:85
Finding

Mutable and Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation
--hash=sha256: ``` and install using `pip install --require-hashes -r requirements.txt`. 4. For Node.js components, commit and use a reviewed lock file and install with `npm ci`. 5. Avoid global installation of `mcporter`; install it as a project-local dependency and invoke the project-local executable. 6. Record the expected package publisher, source repository, package checksum, and review date. 7. Add automated dependency scanning and update dependencies through reviewed pull requests. 8. Run optional third-party tools in a restricted environment with only the credentials and filesystem access required for the requested operation. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/union_search/search_logger.py:18
Finding

Sensitive Search Queries and Full Results Stored Without Privacy Controls

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (449)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · .gitignore (reported line 41)May include surrounding context.

text
# Environment variables
.env
.env.local
.env.*

# Responses directory

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Randomized User-Agent or HTTP client impersonation is a risky undeclared behavior for an agent skill because it can conceal automated access patterns from operators and platform controls. While not automatically malicious, it increases the chance of policy evasion, makes outbound behavior less transparent, and is more concerning in a network-enabled skill with broad scraping claims.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.