Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: integrate sierra-analyzer tool into forge #2871

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Rog3rSm1th
Copy link

@Rog3rSm1th Rog3rSm1th commented Jan 23, 2025

Introduced changes

This PR creates an analyzer subcommand in forge based on the sierra-analyzer tool from @FuzzingLabs. The available options allow you to decompile the Sierra once it's built, generate its control flow graph, its call graph and run security detectors on it.

$ ~ snforge analyze --help

Analyze the project using the sierra-analyzer

Usage: snforge analyze [OPTIONS] --contract <CONTRACT>

Options:
      --function <FUNCTION>
          Specify the function name to analyze
      --contract <CONTRACT>
          Specify the contract name to analyze
      --cfg
          Generate a CFG (Control Flow Graph) instead of normal output
      --callgraph
          Generate a Call Graph instead of normal output
  -v, --verbose
          Enable verbose decompiler output
  -d, --detectors
          Run the detectors
      --detector-names <DETECTOR_NAMES>
          List of detector names to run
  -h, --help
          Print help

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added relevant tests
  • Performed self-review of the code
  • Added changes to CHANGELOG.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant