laravel-security
Laravel security best practices — authentication, authorization, Eloquent safety, CSRF, XSS prevention, API security, and secure deployment configurations. Use when reviewing Laravel auth, Eloquent safety, CSRF, XSS, API security, or deployment configuration.
- Kind
- Skill
- Works with
- Claude Code, Codex
- Languages
- PHP
- Source
- affaan-m/ECC @ d3b8a3e90890
- Path
- skills/laravel-security/SKILL.md
- Jobs
- Guardrails, Review
- Topics
- Security audits, Auth & identity
Credit
- Made by
- affaan-m
- Original
- github.com/affaan-m/ECC/blob/d3b8a3e908904e242ed2dbe66af62cca…
- License
- MIT
Listed by Skill Manifest; not made by us.
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
- Adds
- .claude/skills/laravel-security/ (the skill folder)
- Runs scripts
- Yes
- shell block in the text
- Uses the network
- Yes
- HTTP client calls
- downloads packages
- Needs secrets
- Yes
- APP_KEY
- DB_PASSWORD
- TOKEN
- AWS_SECRET_ACCESS_KEY
- Reads environment variables
- APP_KEY
- DB_PASSWORD
- TOKEN
- AWS_SECRET_ACCESS_KEY
- STRIPE_KEY
- Calls other skills
- /orders
- /span
- /admin
- /posts
- /button
- /form
- and 2 more
- Source revision
- d3b8a3e90890
- Licence
- MIT
- Last activity
- 23 Nov 2026
- Source changed after the scan
- Yes
- Last push 23 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
- Review
- Reviewed
Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.
# Laravel Security Best Practices
Comprehensive security guidelines for Laravel applications to protect against common vulnerabilities.
## When to Activate
- Setting up Laravel authentication and authorization (Sanctum, Passport, Jetstream, Breeze)
- Implementing user roles, permissions, and policies
- Configuring production security settings and environment variables
- Reviewing Laravel applications for security vulnerabilities
- Deploying Laravel applications to production
- Writing secure Eloquent queries and migrations
## Production Configuration
### Essential Production Settings
```php
// config/app.php
'env' => env('APP_ENV', 'production'),
'debug' => (bool) env('APP_DEBUG', false), // CRITICAL: Never true in production
'key' => env('APP_KEY'), // Must be set: php artisan key:generate
// config/session.php
'secure' => env('SESSION_SECURE_COOKIE', true),
'http_only' => true,
'same_site' => 'lax',
// Verify APP_KEY is set at boot
// bootstrap/app.php or a service provider
if (empty(config('app.key'))) {
throw new RuntimeException('APP_KEY is not set. Run: php artisan key:generate');
}
```
### Environment File Security
```bash
…