security: eliminate critical unsafe JSON quoting alerts - #4186
Open
EndlessSeeker wants to merge 2 commits into
Open
security: eliminate critical unsafe JSON quoting alerts#4186EndlessSeeker wants to merge 2 commits into
EndlessSeeker wants to merge 2 commits into
Conversation
EndlessSeeker
requested review from
CH3CHO,
erasernoob,
johnlanni and
rinfx
as code owners
July 23, 2026 12:27
Change-Id: I88e068f2438900c476a41b071df0e2ce387d8779 Signed-off-by: EndlessSeeker <1766508902@qq.com>
EndlessSeeker
force-pushed
the
codex/openssf-critical-codeql
branch
from
July 23, 2026 12:28
1c59162 to
2aaaab7
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4186 +/- ##
=======================================
Coverage ? 53.53%
=======================================
Files ? 103
Lines ? 16174
Branches ? 0
=======================================
Hits ? 8659
Misses ? 6909
Partials ? 606
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Change-Id: I4af702c102cfc07b252ca66940c90c44c7c0d50b Signed-off-by: EndlessSeeker <1766508902@qq.com>
This was referenced Jul 23, 2026
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.
Summary
Security impact
This change addresses all five currently open Critical go/unsafe-quoting CodeQL findings. Four findings are fixed by removing string interpolation from OpenAI-compatible JSON responses. The fifth was in an unreachable duplicate package that had never been buildable because its required types were absent; the executable imports the maintained standalone package instead.
No alert is dismissed or marked as accepted risk. After merge and a default-branch CodeQL scan, the expected Critical count is zero.
Validation
The AI Security Guard suite includes a new regression test proving that quotes, backslashes, newlines, and JSON-shaped attacker input remain string data and cannot add fields to the response.