
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
configchecker
Advanced tools
A very simple and effective way to check config, before it's used in runtime with nice fluent API. Here is the full documentation.
A very simple and effective way to check config, before it's used in runtime with nice fluent API. Here is the full documentation.
Install from NPM
npm i configchecker
When you use some ENV value do you really know what it contains or if it is really defined?
export const { TESTING_MAIL } = process.env;
This will be OK until your server tries to send some email. Maybe it drops the whole server or just don't do nothing and you will be figuring out why the hell server is working but it doesn't send any emails.
I have this problem many many times.
And because I am a TypeScript lover it is fully using all advantages of static typing.
I load the config from some environment Object:
import { ConfigChecker } from 'configchecker';
const config = ConfigChecker.from(process.env);
And then I can read variabiles from it:
config.get('TESTING_MAIL').value;
I can enforce them:
config.get('TESTING_MAIL').required().value;
I can convert them to certain types:
config.get('...').number().value;
config.get('...').boolean().value;
config.get('...').json().value;
config.get('...').list().value;
config.get('...').date().value;
config.get('...').url().value;
import { ConfigChecker } from 'configchecker';
const config = ConfigChecker.from(process.env);
export const PORT = config
.get('PORT')
.number()
.required().value;
export const TESTING_MAIL = config.get('TESTING_MAIL').value;
This sample is working same like sample 1 but unfortunately it is not using full TypeScript potential.
import { ConfigChecker } from 'configchecker';
const config = ConfigChecker.from(process.env);
export default {
...config
.get('PORT')
.number()
.required().object,
...config.get('TESTING_MAIL').object,
};
I am open to pull requests, feedback, and suggestions. Or if you like this utility, you can ☕ buy me a coffee or donate via cryptocurrencies.
You can also ⭐ star the configchecker package, follow me on GitHub or various other social networks.
FAQs
A very simple and effective way to check config, before it's used in runtime with nice fluent API. Here is the full documentation.
The npm package configchecker receives a total of 82 weekly downloads. As such, configchecker popularity was classified as not popular.
We found that configchecker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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 researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.