Security checks for vulnerabilities and agentic risk
Overview
The skill does what it claims, but it uploads PDF page images to an external OCR service and generates HTML in ways that are under-scoped and potentially unsafe.
Review before installing. Use this only for PDFs you are comfortable sending to GLM-OCR/ZhipuAI, consider running it in an isolated environment, pin or review dependencies, and avoid opening generated HTML from untrusted PDFs unless the renderer is fixed to escape/sanitize content and disclose all remote resources.
', content, flags=re.DOTALL)
# 5. 行内代码
content = re.sub(r'`([^`]+)`', r'\1', content)
```
`scripts/md2html.py:124-139`:
```python
if stripped and not stripped.startswith('{stripped}')
else:
result.append(line)
# 构建 HTML
html = f'''
{title}
```
`scripts/gen_index.py:39-49`:
```python
chapter_items = []
for num, title, md_file, html_file in chapters:
links = ''
if html_file:
links += f'HTML'
links += f'MD'
chapter_items.append(f'''
...[truncated 2585 chars]
Remediation
View remediation
T08 · Insecure Dependencies
Warning
Location
meta.json:13
Finding
Unpinned Dependencies and Unverified Remote Browser Scripts
Content
View full analysis
```
```html
```
### Technical Analysis
The setup process installs Python packages without exact version constraints or cryptographic hashes. A future installation may therefore retrieve package versions that were not included in or reviewed during this audit. If an upstream package, release account, dependency, or package-distribution channel is compromised, malicious installation or runtime code could execute.
Generated HTML also loads executable JavaScript from `cdn.jsdelivr.net` without Subresource Integrity. Although the KaTeX URL includes a version, the browser does not cryptographically verify the downloaded content against an expected digest. A compromise affecting the CDN delivery path or referenced package artifact could therefore alter the effective browser-side payload after the Skill itself has been audited.
The declared network allowlist in `SKILL.md` contains `bigmodel.cn` and `cdn.bigmodel.cn`, but does not declare `cdn.jsdelivr.net`. The generated documents consequently initiate an undeclared external connection when opened.
### Attack Path
#### Python dependency path
1. A user runs the documented setup command.
2. `pip` resolves the latest compatible
...[truncated 1629 chars]
This instance goes beyond simple mismatch: the skill reads a credential from ~/.config/glm-ocr/api_key and sends document content to an external OCR service, while the description does not prominently disclose these sensitive resource accesses in the main behavior. Undeclared credential access and third-party data transmission can surprise users and lead to unintended exposure of local secrets and private PDF contents.
Content
No source excerpt is available for this finding.
Tp4
High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
This instance goes beyond simple mismatch: the skill reads a credential from ~/.config/glm-ocr/api_key and sends document content to an external OCR service, while the description does not prominently disclose these sensitive resource accesses in the main behavior. Undeclared credential access and third-party data transmission can surprise users and lead to unintended exposure of local secrets and private PDF contents.
Content
No source excerpt is available for this finding.
Tp4
High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
This instance goes beyond simple mismatch: the skill reads a credential from ~/.config/glm-ocr/api_key and sends document content to an external OCR service, while the description does not prominently disclose these sensitive resource accesses in the main behavior. Undeclared credential access and third-party data transmission can surprise users and lead to unintended exposure of local secrets and private PDF contents.
Content
No source excerpt is available for this finding.
Tp4
High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
This instance goes beyond simple mismatch: the skill reads a credential from ~/.config/glm-ocr/api_key and sends document content to an external OCR service, while the description does not prominently disclose these sensitive resource accesses in the main behavior. Undeclared credential access and third-party data transmission can surprise users and lead to unintended exposure of local secrets and private PDF contents.
Content
No source excerpt is available for this finding.
Tp4
High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
This instance goes beyond simple mismatch: the skill reads a credential from ~/.config/glm-ocr/api_key and sends document content to an external OCR service, while the description does not prominently disclose these sensitive resource accesses in the main behavior. Undeclared credential access and third-party data transmission can surprise users and lead to unintended exposure of local secrets and private PDF contents.
Content
No source excerpt is available for this finding.
Session Persistence
Medium
Category
Rogue Agent
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Content
Scanner excerpt · README.md (reported line 23)May include surrounding context.
The skill performs local file reads and writes, including reading an API key from the user's home directory and creating output files, but it does not declare any tool scope or permissions. This weakens least-privilege controls and makes the skill's actual access needs less transparent to reviewers and users.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding
The skill's user-facing instructions, workflow labels, output structure, and example interaction are entirely in Chinese, and the generated artifacts are specified with Chinese section titles and prompts. There is no indication that the user can choose another language or locale, which can violate language-choice policy for general-purpose skills.
Content
No source excerpt is available for this finding.
Session Persistence
Medium
Category
Rogue Agent
Confidence
95% confidence
Finding
This is the same underlying issue: the workflow persists the user's OCR API key in a predictable plaintext location in the home directory. In the context of a skill that processes potentially sensitive PDFs and performs network uploads, weak credential handling increases the chance of account misuse and unauthorized OCR API consumption.
Content
Scanner excerpt · SKILL.md (reported line 31)May include surrounding context.
md
**If ⚠️ NO KEY:** Guide user through setup before any API call:
1. 去 https://bigmodel.cn/ 注册并获取 GLM-OCR API Key
2. `mkdir -p ~/.config/glm-ocr && echo "your-api-key" > ~/.config/glm-ocr/api_key`
### 环境检查
Session Persistence
Medium
Category
Rogue Agent
Confidence
95% confidence
Finding
This is the same underlying issue: the workflow persists the user's OCR API key in a predictable plaintext location in the home directory. In the context of a skill that processes potentially sensitive PDFs and performs network uploads, weak credential handling increases the chance of account misuse and unauthorized OCR API consumption.
Content
Scanner excerpt · SKILL.md (reported line 31)May include surrounding context.
md
**If ⚠️ NO KEY:** Guide user through setup before any API call:
1. 去 https://bigmodel.cn/ 注册并获取 GLM-OCR API Key
2. `mkdir -p ~/.config/glm-ocr && echo "your-api-key" > ~/.config/glm-ocr/api_key`
### 环境检查
Vague Triggers
Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding
The quick-start invocation uses "把这本 PDF 转成学习笔记" as the user trigger, which is a broad natural-language request rather than a narrowly scoped command or explicit activation phrase. Without negative examples or tighter context constraints, similar everyday requests about PDFs could unintentionally match this skill.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding
The file’s natural-language strings and usage text are entirely in Chinese, including the module description and user-facing console messages. This creates a locale/language constraint without offering the user any language choice or documenting that the skill is intentionally region-specific.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding
This code file contains natural-language strings indicating the generated page is explicitly Chinese-only, starting with the module docstring in Chinese. The generated HTML also fixes the locale to zh-CN and uses Chinese UI text, but the skill offers no user opt-in or language selection and does not document a region-specific requirement.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding
The generated document sets <html lang="zh-CN">, which enforces a specific locale in the output. Under the policy, locale constraints should either be optional, user-selected, or clearly justified as region-specific.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding
The output HTML hard-codes lang="zh-CN", which imposes a specific locale on all generated documents regardless of the source content or user preference. The file also uses Chinese-only messaging and titles, but the explicit locale declaration is the clearest natural-language policy issue because no opt-in or justification is provided.
Content
No source excerpt is available for this finding.
Context-Inappropriate Capability
Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding
The skill's stated purpose is a local PDF learning workflow: scanned PDF → OCR → chapter splitting → study notes. This script adds runtime dependencies on jsDelivr-hosted KaTeX CSS/JS, which introduces network-reliant behavior into generated output even though network access is not an obvious requirement for OCR, chapter segmentation, or note generation.
Content
No source excerpt is available for this finding.
Context-Inappropriate Capability
Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding
The script reads a local API key and sends page image contents to the third-party GLM-OCR service, introducing an undisclosed external dependency and off-host data transfer. This is risky because scanned PDFs may contain sensitive or copyrighted material, and users are not clearly informed in the skill description that content will leave the local environment.
Content
No source excerpt is available for this finding.
Session Persistence
Medium
Category
Rogue Agent
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Content
Scanner excerpt · scripts/ocr_pipeline.py (reported line 12)May include surrounding context.
python
path = os.path.expanduser("~/.config/glm-ocr/api_key")
if not os.path.exists(path):
print("❌ GLM-OCR API Key 未配置!请先运行:")
print(" mkdir -p ~/.config/glm-ocr")
print(' echo "your-api-key" > ~/.config/glm-ocr/api_key')
sys.exit(1)
return open(path).read().strip()
Missing User Warnings
Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding
At the API call site, the script uploads full page images as base64 data to an external OCR service without any explicit warning, confirmation, or redaction step. If users process confidential documents, this can cause unintended disclosure of sensitive information to a third party.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Low
Category
Not specified by scanner
Confidence
86% confidence
Finding
The description is written entirely in Chinese and presents the workflow in that locale without any indication that users can choose another language or that the skill is intentionally region-specific. Under the policy, forcing a specific language without opt-in can be a natural-language policy concern.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Low
Category
Not specified by scanner
Confidence
83% confidence
Finding
The module docstring, usage text, and runtime status/error messages are all in Chinese, which effectively forces a specific language for user interaction. There is no indication that the skill is region-specific or that users can opt into another language, so this is a natural-language locale policy concern.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Low
Category
Not specified by scanner
Confidence
94% confidence
Finding
The module docstring is written entirely in Chinese, and later user-facing CLI messages are also hard-coded in Chinese. For a general-purpose postprocessing script, this imposes a language choice without opt-in or explanation, which matches the locale-policy concern for natural-language content.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Low
Category
Not specified by scanner
Confidence
97% confidence
Finding
The script prints operational status and usage text such as '已处理' and '用法' only in Chinese. Because these are user-facing strings in a general CLI tool and there is no language-selection mechanism or documented locale restriction, this is a natural-language policy issue.