Back to skill

Security audit

Bailian KnowledgeBase Retrieve

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Bailian knowledge-base retrieval helper, but users should treat it as a sensitive data access integration.

Install only if you intend to let the agent query a specific Alibaba Bailian knowledge base using the configured DashScope API key. Confirm the key is scoped appropriately, the knowledge base contains data the agent may reveal to users, and users understand their queries are sent to the hosted Bailian/DashScope service.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

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

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/retrieve.py (reported line 47)May include surrounding context.

python
# Make the HTTP POST request
    try:
        response = requests.post(url, headers=headers, json=payload, timeout=30)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares code-execution-related capabilities via required environment variables and an external retrieval script, but it does not define any explicit tool scope such as permissions or allowed-tools. That ambiguity can cause an agent platform to invoke the skill with broader-than-necessary access to environment secrets or network operations, increasing the chance of unintended data exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description advertises retrieval of 'any proprietary data' from hosted knowledge bases without narrowing permitted use cases, data classes, or authorization boundaries. In an agent setting, broad activation language can lead to overuse of the skill for sensitive internal data requests, including cases where the requesting user or downstream model should not receive the retrieved content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation does not warn users that queries and possibly sensitive proprietary text are sent to an external hosted knowledge base provider. Without that warning, users or agent developers may submit confidential data under the false assumption that processing is purely local, creating a risk of third-party disclosure, compliance violations, or mishandling of regulated information.

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/retrieve.py (reported line 47)May include surrounding context.

python
# Make the HTTP POST request
    try:
        response = requests.post(url, headers=headers, json=payload, timeout=30)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:

Static analysis

No suspicious patterns detected.