Skip to content

chore: add audit.toml to ignore known unmaintained crates #3570

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

Open
wants to merge 4 commits into
base: staging
Choose a base branch
from

Conversation

joske
Copy link
Contributor

@joske joske commented Apr 2, 2025

Motivation

cargo audit complains that ansi_term and paste crates are unmaintained.

For paste: As the rust community considers this 'done', we can safely ignore this warning.
For ansi_term: Crate was unmaintained for 4 years. Removed this dependency.

Test Plan

no actual code changes

@joske
Copy link
Contributor Author

joske commented Apr 2, 2025

@niklaslong could you review? I can't set reviewers it seems.

@niklaslong
Copy link
Collaborator

I think this is a reasonable approach to take, though we should be very strict with the advisories we choose to include here. It might also be a good practice to periodically review this list. Could you also add comments to the file explaining why each advisory is ignored and perhaps link to relevant discussions?

@joske
Copy link
Contributor Author

joske commented Apr 2, 2025

Absolutely, we should think hard about adding anything to this list. There exists a fork of paste called pastey that is supposedly drop-in, but I'd be more weary to change to that than to just keep paste.

@vicsn vicsn requested a review from kaimast April 2, 2025 16:27
@niklaslong
Copy link
Collaborator

I'd be more weary to change to that than to just keep paste.

Agreed! 👍

@kaimast
Copy link
Collaborator

kaimast commented Apr 7, 2025

Looks good to me!

Should we create an issue for each unmaintained dependency, so we don't forget about it?

For ansi_term it looks like we would need to upgrade tracing-test, which might be good anyway because it should get rid of the dependency on tracing-subscriber 0.2 (snarkOS also depends on 0.3)

kaimast
kaimast previously approved these changes Apr 7, 2025
@vicsn
Copy link
Collaborator

vicsn commented Apr 8, 2025

For ansi_term it looks like we would need to upgrade tracing-test, which might be good anyway because it should get rid of the dependency on tracing-subscriber 0.2 (snarkOS also depends on 0.3)

@joske We should indeed just try to get rid of ansi_term, its use seems to be limited. Then we can remove that from the ignore list.

Can you also add a CI job which runs cargo audit? Also for snarkVM?

Should we create an issue for each unmaintained dependency, so we don't forget about it?

And yes we can make an issue to track the situation of the paste dependency...

@joske joske force-pushed the audit branch 3 times, most recently from 7365dd7 to 9b29f7f Compare April 9, 2025 07:47
@joske
Copy link
Contributor Author

joske commented Apr 9, 2025

@vicsn (github) workflow added. It will fail on any warning.

@joske
Copy link
Contributor Author

joske commented Apr 9, 2025

Apparently tokio should be upgraded to 1.42.2. Should probably be another PR?

@joske joske force-pushed the audit branch 2 times, most recently from 1a2cfde to 5e9ed77 Compare April 11, 2025 08:55
@joske
Copy link
Contributor Author

joske commented Apr 11, 2025

ansi_term dep removed.

Cargo.toml Outdated
incremental = true
debug = true
debug-assertions = true
debug-assertions = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can introduce profile changes in a separate PR with explanation if you think they're a good idea. In the past changing some of this slowed down CI, and I'm not sure we'd want to turn off debug assertions...

Copy link
Contributor Author

@joske joske Apr 11, 2025

Choose a reason for hiding this comment

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

oh this is a mistake! Good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@joske
Copy link
Contributor Author

joske commented Apr 11, 2025

BTW, the audit workflow will fail until the cargo update PRs are merged (#3589 and the relevant one in snarkVM).

name = "snarkos-integration"
version = "3.5.0"
authors = [ "The Aleo Team <[email protected]>" ]
description = "A integration testing suite for a decentralized operating system"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
description = "A integration testing suite for a decentralized operating system"
description = "An integration testing suite for a decentralized operating system"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh I did not see this is a new folder. Not sure where that came from.

@@ -0,0 +1,37 @@
[package]
name = "snarkos-integration"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need a new crate?

@@ -0,0 +1,20 @@
name: Cargo Audit
Copy link
Collaborator

Choose a reason for hiding this comment

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

We might want to unify this job with the existing circle workflow instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could do. Is that preferred?

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.

4 participants