Commit 10abef9
fix(lint): eliminate G602 and guard ResolveSizing on abstract sizes only
Two related fixes to the ResolveSizing loop in applyWithProviderAndStore:
1. G602 (gosec slice index out-of-range false positive): replace indexing
via specs[i] with a local pointer `spec := &specs[i]` so gosec can
confirm the slice access is safe.
2. isAbstractSize guard (Copilot #2): add isAbstractSize helper that
returns true only for xs/s/m/l/xl. ResolveSizing is now skipped for
provider-specific slugs (e.g. "db-s-1vcpu-1gb") which are already
concrete and must not be re-resolved.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent d19f4de commit 10abef9
1 file changed
Lines changed: 24 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
196 | 198 | | |
197 | | - | |
| 199 | + | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | | - | |
| 203 | + | |
201 | 204 | | |
202 | | - | |
| 205 | + | |
203 | 206 | | |
204 | 207 | | |
205 | | - | |
206 | | - | |
| 208 | + | |
| 209 | + | |
207 | 210 | | |
208 | | - | |
| 211 | + | |
209 | 212 | | |
210 | | - | |
| 213 | + | |
211 | 214 | | |
212 | 215 | | |
213 | 216 | | |
| |||
294 | 297 | | |
295 | 298 | | |
296 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
0 commit comments