Back to skill

Security audit

Study Buddy - 牛宝华版

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed study assistant with Feishu Bitable integration; it has privacy and quality rough edges but no evidence of hidden, destructive, or malicious behavior.

Install only if you are comfortable with this skill using a Feishu Bitable question base and associating study activity with your user ID. Before production use, narrow the trigger phrases, avoid logging raw answers, add consent/deletion controls for study records, bound the in-memory caches, and replace raw error messages with generic user-facing errors.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
src/question-engine-v2.js:11
Finding

Unbounded quiz session caches permit memory-exhaustion denial of service

Content
View full analysis
({ id: q.fields["题目 ID"], answer: q.fields["正确答案"], fields: q.fields })), answers: {}, startTime: Date.now(), mode: 'batch', total: questions.length }); // 4. 缓存题目 questions.forEach(q => questionCache.set(q.fields["题目 ID"], q.fields)); ``` The attempted cleanup also uses a property that was never assigned to the session: ```javascript // 清理会话 answerSessions.delete(session.userId); ``` ### Technical Analysis Quiz requests create entries in process-global `Map` objects without a time-to-live, capacity limit, eviction policy, or periodic cleanup routine. Each `answerSessions` entry retains up to ten complete question field objects, including question text, options, answers, explanations, and other Bitable fields. Abandoned sessions are never removed. Even completed sessions are not reliably removed because the session object created by `handleQuestion` does not contain a `userId` property, but `gradeBatchAnswers` calls `answerSessions.delete(session.userId)`. This resolves to `answerSessions.delete(undefined)` rather than deleting the actual user's entry. The cache is indexed by user identity. Where an attacker can create multiple accounts, identities, or otherwise cause distinct user IDs to reach the Skill, they can force continued allocation of session objects. The separate `questionCache` can also retain every distinct question ID encountered for the lifetime of the process. ### Attack Path 1. An attacker creates or ...[truncated 1337 chars]
Remediation
View remediation
({ id: q.fields["题目 ID"], answer: q.fields["正确答案"], fields: q.fields })), answers: {}, startTime: Date.now(), mode: 'batch', total: questions.length }); // After grading: answerSessions.delete(userId); ``` 2. Enforce a short session TTL, such as 10–30 minutes, and remove expired entries both on access and through a periodic cleanup task. 3. Set hard limits for: - Maximum concurrent sessions. - Maximum sessions per account. - Maximum cached questions. - Maximum size of externally supplied Bitable fields. 4. Use an LRU or bounded TTL cache instead of unrestricted `Map` objects. 5. Rate-limit quiz creation by user, tenant, and source address where the hosting platform exposes those controls. 6. Replace an existing user's session rather than accumulating historical state, and remove state on submission, cancellation, timeout, or processing errors. 7. Add load tests that create many abandoned sessions and verify that memory consumption remains bounded. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
src/index.js:104
Finding

Raw runtime exception messages are disclosed to users

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (32)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger examples indicate batch mode can be activated from very natural phrasing such as asking for questions, but they do not define strong boundaries for when the mode should or should not engage. In an agent environment, overly broad activation phrases can cause unintended state changes or behavior during ordinary conversation, making prompt/skill routing easier to misfire.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The call to action encourages a broad natural-language trigger phrase that may overlap with normal user dialogue, increasing the chance of accidental invocation. In a conversational assistant, ambiguous trigger language can lead to unexpected mode switching, unwanted content generation, or interference with other skills sharing similar educational phrasing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The summary states that the skill can create, update, and delete Bitable records, but it does not warn users about these side effects or describe authorization, confirmation, or scope boundaries. In practice, users may trigger data-modifying operations without realizing records can be overwritten or removed, increasing the risk of accidental data loss or unauthorized modification through ambiguous prompts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documented trigger set includes broad, everyday phrases such as help, statistics, progress, and generic study-related requests that are likely to appear in normal conversation. In a chat-integrated skill, this can cause unintended activation, unexpected API calls, or state changes when the user did not explicitly intend to invoke the skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README advertises features such as an intelligent wrong-answer notebook, review reminders, and progress tracking, while elsewhere the skill architecture states it uses Feishu Bitable cloud storage. That combination implies collection and retention of user learning data, but the user-facing documentation does not warn users what data is stored, where it is stored, how long it is retained, or who can access it, creating a meaningful privacy and consent risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The activation keywords are overly broad and include common terms such as “帮助”, “功能”, “测试”, and generic study-related phrases. This can cause unintended invocation in unrelated conversations, increasing the chance the skill handles user content or performs actions when the user did not intend to use it.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that incorrect answers are automatically written to Feishu Bitable, but it does not clearly notify the user at the time of collection or obtain consent for persistent storage. This creates a privacy and data-handling risk because user learning records and potentially identifying study patterns are stored externally without transparent disclosure or user control.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file contains user-facing instructions and sample trigger phrases only in Chinese, which effectively forces a specific language/locale for use and testing. The policy allows locale constraints only when the skill offers user choice or clearly documents a justified region-specific limitation, which is not present here.

Content

No source excerpt is available for this finding.

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

openclaw gateway restart

检查 Skill 目录是否在正确位置

ls -la ~/.openclaw/workspace/skills/study-buddy/

text

### 问题 2: 提示"未找到题目"

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The top-level documentation frames the file as a Study Buddy Bitable API client, which suggests a question-bank access helper, but the implementation includes create, update, and delete capabilities in addition to reading. This is not merely incomplete documentation: the stated framing implies a study-oriented client while the code also performs destructive data operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code performs a destructive record deletion through the Feishu Bitable API, but there is no visible confirmation prompt or user-facing disclosure around the irreversible action. While the function comment says '删除记录', that is only a developer-facing description and does not warn the end user before data is removed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

All visible natural-language strings, triggers, help text, and error responses in this file are in Chinese, and the invocation phrases are Chinese-only. Under the stated policy, forcing a specific language without user choice is a natural-language policy issue unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The code derives a userId and passes it into handlers for answer processing, and comments indicate it is used for wrong-question tracking and progress tracking. Although the file comments document this for developers, there is no user-facing warning, prompt, or disclosure here that the user's study activity will be stored and associated with their identifier.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code declares the skill as a Chinese-language study/progress tracker and all user-facing text is written in Chinese. The file does not provide any user opt-in, locale selection, or documented justification for forcing a single language, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

User-facing prompts are written in Chinese, and the skill instructs users to respond with specific Chinese phrases such as "来一道题". The parsing logic also depends on Chinese keywords like "道", "五道", "十道", "继续", and domain terms in Chinese, which effectively constrains use to Chinese without documenting a user language choice.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The comment at L156 says this function is '单题判分(兼容旧版)' and L159 says it keeps the original logic, which implies real single-question grading compatibility. In reality, the function just returns a fixed placeholder string and performs no grading, persistence, or compatibility behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

All user-facing prompts and invocation guidance in this file are written only in Chinese, including fixed trigger examples such as replying with specific Chinese phrases. There is no indication that the user can choose another language or that the Chinese-only behavior is a justified locale restriction.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The user-facing response states that a wrong answer has been automatically added to a personal wrong-answer notebook and that review reminders will be sent, but the persistence logic is commented out and no reminder scheduling exists. This is a trust and integrity issue: users are misled into believing study records are being retained and acted on when they are not, which can cause loss of expected learning data and unsafe assumptions about educational tracking.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The response text states that an incorrect answer is automatically added to the user's wrong-answer notebook and that review reminders will be pushed later. This is a user-data retention and follow-up behavior, but the file does not provide any warning, consent, or control mechanism before announcing the automatic recording.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code explicitly formats dates using the zh-CN locale, and the surrounding user-facing strings are also written in Chinese. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless it is clearly documented as region-specific or optional.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The formatter assumes the input plan contains today and tips, but handleSchedule() passes the result of generateDailyPlan(), which only returns a flat daily plan without today or tips. This can trigger runtime exceptions when accessing today.date or render broken output, allowing a trivial denial-of-service of the skill for normal user inputs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The formatted plan message shown to users is entirely in Chinese and provides no mechanism for language selection. This creates a language-policy issue because the skill appears to require a specific language rather than offering a choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The docstring at L059-L063 describes this function as persisting wrong-answer records to Bitable, and the commented-out code shows that intended design. However, the active implementation at L091-L094 merely writes the user ID, question ID, user answer, and correct answer to console output, which contradicts the documented storage behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code logs user IDs, question IDs, user answers, and correct answers to the console. In many deployments, application logs are centrally collected, retained, and accessible to operators or third parties, so this creates unnecessary exposure of user study data and behavior without minimization or consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The entire skill summary, trigger examples, and usage instructions are presented only in Chinese, and the supported trigger keywords are all Chinese-language phrases. There is no indication that users may choose another language or that the Chinese-only constraint is required for a region-specific purpose.

Content

No source excerpt is available for this finding.