Back to skill

Security audit

chatbi-skil-test

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real ChatBI data-query tool, but it should be reviewed because it sends business queries and results to a default unencrypted HTTP endpoint.

Install only if you trust the configured ChatBI service and can use an HTTPS endpoint. Avoid sending confidential prompts or database results through the default cleartext URL, review any built-in account/workspace/table identifiers, and treat --save-raw files as sensitive because they can contain prompts, SQL, metadata, and result 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/chatbi/config.py:35
Finding

Enterprise Queries and Results Transmitted over Cleartext HTTP

Content
View full analysis

Vulnerability Details

File Location: scripts/chatbi/config.py:35; request usage at scripts/chatbi/client.py:45-52 and scripts/chatbi/client.py:109-115
Vulnerability Type: Cleartext transmission of potentially sensitive enterprise data
Risk Level: High

Vulnerable Code

scripts/chatbi/config.py:35:

python
api_url: str = "http://llmapp-prod.testsite.woa.com/api/v1/chatflows/80fbae66-9abc-42ed-8270-5ec0bcd5e526/prediction"

scripts/chatbi/client.py:45-52:

python
with requests.post(
    self._config.api_url,
    headers=headers,
    json=payload,
    stream=True,
    timeout=(self._config.connect_timeout, self._config.read_timeout),
) as resp:
    resp.raise_for_status()

scripts/chatbi/client.py:109-115:

python
resp = requests.post(
    self._config.api_url,
    headers=headers,
    json=payload,
    timeout=(self._config.connect_timeout, self._config.read_timeout),
)
resp.raise_for_status()
return resp.json()

Technical Analysis

The default ChatBI endpoint uses unencrypted HTTP. Both streaming and non-streaming requests send their complete JSON payload to this endpoint without TLS transport protection.

The payload can contain natural-language enterprise-data questions, user and workspace identifiers, table identifiers, generated SQL context, and dialogue metadata. Responses can contain selected table names, generated SQL statements, query results, execution details, and final answers.

HTTP provides neither transport confidentiality nor cryptographic server authentication. An attacker with a network position between the client and server can therefore observe or modify requests and responses. The parser trusts successfully decoded response events and displays their contents without an independent authenticity check, allowing a man-in-the-middle attacker to inject forged SQL, query results, or final answers.

Attack Path

  1. A use ...[truncated 1324 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the default endpoint with an HTTPS URL served using a valid, trusted TLS certificate.
  2. Validate the URL scheme during configuration initialization and reject non-HTTPS endpoints by default.
  3. If cleartext HTTP is required for isolated development, require an explicit option such as --allow-insecure-http and display a prominent warning.
  4. Keep certificate verification enabled and do not introduce verify=False.
  5. Consider restricting permitted endpoint hosts to an approved allowlist to reduce accidental data disclosure to arbitrary destinations.
  6. Use authenticated requests or signed responses where supported so the client can verify the service identity and response integrity.
  7. Avoid exposing sensitive query results in verbose logs and raw-event files unless explicitly requested and securely stored.

T08 · Insecure Dependencies

Warning
Location
scripts/requirements.txt:2
Finding

Open-Ended and Unhashed Runtime Dependency

Content
View full analysis

Vulnerability Details

File Location: scripts/requirements.txt:2; installation instruction at SKILL.md:40-44
Vulnerability Type: Unpinned third-party dependency and non-reproducible installation
Risk Level: Medium

Vulnerable Code

scripts/requirements.txt:2:

text
requests>=2.28.0

The documented installation command is:

bash
pip install -r scripts/requirements.txt

Technical Analysis

The dependency declaration specifies only a minimum version and has no upper bound, exact version, lock file, or package hash. Each installation can therefore resolve to a different future release of requests and its transitive dependencies.

This weakens supply-chain controls because the reviewed source tree does not uniquely identify the code that will be installed and executed. A compromised upstream release, compromised package-distribution account, or unexpectedly incompatible future version could be selected automatically. The absence of hashes also prevents pip from verifying that downloaded artifacts match artifacts approved during review.

This finding does not establish that the current requests package is malicious. The vulnerability is the project's inability to reproduce and cryptographically constrain its runtime dependency set.

Attack Path

  1. A user follows the documented installation command.
  2. The package resolver queries the configured Python package index.
  3. It selects any available requests version satisfying >=2.28.0, along with separately resolved transitive dependencies.
  4. If a selected future release or distribution artifact is compromised, malicious or altered dependency code is installed.
  5. That code can execute during package installation, import, or normal HTTP operations when the ChatBI CLI runs.

Exploitation requires compromise or manipulation of an upstream package, artifact, package index, or dependency-resolution path; the repository itsel ...[truncated 660 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin requests and all transitive dependencies to versions reviewed and tested by the project.
  2. Generate and commit a reproducible lock file using a dependency-management tool such as pip-tools, Poetry, or an equivalent controlled process.
  3. Record cryptographic hashes for every permitted distribution artifact and install with pip --require-hashes.
  4. Configure installation to use an approved package index or internal artifact repository.
  5. Use automated dependency scanning and update pinned versions through reviewed pull requests.
  6. Test security updates before changing the lock file rather than allowing unreviewed versions to be selected automatically.
  7. Perform installation in a dedicated virtual environment under a non-privileged account.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (23)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises no explicit tool scope or permission boundaries, yet its documented behavior implies access to environment/configuration, local file operations, and outbound network calls to an external ChatBI service. Without declared restrictions, an agent may invoke the skill more broadly than intended, increasing the risk of unintended data exposure or misuse of local/runtime capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description states that it sends natural-language questions through a ChatBI Agent service and returns SQL/results, but it does not prominently warn that user prompts, table-related context, generated SQL, and possibly data previews are transmitted to an external service. In a business data-analysis context, this creates a meaningful confidentiality and compliance risk because users may unknowingly send sensitive internal data or queries off-platform.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The activation text is broad enough to match common requests like data querying, SQL analysis, or any mention of ChatBI-related terms, which can cause over-triggering. In an agent environment, that increases the chance that ordinary user prompts or sensitive enterprise data tasks are routed to this external-network skill without deliberate user intent or adequate review.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
74% confidence
Finding

Examples throughout the file use only Chinese prompts such as 查询销售, 你的问题, and other Chinese query examples, and the document title/content are entirely Chinese. While examples alone are often acceptable, line 8 presents a required invocation example and the file does not indicate that other languages are supported or that Chinese-only use is an intentional, justified locale constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation explicitly encourages saving all raw streaming events to a JSON file, but it does not warn that those events may contain sensitive SQL, table names, result previews, identifiers, or business data. In a data-querying skill, raw agent telemetry is especially likely to include confidential enterprise information, so users may unintentionally persist sensitive data to disk or share it during debugging.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The environment variable section documents account and workspace identifiers plus a configurable API endpoint without any notice that these values are sensitive or should be protected. In practice, such configuration can expose internal service topology, tenant/workspace metadata, or enable accidental credential leakage and misrouting to untrusted endpoints if copied into logs, screenshots, or shell histories.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/chatbi/client.py (reported line 49)May include surrounding context.

python
}

        try:
            with requests.post(
                self._config.api_url,
                headers=headers,
                json=payload,

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/chatbi/client.py (reported line 121)May include surrounding context.

python
}

        try:
            with requests.post(
                self._config.api_url,
                headers=headers,
                json=payload,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The config hard-codes language: str = "English", which imposes a specific language setting by default. Under the policy, forcing a language or locale without offering user choice or documenting a justified regional constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file includes a Chinese-only class docstring and, throughout the formatter, emits Chinese UI strings to end users. That enforces a specific language/locale without user opt-in, which matches the natural-language policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The formatter prints Chinese-only labels such as "意图理解" and "原始问题" when rendering results. Because there is no visible mechanism for language selection or opt-in, this is a policy violation under the language/locale rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

These lines emit Chinese-only output like "选表结果", "表名", and "原因" directly to the terminal. The file does not provide any opt-in or alternative locale handling, so it forces a specific language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The final answer banner uses the Chinese phrase "最终回答" with no sign of locale negotiation or user choice. This constitutes a language policy issue because the skill imposes a specific language on all users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The SQL formatter emits several Chinese-only labels, including "SQL 生成", "执行计划", "SQL 执行结果", and "数据预览详情". With no user opt-in or locale setting, the skill forces a specific language in operational output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The stream header includes Chinese-only phrases such as "ChatBI 问数 Agent" and "问题". Since there is no visible mechanism to choose another language, this violates the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The execution footer prints multiple Chinese-only labels such as "执行摘要", "意图理解", "选表数量", "SQL 生成", and "总事件数". This is a clear user-facing language lock-in with no opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s natural-language descriptions and user-facing summaries are written exclusively in Chinese, including the main module docstring and generated summary strings. This imposes a specific language/locale without any opt-in, alternative, or documented region-specific justification, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code writes response.raw_events to a user-specified JSON file, and the help text only describes it as saving raw SSE events. There is no warning that these events may contain query contents, intermediate reasoning artifacts, or other potentially sensitive data before being stored on disk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The fallback message "原始数据" is shown to users when JSON parsing fails. Even though it is a small string, it still contributes to enforcing a single language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains multiple natural-language strings and docstrings exclusively in Chinese, including user-facing summary labels such as '意图理解', '选表结果', 'SQL', and '最终回答'. Under the policy, forcing a specific language without user opt-in or a documented justification is a locale/language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The natural-language docstring, argument descriptions, and usage examples are presented exclusively in Chinese. Under the stated policy, forcing a specific language without user opt-in is a locale/language policy concern unless the constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The dependency specification uses a lower-bound only constraint (requests>=2.28.0), which makes builds non-reproducible and allows installation of different versions over time. In a security-sensitive CLI that queries enterprise data and likely handles credentials, this increases supply-chain risk and makes it harder to ensure that a known-safe version of requests is deployed.

Content

Scanner excerpt · scripts/requirements.txt (reported line 2)May include surrounding context.

text
# ChatBI Agent CLI 依赖
requests>=2.28.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
89% confidence
Finding

Because requests is not pinned, there is no assurance that installation will avoid versions affected by known advisories. In the context of a command-line ChatBI agent that interacts with enterprise data over network requests, an affected requests release could expose credentials, weaken TLS/request validation behavior, or leak sensitive information depending on runtime usage.

Content

No source excerpt is available for this finding.