Crates.io | cargo-geiger |
lib.rs | cargo-geiger |
version | 0.11.7 |
source | src |
created_at | 2018-06-20 22:41:37.119529 |
updated_at | 2024-02-01 01:40:26.116329 |
description | Detects usage of unsafe Rust in a Rust crate and its dependencies. |
homepage | |
repository | https://github.com/rust-secure-code/cargo-geiger |
max_upload_size | |
id | 71011 |
size | 375,756 |
A tool that lists statistics related to the usage of unsafe Rust code in a Rust crate and all its dependencies.
This cargo plugin was originally based on the code from two other projects:
Try to find and use a system-wide installed OpenSSL library:
cargo install --locked cargo-geiger
Or, build and statically link OpenSSL as part of the cargo-geiger executable:
cargo install --locked cargo-geiger --features vendored-openssl
Alternatively pre-built binary releases are available from GitHub releases.
Cargo.toml
you want to analyze.cargo geiger
This tool is not meant to advise directly whether the code ultimately is truly insecure or not.
The purpose of cargo-geiger is to provide statistical input to auditing e.g. with:
The use of unsafe is nuanced and necessary in some cases and any motivation to use it is outside the scope of cargo-geiger.
It is important that any reporting is handled with care:
Cargo Geiger exposes three libraries:
cargo-geiger
- Unversioned and highly unstable library exposing the internals of the cargo-geiger
binary. As such, any function contained within this library may be subject to change.cargo-geiger-serde
- A library containing the serializable report typesgeiger
- A library containing a few decoupled cargo components used by cargo-geigerSee the changelog.
https://en.wikipedia.org/wiki/Geiger_counter
Unsafe code, like ionizing radiation, is unavoidable in some situations and should be safely contained!