Skip to content

fix(security): sanitize reqwest error messages to prevent hostname leakage#40

Merged
chaliy merged 1 commit intomainfrom
claude/fix-error-leak-38-Z7GMA
Mar 13, 2026
Merged

fix(security): sanitize reqwest error messages to prevent hostname leakage#40
chaliy merged 1 commit intomainfrom
claude/fix-error-leak-38-Z7GMA

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Mar 13, 2026

What

Sanitize reqwest error messages in from_reqwest() to prevent leaking internal hostnames.

Why

FetchError::from_reqwest() was passing raw err.to_string() through RequestError, which could expose internal hostnames or URL details in error messages. This contradicts TM-LEAK-001.

How

  • Classify reqwest errors by kind (redirect, body, decode) with generic messages instead of passing through raw error strings
  • Update TM-LEAK-001 mitigation details in threat model
  • Add security tests verifying error messages are generic

Risk

  • Low — changes error message content only, no logic changes

Closes #38

Checklist

  • Unit tests are passed
  • Smoke tests are passed
  • Documentation is updated
  • Specs are up to date and not in conflict

…akage

from_reqwest() was passing raw reqwest error strings through
RequestError(err.to_string()), which could contain internal hostnames
or URL details. Now classifies errors by kind (redirect, body, decode)
with generic messages.

Closes #38
@chaliy chaliy merged commit df01ec9 into main Mar 13, 2026
10 checks passed
@chaliy chaliy deleted the claude/fix-error-leak-38-Z7GMA branch March 13, 2026 00:46
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.

fix(security): from_reqwest leaks error details contradicting TM-LEAK-001

1 participant