Will It Vibe logoWill It Vibe?
LARAVEL-004Medium severity-8 points

Eloquent model has no $fillable or $guarded

Part of Security, which counts for 30% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

Eloquent's base Model treats every attribute as mass-assignable unless the model declares $fillable (an allowlist) or $guarded (a blocklist). A model with neither has no mass-assignment protection at all. Heuristic: this cannot see whether the model is ever actually populated from request data, so it is kept at medium severity.

Why it matters

Eloquent's base Model treats every attribute as mass-assignable unless the model explicitly sets $fillable or $guarded. A model with neither has no protection at all: if it is ever populated via ::create(), ::fill(), or ->update() with request data, directly or through $request->all(), the request can set any column, including ones the application never intended to expose.

How to fix it

Add either a $fillable allowlist, the columns a request may legitimately set, or a $guarded list, columns that must never be mass-assigned. $fillable is generally the safer default since it fails closed for any new column added later.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Security checks