Repository navigation
fix(screenshot): validate complete PNG IHDR - #6412
Merged
Merged
Conversation
18 of 22 tasks
eco-null
marked this pull request as ready for review
October 22, 2026 22:42
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
[Medium impact] This PR appears safe to merge; no actionable defects were found. Summary
Reviews (1) · Last reviewed commit: "fix(screenshot): validate complete PNG I..." · Reviewed by Greptile |
3 of 7 tasks
3 tasks done
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
Reject incomplete or corrupt PNG IHDR before accepting screenshot dimensions. Fixes #3928. Split from #4040.
Problem and expected behavior
A 24/32-byte header or bad IHDR checksum could be accepted as a screenshot. The shared PNG owner now requires the complete 33-byte IHDR and validates its CRC; both native UI and browser screenshots consume it.
Change and scope
One independent fix on current main; no dependency on #4040. No new target execution or authority.
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): No build outputs committed; catalogs regenerated by normal checks.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
For evidence-bearing changes:
Validation performed
npm run test:focused -- src/domain/pngHeader.test.ts src/native/NativeUiObservation.test.ts tests/boundary/browser/cdpScreenshotDocumentIdentity.test.ts tests/boundary/mcp/browserMcp.test.ts- 99 passed (27.25 s). Fullnpm run check, normal commit and pre-push passed. Windows, pinned Node 24.18.0/npm 11.16.0; no hosted CI claim.Compatibility, safety, and release
Author readiness
Human owner: @eco-null
Before merge
type(scope): outcome.