ci/sec: dependabot, cargo-audit, --locked pinning, wasm optimize error handling and env config for scripts (#122, #123, #125, #126, #130, #132, #133, #134, #135) - #189
Open
ghzhost wants to merge 1 commit into
Conversation
…-on-error wasm optimize, and env-based secret/rpc options (MergeFi#122, MergeFi#123, MergeFi#125, MergeFi#126, MergeFi#130, MergeFi#132, MergeFi#133, MergeFi#134, MergeFi#135)
|
Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
This PR addresses several security, CI reproducibility, and deployment script hygiene issues:
Security & Secrets Handling (scripts/deploy.mjs accepts the signer's secret key as a plain CLI argument #122, scripts/invoke.mjs accepts the signer's secret key as a plain CLI argument #123):
scripts/deploy.mjsandscripts/invoke.mjsto accept signer/deployer secret keys via environment variables (MERGEFI_DEPLOYER_SECRET,MERGEFI_SIGNER_SECRET, orSTELLAR_SECRET_KEY) instead of requiring them inprocess.argvwhere they leak into shell histories and process listings (ps aux).Configurable RPC & Network (scripts/deploy.mjs hardcodes the testnet RPC URL and network passphrase #125, scripts/invoke.mjs hardcodes the testnet RPC URL and network passphrase #126):
STELLAR_RPC_URL,STELLAR_NETWORK, andSTELLAR_NETWORK_PASSPHRASEenvironment variables across bothscripts/deploy.mjsandscripts/invoke.mjsso invocations can target mainnet/futurenet/local without modifying source code.CI Reproducibility & Security Auditing (CI has no dependency vulnerability scanning (cargo-audit / cargo-deny) #132, CI pins the Rust toolchain to the floating stable tag rather than a fixed version #134, CI's cargo commands don't pass --locked, so a drifted Cargo.lock wouldn't be caught #135):
1.84.0in.github/workflows/ci.ymlto prevent unpinned drift.--lockedflag to allcargo fmt / clippy / test / buildcommands to guaranteeCargo.locksynchronization.rustsec/audit-checkstep to CI to check for vulnerable dependencies against the RustSec database.Automated Dependency Updates (No Dependabot/Renovate config to keep soroban-sdk and @stellar/stellar-sdk current #133):
.github/dependabot.ymlconfigured for weekly updates for cargo and npm ecosystems.Build Script Reliability (Makefile's stellar contract optimize step silently swallows real failures via || true #130):
Makefilebuild target so that actual failures instellar contract optimizecleanly fail the build rather than being swallowed by|| true.Closes #122, Closes #123, Closes #125, Closes #126, Closes #130, Closes #132, Closes #133, Closes #134, Closes #135.