32 Commits

Author SHA1 Message Date
pm 560e5ea94a all good v2
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m33s
2026-06-18 16:39:46 +01:00
pm 211d03189a all good
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m32s
2026-06-18 16:32:01 +01:00
pm 48c768ef00 owasp zap v4
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 1m38s
2026-06-18 16:27:08 +01:00
pm c897cd4858 owasp zap v3
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m33s
2026-06-18 16:20:23 +01:00
pm 5e09e812c3 owasp zap v2
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 1m33s
2026-06-18 16:14:12 +01:00
pm 0133159c0f trivy owasp zap v1
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m33s
2026-06-18 16:11:39 +01:00
pm 9e582170dc trivy sonarqube v1
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 48s
2026-06-18 16:07:08 +01:00
pm 09f3c5c97b trivy validation v1
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 31s
2026-06-18 16:00:39 +01:00
pm f8a53f0d2f gitleak validation v1
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 25s
2026-06-18 15:55:53 +01:00
pm 9cf7b1b4d1 Merge pull request 'Gitleaks Validation' (#25) from validation_stage into main
DevSecOps Enterprise Pipeline / security-gate-and-deploy (push) Successful in 1m38s
Reviewed-on: #25
2026-06-16 15:34:29 +00:00
pm f386e25432 All Good
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m33s
2026-06-16 16:28:46 +01:00
pm a213cc9482 OWASP ZAP Validation v2
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 1m33s
2026-06-16 16:09:04 +01:00
pm c63239e7ee OWASP ZAP Validation
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 59s
2026-06-16 16:02:41 +01:00
pm 35260c3717 SonarQube Validation
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 46s
2026-06-16 01:34:41 +01:00
pm a6a7f3b0b5 All Good Validation
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m30s
2026-06-16 01:24:40 +01:00
pm 0d221313e9 SonarQube Validation v6
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 45s
2026-06-16 01:17:02 +01:00
pm 5929b935c1 SonarQube Validation v5
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 10s
2026-06-16 01:14:24 +01:00
pm 414ebd29ad SonarQube Validation v4
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 10s
2026-06-16 01:12:10 +01:00
pm 2ddbf37ca2 SonarQube Validation v3
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 45s
2026-06-16 00:45:39 +01:00
pm e9e243ee42 SonarQube Validation v2
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 9s
2026-06-16 00:42:29 +01:00
pm fd94417c8d SonarQube Validation
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 13s
2026-06-16 00:40:19 +01:00
pm 6fc77e5569 Trivy Validation v3 [fixed]
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 31s
2026-06-16 00:04:56 +01:00
pm c7e505765a Trivy Validation v2 [fixed]
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Has been cancelled
2026-06-16 00:01:55 +01:00
pm 4fc7cb055f Trivy Validation
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Has been cancelled
2026-06-16 00:00:12 +01:00
pm fb337cfe01 Unit Tests Validation
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 10s
2026-06-15 23:50:35 +01:00
pm 021e844a4a Gitleaks Validation v2
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 11s
2026-06-15 23:33:53 +01:00
pm 1b301f879c Gitleaks Validation v2
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Has been cancelled
2026-06-15 23:31:02 +01:00
pm f354755871 Gitleaks Validation
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m33s
2026-06-15 22:30:23 +01:00
pm 3f46bbebf7 Merge pull request 'test ci/cd titulo v3' (#24) from teste-bloqueio into main
DevSecOps Enterprise Pipeline / security-gate-and-deploy (push) Successful in 1m31s
Reviewed-on: #24
2026-06-13 14:18:39 +00:00
pm 139ef63129 test ci/cd titulo v3
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m31s
2026-06-13 15:15:37 +01:00
pm 21123e6149 Merge pull request 'test ci/cd titulo v2' (#23) from teste-bloqueio into main
DevSecOps Enterprise Pipeline / security-gate-and-deploy (push) Successful in 1m42s
Reviewed-on: #23
2026-06-13 14:07:33 +00:00
pm 6e36250d69 test ci/cd titulo v2
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m30s
2026-06-13 15:04:38 +01:00
6 changed files with 10 additions and 83 deletions
+3 -18
View File
@@ -46,7 +46,6 @@ jobs:
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
- name: 5. Dynamic Security Scan (OWASP ZAP)
# REMOVIDO o "if: github.event_name == 'push'". Agora o ZAP corre SEMPRE (nos PRs e nos Merges)!
run: |
echo ">>> 1. Limpeza profunda do ambiente..."
docker rm -f apex-sandbox zap-scanner || true
@@ -96,17 +95,7 @@ jobs:
exit 0
fi
- name: 6.1. Enviar Relatório ZAP para o Servidor (SCP)
if: github.event_name == 'push'
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "qatests/report.html"
target: "/tmp"
- name: 6.2. Deploy em Produção (SSH)
- name: 6. Deploy em Produção (SSH)
if: github.event_name == 'push'
uses: appleboy/ssh-action@master
with:
@@ -114,6 +103,8 @@ jobs:
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
set -e
echo ">>> 1. A navegar para a pasta do projeto no servidor..."
cd /storage/docker/website-secure
@@ -121,18 +112,12 @@ jobs:
git pull origin main
echo ">>> 3. A compilar a imagem Docker de Produção..."
# Compilamos a imagem com a tag :prod para ficar bem identificada
docker build -f backend/Dockerfile -t apex-solutions:prod .
echo ">>> 4. A substituir o contentor em execução..."
# Removemos o contentor antigo e subimos o novo na porta 3000
docker rm -f portal-corporativo || true
docker run -d -p 3000:3000 --name portal-corporativo --restart unless-stopped apex-solutions:prod
echo ">>> 5. A publicar o relatório de segurança transparente..."
sleep 5
docker cp /tmp/qatests/report.html portal-corporativo:/usr/src/app/frontend/zap-report.html || true
echo "✅ Deploy concluído com sucesso! A aplicação está no ar."
- name: 7. Archive ZAP Report
+5 -18
View File
@@ -13,31 +13,18 @@ app.use(cors());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
// Serve a pasta frontend
app.use(express.static(path.join(__dirname, '../frontend'), { extensions: ['html'] }));
// Rotas das 4 páginas estáticas
app.get('/', (req, res) => res.sendFile(path.join(__dirname, '../frontend/index.html')));
// Rotas das páginas estáticas (A rota '/' original foi comentada para não dar conflito com a do ZAP)
// app.get('/', (req, res) => res.sendFile(path.join(__dirname, '../frontend/index.html')));
app.get('/about', (req, res) => res.sendFile(path.join(__dirname, '../frontend/about.html')));
app.get('/careers', (req, res) => res.sendFile(path.join(__dirname, '../frontend/careers.html')));
app.get('/contact', (req, res) => res.sendFile(path.join(__dirname, '../frontend/contact.html')));
// ==========================================
// VULNERÁVEL (OWASP ZAP)
// ==========================================
/*app.get('/api/search', (req, res) => {
const termo = req.query.q || '';
// A vulnerabilidade crítica: devolver o input diretamente no HTML
res.send(`
<html>
<head><title>Resultados</title></head>
<body>
<h1>Resultados para: ${termo}</h1>
<a href="/">Voltar</a>
</body>
</html>
`);
});*/
// O eval() FOI REMOVIDO DAQUI PARA O SONARQUBE NÃO BLOQUEAR!
// Configuração do transporte de E-mail (Mocks de teste vs Produção)
let transporter;
+1 -1
View File
@@ -33,7 +33,7 @@
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-24 lg:py-32">
<h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl">
<span class="block">Innovative Solutions for</span>
<span class="block text-blue-600">Modern Busines - Test CI/CD</span>
<span class="block text-blue-600">Modern website-secure</span>
</h1>
<p class="mt-6 max-w-2xl text-lg text-gray-500 leading-relaxed">
At Apex Solutions, we deliver high-quality business consulting, technology services, and strategic insights. We help organizations across the globe achieve their goals through operational excellence and digital transformation.
-37
View File
@@ -11,7 +11,6 @@
"dependencies": {
"cors": "^2.8.5",
"express": "^4.18.2",
"lodash": "4.17.15",
"nodemailer": "^8.0.11"
},
"devDependencies": {
@@ -1308,9 +1307,6 @@
"arm64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1325,9 +1321,6 @@
"arm64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1342,9 +1335,6 @@
"loong64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1359,9 +1349,6 @@
"loong64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1376,9 +1363,6 @@
"ppc64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1393,9 +1377,6 @@
"riscv64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1410,9 +1391,6 @@
"riscv64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1427,9 +1405,6 @@
"s390x"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1444,9 +1419,6 @@
"x64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1461,9 +1433,6 @@
"x64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -3900,12 +3869,6 @@
"node": ">=8"
}
},
"node_modules/lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"license": "MIT"
},
"node_modules/lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+1
View File
@@ -18,6 +18,7 @@
"cors": "^2.8.5",
"express": "^4.18.2",
"nodemailer": "^8.0.11"
},
"devDependencies": {
"jest": "^30.4.2",
-9
View File
@@ -36,15 +36,6 @@ describe('Enterprise Application Flow & API Validation', () => {
expect(response.status).toBe(404);
});
/*// OWASP ZAP (/api/search)
it('Should reflect the search query in the HTML response (/api/search) - Vulnerable to XSS', async () => {
const maliciousPayload = '<script>alert("ZAP")</script>';
const response = await request(app).get(`/api/search?q=${maliciousPayload}`);
expect(response.status).toBe(200);
// Verifica se o payload é refletido exatamente como entrou (confirmando a vulnerabilidade)
expect(response.text).toContain(`Resultados para: ${maliciousPayload}`);
});*/
});
// ==========================================