InterviewStack.io LogoInterviewStack.io

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.

HardSystem Design
33 practiced

Design an end-to-end runtime detection and response architecture to detect OWASP Top Ten exploitation events for a multi-tenant SaaS with 5 million monthly users. Cover instrumentation choices (RASP, WAF, application logs), telemetry pipelines, correlation rules, alerting thresholds and false-positive management, and the performance/cost trade-offs. Specify concrete components and how alerts flow to the operations team, including the SOC triage workflow and the feedback loop that gets tuning changes back to engineering.

MediumTechnical
33 practiced

You review a Java service that accepts raw bytes over HTTP and deserializes them using ObjectInputStream, casting the result to an internal type. Describe the security risks this pattern introduces and how gadget chains enable remote code execution here. Propose concrete code-level mitigations and safer serialization alternatives, with code showing type allowlisting, an input-size limit, and avoiding polymorphic type resolution (for example with a library like Jackson). List the tests you would require in the pull request to verify the fix.

HardTechnical
45 practiced

You discover an insecure-deserialization vulnerability in a microservice that consumes messages from a queue and forwards deserialized objects to other services written in different languages. Explain an exploitation plan for how an attacker could abuse the serialization formats involved to achieve remote code execution or privilege escalation across services, and propose architectural mitigations to prevent this cross-service gadget abuse.

MediumTechnical
43 practiced

Create unit test scenarios for a function that encrypts user data using AES-GCM with a provided 256-bit key and returns a base64-encoded ciphertext. Provide at least five test scenarios with rationale: correct decryption round-trip, tampering detection (a modified ciphertext must fail to decrypt), nonce-reuse detection or handling, invalid-key handling, and boundary inputs (empty plaintext). Describe what each test asserts.

HardTechnical
33 practiced

You discover a critical SQL injection in a decade-old legacy application. Management offers several alternatives: an immediate WAF rule as a stopgap, patching the query-string building directly, migrating to an ORM in the medium term, or isolating the app with network controls. Analyze each option's pros, cons, verification steps, and rollback risk, and recommend a phased remediation plan.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.