T09 · Insecure Skill Coding Practices
- Location
scripts/deliver-briefing.sh:12- Finding
Hardcoded QQ Recipient Causes Unauthorized or Misdirected File Delivery
- Content
View full analysis
${NEWS_FILE} ⏰ 明日同一时间自动推送 • Jarvis Daily Briefing" ``` ```bash if timeout $TIMEOUT openclaw message send \ --channel qqbot \ -t "qqbot:c2c:${TARGET_USER}" \ -m "$ESCAPED_MESSAGE" 2>>"$LOG_FILE"; then ``` The alternative Python delivery path independently embeds the same recipient and accepts a caller-supplied file path: ```python def create_delivery_message(news_file): """Create the delivery message with file attachment.""" month_day = datetime.date.today().strftime('%m月%d日') tech_hl, finance_hl = extract_headlines(news_file) message = f"""📰 早安,Sir! 今日简报已送达 - {month_day} 🖥️ 科技要闻:{tech_hl}... 📈 财经动态:{finance_hl}... 完整报告:{news_file} ⏰ 明日同一时间自动推送 • Jarvis Daily Briefing""" return message ``` ```python def send_via_openclaw_cli(message, target): """Send message using OpenClaw CLI.""" try: cmd = [ 'openclaw', 'message', 'send', '--channel', 'qqbot', '-t', f'c2c:{target}', '-m', message ] result = subprocess.run( cmd, ...[truncated 4075 chars]- Remediation
View remediation
