Skip to content

Add timeout to GitHub update-check HTTP client#201

Merged
jrozner merged 1 commit into
mainfrom
worktree-outstanding-issues
Jun 18, 2026
Merged

Add timeout to GitHub update-check HTTP client#201
jrozner merged 1 commit into
mainfrom
worktree-outstanding-issues

Conversation

@jrozner

@jrozner jrozner commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

The ASHIRT API client already sets connect/request timeouts (src/ashirt/http.rs), but the GitHub release update check built a bare reqwest::blocking::Client::new() with no timeout, so an unresponsive api.github.com could hang the update check indefinitely.

This builds the update-check client with the same 10s connect / 30s request timeouts as the ASHIRT client.

Context

This addresses F-04 (CWE-400), originally raised against the pre-rewrite Go codebase in #142. That PR is stale (the Go code is gone after the Rust rewrite in #159); this reapplies the fix to the current Rust code.

While reviewing the other stale security PRs against the current codebase:

Testing

cargo build clean; cargo test for the update module passes (21 tests).

The ASHIRT API client already sets connect/request timeouts, but the
GitHub release update check built a bare reqwest client with none, so an
unresponsive api.github.com could hang the update check indefinitely.

Build the update-check client with the same 10s connect / 30s request
timeouts as the ASHIRT client. Addresses F-04 (CWE-400).
@jrozner jrozner requested a review from jkennedyvz as a code owner June 18, 2026 22:42
@jrozner jrozner merged commit 015b5e7 into main Jun 18, 2026
10 checks passed
@jrozner jrozner deleted the worktree-outstanding-issues branch June 18, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant