with one click
fix-security
Apply security fixes based on scan findings
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Apply security fixes based on scan findings
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Run ASH (Automated Security Helper) security scan with delta detection
Security-focused code review before committing
Pre-commit self-validation for code quality and security
| name | fix-security |
| description | Apply security fixes based on scan findings |
| allowed-tools | Read, Edit, Write, Grep, Glob, Bash(git:*) |
Apply fixes for security vulnerabilities identified by external scanners.
This skill is invoked during the remediation loop when external security scanners (Semgrep, ASH) have identified vulnerabilities. It reads the security context and applies targeted fixes.
state/security-context.mdCheck state/security-context.md for the specific findings that need to be addressed.
For each finding, identify:
Use the appropriate fix pattern for each vulnerability type:
# Before (VULNERABLE)
API_KEY = "sk-abc123..."
# After (SECURE)
import os
API_KEY = os.getenv('API_KEY')
# Before (VULNERABLE)
query = f"SELECT * FROM users WHERE id = {user_id}"
cursor.execute(query)
# After (SECURE)
query = "SELECT * FROM users WHERE id = ?"
cursor.execute(query, (user_id,))
# Before (VULNERABLE)
os.system(f"ls {user_input}")
# After (SECURE)
import subprocess
import shlex
subprocess.run(['ls', shlex.quote(user_input)], check=True)
# Before (VULNERABLE)
with open(f"data/{filename}") as f:
content = f.read()
# After (SECURE)
import os
safe_path = os.path.join("data", os.path.basename(filename))
if not os.path.abspath(safe_path).startswith(os.path.abspath("data")):
raise ValueError("Invalid path")
with open(safe_path) as f:
content = f.read()
// Before (package.json)
{
"dependencies": {
"lodash": "4.17.15" // Vulnerable version
}
}
// After
{
"dependencies": {
"lodash": "^4.17.21" // Patched version
}
}
After applying fixes:
/self-check to validate/fix-security
This skill reads from state/security-context.md and applies fixes to the identified issues.