Institutionalizing Shift Left Security adoption for
- Secrets Detection
- Static Application Security Testing (SAST) Scan
- Development Environment Setup
- Git Commit
- Git Branching
- Visual Studio Code
- Remote-Containers ext install ms-vscode-remote.remote-containers
- Docker
- Enable help and alias
$ source dotfiles/.alias.sh
$ ghelp
- Setup commitzen, commitlint and ggshield toolset as git hooks
$ gsetup
- Populate .env file with GITHUB_TOKEN, GITGUARDIAN_API_KEY and GITGUARDIAN_API_URL
cp .env.sample .env
Running Visual Studio Code in a Docker container using the Remote - Containers extension. Goto: https://code.visualstudio.com/docs/remote/containers-tutorial
🚀 Tool Collection
- Docker: Docker takes away repetitive, mundane configuration tasks and is used throughout the development lifecycle for fast, easy and portable application development - desktop and cloud.
- cookiecutter: A command-line utility that creates projects from cookiecutters (project templates)
- cruft: cruft allows you to maintain all the necessary boilerplate for packaging and building projects separate from the code you intentionally write. Fully compatible with existing Cookiecutter templates
- Visual Studio Code Remote - Containers Extension: Leverage Docker container as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of Visual Studio Code's full feature set.
- commitizen: Tool that guides the developer through the writing of the commit message
- commitlint: Tool that validates the commit message following a set of rules and good practices
- pre-commit: A framework for managing and maintaining multi-language pre-commit hooks
- gg-shield: CLI application that runs in your local environment or in a CI environment to help you detect more than 200 types of secrets, as well as other potential security vulnerabilities or policy breaks.
- git flow: Git extensions to provide high-level repository operations
Visual Studo Code Remote Containers extension allow us to use docker as a full-featured development environment.
Remote Containters allows us to isolate each project’s development environment with following advantages
- Reproducibility: Each developer has exactly the same workspace
- Isolation: Workspaces and their dependencies are isolated from each other
- Security: Prevents malicious dependencies from installing malware or reading your files.
Each project has a .devcontainer folder. The .devcontainer folder contains the Dockerfile and devcontainer.json configuration for the development environment.