T07 · Tool Hijacking and Spoofing
- Location
scripts/generate_sketch.py:17- Finding
Python Import Path Precedence Enables Local Package Hijacking
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent local engineering-sketch helper, but its install and import path choices create review-worthy supply-chain and local code-hijacking risk.
Install only in an isolated virtual environment without administrator privileges, prefer a pinned commit or reviewed release of MechanicsSketches, and avoid running the helper from shared or world-writable directory layouts until the import-path behavior is fixed.
scripts/generate_sketch.py:17Python Import Path Precedence Enables Local Package Hijacking
SKILL.md:23Unpinned Git Dependency Allows Mutable Upstream Code Execution
The setup instructions tell users to install code directly from a remote GitHub repository using pip install git+https://..., which executes arbitrary package build/install logic from a moving remote source. This creates a supply-chain risk: if the repository, dependency chain, or referenced revision is compromised, users may run attacker-controlled code during installation.
You can generate engineering mechanics sketches programmatically using the MechanicsSketches Python library.
Install the library via pip:
pip install git+https://github.com/MatthiasHBusch/MechanicsSketches.git
Or install dependencies manually and add to PYTHONPATH:
pip install matplotlib PyQt5
export PYTHONPATH="/path/to/parent/of/MechanicsSketches:$PYTHONPATH"
Create a Python script that builds a sketch and renders it:
from MechanicsSketches import *
import os
sketch = create_sketch("My Sketch")
S = 30.0 # Scale factor (recommended: 20-40)
# Add components
add_beam(sketch, ax=0, ay=0, bx=10*S, by=0, scale_factor=S)
add_pinned_support(
Without declared permissions the skill's intent is opaque and cannot be validated.
No suspicious patterns detected.