Assessing Software Security Effectiveness
Organisations need evidence that their software security efforts work. This lesson covers auditing and logging of changes, risk analysis and mitigation, and security metrics.
Learning outcomes
After completing this lesson, you will be able to:
- Explain auditing and logging of software changes.
- Describe how software risk is analysed, mitigated and measured.
Auditing and logging of changes
Every change to code, configuration and infrastructure should be traceable: version control history shows who changed what, pull requests show who reviewed it, pipeline logs show what was built and deployed, and change tickets show who approved it. Audits compare actual changes with approved ones to detect unauthorised modifications, and these records support incident investigation and accountability. Applications also log security-relevant events, such as authentication, authorisation failures and administrative actions, and protect those logs from modification.
An audit of software changes traces production back to approval. The auditor samples recent production deployments and, for each one, follows the chain backwards: the deployment record in the pipeline, the build that produced the artefact, the commits included in that build, the pull requests that merged them, the reviewers who approved them and the change ticket that authorised the work. A deployment that cannot be traced, for example a hotfix copied directly onto a server, is a finding, because it means code reached production without the controls the organisation relies on. Signed commits and artefacts strengthen the chain by proving that each item was produced by the claimed person or system.
Tracing a deployment back
Risk analysis, mitigation and metrics
Software risks are identified from threat models, testing results, vulnerability reports and incidents, and analysed for likelihood and impact. Mitigations include code fixes, design changes, compensating controls such as WAF rules or feature flags, and formal acceptance of residual risk by owners. Mitigations are verified by retesting.
Effectiveness is measured by outcomes, such as vulnerability density, mean time to remediate by severity, the proportion of releases passing security gates, recurrence of the same flaw types and vulnerabilities found in production rather than earlier. If the same weaknesses keep appearing, training, standards or tooling need to change.
A worked metric makes the idea concrete. Vulnerability density is the number of confirmed vulnerabilities per thousand lines of code, or per release. If release 1 contained 24 vulnerabilities in 80,000 lines, its density was 0.3 per thousand lines; if release 2 contained 12 in 100,000 lines, its density fell to 0.12, an improvement even though the code base grew. Where vulnerabilities are found matters too: a programme that finds 90% of its vulnerabilities in the pipeline and 10% in production is far more effective than one with the opposite ratio, because each production vulnerability is exposed to attackers and costs more to fix.
Risk mitigation for software follows the same decisions as any other risk. A critical flaw in a public application might be mitigated within hours by a WAF rule or by disabling the affected feature with a feature flag, while the code fix is developed and tested. These are compensating measures that reduce risk for a period; the risk is closed only when the code is fixed and the fix is verified.
The following diagram contrasts outcome measures with activity measures.

Vulnerability density
Measuring improvement
A CISO is asked whether a new secure coding training programme worked. Which evidence is MOST convincing?
The best evidence is a measurable change in outcomes, such as a reduction in the number of injection and access control flaws found by SAST and penetration tests per release since the training, compared with the period before. Training completion rates or the number of tools purchased show activity, not effectiveness.
Is a WAF rule that blocks an exploit a fix or a compensating control?
Show answer
A compensating control; the underlying code flaw still needs fixing.
Exam Tips
Remember for the exam
- Every production change should trace to a request, review and approval.
- Measure effectiveness with outcomes, not activity.
- A WAF rule is a compensating control, not a fix.