padosoft-laravel-security-reviewlisted
Install: claude install-skill padosoft/skills
# Laravel security review
Ten checks plus three rules whose cost is disproportionate to how easy they are to get wrong. Run them on the
diff before committing, and on the PR during review.
Output of a pre-screen is a **list of candidates to confirm or discard**, never an automatic bounce on a
single grep match.
---
## The ten checks — `SEC-OWASP-001`
### 1. Mass assignment
```bash
grep -rnE '->(create|fill|update)\((request\(\)->|.*->all\(\))' --include='*.php' app/
```
`$guarded = []` on a new model is an open door. Declare `$fillable` explicitly, and pass a **validated**
array — `$request->validated()`, not `$request->all()`. A validated array is also the only one whose shape
you can reason about later.
### 2. XSS through unescaped Blade
```bash
grep -rnE '\{!! *\$' --include='*.blade.php' resources/
```
`{!! $var !!}` prints raw. It is legitimate only for HTML you generated, never for anything that passed
through user input or the database. If it must be user content, sanitise it at that point and say so in a
comment.
### 3. Raw SQL with interpolation
```bash
grep -rnE '(whereRaw|orderByRaw|selectRaw|havingRaw|DB::(raw|statement|select))\([^,)]*\$' --include='*.php' app/
```
Bindings, always — including in `orderByRaw`, which people forget because it "is not a value". A column name
or a sort direction goes through an **allow-list plus a ternary**, never a request string.
### 4. File upload
Validate MIME **and** extension **and** size, store outside the web r