Install
openclaw skills install neckr0ik-security-fixerAuto-fix security vulnerabilities in OpenClaw skills. Works with neckr0ik-security-scanner to automatically remediate hardcoded secrets, shell injection risk...
openclaw skills install neckr0ik-security-fixerAutomatically fixes security vulnerabilities found by neckr0ik-security-scanner.
# Scan and fix in one command
neckr0ik-security-fixer fix /path/to/skill --auto
# Interactive fix (confirm each change)
neckr0ik-security-fixer fix /path/to/skill
# Generate .env.example only
neckr0ik-security-fixer env /path/to/skill
| Issue | Fix Applied |
|---|---|
| Hardcoded Secrets | Replaces with os.environ.get() + generates .env.example |
| Shell Injection | Converts to subprocess.run() with shell=False |
| eval/exec | Wraps with safe alternatives or flags for review |
| Issue | Fix Applied |
|---|---|
| Prompt Injection | Adds sanitization wrapper |
| Path Traversal | Adds pathlib validation |
--auto) or prompts for confirmation.env.example with detected secret placeholders.gitignore to exclude .envBefore:
api_key = "sk-abc123def456..."
After:
import os
api_key = os.environ.get("OPENAI_API_KEY")
if not api_key:
raise ValueError("OPENAI_API_KEY environment variable required")
Generated .env.example:
OPENAI_API_KEY=your-key-here
Before:
os.system(f"convert {filename} output.png")
After:
import subprocess
result = subprocess.run(
["convert", filename, "output.png"],
capture_output=True,
check=True
)
Before:
prompt = f"User says: {user_input}"
After:
import re
def sanitize_for_prompt(text: str) -> str:
return re.sub(r'[<>\{\}\[\]\\]', '', text[:1000])
prompt = f"User says: {sanitize_for_prompt(user_input)}"
neckr0ik-security-fixer fix <skill-path> [options]
Options:
--auto Apply all fixes without prompting
--dry-run Show what would be fixed without making changes
--backup Create .bak files before modifying
neckr0ik-security-fixer env <skill-path>
Generates:
- .env.example (template with placeholders)
- Updates .gitignore to exclude .env
neckr0ik-security-fixer report <skill-path> --format json
Outputs a detailed fix report with:
- Original vulnerable code
- Fixed code
- Files modified
- Manual review items
--no-backup)neckr0ik-security-scanner - Scan for vulnerabilities firstreferences/fix-templates.md - Complete fix template libraryscripts/fixer.py - Main fixer script