Skip to content

fix(evidence): require decodable PNG screenshots - #290

Open
glanikali wants to merge 2 commits into
danielgwilson:mainfrom
glanikali:fix/210-decode-screenshot-evidence
Open

fix(evidence): require decodable PNG screenshots#290
glanikali wants to merge 2 commits into
danielgwilson:mainfrom
glanikali:fix/210-decode-screenshot-evidence

Conversation

@glanikali

Copy link
Copy Markdown

Summary

  • require screenshot evidence to be a fully decodable PNG instead of trusting file signatures alone
  • reject truncated, oversized, zero-dimension, and unsupported image payloads
  • share PNG signature and dimension parsing between evidence validation and redaction
  • consolidate synthetic PNG fixtures across screenshot-related tests

Why

Signature-only validation allowed malformed or truncated PNG files to pass run verification as screenshot evidence. Because proof artifacts are part of the run-bundle contract, verification should fail closed unless the image can actually be decoded.

The new pre-decode byte and pixel limits also bound decoder input before allocation.

Verification

  • corepack pnpm release:check
    • 1,073 tests passed
    • 10 tests skipped
    • typecheck passed
    • build passed
    • public-surface scan passed
    • skill validation passed
    • package dry-run passed
  • git diff --check upstream/main...HEAD

Fixes #210

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.

Validate screenshot evidence by decoding image bytes, not only file signatures

1 participant