Back to skill

Security audit

GoTo CodeDev Manager

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its stated development-orchestration purpose, but its database and automatic execution safeguards are not tight enough for high-impact use.

Install only after reviewing and locking down adapters.yaml, workspaces.yaml, and policies.yaml. Do not provide production database credentials, even in fields named test_db_connection, and treat configured CLIs as trusted code with access to the target repository. The production migration policy and secret redaction should be fixed before using this in sensitive or production-connected environments.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
config/policies.yaml:39
Finding

Production Workspaces Can Apply Database Migrations Despite the Documented Prohibition

Content
View full analysis
ActionResult: result = resolve_stack(ws, self._config, self._executor).apply_migration_local(ws) return ActionResult(result.succeeded, "apply_migration_local", ws.id, output=result.stdout, error=result.stderr) ``` ```python # stacks/dotnet/efcore.py:167-175 def apply_migration_local(self, ws: "WorkspaceConfig") -> ExecutionResult: if not ws.test_db_connection: return ExecutionResult( stderr="拒绝执行:workspace 未配置 test_db_connection(测试库连接串)。" "为避免误连生产库,本动作必须显式提供测试库连接。", exit_code=2, ) return self._executor.execute(commands.database_update(ws), cwd=ws.repo_path, timeout=600) ``` ### Technical Analysis The documented policy states that applying a migration from a production workspace must be prohibited. However, the `prod` policy does not add `apply_migration_local` to `forbidden_extra`. Consequently, the default confirmation-required rule remains effective in production, and the operation executes after confirmation. The runtime safeguard only verifies that `test_db_connection` is nonempty. The field name is treated as proof of the target environment, but no validation establishes that the connection points to a test database. A production connection string can therefore be assigned to this field and used by `dotnet ef database update`. The `inherits: default` keys also have no explicit processing in `PolicyEngine._resolve_policy`; inheritanc ...[truncated 1186 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
executor/local_executor.py:27
Finding

Database Credentials Can Be Disclosed Through Debug Command Logging

Content
View full analysis
str: """对测试库执行 Migration。 强制显式传 --connection(测试库连接串);调用方必须保证 ws.test_db_connection 已设置, 禁止回落到项目默认连接(可能指向生产库)。 """ cmd = f'dotnet ef database update{_project_flags(ws)}' if ws.test_db_connection: cmd += f' --connection "{ws.test_db_connection}"' return cmd ``` ```python # executor/local_executor.py:27-43 def execute( self, command: str | list[str], cwd: str | None = None, timeout: int = 120 ) -> ExecutionResult: """command 可为字符串(按需 shlex 切分)或参数列表(原样传入,适合含空格/引号的 prompt)。""" logger.debug("local_execute", command=str(command)[:120], cwd=cwd) if isinstance(command, list): args: str | list[str] = command else: args = command if self._shell else shlex.split(command, posix=False) start = time.monotonic() try: result = subprocess.run( args, shell=self._shell, cwd=cwd, capture_output=True, text=True, ``` ### Technical Analysis `database_update` embeds the database connection string directly in the command text following `--connection`. `LocalExecutor.execute` logs the command before execution without detecting or redacting sensitive arguments. Connection strings commonly contain database usernames, passwords, hostnames, database names, and other security-sensitive options. Truncating the command to 120 characters is not a security control: short connection strings may be logged completely, and the credential-bearing portion may still fall within the logged prefix. The exposure occurs whenever debug logging is enabled and the migration action reaches the executor. Logs may subsequently be collected b ...[truncated 1142 chars]
Remediation
View remediation
list[str]: redacted = list(args) sensitive = {"--connection", "--password", "--token", "--secret"} for index, value in enumerate(redacted[:-1]): if value in sensitive: redacted[index + 1] = "[REDACTED]" return redacted ``` 4. Log only the executable name and a safe operation identifier when sensitive commands are executed. 5. Review existing logs and CI artifacts for disclosed connection strings. Revoke and rotate any credential that may have been recorded. 6. Add automated tests asserting that connection strings, passwords, and tokens never appear in emitted log events. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
config/policies.yaml:11
Finding

Actions Classified as Read-Only Can Modify Files or Launch Configurable Programs Without Confirmation

Content
View full analysis
ActionResult: adapter = self._selector.select(ws, params.get("agent")) adapter.open_workspace(ws) return ActionResult( True, "open_workspace", ws.id, output=f"已通过 {adapter.name} CLI 请求打开工作区:{ws.path}", data={"path": ws.path, "agent": adapter.name}, ) ``` ```python # adapters/generic/configured_cli_adapter.py:54-57 def open_workspace(self, ws: "WorkspaceConfig") -> None: args = self._args("open_args", ws) if args: self._executor.execute([self.command, *args], cwd=ws.repo_path, timeout=self._timeout("read_timeout", 60)) ``` ```python # core/dispatcher.py:226-246 def _generate_schema_contract(self, ws: WorkspaceConfig, params: dict) -> ActionResult: analysis = self._collect_diff(ws) entities = extract_entities(ws, self._config, analysis.changed_files, self._executor) if not entities: return ActionResult( True, "generate_schema_contract", ws.id, output="未识别到实体变化,无需生成数据库变更交接单。", data={"changes": []}, ) database = params.get("database") or self._infer_database(ws) contract = SchemaContract.from_entities( entities, feature=params.get("fea ...[truncated 3517 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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 (84)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个功能复杂的开发调度 Skill,而实际代码片段只是测试配置文件 conftest.py,作用是调整 Python 的模块搜索路径,便于 pytest 导入项目模块。这与声明的主要用途明显不一致。代码没有展示任何与所述 IDE/Agent 集成、代码分析、数据库迁移或报告生成相关的行为,因此应判定为描述与实际行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

这段代码的实际职责是配置读取与校验,属于底层支撑模块,而非声明中描述的核心业务能力实现。虽然 workspaces、adapters、stacks 配置结构看起来可能服务于一个多 Agent 调度系统,但当前代码本身并没有连接任何 IDE、调用任何 AI Agent、执行代码开发流程、分析 Git Diff、处理 EF Core、生成 migration、运行测试或产出报告。其主要目的与声明的高层功能存在明显差异。根据评估标准,这不是单纯的实现细节可以完全覆盖的程度,因为所给代码片段展现的实际行为仅限于配置管理,未体现声明的主要能力,因此应判定为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个面向多 IDE/多 AI 编程代理的开发调度与代码工程辅助能力集合;而实际代码片段的核心功能是安全策略校验与执行前权限门控。二者主目的明显不同。虽然策略引擎可能作为此类系统的底层支撑组件,但该代码本身并未体现所宣称的 IDE/Agent 调度、代码开发、Git Diff 分析、EF Core 实体识别、Migration 生成、测试构建或报告生成等行为,反而实现了未在描述中明确声明的策略读取、环境化权限决策、确认流转和审计日志能力。因此应判定为描述与实际代码行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The supplied code does not implement or exercise the broad orchestration and development workflow capabilities described. It is limited to configuration-loading tests for workspace, adapter, and stack settings plus a missing-workspace exception case. While such config tests could be a supporting part of a larger system, this chunk’s actual behavior is materially narrower than the declared purpose and does not substantiate the described skill functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a feature-rich orchestration skill that connects multiple IDEs and AI coding agents to perform development and database-related workflows. The supplied code, however, does not implement orchestration, IDE/agent connectivity, EF Core entity recognition, migration generation, report generation, or build/test execution. Instead, it is a test module for a policy engine that checks whether specific actions are allowed, require confirmation, or are forbidden. While the tested action names loosely relate to the declared domain (e.g., git diff, migration), the actual behavior here is security/policy validation, which is a materially different primary purpose and an undeclared capability.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
92% confidence
Finding

This method sends both the user prompt and workspace identifiers/path to an arbitrary configured external CLI, creating a real data-exfiltration and unintended delegation risk if the configured tool is untrusted, compromised, or points to a remote-backed agent. In the context of this skill, which is specifically designed to orchestrate multiple external coding agents across IDEs, the danger is elevated because sensitive source code context and instructions may routinely be transmitted outside the local trust boundary.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · README.md (reported line 90)May include surrounding context.

md
forbidden:
      - apply_migration_prod      # 直连生产库执行 Migration
      - force_push                # git push --force
      - drop_migration_history    # 删除/重置 EF Migration 历史
      - reset_hard                # git reset --hard
      - delete_branch             # 删除分支

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 88)May include surrounding context.

md
forbidden:
      - apply_migration_prod      # 直连生产库执行 Migration
      - force_push                # git push --force
      - drop_migration_history    # 删除/重置 EF Migration 历史
      - reset_hard                # git reset --hard
      - delete_branch             # 删除分支

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · config/policies.yaml (reported line 34)May include surrounding context.

yaml
forbidden:
      - apply_migration_prod      # 直连生产库执行 Migration
      - force_push                # git push --force
      - drop_migration_history    # 删除/重置 EF Migration 历史
      - reset_hard                # git reset --hard
      - delete_branch             # 删除分支

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
65% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · README.md (reported line 90)May include surrounding context.

md
- apply_migration_prod      # 直连生产库执行 Migration
      - force_push                # git push --force
      - drop_migration_history    # 删除/重置 EF Migration 历史
      - reset_hard                # git reset --hard
      - delete_branch             # 删除分支

  test:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
65% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 90)May include surrounding context.

md
- apply_migration_prod      # 直连生产库执行 Migration
      - force_push                # git push --force
      - drop_migration_history    # 删除/重置 EF Migration 历史
      - reset_hard                # git reset --hard
      - delete_branch             # 删除分支

  test:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
65% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · config/policies.yaml (reported line 36)May include surrounding context.

yaml
- apply_migration_prod      # 直连生产库执行 Migration
      - force_push                # git push --force
      - drop_migration_history    # 删除/重置 EF Migration 历史
      - reset_hard                # git reset --hard
      - delete_branch             # 删除分支

  test:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises capabilities that imply file access, environment access, shell execution, and code modification, but it does not declare an explicit tool scope such as permissions or allowed-tools. In a multi-agent coding/orchestration context, missing scope boundaries increases the risk of over-privileged execution, unintended command invocation, or workspace-wide changes beyond user expectations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Broad trigger phrases such as generic development terms can cause the skill to activate in routine conversations unrelated to intentional orchestration. In a skill that may open workspaces, run shell commands, inspect repos, or assign coding tasks, accidental invocation can expand attack surface and lead to unintended sensitive operations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Ambiguous adapter and development-related keywords make activation boundaries unclear, which is risky for a skill with potential shell, file, and git capabilities. Ambiguous routing can cause the wrong skill to capture a request, exposing repository context or initiating higher-risk workflows without clear user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The adapter invokes an external coding agent CLI with --permission-mode acceptEdits, explicitly allowing autonomous file modifications inside the workspace, but the code provides no user-facing disclosure, confirmation, or audit gate at this call site. In a multi-agent code-development orchestration skill, this increases the chance that a user or upstream component triggers unexpected repository changes, including unsafe code edits, dependency changes, or generated artifacts, without clear consent or visibility.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The only natural-language documentation in this file is written in Chinese, with no indication that language choice is optional or that the skill is intentionally region-specific. Per the policy, forcing a specific language without user opt-in is a locale/language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

This code launches an arbitrary configured CLI command with a user-provided prompt in the workspace via _executor.execute(...). The file contains no confirmation prompt, logging, or warning comment/docstring disclosing that external commands will be executed against the repository, which is a safety-relevant operation for a generic adapter.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The adapter executes an external CLI command against the workspace via the executor, which is a safety-relevant subprocess operation. In this file there is no confirmation prompt, logging/print statement, or explanatory comment near the execution path to disclose that opening the workspace will invoke an external tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code runs a configured external command with workspace path arguments to collect project context. That is a subprocess operation involving user/project data, but the file provides no user-facing warning, prompt, or nearby documentation explaining that repository information is sent to another CLI.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring and user-facing output strings are written entirely in Chinese, including the message returned to users in assign_coding_task. For a generic fallback adapter intended for any IDE, this imposes a locale choice without offering the user a language option or documenting why Chinese is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
72% confidence
Finding

The module docstring is entirely in Chinese and describes the adapter specifically in that locale/context, which may indicate a language policy constraint embedded in natural language. Because no user choice, opt-in, or justification is provided in the text, this can be treated as a potential language/locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file’s only user-facing natural-language text is entirely in Chinese, with no indication that language choice is optional or that the adapter is intentionally region-specific. Per the policy, forcing a specific language without user opt-in or documented justification is a locale/language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The adapter reads .vscode/tasks.json from the workspace and executes the task's command and args directly in the project directory. Because workspace task definitions are project-controlled content, opening or operating on an untrusted repository can cause arbitrary command execution without any confirmation, allowlist, or validation, which is especially risky in an agent orchestration skill that may invoke tasks automatically.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The comment says OpenClaw can directly trigger a full workflow by referencing the task name, but it does not define where this applies, who may invoke it, or any exclusion conditions. In a manifest-style file, this is an ambiguous activation description that could lead to unintended invocation if task names are referenced in ordinary discussion.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.