Repository navigation
fix(evals): escape backslashes in --live prompt quoting - #68
Merged
devin-ai-integration[bot] merged 3 commits intoNov 23, 2026
Merged
Conversation
…complete-sanitization) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
There was a problem hiding this comment.
Devin autoapproved this pull request: Small eval-command quoting fix preserves existing prompts and adds shell round-trip tests.
Warning: CI status and off-thread reviewer findings are unavailable, so green-CI and reviewer-flag instructions were not applied.
…evals Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Devin Review found 2 findings. Devin automatically fixed all 2 findings.
Fixed by Devin (2)
- Silent skip through symlinked entry points — Entry-point check now compares realpathSync of argv[1] and the module path; verified
node /tmp/symlink.mjs --liveruns. - Unstated shell requirement for live prompts — Pre-existing (old " escaping was POSIX-only too); evals/README.md now states the printed commands use POSIX shell quoting for bash/zsh, not PowerShell.
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.
What changes
Fixes CodeQL alert js/incomplete-sanitization #1 in
scripts/run-evals.mjs.run-evals.mjs --liveprints aclaude -p "<prompt>"command per eval case. The prompt was quoted with.replace(/"/g, '\\"'), which left backslashes alone: a prompt containing\"or ending in\broke out of the double-quoted argument, and$/backticks would expand if the line were pasted into a shell.shellDoubleQuote(value)escapes\,",$and`for a POSIX double-quoted argument;runLiveuses it.main()now runs only when the script is executed directly, so the helper can be imported by tests. Every existing caller spawns the script, so behavior is unchanged.tests/run-evals-live.test.mjsround-trips values throughsh -c 'printf %s "..."', including the unsanitized casea\"; echo injected; "and a trailing backslash.Current
--liveoutput is byte-identical for today's prompts (none contain those characters).Evidence
docker compose run --build --rm verify,gateanddrillpass (verify: ALL GREEN, 16 steps; gate: RELEASE ALLOWED; drill: 2/2 deliberate regressions blocked). With the new test against the oldrun-evals.mjs, verify'steststep fails.Boundary impact
none
Implemented in session Fix heatlot incomplete sanitization CodeQL alert
Review with Devin · Open in Devin Desktop
Code scanning on this PR
CodeQL analysis of
refs/pull/68/merge(head 5984d34): 0 results (main currently has 1, alert #1js/incomplete-sanitizationatscripts/run-evals.mjs:267). No open alerts on the PR ref.Test output (in the dev image)
Review follow-ups: the entry-point check resolves symlinks (91d9f54), and
evals/README.mdsays the--livecommands are POSIX shell syntax (5984d34).