T09 · Insecure Skill Coding Practices
- Location
holding_monitor.py:48- Finding
Unauthenticated HTTP Used for Security-Relevant Market Data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This stock-monitoring skill matches its stated purpose, but it should be reviewed because it uses unauthenticated market-data HTTP and writes holding state to a predictable temporary file.
Review before installing. Do not run this as root, be cautious about enabling cron, and treat alerts as informational only. Prefer changing the data source to authenticated HTTPS and moving state to a private user-owned directory before relying on it for financial decisions.
holding_monitor.py:48Unauthenticated HTTP Used for Security-Relevant Market Data
holding_monitor.py:210Predictable Shared Temporary File Allows Symlink-Based File Overwrite
The skill declares no explicit tool scope or permissions, yet its documented behavior requires network access to fetch market data and file write capability for log redirection in the cron example. Missing capability declarations weaken least-privilege controls and can cause the skill to run with broader access than users or hosting platforms expect.
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.
定时检查(每天9:30-15:00每30分钟一次):
# 添加到crontab
crontab -e
# 写入:
*/30 9-15 * * 1-5 /path/to/holding_monitor.py >> /path/to/holding_monitor.log 2>&1
The script sends stock identifiers to third-party Sina Finance endpoints over plain HTTP, not HTTPS, and does so without clearly warning the user about external network transmission. This exposes holdings metadata to passive observers and allows tampering or spoofing of returned price data via man-in-the-middle attacks, which could cause incorrect trading alerts or decisions.
The manifest description focuses on monitoring A-share holdings and issuing reminders when trigger conditions are met. In addition to monitoring and printing alerts, the script persists detailed price and profit state to /tmp/holding_check.json, which is extra behavior not described in the manifest.