Skip to content

Instantly share code, notes, and snippets.

CI/CD Pipeline in GitLab

In this guide, we will walk through setting up a standard DevOps pipeline in GitLab, using a hands-on example repository. This guide will help you understand the basic structure and workflow of a CI/CD pipeline without any security testing.

1. Create an Example Repository

First, create an example repository in GitLab. This repository should contain the same files as your Docker hands-on demo.

2. Understand the .gitlab-ci.yml File

The main file for managing your DevOps pipelines in GitLab is the .gitlab-ci.yml file. This file uses YAML syntax to define the stages and jobs of your pipeline.

Terraform

Here's a set of instructions for working with Terraform and testing Terraform code:

How to Use Terraform and Test Terraform Code

1. Prepare Terraform Configuration:

  • Create a Terraform file (e.g., main.tf) with necessary provider and resource configurations terraform {

SCA Software Composition Analysis

Here's a set of instructions for running Software Composition Analysis (SCA) using Snyk: First of all cd juice-shop cd frontend nano package.json add "lodash": "0.5.0" (This is a malicious package) How to Run Software Composition Analysis with Snyk

Kubernetes

Here's a summary of the transcript as a set of instructions for working with Kubernetes using Minikube and testing Kubernetes YAML files: Enable systemd on wsl 1st https://gist.github.com/djfdyuruiry/6720faa3f9fc59bfdf6284ee1f41f950 Download microk8s sudo snap install microk8s --classic --channel=1.31

How to Work with Kubernetes Using Minikube and Test Kubernetes YAML

DAST

Here's a summary of a how-to guide for running dynamic application security testing (DAST) using OWASP ZAP:

How to Run Dynamic Application Security Testing with OWASP ZAP

1. Set up a target application:

SAST Testing

VM Configuration

  • Allocate 128 MB VRAM.
  • Provide 2 vCPUs to a guest OS.
  • Disable 3D Acceleration.
  • At least 2 GB of memory.