Socket
Socket
Sign inDemoInstall

sudo-block

Package Overview
Dependencies
3
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sudo-block

Block users from running your app with root permissions


Version published
Weekly downloads
195K
decreased by-0.88%
Maintainers
1
Install size
52.0 kB
Created
Weekly downloads
 

Readme

Source

sudo-block

Block users from running your app with root permissions

Install

npm install sudo-block

Usage

import sudoBlock from 'sudo-block';

sudoBlock();

API

sudoBlock(message?)

When a file containing this function is run with root permissions it will exit and show an error message telling the user how to fix the problem, so they don't have to run it with sudo.

message

Type: string

A custom message.

Keywords

FAQs

Last updated on 31 Aug 2023

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