Skip to content

Remove logging of potentially sensitive information#155

Merged
Rifdhan merged 1 commit into
mainfrom
remove-sensitive-logging
May 20, 2026
Merged

Remove logging of potentially sensitive information#155
Rifdhan merged 1 commit into
mainfrom
remove-sensitive-logging

Conversation

@Rifdhan
Copy link
Copy Markdown
Collaborator

@Rifdhan Rifdhan commented May 19, 2026

  • Update tests
  • Remove some additional dead code

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request focuses on sanitizing logs and telemetry by removing potentially sensitive data and unnecessary debug statements across several files, including handlers.ts, streaming-utils.ts, and thoughtspot-service.ts. It also refactors TestMCPServer in the test suite to remove an unused storage parameter. Feedback from the reviewer highlights a potential runtime error when accessing properties on potentially null objects and suggests preserving minimal debugging context, such as error codes, in logs and spans to maintain observability without compromising security.

Comment thread src/streaming-utils.ts
Comment thread src/streaming-utils.ts Outdated
Comment thread src/streaming-utils.ts Outdated
- Update tests
- Remove some additional dead code
@Rifdhan Rifdhan force-pushed the remove-sensitive-logging branch from 4a30116 to dac5dd0 Compare May 19, 2026 19:18
@mouryabalabhadra
Copy link
Copy Markdown
Collaborator

@copilot Please review PR

Copy link
Copy Markdown

Copilot AI commented May 19, 2026

@copilot Please review PR

Reviewed the PR changes in dac5dd0: I re-ran lint and the full test suite locally (npm run lint, npm test) and everything is passing. I don’t see any additional changes needed for this PR.

"generation_number: ",
generation_number,
"instanceUrl: ",
(this.client as any).instanceUrl,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only PII I see here is instanceUrl, which we can replace with tenantId

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this log is not useful anyway, we don't need to debug anything with this flow and it is also in the old V1 tool so I feel we can just remove it

Comment thread static/oauth-callback.js
throw new Error(`Failed to store token (Status: ${storeResponse.status}): ${errorText}`);
}

console.log('Redirecting to:', responseData.redirectTo);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add tenantId here? Redirecting to tenantId

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is logged in the end user's browser while going through OAuth, I don't think we have any need to log it at all

@Rifdhan Rifdhan merged commit 33aa032 into main May 20, 2026
5 checks passed
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.

4 participants