Secret Detection for Openclaw

A security-focused git pre-commit hook that scans for API keys, passwords, and tokens to prevent accidental data leakage.

derick001
v1.0.0
Feb 25, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install secret-detection

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install secret-detection using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Secret Detection?

The Secret Detection skill for Openclaw Skills provides a robust local security layer for developers. It functions as a git pre-commit hook that automatically analyzes staged files for sensitive patterns, such as cloud provider keys or hardcoded credentials, before they can be committed to the repository history. By implementing this skill, you ensure that your Openclaw Skills workflows remain secure and compliant with modern security standards.

This utility is entirely self-contained, requiring no external APIs or third-party services to function. It helps teams maintain a clean codebase and prevents the costly and time-consuming process of rotating leaked credentials by stopping the leak at the source—the local commit process.

Secret Detection Use Cases

  • Preventing the accidental commit of AWS keys, GitHub tokens, or Stripe secrets to public repositories.
  • Enforcing security best practices across a distributed team using Openclaw Skills.
  • Performing manual security audits on specific configuration files before staging them.
  • Automating local security checks in CI/CD pipelines where Python is available.

How Secret Detection Works

  1. The developer installs the skill as a git pre-commit hook within their local repository.
  2. Upon executing a git commit command, the hook intercepts the process and triggers the scanner.
  3. The scanner evaluates all staged files against a library of high-entropy secret patterns.
  4. If secrets are detected, the skill identifies the file name and line number for the developer.
  5. The git commit is blocked with a non-zero exit code if vulnerabilities are found, otherwise, it proceeds normally.

Secret Detection Setup

To get started with Secret Detection for your Openclaw Skills environment, follow these steps:

# Install the pre-commit hook in your current git repository
./scripts/main.py install

# Manually scan your staged files to check for secrets
./scripts/main.py scan --staged

# Scan a specific file for sensitive information
./scripts/main.py scan --file path/to/your/config.yaml

Secret Detection Data Schema & Taxonomy

Element Type Description
Hook Location File Path Installs at .git/hooks/pre-commit
Scanning Engine Python Local regex-based pattern matching
Report Output CLI Returns line numbers and truncated secret identifiers
Exit Status Integer 0 for success (no secrets), 1 for failure (secrets found)

Secret Detection Advanced Features

  • Targeted file scanning allows developers to audit specific assets without staging them in git.
  • Truncated secret reporting helps identify which key was flagged without exposing the full sensitive string in logs.
  • Integration with the local Openclaw Skills ecosystem ensures high-speed scanning without network latency.
  • Supports various secret types including environment variables, hardcoded passwords, and platform-specific API keys.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0