T09 · Insecure Skill Coding Practices
- Location
python_driver.py:391- Finding
Communication failures are interpreted as successful motion completion in the PC driver
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a clear motor-controller helper, but it can directly move physical hardware and change controller settings without enough safety gating or fail-safe handling.
Review this carefully before installing or using it with real equipment. Use it only with supervised hardware, tested limit switches, an independent emergency stop, and your own validation around travel limits, speed, communication errors, and confirmation before any movement or controller-setting write.
python_driver.py:391Communication failures are interpreted as successful motion completion in the PC driver
micropython_driver.py:433Communication failures are interpreted as successful motion completion in the MicroPython driver
python_driver.py:411PC motion operations can start with stale or mechanically unsafe parameters
micropython_driver.py:453MicroPython motion operations can start with stale, wrapped, or mechanically unsafe parameters
micropython_driver.py:174MicroPython driver incompletely validates Modbus read and write responses
The skill explicitly states that all code supports reading or writing any register on a motor controller, including registers for motion start, direction, homing, speed, and emergency stop. In a hardware-control context, unrestricted write guidance can directly cause unintended physical movement or unsafe state changes, and the document does not clearly require confirmation, authorization, or a prominent safety warning before such actions.
These methods perform real-world motor movement, homing, and emergency-stop-driven positioning against a physical limit switch without prominently warning callers that invoking them causes immediate actuator motion. In a hardware-control library, unclear safety semantics can lead to unexpected movement during testing or integration, creating pinch, collision, or equipment-damage risk if developers call the API without proper guarding, interlocks, or operator awareness.
The convenience API move_mm immediately sets direction, speed, distance, and starts the motor, but its documentation does not clearly emphasize that calling it initiates physical motion. Convenience wrappers are especially risky because they reduce friction and may be invoked casually by application code, increasing the chance of unintended movement, operator surprise, or mechanical damage.
This driver exposes callable methods that directly issue motion, homing, and emergency-stop related Modbus writes to physical hardware without any built-in safety interlocks, confirmation gates, authorization checks, or operator-presence safeguards. In a skill/agent context, these methods could be invoked programmatically and cause unexpected physical movement or re-homing of attached machinery, creating equipment damage or operator safety risks if called at the wrong time or with unsafe parameters.
The file presents the skill name, instructions, and operational guidance only in Chinese. Under the stated policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.
The manifest presents the skill name and description only in Chinese, with no natural-language indication that the skill is China-region-specific or that users may choose another language. Under the policy rule, a skill that effectively forces a specific language without opt-in can be a locale-policy concern.
This markdown file is entirely presented in Chinese from the title onward, with no indication that users may choose another language or locale. Under the policy rule for natural-language violations, a skill or documentation artifact that effectively imposes a language without opt-in can be flagged when no alternative or justification is provided.
All user-facing natural language in comments, docstrings, and printed output is Chinese, which effectively forces a specific language for users of the skill. The file does not provide an opt-in language choice or explain that the skill is intentionally limited to a Chinese-speaking or region-specific audience.
Natural-language content throughout the module, including the top-level description, docstrings, and printed status messages, is entirely in Chinese with no alternative locale or opt-in mechanism. This can violate language/locale policy when users are not explicitly given a choice or informed that the skill is region/language-specific.