Socket
Book a DemoInstallSign in
Socket

@microsoft/eslint-plugin-sdl

Package Overview
Dependencies
Maintainers
5
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/eslint-plugin-sdl

ESLint plugin focused on common security issues and misconfigurations discoverable during static testing as part of Microsoft Security Development Lifecycle (SDL)

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
323K
6.76%
Maintainers
5
Weekly downloads
 
Created

What is @microsoft/eslint-plugin-sdl?

@microsoft/eslint-plugin-sdl is an ESLint plugin designed to help developers enforce security best practices in their JavaScript code. It provides a set of rules that can be integrated into your ESLint configuration to automatically check for common security issues and ensure that your code adheres to Microsoft's Security Development Lifecycle (SDL) guidelines.

What are @microsoft/eslint-plugin-sdl's main functionalities?

no-eval

This rule disallows the use of `eval()` in your code, which can lead to security vulnerabilities by allowing the execution of arbitrary code.

module.exports = {
  "rules": {
    "@microsoft/sdl/no-eval": "error"
  }
};

no-inner-html

This rule prevents the use of `innerHTML` to set HTML content, which can expose your application to cross-site scripting (XSS) attacks.

module.exports = {
  "rules": {
    "@microsoft/sdl/no-inner-html": "error"
  }
};

no-insecure-random

This rule ensures that you do not use insecure random number generators, which can be predictable and compromise the security of your application.

module.exports = {
  "rules": {
    "@microsoft/sdl/no-insecure-random": "error"
  }
};

Other packages similar to @microsoft/eslint-plugin-sdl

Keywords

eslint

FAQs

Package last updated on 18 Feb 2025

Did you know?

Socket

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