This is part of the course DevSecOps. You will cover two ways of including SAST in your development process.
- Click on Use this template to create a new repository in your GitHub account (don't fork it), and make sure to set the visibility to "Public".
- The GitHub actions should run automatically and be green.
- In
.github/workflows/sast.yml
, uncomment the block labeled "Version 1" to enable Bandit.- After the next successful run of the GitHub actions, you should now see two security issues being reported.
- Install (if you don't have it already) and open Visual Studio Code
- Install the "pre-commit" Extension, by Adrian Figueroa
- Clone your project into Visual Studio Code.
- Open a new terminal in Visual Studio, run
pre-commit install
to install the pre-commit hook- If
pre-commit
is not yet installed, runbrew install pre-commit
(if you havebrew
installed) orpip3 install pre-commit
(otherwise)
- If
- Add a comment line to
app.py
- Run
git add app.py && git commit -m "Update app.py"
and see the commit fail with two security issues