fix(review): bound scroll GIF page operations - #3771
Merged
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3771 +/- ##
=======================================
Coverage 93.32% 93.32%
=======================================
Files 317 317
Lines 32397 32406 +9
Branches 11878 11878
=======================================
+ Hits 30235 30244 +9
Misses 1530 1530
Partials 632 632
🚀 New features to boost your workflow:
|
12 tasks
3 tasks
JSONbored
force-pushed
the
codex/fix-vulnerability-in-scroll-gif-capture
branch
from
July 6, 2026 09:50
d4f02ee to
50fdc37
Compare
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.
Motivation
window.scrollTo/setTimeout/Promisein the page realm and stall review workers.Description
SCROLL_EVALUATE_TIMEOUT_MSand a helperwithScrollOperationTimeoutto bound awaited page-realmevaluatecalls.page.evaluatecall that readsdocument.documentElement.scrollHeightand thepage.evaluatecall that invokeswindow.scrollTowith the timeout helper insrc/review/visual/shot.ts.waitForScrollSettle()so the settle delay is enforced by the worker runtime rather than a page-controlledsetTimeout.test/unit/visual-shot-scroll-timeout.test.tsthat verifies the normal capture path and asserts a never-settling page-realmevaluateis bounded and the browser is closed cleanly.Testing
npm test -- test/unit/visual-shot-scroll-timeout.test.tsand the two tests in that file passed.npx vitest run test/unit/visual-shot-scroll-timeout.test.ts --coverage --reporter=verbosewhich passed the scoped tests but the run failed the repo-wide coverage threshold because it was scoped to a single test file.npm run typecheck(tsc --noEmit) and it succeeded.npm run test:coveragewhich exercised many tests but failed the repository global coverage thresholds and encountered unrelated long-running/timeouts in existing test suites (these failures are not caused by this scoped change).npm audit --audit-level=moderatebut the environment registry audit returned403 Forbidden, so the audit check could not complete.Codex Task