Back to skill

Security audit

Clawdbot Skill Update

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Clawdbot backup and restore helper, but it handles credentials, workspaces, archives, and rollback actions with enough unsafe restore behavior to require review before installation.

Install only if you trust the publisher and will use it on trusted backups. Treat every generated backup as secret material because it may contain tokens, sessions, workspaces, cron state, and configuration. Before restoring, verify the backup source, inspect archive contents, make a fresh current backup, and avoid restoring archives from anyone else or from shared/synced locations.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
backup-clawdbot-full.sh:22
Finding

Sensitive backup archives are created without restrictive permission safeguards

Content
View full analysis
/dev/null || true cp ~/.clawdbot/*.json.* "$BACKUP_DIR/" 2>/dev/null || true # 2. Sessions echo "" echo -e "${YELLOW}💾 Backing up sessions...${NC}" if [ -d ~/.clawdbot/sessions ]; then tar -czf "$BACKUP_DIR/sessions.tar.gz" -C ~/.clawdbot sessions/ echo -e "${GREEN}✅ Sessions backed up${NC}" else echo -e "${BLUE}ℹ️ No sessions directory${NC}" fi # 3. Agents State echo "" echo -e "${YELLOW}🤖 Backing up agents...${NC}" if [ -d ~/.clawdbot/agents ]; then tar -czf "$BACKUP_DIR/agents.tar.gz" -C ~/.clawdbot agents/ echo -e "${GREEN}✅ Agents backed up${NC}" else echo -e "${BLUE}ℹ️ No agents directory${NC}" fi # 4. Credentials echo "" echo -e "${YELLOW}🔐 Backing up credentials...${NC}" if [ -d ~/.clawdbot/credentials ]; then tar -czf "$BACKUP_DIR/credentials.tar.gz" -C ~/.clawdbot credentials/ echo -e "${GREEN}✅ Credentials backed up${NC}" ``` ### Technical Analysis The backup operation archives configuration, session state, agent state, and authentication credentials without first setting a restrictive process umask or explicitly assigning secure permissions to the output directory and files. The resulting modes depend on the invoking user's environment. With a common `022` umask, the backup directory may be created as mode `755` and newly created archives as mode `644`. On a multi-user host, this ca ...[truncated 1853 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
restore-clawdbot.sh:27
Finding

Restore trusts attacker-controlled configuration paths and unvalidated archive contents

Content
View full analysis
/dev/null | cut -f1) echo -e " ${GREEN}✅ Restored ($SIZE)${NC}" RESTORED_COUNT=$((RESTORED_COUNT+1)) else echo -e " ${YE ...[truncated 2919 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
restore-clawdbot.sh:73
Finding

Restore deletes live state before validating archive integrity or extraction success

Content
View full analysis
Remediation
View remediation
/dev/null ``` Archive listing alone is not sufficient for security; combine it with member-path and file-type validation. 3. Extract each archive into a private staging directory created with `mktemp -d` and mode `700`. 4. Verify that the staged directory has the expected component name and structure. 5. Rename the current live directory to a rollback path rather than deleting it immediately. 6. Atomically move the validated staged directory into place where the filesystem permits it. 7. Delete the rollback copy only after all components restore successfully and post-restore validation passes. 8. Check every command's exit status and never print a success message unless extraction and validation completed successfully. 9. If any component fails, stop the process and automatically restore all previously renamed live directories. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script enumerates the credentials directory and dynamically reads workspace paths from the user config, then inspects any existing path on disk. Even as a dry run, this expands visibility into sensitive filesystem locations and can disclose the existence, size, and file counts of credential stores or arbitrary directories outside the intended Clawdbot area, which is an information disclosure issue if the skill is run in a broader-trust environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The restore script goes beyond restoring backed-up data by optionally checking out an arbitrary commit from backup metadata and rebuilding the application. If the backup contents are untrusted or tampered with, this can roll the local repository to attacker-chosen code and execute build/install steps on it, expanding impact beyond configuration recovery.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The README explicitly states that backups include credentials, auth tokens, cron jobs, sandbox state, and all detected workspaces, but it does not warn users that the resulting archives are highly sensitive or that restoring them can overwrite active configuration and reintroduce secrets or scheduled tasks. In a backup/restore skill, omission of these warnings increases the chance of insecure storage, accidental disclosure, or unsafe restoration by otherwise legitimate users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document instructs users to back up and restore credentials, auth tokens, configuration, and workspaces without a prominent warning that these artifacts are highly sensitive and that restore operations can overwrite current state. In practice, this can lead to accidental credential exposure through insecure backup storage or destructive restoration that replaces newer data with stale or compromised state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script creates backups containing credentials and potentially sensitive workspace contents, but it does not set restrictive permissions, encrypt the archives, or clearly warn the user that secrets and private data are being copied into a new backup location. If the backup directory is later accessed by another local user, synced, or mishandled, this can expose authentication material and confidential data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest description advertises a broad backup, update, and restore capability without defining clear activation boundaries or safety preconditions. In an agent skill context, vague scope increases the chance the skill is invoked in inappropriate situations and performs privileged filesystem or repository operations beyond what the user intended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest presents backup, update, and restore functionality but does not warn that these actions can alter, overwrite, or roll back local data and system state. For a system-category skill with shell scripts and git integration, missing user-facing warnings materially raises the risk of destructive execution without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script restores the credentials directory after only a generic overwrite warning, without specifically notifying the user that sensitive secrets will be replaced. This can silently overwrite valid credentials with stale or malicious ones, potentially redirecting integrations or enabling account compromise.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
84% confidence
Finding

The script deletes existing data and then extracts tar archives from the supplied backup directory without validating archive contents. A malicious or tampered archive can exploit path traversal, symlink, or unsafe file ownership/permission restoration behaviors to overwrite files outside the intended directory after destructive deletion has already occurred.

Content

Scanner excerpt · restore-clawdbot.sh (reported line 78)May include surrounding context.

sh
echo ""
echo -e "${YELLOW}💾 Restoring sessions...${NC}"
if [ -f "$BACKUP_DIR/sessions.tar.gz" ]; then
  rm -rf ~/.clawdbot/sessions
  tar -xzf "$BACKUP_DIR/sessions.tar.gz" -C ~/.clawdbot
  echo -e "${GREEN}✅ Sessions restored${NC}"
else

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
84% confidence
Finding

The script deletes existing data and then extracts tar archives from the supplied backup directory without validating archive contents. A malicious or tampered archive can exploit path traversal, symlink, or unsafe file ownership/permission restoration behaviors to overwrite files outside the intended directory after destructive deletion has already occurred.

Content

Scanner excerpt · restore-clawdbot.sh (reported line 78)May include surrounding context.

sh
echo ""
echo -e "${YELLOW}💾 Restoring sessions...${NC}"
if [ -f "$BACKUP_DIR/sessions.tar.gz" ]; then
  rm -rf ~/.clawdbot/sessions
  tar -xzf "$BACKUP_DIR/sessions.tar.gz" -C ~/.clawdbot
  echo -e "${GREEN}✅ Sessions restored${NC}"
else

Static analysis

No suspicious patterns detected.