Skip to content

Read the deployment key instead of writing it into the command - #148

Merged
thedavidmeister merged 1 commit into
mainfrom
2026-08-22-read-deployment-key-not-inline
Aug 22, 2026
Merged

Read the deployment key instead of writing it into the command#148
thedavidmeister merged 1 commit into
mainfrom
2026-08-22-read-deployment-key-not-inline

Conversation

@thedavidmeister

Copy link
Copy Markdown
Contributor

Follow-up to #147, which merged while this was being written, so the fix missed
the merge by about a minute rather than being left out on purpose.

CodeRabbit's merge-risk note on #147 was right: the invocation that PR
documented prefixed DEPLOYMENT_KEY=0x... to the command, which writes a
private key with real money behind it into the shell's history file, where it
outlives both the run and the terminal. main currently carries that
instruction in the README and in the CreditHyperCore NatSpec.

It is the only place in the repo that documents a key on a command line at all
— the deploy reaches its key through a workflow secret and never spells one out
— so it is also the only place that could teach the habit.

read -rs takes the key off the terminal without echoing it and without a
history entry carrying its value:

read -rs DEPLOYMENT_KEY && export DEPLOYMENT_KEY
HYPERCORE_CREDIT_WEI=10000000000000000 \
  nix develop -c forge script script/CreditHyperCore.sol:CreditHyperCore --legacy

Same variable, same script, same env read in run(). Nothing about the
mechanism changes and no Solidity outside a comment is touched.

QA

  • Discriminating tests: n/a — the diff is one README passage and the NatSpec
    block that mirrors it. There is no behaviour here to discriminate on: the
    compiled artifact is byte-identical, because the only .sol change is inside
    a /// comment. A test asserting the text of a comment would pin the mirror
    rather than the source, which is the failure mode section 4 of the QA guide
    names.
  • Mutations applied: n/a for the same reason — there is no line to break. The
    library this documents was mutation-tested in Credit the deployer's HyperCore account from HyperEVM #147 (13 mutants, 12 killed, M10
    disclosed as surviving and unreachable), and this diff does not touch it.
  • Oracle: the shell's own behaviour, not the implementation. A VAR=value cmd
    prefix is part of the command line and lands in HISTFILE under default bash
    and zsh settings; read -rs assigns without echoing and without putting the
    value in the history entry. Verified against main that the pattern being
    replaced is the only one of its kind in the repo:
    grep -rn 'DEPLOYMENT_KEY=' finds it in README.md and
    script/CreditHyperCore.sol and nowhere else.
  • Category check: covers the whole of CodeRabbit's finding on Credit the deployer's HyperCore account from HyperEVM #147 — both
    places the command is written out, not just the README it was raised against.
    Deliberately not covered: how the key gets onto the machine in the first
    place, and any change to run() or its env reads, both of which are
    mechanism rather than documentation and neither of which the finding is
    about.

forge fmt --check clean and LibHyperCoreTest 13/13 locally on this tree.

The documented invocation prefixed `DEPLOYMENT_KEY=0x...` to the command,
which puts a private key with real money behind it into the shell's
history file, where it outlives the run and the terminal. This is the
only place in the repo that documents a key on a command line at all —
the deploy reaches its key through a workflow secret — so it was also
the only place that could teach the habit.

`read -rs` takes the key off the terminal without echoing it and without
a history entry carrying its value. Same variable, same script, nothing
about the mechanism changes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Aug 22, 2026
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@thedavidmeister, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: aeced5eb-ccfd-4326-8788-5c4f9c069440

📥 Commits

Reviewing files that changed from the base of the PR and between 69657b8 and 1e5954b.

📒 Files selected for processing (2)
  • README.md
  • script/CreditHyperCore.sol

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thedavidmeister
thedavidmeister merged commit d200dec into main Aug 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant