T06 · System Persistence
- Location
SKILL.md:381- Finding
Persistent Background Service and Automatic Restart Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly developer guidance, but it includes broad instructions for persistent background services and remote file transfer without enough user control.
Review this skill before installing. It may be useful as Chinese developer guidance, but do not let it create persistent services, start long-running background jobs, install unpinned packages, or push files to remote hosts unless you explicitly approve the exact files, commands, destinations, restart policy, and cleanup steps.
SKILL.md:381Persistent Background Service and Automatic Restart Instructions
SKILL.md:298Unpinned Network Package Installation Bypasses Python Environment Protections
SKILL.md:527Unrestricted Encoded File Transfer to a Remote SSH Host
SKILL.md:121API Credential Included in a URL Query String
This markdown skill is written as a general-purpose developer skill, but its manifest description is entirely in Chinese and the document consistently instructs behavior in Chinese without any opt-in or note that the skill is region-specific. Under the language/locale policy, forcing a specific language for a broadly scoped skill is a natural-language policy violation unless user choice or clear justification is provided.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
})
**规则:** 修改 `main.py` 或任何模板路由后,启动后端并用 curl 访问一次页面路由(如 `/`、`/fund/{code}`)验证模板渲染不报错。`HTTP 500` 且日志为 `TemplateResponse() takes ...` 或 `KeyError: request` 时,优先检查此签名。
#### 🔴 Pitfall: 数据采集脚本写入表结构与 models.py 不一致
当项目同时存在 `database/models.py` 的规范 Schema 和采集脚本中内嵌的旧版建表 SQL 时,两者会互相覆盖,导致 API 查询失败、外键约束错误或数据字段丢失。
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.
**正确做法:**
1. 删除旧数据库(先备份为 `.db.bak`),用 `models.py` 的 `Database` 重新初始化;
2. 删除采集脚本中的自定义 `CREATE TABLE` 逻辑,改为复用 `Database.connect()` + `Database.init_tables()`;
3. 把采集脚本中的插入 SQL 改为调用 `Database` 的 `upsert_fund_info()` / `upsert_nav()` / `upsert_score()` 或 `execute_many()`;
4. 小范围测试(如 `MAX_FUNDS=10`)后,用 `PRAGMA table_info(table)` 验证字段数量。
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.
**正确做法:**
1. 删除旧数据库(先备份为 `.db.bak`),用 `models.py` 的 `Database` 重新初始化;
2. 删除采集脚本中的自定义 `CREATE TABLE` 逻辑,改为复用 `Database.connect()` + `Database.init_tables()`;
3. 把采集脚本中的插入 SQL 改为调用 `Database` 的 `upsert_fund_info()` / `upsert_nav()` / `upsert_score()` 或 `execute_many()`;
4. 小范围测试(如 `MAX_FUNDS=10`)后,用 `PRAGMA table_info(table)` 验证字段数量。
No suspicious patterns detected.