security-secret-scanner
Skill1 starsChanged 46 days agoMITView on GitHub
Quét thời gian thực phát hiện rò rỉ API Keys, Token, Private Key, Database Credentials, thông tin PII (CCCD, SĐT, OTP) trong code, log và git diff.
- Reads credentials
In this repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adopt-repoSkill
- agent-strict-guardSkill
- analyze-featureSkill
- backend-api-design-flowSkill
- clean-code-naming-conventionsSkill
- code-review-gateSkill
- dangerous-action-blockerSkill
- database-transaction-managementSkill
- db-interface-procedure-flowSkill
- db-migrationSkill
- defensive-troubleshooting-guideSkill
- git-workflowSkill
- human-authority-overrideSkill
- human-master-mapSkill
- implement-featureSkill
- jpa-n-plus-one-optimizationSkill
- knowledge-graphSkill
- multi-language-error-handlingSkill
- post-code-verificationSkill
- project-doctorSkill
- project-governance-dashboardSkill
- redis-cache-patternsSkill
- release-notesSkill
- safe-git-rebaseSkill
- speckit-analyzeSkill
- speckit-auditSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-helpSkill
- speckit-implementSkill
- speckit-ingestSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- spec-writerSkill
- spring-middleware-pipelineSkill
- sql-repository-patternSkill
- system-dna-managerSkill
- test-featureSkill
- adopt-repoSkill
- agent-strict-guardSkill
- analyze-featureSkill
- backend-api-design-flowSkill
- clean-code-naming-conventionsSkill
- code-review-gateSkill
- dangerous-action-blockerSkill
- database-transaction-managementSkill
- db-interface-procedure-flowSkill
- db-migrationSkill
- defensive-troubleshooting-guideSkill
- git-workflowSkill
- human-authority-overrideSkill
- human-master-mapSkill
- implement-featureSkill
- jpa-n-plus-one-optimizationSkill
- knowledge-graphSkill
- multi-language-error-handlingSkill
- The first 60 shown.
The file
Files
<!-- GENERATED FROM registry/skills/security-secret-scanner/SKILL.md — DO NOT EDIT DIRECTLY --><!-- GENERATED FROM .shared/skills/03-hooks/security-secret-scanner/SKILL.md — DO NOT EDIT DIRECTLY -->Skill — Security & Secret Scanner (Bộ Quét Bảo Mật & Rò Rỉ Thông Tin)
Skill này cung cấp cơ chế quét liên tục và tự động phát hiện mọi rủi ro lộ bí mật (Secret Leakage) và dữ liệu khách hàng nhạy cảm (PII).
🔍 CÁC MẪU DỮ LIỆU CẤM TUYỆT ĐỐI (ZERO-TOLERANCE PATTERNS)
| Danh mục | Mẫu vi phạm (Regex / Pattern) | Mức độ nghiêm trọng | Hành động | |||
| API Secret / Key | `(?i)(client_secret | clientsecret | secret_key | api_key)\s*[:=]\s*["'][A-Za-z0-9_-]{8,}["']` | 🚨 CRITICAL | HALT & BLOCK |
| AWS / Cloud Key | AKIA[0-9A-Z]{16} / aws_secret_access_key | 🚨 CRITICAL | HALT & BLOCK | |||
| Private Key | `-----BEGIN (RSA | EC | OPENSSH | PGP) PRIVATE KEY-----` | 🚨 CRITICAL | HALT & BLOCK |
| Raw JWT / Token | eyJ[A-Za-z0-9-_]+\.eyJ[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+ | 🚨 CRITICAL | HALT & BLOCK | |||
| PII (CCCD 12 số) | \b[0-9]{12}\b (khi in thẳng ra log mà không mask) | ⚠️ HIGH | HALT & BLOCK | |||
| Password Hardcode | `(?i)(password | passphrase | db_pass)\s*[:=]\s*["'][^"'\s]{4,}["']` | 🚨 CRITICAL | HALT & BLOCK |
🛡️ QUY CHUẨN MASKING BẮT BUỘC
Mọi dữ liệu nhạy cảm trước khi đưa vào LogDTO phải đi qua hàm mask:
private String mask(String str) {
if (!str) return str
int len = str.length()
if (len <= 4) return "*".repeat(len)
return str.substring(0, 2) + "*".repeat(len - 4) + str.substring(len - 2)
}🚨 KHI PHÁT HIỆN RÒ RỈ SECRET:
- Dừng ngay lập tức quá trình build / commit / execution.
- Xóa bỏ dòng code hoặc câu log vi phạm.
- Chuyển credentials sang biến môi trường (
.envkhông commit) hoặc Vault/Secret Manager.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

