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

build(deps): bump tempfile from 3.3.0 to 3.4.0 #6240

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 27, 2023

Bumps tempfile from 3.3.0 to 3.4.0.

Changelog

Sourced from tempfile's changelog.

3.4.0

SECURITY: Prior tempfile releases depended on remove_dir_all version 0.5.0 which was vulnerabiel to a TOCTOU race. This same race is present in rust versions prior to 1.58.1.

Features:

  • Generalized temporary files: NamedTempFile can now abstract over different kinds of files (e.g., unix domain sockets, pipes, etc.):
    • Add Builder::make and Builder::make_in for generalized temp file creation.
    • Add NamedTempFile::from_parts to complement NamedTempFile::into_parts.
    • Add generic parameter to NamedTempFile to support wrapping non-File types.

Bug Fixes/Improvements:

  • Don't try to create a temporary file multiple times if the file path has been fully specified by the user (no random characters).
  • NamedTempFile::persist_noclobber is now always atomic on linux when renameat_with is supported. Previously, it would first link the new path, then unlink the previous path.
  • Fix compiler warnings on windows.

Trivia:

  • Switch from libc to rustix on wasi/unix. This now makes direct syscalls instead of calling through libc.
  • Remove remove_dir_all dependency. The rust standard library has optimized their internal version significantly.
  • Switch to official windows-sys windows bindings.

Breaking:

  • The minimum rust version is now 1.48.0.
  • Mark most functions as must_use.
  • Uses direct syscalls on linux by default, instead of libc.
  • The new type parameter in NamedTempFile may lead to type inference issues in some cases.
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from a team as a code owner February 27, 2023 16:57
@dependabot dependabot bot requested review from teor2345 and removed request for a team February 27, 2023 16:58
@dependabot dependabot bot added A-dependencies Area: Dependency file updates A-rust Area: Updates to Rust code C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG P-Low ❄️ labels Feb 27, 2023
@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Merging #6240 (7a473cc) into main (98c634b) will increase coverage by 0.19%.
The diff coverage is n/a.

❗ Current head 7a473cc differs from pull request most recent head 4a5c5db. Consider uploading reports for the commit 4a5c5db to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6240      +/-   ##
==========================================
+ Coverage   77.83%   78.02%   +0.19%     
==========================================
  Files         304      304              
  Lines       39349    39349              
==========================================
+ Hits        30626    30701      +75     
+ Misses       8723     8648      -75     

Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/cargo/tempfile-3.4.0 branch from 7a473cc to 4a5c5db Compare February 27, 2023 22:42
@teor2345 teor2345 added C-bug Category: This is a bug C-security Category: Security issues and removed P-Low ❄️ labels Feb 28, 2023
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

A bunch of different bug fixes, including this security fix, which doesn't impact Zebra, because we don't use temporary files during normal production operation:

SECURITY: Prior tempfile releases depended on remove_dir_all version 0.5.0 which was vulnerabiel to a TOCTOU race. This same race is present in rust versions prior to 1.58.1.

@teor2345
Copy link
Contributor

The diff for this change is:
Stebalien/tempfile@v3.3.0...master

Some unsafe code removed, otherwise it looks reasonable after a quick check.

mergify bot added a commit that referenced this pull request Feb 28, 2023
@mergify mergify bot merged commit 52c627d into main Feb 28, 2023
@mergify mergify bot deleted the dependabot/cargo/tempfile-3.4.0 branch February 28, 2023 10:02
@oxarbitrage oxarbitrage mentioned this pull request Mar 23, 2023
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Area: Dependency file updates A-rust Area: Updates to Rust code C-bug Category: This is a bug C-security Category: Security issues C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant