skills/security-review/SKILL.md
Security audit checklist and workflow. Run before commits, PRs, or deploying. Covers secrets detection, input validation, OWASP Top 10, and dependency scanning.
npx skillsauth add a2mus/ecc-antigravity security-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
.env files are listed in .gitignore# WRONG — never do this
API_KEY = "sk-abc123..."
database_url = "postgresql://user:password@host/db"
# CORRECT — always use environment variables
import os
API_KEY = os.environ["API_KEY"] # raises KeyError if missing — intentional
DATABASE_URL = os.environ["DATABASE_URL"]
For QGIS plugins, use the QGIS settings API for user configuration:
from qgis.core import QgsSettings
settings = QgsSettings()
api_key = settings.value("my_plugin/api_key", "")
# WRONG
cursor.execute(f"SELECT * FROM layers WHERE name = '{user_input}'")
# CORRECT — always use parameterized queries
cursor.execute("SELECT * FROM layers WHERE name = ?", (user_input,))
# or with psycopg2/SQLAlchemy:
cursor.execute("SELECT * FROM layers WHERE name = %s", (user_input,))
import os
from pathlib import Path
# WRONG
file_path = base_dir + user_provided_path
# CORRECT — validate the path stays within bounds
def safe_path(base: Path, user_input: str) -> Path:
target = (base / user_input).resolve()
if not str(target).startswith(str(base.resolve())):
raise ValueError("Path traversal detected")
return target
# Python — check for known vulnerabilities
pip install safety
safety check
# Or use pip-audit
pip install pip-audit
pip-audit
If a security issue is discovered:
| Risk | Check |
|------|-------|
| Injection | Parameterized queries, input validation |
| Broken Auth | Server-side session, strong token validation |
| Sensitive Data Exposure | No secrets in code, encrypted storage |
| Security Misconfiguration | No debug mode in prod, remove defaults |
| XSS | Sanitize all user-controlled HTML output |
| CSRF | Validate origin, use CSRF tokens |
| Using Vulnerable Components | pip-audit, npm audit |
| Insufficient Logging | Log auth failures, suspicious patterns |
development
Test-Driven Development workflow. Enforces RED → GREEN → REFACTOR cycle with 80% coverage gate. Use for all new features and bug fixes.
tools
Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Use whenever adding new functionality.
development
Comprehensive Python idioms, best practices, and patterns. Covers dataclasses, type hints, async, error handling, testing, and QGIS-specific patterns.
development
React and Next.js patterns — component architecture, state management, data fetching, performance optimization, accessibility, and TypeScript conventions for web apps.