[Feature] add XML format support
Nobody has claimed this yet.
- 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#textkeys - Support repeated same-name elements as arrays
- Preserve XML comments
- Store
sopsmetadata 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/xmlfor 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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