fix(devops): resolve 4 P2 DevOps improvements (Wave 3 — TEC-263)
- DEVOPS-W-01: Add oliver006/redis_exporter to docker-compose.yml so the existing prometheus.yml scrape job (redis-exporter:9121) resolves - DEVOPS-W-04: Add redis-sentinel.yaml with Redis Sentinel HA setup (1 master StatefulSet + 2 replica StatefulSet + 3 sentinel pods) replacing the single-instance SPOF redis.yaml in staging K8s - DEVOPS-W-05: Add network-policy.yaml with default-deny-all NetworkPolicy + explicit allow rules for inter-service, Traefik ingress, Redis access, Prometheus scrape, and external egress (Neon PostgreSQL, AMQP) - DEVOPS-M-01: Add aquasecurity/trivy-action to docker-build.yml to scan every built image for CRITICAL/HIGH CVEs; results uploaded to GitHub Security tab via SARIF Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
19
.github/workflows/docker-build.yml
vendored
19
.github/workflows/docker-build.yml
vendored
@@ -112,3 +112,22 @@ jobs:
|
||||
tags: ${{ steps.tags.outputs.tags }}
|
||||
cache-from: type=registry,ref=${{ matrix.image }}:buildcache
|
||||
cache-to: type=registry,ref=${{ matrix.image }}:buildcache,mode=max
|
||||
|
||||
# EN: Scan image for vulnerabilities with Trivy (DEVOPS-M-01)
|
||||
# VI: Quet lo hong bao mat image bang Trivy (DEVOPS-M-01)
|
||||
- name: Scan ${{ matrix.service }} image for vulnerabilities
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: ${{ matrix.image }}:${{ github.sha }}
|
||||
format: 'sarif'
|
||||
output: 'trivy-results-${{ matrix.service }}.sarif'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
exit-code: '1'
|
||||
ignore-unfixed: true
|
||||
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: 'trivy-results-${{ matrix.service }}.sarif'
|
||||
category: 'trivy-${{ matrix.service }}'
|
||||
|
||||
Reference in New Issue
Block a user