CISSP · 10% of the exam
CISSP: Software Development Security practice questions
10 free Software Development Security questions for the CISSP (Certified Information Systems Security Professional) (CISSP) exam, each with the correct answer and an explanation for every option.
What this domain covers
Security in the software development life cycle: secure coding, testing and assessing software risk.
- Exam weight
- 10%
- On a real exam
- ≈ 13 questions
- In our bank
- 97 questions
Topics that come up most
- SDLC and DevSecOps
- Secure coding practices
- Common software vulnerabilities
- Security of acquired software
- Database and API security
How to study it
Focus on where in the life cycle security is cheapest to add; 'earliest' is often the best answer.
Sample Software Development Security questions
Try each one before opening the answer. Original questions written to the official exam objectives.
Question 1
A product team releases code to production several times a day. Today, security reviews happen only after a feature is complete, and findings often arrive after the code has shipped. Leadership wants to adopt DevSecOps. Which change BEST reflects that approach?
- AAdd automated SAST, dependency, and secrets scans to each build, with gates that fail builds on critical findings
- BCommission a full third-party penetration test of the application before each major quarterly release
- CRequire a security officer's sign-off in the change advisory board meeting before every production deployment
- DRun quarterly authenticated vulnerability scans of production servers and send results to the development team
Show answer and explanation
Answer: A) Add automated SAST, dependency, and secrets scans to each build, with gates that fail builds on critical findings
DevSecOps 'shifts left' by building automated security testing (SAST, SCA, secrets scanning) and policy gates into the CI/CD pipeline, so issues are found and fixed continuously during delivery. Late or infrequent checks alone don't achieve this.
- ACorrect. DevSecOps builds automated security controls into every stage of the delivery pipeline. In the build stage that means SAST, software composition analysis and secrets scanning, with gates that stop risky changes. Developers get fast feedback, and issues are fixed early, when fixes cost less.
- BIncorrect. Penetration testing is valuable and can complement DevSecOps. But a quarterly external test is a late check that happens rarely, and it can't keep up with several deployments a day.
- CIncorrect. A manual approval step at the end still leaves security as a late gate and slows frequent releases. It doesn't build automated security testing into development and build stages.
- DIncorrect. Scanning production finds problems only after deployment, and only every few months. DevSecOps aims to catch flaws in code and dependencies before they reach production.
Question 2
A company's internal package 'acme-utils' lives in a private registry. Its build tool also queries the public registry and installs whichever source offers the highest version. An attacker publishes a package named 'acme-utils' with version 99.0 on the public registry, and builds start installing it. What is this attack, and what prevents it?
- ATyposquatting; train developers to check the spelling of package names
- BDependency confusion; resolve internal package names only from the private registry
- CCode signing bypass; rotate the company's code signing keys
- DCross-site scripting; encode package metadata before display
Show answer and explanation
Answer: B) Dependency confusion; resolve internal package names only from the private registry
Dependency confusion exploits resolvers that check public registries for internal package names; scoping internal packages to the private registry and pinning versions prevents substitution.
- ATyposquatting uses names that are misspellings of popular packages. Here the name is exactly right, so spelling checks would not help.
- BThe attacker relies on the resolver preferring the higher public version of an internal name. Using namespaces or scopes tied to the private registry, blocking public lookups for internal names, and pinning versions with hashes stops the substitution.
- CNothing was signed with the company's keys or bypassed. The problem is where the resolver fetches packages from.
- DXSS concerns injecting scripts into web pages. This attack substitutes a malicious package during the build.
Question 3
A file download endpoint rejects any request containing '../'. Attackers still retrieve /etc/passwd by sending URL-encoded sequences such as %2e%2e%2f. What is the BEST fix?
- AAdd %2e%2e%2f and similar encodings to the blocked strings
- BReturn a 404 error instead of a 403 for blocked paths
- CCanonicalize the path first, then check it is in the allowed folder
- DRun the web server on a non-standard port number
Show answer and explanation
Answer: C) Canonicalize the path first, then check it is in the allowed folder
Validation must happen after decoding and canonicalizing input; for file paths, the resolved canonical path should be checked against the allowed base directory.
- ADenylists keep missing new encodings, such as double encoding, mixed case or Unicode variants. Attackers simply try another representation.
- BChanging the error code may hide the filter's behavior a little but does not stop successful traversal.
- CConverting the input to its final, canonical form before checking it defeats encoded and alternate representations. Verifying that the resolved path is inside the permitted base directory blocks traversal.
- DChanging the port is security through obscurity and does not affect how file paths are handled.
Question 4
A project forms a team of developers, security specialists, operations staff and business representatives that works together from design through deployment. What is this called?
- AAn integrated product team
- BA change advisory board
- CA red team
- DA tiger team for audits only
Show answer and explanation
Answer: A) An integrated product team
- AAn IPT brings stakeholders together so requirements, including security, are addressed throughout development.
- BA CAB reviews proposed changes rather than building products.
- CA red team emulates attackers.
- DAudit teams review controls; they don't build the product.
Question 5
A security control runs inside the application at runtime, detecting and blocking attacks such as injection as they happen. What is it?
- ARuntime application self-protection
- BStatic code analysis
- CA software bill of materials
- DA code freeze
Show answer and explanation
Answer: A) Runtime application self-protection
- ARASP monitors application behavior from within and can block attacks in real time.
- BStatic analysis reviews code without running it.
- CAn SBOM lists components.
- DA code freeze stops changes for a period.
Question 6
A software vendor is adding a remote administration interface to its network appliance. Which design decision BEST applies the secure-by-default principle?
- AShip the remote interface turned off with MFA required, so customers must take a deliberate step to enable or relax it
- BShip the remote interface turned on and publish a detailed hardening guide that customers can follow after installation
- CShip with permissive access settings and show a dashboard banner urging administrators to review the security settings
- DShip with strong TLS cipher suites available as an optional setting that administrators can choose during configuration
Show answer and explanation
Answer: A) Ship the remote interface turned off with MFA required, so customers must take a deliberate step to enable or relax it
Secure by default means a product ships in its most protective state, with protections on and enforced without extra effort, so that reducing security requires a deliberate action. Opt-in hardening, warnings or optional strong settings do not meet this principle.
- ACorrect. Secure by default means the product's out-of-the-box state is protective. Customers get the protection without extra effort, and reducing security takes an explicit, deliberate action.
- BIncorrect. This makes security optional and dependent on extra customer effort. Many deployments never apply hardening guides, so they stay exposed.
- CIncorrect. A reminder still leaves the default state permissive. The product stays insecure until someone acts on the warning, which is the reverse of secure by default.
- DIncorrect. Making strong options available is not the same as making them the default. If the protection is opt-in, systems whose administrators never change the configuration keep weaker settings.
Question 7
A product team ships new features to production every two weeks. The security manager wants each increment to receive security validation before release, rather than relying on one large assessment late in the project. Which approach BEST supports this goal?
- AAgile sprints with automated security tests built into the CI/CD pipeline so each increment is checked on every build
- BWaterfall development with a formal security sign-off at the end of each sequential project phase
- CThe V-model, pairing each development phase with a matching verification and validation phase
- DAn annual third-party penetration test of the production application after major releases
Show answer and explanation
Answer: A) Agile sprints with automated security tests built into the CI/CD pipeline so each increment is checked on every build
Agile's short sprints combined with automated security testing in CI/CD (DevSecOps) give every small increment security validation. Waterfall and the V-model are sequential models with long release cycles, and annual penetration testing is infrequent by design.
- ACorrect. Agile delivers work in short sprints, and CI/CD automation runs tests on every build. Adding security tests to the pipeline (DevSecOps) validates every increment continuously.
- BIncorrect. Phase-gate reviews add security checkpoints, but waterfall plans large projects up front and has long release cycles. It cannot support validated releases every two weeks.
- CIncorrect. The V-model improves test traceability, but it is still a sequential, plan-driven model. Testing happens after each corresponding build phase, not on frequent, small production increments.
- DIncorrect. A periodic penetration test is useful assurance, but it is exactly the large, infrequent assessment the manager wants to move away from. It does not validate each two-week increment.
Question 8
A CI/CD pipeline deploys to production using a long-lived cloud access key with administrator permissions. The key is stored as a pipeline environment variable. Which change most effectively reduces the risk from this credential?
- AReplace the key with short-lived credentials from a role scoped to only the deployment actions the pipeline needs
- BKeep the administrator key but rotate it every 90 days and alert on unusual API activity
- CMove the administrator key into an encrypted configuration file committed to the repository
- DEnable secret masking so the administrator key never appears in pipeline build logs
Show answer and explanation
Answer: A) Replace the key with short-lived credentials from a role scoped to only the deployment actions the pipeline needs
For pipeline credentials, the best control is to replace long-term secrets with short-lived, role-based credentials scoped to least privilege. Rotation, encryption at rest and log masking are only partial measures.
- ACorrect. This fixes both problems at once. Temporary, automatically expiring credentials remove the long-term secret, and a narrowly scoped role enforces least privilege, which limits the blast radius if the pipeline is compromised.
- BIncorrect. Rotation and monitoring help, but the credential is still long-lived and has full administrator rights. A leaked key stays fully usable until the next rotation.
- CIncorrect. Storing long-term credentials in source code or configuration files is a recognized anti-pattern, even when encrypted. The key also keeps its excessive permissions.
- DIncorrect. Masking stops one way the key can leak, but it does nothing about the key's broad privileges or long lifetime. Anyone who can change the pipeline can still use the key.
Question 9
A team keeps firewall rules, network security group settings and access policies as declarative definition files in version control. Changes are reviewed through pull requests and applied to environments automatically by the release pipeline. Which practice is the team using?
- AInfrastructure as code (IaC)
- BSecurity orchestration, automation and response (SOAR)
- CConfiguration management database (CMDB)
- DSoftware-defined networking (SDN)
Show answer and explanation
Answer: A) Infrastructure as code (IaC)
Keeping firewall rules, security groups and access policies as version-controlled declarative definitions that a pipeline applies automatically is infrastructure as code. It makes security configuration consistent, reviewable and repeatable, and prevents drift.
- ACorrect. IaC uses versioning and a descriptive model, preferably declarative definition files, to define and deploy infrastructure such as networks and their security settings. Release pipelines apply the definitions, and teams make changes by editing the source rather than the target. This makes environments repeatable, reviewable and resistant to configuration drift.
- BIncorrect. SOAR automates security operations and incident response workflows through playbooks across security tools. It does not hold an environment's desired configuration in version control or deploy it through a release pipeline.
- CIncorrect. A CMDB is a repository that records configuration items and their relationships for IT service management. It documents configuration but does not define and automatically apply it to environments from reviewed code.
- DIncorrect. SDN separates the network control plane from the data plane so that a controller can manage network behavior centrally and programmatically. It is a network architecture, not the practice of keeping versioned, reviewed configuration definitions that a pipeline deploys.
Question 10
Which pair of secure-coding practices most directly prevents SQL injection and reflected cross-site scripting (XSS), respectively?
- AType-safe parameterized queries for SQL injection; context-appropriate encoding of untrusted data at output for XSS
- BEscaping single quotes in user input for SQL injection; a web application firewall rule set for XSS
- CStored procedures that build dynamic SQL from input for SQL injection; HTML-encoding input before storing it for XSS
- DDeny-list validation of dangerous characters for SQL injection; deny-list validation of script tags for XSS
Show answer and explanation
Answer: A) Type-safe parameterized queries for SQL injection; context-appropriate encoding of untrusted data at output for XSS
Parameterized queries keep user input as data, not SQL code, and output encoding for the specific context stops the browser from running injected script. Escaping, deny lists, WAFs and storing pre-encoded data are partial or flawed substitutes.
- ACorrect. With parameterized queries, user input is treated as a literal value, not executable SQL. Encoding untrusted data for the context it is written into (HTML, HTML attribute, JavaScript or URL) at the point of output stops the browser from running it as script. Input validation is a useful extra layer but does not replace either control.
- BMicrosoft says filtering or escaping characters is not a reliable defense against SQL injection, because many characters can cause problems. A WAF is a useful extra layer, but it does not fix the underlying flaw of writing unencoded output, and it can be bypassed.
- CStored procedures that concatenate unfiltered input into dynamic SQL are still vulnerable to injection. Accepted practice is to encode at the point of output, for the specific output context, and not to store encoded values.
- DDeny lists are easy to bypass with alternative encodings and syntax. Microsoft's XSS guidance says never to rely on validation alone and to encode untrusted data before output. Parameterization is still needed for SQL.
More Software Development Security questions, one per page
- Which statement BEST distinguishes BSIMM from OWASP SAMM?
- A web application fetches an image from any URL that a user submits. A tester submits the cloud instance metadata…
- A user profile update API binds every field in the submitted JSON directly to the stored user object.
- A mobile app's API returns complete customer records, including national ID numbers and internal account notes.
- A C service computes a buffer size as count multiplied by record size, using 32-bit unsigned integers, with count taken…
- A team is designing password storage for a new web application. Which approach BEST protects stored passwords if the…
- A web application keeps the same session ID before and after login. An attacker plants a known session ID in a victim's…
- A research database allows only aggregate queries such as counts and averages.
Software Development Security: FAQs
How much of the CISSP exam is Software Development Security?
Software Development Security is 10% of the CISSP exam by the official exam guide's weighting, which on a 125-question form works out to roughly 13 questions. The real exam's exact split varies by form.
What does the Software Development Security domain cover?
Security in the software development life cycle: secure coding, testing and assessing software risk.
How should I study Software Development Security for CISSP?
Focus on where in the life cycle security is cheapest to add; 'earliest' is often the best answer.
Where can I practise more Software Development Security questions?
This page has 10 free Software Development Security questions with answers. CertRidge's CISSP question bank has 97 questions in this domain. Every practice exam result breaks your score down by domain, and Review Mode re-drills the questions you missed.
Other CISSP domains
- Security and Risk Management16% of the exam
- Asset Security10% of the exam
- Security Architecture and Engineering13% of the exam
- Communication and Network Security13% of the exam
- Identity and Access Management (IAM)13% of the exam
- Security Assessment and Testing12% of the exam
- Security Operations13% of the exam
Also: 15 free questions across all domains, the CISSP cheat sheet and the study guide.
Get Software Development Security exam-ready
The full CISSP bank has 97 Software Development Security questions. Timed practice exams match the real exam's length and domain weights, every result shows your score per domain, and Review Mode re-drills the questions you missed.
Not affiliated with ISC2; questions are original and never copied from the real exam.