You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
writ finds and applies .sops.yaml differently from sops: from the secret's directory, through a chain with a devlore fallback, SOPS_CONFIG ignored, a malformed file skipped silently #1144
Writ finds and applies .sops.yaml differently from the sops command, so a secret writ encrypts can get other recipients than one sops encrypt makes from the same repository.
Found 2026-10-22 while planning #977 (lane 47 of #949), by reading writ's pkg/sops against sops v3.12.1, the library version devlore-cli uses.
What differs
sops (the app)
writ (pkg/sops/encrypter.go, locate.go)
Search starts at
the current directory (config.LookupConfigFile("."))
the secret's own directory
Search stops at
100 levels up
the run's root (RuntimeEnvironment().Root())
Files considered
the first .sops.yaml found, only
every .sops.yaml up the tree, nearest first, until one has a matching creation rule
Global fallback
none
$XDG_CONFIG_HOME/devlore/sops.yaml
--config / SOPS_CONFIG
used, and the search is skipped
ignored
A malformed .sops.yaml
an error
skipped silently: getsops reports a parse failure and "no matching rule" alike, and firstMatchingConfig skips both, so the secret is encrypted for whatever a farther config names
.sops.yml
ignored, with a warning
ignored, silently
Started at the layer's root, the library's own two functions, config.LookupConfigFile then config.LoadCreationRuleForFile with the secret's absolute path, give exactly the file and rule sops encrypt gives when run from that root, wherever writ itself runs. The two then differ only when a nested .sops.yaml exists or sops is run outside the repository.
Options (the owner's to rule)
A. One .sops.yaml at the layer's root, read the library's way from the root, SOPS_CONFIG honored; the chain, the devlore fallback and the silent skip go. Agrees with the secret family's rulings (docs/plans/writ-secret-init.md, ruled 2026-08-10: recipients in the layer root's .sops.yaml).
B. Recipients in devlore's configuration rather than .sops.yaml. The library's config functions take only a file path, but writ builds the document itself and needs only key groups, which the library's exported constructors make (age.MasterKeysFromRecipients). devlore's configuration is per machine, so recipients would not travel with the repository, and it reverses the 2026-08-10 ruling.
Discussed 2026-10-22 with a writ sops subcommand to make the sops app unnecessary; the writ secret family already charters decrypt, rekey, list, init and recover (edit is not among them).
Taken onto the install-scripts schedule, devlore-cli#949, as lane 61 (ruled 2026-10-23), and removed from it 2026-10-25 with every lane not directly about finishing the install scripts.
Activity
fix(sops): writ encrypts and decrypts every secret as its bytes, so t…
David-Noble-at-work commentedon Oct 24, 2026
Taken onto the install-scripts schedule, devlore-cli#949, as lane 61 (ruled 2026-10-23), and removed from it 2026-10-25 with every lane not directly about finishing the install scripts.
David-Noble-at-work commentedon Nov 9, 2026
star github triage sweep added this issue to Triage: devlore, for the rules it breaks:
severity: a Bug whose Severity is blank; a bug is Critical, High, Medium or Lowno-evidence: no Evidence of completion section