Skip to content

feat: CI/CD pipelines, security scanning, and dependency updates#42

Merged
fenar merged 5 commits into
mainfrom
cicd-improvement
Apr 8, 2026
Merged

feat: CI/CD pipelines, security scanning, and dependency updates#42
fenar merged 5 commits into
mainfrom
cicd-improvement

Conversation

@parlakisik
Copy link
Copy Markdown
Contributor

Summary

  • CI workflow: Lint (go vet) + test (go test) all 20 Go modules and Docker build all 13 service images in parallel using matrix strategy. Runs on every PR and push to main
  • Security scanning: govulncheck on 16 Go modules + Trivy container image scan on 10 core services. Fails on CRITICAL/HIGH severity. Weekly scheduled scan + PR triggers
  • E2E integration tests: Builds full Docker Compose stack (13 services + MongoDB + NATS + Redis), runs 82-test suite. Uploads logs on failure
  • CD workflow: Builds and pushes all 13 images to GHCR on merge to main, tagged with git SHA + latest. Staging deploy placeholder ready for kubectl
  • Dependency security fixes: Updated 4 vulnerable packages across all modules resolving 30 Dependabot alerts
  • Dockerfiles upgraded: golang:1.24-alpine to golang:1.26-alpine for compatibility with updated dependencies
  • E2E test fix: CRL issuer field assertion corrected (.issuer to .issuer_id)

Security Fixes

Package Previous Updated Severity CVE
google.golang.org/grpc 1.61 1.80 CRITICAL Auth bypass via missing leading slash
go.opentelemetry.io/otel/sdk 1.24 1.43 HIGH Arbitrary code execution via PATH hijacking
google.golang.org/protobuf 1.32 1.36 MEDIUM Infinite loop in protojson.Unmarshal
golang.org/x/net 0.20 0.52 MEDIUM XSS, proxy bypass, header flood

Test plan

  • go vet clean on all 17 modules
  • go test pass on all modules
  • Docker build all 13 service images (Go 1.26)
  • E2E test suite: 44/44 pass
  • NATS event propagation: 18/18 pass
  • Circuit breaker tests: 10/10 pass
  • Rate limiter tests: 10/10 pass
  • Total: 82/82 tests pass

- Matrix strategy: lint + test 20 Go modules in parallel (13 services + 7 shared libs)
- Matrix strategy: Docker build all 13 service images in parallel
- go vet + go test on every PR and push to main
- CI Pass summary gate requires all jobs to succeed
- workflow_dispatch for manual trigger
Security scanning (security.yml):
- govulncheck on 16 Go modules in parallel matrix
- Trivy container image scan on 10 core service images
- Fails on CRITICAL/HIGH severity, ignores unfixed
- Weekly scheduled scan (Monday 6am UTC) + PR/push triggers

E2E integration tests (e2e.yml):
- Builds all 13 Docker images via make docker-build
- Spins up full stack with docker-compose (MongoDB, NATS, Redis)
- Runs 82-test suite: E2E, NATS events, circuit breaker, rate limiter
- Uploads docker logs as artifact on failure
- Triggered on PR to main

CD workflow (cd.yml):
- Builds and pushes all 13 images to GHCR on merge to main
- Tags with git SHA + latest
- Staging deploy placeholder (dry-run, ready for kubectl apply)
- Manual trigger with environment selection (staging/production)
- Only triggers on src/deploy/hack changes
- google.golang.org/grpc: 1.61→1.80 (fixes CRITICAL auth bypass CVE)
- go.opentelemetry.io/otel/sdk: 1.24→1.43 (fixes HIGH code execution CVE)
- google.golang.org/protobuf: 1.32→1.36 (fixes infinite loop CVE)
- golang.org/x/net: 0.20→0.52 (fixes XSS, proxy bypass, header flood CVEs)
- google.golang.org/api: updated for grpc compatibility

Addresses 30 Dependabot alerts (9 critical, 10 high, 11 medium)
- All 13 Dockerfiles: golang:1.24-alpine → golang:1.26-alpine
  (required by dependency update that bumped go.mod to 1.25)
- CI + security workflows: GO_VERSION 1.24 → 1.26
- E2E test: fix CRL issuer field assertion (.issuer → .issuer_id)

Validated: 82/82 tests pass (44 E2E + 18 NATS + 10 CB + 10 rate limiter)
- All 13 Dockerfiles: add apk --no-cache upgrade before ca-certificates
  install to patch CVE-2026-22184 (zlib buffer overflow, HIGH)
- Gateway: golang-jwt/jwt v5.2.1 → v5.3.1 (GO-2025-3553, memory alloc)
- Gateway: go-redis v9.7.0 → v9.18.0 (GO-2025-3540, out of order responses)
@fenar fenar merged commit 499711a into main Apr 8, 2026
64 checks passed
@parlakisik parlakisik deleted the cicd-improvement branch April 8, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants