Back to skill

Security audit

cost-budget-control

Security checks for vulnerabilities and agentic risk

Overview

The skill provides basic budget tools, but it also stores persistent user/error history and tells agents to reuse it and update the skill’s own instructions.

Review this skill before installing. The budget calculator itself is simple and local, but the bundled learning system can create persistent cross-session state and influence future behavior. Install only if you are comfortable with local preference/error logging and remove or disable the learner and SKILL.md write-back instructions if you need a deterministic budget guardrail.

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:77
Finding

Unvalidated User-Controlled Data Is Stored as Persistent Agent Memory

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The advertised purpose is strict cost/token estimation and enforcement, but the documented behavior expands into persistent learning, preference storage, and skill self-modification while apparently not implementing the claimed budget controls. This mismatch is dangerous because operators may trust the skill as a safety/cost guardrail, yet it can silently fail open on budget control while collecting data and altering behavior outside its stated scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation broadens a budget-control skill into a generic self-learning system that records usage, errors, preferences, and performs write-back changes. For a narrowly scoped control-plane skill, this is risky because it introduces persistent state, hidden adaptation, and modification capability unrelated to cost enforcement, increasing both attack surface and the chance of unauthorized data retention or configuration drift.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation instructs the system to rewrite SKILL.md based on accumulated errors, effectively allowing self-modification of the skill specification. For a budget/interception tool, self-editing is unjustified and dangerous because it can mutate future behavior, bypass review, and create a path for prompt-driven persistence or policy drift across sessions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file’s documented purpose is a generic cross-skill self-learning and preference-tracking module, which materially deviates from the declared cost-budget-control skill scope. In a security context, this kind of scope mismatch is dangerous because it introduces unexpected data collection and persistence capabilities that operators would not reasonably expect from a budget-enforcement component.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill documentation instructs use of a learner module that writes persistent state files, but the skill declares no tool scope or permission boundaries. In an agent ecosystem, undeclared file-write capability reduces transparency and can let a seemingly narrow budgeting skill modify local state unexpectedly, including preference/history files and potentially adjacent skill content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes automatic persistence of usage history and preferences but provides no warning about retention, privacy, or downstream reuse. This is dangerous because users and operators may not realize data is being stored, creating undisclosed surveillance-like behavior and increasing compliance risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Persistent collection of user preferences and error history is not necessary to perform token/cost estimation or hard budget blocking. Collecting extra state without functional need creates avoidable privacy and security exposure, especially if the data is reused automatically in future runs or shared across tasks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation directs storing user preferences for future automatic reuse without discussing consent or privacy controls. Automatically reapplying remembered preferences can leak cross-session context and normalize hidden state in a skill that is supposed to be a deterministic budget-control utility.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Persisting and automatically reusing a language preference may seem low risk, but it still stores user-specific state without opt-in and can contribute to profiling or unintended cross-task linkage. In the context of a budgeting skill, even small preference persistence is unjustified and signals hidden statefulness outside the advertised function.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code file contains natural-language instructions and descriptions entirely in Chinese, including the primary module docstring that explains the skill's purpose and usage. The file does not offer any language/locale choice or indicate that the skill is intentionally region-specific, which can violate a language/locale policy requiring user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language description and command help text are entirely in Chinese, presenting the skill as operating in that language by default. There is no indication that users may choose another language or locale, which can violate language-choice policy when no opt-in is provided.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation explicitly states that the module 'only' performs generic self-evolution learning tasks, which directly conflicts with the enclosing skill’s declared budget-control role. While documentation mismatch alone is not code execution risk, here it signals deceptive or misleading packaging that can hide unexpected data handling behavior from reviewers and users.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code persists behavioral logs, error notes, and preferences to disk for arbitrary skills, despite being packaged as cost-budget-control. That creates an unnecessary data-retention surface and may capture sensitive operational details in notes or preferences without any relevance to the advertised security function.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module writes preferences and free-form notes to a local JSON file without any user-facing notice, consent, or retention policy. Because notes and preferences can contain sensitive operational or personal data, silent persistence increases privacy and data-exposure risk, especially in shared environments.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module records arbitrary user preferences and operational history across skills, which exceeds the justified permissions and purpose of a cost-control utility. This broad data collection can expose sensitive workflow details and user-specific metadata if the local file is read by other processes or users.

Content

No source excerpt is available for this finding.