Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
bringenvironmentvariablesfromapp
Advanced tools
Module to set up local process to point to a different environment.
This module can used in Node JS applications to mimic the environment variables used in a different environment
To test this module, run the following commands:
#Usage
##Downloading environment variables file In the module where the functional tests will be run, you need to firstly download the json file with the environment variable configurations. This file can be found in the Azure project of which environment variables you want to mimic locally. For example, this is the URL for the environment variables file for the RFE project in AAT:
https://div-rfe-aat.scm.service.core-compute-aat.internal/api/settings
In order to log in, you'll have to enter your SCM credentials. These can be registered in Azure. Once you have access to this file, just save it as a json file anywhere in your computer. If you choose to save it in your project, don't forget to add this file to .gitignore so that you don't check this into GitHub (exposing secrets).
##Installing the package in your project To install this as a dev dependency in your project, just run:
yarn add "https://github.com/hmcts/node-js-environment-variable-setter#0.2" -D
##Having environment variables changed on the fly for your test
const processEnvironmentSetup = require('@hmcts/node-js-environment-variable-setter');
const configurationFile = './remote-config.json'; //This will be the path to the file you saved with the environment variables
processEnvironmentSetup.setUpEnvironmentVariables(configurationFile);
From this point onwards, your project will have the same environment variables set in the json file (with the exception of the ignored properties - you can find this list in this module's source code).
FAQs
Module to set up local process to point to a different environment.
The npm package bringenvironmentvariablesfromapp receives a total of 1 weekly downloads. As such, bringenvironmentvariablesfromapp popularity was classified as not popular.
We found that bringenvironmentvariablesfromapp 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.