tanviet12/vbsec/vbs-scan-security
Claude Code and agent skill by tanviet12/vbsec
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
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).
Install
npx vskill@latest install tanviet12/vbsec/vbs-scan-securitySemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as tanviet12/vbsec/vbs-scan-security.
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 có 30 rule quét (01–21 lỗi kinh điển, 23–31 lỗi của app SaaS: AI / MCP, cô lập tenant, phân quyền lệch giữa các đường, lộ dữ liệu quá mức, logic trạng thái / tiền, log chứa dữ liệu nhạy, vòng đời phiên, tiêu hao tài nguyên) + rule 22 tuỳ chọn (--sca). Lỗi có đường khai thác mà ngoài danh mục vẫn là finding (OTHER-CWE-<n>), tính vào kết luận. Kiến trúc SMALL/LARGE mode, cross-language mặc định + overlay chuyên sâu cho Go, PHP, TypeScript, Python, .NET, Dart.
Phiên bản: xem file `VERSION`. Mọi báo cáo in vbsec_version + commit của skill.
Public repo: https://github.com/tanviet12/vbsecLicense: 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) | |
/vbs-scan-security range <a>..<b> | Khoảng commit | Quét file đổi giữa 2 ref (vd v1.2.0..HEAD cho cổng phát hành), đọc snapshot tại <b> |
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=vihoặc--vi→ Tiếng Việt (mặc định)lang=enhoặ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 (6 ecosystem: NuGet/Go/npm/Composer/PyPI/Pub). Xem `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`. Ghi đè file nguồn — cần git repo, khuyến nghị working tree sạch trước khi chạy. | |
--context <file> | — | Nạp luật dự án (bất biến nghiệp vụ, vai, đối tượng nhạy, kênh agent) để soát lỗi logic / phân quyền theo đúng luật. Không truyền mà repo có .vbsec/context.md → tự nạp file đó. Mẫu: `references/project-context.md`. | |
--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ụ:
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
- 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
- Dùng tool phù hợp —
Grep,Read,Globthay vì bash grep/find - Đọ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
- 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`.
Workflow
Step 0: Parse Arguments
Dùng Bash tool ĐÚNG MỘT LẦN cho step này (gather files là việc của git, không phải reasoning).
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/vbs-scan-security/SKILL.md
Popularity
- Repository stars
- 206
- Repository forks
- 92
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tanviet12/vbsec/vbs-scan-security)