Comprehensive security standards for TalentFilter, including anti-cheating, request limiting, and application-level protection.
This skill provides the authoritative security guidelines for the TalentFilter platform. It covers everything from preventing candidate cheating to protecting the platform against abuse and hacking.
To ensure the integrity of the screening process, all candidate interfaces must implement these measures:
visibilitychange API to track if a candidate switches tabs or minimizes the browser.tab_switches counter in the useInterviewStore. If a pre-defined threshold is reached, notify the recruiter via a flag in the database.Textarea components are wrapped in the usePreventCopyPaste hook.copy, , and events to ensure candidates type their own responses.pastecutsubmission_time - start_time and flag any discrepancies.To prevent budget overruns from AI usage and protect the platform from bot abuse:
slowapi or similar) on all AI-heavy endpoints:
POST /jobs/analyzePOST /interviews/submitAIService and log token usage per recruiter/job to monitor costs and prevent spikes.Protect the platform against common web vulnerabilities:
middleware.ts for route protection due to potential bypasses (e.g., CVE-2025-29927).layout.tsx. If unauthorized, use redirect() before any HTML is sent to the client.HTTP-Only cookies for the primary authentication token (tf_session). This prevents XSS access to the token and allows the server to validate requests without client-side hydration.auth.uid() = recruiter_id. They must never be able to see another recruiter's data.service_role keys./session/{token}) must explicitly exclude sensitive data like ideal_answer or scoring_criteria.TalentFilter strictly follows the modern Supabase API key standards implemented in late 2025:
sb_publishable_...): Replaces Legacy anon. Used for client-side and RLS-protected server-side calls.sb_secret_...): Replaces Legacy service_role. Used strictly for backend admin tasks that MUST bypass RLS.Authorization header via client.auth.set_session(token).