Comparing version
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", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
23457
0.35%188
0.53%12
9.09%