only allow sops encryption of *.sops.* files #69

Merged
lilly merged 1 commit from only-encrypt-sops-files-with-sops into main 2026-03-06 20:21:58 +01:00
Owner

This prevents users from accidentally encrypting any file with sops because only creation rules for e.g. something.sops.yaml exist now. It also documents explicitly that all our sops files have this .sops. marker.

This prevents users from accidentally encrypting any file with sops because only creation rules for e.g. `something.sops.yaml` exist now. It also documents explicitly that all our sops files have this `.sops.` marker.
lilly self-assigned this 2026-03-05 20:24:19 +01:00
only allow sops encryption of *.sops.* files
Some checks failed
/ Ansible Lint (pull_request) Has been cancelled
/ Ansible Lint (push) Has been cancelled
7f80bb5e7c
lilly force-pushed only-encrypt-sops-files-with-sops from 7f80bb5e7c
Some checks failed
/ Ansible Lint (pull_request) Has been cancelled
/ Ansible Lint (push) Has been cancelled
to cafdb1aa30
All checks were successful
/ Ansible Lint (push) Successful in 7m12s
/ Ansible Lint (pull_request) Successful in 18m12s
2026-03-05 20:32:20 +01:00
Compare
june requested changes 2026-03-06 19:11:03 +01:00
Dismissed
june left a comment
Owner

Running sops edit on a file (invalid or valid, just not existing yet), returns:

can not compile regexp: error parsing regexp: invalid nested repetition operator: `**`
Running `sops edit` on a file (invalid or valid, just not existing yet), returns: ``` can not compile regexp: error parsing regexp: invalid nested repetition operator: `**` ```
lilly force-pushed only-encrypt-sops-files-with-sops from cafdb1aa30
All checks were successful
/ Ansible Lint (push) Successful in 7m12s
/ Ansible Lint (pull_request) Successful in 18m12s
to 99365d06b2
All checks were successful
/ Ansible Lint (push) Successful in 3m8s
/ Ansible Lint (pull_request) Successful in 3m32s
2026-03-06 19:51:45 +01:00
Compare
Author
Owner

@june wrote in #69 (comment):

Running sops edit on a file (invalid or valid, just not existing yet), returns:

can not compile regexp: error parsing regexp: invalid nested repetition operator: `**`

ahh yes that was leftover from when I accidentally interpreted it as glob. should be fixed now

@june wrote in https://git.hamburg.ccc.de/CCCHH/ansible-infra/pulls/69#issuecomment-3640: > Running `sops edit` on a file (invalid or valid, just not existing yet), returns: > > ```text > can not compile regexp: error parsing regexp: invalid nested repetition operator: `**` > ``` ahh yes that was leftover from when I accidentally interpreted it as glob. should be fixed now
june requested changes 2026-03-06 20:01:41 +01:00
Dismissed
june left a comment
Owner

Ah, now I correctly can't create invalid files with sops, but also no valid ones either. Both error with:

error loading config: no matching creation rules found
Ah, now I correctly can't create invalid files with sops, but also no valid ones either. Both error with: ``` error loading config: no matching creation rules found ```
lilly force-pushed only-encrypt-sops-files-with-sops from 99365d06b2
All checks were successful
/ Ansible Lint (push) Successful in 3m8s
/ Ansible Lint (pull_request) Successful in 3m32s
to a1891a9988
Some checks failed
/ Ansible Lint (pull_request) Successful in 3m20s
/ Ansible Lint (push) Has been cancelled
2026-03-06 20:10:23 +01:00
Compare
Author
Owner

@june wrote in #69 (comment):

Ah, now I correctly can't create invalid files with sops, but also no valid ones either. Both error with:

error loading config: no matching creation rules found

this will now serve as my personal reminder to always quote YAML strings…
works now. for real for real.

@june wrote in https://git.hamburg.ccc.de/CCCHH/ansible-infra/pulls/69#issuecomment-3662: > Ah, now I correctly can't create invalid files with sops, but also no valid ones either. Both error with: > > ```text > error loading config: no matching creation rules found > ``` this will now serve as my personal reminder to always quote YAML strings… works now. for real for real.
june approved these changes 2026-03-06 20:19:17 +01:00
june left a comment
Owner

Works now, very nice!!

Works now, very nice!!
lilly force-pushed only-encrypt-sops-files-with-sops from a1891a9988
Some checks failed
/ Ansible Lint (pull_request) Successful in 3m20s
/ Ansible Lint (push) Has been cancelled
to 0788fde69d
All checks were successful
/ Ansible Lint (pull_request) Successful in 2m31s
/ Ansible Lint (push) Successful in 13m55s
2026-03-06 20:21:34 +01:00
Compare
lilly merged commit 0788fde69d into main 2026-03-06 20:21:58 +01:00
lilly deleted branch only-encrypt-sops-files-with-sops 2026-03-06 20:21:58 +01:00
Sign in to join this conversation.
No description provided.