Back to skill

Security audit

自媒体选题日报系统

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed topic-generation workflow, but it handles API credentials and scheduled outbound alerts with weak scoping that users should review before installing.

Review before installing. Use only a trusted HTTPS Anthropic endpoint, avoid storing long-lived API keys in shell startup files if possible, configure Feishu only for a trusted destination, and inspect or remove the external ~/.openclaw/workspace/.analysis/send_alert.py dependency before enabling cron.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_topics.js:691
Finding

Configurable LLM Endpoint Can Receive the Anthropic API Credential

Content
View full analysis
{ const controller = new AbortController(); const timer = setTimeout(() => controller.abort(), 15000); const resp = await fetch(`${baseUrl}/messages`, { method: 'POST', signal: controller.signal, headers: { 'Content-Type': 'application/json', 'x-api-key': apiKey, 'anthropic-version': '2023-06-01' }, body: JSON.stringify({ model: process.env.LLM_MODEL || 'claude-3-5-sonnet-20241022', max_tokens: 300, messages: [{ role: 'user', content: prompt }] }) }); ``` The data-point workflow repeats the same credential-routing behavior: ```javascript const baseUrl = ((process.env.ANTHROPIC_BASE_URL || 'https://api.anthropic.com').replace(/\/$/, '')) + '/v1'; const apiKey = process.env.ANTHROPIC_AUTH_TOKEN; // ... if (!apiKey) { return [ { text: `⚠️ LLM API key is not configured`, source: '—' }, { text: '⚠️ Manual completion required', source: '—' }, { text: '⚠️ Manual completion required', source: '—' } ]; } try { const result = await withRetry(async () => { const controller = new AbortController(); const timer = setTimeout(() => controller.abort(), 15000); const resp = await fetch(`${baseUrl}/messages`, { method: 'POST', signal: c ...[truncated 3033 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (33)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

代码与声明的核心方向大体一致:确实抓取多个热点源、做关键词筛选、调用 LLM 生成文案并产出 Markdown,因此不是完全无关。但存在多处重要描述不准确。最明显的是,声明中的“推送到飞书 webhook”在代码中完全未实现;代码只保存到本地文件系统。其次,声明强调“完整工作流:4 个脚本 + 4 个 cron 配置”,而当前代码块只是一个脚本,无法支持该完整性表述。再者,声明称“6 大类 119 词关键词库”,但实际 KEYWORD_DB 只有 5 个类目(A-E),与描述不符。数据源数量倒是匹配为 6 个,但整体上声明覆盖了若干代码中未体现的重要能力,因此应判定为描述与实际行为存在实质性不匹配。

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 180)May include surrounding context.

md
可在 `generate_topics.js` 第 46-100 行自定义关键词库。

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file tells the user to add their Feishu webhook URL, which enables outbound notifications to a third-party endpoint. The README does not include any warning about what data may be transmitted, privacy implications, or the need to verify the destination before deployment.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documents network access, environment-variable use, scheduled execution, and webhook delivery, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization gap: a host may grant broader capabilities than users expect, making secret access and outbound requests less transparent and harder to govern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description specifies Chinese-language content generation for Douyin and WeChat titles/hooks, and the rest of the document consistently frames outputs in Chinese-only terms. Because the skill does not offer a language/locale opt-in or explicitly justify the restriction as region-specific, this is a natural-language locale policy issue.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The skill instructs users to install scripts and outputs into persistent directories under the home workspace and to configure recurring cron jobs. Persistent placement plus scheduled execution means the skill can continue operating, reading configured secrets, writing files, and making network calls beyond the initiating session, increasing the blast radius of any later bug, compromise, or unexpected behavior.

Content

Scanner excerpt · SKILL.md (reported line 77)May include surrounding context.

bash
# 推荐:~/.openclaw/workspace/.analysis/topic_factory/
mkdir -p ~/.openclaw/workspace/.analysis/topic_factory
mkdir -p ~/.openclaw/workspace/claude-hub/topics

cp scripts/*.js scripts/*.sh ~/.openclaw/workspace/.analysis/topic_factory/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · SKILL.md (reported line 114)May include surrounding context.

bash run_daily.sh

验证

ls -la ~/.openclaw/workspace/claude-hub/topics/ # 应有 YYYYMMDD_topics.md cat ~/.openclaw/workspace/claude-hub/topics/$(date +%Y%m%d)_topics.md

text

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

L340 明确写的是“minimax 私有 API 偶发 rate_limit / overloaded”,但 L087-L090、L204-L208、L364-L366 一致说明该 skill 的 LLM 集成是 Anthropic Claude。这里不是单纯信息不全,而是对外部依赖对象的直接矛盾描述,会误导维护者排障与安全审查。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file's natural-language comments and user-facing console output are in Chinese, and the date logic explicitly forces the Asia/Shanghai timezone. This imposes a specific language/locale policy with no visible user opt-in or configurable alternative, which matches the policy-violation category for locale/language constraints.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file header says a topic is considered adopted when it contains "[x] 勾选采用" (L008), but the actual parser only marks adoption when it finds an HTML comment marker <!-- __ADOPTED__: 选题 N -->. This is an active contradiction in the script's own documentation and changes which topics get archived.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script persists raw upstream responses from multiple platforms into local log files under a predictable directory without minimization, retention limits, or operator disclosure. Even if the content is public trending data, raw payloads can contain more metadata than is needed and may accumulate sensitive or legally problematic content over time, increasing local exposure if the workspace is shared or synced.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate_topics.js (reported line 346)May include surrounding context.

js
/**
 * 4.2 微博热搜
 *
 * URL: https://api.weibo.cn/2/guest/search/hot/word
 * 超时: 5 秒
 * 返回格式: JSON { data: [{ word, num, flag }] }
 * 过滤: 关键词命中

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This code performs an outbound network request to a third-party Weibo endpoint. External transmission is expected for a trend-scraping skill, so the context makes it less suspicious, but it still expands the trust boundary, leaks request metadata such as IP/User-Agent, and may create compliance or operational risk if users are not informed.

Content

Scanner excerpt · scripts/generate_topics.js (reported line 356)May include surrounding context.

js
console.log('[微博] 开始抓取...');

  const json = await fetchWithTimeout(
    'https://api.weibo.cn/2/guest/search/hot/word',
    5000
  );

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate_topics.js (reported line 391)May include surrounding context.

js
/**
 * 4.3 B站热搜
 *
 * URL: https://api.bilibili.com/x/web-interface/search/square?limit=50
 * 超时: 5 秒
 * 返回格式: JSON { data: { trending: { list: [{ keyword, hot_value }] } } }
 * 过滤: 关键词命中

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This line performs an external request to Bilibili's API. As with the Weibo fetch, this is part of the skill's intended functionality and therefore less dangerous than hidden exfiltration, but it still introduces outbound data flow and third-party dependency risks that should be transparent to the user.

Content

Scanner excerpt · scripts/generate_topics.js (reported line 401)May include surrounding context.

js
console.log('[B站] 开始抓取...');

  const json = await fetchWithTimeout(
    'https://api.bilibili.com/x/web-interface/search/square?limit=50',
    5000
  );

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate_topics.js (reported line 494)May include surrounding context.

js
/**
 * 4.5 知乎热榜
 *
 * URL: https://api.zhihu.com/topstory/hot-lists/total?limit=50
 * 超时: 8 秒
 * 响应: { data: [{ target: { title, url, ... }, detail_text, ... }] }
 * 过滤: 关键词命中

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This line performs an outbound fetch to Zhihu. In context, the skill is explicitly designed to aggregate public hot-list content, so the transmission is expected rather than covert, but it still has privacy, dependency, and compliance implications if users are not clearly informed about all external contacts.

Content

Scanner excerpt · scripts/generate_topics.js (reported line 505)May include surrounding context.

js
try {
    const json = await fetchWithTimeout(
      'https://api.zhihu.com/topstory/hot-lists/total?limit=50',
      8000,
      {
        headers: {

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script sends scraped topic text, heat labels, and keyword-derived context to an external LLM endpoint controlled by configuration, without explicit user consent or a clear disclosure at runtime. In this skill context, the transmitted text is mostly public content, so the risk is not extreme, but it still creates a data-sharing boundary and can leak operator interests, workflow content, or unexpectedly sensitive scraped text to a third party.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This path sends scraped topic text and keyword matches to an external LLM for data-point generation, again without explicit user-facing disclosure or consent. Because the model is asked to generate supporting data, this also creates integrity risk: operators may unknowingly rely on third-party-generated content that was transmitted externally and may be inaccurate or fabricated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's user-facing strings, comments describing behavior, and runtime logs/messages are written in Chinese, and the code provides no opt-in or configuration for another language. This can violate a language/locale policy when users or operators are not explicitly choosing Chinese output.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

On failure, the script sends the last 20 log lines to an external Feishu webhook without any filtering or minimization. Logs from generate_topics.js may contain API keys, request payloads, internal paths, scraped content, or other sensitive data, so a failure path can unintentionally exfiltrate information to a third-party messaging system.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains user-facing natural-language content primarily in Chinese, including headings and feature descriptions. Under the policy rule for language or locale constraints, presenting the skill documentation in a fixed language without offering a choice or documenting the constraint can be a policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The README presents all user-facing instructions in Chinese and does not indicate that the skill is region-specific or provide an opt-in language choice. This can violate language/locale policy when users are implicitly forced into a single language without notice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

Natural-language strings throughout the script are fixed in Chinese, and formatting later also forces Chinese locale behavior for user-visible output and prompts. Under the language/locale policy, this is a forced locale choice without opt-in or documented justification in the file.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file-level documentation says the script '每天自动抓取 4 大平台热榜', which narrows the implemented scope to four sources. The actual code later implements and invokes six fetchers: 头条、微博、B站、抖音、知乎、36氪, so the inline documentation is materially inaccurate about the script's behavior.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/generate_topics.js:24