T06 · System Persistence
- Location
scripts/setup.sh:103- Finding
Setup Script Unconditionally Installs Persistent Scheduled Tasks
- Content
View full analysis
> $SKILL_DIR/logs/stock_tracker.log 2>&1" CRON_CMD_2="0 7 * * * cd $SKILL_DIR && $PYTHON $SCRIPT_DIR/stock_tracker.py --source cninfo --group 持仓 --days 15 --fetch-content >> $SKILL_DIR/logs/stock_tracker.log 2>&1" EXISTING=$(crontab -l 2>/dev/null || true) if echo "$EXISTING" | grep -qF "$SCRIPT_DIR/stock_tracker.py"; then echo " [OK] 定时任务已存在,跳过。如需更新请手动编辑 crontab。" else ( echo "$EXISTING" echo "# stock-tracker: 东方财富自选股公告追踪 (北京时间 9:00)" echo "$CRON_CMD_1" echo "# stock-tracker: 东方财富自选股公告追踪 (北京时间 15:00)" echo "$CRON_CMD_2" ) | crontab - ``` ### Technical Analysis Running the general setup script automatically modifies the invoking user's crontab and installs two recurring jobs. There is no command-line opt-in flag, interactive confirmation, dry-run mode, or choice to skip persistence. Scheduled execution is related to the Skill's advertised monitoring function, but it exceeds the minimum privileges needed for installation and one-time operation. Setup can install dependencies and prepare configuration without modifying persistent system state. Persistence should occur only after a distinct, informed scheduling request. The generated jobs repeatedly invoke `stock_tracker.py --fetch-content`. Depending on configuration and available credentials, this can perform network requests, process announcement data through an external LLM, write to the database, and append logs after the original Skill session has ended. ### Attack Path 1. A user or Agent runs `bash scripts/setup.sh` to initialize the Skill. 2. The script rea ...[truncated 970 chars]- Remediation
View remediation
