Secure Coding and Application Security Questions

Writing and reviewing code that resists attack. Covers the OWASP Top Ten and common web vulnerabilities (XSS, SQL injection, CSRF), input validation, secure coding practices and security code review, static application security testing (SAST), API and HTTP security, database and frontend security, and mobile app security. The application-layer defense discipline for engineers building software.

EasyTechnical
36 practiced

List and explain the most important cookie and session flags and properties to check when testing session management: HttpOnly, Secure, SameSite, session-ID entropy and rotation on login, and appropriate expiration. Explain what an attacker gains if each protection is missing.

MediumTechnical
38 practiced

A JSON-based API echoes a user-supplied parameter into a JavaScript client response inside a single-page application. Describe how you would test for DOM-based XSS: what instrumentation you would use (browser devtools, a Burp extension, automated DOM-sink scanning), a safe proof-of-concept payload skeleton, and how you would triage and classify the finding.

HardTechnical
46 practiced

You identify a timing side-channel in a custom authentication routine that allows username enumeration and speeds up brute-force attacks. Implement a secure credential-comparison function in Python that mitigates timing attacks (constant-time comparison), and show how you would integrate rate limiting and account lockout to further protect the authentication endpoint. Describe how you would test your own implementation to confirm the timing leak is actually closed, and how these mitigations trade off against latency at high request volume.

EasyTechnical
45 practiced

Describe Cross-Site Request Forgery (CSRF). For a stateless REST API used by a single-page application, outline three practical defenses you would implement (both code and configuration), explain the trade-offs of each, and state how you would test the effectiveness of your chosen defense during a penetration test.

MediumTechnical
36 practiced

A web application uses a custom HMAC comparison for session tokens and returns measurably different response timings for correct versus incorrect tokens. As a tester, explain how you would detect this timing side-channel, outline the experiment you would run to measure the timing differences and confirm the leak, describe a high-level approach to actually recover the HMAC value by exploiting it, and recommend secure comparison techniques along with how you would responsibly report this risk to developers.

Unlock Full Question Bank

Get access to all 49 Secure Coding and Application Security interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.