Skip to content

Harden subscription fetching, API limits, and production deployment - #1

Merged
ssharkkky merged 4 commits into
mainfrom
agent/fix-subscription-ssrf
Aug 27, 2026
Merged

Harden subscription fetching, API limits, and production deployment#1
ssharkkky merged 4 commits into
mainfrom
agent/fix-subscription-ssrf

Conversation

@ssharkkky

@ssharkkky ssharkkky commented Jul 19, 2026

Copy link
Copy Markdown
Owner

What changed

  • harden subscription fetching against IPv4-mapped/private addresses, redirect bypasses, DNS rebinding, proxy inheritance, and oversized upstream responses
  • bound merge requests to 8 subscription URLs, 2 MiB request bodies, 1 MiB raw input, and 5000 total nodes
  • validate request field types, profiles, and limits while preserving security HTTP errors
  • add a fully pinned Python 3.12 dependency lock, GitHub Actions tests, deployment documentation, a hardened systemd unit, and an atomic commit-SHA release script with health-check rollback

Why

The public API previously had exploitable SSRF paths, unbounded request fan-out, and a production deployment that depended on a dirty worktree and global Python packages. These changes close the network boundary and make releases testable and reproducible.

Validation

  • python -m pip check
  • python -m unittest discover -s tests -v — 23/23 passed locally and in a clean production venv
  • bash -n deploy/deploy-release.sh
  • git diff --check
  • GitHub Actions unit-tests passed on head 33d60a4
  • production immutable release 33d60a44db7a8b2d99c66866606e952fa0ca4901 is active
  • production home/templates/raw merge return 200
  • loopback SSRF and invalid limits return 400
  • Nginx enforces 2 MiB bodies, 30 requests/minute, burst 20, and 8 concurrent connections; 413/429 paths verified

@ssharkkky ssharkkky changed the title fix: harden subscription fetching against SSRF Harden subscription fetching, API limits, and production deployment Jul 20, 2026
@ssharkkky
ssharkkky marked this pull request as ready for review July 20, 2026 04:22
@ssharkkky
ssharkkky merged commit d0ba209 into main Aug 27, 2026
1 check 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.

1 participant