{"id":31041000,"url":"https://github.com/endorlabs/MIRAI","last_synced_at":"2025-09-14T09:02:59.310Z","repository":{"id":262539491,"uuid":"845761449","full_name":"endorlabs/MIRAI","owner":"endorlabs","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-04T18:38:01.000Z","size":224477,"stargazers_count":127,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-23T06:59:32.762Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/endorlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-21T22:03:56.000Z","updated_at":"2025-03-19T15:05:51.000Z","dependencies_parsed_at":"2024-12-27T01:20:53.954Z","dependency_job_id":"9fa26a3f-ecb2-42bd-a7a7-90d39ff152c5","html_url":"https://github.com/endorlabs/MIRAI","commit_stats":null,"previous_names":["endorlabs/mirai"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/endorlabs/MIRAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endorlabs%2FMIRAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endorlabs%2FMIRAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endorlabs%2FMIRAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endorlabs%2FMIRAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endorlabs","download_url":"https://codeload.github.com/endorlabs/MIRAI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endorlabs%2FMIRAI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275082376,"owners_count":25402339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-14T09:01:53.991Z","updated_at":"2025-09-14T09:02:59.279Z","avatar_url":"https://github.com/endorlabs.png","language":"Rust","funding_links":[],"categories":["Rust","Static Checkers"],"sub_categories":[],"readme":"# MIRAI [![codecov](https://codecov.io/gh/endorlabs/MIRAI/branch/main/graph/badge.svg?token=q4jzL09Ahl)](https://codecov.io/gh/endorlabs/MIRAI) [![deps.rs](https://deps.rs/repo/github/endorlabs/MIRAI/status.svg)](https://deps.rs/repo/github/endorlabs/MIRAI)\nMIRAI is an abstract interpreter for the [Rust](https://www.rust-lang.org/) compiler's [mid-level intermediate\nrepresentation](https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md) (MIR).\nIt is intended to become a widely used static analysis tool for Rust.\n\n## Who should use MIRAI\n\nMIRAI can be used as a linter that finds panics that may be unintentional or are not the best way to terminate a\nprogram. This use case generally requires no annotations and is best realized by integrating MIRAI into a CI pipeline.\n\nMIRAI can also be used to verify correctness properties. Such properties need to be encoded into annotations of the\nsource program.\n\nA related use is to better document an API via explicit precondition annotations and then use MIRAI to check that \nthe annotations match the code.\n\nFinally, MIRAI can be used to look for security bugs via taint analysis (information leaks, code injection bugs, etc.)\nand constant time analysis (information leaks via side channels). Unintentional (or ill-considered) panics can also\nbecome security problems (denial of service, undefined behavior).\n\n## How to use MIRAI\n\nYou'll need to install MIRAI as described \n[here](https://github.com/endorlabs/MIRAI/blob/main/documentation/InstallationGuide.md).\n\nThen use `cargo mirai` to run MIRAI over your current package. This works much like `cargo check` but uses MIRAI rather\nthan rustc to analyze the targets of your current package.\n\n`cargo mirai` does a top-down full-program path sensitive analysis of the \n[entry points](https://github.com/endorlabs/MIRAI/blob/main/documentation/Overview.md#entry-points) of your \npackage. To analyze test functions instead, use `cargo mirai --tests`.\n\nThis will likely produce some warnings. Some of these will be real issues (true positives) that you'll fix by changing\nthe offending code. Other warnings will be due to limitations of MIRAI and you can silence them by adding annotations\ndeclared in this [crate](https://crates.io/crates/mirai-annotations).\n\nOnce MIRAI gives your code a clean bill of health, your code will be better documented and more readable. Perhaps you'll \nalso have found and fixed a few bugs.\n\nYou can use the environment variable `MIRAI_FLAGS` to get cargo to provide command line options to MIRAI. The value is a\nstring which can contain any of the following flags:\n\n- `--diag=default|verify|library|paranoid`: configures level of diagnostics. With `default` MIRAI\n   will not report errors which are potential 'false positives'. With `verify` it will point out\n   functions that may contain such errors. With `library` it will require explicit preconditions.\n   With `paranoid` it will flag any issue that may be an error.\n- `--single_func \u003cname\u003e`: the name of a specific function you want to analyze.\n- `--body_analysis_timeout \u003cseconds\u003e`: the maximum number of seconds to spend analyzing a function body.\n- `--call_graph_config \u003cpath_to_config\u003e`: path to configuration file for call graph generator (see [Call Graph Generator documentation](documentation/CallGraph.md)). No call graph will be generated if this is not specified.\n- `--print_function_names`: just print the source location and fully qualified function signature of every function.\n- `--`: any arguments after this marker are passed on to rustc.\n\nYou can get some insight into the inner workings of MIRAI by setting the verbosity level of log output to one of \n`warn`, `info`, `debug`, or `trace`, via the environment variable `MIRAI_LOG`.\n\n## Developing MIRAI\nSee the [developer guide](https://github.com/endorlabs/MIRAI/blob/main/documentation//DeveloperGuide.md)\nfor instructions on how to build, run and debug MIRAI.\n\n## Full documentation\n* [Overview of project](https://github.com/endorlabs/MIRAI/blob/main/documentation/Overview.md).\n* [Architecture](https://github.com/endorlabs/MIRAI/blob/main/documentation/Architecture.md).\n* [Design discussions](https://github.com/endorlabs/MIRAI/blob/main/documentation/DesignDiscussions.md).\n* [Further reading](https://github.com/endorlabs/MIRAI/blob/main/documentation/FurtherReading.md).\n\n## Join the MIRAI community\n\u003c!-- * Website:\n* Facebook page:\n* Mailing list\n* irc:  --\u003e\nSee the [CONTRIBUTING](https://github.com/endorlabs/MIRAI/blob/main/CONTRIBUTING.md) file for how to help out.\n\n## License\nMIRAI is MIT licensed, as found in the [LICENSE](https://github.com/endorlabs/MIRAI/blob/main/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendorlabs%2FMIRAI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendorlabs%2FMIRAI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendorlabs%2FMIRAI/lists"}