T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:35- Finding
Privileged Global Package Installation Violates Least Privilege
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s PDF-labeling purpose is understandable, but it tells the agent to repeatedly install an unpinned package with sudo, which is more system authority than the task needs.
Review before installing. The core PDF-label workflow is plausible, but the skill should remove `sudo pip3 install`, use an isolated pinned dependency, and include or clearly scope the referenced processing script. Do not run it in an environment where the agent has passwordless sudo unless the dependency path has been controlled and reviewed.
SKILL.md:35Privileged Global Package Installation Violates Least Privilege
SKILL.md:35Unpinned Runtime Dependency Installation Creates a Supply-Chain Risk
The explicit use of sudo invokes root privileges for package installation, which is unnecessary for the stated PDF-label editing task and materially increases operational risk. In this context, a document-processing skill should not require privileged execution because compromise of the package install path would grant elevated access to the host.
单类型标签(所有页面条形码相同):
sudo pip3 install PyPDF2 -q
python3.11 /home/ubuntu/skills/pdf-label-made-in-china/scripts/add_made_in_china.py \
<input.pdf> <output.pdf> \
--barcode <条形码> \
The skill instructs operators to run sudo pip3 install PyPDF2 -q, which performs a privileged, system-wide package installation unrelated to the minimum necessary action of editing a PDF. Using sudo pip can alter shared Python environments, introduce unreviewed code with root privileges, and create persistence or system instability if the package source or dependency chain is compromised.
Telling the operator to install a Python package via sudo pip3 install without warning about elevated privileges encourages unsafe execution practices. Even if PyPDF2 itself is commonly used, this pattern normalizes root-level environment modification and increases the blast radius of dependency confusion, malicious packages, or accidental breakage.
Repeating the instruction to 'always' run sudo pip3 install PyPDF2 -q reinforces a dangerous operational pattern and increases the chance that operators will perform unnecessary root-level changes on the host. The repetition makes the unsafe behavior part of the standard workflow rather than an exceptional setup step.
## 注意事项
- 始终先用 `sudo pip3 install PyPDF2 -q` 确保依赖已安装
- 输出文件命名建议:`原文件名_modified.pdf`
- 多类型PDF:脚本自动通过条形码识别每页类型,无需手动分页
- 字体默认 Helvetica 8号,FBA标签可用 11号(`--font-size 11`)
The description states that users upload label PDFs and that the modified file will later be sent back, which implies handling user data. The markdown does not include any notice about reviewing file contents, privacy considerations, or safe handling of uploaded documents.