These labs were designed to support the course “Developing Secure Software” (LFD121).
These simple lab exercises help you learn how to develop secure software. They run on your local web browser, so you don’t need to install anything or log into a remote system. You’ll be writing snippets of code on a web page.
Many labs compare your attempt against a pattern for an expected correct answer. We expect you to write your answer in a simple and clear way that matches the style of any surrounding code. In many cases, you can find an obscure way to write code that would produce the correct result yet not be considered correct. For example, instead of writing 1, you could write (5-4) or 0x1. We believe it’s defensible that these other answers are incorrect. We are looking for simple and clear code, not just code that would produce the correct answer. If you believe that an answer should be accepted as correct, please raise an issue on GitHub identifying the problem, the answer you think should also be accepted, and why you think it should be accepted.
Note: If a section has a quiz and one or more labs, we’ll present the quiz first. This order is intentional. Quizzes help make sure you can recognize a correct answer, while labs help you create a correct answer. Recognizing a correct answer can be a first step towards creating your own.