Back to skill

Security audit

Nex Skillmon

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent local skill-monitoring tool, but its privacy controls and filesystem boundaries are weaker than its documentation claims.

Review this before installing if your installed skill names, skill paths, usage data, or local configuration values are sensitive. Avoid running update/check commands unless you accept outbound requests to api.clawhub.dev, do not put secrets in this tool's config, and be cautious on shared machines or when scanning skill directories containing symlinks.

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

T09 · Insecure Skill Coding Practices

Warning
Location
nex-skillmon.py:260
Finding

Integrity checks compare files against a newly generated baseline and omit hidden files

Content
View full analysis
List[Dict[str, Any]]: """Scan the skills directory for installed skills.""" skills = [] if not self.base_dir.exists(): logger.warning(f"Skills directory does not exist: {self.base_dir}") return skills # Find all SKILL.md files skill_md_files = list(self.base_dir.glob("*/SKILL.md")) for skill_md in skill_md_files: skill_dir = skill_md.parent skill_info = self._parse_skill_metadata(skill_md) if skill_info: skill_info["skill_path"] = str(skill_dir) skill_info["file_hash"] = self._calculate_directory_hash(skill_dir) skill_info["install_date"] = self._get_install_date(skill_dir) ``` That newly calculated hash is then passed immediately to `verify_file_integrity()` as the purported stored baseline: ```python else: skill_list = scanner.scan_installed_skills() for skill in skill_list: print(f"Checking {skill['name']}...") # Check updates updates = scanner.check_for_updates( skill["name"], skill.get("version", "unknown") ) # Check security security = scanner.check_security_flags(skill["name"]) # Check integrity integrity = scanner.verify_file_integrity( skill["skill_path"], skill.get("file_hash") ) if not integrity["integrity_ok"]: print(f" ✗ INTEGRITY CHANGED") ``` Consequently, the common `nex-skillmon check` workflow compares the current directory hash with the same current directory hash. Modifications made after an earlier scan are not detected. The hashing implementation al ...[truncated 1981 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
lib/scanner.py:101
Finding

Directory hashing follows symlinks outside the configured skill directory

Content
View full analysis
str: """Calculate SHA256 hash of directory contents.""" hasher = hashlib.sha256() for file_path in sorted(directory.rglob("*")): if file_path.is_file() and not file_path.name.startswith("."): try: with open(file_path, "rb") as f: hasher.update(f.read()) except Exception as e: logger.warning(f"Could not hash {file_path}: {e}") return hasher.hexdigest() ``` For a symlink to a regular file, `Path.is_file()` follows the link, and `open()` reads the target. A skill is therefore able to make the scanner read files outside the configured `SKILLS_BASE_DIR`. Reading skill contents is necessary for integrity monitoring, but reading arbitrary external targets is not. This exceeds the minimum filesystem scope required for the declared functionality. The contents are reduced to a SHA-256 digest and are not directly transmitted by this code. Nevertheless, the digest is stored in the database and included in JSON exports. This creates a limited file-content oracle and can also force the process to read very large external files, resulting in memory or processing exhaustion because `f.read()` loads each complete file into memory. ### Attack Path 1. An attacker supplies or modifies an installed skill. 2. The skill directory contains a non-hidden symbolic link, for example `probe`, pointing to a file elsewhere in the user's home directory. 3. The user invokes `scan`, `check`, or `updates`, all of which can scan installed skil ...[truncated 943 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
lib/config.py:18
Finding

Documented ClawHub opt-out is ineffective and installed skill names are still disclosed

Content
View full analysis
Dict[str, Any]: """Check if newer version exists on ClawHub.""" try: url = f"{CLAWHUB_API_URL}/skills/{skill_name}/latest" response = urlopen(url, timeout=API_TIMEOUT_SECONDS) data = json.loads(response.read().decode()) ``` ```python def check_security_flags(self, skill_name: str) -> Dict[str, Any]: """Check if skill has been flagged on ClawHub.""" try: url = f"{CLAWHUB_API_URL}/skills/{skill_name}/flags" response = urlopen(url, timeout=API_TIMEOUT_SECONDS) data = json.loads(response.read().decode()) ``` No credentials, usage logs, file contents, or hashes are sent by these requests. However, each requested URL discloses an installed skill name along with ordinary network metadata such as source IP address and request timing. This disclosure is related to the update and vulnerability-checking feature, but it occurs despite the documented opt-out mechanism. ### Attack Path 1. A privacy-conscious user sets `CLAWHUB_API_URL=""` as document ...[truncated 813 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
setup.sh:47
Finding

Local monitoring data is created without restrictive filesystem permissions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (13)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 83)May include surrounding context.

├── skillmon.db # SQLite database ├── logs/ │ └── nex-skillmon.log # Application logs └── .env # Configuration (optional)

text

## Usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · lib/config.py (reported line 13)May include surrounding context.

python
DATA_DIR = Path.home() / ".nex-skillmon"
DB_PATH = DATA_DIR / "skillmon.db"
LOG_PATH = DATA_DIR / "logs"
ENV_FILE = DATA_DIR / ".env"

# Skills directory - default OpenClaw skills directory
SKILLS_BASE_DIR = os.getenv(

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · lib/storage.py (reported line 156)May include surrounding context.

python
skill_id = existing["id"]
                cursor.execute(
                    """
                    UPDATE skills SET
                        version = ?, install_date = ?, last_updated = ?,
                        skill_path = ?, file_hash = ?, description = ?,
                        author = ?, homepage = ?, status = ?, tags = ?, notes = ?

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · lib/storage.py (reported line 268)May include surrounding context.

python
skill_id = existing["id"]
                cursor.execute(
                    """
                    UPDATE skills SET
                        version = ?, install_date = ?, last_updated = ?,
                        skill_path = ?, file_hash = ?, description = ?,
                        author = ?, homepage = ?, status = ?, tags = ?, notes = ?

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · lib/storage.py (reported line 312)May include surrounding context.

python
skill_id = existing["id"]
                cursor.execute(
                    """
                    UPDATE skills SET
                        version = ?, install_date = ?, last_updated = ?,
                        skill_path = ?, file_hash = ?, description = ?,
                        author = ?, homepage = ?, status = ?, tags = ?, notes = ?

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · lib/storage.py (reported line 309)May include surrounding context.

python
(skill_id, tokens_used, model_used, duration_ms, estimated_cost, success, error_message),
            )

            # Update skill stats
            cursor.execute(
                """
                UPDATE skills SET

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises and likely uses sensitive capabilities including environment access, filesystem reads, network access, and shell execution, but does not declare any explicit tool scope or permission boundaries in the manifest. For a monitoring skill that scans installed skills and may call setup scripts, this creates an opaque and over-privileged trust model where the agent or user cannot easily constrain what the skill is allowed to do.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases include broad terms such as "which skills," "skill health," and "API costs," which can match ordinary conversation and cause the skill to activate unexpectedly. Because this skill has monitoring, filesystem, network, and possible shell-related behavior, accidental invocation increases the chance of unintended scanning, data exposure, or execution of higher-risk actions in contexts where the user did not clearly request this tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code sends each installed skill name to a remote ClawHub endpoint during update checks, which discloses local inventory metadata to an external service. Even if the payload is small, installed skill names can reveal user behavior, internal tooling, or sensitive capabilities, and this file shows no consent, opt-in, or minimization around that disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The security-flag lookup transmits installed skill names to a remote service, exposing the user's installed-skill inventory without visible notice in this code. Because this tool is explicitly meant to scan all active skills across an ecosystem, the collected names may provide a high-value profile of an organization's deployed automation and security posture.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The set_config method logs both configuration keys and raw values, which can expose secrets such as API keys, tokens, credentials, or internal endpoints into application logs. Logs are often broadly accessible, retained for long periods, and forwarded to external systems, so this creates a secondary secret disclosure channel even if the database itself is protected.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The config subcommand allows arbitrary key/value writes via storage.set_config(args.set, args.value) with no apparent allowlist or validation. For a monitoring/reporting skill, this is broader than necessary and could let a caller modify operational settings such as skill discovery paths or other downstream-sensitive configuration, potentially causing unintended file access, mis-scanning, or persistence of unsafe behavior depending on how configuration is consumed elsewhere.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script unconditionally deletes any existing user-local command at ~/.local/bin/nex-skillmon and replaces it with a symlink, without prompting or verifying that the existing file belongs to this skill. This can clobber a user's preexisting executable or custom wrapper and may break workflows or replace another program with this one.

Content

No source excerpt is available for this finding.