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 audit check #2595

Merged
merged 8 commits into from
Jul 21, 2020
Merged

Add audit check #2595

merged 8 commits into from
Jul 21, 2020

Conversation

RadicalZephyr
Copy link
Contributor

@RadicalZephyr RadicalZephyr commented Jun 7, 2020

This continues the work started in #2516, adding two workflows to run cargo audit on the code and report these failures in a variety of useful ways. The intent is that the closer the code being audited is to being run in production, the louder these checks will complain. In order of increasing severity:

  • A "manual" cargo audit check is run on each pr and push event containing changes to any Cargo.toml in the workspace. This check only fails the job in order to mark a Pull Request as failing.

  • Every day at 02:00 UTC the master branch is audited using the actions-rs/audit-check action. When this check fails it will create an issue on github detailing the issue.

  • On every push to the master branch that contains changes to any Cargo.toml in the workspace the same actions-rs/audit-check is run, and if that check fails an issue will be created and a notification will be sent to the Tokio Discord channel (sending to the correct channel still needs to be set up).

This set of checks is slightly different from what was discussed in the previous PR, but I think that these checks make sense. We use actions-rs/audit-check only in contexts where the GITHUB_TOKEN will be accessible, so that on failure the action will be able to create an issue on Github. We still want to audit any proposed changes to the dependency tree in pull requests, but we don't need to report this in any extra fashion than blocking a merge.

@RadicalZephyr
Copy link
Contributor Author

An audit warning formatted by actions-rs/audit-check can be seen here.

@Darksonn Darksonn added A-tokio Area: The main tokio crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. A-ci Area: The continuous integration setup and removed A-tokio Area: The main tokio crate labels Jun 7, 2020
@taiki-e taiki-e self-assigned this Jun 10, 2020
@RadicalZephyr
Copy link
Contributor Author

I activated issues on my fork in order to ensure the issue creating functionality works, and it looks like it does.

@taiki-e taiki-e added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 12, 2020
Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

One of the concerns about using actions-rs/audit-check is that it doesn't seem to support passing options to cargo-audit (actions-rs/audit-check#132, e.g., we want to silence the warning that net2 is deprecated), but otherwise it looks good to me.

@taiki-e taiki-e removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 5, 2020
@carllerche
Copy link
Member

Thanks!

@carllerche carllerche merged commit cbb4abc into tokio-rs:master Jul 21, 2020
@RadicalZephyr RadicalZephyr deleted the add-audit-check branch July 22, 2020 00:58
@RadicalZephyr
Copy link
Contributor Author

I'll follow up with another PR when my PR to add an args parameter to audit-check gets accepted 🤞

@taiki-e taiki-e removed their assignment Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Area: The continuous integration setup C-maintenance Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants