🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
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-20240306065803

3

lib/decrypt-with-env.js
import { execSync } from "child_process";
import { readFileSync } from "fs";

@@ -7,3 +8,3 @@ export const decryptWithEnv = async (srcPath, destPath, SOPS_COMMAND = "sops") => {

execSync(`export SOPS_AGE_KEY="${process?.env?.AGE_PRIVATE_KEY}" && unset SOPS_AGE_KEY_FILE && ${SOPS_COMMAND} --decrypt ${srcPath} > ${destPath}`);
console.log(`Decrypted file: ${destPath}`);
console.log(`Decrypted file: ${destPath}`, readFileSync(destPath, { encoding: 'utf-8' }));
return true;

@@ -10,0 +11,0 @@ } catch (error) {

{
"name": "env-sops",
"version": "0.0.0-20240306065415",
"version": "0.0.0-20240306065803",
"description": "Package to help encrypt/decrypt ENV files",

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