laravel-security
Laravel セキュリティベストプラクティス:認証・認可、バリデーション、CSRF、一括割当、ファイルアップロード、シークレット管理、レート制限、安全なデプロイメント
Original · translation did not pass checksTarget: Cloud, operations & security. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original Japanese text
Topics in the source
- Laravel セキュリティベストプラクティス
- アクティベートする時機
- 仕組み
- コアセキュリティ設定
- セッションとクッキーの強化
- 認証とトークン
- パスワードセキュリティ
- 認可:ポリシーとゲート
Laravel アプリケーションを一般的な脆弱性から守るための包括的なセキュリティガイダンス。 認証または認可を追加する場合 ユーザー入力とファイルアップロードを処理する場合 新しい API エンドポイントを構築する場合 シークレットと環境設定を管理する場合 本番環境デプロイメントを強化する場合 ミドルウェアは基本的な保護を提供(CSRF は VerifyCsrfToken 経由、セキュリティヘッダーは SecurityHeaders 経由) ガードとポリシーがアクセス制御を実施(auth:sanctum、$this->authorize、ポリシーミドルウェア) フォームリクエストが入力を検証し形成(UploadInvoiceRequest)サービスに到達する前に レート制限が不正使用保護を追加(RateLimiter::for('login'))認証制御と並行して データの安全性は暗号化されたキャスト、一括割当ガード、署名付きルート(URL::temporarySignedRoute + signed ミドルウェア)から来ます APPDEBUG=false を本番環境で設定 APPKEY をセットして、漏洩時にはローテーション必須 SESSIONSECURECOOKIE=true と SESSIONSAMESITE=lax(または機密アプリケーションは strict)を設定 正しい HTTPS 検出のため、信頼できるプロキシを設定 SESSIONHTTPONLY=true を設定して JavaScript アクセスを防止 高リスクフローに対して SESSIONSAMESITE=strict を使用 ログイン時と権限変更時にセッションを再生成 Laravel Sanctum または Passport を API 認証に使用 機密データの場合、有効期限の短いトークンとリフレッシュフローを優先 ログアウトと侵害されたアカウントでトークンを無効化 ルート保護例: Hash::make() でパスワードをハッシュし、平文で保存しない パスワードリセットフロー用に Laravel のパスワードブローカーを使用 モデルレベルの認可にはポリシーを使用 コントローラーとサービスで認可を実施 ルートレベルの実施にはポリシーミドルウェアを使用: フォームリクエストで常にユーザー入力をバリデーション 厳密なバリデーションルールと型チェックを使用 リクエストペイロードを派生フィールドに信頼しない $fillable または $guarded を使用して、Model::unguard() は回避 DTO またはかば詰明示的な属性マッピングを優先 Eloquent またはクエリビルダーのパラメータバインディングを使用 厳密に必要でない限り生 SQL を回避 Blade は標準で出力をエ
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- affaan-m/ECC
- Source file
- docs/ja-JP/skills/laravel-security/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Requirements
- Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.
A small first task
先阅读原作者说明,再决定是否在自己的 AI 工具中使用。
Instructions for your AI tool
- Claude Desktop: resource-specific guide not available yet
- Claude Code: resource-specific guide not available yet
- Cursor: resource-specific guide not available yet
- Codex: resource-specific guide not available yet
Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:49.400Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.