[C-001] CRÍTICO - Implementar autenticação API key - Middleware Next.js protege todas as rotas /api/* (exceto /health) - Sistema auth com validação de header x-api-key - Template .env.example com API_SECRET_KEY [C-002] CRÍTICO - Validação de inputs com Zod - Schemas para siteId (int positivo) e period (1-365d) - Previne NaN, SQL injection, inputs maliciosos - Respostas 400 Bad Request com detalhes de erro [C-003] CRÍTICO - Corrigir TypeScript any type - chart-card.tsx: any → string | number | null - ESLint passa sem warnings [M-005] MODERADO - Corrigir .gitignore sobre-restritivo - Exceção !.env.example permite commit do template Verificações: ✅ pnpm run lint - 0 erros ✅ pnpm audit - 0 vulnerabilidades ✅ CVSS 7.5 → 0.0 Docs: AUDIT-REPORT.md, SECURITY-FIX.md, CHANGELOG.md Regra: #47 (Security Audit Pre-Commit) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
43 lines
494 B
Plaintext
43 lines
494 B
Plaintext
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
|
|
# dependencies
|
|
/node_modules
|
|
/.pnp
|
|
.pnp.*
|
|
.yarn/*
|
|
!.yarn/patches
|
|
!.yarn/plugins
|
|
!.yarn/releases
|
|
!.yarn/versions
|
|
|
|
# testing
|
|
/coverage
|
|
|
|
# next.js
|
|
/.next/
|
|
/out/
|
|
|
|
# production
|
|
/build
|
|
|
|
# misc
|
|
.DS_Store
|
|
*.pem
|
|
|
|
# debug
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
.pnpm-debug.log*
|
|
|
|
# env files (can opt-in for committing if needed)
|
|
.env*
|
|
!.env.example
|
|
|
|
# vercel
|
|
.vercel
|
|
|
|
# typescript
|
|
*.tsbuildinfo
|
|
next-env.d.ts
|