Back to skill

Security audit

Config Checkpoint

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Git checkpoint tool, but it gives an agent direct authority to commit broad OpenClaw configuration state and run destructive rollbacks.

Review this skill carefully before installing. It is not deceptive, but it should only be used if you are comfortable letting an agent manage Git state for ~/.openclaw. Prefer targeted git add commands, verify staged diffs before commits, avoid storing secrets or memory data in Git history, and reserve hard reset for explicit manual recovery after reviewing exactly what will be lost.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:62
Finding

Broad Git Staging Can Persist Sensitive Data Missed by Filename-Only Scanning

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:62-128
Vulnerability Type: Incomplete secret detection followed by unrestricted Git staging
Risk Level: Medium

The SAVE procedure relies primarily on filenames and paths to identify sensitive files, but subsequently permits every modified and untracked file in ~/.openclaw to be staged with git add -A.

bash
# Check for potential sensitive files in untracked/modified
cd ~/.openclaw
git status --short | grep -E '\.(pem|key|token)$|credentials/|secret' && echo "⚠️ SENSITIVE FILES DETECTED"
text
When user says: "save before..." or "create checkpoint"

1. [REQUIRED] Check .gitignore exists
   - If missing: STOP and warn user

2. [REQUIRED] Scan for sensitive files
   - If detected: STOP and show list
   - Ask user to verify .gitignore

3. Show what will be committed
   git status --short
 
4. Ask user confirmation if autonomous
   "Will commit {count} files. Proceed?"

5. Execute commit
   git add -A  # or targeted paths
   git commit -m "checkpoint: {description}"

6. Report commit hash and file count

Technical Analysis

The scan examines only path names reported by git status. Its regular expression recognizes a limited set of patterns: .pem, .key, .token, credentials/, and names containing secret. It does not inspect file contents and therefore cannot identify credentials stored in otherwise ordinary files.

Examples of data that can bypass this check include:

  • .env files and extensionless credential files.
  • API keys, access tokens, passwords, or private data embedded in JSON, Markdown, YAML, or other configuration files.
  • Sensitive content inside already tracked files.
  • User identity or memory data whose filenames do not match the expression.
  • Sensitive files not covered by the active .gitignore rules.

Checking only whether .gitignore exists does not establish that its requir ...[truncated 1913 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove git add -A from the default SAVE workflow and require an explicit allowlist of files or directories:

    bash
    git add -- workspace/SOUL.md workspace/AGENTS.md
    
  2. Validate the effective ignore configuration rather than checking only for the existence of .gitignore:

    bash
    git check-ignore -v -- path/to/candidate-file
    
  3. Add mandatory exclusions for common credential formats, including .env, .env.*, authentication stores, cloud-provider credentials, SSH material, and local backup files.

  4. Inspect the contents of staged changes before committing:

    bash
    git diff --cached --name-status
    git diff --cached
    

    Integrate a reputable local secret scanner where available.

  5. Perform scanning after staging and before committing so the scan covers the exact snapshot that will enter Git history. Abort the commit when suspicious content is found.

  6. Exclude identity, user, and memory files from checkpoints by default. Require explicit, per-operation confirmation before staging these paths.

  7. Display the exact staged file list to the user and require confirmation when any file falls outside a predefined configuration allowlist.

  8. Document a response procedure for accidental commits, including credential rotation and proper Git-history rewriting. Simply deleting the working-tree file or adding it to .gitignore does not remove previously committed data.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (15)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The skill explicitly supports git reset --hard, a destructive command that permanently deletes uncommitted changes. Even with warnings, documenting and operationalizing this path in a skill creates a realistic risk of irreversible data loss if invoked mistakenly, ambiguously, or by another workflow.

Content

Scanner excerpt · SKILL.md (reported line 154)May include surrounding context.

md
**⚠️ DANGER: Hard Reset Destroys Data**

`git reset --hard` **permanently deletes** all uncommitted changes. There is NO undo.

**When to use**:
- User reports system issues after recent changes

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The rollback options table presents git reset --hard HEAD~1 as a standard option, which normalizes a highly destructive parameter. This increases the chance that operators or downstream agents choose the dangerous option in routine recovery scenarios.

Content

Scanner excerpt · SKILL.md (reported line 168)May include surrounding context.

md
|--------|---------|--------|--------|
| **Soft reset** | `git reset --soft HEAD~1` | ✅ Safe | Undo commit, keep changes staged |
| **Mixed reset** | `git reset --mixed HEAD~1` | ⚠️ Moderate | Undo commit, keep changes unstaged |
| **Hard reset** | `git reset --hard HEAD~1` | 🔴 Destructive | **Permanently delete** commit + changes |

**Recommended**: Always try **soft reset** first. Only use hard reset if absolutely necessary.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The implementation guidance directly instructs the agent to execute git reset --hard {commit-hash} if the user confirms. In agent contexts, confirmation flows can still fail or be spoofed, so embedding a direct destructive execution path materially raises the risk of accidental or unsafe tool use.

Content

Scanner excerpt · SKILL.md (reported line 193)May include surrounding context.

md
5. Execute rollback
   - Prefer: git reset --soft {commit-hash}
   - If user confirms hard: git reset --hard {commit-hash}

6. Report result
   "✓ Rolled back to commit abc1234"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The worked example demonstrates the agent performing git reset --hard abc1234, reinforcing destructive behavior as an expected operational pattern. Examples are powerful prompts for agent behavior, so including a dangerous command in a successful example increases misuse risk.

Content

Scanner excerpt · SKILL.md (reported line 220)May include surrounding context.

[User confirms hard reset]

  1. Executing hard reset... $ git reset --hard abc1234

Output: "✓ Rolled back to 'before skill install' (abc1234)"

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
92% confidence
Finding

The quick reference lists git reset --hard HEAD~1 as a readily available aliasable action, making destructive use easier and faster. Condensing a dangerous command into quick-reference form weakens the cautionary friction that should surround irreversible operations.

Content

Scanner excerpt · SKILL.md (reported line 432)May include surrounding context.

md
| Scan sensitive files | `git status \| grep -E '\.(pem\|key)$'` | ✅ Safe | `scan` |
| SAVE checkpoint | `git add -A && git commit -m "..."` | ⚠️ Check first | `save` |
| Soft ROLLBACK | `git reset --soft HEAD~1` | ✅ Safe | `rollback-soft` |
| Hard ROLLBACK | `git reset --hard HEAD~1` | 🔴 Destructive | `rollback-hard` |
| View history | `git log --oneline -10` | ✅ Safe | `history` |
| Check status | `git status` | ✅ Safe | `status` |
| Compare diff | `git diff HEAD` | ✅ Safe | `diff` |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The example session culminates in the agent executing a hard reset after a simple yes/no exchange. In practice, this level of friction is too low for an irreversible action that can destroy user work, especially in autonomous or semi-autonomous agent environments.

Content

Scanner excerpt · SKILL.md (reported line 489)May include surrounding context.

Agent: 6. Executing hard reset... $ git reset --hard abc1234 ✓ Rolled back successfully

text

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · SKILL.md (reported line 56)May include surrounding context.

md
## Core Operations

### 1. SAVE - Create Checkpoint

Create a git commit before making sensitive changes. This provides a recovery point.

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · SKILL.md (reported line 66)May include surrounding context.

bash
   test -f ~/.openclaw/.gitignore && echo "✓ .gitignore found" || echo "✗ .gitignore MISSING"

If missing: STOP and create .gitignore first

  1. Scan for sensitive files (before staging)
    bash

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 138)May include surrounding context.

md
2. Scanning for sensitive files... ✓ None detected
  3. Files to commit:
     M workspace/AGENTS.md
     A workspace/skills/new-skill/SKILL.md
  4. Creating checkpoint...
     $ git add -A
     $ git commit -m "checkpoint: before installing new skill"

Session Persistence

Medium
Category
Rogue Agent
Confidence
55% 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.

Content

Scanner excerpt · SKILL.md (reported line 148)May include surrounding context.

md
---

### 2. ROLLBACK - Restore Previous State

Revert to a previous commit when issues occur.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The phrase "undo last change" is underspecified for a skill that can manipulate repository history and discard work. A user may mean undoing a document edit or an application setting, but the skill interprets it as a git rollback flow, creating a meaningful risk of destructive misfires.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The phrase "undo last change" is underspecified for a skill that can manipulate repository history and discard work. A user may mean undoing a document edit or an application setting, but the skill interprets it as a git rollback flow, creating a meaningful risk of destructive misfires.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 211)May include surrounding context.

md
2. Restore to abc1234?
  
  3. Checking uncommitted changes...
     M workspace/skills/broken-skill/SKILL.md
     ?? workspace/skills/broken-skill/cache/
     
  4. ⚠️ Hard reset will DELETE these changes permanently.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 406)May include surrounding context.

md
- Check what will be staged first
   - Consider targeted paths instead

2. **Don't commit without checking .gitignore**
   - Sensitive files may be exposed
   - Verify exclusions are working

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 410)May include surrounding context.

md
- Sensitive files may be exposed
   - Verify exclusions are working

3. **Don't hard reset without confirmation**
   - Changes are permanently lost
   - No undo possible