timmy-talking-turd/scripts
timmy ccb227921e
Some checks failed
Quality gates / quality (pull_request) Failing after 1m38s
feat: harden image ingress with magic-byte validation, safe re-encode, limits, and rate control
- src/image-ingress.js: sniff magic bytes independent of declared MIME,
  reject polyglots (embedded ZIP/script payloads), enforce 4 MB body cap
  and 4096 px dimension cap before decode, re-encode via fixed-argv
  Pillow subprocess with 15s timeout, strip EXIF/GPS/XMP/tEXt metadata,
  fail closed with sanitized short errors and manual fallback.
- scripts/reencode_image.py: defensive decoder; decompression-bomb
  guarded; prints one JSON verdict line, never image bytes.
- src/rate-limiter.js + server.mjs /api/analyze: bounded fixed-window
  per-client limiter, 429 with retry-after, no payload retention.
- tests/image-ingress.test.js: hostile synthetic fixtures only
  (spoofed MIME, GIF/ZIP polyglots, truncated/garbage/empty images,
  12000x12000 bomb, 6000x6000 oversized, EXIF+GPS, SVG-with-script);
  asserts provider is never reached on rejection and error messages
  contain no bytes/base64/stacks.

Closes #16
2026-08-22 21:43:36 +00:00
..
bootstrap_selfhost_smolvlm.sh feat: package pinned self-host vision bootstrap 2026-08-21 08:15:32 +00:00
build_release.py feat: add hardened atomic staging deployment 2026-08-21 14:49:28 +00:00
check_diff.sh ci: enforce reproducible quality gates 2026-08-19 08:09:38 +00:00
deploy_staging.py feat: add hardened atomic staging deployment 2026-08-21 14:49:28 +00:00
gen_ingress_fixtures.py feat: harden image ingress with magic-byte validation, safe re-encode, limits, and rate control 2026-08-22 21:43:36 +00:00
ingest_training_photo.py feat: ship photo-first Timmy prototype and sovereign vision spike 2026-08-19 01:54:29 +00:00
record_release_demo.mjs feat: package pinned self-host vision bootstrap 2026-08-21 08:15:32 +00:00
reencode_image.py feat: harden image ingress with magic-byte validation, safe re-encode, limits, and rate control 2026-08-22 21:43:36 +00:00
run_selfhost_smolvlm.sh feat: ship photo-first Timmy prototype and sovereign vision spike 2026-08-19 01:54:29 +00:00