Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sops-decoder

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sops-decoder

SOPS Decoder for JavaScript (Node)

  • 0.10.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
734
decreased by-50.51%
Maintainers
0
Weekly downloads
 
Created
Source

SOPS Decoder for JavaScript (Node)

NPM Version NPM Downloads Build Status

This is a decoder for SOPS encoded files. This lightweight encoder makes it easy to embed in your AWS Lambda functions or Docker images without having to bring along the whole Go package.

Note: The decodeFile() method only supports JSON input.

Installation

npm install --save sops-decoder

Quick Start

    const sopsDecode = require('sops-decoder');

    try {
      const data = await sopsDecode.decodeFile('secure.enc.json');

      // do something with the data
      console.log(JSON.stringify(data, undefined, 2));
    } catch (err) {
      // Handle the error (SopsException)
      console.log(err);
    }

API

interface Tree {
  [key: string]: any;
}

//
// Take the given path as JSON and read the file contents and then call decode on the result
//
decodeFile(path: string): Promise<Tree>

//
// Run the given tree through the SOPS decoder and return a "plaintext" version of the
//   result
//
decode(tree: Tree): Promise<Tree>

TODO

  • Unit Testing
  • PGP Key support
  • GCP Support
  • Azure support

Keywords

FAQs

Package last updated on 26 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc