A complete end-to-end DevSecOps implementation using GitLab CI/CD integrated with security scanning tools, Kubernetes, Argo CD, Argo Rollouts, and AWS EKS.
This project demonstrates a practical DevSecOps workflow where application code, infrastructure, and Kubernetes deployment manifests are continuously validated for security and compliance before deployment.
The solution incorporates:
- GitLab CI/CD
- Docker
- Kubernetes
- Amazon EKS
- SonarQube
- Gitleaks
- Trivy
- Checkov
- Argo CD
- Argo Rollouts
- Terraform
- GitOps Deployment Model
- Blue-Green Deployment Strategy
Developer Commit
│
▼
GitLab Repository
│
▼
GitLab CI/CD Pipeline
│
┌──────┼─────────────────────────────┐
│ │ │ │
▼ ▼ ▼ ▼
Gitleaks SonarQube Checkov Docker Build
Secrets SAST IaC Scan
Scan
│
▼
Kubernetes Manifests
│
▼
Argo CD
│
▼
Argo Rollouts
│
▼
Blue-Green Deployment
│
▼
AWS EKS
| Tool | Purpose |
|---|---|
| GitLab CI/CD | Continuous Integration & Delivery |
| Docker | Containerization |
| Kubernetes | Container Orchestration |
| AWS EKS | Managed Kubernetes Service |
| SonarQube | Static Application Security Testing (SAST) |
| Gitleaks | Secret Detection |
| Checkov | Infrastructure as Code Security Scanning |
| Trivy | Container Vulnerability Scanning |
| Argo CD | GitOps Continuous Delivery |
| Argo Rollouts | Progressive Delivery & Blue-Green Deployments |
| Terraform | Infrastructure Provisioning |
.
├── app.js
├── Dockerfile
├── main.tf
├── sonar-project.properties
├── .gitlab-ci.yml
├── application.yaml
│
├── k8s-manifests
│ ├── deployment.yaml
│ ├── rollout.yaml
│ ├── service.yaml
│ ├── service-active.yaml
│ ├── service-preview.yaml
│ └── ingress.yaml
│
├── secrets.env
├── aws-secret.txt
└── README.md
Gitleaks scans the repository for:
- Hardcoded passwords
- AWS Access Keys
- API Tokens
- Credentials
- Sensitive information
Example:
git_leaks:
stage: securitySonarQube performs:
- Code quality analysis
- Security hotspot detection
- Vulnerability identification
- Technical debt analysis
Example:
sonarqube_scan:
stage: securityCheckov scans Terraform and Kubernetes manifests for:
- Misconfigurations
- Compliance violations
- Public exposure risks
- Insecure IAM policies
Example:
checkov_scan:
stage: securityTrivy scans:
- Container images
- Operating system packages
- Dependencies
- Vulnerabilities
Example:
trivy-scan:
stage: securityApplication images are built using Docker.
Example:
docker-build:
stage: buildThis project demonstrates GitOps-based deployment using Argo CD.
Argo CD continuously monitors Kubernetes manifests stored in Git and automatically synchronizes the desired state to the Kubernetes cluster.
Developer Updates Kubernetes Manifest
│
▼
GitLab Repository
│
▼
Argo CD Detects Change
│
▼
Application OutOfSync
│
▼
Auto Sync
│
▼
AWS EKS Deployment
- Declarative Deployments
- Automatic Synchronization
- Self-Healing
- Drift Detection
- Git as Single Source of Truth
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nginx-demo
namespace: argocd
spec:
project: default
source:
repoURL: <gitlab-repository>
targetRevision: argocd-deployment
path: k8s-manifests
destination:
server: https://kubernetes.default.svc
namespace: default
syncPolicy:
automated:
prune: true
selfHeal: trueThis project implements Blue-Green deployment using Argo Rollouts integrated with Argo CD on Amazon EKS.
Developer Updates Image Version
│
▼
GitLab Repository
│
▼
Argo CD Sync
│
▼
Argo Rollouts Creates
Preview Environment
│
▼
Validation Testing
│
▼
Manual Promotion
│
▼
Traffic Switch
│
▼
Production Release
- Zero Downtime Deployments
- Preview Environment Validation
- Manual Promotion Approval
- Instant Rollback Capability
- Traffic Switching
- Kubernetes Native Progressive Delivery
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: nginx-demo
spec:
strategy:
blueGreen:
activeService: nginx-active
previewService: nginx-preview
autoPromotionEnabled: falseThe application is deployed to Amazon EKS using Kubernetes manifests.
Deployment Components:
- Deployment
- Rollout
- Service
- Ingress
- Namespace
- Containerized Application
Benefits:
- High Availability
- Scalability
- Declarative Infrastructure
- Cloud-Native Deployment Model
| Security Area | Implementation |
|---|---|
| Secret Detection | Gitleaks |
| SAST | SonarQube |
| IaC Security | Checkov |
| Container Security | Trivy |
| GitOps Deployment | Argo CD |
| Progressive Delivery | Argo Rollouts |
| Kubernetes Deployment | Amazon EKS |
| Infrastructure Provisioning | Terraform |
This project integrates with Amazon EKS for Kubernetes deployment.
Features:
- Managed Kubernetes Control Plane
- Secure Cluster Deployment
- Load Balancer Integration
- Auto Scaling Support
- Cloud-Native Application Hosting
- End-to-End DevSecOps Pipeline
- Shift-Left Security
- GitOps Deployment Model
- Blue-Green Deployment Strategy
- Progressive Delivery
- Infrastructure as Code
- Kubernetes Security Best Practices
- CI/CD Automation
- Automated Security Gates
- Cloud-Native Architecture
git clone https://github.com/<your-github-username>/<repository-name>.gitterraform init
terraform plan
terraform applykubectl get nodeskubectl apply -f application.yamlkubectl get applications -n argocd
kubectl get podsSuccessfully implemented and validated Blue-Green deployment using Argo Rollouts and Argo CD.
kubectl argo rollouts get rollout nginx-demo -n default
kubectl argo rollouts promote nginx-demo -n default
kubectl argo rollouts undo nginx-demo -n default
kubectl argo rollouts dashboardVersion 1 (Blue)
│
▼
Version 2 (Green Preview)
│
▼
Manual Promotion
│
▼
Traffic Switch
│
▼
Version 2 Production
- Hardcoded Secrets
- API Tokens
- AWS Credentials
- Password Exposure
- Code Smells
- Security Hotspots
- Maintainability Issues
- Vulnerability Detection
- Terraform Misconfigurations
- Security Group Violations
- IAM Policy Issues
- Kubernetes Security Checks
- Container Vulnerabilities
- Dependency Risks
- Critical CVEs
- High Severity Findings
This project demonstrates practical experience with:
- DevSecOps
- GitLab CI/CD
- Kubernetes
- AWS EKS
- GitOps
- Argo CD
- Argo Rollouts
- Blue-Green Deployments
- Progressive Delivery
- Terraform
- Container Security
- Infrastructure Security
- Security Automation
- Cloud Native Tooling
- ECR Image Push
- Automated Image Tag Updates
- Helm-Based Deployments
- Multi-Environment GitOps
- Prometheus & Grafana Monitoring
- Kyverno Policies
Shrini
DevOps / DevSecOps Engineer