New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@doyensec/electronegativity

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@doyensec/electronegativity

Electronegativity is a tool to identify misconfigurations and security anti-patterns in Electron applications

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Electronegativity

What's Electronegativity?

Electronegativity is a tool to identify misconfigurations and security anti-patterns in Electron applications.

It leverages AST parsing to look for security-relevant configurations, as described in the "Electron Security Checklist - A Guide for Developers and Auditors" whitepaper.

Software developers and security auditors can use this tool to mitigate potential weaknesses and implementation bugs when developing applications using Electron.

If you're interested in Electron Security, have a look at our research - Electronegativity - A Study of Electron Security.

Installation

$ npm install @doyensec/electronegativity -g

Usage

OptionDescription
-Voutput the version number
-i, --inputinput (directory, .js, .htm, .asar)
-o, --outputsave the results in csv format to a file
-h, --helpoutput usage information

Examples

Using electronegativity to look for issues in a directory containing an Electron app:

$ electronegativity -i /path/to/electron/app

Using electronegativity to look for issues in an asar archive and saving the results in a csv file:

$ electronegativity -i /path/to/asar/archive -o result.csv

Creating new checks

Electronegativity is build in such a way to allow any developer/hacker to add their own checks to the tool. All you need to do is create a new file in /src/finder/checks and creating a new class with one method, match(data), and a constructor that specifies the check details such as the name, the description, etc. For example:

import { sourceTypes } from '../../parser/types';

export default class MyCheck {
    constructor() {
        this.id = 'MY_CUSTOM_CHECK';
        this.description = `this is a custom check`;
        this.type = sourceTypes.JAVASCRIPT;
    }

    match(data) {
        //do magic
        //either return an object with row and col, or null meaning no issues were identified
    }
}

Feel free to take a look at some of the already implemented checks to get an idea on how things work.

Credits

Electronegativity was made possible thanks to the work of Claudio Merloni and Ibram Marzouk

This tool is based on a Doyensec sponsored research published at Black Hat USA 2017.

Keywords

FAQs

Package last updated on 03 Sep 2018

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc