From 1f4698e444f9c6411aaada8b50654855990fe684 Mon Sep 17 00:00:00 2001 From: dvdsk Date: Thu, 20 Apr 2023 02:20:28 +0200 Subject: [PATCH] adds changelog, mitigate soundness in a dep --- CHANGELOG.md | 11 +++++++++++ Cargo.lock | 22 +--------------------- README.md | 5 +++++ main/Cargo.toml | 4 ++-- main/src/lib.rs | 3 ++- 5 files changed, 21 insertions(+), 24 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..bc311a0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.1.1] - 2023-04-20 + +### Fixed + - Resolved soundness issue by replacing dependency `atty` with `is-terminal` diff --git a/Cargo.lock b/Cargo.lock index 50da500..81da7d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -126,17 +126,6 @@ dependencies = [ "syn 2.0.15", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -667,15 +656,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.2.6" @@ -1407,7 +1387,6 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" name = "renewc" version = "0.1.0" dependencies = [ - "atty", "axum", "clap", "color-eyre", @@ -1415,6 +1394,7 @@ dependencies = [ "haproxy-config", "hyper", "instant-acme", + "is-terminal", "itertools", "libc", "libproc", diff --git a/README.md b/README.md index d9e31ea..a726aca 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ > **Certificate renewal, with advanced diagnostics without installing anything** +See also: + - [Install](#Install) + - [Example](#Example) + - [Changelog](CHANGELOG.md) + Certificate renewal can be quite fragile. This as a renewal tool that runs without install and does not need anything installed. If anything goes south during renewal it does not just report an error. It will try and find out what is wrong and give you a detailed report. For certificate renewal we use [instant-acme](https://crates.io/crates/instant-acme). ## Features diff --git a/main/Cargo.toml b/main/Cargo.toml index 6f4b74f..96a214d 100644 --- a/main/Cargo.toml +++ b/main/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "renewc" -version = "0.1.0" +version = "0.1.1" edition = "2021" description = "Certificate renewal, with advanced diagnostics without installing anything" license = "Apache-2.0 OR MIT" @@ -26,7 +26,7 @@ hyper = { version = "0.14", features = ["client"] } itertools = "0.10" haproxy-config = "0.4" -atty = "0.2" +is-terminal = "0.4" shared_memory = "0.12.4" [dev-dependencies] diff --git a/main/src/lib.rs b/main/src/lib.rs index 94ea99b..d1edf38 100644 --- a/main/src/lib.rs +++ b/main/src/lib.rs @@ -69,7 +69,8 @@ pub async fn run(config: impl Into, debug: bool) -> eyre::Result<()> { #[must_use] fn exit_requested(question: &str) -> bool { - if atty::isnt(atty::Stream::Stdin) { + use is_terminal::IsTerminal; + if !std::io::stdin().is_terminal() { true; // not a terminal, take the safe option }