Skip to content

feat: Add SOPS and age for secrets management#81

Draft
jflowers wants to merge 9 commits intocomplytime:mainfrom
jflowers:main
Draft

feat: Add SOPS and age for secrets management#81
jflowers wants to merge 9 commits intocomplytime:mainfrom
jflowers:main

Conversation

@jflowers
Copy link
Copy Markdown

Summary

This PR introduces SOPS and age for secrets management to improve security workflows. It also includes the necessary documentation updates.

Related Issues

No related issues.

Review Hints

This PR includes the following changes:

  • Added SOPS and age configuration
  • Updated documentation

Comment thread .github/workflows/demo_secrets.yml Fixed
Comment thread .github/workflows/demo_secrets.yml Fixed
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jflowers Great guide for setting up age with sops. This is very helpful.

Copy link
Copy Markdown
Contributor

@marcusburghardt marcusburghardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jflowers it is nice solution. Thanks. I have some comments about the implementation details.

Comment thread .github/workflows/demo_secrets.yml
Comment thread .github/workflows/demo_secrets.yml Outdated
Comment thread .github/workflows/demo_secrets.yml Outdated
Comment thread .github/workflows/demo_secrets.yml Outdated

- name: Decrypt Secrets
run: |
sops -d secrets.enc.yaml > secrets.yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the documentation introduced by this PR I understood this will be a "production" file, so this command would basically save the output in clear text. Although the runner have a short lifetime, I have concerns to with this command. Or we make it clear that is just a demo and the file must not be used with real data.

Comment thread .github/workflows/demo_secrets.yml
Comment thread docs/secrets_management.md Outdated
brew install age sops

# For Fedora:
sudo dnf install age sops
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately sops is not available as a package for Fedora.
I could install with these commands:

curl -LO https://github.com/getsops/sops/releases/download/v3.11.0/sops-v3.11.0.linux.amd64
mv sops-v3.11.0.linux.amd64 ~/bin/sops
chmod +x ~/bin/sops

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is all fine with age.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcusburghardt I used that method as well.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a brew(LinuxBrew) formula?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not aware of a brew package for Fedora now. It can be manually installed, similarly to the sops approach above. But then we would have another manual/ad-hoc installation process. It seems brew could be skipped in this case, at least for now.

jflowers and others added 3 commits February 10, 2026 12:00
Co-authored-by: Marcus Burghardt <2074099+marcusburghardt@users.noreply.github.com>
- Add top-level permissions: {} to demo_secrets.yml for Scorecard
- Upgrade SOPS from v3.9.4 to v3.11.0
- Replace sops -d with sops --extract to avoid writing clear text to disk
- Fix Fedora install instructions (sops not available via dnf)

Signed-off-by: Jay Flowers <jflowers@redhat.com>
* feat/secrets-management:
  fix: address review comments from marcusburghardt
Comment thread secrets.enc.yaml
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jflowers I believe your user has to run the sops updatekeys secrets.enc.yaml to update the encrypted secrets.enc.yaml with my key added to the .sops.yaml. Then, I can test the decryption functionality.

Copy link
Copy Markdown
Contributor

@marcusburghardt marcusburghardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @jflowers

@@ -0,0 +1,28 @@
name: Demo Secrets
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I forgot another minor point. We have simple style guide for these files names.

I just noticed this case is not clearly covered there, but ideally this workflow should be prefixed by ci_ for organizational purposes. In any case, I would not block the PR because of this specially considering the number of workflows currently implemented. So, up to you to update or keep as it is. : )

@marcusburghardt
Copy link
Copy Markdown
Contributor

Moving it to draft as agreed with @jflowers

@marcusburghardt marcusburghardt marked this pull request as draft February 23, 2026 12:25
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.

4 participants