From b3294390a5752ff650e5e47670ec00aa9844d66c Mon Sep 17 00:00:00 2001 From: pm Date: Sat, 13 Jun 2026 11:11:51 +0100 Subject: [PATCH] owasp zap config v15 --- .gitea/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c7702f1..453cc6f 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -91,9 +91,9 @@ jobs: docker volume rm zap-data || true echo ">>> 7. Veredicto Final da Segurança (Gatekeeper Policy)..." - # Lemos o JSON report diretamente. Se contiver a palavra "High" ou "Critical", bloqueamos! - if grep -q '"risk": "High"' qatests/report.json || grep -q '"risk": "Critical"' qatests/report.json; then - echo "🚨 ALERTA CRÍTICO: O OWASP ZAP detetou vulnerabilidades de risco HIGH/CRITICAL (ex: XSS)!" + # Lemos os relatórios gerados. O -i ignora maiúsculas/minúsculas e o -E permite múltiplas procuras. + if grep -qi 'Cross Site Scripting (Reflected)' qatests/report.html || grep -iE '"riskcode"\s*:\s*"3"|"risk"\s*:\s*"High"' qatests/report.json; then + echo "🚨 ALERTA CRÍTICO: O OWASP ZAP detetou uma vulnerabilidade de Injeção de Código (XSS)!" echo "🛑 Pipeline BLOQUEADA para proteger o ambiente de Produção." exit 1 else -- 2.52.0