Skip to content

scripts/deploy.mjs accepts the signer's secret key as a plain CLI argument #122

Description

@chonilius

scripts/deploy.mjs reads the deployer's Stellar secret key from process.argv[2] (const deployerSecret = process.argv[2];), per the documented usage: node deploy.mjs <secret> <wasm-path> [name]. Passing secret key material as a CLI argument means it lands in shell history (.bash_history/.zsh_history) and is visible to any other local process via ps aux / /proc/<pid>/cmdline for the duration of the run — a well-known anti-pattern for anything security-sensitive, and notably worse here than a typo'd password since this key can move real, deposited sponsor/treasury funds once contracts are initialized.

The README's own "Deployed on Stellar testnet" section documents exactly this invocation pattern (node scripts/deploy.mjs <SECRET_KEY> ...) as the recommended fallback when stellar-cli's network access is broken, so this isn't a hypothetical misuse — it's the documented happy path. Prefer reading the secret from an environment variable (e.g. MERGEFI_DEPLOYER_SECRET) or prompting for it interactively (masked input) instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdocumentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is neededsecuritySecurity-related issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions