36a26dac5390a6949c12688da1e62946ae9f624f
MEDIUM-SEVERITY FIXES (Fase 3 complete): 1. Mock Data em Produção (Vulnerabilidade 3.2) ✅ - Mock data apenas em desenvolvimento (import.meta.env.DEV) - Produção mostra erro claro com retry button - Estado de erro com UI profissional 2. Connection Pool Timeouts (Vulnerabilidade 3.3) ✅ - JÁ CORRIGIDO em commit anterior (20c16ab) - connectTimeout: 10s, acquireTimeout: 15s, timeout: 30s 3. Tipo 'any' em Catch Blocks (Vulnerabilidade 3.4) ✅ - TODOS os ficheiros corrigidos (10/10) - catch (error: unknown) em vez de catch (error) - Type guards: error instanceof Error - Mensagens seguras sem vazamento de stack trace - Ficheiros: routes/*.ts, services/*.ts, middleware/validation.ts 4. APIs Sem Autenticação Backend (Vulnerabilidade 3.5) ✅ - JÁ IMPLEMENTADO em commit anterior (f175682) - OIDC opcional via OIDC_ENABLED=true 5. Algoritmos SSH Legacy (Vulnerabilidade 3.6) ✅ - Adicionados: curve25519-sha256, curve25519-sha256@libssh.org - Removidos: diffie-hellman-group14-sha1 (legacy) - Removidos: diffie-hellman-group1-sha1 (INSEGURO) - Apenas SHA256+ algorithms mantidos 6. Configuração OIDC (Vulnerabilidade 3.1) ✅ - JÁ IMPLEMENTADO em commit anterior (f175682) - OIDC completamente funcional (opcional) FILES CHANGED: - src/App.tsx - Error state + mock data apenas em dev - api/routes/*.ts - Tipos unknown em todos os catch blocks - api/services/*.ts - Tipos unknown em todos os catch blocks - api/middleware/validation.ts - Tipo correto (error.issues) - api/services/server-metrics.ts - Algoritmos SSH modernos BUILD STATUS: - TypeScript: ✅ PASSED - npm run build: ✅ SUCCESS - npm audit: ✅ 0 vulnerabilities PROGRESS: - Phase 1 (Critical): 3/3 ✅ COMPLETE - Phase 2 (High): 6/6 ✅ COMPLETE - Phase 3 (Medium): 6/6 ✅ COMPLETE - Phase 4 (Low): 0/5 - Next Related: AUDIT-REPORT.md vulnerabilities 3.1, 3.2, 3.3, 3.4, 3.5, 3.6 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
Description
Dashboard Descomplicar - React + Vite + Tailwind com design glassmorphism e Bento Grid
Languages
TypeScript
94.8%
CSS
3.4%
JavaScript
1.4%
HTML
0.2%
Dockerfile
0.2%