スキル一覧に戻る
bajor3k

security-audit

by bajor3k

0🍴 0📅 2026年1月21日
GitHubで見るManusで実行

SKILL.md


name: security-audit description: Guide for ensuring application security. Use when reviewing code for vulnerabilities, validating inputs, or checking permissions.

Security Audit Skill

This skill provides a checklist and set of rules to identify and prevent security vulnerabilities in the application.

When to use this skill

  • When reviewing API routes or Server Actions.
  • When modifying database schemas or access patterns.
  • When handling user authentication or authorization.
  • When adding new dependencies.

Audit Checklist

1. Authentication & Authorization

  • Middleware Protection: Are sensitive routes successfully blocked by middleware?
  • Role Checks: Does the code explicitly check for user roles (e.g., admin, user) before performing actions?
  • Server Actions: Are Server Actions properly protected? (They expose public endpoints by default).
  • Firebase Rules: Are Firestore security rules restrictive enough? (e.g., request.auth != null).

2. Data Validation & Injection

  • Input Validation: Is zod used to validate all incoming data on API routes and Server Actions?
  • No Raw SQL: Are we using ORM methods (Prisma) instead of raw SQL queries (which are prone to injection)?
  • XSS Prevention: Are we avoiding dangerouslySetInnerHTML unless absolutely necessary and sanitized?

3. Secrets & Configuration

  • No Hardcoded Secrets: Are API keys, tokens, and passwords stored in .env and accessed via process.env?
  • Public vs Private: Are we ensuring only NEXT_PUBLIC_ variables are exposed to the client?

4. Dependency Safety

  • Audit: Has npm audit been run recently?
  • Versions: Are we using stable versions of critical libraries (e.g., firebase, next-auth, @prisma/client)?

Common Vulnerabilities to Look For

  • Broken Object Level Authorization (BOLA/IDOR): Can User A access User B's data by changing an ID in the URL/payload?
  • Mass Assignment: Can a user update fields they shouldn't (e.g., isAdmin: true) by sending extra JSON data? (Zod schemas usually prevent this).
  • Improper Error Handling: Do error messages leak sensitive stack traces or database details to the user?

If you find a vulnerability:

  1. Blocker: Mark it as a critical issue.
  2. Fix: Propose a fix (e.g., "Wrap this API handler with withAuth", "Add Zod validation").
  3. Verify: Explain how to verify the fix works (e.g., "Try sending a request without a token").

スコア

総合スコア

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

レビュー

💬

レビュー機能は近日公開予定です