Video
The video for this chapter is not available yet.
Exam domains and objectives covered
Domain 3: Security Architecture and Engineering Main domain
- 3.5 Assess and mitigate the vulnerabilities of security architectures, designs, and solution elements
Domain 8: Software Development Security
- 8.1 Understand and integrate security in the Software Development Life Cycle (SDLC)
- 8.2 Identify and apply security controls in software development ecosystems
- 8.3 Assess the effectiveness of software security
- 8.4 Assess security impact of acquired software
- 8.5 Define and apply secure coding guidelines and standards
Objectives are numbered as in the official ISC2® CISSP exam outline.
Learning objectives
By the end of this chapter you should be able to:
- Integrate security into each phase of the systems development life cycle
- Compare Waterfall, spiral, Agile/Scrum, SAFe, DevOps and DevSecOps, and the role of integrated product teams
- Use maturity models such as SW-CMM, CMMI, IDEAL and SAMM
- Control change with request, change and release control and software configuration management
- Secure development ecosystems: languages, libraries, IDEs, runtimes, CI/CD pipelines and code repositories
- Apply secure coding practices for input validation, sessions, errors, logging, failure modes and APIs
- Assess the security impact of COTS, open-source, third-party and cloud software
- Explain relational database concepts, ACID, and threats such as aggregation and inference
Key topics
- Secure SDLC
- Compiled and interpreted languages
- Object-oriented programming
- Input validation and fail-secure design
- Waterfall and spiral
- Agile, Scrum and SAFe
- DevOps and DevSecOps
- Maturity models
- Change and configuration control
- API security
- Code repositories
- Acquired software
- Relational databases and ACID
- Aggregation, inference and polyinstantiation
- Expert systems and machine learning
Chapter notes
Chapter overview
Most breaches eventually trace back to software. This chapter covers Domain 8: building security into software from the first planning meeting, managing how code changes, securing the tools and pipelines developers use, and judging the risk of software you buy rather than build. It also covers database security from Domain 3 and the knowledge-based systems that increasingly support security decisions.
Key concepts
Security throughout the SDLC
Introduce security at the planning stage and keep it there through design, development, testing, deployment, operation and maintenance. Building security in is far easier and cheaper than bolting it on later, and critical or sensitive applications deserve the strongest protection. Whatever names a model uses, a secure life cycle covers these activities:
| Activity | Security angle |
|---|---|
| Conceptual definition | A short, agreed statement of purpose; identify the data classifications involved |
| Functional requirements | Each requirement states its inputs, behaviour and outputs |
| Control specifications | Design in access control, confidentiality, audit trails and availability; revisit after major design changes |
| Design review | Security professionals confirm the design meets the control specifications |
| Coding | Follow secure coding standards |
| Code review walkthrough | Developers walk through modules looking for logic and security flaws |
| System test review | Functional and security testing, regression testing for updates, then user acceptance testing (UAT) |
| Maintenance and change management | Every change goes through formal change control |
Verification checks the product against its specification (“built it right”); validation checks it meets real-world needs (“built the right thing”). Assurance is the formal process of building trust into a system across its life, with the Common Criteria as the standard reference.
Development methodologies
- Waterfall: sequential phases. The iterative version lets a team step back one phase to fix defects, but not further, so late-found errors are costly. A modified waterfall adds verification and validation to each phase.
- Spiral: repeated loops, each producing a more refined prototype with planning and risk analysis every time. Because it nests waterfall-style cycles, it’s called a metamodel.
- Agile: a philosophy, not a single method, focused on customer value, working software, collaboration and responding to change, delivered in short iterations. Methods that apply it include Scrum, Kanban, Lean, Extreme Programming (XP) and Rapid Application Development (RAD).
- Scrum: work happens in sprints of one to four weeks, each ending in a potentially releasable product. A short daily scrum reviews progress and removes blockers, and a scrum master helps the team deliver.
- Scaled Agile Framework (SAFe): applies Agile across large enterprises. Teams of teams form Agile Release Trains working in program increments (typically 8–12 weeks). Its configurations (Essential, Large Solution, Portfolio and Full) add coordination and portfolio management, and work breaks down from epics to capabilities, features and stories.
- Integrated product teams (IPTs): multidisciplinary teams, introduced by the US Department of Defense, that make decisions in parallel rather than in sequence. In effect, an early form of cross-functional working.
- DevOps: merges development, quality assurance and operations through automation and collaboration, so code can deploy many times a day. CI/CD (continuous integration and continuous delivery) automates building, testing and releasing. DevSecOps adds security into the same automated loop, often through software-defined security, where controls are defined and managed as code in the pipeline.
- Project tools: Gantt charts show tasks and dependencies over time; PERT uses lowest, most likely and highest estimates to plan and judge schedule risk.
Maturity models
SW-CMM (from the Software Engineering Institute) holds that software quality follows process quality:
| Level | Name | Characteristics |
|---|---|---|
| 1 | Initial | Ad hoc, effort-driven, little defined process |
| 2 | Repeatable | Basic life cycle management; similar projects give similar results |
| 3 | Defined | Formal, documented, standard processes for all projects |
| 4 | Managed | Quantitative measurement of the process |
| 5 | Optimising | Continuous improvement with feedback |
CMMI has largely replaced it, using the same five levels (level 4 becomes quantitatively managed) but focusing on how processes integrate. The IDEAL model guides improvement through initiating, diagnosing, establishing, acting and learning. OWASP’s SAMM (Software Assurance Maturity Model) is security-specific and measures practices across five business functions: governance, design, implementation, verification and operations. SW-CMM itself doesn’t address security, so security teams must add it.
Controlling change
Changes should be logged centrally to support audit, investigation and troubleshooting (objective 8.3). The change management process has three components:
- Request control: users ask for changes; managers weigh cost and benefit; developers prioritise.
- Change control: developers reproduce the issue, build and test the fix, follow quality rules and document the code changes.
- Release control: approve the release, check that debugging code and developer backdoors have been removed, and run acceptance testing so only approved changes reach production.
Software configuration management (SCM) tracks versions with four parts: configuration identification (record what’s deployed), configuration control (change versions only through approved channels), configuration status accounting (track every authorised change) and configuration audit (confirm production matches the records). Correlating file integrity monitoring alerts with approved change tickets turns change management into a detective control for unauthorised changes.
The development ecosystem
- Languages: machine code is CPU-specific; assembly uses mnemonics; high-level languages are easier to write and more portable. Compiled languages produce executables that end users can’t easily read. That makes tampering by others harder, but hides any backdoor the author plants. Interpreted languages ship readable source, which is easier to inspect but easier for anyone to modify. Decompilers and disassemblers reverse compiled code (useful for malware analysis); obfuscation makes that harder.
- Runtimes such as a Java® virtual machine let compiled code run across platforms, and must be patched like any other platform.
- Libraries save effort but import other people’s flaws. Major vulnerabilities in widely embedded libraries (Heartbleed in OpenSSL is the classic example) forced organisations to hunt for components they didn’t know they had. Know your dependencies, for example with a software bill of materials (SBOM) and software composition analysis, and track their vulnerabilities.
- Tool sets and IDEs: an integrated development environment combines editing, testing, debugging and compiling. Keep these tools and their plug-ins trusted and patched.
- CI/CD pipelines: protect the pipeline as carefully as production, because compromising the build compromises everything it ships.
- Code repositories provide central storage, version control and collaboration. Restrict read access (to protect secrets and intellectual property) and write access (to prevent tampering). Never commit passwords, server names or API keys: automated bots scan public repositories and can abuse leaked cloud keys within minutes.
Object-oriented programming (OOP) models systems as objects. Know the vocabulary: a message is input to an object; a method is the code it runs in response; behaviour is the result; a class defines common methods; an instance is one object of a class; inheritance passes methods to subclasses; delegation forwards a request to another object; polymorphism lets objects respond differently to the same message; encapsulation hides internals behind an interface. Good design has high cohesion (a class’s methods share a purpose) and low coupling (objects depend little on each other).
Secure coding practices
- Input validation: check every input against expectations on the server side, because client-side checks can be bypassed. A limit check confirms a value falls within range. Escaping neutralises dangerous characters so they display rather than execute.
- Authentication and sessions: match authentication strength to sensitivity (MFA for sensitive functions), reuse the organisation’s proven authentication services rather than inventing new ones, and use long, random session identifiers sent only over encrypted channels, with expiry and reauthentication.
- Error handling: show users generic messages and turn off debugging output on public systems, because detailed errors leak database structure and internal addresses.
- Logging: send detailed security events to a central log: validation failures, authentication and access control failures, tampering, invalid sessions, exceptions, administrative actions, TLS and cryptographic failures.
- Failure modes: fail secure (block access until an administrator restores service) is the right default. After a failure, the system should never restart into a privileged or automatically logged-on state. Fail open suits only rare, justified cases with compensating controls.
- Security often trades off against usability, functionality, cost and throughput. Software frequently ships with security switched off for easy installation, so configure it.
APIs
Application programming interfaces let systems call each other’s functions directly. Decide which calls
need authentication, check credentials and authorisation on every call, and treat API keys like
passwords: store them securely and send them only over encrypted channels. Test APIs as thoroughly as any
web application; tools such as curl make them easy to exercise, for testers and attackers alike.
Testing software
Design tests alongside the modules they test, with test data that exercises every path and known correct outputs. Include reasonableness checks (is the output plausible?), boundary and wrong-type input, use cases and misuse cases. Don’t test with live production data. Apply segregation of duties: someone other than the author should test, ideally an independent party.
| Approach | Tester knowledge |
|---|---|
| White box | Full access to source; steps through internal logic |
| Black box | User’s view only; inputs and outputs (for example, final acceptance testing) |
| Grey box | Tests from the user’s view, using the source code to design tests |
Keep test plans and results as permanent documentation. Chapter 15 covers static and dynamic testing in detail.
Acquired software and SLAs
COTS software, open source (often embedded inside commercial products), third-party components and SaaS all expand the attack surface. With software you run yourself, you own secure configuration and patching. With SaaS, the vendor does most of the work, but you must still verify their security through audits, assessments and contract terms, and you may keep legal compliance obligations. Test acquired software yourself, rely on vendor results, or commission independent testing. Buying software never transfers accountability.
SLAs for critical services typically specify uptime, maximum consecutive downtime, peak and average load, responsibility for diagnostics, failover time, and remedies (such as service credits) if targets are missed.
Database systems
- Hierarchical databases form a tree (one-to-many, like an organisation chart or DNS). Distributed databases spread logically linked data across locations (many-to-many). Object-oriented and object-relational databases suit complex data such as multimedia. NoSQL stores include key-value, document (JSON, XML) and graph databases, each with its own security model.
- Relational databases store data in tables (relations) of rows (records, tuples) and columns (attributes, fields). Cardinality is the number of rows; degree is the number of columns; an attribute’s domain is its set of allowed values.
- Keys: a candidate key uniquely identifies rows; the primary key is the candidate chosen; the others are alternate keys; a foreign key references another table’s primary key and enforces referential integrity.
- SQL has a data definition language (DDL) for the schema and a data manipulation language (DML) for the data, and allows fine-grained permissions down to table, row, column or cell. Normalisation (first, second and third normal forms) removes redundancy.
- Transactions succeed or fail as a unit: commit makes them permanent; rollback undoes them. The ACID properties are atomicity (all or nothing), consistency (rules hold before and after), isolation (concurrent transactions don’t see each other’s intermediate states) and durability (committed data survives failures).
- Concurrency controls (locking) prevent lost updates (two processes overwrite each other) and dirty reads (reading uncommitted data).
- Multilevel databases must stop database contamination (mixing classification levels), often with a trusted front end. Views restrict users to selected rows and columns.
- Aggregation: combining many low-sensitivity records produces something sensitive. Inference: deducing a secret from what’s visible. Counter both with tight permissions and need to know, database partitioning, cell suppression, deliberate blurring, noise and perturbation, and polyinstantiation (several rows with the same apparent key, holding different data for different clearance levels).
- Content-dependent access control decides on the data itself; context-dependent access control decides on the surrounding circumstances. Semantic integrity enforces valid types, ranges and uniqueness; timestamps keep replicated changes in order. ODBC is a standard interface between applications and different databases.
- Storage threats: protect file systems and use encryption against direct media access; lock down cloud storage, where one misconfiguration can expose data publicly; watch for covert storage channels that pass information between classification levels.
Knowledge-based systems
- Expert systems combine a knowledge base of if/then rules with an inference engine that applies them. They’re consistent and unemotional, but only as good as their rules.
- Machine learning builds models from data. Supervised learning trains on labelled examples (logins marked malicious or benign); unsupervised learning finds patterns in unlabelled data, such as clusters of similar logins.
- Neural networks (deep learning) chain layers of weighted calculations and learn the weights through training on examples with known answers.
These systems can sift log data at a scale people can’t, but their data quality and integrity become security concerns in their own right.
Exam tips
- Security should start at project initiation, not during testing.
- DevSecOps means security is part of the automated pipeline, not a final gate.
- Aggregation and inference are database threats; polyinstantiation is a classic countermeasure.
- Acquired software still needs security assessment. Buying it doesn’t transfer the risk.
- Release control ensures only approved, tested code reaches production.
- Validate input on the server, never only in the browser.
- When a question asks which maturity level uses quantitative measurement, the answer is Managed (level 4).
Common traps
- Waterfall vs spiral: waterfall steps back only one phase; spiral loops through repeated prototypes.
- Agile vs Scrum: Agile is the philosophy; Scrum is one method that implements it.
- Verification vs validation: verification checks against the specification; validation checks real needs.
- Change control vs release control: change control builds and tests the fix; release control approves it for production and strips debugging code.
- Configuration status accounting vs configuration audit: accounting records changes; audit confirms reality matches the records.
- Cardinality vs degree: cardinality counts rows, degree counts columns.
- Aggregation vs inference: aggregation combines data mechanically; inference relies on human deduction.
- Content- vs context-dependent access control: what the data is versus the circumstances of the request.
- Cohesion vs coupling: you want high cohesion and low coupling.
- Fail secure vs fail safe: in software, fail secure means deny access; for people and doors, safety comes first (Chapter 16).
Quick revision
- Build security in from conception; follow it through requirements, control specs, design review, coding, walkthroughs, testing and maintenance.
- Waterfall, spiral, Agile/Scrum, SAFe, IPTs, DevOps, DevSecOps and CI/CD.
- SW-CMM: initial, repeatable, defined, managed, optimising; IDEAL; CMMI; SAMM’s five business functions.
- Change: request, change, release control. SCM: identification, control, status accounting, audit.
- Compiled hides code, interpreted exposes it; libraries need an SBOM; protect pipelines and repositories; never commit secrets.
- Secure coding: server-side validation, strong sessions, generic errors, central logging, fail secure.
- APIs: authenticate and authorise every call; API keys are secrets.
- Testing: independent testers, use and misuse cases, white, grey and black box, no live data.
- Acquired software (COTS, OSS, third-party, SaaS) still needs assessment and monitoring.
- Databases: relations, tuples, attributes, keys, ACID, concurrency; defend against aggregation and inference with partitioning, suppression, noise and polyinstantiation.
- Expert systems = knowledge base + inference engine; ML supervised vs unsupervised; neural networks learn weights.
Key terms
| Term | Meaning |
|---|---|
| SDLC | The structured set of phases that takes a system from concept to retirement |
| Regression testing | Re-testing to confirm changes haven’t broken existing behaviour |
| User acceptance testing | Users confirming software meets their needs before production |
| Metamodel | A model built from repeated iterations of another model, as the spiral model is |
| Sprint | A fixed, short Scrum iteration that ends in a potentially releasable product |
| DevSecOps | Integrating security into automated development and operations practices |
| Software-defined security | Security controls defined and managed as code |
| Release control | The step that approves changes for production and removes debugging code |
| Software configuration management | Controlling and tracking software versions and configurations |
| SBOM | An inventory of the components and dependencies within software |
| Obfuscation | Deliberately making code hard to read or reverse-engineer |
| Polymorphism | Objects responding differently to the same message |
| Fail secure | A failure mode that denies access until the system is safely restored |
| Referential integrity | The guarantee that every foreign key points to an existing primary key |
| ACID | Atomicity, consistency, isolation and durability: the properties of reliable transactions |
| Aggregation | Combining low-sensitivity data to produce sensitive information |
| Inference | Deducing sensitive information from data you are allowed to see |
| Polyinstantiation | Storing different versions of a record for different clearance levels |
| Covert storage channel | Hidden communication through manipulation of shared storage |
| Inference engine | The part of an expert system that applies rules to reach conclusions |