- Home
- Skills
- Data & Databases
- MongoDB Config Check
Works with the AI Agents you already use
MongoDB Config Check
MongoDB servers open to the internet without a password are found and wiped by bots within hours, and findOne(req.body) lets anyone log in with {"$ne": null}.
$5
MongoDB Config Check
Example session with this skill installed
Check this project with mongodb-config-check.
- Read your context and instructions
- Compiled the mongodb config check
$ python3 scripts/check_mongo.py examples/risky
BLOCK docker-compose.yml:8 M02 PASSWORD_IN_CONNECTION_STRING
MONGO_INITDB_ROOT_PASSWORD: <redacted>
Why: A MongoDB password is written in a connection string or a compose file that is part of the project. Everyone with the repository can log in to the database.
Safer: Read the connection string from an environment variable or secret store (MONGODB_URI) and use ${MONGO_PASSWORD} or a secrets file in compose; change the password that was committed.
BLOCK mongod.conf:5 M01 OPEN_WITHOUT_AUTH
BLOCK src/db.js:3 M02 PASSWORD_IN_CONNECTION_STRING
BLOCK src/routes/auth.js:4 M03 NOSQL_INJECTION
BLOCK src/routes/auth.js:9 M03 NOSQL_INJECTION
REVIEW docker-compose.yml:5 M14 PORT_PUBLISHED_TO_ALL
REVIEW local/mongod-local.conf:5 M12 AUTH_TURNED_OFF
REVIEW mongod.conf:5 M11 NO_TLS_ON_NETWORK
REVIEW src/db.js:3 M15 CERTIFICATE_CHECK_OFF
REVIEW src/routes/auth.js:14 M13 REQUEST_FIELD_IN_FILTER
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 5 files, 5 with MongoDB content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
MongoDB servers open to the internet without a password are found and wiped by bots within hours, and findOne(req.body) lets anyone log in with {"$ne": null}. This skill finds those and six other MongoDB mistakes before you go live, and tells you how to fix each one.
Your agent runs a scanner on mongod.conf (YAML or the old key = value form), Docker Compose files with mongo or Bitnami MongoDB images, and the app code and config that hold connection strings and queries. It knows that ${VARIABLE} values, passwords built at run time and placeholders are not secrets, that a password file or env_file may set the root password, and which queries are safe (named fields cast to strings, sanitize middleware). It never connects to MongoDB. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Passwords are never printed.
What it checks
BLOCK
- M01: a server on the network with no authentication
- M02: a password in a connection string or a compose file
- M03: a whole request used as a query filter, or $where built from request text
REVIEW
- M11: a reachable server without TLS
- M12: authorization disabled (even on localhost)
- M13: request fields used as is in query filters
- M14: 27017 published on every host interface
- M15: TLS certificate or hostname checks turned off
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason and safer approach for each rule
- Risky and safe example config, compose and app files, and the real report the scanner produces on the risky ones
Limits It reads files as written: .env files, users and roles inside the database, MongoDB Atlas settings and firewalls are not seen. NOT FLAGGED is not a guarantee.
Static check of config, compose and code text. Atlas settings, database users and firewalls are not checked. NOT FLAGGED is not a guarantee.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
Requires
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example files include a clearly fake, inert password (not-a-real-...) for the scanner to find. Nothing is run.