Back to skill

Security audit

Langgraph Idea Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent coding-plan helper, but users should understand it uses an external MiniMax model and may send their request plus local script filenames to that provider.

Install only if you are comfortable sending your coding request and up to 30 local script filenames from ~/.openclaw/workspace-coding-advisor/scripts to MiniMax. Use a dedicated API key, avoid sensitive names in that scripts directory, and prefer pinned dependency installation if rebuilding the venv.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

other

Warning
Location
scripts/idea_gen.py:104
Finding

Local Script Filenames Are Disclosed to an External LLM Provider

Content
View full analysis
str: """列出指定目录下现有的 Python 脚本文件名(用于避免重复造轮子)。 Args: directory: 要扫描的目录路径,默认 ~/.openclaw/workspace-coding-advisor/scripts Returns: 目录下的 .py 文件列表(最多 30 个),目录不存在时返回提示 """ p = Path(os.path.expanduser(directory)) if not p.exists(): return f"目录不存在:{p}" if not p.is_dir(): return f"不是目录:{p}" files = sorted([f.name for f in p.glob("*.py")]) if not files: return f"{p} 下没有 .py 文件" return f"{p} 下现有 {len(files)} 个脚本:\n" + "\n".join(f"- {f}" for f in files[:30]) ``` ```python def plan_node(state: State) -> State: """节点 3:生成 3 行落地(命令→场景→存 scripts/) v1.1 升级: - 调用 list_existing_scripts tool 查老板现有脚本 - 注入 prompt 让 LLM 避免重复造轮子 """ # 调用 tool 查现有脚本(直接调 .func(),M3 tool-calling 支持待验证) existing = list_existing_scripts.func() existing_count = existing.count("- ") # 简单计数 llm = make_llm() prompt = f"""生成 **3 行落地**(每行 ≤ 50 字): 需求:「{state['request']}」 ({state['category']}/{state['complexity']}) 老板已有脚本: {existing} 格式: 命令:<具体可执行> 场景:<解决什么问题> 文件:~/.openclaw/workspace-coding-advisor/scripts/xxx.py (已有类似请改进,不要重写)""" plan = llm.invoke(prompt).content.strip() ``` ### Technical Analysis The `list_existing_scripts` tool enumerates up to 30 Python filenames from `~/.openclaw/workspace-coding-advisor/scripts`. The resulting list is inserted directly into an LLM prompt and transmitted by `llm.invoke` to the externally configured MiniMax Anthropic-compatible endpoint. Only filenames are collected; file contents and credentials are not read by this code. Nevertheless, filenames can contain sensitive metadata such as customer names, internal project identifiers, operational functions, or references ...[truncated 1312 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/cli.sh:17
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
&2 echo " 修复:cd $SKILL_DIR && python3 -m venv .venv && .venv/bin/pip install langgraph langchain-anthropic" >&2 exit 1 fi ``` ### Technical Analysis Both installation paths ask users to install `langgraph` and `langchain-anthropic` without exact version constraints, integrity hashes, or a reviewed lock file. Consequently, installation resolves whichever releases and transitive dependencies are available from the configured Python package index at installation time. Although `SKILL.md` lists component versions, those versions are not enforced by either installation command. The audited project does not contain the documented bundled `.venv`, so users are likely to follow the mutable repair procedure. No malicious package or compromised dependency was identified in the submitted files. The weakness is that installation results are neither reproducible nor cryptographically constrained, increasing exposure to future dependency compromise, unexpected breaking changes, or unsafe transitive releases. ### Attack Path 1. The CLI detects that `${SKILL_DIR}/.venv/bin/python` is unavailable. 2. It prints a repair command that invokes `pip install langgraph langchain-anthropic`. 3. The user follows that instruction. 4. Pip resolves mutable current versions and their transitive dependencies from the configured package index. 5. If a resolved package or distribution source has been compromised, its installation or imported runtime code executes with the installing user's privileges. 6. S ...[truncated 736 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill advertises code-related behavior and explicitly references use of an environment variable credential (EM_API_KEY), but it declares no permissions or allowed-tools scope. That creates an authorization and transparency gap: a host may permit broader environment access than users expect, and the skill does not clearly constrain what secrets or capabilities it needs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad and overlap with normal coding-help requests, which can cause the skill to activate in situations where the user did not intend to invoke an external-model-backed workflow. In this skill's context, that matters because activation may lead to code-generation guidance and API-backed processing without a clear consent boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill states that it uses an API credential via EM_API_KEY and routes requests to an external model, but it provides no warning that user prompts or workspace-derived content may be transmitted off-box. This creates a privacy and data-handling risk, especially if users provide proprietary requirements, file paths, or code snippets expecting local-only processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script checks for EM_API_KEY and MINIMAX_API_KEY and exports them into the environment passed to the invoked Python program. Although the comment mentions credential passthrough, there is no user-facing warning, prompt, or runtime disclosure that sensitive credentials will be used, which fits the missing-warning criterion for code files.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The stated purpose is to generate quick coding ideas/plans, but the implementation depends on reading environment-based credentials and calling a hosted LLM service. For this narrowly described planning skill, credential access is a non-obvious capability unless explicitly declared as part of the skill's scope.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/idea_gen.py (reported line 43)May include surrounding context.

python
return ChatAnthropic(
        model="MiniMax-M3",
        api_key=api_key,
        base_url="https://api.minimaxi.com/anthropic",
        max_tokens=1024,
    )

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The tool enumerates local script filenames from the user's workspace, which is outside the narrowly stated purpose of generating coding ideas. Those filenames can reveal internal project names, customers, business functions, or sensitive capabilities, and this inventory is later fed into the external LLM and surfaced in output, creating unnecessary data exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The request content is embedded directly into prompts and sent to the configured remote base_url, which may transmit potentially sensitive user or system information. The script does not clearly warn users that their input will be sent to a third-party service before processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code sends local script names to an external LLM provider without explicit notice or consent. Filenames often contain sensitive business context, so transmitting them off-host expands the data boundary and can disclose internal information unrelated to the user's request.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language description on L04 is entirely in Chinese and does not indicate that the user can choose another language or locale. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language description, examples, and usage context are presented in Chinese, effectively steering interaction toward a specific language without stating that other languages are supported or giving the user a choice. The policy calls for flagging language or locale constraints when they are imposed without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

Comments and user-facing error/help text are presented in Chinese only, and the file does not offer any language selection or opt-in. Under the stated policy, forcing a specific language without user choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The manifest describes a narrowly scoped LangGraph-based idea/code-plan generator, but this wrapper explicitly handles and propagates external service credentials (EM_API_KEY, MINIMAX_API_KEY). While the underlying Python tool may legitimately use an LLM, credential passthrough is a broader capability not stated in the manifest text and is not evident from this shell wrapper's user-facing purpose alone.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script's natural-language interface and prompts are exclusively in Chinese, including the interactive input prompt and model instructions, with no mechanism for users to select another language. This can violate language/locale policy when a skill imposes a language without explicit user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script prints and emits local workspace inventory in both JSON and console output even though that information is not essential to the advertised user-facing function. This increases the chance that internal filenames are exposed to calling agents, logs, terminals, or downstream systems that capture command output.

Content

No source excerpt is available for this finding.