Repository navigation
fix: drop remote signers when deployer keys are absent - #379
Closed
ralph-bitgo[bot] wants to merge 1 commit into
Closed
ralph-bitgo[bot] wants to merge 1 commit into
ralph-bitgo[bot] wants to merge 1 commit into
Conversation
hardhat.config.ts interpolated deployer-key env vars straight into every network's accounts list, so hardhat's config validation rejected the "undefined" key strings unless CI passed real deployer keys to the test step. That is why branch-push tests were given live deployer/Batcher-owner private keys (CWE-522, least-privilege failure). Normalize the config on export instead: any remote network whose account list is not composed entirely of valid 32-byte keys gets no accounts at all. Tests run on the in-process hardhat network (static local accounts) and need no remote signers, so they now pass with no secrets (280 passing). Deploy jobs set every key their target networks need and are unaffected; a network with missing keys fails closed with zero signers instead of signing with any substitute key. Ticket: INFOSEC-677 Session-Id: c47168cb-4390-40bd-afdb-63ea17715cd1 Task-Id: 29537b41-b596-4b31-b76e-4b0bedddeb59
3 tasks done
This branch had an error being deployed
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.
What
hardhat.config.ts: on export, any remote network whose account list is not composed entirely of valid 32-byte keys getsaccounts: []; fully configured networks keep their exact account lists. The in-processhardhatnetwork's static local accounts are untouched.Why
hardhat.config.tsinterpolated deployer-key env vars straight into every network'saccountslist, so hardhat's config validation rejected the"undefined"strings unless CI passed real deployer keys to the test step. This is why branch-push tests were given live deployer/Batcher-owner private keys (CWE-522, least-privilege failure — INFOSEC-677).Test plan
npm run testwith no deployer/explorer env vars set: 280 passingnpm run lintcleaneth/hteth/tbsc/tzksynceraaccount lists[]while the hardhat network keeps its 10 static accounts; keys set → account lists preserved exactly; partially configured network (topeth) →[]Stack
This PR is part 1 of 2 in a stack. Review and merge in order:
master) ← you are hereINFOSEC-677-ci-test-jobs-secrets-pt1)Ticket: INFOSEC-677