Commit 59d6207
fix(cli): redact interpolated secret values on the deploy accessory verb (#3206)
The #3159 fix wired $registerSecretsForRedaction() into DeployAppCli and
DeployMainCli, but the standalone `wheels deploy accessory boot|reboot <name>`
verbs route through DeployAccessoryCli, which shares no base class and never
registered the resolver's secret values on its SshPool. AccessoryCommands
embeds env.clear values — including ${SECRET}-interpolated ones — as
`docker run ... -e 'KEY=value'` in argv, so a nonzero accessory exit surfaced
the raw secret in the Wheels.Deploy.RemoteExecutionFailed message and CI logs:
the exact leak #3159 closes, just on the accessory verb.
DeployAccessoryCli now calls $registerSecretsForRedaction() in $forEach right
after load() (ahead of any $dispatch), reading loader.secretResolver().all()
the same way the other two CLIs do. A regression spec drives the leak path
end-to-end: an env.clear value interpolated from a ${DB_ROOT_PW} token, a
failed accessory docker run, and asserts the value is scrubbed to [REDACTED].
Refs #3159
Signed-off-by: Peter Amiri <petera@pai.com>
Co-authored-by: Peter Amiri <petera@pai.com>1 parent 68fadcf commit 59d6207
2 files changed
Lines changed: 91 additions & 0 deletions
File tree
- cli/lucli
- services/deploy/cli
- tests/specs/deploy/cli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
121 | 128 | | |
122 | 129 | | |
123 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
124 | 150 | | |
125 | 151 | | |
126 | 152 | | |
| |||
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
146 | 187 | | |
147 | 188 | | |
148 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
149 | 214 | | |
150 | 215 | | |
151 | 216 | | |
| |||
0 commit comments