-
Notifications
You must be signed in to change notification settings - Fork 51
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
Getting rid of atty
as a transitive dependency (via colored
)
#113
Comments
Thanks for noting this! I think my preferred way forward here would be to add an alternative color library under a different feature flag, and then drop Given the security issue, maybe it'd be best to release a major revision for this specifically... In any case, I'd still prefer to have a minor version upgrade path. |
Thanks for the quick reply and interest in solving this! What's the rationale behind fixing soundness issue = major release? That if anything just makes it harder for people to upgrade. Better if it's a patch release so as many as possible get it without updating their |
We can do a minor release adding an alternative, but since we currently directly re-export types from |
Looks like owo-colors (mentioned in #67) is probably still the best choice here - only question I have is how well it works on Windows, which can be tested. |
I think It'll require a redesign of fern's color module, though, so I've not yet written it. Some of what we do now will become unnecessary, and other parts just won't work well with In the meantime, I've released an update of fern with a warning for this security issue in the |
Hello everyone, colored will release a new version soon. Fern has a MSRV of rust 1.35, which makes you our dependant with the largest rust compatibility so I think you should a say in this. We think we have 3 options:
What would you prefer ? Side-question: would you think that we should have a major release to reflect this change ? It's not clear to me if this should warrant a major bump or not. |
So happy to hear from a Will the public API of I am not a It does not look like |
Hey, new contributor of colored here! I've been hopping on to help maintain some stuff, and I've been in charge of some things like new releases and getting this MSRV stuff figured out.
It won't, this will just affect internals of how
That's pretty much been my views on everything too. You never know when a dependency increases their MSRV and how that might affect how your own crate changes their's, so it's been my opinion to just not make it breaking.
I agree that option 1 is the best too, and if combined with colored-rs/colored#133 (comment) that'd make every dependency (except one when targeting Windows) disappear. Just because 1.70 is so recent though I was thinking it should probably hold off until 1.70 gets a bit older. The main option I was looking at then was number 3, as then terminal detection can still be done without any problem.
It definitely looks like @daboross isn't wanting to be too strict, but I'll probably hold off until he can get a response in here. It doesn't look like his GitHub is too active though, so I'll probably wait a week or so and then get a decision going if he hasn't responded. |
@mackwic, @hwittenborn Thanks for letting me chime in here! @faern is correct - I'm mostly concerned with unnecessary version bumps in fern's internals. I'd definitely qualify this as necessary, or at least highly useful, and I wouldn't want to constrain dependencies of this library in any case, just the code itself. Maybe I can add some documentation in the CI file to specify that explicitly. In any case, all three approaches sound reasonable to me! I'd leave it up to you which is best. If you go for just upping the MSRV of colored to 1.62 or 1.70, I'd agree with still just doing a minor release. That may break builds, but that's why |
That sounds great @daboross! There's plans for a I'll let @kurtlawrence chime in too because he's helping maintain stuff too - do you think that'd a good approach, or would you prefer something else? |
Once we get that resolved a release should be good to come out real soon as well, I'm thinking of getting that done tomorrow. This vulnerability stuff is definitely something I want to get rid of ASAP, so as soon as it's good to it's definitely going to happen. |
Yep, that sounds good to me. |
Alright this should be good to go in the latest release of |
I looked at |
|
Sadly this is a breaking change due to |
Yep - that'll be fine for me. I had forgotten colored had done a 2.0 release, but for a security fix like this I'll do a major release and up it. If you feel like backporting to colored 1.0 and doing a 1.9.4 release from a branch (branched off of the 1.9.3 release), that could fix it for more people today, but I don't think it's that big of a deal either way. Most rust crates don't support old major versions with security fixes in any case. |
The important part IMO is to give people a working version of |
I submitted a PR on getting this updated and fixed. #128 |
Bump on this. There seems to be a pretty clear and easy way forward here. Anything stopping the PR from being reviewed/merged? |
Hey! I'm back, I've been a bit busy with some other projects I work on.
I went ahead and got that done, that'll probably be the last major update for
|
The signatures of the methods on If I in my own crate have these dependencies:
And then I have the code:
The the compiler will error on these being different types if But great that you have backported the |
I realize no change to |
Cool, I'm glad to hear @faern! I didn't realize bumping v1 would make it automatic like that either, I'm definitely glad that all got done. Y'all can handle the major/minor version bump however y'all would like, it won't bother me one way or the other. It's good to see everything's pretty much in the clear now though :). |
Thank you again for the patch! Now fern does not need to rush any colored upgrade any longer |
atty
has a soundness issue (RUSTSEC-2021-0145), seems to be 100% unmaintained and people are moving away from it in general (clap-rs/clap#4249, rust-cli/env_logger#248, ...).atty
is part of the dependency tree forfern
via its direct dependency oncolored
. However,colored
also does not seem to be too quick in wanting to fix theatty
issues (colored-rs/colored#122).So I'm posting this issue here also, in order to track the possibility of depending on
fern
without pulling in a soundness issue. For one it can act as some pressure oncolored
to finally merge and release that fix. Orfern
can consider changing library for colors.The text was updated successfully, but these errors were encountered: