ByAUJay
DevOps for Web3 CI/CD can be predictable and compliant when you pin the toolchain, automate security gates, and treat deployments as auditable change events. Below is how 7Block Labs implements production-grade pipelines that satisfy SOC 2 while keeping Ethereum releases, EVM changes, and multi-chain ops from derailing timelines.
DevOps for Web3: CI/CD Pipelines for Smart Contracts
Target audience: Enterprise (Procurement, Security, and Engineering). Keywords included: SOC 2, SOX change management, SBOM, SLSA, NIST SSDF, artifact attestations, OIDC.
Pain
If your Solidity release cycle still involves manual deploys and ad‑hoc “multi-sig sign when ready,” you’re absorbing invisible risk:
- Non-deterministic bytecode because the compiler image isn’t pinned; recent Solidity releases changed distribution channels and defaults (e.g., Solidity 0.8.30 set EVM version to “prague,” impacting gas and calldata assumptions around Pectra/EIP‑7623). (soliditylang.org)
- Tooling drift: Docker images moved to GitHub Container Registry and Ubuntu PPA support was discontinued; teams thinking they were “pinned” later discover they’re not. (soliditylang.org)
- Verification debt: Etherscan’s V2 API cutover broke legacy verification scripts and multi-chain explorers now expect a single V2 key plus chainId parameters; daily limits also apply. (info.etherscan.com)
- Key custody anti-patterns: long-lived private keys in CI, no OIDC/OAuth trust, no artifact provenance, and no SBOM in releases. (docs.github.com)
- Operational blind spots: “simulate locally, hope in prod” even as Tenderly deprecates Forks in favor of Virtual TestNets and RPC simulations for realistic gas/call outcomes. (docs.tenderly.co)
Agitation
- Missed deadlines: compiler/EVM default flips (Prague via Pectra) can break gas budgets and calldata-heavy integrations; rework cascades when CI reproductions aren’t exact. (soliditylang.org)
- Compliance exposure: SOC 2 and SOX examiners want a repeatable change management trail (who approved what, with what evidence) plus supply chain artifacts (SBOM, attestations). Absence means remediation findings and delayed vendor approvals. (aicpa-cima.com)
- Security regressions: unpinned builds and unsigned artifacts undermine traceability; a rollback is meaningless if you can’t prove what’s on-chain matches what was reviewed and verified (Sourcify/Etherscan drift, proxy admin confusion). (docs.sourcify.dev)
- Governance bottlenecks: Defender-based runbooks must plan for its shutdown on July 1, 2026—migration to OSS Monitor/Relayer or Safe flows needs lead time, or you risk a deployment freeze. (docs.openzeppelin.com)
Solution — 7Block’s “Deterministic, Defended, and Documented” pipeline
We implement CI/CD that merges Solidity rigor with enterprise change management. The design principle: every deployment is a controlled, reproducible, and provably reviewed change.
- Deterministic builds tied to protocol releases
- Pin the compiler and EVM target:
- Explicitly set solc version using Foundry’s toolchain; lock evm_version to “prague” (post‑Pectra) or a specific target per chain to avoid silent behavior changes. (soliditylang.org)
- Pin build containers by digest:
- Prefer GHCR images published by projects (Solidity moved away from some channels; treat DockerHub tags as unsafe). Track image SHA in repository. (soliditylang.org)
- Generate and store SBOMs per release with CycloneDX and sign them:
- Use Syft to emit CycloneDX v1.6 and commit SBOMs to artifacts; optional conversion to SPDX for customers that require it. (anchore.com)
Example foundry.toml (CI profile)
[profile.ci] optimizer = true optimizer_runs = 500 via_ir = true evm_version = "prague" # Keep consistent with target chain after Pectra solc = "0.8.31" # Pin, and match the verification settings libs = ["lib"] fs_permissions = [{ access = "read", path = "./out" }]
- CI/CD stages that satisfy SOC 2 without throttling delivery
- Source → Build → Test → Security → Provenance → Verify → Release, with approvals baked in.
Key steps and tools:
- Unit, fuzz, and invariant tests: Foundry runs fast tests by default and includes an invariant framework for stateful properties; use fail-fast with block‑forked integration tests via anvil. (getfoundry.sh)
- Static analysis (SAST): Slither in CI to flag reentrancy, unchecked calls, and dangerous patterns; gate merges on zero high-severity findings. (github.com)
- Property fuzzing: Echidna for property-based fuzz beyond unit tests (longer-running nightly). (blog.trailofbits.com)
- Pre-deploy simulation: programmatic Tenderly RPC simulations on the target block for exact gas and state diffs; Virtual TestNets for team E2E and reproducible demo environments. (docs.tenderly.co)
- Provenance and attestations: GitHub Actions’ build provenance attestation (Sigstore-backed), tied to the exact artifact digest; enforce OIDC, no long-lived cloud secrets. (github.com)
- SBOM generation and signing: Syft to produce CycloneDX 1.6 and attach to the release artifact. (anchore.com)
Example GitHub Actions (condensed)
name: smart-contract-ci on: pull_request: push: branches: [main] permissions: contents: read id-token: write # OIDC attestations: write jobs: test_build_secure: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: { submodules: recursive } - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: { version: stable } - name: Test (unit + fuzz) run: | forge test -vvv forge test --fork-url ${{ secrets.LIVE_RPC }} --fork-block-number ${{ vars.FORK_BLOCK }} - name: Slither (SAST) run: | python3 -m pip install slither-analyzer slither . - name: SBOM (CycloneDX) run: | curl -sSfL https://get.anchore.io/syft | sudo sh -s -- -b /usr/local/bin syft . -o cyclonedx-json=sbom.cdx.json echo "::notice file=sbom.cdx.json::SBOM generated" - name: Attest build provenance uses: actions/attest-build-provenance@v3 with: subject-path: "out/**/*.json"
- Key custody, approvals, and auditable change management
- Eliminate long-lived secrets in CI: Authenticate to cloud/KMS using GitHub OIDC; “no secrets in repo” becomes default. (docs.github.com)
- Use Safe for multi-sig and transaction collection:
- Propose upgrades or deployments to the Safe Transaction Service, collect off‑chain EIP‑712 signatures, then execute when the threshold is met—cheap approvals with an immutable audit log. (docs.safe.global)
- Plan for Defender migration:
- New signups ended June 30, 2025; final shutdown July 1, 2026. We migrate customers to the open‑source Monitor/Relayer stack and keep OZ Upgrades plugins for proxy safety checks. (docs.openzeppelin.com)
Minimal Safe TX proposal (illustrative)
curl -X POST "https://safe-transaction.mainnet.safe.global/api/v1/safes/$SAFE_ADDR/multisig-transactions/" \ -H "Content-Type: application/json" \ -d '{ "to":"0xProxyAdmin", "value":"0", "data":"0x...", // upgradeTo or upgradeToAndCall "operation":0, "safeTxGas":"0", "baseGas":"0", "gasPrice":"0", "gasToken":"0x0000000000000000000000000000000000000000", "refundReceiver":"0x0000000000000000000000000000000000000000", "nonce":123 }'
- Verification that actually sticks across chains
- Prefer Sourcify “exact match” verification using compiler metadata, ensuring byte‑for‑byte confirmation across supported explorers; keep Etherscan V2 in place for chains that require it. (docs.sourcify.dev)
- Pin verification parameters (evmVersion, viaIR, optimizer runs) to match foundry.toml and release notes; mismatches are the top cause of failed bytecode equivalence after Pectra. (soliditylang.org)
- Safer deploys and upgrades by construction
- Upgrades via OZ plugins:
- UUPS/Transparent/Beacon supported; plugins validate upgrade safety and storage layout compatibility before you ship. Keep ProxyAdmin ownership and upgrade authority segregated for SOX. (docs.openzeppelin.com)
- EIP‑155 enforcement:
- Ensure chainId is correct in all deployment scripts; many RPC endpoints now reject unprotected transactions at the transport layer. (eips.ethereum.org)
- Canary and kill-switch patterns:
- Route new features behind allowlists, time-lock administrative changes, and implement pausability with staged rollouts.
- Multi-chain and cross-chain without drama
- Use domain-specific test matrices per chain (different gas schedules and precompiles); run Tenderly simulations against the exact network state. (docs.tenderly.co)
- For cross-chain messaging or token movement, prefer CCIP’s defense‑in‑depth design (rate limiting, decentralized validation via DONs) where risk warrants an externalized protocol. (docs.chain.link)
- Compliance evidence by default, not by sprint
We map pipeline artifacts to SOC 2 TSC and NIST SSDF so Procurement and Audit receive standardized evidence:
- SBOM per release (CycloneDX 1.6), signed provenance attestation, and verification receipts (Sourcify/Etherscan).
- Change approvals: PR reviews, multi-sig confirmations, and deployment logs—linked by commit SHA and artifact digest to meet SOC 2 description and TSC evidence expectations. (aicpa-cima.com)
Practical blueprint (end‑to‑end)
- Repository
- monorepo packages:
- contracts/ (Foundry)
- deploy/ (scripts with OZ Upgrades)
- ops/ (GH Actions, KMS policy templates, SBOM policy)
- audits/ (Slither rules, Echidna properties, storage layout diffs)
- Branch protections
- CODEOWNERS for upgradeable contracts
- Required checks: forge test, slither, sbom/attest, simulation check, verification dry run
- CI pre‑merge
- forge test (unit/fuzz/invariant), gas snapshots
- slither . (block merge on high severity)
- tenderly_simulateTransaction for smoke deploy
- sbom + attest-build-provenance
- OIDC to KMS for short-lived secrets
- Release tagging
- Signed tag → GitHub release with:
- build provenance attestation JSON
- sbom.cdx.json
- compiled artifacts (Foundry out/)
- storage layout diffs
- Deploy
- Prepare implementation with OZ plugin; propose upgrade via Safe TX Service; gather off‑chain signatures; execute from Safe
- Verify on Sourcify; fall back to Etherscan V2 multi-chain API; store GUID/status to release notes. (docs.sourcify.dev)
- Post‑deploy
- Alerts via monitors (events, role changes, pausable triggered)
- Runbook for rollback: pause, revert implementation, or blocklist via module policy
- Evidence bundle exported for auditors (SBOM, attestation, approvals, verification receipts)
What’s “new enough to matter” in 2025–2026
- Compiler distribution and defaults changed. Pin GHCR images and align to 0.8.30+ “prague” EVM defaults to avoid silent behavior drift as networks roll Pectra-era features like EIP‑7623 (calldata cost). (soliditylang.org)
- Etherscan V2 is the new normal. Update verification bots and explorer integrations to V2 with chainId; Foundry v1.2+ supports it. (docs.etherscan.io)
- Defender sunset clock is ticking (final shutdown July 1, 2026). Start migrations now to avoid operational freezes. (docs.openzeppelin.com)
- Tenderly Forks deprecated; switch to Virtual TestNets and Simulation RPCs for CI smoke checks and QA demos. (docs.tenderly.co)
- Provenance is table stakes. GitHub’s actions/attest-build-provenance provides Sigstore-backed attestations integrated with OIDC—use it. (github.com)
Mini reference snippets
- OZ Upgrades (Foundry/Hardhat) protect against storage layout footguns and validate upgrade safety before broadcasting. (docs.openzeppelin.com)
// Example: UUPS upgrade auth hook contract CoreV2 is UUPSUpgradeable, OwnableUpgradeable { function _authorizeUpgrade(address newImpl) internal override onlyOwner {} }
-
EIP‑155 mandatory chain IDs; RPCs increasingly reject v=27/28 style signatures. Set chainId explicitly in all scripts. (eips.ethereum.org)
-
Sourcify exact match relies on compiler metadata (byte‑for‑byte); ensure foundry.toml settings equal your verification settings. (docs.sourcify.dev)
Measuring outcomes that Procurement and Engineering both value
We baseline and then report using DORA-aligned metrics for software delivery, adapted to smart contracts:
- Change lead time: commit → verified, multi-sig‑approved deploy
- Deployment frequency: tagged releases per environment
- Change failure rate: proxy rollbacks/hotfixes per deploy
- Failed deployment recovery time: time from incident label to pause/rollback
The 2024 DORA update retains elite vs. low performance differentials that are still decisive; our clients target movement toward elite bands rather than vanity absolutes. We typically see improvements by quarter when pipelines adopt small batches, automated tests, and approvals embedded in CI. (dora.dev)
How we engage (and where we slot into your stack)
- Architecture and pipeline design: we implement tool‑pinned, reproducible builds; author your Foundry/OZ/verification configs; and codify SOC 2 evidence capture into the pipeline.
- Migration services: Defender → OSS Monitor/Relayer + Safe, Etherscan V1 → V2, Forks → Virtual TestNets. (docs.openzeppelin.com)
- Compliance and security: map artifacts to AICPA TSC and NIST SSDF; produce SBOMs and signed provenance by default to shorten third‑party risk reviews. (aicpa-cima.com)
Where 7Block Labs plugs in now
- Need end-to-end implementation? Our team delivers cradle‑to‑launch pipelines and dapps via our custom web3 development services and custom blockchain development services.
- Planning a production hardening pass? Engage our security audit services and smart contract development team to align storage layouts, proxies, and monitors.
- Multi-chain or cross-chain roadmap? We ship cross-chain solutions and bridge development with sober risk controls; where appropriate, we leverage CCIP’s security posture. (docs.chain.link)
- Shipping DeFi or tokenized assets at enterprise scale? We integrate CI/CD and runtime ops with DeFi development and asset tokenization, including verification and post‑deploy monitoring.
- Building a new app? Our dapp development practice embeds these pipelines from day one.
Why this works
- Deterministic: pinned compiler/EVM and reproducible builds ensure what you ship is what you audited. (soliditylang.org)
- Defended: OIDC, attestations, Safe approvals, and pre‑deploy simulations reduce blast radius and accelerate recovery. (docs.github.com)
- Documented: SBOMs, verification receipts, and approval trails are artifacts auditors recognize, mapped to TSC and SSDF. (aicpa-cima.com)
Summary specs checklist (copy/paste into your backlog)
- Pin solc and evm_version; track GHCR image digest for compiler. (soliditylang.org)
- Foundry CI (tests, invariants, gas), Slither mandatory gate. (getfoundry.sh)
- Tenderly simulations in CI; migrate from Forks to Virtual TestNets. (docs.tenderly.co)
- OIDC everywhere; no static cloud creds in CI. (docs.github.com)
- SBOM (CycloneDX 1.6) + build provenance attestation attached to each release. (anchore.com)
- Safe-based approvals; plan for Defender sunset by July 1, 2026. (docs.safe.global)
- Sourcify exact match; Etherscan V2 for multi-chain; store verification GUID/status. (docs.sourcify.dev)
- EIP‑155 chainId explicitly set in all scripts. (eips.ethereum.org)
You get
- Faster approvals with auditable evidence
- Fewer failed deploys, faster rollbacks
- Procurement-ready artifacts (SBOMs, attestations, approvals) that shorten vendor onboarding
- Lower operational risk through deterministic builds and policy‑enforced upgrades
Book a 90-Day Pilot Strategy Call
We’ll scope, implement, and hand over a production-ready smart contract CI/CD that satisfies Security and Procurement without slowing down delivery. Book a 90-Day Pilot Strategy Call.
Like what you're reading? Let's build together.
Get a free 30‑minute consultation with our engineering team.

