CISSP · Domain 8 of 8 · 10% of the exam

CISSP Domain 8: Software Development Security

33 free practice questions for Software Development Security in the Certified Information Systems Security Professional exam. Try each question first, then open "Show answer" for the correct option and explanation.

Software Development Security practice questions

  1. Question 1. What is the MOST effective defense against SQL injection?

    1. Client-side input validation
    2. Encrypting the database
    3. Hiding database error messages
    4. Parameterized queries (prepared statements)
    Show answer

    Answer: D. Parameterized queries (prepared statements)

    Parameterized queries keep user input separate from the SQL command structure. Client-side validation is easily bypassed, and suppressing errors only hinders reconnaissance.

  2. Question 2. An attack tricks an authenticated user's browser into submitting an unwanted request to a site where the user is logged in. Which attack is this?

    1. Clickjacking
    2. Cross-site request forgery (CSRF)
    3. Session fixation
    4. Cross-site scripting (XSS)
    Show answer

    Answer: B. Cross-site request forgery (CSRF)

    CSRF exploits the trust a site has in the user's browser. XSS exploits the trust a user has in a site by injecting script into its pages. Anti-CSRF tokens and SameSite cookies are common defenses.

  3. Question 3. At which point in the software development life cycle is it MOST cost-effective to address security?

    1. During requirements and design
    2. After deployment
    3. During user acceptance testing
    4. During coding
    Show answer

    Answer: A. During requirements and design

    Fixing defects grows more expensive the later they're found. Defining security requirements and threat modeling during design is far cheaper than remediating in production.

  4. Question 4. In the Software Capability Maturity Model (SW-CMM), at which level are processes documented and standardized across the organization?

    1. Level 3 – Defined
    2. Level 2 – Repeatable
    3. Level 4 – Managed
    4. Level 5 – Optimizing
    Show answer

    Answer: A. Level 3 – Defined

    The levels are Initial (1), Repeatable (2), Defined (3), Managed (4, quantitatively measured), and Optimizing (5, continuous improvement). Organization-wide standard processes appear at Level 3.

  5. Question 5. A company relies on a small vendor's custom application. What protects the company if the vendor goes out of business?

    1. A software bill of materials (SBOM)
    2. Source code escrow
    3. A service level agreement (SLA)
    4. Code signing
    Show answer

    Answer: B. Source code escrow

    In software escrow, a trusted third party holds the source code and releases it to the customer if specified conditions occur, such as vendor bankruptcy.

  6. Question 6. Failing to check the length of input before copying it into a fixed-size memory area MOST directly leads to which vulnerability?

    1. Buffer overflow
    2. Cross-site scripting
    3. Insecure direct object reference
    4. Race condition
    Show answer

    Answer: A. Buffer overflow

    Writing past the end of a buffer can overwrite adjacent memory, including return addresses. Mitigations include bounds checking, safe functions, ASLR, DEP/NX, and stack canaries.

  7. Question 7. Which software development model is organized around repeated iterations that each begin with an explicit risk analysis?

    1. Big bang
    2. Waterfall
    3. V-model
    4. Spiral
    Show answer

    Answer: D. Spiral

    Barry Boehm's spiral model iterates through planning, risk analysis, engineering, and evaluation, which makes it well suited to large, high-risk projects.

  8. Question 8. "Shifting left" in DevSecOps means:

    1. Removing security from CI/CD pipelines
    2. Integrating security earlier in the development lifecycle
    3. Outsourcing security
    4. Moving security testing to after deployment
    Show answer

    Answer: B. Integrating security earlier in the development lifecycle

    Shifting left moves security activities like threat modeling, SAST, and dependency checks earlier, where fixes are cheaper.

  9. Question 9. What is the OWASP Top 10?

    1. A mandatory regulation that web applications must comply with
    2. A ranked list of the ten most popular hacking tools
    3. An awareness document listing the most critical web application security risks
    4. A professional certification for secure developers
    Show answer

    Answer: C. An awareness document listing the most critical web application security risks

    The OWASP Top 10 is a widely used, community-driven awareness document. It isn't a law or a complete security standard.

  10. Question 10. Which approach to input validation is MOST secure?

    1. Block-list validation of known-bad characters
    2. Client-side validation only
    3. No validation, relying on the database
    4. Server-side allow-list validation (accept only known-good input)
    Show answer

    Answer: D. Server-side allow-list validation (accept only known-good input)

    Allow lists define exactly what is acceptable. Block lists inevitably miss variants, and client-side checks can be bypassed.

  11. Question 11. Which technique is the PRIMARY defense against cross-site scripting (XSS)?

    1. Encrypting the database
    2. Rate limiting
    3. Parameterized queries
    4. Context-aware output encoding
    Show answer

    Answer: D. Context-aware output encoding

    Encoding output for the context where it's rendered (HTML, attribute, JavaScript, URL) prevents user data from being executed as script. Content Security Policy adds defense in depth.

  12. Question 12. A malicious script submitted in a forum post is saved on the server and runs in the browser of every user who views the post. What type of XSS is this?

    1. Stored (persistent) XSS
    2. Reflected (non-persistent) XSS
    3. Self-XSS (user pastes script)
    4. DOM-based (client-side) XSS
    Show answer

    Answer: A. Stored (persistent) XSS

    Stored XSS persists on the server and affects every viewer. Reflected XSS is bounced off the server in a single request, often via a crafted link.

  13. Question 13. An attacker requests /download?file=../../../../etc/passwd to read files outside the web root. What vulnerability is this?

    1. Directory (path) traversal
    2. Cross-site request forgery
    3. Buffer overflow
    4. SQL injection
    Show answer

    Answer: A. Directory (path) traversal

    Path traversal abuses unvalidated file paths. Canonicalize paths, use allow lists, and avoid passing user input directly to file system calls.

  14. Question 14. What does code signing provide?

    1. Protection against all malware, since signed code is scanned
    2. Faster execution because the OS skips verification
    3. Assurance of the code's publisher and that it hasn't been altered since signing
    4. Confidentiality of the code so it can't be reverse engineered
    Show answer

    Answer: C. Assurance of the code's publisher and that it hasn't been altered since signing

    Code signing gives authenticity and integrity. It doesn't prove the code is safe or bug-free.

  15. Question 15. Which tool identifies known vulnerabilities in the open-source libraries and dependencies an application uses?

    1. Software composition analysis (SCA)
    2. Static application security testing (SAST)
    3. Dynamic application security testing (DAST)
    4. Fuzz testing
    Show answer

    Answer: A. Software composition analysis (SCA)

    SCA inventories third-party components and matches them against vulnerability databases, and often checks licenses too.

  16. Question 16. What is a software bill of materials (SBOM)?

    1. A list of bugs found during quality assurance testing
    2. A formal inventory of the components and dependencies in a piece of software
    3. A billing record of software licenses purchased
    4. The project budget for developing the software
    Show answer

    Answer: B. A formal inventory of the components and dependencies in a piece of software

    An SBOM lets organizations quickly determine whether they're affected when a component vulnerability (like Log4Shell) is disclosed.

  17. Question 17. Rate limiting on an API is PRIMARILY intended to mitigate:

    1. SQL injection in query parameters
    2. Cross-site scripting in API responses
    3. Brute-force attempts and resource-exhaustion abuse
    4. Insecure deserialization of payloads
    Show answer

    Answer: C. Brute-force attempts and resource-exhaustion abuse

    Limiting request rates per client slows credential guessing and scraping and protects availability.

  18. Question 18. In database transactions, which ACID property ensures that a transaction either completes entirely or not at all?

    1. Isolation
    2. Durability
    3. Atomicity
    4. Consistency
    Show answer

    Answer: C. Atomicity

    Atomicity is all or nothing. Consistency keeps the database valid, isolation keeps concurrent transactions separate, and durability ensures committed data survives failures.

  19. Question 19. Which database technique creates multiple records with the same primary key at different classification levels to prevent inference attacks?

    1. Aggregation
    2. Polyinstantiation
    3. Views
    4. Normalization
    Show answer

    Answer: B. Polyinstantiation

    Polyinstantiation shows lower-cleared users a cover story instead of revealing that sensitive data exists, which counters inference.

  20. Question 20. A user combines several pieces of non-sensitive data to deduce sensitive information they aren't authorized to know. What is this?

    1. Polyinstantiation
    2. Aggregation
    3. Data mining
    4. Inference
    Show answer

    Answer: D. Inference

    Inference is deducing restricted information from available data. Aggregation is combining lower-sensitivity data into a collection that is itself more sensitive.

  21. Question 21. Why should developers NOT have direct write access to production systems?

    1. It slows development and adds unnecessary overhead
    2. Developers aren't allowed to know any system passwords
    3. Production systems rarely need updates once deployed
    4. It enforces separation of duties and change control
    Show answer

    Answer: D. It enforces separation of duties and change control

    Separating development from production ensures changes go through review, testing, and approval, reducing fraud and errors.

  22. Question 22. Which software security maturity model is descriptive, based on observing what real organizations actually do?

    1. ITIL
    2. OWASP SAMM
    3. BSIMM
    4. CMMI
    Show answer

    Answer: C. BSIMM

    BSIMM (Building Security In Maturity Model) describes observed practices. OWASP SAMM is prescriptive, guiding organizations toward target practices.

  23. Question 23. In the context of system approval, what is accreditation (authorization)?

    1. Management's formal acceptance of a system's risk and approval to operate
    2. The technical evaluation and testing of security controls
    3. A vendor's certification that its product meets a standard
    4. The peer code review performed before release
    Show answer

    Answer: A. Management's formal acceptance of a system's risk and approval to operate

    Certification is the technical assessment. Accreditation (authorization to operate) is the designated official's formal decision to accept the residual risk.

  24. Question 24. A developer leaves an undocumented way to bypass authentication for troubleshooting and forgets to remove it. What is this?

    1. Maintenance hook (backdoor)
    2. Honeypot (decoy system)
    3. Race condition (TOCTOU)
    4. Logic bomb (triggered code)
    Show answer

    Answer: A. Maintenance hook (backdoor)

    Maintenance hooks bypass normal security. They should be removed before release and are a target of code review.

  25. Question 25. In software design, which combination is generally preferred?

    1. Low coupling, high cohesion
    2. Low coupling, low cohesion
    3. High coupling, high cohesion
    4. High coupling, low cohesion
    Show answer

    Answer: A. Low coupling, high cohesion

    Low coupling (minimal dependencies between modules) and high cohesion (each module has a focused purpose) make software easier to secure, test, and maintain.

  26. Question 26. Which cookie attribute prevents client-side JavaScript from reading a session cookie, reducing the impact of XSS?

    1. HttpOnly
    2. Domain
    3. Secure
    4. Expires
    Show answer

    Answer: A. HttpOnly

    HttpOnly blocks script access. Secure ensures the cookie is only sent over HTTPS, and SameSite helps against CSRF.

  27. Question 27. Which HTTP response header lets a site restrict which sources scripts may be loaded from, mitigating XSS?

    1. Content-Security-Policy
    2. Cache-Control
    3. X-Forwarded-For
    4. Strict-Transport-Security
    Show answer

    Answer: A. Content-Security-Policy

    CSP defines allowed sources for scripts and other content. HSTS forces HTTPS connections.

  28. Question 28. In object-oriented programming, hiding an object's internal data so it can only be accessed through defined methods is called:

    1. Polymorphism
    2. Encapsulation
    3. Inheritance
    4. Instantiation
    Show answer

    Answer: B. Encapsulation

    Encapsulation (data hiding) protects internal state and enforces controlled access, which supports security and maintainability.

  29. Question 29. A developer writes malicious code that deletes payroll records if their name is ever removed from the employee database. What is this?

    1. Trojan horse
    2. Worm
    3. Rootkit
    4. Logic bomb
    Show answer

    Answer: D. Logic bomb

    A logic bomb triggers its payload when a specific condition is met. Code review and separation of duties help detect and prevent it.

  30. Question 30. Where in a CI/CD pipeline should automated static analysis (SAST) and dependency scanning typically run?

    1. On each commit or build, before deployment
    2. Only after production deployment
    3. Only on the developer's laptop
    4. Once a year during audits
    Show answer

    Answer: A. On each commit or build, before deployment

    Running scans automatically in the pipeline catches issues early and can block builds with critical findings.

  31. Question 31. An application deserializes objects received from users without validation, allowing attackers to execute code. Which mitigation is MOST effective?

    1. Increase server memory so malformed objects can't crash the application
    2. Avoid deserializing untrusted data, or use safe formats with strict type allow lists and integrity checks
    3. Use longer session timeouts so objects are deserialized less often
    4. Encrypt the serialized data before sending it to the client
    Show answer

    Answer: B. Avoid deserializing untrusted data, or use safe formats with strict type allow lists and integrity checks

    Insecure deserialization can lead to remote code execution. Don't accept serialized objects from untrusted sources, or strictly constrain what can be deserialized.

  32. Question 32. In the Agile Scrum framework, a short, time-boxed iteration in which a potentially shippable increment is produced is called a:

    1. Backlog
    2. Milestone
    3. Epic
    4. Sprint
    Show answer

    Answer: D. Sprint

    Sprints typically last one to four weeks. Security requirements should be included in the backlog and definition of done.

  33. Question 33. Which activity is MOST effective for identifying design-level security flaws before any code is written?

    1. Regression testing
    2. Fuzzing
    3. Threat modeling
    4. Penetration testing
    Show answer

    Answer: C. Threat modeling

    Threat modeling during design finds architectural weaknesses (trust boundaries, data flows) that are expensive to fix later.

CISSP is a registered mark of ISC2, Inc. These questions are original study material, not questions from the real exam.