
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
kani-verifier
Advanced tools
The Kani Rust Verifier is a bit-precise model checker for Rust.
Kani is useful for checking both safety and correctness of Rust code.
unwrap() on None), arithmetic overflows, and custom correctness properties, either in the form of assertions (assert!(...)) or function contracts.To install the latest version of Kani (Rust 1.58+; Linux or Mac), run:
cargo install --locked kani-verifier
cargo kani setup
See the installation guide for more details.
Similar to testing, you write a harness, but with Kani you can check all possible values using kani::any():
use my_crate::{function_under_test, meets_specification};
#[kani::proof]
fn check_my_property() {
// Create a nondeterministic input
let input: u8 = kani::any();
// Call the function under verification
let output = function_under_test(input);
// Check that it meets the specification
assert!(meets_specification(input, output));
}
Kani will try to prove that all valid inputs produce outputs that satisfy the specification, without panicking or exhibiting unexpected behavior. This example is simple; we highly recommend following the tutorial to learn more about how to use Kani.
Use Kani in your CI with model-checking/kani-github-action@VERSION. See the
GitHub Action section in the Kani
book
for details.
See SECURITY for more information.
If you are interested in contributing to Kani, please take a look at the developer documentation.
Kani is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
Kani contains code from the Rust project. Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See the Rust repository for details.
FAQs
Unknown package
We found that kani-verifier demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.