Agent Guardian

WarnAudited by ClawScan on May 10, 2026.

Overview

Agent Guardian’s watchdog goal is coherent, but its install and patch path adds persistent root services and unsafe command hooks that could let chat content run commands on the host.

Do not install this on a real gateway until the execSync command-injection patterns are fixed. If you still test it, use an isolated host, review the gateway patch manually, run services with least privilege, protect state files outside /tmp, and plan how to remove the cron and systemd service.

Findings (6)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

If the patch is applied, a crafted chat message or generated reply could run commands on the bot/gateway host.

Why it was flagged

The recommended gateway patch embeds outbound text and inbound user content into shell commands. JSON.stringify does not prevent shell command substitution such as $() inside double-quoted shell strings.

Skill content
execSync(`echo ${JSON.stringify(text)} | python3 /path/to/agent-guardian/scripts/lang-filter.py`, ...); ... execSync(`python3 /path/to/agent-guardian/scripts/detect-language.py ${JSON.stringify(event.content)}`, ...)
Recommendation

Do not apply the patch until shell execution is replaced with execFile/spawn argument arrays or stdin, with no shell interpolation of chat content.

What this means

Applying the patch can change how all QQ Bot messages are processed and can break or weaken the gateway if the patch is incorrect or unsafe.

Why it was flagged

The skill includes an automatic patch script that edits installed QQ Bot gateway source files and inserts hooks into message handling.

Skill content
PLUGIN_DIR="/root/.openclaw/extensions/qqbot" ... cp "$SRC/gateway.ts" "$SRC/gateway.ts.bak" ... awk -i inplace ... "$SRC/gateway.ts"
Recommendation

Use a supported plugin extension point or require manual code review before patching gateway source; keep backups and test outside production.

What this means

A UX monitoring skill would gain persistent root-level execution on the host after installation.

Why it was flagged

The installer creates a system-level service that restarts automatically and runs as root, even though the registry does not declare privileged requirements.

Skill content
cat > /etc/systemd/system/agent-guardian-query.service << EOF ... Restart=always ... User=root
Recommendation

Declare the privilege requirement clearly, run under a dedicated least-privileged user, and provide install/uninstall controls.

What this means

The skill can keep sending status reports and responding to trigger files in the background until the user manually disables the cron and service.

Why it was flagged

The installer adds recurring cron behavior and enables a background daemon that continues operating after setup.

Skill content
crontab /tmp/crontab-guardian.tmp ... systemctl enable agent-guardian-query.service ... systemctl restart agent-guardian-query.service
Recommendation

Install only if you want persistent monitoring; document exact jobs/services created and include a cleanup command.

What this means

Another local process could potentially cause status or queue information to be sent to an unintended target on the configured channel.

Why it was flagged

The daemon trusts a shared /tmp trigger file for the recipient identity and sends status output based on it, without authenticating the file origin or validating the target against the configured user.

Skill content
TRIGGER_FILE="/tmp/status-query-trigger" ... print(d.get('from', '')) ... openclaw message send --channel "$CHANNEL" --target "$TARGET" --message "$MSG"
Recommendation

Use a private directory with restrictive permissions, validate targets against the installed configuration, and authenticate trigger writes.

What this means

Installation depends on external package sources and may change the host environment.

Why it was flagged

The installer pulls runtime dependencies from package managers, including an unpinned Python package, even though no install spec or required binaries are declared.

Skill content
pip3 install langdetect -q ... apt-get install -y inotify-tools -q
Recommendation

Review dependencies before installing, pin Python package versions, and declare required binaries/install steps in metadata.