scan-sec — Security Scanner for Vibe Coders (Antigravity variant)
Scan security vulnerabilities for AI-generated code (vibe code). This skill checks for the 21 most common vulnerabilities of vibe code, inheriting the SMALL/LARGE mode architecture, generalized cross-language + deep-dive for Go/PHP/Python/TypeScript/.NET.
Platform: Google Antigravity. This version uses sequential chunking to preserve portability — ~3× slower but identical output.
Resource Router
| Resource | Relative Path | Description |
| :-- | :-- | :-- |
| Arguments Parser | scripts/parse-args.sh | Main script to parse scope arguments and gather target files |
| Language Detection | references/language-detection.md | Language detection guide to find primary repo language |
| Output Template | references/output-format.md | Layout template for report generation |
| Data Flow Classification | references/data-flow-classification.md | Data flow mapping (L1-L4) guidelines |
| Rules directory | rules/ | Directory containing all 21 generic, language-specific, and custom rule files |
| Project Extension | Projects/<name>/.agents/rules/ | Custom project security rules dynamically loaded during scans |
Extensible Security Engine & Domain Profiles
scan-sec automatically discovers and loads domain-specific security rules:
- Universal OWASP Baseline: Secrets, Auth/RBAC, Input Injection, Transport/TLS, Resource Limits.
- Healthcare & Medical (HIPAA): Patient Data Isolation, Audit Logs, PII/PHI Redaction.
- FinTech & E-commerce (PCI-DSS): Key Tokenization, Anti-Fraud, Transaction Protection.
- Multi-Tenant SaaS: Row-Level Security (RLS), Tenant Isolation Boundaries.
- AI & Agentic Systems: Prompt Injection Guards, Tool Execution Sandboxing.
- Custom Project Rules: Dynamic loading from
Projects/<name>/.agents/rules/*security*.md.
Invocation
In the Antigravity Agent Manager chat box:
- Auto-trigger: speak naturally — "scan security for this repo", "check security", "security audit". Antigravity automatically matches the description and loads the skill.
- Explicit slash command: if the workspace contains
.agents/workflows/scan-sec.md, type/scan-secto invoke.
| Argument | Scope | Description |
|---|---|---|
| (no args) | Entire repo | Default — scan the entire repository |
| all | Entire repo | Explicit alias |
| uncommitted / diff | Uncommitted changes | Staged + unstaged changes |
| staged | Staged files only | Pre-commit scan |
| project <name> | Specific project | Scan files in Projects/<name> |
| resource <name> | Specific resource | Scan files in Resources/<name> (or Areas/Learning/Resources) |
| area <name> | Specific area | Scan files in Areas/<name> |
| plan <path\|name> | Implementation Plan | Audit Plan file against OWASP rules using plan-security-report-template.md |
Output Language Selection: lang=vi / --vi (default) or lang=en / --en.
Examples:
scan security uncommitted lang=en
/scan-sec project app-tinycrm
/scan-sec plan Projects/website-hcc/artifacts/plans/v1.6.0-2026-08-13-google-sheets-notification.md
audit security resource para-workspace lang=vi
CRITICAL: How to use this skill (for LLM agent)
The bash/grep patterns in the rule files are EXAMPLES, NOT commands to be run literally.
Principles
- Reason, do not just pattern-match — Understand the security intent behind each check, do not just search for strings.
- Use appropriate tools — Antigravity has built-in file/grep tools (read, grep, search). Do not call raw shell grep/find when native tools are available.
- Read complete context — When finding a pattern, read the surrounding function to understand if it is a real vulnerability.
- Data flow trust levels — A string formatting query is only dangerous if the interpolated data is L1 (untrusted).
- No Auto-Remediation (Strict Guardrail) — The Agent MUST NOT modify, edit, or refactor any codebase file to fix vulnerabilities during or after the scan without explicit user request. The scanner is strictly a diagnostic tool. Remediation is user-led.
Data Flow Classification (L1–L4)
| Level | Source | Trust | Example |
|---|---|---|---|
| L1 | User input | UNTRUSTED | req.body, $_GET, request.params, HTTP headers, file uploads |
| L2 | Database | Semi-trusted | Values from DB whose origin was user input |
| L3 | Internal code | Trusted | Hardcoded strings, config keys, computed values |
| L4 | System | Trusted | Env vars, internal file paths, framework constants |
Key insight: f"SELECT ... {x}" is SAFE if x is L3+. It is CRITICAL if x is L1 without parameterization.