Skip to content

Commit

Permalink
Use maintained forks of dotenv(->y) & memmap(->2).
Browse files Browse the repository at this point in the history
These 2 forks appear to be the blessed successors.

These unmaintained crate dependencies were revelead by a cargo audit
run:
```
$ cargo audit
    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
      Loaded 570 security advisories (from /home/jsirois/.cargo/advisory-db)
    Updating crates.io index
    Scanning Cargo.lock for vulnerabilities (140 crate dependencies)
Crate:     dotenv
Version:   0.15.0
Warning:   unmaintained
Title:     dotenv is Unmaintained
Date:      2021-12-24
ID:        RUSTSEC-2021-0141
URL:       https://rustsec.org/advisories/RUSTSEC-2021-0141
Dependency tree:
dotenv 0.15.0
└── jump 0.12.0
    ├── scie-jump 0.12.0
    └── package 0.2.0

Crate:     memmap
Version:   0.7.0
Warning:   unmaintained
Title:     memmap is unmaintained
Date:      2020-12-02
ID:        RUSTSEC-2020-0077
URL:       https://rustsec.org/advisories/RUSTSEC-2020-0077
Dependency tree:
memmap 0.7.0
└── jump 0.12.0
    ├── scie-jump 0.12.0
    └── package 0.2.0

warning: 2 allowed warnings found
```
  • Loading branch information
jsirois committed Sep 15, 2023
1 parent 71d2a9d commit 734e7e6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
17 changes: 8 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions jump/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ bstr = { workspace = true }
byteorder = "1.4"
bzip2 = "0.4"
dirs = "4.0"
dotenv = "0.15"
dotenvy = "0.15"
fd-lock = "3.0"
flate2 = "1.0" # For gz support.
indexmap = { version = "1.9", features = ["serde"] }
itertools = "0.10"
log = { workspace = true }
logging_timer = { workspace = true }
memmap = "0.7"
regex = { version = "1.7", default_features = false, features = ["std"] }
memmap2 = "0.7"
regex = { version = "1.7", default-features = false, features = ["std"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sha2 = "0.10"
Expand Down
4 changes: 2 additions & 2 deletions jump/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub fn prepare_boot() -> Result<BootAction, String> {
)
})?;
let data = unsafe {
memmap::Mmap::map(&file)
memmap2::Mmap::map(&file)
.map_err(|e| format!("Failed to mmap {exe}: {e}", exe = current_exe.exe.display()))?
};

Expand Down Expand Up @@ -160,7 +160,7 @@ pub fn prepare_boot() -> Result<BootAction, String> {

if lift.load_dotenv {
let _timer = timer!(Level::Debug; "jump::load_dotenv");
if let Ok(dotenv_file) = dotenv::dotenv() {
if let Ok(dotenv_file) = dotenvy::dotenv() {
debug!("Loaded env file from {path}", path = dotenv_file.display());
}
}
Expand Down

0 comments on commit 734e7e6

Please sign in to comment.