mass-assignment
Skill20 starsChanged 4 months agoMITView on GitHub
Detects ORM create/update calls that spread request bodies without an explicit
3 other projects use a version of this.
Adopted by
Most recently taken up by
- mahumadad/quarrytheir own version, first seen Nov 8, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- KaanBicaklar/mona-sast-skillstheir own version, first seen Jul 9, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- KaanBicaklar/mona-sast-skills★ 2same name
- mahumadad/quarry★ 1same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository52 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- authentication-failuresSkill
- broken-access-controlSkill
- concurrency-correctnessSkill
- contract-reviewSkill
- cryptographic-failuresSkill
- crypto-library-misuseSkill
- csrfSkill
- exceptional-conditionsSkill
- excessive-agencySkill
- file-uploadSkill
- graphql-securitySkill
- hardcoded-secretsSkill
- header-injectionSkill
- hotspotsSkill
- injectionSkill
- insecure-designSkill
- insecure-local-storageSkill
- insecure-output-handlingSkill
- insecure-plugin-designSkill
- integrity-failuresSkill
- ipc-securitySkill
- llm-supply-chainSkill
- logging-failuresSkill
- mcp-securitySkill
- memory-api-misuseSkill
- model-dosSkill
- model-theftSkill
- multi-agent-trustSkill
- nosql-injectionSkill
- numeric-trust-boundarySkill
- oauth-implementationSkill
- open-redirectSkill
- overrelianceSkill
- path-traversalSkill
- privilege-handlingSkill
- prompt-injectionSkill
- prototype-pollutionSkill
- pr-reviewSkill
- race-conditionSkill
- rag-securitySkill
- redosSkill
- security-cleanupSkill
- security-misconfigurationSkill
- security-reviewSkill
- sensitive-disclosureSkill
- ssrfSkill
- supply-chainSkill
- threat-modelSkill
- token-smugglingSkill
- training-data-poisoningSkill
- unsafe-api-consumptionSkill
The file
Files
Mass Assignment Check (API3:2023)
What this checks
Protects against mass assignment (also called auto-binding or object injection) where
an attacker adds unexpected fields like role=admin or is_verified=true to a request
body and the ORM blindly persists them. Exploitation leads to privilege escalation,
account takeover, and data corruption.
Vulnerable patterns
- ORM create or update call that spreads, merges, or destructures the raw request body, deserialized payload, or query parameters into the model
- DTO-to-entity copy utility invoked with no field allowlist or exclude list, copying every matching field
- Decoded payload bound directly into a database struct or record that includes privileged columns
- Endpoint that lets the caller set fields like role, permissions, admin flags, verification status, balance, or tenant id from the payload
Fix immediately
Flag the vulnerable pattern and explain the risk. Then suggest a fix that establishes these properties:
- No ORM create/update call receives the raw request body. Requests land in a dedicated input type (DTO, validated schema, typed struct, sealed class) that contains only the fields external callers may set. Fields the input type does not mention are silently dropped by the deserializer.
- Privileged fields are set server-side, never from input. Roles, permissions, admin flags, verification status, balances, owner ids, and tenant ids come from the authenticated session or database defaults — never from the payload, even after "validation".
- DTO-to-entity copy utilities copy only named fields or explicitly exclude protected ones. A blanket field-by-field copy with no ignore list is the exact bug — the safe form names the fields.
- The allowlist lives next to the type, not scattered at call sites. A filter set repeated at every endpoint is brittle; the typed input pattern makes omission a compile-time (or deserialization-time) guarantee.
Translate these principles to the ORM, validation library, and deserializer of the audited file's language. Use the framework's documented allowlist or typed-input mechanism — do not hand-roll field filtering at the call site.
Verification
Confirm the following properties hold (language-agnostic):
- No ORM create/update call receives the raw request body, deserialized payload, or spread/merged object without an explicit field allowlist or a dedicated input type that excludes sensitive columns
- Privileged fields (role, permissions, is_admin, is_verified, balance, owner_id) are never settable from external input — they are set server-side or omitted from the input type
- If a DTO-to-entity copy utility is used, it either copies only named fields or explicitly excludes protected fields
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

