Skip to content

feat(soroban): upgradeability + deployment analyzers (#924-927) - #950

Open
giadagallo wants to merge 4 commits into
MDTechLabs:mainfrom
giadagallo:feat/stellar-drips-wave-924-925-926-927
Open

feat(soroban): upgradeability + deployment analyzers (#924-927)#950
giadagallo wants to merge 4 commits into
MDTechLabs:mainfrom
giadagallo:feat/stellar-drips-wave-924-925-926-927

Conversation

@giadagallo

Copy link
Copy Markdown

Summary

Closes #924
Closes #925
Closes #926
Closes #927

Test plan

  • unit specs for all four analyzers (upgradeability, unprotected-upgrade, mutable-config, deployment)
  • CI green

🤖 Generated with Codebuff
Co-Authored-By: Codebuff noreply@codebuff.com

Add the Soroban upgradeability analyzer (packages/analyzers/soroban/upgrades/)
that detects upgrade mechanisms (wasm-replacement, implementation-swap,
deployer, migration, version-switch), tracks the entry points that can
replace contract behaviour, and reports whether each is protected by an
authorization check. Surface it as a thin soroban-upgradeability rule with
entry-point tracking and findings generation. Unit tests cover guarded and
unguarded upgrade paths, deployer usage, and clean contracts.

Closes MDTechLabs#924
Add a security analyzer for Soroban upgrade functions that lack an
access-control check. It identifies upgrade entry points (direct wasm
replacement, implementation-swap storage writes, deployer calls and upgrade-
named functions whose bodies invoke them), validates authorization, and
assigns a critical severity to uncontrolled upgrade paths with security
tests added alongside the analyzer and a thin rule wrapping detection.

Closes MDTechLabs#925
Add a storage analyzer that identifies upgrade-configuration keys (wasm
hashes, implementation addresses, upgrade targets) in Soroban ledger state,
tracks every write to those keys, and reports mutation paths that lack an
authorization check. Findings carry the key, enclosing function and whether
the write is guarded, with recommendations on emitting events for any config
change. Backed by a thin rule and unit tests for guarded, unguarded and
clean contracts.

Closes MDTechLabs#926
Add a deployment configuration analyzer that parses invoke.soroban /
project.toml deployment configuration, validates that declared settings are
supported and well-formed (network, rpc_url, owner, numeric fee settings),
detects required configuration that is missing, and flags unsupported keys.
Findings carry severity plus an actionable suggestion; the report exposes the
parsed settings, resolved network/rpc/owner, missing-required keys and an
overall validity flag. Backed by a thin rule and unit tests covering valid,
invalid and incomplete configurations.

Closes MDTechLabs#927
@mijinummi

Copy link
Copy Markdown
Collaborator

Please kindly fix conflict @giadagallo

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

Labels

None yet

Projects

None yet

2 participants