Hands-On Security Hardening Lab and
Phase Exit
TaskFlow - Full Stack Developer 2026
Lab 1 - Headers
• Install @fastify/helmet 13.1.1 and inspect API response headers.
• Add a conservative Next.js header baseline and verify using browser DevTools/curl.
• Document a CSP plan instead of enabling an untested permissive policy.
Lab 2 - Abuse controls
• Install/configure @nestjs/throttler 6.5.0.
• Create a tighter policy for an expensive endpoint.
• Test 429 behavior and confirm proxy IP handling in the deployment topology.
Lab 3 - Attack-oriented tests
• Cross-workspace Task ID -> never returns foreign data.
• Unknown write fields / oversized strings -> rejected.
• Forbidden role escalation -> denied.
• Unsafe upload type/oversize -> rejected before READY.
• Public 500 response -> no stack/secret leakage.
• Logout -> QueryClient private data cleared.
Phase exit checklist
• I can explain the difference between XSS, CSRF and CORS in TaskFlow.
• I know where security headers apply and why CSP needs deployment-specific testing.
• I can distinguish rate limiting from authorization.
• I know which secrets must never reach the browser or logs.
• I can threat-model an attachment upload.
• I can point to tests/evidence for tenant isolation and authorization.
• I can use ASVS as a verification baseline rather than a checkbox score.
Sources
Source Purpose
OWASP ASVS 5.0.0 Security verification baseline; use explicit version references.
https://owasp.org/projects/asvs
OWASP Input Validation Allowlist-oriented server validation, length/range checks and
https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_ structured formats.
Cheat_Sheet.html
OWASP XSS Prevention Framework escaping, dangerous sinks, output encoding and
https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Script HTML sanitization.
ing_Prevention_Cheat_Sheet.html
OWASP CSRF Prevention SameSite, Fetch Metadata, safe methods and CSRF controls for
https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Reque ambient credentials.
st_Forgery_Prevention_Cheat_Sheet.html
Source Purpose
OWASP HTTP Headers CSP, frame protection, nosniff and related browser security
https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_C headers.
heat_Sheet.html
OWASP REST Security HTTPS, endpoint access control, JWT claims, 429, safe error
https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_C handling.
heat_Sheet.html
OWASP File Upload Allowlisted types, generated filenames, size limits, authorization
https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Che and scanning.
at_Sheet.html
OWASP Logging Do not log access tokens, passwords, DB connection strings or
https://cheatsheetseries.owasp.org/cheatsheets/Logging_Cheat_S encryption keys.
heet.html
OWASP Secrets Management Rotation, revocation, expiration and avoiding hardcoded secrets.
https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Manage
ment_Cheat_Sheet.html
NestJS Rate Limiting @nestjs/throttler setup, proxy handling and trackers.
https://docs.nestjs.com/security/rate-limiting
@fastify/helmet Fastify 5 compatible security-header plugin; current stable
https://www.npmjs.com/package/@fastify/helmet 13.1.1.
@nestjs/throttler Current stable 6.5.0; default in-memory tracker with alternate
https://www.npmjs.com/package/@nestjs/throttler storage support.
Next.js Support Policy Next.js 16 is Active LTS; supported releases receive security
https://nextjs.org/support-policy updates.