← スキル一覧に戻る

security-scan-policy
by AmnadTaowsoam
⭐ 0🍴 0📅 2026年1月24日
SKILL.md
name: Security Scan Policy description: Policy สำหรับ automated security scanning ใน CI/CD pipeline รวม dependency audit, SAST, และ secret detection
Security Scan Policy
Overview
Policy สำหรับ automated security scanning - dependency vulnerabilities, code vulnerabilities, secrets - ต้องผ่านก่อน deploy
Why This Matters
- Prevent breaches: จับ vulnerabilities ก่อน production
- Compliance: Meet security requirements
- Automated: ไม่พลาด human error
- Fast feedback: รู้ทันทีถ้ามี issue
Security Checks
1. Dependency Audit
# Check for vulnerable dependencies
npm audit --audit-level=high
# Must have 0 high/critical vulnerabilities
✓ 0 vulnerabilities found
2. SAST (Static Analysis)
# Scan code for security issues
npm run security:scan
# Check for:
- SQL injection
- XSS vulnerabilities
- Insecure crypto
- Hardcoded secrets
3. Secret Detection
# Scan for leaked secrets
git-secrets --scan
# Check for:
- API keys
- Passwords
- Private keys
- Tokens
CI Pipeline
# .github/workflows/security.yml
name: Security Scan
on: [pull_request, push]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Dependency Audit
run: npm audit --audit-level=high
- name: SAST Scan
uses: github/codeql-action/analyze@v2
- name: Secret Scan
uses: trufflesecurity/trufflehog@main
- name: Container Scan
run: trivy image myapp:latest
Severity Levels
| Level | Action | Example |
|---|---|---|
| Critical | Block merge | RCE vulnerability |
| High | Block merge | SQL injection |
| Medium | Warning | Weak crypto |
| Low | Info only | Outdated dependency |
Tools
Dependency: npm audit, Snyk
SAST: CodeQL, SonarQube
Secrets: TruffleHog, git-secrets
Container: Trivy, Grype
Summary
Security Scan: Automated security checks
Checks:
- Dependency audit (npm audit)
- SAST (CodeQL)
- Secret detection (TruffleHog)
- Container scan (Trivy)
Policy:
- Critical/High: Block merge
- Medium: Warning
- Low: Info only
No exceptions for Critical/High
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です