dev tools updates#6774
Conversation
eedd0b0 to
808dc56
Compare
jsternberg
left a comment
There was a problem hiding this comment.
Can you split out the root fs stuff into a different PR so those can be evaluated separately? Everything else looks fine beyond one minor nitpick and I don't want to hold up the rest of the PR just because I need more time to look at the root fs stuff.
808dc56 to
c1a2d9b
Compare
This would mean I can't update the linter because the updated linter is requiring these changes. It's the "path traversal" from https://github.com/securego/gosec/blob/master/RULES.md#g7xx-taint-analysis |
|
OK I'll take an in depth look at the root filesystem stuff and we can keep these together. |
| if err != nil { | ||
| panic(err) | ||
| } | ||
| defer root.Close() |
There was a problem hiding this comment.
This defer happens at the end of the function and not in the for loop. It might be easier to just move this to an extra function since I think this is long enough that the defers are helpful and I think an anonymous function would be distracting.
There was a problem hiding this comment.
I just removed it from here. Not needed in this helper app and breaks symlinks.
Update golangci-lint and adjust code for new gosec diagnostics. Use root-scoped filesystem operations where appropriate, preserve explicit user path behavior for SSH keys, and avoid background contexts in request-scoped cleanup paths. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Update non-generated code for the newer lint recommendations by using typed atomic values, strings.Cut, and slices.Backward where applicable. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
c1a2d9b to
64f364f
Compare
Various dev tools updates after v0.30 milestone close