GithubHelp home page GithubHelp logo

balderdashy / enpeem Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 5.0 37 KB

Lightweight wrapper for accessing npm programmatically (alternative to adding `npm` as a dependency)

License: MIT License

JavaScript 100.00%

enpeem's People

Contributors

globegitter avatar mikermcneil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

enpeem's Issues

generalize the library for any npm command

This module could be an interactive npm command launcher, it just needs 2 changes:

  • export doNpmCommand() like npm.command
  • change function doNpmCommand(options, cb) { to function doNpmCommand(command, options, cb) { so it can be used like this var npmLs = npm.custom.bind(null, 'ls')

I have made some experiments on my own, this functionality seems very easy, for now I am not compiling a PR because there are many PR still pending and collabs/owner does not seem really responsive on that..

just reply if there is any interest in this feature

Security Notice & Bug Bounty - Remote Code Execution - huntr.dev

This issue has been generated on-behalf of Mik317 (https://huntr.dev/app/users/Mik317)

Vulnerability Description

The issue occurs because a user input is formatted inside a command that will be executed without any check. The issue arises here: https://github.com/balderdashy/enpeem/blob/master/index.js#L82 . The options should be inserted in the 2' position as arguments and not be concatenated inside the main command without any check.

POC

// poc.js
var npm = require('enpeem');
npm.update({production:'test; touch HACKED; #', path:''});

Impact

RCE via command formatting on `enpeem

Bug Bounty

We have opened up a bounty for this issue on our bug bounty platform. Want to solve this vulnerability and get rewarded ๐Ÿ’ฐ? Go to https://huntr.dev/

We will submit a pull request directly to your repository with the fix as soon as possible. Want to learn more? Go to https://github.com/418sec/huntr ๐Ÿ“š

Automatically generated by @huntr-helper...

skip, dryRun and prefix to command

This is more a personal todo:
For Sane Stack I need a simple option to not actually run the npm-install and immediately return, an options to have a 'dry-run', which just saves the packages to the package.json without actually installing them, as well as prefixing something to the npm install command so it can be run in docker containers. That would be docker-compose run server for example.

Have the functionality for this locally in my code right now - will move that to enpeem with time :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.