mass-assignment

mass-assignment is a skill for Claude Code, Codex from SecurityTalent/bugskill-ai. It costs 5 tokens per session (1,450 once invoked), scanned A, original, MIT.

A web API security check for mass assignment, where a server automatically copies request fields into a database record. It looks for fields such as administrator status, account owner, plan, or credits that users should not be able to set.

In plain words
What is it for?
Use it to review profile, registration, settings, and resource-update endpoints by testing whether unexpected request fields are accepted or changed.
Why use it?
It helps prevent a user from adding hidden fields to a normal update request and changing permissions, ownership, billing, or other protected values. The issue often appears in web frameworks and database libraries that bind fields automatically.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to review profile, registration, settings, and resource-update endpoints by testing whether unexpected request fields are accepted or changed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/securitytalent/bugskill-ai/mass-assignment
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SecurityTalent/bugskill-ai --skill mass-assignment
Clone the repo
git clone --depth 1 https://github.com/SecurityTalent/bugskill-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mass-assignment

README.md
[![agentmods](https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/mass-assignment/github.svg)](https://agentmods.dev/skills/securitytalent/bugskill-ai/mass-assignment)
Your own site
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/mass-assignment"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/mass-assignment/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mass-assignment

Your own site · 80×15
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/mass-assignment"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/mass-assignment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,450 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00005 $0.01450
Opus 5.5 $0.00002 $0.00580
Sonnet 5.5 $0.00001 $0.00290
Haiku 4.5 $0.00001 $0.00145

Measured 20d ago against content hash 8ac918994589, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mass-assignment scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Awesome-Claude-Code-Agent-Skills/03-Authentication-and-Access-Control/mass-assignment/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mass Assignment

What Is Broken and Why

Frameworks that automatically bind request body parameters to model attributes (Rails, Laravel, Django, Mongoose, Sequelize) allow attackers to set fields that were never meant to be user-modifiable. A profile update endpoint intended to accept {name, email} will also accept {role: "admin", plan: "enterprise", ownerId: 999} if the server doesn't explicitly allowlist accepted fields.

Key Signals

  • PUT/PATCH/POST endpoints that update model records
  • JSON bodies passed to ORM update(), create(), save(), or assign() calls
  • Registration or profile endpoints in Rails, Laravel, Django, Express apps
  • API responses that reveal field names not expected in requests (leak model schema)
  • GraphQL mutations with input types
  • Endpoints where adding extra fields returns 200 (not 400 Bad Request)

Methodology

  1. Identify PUT/PATCH endpoints for user profile, settings, or resource updates.
  2. Intercept a normal request; examine which fields are accepted.
  3. Inspect API responses and other endpoints to discover undocumented field names (role, admin, isAdmin, verified, plan, credits, ownerId, orgId).
  4. Add extra fields to the request body — observe if they're accepted silently.
  5. Attempt privilege escalation: inject "role": "admin" or "isAdmin": true.
  6. Attempt horizontal access: inject "userId" or "ownerId" pointing to another user.
  7. For registration endpoints: try setting "emailVerified": true, "credits": 9999.
  8. Fuzz with common sensitive field names from framework conventions.

Payloads & Tools

// Profile update — attempt privilege escalation
PATCH /api/users/me
{"name": "test", "email": "[email protected]", "role": "admin", "isAdmin": true}

// Registration — attempt auto-verification and credit injection
POST /api/register
{"email": "[email protected]", "password": "pass", "emailVerified": true, "credits": 9999,
 "plan": "enterprise", "trialExpires": "2099-01-01"}

// Resource update — attempt ownership change (IDOR via mass assignment)
PATCH /api/posts/42
{"title": "new", "ownerId": 1, "userId": 1}

// Nested object injection (common in JSON APIs)
PUT /api/profile
{"name": "x", "address": {"city": "x"}, "billingPlan": {"tier": "enterprise"}}

// GraphQL mutation with extra input fields
mutation {
  updateUser(input: {name: "x", role: "admin", isAdmin: true}) { id role }
}

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 20d ago First seen · 142 lines · 0 tokens per session scan A 8ac918994589

Subscribe to this mod's changes

mass-assignment is a skill published in the GitHub repository SecurityTalent/bugskill-ai (13 stars, last pushed 21d ago), licensed MIT. It adds 5 tokens to every session and 1,450 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.

Related

Other skills, from other repositories

bun-api

Bun runtime API reference for TypeScript scripts. Covers Bun.serve() HTTP/HTTP/2 server with routes and WebSockets, fetch() transport options, proxies and Bun.FetchSession connection pools, Bun.ModuleGraph multi-instance apps, Bun.file(), Bun.write(), Bun.$() shell, Bun.spawn(), Bun.Glob, Bun.env, bun:sqlite…

dmythro/agent-skills · 265 tokens

hub-agent-setup

Connect a local or remote AI agent to Giskard Hub through an authenticated, non-streaming HTTPS endpoint. Use when a user asks to connect, integrate, or register their agent with the Hub. Build a minimal wrapper, deploy or tunnel it, and use the Hub connection test (SDK or MCP) to guide any fixes.

Giskard-AI/giskard-skills · 71 tokens

api-designer

Helps design REST APIs - routes, request/response structures, validation, status codes, and conventions. Use when designing new endpoints or reviewing an existing API's design for consistency.

codebygarv/Ai-skills · 40 tokens

auth-flow-reviewer

Deep review of authentication, authorization, session, and SSO flows specifically - token lifecycle, session fixation, logout behavior, and OAuth/SSO correctness. Use when reviewing or designing login, session, or SSO code specifically.

codebygarv/Ai-skills · 51 tokens

log-message-improver

Improves logging statements for observability - structured logging, appropriate log levels, and useful context. Use when logs are too sparse, too noisy, or missing the context needed to debug an incident from them alone.

codebygarv/Ai-skills · 48 tokens

cqrs-event-sourcing-designer

Designs Command Query Responsibility Segregation (CQRS) and Event Sourcing models with projection rebuilders.

codebygarv/Ai-skills · 30 tokens