CS06-04 Computer Science Watch
Robust software and finding vulnerabilities
In this lesson
In this video you'll learn about robust software and vulnerabilities for GCSE Computer Science. Watch first: {{video:CS06-01}}
By the end: Explain why software must be robust - free from vulnerabilities before it is released - name the kinds of vulnerability that make it fragile, and describe how audit trails and code reviews each help identify vulnerabilities, including one disadvantage of each kind of code review and the accountability an audit trail brings.
What it covers
- ROBUST SOFTWARE: software that keeps working correctly and securely, including when it meets unexpected input or deliberate attack, because its vulnerabilities were found and fixed before release
- WHY IT MATTERS: vulnerabilities are how attackers get in, how data is lost or stolen, and how users lose trust; fixing them before release is far cheaper than after
- TYPES OF VULNERABILITY, as Edexcel's 2022 Question 2(f) mark scheme lists them: programming bugs, security vulnerabilities, programming-language-specific vulnerabilities, weak design, insufficient testing, bad programming practice such as using unvalidated third-party libraries, and inadequate validation
- CODE REVIEW: other people (or an automated tool) read the source code looking for mistakes and vulnerabilities before it is released; it can be done by a programmer or by an automated system, and each has its own disadvantage - a person takes time and may miss errors; an automated system only finds what it was built to look for
- AUDIT TRAIL: a record of every change made to the code - what was changed, who changed it and when - so a vulnerability can be traced to the change that introduced it, and so each programmer is accountable for their changes
- THE DISTINCTION THE 2024 REPORT ASKS FOR: an audit trail RECORDS changes; a code review READS the code; neither one is the same as a robust programming technique such as validation
Key words
About this video
Robust software and finding vulnerabilities | GCSE Computer Science
How robust software avoids vulnerabilities, and how code reviews and audit trails find them, for GCSE Computer Science.
Edexcel 1CP2 GCSE. Software and languages 4 of 8.
Full Software and languages playlist: https://www.youtube.com/playlist?list=PLQW0s9-KegDg
More at https://scholafly.com
Watch first: System software and application software - https://youtu.be/RXyXx0g8oag
Video code: CS06-04 (search "ScholaFly CS06-04")
Videos in this chapter:
CS06-00 Software, systems and languages - Intro: https://youtu.be/ZUCeKOmRzOk
CS06-01 System software and application software: https://youtu.be/RXyXx0g8oag
CS06-02 What an operating system does: https://youtu.be/SIT-KoeAO10
CS06-03 Utility software: https://youtu.be/SsMEnR8roG0
CS06-04 Robust software and finding vulnerabilities: https://youtu.be/btlub9ax64Q
CS06-05 High-level and low-level languages
CS06-06 Machine code and assembly language
CS06-07 Compilers, interpreters and assemblers
CS06-08 The IDE
#GCSEComputerScience #SoftwareAndLanguages #RobustSoftware
For teachers
This GCSE Computer Science lesson teaches robust software and finding vulnerabilities. By the end, students should be able to explain why software must be robust - free from vulnerabilities before it is released - name the kinds of vulnerability that make it fragile, and describe how audit trails and code reviews each help identify vulnerabilities, including one disadvantage of each kind of code review and the accountability an audit trail brings. It works through four worked examples and the mistakes examiners report, and suits Foundation and Higher tier students.
Exam board specification references:
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
- 3.2.3 Explain the importance of developing robust software and the methods of identifying vulnerabilities, including audit trails and code reviews.
Read the transcript
Take a program that does everything it was built to do, and passes every test its makers thought of. It can still let a stranger into millions of accounts, because of one line nobody looked at twice, or one free library somebody downloaded and never checked. The program works, and it is still weak. From the outside, working software and safe software look the same.
This sits at video four of eight in Software, systems and languages, and it asks what happens when software is not good enough. The background it needs is in System software and application software.
Robust software keeps working correctly and securely, even when it meets unexpected input or a deliberate attack, because its weaknesses were found and fixed before it was released. Those weaknesses are called vulnerabilities. A vulnerability is a weakness in software that someone could exploit, to get in, to steal or damage data, or to make the program fail. Finding them before release matters because attackers use them to get in, users lose data and trust, and a flaw fixed after release costs far more than one fixed before. Working means doing the job when the program is used as intended. Holding up means not breaking, and not being broken into, when something unexpected happens. Only one course names this topic directly, and your board's line is here. Other courses use the same word for a different idea, defensive design, which belongs to the chapter on writing programs. A login program passes every test its makers ran with real usernames. Then someone types in a thousand random characters, and it crashes. Which describes that login program: it works, it holds up, or both? Only that it works. It does its job with ordinary input, but one unexpected input brought it down.
Now for the kinds of vulnerability. A programming bug is one kind: a mistake in the code that makes it behave wrongly. There are several more. Weak design is a flaw in the plan itself, such as a system that never checks who is asking. Insufficient testing leaves faults nobody tried to find. Inadequate validation lets in input that should have been refused. Bad programming practice includes using a third-party library, code written by someone else, without checking it. Some languages have weak spots of their own, called language-specific vulnerabilities. Security vulnerabilities are gaps an attacker can use to get past the program's protection. Asked for two kinds of vulnerability other than bugs, a student writes syntax errors and logic errors. Why is 'syntax errors and logic errors' a weak answer about kinds of vulnerability? Those are kinds of programming error, not weaknesses someone could exploit. A syntax error stops a program running at all, so it is caught long before release. The question wants things like weak design or an unchecked library. One examiner's report records that slip. "There were a few responses on types of errors: syntax and logic were mentioned quite frequently." And the same report goes straight on. "Over half of the candidates did not gain a mark, but there were some good responses related to security vulnerability and unvalidated 3rd party libraries." The fix is two named kinds, each with what it means. Weak design is a flaw in the plan. An unvalidated third-party library is someone else's code used without checking. How to write validation is in the chapter on writing programs.
To find vulnerabilities, the first method is a code review. In a code review, someone other than the author reads the source code before it is released, looking for mistakes and weaknesses. It can be done by a programmer, or by an automated system, a tool that scans the code for known problems. Both kinds of review cost money, and each one has a second drawback as well. Give one disadvantage of each kind of code review, other than the cost. A programmer takes time and is human, so they can miss errors. An automated system only finds the problems it was built to look for, so a new or unusual weakness slips straight past it. One examiner's report on a question like this says: "Adds time and human error were the most common answers for the first part and many got the second part incorrect by stating something to do with algorithmic bias, or mentioned logic errors." So the programmer's drawbacks are the familiar half. The automated system's drawback is the one to learn: it finds only what it was programmed to find. Algorithmic bias is about decisions made by artificial intelligence, and has nothing to do with reviewing code.
The second way is an audit trail. An audit trail is a record of every change made to the code: what was changed, who changed it, and when. It helps in two ways. When a fault turns up, the team can trace it back to the change that caused it, and the person who made it. And because every change is recorded, each programmer is accountable for their own work, so they tend to take more care. An audit trail prevents nothing by itself. It records, so mistakes can be found and people can be held to account. After an update to an app, users find that their saved passwords are showing up for other people. Explain how an audit trail helps the team, and why it makes programmers more careful. The team searches the record for the change that touched how log-in details are stored, sees who made it and when, and fixes that change. Every programmer knows each change is logged against a name, so people check before committing. The two methods do different jobs. A code review reads the code, looking for weaknesses. An audit trail records the changes, so a weakness can be traced. Neither one is the same as writing validation into the program. One examiner's report shows why that line matters. "Audit trails were frequently confused with robust programming techniques and code reviews." So naming the audit trail is only the start. Add how the record is used, to trace a fault back to its change, and the accountability it brings.
That program from the start, the one that works and still lets strangers in, sits behind each of the four questions that follow. In one sentence, what is a vulnerability in software? A weakness someone could exploit to get in, to steal or damage data, or to make the program fail. Now: an app uses a free login library nobody checked. Which kind of vulnerability? Bad programming practice, an unvalidated third-party library. Nobody knows what flaws that code carries. Now: which method reads the code, and which records the changes to it? A code review reads the code. An audit trail records each change, who made it and when. Another: a code-scanning tool misses a brand-new kind of attack. Why did it miss it? An automated review finds only the problems it was programmed to look for, and this one was new to it.
Treat the thumbs-up as a tick on your own checklist. If you could explain both methods and what each one finds, you have fully understood it, so mark it. If you could not, nobody gets this first time. Save it, and leave the thumb off until it holds.
Next in the chapter: High-level and low-level languages, where the chapter turns from what software does to how it is written.
For more, visit scholafly.com, or watch the next video.
Related terms
For: Edexcel GCSE 1CP2
On the specification
| Board | Spec | Statement |
|---|---|---|
| Edexcel GCSE 1CP2 | 3.2.3 | Explain the importance of developing robust software and the methods of identifying vulnerabilities, including audit trails and code reviews. |
For teachers
This GCSE Computer Science lesson teaches robust software and finding vulnerabilities. By the end, students should be able to explain why software must be robust - free from vulnerabilities before it is released - name the kinds of vulnerability that make it fragile, and describe how audit trails and code reviews each help identify vulnerabilities, including one disadvantage of each kind of code review and the accountability an audit trail brings. It works through four worked examples and the mistakes examiners report, and suits Foundation and Higher tier students.