All jobs / Frontend / web developer / Security
Frontend / web developer interview question · 5+ years
Product wants full click tapes plus form field values in the frontend logger. How do you respond?
The strongest answer
Minimize: no secrets or PII in RUM, scrub fields, purpose-limit the log, and run it past privacy
Why it works
Frontend logs are production data. Minimization and purpose are the staff answer, not a bigger tape.
What a good answer covers
- Collect less than product asked.
- Scrub inputs and secrets.
- State the purpose.
- Never log passwords, even temporarily.
Answers that fall short
- Close, but not the strongest: Hash emails and keep the rest of the fields
Hashing one field does not redeem a form dump. - Weak: Log everything so we can find bugs
Everything includes payment and health-adjacent fields you do not want. - Red flag: Send passwords to the log pipeline temporarily
Passwords in logs are a security incident, not a debug mode.
Who gets asked this
More Security questions
- Legal says marketing pixels cannot run before consent. How do you architect the frontend?
- A junior's PR works but has an XSS hole and no tests. How do you mentor in review?
- How do you keep consent state consistent across web, a WebView, and a pixel manager?
- Marketing wants to render a CMS HTML snippet in React. Strongest answer?
- A cookie-session SPA posts state-changing requests. What do you do in the browser about CSRF?
- Auth token in localStorage versus an httpOnly cookie for a SPA — how do you argue it?
- You need a small inline boot script but CSP forbids unsafe-inline. What do you do?
- Two 401s trigger two refresh calls and one of them logs the user out. How do you design the client?