Commit 6e48567
fix(security): address P2-8 Copilot review nits
- aead.go: docstring no longer claims "lowercase hex" only; hex.DecodeString
accepts both cases, and constraining the wire form would just be a foot-gun.
- aead.go: ErrKeyRequired message no longer points to --generate-webhook-secret
as the recovery path. That flag won't overwrite an existing file, so it
wouldn't actually unblock recovery for an encrypted webhook secret. The
doc comment for ErrKeyRequired explains this; the message itself just
says "delete the file and re-generate the secret".
- main.go: plaintext-encryption warning moved out of the one-shot CLI
handler region (was firing before --show-api-key etc., polluting their
stdout). Now only emitted on normal startup. Malformed-key validation
still runs early so any subcommand that needs to decrypt fails cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 96bd383 commit 6e48567
2 files changed
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 101 | | |
104 | 102 | | |
105 | 103 | | |
| |||
179 | 177 | | |
180 | 178 | | |
181 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
182 | 189 | | |
183 | 190 | | |
184 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | | - | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
36 | | - | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
0 commit comments