T09 · Insecure Skill Coding Practices
- Location
lib/config.js:43- Finding
Configuration Read or Parse Failures Cause Destructive Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s purpose is coherent, but it has review-worthy safety flaws that can change local state unexpectedly and persistently alter OpenClaw settings.
Review before installing. The skill is not clearly malicious, but only use it if you are comfortable with it editing OpenClaw config, pulling or creating Ollama models, and optionally installing a launchd watchdog. Avoid --dry-run as a trusted non-mutating approval step, avoid --install-watchdog until the plist interval validation is fixed, and keep a separate backup of ~/.openclaw/openclaw.json.
lib/config.js:43Configuration Read or Parse Failures Cause Destructive Overwrite
install.sh:320Dry-Run Mode Performs Persistent Ollama Model Operations
watchdog.sh:63Unvalidated Watchdog Interval Permits LaunchAgent Plist Injection
Continuous watchdog monitoring, automatic drift remediation, and installation of a macOS launchd job introduce persistence and autonomous system modification beyond a simple one-time configuration change. In a skill ecosystem, undeclared persistence mechanisms are security-relevant because they can continue changing user configuration, create logs, and restart services without ongoing user awareness.
Continuous watchdog monitoring, automatic drift remediation, and installation of a macOS launchd job introduce persistence and autonomous system modification beyond a simple one-time configuration change. In a skill ecosystem, undeclared persistence mechanisms are security-relevant because they can continue changing user configuration, create logs, and restart services without ongoing user awareness.
Continuous watchdog monitoring, automatic drift remediation, and installation of a macOS launchd job introduce persistence and autonomous system modification beyond a simple one-time configuration change. In a skill ecosystem, undeclared persistence mechanisms are security-relevant because they can continue changing user configuration, create logs, and restart services without ongoing user awareness.
Continuous watchdog monitoring, automatic drift remediation, and installation of a macOS launchd job introduce persistence and autonomous system modification beyond a simple one-time configuration change. In a skill ecosystem, undeclared persistence mechanisms are security-relevant because they can continue changing user configuration, create logs, and restart services without ongoing user awareness.
Referenced artifact was not completely inspected
- Adds an idempotent drift-enforcement command (`enforce.sh`)
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
TMP_BODY="$(mktemp)"
TMP_ERR="$(mktemp)"
set +e
HTTP_CODE="$(curl -sS -o "$TMP_BODY" -w "%{http_code}" \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
"$EMBED_URL" 2>"$TMP_ERR")"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
3. **Direct endpoint check:**
```bash
curl -s -X POST http://127.0.0.1:11434/v1/embeddings \
-H "Content-Type: application/json" \
-d '{"model":"nomic-embed-text:latest","input":"test"}' | head -c 200
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.
- `install.sh` - install and configure memory embeddings provider
- `verify.sh` - endpoint and model verification only
- `enforce.sh` - idempotent config enforcement with lock protection
- `watchdog.sh` - optional drift healing and optional launchd install
- `audit.sh` - read-only report (no mutation)
- `uninstall.sh` - best-effort revert using latest config backup
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.
- `install.sh` - install and configure memory embeddings provider
- `verify.sh` - endpoint and model verification only
- `enforce.sh` - idempotent config enforcement with lock protection
- `watchdog.sh` - optional drift healing and optional launchd install
- `audit.sh` - read-only report (no mutation)
- `uninstall.sh` - best-effort revert using latest config backup
Without declared permissions the skill's intent is opaque and cannot be validated.
The skill writes persistent configuration, may restart the OpenClaw gateway, and can install drift-enforcement/watchdog components, which together create durable changes across sessions. Even though the stated purpose is configuration management, persistence plus optional automated healing increases risk because it can override later user changes or maintain an unintended state over time.
- `model = <selected model>:latest`
- `remote.baseUrl = "http://127.0.0.1:11434/v1/"`
- `remote.apiKey = "ollama"` (required by client, ignored by Ollama)
- Performs a post-write config sanity check (reads back and validates JSON)
- Optionally restarts the OpenClaw gateway (with detection of available
restart methods: `openclaw gateway restart`, systemd, launchd)
- Optional memory reindex during install (`openclaw memory index --force --verbose`)
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.
--model <id> embeddinggemma | nomic-embed-text | all-minilm | mxbai-embed-large
--import-local-gguf <mode> auto | yes | no (default: no)
Use yes to explicitly scan/import a local GGUF.
--import-model-name <name> model name to create in Ollama (default: embeddinggemma-local)
--openclaw-config <path> OpenClaw config path (default: ~/.openclaw/openclaw.json)
--non-interactive do not prompt; use supplied/default values
--restart-gateway <mode> yes | no (default: no)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
ollama_running() {
curl -fsS "http://127.0.0.1:11434/api/tags" >/dev/null 2>&1
}
# Search for any embedding GGUF (embeddinggemma, nomic-embed, all-minilm, mxbai-embed).
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.
uid="$(id -u)"
echo " macOS (launchd): launchctl kickstart -k gui/${uid}/bot.molt.gateway"
fi
# Linux systemd
if command -v systemctl >/dev/null 2>&1 && systemctl --user is-enabled openclaw-gateway 2>/dev/null; then
echo " Linux (systemd): systemctl --user restart openclaw-gateway"
fi
The apply-enforce command modifies and writes the provided configuration file via writeConfig, but this path has no confirmation prompt, log message, comment, or other user disclosure indicating that the file will be changed. Because this is a file write that can alter user configuration and credentials, it matches the missing-warning criterion for code files.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TMP_BODY="$(mktemp)"
TMP_ERR="$(mktemp)"
set +e
HTTP_CODE="$(curl -sS -o "$TMP_BODY" -w "%{http_code}" \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
"$EMBED_URL" 2>"$TMP_ERR")"
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.
UNINSTALL_LAUNCHD=0
QUIET=0
PLIST_NAME="bot.molt.openclaw.embedding-guard"
PLIST_PATH="${HOME}/Library/LaunchAgents/${PLIST_NAME}.plist"
LOG_DIR="${HOME}/.openclaw/logs"
STDOUT_LOG="${LOG_DIR}/embedding-guard.out.log"
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.
UNINSTALL_LAUNCHD=0
QUIET=0
PLIST_NAME="bot.molt.openclaw.embedding-guard"
PLIST_PATH="${HOME}/Library/LaunchAgents/${PLIST_NAME}.plist"
LOG_DIR="${HOME}/.openclaw/logs"
STDOUT_LOG="${LOG_DIR}/embedding-guard.out.log"
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.
UNINSTALL_LAUNCHD=0
QUIET=0
PLIST_NAME="bot.molt.openclaw.embedding-guard"
PLIST_PATH="${HOME}/Library/LaunchAgents/${PLIST_NAME}.plist"
LOG_DIR="${HOME}/.openclaw/logs"
STDOUT_LOG="${LOG_DIR}/embedding-guard.out.log"
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.
UNINSTALL_LAUNCHD=0
QUIET=0
PLIST_NAME="bot.molt.openclaw.embedding-guard"
PLIST_PATH="${HOME}/Library/LaunchAgents/${PLIST_NAME}.plist"
LOG_DIR="${HOME}/.openclaw/logs"
STDOUT_LOG="${LOG_DIR}/embedding-guard.out.log"
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.
UNINSTALL_LAUNCHD=0
QUIET=0
PLIST_NAME="bot.molt.openclaw.embedding-guard"
PLIST_PATH="${HOME}/Library/LaunchAgents/${PLIST_NAME}.plist"
LOG_DIR="${HOME}/.openclaw/logs"
STDOUT_LOG="${LOG_DIR}/embedding-guard.out.log"
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.
UNINSTALL_LAUNCHD=0
QUIET=0
PLIST_NAME="bot.molt.openclaw.embedding-guard"
PLIST_PATH="${HOME}/Library/LaunchAgents/${PLIST_NAME}.plist"
LOG_DIR="${HOME}/.openclaw/logs"
STDOUT_LOG="${LOG_DIR}/embedding-guard.out.log"
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.
UNINSTALL_LAUNCHD=0
QUIET=0
PLIST_NAME="bot.molt.openclaw.embedding-guard"
PLIST_PATH="${HOME}/Library/LaunchAgents/${PLIST_NAME}.plist"
LOG_DIR="${HOME}/.openclaw/logs"
STDOUT_LOG="${LOG_DIR}/embedding-guard.out.log"
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.
UNINSTALL_LAUNCHD=0
QUIET=0
PLIST_NAME="bot.molt.openclaw.embedding-guard"
PLIST_PATH="${HOME}/Library/LaunchAgents/${PLIST_NAME}.plist"
LOG_DIR="${HOME}/.openclaw/logs"
STDOUT_LOG="${LOG_DIR}/embedding-guard.out.log"
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.
UNINSTALL_LAUNCHD=0
QUIET=0
PLIST_NAME="bot.molt.openclaw.embedding-guard"
PLIST_PATH="${HOME}/Library/LaunchAgents/${PLIST_NAME}.plist"
LOG_DIR="${HOME}/.openclaw/logs"
STDOUT_LOG="${LOG_DIR}/embedding-guard.out.log"