Back to skill

Security audit

百炼搜索工具-免费版

Security checks for vulnerabilities and agentic risk

Overview

This is a web-search skill, but its documentation is inconsistent and includes broad exec/write examples that can store or overwrite files beyond a clearly bounded search workflow.

Install only after reviewing and narrowing the instructions: confirm before sending sensitive queries to Bailian, avoid using the cache/archive snippets with untrusted input, and verify the actual websearch script exists and is scoped before granting exec or write access.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:214
Finding

User-Controlled Topic Enables Path Traversal and Arbitrary File Overwrite

Content
View full analysis
"round1-${DATE}.txt" # 第二轮:聚焦搜索(基于领先轮结果细化) echo "=== 第二轮:聚焦搜索 ===" .sh "${TOPIC} 优选实践" 5 > "round2-${DATE}.txt" # 合并结果 cat "round1-${DATE}.txt" "round2-${DATE}.txt" > "research-${TOPIC}-${DATE}.md" echo "调研结果已归档到 research-${TOPIC}-${DATE}.md" ``` ### Technical Analysis The documented archival workflow accepts the first command-line argument as `TOPIC` and inserts it directly into the destination pathname: ```bash > "research-${TOPIC}-${DATE}.md" ``` Shell quoting prevents word splitting and command substitution from values already stored in the variable, but it does not make the value safe for use as a filename. Path separators and traversal components such as `../` remain effective. An attacker who can influence `TOPIC` can therefore direct the shell redirection outside the intended working directory. Shell output redirection opens the resolved destination with truncation by default. If the selected path already exists and is writable by the Agent process, its contents can be destroyed before `cat` writes the search results. If it does not exist, the process may create it where parent-directory permissions allow. The project only contains `SKILL.md`, and the referenced `.sh` search command is absent or malformed. Consequently, the issue exists in the workflow instructions rather than in a packaged executable script. Exploitation requires an Agent or user to implement or execute the documented example. ### Attack Path 1. An attacker supplies or influences the topic passed to the documented workflow. 2. The attacker selects a traversal-bearing value that resolves to a writable location outside the intended archive dire ...[truncated 1470 chars]
Remediation
View remediation
&2 exit 1 fi cat "round1-${DATE}.txt" "round2-${DATE}.txt" > "$DESTINATION" printf 'Research results archived to %s\n' "$DESTINATION" ``` If a human-readable name is required, apply a strict allowlist such as ASCII letters, digits, underscores, and hyphens, enforce a short maximum length, and still verify that the canonical destination remains inside `ARCHIVE_DIR`. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

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 · SKILL.md (reported line 174)May include surrounding context.

环境变量配置

bash
# 百炼 API 配置(在 .env 或环境变量中)
export DASHSCOPE_API_KEY="${API_KEY:?请设置环境变量}"

# 可选:默认结果数量

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill describes external API searches and multiple examples that save results to local files, but it does not clearly disclose that queries and returned content may leave the local environment and be stored on disk. That omission creates a privacy and data-handling risk, especially if users enter proprietary, personal, or regulated information into search queries.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as a web-search utility, but these sections broaden it into generic create/query/modify/delete/export/save operation modes unrelated to search. That ambiguity can cause an agent to over-grant the skill authority, invoke write-like behaviors outside user intent, or trust unsupported destructive actions because they appear documented as first-class capabilities.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger condition is broad enough to match many ordinary SEO, keyword, ranking, and traffic-related requests, without clear limits on when the skill should or should not be invoked. In an agent ecosystem, that can cause over-invocation of a networked exec-enabled skill, sending user prompts externally or performing actions when simpler, local handling would suffice.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document says the free edition does not provide caching, history, or advanced workflows, yet later supplies concrete caching and archival scripts as normal usage. This inconsistency can mislead agents and users into persisting external-query data locally without realizing they are enabling storage, retention, and possible leakage of sensitive search terms or results.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The security section warns not to concatenate user input into command-line parameters, but the surrounding examples directly pass user-controlled values into shell invocations and redirects. In an agent context with exec enabled, this contradiction normalizes unsafe shell usage and increases the chance of command injection, argument confusion, or unsafe file writes if quoting or wrapper scripts are imperfect.

Content

No source excerpt is available for this finding.