{"id":14956974,"url":"https://github.com/herom/mongo-interceptor","last_synced_at":"2025-08-16T13:31:42.388Z","repository":{"id":57301587,"uuid":"84117760","full_name":"herom/mongo-interceptor","owner":"herom","description":"MongoDB (String) intrusion detector","archived":false,"fork":false,"pushed_at":"2017-03-24T20:07:19.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-04T09:23:43.901Z","etag":null,"topics":["escape","intrusion-detector","mongo-interceptor","mongodb"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/herom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-06T20:30:01.000Z","updated_at":"2019-06-01T23:44:18.000Z","dependencies_parsed_at":"2022-09-08T02:44:33.032Z","dependency_job_id":null,"html_url":"https://github.com/herom/mongo-interceptor","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herom%2Fmongo-interceptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herom%2Fmongo-interceptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herom%2Fmongo-interceptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herom%2Fmongo-interceptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herom","download_url":"https://codeload.github.com/herom/mongo-interceptor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229805167,"owners_count":18126803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["escape","intrusion-detector","mongo-interceptor","mongodb"],"created_at":"2024-09-24T13:13:49.032Z","updated_at":"2024-12-16T23:22:37.656Z","avatar_url":"https://github.com/herom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongo-interceptor\nMongoDB (String) intrusion detector\n\n[![Build Status](https://travis-ci.org/herom/mongo-interceptor.svg?branch=master)](https://travis-ci.org/herom/mongo-interceptor)\n\n## Installation\nInstall with `npm install --save mongo-interceptor`\n\n## Usage\nRequire the package like you always do: `var mongoInterceptor = require('mongo-interceptor');`\n\n## Methods\n### `check()`\nYou can check any `Object`, `Array`, or `String` for \"harmful\" `mongoDB` operators by calling `mongoInterceptor.checkStr(possibleNOSQLInjectionString)` and you will get an `object` in return, which contains the following information: \n\n- `escaped`: The escaped `String`\n- `isIntrusion`: The `Boolean` to tell if any `mongoDB` operators where detected and escaped\n- `injections`: The `[String]` if found `mongoDB` operators\n\nSee the [interceptor-tests](https://github.com/herom/mongo-interceptor/blob/master/test/interceptor.js#L5-L56) for further information.\n\n### `setReplacer()`\nBy default, `mongo-interceptor` is using the underscore (`_`) to escape/replace found `mongoDB` operators, but you can set any other replacement `String` you like - excluding `$` itself. \n\n\n## Properties\n### `VERSION`\nReturns the actual `VERSION` of the library in use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherom%2Fmongo-interceptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherom%2Fmongo-interceptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherom%2Fmongo-interceptor/lists"}