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

Make symlink error message more helpful #646

Closed
cari-lynn opened this issue Apr 11, 2022 · 4 comments
Closed

Make symlink error message more helpful #646

cari-lynn opened this issue Apr 11, 2022 · 4 comments
Labels
enhancement This issue is a feature request error msg improvement good first issue An issue that will be a good candidate for a new contributor snack This issue has been identified as lightweight and potentially quick to deliver.

Comments

@cari-lynn
Copy link
Contributor

Describe the problem/challenge you have
Using symlinks like in Kubernetes to mount a configmap or secret into a container causes a error unless using --allow-symlink-destination. This error message is confusing as to why symlinks aren't allowed by default.

The current error:

$ ytt -f /opt/xxx/config/workshop.yaml
ytt: Error: Checking symlink file '/opt/xxx/config/workshop.yaml':
  Expected symlink file '/opt/xxx/config/workshop.yaml' -> '/opt/xxx/config/..2022_04_09_00_13_38.3873050756/workshop.yaml' to be allowed, but was not

Describe the solution you'd like
A more clear error that describes how to solve the problem:

$ ytt -f /opt/xxx/config/workshop.yaml
ytt: Error: Checking symlink file '/opt/xxx/config/workshop.yaml':
  Expected symlink file '/opt/xxx/config/workshop.yaml' -> '/opt/xxx/config/..2022_04_09_00_13_38.3873050756/workshop.yaml' to be allowed, but was not. Symlinks are disallowed as a security feature, use `--allow-symlink-destination` flags to override

Anything else you would like to add:
Originating issue: #643


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@cari-lynn cari-lynn added enhancement This issue is a feature request good first issue An issue that will be a good candidate for a new contributor error msg improvement carvel triage This issue has not yet been triaged for relevance snack This issue has been identified as lightweight and potentially quick to deliver. and removed carvel triage This issue has not yet been triaged for relevance labels Apr 11, 2022
@cppforlife
Copy link
Contributor

cppforlife commented Apr 12, 2022

this is a good example for using hint:

$ ytt -f /opt/xxx/config/workshop.yaml
ytt: Error: Checking symlink file '/opt/xxx/config/workshop.yaml':
  Expected symlink file '/opt/xxx/config/workshop.yaml' -> '/opt/xxx/config/..2022_04_09_00_13_38.3873050756/workshop.yaml' to be allowed, but was not (hint: symlinks are disallowed as a security feature, use '--allow-symlink-destination' flags to override)

@vicmarbev
Copy link
Contributor

I would like to work on it!

@cari-lynn
Copy link
Contributor Author

@vicmarbev That's great to hear! We will keep an eye out for a PR from you. Let us know if you have any questions here or in the Kubernetes Slack in #carvel channel. :)

@cppforlife
Copy link
Contributor

merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue is a feature request error msg improvement good first issue An issue that will be a good candidate for a new contributor snack This issue has been identified as lightweight and potentially quick to deliver.
Projects
None yet
Development

No branches or pull requests

3 participants