Crates.io | cackle |
lib.rs | cackle |
version | 0.2.0 |
source | src |
created_at | 2023-03-31 00:55:22.378274 |
updated_at | 2023-09-07 04:20:47.097079 |
description | A Rust code ACL checker |
homepage | |
repository | https://github.com/cackle-rs/cackle |
max_upload_size | |
id | 825850 |
size | 473,342 |
A code ACL checker for Rust.
Cackle is a tool to analyse the transitive dependencies of your crate to see what kinds of APIs each crate uses.
The idea is look for crates that are using APIs that you don't think they should be using. For example a crate that from its description should just be doing some data processing, but is actually using network APIs.
Currently Cackle only works on Linux. See PORTING.md for more details.
cargo install --locked cackle
Or if you'd like to install from git:
cargo install --locked --git https://github.com/cackle-rs/cackle.git cackle
Installing bubblewrap
is recommended as it allows build scripts (build.rs) and tests to be run
inside a sandbox.
On systems with apt
, this can be done by running:
sudo apt install bubblewrap
From the root of your project (the directory containing Cargo.toml
), run:
cackle ui
This will interactively guide you through creating an initial cackle.toml
. Some manual editing of
your cackle.toml
is recommended. In particular, you should look through your dependency tree and
think about which crates export APIs that you'd like to restrict. e.g. if you're using a crate that
provides network APIs, you should declare this in your config. See CONFIG.md for more
details.
See CONFIG.md.
With all these limitations, what's the point? The goal really is to just raise the bar for what's required to sneak problematic code unnoticed into some package. Use of Cackle should not replace any manual code reviews of your dependencies that you would otherwise have done.
See HOW_IT_WORKS.md.
Contributions are very welcome. If you'd like to get involved, please reach out either by filing an issue or emailing David Lattimore (email address is in the commit log).
This software is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE for details.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.