Commit cd6e5bc
authored
feat(secrets): add SOPS + age secrets management with stackctl.sh integration (#491)
* chore(secrets): update .sops.yaml for service-local .env.enc pattern
* docs: update README with secrets workflow reference
* docs(secrets): update Phase 1 status in proposal
* docs(secrets): rewrite for service-local .env.enc workflow
* feat(secrets): add secrets subcommand to stackctl.sh
Adds encrypt, decrypt, deploy, and clean operations for managing
service-local .env.enc files with SOPS + age. Deploy decrypts,
renders, deploys, and shreds plaintext .env in one step.
* chore(secrets): allowlist .env.enc in gitignore
* docs(secrets): update all READMEs and proposal for consistency
- stacks/README.md: add secrets deploy note to doctor and stackctl sections
- README.md: fix duplicate section numbering (two section 5s → 5 and 6)
- proposal: update stale secrets/ paths to service-local .env.enc pattern
- proposal: fix docs/secrets.md reference → docs/Managing Secrets.md
* chore: remove .mcp.json and .opencode.json, add design spec
* fix: harden secrets handling per PR #491 review
- per-operation tool checks (no sops/age required for clean)
- service selection now accepts basename or repo-relative path
- encrypt writes to temp file, atomically moves to .env.enc
- decrypt uses umask 077 + temp file + atomic move
- deploy decrypt and cleanup follow same secure pattern
- precise stack detection via env_file path match (no loose grep)
- deploy cleanup only shreds files decrypted in this run
- .sops.yaml path_regex covers both .env and .env.enc
- replace globstar key-rotation example with portable find -exec1 parent 30516d1 commit cd6e5bc
10 files changed
Lines changed: 573 additions & 84 deletions
File tree
- docs
- proposals
- superpowers/specs
- stacks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
270 | 280 | | |
271 | 281 | | |
272 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 15 | + | |
12 | 16 | | |
13 | | - | |
14 | 17 | | |
15 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
16 | 30 | | |
| 31 | + | |
17 | 32 | | |
18 | | - | |
19 | 33 | | |
20 | | - | |
21 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
22 | 38 | | |
23 | | - | |
24 | 39 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
28 | 45 | | |
29 | | - | |
30 | 46 | | |
31 | | - | |
32 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
33 | 51 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
37 | 58 | | |
38 | | - | |
39 | 59 | | |
40 | | - | |
| 60 | + | |
| 61 | + | |
41 | 62 | | |
42 | | - | |
43 | | - | |
| 63 | + | |
44 | 64 | | |
45 | | - | |
46 | 65 | | |
47 | | - | |
48 | | - | |
| 66 | + | |
49 | 67 | | |
50 | | - | |
51 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
52 | 71 | | |
53 | | - | |
54 | 72 | | |
55 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
56 | 78 | | |
57 | | - | |
58 | 79 | | |
59 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
60 | 131 | | |
61 | 132 | | |
62 | | - | |
63 | | - | |
64 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
65 | 137 | | |
66 | 138 | | |
67 | | - | |
68 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
0 commit comments