Skip to content

Reject palette PNGs without PLTE and invisible URL characters; run tests in CI - #23

Merged
reason-machines[bot] merged 7 commits into
mainfrom
reason/reason-plugins-directory-8b70d7da
Nov 12, 2026
Merged

reason-machines[bot] merged 7 commits into
mainfrom
reason/reason-plugins-directory-8b70d7da

Conversation

@reason-machines

@reason-machines reason-machines Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #22 (merged as fecf24a) for the three non-blocking notes from the cross-provider review. No other scope: the manifest, logos, docs and saved review cases are unchanged, and review.test_cases is still omitted. No portal actions.

The branch carries #22's pre-squash commits through a merge commit, because the branch name is reused. Their tree is identical to fecf24a, so they add no file changes; the diff against main is only the three files below.

What changed

  1. Palette PNGs must carry PLTE (check_png_stream): a colour-type-3 PNG without a PLTE chunk, or with PLTE after IDAT, is now rejected. Pillow loads such files, so this needs its own check.
  2. Listing URLs (check_listing): rejects any character in Unicode categories C* (control, and format, which covers zero-width space/joiner, BOM, word joiner and soft hyphen) or Z* (separators), plus port :0.
  3. CI workflow (.github/workflows/test.yml): on pull requests and pushes to main, installs scripts/requirements.txt and the Codex CLI, runs python -m unittest discover -s tests -v and builds the ChatGPT ZIP. Before this PR, the only checks were CodeQL.

Checks

  • Regressions fail first on fecf24a: with only the test changes applied, python3 -m unittest tests.test_chatgpt_package gave 16 tests, 2 failures: test_build_refuses_bad_listing_metadata (SystemExit not raised : https://reasonmachines.com:0) and test_build_refuses_palette_png_without_plte. A probe also showed fecf24a accepting URLs with U+200B, U+200D, U+FEFF, U+2060 and U+00AD.
  • After the fix: PATH=~/.local/bin:$PATH python3 -m unittest discover -s tests gave 30 tests, OK (Python 3.11.2, Pillow 13, codex-cli 0.167.2).
  • ZIP unchanged: python3 scripts/build_chatgpt_zip.py produced the same 7 files, sha256 c92c6ef2…7dae3d, byte-identical to the Directory submission package, hexagon logo and 1.3.0 listing update #22 build.
  • The new workflow's first run on this PR is its own proof.

Exact-head independent review and final CI

  • GPT-6.1 Sol (OpenAI), APPROVE on 16b1479f: no blocking findings in the three-item scope. Reviewer independently reproduced both regressions failing on fecf24a and passing on this head; exercised every added malformed URL case across all four URL fields and valid palette PNGs.
  • Reviewer ran python3 -m unittest discover -s tests in a fresh virtual environment: 30 tests PASS. python3 scripts/build_chatgpt_zip.py /tmp/reason-pr23-head-venv.zip: PASS, seven files, byte-identical to the base ZIP. Confirmed source and packaged manifests omit review.test_cases, and only the three scoped files differ.
  • All four GitHub checks PASS on 16b1479f: test, CodeQL, Analyze (python), Analyze (actions). Test workflow run confirms all 30 tests and the ZIP build pass on the standard PR merge ref.
  • No visible UI change, so no new screenshot is applicable. No portal actions, release publication, or directory submission performed.

reason-machines Bot and others added 7 commits November 12, 2026 03:31
…atGPT ZIP check

Co-authored-by: qa-runner2-star <319404260+qa-runner2-star@users.noreply.github.com>
Co-authored-by: qa-runner2-star <319404260+qa-runner2-star@users.noreply.github.com>
Co-authored-by: qa-runner2-star <319404260+qa-runner2-star@users.noreply.github.com>
Address independent review of #22: reject credential-bearing, non-https,
hostless or over-long listing URLs and empty listing text; fully parse icon
PNGs (CRCs, IEND, complete image data, 48-4096 px); refuse symlinks in the
package. Narrow the checkout audit claim to the name-only check, and
distinguish Claude Team (Owner only) from Enterprise (Owner or custom role).

Co-authored-by: qa-runner2-star <319404260+qa-runner2-star@users.noreply.github.com>
Reject incomplete or extra raster data, malformed PNG structure, invalid URL ports and whitespace, unpackaged icon paths and invalid review objects. Keep review cases omitted and clarify that historical case recovery is not required for a preserving update.

Co-authored-by: qa-runner2-star <319404260+qa-runner2-star@users.noreply.github.com>
Exit with one actionable line instead of a traceback, cover the missing dependency in an isolated subprocess, and document requirements installation from a fresh virtual environment.

Co-authored-by: qa-runner2-star <319404260+qa-runner2-star@users.noreply.github.com>
…8b70d7da' into reason/reason-plugins-directory-8b70d7da

Co-authored-by: qa-runner2-star <319404260+qa-runner2-star@users.noreply.github.com>

# Conflicts:
#	scripts/build_chatgpt_zip.py
#	tests/test_chatgpt_package.py

Co-authored-by: qa-runner2-star <319404260+qa-runner2-star@users.noreply.github.com>
@reason-machines
reason-machines Bot merged commit f958974 into main Nov 12, 2026
4 checks passed
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.

0 participants