Skip to content

fix(deps): drop unmaintained atty crate#3054

Merged
tusharmath merged 1 commit intomainfrom
fix-dependabot-8-remove-atty
Apr 17, 2026
Merged

fix(deps): drop unmaintained atty crate#3054
tusharmath merged 1 commit intomainfrom
fix-dependabot-8-remove-atty

Conversation

@amitksingh1490
Copy link
Copy Markdown
Contributor

Why

Resolves Dependabot alert #8 (GHSA-g98v-hv3f-hcfr).

The atty crate is unmaintained (last release ~3 years ago) and carries a low-severity advisory for a potential unaligned read on Windows. Upstream has not published a patched version and is unlikely to, so the advisory explicitly recommends replacing it.

Why this approach

std::io::IsTerminal has been stable since Rust 1.70 and provides exactly the TTY-detection capability we were using atty for. Leaning on the standard library is preferable to pulling in another third-party crate (e.g. is-terminal) because it:

  • Removes a security-flagged dependency without introducing a new one.
  • Reduces the dependency surface and build time.
  • Is maintained by the Rust project itself, so future soundness concerns are covered upstream.

Scope

atty had exactly one caller in the workspace (stdin pipe detection in forge_main). Behavior is preserved: piped stdin still populates the piped-input path, and interactive TTY sessions still bypass the stdin read.

Verification

  • cargo tree -i atty --workspace confirms the crate is no longer in the graph.
  • cargo check passes.
  • Behavior was validated end-to-end via tmux (TTY path) and multiple pipe variants (non-TTY path): empty pipe, single-line, multi-line, and /dev/null redirect. Interactive TUI launches and exits cleanly; piped commands do not hang.

Co-Authored-By: ForgeCode noreply@forgecode.dev

Resolves Dependabot alert #8 (GHSA-g98v-hv3f-hcfr). The atty crate is
unmaintained and flagged for a potential unaligned read on Windows. No
patched upstream release exists, so the advisory recommends replacement.

Switch to the standard library's std::io::IsTerminal, which is stable
since Rust 1.70 and covers our only use case (detecting piped stdin).
This eliminates the vulnerable dependency entirely without adding any
new third-party code.

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Apr 17, 2026
@tusharmath tusharmath merged commit c8e335a into main Apr 17, 2026
10 checks passed
@tusharmath tusharmath deleted the fix-dependabot-8-remove-atty branch April 17, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants