CSSLP
Free CSSLP practice questions
10 questions from our CSSLP practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.
Question 1 of 10, Secure Software Concepts
A payroll application lets the same clerk create a new vendor record and approve the first payment to that vendor. Auditors flag this as a design weakness. Which security principle is being violated?
- AComplete mediation of access
- BEconomy of mechanism in the workflow
- CSeparation of duties Correct answer
- DLeast common mechanism
Answer and explanation: Separation of duties splits a sensitive transaction so that no single person can both initiate and approve it, which is exactly what the vendor-creation and payment-approval combination breaks. Least common mechanism concerns shared components between users, not conflicting tasks. Complete mediation means every access is checked, which can still be true here. Economy of mechanism is about keeping designs simple and does not address conflicting roles.
Question 2 of 10, Secure Software Lifecycle Management
An organization wants a measurable, maturity-based way to assess and improve its software assurance practices across governance, design, implementation, verification and operations, with prescriptive improvement roadmaps. Which framework is the BEST fit?
- AISO/IEC 27002 information security controls catalog
- BCommon Vulnerability Scoring System (CVSS) version 4.0
- COWASP Application Security Verification Standard (ASVS)
- DOWASP Software Assurance Maturity Model (SAMM) Correct answer
Answer and explanation: OWASP SAMM is a prescriptive maturity model organised into business functions (governance, design, implementation, verification, operations) with maturity levels and roadmaps. ASVS is a catalog of application-level verification requirements, not a program maturity model. CVSS scores the severity of individual vulnerabilities. ISO/IEC 27002 lists general information security controls and does not measure software assurance maturity.
Question 3 of 10, Secure Software Requirements
A product will process EU residents' personal data for analytics. The privacy officer wants the requirements to ensure that analysts cannot identify individuals while the data still allows linking records about the same person over time. Which requirement BEST meets this?
- APseudonymize identifiers with a keyed token, storing the key separately under restricted access Correct answer
- BEncrypt the full analytics database at rest with a customer-managed key held in a hardware module
- CApply role-based access so that only senior analysts may query the columns containing direct identifiers
- DAnonymize the dataset by removing all identifiers and any attribute that allows records to be linked
Answer and explanation: Keyed pseudonymization replaces identifiers with consistent tokens, so records can be linked over time, while the key needed for re-identification is held separately. Full anonymization prevents identification but also destroys linkability, failing the second requirement. Encryption at rest protects stored data but analysts querying it still see identities. Role-based access still exposes identities to the senior analysts.
Question 4 of 10, Secure Software Architecture and Design
A design must let a mobile app sign in users through the organization's identity provider using OAuth 2.0. Which flow is the recommended choice for this public client?
- AResource owner password credentials flow inside the app
- BImplicit flow returning tokens in the redirect URL fragment
- CClient credentials flow using a secret embedded in the app
- DAuthorization code flow with PKCE using the system browser Correct answer
Answer and explanation: Public clients such as mobile apps should use the authorization code flow with PKCE via the system browser, which protects the code exchange without a client secret. The password grant exposes user credentials to the app and is deprecated. The implicit flow exposes tokens in URLs and is discouraged. Client credentials is for machine-to-machine use, and secrets embedded in apps can be extracted.
Question 5 of 10, Secure Software Architecture and Design
An architect designs a file-sharing service and must decide where to enforce authorization for document downloads served through a CDN. Which design BEST enforces authorization without exposing documents publicly?
- AHave the application issue short-lived signed URLs after checking permissions, and keep the CDN origin private Correct answer
- BCache documents at every CDN edge location with a long time-to-live and rely on the CDN provider's default access settings
- CHide the download links in the user interface for users who lack access to each document
- DMake the storage bucket public but give documents long random names that are hard to guess
Answer and explanation: The application checks authorization and then issues a time-limited signed URL, so only authorized users can fetch the object while the origin stays private. Long random names in a public bucket are obscurity, and leaked links work forever. Hiding UI links does not stop direct requests. Default CDN caching with public access provides no authorization.
Question 6 of 10, Secure Software Implementation
Which method should a developer use to store user passwords for a new web application?
- AA memory-hard, salted password hashing function such as Argon2id with tuned cost parameters Correct answer
- BHMAC-SHA-512 using a per-user random salt computed in a single fast iteration per login
- CAES-256-GCM encryption of each password using a key held in the application's key vault
- DSHA-256 with a single application-wide salt stored in the application configuration file
Answer and explanation: Argon2id is a deliberately slow, memory-hard, salted algorithm designed to resist offline guessing on GPUs and ASICs. A single fast SHA-256 hash with a shared salt is cheap to brute-force and lets identical passwords be spotted. Reversible encryption means anyone obtaining the key recovers every password. A single fast HMAC iteration offers little resistance to large-scale guessing.
Question 7 of 10, Secure Software Implementation
A web page displays a user-supplied display name inside an HTML attribute value and, elsewhere, inside a JavaScript string block. What is the MOST effective way to prevent cross-site scripting in both places?
- AApply context-specific output encoding: HTML attribute encoding in one place and JavaScript encoding in the other Correct answer
- BSet the HttpOnly flag on all session cookies so injected script cannot read the user's session token
- CApply HTML entity encoding to the display name once when it is stored and reuse that value in both places
- DValidate the display name against a blocklist of script tags and event-handler names on input
Answer and explanation: Encoding must match the output context: what is safe inside an HTML attribute differs from what is safe inside a JavaScript string, so each sink needs its own encoder. Encoding once at storage applies the wrong encoding for the JavaScript context and can double-encode elsewhere. Blocklists of tags are easily bypassed. HttpOnly limits cookie theft but the injected script still runs.
Question 8 of 10, Secure Software Testing
Testers need realistic data in the QA environment, but the production database contains customer personal data. Which approach is BEST?
- ACopy production data to QA but encrypt the whole QA database volume at rest
- BUse production data in QA only for the duration of each test cycle and delete it after
- CUse masked or synthetic data that preserves formats and relationships needed for testing Correct answer
- DCopy the production database to QA and restrict QA access to the testers on the project
Answer and explanation: Masked or synthetic data keeps test realism, including formats and referential integrity, without exposing real personal data in a less-protected environment. Restricting access still places real personal data in QA and widens exposure. Disk encryption does not protect data from users and processes that query the database. Temporary use still exposes real data during each test cycle.
Question 9 of 10, Secure Software Deployment, Operations, Maintenance
A company is responding to a confirmed breach of a web application. In which order should the incident response team generally proceed?
- AContain the incident, eradicate the cause, recover services, then hold a lessons-learned review Correct answer
- BRecover services, hold a lessons-learned review, contain the incident, then eradicate the cause
- CHold a lessons-learned review, contain the incident, recover services, then eradicate the cause
- DEradicate the cause, notify the media and regulators, recover services, then contain any remaining attacker activity
Answer and explanation: After detection and analysis, the response flows through containment to stop further damage, eradication of the root cause, recovery of services and then post-incident lessons learned. Recovering before containment risks reinfection. Eradicating before containment lets the attacker continue elsewhere, and media notification is not a technical response step. Lessons learned come at the end, when facts are known.
Question 10 of 10, Secure Software Supply Chain. Choose 2.
Before adopting an open-source library, which factors should the team evaluate as part of supplier risk assessment? (Choose two.)
- ALicense terms and their compatibility with the product's distribution model Correct answer
- BThe number of stars the repository has received compared with competing projects
- CMaintenance activity and how quickly the project responds to reported vulnerabilities Correct answer
- DWhether the library was released more recently than the alternatives the team evaluated
- EThe programming language the project's founders used in their previous projects
Answer and explanation: Active maintenance and vulnerability response indicate whether security issues will be fixed, and license compatibility determines legal risk when distributing the product. Repository stars measure popularity, not security or support. A newer release date says nothing about how well the project is maintained or secured. The founders' previous languages say nothing about this library's risk.