Skip to content

fix(ai-gateway): avoid tainted BYOK log format#3840

Merged
RSO merged 1 commit into
mainfrom
fix/codeql-408-byok-format
Jun 9, 2026
Merged

fix(ai-gateway): avoid tainted BYOK log format#3840
RSO merged 1 commit into
mainfrom
fix/codeql-408-byok-format

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the BYOK provider debug log's user-controlled template literal format string with a constant format string.
  • Preserves the existing logged model id and provider list while preventing modelId from being interpreted as a console format string.

Verification

N/A - no manual verification needed for this logging-only security fix.

Visual Changes

N/A

Reviewer Notes

  • Resolves CodeQL alert 408 (js/tainted-format-string) in apps/web/src/lib/ai-gateway/byok/index.ts.

@kilo-code-bot kilo-code-bot Bot requested a review from RSO June 9, 2026 09:33
@kilo-code-bot

kilo-code-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

One-line security fix correctly replaces a tainted template-literal format string with a constant format string plus %s substitution, eliminating the CodeQL js/tainted-format-string finding with no behavioural change.

Files Reviewed (1 file)
  • apps/web/src/lib/ai-gateway/byok/index.ts

Reviewed by claude-sonnet-4.6 · 169,086 tokens

Review guidance: REVIEW.md from base branch main

@RSO RSO merged commit d233f6c into main Jun 9, 2026
16 checks passed
@RSO RSO deleted the fix/codeql-408-byok-format branch June 9, 2026 12:12
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