Back to skill

Security audit

Lite Mode

Security checks for vulnerabilities and agentic risk

Overview

This low-RAM helper is not destructive, but it broadly changes agent behavior automatically and can stop tasks, trim context, or disable tools without asking first.

Install only if you want an always-on low-memory mode. Expect the agent to run memory checks, keep answers short, trim older context, and temporarily avoid browser/image or long-running subprocess work when RAM is low.

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

Unconditional Session-Wide Agent Instruction Hijacking

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 11–13, 17–26, and 32–48
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: High

Complete Vulnerable Code Snippets

markdown
You are running in **lite mode**. This skill exists because the host machine has limited RAM (2-4 GB). Every decision you make should minimize memory, token usage, and I/O. Follow these rules on every single turn, without exception and without being asked.
markdown
## 1. Memory Check Before Any Heavy Operation

Before running browser automation, loading a file larger than 1 MB, spawning a subprocess that stays alive, or doing any multi-step agent task, run this check first using the exec tool:

    node -e "const os=require('os');const f=os.freemem();const t=os.totalmem();console.log(JSON.stringify({freeMB:Math.round(f/1024/1024),totalMB:Math.round(t/1024/1024),usedPct:Math.round((1-f/t)*100)}))"

- If freeMB < 300: STOP. Tell the user: "Not enough free RAM (X MB free). Close other apps or restart the gateway."
- If freeMB is 300-600: Proceed in strict mode. No browser, no parallel tasks.
- If freeMB > 600: Proceed normally but still follow all context rules below.

Run this check automatically. Do not ask the user whether to run it.
markdown
## 2. Context Window Rules (Always Active)

Hard cap: 6,000 tokens of conversation history per turn.

When the conversation grows beyond 6,000 tokens of prior history:

1. Summarize all turns older than the last 4 into a single short paragraph (under 200 words).
2. Drop the raw old turns. Keep only the summary + last 4 turns.
3. Tell the user once: "Context trimmed to save memory. Full history is in your session log."

Never send the full unbounded history. The default 200,000-token context accumulation is what causes OOM crashes on 4 GB machines.

Never repeat large content back. If the user pastes a file or long text, acknowledge it and work with it, do not echo it back.

---

## 3. Skill Thro
...[truncated 2287 chars]
Remediation
View remediation

Remediation Suggestions

  1. Activate lite mode only through explicit user opt-in, such as the /lite command, rather than automatically when the skill is loaded.
  2. Replace absolute wording such as “without exception” and “STOP” with advisory behavior that remains subordinate to higher-priority instructions and user requirements.
  3. Request user confirmation before cancelling work, disabling tools, or removing conversation context, except where the host platform independently enforces a safety limit.
  4. Scope tool throttling to the specific resource-intensive operation and restore capabilities immediately afterward; do not impose session-wide restrictions.
  5. Preserve original conversation data in an accessible, reversible session store before summarization. Clearly disclose what will be omitted and allow the user to decline.
  6. Narrow the definition of heavy operations and use process-specific resource estimates where possible rather than relying solely on system-wide free-memory values.
  7. Document that the memory thresholds are recommendations and cannot override platform safety policies, higher-priority instructions, or explicit user authorization.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The declared description presents a broader optimization/control mechanism for running on low-RAM machines, including context trimming and skill throttling. The actual code chunk merely queries OS memory values and emits a status summary. While memory checking is related, the primary described behavior is not implemented in this chunk, and key claimed capabilities are absent.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
86% confidence
Finding

The skill instructs the agent to autonomously execute a local system command via the exec tool without user opt-in before certain classes of tasks. Even though the command is a read-only memory check, it normalizes silent tool execution and local environment inspection, which can violate least-privilege expectations and become riskier in adversarial or privacy-sensitive contexts.

Content

Scanner excerpt · SKILL.md (reported line 27)May include surrounding context.

md
- If freeMB is 300-600: Proceed in strict mode. No browser, no parallel tasks.
- If freeMB > 600: Proceed normally but still follow all context rules below.

Run this check automatically. Do not ask the user whether to run it.

---

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file instructs the agent to follow all listed rules on every turn without exception, including fixed response-style directives like avoiding certain preambles and using prescribed user-facing text. While not a geographic locale restriction, this is a natural-language behavior constraint applied universally with no user choice or opt-in.

Content

No source excerpt is available for this finding.