owasp zap v4
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 1m38s

This commit is contained in:
2026-06-18 16:27:08 +01:00
parent c897cd4858
commit 48c768ef00
+11 -1
View File
@@ -15,9 +15,19 @@ app.use(express.urlencoded({ extended: true }));
app.get('/', (req, res) => {
res.send(`
<html>
<body>
<h1>ISTEC - ERSI</h1>
<a href="/api/search?q=teste">Pesquisar</a>
</body>
</html>
`);
});
app.get('/api/search', (req, res) => { app.get('/api/search', (req, res) => {
const termo = req.query.q; const termo = req.query.q;
// Vulnerabilidade Crítica: XSS Refletido
res.send(`<html><body><h1>Resultados para: ${termo}</h1></body></html>`); res.send(`<html><body><h1>Resultados para: ${termo}</h1></body></html>`);
}); });