agentleFS
jeremychoijeremychoi/agent-skills/skills/openclaw-hardening/SKILL.md

openclaw-hardening

Skill0 starsChanged 10 months agoMITView on GitHub

A comprehensive security auditor for OpenClaw/Moltbot/Clawdbot instances. It checks for common misconfigurations, insecure network bindings, and exposed secrets. Use this skill when a user asks to "secure my agent," "audit openclaw," "check for vulnerabilities," or "harden my configuration.

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. billyhetech/clawshelf-skills★ 0same name
    2. nradawg/openclaw-hardening★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Search for the primary configuration file.

    line 15
  2. Distinctive:

    Check Network Bindings (CRITICAL):

    line 17
  3. Very specific:

    Check for gateway.auth.token or gateway.auth.password.

    line 25
  4. Very specific:

    Verify permissions of the .openclaw directory.

    line 45
  5. Very specific:

    Verify permissions of openclaw.json.

    line 46
  6. Very specific:

    When executing shell commands to check permissions (e.g., ls -l), use the bash tool.

    line 76
  7. Very specific:

    When reading config files, use the fs.readFile tool.

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OpenClaw Hardening & Security Auditor

This skill provides a structured workflow to analyze the security posture of an OpenClaw deployment. It focuses on identifying the "Lethal Trifecta" of risks: Privileged Access, Network Exposure, and Untrusted Input.

Instructions

Phase 1: Reconnaissance & Configuration Analysis

  1. Locate Configuration:
    • Search for the primary configuration file. Check standard locations in order: ~/.openclaw/openclaw.json, ~/.moltbot/config.json, or the directory specified in the OPENCLAW_CONFIG environment variable.
    • Load the file and identify the gateway configuration block.
  2. Check Network Bindings (CRITICAL):
    • Inspect gateway.bind.
      • PASS: If set to "loopback" or 127.0.0.1.
      • FAIL: If set to "0.0.0.0", "lan", or a public IP address.
    • Inspect gateway.port. Note the port (default 18789).
    • Proxy Vulnerability Check: Check if the environment suggests a reverse proxy usage (e.g., presence of Nginx/Caddy config files). If a proxy is likely, verify if gateway.trustedProxies is configured in openclaw.json.
      • RISK: If trustedProxies is missing or empty, flag as HIGH RISK (Localhost Trust Bypass Vulnerability).
  3. Authentication Verification:
    • Check for gateway.auth.token or gateway.auth.password.
    • FAIL: If these are null, empty, or set to default strings (e.g., "changeme", "password").
    • CRITICAL: Check for dangerous flags: gateway.controlUi.allowInsecureAuth or dangerouslyDisableDeviceAuth. If either is true, flag as CRITICAL.
  4. Sandbox Status:
    • Inspect agents.defaults.sandbox.
    • PASS: If mode is "non-main" or "all".
    • WARN: If mode is "off".
    • FAIL: If the process is running as root user without strict sandboxing.

Phase 2: Skill Auditing

  1. Review Installed Skills:
    • List contents of ~/.openclaw/skills/ or ~/.openclaw/extensions/.
    • Malware Scan: Search skill directories for suspicious keywords in manifest.json or code files. Look for: curl, wget, eval, exec, process.env, child_process.
    • Provenance Check: Flag any skills with "unknown" or "community" provenance that haven't been pinned or verified.
    • Specific Threat: Check for a skill named "What Would Elon Do?" or similar variants known to be malicious.

Phase 3: Filesystem & Secret Hygiene

  1. Permission Check:
    • Verify permissions of the .openclaw directory. It should be 700 (user read/write/execute only).
    • Verify permissions of openclaw.json. It should be 600 (user read/write only).
  2. Secret Exposure:
    • Scan the configuration file for plaintext secrets (API keys starting with sk-, OAuth tokens).
    • Recommendation: If found, advise the user to move these to environment variables or use the Auth0 Token Vault integration.

Phase 4: Remediation & Reporting

  1. Generate Report:
    • Summarize findings into a Markdown table with columns: Component, Status (PASS/WARN/FAIL), Risk Level, Remediation.
  2. Actionable Fixes:
    • For Network Fails: "Set gateway.bind to 127.0.0.1 immediately to prevent public exposure."
    • For Auth Fails: "Generate a strong, random token and set gateway.auth.token."
    • For Proxy Issues: "Configure gateway.trustedProxies with your Nginx IP or set LOCALHOST_TRUST_ENABLED=false."

Examples

User: "Is my OpenClaw secure?" Claude: "I will run the hardening audit. First, I'm checking your network config...

  • Analysis: I found gateway.bind is set to 0.0.0.0.
  • Result: FAIL (Critical Risk). Your agent is listening on all network interfaces.
  • Remediation: Change this to 127.0.0.1 in openclaw.json."

User: "Check my skills for malware." Claude: "Scanning ~/.openclaw/skills...

  • Analysis: I detected a skill named 'weather-pro' that contains an obfuscated curl command to an external IP.
  • Result: FAIL (High Risk). This resembles a known malware pattern.
  • Remediation: Delete the weather-pro directory immediately and rotate your API keys."

Execution Context

  • When executing shell commands to check permissions (e.g., ls -l), use the bash tool.
  • When reading config files, use the fs.readFile tool.
  • Safety First: Do not display full API keys or tokens in the output. Mask them (e.g., sk-ant...).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.