Back to skill

Security audit

Weibo Hot With Your Taste

Security checks for vulnerabilities and agentic risk

Overview

The skill has a clear Weibo-hot-topic purpose, but it asks the agent to install unreviewed external code, store sensitive credentials locally, and run scheduled background jobs.

Review and pin the GitHub implementation before installing, and avoid unattended no_agent schedules unless you know exactly what command will run and how to remove it. Use dedicated low-privilege LLM, Feishu, and Weibo credentials, do not copy unrelated agent secrets into this skill, and understand that local preference/history files and reset tools can change or delete state.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:10
Finding

Installation and Execution of Mutable, Unaudited Remote Code

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 10-14
Vulnerability Type: Remote payload retrieval and execution
Risk Level: High

Vulnerable Snippet

text
## 使用指南(以hermes agent为例)
1. 加载skill。下达指令,“安装skill,https://github.com/zify9000/weibo-hot-with-your-taste”;
2. 配置凭证。下达指令,"配置微博热点skill", 交互式完成初始化配置(提供LLM和飞书凭据,扫码登陆微博,访谈用户偏好形成特征规则);
3. 设置定时任务,下达指令,“每小时执行一次微博热点爬取,12点05,18点05各执行一次推送,每周执行一次偏好特征优化(编写sh脚本,使用no_agent模式执行)”;
4. 触发式调用,下达指令,“抓取并推送微博热点”,“对话题1/3不感兴趣”,“展开说说话题2和话题3”,“进行一轮微博热点偏好调研”。

Technical Analysis

The audited package contains only SKILL.md; none of the referenced scripts are included. The instructions direct the Agent to install the effective implementation from a personal GitHub repository and then configure it with LLM, Feishu, and Weibo credentials.

The repository URL is not pinned to an immutable commit, signed release, or verified checksum. Consequently, the code ultimately executed can differ from the artifact reviewed here and can change after approval. The absence of local scripts also prevents verification of network destinations, transmitted fields, command construction, credential handling, dependency integrity, or data-retention behavior.

This is a remote payload execution risk rather than confirmed embedded malicious code: the audited artifact does not itself contain an executable payload, but it directs the Agent to retrieve and execute one whose contents are outside the reviewed boundary.

Attack Path

  1. The user loads the reviewed Skill.
  2. The Agent follows the installation instruction and clones or installs code from the mutable GitHub repository.
  3. The repository owner, a compromised account, or a compromised dependency supplies code that differs from the reviewed documentation.
  4. The Agent configures the downloaded code with LLM and Feishu credentials and a Weibo authenticated session.
  5. The downloaded scripts execute with the Agent's local perm ...[truncated 832 chars]
Remediation
View remediation

Remediation Suggestions

  • Include every required script and configuration template in the audited package.
  • If external retrieval is unavoidable, pin the source to an immutable commit and verify a cryptographic digest or trusted signature before execution.
  • Require a new security review whenever the pinned source or dependencies change.
  • Use dependency lockfiles with hashes and trusted package indexes.
  • Display the exact source revision and requested permissions before installation.
  • Run retrieved code in a sandbox with a read-only filesystem where possible, a minimal service account, and destination-restricted network access.
  • Do not expose credentials until code integrity has been verified.

T06 · System Persistence

Error
Location
SKILL.md:13
Finding

Unattended Cross-Session Persistence Through Scheduled Jobs

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 13
Vulnerability Type: Scheduled-task persistence
Risk Level: High

Vulnerable Snippet

text
3. 设置定时任务,下达指令,“每小时执行一次微博热点爬取,12点05,18点05各执行一次推送,每周执行一次偏好特征优化(编写sh脚本,使用no_agent模式执行)”;

Technical Analysis

The Skill instructs the Agent to create recurring scheduled tasks for hourly scraping, twice-daily delivery, and weekly preference optimization. It additionally recommends generating a shell script and executing it in no_agent mode.

Scheduled execution survives the initiating interaction and repeatedly invokes code without contemporaneous user oversight. This is particularly dangerous because the implementation is obtained from an unpinned external repository and is not included in the audited artifact. A later code change or compromise could therefore be executed automatically on every schedule.

Scheduling can be legitimate for a news-alert service, but the requested configuration exceeds safe minimum privilege because it lacks an approval boundary, immutable code pinning, a restricted execution identity, a documented expiration time, and a removal procedure.

Attack Path

  1. The Agent installs the externally hosted implementation.
  2. Following the Skill instructions, it writes a shell script and registers recurring jobs.
  3. The jobs persist beyond the current conversation and run without interactive Agent review.
  4. The external implementation or one of its dependencies is subsequently modified or compromised.
  5. At the next scheduled interval, the altered code runs automatically.
  6. The code can repeatedly access local data, call remote APIs, send messages, or modify preference state until the schedule is discovered and removed.

Impact Assessment

Exploitation can provide durable, repeated execution under the account that owns the scheduled task. The job may continuously access Weibo cookies, LLM and Feishu credentials, prefere ...[truncated 340 chars]

Remediation
View remediation

Remediation Suggestions

  • Do not create scheduled jobs automatically during Skill setup.
  • Obtain explicit, informed consent that identifies every command, execution frequency, account, network destination, retention period, and removal command.
  • Avoid unattended no_agent execution when sensitive credentials are available.
  • Pin scheduled execution to a locally reviewed, immutable code revision.
  • Run jobs under a dedicated, minimally privileged service account with isolated storage.
  • Restrict outbound traffic to documented HTTPS destinations.
  • Give schedules a default expiration time and provide a one-command uninstall procedure.
  • Record job creation and each execution in an auditable log without recording secrets.
  • Require renewed approval before changing the executable, arguments, destinations, or frequency.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:69
Finding

Overbroad Credential Discovery and Plaintext Secret Duplication

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 69-85
Vulnerability Type: Excessive credential access and insecure secret storage
Risk Level: Critical

Vulnerable Snippet

text
| `.llm.env` | `llm_model` / `llm_base_url` / `llm_api_key` |
| `.feishu.env` | `feishu_app_id` / `feishu_app_secret` / `feishu_chat_id` |
| `.weibo.env` | 微博 Cookie(由 `init/weibo_get_qr.py` + `init/weibo_wait_login.py` 生成,含 SUB + cookies_json) |

agent 首次使用时应检查这 3 个文件是否存在,对缺失的逐一询问配置。

> **⚠️ agent 注意**:
1. `.llm.env`、`.feishu.env`、`.weibo.env` 是以 `.` 开头的隐藏文件。部分工具的 glob 匹配(如 `search_files(pattern='.llm.env')`)对隐藏文件支持有缺陷,可能返回假阴性。**用 `ls -la scripts/env/` 或直接 `Read` 目标路径确认**,不要单独依赖 glob 搜索结果。
2. Hermes 等agent框架会拦截终端中出现的 key 明文。**不要直接在终端 echo/cat/粘贴 key**,应写 Python 脚本从 Hermes 配置(`config.yaml`、环境变量)读取实际值后调用 `write_file` 写入 `.llm.env` / `.feishu.env`,避免 key 泄露到终端历史。

**LLM / 飞书配置**:

python3 scripts/init/llm_feishu.py
--llm-model <模型名> --llm-base-url <API地址> --llm-api-key <API密钥>
--feishu-app-id <app_id> --feishu-app-secret <secret> --feishu-chat-id <chat_id>

text

Technical Analysis

The instructions tell the Agent to read secrets from the broader Hermes config.yaml or process environment and copy the resulting values into hidden plaintext .env files. This breaks least-privilege boundaries in two ways.

First, general Agent configuration and process environments may contain credentials unrelated to this Skill. Instructing the Agent to search those stores creates a risk that unrelated secrets will be discovered or selected accidentally.

Second, copying secrets into ordinary files duplicates sensitive material and expands the set of processes able to read it. The externally retrieved, unaudited scripts are specifically expected to consume these files. Hidden filenames do not provide access control, encryption, or meaningful protection.

Passing API keys and ap ...[truncated 2316 chars]

Remediation
View remediation

Remediation Suggestions

  • Prohibit scanning general Agent configuration files and environment variables for secrets.
  • Request only explicitly named credentials through a scoped secret-management interface.
  • Keep credentials in a platform secret store and inject them directly into the intended process at runtime.
  • Do not persist API keys, application secrets, or session cookies in ordinary plaintext files.
  • If temporary files are unavoidable, use a private directory, restrictive permissions such as 0600, short lifetimes, secure deletion, and a dedicated operating-system identity.
  • Do not place secrets in command-line arguments, shell scripts, scheduler definitions, logs, exceptions, or process titles.
  • Grant narrowly scoped Feishu permissions and use a dedicated application credential for this Skill.
  • Use short-lived tokens where supported and document rotation and revocation procedures.
  • Validate llm_base_url against an explicit HTTPS allowlist and reject redirects to unapproved hosts.
  • Minimize and redact data sent to LLM services; obtain user consent before transmitting preference or feedback information.
  • Ensure reviewed scripts cannot enumerate unrelated environment variables or files.
  • Add automated secret-scanning tests and verify that logs never contain tokens, cookies, application secrets, or sensitive request headers.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
92% confidence
Finding

Advertising a one-click reset of all data and configuration without a prominent warning or safety interlock creates a direct data-loss hazard. In this skill's context, the deleted material includes preference history, operational logs, and environment-based configuration, so accidental or induced use could erase both user state and forensic/audit information.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly instructs the agent to set up recurring scheduled execution and even to write shell scripts using no_agent mode. That expands the blast radius from an on-demand content skill into persistent autonomous execution, which can lead to unintended background actions, repeated credential use, and harder-to-audit behavior if the schedule or script content is altered.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The documented clear.sh utility can reset all data and configuration, including user preferences and stored credentials/config state, yet it is presented as a normal tool without strong safeguards. In an agent setting, destructive reset capability is risky because a misfire, prompt injection, or user ambiguity could trigger irreversible loss of state needed for operation and auditing.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Using a broad trigger like “反馈” makes accidental invocation plausible during ordinary conversation, especially because the skill then parses natural-language judgments and writes results into persistent feedback records. In context, this can silently modify the user's taste profile or trigger follow-on actions such as extra searches and pushes based on ambiguous chat text.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger word “调研” is overly generic and can collide with unrelated conversation, causing the skill to enter a survey workflow unexpectedly. Because the workflow surfaces candidate topics and can collect/store preference signals, accidental activation can result in unintended personalization changes and unnecessary processing.

Content

No source excerpt is available for this finding.