feat(soroban): upgradeability + deployment analyzers (#924-927) - #950
Open
giadagallo wants to merge 4 commits into
Open
feat(soroban): upgradeability + deployment analyzers (#924-927)#950giadagallo wants to merge 4 commits into
giadagallo wants to merge 4 commits into
Conversation
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
Collaborator
|
Please kindly fix conflict @giadagallo |
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
Closes #924
Closes #925
Closes #926
Closes #927
Test plan
🤖 Generated with Codebuff
Co-Authored-By: Codebuff noreply@codebuff.com