check secret target is an absolute windows path#10819
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## v2 #10819 +/- ##
==========================================
+ Coverage 59.42% 59.55% +0.12%
==========================================
Files 115 115
Lines 9896 9909 +13
==========================================
+ Hits 5881 5901 +20
+ Misses 3426 3414 -12
- Partials 589 594 +5
☔ View full report in Codecov by Sentry. |
milas
left a comment
There was a problem hiding this comment.
We do have a version of this that looks like it might be slightly more robust in compose-go already: https://github.com/compose-spec/compose-go/blob/95ac1be8bfdc4dc21cdfb14e37b52c31275046a3/loader/windows_path.go#L32-L43
(and it has test coverage 😉)
I think we should export & clean up the naming (s/isAbs/IsWindowsAbs/) from compose-go and switch to them here, but this should unblock all but the most pathological cases so LGTM 👍🏻
Signed-off-by: Nicolas De Loof <[email protected]>
What I did
As we check secret target is absolute, we need to consider both unix and windows absolute path syntaxes
we could be more deterministic relying on image platform to only run the relevant code, but doesn't seem there are major risks for confusion
Related issue
fixes #10817
(not mandatory) A picture of a cute animal, if possible in relation to what you did