getsops / getsops/sops

[Feature] add XML format support

Open
#2,067 6 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/stores enhancement
Dominant language
Go
Stars
23.1k
Forks
1.1k
Avg merge
1d 11h
Merged PRs (30d)
9

Description

XML is still widely used for configuration in Java/JVM ecosystems. The company I work for uses it to define part of the configurations of such an application.

Currently, teams working with XML config files that contain secrets must either convert to a supported format before encrypting with SOPS, or fall back to BINARY mode which loses the structured diff and selective encryption benefits.

Proposal

Add an xml store alongside the existing json, yaml, ini, and dotenv stores. The implementation would:

  • Map XML elements to SOPS tree branches, attributes to @-prefixed keys, and text content to #text keys
  • Support repeated same-name elements as arrays
  • Preserve XML comments
  • Store sops metadata as a <sops> child element of the root (consistent with how other structured formats handle it)
  • Reject mixed content (interleaved text and child elements) with a clear error, as this pattern is more common in document markup (HTML, DocBook) rather than in configuration files
  • Use Go's standard encoding/xml for parsing/emission (no new dependencies)

I have a working implementation based on the existing store architecture (modeled after the INI store for metadata flattening and the JSON store for hierarchical tree construction). Happy to open a PR if there's interest.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing INI and JSON stores and the shared store architecture, then inspect Go's standard encoding/xml behavior. Done means adding an XML store that maps elements, attributes, text, repeated elements, comments, and the sops metadata child as proposed, while rejecting mixed content clearly and preserving structured encryption behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, xml
Domain
security, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.