Skip to content
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

chore: Remove log message about resolving symlink. #13015

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

connyay
Copy link

@connyay connyay commented May 8, 2024

This log message is very spammy when building many helm charts.

What this PR does / why we need it:

This pr removes a log message about resolving symlinks.

Special notes for your reviewer:

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 8, 2024
This log message is very spammy is building many helm charts.

Signed-off-by: Connor Hindley <connor.hindley@tanium.com>
@connyay
Copy link
Author

connyay commented May 8, 2024

I have a pretty atypical build setup (bazel + helm templates), but in our mono repo that produces ~45 helm charts this log message prints out thousands of times.

image

@mattfarina
Copy link
Collaborator

The reason for the logging is due to accidental disclosure. Imaging someone creates a chart with a symlink to something in /etc and then the user of that chart sends the contents into a malicious container that sends the data somewhere. All without the person running helm knowing about the symlink. symlinks can be dangerous.

Symlink handling has been part of the discussion in our security audits because of the danger of misuse.

I understand the atypical setup you have, @connyay. Any idea how to inform Helm users (who are often not chart creators) without filling your logs?

@connyay connyay marked this pull request as draft May 10, 2024 17:52
@connyay
Copy link
Author

connyay commented May 10, 2024

Thanks for the review! Makes sense.

I’d be happy with an env var or cli flag to suppress this log message. Would that be acceptable? If so, any recommendations on naming or patterns? Something like ‘HELM_SUPPRESS_SYMLINK_LOG’?

@mattfarina
Copy link
Collaborator

I added this topic to this weeks developer call on Thursday. Will come back to this after discussing it there.

Copy link
Collaborator

@mattfarina mattfarina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this in the Helm developer call for May 23, 2024. The consensus was that we would be interested in a general log filtering mechanism instead of this specific one. If we have a flag to filter this one log message than others will ask to filter others with flags. We would want a general filtering capability.

It would essentially be like helm <commands and arguments> | grep -v "<log message to filter>"

Given that this is notification is there for security and possible abuses, we have concerns around a general flag that could easily be picked up in copy/paste commands for use with Helm.

Helm has documented audiences and the application operator (i.e. chart user) is the highest priority user. Most often, these users are getting their charts from someone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants