Building security into software from requirements to retirement: SDLC models, secure coding, application and API attacks, databases, third-party code and AI-assisted development.
Treat AI output as untrusted: code review, SAST/SCA, approved package registry (hallucinated package names = slopsquatting), no secrets in prompts.
Environments
Separate dev / test / production · developers do not deploy their own code to production · version control + peer review · change control for releases.
Development models — hard words made simple
Term
Simple meaning
Example / analogy
Exam hook
Waterfall
Phases one after another; no going back
Building a house floor by floor
Rigid, sequential
V-model
Each development phase has a matching test phase
Requirements ↔ acceptance test
“matching test phase”
Spiral
Repeating loops with risk analysis every loop
Prototype → risk check → improve
“risk analysis each iteration”
Agile
Build in small pieces, adapt to feedback
A feature every 2 weeks
Flexible, customer feedback
Scrum / sprint
Agile framework; a sprint is a 1–4 week time-box
“This sprint we build login”
Short iteration
Backlog / user story
Prioritised to-do list / feature from the user’s view
“As a user I want to reset my password”
—
RAD / prototyping
Quick working models for fast feedback
Mock-up app
Speed over documentation
DevOps / DevSecOps
Dev + Ops with automation; DevSecOps adds security to the pipeline
Try each question before opening the answer. The full bank has many more Domain 8 questions with filters and progress tracking.
Question 1 · FIRST
A development team discovers that an API key was accidentally committed to a public Git repository. What should they do FIRST?
Investigate which developer made the mistake
Add a pre-commit secret scanning hook for all developers
Delete the commit from the repository history
Revoke and rotate the exposed API key
Show answer & explanation
Answer: D — Revoke and rotate the exposed API key
Once public, the secret must be assumed compromised; revoking it stops misuse immediately. Cleaning history, adding scanners and reviewing the cause are important follow-ups but do not stop an attacker who already copied the key.
Question 2 · NEXT
Security testing of a new HR system is complete and the residual risks have been documented by the certifier. What should happen NEXT before go-live?
Management formally accepts the residual risk and authorises operation
The system is deployed because testing has finished
Developers start the next release to fix low-priority findings
The certifier repeats all tests to confirm the results
Show answer & explanation
Answer: A — Management formally accepts the residual risk and authorises operation
Certification (technical evaluation) is followed by accreditation: an authorising official accepts the residual risk and grants authority to operate. Deploying without that decision skips governance.
Question 3 · LEAST
At which point in the SDLC is fixing a security design flaw LEAST expensive?
After deployment to production
During system testing
During user acceptance testing
During requirements and design
Show answer & explanation
Answer: D — During requirements and design
The cost of fixing defects rises sharply in later phases. Addressing flaws in requirements and design avoids rework of code, tests and deployed systems.
Question 4 · NOT
Which of the following is NOT an effective defence against SQL injection?
Validating input against an allow-list of expected values
Hiding database error messages from users as the only control
Applying least privilege to the application's database account
Using parameterised queries or prepared statements
Show answer & explanation
Answer: B — Hiding database error messages from users as the only control
Parameterised queries are the primary fix; least privilege and allow-list validation reduce impact and attack surface. Suppressing error messages only makes exploitation harder to see (blind SQLi still works).
Question 5 · BEST
A security team must test a third-party web application for vulnerabilities while it runs in a staging environment. The vendor will not provide source code. Which method BEST fits?
Software composition analysis
Static application security testing
Runtime application self-protection
Dynamic application security testing
Show answer & explanation
Answer: D — Dynamic application security testing
TEST + running + no source code = DAST (black box). SAST needs code; RASP PROTECTS, it doesn't test; SCA needs the dependency list or code.
Question 6 · PRIMARY
A bank's security team wants every application to publish a Software Bill of Materials (SBOM). What is the PRIMARY security benefit of doing so?
It prevents developers from adding open-source libraries without manager approval
It replaces the need for static and dynamic security testing during development
It proves to regulators that the application has no exploitable vulnerabilities in production
It lets the bank quickly identify which applications contain a newly disclosed vulnerable component
Show answer & explanation
Answer: D — It lets the bank quickly identify which applications contain a newly disclosed vulnerable component
An SBOM is an inventory of components. Its main value is rapid impact analysis when a component vulnerability is disclosed. It does not prove absence of vulnerabilities, does not replace testing, and does not by itself enforce approval workflows.
Question 7 · MOST
A software developer needs to prevent SQL Injection vulnerabilities in a Java application processing database queries. Which coding practice is MOST effective?
Filter SQL query strings by replacing single quote characters with double quotes
Use Parameterized Queries (Prepared Statements) with strict input validation
Concatenate user input strings directly into dynamic SQL query strings
Encrypt the database connection password stored in application source code
Show answer & explanation
Answer: B — Use Parameterized Queries (Prepared Statements) with strict input validation
Option B is correct because Parameterized Queries separate SQL code from user data, ensuring the database driver treats input strictly as literal parameters rather than executable SQL code. Option C is incorrect because string concatenation is the primary cause of SQL injection. Option A is wrong because character replacement filtering is easily bypassed by attackers using alternative encoding techniques. Option D is incorrect because password encryption does not prevent SQL syntax injection.
Question 8
A DevSecOps team is integrating security into the early design phase of a new web application. Which process identifies potential threats, attack vectors, and mitigations before code is written?
Threat Modeling (e.g., using STRIDE framework)
Compiling application binaries with debug flags enabled
Penetration testing against live production servers
Post-incident root cause analysis
Show answer & explanation
Answer: A — Threat Modeling (e.g., using STRIDE framework)
Option A is correct because Threat Modeling analyzes system architecture during design to identify threats (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege) early in the SDLC. Option C is incorrect because penetration testing occurs late in the lifecycle after deployment. Option D is wrong because root cause analysis occurs after a security incident. Option B is incorrect because debug flags increase vulnerability exposure in binaries.
Question 9 · FIRST
A retail company is starting a new mobile payments app. The product owner wants developers to begin coding next week to meet a launch date. As the security architect, what should you ensure happens FIRST?
Security and privacy requirements are defined and approved alongside functional requirements
A static analysis tool is integrated into the build pipeline before any code is merged
Developers complete secure coding training on the OWASP Top 10 before writing code
An external penetration test is booked for two weeks before the planned launch
Show answer & explanation
Answer: A — Security and privacy requirements are defined and approved alongside functional requirements
Security starts in the requirements phase: without defined security requirements there is nothing to design, test or verify against. SAST, training and pentests are all valuable but come later and depend on knowing what 'secure' means for this app.
Question 10 · NEXT
During a sprint review, a tester confirms that a newly reported SQL injection flaw has been fixed in the login module. What should the team do NEXT before releasing?
Close the ticket and release the build because the specific flaw is verified as fixed
Run regression tests to confirm the fix did not break existing functionality
Update the secure coding standard to prohibit dynamic SQL in all future projects
Schedule a full external penetration test of the entire application before release
Show answer & explanation
Answer: B — Run regression tests to confirm the fix did not break existing functionality
After a change is verified, regression testing confirms nothing else broke. Releasing immediately skips that check, a full pentest is disproportionate for one fix, and updating standards is a lessons-learned activity rather than the next release step.
Ready for the full bank?
2,000+ explained questions, timed mocks and a CAT simulator that behaves like the real exam.