Back to skill

Security audit

Skill Tracker

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent local skill-analytics tracker, but it needs review because it stores usage metadata and has an unvalidated file-write path that can escape its intended proposal folder.

Review before installing. Use it only if you are comfortable with local collection of skill usage, timing, success/failure, satisfaction, and caller-supplied metadata under ~/.openclaw/data/gungun. Avoid enabling cron until retention and cleanup expectations are clear. The proposal filename validation issue should be fixed before using this on shared or automation-heavy systems.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate-proposals.py:128
Finding

Telemetry-Controlled Path Traversal in Proposal Output

Content
View full analysis
= cutoff: all_scores.append(skill_data) except: continue ``` ```python skill_name = skill_data["skill"] ``` ```python proposal_file = PROPOSALS_DIR / "pending" / f"{skill_name}.json" proposal_file.write_text( json.dumps(proposal, indent=2, ensure_ascii=False), encoding="utf-8" ) ``` ### Technical Analysis The proposal generator reads the `skill` field from JSON files under `~/.openclaw/data/gungun/health-scores/` without validating its format. That value is subsequently incorporated directly into an output path. `pathlib.Path` does not prevent traversal through components such as `../`. An attacker who can modify a health-score file can therefore cause the resolved proposal path to escape the intended `proposals/pending` directory. Depending on the crafted value, the write may create or overwrite a JSON file elsewhere within the current user's writable filesystem. Although normal health snapshots derive Skill names from local directory entries, the proposal generator independently trusts every matching JSON file. A malicious local process, compromised Skill, or corrupted data file could inject a crafted record without passing through the normal health-score generation flow. ### Attack Path 1. The attacker obtains the ability to create or modify a JSON file in `~/.openclaw/data/gungun/health-scores/`. This could occur through another Skill operating under the same user account or another local process with access to that directory. 2. The attack ...[truncated 1538 chars]
Remediation
View remediation
str: if not isinstance(skill_name, str): raise ValueError("Skill name must be a string") if not SKILL_NAME_PATTERN.fullmatch(skill_name): raise ValueError("Invalid skill name") if skill_name in {".", ".."}: raise ValueError("Invalid skill name") return skill_name ``` 2. Resolve the final path and verify that it remains below the intended directory: ```python pending_dir = (PROPOSALS_DIR / "pending").resolve() pending_dir.mkdir(parents=True, exist_ok=True) safe_name = validate_skill_name(skill_name) proposal_file = (pending_dir / f"{safe_name}.json").resolve() if proposal_file.parent != pending_dir: raise ValueError("Proposal path escapes the pending directory") ``` 3. Validate the complete health-record schema before processing it, including the types and ranges of `skill`, `timestamp`, `total`, `scores`, and `stats`. 4. Use restrictive directory and file permissions where supported. Proposal and telemetry directories should not be writable by unrelated users. 5. Consider atomic writes through a temporary file created inside the destination directory, followed by `os.replace()`, to reduce corruption from interrupted or concurrent runs. 6. Log and reject malformed records instead of silently suppressing all exceptions with a bare `except`. ]]>

T08 · Insecure Dependencies

Note
Location
scripts/collect-usage.py:2
Finding

Unpinned Runtime Dependency Resolution

Content
View full analysis
=3.11" # dependencies = ["rich"] # /// ``` Affected files: - `scripts/collect-usage.py` - `scripts/calculate-health.py` - `scripts/generate-proposals.py` - `scripts/generate-report.py` ### Technical Analysis The inline script metadata specifies `rich` without a version constraint, lockfile, or package hash. The documented `uv run` workflow may therefore resolve and install whichever version is currently selected from the configured Python package index. This creates non-reproducible execution and increases exposure to supply-chain events, including: - A compromised future package release. - A malicious or compromised configured package index. - Unexpected behavioral or compatibility changes in a newer release. - Different dependency versions being installed across environments. The dependency name is legitimate and no evidence of current malicious behavior was found. The risk arises from unrestricted future resolution rather than from a confirmed malicious package. ### Attack Path 1. A malicious dependency release is published under the legitimate package name, or the user's configured package index is compromised. 2. The user invokes one of the documented commands, for example: ```bash uv run scripts/generate-report.py --generate ``` 3. Because no version or hash is fixed, `uv` resolves the dependency available through the configured index. 4. The dependency is installed into the execution environment and imported by the script: ```python from rich.console import Console ``` 5. Malicious package initialization code executes with the same privileg ...[truncated 580 chars]
Remediation
View remediation
=3.11,<3.13" # dependencies = ["rich=="] # /// ``` 2. Prefer a project-level dependency configuration with a committed `uv.lock` file so all installations resolve to reviewed versions. 3. Where deployment tooling supports it, verify package hashes and reject artifacts whose hashes do not match approved values. 4. Use an explicitly configured trusted package index rather than inheriting arbitrary user or environment index settings. 5. Add an automated dependency-update process that: - Proposes version changes explicitly. - Reviews release notes and transitive dependency changes. - Runs security scans and tests before updating the lockfile. - Prevents silent runtime upgrades. 6. Apply the same pinned dependency declaration consistently to all four affected scripts. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documented behavior and detected capabilities do not line up: the skill claims a broad tracking/health/reporting system, while the analyzed implementation appears narrower and includes local proposal-file writes without declared permissions. Description/behavior mismatches are dangerous because reviewers and users may trust the declared purpose while the actual code does something different, reducing informed consent and increasing the chance that risky side effects go unnoticed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file contains user-facing operational instructions exclusively in Chinese, including release steps and publishing commands, but does not provide an opt-in language choice or explain that the skill is intentionally region- or language-specific. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

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 content forces a specific language/locale for all users, and there is no indication of opt-in language selection or a region-specific justification. This matches the stated SQP-3 policy example for language or locale policy violations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README promotes automatic collection of skill usage, performance, and user satisfaction data but does not disclose what data is stored, where it is stored, how long it is retained, or whether personal/sensitive metadata may be captured. In a telemetry-style skill, this omission can lead to unintended collection of user-associated data and unsafe downstream handling because operators may enable tracking without informed consent or minimization controls.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents file-read/file-write behavior by storing usage logs, health scores, and proposals under ~/.openclaw/data/gungun/, but it declares no permissions or allowed-tools scope. That creates an undeclared capability boundary: operators may enable the skill without understanding it persists local data, which increases the risk of unintended filesystem access and makes review/auditing harder.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill advertises automatic logging of skill usage, success/failure, timing, metadata, and optional user satisfaction scores, but provides no privacy notice, retention policy, or minimization guidance. This is risky because operational telemetry can contain sensitive behavioral data or embedded personal information in metadata, and indefinite local retention increases exposure in the event of misuse or host compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script persistently logs skill usage, timestamps, success status, duration, satisfaction, and arbitrary metadata into local files under the user's home directory without any consent prompt, retention control, or warning at collection time. In an agent-skill context, the free-form metadata field can easily capture sensitive prompts, identifiers, or behavioral traces, creating a privacy and data-minimization risk if collected silently.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes the skill as automatically tracking usage, health scoring, and optimization suggestions. While generating suggestions fits that description, this script goes beyond analysis/display by persisting proposal records under ~/.openclaw/data/gungun/proposals, which is a state-changing file-writing behavior not conveyed by the manifest text.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The function creates directories and writes JSON proposal files under the user's home directory, but there is no confirmation prompt, docstring warning about persistent writes, or user-facing disclosure at the point of action. For a code file, file writes should have some visible warning unless clearly disclosed elsewhere in the skill description, which is not present in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring presents the skill entirely in Chinese, and the CLI description/help text elsewhere in the file also fixes the user-facing experience to Chinese. There is no indication that the skill is region-specific or that users can choose their preferred language, which creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README-opensource.md (reported line 175)May include surrounding context.

md
#!/bin/bash
# 滚滚技能追踪自动化脚本
# 添加到 crontab: crontab -e

# 技能追踪目录
SKILL_TRACKER_DIR="/home/admin/.openclaw/workspace/skills/skill-tracker/scripts"

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/setup-cron.sh (reported line 3)May include surrounding context.

sh
#!/bin/bash
# 滚滚技能追踪自动化脚本
# 添加到 crontab: crontab -e

# 技能追踪目录
SKILL_TRACKER_DIR="/home/admin/.openclaw/workspace/skills/skill-tracker/scripts"

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/setup-cron.sh (reported line 18)May include surrounding context.

sh
#!/bin/bash
# 滚滚技能追踪自动化脚本
# 添加到 crontab: crontab -e

# 技能追踪目录
SKILL_TRACKER_DIR="/home/admin/.openclaw/workspace/skills/skill-tracker/scripts"

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/setup-cron.sh (reported line 21)May include surrounding context.

sh
# 1. 编辑 crontab: crontab -e
# 2. 复制上面的行到 crontab 文件
# 3. 保存并退出
# 4. 验证:crontab -l

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The cron setup instructions create recurring jobs that will continuously read accumulated usage telemetry and generate outputs on disk, yet the README gives no warning about ongoing data access, storage growth, or report locations. This is risky because users may enable unattended processing of potentially sensitive operational data without realizing the persistence and visibility implications.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The natural-language content of the skill is entirely in Chinese, including the description, commands context, and operational guidance, with no indication that users may choose another language or that the skill is intentionally region-specific. Under the locale policy, forcing a specific language without opt-in can be a policy concern unless clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file includes natural-language strings that force a specific language/locale for the skill experience. The policy allows locale constraints only when users are given a choice or the regional limitation is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module description and CLI/help-facing text are written in Chinese only, which imposes a specific language on users without opt-in. Under the policy, language constraints should either be optional for the user or clearly documented as intentionally locale-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language description is entirely in Chinese, and the CLI help text and output strings throughout the file are also fixed to Chinese with no option to choose another language. The policy calls for flagging language or locale constraints when they are imposed without user opt-in or explicit justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The docstring says the function saves optimization proposals, and the status message later says they were saved to the pending directory. However, the code only creates PROPOSALS_DIR and then writes into PROPOSALS_DIR / "pending" without creating that subdirectory, so the documented intent can fail at runtime.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The manifest describes an AI agent skill tracking system focused on usage tracking, health scoring, and optimization advice. This file not only analyzes health data but also creates and persists report files under a workspace path, which is a broader reporting/output behavior not stated in the manifest description.

Content

No source excerpt is available for this finding.