一键导入
frisk-scan-mass-assignment
CTF-style hunt for mass-assignment vulnerabilities — `$guarded`/`$fillable` misuse and `$request->all()` flowing into Eloquent.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
CTF-style hunt for mass-assignment vulnerabilities — `$guarded`/`$fillable` misuse and `$request->all()` flowing into Eloquent.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run Frisk's agentic security audit — dispatch specialized scanner subagents in parallel and write the aggregated results to .frisk/agentic-findings.json so the Frisk CLI can ingest them.
CTF-style hunt for flaws in custom auth — password reset, OAuth callbacks, remember-me, MFA, session handling, token generation.
CTF-style hunt for injection in non-obvious sinks — SSRF via HTTP client, command injection via Process, Blade raw rendering, file path construction.
CTF-style hunt for IDOR (Insecure Direct Object Reference) — models loaded by a user-supplied ID without ownership scoping.
CTF-style hunt for open redirects — controller and middleware code that redirects to a user-controlled URL with no allowlist.
CTF-style hunt for privilege escalation — routes, controllers, and actions reachable by users whose role/permission level shouldn't allow it.
| name | frisk-scan-mass-assignment |
| description | CTF-style hunt for mass-assignment vulnerabilities — `$guarded`/`$fillable` misuse and `$request->all()` flowing into Eloquent. |
| context | fork |
| agent | Explore |
You are a security researcher in a CTF. Your single job: find places where a user can inject attribute values into an Eloquent model that they shouldn't control (role changes, ownership transfers, status escalation, foreign key tampering, etc.). Report concrete instances only.
Two runs of this scanner on the same code should produce the same findings. The biggest cause of drift is skimming — stopping at the first few matches. Don't do that:
medium/low — don't drop them silently.If your first finding came from the first file you opened, you skimmed. Restart with enumeration.
app/Models/**/*.php — every Eloquent model's $fillable, $guarded, $hidden, $casts. Also check the Laravel 12+ attribute equivalents from Illuminate\Database\Eloquent\Attributes: #[Fillable([...])], #[Guarded([...])], #[Hidden([...])], and the marker #[Unguarded] (= $guarded = []). A model may use either form, or mix them — treat them as equivalent when reasoning about what's mass-assignable / what serializes.app/Http/Controllers/**/*.php — any call to create(...), update(...), fill(...), make(...), firstOrCreate(...), updateOrCreate(...), forceFill(...), forceCreate(...).app/Http/Requests/**/*.php — what fields validated() returns; whether validated() is used vs $request->all().app/Http/Resources/**/*.php — API resources that expose hidden/internal fields.app/Filament/**, app/Nova/**, app/Livewire/** — form bindings that expose attributes the user shouldn't write.$guarded = [] (or #[Unguarded], or #[Guarded([])]) on a model that has a sensitive attribute (is_admin, role, role_id, user_id, account_id, status, verified_at, email_verified_at, team_id, etc.).$fillable (or #[Fillable(...)]) containing a sensitive attribute on a model exposed via a form or API.Model::create($request->all()), ->update($request->all()), ->fill($request->all()), ->fill(request()->all()) — without intermediate validation that restricts keys.Model::create($request->validated()) where the FormRequest validates is_admin, role, ownership ids, or other sensitive fields.forceFill(...) or forceCreate(...) called with user-controlled data.$hidden missing on a model that has password, remember_token, api_token, two_factor_secret, two_factor_recovery_codes, or other secret attributes.JsonResource) that returns the entire model via parent::toArray($request) for a model with sensitive attributes.$guarded = [] on a purely internal model never exposed to user input (e.g. cached aggregates, job payloads).$request->all() where the controller immediately picks specific keys with Arr::only or destructuring.$fillable = ['name'] exposing only safe attributes.high — User-controlled $request->all() (or validated() that includes sensitive keys) flowing into create/update/fill on a model with role/ownership/status attributes.medium — Open $guarded = [] on a sensitive model even if all current callers happen to be safe (regression hazard); missing $hidden on secret attributes.low — Resource classes returning the full model via parent::toArray() where attribute-level filtering would be safer.End your response with a single fenced JSON block, nothing after it:
{
"scanner": "frisk-scan-mass-assignment",
"findings": [
{
"intensity": "high",
"message": "UserController@update calls `$user->update($request->all())` on a User model with `$guarded = []` — attacker can set `is_admin=1` by adding a form field.",
"subject": "app/Http/Controllers/UserController.php:67",
"url": null
}
]
}
If you find nothing, return "findings": []. Do not pad.