laravel-security
Skill by affaan-m
laravel-security gives an AI assistant Laravel security best practices for authentication, authorization, Eloquent safety, CSRF, and secure deployment settings. It is for developers reviewing or deploying Laravel applications.
Install laravel-security
Built from the published package, never by AI.
git clone --depth 1 https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.claude/skills && cp -r /tmp/ECC/skills/laravel-security ~/.claude/skills/laravel-securityRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/ECC/skills/laravel-security ~/.gemini/antigravity-cli/skills/laravel-securityAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
laravel-security is an agent skill that gives an AI assistant Laravel security guidelines. It covers production configuration such as debug mode, APP_KEY, secure session cookies and HTTPS enforcement. It also covers authentication with Sanctum, password hashing, session regeneration, gates and policies, and authorization middleware.
Further sections cover Eloquent safety, including mass assignment protection, parameterized queries, attribute casting and hidden model fields. The file also describes default CSRF protection. Its when-to-activate list covers setting up auth, roles and policies, production settings, and reviewing apps for vulnerabilities. The source is written as code examples and rules to follow, aimed at developers building or auditing Laravel apps.
Written from the project's SKILL.md and checked against it.
What it can do
- Production configuration reviewChecks debug mode, APP_KEY, secure session cookies and environment file handling.
- HTTPS enforcementShows how to force HTTPS in production and limit trusted proxy ranges.
- Sanctum API tokensCovers issuing tokens with abilities and checking them on routes.
- Password and session securityCovers strong password rules, hashing and session regeneration on login.
- Gates and policiesShows how to define and check authorization rules for model actions.
- Authorization middlewareCovers route-level can checks and custom role middleware.
- Mass assignment protectionExplains fillable whitelists and using validated request data for writes.
- SQL injection preventionShows safe Eloquent and query builder use and flags raw string interpolation.
- Model securityCovers hidden fields, attribute casting and safe appended attributes.
- CSRF protectionDescribes the default CSRF verification in the web middleware group.
What you need
- A Laravel application
- Sanctum, Passport, Jetstream or Breeze for the auth examples
- Laravel 10 or 11 for some casting features
Try asking
- Review my Laravel routes for missing authorization checks.
- Check my Laravel config and .env settings for production safety.
- Audit my Eloquent models for mass assignment risks.
Good to know
- The provided text ends partway through the CSRF section.
- The XSS and API security sections named in the description are not shown in the provided text.
- Some examples depend on specific Laravel versions, such as Laravel 10+ and 11+ casts.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/laravel-security/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md26 KB
Alternatives to laravel-security
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
laravel-security: common questions
Does laravel-security cover Sanctum API tokens?
Yes. The source shows issuing Sanctum tokens with abilities and checking those abilities on routes with middleware.
What production settings does it check?
It covers debug mode, APP_KEY, secure session cookies, trusted proxies and forcing HTTPS in production.
Does it help prevent SQL injection in Laravel?
Yes. It shows parameterized Eloquent and query builder queries and marks raw string interpolation as vulnerable.
How do I install laravel-security?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is laravel-security free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is laravel-security safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to laravel-security?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
