RegexGuard for Openclaw

RegexGuard is a comprehensive safety and correctness analyzer that scans codebases for catastrophic backtracking, portability issues, and regex security vulnerabilities.

suhteevah
v1.0.2
Apr 14, 2026
0
584
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install regexguard

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 regexguard 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 RegexGuard?

RegexGuard is a specialized utility designed to audit regular expressions across diverse programming environments, including JavaScript, Python, Go, and Ruby. As a key addition to the Openclaw Skills library, it provides a 100% local, zero-telemetry solution for identifying 90 distinct regex anti-patterns. By analyzing how patterns are constructed and used, it protects applications from performance degradation and security exploits.

The tool focuses on providing actionable remediation guidance through a deductive scoring system. It allows developers to maintain high standards for regex quality by flagging issues like ReDoS vectors, engine-specific syntax errors, and missing validation anchors before they reach production.

RegexGuard Use Cases

  • Detecting catastrophic backtracking and ReDoS vulnerabilities in web server validators.
  • Auditing source code for non-portable regex syntax during cross-platform migrations.
  • Identifying pattern injection risks where unsanitized user input is used in regex constructors.
  • Ensuring validation regex patterns have correct anchoring to prevent security bypasses.
  • Automating regex quality audits as part of a pre-commit workflow or CI/CD pipeline.

How RegexGuard Works

  1. The user initiates a scan on a file or directory using the Openclaw Skills dispatcher script.
  2. The analyzer identifies all relevant source files while skipping binaries, git metadata, and external dependencies.
  3. RegexGuard executes a battery of pattern matching checks categorized by severity and functional impact.
  4. A quality score (0-100) is calculated based on detected issues, with critical vulnerabilities resulting in higher point deductions.
  5. The tool generates a report in text, JSON, or HTML format, detailing the file location, severity, and recommended fix for each finding.
  6. An exit code is returned (0 for pass, 1 for fail) based on whether the total score meets the configured threshold.

RegexGuard Setup

To get started with this skill, ensure you have the necessary dependencies installed and the configuration file updated.

# Install the required git hook manager
brew install lefthook

# Set your license key for Pro/Team features
export REGEXGUARD_LICENSE_KEY='your_key_here'

Configure the skill behavior in your ~/.openclaw/openclaw.json to define ignore patterns or severity thresholds.

RegexGuard Data Schema & Taxonomy

RegexGuard categorizes findings into six major technical domains to streamline remediation efforts:

Category Code Description Severity
Catastrophic Backtracking CB Nested quantifiers and exponential patterns Critical
Portability Errors PE Engine-specific syntax and lookbehind gaps High
Correctness Errors CE Unescaped dots and bad character class ranges High
Maintainability Issues MA Overly complex patterns and magic strings Medium
Anchoring & Boundaries AN Validation bypasses and missing anchors Critical
Pattern Injection PI Unsanitized user input in dynamic regex Critical

RegexGuard Advanced Features

  • Local-first execution ensures that no source code ever leaves your environment for analysis.
  • Native integration with lefthook for automated git hooks, preventing unsafe regex from being committed.
  • Flexible output formatting (JSON/HTML) allows for deep integration with automated reporting dashboards.
  • Tiered access levels provide specialized checks for enterprise-grade security, including anchoring and injection detection.
  • Customizable scoring thresholds allow teams to define their own standards for passing regex quality audits.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*