T02 · Agent Memory Poisoning
- Location
SKILL.md:372- Finding
Persistent Project-Controlled Agent Memory Is Automatically Trusted
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This CAD analysis skill appears legitimate in purpose, but it needs review because setup can make privileged system changes from unverified downloads and the skill tells agents to trust persistent project learning files.
Install only if you are comfortable with an agent skill that can run a setup script using sudo and network downloads. Prefer manual, verified installation of ODA/QCAD and Python dependencies, avoid running setup as root unless necessary, and disable or ignore the .learning mechanism unless you intentionally want project-local memory that future agent sessions will read.
SKILL.md:372Persistent Project-Controlled Agent Memory Is Automatically Trusted
scripts/setup.sh:66Local Package Arguments Bypass Explicit Setup Confirmation
scripts/setup.sh:164Downloaded ODA and QCAD Components Are Installed Without Integrity Verification
scripts/setup.sh:108Unpinned Python Dependencies Are Installed from the Active Package Index
scripts/setup.sh:241QCAD Archives Are Extracted Without Validating Archive Entries
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).
Delete the marker file to re-run full installation on next execution:
rm assets/.setup_done
Poor screenshot quality
The document says the tool does not automatically install packages, but later states that the first run may automatically install dependencies and create a setup marker. Contradictory installation behavior is dangerous because users and agents may believe analysis is read-only while triggering package installs, downloads, or privileged setup actions.
Referenced artifact was not completely inspected
scripts/cad_tools.py
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
else
log_info "Installing xvfb ..."
if [ "$PKG_MANAGER" = "apt-get" ]; then
sudo apt-get update -qq && sudo apt-get install -y -qq xvfb
else
sudo $PKG_MANAGER install -y xorg-x11-server-Xvfb 2>/dev/null || \
sudo $PKG_MANAGER install -y Xvfb 2>/dev/null || \
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
sudo rpm -i --replacefiles --nodeps "$ODA_RPM_PATH" 2>/dev/null || \
sudo $PKG_MANAGER localinstall --skip-broken -y "$ODA_RPM_PATH" 2>/dev/null
elif [ "$EXT" = "deb" ]; then
sudo dpkg -i "$ODA_RPM_PATH" 2>/dev/null || sudo apt-get install -f -y 2>/dev/null
fi
else
# Attempt automatic download
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- **OS**: Linux x86_64 (Ubuntu/Debian/RHEL/CentOS supported)
- **Python**: 3.8+ (system installed, other deps auto-installed)
- **Permissions**: root or sudo (required for installing system packages on first setup)
> macOS / Windows not supported (ODA File Converter and QCAD are Linux x86_64 only)
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- **OS**: Linux x86_64 (Ubuntu/Debian/RHEL/CentOS supported)
- **Python**: 3.8+ (system installed, other deps auto-installed)
- **Permissions**: root or sudo (required for installing system packages on first setup)
> macOS / Windows not supported (ODA File Converter and QCAD are Linux x86_64 only)
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- **OS**: Linux x86_64 (Ubuntu/Debian/RHEL/CentOS supported)
- **Python**: 3.8+ (system installed, other deps auto-installed)
- **Permissions**: root or sudo (required for installing system packages on first setup)
> macOS / Windows not supported (ODA File Converter and QCAD are Linux x86_64 only)
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- **OS**: Linux x86_64 (Ubuntu/Debian/RHEL/CentOS supported)
- **Python**: 3.8+ (system installed, other deps auto-installed)
- **Permissions**: root or sudo (required for installing system packages on first setup)
> macOS / Windows not supported (ODA File Converter and QCAD are Linux x86_64 only)
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- **OS**: Linux x86_64 (Ubuntu/Debian/RHEL/CentOS supported)
- **Python**: 3.8+ (system installed, other deps auto-installed)
- **Permissions**: root or sudo (required for installing system packages on first setup)
> macOS / Windows not supported (ODA File Converter and QCAD are Linux x86_64 only)
The README states the skill auto-triggers whenever DWG/DXF/CAD drawings are mentioned, which is a broad activation condition for an agent-integrated skill. Over-broad triggering can cause the agent to invoke file-analysis and setup-related capabilities in conversations that merely mention CAD terms, increasing the chance of unintended tool use and exposure to risky follow-on actions such as environment setup or external dependency installation.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
**Permission errors on first run**
setup.sh requires root permissions to install system packages. Please run as root or via sudo.
**ODA automatic download fails**
The document declares root/sudo as a requirement for installing packages and references auto-installation via setup.sh. While not inherently malicious, normalizing privileged execution for a skill materially raises risk because any flaw in the installer, dependency source, or future update path can lead to arbitrary system-wide changes or full host compromise.
## System Requirements
- **OS**: Linux x86_64 (Ubuntu/Debian/RHEL/CentOS)
- **Python**: 3.8+
- **Permissions**: root/sudo (required for installing system packages on first run)
## External Dependencies
This Skill depends on the following external tools (auto-installed by setup.sh):
The release notes explicitly state that the skill auto-installs external dependencies and requires root/sudo on first run, but they do not provide a clear warning, consent flow, or controls around system modification. In a skill ecosystem, encouraging privileged setup from bundled scripts increases supply-chain and host-compromise risk if the script or downloaded binaries are tampered with or behave unexpectedly.
The skill exposes shell, file read, and environment-sensitive behavior but does not declare any explicit tool scope or restrictions. That makes it easier for an agent to invoke broader capabilities than users would reasonably expect from a CAD viewer, increasing the chance of unintended command execution or filesystem access.
The trigger list in the manifest includes generic terms such as "layer," "block," "entity," and "screenshot," plus "or any mention of .dwg/.dxf files." Several of these words are common outside this specific skill context, which makes invocation scope ambiguous and increases the risk of unintended activation.
The documented behavior implies that running ordinary commands may trigger setup-related side effects, while no tight tool boundaries are declared. In context, this broad execution model is risky because a seemingly simple CAD operation could invoke shell actions, installers, or other unintended commands.
- The `{SKILL_DIR}` placeholder refers to the directory containing this SKILL.md file
- **First run may take 1-3 minutes** as the tool automatically installs all dependencies
- After first setup, a marker file is created at `assets/.setup_done` to skip future setup
- To re-run setup (e.g. after system update), delete `assets/.setup_done` and run any command
- DWG files require ODA File Converter for reading; DXF files can be read directly
- Screenshot quality is best with QCAD dwg2bmp; matplotlib is a reasonable fallback
- Large drawings may take several seconds to load — this is normal for complex engineering files
The manifest presents a CAD analysis utility, but the documentation adds persistent self-learning reads and writes in the user's project. This is a scope expansion not justified by the advertised function and creates hidden stateful behavior that can collect and reuse project-derived data across sessions.
A persistent cross-session memory mechanism in .learning/ is not necessary for a CAD viewer's core purpose and creates durable storage of user and project context. This can lead to data retention, unintended disclosure, and behavior influenced by stale or unrelated prior project information.
The self-learning feature instructs the agent to create and write project files automatically, but the nearby behavior description does not provide a prominent, explicit warning or consent gate. Silent modification of the user's workspace is risky because it persists data locally and can surprise users who expected read-only analysis.
Mandatory review and reuse of .learning/ files at the start of every task creates a built-in cross-session data retention channel. Even without obvious secrets, project-specific notes, prior errors, and preferences can leak context across tasks and influence future behavior in ways users did not request.
The logging guidance broadly instructs the agent to record corrections, preferences, errors, and discovered context into local files. That creates a durable repository of potentially sensitive project and user-derived information that may later be exposed to other sessions, tools, or collaborators with filesystem access.
Suspicious Unicode normalization or mixed-script content
Nearly all docstrings, CLI descriptions, help messages, and errors are presented only in Chinese. This imposes a fixed language/locale on all users without opt-in, which matches the policy category for language or locale constraints.
Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.
missing = []
for pkg in ("ezdxf", "matplotlib"):
try:
__import__(pkg)
except ImportError:
missing.append(pkg)
No suspicious patterns detected.