com um clique
fix-security
Apply security fixes based on scan findings
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Apply security fixes based on scan findings
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
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.