Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial cargo vet configuration #6981

Merged
merged 3 commits into from
Oct 12, 2023
Merged

Add initial cargo vet configuration #6981

merged 3 commits into from
Oct 12, 2023

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Oct 10, 2023

Status

Ready for review

Description of Changes

cargo vet is a tool designed by Mozilla to record audits of Rust
dependencies, and it matches nicely with the philosophy of our diff
review system for Python. It can automatically present diffs and
verify everything has been checked.

Trust

To reduce the number of audits we have to do, we trust the following
organizations:

  • Bytecode Alliance (WASM/WASI)
  • Google
  • Internet Security Research Group (Let's Encrypt, etc.)
  • Mozilla
  • Zcash

We also trust a number of individual developers, because they are
members of the Rust Project and also trusted by one of the above
organizations we trust. We also trust the two Sequoia-OpenPGP team
members who release things.

All of the individual trust markers have an expiry date to remind us to
re-evalutate trustworthiness every so often.

Exemptions

There are a number of dependencies that appear in our tree but are not
used on Linux x86_64 so we can ignore them entirely. These are marked in
config.toml with a policy stanza that has an empty criteria block. These
crates have been identified manually, in the future cargo-vet will
hopefully let us specify specific targets we care about and take care of
it automatically.

The remaining exemptions in config.toml have not been reviewed yet; we
can incrementally chip away at them.

Signing

Unlike diff reviews, there is no PGP signing of this file. Because these
are committed into the Git repository directly, we can rely on that as a
measure of trust (unlike random wiki pages).

CI

CI verifies that all dependencies have either been reviewed or exempted,
so there's no need for manual tracking in PR descriptions. Upstream
provides a GitHub Actions template that we use most of.

Fixes #6500.

Testing

  • CI passes
  • follow https://mozilla.github.io/cargo-vet/install.html, then running cargo vet locally succeeds. cargo vet suggest lists all the crates that are currently exempt and not yet reviewed.
  • We're all on board with the list of trusted organizations + individuals

Deployment

Any special considerations for deployment? No, CI only

Checklist

  • Linting (make lint) and tests (make test) pass in the development container
  • I will open a securedrop-dev-docs PR shortly

@legoktm legoktm requested a review from a team as a code owner October 10, 2023 20:04
This was a blind `cargo update` run to get us to the latest on everything.
@legoktm
Copy link
Member Author

legoktm commented Oct 11, 2023

Summary from today's team meeting:

  • cargo vet is good!
  • The initial list of trusted organizations is fine, though it was noted that Zcash is the only one we don't already have some "dependency" on (e.g. we use Firefox/TBB, Google stuff, etc.).
  • We want to lower the expiry on individuals to 6 months instead of 1 year for now as we get more familiar with Rust stuff.
  • I need to write documentation on our policy and practices for this.
  • We should be able to audit most of the dependencies prior to the 2.7.0 release.

cargo vet is a tool designed by Mozilla to record audits of Rust
dependencies, and it matches nicely with the philosophy of our diff
review system for Python. It can automatically present diffs and
verify everything has been checked.

== Trust ==

To reduce the number of audits we have to do, we trust the following
organizations:

* Bytecode Alliance (WASM/WASI)
* Google
* Internet Security Research Group (Let's Encrypt, etc.)
* Mozilla
* Zcash

We also trust a number of individual developers, because they are
members of the Rust Project and also trusted by one of the above
organizations we trust. We also trust the two Sequoia-OpenPGP team
members who release things.

All of the individual trust markers have an expiry date to remind us to
re-evalutate trustworthiness every so often. For now we've set the
expiry to 6 months as we're still getting familiar with the system.

== Exemptions ==

There are a number of dependencies that appear in our tree but are not
used on Linux x86_64 so we can ignore them entirely. These are marked in
config.toml with a policy stanza that has an empty criteria block. These
crates have been identified manually, in the future cargo-vet will
hopefully let us specify specific targets we care about and take care of
it automatically.

The remaining exemptions in config.toml have not been reviewed yet; we
can incrementally chip away at them.

== Signing ==

Unlike diff reviews, there is no PGP signing of this file. Because these
are committed into the Git repository directly, we can rely on that as a
measure of trust (unlike random wiki pages).

== CI ==

CI verifies that all dependencies have either been reviewed or exempted,
so there's no need for manual tracking in PR descriptions. Upstream
provides a GitHub Actions template that we use most of.

Fixes #6500.
Demonstrates what an audit looks like on our end, as well as showing
how we can import supporting audits from Bytecode Alliance and Mozilla.
Copy link
Contributor

@zenmonkeykstop zenmonkeykstop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with expiry revisions!

@zenmonkeykstop zenmonkeykstop merged commit 7fd2294 into develop Oct 12, 2023
11 checks passed
@zenmonkeykstop zenmonkeykstop deleted the cargo-vet branch October 12, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Determine plan for auditing Rust dependencies
2 participants