feat: Contract Security Audit, Deployment Rollback, Call Graph, SQLite DB (#329 #330 #331 #339)#429
Merged
Nanle-code merged 1 commit intoJun 29, 2026
Conversation
…Nanle-code#339 with pre-existing bug fixes Add four major features and fix pre-existing compilation errors that prevented the project from building (broken async-graphql dependency). ## New features ### Nanle-code#329 D-13: Contract Security Audit Integration - `starforge security audit` command with Slither/Mythril integration - Built-in static analysis via existing checklist module - Security scoring (0-100) with penalty weights per severity level - Remediation suggestions and JSON/text output formats - CI-friendly `--min-score` threshold flag ### Nanle-code#330 D-14: Deployment Rollback System - `starforge deployments history/rollback/verify/dashboard/approve` - JSON deployment history at ~/.starforge/deploy_history.json - Generates stellar CLI rollback commands with wasm hash - On-chain wallet verification and per-network dashboard stats - Approval workflow for pending deployments ### Nanle-code#331 D-15: Cross-Contract Call Visualization - `starforge contract call-graph` command - Extracts invoke_contract!, Client::new, and ::Client patterns - ASCII tree, Graphviz DOT, and JSON output formats - Pattern detection: re-entrancy risk, deep chains, missing auth ### Nanle-code#339 D-2: SQLite Database Backend - `starforge config db init/migrate/query/backup/export/status/check` - rusqlite with bundled feature (no system sqlite required) - Schema: meta, wallets, networks, config_kv, plugins, templates - TOML import/export for backwards compatibility - SELECT-only query interface for safe CLI access ## Bug fixes (pre-existing) - Remove non-existent async-graphql 0.12 / actix-web / tokio deps - Fix wasm-bindgen-test version (1.3 -> 0.3) - Fix ureq 2.x resp.ok() usage in registry.rs - Fix self usage in static methods in test_automation.rs - Fix use-of-moved-value for TestStatus in test_automation.rs - Fix duplicate struct fields in test.rs - Fix multisig_builder.rs import alias and p::step arity - Fix colored::Colorize on &String (need .as_str()) - Fix social module visibility (load_team, load_review, load_discussion) - Fix base64::Engine trait not in scope in registry.rs - Fix collect_files unused root parameter in registry.rs Closes Nanle-code#329, Nanle-code#330, Nanle-code#331, Nanle-code#339
|
@leojay-net Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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 implements four feature issues and fixes pre-existing compilation errors that prevented the project from building.
#329 D-13 — Contract Security Audit Integration
starforge security audit [path] [--slither] [--mythril] [--format json|text] [--out file] [--min-score N]--min-scoreexit-code gate#330 D-14 — Deployment Rollback System
starforge deployments history|rollback|verify|dashboard|approve~/.starforge/deploy_history.jsonrollbackgenerates a ready-to-runstellar contract invoke … upgradecommand with the exact wasm hashverifychecks on-chain wallet liveness and marks the record verifieddashboardshows per-network statistics with success ratesapprovemarks pending deployments as approved/successful#331 D-15 — Cross-Contract Call Visualization
starforge contract call-graph [path] [--format ascii|dot|json] [--out file] [--patterns]invoke_contract!,Client::new, and::Clientpatterns from Rust source#339 D-2 — SQLite Database Backend
starforge config db init|migrate|query|backup|export|status|checkrusqlitewith thebundledfeature — no system SQLite installation requiredmeta,wallets,networks,config_kv,plugins,templatestables with indicesmigrateimports existing TOML config into SQLite;exportwrites SQLite back to TOMLqueryaccepts SELECT-only SQL statements for safe ad-hoc inspectionbackupcopies the database file,checkruns SQLite integrity checkPre-existing compilation fixes
The project had a broken dependency (
async-graphql = "0.12"does not exist on crates.io) that prevented any build. The following pre-existing bugs were also fixed as part of making the build succeed:async-graphql 0.12,async-graphql-actix-web,actix-web,actix-rt, and directtokiodeps fromCargo.tomlwasm-bindgen-testversion (1.3→0.3).ok()calls inregistry.rs(ureq returnsErrfor HTTP errors)selfusage in static methods intest_automation.rsTestStatusvalue intest_automation.rstest.rsmultisig_builder.rsimport alias (multisig_builder as multisig) andp::steparitycolored::Colorizeon&String(changed to.as_str()) inmultisig_builder.rsandregistry.rsload_team,load_review,load_discussionpub inutils/social.rsbase64::Engine as _import inregistry.rsrootparameter fromcollect_filesinregistry.rspub mod socialtoutils/mod.rsTest plan
cargo fmt --all -- --check— passescargo build --locked— passescargo test --locked— 28 tests pass, 0 failurescargo clippy --all-features --locked -- -D warnings— passes with 0 errorsstarforge security audit --help— shows audit subcommandstarforge deployments --help— shows history/rollback/verify/dashboard/approvestarforge contract call-graph --help— shows call-graph subcommandstarforge config db --help— shows db subcommandsCloses #329
Closes #330
Closes #331
Closes #339