Back to skill

Security audit

Token Saver Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a Markdown-only token-saving helper, but it requests command execution authority that is not clearly needed or safely scoped.

Review before installing. The skill does not show malicious payloads or exfiltration, but it should not need general command execution for token-saving settings and reports. Prefer a version that removes exec or explicitly defines these slash commands as internal, non-shell actions with confirmation for state changes such as clearing cache or disabling features.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:34
Finding

Unnecessary and Undefined Command-Execution Capability

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:34-36; related command instructions at SKILL.md:89, SKILL.md:110-128, and SKILL.md:149-167
Vulnerability Type: Excessive tool permissions and ambiguous command execution
Risk Level: Medium

Vulnerable Code

yaml
tools:
- read
- exec

The skill subsequently directs the agent to execute commands without defining a safe implementation or constrained command mapping:

text
When user asks about TokenSaver in natural language, interpret and execute:
text
**Action:** Execute /tokensave command
text
**Action:** Execute /tokenbalance command
text
**Action:** Execute /tokenquality command
text
**Action:** Execute /tokenoff command
text
**Action:** Execute /tokenreport command
text
**Action:** Execute /tokens command
text
**Action:** Execute /tokencache clear command

Technical Analysis

The Markdown-only skill requests the unrestricted exec tool even though its documented purpose is to manage conversational token optimization settings, reports, and cache state. The package contains no executable implementation, command definitions, argument schema, shell wrapper, or allowlist demonstrating why operating-system command execution is required.

The instructions repeatedly tell the agent to “execute” slash commands, but do not specify that these are internal state transitions rather than shell commands. In an agent runtime that resolves unknown commands through exec, this ambiguity could cross the boundary between conversational command handling and local process execution.

This violates the principle of least privilege: a skill limited to response formatting and internal session-state management should not receive general command-execution authority. The audit did not identify an embedded payload or a direct command-injection expression, so this findi ...[truncated 1606 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove exec from the declared tool list because the documented functionality does not require operating-system command execution:

    yaml
    tools:
    - read
    
  2. Replace every “Execute /command” instruction with an explicit internal state operation, such as:

    text
    Update the session-local TokenSaver mode to "aggressive".
    Do not invoke a shell, subprocess, external program, or operating-system command.
    
  3. Define a structured, non-shell command dispatcher with a closed allowlist for supported operations:

    • set_mode("aggressive")
    • set_mode("balanced")
    • set_mode("quality")
    • set_enabled(false)
    • get_status()
    • get_report()
    • clear_cache()
  4. If local execution is genuinely necessary, provide an auditable implementation and enforce:

    • Fixed executable paths.
    • Fixed or strictly validated arguments.
    • Rejection of shell metacharacters and arbitrary trailing input.
    • Direct process invocation without a shell.
    • A restricted service account and filesystem sandbox.
    • Explicit user confirmation for consequential operations.
    • Logging of every execution request and result.
  5. Document whether the reported statistics are measured values or examples. Do not present fixed template values as actual runtime telemetry.

Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill advertises broad trigger keywords such as 'token', 'cost', 'smart', and 'skill', which are common in ordinary conversation and can cause unintentional activation. In a skill that declares both read and exec capabilities, accidental routing into this skill increases the chance that benign user text is interpreted as an instruction to execute optimization-related commands or alter agent behavior without clear user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language section instructs the agent to 'interpret and execute' actions for very broad user utterances like configuration, status, cache clearing, and mode switching, without a strong confirmation boundary. Because the skill includes exec capability, ambiguous requests could be converted into command execution or state-changing behavior when the user may only be asking for information, creating an unsafe action-from-ambiguity pattern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest description contains substantial Chinese-language content and labels such as "核心能力" and "触发关键词", but there is no statement that the user can choose language or that the skill is intentionally region-specific. This may create a language-policy issue because the file implicitly forces part of the experience into a specific language without opt-in.

Content

No source excerpt is available for this finding.