fix: address consolidated multi-agent audit findings #160
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
javascript
question
severity: high
severity: low
severity: medium
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
isyuricunha/website!160
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/audit-round-consolidated"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Consolidated fixes from a three-agent parallel audit (frontend/i18n/SEO, server/security, infra/production) cross-reviewed by the orchestrator: 17 confirmed findings fixed, each with a pre-fix reproduction and a post-fix regression test or probe.
Findings and fixes
Frontend / SEO
en;build_absolute_language_alternatesalways emitted all 7 locales plusx-default-> EN (404). Sitemap now emits only locales with real translations. Probe:/blog/coisas-que-eu-gostaria...-> 404 while the sitemap advertised it withhreflang="en"./ptcanonical washttps://yuricunha.com/pt/but the platform 308-redirects to/pt.getLocalizedPathnow returns/pt(trailing slash only kept for the root).alternates.types['application/rss+xml']per locale.Server / Security
users.getPublicProfile,users.requestPasswordReset,announcements.getAnnouncements,markAnnouncementViewed,dismissAnnouncement) had no rate limit while every call inserted timing/apiUsage telemetry rows;apiUsagewas also missing from the retention cron. Dedicated rate limits added;apiUsagepruned at 90 days.activeskipped the filter, exposing drafts with all localized fields. Non-admin callers now default toactive: true./api/avatar500s and unbounded render work.?size=abc-> 500,?size=99999999-> unbounded ImageResponse. Size is now parsed and clamped to 16..512, and the error body no longer reflects internal exception text.views.incrementcreated rows for arbitrary slugs. Slug validated against the content collection (NOT_FOUND otherwise).Infra / Production
/musicsilently degraded to a placeholder. The image optimizer allowedlastfm.freetls.fastly.netbut Last.fm serves covers fromlastfm-img.freetls.fastly.net-> 400 on all covers. Host added; probe: same URL via optimizer now 200.ANALYTICS_IP_HASH_SALTwas read via rawprocess.envwith a public fallback. Now declared in the env package; in production a missing salt disables IP hashing instead of hashing with a guessable value.flags.spotifygated the Last.fm NowPlaying card and forced deadSPOTIFY_*env vars as required. Now gated byflags.lastfm; dead vars removed.NEXT_PUBLIC_UMAMI_URLtrailing slash normalized in the env schema (was an extra 308 per pageview).Tests
apiUsageretention, ip-hash env binding, sitemap/SEO alternates.next startverification of the RSS/sitemap changes before push.Validation
Pre-fix probes were executed against production for every finding listed above.
The latest updates on your projects. Learn more about Vercel for GitHub.