{"id":13459092,"url":"https://github.com/eslint-community/eslint-plugin-security","last_synced_at":"2026-07-11T10:14:51.399Z","repository":{"id":2314849,"uuid":"45323325","full_name":"eslint-community/eslint-plugin-security","owner":"eslint-community","description":"ESLint rules for Node Security","archived":false,"fork":false,"pushed_at":"2026-06-10T16:02:21.000Z","size":649,"stargazers_count":2353,"open_issues_count":17,"forks_count":111,"subscribers_count":38,"default_branch":"main","last_synced_at":"2026-06-10T16:29:40.556Z","etag":null,"topics":["eslint","eslint-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eslint-community.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"eslint","open_collective":"eslint","tidelift":"npm/eslint"}},"created_at":"2015-11-01T00:44:18.000Z","updated_at":"2026-06-10T16:06:14.000Z","dependencies_parsed_at":"2026-02-19T17:04:02.952Z","dependency_job_id":null,"html_url":"https://github.com/eslint-community/eslint-plugin-security","commit_stats":{"total_commits":116,"total_committers":36,"mean_commits":"3.2222222222222223","dds":0.7844827586206897,"last_synced_commit":"df1924ebf4ac237191061492668e9e8fc9051d9c"},"previous_names":["nodesecurity/eslint-plugin-security"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/eslint-community/eslint-plugin-security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eslint-community%2Feslint-plugin-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eslint-community%2Feslint-plugin-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eslint-community%2Feslint-plugin-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eslint-community%2Feslint-plugin-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eslint-community","download_url":"https://codeload.github.com/eslint-community/eslint-plugin-security/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eslint-community%2Feslint-plugin-security/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34224103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["eslint","eslint-plugin"],"created_at":"2024-07-31T09:01:03.463Z","updated_at":"2026-06-12T05:00:51.989Z","avatar_url":"https://github.com/eslint-community.png","language":"JavaScript","funding_links":["https://github.com/sponsors/eslint","https://opencollective.com/eslint","https://tidelift.com/funding/github/npm/eslint"],"categories":["JavaScript","📚 Learning Resources","eslint","Static Application Security Testing (SAST)"],"sub_categories":["JavaScript/Node.js Security","Language Specific"],"readme":"# eslint-plugin-security\n\n[![NPM version](https://img.shields.io/npm/v/eslint-plugin-security.svg?style=flat)](https://npmjs.org/package/eslint-plugin-security)\n\nESLint rules for Node Security\n\nThis project will help identify potential security hotspots, but finds a lot of false positives which need triage by a human.\n\n## Installation\n\n```sh\nnpm install --save-dev eslint-plugin-security\n```\n\nor\n\n```sh\nyarn add --dev eslint-plugin-security\n```\n\n## Usage\n\n### Flat config (requires eslint \u003e= v8.23.0)\n\nAdd the following to your `eslint.config.js` file:\n\n```js\nconst pluginSecurity = require('eslint-plugin-security');\n\nmodule.exports = [pluginSecurity.configs.recommended];\n```\n\n### eslintrc config (deprecated)\n\nAdd the following to your `.eslintrc` file:\n\n```js\nmodule.exports = {\n  extends: ['plugin:security/recommended-legacy'],\n};\n```\n\n## Developer guide\n\n- Use [GitHub pull requests](https://help.github.com/articles/using-pull-requests).\n- Conventions:\n- We use our [custom ESLint setup](https://github.com/nodesecurity/eslint-config-nodesecurity).\n- Please implement a test for each new rule and use this command to be sure the new code respects the style guide and the tests keep passing:\n\n```sh\nnpm run-script cont-int\n```\n\n## Tests\n\n```sh\nnpm test\n```\n\n## Rules\n\n\u003c!-- begin auto-generated rules list --\u003e\n\n⚠️ Configurations set to warn in.\\\n✅ Set in the `recommended` configuration.\n\n| Name                                                                                         | Description                                                                                                                   | ⚠️  |\n| :------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------- | :-- |\n| [detect-bidi-characters](docs/rules/detect-bidi-characters.md)                               | Detects trojan source attacks that employ unicode bidi attacks to inject malicious code.                                      | ✅  |\n| [detect-buffer-noassert](docs/rules/detect-buffer-noassert.md)                               | Detects calls to \"buffer\" with \"noAssert\" flag set.                                                                           | ✅  |\n| [detect-child-process](docs/rules/detect-child-process.md)                                   | Detects instances of \"child_process\" \u0026 non-literal \"exec()\" calls.                                                            | ✅  |\n| [detect-disable-mustache-escape](docs/rules/detect-disable-mustache-escape.md)               | Detects \"object.escapeMarkup = false\", which can be used with some template engines to disable escaping of HTML entities.     | ✅  |\n| [detect-eval-with-expression](docs/rules/detect-eval-with-expression.md)                     | Detects \"eval(variable)\" which can allow an attacker to run arbitrary code inside your process.                               | ✅  |\n| [detect-new-buffer](docs/rules/detect-new-buffer.md)                                         | Detects instances of new Buffer(argument) where argument is any non-literal value.                                            | ✅  |\n| [detect-no-csrf-before-method-override](docs/rules/detect-no-csrf-before-method-override.md) | Detects Express \"csrf\" middleware setup before \"method-override\" middleware.                                                  | ✅  |\n| [detect-non-literal-fs-filename](docs/rules/detect-non-literal-fs-filename.md)               | Detects variable in filename argument of \"fs\" calls, which might allow an attacker to access anything on your system.         | ✅  |\n| [detect-non-literal-regexp](docs/rules/detect-non-literal-regexp.md)                         | Detects \"RegExp(variable)\", which might allow an attacker to DOS your server with a long-running regular expression.          | ✅  |\n| [detect-non-literal-require](docs/rules/detect-non-literal-require.md)                       | Detects \"require(variable)\", which might allow an attacker to load and run arbitrary code, or access arbitrary files on disk. | ✅  |\n| [detect-object-injection](docs/rules/detect-object-injection.md)                             | Detects \"variable[key]\" as a left- or right-hand assignment operand.                                                          | ✅  |\n| [detect-possible-timing-attacks](docs/rules/detect-possible-timing-attacks.md)               | Detects insecure comparisons (`==`, `!=`, `!==` and `===`), which check input sequentially.                                   | ✅  |\n| [detect-pseudoRandomBytes](docs/rules/detect-pseudoRandomBytes.md)                           | Detects if \"pseudoRandomBytes()\" is in use, which might not give you the randomness you need and expect.                      | ✅  |\n| [detect-unsafe-regex](docs/rules/detect-unsafe-regex.md)                                     | Detects potentially unsafe regular expressions, which may take a very long time to run, blocking the event loop.              | ✅  |\n\n\u003c!-- end auto-generated rules list --\u003e\n\n## TypeScript support\n\nType definitions for this package are managed by [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped). Use [@types/eslint-plugin-security](https://www.npmjs.com/package/@types/eslint-plugin-security) for type checking.\n\n```sh\nnpm install --save-dev @types/eslint-plugin-security\n\n# OR\n\nyarn add --dev @types/eslint-plugin-security\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feslint-community%2Feslint-plugin-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feslint-community%2Feslint-plugin-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feslint-community%2Feslint-plugin-security/lists"}