Cybersecurity-Projects/PROJECTS/beginner/canary-token-generator/backend/internal
CarterPerez-dev 2c033c58f2 fix(canary): webhook sender blocks SSRF to private/loopback/IMDS hosts
Audit F3: validateURL checked scheme/host/userinfo but never resolved the
host, so an operator-supplied webhook_url could point at the canary's own
Redis (redis:6379), Postgres, link-local IMDS (169.254.169.254), or any
RFC1918 host on the docker network or VPS subnet — a classic confused-deputy
SSRF triggered by self-triggering a token after creation.

validateURL now resolves the hostname (or parses a literal IP) and rejects
loopback, RFC1918, CGNAT, link-local, multicast, unspecified, IMDS, and
IPv6 unique-local. The default HTTP client also installs a DialContext that
re-checks the dialed IP for defense-in-depth against DNS rebinding. The
Config gains an AllowPrivateHosts flag (default false) that test code opts
into when targeting httptest.NewServer.
2026-05-17 19:08:01 -04:00
..
admin fix(canary-phase12): address audit findings before phase rollup 2026-05-14 07:02:39 -04:00
config fix(canary): dev nginx routes /c/, /k/, /api/ to canary + manage_url defaults to base_url 2026-05-17 18:12:09 -04:00
core fix(canary): replace //nolint pragmas with explicit error handling 2026-05-13 13:28:44 -04:00
event feat(canary): Event.AttachGeoIP + event.Service geo enrichment 2026-05-17 05:24:17 -04:00
geoip fix(canary-phase13): direct unit coverage for firstSubdivisionName 2026-05-17 05:30:13 -04:00
health fix(canary): replace //nolint pragmas with explicit error handling 2026-05-13 13:28:44 -04:00
middleware fix(canary): CSP allows challenges.cloudflare.com for Turnstile 2026-05-17 19:07:41 -04:00
notify fix(canary): webhook sender blocks SSRF to private/loopback/IMDS hosts 2026-05-17 19:08:01 -04:00
server fix(canary-phase1): clear all post-phase-1 audit observations + header normalization 2026-05-10 06:15:26 -04:00
testutil fix(canary): clear pre-audit lint debt + migrate golangci config to v2 2026-05-12 02:49:56 -04:00
token fix(canary): PDF trigger URL uses ?p= query pad; handler trims trailing _ 2026-05-17 19:07:50 -04:00
turnstile feat(canary): turnstile verifier + middleware 2026-05-13 15:08:37 -04:00