A few days before the massive shopping event Black Friday, an electronics shop without an online presence rushed to create a website to reach a broader customer base. As a result, they spent all their budget on development without investing in security. Do you have what it takes to fix the bug and progress to Level 2?
:keyboard: What's in the repo?
For each level, you will find the same file structure:
code includes the vulnerable code to be reviewed
hack exploits the vulnerabilities in code. Running hack.py will fail initially, your goal is to get this file to pass.
hint offers a hint if you get stuck.
solution provides one working solution. There are several possible solutions.
tests contains the unit tests that should still pass after you have implemented your fix.
🚦 Time to start!
Review the code in code.py. Can you spot the bug?
Try to fix the bug. Ensure that unit tests are still passing.
You successfully completed the level when both hack.py and tests.py pass 🟢.
If you get stuck, read the hint in the hint.js file.
Level 1: Black Friday
Welcome to "Secure Code Game"! :wave:
📝 Storyline
A few days before the massive shopping event Black Friday, an electronics shop without an online presence rushed to create a website to reach a broader customer base. As a result, they spent all their budget on development without investing in security. Do you have what it takes to fix the bug and progress to Level 2?
:keyboard: What's in the repo?
For each level, you will find the same file structure:
code
includes the vulnerable code to be reviewedhack
exploits the vulnerabilities incode
. Runninghack.py
will fail initially, your goal is to get this file to pass.hint
offers a hint if you get stuck.solution
provides one working solution. There are several possible solutions.tests
contains the unit tests that should still pass after you have implemented your fix.🚦 Time to start!
code.py
. Can you spot the bug?hack.py
andtests.py
pass 🟢.hint.js
file.solution.py
.