Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

セキュリティ対策リスト #26

Open
14 of 36 tasks
riii111 opened this issue Jan 22, 2025 · 1 comment
Open
14 of 36 tasks

セキュリティ対策リスト #26

riii111 opened this issue Jan 22, 2025 · 1 comment

Comments

@riii111
Copy link
Owner

riii111 commented Jan 22, 2025

セキュリティ対策チェックリスト

認証・認可

  • セッション管理+CSRF対策 #31

    • セッション管理
      • セキュアなセッションID生成
      • セッションタイムアウトの設定
      • セッションの暗号化
    • CSRF対策
      • トークンの生成と検証
      • Double Submit Cookie Pattern の実装
  • パスワードセキュリティ

    • 適切なハッシュ化(bcrypt)
    • パスワード強度のバリデーション

HTTPセキュリティヘッダ

  • Secure Headers の設定 #30
    • X-Frame-Options
    • X-Content-Type-Options
    • X-XSS-Protection
    • Content-Security-Policy
    • Strict-Transport-Security
      github.com/unrolled/secureで対策可能。

入力検証

アクセス制御

エラーハンドリング

  • セキュアなエラーメッセージ
  • 本番環境でのスタックトレース非表示
  • ログローテーション

データベースセキュリティ

  • パラメータ化クエリの使用
  • 最小権限の原則
  • データベース接続の暗号化

監視・ロギング

  • セキュリティイベントのログ記録
  • 異常検知
  • 監査ログの保管
@riii111
Copy link
Owner Author

riii111 commented Jan 22, 2025

実装の優先順位

  1. セッション管理の改善(gin-contrib/sessionsの導入) + CSRFの実装
  2. セキュリティヘッダの設定
  3. レート制限の実装

riii111 added a commit that referenced this issue Jan 22, 2025
CSRFトークンチェック追加+Cookie保持によるセッション認証に変更
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant