deploy atualizado; test correto
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 8s
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 8s
This commit is contained in:
@@ -17,6 +17,12 @@ jobs:
|
||||
- name: 1. Build Application Image
|
||||
run: docker build -f backend/Dockerfile -t apex-solutions:latest .
|
||||
|
||||
- name: 1.5. Run Unit Tests (Lógica de Negócio)
|
||||
run: |
|
||||
echo ">>> A instalar dependências e correr testes..."
|
||||
npm ci
|
||||
npm test
|
||||
|
||||
# ==========================================
|
||||
# ETAPAS ESTÁTICAS DE SEGURANÇA SEPARADAS
|
||||
# ==========================================
|
||||
@@ -24,12 +30,12 @@ jobs:
|
||||
- name: 2. Secret Scanning (Gitleaks)
|
||||
run: |
|
||||
curl -sL https://github.com/gitleaks/gitleaks/releases/download/v8.18.2/gitleaks_8.18.2_linux_x64.tar.gz | tar -xz -C /tmp
|
||||
/tmp/gitleaks detect --source . --verbose --redact --exit-code 1 || echo "[ALERTA] Credenciais detetadas! Ignorado temporariamente."
|
||||
/tmp/gitleaks detect --source . --verbose --redact --exit-code 1
|
||||
|
||||
- name: 3. Software Composition Analysis (Trivy)
|
||||
run: |
|
||||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
||||
trivy image --severity HIGH,CRITICAL apex-solutions:latest || echo "[ALERTA] Vulnerabilidades de infraestrutura encontradas!"
|
||||
trivy image --severity HIGH,CRITICAL apex-solutions:latest
|
||||
|
||||
- name: 4. Static Application Security Testing (SonarQube)
|
||||
run: |
|
||||
@@ -40,7 +46,7 @@ jobs:
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.host.url=https://sonar.each-cs.com \
|
||||
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \
|
||||
-Dsonar.qualitygate.wait=true || echo "[ALERTA] SonarQube falhou no Quality Gate."
|
||||
-Dsonar.qualitygate.wait=true
|
||||
|
||||
# ==========================================
|
||||
# ETAPAS DINÂMICAS E DEPLOY
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
test('Pipeline flow: 1 + 1 deve ser 2', () => { expect(1 + 1).toBe(); });
|
||||
test('Pipeline flow: 1 + 1 deve ser 2', () => { expect(1 + 1).toBe(2); });
|
||||
|
||||
Reference in New Issue
Block a user