Skip to content

fix(gateway): prevent leaking username in logs - #6012

Merged
SDAChess merged 2 commits into
mainfrom
alert-autofix-166
Nov 26, 2026
Merged

SDAChess merged 2 commits into
mainfrom
alert-autofix-166

Conversation

@SDAChess

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/ai-openshell/openshell/security/code-scanning/166

Do not write the token-derived username to standard error. Keep the existing token storage and login-prompt cleanup, and print the same generic authentication confirmation used by the other login path.

In crates/openshell-cli/src/commands/gateway.rs, replace the username extraction and conditional success message in gateway_login with a single success message after token storage. No imports, new methods, or dependencies are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 26, 2026
@SDAChess
SDAChess marked this pull request as ready for review November 26, 2026 15:34
@SDAChess SDAChess changed the title Potential fix for code scanning alert no. 166: Cleartext logging of sensitive information fix(gateway): prevent leaking username in logs Nov 26, 2026
alangou
alangou previously approved these changes Nov 26, 2026
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
@SDAChess
SDAChess enabled auto-merge November 26, 2026 15:54
@SDAChess
SDAChess added this pull request to the merge queue Nov 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026
@SDAChess
SDAChess added this pull request to the merge queue Nov 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026
@SDAChess
SDAChess added this pull request to the merge queue Nov 26, 2026
@SDAChess
SDAChess removed this pull request from the merge queue due to a manual request Nov 26, 2026
@SDAChess
SDAChess merged commit a86f6e8 into main Nov 26, 2026
117 of 119 checks passed
@SDAChess
SDAChess deleted the alert-autofix-166 branch November 26, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:accepted A maintainer decided OpenShell should pursue this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants