T09 · Insecure Skill Coding Practices
- Location
install.sh:280- Finding
Dry-run mode performs model downloads and imports before exiting
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its stated purpose, but review is warranted because preview/check modes can still change state and the optional watchdog can persistently rewrite OpenClaw configuration.
Install only if you are comfortable with a shell skill changing OpenClaw memory configuration. Avoid relying on --dry-run or --check-only as strictly read-only, keep backups of ~/.openclaw/openclaw.json, do not pass real secrets through --api-key-value, and enable the launchd watchdog only if you specifically want ongoing automatic config healing.
install.sh:280Dry-run mode performs model downloads and imports before exiting
lib/config.js:44Malformed configuration is silently treated as empty and overwritten
enforce.sh:79Check-only enforcement creates configuration files and directories
watchdog.sh:62Unvalidated watchdog interval permits launchd plist injection
The skill includes persistent drift enforcement and optional installation of a launchd watchdog that periodically checks and rewrites configuration. Persistence and auto-healing materially increase risk because they can override user changes, maintain unwanted state across sessions, and make later remediation harder if the configuration is incorrect or abused.
The skill includes persistent drift enforcement and optional installation of a launchd watchdog that periodically checks and rewrites configuration. Persistence and auto-healing materially increase risk because they can override user changes, maintain unwanted state across sessions, and make later remediation harder if the configuration is incorrect or abused.
The skill includes persistent drift enforcement and optional installation of a launchd watchdog that periodically checks and rewrites configuration. Persistence and auto-healing materially increase risk because they can override user changes, maintain unwanted state across sessions, and make later remediation harder if the configuration is incorrect or abused.
The skill includes persistent drift enforcement and optional installation of a launchd watchdog that periodically checks and rewrites configuration. Persistence and auto-healing materially increase risk because they can override user changes, maintain unwanted state across sessions, and make later remediation harder if the configuration is incorrect or abused.
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
The skill advertises shell-driven installation, verification, enforcement, watchdog, and restart behavior but does not declare any tool scope or permissions metadata. In a system that relies on manifest-declared capabilities for user review or policy enforcement, this creates an authorization transparency gap and can cause users or orchestrators to grant shell access implicitly to a skill that modifies config, restarts services, and installs persistence mechanisms.
The skill intentionally writes persistent configuration under OpenClaw defaults, can restart the gateway, and can install ongoing drift enforcement/watchdog behavior. Even without obvious malicious intent, this establishes durable session-affecting state and optional background persistence, which can outlive the install action and continue influencing agent behavior or service operation.
- `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 script accepts an API key as a positional command-line argument and persists it into the JSON config file if one is not already set. Passing secrets on the command line can expose them through shell history, process listings, logs, or job runners, and storing them in plaintext config increases the chance of accidental disclosure.
The apply-enforce command performs a file write to the supplied config path via writeConfig(), modifying persisted configuration and potentially inserting credentials, but this code path provides no confirmation prompt and no user-facing disclosure at the time of the write. Aside from the generic usage text, there is no explicit warning in this file that apply-enforce will overwrite the configuration file.
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"
No suspicious patterns detected.