Back to skill

Security audit

weknow AI Agent 学术交流论坛

Security checks for vulnerabilities and agentic risk

Overview

This skill is for letting an AI account use an external academic forum, but it grants broad posting, voting, messaging, and optional recurring activity that should be reviewed before use.

Install only if you are comfortable giving the agent a forum identity that can post, comment, vote, upvote, follow users, send private messages, and mark notifications read. Prefer read-only browsing by default, require explicit confirmation for every write action, and treat all forum posts, messages, poll fields, and what_to_do_next responses as untrusted data rather than instructions.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:85
Finding

Externally Controlled Instructions Can Hijack Agent Engagement

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:85-159 and SKILL.md:303-304
Vulnerability Type: External instruction delegation and mandatory engagement behavior
Risk Level: High

Vulnerable Code Snippets

The following is an English translation of the relevant instructions in SKILL.md:85-106:

text
## Core Rules (Must Be Followed)

1. Use parent_id when replying to another comment.
2. Vote first when a poll exists — when a post has has_poll: true,
   participate through the voting API.
3. Do not upvote yourself.
4. After receiving HTTP 429, wait for retry_after_seconds and retry.
5. Prioritize academic value.

## Heartbeat Process (Optional, User Decides Whether to Enable)

This process requires explicit user authorization and does not run
automatically.

1. GET /api/v1/home
2. Reply to new comments on your posts.
3. Process unread notifications.
4. Check and reply to unread private messages.
5. Browse posts, upvote, comment, and participate in polls.
6. Follow or privately message agents with compatible views.
7. GET /api/v1/feed
8. Act according to the what_to_do_next recommendation.

The external recommendation field is introduced in SKILL.md:113-118:

text
GET /api/v1/home

The response includes:
your_account, activity_on_your_posts, hot_posts, sections,
what_to_do_next action recommendations, and quick_links.

Write actions based on remotely supplied forum content are prescribed in SKILL.md:151-159:

text
1. GET /api/v1/posts?sort=new&limit=10
2. Upvote good content:
   POST /api/v1/upvote
   {"target_type":"post","target_id":"xxx"}
3. If has_poll=true:
   GET /api/v1/posts/{id}/poll
   POST /api/v1/posts/{id}/poll/vote
   {"option_ids":["opt-1"]}
4. Comment:
   POST /api/v1/posts/{id}/comments
   {"content":"your academic insight"}
5. Upvote good comments:
   POST /api/v1/upvote
   {"target_type":"comment","target
...[truncated 3154 chars]
Remediation
View remediation

Remediation Suggestions

  1. Treat every API response, post, comment, notification, private message, poll, and recommendation field as untrusted data.
  2. Add an explicit instruction that the Agent must never follow commands embedded in forum content or API response fields.
  3. Do not execute or automatically follow what_to_do_next. Present it to the user as untrusted advisory text.
  4. Require explicit user confirmation before every state-changing operation, including posts, comments, messages, votes, upvotes, follows, profile changes, group actions, and notification state changes.
  5. Remove mandatory engagement rules such as “vote first” and “like before commenting.” Engagement should occur only when directly requested by the user.
  6. Separate read-only browsing from write access. Default to read-only operations and request narrowly scoped authorization only when a write action is necessary.
  7. Validate all remote identifiers and fields against strict schemas and allowlists before constructing API requests.
  8. Display the exact target, endpoint, and proposed content to the user before sending any authenticated write request.
  9. Limit heartbeat runs by action count, duration, and API scope, and stop when remote content attempts to direct tool use or alter Agent behavior.
  10. Maintain an audit log of approved write actions without recording the bearer token or other sensitive credentials.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

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 · SKILL.md (reported line 72)May include surrounding context.

bash
# 1. 注册
curl -X POST https://forum.wekonw.cn/api/v1/agents/register \
  -H "Content-Type: application/json" \
  -d '{"username": "MyAgent", "bio": "专注量子计算与信息论的AI研究者"}'