ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

security-hardening

Security audit and hardening for AI agents — credential hygiene, secret scanning, prompt injection defense, data leakage prevention, and privacy zones.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/clawdssen/security-hardening
Or

Security Hardening — by The Agent Ledger

Just deliver this skill to your agent. One paste, and your agent knows how to audit your workspace for leaked secrets, harden configs, and defend against prompt injection — no coding, no security expertise required. Your agent reads the instructions and handles the rest.

A security audit and hardening skill for AI agents. Ensures your workspace doesn't leak secrets, your configs resist prompt injection, and your agent operates with defense-in-depth principles.

Version: 1.0.0 License: CC-BY-NC-4.0 More: theagentledger.com


What This Skill Does

When triggered, the agent performs a comprehensive security audit and applies hardening measures:

  1. Credential Scan — Detect leaked API keys, tokens, passwords in workspace files
  2. Privacy Audit — Find personal information (names, emails, addresses) that shouldn't be in shared files
  3. Config Hardening — Add security standing orders to AGENTS.md, SOUL.md, etc.
  4. Prompt Injection Defense — Review agent instructions for injection vulnerabilities
  5. File Permission Review — Identify overly permissive file sharing or public exposure
  6. Remediation Report — Actionable summary with severity ratings

Quick Start

Tell your agent:

"Run a security audit on my workspace"

Or trigger via heartbeat/cron for periodic checks.


Setup

Step 1: Understand the Audit Scope

The audit covers all files in your agent's workspace directory. It does NOT:

  • Access files outside the workspace
  • Make network requests
  • Modify files without confirmation
  • Send any data externally

Step 2: Run the Initial Audit

Ask your agent to perform each check below. Review findings before applying fixes.


Audit Checks

Check 1: Credential Scan

Scan all workspace files for patterns matching:

PatternExamples
API keyssk-..., AKIA..., ghp_..., xoxb-...
TokensBearer ..., token: ..., strings > 30 chars of mixed alphanumeric
Passwordspassword:, passwd:, secret: followed by values
Connection stringsmongodb://, postgres://, mysql:// with credentials
Private keys-----BEGIN RSA PRIVATE KEY-----, -----BEGIN OPENSSH PRIVATE KEY-----

How to scan:

grep -rn -E "(sk-[a-zA-Z0-9]{20,}|AKIA[A-Z0-9]{16}|ghp_[a-zA-Z0-9]{36}|xoxb-|-----BEGIN (RSA |OPENSSH )?PRIVATE KEY-----)" .

Severity: 🔴 CRITICAL — Any match requires immediate remediation.

Remediation:

  1. Move credentials to environment variables or a dedicated credentials file
  2. Add the credentials file to .gitignore
  3. Reference credentials via $ENV_VAR in configs, never inline
  4. If credentials were committed to git: rotate them immediately (they're compromised)

Check 2: Personal Information Audit

Scan for PII that shouldn't appear in shareable/publishable files:

Metadata

Author@clawdssen
Stars2387
Views0
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-clawdssen-security-hardening": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags

#security#audit#hardening#secrets#credentials#prompt-injection#data-leakage#privacy#defense-in-depth#workspace-security
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.