/vbs-scan-security
Use when scanning code for security vulnerabilities. Use when user says "scan security", "kiểm tra bảo mật", "security audit", "review security", or invokes `/vbs-scan-security`. Auto-delegates to sub-agents for large scans (>20 main-language files OR >30 total OR >14 days).
$ npx -y skills add tanviet12/vbsec --skill vbs-scan-security --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/vbs-scan-security
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when scanning code for security vulnerabilities. Use when user says "scan security", "kiểm tra bảo mật", "security audit", "review security", or invokes `/vbs-scan-security`. Auto-delegates to sub-agents for large scans (>20 main-language files OR >30 total OR >14 days).
SKILL.md
vbs-scan-security.SKILL.mdname: vbs-scan-security
description: Use when scanning code for security vulnerabilities. Use when user says "scan security", "kiểm tra bảo mật", "security audit", "review security", or invokes `/vbs-scan-security`. Auto-delegates to sub-agents for large scans (>20 main-language files OR >30 total OR >14 days). Outputs bilingual reports (vi/en). Optional `--auto-fix` (agentic patch + verify loop) and `--sca` (live CVE lookup via OSV.dev).
userInvocable: true
vbsec — Security Scanner cho Vibe Coders
Quét lỗ hổng bảo mật cho code do AI sinh ra (vibe code). Bộ skill này check 21 lỗi bảo mật phổ biến nhất của vibe code, kế thừa kiến trúc SMALL/LARGE mode từ bộ rule production của SePay, tổng quát hóa cross-language (mặc định) + chuyên sâu cho Go/PHP (phase 1).
> Public repo: https://github.com/tanviet12/vbsec > License: MIT (sẽ chốt khi public)
Invocation
| Command | Scope | Mô tả | |---|---|---| | `/vbs-scan-security` | **Toàn repo** (default từ v0.3) | Mặc định — quét toàn bộ repo | | `/vbs-scan-security all` | Toàn repo | Alias explicit của default | | `/vbs-scan-security uncommitted` | Uncommitted changes | Quét staged + unstaged (cần explicit từ v0.3) | | `/vbs-scan-security diff` | Uncommitted changes | Alias intuitive cho `uncommitted` | | `/vbs-scan-security staged` | Staged files only | Pre-commit scan | | `/vbs-scan-security commit within Xdays` | Recent commits | Quét commit X ngày gần đây | | `/vbs-scan-security commit id <sha>` | Specific commit | Quét 1 commit | | `/vbs-scan-security pr id <number>` | Pull request | Quét PR diff (cần `gh` CLI) |
**v0.3 change:** Default scope đổi từ `uncommitted` → `all`. Non-tech user lần đầu chạy không bị confused bởi report rỗng. Để giữ behavior cũ, dùng `uncommitted` hoặc `diff` explicit.
**Lựa chọn ngôn ngữ output (thêm vào bất kỳ scope nào):**
- `lang=vi` hoặc `--vi` → Tiếng Việt (mặc định)
- `lang=en` hoặc `--en` → English
**Cờ tùy chọn (v0.7+, mặc định TẮT — thêm vào bất kỳ scope nào):**
| Flag | Alias | Mô tả | |---|---|---| | `--sca` | `sca` | Tra cứu CVE **live** qua OSV.dev cho dependency (5 ecosystem: NuGet/Go/npm/Composer/PyPI). Xem [`references/dependency-scan.md`](references/dependency-scan.md). Cần network. | | `--auto-fix` | `auto-fix` | Tự sinh patch (unified diff) cho finding CRITICAL/HIGH, verify bằng build command, revert nếu fail. Xem [`workflows/auto-fix.md`](workflows/auto-fix.md). **Ghi đè file nguồn** — cần git repo, khuyến nghị working tree sạch trước khi chạy. | | `--run-tests` | — | Chỉ có tác dụng cùng `--auto-fix`: cho phép chạy test của project (`go test ./...`, `dotnet test`) để verify bản nâng version dependency. **Test có thể đụng hệ thống thật** (DB, dịch vụ trong `.env`) — chỉ bật khi test an toàn. Không bật → bump dependency chỉ là gợi ý patch. |
Ví dụ:
/vbs-scan-security pr id 42 lang=en
/vbs-scan-security staged --vi
/vbs-scan-security commit within 7days
/vbs-scan-security all --sca
/vbs-scan-security uncommitted --auto-fix
/vbs-scan-security all --sca --auto-fix
---
CRITICAL: Cách dùng skill này (cho LLM agent)
**Các pattern bash/grep trong rule files là VÍ DỤ minh họa, KHÔNG phải lệnh chạy literal.**
Nguyên tắc
1. **Lý luận, không pattern-match thuần** — Hiểu intent bảo mật đằng sau mỗi check, không chỉ tìm chuỗi 2. **Dùng tool phù hợp** — `Grep`, `Read`, `Glob` thay vì bash grep/find 3. **Đọc context đầy đủ** — Khi gặp pattern, READ hàm xung quanh để hiểu đây có thực sự là lỗ hổng không 4. **Phân loại trust level** — Một query có format chuỗi chỉ nguy hiểm nếu data ghép vào là **L1 (untrusted)**
Phân loại nguồn dữ liệu (L1–L4)
| Level | Nguồn | Tin cậy | Ví dụ | |---|---|---|---| | L1 | Input người dùng | **KHÔNG tin** | `req.body`, `$_GET`, `request.params`, HTTP header, file upload | | L2 | Database | Bán tin | Giá trị từ DB nhưng nguồn gốc là user input | | L3 | Code nội bộ | Tin | Hardcoded strings, config keys, computed values | | L4 | Hệ thống | Tin | Env vars, file paths nội bộ, framework constants |
**Key insight:** `f"SELECT ... {x}"` SAFE nếu `x` là L3+. CRITICAL nếu `x` là L1 không qua parameterization.
Tham khảo chi tiết: [`references/data-flow-classification.md`](references/data-flow-classification.md).
---
Workflow
┌─────────────────────────────────────────────────────────────────────┐
│ vbsec SCAN WORKFLOW │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ [Step 0] Parse args │
│ ├─ Scope (uncommitted/staged/commit/pr/all) │
│ └─ Output lang (vi default | en) │
│ ↓ │
│ [Step 1] Gather files (git) │
│ ↓ │
│ [Step 2] Detect primary code language │
│ └─ Đọc references/language-detection.md │
│ ↓ │
│ [Step 3] Route by size │
│ ┌──────────────────┬──────────────────┐ │
│ │ SMALL (inline) │ LARGE (delegate)│ │
│ │ ≤20 main+≤30tot │ >20 OR >30 OR │ │
│ │ AND ≤14d │ >14 ngày │ │
│ └─────┬────────────┴─────────┬────────┘ │
│ ↓ ↓ │
│ workflows/small- workflows/large- │
│ review.md review.md │
│ │
│ Both apply:
Read more
name: vbs-scan-security description: Use when scanning code for security vulnerabilities. Use when user says "scan security", "kiểm tra bảo mật", "security audit", "review security", or invokes `/vbs-scan-security`. Auto-delegates to sub-agents for large scans (>20 main-language files OR >30 total OR >14 days). Outputs bilingual reports (vi/en). Optional `--auto-fix` (agentic patch + verify loop) and `--sca` (live CVE lookup via OSV.dev). userInvocable: true
vbsec — Security Scanner cho Vibe Coders
Quét lỗ hổng bảo mật cho code do AI sinh ra (vibe code). Bộ skill này check 21 lỗi bảo mật phổ biến nhất của vibe code, kế thừa kiến trúc SMALL/LARGE mode từ bộ rule production của SePay, tổng quát hóa cross-language (mặc định) + chuyên sâu cho Go/PHP (phase 1).
> Public repo: https://github.com/tanviet12/vbsec > License: MIT (sẽ chốt khi public)
Invocation
| Command | Scope | Mô tả | |---|---|---| | `/vbs-scan-security` | **Toàn repo** (default từ v0.3) | Mặc định — quét toàn bộ repo | | `/vbs-scan-security all` | Toàn repo | Alias explicit của default | | `/vbs-scan-security uncommitted` | Uncommitted changes | Quét staged + unstaged (cần explicit từ v0.3) | | `/vbs-scan-security diff` | Uncommitted changes | Alias intuitive cho `uncommitted` | | `/vbs-scan-security staged` | Staged files only | Pre-commit scan | | `/vbs-scan-security commit within Xdays` | Recent commits | Quét commit X ngày gần đây | | `/vbs-scan-security commit id <sha>` | Specific commit | Quét 1 commit | | `/vbs-scan-security pr id <number>` | Pull request | Quét PR diff (cần `gh` CLI) |
**v0.3 change:** Default scope đổi từ `uncommitted` → `all`. Non-tech user lần đầu chạy không bị confused bởi report rỗng. Để giữ behavior cũ, dùng `uncommitted` hoặc `diff` explicit.
**Lựa chọn ngôn ngữ output (thêm vào bất kỳ scope nào):**
- `lang=vi` hoặc `--vi` → Tiếng Việt (mặc định)
- `lang=en` hoặc `--en` → English
**Cờ tùy chọn (v0.7+, mặc định TẮT — thêm vào bất kỳ scope nào):**
| Flag | Alias | Mô tả | |---|---|---| | `--sca` | `sca` | Tra cứu CVE **live** qua OSV.dev cho dependency (5 ecosystem: NuGet/Go/npm/Composer/PyPI). Xem [`references/dependency-scan.md`](references/dependency-scan.md). Cần network. | | `--auto-fix` | `auto-fix` | Tự sinh patch (unified diff) cho finding CRITICAL/HIGH, verify bằng build command, revert nếu fail. Xem [`workflows/auto-fix.md`](workflows/auto-fix.md). **Ghi đè file nguồn** — cần git repo, khuyến nghị working tree sạch trước khi chạy. | | `--run-tests` | — | Chỉ có tác dụng cùng `--auto-fix`: cho phép chạy test của project (`go test ./...`, `dotnet test`) để verify bản nâng version dependency. **Test có thể đụng hệ thống thật** (DB, dịch vụ trong `.env`) — chỉ bật khi test an toàn. Không bật → bump dependency chỉ là gợi ý patch. |
Ví dụ:
/vbs-scan-security pr id 42 lang=en /vbs-scan-security staged --vi /vbs-scan-security commit within 7days /vbs-scan-security all --sca /vbs-scan-security uncommitted --auto-fix /vbs-scan-security all --sca --auto-fix
---
CRITICAL: Cách dùng skill này (cho LLM agent)
**Các pattern bash/grep trong rule files là VÍ DỤ minh họa, KHÔNG phải lệnh chạy literal.**
Nguyên tắc
1. **Lý luận, không pattern-match thuần** — Hiểu intent bảo mật đằng sau mỗi check, không chỉ tìm chuỗi 2. **Dùng tool phù hợp** — `Grep`, `Read`, `Glob` thay vì bash grep/find 3. **Đọc context đầy đủ** — Khi gặp pattern, READ hàm xung quanh để hiểu đây có thực sự là lỗ hổng không 4. **Phân loại trust level** — Một query có format chuỗi chỉ nguy hiểm nếu data ghép vào là **L1 (untrusted)**
Phân loại nguồn dữ liệu (L1–L4)
| Level | Nguồn | Tin cậy | Ví dụ | |---|---|---|---| | L1 | Input người dùng | **KHÔNG tin** | `req.body`, `$_GET`, `request.params`, HTTP header, file upload | | L2 | Database | Bán tin | Giá trị từ DB nhưng nguồn gốc là user input | | L3 | Code nội bộ | Tin | Hardcoded strings, config keys, computed values | | L4 | Hệ thống | Tin | Env vars, file paths nội bộ, framework constants |
**Key insight:** `f"SELECT ... {x}"` SAFE nếu `x` là L3+. CRITICAL nếu `x` là L1 không qua parameterization.
Tham khảo chi tiết: [`references/data-flow-classification.md`](references/data-flow-classification.md).
---
Workflow
┌─────────────────────────────────────────────────────────────────────┐ │ vbsec SCAN WORKFLOW │ ├─────────────────────────────────────────────────────────────────────┤ │ │ │ [Step 0] Parse args │ │ ├─ Scope (uncommitted/staged/commit/pr/all) │ │ └─ Output lang (vi default | en) │ │ ↓ │ │ [Step 1] Gather files (git) │ │ ↓ │ │ [Step 2] Detect primary code language │ │ └─ Đọc references/language-detection.md │ │ ↓ │ │ [Step 3] Route by size │ │ ┌──────────────────┬──────────────────┐ │ │ │ SMALL (inline) │ LARGE (delegate)│ │ │ │ ≤20 main+≤30tot │ >20 OR >30 OR │ │ │ │ AND ≤14d │ >14 ngày │ │ │ └─────┬────────────┴─────────┬────────┘ │ │ ↓ ↓ │ │ workflows/small- workflows/large- │ │ review.md review.md │ │ │ │ Both apply:
Security scanning skill for Claude Code, Codex and Antigravity. Finds the 21 most common vulnerabilities in AI-written code and shows how to fix each one.

