Socket
Socket
Sign inDemoInstall

eslint-plugin-anti-trojan-source

Package Overview
Dependencies
84
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-anti-trojan-source

ESLint plugin to detect and stop Trojan Source attacks


Version published
Weekly downloads
23K
increased by2.56%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

eslint-plugin-anti-trojan-source

Detect trojan source attacks that employ unicode bidi attacks to inject malicious code

npm version license downloads build codecov Known Vulnerabilities Responsible Disclosure Policy

About

ESLint plugin to detect and stop Trojan Source attacks from entering your codebase.

If you're unaware of what Trojan Source attacks are, or how unicode characters injected into a codebase could be used in malicious ways, refer to the README of the anti-trojan-source source code repository.

Install

npm install --save-dev eslint-plugin-anti-trojan-source

Usage example

Once you've installed this plugin, add it to your eslint configuration as follows. First, you need to define it as a plugin:

Note: ESLint plugins can have their eslint-plugin prefix omitted when they are specified.

{
  "plugins": ["anti-trojan-source"]
}

Then, add an ESLint rule that halts if it finds a Trojan Source attack:

"rules": {
    "anti-trojan-source/no-bidi": "error"
}

Following is a complete example of configuration if you are defining ESLint configuration in your package.json file:

"eslintConfig": {
    "plugins": [
        "anti-trojan-source"
    ],
    "rules": {
        "anti-trojan-source/no-bidi": "error"
    }
}

Author

anti-trojan-source © Liran Tal, Released under the Apache-2.0 License.

Keywords

FAQs

Last updated on 06 Nov 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc