Back to skill

Security audit

Byted Bytehouse Diagnostics

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent ByteHouse diagnostics purpose, but it runs mutable remote code and passes it the full local environment, which could expose more secrets than intended.

Review carefully before installing. Use only in an isolated environment with a dedicated least-privilege ByteHouse account, remove unrelated secrets from the environment before running it, and prefer a version pinned to an audited MCP server commit and exact dependencies. Treat generated reports as sensitive operational data.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/cluster_diagnostics.py:50
Finding

Runtime Retrieval and Execution of an Unpinned Remote MCP Server

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/cluster_diagnostics.py:46
Finding

Complete Parent Environment Exposed to the MCP Child Process

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/cluster_diagnostics.py:20
Finding

Unbounded MCP Dependency Version Allows Unreviewed Future Releases

Content
View full analysis
=1.0.0", # ] # /// ``` ### Technical Analysis The inline dependency declaration accepts any `mcp` version greater than or equal to `1.0.0`, without an upper bound, lockfile, or integrity hash. Future executions may therefore resolve a release that did not exist and was not reviewed when the Skill was audited. If the package source, maintainer account, publishing credentials, or dependency chain is compromised, a malicious future release could execute during dependency installation or import. Even without malicious activity, incompatible future releases may alter security behavior. ### Attack Path 1. An attacker compromises the package publication process or a relevant upstream dependency. 2. The attacker publishes a version satisfying `mcp>=1.0.0`. 3. The script is run in an environment that resolves dependencies without a previously secured lock or cache. 4. The dependency resolver selects and installs the compromised version. 5. Malicious code executes during installation, import, or normal MCP client operation with the privileges of the invoking user. ### Impact Assessment A compromised resolved dependency could execute arbitrary code as the user running the diagnostic script. It could access local files, inherited credentials, ByteHouse configuration, and network resources available to that user. The current declaration does not demonstrate that the existing `mcp` package is malicious. The risk arises because future, unreviewed versions are automatically permitted. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
96% confidence
Finding

The script copies the entire parent process environment and passes it wholesale into a child process that is launched from a remote GitHub-sourced MCP server package. This can expose unrelated secrets present in the environment, not just the intended ByteHouse credentials, to code outside the script's trust boundary; because the child code is fetched from @main, the risk is amplified by supply-chain drift and potential secret exfiltration.

Content

Scanner excerpt · scripts/cluster_diagnostics.py (reported line 50)May include surrounding context.

python
print()
    
    # 从环境变量获取配置
    env = os.environ.copy()
    
    # MCP Server参数
    server_params = StdioServerParameters(

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The README explicitly advertises query-history analysis and writing multiple JSON reports to a local output directory, but it does not warn that those reports may contain operational metadata such as query text, error details, host or cluster topology, and timing information. In a diagnostics skill, this omission can lead users to collect and persist sensitive telemetry unintentionally, increasing the risk of local disclosure, log leakage, or accidental sharing of infrastructure details.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill instructs users to export sensitive ByteHouse credentials, write diagnostic output files, and rely on an MCP-backed service, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a trust and containment gap: an agent may access environment secrets, perform file writes, or invoke MCP capabilities without the skill clearly constraining or documenting those actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill’s natural-language interface and instructions are entirely presented in Chinese, including the manifest description and invocation guidance, with no indication that users may interact in other languages or opt into Chinese. Under the policy rule for language or locale constraints, this is a natural-language policy concern unless the locale restriction is explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language instructions in this file are fully Chinese, which effectively forces a specific language for users without opt-in or an alternative. Under the stated policy, language constraints should either offer user choice or be explicitly justified as region-specific.

Content

No source excerpt is available for this finding.