Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@busy-human/configurator
Advanced tools
Manage, install, and sync configurations for your projects
Loads and synchronizes configuration
npm i -g @busy-human/configurator
It is bad practice to store passwords, keys, and other authorization elements directly in your repository. There are secure ways of distributing the configuration and keys between developers but it can be difficult to integrate this into automated workflows.
A configuration should be stored securely and require some form of authentication to access it regardless of where or how it is stored.
This tool uses key-based authentication.
The Configurator can be run interactively and non-interactively. If you call it with the right arguments, or if your package.json has the data it needs it can run certain commands without any interaction. Or, if you aren't sure what you need to provide it there are helpful prompts that gather the data needed for every command.
The Configurator can be run from your terminal after it has been installed on the system.
configurator authenticate http://myurl --key=****************
This command will fetch a token which will be saved and associated with your device. The token will then automatically be used on subsequent calls to that url.
After you've successfully authenticated you can get your configuration
configurator get
Generally your package.json should provide the data on which file to get and how to install it. But if you want to call the command directly you can use this pattern:
configurator get --url=http://myurl/myfile
The Configurator can use environment variables to supply its arguments.
CONFIGURATOR_KEY
If this is found on the system and the option is not passed into the command, they will be used when running.
You can add a new property to your package.json to store data about where and how to retrieve the configuration file(s) from.
"configurator": {
"strategy": "key",
"url": "http://myendpoint.com/myconfig"
}
DO NOT store your key in your package.json. This will be ignored by the Configurator and is a bad practice.
This optional argument will tell exactly where the configuration file should be pulled from. Generally it is recommended to call this command without directly specifying the url and to instead define the configuration in your package.json.
The first time you try to connect to a Configurator endpoint you'll be asked for a key. You'll be given a token that expires after about 30 days.
IP Restrictions can be applied in two ways.
You can set environment variables from a config file by calling a special command available:
configurator "set-env,config.json,BASE_URL=appEngine.baseUrl"
Because of how the terminal works, the program cannot set environment variables all by itself and must be invoked in a special way. The configurator can construct the command for you, however.
configurator build-set-env
This interactive command will help you automatically construct the command you need to run to get the environment variables you need in your script.
Example command generated by build-set-env:
source /dev/stdin <<< "$(cat <(configurator 'set-env,config.json,BASE_URL=appEngine.baseUrl'))"
These variables are read at run-time, so whatever the latest value is will be used by the script.
FAQs
Manage, install, and sync configurations for your projects
We found that @busy-human/configurator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.