Back to skill

Security audit

Molt

Security checks for vulnerabilities and agentic risk

Overview

This backup skill is mostly coherent, but it can push sensitive OpenClaw memory, cron, and configuration data offsite with weak redaction and credential-handling safeguards.

Review this before installing. Use only a private, dedicated backup repository; avoid token-in-URL authentication; prefer SSH or a credential helper; treat the backup contents as sensitive; and disable or modify cron/config export unless you explicitly want that operational data stored offsite. Do not rely on the fallback config redaction for secrets under unusual field names or embedded in URLs.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/export-config.py:59
Finding

Incomplete Fallback Redaction Can Expose Configuration Secrets

Content
View full analysis
dict: """ Fallback: read raw config file and apply conservative key-name redaction. Used when the CLI is unavailable. """ SENSITIVE_KEY = re.compile( r"(token|secret|password|apikey|api_key|private_?key|credential|signing|client_secret|access_key)", re.IGNORECASE, ) def redact(obj, key=""): if isinstance(obj, dict): return {k: redact(v, k) for k, v in obj.items()} elif isinstance(obj, list): return [redact(i, key) for i in obj] elif isinstance(obj, str) and SENSITIVE_KEY.search(key): return "[REDACTED]" return obj with open(config_path) as f: return redact(json.load(f)) ``` ```python # Try CLI first (authoritative redaction) data = export_via_cli() if not data: # Fallback to raw file if config_path and config_path.exists(): print(" ! openclaw CLI unavailable, falling back to file-based redaction") data = export_via_file(config_path) else: print(" - config (openclaw CLI unavailable and no fallback config path, skipping)") sys.exit(0) ``` ```bash CONFIG_PATH="$(dirname "$WORKSPACE")/openclaw.json" python3 "$SCRIPT_DIR/export-config.py" "$BACKUP_DIR/config-redacted.json" "$CONFIG_PATH" ``` ```bash git push origin "$(git rev-parse --abbrev-ref HEAD)" ``` ### Technical Analysis The preferred export mechanism delegates redaction to the OpenClaw CLI. If that mechanism returns no data, however, the script reads the raw `openclaw.json` file and redacts string values solely according to their immediate key names. The regular expression covers several common nam ...[truncated 1955 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/molt.sh:45
Finding

Credential-Bearing Repository URLs Are Logged and Persisted

Content
View full analysis
@github.com/...`) ``` ```bash echo "[molt] Cloning $REPO_URL → $BACKUP_DIR" git clone "$REPO_URL" "$BACKUP_DIR" ``` ### Technical Analysis The documentation explicitly permits placing an access token in an HTTPS repository URL. The script then prints the complete URL to standard output before passing it to `git clone`. When the Skill is executed interactively, through cron, in CI, or with redirected output, the token-bearing URL can be recorded in terminal output, backup logs, scheduler logs, CI logs, or monitoring systems. Git may also retain the clone URL as the remote URL in `.git/config`, leaving the credential in plaintext on the local filesystem. Although the user selects the destination, exposing its authentication token is unnecessary and can compromise both the backup repository and the sensitive Agent data stored there. ### Attack Path 1. A user follows the documented token-in-URL authentication method. 2. The user sets `MOLT_REPO_URL` or passes `--repo-url` with an embedded access token. 3. On first run, `molt.sh` expands and prints the full URL. 4. The output is retained in a terminal transcript, cron log, CI log, or redirected log file. 5. Git may additionally save the complete credential-bearing URL under `.git/config`. 6. A local user, log reader, CI operator, compromised monitoring system, or other party with access to these records retrieves the token. 7. The party uses the token within its granted scope to read, modify, or delete the remote repository. ### Impact Assessment A disclosed repository token may allow unauthorized cloning of backed-up Agent identity files, user information, memory, cron payl ...[truncated 451 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims it can set up or manage cron jobs, but the visible documentation only describes exporting/listing cron data and suggests external scheduling rather than clearly defining constrained automation behavior. Overstated capability descriptions can lead an agent to route unrelated scheduling or backup requests to this skill, creating unsafe or unintended shell/file operations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill claims it can set up or manage cron jobs, but the visible documentation only describes exporting/listing cron data and suggests external scheduling rather than clearly defining constrained automation behavior. Overstated capability descriptions can lead an agent to route unrelated scheduling or backup requests to this skill, creating unsafe or unintended shell/file operations.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares no explicit tool scope despite clearly requiring shell execution and file-write capabilities to clone repositories, copy files, commit, push, and potentially configure cron. Missing permission boundaries increases the chance the agent invokes the skill in broader contexts than intended and makes review/auditing harder.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger text is broad enough to match common backup or scheduling requests, so an agent may invoke this skill in situations where offsite exfiltration to a git repository or persistence via cron was not actually intended. In this context, broad activation is more dangerous because the skill handles sensitive local memory artifacts and remote synchronization.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

The skill relies on persistent git credentials and encourages storing authentication material via SSH keys, credential helpers, or even tokens embedded in URLs. Persistent credentials combined with automated push behavior can enable repeated offsite transfer of sensitive brain data if the skill is misinvoked or the local environment is compromised.

Content

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

md
- **HTTPS with token**: configure a credential helper or use a token in the URL (`https://<token>@github.com/...`)
  - `gh` CLI is **not required** — molt uses plain git only
- **`rsync`** — used for `memory/` sync; standard on macOS and most Linux distros
- **Write access to the remote repo** — the pushing account needs push rights; a dedicated private repo is recommended

No other dependencies. No OpenClaw-specific CLI tools needed at runtime.

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

The skill explicitly instructs users to install a cron job for recurring execution, creating persistence that repeatedly copies and pushes sensitive brain artifacts without per-run approval. In a security context, automated recurring exfiltration to a remote repository materially raises risk, especially if repository ownership, file scope, or redaction are misconfigured.

Content

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

Scheduling

To schedule automatic backups, create a cron job pointing at this script. Example for every 6 hours:

text
0 */6 * * * MOLT_DIR=~/.openclaw/molt ~/.openclaw/workspace/marv-skills/molt/scripts/molt.sh >> /tmp/molt.log 2>&1

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/export-config.py (reported line 49)May include surrounding context.

python
result = {}
    for section in CONFIG_SECTIONS:
        try:
            proc = subprocess.run(
                ["openclaw", "config", "get", section, "--json"],
                capture_output=True, text=True, timeout=10,
            )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

When the authoritative CLI export is unavailable, the script silently falls back to heuristic key-name redaction and then writes the result as a backup artifact. That heuristic can miss secrets stored under unexpected field names or embedded in nested/plaintext values, which is especially dangerous in a backup skill whose explicit purpose is to copy data offsite to a git repository.

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/export-cron-jobs.py (reported line 25)May include surrounding context.

python
# ── Dump JSON ────────────────────────────────────────────────────────────
    jobs_path = output_dir / "jobs.json"
    try:
        result = subprocess.run(
            ["openclaw", "cron", "list", "--all", "--json"],
            capture_output=True,
            text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script writes raw cron job metadata and a human-readable summary to disk, including job payload messages and last error details, which may contain secrets, internal prompts, file paths, tokens, or sensitive operational context. In this skill's backup/offsite context, that risk is amplified because the exported files are likely to be copied into a repository or remote backup, increasing the chance of unintended disclosure and long-term retention.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script is designed to push workspace contents to an offsite git repository, but its header and usage comments do not clearly warn that local files and metadata will be transmitted remotely. In a backup skill handling memory and identity-related files, weak disclosure increases the chance of unintentional exfiltration of sensitive user data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script silently expands scope beyond backing up brain files by exporting cron jobs and an OpenClaw config file into the offsite repository. Those artifacts can contain sensitive operational details, file paths, schedules, usernames, endpoints, or incompletely redacted secrets, creating unnecessary data exfiltration risk compared with the stated skill purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Collecting local cron job data is not clearly necessary for a brain-file backup workflow and exposes host-level operational metadata to the remote repository. Cron entries may reveal maintenance tasks, script paths, credentials in command lines, or other environment details that increase attacker knowledge if the backup repo is compromised or misconfigured.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.