Testing & vulnerabilities
HSC Software Engineering · Unit 1: Secure software
Testing & vulnerabilities notes
Fact-checked by a second, independent AI review.
This lesson covers identifying vulnerabilities, security testing types, common weaknesses, threat modelling, and applying secure testing within the SDLC for NSW HSC Software Engineering.
- Vulnerability vs Threat vs Risk
- Vulnerability is a weakness in code or design; threat is a potential attacker or event; risk is likelihood of exploitation with impact.
- Testing types
- Static analysis inspects code without executing it; dynamic analysis tests run-time behaviour; fuzzing feeds random/invalid input; penetration testing simulates real attacks.
- Common vulnerabilities (OWASP-like)
- Key issues include injection flaws, broken authentication, and sensitive data exposure; recognise mitigations like input validation and proper access controls.
- Threat modelling
- Identify assets, threats, and mitigations early; map how attackers could exploit weaknesses and plan countermeasures.
- Secure testing in the SDLC
- Plan security tests in the build, run security regression tests, and integrate security checks into the development pipeline.
Remember it: Think like a hacker: VAPT — Vulnerabilities, Attacks, Patches, Tests
Exam tip: Markers expect clear definitions, concrete examples, and links between testing techniques and mitigations; be able to compare static vs dynamic testing and explain how threat modelling informs test planning.
Syllabus checklist
- Testing & vulnerabilities: core ideas
- Terms and typical exam questions for "Secure software" in NSW HSC Software Engineering
Practice questions
1. What is a vulnerability in software?
Show answer
Answer: A weakness that can be exploited by an attacker. A vulnerability is a weakness that an attacker could leverage to compromise security.
2. Threat modelling helps identify assets, threats and mitigations.
Show answer
Answer: Threat modelling. Threat modelling focuses on assets, potential threats and corresponding mitigations.
3. Static analysis mostly examines source code for ___.
Show answer
Answer: security defects. Static analysis scans code to find security defects without executing the program.
4. A ____ test aims to discover unexpected inputs that crash or exploit the program.
Show answer
Answer: fuzzing. Fuzzing feeds random or malformed inputs to reveal robustness and security flaws.
5. Which practice helps prevent SQL injection attacks?
Show answer
Answer: Using prepared statements with parameter binding. Prepared statements with parameter binding separate code from data, preventing injection.

Practise testing & vulnerabilities as a game
Hearts, combos, streaks and an AI tutor that explains every answer. Start free.