getsops / getsops/sops

SOPS remove ansible YAML declaration like "!unsafe"

Open
#1,002 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

SOPS is a great tool, but sometimes is a little bit invasive on YAML formatting. Ansible use YAML declaration like !unsafe to instruct parser to behave in special mode for variables evaluation/templating. SOPS remove such declaration. There are params to customize how deep SOPS can normalize/modify original YAML file ? Often happen to create variables containing such special case and secrets parts together.

Sample code:

ldap_cfg:
    path1:
        ...
        group_filter: !unsafe (&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))
        ...

!unsafe will be removed.

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

No file or test is named. Reproduce the sample with SOPS and inspect the YAML normalization or parsing path; done means the Ansible !unsafe declaration is preserved while the secret-containing YAML is processed correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, go
Domain
devops, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.