Skip to content

Potential fix for code scanning alert no. 5: Use of externally-controlled format string#3

Merged
marceloceccon merged 1 commit into
mainfrom
alert-autofix-5
Jun 18, 2026
Merged

Potential fix for code scanning alert no. 5: Use of externally-controlled format string#3
marceloceccon merged 1 commit into
mainfrom
alert-autofix-5

Conversation

@marceloceccon

Copy link
Copy Markdown
Member

Potential fix for https://github.com/entropyvortex/roundtable/security/code-scanning/5

Use a static format string as the first argument to console.error, and pass untrusted/dynamic values as additional arguments.
This preserves behavior while preventing % sequences in providerName/modelId from being interpreted as format directives.

Best single fix in lib/consensus-engine.ts (the runJudge catch block around current lines 431–434):

  • Replace:
    • console.error(`[RoundTable] Judge error from ${resolved.providerName}/${resolved.modelId}:`, err);
  • With:
    • console.error("[RoundTable] Judge error from %s/%s:", resolved.providerName, resolved.modelId, err);

No functional logic changes, no new methods, no dependency additions.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…lled format string

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@marceloceccon marceloceccon marked this pull request as ready for review June 18, 2026 19:28
@marceloceccon marceloceccon merged commit 932c5f9 into main Jun 18, 2026
7 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.

1 participant