-
Notifications
You must be signed in to change notification settings - Fork 102
Validate file permissions during config apply #1284
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
Conversation
UnwashedMeme
left a comment
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.
The commit message doesn't give any indication why this change is desirable and while for my use case this is nice that doesn't seem obvious that all use cases should block this.
Can you add some text explaining why this is changing?
|
|
||
| permissionErr := fms.validateAndFixPermissions(ctx, fileOverview.GetFiles()) | ||
| if permissionErr != nil { | ||
| return model.PermissionChange, permissionErr |
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.
Could this be the below instead ?
| return model.PermissionChange, permissionErr | |
| return return model.Error, allowedErr |
Proposed changes
This PR aims to prevent any files from having execute permissions set during config apply. File permissions are being set by the management plane but this change is an additional check to ensure that no files are written with execute permissions.
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTINGdocumentmake install-toolsand have attached any dependency changes to this pull requestREADME.md)