Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
A minimal module and CLI to make project environment configurations
Installing
# as a CLI
npm install -g makenv
# as a module
npm install --save-dev makenv
$ makenv
output
{
"name": "awesome-project",
"description": "Example description pulled from package.json",
"homepage": "http://awesomeproject.com"
}
frontend.js
var appConfigurations = require('./env.json')
var env = require('makenv')
output
{
name: 'example',
description: 'Example description pulled from package.json',
homepage: 'http://example.com',
mode: 'development',
production: false,
development: true,
root: '/Users/johnsmith/awesome-project/',
modules: [ 'node_modules', 'bower_components' ],
paths: {
api: 'api',
components: 'components',
images: 'images',
providers: 'providers',
public: 'public',
scripts: 'scripts',
styles: 'styles',
views: 'views'
}
}
gulpfile.js
var gulp = require('gulp')
var sass = require('gulp-sass')
var env = require('makenv')
gulp.task('sass', function () {
return gulp.src( env.paths.styles + '/**/*.{sass,scss}')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest( env.paths.public ));
});
gulp.task('sass:watch', function () {
gulp.watch(env.paths.styles + '/**/*.{sass,scss}', ['sass']);
});
webpack.config.js
var webpack = require('webpack')
var env = require('makenv')
module.exports = {
debug: env.development ? true : false,
devtool: env.development ? '#eval-source-map' : null,
context: `${__dirname}/${env.paths.scripts}`,
entry: env.development ? ['webpack-hot-middleware/client?reload=true', './'] : ['./'],
output: {
path: `${__dirname}/${env.paths.public} `
},
// allows to later require files from any location
// var AwesomeComponent = require('components/AwesomeComponent')
resolve: {
extensions: ['', '.js','.jsx'],
root: env.root,
alias: env.paths,
modulesDirectories: env.modulesDirectories
},
// ...
}
FAQs
A minimal module and CLI to make project environment configurations
The npm package makenv receives a total of 1 weekly downloads. As such, makenv popularity was classified as not popular.
We found that makenv demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.