← スキル一覧に戻る

security-scanning
by Smarter-Poker
Smarter-Poker-World-Hub
⭐ 0🍴 0📅 2026年1月26日
SKILL.md
name: Security Scanning description: Security vulnerability scanning, dependency audits, and best practices
Security Scanning Skill
Dependency Auditing
NPM Audit
# Check for vulnerabilities
npm audit
# Auto-fix what's possible
npm audit fix
# Force fix (may break things)
npm audit fix --force
# Generate report
npm audit --json > audit-report.json
Snyk (if installed)
# Test for vulnerabilities
snyk test
# Monitor project
snyk monitor
Secret Detection
git-secrets
# Scan for secrets in git history
git secrets --scan
# Install hooks
git secrets --install
Manual Patterns to Check
# Search for hardcoded secrets
grep -rn "password\|secret\|api_key\|apikey\|token" --include="*.js" --include="*.ts" .
# Check for exposed .env files
find . -name ".env*" -not -path "./node_modules/*"
Headers & HTTPS
Security Headers Check
# Check security headers
curl -I https://smarter.poker | grep -iE "(strict-transport|x-frame|x-content|content-security|x-xss)"
Required Headers
// helmet.js for Express
const helmet = require('helmet');
app.use(helmet());
// Next.js headers
module.exports = {
async headers() {
return [{
source: '/:path*',
headers: [
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'Strict-Transport-Security', value: 'max-age=31536000; includeSubDomains' }
]
}];
}
};
SQL Injection Prevention
// NEVER do this
const query = `SELECT * FROM users WHERE id = ${userId}`;
// ALWAYS use parameterized queries (Supabase does this automatically)
const { data } = await supabase
.from('users')
.select('*')
.eq('id', userId);
XSS Prevention
// Sanitize user input
import DOMPurify from 'dompurify';
const cleanHTML = DOMPurify.sanitize(dirtyHTML);
// React auto-escapes, but avoid dangerouslySetInnerHTML
Environment Security
# Check .gitignore includes sensitive files
grep -E "\.env|\.pem|\.key" .gitignore
# Verify no secrets in git history
git log -p | grep -iE "(password|secret|api_key)" | head -20
OWASP Top 10 Checklist
- Injection (SQL, NoSQL, OS, LDAP)
- Broken Authentication
- Sensitive Data Exposure
- XML External Entities (XXE)
- Broken Access Control
- Security Misconfiguration
- Cross-Site Scripting (XSS)
- Insecure Deserialization
- Using Components with Known Vulnerabilities
- Insufficient Logging & Monitoring
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です