npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@highstate/sops

v0.15.0

Published

A Highstate package that implements SOPS (Secrets OPerationS) encryption for secrets management, using SSH host keys from servers as age recipients.

Readme

@highstate/sops

A Highstate package that implements SOPS (Secrets OPerationS) encryption for secrets management, using SSH host keys from servers as age recipients.

Overview

This package provides a secrets unit that encrypts sensitive data using SOPS with age encryption. It automatically derives age recipients from the SSH host keys of the provided servers, allowing for secure secrets distribution across your infrastructure.

Features

  • SSH Host Key Integration: Automatically uses SSH host keys from servers as encryption keys
  • Age Encryption: Leverages age encryption (modern alternative to PGP) via SOPS
  • SOPS Compatible: Generates files compatible with standard SOPS tools
  • Embedded File Output: Produces encrypted content as an embedded file entity

Usage

import { sops } from "@highstate/library"

// Define your servers with SSH host keys
const servers = [
  // Your server instances with SSH configurations
]

// Encrypt secrets using SOPS
const encryptedSecrets = sops.secrets({
  name: "my-secrets",
  secrets: {
    data: {
      databasePassword: "super-secret-password",
      apiKey: "my-api-key-12345",
      certificateData: "-----BEGIN CERTIFICATE-----\n...",
    },
  },
  inputs: {
    servers: servers,
  },
})

// Access the encrypted file
const secretsFile = encryptedSecrets.file

How It Works

  1. SSH Key Extraction: The unit extracts SSH host keys from the provided servers
  2. Age Conversion: SSH keys are converted to age recipients format (currently simulated)
  3. SOPS Encryption: Secrets are encrypted using SOPS with the derived age recipients
  4. File Generation: An encrypted SOPS file is generated and embedded

Current Implementation Status

This is a demonstration implementation that:

  • ✅ Correctly extracts SSH host keys from servers
  • ✅ Generates SOPS-compatible encrypted file structure
  • ⚠️ Uses mock encryption (not real SOPS encryption)
  • ⚠️ Simulates SSH-to-age key conversion

Production Deployment

For production use, this implementation would need:

  1. Real SSH-to-Age Conversion: Integration with tools like ssh-to-age
  2. Actual SOPS Binary: Installation and usage of the real SOPS binary
  3. Proper Key Management: Secure handling of converted age keys

Example production command that would be used:

sops encrypt --age "age1..." secrets.yaml

Dependencies

  • @highstate/pulumi - For Pulumi integration
  • @highstate/library - For unit definitions
  • @highstate/common - For Command execution
  • remeda - For utility functions

File Structure

packages/sops/
├── package.json
├── src/
│   ├── index.ts          # Package exports
│   └── secrets/
│       └── index.ts      # Main secrets unit implementation
└── README.md            # This file

Configuration

The unit expects servers with SSH configurations:

{
  ssh: {
    hostKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI..."
    // ... other SSH configuration
  }
}

Supported SSH key types:

  • ssh-ed25519 (recommended)
  • ssh-rsa (legacy support)

Security Considerations

  • SSH host keys should be verified and trusted
  • In production, proper SOPS encryption ensures secrets are protected
  • Age encryption provides forward secrecy and quantum resistance
  • Always verify the integrity of encrypted files before deployment

Related Tools

  • SOPS - The underlying encryption tool
  • age - Modern encryption tool
  • ssh-to-age - SSH to age key converter