chore: replace tempdir with tempfile, clearing CVE RUSTSEC-2023-0018#5
Merged
Conversation
`tempdir` 0.3.7 has been deprecated for years and pulls in
`remove_dir_all` 0.5.3, which has an unfixed race-condition CVE
(RUSTSEC-2023-0018). Both reach the tree only via cargo-typify's
integration tests (dev-dependency), so there's no production exposure,
but cargo-deny rightly flags the chain.
Swaps the dependency for `tempfile` 3.27 and updates the seven test
sites to use `TempDir::with_prefix("cargo-typify")` instead of
`TempDir::new("cargo-typify")` (preserving the prefix semantics).
deny.toml drops the two now-irrelevant ignores (RUSTSEC-2018-0017 for
tempdir itself, RUSTSEC-2023-0018 for the transitive CVE). Two ignores
remain — `adler` and `paste` — both transitive dev-dep concerns we
cannot resolve from our side; the comments explain the chain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
`tempdir` 0.3.7 has been deprecated since 2018 and transitively pulls in `remove_dir_all` 0.5.3, which has an unfixed race-condition CVE (RUSTSEC-2023-0018). Both crates reach the tree only via cargo-typify's integration tests (dev-dependency), so there's no production exposure, but cargo-deny rightly flags the chain.
This PR:
Remaining advisory ignores
Two unmaintained-crate warnings stay ignored because we can't clear them from our side:
Test plan