Files
StarPunk/docs/design/v2.11.0/2026-11-03-maintenance-release.md
T
PhilandClaude Opus 5.5 75946be7b2 maint: Dependency upgrades and High backlog items (v2.11.0)
- All dependencies to current releases (97 known vulnerabilities -> 0),
  Python 3.14, uv pinned, requirements-test.txt, lxml/dateutil pinned
- CSRF tokens on admin forms, logout and IndieAuth consent
- IndieAuth client and crosspost link-card fetches via safe_get
- FLASK_DEBUG/FLASK_ENV default off/production; image sets them
- Foreign keys enforced on pooled connections; migration 018 removes orphans
- Rate limits shared across processes (rate_limits, migration 019)
- datetime.utcnow() and sqlite3 default adapters replaced
- compose.yaml fixed; duplicate dev_auth.py and test.ini removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 13:09:52 -07:00

3.0 KiB

v2.11.0: Maintenance release

Dependency upgrades and the five High items in the backlog (all re-checked against the code first and still present).

Dependencies

pip-audit on the v2.10.2 set found 97 published vulnerabilities in eight packages (Pillow 64, PyJWT 22, gunicorn 4, Flask 2, Markdown 2, python-dotenv 2, pytest 2, pillow-heif 1). All direct dependencies were moved to their current minor series (requirements.txt); the new set has no known vulnerabilities. Python moved from 3.11 to 3.14 (python:3.14-slim); the whole suite passes with -W error::DeprecationWarning.

  • requirements-test.txt (pytest, pytest-mock) is installed by the Containerfile test stage; pytest left the runtime requirements.
  • lxml and python-dateutil are pinned (used directly, previously only transitive). uv is pinned to 0.9.28 in the Containerfile.
  • datetime.utcnow() (34 calls in starpunk/, more in tests) became datetime.now(timezone.utc).replace(tzinfo=None): same naive-UTC values. sqlite3's default datetime adapters, deprecated in 3.12, are registered explicitly in starpunk/database/__init__.py with the same output.

High backlog items

  1. Foreign keys. PRAGMA foreign_keys=ON on every pooled connection (database/pool.py); all deletes of notes, media and WebSub subscriptions go through the pool. Every foreign key is CASCADE or SET NULL, so no delete can be blocked. Migration 018 removes orphans (production: three note_tags rows from hard-deleted notes). Crosspost rows still have no foreign key on purpose.
  2. CSRF. starpunk/csrf.py: token = HMAC-SHA256(SECRET_KEY, "csrf:" + starpunk_session cookie); before_request checks the csrf_token field or X-CSRF-Token header on every admin POST, auth.logout and indieauth.approve; 400 otherwise. All 12 POST forms carry it. CSRF_ENABLED (default true); test apps turn it off unless they set it.
  3. Fetchers. indieauth.fetch_client_redirect_uris and syndication._fetch_public use webmention_ssrf.safe_get (per-hop checks, DNS pinning, hard deadline). safe_get gained truncate for reads that stop at the size limit.
  4. Debug default. FLASK_DEBUG defaults to 0 and FLASK_ENV to production; the runtime image sets both.
  5. Shared rate limits. SharedRateLimiter keeps sliding-window counters in rate_limits (migration 019): current window plus the previous one weighted by overlap. Used by /webmention (per IP and per source domain) and /websub; old windows are pruned every 200 calls.

Housekeeping

compose.yaml no longer pins 0.6.0 or sets VERSION/ENVIRONMENT; the unused root dev_auth.py and the committed test.ini were removed.

Tests

New: tests/test_csrf.py, tests/test_foreign_keys.py, tests/test_shared_rate_limit.py, IndieAuth client-metadata tests through the fetcher (including a redirect to a private address). Crosspost tests route link-card fetches through the fetcher's transport. Full suite: 1264 passed on Python 3.14.