wizz-method 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/README.md +62 -62
  2. package/SECURITY.md +15 -16
  3. package/THIRD-PARTY-NOTICES.md +49 -49
  4. package/package.json +1 -1
  5. package/src/bmm-skills/1-analysis/wizz-agent-analyst/customize.toml +1 -1
  6. package/src/bmm-skills/2-plan-workflows/wizz-agent-pm/customize.toml +1 -1
  7. package/src/bmm-skills/2-plan-workflows/wizz-agent-ux-designer/customize.toml +1 -1
  8. package/src/bmm-skills/3-solutioning/wizz-agent-architect/customize.toml +1 -1
  9. package/src/bmm-skills/4-implementation/wizz-agent-dev/customize.toml +1 -1
  10. package/src/core-skills/_shared/handoff-protocol.md +72 -71
  11. package/src/core-skills/wizz-review-adversarial-general/SKILL.md +1 -1
  12. package/src/modules/lowticket/skills/wizz-lowticket-funil/references/copy-das-paginas.md +39 -39
  13. package/src/modules/lowticket/skills/wizz-lowticket-funil/references/mapa-do-funil.md +23 -23
  14. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/CATALOGO.md +72 -72
  15. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/01-principios.md +10 -10
  16. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/02-diagnostico-funil.md +50 -50
  17. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/03-campanha-bidcap.md +68 -68
  18. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/04-criativos.md +44 -44
  19. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/04a-criativos-ia.md +77 -77
  20. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/04b-criativos-formatos.md +121 -121
  21. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/05-oferta.md +35 -35
  22. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/06-pagina-vendas.md +122 -122
  23. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/06a-instagram.md +93 -93
  24. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/06b-player-vsl.md +57 -57
  25. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/07-funil-upsell.md +83 -83
  26. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/07a-copy-humanizacao.md +61 -61
  27. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/08-pesquisa-publico.md +11 -11
  28. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/09-especialista-coproducao.md +26 -26
  29. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/10-levantar-caixa.md +29 -29
  30. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/11-checklist-roi.md +22 -22
  31. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12-mineracao-ofertas.md +80 -80
  32. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12a-mineracao-veredito.md +72 -72
  33. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12b-fabrica-de-ofertas.md +63 -63
  34. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12c-anatomia-low-ticket.md +71 -71
  35. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/13-benchmarks-vsl.md +6 -6
  36. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/14-vocabulario.md +53 -51
  37. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/15-como-estender.md +26 -26
  38. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/17-rastreamento.md +76 -76
  39. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/18-copy-desejo-oferta.md +149 -149
  40. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/INDEX.md +45 -45
  41. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/guardrails.md +45 -45
  42. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/pontos-em-aberto.md +64 -66
  43. package/src/modules/lowticket/skills/wizz-lowticket-minerador/references/rubrica.md +63 -63
  44. package/src/modules/lowticket/skills/wizz-lowticket-pagina/references/metas-e-medicao.md +23 -23
  45. package/src/modules/lowticket/skills/wizz-lowticket-pagina/references/padroes-de-codigo.md +50 -50
  46. package/src/modules/lowticket/skills/wizz-lowticket-trafego/references/formato-do-diagnostico.md +9 -9
  47. package/src/modules/lowticket/skills/wizz-lowticket-trafego/references/reguas.md +42 -42
  48. package/src/modules/wizz/README.md +27 -27
  49. package/src/modules/wizz/_shared/cerebro.md +37 -37
  50. package/src/modules/wizz/_shared/communication-rules.md +15 -15
  51. package/src/modules/wizz/_shared/despacho-barato.md +6 -6
  52. package/src/modules/wizz/_shared/encerramento.md +23 -23
  53. package/src/modules/wizz/_shared/model-ladder.md +29 -29
  54. package/src/modules/wizz/_shared/planning-gate.md +30 -30
  55. package/src/modules/wizz/_shared/token-economy.md +28 -28
  56. package/src/modules/wizz/_shared/video-pipeline.md +42 -42
  57. package/src/modules/wizz/agents/wizz-ads/SKILL.md +16 -16
  58. package/src/modules/wizz/agents/wizz-ads/customize.toml +21 -21
  59. package/src/modules/wizz/agents/wizz-copy/SKILL.md +18 -18
  60. package/src/modules/wizz/agents/wizz-copy/customize.toml +24 -24
  61. package/src/modules/wizz/agents/wizz-designer/SKILL.md +24 -24
  62. package/src/modules/wizz/agents/wizz-designer/customize.toml +29 -29
  63. package/src/modules/wizz/agents/wizz-growth/SKILL.md +20 -20
  64. package/src/modules/wizz/agents/wizz-growth/customize.toml +34 -34
  65. package/src/modules/wizz/agents/wizz-maestro/SKILL.md +63 -63
  66. package/src/modules/wizz/agents/wizz-maestro/customize.toml +38 -38
  67. package/src/modules/wizz/agents/wizz-memoria/SKILL.md +19 -19
  68. package/src/modules/wizz/agents/wizz-memoria/customize.toml +24 -24
  69. package/src/modules/wizz/agents/wizz-qa/SKILL.md +22 -22
  70. package/src/modules/wizz/agents/wizz-qa/customize.toml +29 -29
  71. package/src/modules/wizz/agents/wizz-seo/SKILL.md +19 -19
  72. package/src/modules/wizz/agents/wizz-seo/customize.toml +27 -27
  73. package/src/modules/wizz/agents/wizz-social/SKILL.md +53 -53
  74. package/src/modules/wizz/agents/wizz-social/customize.toml +37 -37
  75. package/src/modules/wizz/agents/wizz-social/knowledge/analise-imagem-referencia.md +20 -20
  76. package/src/modules/wizz/agents/wizz-social/knowledge/biblioteca-prompts-imagem.md +71 -71
  77. package/src/modules/wizz/agents/wizz-social/knowledge/blueprint-roteiro-viral.md +196 -196
  78. package/src/modules/wizz/agents/wizz-social/knowledge/legenda-instagram.md +32 -32
  79. package/src/modules/wizz/agents/wizz-social/knowledge/prompts-imagem-video.md +48 -48
  80. package/src/modules/wizz/module.yaml +28 -28
  81. package/src/modules/wizz/overrides/wizz-agent-analyst.toml +17 -17
  82. package/src/modules/wizz/overrides/wizz-agent-architect.toml +21 -21
  83. package/src/modules/wizz/overrides/wizz-agent-dev.toml +20 -20
  84. package/src/modules/wizz/overrides/wizz-agent-pm.toml +11 -11
  85. package/src/modules/wizz/overrides/wizz-agent-tech-writer.toml +14 -14
  86. package/src/modules/wizz/overrides/wizz-agent-ux-designer.toml +14 -14
  87. package/src/modules/wizz/subagents/codex/wizz-exec-haiku.toml +17 -17
  88. package/src/modules/wizz/subagents/codex/wizz-exec-opus.toml +19 -19
  89. package/src/modules/wizz/subagents/codex/wizz-exec-review.toml +18 -18
  90. package/src/modules/wizz/subagents/codex/wizz-exec-sonnet.toml +18 -18
  91. package/src/modules/wizz/subagents/gemini/wizz-exec-haiku.md +17 -17
  92. package/src/modules/wizz/subagents/gemini/wizz-exec-opus.md +19 -19
  93. package/src/modules/wizz/subagents/gemini/wizz-exec-review.md +18 -18
  94. package/src/modules/wizz/subagents/gemini/wizz-exec-sonnet.md +18 -18
  95. package/src/modules/wizz/subagents/opencode/wizz-exec-haiku.md +17 -17
  96. package/src/modules/wizz/subagents/opencode/wizz-exec-opus.md +19 -19
  97. package/src/modules/wizz/subagents/opencode/wizz-exec-review.md +18 -18
  98. package/src/modules/wizz/subagents/opencode/wizz-exec-sonnet.md +18 -18
  99. package/src/modules/wizz/subagents/spec.yaml +84 -83
  100. package/src/modules/wizz/subagents/wizz-exec-haiku.md +17 -17
  101. package/src/modules/wizz/subagents/wizz-exec-opus.md +19 -19
  102. package/src/modules/wizz/subagents/wizz-exec-review.md +18 -18
  103. package/src/modules/wizz/subagents/wizz-exec-sonnet.md +18 -18
  104. package/src/skills-lib/cerebro/SKILL.md +61 -61
  105. package/src/skills-lib/cerebro/references/comandos-pesquisa-e-memoria.md +46 -46
  106. package/src/skills-lib/cerebro/references/comandos-rotina-e-captura.md +65 -65
  107. package/src/skills-lib/cerebro/references/comandos-sessao.md +74 -74
  108. package/src/skills-lib/ctc-align/SKILL.md +37 -37
  109. package/src/skills-lib/find-skills/SKILL.md +19 -19
  110. package/src/skills-lib/pesquisa-de-publico-do-piva/README.md +33 -33
  111. package/src/skills-lib/pesquisa-de-publico-do-piva/SKILL.md +42 -42
  112. package/src/skills-lib/pesquisa-de-publico-do-piva/prompts.md +20 -20
  113. package/src/skills-lib/references/premium-agency-rules.md +63 -63
  114. package/src/skills-lib/security-audit-pentest/SKILL.md +31 -31
  115. package/src/skills-lib/security-audit-pentest/references/stage-1-validacao-entrada.md +37 -37
  116. package/src/skills-lib/security-audit-pentest/references/stage-2-autorizacao.md +61 -61
  117. package/src/skills-lib/security-audit-pentest/references/stage-3-abuso-volume.md +37 -37
  118. package/src/skills-lib/security-audit-pentest/references/stage-4-vazamento-resposta.md +52 -52
  119. package/src/skills-lib/site-launch-kit/SKILL.md +42 -42
  120. package/src/skills-lib/site-launch-kit/references/01-cta-principal.md +20 -20
  121. package/src/skills-lib/site-launch-kit/references/02-barra-fixa-mobile.md +24 -24
  122. package/src/skills-lib/site-launch-kit/references/03-tempo-de-resposta.md +21 -21
  123. package/src/skills-lib/site-launch-kit/references/04-prova-social.md +22 -22
  124. package/src/skills-lib/site-launch-kit/references/05-faq-decisao.md +28 -28
  125. package/src/skills-lib/site-launch-kit/references/06-imagens-reais.md +27 -27
  126. package/src/skills-lib/site-launch-kit/references/07-endereco-como-chegar.md +25 -25
  127. package/src/skills-lib/site-launch-kit/references/08-titles.md +30 -30
  128. package/src/skills-lib/site-launch-kit/references/09-open-graph.md +23 -23
  129. package/src/skills-lib/site-launch-kit/references/10-breadcrumbs.md +23 -23
  130. package/src/skills-lib/site-launch-kit/references/11-alt-text.md +28 -28
  131. package/src/skills-lib/site-launch-kit/references/12-schema-local.md +22 -22
  132. package/src/skills-lib/site-launch-kit/references/13-robots-sitemap.md +26 -26
  133. package/src/skills-lib/site-launch-kit/references/14-privacidade-termos.md +27 -27
  134. package/src/skills-lib/site-launch-kit/references/15-medicao.md +23 -23
  135. package/src/skills-lib/wizz-ai-product-design/SKILL.md +70 -70
  136. package/src/skills-lib/wizz-auth-and-secrets/SKILL.md +78 -78
  137. package/src/skills-lib/wizz-caching-and-queues/SKILL.md +40 -40
  138. package/src/skills-lib/wizz-cloud-and-infra/SKILL.md +22 -22
  139. package/src/skills-lib/wizz-database-and-deps/SKILL.md +52 -52
  140. package/src/skills-lib/wizz-database-scaling/SKILL.md +31 -31
  141. package/src/skills-lib/wizz-desktop-security/SKILL.md +49 -49
  142. package/src/skills-lib/wizz-implementation-planner/SKILL.md +56 -56
  143. package/src/skills-lib/wizz-implementation-planner/references/folder-structure-and-dependencies.md +14 -14
  144. package/src/skills-lib/wizz-implementation-planner/references/implementation-phases.md +15 -15
  145. package/src/skills-lib/wizz-implementation-planner/references/implementation-types.md +9 -9
  146. package/src/skills-lib/wizz-implementation-planner/references/motion-path-implementation.md +19 -19
  147. package/src/skills-lib/wizz-implementation-planner/references/performance-plan.md +27 -27
  148. package/src/skills-lib/wizz-infrastructure/SKILL.md +21 -21
  149. package/src/skills-lib/wizz-inicio-de-projeto/SKILL.md +63 -63
  150. package/src/skills-lib/wizz-inicio-de-projeto/references/implementacao-api-forms.md +27 -27
  151. package/src/skills-lib/wizz-inicio-de-projeto/references/padroes-arquiteturais-e-pastas.md +31 -31
  152. package/src/skills-lib/wizz-inicio-de-projeto/references/seguranca-e-regras-codigo.md +21 -21
  153. package/src/skills-lib/wizz-launch-readiness/SKILL.md +61 -61
  154. package/src/skills-lib/wizz-launch-readiness/references/01-tecnico-build.md +16 -16
  155. package/src/skills-lib/wizz-launch-readiness/references/02-seguranca.md +16 -16
  156. package/src/skills-lib/wizz-launch-readiness/references/03-seo-descoberta.md +16 -16
  157. package/src/skills-lib/wizz-launch-readiness/references/04-analytics-medicao.md +15 -15
  158. package/src/skills-lib/wizz-launch-readiness/references/05-conteudo-prova-social.md +15 -15
  159. package/src/skills-lib/wizz-launch-readiness/references/06-legal-lgpd.md +15 -15
  160. package/src/skills-lib/wizz-launch-readiness/references/07-infra-deploy-rollback.md +16 -16
  161. package/src/skills-lib/wizz-launch-readiness/references/08-fusao-priorizacao.md +19 -19
  162. package/src/skills-lib/wizz-launch-readiness/references/09-persistencia-project-context.md +26 -26
  163. package/src/skills-lib/wizz-motion-3d-director/SKILL.md +70 -70
  164. package/src/skills-lib/wizz-motion-3d-director/references/image-to-video-workflow.md +34 -35
  165. package/src/skills-lib/wizz-motion-3d-director/references/motion-paths.md +70 -70
  166. package/src/skills-lib/wizz-motion-3d-director/references/performance-and-handoff.md +17 -17
  167. package/src/skills-lib/wizz-offer-forge/README.md +9 -9
  168. package/src/skills-lib/wizz-offer-forge/SKILL.md +64 -64
  169. package/src/skills-lib/wizz-offer-forge/references/empilhamento-valor.md +17 -17
  170. package/src/skills-lib/wizz-offer-forge/references/garantia-reversa.md +16 -16
  171. package/src/skills-lib/wizz-offer-forge/references/mecanismo-unico.md +19 -19
  172. package/src/skills-lib/wizz-offer-forge/references/ponte-trafego.md +17 -17
  173. package/src/skills-lib/wizz-premium-landing-ui-researcher/SKILL.md +36 -36
  174. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/audit-protocol.md +81 -82
  175. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/component-sources.md +105 -105
  176. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/core-goal.md +39 -39
  177. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/dashboard-and-portfolio-modes.md +49 -50
  178. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/handoffs.md +33 -34
  179. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/landing-page-strategy.md +141 -142
  180. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/mandatory-process.md +24 -24
  181. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/output-format-and-quality.md +73 -73
  182. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/prompt-templates.md +4 -4
  183. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/site-levels.md +282 -283
  184. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/source-first-protocol.md +39 -39
  185. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/source-links.md +8 -8
  186. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/stack-and-visual-direction.md +63 -64
  187. package/src/skills-lib/wizz-router/SKILL.md +38 -38
  188. package/src/skills-lib/wizz-router/references/auditoria-360.md +12 -12
  189. package/src/skills-lib/wizz-router/references/routing-table-flat.md +80 -80
  190. package/src/skills-lib/wizz-tracking-audit/SKILL.md +48 -48
  191. package/src/skills-lib/wizz-tracking-audit/references/modo-diagnostico.md +43 -43
  192. package/src/skills-lib/wizz-tracking-audit/references/modo-implantacao.md +59 -59
  193. package/src/skills-lib/wizz-tracking-audit/references/utm-e-atribuicao.md +35 -35
  194. package/src/skills-lib/wizz-web-security/SKILL.md +35 -35
  195. package/src/skills-lib/wizz-web-security/references/checklist-deploy.md +50 -50
  196. package/src/skills-lib/wizz-web-security/references/headers-rate-limit-cors.md +33 -33
  197. package/src/skills-lib/wizz-web-security/references/owasp-top5-detalhado.md +36 -36
  198. package/tools/hooks/session-rules.js +14 -11
@@ -1,89 +1,89 @@
1
- # Modo implantação
1
+ # Implementation mode
2
2
 
3
- Checklist executável para antes de subir campanha. Roda de cima para baixo. Cada item tem um jeito de verificar, não é declaração de fé.
3
+ Executable checklist for before launching a campaign. Run top to bottom. Every item has a way to verify it — it's not a statement of faith.
4
4
 
5
- Régua: leia o Passo 0 do `SKILL.md` antes. Sem régua declarada, o relatório sai sem número.
5
+ Ruler: read Step 0 of `SKILL.md` first. Without a declared ruler, the report comes out without a number.
6
6
 
7
- ## 1. Página e carregamento
7
+ ## 1. Page and loading
8
8
 
9
- | Verificar | Como | Reprova quando |
9
+ | Check | How | Fails when |
10
10
  |---|---|---|
11
- | Página abre no mobile real | `wizz-agent-browser` em viewport de celular | Layout quebra ou bloco some |
12
- | Tempo até o conteúdo principal | PageSpeed Insights, aba mobile | Fora da meta declarada pela régua do projeto |
13
- | Redirect | Abrir o link do anúncio sem encurtador no meio | Qualquer salto extra ou loop |
14
- | SSL | Cadeado e certificado válido no domínio final | Aviso do navegador |
11
+ | Page opens on a real mobile device | `wizz-agent-browser` in a phone viewport | Layout breaks or a block disappears |
12
+ | Time to main content | PageSpeed Insights, mobile tab | Outside the target declared by the project's ruler |
13
+ | Redirect | Open the ad link without a shortener in the middle | Any extra hop or loop |
14
+ | SSL | Valid lock icon and certificate on the final domain | Browser warning |
15
15
 
16
- Furou aqui: é trabalho de dev. Não mexa em criativo antes de resolver.
16
+ Fails here: it's dev work. Don't touch the creative before fixing this.
17
17
 
18
- ## 2. Pixel e servidor
18
+ ## 2. Pixel and server
19
19
 
20
- | Verificar | Como | Reprova quando |
20
+ | Check | How | Fails when |
21
21
  |---|---|---|
22
- | Pixel presente na página | Extensão de debug da plataforma ou console | Não dispara `PageView` |
23
- | Posição do disparo | Ver se o `PageView` sobe antes do conteúdo visível | Dispara em `onload` tardio: infla connect rate e mente sobre a visita |
24
- | Evento de conversão do lado do servidor (CAPI) | Painel de qualidade da plataforma | Só navegador, sem servidor |
25
- | Deduplicação | `event_id` igual entre navegador e servidor | Sem `event_id`: a mesma venda conta duas vezes |
26
- | Domínio verificado | Painel de negócio da plataforma | Não verificado: perde atribuição em iOS |
22
+ | Pixel present on the page | The platform's debug extension or console | Doesn't fire `PageView` |
23
+ | Firing position | Check whether `PageView` fires before visible content | Fires on a late `onload`: inflates connect rate and lies about the visit |
24
+ | Server-side conversion event (CAPI) | The platform's quality panel | Only browser-side, no server-side |
25
+ | Deduplication | Same `event_id` between browser and server | No `event_id`: the same sale counts twice |
26
+ | Verified domain | The platform's business panel | Not verified: loses attribution on iOS |
27
27
 
28
- > O pixel mede o pixel. Um connect rate bonito com página lenta é métrica maquiada, não conversão.
28
+ > The pixel measures the pixel. A pretty connect rate with a slow page is a made-up metric, not conversion.
29
29
 
30
- ## 3. Eventos priorizados
30
+ ## 3. Prioritized events
31
31
 
32
- Instale nesta ordem. Os quatro primeiros são obrigatórios; os outros entram quando o funil tiver a etapa.
32
+ Install in this order. The first four are mandatory; the rest come in once the funnel has that step.
33
33
 
34
- 1. `PageView` — visita à página de vendas
35
- 2. `ViewContent` — chegou ao bloco de oferta (não é o mesmo que abrir a página)
36
- 3. `InitiateCheckout` — clicou para comprar
37
- 4. `Purchase` — venda aprovada, com valor e moeda
38
- 5. `AddPaymentInfo` — preencheu pagamento, separa atrito de checkout de desistência de preço
39
- 6. `Lead` — captura, quando existir etapa de lead
40
- 7. `Subscribe` ou evento de recorrência, quando existir
41
- 8. Evento próprio de upsell ou order bump, quando existir
34
+ 1. `PageView` — visit to the sales page
35
+ 2. `ViewContent` — reached the offer block (not the same as opening the page)
36
+ 3. `InitiateCheckout` — clicked to buy
37
+ 4. `Purchase` — approved sale, with value and currency
38
+ 5. `AddPaymentInfo` — filled in payment, separates checkout friction from price hesitation
39
+ 6. `Lead` — capture, when a lead step exists
40
+ 7. `Subscribe` or a recurrence event, when it exists
41
+ 8. Custom upsell or order-bump event, when it exists
42
42
 
43
- Regra: evento sem valor monetário em `Purchase` inutiliza ROAS. Evento duplicado inutiliza tudo.
43
+ Rule: an event without a monetary value in `Purchase` breaks ROAS. A duplicated event breaks everything.
44
44
 
45
- ## 4. Tags e atribuição
45
+ ## 4. Tags and attribution
46
46
 
47
- Ver `utm-e-atribuicao.md` para os templates. O que a implantação precisa provar:
47
+ See `utm-e-atribuicao.md` for the templates. What the implementation needs to prove:
48
48
 
49
- - O template de UTM está colado no campo de parâmetros de URL do anúncio, não no destino do anúncio.
50
- - Cada parâmetro carrega nome **e** ID.
51
- - O parâmetro nativo da plataforma de checkout (quando existir) recebe a mesma informação empacotada, porque o checkout nem sempre repassa `utm_*`.
52
- - Nenhum nome de campanha, conjunto ou anúncio contém `|`, `#`, `&` ou `?`.
53
- - O padrão de nomenclatura está escrito em algum lugar que a próxima pessoa lê.
49
+ - The UTM template is pasted into the ad's URL parameters field, not into the ad's destination.
50
+ - Every parameter carries name **and** ID.
51
+ - The checkout platform's native parameter (when one exists) receives the same packaged information, because checkout doesn't always pass through `utm_*`.
52
+ - No campaign, ad set, or ad name contains `|`, `#`, `&`, or `?`.
53
+ - The naming convention is written down somewhere the next person will read.
54
54
 
55
- ## 5. Repasse pelo checkout
55
+ ## 5. Pass-through via checkout
56
56
 
57
- Este é o item que mais falha e o mais fácil de esquecer.
57
+ This is the item that fails most and is the easiest to forget.
58
58
 
59
- 1. Abra a página com uma UTM de teste na URL.
60
- 2. Clique para comprar.
61
- 3. Na página de checkout, confirme que os parâmetros chegaram (URL, campo escondido ou painel da plataforma).
62
- 4. Confirme que o webhook de venda entrega esses parâmetros para o destino final (banco, planilha, painel de atribuição).
59
+ 1. Open the page with a test UTM in the URL.
60
+ 2. Click to buy.
61
+ 3. On the checkout page, confirm the parameters arrived (URL, hidden field, or the platform's panel).
62
+ 4. Confirm the sale webhook delivers those parameters to the final destination (bank, spreadsheet, attribution dashboard).
63
63
 
64
- Quebrou entre 2 e 3: o checkout não repassa. Use o parâmetro nativo.
65
- Quebrou entre 3 e 4: o problema é a integração, não a tag.
64
+ Breaks between 2 and 3: checkout isn't passing it through. Use the native parameter.
65
+ Breaks between 3 and 4: the problem is the integration, not the tag.
66
66
 
67
- ## 6. Compra-teste por caminho
67
+ ## 6. Test purchase per path
68
68
 
69
- Cada rota de entrada recebe uma compra real de teste antes de investir:
69
+ Every entry route gets a real test purchase before you invest:
70
70
 
71
- - anúncio
72
- - link da bio
71
+ - ad
72
+ - bio link
73
73
  - story
74
- - destaque
75
- - direct ou conversa
74
+ - highlight
75
+ - DM or conversation
76
76
 
77
- Para cada rota, registre: a venda apareceu no banco, apareceu no painel de atribuição, e apareceu com a origem certa. Rota que não passa nas três é rota cega.
77
+ For each route, record: did the sale show up in the bank, did it show up in the attribution panel, and did it show up with the correct source. A route that doesn't pass all three is a blind route.
78
78
 
79
- ## 7. Fechamento
79
+ ## 7. Sign-off
80
80
 
81
- Antes de liberar a subida, o relatório precisa responder sim para as cinco:
81
+ Before clearing the campaign to launch, the report needs to answer yes to all five:
82
82
 
83
- 1. A visita é medida no instante certo?
84
- 2. A venda chega ao banco próprio?
85
- 3. A venda sabe de qual anúncio veio, por ID?
86
- 4. O orgânico é o que sobra depois de tudo taguear, e não um balde de preguiça?
87
- 5. Existe pelo menos uma compra-teste aprovada por rota?
83
+ 1. Is the visit measured at the right moment?
84
+ 2. Does the sale reach your own bank?
85
+ 3. Does the sale know which ad it came from, by ID?
86
+ 4. Is organic what's left over after tagging everything, not a bucket of laziness?
87
+ 5. Is there at least one approved test purchase per route?
88
88
 
89
- Qualquer "não" vira achado `CRÍTICO` ou `ALTO`. Nada sobe com um `CRÍTICO` aberto.
89
+ Any "no" becomes a `CRITICAL` or `HIGH` finding. Nothing launches with an open `CRITICAL`.
@@ -1,75 +1,75 @@
1
- # UTM e atribuição
1
+ # UTM and attribution
2
2
 
3
- O cimento de todo o resto. Se a tag está errada, o funil inteiro mede ficção.
3
+ The cement holding everything else together. If the tag is wrong, the whole funnel measures fiction.
4
4
 
5
- ## A regra central
5
+ ## The core rule
6
6
 
7
- Cada parâmetro carrega **nome e ID**, separados por um delimitador fixo. O nome existe para humano ler; o ID existe para a atribuição sobreviver a renomeação.
7
+ Every parameter carries **name and ID**, separated by a fixed delimiter. The name exists for humans to read; the ID exists so attribution survives a rename.
8
8
 
9
9
  ```
10
10
  utm_campaign={{campaign.name}}|{{campaign.id}}
11
11
  utm_medium={{adset.name}}|{{adset.id}}
12
12
  utm_content={{ad.name}}|{{ad.id}}
13
13
  utm_term={{placement}}
14
- utm_source=<plataforma>
14
+ utm_source=<platform>
15
15
  ```
16
16
 
17
- Cole no campo **parâmetros de URL** do anúncio, nunca no destino.
17
+ Paste into the ad's **URL parameters** field, never into the destination.
18
18
 
19
- ## Redundância no parâmetro nativo
19
+ ## Redundancy in the native parameter
20
20
 
21
- Muito checkout não repassa `utm_*` para o webhook de venda. Quando a plataforma de checkout tem parâmetro próprio (por exemplo `xcod`, `src` ou `sck`), empacote a mesma informação lá também, com um separador longo e improvável:
21
+ Many checkouts don't pass `utm_*` through to the sale webhook. When the checkout platform has its own parameter (for example `xcod`, `src`, or `sck`), pack the same information there too, with a long, unlikely separator:
22
22
 
23
23
  ```
24
- xcod=<origem><SEP><campaign.name>|<campaign.id><SEP><adset.name>|<adset.id><SEP><ad.name>|<ad.id><SEP><placement>
24
+ xcod=<source><SEP><campaign.name>|<campaign.id><SEP><adset.name>|<adset.id><SEP><ad.name>|<ad.id><SEP><placement>
25
25
  ```
26
26
 
27
- O separador precisa ser uma string que nunca apareça em nome de campanha. Escolha uma vez e nunca mude: mudar quebra o histórico.
27
+ The separator needs to be a string that never appears in a campaign name. Pick one once and never change it: changing it breaks the history.
28
28
 
29
- ## Delimitadores proibidos em nomes
29
+ ## Forbidden delimiters in names
30
30
 
31
- Nunca use `|`, `#`, `&` ou `?` em nome de campanha, conjunto ou anúncio. São delimitadores da própria string de tag.
31
+ Never use `|`, `#`, `&`, or `?` in a campaign, ad set, or ad name. They are delimiters of the tag string itself.
32
32
 
33
- Violou: **recriar a campanha**. Renomear não resolve, porque a plataforma continua servindo o nome antigo em cache para as impressões já entregues.
33
+ If it happens: **recreate the campaign**. Renaming doesn't fix it, because the platform keeps serving the old cached name for impressions already delivered.
34
34
 
35
- Padrão de nome que não dá problema: minúscula, sem acento, palavras separadas por hífen ou underscore, campos em ordem fixa. Escreva o padrão em algum lugar. Padrão que só existe na cabeça de alguém não é padrão.
35
+ Naming pattern that causes no trouble: lowercase, no accents, words separated by hyphen or underscore, fields in a fixed order. Write the pattern down somewhere. A pattern that only exists in someone's head isn't a pattern.
36
36
 
37
- ## Outras plataformas
37
+ ## Other platforms
38
38
 
39
- O formato é o mesmo em toda plataforma de mídia: macro nativa da plataforma preenchendo `utm_*`, mais o empacotamento no parâmetro nativo do checkout quando ele existir.
39
+ The format is the same across every media platform: the platform's native macro filling in `utm_*`, plus packing into the checkout's native parameter when one exists.
40
40
 
41
- | Plataforma | O que muda |
41
+ | Platform | What changes |
42
42
  |---|---|
43
43
  | Meta | Macros `{{campaign.name}}`, `{{campaign.id}}`, `{{adset.*}}`, `{{ad.*}}`, `{{placement}}` |
44
- | Google | Macros entre chaves simples, mais `{lpurl}?` na frente e `keyword`, `device`, `network` |
45
- | TikTok, Kwai, Taboola | Mesma estrutura, nomes de macro próprios da plataforma |
44
+ | Google | Macros in single braces, plus `{lpurl}?` in front and `keyword`, `device`, `network` |
45
+ | TikTok, Kwai, Taboola | Same structure, the platform's own macro names |
46
46
 
47
- Antes de escrever o template de uma plataforma, confirme o nome exato da macro na documentação dela. Macro errada entrega a string literal `{{campaign.id}}` na URL, e ninguém percebe até a primeira venda.
47
+ Before writing a platform's template, confirm the exact macro name in its documentation. A wrong macro delivers the literal string `{{campaign.id}}` in the URL, and nobody notices until the first sale.
48
48
 
49
- Existe variação a mais quando há cloaker na frente do checkout: um conector extra para não quebrar a string. Confirme com quem instalou o cloaker.
49
+ There's an extra variation when there's a cloaker in front of the checkout: an extra connector so the string doesn't break. Confirm with whoever installed the cloaker.
50
50
 
51
- ## O balde do orgânico
51
+ ## The organic bucket
52
52
 
53
- "Orgânico" não é canal. É tudo que chegou sem tag: destaque do Instagram sem UTM, link na bio sem UTM, direct, recompra, boca a boca.
53
+ "Organic" isn't a channel. It's everything that arrived without a tag: an Instagram highlight without a UTM, a bio link without a UTM, DMs, repeat purchases, word of mouth.
54
54
 
55
- Diagnóstico: tague **todas** as rotas próprias (bio, destaque, story, direct, e-mail, grupo) e observe o orgânico cair. O que sobrar depois disso é orgânico de verdade. O tamanho da queda é a prova de quanto o balde estava mentindo.
55
+ Diagnosis: tag **every** owned route (bio, highlight, story, DM, email, group) and watch organic drop. What's left after that is real organic. The size of the drop is proof of how much the bucket was lying.
56
56
 
57
- Padrão sugerido para rota própria:
57
+ Suggested pattern for an owned route:
58
58
 
59
59
  ```
60
- utm_source=instagram&utm_medium=<bio|destaque|story|direct>&utm_campaign=<nome-do-destaque-ou-post>
60
+ utm_source=instagram&utm_medium=<bio|highlight|story|dm>&utm_campaign=<highlight-or-post-name>
61
61
  ```
62
62
 
63
- ## Primeiro toque
63
+ ## First touch
64
64
 
65
- Último clique é o padrão de quase toda ferramenta, e ele esconde qual anúncio **apresentou** a oferta. Guarde o primeiro toque no seu banco (primeira UTM vista pelo visitante, com data) e compare com o último. Multi-toque simples, dois campos, resolve a maior parte das decisões de criativo.
65
+ Last click is the default of almost every tool, and it hides which ad **introduced** the offer. Store the first touch in your own database (the first UTM the visitor saw, with a date) and compare it with the last. Simple multi-touch, two fields, resolves most creative decisions.
66
66
 
67
- ## Conferência rápida
67
+ ## Quick check
68
68
 
69
- Cinco checagens que pegam quase todo erro de tag:
69
+ Five checks that catch almost every tagging error:
70
70
 
71
- 1. Abra o anúncio em preview e leia a URL final: tem macro literal sobrando?
72
- 2. A UTM sobrevive ao redirect até o checkout?
73
- 3. O webhook de venda entrega os campos ao banco?
74
- 4. Dois anúncios diferentes geram `utm_content` diferentes?
75
- 5. Renomear um anúncio quebra a atribuição? Se quebrar, está atribuindo por nome.
71
+ 1. Open the ad in preview and read the final URL: is a macro left un-substituted?
72
+ 2. Does the UTM survive the redirect all the way to checkout?
73
+ 3. Does the sale webhook deliver the fields to the bank?
74
+ 4. Do two different ads generate different `utm_content` values?
75
+ 5. Does renaming an ad break attribution? If it does, it's attributing by name.
@@ -1,49 +1,49 @@
1
1
  ---
2
2
  name: wizz-web-security
3
3
  description: >
4
- Revisar segurança de apps web. Usar quando: auditar vulnerabilidades, antes de deploy/PR, implementar auth,
5
- adicionar endpoint de API, lidar com input de usuário, configurar headers, CSP, rate limiting, CORS, clickjacking,
6
- IDOR, SQL injection, vazamento de PII/dados na resposta, enumeração de usuário, OWASP Top 10.
7
- Inclui triagem de falhas recorrentes de pentest + checklist das 8 vulnerabilidades e exemplos para Next.js + Supabase + Clerk.
8
- Use quando o usuário pedir auditoria de segurança ou revisão pré-deploy, ou mencionar CORS, CSP, rate limiting, IDOR ou OWASP.
4
+ Review the security of web apps. Use when: auditing vulnerabilities, before deploy/PR, implementing auth,
5
+ adding an API endpoint, handling user input, configuring headers, CSP, rate limiting, CORS, clickjacking,
6
+ IDOR, SQL injection, PII/data leakage in the response, user enumeration, OWASP Top 10.
7
+ Includes triage of recurring pentest findings + the checklist of the 8 vulnerabilities and examples for Next.js + Supabase + Clerk.
8
+ Use when the user asks for a security audit or pre-deploy review, or mentions CORS, CSP, rate limiting, IDOR, or OWASP.
9
9
  ---
10
10
 
11
11
  # Web Security (OWASP Top 10)
12
12
 
13
- ## Falhas recorrentes em pentest (rankeadas por severidade)
13
+ ## Recurring pentest findings (ranked by severity)
14
14
 
15
- As que mais aparecem numa auditoria, com a correção direta. Use como triagem rápida — comece por aqui em toda revisão de segurança.
15
+ The ones that show up most in an audit, with the direct fix. Use as a quick triage — start here in every security review.
16
16
 
17
- | # | Falha | Severidade | Correção | Onde |
17
+ | # | Finding | Severity | Fix | Where |
18
18
  |---|-------|-----------|----------|------|
19
- | 1 | SQL Injection | 🔴 Crítica (parada de linha) | Query parametrizada / query-builder, nunca interpolar string | `references/owasp-top5-detalhado.md` §3 |
20
- | 2 | IDOR (recurso por ID sem checar dono) | 🔴 Crítica (parada de linha) | Validar posse do recurso no servidor a cada request | `references/owasp-top5-detalhado.md` §1 |
21
- | 3 | Mass assignment (body inteiro vai pro banco) | 🔴 Crítica (parada de linha) | Allowlist de campos: só grave os campos do formulário, nunca `spread` do body | `references/owasp-top5-detalhado.md` §6 |
22
- | 4 | RLS permissiva (`USING(true)`) ou tabela sem policy | 🔴 Crítica | Policy que amarra `auth.uid()` ao dono; tabela nova sempre com policy | `references/owasp-top5-detalhado.md` §1 |
23
- | 5 | Rate limit ausente (brute force grátis) | 🟠 Alta | Limite por IP **e** por conta + lockout/CAPTCHA no login | `references/headers-rate-limit-cors.md` |
24
- | 6 | Origem do IP lida do socket atrás de CDN | 🟠 Alta | Ler IP do header certo (`x-forwarded-for` confiável do proxy), senão o rate limit não existe | `references/headers-rate-limit-cors.md` |
25
- | 7 | Custo por chamada sem limitador (IA/SMS/e-mail) | 🟠 Alta | Rate limit + quota por conta em toda rota que gasta dinheiro real | `references/headers-rate-limit-cors.md` |
26
- | 8 | Extração por paginação (base inteira registro a registro) | 🟠 Alta | Filtrar por dono na query + limite de página + detecção de varredura | `references/headers-rate-limit-cors.md` |
27
- | 9 | CORS refletindo o `Origin` | 🟠 Alta | Allowlist de origens, nunca ecoar o `Origin` recebido | `references/headers-rate-limit-cors.md` |
28
- | 10 | PII/dado demais na resposta (até hash de senha) | 🟠 Alta | Retornar só os campos necessários (allowlist de saída) | `references/headers-rate-limit-cors.md` |
29
- | 11 | JWT na URL / token vivo pós-logout | 🟠 Alta | Token no header `Authorization` + revogar no logout | skill `wizz-auth-and-secrets` |
30
- | 12 | Enumeração de usuário (erro revela se e-mail existe) | 🟡 Média | Mensagem genérica + resposta em tempo constante | skill `wizz-auth-and-secrets` |
31
- | 13 | Clickjacking (sem header) | 🟡 Média (1 min) | `X-Frame-Options: DENY` + CSP `frame-ancestors 'none'` | `references/headers-rate-limit-cors.md` |
32
-
33
- > As quatro primeiras (SQLi, IDOR, mass assignment e RLS permissiva) são **parada de linha**: apareceu, corrige antes de qualquer coisa.
19
+ | 1 | SQL Injection | 🔴 Critical (stop-the-line) | Parameterized query / query builder, never interpolate strings | `references/owasp-top5-detalhado.md` §3 |
20
+ | 2 | IDOR (resource by ID without checking owner) | 🔴 Critical (stop-the-line) | Validate resource ownership on the server for every request | `references/owasp-top5-detalhado.md` §1 |
21
+ | 3 | Mass assignment (entire body goes to the database) | 🔴 Critical (stop-the-line) | Field allowlist: only save the form's fields, never `spread` the body | `references/owasp-top5-detalhado.md` §6 |
22
+ | 4 | Permissive RLS (`USING(true)`) or a table with no policy | 🔴 Critical | A policy that ties `auth.uid()` to the owner; every new table always gets a policy | `references/owasp-top5-detalhado.md` §1 |
23
+ | 5 | No rate limit (free brute force) | 🟠 High | Limit per IP **and** per account + lockout/CAPTCHA on login | `references/headers-rate-limit-cors.md` |
24
+ | 6 | IP origin read from the socket behind a CDN | 🟠 High | Read the IP from the right header (a trusted `x-forwarded-for` from the proxy), otherwise the rate limit doesn't exist | `references/headers-rate-limit-cors.md` |
25
+ | 7 | Per-call cost with no limiter (AI/SMS/email) | 🟠 High | Rate limit + per-account quota on every route that spends real money | `references/headers-rate-limit-cors.md` |
26
+ | 8 | Extraction via pagination (entire database, record by record) | 🟠 High | Filter by owner in the query + page limit + scan detection | `references/headers-rate-limit-cors.md` |
27
+ | 9 | CORS reflecting the `Origin` | 🟠 High | Origin allowlist, never echo the received `Origin` | `references/headers-rate-limit-cors.md` |
28
+ | 10 | Too much PII/data in the response (even password hashes) | 🟠 High | Return only the necessary fields (output allowlist) | `references/headers-rate-limit-cors.md` |
29
+ | 11 | JWT in the URL / token still alive after logout | 🟠 High | Token in the `Authorization` header + revoke on logout | skill `wizz-auth-and-secrets` |
30
+ | 12 | User enumeration (error reveals whether an email exists) | 🟡 Medium | Generic message + constant-time response | skill `wizz-auth-and-secrets` |
31
+ | 13 | Clickjacking (no header) | 🟡 Medium (1 min) | `X-Frame-Options: DENY` + CSP `frame-ancestors 'none'` | `references/headers-rate-limit-cors.md` |
32
+
33
+ > The first four (SQLi, IDOR, mass assignment, and permissive RLS) are **stop-the-line**: if it shows up, fix it before anything else.
34
34
  >
35
- > Para uma auditoria adversarial completa (caça com prova de exploração + plano priorizado), use a skill `security-audit-pentest`. Esta skill aqui é para **corrigir** uma falha específica da tabela.
35
+ > For a full adversarial audit (hunting with exploit proof + a prioritized plan), use the `security-audit-pentest` skill. This skill here is for **fixing** a specific finding from the table.
36
36
 
37
37
  ## References (load on demand)
38
38
 
39
- - `references/owasp-top5-detalhado.md` — detalhe + exemplo de código (Next.js + Clerk + Supabase) para as 5 categorias OWASP mais comuns: Broken Access Control, Cryptographic Failures, Injection, XSS, CSRF. Carregar ao aprofundar numa falha específica da tabela acima.
40
- - `references/headers-rate-limit-cors.md` — headers de segurança obrigatórios (com config pronta para `next.config.ts`), rate limiting (login/API/cobrança, fail-closed), CORS (allowlist, exemplo de código), e como evitar vazamento de PII/over-fetch na resposta de API. Carregar ao implementar ou revisar qualquer um desses quatro pontos.
41
- - `references/checklist-deploy.md` — checklist das 8 vulnerabilidades mais comuns (HTTPS, validação no servidor, secrets, rate limit, CSP, upload, SQL injection, backup), em formato de auditoria pré-deploy. Carregar antes de um deploy ou revisão de segurança formal.
42
-
43
- ## Checklist de revisão rápida
44
- - [ ] Todos os inputs do usuário são validados e sanitizados?
45
- - [ ] Autenticação verificada em todas as rotas protegidas?
46
- - [ ] HTTPS forçado com redirect de HTTP?
47
- - [ ] Headers de segurança configurados?
48
- - [ ] Logs não contêm dados sensíveis?
49
- - [ ] Dependências auditadas?
39
+ - `references/owasp-top5-detalhado.md` — detail + code example (Next.js + Clerk + Supabase) for the 5 most common OWASP categories: Broken Access Control, Cryptographic Failures, Injection, XSS, CSRF. Load when digging into a specific finding from the table above.
40
+ - `references/headers-rate-limit-cors.md` — mandatory security headers (with ready-made config for `next.config.ts`), rate limiting (login/API/billing, fail-closed), CORS (allowlist, code example), and how to avoid PII leakage/over-fetch in API responses. Load when implementing or reviewing any of those four points.
41
+ - `references/checklist-deploy.md` — checklist of the 8 most common vulnerabilities (HTTPS, server-side validation, secrets, rate limit, CSP, upload, SQL injection, backup), as a pre-deploy audit format. Load before a deploy or a formal security review.
42
+
43
+ ## Quick review checklist
44
+ - [ ] Are all user inputs validated and sanitized?
45
+ - [ ] Is authentication checked on every protected route?
46
+ - [ ] Is HTTPS forced with an HTTP redirect?
47
+ - [ ] Are security headers configured?
48
+ - [ ] Do logs contain no sensitive data?
49
+ - [ ] Have dependencies been audited?
@@ -1,52 +1,52 @@
1
- # Checklist das 8 Vulnerabilidades Mais Comuns
2
-
3
- Carregue este arquivo para uma auditoria rápida antes de deploy ou revisão de segurança.
4
-
5
- ## 1. HTTPS forçado
6
- - [ ] A plataforma força HTTPS? (Vercel: sim por padrão)
7
- - [ ] Header `Strict-Transport-Security` configurado explicitamente no código?
8
- - [ ] Nenhuma URL `http://` hardcoded em redirects ou fetch?
9
-
10
- ## 2. Validação no servidor
11
- - [ ] Todo endpoint de API valida input com Zod (`.parse()` ou `.safeParse()`)?
12
- - [ ] `workspaceId`/`userId` validados como UUID antes de ir ao banco?
13
- - [ ] Regras de negócio re-validadas no backend (nunca confiar só no cliente)?
14
- - [ ] Supabase: RLS ativo nas tabelas? Queries sempre filtram por `workspace_id`/`user_id`?
15
-
16
- ## 3. Senha do banco / secrets no código
17
- - [ ] Nenhum secret hardcoded em `.ts`/`.tsx`/`.js`?
18
- - [ ] `.env*` no `.gitignore`? (`git check-ignore -v .env.local`)
19
- - [ ] `.env.local` nunca aparece em `git log --all`?
20
- - [ ] Cripto usa chave de `process.env`, sem fallback de string?
21
- - [ ] Grep de segurança: `grep -r "sk_live\|sk_test\|service_role\|eyJ" src/` → vazio?
22
-
23
- ## 4. Rate limiting na API
24
- - [ ] Endpoints de autenticação têm rate limit por IP?
25
- - [ ] Endpoints de cobrança (checkout, portal Stripe) têm rate limit?
26
- - [ ] Endpoints que disparam operações caras/externas têm rate limit?
27
- - [ ] Endpoints de admin têm rate limit + comparação timing-safe?
28
- - [ ] Rotas de escrita de estado falham fechado se o rate limiter cair? (ex: `failOpen: false` na lib)
1
+ # Checklist of the 8 Most Common Vulnerabilities
2
+
3
+ Load this file for a quick audit before deploy or a security review.
4
+
5
+ ## 1. Forced HTTPS
6
+ - [ ] Does the platform force HTTPS? (Vercel: yes by default)
7
+ - [ ] Is the `Strict-Transport-Security` header explicitly configured in the code?
8
+ - [ ] No hardcoded `http://` URL in redirects or fetch calls?
9
+
10
+ ## 2. Server-side validation
11
+ - [ ] Does every API endpoint validate input with Zod (`.parse()` or `.safeParse()`)?
12
+ - [ ] Are `workspaceId`/`userId` validated as UUID before hitting the database?
13
+ - [ ] Are business rules re-validated on the backend (never trusting the client alone)?
14
+ - [ ] Supabase: is RLS active on the tables? Do queries always filter by `workspace_id`/`user_id`?
15
+
16
+ ## 3. Database password / secrets in code
17
+ - [ ] No secret hardcoded in `.ts`/`.tsx`/`.js`?
18
+ - [ ] Is `.env*` in `.gitignore`? (`git check-ignore -v .env.local`)
19
+ - [ ] Does `.env.local` never show up in `git log --all`?
20
+ - [ ] Does crypto use a key from `process.env`, with no string fallback?
21
+ - [ ] Security grep: `grep -r "sk_live\|sk_test\|service_role\|eyJ" src/` → empty?
22
+
23
+ ## 4. API rate limiting
24
+ - [ ] Do auth endpoints have per-IP rate limiting?
25
+ - [ ] Do billing endpoints (checkout, Stripe portal) have rate limiting?
26
+ - [ ] Do endpoints that trigger expensive/external operations have rate limiting?
27
+ - [ ] Do admin endpoints have rate limiting + timing-safe comparison?
28
+ - [ ] Do state-writing routes fail closed if the rate limiter goes down? (e.g. `failOpen: false` in the library)
29
29
 
30
30
  ## 5. Content Security Policy
31
- - [ ] Header `Content-Security-Policy` configurado? (`next.config.ts` `headers()` ou middleware)
32
- - [ ] `X-Frame-Options: DENY` configurado?
33
- - [ ] `X-Content-Type-Options: nosniff` configurado?
34
- - [ ] CSP testada em dev sem erros no console?
35
-
36
- ## 6. Upload sem verificação de tipo
37
- - [ ] Se há upload: verifica MIME type no servidor (não só no cliente)?
38
- - [ ] Limite de tamanho de arquivo imposto no servidor?
39
- - [ ] Extensões permitidas em allowlist (não blocklist)?
40
- - [ ] Se não há upload: confirmar que não há `<input type="file">` escondido?
41
-
42
- ## 7. SQL injection na busca
43
- - [ ] Nenhuma query monta SQL com string interpolation/concatenação?
44
- - [ ] Supabase: todo acesso via query-builder (`.from().select().eq()`) ou RPC com params nomeados?
45
- - [ ] RPCs Postgres auditadas no dashboard: não usam `EXECUTE format(...)` com input do usuário?
46
- - [ ] Grep: `grep -r "\.sql\|raw(\|\.query(" src/` → revisar resultados?
47
-
48
- ## 8. Backup automatizado
49
- - [ ] Plano Supabase tem PITR ou backup diário habilitado? (verificar no dashboard)
50
- - [ ] Retenção de backup documentada?
51
- - [ ] Existe runbook de restauração?
52
- - [ ] Credenciais de backup protegidas (não no repo)?
31
+ - [ ] Is the `Content-Security-Policy` header configured? (`next.config.ts` `headers()` or middleware)
32
+ - [ ] Is `X-Frame-Options: DENY` configured?
33
+ - [ ] Is `X-Content-Type-Options: nosniff` configured?
34
+ - [ ] Was the CSP tested in dev with no console errors?
35
+
36
+ ## 6. Upload without type verification
37
+ - [ ] If there's upload: does it check the MIME type on the server (not just the client)?
38
+ - [ ] Is a file size limit enforced on the server?
39
+ - [ ] Are allowed extensions an allowlist (not a blocklist)?
40
+ - [ ] If there's no upload: confirm there's no hidden `<input type="file">`?
41
+
42
+ ## 7. SQL injection in search
43
+ - [ ] No query builds SQL with string interpolation/concatenation?
44
+ - [ ] Supabase: is all access via the query builder (`.from().select().eq()`) or RPC with named params?
45
+ - [ ] Have Postgres RPCs been audited in the dashboard: no `EXECUTE format(...)` with user input?
46
+ - [ ] Grep: `grep -r "\.sql\|raw(\|\.query(" src/` → results reviewed?
47
+
48
+ ## 8. Automated backup
49
+ - [ ] Does the Supabase plan have PITR or daily backup enabled? (check the dashboard)
50
+ - [ ] Is backup retention documented?
51
+ - [ ] Is there a restore runbook?
52
+ - [ ] Are backup credentials protected (not in the repo)?