Blockchain as a Service:Smart Contract Analyzer

更新时间:
复制 MD 格式

Smart Contract Analyzer scans your Solidity and Fabric-Golang contracts for security vulnerabilities and best-practice violations, then generates a downloadable report that categorizes findings by type and shows the occurrence count for each issue.

How it works

Upload a contract file to create an analysis task. The analyzer runs static analysis on the contract and produces a structured report. Each finding in the report includes a description of the vulnerability and the relevant code segments. For issues with detailed guidance, an inline explanation with sample code is available directly in the report.

Analysis tasks typically complete in 10 seconds to 2 minutes.

Prerequisites

Before you begin, ensure that you have:

  • An Alibaba Cloud account with access to the BaaS console

  • A smart contract file in one of the supported formats: .sol, .go, .tar.gz, or .tar

Analyze a smart contract

  1. Go to the BaaS console. In the left navigation bar, click Application Development Services > Smart contract analyzing.

  2. On the Smart Contract Analyzer page, click Create Task.

  3. Upload your contract file, enter a Task Name, and select a Contract Type (Solidity or Fabric-Golang). Click Create.

    Supported file formats are .sol and .go source files, and .tar.gz or .tar packages.
  4. Monitor the task status. Click Refresh to update the status of the analysis task.

    refresh_task

  5. After the task status shows completion, click Download to save the analysis report.

    download_report

Read the analysis report

The report groups findings by vulnerability type and shows how many times each issue occurs in your contract.

ca_step6

Click any vulnerability entry to expand its details.

ca_step7

In the expanded view:

Control Action
Show Code / Hide Code Toggle the relevant code segments from your contract alongside the finding.
Explanation Open a popup with a detailed description of the vulnerability and sample code. Click Explanation again to close it.

Usage notes

  • Smart Contract Analyzer supports Solidity contracts (.sol files) and Fabric-Golang contracts (.go, .tar.gz, .tar files). It does not support other contract languages or frameworks.