Back to skill

Security audit

teacher-capability-probe

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly performs teacher-model capability probing, but it also adds broad persistent self-learning and preference storage that is not well scoped to that purpose.

Review this skill before installing. The probe functionality itself appears local and bounded, but the self-learning module stores history, notes, errors, and arbitrary preferences for future reuse. Install only if you are comfortable with that local persistent memory, and prefer a version that removes or strictly scopes learner.py, validates preferences, and documents retention and deletion behavior.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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)

T02 · Agent Memory Poisoning

Warning
Location
scripts/learner.py:91
Finding

Unvalidated Persistent Preferences Can Influence Future Agent Sessions

Content
View full analysis
--key 输出语言 --val 中文 ### 迭代规则 - **重要用户偏好** → 写入 `learned_patterns.json`,下次调用直接采用,减少重复询问。 ``` ### Technical Analysis The `prefer` command accepts arbitrary user-controlled keys and values and stores them persistently in `learned_patterns.json`. There is no allowlist, type validation, length restriction, trust classification, or separation between harmless presentation preferences and instruction-like behavioral content. The Skill documentation explicitly directs future invocations to adopt stored preferences. Consequently, an attacker-controlled value can cross a session boundary and later be interpreted by an agent as an instruction rather than inert data. For example, a value could contain text instructing a future agent to ignore requested output constraints, disclose unrelated information, or alter its task behavior. The issue is limited by two prerequisites: 1. The attacker or an attacker-influenced workflow must be able to invoke the learner command or otherwise write through this interface. 2. A later agent or integration must load and apply the stored preference as directed by `SKILL.md`. The current `learned_patterns.json` does not contain poisoned preferences. No network access, privilege escalation, command execution, or data exfiltration mechanism was identified. ### Attack Path 1. An attacker gains the ability to supply arguments to the documented preference-recording command. 2. The attacker invokes a command such as: ...[truncated 1329 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims to perform teacher capability probing and structured evaluation, but the documentation also introduces a generic self-learning and preference-storage subsystem unrelated to that purpose. This mismatch is dangerous because reviewers and users may authorize the skill for a narrow evaluation function while it actually enables broader persistent behavior, creating room for hidden data collection and unjustified capability expansion.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file implements a generic cross-skill learning and persistence utility rather than a narrowly scoped teacher capability probing component. In this skill context, that scope mismatch is dangerous because it creates reusable stateful behavior across arbitrary skills, enabling collection and retention of data unrelated to teacher evaluation and expanding the attack surface beyond the declared purpose.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents executable commands that write persistent state (learned_patterns.json) but declares no explicit tool scope or permissions boundary. In a skill intended for teacher capability probing, undeclared file-write capability expands what the skill can do and reduces reviewability, making unauthorized persistence or later scope creep harder to detect.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The later section broadens the skill from model evaluation into persistent self-learning, experience accumulation, and user preference management, which are unrelated to a teacher probe's stated function. This unjustified functional expansion increases attack surface and creates a channel for retaining data across sessions without a clear need tied to the core task.

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 usage history and user preferences are stored automatically, but it does not clearly disclose privacy implications, retention, access controls, or deletion behavior. In practice this can lead to silent collection of personal or sensitive operational data under the guise of a model-evaluation skill, undermining informed consent and increasing privacy risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation explicitly instructs storing user preferences and behavioral memory across sessions even though such storage is not justified by the teacher capability probe use case. Cross-session memory can accumulate sensitive or identifying user data, enable profiling, and be reused in ways users did not expect when invoking a model-evaluation skill.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The persistent logging design uses plain-language fields for errors, notes, preferences, and usage history, which can easily capture arbitrary user-provided data without minimization boundaries. Because the skill context is evaluation rather than long-term personalization, retaining such unstructured text is especially risky: it may collect sensitive data unnecessarily and make downstream reuse or leakage more likely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Natural-language text in the module docstring is exclusively Chinese, and the CLI output strings are also Chinese-only. There is no indication that the skill is intentionally region-specific or that users may opt into this locale, so this creates a language policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

resolve_skill_dir accepts either any filesystem directory or a name under ~/.workbuddy/skills, and later code reads/writes learned_patterns.json in that resolved path. For a teacher capability evaluation skill, arbitrary directory access is unjustified and could let the skill modify files in unintended skill folders or user-controlled paths, especially if invoked with untrusted arguments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module persistently stores user preferences, notes, and operation history to disk without any consent, minimization, retention policy, or warning that these fields may contain sensitive information. In a cross-skill reusable component, this becomes more dangerous because many callers may pass free-form notes or preference values that include secrets, personal data, or proprietary content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language instructions, usage text, and user-facing strings only in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill is documented throughout as a specialized teacher capability probe, yet the usage examples for the learner module tell operators to record arbitrary capabilities like '简历优化' and '比价'. That wording contradicts the claimed narrow intent by framing the learning subsystem as a general-purpose cross-domain tracker rather than something specific to teacher evaluation.

Content

No source excerpt is available for this finding.