sc-mass-assignment

Detect mass assignment vulnerabilities in web frameworks binding unfiltered request bodies to models.

7|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/fatihkan/badi --skill sc-mass-assignment-fatihkan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sc-mass-assignment
Source: https://github.com/fatihkan/badi/tree/main/.claude/skills/security-check/sc-mass-assignment
Command: npx skills add https://github.com/fatihkan/badi --skill sc-mass-assignment-fatihkan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mass assignment and over-posting occur when an API binds the entire request body directly to a model without filtering fields, allowing attackers to set protected attributes like isAdmin, role, price, or verified.

Core Features & Use Cases

  • Detects mass assignment patterns across common web frameworks and binding strategies.
  • Provides guidance on safe binding practices with concrete remediation strategies and examples.
  • Use case: secure an endpoint that creates a user by explicitly whitelisting allowed fields and validating input.

Quick Start

Run a scan against your codebase to identify endpoints that bind unfiltered request data to models.

Frequently Asked Questions about sc-mass-assignment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect mass assignment vulnerabilities in my web application?

Prevent mass assignment and over-posting by requiring explicit field filtering via whitelisting, DTOs, or framework protections like Laravel's fillable or Rails strong parameters. This ensures only allowed fields bind to data models during creation or updates.

Does this mass assignment scanner support Laravel and Rails frameworks?

Yes, it detects unsafe binding patterns across popular web frameworks supporting endpoints that bind req.body, request.POST, or similar inputs to model creation or updates. It provides concrete remediation using framework protections like Laravel's fillable and Rails strong parameters.

What is over-posting in web APIs and how does it work?

Over-posting occurs when an API binds the entire request body directly to a data model without filtering fields, allowing attackers to set protected attributes like isAdmin, role, price, or verified. The scan reports these unfiltered request body binding vulnerabilities.

How do I fix over-posting when binding req.body to my data models?

Fix over-posting by applying explicit field filtering via whitelisting, DTOs, or framework protections before binding req.body to data models. The scan provides concrete remediation strategies and examples to secure endpoints by validating input and whitelisting allowed fields.

Do I need DTOs to secure my API against mass assignment attacks?

DTOs are one effective mitigation, but you can also use explicit field whitelisting or framework protections like Laravel's fillable and Rails strong parameters. The scan identifies missing protections and guides safe binding practices across supported frameworks.