Query sarif report

This API is used to query a project's report of sarif structure. Please be careful with projectId and keep sure it's the projectId you want to query.

get/project/{projectId}/sarif-report

Request

  • Base URL
    https://api.zan.top/scr/v1
  • URL
    https://api.zan.top/scr/v1/project/{projectId}/sarif-report
  • Auth
    none required

Path parameters

projectIdstring required

Equals projectId returned by Create project

Headers

Authorizationstring

Fill your access key after Bearer

Response

200

successboolean

Example response

{
  "data": {
    "project": "yuzhifa_test_api_scr_06081500(File)",
    "auditDate": "Thu Jun 08 00:00:00 CST 2023",
    "language": "Solidity",
    "projectIssues": [
      {
        "id": "M-01",
        "title": "Code Security - Unauthenticated Storage Access",
        "advice": "Authenticate msg.sender when crucial state variables will be updated. e.g. require(msg.sender == ...).",
        "category": "Code Security",
        "description": "Modification to state variable(s) is not restricted by authenticating msg.sender.",
        "headName": "M-01-Code Security - Unauthenticated Storage Access",
        "detailCodeList": [
          {
            "sourceFileName": "/GameVoting/contracts/Game.sol",
            "highLine": "77-77",
            "startLine": "75",
            "code": "    /// @notice adding new user in game (nedded to use approve function in IERC20 token contract)\n    /// @param _number number for msg.sender\n    function participate(uint256 _number) public {\n        address _msgSender = msg.sender;\n        require(block.timestamp - startGame < 5 minutes, \"Game Over\");\n"
          }
        ],
        "location": "/GameVoting/contracts/Game.sol:77",
        "severity": "Medium",
        "contract": "Game"
      }
    ],
    "severityStats": [
      {
        "total": 1,
        "issueIds": [
          "L-03"
        ],
        "severity": "Low"
      }
    ],
    "fileContractStats": [
      {
        "total": 4,
        "fileName": "/GameVoting/contracts/GameFactory.sol",
        "auditReportContractStateEntries": [
          {
            "total": 2,
            "issueIds": [
              "I-10"
            ],
            "contract": "GameFactory^0",
            "severityDetails": [
              {
                "total": 2,
                "issueIds": [
                  "I-10"
                ],
                "severity": "Informational"
              }
            ]
          }
        ]
      }
    ],
    "contractStats": [
      {
        "total": 2,
        "issueIds": [
          "I-10"
        ],
        "contract": "GameFactory^0",
        "severityDetails": [
          {
            "total": 2,
            "issueIds": [
              "I-10"
            ],
            "severity": "Informational"
          }
        ]
      }
    ],
    "categoryStats": [
      {
        "total": 21,
        "issueIds": [
          "L-03"
        ],
        "category": "Optimization Suggestion",
        "severityDetails": [
          {
            "total": 1,
            "issueIds": [
              "L-03"
            ],
            "severity": "Low"
          }
        ]
      }
    ],
    "categoryCheckItemStats": [
      {
        "category": "Optimization Suggestion",
        "checkItemStatEntries": [
          {
            "total": 1,
            "issueIds": [
              "I-14"
            ],
            "checkItem": "Use != 0 Instead of > 0 for Unsigned Integer Comparison"
          }
        ]
      }
    ],
    "contracts": [
      "Game"
    ],
    "complete": true
  },
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.