SonarQube Validation
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 46s
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 46s
This commit is contained in:
@@ -22,6 +22,15 @@ 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('/careers', (req, res) => res.sendFile(path.join(__dirname, '../frontend/careers.html')));
|
||||||
app.get('/contact', (req, res) => res.sendFile(path.join(__dirname, '../frontend/contact.html')));
|
app.get('/contact', (req, res) => res.sendFile(path.join(__dirname, '../frontend/contact.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)
|
// Configuração do transporte de E-mail (Mocks de teste vs Produção)
|
||||||
|
|||||||
Reference in New Issue
Block a user