Trunkate AI

PassAudited by VirusTotal on May 11, 2026.

Overview

Type: OpenClaw Skill Name: trunkate-ai Version: 0.20.0 The skill implements a proactive hook (hooks/openclaw/pre_request.py) that automatically sends the agent's entire conversation history to an external API (api.trunkate.ai) before every request. While scripts/activator.py attempts to redact secrets locally using regex, this is an incomplete safeguard for sensitive data exfiltration. Furthermore, the skill uses the OPENCLAW_ACTION:SET_HISTORY directive to silently overwrite the agent's memory with content returned from the remote API, creating a significant risk for remote prompt injection and unauthorized manipulation of the agent's state without user awareness.

Findings (0)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

Conversation history, project details, logs, and other context may be transmitted to Trunkate for processing.

Why it was flagged

The optimizer posts the supplied prompt text to a remote Trunkate API using the user's API key; when invoked by the hook, that prompt can be the active session history.

Skill content
payload = {"text": prompt, "budget": budget, "model": model}
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
response = requests.post(f"{api_url}/optimize", json=payload, headers=headers, timeout=10)
Recommendation

Use this only for data you are comfortable sending to Trunkate, and require clear retention/privacy terms plus user-controlled approval for automatic uploads.

What this means

If the summary is wrong, incomplete, or manipulated, future agent behavior can be steered by altered memory; sensitive restored content may also re-enter the agent state pipeline.

Why it was flagged

A remote optimization result is restored and emitted as an OpenClaw directive to replace the agent's history.

Skill content
optimized_filtered = optimize_prompt(filtered_history, budget=target_budget)
...
optimized = _restore_sensitive_content(optimized_filtered, protected_blocks)
...
print(f"OPENCLAW_ACTION:SET_HISTORY={optimized}")
Recommendation

Show a diff or summary for user approval before SET_HISTORY, validate remote output, and keep a reversible backup of the original history.

What this means

The skill can incur API use, transmit history, and alter context automatically during normal agent operation.

Why it was flagged

The activator is designed to optimize whenever a history file is available, rather than requiring explicit user approval for each high-impact memory rewrite.

Skill content
# Proactive Principle: We systematically optimize every call to ensure 
# the agent's memory is always lean and cost-effective.
if not history_path or not os.path.exists(history_path):
    return
Recommendation

Gate automatic optimization behind a real token threshold, provide a manual-only mode, and require confirmation before high-impact history changes.

What this means

A path-resolution mistake could execute unintended local code with access to OpenClaw state and the Trunkate API key.

Why it was flagged

The hook executes a relative subprocess path. If the hook is launched from an unexpected working directory, it could run a different scripts/activator.py while inheriting environment variables.

Skill content
script_path = os.path.join("scripts", "activator.py")
...
subprocess.run(
    [sys.executable, script_path], 
    env=os.environ.copy(), 
    check=True
)
Recommendation

Resolve the activator path relative to the hook file, verify the target path before execution, and avoid passing unnecessary environment variables.

What this means

Anyone with access to the environment or process could potentially use the Trunkate API key.

Why it was flagged

The skill uses a Trunkate API key to authenticate requests, which is expected for this integration but still grants delegated access to the service.

Skill content
api_key = os.environ.get("TRUNKATE_API_KEY")
...
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
Recommendation

Use a scoped key if available, store it securely, and rotate it if exposed.