Skip to content

communicator/ssh: redact certificate authentication errors - #38949

Closed
maithilijoshi20 wants to merge 2 commits into
hashicorp:mainfrom
maithilijoshi20:fix-ssh-error-redaction-38577
Closed

communicator/ssh: redact certificate authentication errors#38949
maithilijoshi20 wants to merge 2 commits into
hashicorp:mainfrom
maithilijoshi20:fix-ssh-error-redaction-38577

Conversation

@maithilijoshi20

@maithilijoshi20 maithilijoshi20 commented Jul 30, 2026

Copy link
Copy Markdown

Problem

SSH certificate authentication errors include private-key or certificate material in terminal and CI logs.

Change

Return the underlying SSH parsing and signer errors without formatting credential values into the error message. Add a 1.17 changelog entry for the user-visible security fix.

Tests

  • C:/Program Files/Go/bin/go.exe test ./internal/communicator/ssh -count=1 — passed

Target Release

1.17.x

Rollback Plan

Revert this PR to restore the previous error-message formatting.

Changes to Security Controls

SSH authentication errors no longer include private key or certificate material in terminal and CI logs.

Fixes #38577

@maithilijoshi20
maithilijoshi20 requested a review from a team as a code owner July 30, 2026 07:39
@crw

crw commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Hi, thanks for the submission. As this bypassed the normally required process as outlined in https://github.com/hashicorp/terraform/blob/main/.github/CONTRIBUTING.md, particularly Proposing a change and potentially AI Usage, I am going to close this pull request. I'd suggest first, in the issue, establishing if the maintainers are open to reviewing a change in this area and then following the guidelines in Contributing.md. Thanks again!

@crw crw closed this Jul 30, 2026
@crw crw added the bug label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSH communicator leaks private key material in error messages

2 participants