Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Add env vars from a .env file to your process.env
npm i --save-dev gulp-env
For now, gulp-env expects the .env file to export a javascript object, i.e.:
//.env
module.exports = {
MONGO_URI: "mongodb://localhost:27017/testdb
}
You can add the properties of this object to your process.env via
env({file: ".env})
in your gulpfile.
//gulpfile.js
gulp = require('gulp'),
nodemon = require('nodemon'),
env = require('gulp-env');
gulp.task('nodemon', function() {
//nodemon server ...
});
gulp.task('set-env', function () {
env({file: ".env"});
});
gulp.task('default', ['set-env', 'nodemon'])
For now, this plug-in is stupid simple.
Seriously, this is all of the code!
'use strict';
module.exports = function(options) {
if (options.file) {
var env = require("./" + options.file);
for (var prop in env) {
process.env[prop] = env[prop]
}
}
}
TODO:
module.exports
env filesenv({PORT: 4000})
, etc.)FAQs
Add env vars to your process.env
The npm package gulp-env receives a total of 6,881 weekly downloads. As such, gulp-env popularity was classified as popular.
We found that gulp-env 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.