fix: corrigir 7 vulnerabilidades de bypass wa: em tags em lote #1074
<!-- ecc-tools:pr-audit:ECC Tools / Security Evidence:6eb0eeaa44ff9f2489bac622d7754fccc56f682a -->
ECC Tools / Security Evidence
Commit: 6eb0eeaa44ff9f2489bac622d7754fccc56f682a
Security scanner evidence required (action_required)
Detected 1 security-sensitive predictive risk signal(s) without scanner evidence.
Mode: enforce
Findings:
Touched security-sensitive paths:
src/hooks/crm/useContactsSearch.tsExpected evidence:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.
<!-- ecc-tools:pr-audit:ECC Tools / PR Risk Taxonomy:6eb0eeaa44ff9f2489bac622d7754fccc56f682a -->
ECC Tools / PR Risk Taxonomy
Commit: 6eb0eeaa44ff9f2489bac622d7754fccc56f682a
PR taxonomy review recommended (neutral)
Detected 2 PR taxonomy bucket(s): Security Evidence, CI/CD Recommendation.
Scanned 4 changed file(s).
Roadmap taxonomy buckets:
Security Evidence
Security-sensitive changes should carry explicit scanner, code-scanning, or focused regression evidence.
Signals:
Paths:
src/components/contacts/BulkActionsBar.tsxsrc/components/contacts/ContactBulkTagDialog.tsxsrc/hooks/crm/useContactsSearch.tsCI/CD Recommendation
CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.
Signals:
Paths:
src/components/contacts/BulkActionsBar.tsxsrc/components/contacts/ContactBulkTagDialog.tsxsrc/hooks/crm/useContactsSearch.tssrc/lib/tags.tsCheck publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.
[vc]: #6VMUl277Hr6JpH0cI6sQHjPps5evyZUg2iIpVo8NZZE=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ6YXBwX3dlYl92MiIsInByb2plY3RJZCI6InByal9KNHdiOGVneno4aUwxQ0puU09YSkR0cW5idlJwIiwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL2p1Y2ExL3phcHBfd2ViX3YyLzUxUlhLNjVEaWpUMlZrWUE1YUpld0tyd1JuVFMiLCJwcmV2aWV3VXJsIjoiemFwcHdlYnYyLWdpdC1jbGF1ZGUtZml4LXdhLXRhZy1zZWN1cml0eS0yNjA5MjgtMTQzMC1qdWNhMS52ZXJjZWwuYXBwIiwibmV4dENvbW1pdFN0YXR1cyI6IkRFUExPWUVEIiwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6InphcHB3ZWJ2Mi1naXQtY2xhdWRlLWZpeC13YS10YWctc2VjdXJpdHktMjYwOTI4LTE0MzAtanVjYTEudmVyY2VsLmFwcCJ9LCJyb290RGlyZWN0b3J5IjpudWxsfV19
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated |
| :--- | :----- | :------ | :------ |
| <a href="https://vercel.com/juca1/zapp_web_v2"><sup><img src="https://vercel.com/api/www/avatar?projectId=prj_J4wb8egzz8iL1CJnSOXJDtqnbvRp&teamId=team_QyN41X0q8hrqhW80AwokbFLv&s=32" width="16" height="16" align="middle" alt="" /></sup></a> zapp_web_v2 | !Ready Ready | Preview | <relative-time datetime="2026-09-28T00:50:34.867Z">Sep 28, 2026 12:50am UTC</relative-time> |
Your trial has ended. Reactivate Greptile to resume code reviews.
<!-- ecc-tools:pr-audit:ECC Tools / Reference Set Readiness:6eb0eeaa44ff9f2489bac622d7754fccc56f682a -->
ECC Tools / Reference Set Readiness
Commit: 6eb0eeaa44ff9f2489bac622d7754fccc56f682a
Reference set readiness gaps detected (neutral)
Reference evidence present for 0/7 areas (0%) across 4 changed file(s).
This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.
| Area | Status | Evidence / Next Step |
| --- | --- | --- |
| Deep analyzer corpus | Missing | Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions. |
| RAG/evaluator comparison | Missing | Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior. |
| PR salvage/review corpus | Missing | Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation. |
| Discussion triage corpus | Missing | Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications. |
| Harness compatibility | Missing | Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces. |
| Security evidence | Missing | Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs. |
| CI failure-mode evidence | Missing | Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes. |
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.
<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: skip review by coderabbit.ai -->
[!IMPORTANT]
- [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> 🔍 Trigger review
> This repository does not receive automatic reviews because it has fewer than 10 stars.
> <details>
<summary>⚙️ Run configuration</summary>
> Configuration used: Organization UI
> Review profile: CHILL
> Plan: Advanced
> Run ID: faa1db56-55f7-4904-bbc6-0410ec312e2a> </details>
<!-- end of auto-generated comment: skip review by coderabbit.ai -->
[!WARNING]
Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.
<!-- tips_start -->
---
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
<details>
<summary>❤️ Share</summary>
</details>
<sub>Comment @coderabbitai help to get the list of available commands.</sub>
<!-- tips_end -->
<!-- ecc-tools:pr-audit:ECC Tools / Hosted Promotion Readiness:6eb0eeaa44ff9f2489bac622d7754fccc56f682a -->
ECC Tools / Hosted Promotion Readiness
Commit: 6eb0eeaa44ff9f2489bac622d7754fccc56f682a
Hosted promotion readiness passed (success)
No hosted promotion evidence gaps detected across 4 changed file(s); 0 corpus scenarios had matching evidence.
This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.
No evaluator corpus scenarios matched this PR.
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.
Your trial has ended. Reactivate Greptile to resume code reviews.
<!-- codex-pull-request-review-summary -->
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review | Status | Commit | Review trigger |
| --- | --- | --- | --- |
| 📝 Code Review | ✅ Completed <relative-time datetime="2026-09-28T01:05:17.585470Z">2026-09-28T01:05:17.585470Z</relative-time> | 6eb0eea | Draft marked ready |
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
</details>
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6eb0eeaa44
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
</details>
<sub><sub>!P2 Badge</sub></sub> Restore the canonical contact types in the bulk selector
When users bulk-categorize contacts as transportadora or prestador_servico, those options are no longer available because this local array replaces the shared CONTACT_TYPES list still used by ContactForm and ContactTypeTabs; meanwhile it adds lead, so bulk editing now exposes a different taxonomy from individual editing and filtering. Keep this selector sourced from the canonical constant so all supported types remain assignable in bulk.
Useful? React with 👍 / 👎.
Boa captura. O array inline perdeu transportadora e prestador_servico. Vou restaurar CONTACT_TYPES.map(ct => ...) no próximo PR junto com as correções de display dos demais componentes.
---
_Generated by Claude Code_
adm01-debug
Resumo
Corrige 7 vulnerabilidades de segurança que permitiam tags WhatsApp (
wa:) serem escritas/exibidas incorretamente via ações em lote de contatos.Causa raiz
isWhatsAppTagusavatag.startsWith('wa:')— bypass comWA:,Wa:,wA:etc.uniqueTagsemuseContactsSearchcoletava todas as tags sem filtrarwa:— propagava para 4 componentes consumidoresBulkActionsBareContactBulkTagDialognão tinham guard contra escrita dewa:no bancoCorreções (4 arquivos)
src/lib/tags.tsisWhatsAppTag:tag.toLowerCase().startsWith('wa:')— bloqueia variantes de caseparseWhatsAppTag: rejeitalabelIdvazio (wa::) → retornanullsrc/hooks/crm/useContactsSearch.tsuniqueTags(linha 151):filterCustomTags([...new Set(...)])— filtrawa:na raiz antes de propagarsrc/components/contacts/BulkActionsBar.tsxhandleBulkTag: guardif (isWhatsAppTag(tag)) return;no iníciofilterCustomTags(availableTags)+getTagDisplayName(tag)— nunca exibewa:id:Nomesrc/components/contacts/ContactBulkTagDialog.tsxfilteredTags:filterCustomTags(...)— lista de seleção nunca incluiwa:addNewTag: guardif (isWhatsAppTag(newTag.trim())) return;— bloqueia digitação manual dewa:handleApply:safeSelected = [...selectedTags].filter(t => !isWhatsAppTag(t))— defesa em profundidade antes de escrever no bancosafeSelected.length(nãoselectedTags.size)Verificado
🤖 Generated with Claude Code
https://claude.ai/code/session_011gbQqfDvw5xxCwW3K5MaH5
<!-- This is an auto-generated description by cubic. -->
---
Summary by cubic
Fixes 7 security bypass vulnerabilities that let WhatsApp-reserved
wa:tags be written or displayed through bulk contact actions. Previously, case variants (WA:,Wa:,wA:) bypassed the filter and leaked into bulk-tag UIs and the database; now filtering is case-insensitive and applied at every entry point.Bug Fixes
isWhatsAppTaglowercases tags before checking thewa:prefix.parseWhatsAppTagrejects malformed tags with an empty label ID (wa::).useContactsSearchuniqueTagsand bulk-action tag lists now excludewa:viafilterCustomTags.ContactBulkTagDialogguards manual tag entry and batch apply, and shows display names instead of rawwa:id:Nomevalues.<sup>Written for commit 6eb0eeaa44ff9f2489bac622d7754fccc56f682a. Summary will update on new commits.</sup>
<a href="https://cubic.dev/pr/adm01-debug/Zapp_Web_V2/pull/1074?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->