-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: use a lower file permission in file creation #18206
Conversation
@tac0turtle your pull request is missing a changelog! |
x/upgrade/keeper/keeper.go
Outdated
@@ -491,7 +491,8 @@ func (k Keeper) DumpUpgradeInfoToDisk(height int64, p types.Plan) error { | |||
// GetUpgradeInfoPath returns the upgrade info file path | |||
func (k Keeper) GetUpgradeInfoPath() (string, error) { | |||
upgradeInfoFileDir := path.Join(k.getHomeDir(), "data") | |||
if err := os.MkdirAll(upgradeInfoFileDir, os.ModePerm); err != nil { |
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.
@julienrbrt will anyone other than the sdk need to modify these files?
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.
Mmh, cosmovisor needs to be able to read it and overwrite it if needed.
WalkthroughThis pull request primarily focuses on enhancing security through permission modifications, simplifying code for better readability, and adding explanatory comments for better understanding of the codebase. Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (3)
- server/util.go (1 hunks)
- store/storage/rocksdb/comparator.go (2 hunks)
- x/upgrade/keeper/keeper.go (1 hunks)
Files skipped from review due to trivial changes (2)
- store/storage/rocksdb/comparator.go
- x/upgrade/keeper/keeper.go
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.
Nice and thank you @tac0turtle! LGTM! I am an advocate of the proactive security measure of least permissions per https://cyber.orijtech.com/scsec/cosmos-hardening#file-permissions
@tac0turtle this branch needs some updates from main, would you like to merge it in? |
(cherry picked from commit 331e106)
(cherry picked from commit 331e106)
…18264) Co-authored-by: Marko <[email protected]>
…18263) Co-authored-by: Marko <[email protected]>
Description
a-19
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking changeSummary by CodeRabbit
compareTS
andcompare
functions for better readability. This change does not affect the functionality of these functions.