Git Product home page Git Product logo

masamune's Introduction

The smart contract security search utility tool.

What is Masamune?

Masamune is a search utility tool that allows you to search for smart contract security vulnerabilities, from a curated list of sources.

To access Masamune, visit masamune.app.

How does it work?

Masamune V1.

The search utility is powered by Lunr.js, a full-text search library for the browser.

We have developed custom scrapers for each data source, which are run periodically to retrieve the latest data. You can find the scrapers in the scrapers directory.

The data is stored within the results directory; for each of the queries, a pattern match is tried against the data, and the results are displayed.

To build locally, just open index.html using a live server, eg. this extension for VSCode.

Masamune V2.

The second iteration of Masamune is currently under development, however a beta version will be available at masamune.app soon. The new version will be powered by OpenAI's Embeddings API, which will allow for more advanced search queries, as well as more context aware search results.

Retrieving the data

Currently, Masamune works on the following data sources:

  1. Code4rena findings.
  2. Immunefi bugfixes.
  3. DeFi Hacks Analysis.
  4. Zellic audits.
  5. yAudit findings.
  6. Trail of Bits audits
  7. Various Gitbooks, such as the Layer Zero Docs, Curve Finance Docs, MEV Wiki, etc.

Creating a custom scraper

To add a new data source, a custom scraper for the report format must be created. Existing examples are found in the scrapers directory.

Scrapers have 2 main functions. The extract_finding() function parses the report files and stores the stored output in a text file in the findings_newupdate directory. The jsonify_findings() function parses this text file and outputs a JSON file stored in the results directory. The format of the JSON data is found in other scraper files but generally follows this format:

        "title": "MobileCoin Foundation could infer token IDs in certain scenarios",
        "labels": [
            "Trail of Bits",
            "Severity: Informational",
            "Difficulty: High",
            "Type: Data Exposure",
        ]
        "body": ...

For Masamune V1, after the new scraper is created and the JSON output is stored in the results directory, the JSON file must be added to the dataset variable in logic.js to be included in the search results.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.