Skip to content

feat: add markdown file support for SOPS encryption/decryption#81

Open
gavinmcfall wants to merge 1 commit into
signageos:masterfrom
gavinmcfall:feat/markdown-support
Open

feat: add markdown file support for SOPS encryption/decryption#81
gavinmcfall wants to merge 1 commit into
signageos:masterfrom
gavinmcfall:feat/markdown-support

Conversation

@gavinmcfall

Copy link
Copy Markdown

Summary

  • Treat markdown files (languageId: 'markdown') as plaintext format for SOPS encryption/decryption
  • Enables automatic encryption/decryption of *.sops.md files in VS Code

Use Case

Users can now store SOPS-encrypted markdown documentation (e.g., sensitive notes, PII, credentials documentation) with the same seamless VS Code integration as YAML/JSON files.

Changes

Added a simple check in getSupportedFileFormat() to map markdown → plaintext:

// Treat markdown files as plaintext for SOPS encryption/decryption
if (languageId === 'markdown') {
    return 'plaintext';
}

Testing

Tested with:

  1. Created a markdown file with sensitive content
  2. Encrypted with sops --encrypt --in-place file.sops.md
  3. Extension correctly detects SOPS encryption and creates decrypted view
  4. Edits to decrypted view correctly re-encrypt on save

Treat markdown files (languageId: 'markdown') as plaintext format,
enabling automatic encryption/decryption of *.sops.md files.

This allows users to store SOPS-encrypted markdown documentation
(e.g., sensitive notes, PII, credentials documentation) with the
same seamless VS Code integration as YAML/JSON files.
gavinmcfall added a commit to gavinmcfall/home-ops that referenced this pull request Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant