Before you can go about auditing code, you need to decide what you want the audits to entail. This is expressed with “audit criteria”, which are just labels corresponding to human-readable descriptions of what to check for.
cargo vet
comes pre-equipped with two built-in criteria: safe-to-run and safe-to-deploy. You can use these without any additional configuration.
You can also specify arbitrary custom criteria in audits.toml
. For example:
[criteria.crypto-reviewed] description = ''' The cryptographic code in this crate has been reviewed for correctness by a member of a designated set of cryptography experts within the project. '''
The full feature set is documented here.
There are a number of reasons you might wish to operate with multiple sets of criteria:
crypto-reviewed
criteria and require them for audits of crates which implement cryptographic algorithms that your application depends on.safe-to-run
rather than safe-to-deploy
, since they don't need to be audited for handling adversarial input.You can define and use as many separate sets of criteria as you like.