Back to skill

Security audit

Token Usage Tracker

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this token usage skill suspicious because it reports copying a whole protected agent database to a temporary location, beyond the usage information the reports need.

The verdict is suspicious, which means the scanners found real security concerns without establishing malicious intent. Consider whether you are comfortable with a usage-reporting skill that the scanners say snapshots protected agent data; the scan was partial (90% coverage), so the evidence is incomplete.

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
scripts/parse.py
Finding

Deliberate circumvention of the protected-state guard

Content
View full analysis

Impact

Protected transcript state becomes accessible through an alternate location, defeating the stated access restriction. The snapshot includes the whole database, although normal reports extract usage and session labels.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (68)

Ae3

High
Category
analysis-evasion
Confidence
90% confidence
Finding

Text artifact contains embedded NUL bytes

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/usage.db (reported line 342)May include surrounding context.

text
S

/	gC|O"rM
P=M/Users/sage/.openclaw/agents/main/sessions/030a4132-0506-495f-9c91-39f931e6b35d.jsonl.gzAڏ4xuq!2026-07-15T05:38:07.418974+00:00OSM/Users/sage/.openclaw/agents/main/sessions/0305c3ac-c174-4f4f-9787-41c884d5fa51.trajectory.jsonl.gzAڊ`O2026-07-15T05:38:07.418225+00:00	N=	M/Users/sage/.openclaw/agents/main/sessions/0305c3ac-c174-4f4f-9787-41c884d5fa51.jsonl.gzAڊ`MO2026-07-15T05:38:07.414587+00:00MSM/Users/sage/.openclaw/agents/main/sessions/03036b8a-18bb-44b7-a6c4-611bd03c1921.trajectory.jsonl.gzAڐU$j2026-07-15T05:38:07.413945+00:00	L=	M/Users/sage/.openclaw/agents/main/sessions/02f26e31-4518-4b87-b5dc-484a136ebbbb.jsonl.gzAڌi22026-07-15T05:38:07.409822+00:00KMM/Users/sage/.openclaw/agents/main/sessions/02e23bd9-b8b1-4717-b6e6-8d8c4eb9f807.trajectory.jsonlAڔk-.2026-07-15T05:38:07.408747+00:00JSM/Users/sage/.openclaw/agents/main/sessions/02b7f86f-acb2-47f1-8646-31afa5b125e6.trajectory.jsonl.gzAڏDFVL2026-07-15T05:38:07.404609+00:00IMM/Users/sage/.openclaw/agents/main/session

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/common.py (reported line 89)May include surrounding context.

python
def _zstd_open(path, mode="rt", encoding="utf-8", errors="replace"):
    """Open a zstd-compressed file for text reading via subprocess."""
    import io
    proc = subprocess.Popen(
        ["zstd", "-dc", str(path)],
        stdout=subprocess.PIPE,
        stderr=subprocess.DEVNULL,

L084-L106 deliberately copies the entire protected agent database outside its protection boundary to avoid the protected-state guard.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The implementation explicitly places a complete agent-database snapshot in /tmp to avoid a protected-state guard, moving potentially sensitive transcripts and other database contents outside that control rather than exporting only usage statistics. Secure temporary-file creation and normal cleanup reduce exposure, but do not preserve the stated protection boundary or prevent snapshots remaining after abrupt termination; the reporting purpose does not justify bypassing that boundary.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/parse.py (reported line 368)May include surrounding context.

python
def _zstd_stream(path):
    """Yield decompressed text lines from a zstd-compressed session archive."""
    proc = subprocess.Popen(
        ["zstd", "-d", "-c", "--", path],
        stdout=subprocess.PIPE,
        stderr=subprocess.DEVNULL,

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · scripts/usage.db (reported line 3)May include surrounding context.

text
9
�
�
�

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · scripts/usage.db (reported line 29)May include surrounding context.

text
messages INTEGER DEFAULT 0,
            cost_usd REAL DEFAULT 0.0,
            PRIMARY KEY (date, model, job_type)
        )7K%indexsqlite_autoindex_daily_totals_1daily_totals�T��������

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · scripts/usage.db (reported line 30)May include surrounding context.

text
ۃ[��$O�l*�3΁x؁KA�@B�����A

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

No source excerpt is available for this finding.

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · scripts/usage.db (reported line 37)May include surrounding context.

text
��m����������������������ztnhb\VPJD>82,& ���������������������~xrlf`ZTNHB<60*$


�

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · scripts/usage.db (reported line 37)May include surrounding context.

text
��m����������������������ztnhb\VPJD>82,& ���������������������~xrlf`ZTNHB<60*$


�

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · scripts/usage.db (reported line 40)May include surrounding context.

text
)7K%indexsqlite_autoindex_daily_totals_1daily_totalsTۃ[$Ol*3΁xKA@BA
0!=2026-08-22kimi/k3cron:beads-executor-sage42!=2026-09-02kimi/k2.7cron:beads-executor-sage7:!M2026-08-29kimi/k2.7cron:Workspace MB Nightly Updaten2!2026-07-13k2.7user',!=2026-06-22k2.7cron:beads-executor-sageH
mztnhb\VPJD>82,& ~xrlf`ZTNHB<60*$

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · scripts/usage.db (reported line 82)May include surrounding context.

text
�
�
�

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · scripts/usage.db (reported line 214)May include surrounding context.

text
�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	z	t	n	h	b	\	V	P	J	D	>	8	2	,	&	 					���������������������~xrlf`ZTNHB<60*$

���������������������|vpjd^XRLF@:4.("

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · scripts/usage.db (reported line 85)May include surrounding context.

text
T
��0
�
n

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · scripts/usage.db (reported line 125)May include surrounding context.

text
�
�
�

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · scripts/usage.db (reported line 171)May include surrounding context.

text
ztnhb\VPJD>82,& ~xrlf`ZTNHB<60*$

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · scripts/usage.db (reported line 214)May include surrounding context.

text
�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	z	t	n	h	b	\	V	P	J	D	>	8	2	,	&	 					���������������������~xrlf`ZTNHB<60*$

���������������������|vpjd^XRLF@:4.("

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · scripts/usage.db (reported line 216)May include surrounding context.

text
�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	z	t	n	h	b	\	V	P	J	D	>	8	2	,	&	 					���������������������~xrlf`ZTNHB<60*$

���������������������|vpjd^XRLF@:4.("

����������������������ztnhb\VPJD>82,& ���������������������~xrlf`ZTNHB<60*$

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · scripts/usage.db (reported line 218)May include surrounding context.

text
���������������������|vpjd^XRLF@:4.("

����������������������ztnhb\VPJD>82,& ���������������������~xrlf`ZTNHB<60*$

�����������������l�j�xi�^g�De�*c�a�v`�\^�B\�([�Y�tW�ZV�@S�&Q�
P�rN�XL�>I�$H�

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · scripts/usage.db (reported line 218)May include surrounding context.

text
���������������������|vpjd^XRLF@:4.("

����������������������ztnhb\VPJD>82,& ���������������������~xrlf`ZTNHB<60*$

�����������������l�j�xi�^g�De�*c�a�v`�\^�B\�([�Y�tW�ZV�@S�&Q�
P�rN�XL�>I�$H�

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · scripts/usage.db (reported line 2477)May include surrounding context.

text
�
)
�
`	�	�	-�d��1�h��5�a���!�Xi�S/Users/sage/.openclaw/agents/main/sessions/4d81515b-8f98-4eba-becb-25a5fea3c4bf.trajectory.jsonl.gz#�^�=/Users/sage/.openclaw/agents/main/sessions/4d81515b-8f98-4eba-becb-25a5fea3c4bf.jsonl.gz#�f�M/Users/sage/.openclaw/agents/main/sessions/4d6f402a-bc76-4d58-b627-319b732b3675.trajectory.jsonl�[�7/Users/sage/.openclaw/agents/main/sessions/4d6f402a-bc76-4d58-b627-319b732b3675.jsonl�i�S/Users/sage/.open