
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
snyk-config
Advanced tools
Loads the configuration for your module.
Although you can require this module directly, it's recommended you create your
own config.ts file that can be cached by the require system and called without a path:
// config.ts
import { loadConfig } from 'snyk-config';
export const config = loadConfig('<directory with config files>');
// in app.ts
import { config } from './config';
// in foo.ts
import { config } from './config'; // matches config in app.ts
The config loader will look for the following values in order of priority, specifically, if a property appears in multiple layers of config (below) the first found is used:
SNYK_config.secret.json file in the path specified by:
secretConfig option, orCONFIG_SECRET_FILE, orconfig.${SERVICE_ENV}.json file in the specified config directory,
SERVICE_ENV defaults to local, if not setconfig.default.json file in the specified config directory{
"from": "file"
}
import { loadConfig } from 'snyk-config';
// as we're in the same directory as the config.local.json, there's no arg
const config = loadConfig();
console.log(config);
$ SNYK_from=cli node app.js
=> { from: "cli" }
strings
or booleans. This is important to differentiate from values parsed in the config files
as these can be numbers.SNYK_ string, so SNYK_foo = 10
becomes foo = "10"SNYK_foo__bar = 10 becomes foo = { bar: "10" }parseEnvValues option, or by setting
the CONFIG_PARSE_ENV_VALUES environment variable.FAQs
Config setup for snyk shared across projects
The npm package snyk-config receives a total of 114,842 weekly downloads. As such, snyk-config popularity was classified as popular.
We found that snyk-config 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.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.