-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Make dry-run=server optional #499
Conversation
cmd/upgrade.go
Outdated
@@ -67,6 +69,11 @@ func (d *diffCmd) isAllowUnreleased() bool { | |||
return d.allowUnreleased || d.install | |||
} | |||
|
|||
func (d *diffCmd) isRemoteAccessAllowed() bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding some unit tests will be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yxxhero Are you saying we should have a unit test for checking all the combinations of variables involved in L73?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah.
15bd5c9
to
520e96e
Compare
Any ETA for this PR? and new release ? 🥺 🙏 |
Related to #449 |
It looks like the
|
This intends to fix a potential security issue introduced via #458 before cutting the next helm-diff release. Since #458 (unreleased), we had forced helm-diff to use `helm template --dry-run=server` for Helm 3.13 or greater. I think this can create an unintended security hole, where any users, who can run helm-diff via CI or any automation with an arbitrary chart and values, is able to view cluster resources via helm template's `lookup` functions. Previously this was impossible because `helm template` run by `helm diff` had no access to the `lookup` function. To fix this, we need to make `--dry-run=server` optional. And we do so by introducing a new flag `--dry-run=[|client|server]` to helm-diff. See the updated README and the updated helm-diff help message for more details.
9391fc9
to
81d9545
Compare
@cavedon Thank you very much for testing! I fixed it and added some tests to verify flag parsing is working. |
81d9545
to
94c0f4e
Compare
This is a follow-up on #499 which redoes it without relying on DisableParsing. DisableParsing turned out to break far many things than I imagined!
This is a follow-up on #499 which redoes it without relying on DisableParsing. DisableParsing turned out to break far many things than I imagined!
This is a follow-up on #499 which redoes it without relying on DisableParsing. DisableParsing turned out to break far many things than I imagined!
This is a follow-up on #499 which redoes it without relying on DisableParsing. DisableParsing turned out to break far many things than I imagined!
This is a follow-up on #499 which redoes it without relying on DisableParsing. DisableParsing turned out to break far many things than I imagined!
* Remake dry-run=server optional This is a follow-up on #499 which redoes it without relying on DisableParsing. DisableParsing turned out to break far many things than I imagined! * Remove redundant test case * optimze little code Signed-off-by: yxxhero <[email protected]> --------- Signed-off-by: yxxhero <[email protected]> Co-authored-by: yxxhero <[email protected]>
This intends to fix a potential security issue introduced via #458 before cutting the next helm-diff release.
Since #458 (unreleased), we had forced helm-diff to use
helm template --dry-run=server
for Helm 3.13 or greater.I think this can create an unintended security hole, where any users, who can run helm-diff via CI or any automation with an arbitrary chart and values, is able to view cluster resources via helm template's
lookup
functions.Previously this was impossible because
helm template
run byhelm diff
had no access to thelookup
function. To fix this, we need to make--dry-run=server
optional. And we do so by changing helm-diff's--dry-run
flag to accept only only booleans but alsoclient
andserver
. The updated flag usage is--dry-run[=[|true|false|client|server]]
.See the updated README and the updated helm-diff help message for more details.