Skip to content

test: add invalid UTF-8 input test for extract-review-json.py #446

Open

Description

@sonupreetam

Context

From PR #425 review (Finding 19).

extract-review-json.py changed to use encoding="utf-8", errors="replace" for reading input, but no test exercises the replacement-character decoding path with invalid UTF-8 input.

What

Add a test that writes invalid UTF-8 bytes around a valid review JSON object and asserts the extractor recovers the JSON or exits cleanly (no traceback).

Files

  • council-review-action/test/test-pipeline.sh
  • council-review-action/scripts/extract-review-json.py

Source: #425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions