Skip to content

NEW @W-21910054@ Message sanitization - #368

Open
nikhil-mittal-165 wants to merge 1 commit into
devfrom
message-sanitize
Open

NEW @W-21910054@ Message sanitization#368
nikhil-mittal-165 wants to merge 1 commit into
devfrom
message-sanitize

Conversation

@nikhil-mittal-165

Copy link
Copy Markdown
Contributor

No description provided.

@git2gus

git2gus Bot commented Aug 14, 2026

Copy link
Copy Markdown

Git2Gus App is installed but the .git2gus/config.json doesn't have right values. You should add the required configuration.

@aruntyagiTutu aruntyagiTutu left a comment

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.

Nice fix — the core problem this solves is real: apiUnavailable/noOrgConnection previously interpolated raw exception/remediation text directly into a user-facing notification (apexGuruSkipped.apiUnavailable(message)). Since that text can originate from the backend/exception rather than a fixed set of known strings, displaying it verbatim in the UI is exactly the kind of thing "sanitization" should prevent. Replacing it with static, canned copy and routing the raw detail to logger.log() instead (visible via "Details" → log output) is the right shape. The new INVALID_SESSION/SCAN_TIMEOUT handlers correctly wire up the corresponding codes that code-analyzer-apexguru-engine's engine.ts (isInvalidSessionError/isScanTimeoutError) already emits, and the once-per-session suppression for INVALID_SESSION mirrors the existing NO_ORG_CONNECTION pattern appropriately (persistent condition) while SCAN_TIMEOUT correctly always shows (transient, matches API_UNAVAILABLE's behavior). Tests are thorough — cover the new banners, the once-vs-always suppression semantics, and the button callbacks.

One thing I'd like called out explicitly since the PR description is empty: this diff also silently removes the "Default target-org set to '{orgAlias}'. Re-run the scan to use ApexGuru." confirmation banner (orgSetSuccess) after a user picks an org from the QuickPick — that path now only logs internally, with zero user-facing feedback on success. Unlike the other changes here, orgAlias isn't attacker/backend-controlled text, so this doesn't look like it's motivated by the sanitization goal — it reads more like an unrelated UX regression that got swept in. Was dropping that toast intentional? If so, worth a line in the PR description; if not, it should probably be restored.

Minor/non-blocking: finishedScan's casing changed from "Scan complete" to "Scan Complete" — inconsistent with the sentence-case style used elsewhere in this same file (e.g. "ApexGuru analysis was skipped...").

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.

2 participants