You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

env-sops

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-sops - npm Package Compare versions

Comparing version

to
0.0.0-20240306063736

5

bin/env-sops.js

@@ -42,3 +42,8 @@ #!/usr/bin/env node

const destPath = join(resolve(process.cwd(), argv?.destFolder), '.env')
console.info({
srcPath,
destPath
})
if (status.agePrivateKey) {
console.log('decryptWithEnv')
decryptWithEnv(srcPath, destPath)

@@ -45,0 +50,0 @@ } else if (status.sopsAgeKeyFile) {

1

lib/decrypt-with-env.js

@@ -5,2 +5,3 @@ import { execSync } from "child_process";

try {
console.info(`export SOPS_AGE_KEY="${process?.env?.SOPS_AGE_KEY ?? process?.env?.AGE_PRIVATE_KEY}" && unset SOPS_AGE_KEY_FILE && ${SOPS_COMMAND} --decrypt ${srcPath} > ${destPath}`)
execSync(`export SOPS_AGE_KEY="${process?.env?.SOPS_AGE_KEY ?? process?.env?.AGE_PRIVATE_KEY}" && unset SOPS_AGE_KEY_FILE && ${SOPS_COMMAND} --decrypt ${srcPath} > ${destPath}`);

@@ -7,0 +8,0 @@ return true;

2

package.json
{
"name": "env-sops",
"version": "0.0.0-20240306062242",
"version": "0.0.0-20240306063736",
"description": "Package to help encrypt/decrypt ENV files",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.