Skip to content

[CORE] Build Plugin Architecture for Custom Community GasGuard Rules #697

Description

@mijinummi

Labels: high-difficulty, rust, architecture, cli, gasguard
Difficulty: High
Module: gasguard-cli/src/plugins/


🧠 Concept

Design and build a dynamic plugin architecture for the GasGuard CLI that enables third-party developers to write and load custom static analysis gas rules compiled to WebAssembly (WASM).

⚠️ Problem

Adding new domain-specific gas rules currently requires modifying core GasGuard CLI Rust source files and recompiling the entire binary.

📁 Implementation Scope

  • gasguard-cli/src/plugins/engine.rs
  • gasguard-cli/src/plugins/wasm_runtime.rs
  • docs/PLUGIN_DEVELOPMENT_GUIDE.md

🛠️ Requirements

  1. Integrate a WASM runtime (e.g., wasmer or wasmtime) into the GasGuard CLI executable.
  2. Expose contract AST node query interfaces to WASM guest plugins.
  3. Allow users to load external rule plugins via configuration (gasguard analyze --plugin ./custom_rule.wasm).

🎯 Acceptance Criteria

  • CLI successfully loads and executes custom WASM static analysis rules at runtime.
  • Plugin API provides complete access to contract AST structures for gas vulnerability detection.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions