Back to skill

Security audit

Cnc Quick Probe

Security checks for vulnerabilities and agentic risk

Overview

This CNC quoting helper is mostly purpose-aligned, but it imports executable Python from an external hard-coded workspace path that is not bundled or integrity-checked.

Review this before installing if you do not control the referenced cnc-quote-system directory. The core CNC parameter-collection behavior is coherent, but installation should be limited to environments where the external dependency path is trusted, immutable, and expected; otherwise the skill could run altered local Python code.

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

T08 · Insecure Dependencies

Warning
Location
main.py:18
Finding

Unpinned External Python Dependency Loaded Through a Hard-Coded Search Path

Content
View full analysis

Vulnerability Details

File Location: main.py, lines 18–19
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable Code

python
# 导入参数收集器
sys.path.insert(0, "/home/admin/.openclaw/workspace/skills/cnc-quote-system")
from cnc_quote_collector import CNCQuoteCollector, ConvergenceLevel

Technical Analysis

The application prepends a hard-coded directory outside the audited project to Python's module search path and then imports cnc_quote_collector from that location. Because the inserted directory receives the highest search priority, any module with that name at the specified path will be imported.

The external component is not included in the audited project, and the code does not pin its version, verify its integrity, or validate the resolved module path. Python executes module-level code during import, so modification or replacement of cnc_quote_collector.py would provide a direct code-execution primitive when main.py is loaded.

This is a local supply-chain and module-resolution weakness. Exploitation requires the attacker to obtain write access to the referenced workspace directory or influence how it is provisioned.

Attack Path

  1. The attacker obtains write access to /home/admin/.openclaw/workspace/skills/cnc-quote-system, such as through a compromised dependency installation or an incorrectly permissioned shared workspace.
  2. The attacker creates or replaces cnc_quote_collector.py with a malicious module implementing the expected symbols.
  3. The Agent loads or invokes main.py.
  4. sys.path.insert(0, ...) gives the attacker-controlled directory the highest module-resolution priority.
  5. Python imports the substituted module and executes its top-level code.
  6. The payload runs with the same operating-system identity and permissions as the Agent process.

Impact Assessment

Successful exploitation permits arbitrary Python execution within the Agent process. The resulting access is ...[truncated 468 chars]

Remediation
View remediation

Remediation Suggestions

  1. Package cnc_quote_collector within the Skill and import it through an explicit package-relative import.
  2. Remove the runtime sys.path modification and use Python's standard dependency and package-resolution mechanisms.
  3. If the collector must remain external, declare it as a managed dependency with an exact version and integrity-locked artifact.
  4. Verify the resolved module path and artifact hash before loading the dependency.
  5. Restrict write permissions on the dependency directory to trusted deployment identities; the Agent runtime account should not be able to modify its own dependencies.
  6. Deploy dependencies from an immutable, trusted build artifact rather than a mutable workspace directory.
  7. Add a startup check that fails closed when the dependency is missing, unexpectedly located, or fails integrity verification.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger conditions and phrases are broad enough that ordinary CNC quote conversations may activate this skill unexpectedly, especially with auto_route enabled. That can steer users into parameter collection and downstream quotation logic without a clear boundary, creating unintended workflow execution and possible business-action automation on incomplete user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description says it will automatically execute a quotation once convergence reaches 80%, but it does not clearly warn or obtain consent from the user at the point of use. This is dangerous because users may believe they are only answering clarifying questions, while the system transitions into a business-action step that could generate commitments, records, or misleading output without explicit approval.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The routing logic uses ambiguous variables ('intent' and 'convergence') without defining how they are computed, validated, or thresholded, which makes invocation behavior hard to predict and easy to misfire. In an auto-routing system, unclear activation criteria can cause unintended skill execution and automatic progression to quoting based on weak or misclassified signals.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill modifies sys.path to load and execute Python code from an absolute external workspace directory, creating a trust boundary violation. If that path is writable or its contents can be replaced, the skill will import attacker-controlled code at runtime, leading to arbitrary code execution under the agent's privileges.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Natural-language instructions, triggers, and examples are all presented in Chinese, with no indication that the user can choose another language. If organizational policy requires avoiding forced locale or language without user opt-in, this is a language-policy issue.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.