diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index f8607dd..e23cfae 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -123,7 +123,7 @@ jobs: customHeaders: '{"Accept": "application/json", "Authorization": "Bearer ${{ secrets.RENDER_API_KEY }}"}' - name: Sentry Release (Staging) - uses: getsentry/action-release@v1 + uses: getsentry/action-release@v2 env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: ${{ secrets.SENTRY_ORG }} @@ -132,7 +132,7 @@ jobs: environment: staging version: ${{ github.sha }} set_commits: auto - extra_args: --ignore-missing + ignore_missing: true deploy-prod: @@ -153,7 +153,7 @@ jobs: customHeaders: '{"Accept": "application/json", "Authorization": "Bearer ${{ secrets.RENDER_API_KEY }}"}' - name: Sentry Release (Production) - uses: getsentry/action-release@v1 + uses: getsentry/action-release@v2 env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: ${{ secrets.SENTRY_ORG }} @@ -162,7 +162,7 @@ jobs: environment: production version: ${{ github.sha }} set_commits: auto - extra_args: --ignore-missing + ignore_missing: true #set to true notify: diff --git a/README.md b/README.md index e733c6f..c592f89 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,25 @@ -FullStack DevSecOps Demo +# π FullStack DevSecOps Demo -A production-grade fullstack pipeline showcasing modern DevSecOps practices β from secure CI/CD, to observability, to Infrastructure-as-Code (IaC). +A production-grade fullstack pipeline showcasing modern DevSecOps practices β from secure CI/CD to observability and Infrastructure-as-Code (IaC). This project demonstrates how to take a simple Node.js/Express app and wrap it with a battle-tested DevSecOps workflow used in real companies. -This project demonstrates how to take a simple Node.js/Express app and wrap it with a battle-tested DevSecOps workflow used in real companies. +## π Highlights -π Highlights +- **CI/CD Pipeline**: GitHub Actions with linting, testing, dependency audits, Docker builds, Trivy scans, Gitleaks, CodeQL, Checkov & Terrascan +- **Secure Containerization**: Hardened Dockerfiles with non-root users and HEALTHCHECK instructions +- **Runtime Security**: Gitleaks (secret scanning), CodeQL (static analysis), npm audit (dependency vulnerabilities) +- **Observability Stack**: + - Prometheus for metrics collection + - Grafana dashboards (CPU %, memory, HTTP request rates, error rate, latency) + - Alertmanager + Slack for real-time alerts + - Sentry for application-level error monitoring and release tracking +- **Environments**: + - Staging: auto-deploy on `develop` + - Production: auto-deploy on `main` +- **IaC Versioning**: Full `render.yaml` and Helm manifests for portability to Kubernetes (k3s, GKE, EKS) +## ποΈ Architecture -CI/CD Pipeline: GitHub Actions with linting, testing, dependency audits, Docker builds, Trivy scans, Gitleaks, CodeQL, Checkov & Terrascan. - - -Secure Containerization: Hardened Dockerfiles with non-root users and HEALTHCHECK instructions. - - -Runtime Security: Gitleaks (secret scanning), CodeQL (static analysis), npm audit (dependency vulnerabilities). - - -Observability Stack: - -Prometheus for metrics collection - -Grafana dashboards (CPU %, memory, HTTP request rates, error rate, latency) - -Alertmanager + Slack for real-time alerts - -Sentry for application-level error monitoring and release tracking - - -Environments: - -Staging: auto-deploy on develop - -Production: auto-deploy on main - - -IaC Versioning: Full render.yaml and Helm manifests for portability to Kubernetes (k3s, GKE, EKS). - -ποΈ Architecture - -``` +```mermaid flowchart TD A[GitHub Push] -->|GitHub Actions| B[CI/CD Pipeline] B -->|Docker Build + Scan| C[Docker Hub] @@ -48,7 +29,6 @@ flowchart TD F --> G[Grafana Dashboards] F --> H[Alertmanager -> Slack] E -->|Errors| I[Sentry] - ``` π CI/CD Workflow @@ -89,12 +69,11 @@ Notify Slack messages for staging/prod deployments with build status - π Observability Prometheus -Scrapes app /metrics endpoint (via prom-client). +Scrapes app /metrics endpoint (via prom-client) Collects: @@ -104,7 +83,6 @@ http_requests_total counter Latency histogram - Grafana Preprovisioned dashboards: @@ -119,10 +97,9 @@ HTTP requests/sec 95th percentile latency - Alertmanager -Sends alerts to Slack via webhook. +Sends alerts to Slack via webhook Starter rules: @@ -130,15 +107,13 @@ CPU > 80% for 2 minutes Error rate > 5% over 5 minutes - Sentry -Captures unhandled exceptions. +Captures unhandled exceptions -Tied to GitHub Actions release versions. - -Shows βDeployed to Staging/Prodβ in release timeline. +Tied to GitHub Actions release versions +Shows "Deployed to Staging/Prod" in release timeline π³ Docker Hardening @@ -150,7 +125,6 @@ Non-root user execution Minimal base images (node:18-alpine, alpine:3.20, etc.) - βΈοΈ Kubernetes (Future-Ready) Helm charts included for: @@ -189,38 +163,47 @@ Push to develop β staging deploy Merge to main β production deploy -π Repo Structure +π Repository Structure ``` -. -βββ src/ # Node.js app (Express + Sentry + Prometheus metrics) -βββ infra/ # Infra services +βββ src/ # Node.js app (Express + Sentry + Prometheus metrics) +βββ infra/ # Infra services β βββ prometheus/ β βββ grafana/ β βββ alertmanager/ -βββ helm/ # Helm charts for k8s migration -βββ .github/workflows/ # CI/CD pipelines -βββ render.yaml # Render IaC config -βββ Dockerfile # App Dockerfile +βββ helm/ # Helm charts for k8s migration +βββ .github/workflows/ # CI/CD pipelines +βββ render.yaml # Render IaC config +βββ Dockerfile # App Dockerfile ``` +π― Why This Matters -Why This Matters +Feature Benefit -β Full DevSecOps pipeline: not just CI/CD, but integrated security, monitoring, and alerting. +Full DevSecOps pipeline Not just CI/CD, but integrated security, monitoring, and alerting -β Cloud-native ready: Helm charts β easy migration to Kubernetes. +Cloud-native ready Helm charts β easy migration to Kubernetes -β Production realism: covers error tracking, observability, secrets management, IaC scanning. +Production realism Covers error tracking, observability, secrets management, IaC scanning -β Team collaboration: Slack notifications + Sentry releases β transparent deployments. +Team collaboration Slack notifications + Sentry releases β transparent deployments -β Hands-on expertise across Node.js, Docker, GitHub Actions, Sentry, Prometheus, Grafana, Alertmanager, Checkov, Terrascan, Render, Helm. +Hands-on expertise End-to-end experience across modern DevSecOps toolchain -This repo is my portfolio centerpiece: a showcase of how Iβd run secure, observable, cloud-ready software delivery in a real engineering org. - +This repo serves as my portfolio centerpiece: a showcase of how I'd run secure, observable, cloud-ready software delivery in a real engineering organization. π¬ Contact -If youβre interested in how I can bring end-to-end DevSecOps expertise to your team. \ No newline at end of file +Interested in how I can bring end-to-end DevSecOps expertise to your team? Let's connect! + +