fix(skill): scope TrimSpace advice to Make-included vault reads
What
otica-migrate-kube/SKILL.md no longer tells migrators to | strings.TrimSpace every vault read. The advice is now scoped:
- Make-included scalars (
envvars.sec/env.mk→-included): keepTrimSpace(a trailing\nbreaks Make withmissing separator). - Secret
data:payloads (PEM keys, certs, keytabs): render verbatim — neverTrimSpacebeforebase64.Encode, or you drop a significant trailing newline and lose byte parity withvault2kube.
Why
Blanket trimming silently corrupts secrets whose trailing newline is significant (PEM requires one per RFC 7468). The breakage is invisible at render time and only surfaces when a workload loads a key/cert missing its final \n. This is the migration-side counterpart to #4 (closed) (vault-read.sh verbatim output).
Changes (docs-only, single file)
- Gotcha #1 (closed) scoped to
-included Make reads + explicit 'never trim Secret payloads' warning. - Binary-blob section: 'render verbatim, never TrimSpace before base64.Encode' note.
- Validate section: byte-parity check (
vault-read.sh ... | wc -cvs decoded rendered length).
Verification
make validatepasses.- The added validation snippet was tested end-to-end:
grep 'my-key:' ... | awk '{print $2}' | base64 -d | wc -ccorrectly returns the stored byte count (a self-review caught and fixed an earliergrep -A1 | tail -1version that decoded the wrong YAML line). - Cross-checked sibling migrate skills (otica-migrate, -gke, -docker, -tf): none recommend TrimSpace; gke already renders
data:verbatim — no edits needed there.
Closes #5 (closed)
Closes #5 (closed)