T09 · Insecure Skill Coding Practices
- Location
scripts/deploy_check.py:6- Finding
Incomplete sensitive-file detection can approve credential-containing deployment artifacts
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real static-site deployment helper, but it needs Review because it can publish local files publicly and persist free-form deployment history without enough confirmation or privacy boundaries.
Review the exact directory and target before allowing this skill to deploy anything, and do not rely on its sensitive-file check as a complete secret scan. Prefer pinned deployment tooling over the documented unpinned npx command. Treat learned_patterns.json as local telemetry that may contain sensitive notes or URLs, and clear or avoid it if that data should not persist.
scripts/deploy_check.py:6Incomplete sensitive-file detection can approve credential-containing deployment artifacts
SKILL.md:40Unpinned remote package execution in the documented Netlify deployment workflow
scripts/learner.py:86Persistent unsanitized notes can be replayed as Agent-visible recommendation text
该代码与声明有部分重合之处:确实实现了“构建产物校验”。但声明的核心范围明显更广,强调这是一个“部署助手”,并列举了多个具体平台的发布流程;而提供的代码片段完全没有网络请求、平台 API 调用、文件上传、发布配置生成或任何部署相关操作。其实际主功能只是部署前检查,因此对技能整体能力的描述存在实质性夸大,属于描述与行为不一致。
声明描述聚焦于静态网站部署与发布流程,但提供的代码块完全没有部署相关行为,例如检查构建产物、调用任何部署平台 API、上传文件、生成部署配置或触发发布。相反,它实现的是一个与具体业务无关的“自进化学习模块”,对任意技能的使用情况进行本地 JSON 持久化、统计分析和复盘建议输出。这属于与声明主用途 materially different 的功能,因此应判定为明显不匹配。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
import argparse, json, os, sys
SUSPICIOUS = (".env", "credentials", "id_rsa", "secret", ".pem", "key.json")
def check(dist_dir):
The file implements a generic cross-skill telemetry and self-learning module that is unrelated to a static-site deployment assistant's declared purpose. In this context, unnecessary cross-cutting persistence increases the attack surface and creates a covert channel for collecting and retaining usage data that users would not reasonably expect from a deployment helper.
Without declared permissions the skill's intent is opaque and cannot be validated.
The trigger phrases are broad enough to activate on common requests like 'deploy website' or 'publish frontend,' increasing the chance the skill is invoked in contexts where its assumptions or side effects are inappropriate. In a deployment skill, overbroad routing can lead to accidental publication actions, use of external tools, or exposure of files that were not meant to be deployed.
The skill content and user-facing description are entirely in Chinese, and there is no indication that the user can choose another language or that the skill is intended only for a Chinese-language audience. This can violate language/locale policy where skills must not force a specific language without user opt-in.
The skill presents a default path that can deploy a local directory and return a public URL, which is an externally impactful action. Without an explicit user confirmation gate and clear checks for sensitive content, autonomous selection of deployment targets increases the risk of accidental data exposure or unintended publication.
| CloudStudio 沙箱 | 任意静态目录,免配置,国内可达 | `workbuddy_cloudstudio_deploy` 工具 |
| EdgeOne Pages | 国内加速、绑定域名 | `edgeone-pages-deploy` 技能 |
| Netlify / Vercel | 海外、CI 友好、自动 HTTPS | CLI / Git 集成 |
| GitHub Pages | 开源项目页、文档站 | `github-pages-auto-deploy` 技能 |
> WorkBuddy 已内置 `workbuddy_cloudstudio_deploy` 工具,可直接把本地目录部署到 CloudStudio 沙箱并返回访问 URL——这是最省心的默认路径。
Using npx netlify-cli without pinning a version can pull the latest package at execution time, introducing supply-chain risk and nondeterministic behavior. If the upstream package or dependency chain is compromised, the skill could cause execution of attacker-controlled code during deployment.
The workflow directs the agent to choose a default deployment target and execute publishing steps, including external hosting and post-deploy validation, with limited mention of approval boundaries. In the context of a public deployment skill, this autonomy is more dangerous because mistakes can immediately expose internal artifacts, reports, or bundled secrets to the internet.
- **默认(最快)**:调用 `workbuddy_cloudstudio_deploy`,目录填构建输出目录(如 `dist/`)。
- **国内加速**:用 `edgeone-pages-deploy` 技能,支持自定义域名。
- **海外/CI**:Netlify/Vercel CLI(`npx netlify-cli deploy --prod --dir dist`)。
- **开源文档**:`github-pages-auto-deploy`。
### 3. 发布后验证
- 拿到 URL 后用 `web-fetch` 技能抓取首页,确认状态码 200 且关键内容存在。
The module docstring is written entirely in Chinese, and the script's user-facing messages are also Chinese-only, indicating the skill is designed for a single language without user opt-in. Under the policy, forcing a specific language is a natural-language policy violation unless the locale restriction is explicitly justified or optional.
Multiple user-visible strings such as error and status messages are hardcoded in Chinese, and there is no mechanism for language selection. This creates a locale policy issue because the skill forces one language for all users without presenting a choice or stating a justified regional constraint.
The module description, usage text, and user-facing messages are written entirely in Chinese, which imposes a specific language experience by default. The policy allows locale constraints only when they are documented and justified or when the user is given a choice, neither of which appears here.
The script persistently records per-skill operational history, error notes, and user preferences to disk, which exceeds what a static deployment assistant needs to perform deployments. Because note and preference fields are free-form, users or calling components may unintentionally store secrets, internal paths, tokens, or other sensitive operational details that remain on disk for later access.
The code writes user preferences and free-form notes directly into learned_patterns.json without any explicit notice, consent flow, or privacy boundary. This is dangerous because notes can easily contain sensitive deployment information, and undisclosed local persistence creates confidentiality and compliance risks even if the data never leaves the machine.