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.

HardTechnical
43 practiced

Design a database schema and server-side logic for refresh-token rotation with reuse detection. Requirements: when a refresh token is used it is immediately rotated and the old token becomes invalid; if a previously-rotated (replayed) token is used, mark the session as compromised and revoke all related tokens. Describe the schema fields, the transactional operations needed to prevent race conditions on concurrent refresh attempts, and the cleanup procedure for expired tokens.

MediumTechnical
37 practiced

Write Kotlin code for Android that implements thread-safe token-refresh logic using coroutines. Requirements: when multiple concurrent API calls receive a 401, only a single refresh request should run; other callers should suspend and resume with the new access token once refresh completes. Persist the new tokens atomically using EncryptedSharedPreferences or a KeyStore-wrapped key, and handle a failed refresh by triggering app logout.

MediumTechnical
44 practiced

Design a secure and user-friendly logout and token-revocation strategy for a mobile app. Cover client-side removal of credentials, server-side revocation of refresh tokens, handling multiple signed-in devices, push- or polling-based notification to other devices, and techniques to ensure tokens are unusable after logout even if an attacker had already extracted them.

MediumTechnical
36 practiced

Explain how to implement certificate pinning on Android using Network Security Config, and propose a robust fallback strategy. Cover static pins in the config, using multiple pins including backups, considerations for captive portals and enterprise proxies, and how you would update pins in the field without requiring an immediate app update.

EasyTechnical
41 practiced

Explain mobile app signing and code-signing key management on Android and iOS. Cover the differences between APK/AAB signing, Play App Signing, keystore files, and iOS provisioning profiles and distribution certificates, and explain why protecting signing keys is critical for update integrity and for preventing a malicious app update from reaching users.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.