Skip to content

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
MergeFi:mainfrom
ghzhost:fix/ci-dependabot-audit-and-script-env-security
Open

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
ghzhost wants to merge 1 commit into
MergeFi:mainfrom
ghzhost:fix/ci-dependabot-audit-and-script-env-security

Conversation

@ghzhost

@ghzhost ghzhost commented Aug 22, 2026

Copy link
Copy Markdown

Summary

This PR addresses several security, CI reproducibility, and deployment script hygiene issues:

  1. 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):

    • Updated scripts/deploy.mjs and scripts/invoke.mjs to accept signer/deployer secret keys via environment variables (MERGEFI_DEPLOYER_SECRET, MERGEFI_SIGNER_SECRET, or STELLAR_SECRET_KEY) instead of requiring them in process.argv where they leak into shell histories and process listings (ps aux).
    • Retained CLI argument support as backwards-compatible fallback.
  2. 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):

    • Added support for STELLAR_RPC_URL, STELLAR_NETWORK, and STELLAR_NETWORK_PASSPHRASE environment variables across both scripts/deploy.mjs and scripts/invoke.mjs so invocations can target mainnet/futurenet/local without modifying source code.
  3. 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):

    • Pinned Rust toolchain to 1.84.0 in .github/workflows/ci.yml to prevent unpinned drift.
    • Added --locked flag to all cargo fmt / clippy / test / build commands to guarantee Cargo.lock synchronization.
    • Added rustsec/audit-check step to CI to check for vulnerable dependencies against the RustSec database.
  4. Automated Dependency Updates (No Dependabot/Renovate config to keep soroban-sdk and @stellar/stellar-sdk current #133):

    • Added .github/dependabot.yml configured for weekly updates for cargo and npm ecosystems.
  5. Build Script Reliability (Makefile's stellar contract optimize step silently swallows real failures via || true #130):

    • Fixed Makefile build target so that actual failures in stellar contract optimize cleanly 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.

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

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