nosql-injection

nosql-injection is a skill for Claude Code, Codex from thejefflarson/soundcheck. It costs 66 tokens per session (651 once invoked), scanned A, original, MIT.

A security check for database queries that use user-supplied input in MongoDB, Elasticsearch, and other NoSQL systems. It looks for ways that input could change the query's meaning.

In plain words
What is it for?
Use it while building database queries or filters from request data. It checks for unsafe objects, arrays, operators, JavaScript expressions, and aggregation stages.
Why use it?
It helps prevent NoSQL injection, where an attacker adds query operators or code to bypass login checks, view data, or overload the service.

Skill for Claude CodeCodex

Part of the soundcheck plugin — 52 skills, 7 agents, 2 hooks shipped together

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.

agentmods
npx agentmods add skills/thejefflarson/soundcheck/nosql-injection
Any agent
npx skills add thejefflarson/soundcheck --skill nosql-injection
Clone the repo
git clone --depth 1 https://github.com/thejefflarson/soundcheck

Made for: Claude Code, Codex.

Or install soundcheck, the plugin that ships this one along with the rest of its 52 skills, 7 agents, 2 hooks.

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 nosql-injection

README.md
[![agentmods](https://agentmods.dev/badge/skills/thejefflarson/soundcheck/nosql-injection.svg)](https://agentmods.dev/skills/thejefflarson/soundcheck/nosql-injection)
Your own site
<a href="https://agentmods.dev/skills/thejefflarson/soundcheck/nosql-injection"><img src="https://agentmods.dev/badge/skills/thejefflarson/soundcheck/nosql-injection.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 651 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00066 $0.00651
Opus 5 $0.00033 $0.00326
Sonnet 5 $0.00013 $0.00130
Haiku 4.5 $0.00007 $0.00065

Measured 5d ago against content hash 68855d0da6ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nosql-injection 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 5d 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.

.claude/skills/nosql-injection/SKILL.md · 58 lines

How it starts

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

NoSQL Injection Security Check (CWE-943)

What this checks

Protects against NoSQL injection where user input manipulates query operators or structure. Unlike SQL injection, NoSQL injection exploits operator injection ($gt, $ne, $regex) and JavaScript execution in database engines. Exploitation leads to authentication bypass, data exfiltration, and denial of service.

Vulnerable patterns

  • Query filter built by passing a deserialized request body or query object straight into the database client, letting the caller smuggle operators in place of values
  • Use of $where, $expr, or $function with a string that incorporates user input
  • Filter value that is allowed to be an object or array when the schema expects a primitive, enabling operator injection like a not-equal match against a credential field
  • Aggregation pipeline stage built from raw caller-supplied data with no field allowlist

Fix immediately

Flag the vulnerable code and explain the risk. Then suggest a fix that establishes these properties:

  1. Every value destined for a query filter is type-checked as a primitive. Reject anything that is not a string, number, or boolean before it reaches the query builder. The classic not-equal-empty-string auth bypass works because the deserialized payload was allowed to be an object; enforcing a primitive type turns operator keys into literal values that cannot match.
  2. Server-side evaluation operators never receive user-supplied values. Operators like $where, $expr, and $function accept JavaScript or expression strings that the database engine evaluates; with user input in them, the database becomes an interpreter running attacker code.
  3. Raw request bodies and query objects are not passed directly as filters. Build the query object explicitly from validated, named fields — the same allowlist discipline that defeats mass assignment (see the mass-assignment skill for ORM-side details).

Translate these principles to the NoSQL client library and validator of the audited file. Use the driver's documented parameterization or query-builder API — do not build filters from untyped caller-supplied objects.

Read the full file on GitHub · 58 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. 5d ago First seen · 58 lines · 66 tokens per session scan A 68855d0da6ba

Subscribe to this mod's changes

nosql-injection is a skill published in the GitHub repository thejefflarson/soundcheck (20 stars, last pushed 1mo ago), licensed MIT. It adds 66 tokens to every session and 651 once invoked, about $0.0003 per session on Opus 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-08-30.

Related

Other skills, from other repositories

commerce-app-storage

Integrate App Builder Database Storage (@adobe/aio-lib-db) into an Adobe Commerce app and scaffold a runtime action that reads and writes documents. Use when the user wants persistent, queryable storage backing a Commerce app — either from a web action (HTTP-invokable) or from an event/webhook handler. Requires a base…

adobe/skills · 78 tokens

okf-mongodb

MongoDB connector that produces and ingests Open Knowledge Format (OKF) bundles by sampling documents to infer each collection's schema. Emits one concept per collection with a Name | Type | Presence table (top-level fields, with mixed types shown as a union and presence as the percentage of sampled documents). The…

xSAVIKx/okf-skills · 126 tokens

mongodb-docs

Use when users ask how to deploy, connect to, query, model, index, aggregate, secure, scale, back up, monitor, or troubleshoot MongoDB databases and applications, including Atlas, Community Edition, Enterprise Advanced, CRUD, the aggregation framework, search, vector search, transactions, change streams, replication…

cookieMonsterDev/agents-skills · 96 tokens

mongodb-atlas-checker

Verify MongoDB Atlas setup and configuration for backend applications. Checks connection strings, environment variables, connection pooling, and ensures proper setup for Next.js and NestJS applications. Use when verifying MongoDB Atlas setup, checking connection strings or environment variables, or troubleshooting…

shipshitdev/skills · 62 tokens

mongodb-natural-language-querying

Generate read-only MongoDB queries (find) or aggregation pipelines using natural language, with collection schema context and sample documents. Use this skill whenever the user asks to write, create, or generate MongoDB queries, wants to filter/query/aggregate data in MongoDB, asks "how do I query...", needs help with…

mongodb/agent-skills · 162 tokens

mongodb-migration-expert

Database schema design, indexing, and migration guidance for MongoDB-based applications. Use when adding or changing MongoDB collections, indexes, or fields, designing schema for multi-tenant or large datasets, or planning forward-only migrations.

shipshitdev/skills · 51 tokens