
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
@sean-nicholas/encrypted-config
Advanced tools
Loads a config file from disk and decrypts encrypted values
Loads a config.json file from disk and decrypts encrypted values.
To encrypt settings for your configuration file run encrypter(encryptionKey)
.
This starts a CLI. Enter your secret and the encrypted value will be printed.
Generally, you start with a simple config object that you define in your source code. It is filled with development / standard values.
export let config = {
mail: {
config: {
pool: true,
host: 'localhost',
port: 1025,
secure: false,
ignoreTLS: true,
auth: {
user: '',
pass: '',
}
},
},
}
Then load the config with:
config = loadConfig({
config,
encryptedFields: ['mail.config.auth.pass'],
encryptionKey: ENCRYPTION_KEY,
filePath: '/path/to/config.json' // Defaults to process.cwd()/config.json
})
Afterwards you can use the config object as usual:
const password = config.mail.auth.pass
The config.json in this example would look like this:
{
"mail": {
"config": {
"auth": {
"user": "test@example.com",
"pass": "c0a15190ec84532eaba420a2bdc269b9:e93wa3c963"
}
}
}
}
FAQs
Loads a config file from disk and decrypts encrypted values
The npm package @sean-nicholas/encrypted-config receives a total of 1 weekly downloads. As such, @sean-nicholas/encrypted-config popularity was classified as not popular.
We found that @sean-nicholas/encrypted-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 now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.