All Good Validation
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m30s
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Successful in 1m30s
This commit is contained in:
@@ -22,31 +22,7 @@ app.get('/about', (req, res) => res.sendFile(path.join(__dirname, '../frontend/a
|
||||
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>
|
||||
`);
|
||||
});*/
|
||||
|
||||
app.get('/api/calculate', (req, res) => {
|
||||
const mathExpression = req.query.expr || '2+2';
|
||||
|
||||
// VULNERABILIDADE CRÍTICA: O eval() executa qualquer código cego que o utilizador envie
|
||||
const result = eval(mathExpression);
|
||||
|
||||
res.json({ result: result });
|
||||
});
|
||||
|
||||
// Configuração do transporte de E-mail (Mocks de teste vs Produção)
|
||||
let transporter;
|
||||
|
||||
Reference in New Issue
Block a user