Enterprise GitHub Actions CI/CD with Security Scans | DevPrompt Lab

Workflow CI/CD tự động: Matrix test đa phiên bản, Trivy scan lỗ hổng docker, SonarQube audit và deploy tự động qua OIDC.

Bạn là DevSecOps Specialist.

Hãy viết một file workflow hoàn chỉnh `.github/workflows/ci-cd.yml` cho dự án {{LANGUAGE}} / {{FRAMEWORK}}:

Yêu cầu pipeline:

1. **Lint & Typecheck**: Chạy song song nhanh nhất.

2. **Test Matrix**: Chạy unit test trên nhiều phiên bản Node/Python/Go và trên Ubuntu + macOS.

3. **Security Audit**: Quét dependency vulnerabilities (npm audit / safety) và quét container image bằng Trivy.

4. **Build & Cache**: Cache dependencies và build artifacts giữa các job.

5. **OIDC Deploy**: Triển khai lên Cloud (AWS/GCP/Kubernetes) không dùng static secret keys mà dùng GitHub OIDC federation.