fix: Refuse to use private keys that are group or world readable#4879
Open
johnsaigle wants to merge 4 commits into
Open
fix: Refuse to use private keys that are group or world readable#4879johnsaigle wants to merge 4 commits into
johnsaigle wants to merge 4 commits into
Conversation
johnsaigle
force-pushed
the
fix-readable-keys
branch
from
June 19, 2026 16:10
9c74dee to
7024b80
Compare
johnsaigle
force-pushed
the
fix-readable-keys
branch
from
June 29, 2026 11:57
7024b80 to
d375e36
Compare
johnsaigle
marked this pull request as ready for review
July 16, 2026 12:32
johnsaigle
requested review from
SEJeff,
bemic,
djb15,
evan-gray,
kcsongor,
mdulin2,
panoel and
pleasew8t
as code owners
July 16, 2026 12:32
- Added common.ValidatePrivateKeyFilePermissions. - LoadArmoredKey now rejects regular private-key files with any group/other permissions: mode.Perm() & 0077 != 0. - NewFileSigner now reuses common.LoadArmoredKey, removing duplicated key decoding. - LoadWormchainPrivKey now validates permissions before reading. - Added tests for unsafe 0644 key files in: - node/pkg/common/armoredKey_test.go - node/pkg/guardiansigner/guardiansigner_test.go - node/pkg/wormconn/wormchain_key_test.go - Updated query tests to copy the checked-in dev key into a temp 0600 file before loading. - Add unit test to maintain code coverage that would've dropped due to refactoring
johnsaigle
force-pushed
the
fix-readable-keys
branch
from
July 16, 2026 12:32
e3e016c to
c83ab2f
Compare
Contributor
Author
|
@bemic please re-approve, I had to update the permissions on the CCQ key (see latest commit) |
bemic
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.