Skip to content

ci: refuse any tracked image that carries GPS - #1

Merged
daniel-frenkel merged 1 commit into
mainfrom
image-gps-check
Nov 14, 2026
Merged

daniel-frenkel merged 1 commit into
mainfrom
image-gps-check

Conversation

@daniel-frenkel

Copy link
Copy Markdown
Member

The owner asked for "a CI check that refuses any image with GPS in it" in our public repos. This adds it here, the same check Ropener and MiniSpeedCam carry.

What it is

  • scripts/check_image_gps.py reads every tracked file and refuses an image that carries a GPS position:
    • EXIF GPS;
    • an XMP location tag that holds a value;
    • exif-unread: a HEIF whose Exif can't be followed;
    • container: an archive it can't read in full.
      An image is known by its magic bytes (JPEG, PNG, WebP, TIFF, HEIF/AVIF), whatever its name, and zip/3mf/tar members are judged the same way.
  • There is no allowlist. An image with GPS is fixed by stripping the GPS.
  • The parsing is copied verbatim from valar-scopes' check_binary_strings.py (check_binary_strings: know an image by its magic; read TIFF and HEIF EXIF; a HEIF it cannot follow fails valar-scopes#716 and #717): 17 names, equal by ast.
  • Selftest: 24 synthetic rows. Sabotage: 11 plants, each reddening exactly its rows.
  • .github/workflows/image-gps.yml runs all three on PRs and on pushes to main.

This repo: 43 tracked files read, 0 findings.

On merge: only this new workflow runs. GitHub Pages here is a legacy build from main:/docs, so it serves docs/ only: scripts/ and .github/ are never served on the site. A merge may re-run that Pages build, with docs/ unchanged.

🤖 Generated with Claude Code

…om valar-scopes #716/#717)

The owner (2026-11-14): "add a CI check that refuses any image with GPS in it", for our public repos.

- scripts/check_image_gps.py: every tracked file; refuses EXIF GPS, an XMP location tag that holds a value, a HEIF
  whose Exif cannot be followed, and an archive it cannot read in full. Images by magic bytes, whatever the name;
  zip/3mf/tar members judged the same way. No allowlist. Parsing copied verbatim from valar-scopes'
  check_binary_strings.py (17 names, equal by ast). Selftest 24 rows; 11 sabotages, each reddening exactly its rows.
- .github/workflows/image-gps.yml runs them on PRs and on pushes to main.

On this tree: 43 tracked files read, 0 findings. Pages (legacy, main:/docs) serves docs/ only; scripts/ and .github/ are never served.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@daniel-frenkel
daniel-frenkel merged commit b63dbc9 into main Nov 14, 2026
1 check passed
@daniel-frenkel
daniel-frenkel deleted the image-gps-check branch November 14, 2026 06:16
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.

1 participant