Back to skill

Security audit

Qibook Company Wiki Deepresearch

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its enterprise-research purpose, but it needs review because it sends an API key to a user-configured endpoint without host validation and includes instructions to conceal AI authorship.

Install only if you intend to use Qibook for Chinese enterprise or organization reports. Set QIBOOK_BASE_URL only to the official HTTPS endpoint provided by Qibook, protect and rotate QIBOOK_ACCESS_KEY, and assume queried entity names plus returned business-risk data may be sent to and printed from the remote workflow. Remove or override the AI-concealment template language if report transparency matters.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/data_service.py:16
Finding

Environment-Controlled API Endpoint Can Receive the Access Key

Content
View full analysis
Remediation
View remediation
str: if not base_url: raise ValueError("QIBOOK_BASE_URL is required") parsed = urlparse(base_url) if parsed.scheme != "https": raise ValueError("QIBOOK_BASE_URL must use HTTPS") if parsed.hostname not in APPROVED_HOSTS: raise ValueError("QIBOOK_BASE_URL uses an unapproved host") if parsed.username or parsed.password or parsed.fragment: raise ValueError("QIBOOK_BASE_URL contains prohibited components") if parsed.path not in ("", "/"): raise ValueError("QIBOOK_BASE_URL must not contain an unexpected path") return base_url.rstrip("/") ``` ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/base.py:17
Finding

Legacy HTTP Client Sends Credentials to an Unvalidated Base URL

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (32)

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

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The request URL is built from the QIBOOK_BASE_URL environment variable without validation, then used directly in requests.get while also attaching the access_key header. If an attacker can influence the environment or deployment configuration, they can redirect requests and exfiltrate the credential and queried enterprise data to an attacker-controlled endpoint. In a skill that performs external research, this becomes more dangerous because network access is expected and sensitive business lookup data is routinely transmitted.

Content

Scanner excerpt · scripts/base.py (reported line 69)May include surrounding context.

python
try:
        debug_print(f"调用聚合接口: {url}, 企业: {entname}")
        response = requests.get(url, headers=headers, params=params, timeout=timeout)
        result = response.json()

        if result.get('code') == 200:

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs activation even when the user's intent is unclear, using broad conversational phrases like '了解一下' and '怎么样' as automatic triggers for a full enterprise research workflow. This can cause the agent to invoke external data collection and generate extensive reports without sufficient intent confirmation, increasing the risk of overreach, unnecessary data access, and user-surprising behavior.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The file makes outbound network requests, but the finding indicates that network capability is not declared. Undeclared egress is a security issue because it hides data flows and expands the attack surface for exfiltration or unexpected third-party communication.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The file makes outbound network requests, but the finding indicates that network capability is not declared. Undeclared egress is a security issue because it hides data flows and expands the attack surface for exfiltration or unexpected third-party communication.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The template explicitly instructs the assistant to hide that it is AI, which is a policy-violating deception pattern. This is dangerous because it encourages misleading users about the nature of the system, undermines informed consent, and can increase trust in generated claims during sensitive business or due-diligence workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code sends the user-provided enterprise name to an external API via requests.get, which is a network operation involving potentially sensitive business lookup data. Although the function docstring explains the API call technically, there is no confirmation prompt or user-facing disclosure such as a warning, print, or log visible to the user before transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The CLI path prints a large slice of the fetched enterprise dataset directly to stdout, which can expose sensitive or regulated business information in terminal history, logs, CI output, or shared shell sessions. In this skill’s context, the fetched data is specifically enterprise intelligence and due-diligence material, so dumping it by default increases the likelihood of unintended disclosure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This Python file contains natural-language documentation and user-facing template names entirely in Chinese, indicating a fixed language choice. Under the policy, forcing a specific language without user opt-in or clear locale justification is a reportable natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The template explicitly instructs the model to conceal that it is AI, which conflicts with transparency and safe-deployment expectations for user-facing systems. While this is not code execution or data exfiltration, it can mislead users about the source and reliability of the analysis, and it may encourage the model to evade policy-compliant disclosures.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt is written as a mandatory Chinese-language reporting template and does not provide any option for the user to choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The template mandates output of litigation, enforcement, tax, execution, dishonesty, and negative public-opinion information about entities. Even when sourced from public records, consolidating and presenting adverse information at report scale can expose sensitive reputational and legal data, increase misuse risk, and create privacy/compliance issues if the subject, jurisdiction, or data freshness is not validated.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This section explicitly instructs the report to name customers, suppliers, and related parties whenever such information is available from inputs or public sources. That creates a real risk of unnecessary disclosure, aggregation, and amplification of sensitive business relationship data, especially when user-provided data or mixed-trust datasets are included.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The entire instruction set is written to require output in Chinese and provides no mechanism for the user to select another language or locale. This is a natural-language policy concern because it effectively forces a specific language without documented opt-in or region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire instruction set mandates Chinese-language output and uses Chinese-only section names and formatting requirements, but it does not provide opt-in, alternatives, or any documented reason that this skill must be Chinese-only. Under the policy, a forced language/locale constraint without user choice 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
97% confidence
Finding

Line L01 is written as a mandatory instruction in Chinese and frames the skill behavior entirely around producing the report in that language. The file does not offer user opt-in, language selection, or explain that this is a region-specific or Chinese-only workflow, which makes it a natural-language locale policy violation under the stated rules.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The entire template mandates Chinese-language output and Chinese markdown headings, with no indication that the user may choose another language or locale. This is a natural-language policy concern because it imposes a specific language by default rather than offering user choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Line L01 describes the role as a professional enterprise credit analyst responsible for a company encyclopedia, but later sections define school-oriented modules and L47 explicitly says to ignore the enterprise-oriented '风险测评' module because it is not applicable to schools. This is an active contradiction between the prompt's stated intent and the actual reporting instructions.

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 instructions are entirely prescriptive in Chinese and define the assistant persona and report-writing behavior for all outputs. There is no indication that the user may choose another language or that the Chinese-only constraint is optional, which constitutes a locale/language policy issue under the rule.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a skill for generating 企业百科 reports and credit/commercial due diligence about companies, but this file instructs the agent to produce a school-specific report centered on school history, academic research, rankings, teaching conditions, and campus dynamics. That is a material semantic mismatch in subject matter and output scope, not just an implementation detail.

Content

No source excerpt is available for this finding.

Ssd 1

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This instruction is a direct attempt to steer the model into misrepresenting itself as non-AI. In a research and credit-analysis context, that deception is more serious because users may rely on the report for financial, legal, or reputational decisions while believing it came from a human expert.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire instruction set is written to require output in Chinese and uses Chinese-specific stylistic constraints, but it does not state that the user may choose another language or that the skill is explicitly limited to a Chinese-language context. This creates a natural-language policy concern because it effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file is entirely written as a mandatory Chinese-language prompt and repeatedly constrains tone and phrasing, but it does not indicate that users may choose another language or that the skill is limited to a Chinese-only regulatory context. This can violate language/locale policy because it imposes a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The template is explicitly scoped to 个体工商户 while the skill metadata describes broader enterprise/company wiki research. This mismatch can cause the agent to apply the wrong analytical framework, omit relevant enterprise-specific factors, or produce misleading reports for non-applicable entities. In a due-diligence or credit-analysis context, that can materially degrade output reliability.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The template says analysis must be strictly based on user-provided data, but later requires policy and regional analysis that may not exist in the supplied input. This creates instruction conflict that can push the model to infer, hallucinate, or overstate unsupported conclusions, especially in compliance, credit, or business-research use cases where factual grounding is critical.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

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

python
module_name, attr_name = _LAZY_IMPORTS[name]
        import importlib
        module = importlib.import_module(f'.{module_name}', __name__)
        return getattr(module, attr_name)
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")