feat: adiciona nova funcionalidade (com erro oculto) #7

Merged
pm merged 39 commits from teste-bloqueio into main 2026-06-12 23:26:15 +00:00
2 changed files with 11 additions and 5 deletions
Showing only changes of commit c234771d28 - Show all commits
+10 -4
View File
@@ -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
@@ -91,7 +97,7 @@ jobs:
echo ">>> Publicando Relatório ZAP no servidor Web..."
docker cp qatests/report.html portal-corporativo:/usr/src/app/frontend/zap-report.html || true
- name: 7. Archive ZAP Report (Gitea Artifacts)
if: always()
uses: actions/upload-artifact@v3
+1 -1
View File
@@ -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); });