Back to skill

Security audit

Auto Updater.Bak

Security checks for vulnerabilities and agentic risk

Overview

This skill transparently sets up automatic updates, but it needs Review because it creates a persistent daily job that changes Clawdbot and every installed skill without per-update approval.

Install only if you are comfortable with Clawdbot and every installed skill changing automatically each day. Prefer running a dry run first, limiting updates to trusted skills where possible, reviewing changelogs, and knowing how to remove the `Daily Auto-Update` cron job before enabling it.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T06 · System Persistence

Error
Location
SKILL.md:24
Finding
Persistent Unattended Update Task<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:24-33` **Vulnerability Type**: Persistent scheduled execution **Risk Level**: High ### Vulnerable Code ```bash clawdbot cron add \ --name "Daily Auto-Update" \ --cron "0 4 * * *" \ --tz "America/Los_Angeles" \ --session isolated \ --wake now \ --deliver \ --message "Run daily auto-updates: check for Clawdbot updates and update all skills. Report what was updated." ``` ### Technical Analysis The Skill instructs the Agent to create a recurring cron task that survives the initial Skill session. The task wakes an isolated Agent session every day and directs it to update Clawdbot and all installed Skills. Although this persistence is disclosed as the Skill's intended functionality, the scheduled task creates a durable execution mechanism that operates without renewed user authorization. Its update targets are mutable, so the effective behavior of future scheduled runs can change after the Skill itself has been reviewed. ### Attack Path 1. A user asks the Agent to configure automatic updates. 2. The Agent installs the named daily cron task. 3. The task persists after the setup session and wakes an isolated Agent session every day. 4. A future update source, Clawdbot release, or installed Skill is compromised. 5. The scheduled session installs the compromised update without obtaining fresh approval. 6. The compromised component executes with the permissions of the Gateway or Agent user during subsequent operations. ### Impact Assessment An attacker controlling an accepted update could obtain code execution under the account running Clawdbot. The accessible scope may include writable Skill directories, Clawdbot configuration and state, local files available to that account, and any tools or credentials exposed to the affected Agent runtime. The cron task itself does not demonstrate privilege escalation or credential theft. The principal risk is persistent, unattended execution combin ...[truncated 37 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Default to a scheduled dry run such as `clawdhub update --all --dry-run` rather than automatic installation. 2. Present the proposed versions, package origins, integrity information, and release changes to the user. 3. Require explicit approval before applying each update batch. 4. Pin the allowed update commands and prevent the scheduled message from becoming an unrestricted instruction channel. 5. Provide clear commands to inspect, pause, and remove the scheduled task. 6. Run update checks in a restricted sandbox with no unnecessary credentials or filesystem access. 7. Record the cron task identifier, creation time, initiator, and each execution result in an auditable log. ]]>

T08 · Insecure Dependencies

Error
Location
references/agent-guide.md:38
Finding
Unpinned Global and Skill-Wide Supply-Chain Updates<![CDATA[ ## Vulnerability Details **File Location**: `references/agent-guide.md:38-57` **Vulnerability Type**: Unverified mutable dependency installation **Risk Level**: High ### Vulnerable Code ```bash # Update Clawdbot log "Updating Clawdbot..." if command -v npm &> /dev/null && npm list -g clawdbot &> /dev/null; then npm update -g clawdbot@latest 2>&1 | tee -a "$LOG_FILE" elif command -v pnpm &> /dev/null && pnpm list -g clawdbot &> /dev/null; then pnpm update -g clawdbot@latest 2>&1 | tee -a "$LOG_FILE" elif command -v bun &> /dev/null; then bun update -g clawdbot@latest 2>&1 | tee -a "$LOG_FILE" else log "Running clawdbot update (source install)" clawdbot update 2>&1 | tee -a "$LOG_FILE" || true fi # Run doctor for migrations log "Running doctor..." clawdbot doctor --yes 2>&1 | tee -a "$LOG_FILE" || true # Capture new version CLAWDBOT_VERSION_AFTER=$(clawdbot --version 2>/dev/null || echo "unknown") # Update skills log "Updating skills via ClawdHub..." SKILL_OUTPUT=$(clawdhub update --all 2>&1) || true ``` ### Technical Analysis The update procedure installs the mutable `latest` release globally and updates every installed Skill without version pinning, cryptographic integrity checks, provenance validation, change review, or an approval boundary. Consequently, code published after this Skill was audited can be installed and later executed automatically. The script also appends `|| true` to source updates, migrations, and Skill updates. This suppresses nonzero exit statuses and permits the workflow to continue after security-critical partial failures. A failed migration or incomplete update may therefore leave the installation in an inconsistent state while the routine still reaches its completion and summary logic. No evidence shows that the current package deliberately uses dependency confusion or typosquatting. The confirmed weakness is its unsafe trust in mutable third-party update sources. ### Attack Path 1. An attacker compromises ...[truncated 1494 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` and unrestricted `update --all` behavior with explicitly approved, pinned versions. 2. Restrict packages and Skills to an allowlist of expected names, publishers, and registry origins. 3. Verify signed release metadata, provenance attestations, and cryptographic checksums before installation. 4. Download updates into a staging directory and inspect package contents, Skill instructions, scripts, permissions, and version differences before promotion. 5. Test each update in a sandbox that has no production credentials and minimal filesystem or network access. 6. Require explicit user approval after displaying the exact version transition and verification results. 7. Preserve command exit statuses. Remove broad `|| true` suppression and fail closed when an update or migration fails. 8. Report partial failures prominently and prevent subsequent deployment when migrations or integrity validation do not succeed. 9. Retain the prior verified version and implement an atomic rollback procedure. ]]>
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Self-Modification

High
Category
Rogue Agent
Content
# Capture new version
CLAWDBOT_VERSION_AFTER=$(clawdbot --version 2>/dev/null || echo "unknown")

# Update skills
log "Updating skills via ClawdHub..."
SKILL_OUTPUT=$(clawdhub update --all 2>&1) || true
echo "$SKILL_OUTPUT" >> "$LOG_FILE"
Confidence
95% confidence
Finding
`clawdhub update --all` causes the agent environment to self-modify by replacing installed skills from an external source, potentially changing future agent behavior without review. In an unattended daily cron flow, this is especially dangerous because a compromised upstream package, malicious skill update, or breaking change can be deployed automatically and persist.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill sets up unattended daily updates that modify Clawdbot and all installed skills, but the user-facing description does not prominently warn that software and skill files will be changed automatically on a schedule. This can lead users to enable recurring privileged modifications without fully understanding the operational and supply-chain risk, especially because `clawdhub update --all` updates every installed skill, including potentially sensitive or third-party ones.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The guide instructs the agent to perform unattended package, application, and skill updates plus migrations on a schedule, but it does not require explicit user confirmation, pinning, rollback, or meaningful warnings about system changes. This creates a real security and reliability risk because remote updates change executable code automatically and could introduce malicious, incompatible, or disruptive changes without oversight.

Session Persistence

Medium
Category
Rogue Agent
Content
bun pm ls -g 2>/dev/null | grep clawdbot && echo "bun-global"
```

## Step 2: Create the Update Script (Optional)

For complex setups, create a helper script at `~/.clawdbot/scripts/auto-update.sh`:
Confidence
60% confidence
Finding
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.

Static analysis

No suspicious patterns detected.