fix(security): avoid disclosing raw error details in ai-content-generator RewriteGenerator [ACT-3523]#11054
Closed
Tyler (tylerwashington888) wants to merge 3 commits into
Closed
fix(security): avoid disclosing raw error details in ai-content-generator RewriteGenerator [ACT-3523]#11054Tyler (tylerwashington888) wants to merge 3 commits into
Tyler (tylerwashington888) wants to merge 3 commits into
Conversation
Replace raw `console.error(error)` with a sanitized message to prevent disclosure of internal error details and stack traces (CWE-209, WS-I002-JAVASCRIPT-00027). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace `console.error(error)` with a sanitized message in the CommonGenerator catch block to prevent raw error objects and stack traces from being surfaced in browser consoles. Addresses Wiz SAST finding WS-I002-JAVASCRIPT-00027 (CWE-209, CRITICAL). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ewriteGenerator [ACT-3523]
Contributor
Author
|
Superseded by consolidated PR #11057. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR was opened by the Codex agent on behalf of Tyler Washington.
Summary
Remediates a CRITICAL Wiz SAST finding (CWE-209) in the
ai-content-generatorapp. A raw error object was passed directly toconsole.error(), which can disclose internal error details and stack traces.References
Confidence Score
96 / 100 (HIGH)
Wiz Remediation Guidance
Change
File:
apps/ai-content-generator/src/components/app/dialog/rewrite-generator/RewriteGenerator.tsxLine changed: 91
Before:
After:
The raw
errorobject (which may contain stack traces, internal paths, or sensitive runtime details) is no longer forwarded to the console. Only a fixed, non-disclosing string is logged.Validity Assessment
VALID — The flagged pattern (
console.error(error)) was confirmed at line 91 in the catch block spanning lines 90–92. The file has not drifted from the Wiz scan (confidence 8/10 on drift). No other lines were touched.Test Plan
ai-content-generatorapp builds cleanly:npm run buildinapps/ai-content-generatorcatchblock still executes; only the log message is sanitized)console.error(error)calls exist in this file that would be missed