Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 12-Sep-2021 | - | ||||
cargo-crates/ | H | 03-May-2022 | - | 7,100,748 | 5,570,920 | |
src/ | H | 12-Sep-2021 | - | 1,523 | 1,086 | |
tests/ | H | 12-Sep-2021 | - | 249 | 177 | |
CHANGELOG.md | H A D | 12-Sep-2021 | 9.2 KiB | 276 | 204 | |
CODE_OF_CONDUCT.md | H A D | 12-Sep-2021 | 3.1 KiB | 75 | 56 | |
Cargo.lock | H A D | 12-Sep-2021 | 52.8 KiB | 2,181 | 1,955 | |
Cargo.toml | H A D | 12-Sep-2021 | 1.1 KiB | 41 | 35 | |
LICENSE-APACHE | H A D | 12-Sep-2021 | 10.6 KiB | 202 | 169 | |
LICENSE-MIT | H A D | 12-Sep-2021 | 1 KiB | 26 | 22 | |
README.md | H A D | 12-Sep-2021 | 3.6 KiB | 111 | 75 | |
audit.toml.example | H A D | 12-Sep-2021 | 1.4 KiB | 35 | 28 |
README.md
1# RustSec: `cargo audit` 2 3[![Latest Version][crate-image]][crate-link] 4[![Build Status][build-image]][build-link] 5[![Safety Dance][safety-image]][safety-link] 6![MSRV][rustc-image] 7![Apache 2.0 OR MIT licensed][license-image] 8[![Project Chat][chat-image]][chat-link] 9 10Audit `Cargo.lock` files for crates with security vulnerabilities reported to the 11[RustSec Advisory Database]. 12 13## Requirements 14 15`cargo audit` requires Rust **1.46** or later. 16 17## Installation 18 19`cargo audit` is a Cargo subcommand and can be installed with `cargo install`: 20 21``` 22$ cargo install cargo-audit 23``` 24 25Once installed, run `cargo audit` at the toplevel of any Cargo project. 26 27## Screenshot 28 29<img src="https://raw.githubusercontent.com/RustSec/cargo-audit/c857beb/img/screenshot.png" alt="Screenshot" style="max-width:100%;"> 30 31## `cargo audit fix` subcommand 32 33This tool supports an experimental feature to automatically update `Cargo.toml` 34to fix vulnerable dependency requirements. 35 36To enable it, install `cargo audit` with the `fix` feature enabled: 37 38``` 39$ cargo install cargo-audit --features=fix 40``` 41 42Once installed, run `cargo audit fix` to automatically fix vulnerable 43dependency requirements: 44 45<img src="https://raw.githubusercontent.com/RustSec/cargo-audit/c857beb/img/screenshot-fix.png" alt="Screenshot" style="max-width:100%;"> 46 47This will modify `Cargo.toml` in place. To perform a dry run instead, which 48shows a preview of what dependencies would be upgraded, run 49`cargo audit fix --dry-run`. 50 51## Using `cargo audit` on Travis CI 52 53To automatically run `cargo audit` on every build in Travis CI, you can add the following to your `.travis.yml`: 54 55```yaml 56language: rust 57cache: cargo # cache cargo-audit once installed 58before_script: 59 - cargo install --force cargo-audit 60 - cargo generate-lockfile 61script: 62 - cargo audit 63``` 64 65## Using `cargo audit` on GitHub Action 66 67Please use [`audit-check` action](https://github.com/actions-rs/audit-check) directly. 68 69## Reporting Vulnerabilities 70 71Report vulnerabilities by opening pull requests against the [RustSec Advisory Database] 72GitHub repo: 73 74<a href="https://github.com/RustSec/advisory-db/blob/master/CONTRIBUTING.md"> 75 <img alt="Report Vulnerability" width="250px" height="60px" src="https://rustsec.org/img/report-vuln-button.svg"> 76</a> 77 78## License 79 80Licensed under either of: 81 82 * Apache License, Version 2.0 ([LICENSE-APACHE] or https://www.apache.org/licenses/LICENSE-2.0) 83 * MIT license ([LICENSE-MIT] or https://opensource.org/licenses/MIT) 84 85at your option. 86 87### Contribution 88 89Unless you explicitly state otherwise, any contribution intentionally submitted 90for inclusion in the work by you shall be dual licensed as above, without any 91additional terms or conditions. 92 93[//]: # (badges) 94 95[crate-image]: https://img.shields.io/crates/v/cargo-audit.svg 96[crate-link]: https://crates.io/crates/cargo-audit 97[build-image]: https://github.com/RustSec/rustsec/actions/workflows/cargo-audit.yml/badge.svg 98[build-link]: https://github.com/RustSec/rustsec/actions/workflows/cargo-audit.yml 99[license-image]: https://img.shields.io/badge/license-Apache2.0%2FMIT-blue.svg 100[rustc-image]: https://img.shields.io/badge/rustc-1.46+-blue.svg 101[safety-image]: https://img.shields.io/badge/unsafe-forbidden-success.svg 102[safety-link]: https://github.com/rust-secure-code/safety-dance/ 103[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg 104[chat-link]: https://rust-lang.zulipchat.com/#narrow/stream/146229-wg-secure-code/ 105 106[//]: # (general links) 107 108[RustSec Advisory Database]: https://github.com/RustSec/advisory-db/ 109[LICENSE-APACHE]: https://github.com/RustSec/cargo-audit/blob/main/LICENSE-APACHE 110[LICENSE-MIT]: https://github.com/RustSec/cargo-audit/blob/main/LICENSE-MIT 111