Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Load cjson (JSON + c-style) commentaries, with inheritance-sugar on top:
> var oconf = require('oconf');
> oconf.load('config/my-config.cjson');
{
"some-setting": "default-value",
"value": 50
}
The basic idea is to experiment with applying #include
-statements recusively
inside JSON/cJSON documents:
// default-settings.cjson
{
"some-setting": "default value",
"value": 100
}
// my-config.cjson
{
"#include": "./default-settings.json",
"value": 50
}
Will result in a config with:
{
"some-setting": "default-value",
"value": 50
}
The extension of objects also work recursively, so setting a single sub-key somewhere doesn't override the entire thing.
There are no restrictions in how includes work (except no loops). Usually a structure like this is used:
project/config/default.cjson
has project-wide defaults.project/config/{dev,test,staging,production}.cjson
inherits the default
and set keys relevant to respective environmentsproject/config/$HOSTNAME.cjson
(optinal) machine-specifics that inherit
from the relevant environment-file./etc/$WORKNAME/$PROJECTNAME-secrets.cjson
inherits the machine-specific
things and typically adds production secrets.Download/clone, run npm install
and then npm test
.
The software is provided under the Modified BSD License; See LICENSE for further details.
FAQs
Configuration
We found that oconf 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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.