T09 · Insecure Skill Coding Practices
- Location
scripts/generate_weekly_report.sh:26- Finding
Arbitrary Python Code Execution Through the Output Directory Argument
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly does what it says, but a script accepts an output path in a way that can execute arbitrary Python code if the path is attacker-controlled.
Review this skill before installing. Use only trusted, simple output paths, do not pass paths supplied by others, and avoid enabling cron or Feishu sending until the output-path code injection bug is fixed. Treat generated report links as untrusted external links from RSS feeds.
scripts/generate_weekly_report.sh:26Arbitrary Python Code Execution Through the Output Directory Argument
scripts/generate_newspaper.py:447Unsafe URL Schemes Accepted in Links Generated from Remote RSS Data
这段代码与描述存在明显不完整对应。描述中的前半部分“自动抓取 RSS 订阅源的 AI 新闻,筛选应用向内容(剔除技术性太高的内容)”基本符合代码行为:代码会抓取多个 RSS/Atom 源,基于关键词筛选 AI 相关新闻,并过滤技术性较强的内容,还支持时间范围筛选和去重。但描述中的关键产出与集成功能——生成旧报纸风格的 HTML 简报、支持发送到飞书、用于每周自动/手动推送周报——在该代码块中完全没有体现。代码的实际职责更像是一个上游数据采集与过滤脚本,而不是完整的“周报生成与推送工具”。因此,若将该代码块视为对整个技能描述的实现,则描述高于实际能力,存在实质性不匹配。
The skill documents capabilities that read and write local files and access external RSS feeds, but it does not declare any explicit tool scope or permissions boundary. In an agent setting, missing scope declarations can lead to over-broad execution context, making it harder for users or the platform to understand and constrain what the skill is allowed to access.
The documentation encourages sending generated content to Feishu and shows a direct send command, but it does not prominently warn that this causes outbound transmission of locally generated data. In an automation context, users may unintentionally exfiltrate sensitive or internal information included in feeds, prompts, or generated summaries.
The scheduled examples configure unattended weekly execution that performs network fetches, creates files, and may send messages externally, yet the documentation lacks a clear warning about recurring background activity. Unattended runs increase the risk of unnoticed data transmission, persistent file accumulation, and execution in environments where network actions require review.
Natural-language strings throughout the script indicate the tool is fixed to Chinese output, including the title, usage description, and HTML locale. Under the policy, forcing a specific language/locale without user opt-in is a reportable natural-language policy violation unless clearly justified as region-specific.
The script's comments and all user-facing status/output strings are in Chinese, including usage-adjacent messaging and completion instructions. This imposes a specific language on users without any visible opt-in or alternative locale handling, which matches the language/locale policy violation criteria.
The manifest description specifies the skill in Chinese and presents the generated weekly report workflow as Chinese-language oriented, but does not indicate that users can choose another language or that the locale is intentionally restricted for a specific region. Under SQP-3, forcing a specific language without opt-in can be a natural-language policy concern.
The module docstring presents the skill entirely in Chinese ("RSS 抓取脚本 - 获取 AI 新闻" and usage text) with no indication that other languages are supported or that Chinese is a deliberate, documented locale constraint. The policy requires flagging language or locale constraints when the skill forces a specific language without user opt-in.
No suspicious patterns detected.