chore: runbook de rotação de secrets de alto risco #1104
<!-- ecc-tools:pr-audit:ECC Tools / Security Evidence:e6b0fd417cc335160f673d9162a33cb799849e5e -->
ECC Tools / Security Evidence
Commit: e6b0fd417cc335160f673d9162a33cb799849e5e
Security evidence gate passed (success)
No security-sensitive scanner-evidence gap detected.
Mode: enforce
Scanned 1 changed file(s). No missing scanner-evidence signal was detected.
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:e6b0fd417cc335160f673d9162a33cb799849e5e -->
ECC Tools / PR Risk Taxonomy
Commit: e6b0fd417cc335160f673d9162a33cb799849e5e
PR taxonomy clear (success)
Scanned 1 changed file(s). No taxonomy bucket signals were detected.
Scanned 1 changed file(s).
No PR taxonomy bucket signals were detected.
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.
[vc]: #NMfJOb/JbDg/u5cLnA66vfBak0gzh9Dbd+o+OjNMVww=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ6YXBwX3dlYl92MiIsInByb2plY3RJZCI6InByal9KNHdiOGVneno4aUwxQ0puU09YSkR0cW5idlJwIiwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6InphcHB3ZWJ2Mi1naXQtY2xhdWRlLWNob3JlLXNlY3JldC1yb3RhdGlvbi1ydW5ib29rLTRmMTkzOS1qdWNhMS52ZXJjZWwuYXBwIn0sImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9qdWNhMS96YXBwX3dlYl92Mi8zNksyam1tZGI3VTl4cml5azU3WTdGR3dETVg3IiwicHJldmlld1VybCI6InphcHB3ZWJ2Mi1naXQtY2xhdWRlLWNob3JlLXNlY3JldC1yb3RhdGlvbi1ydW5ib29rLTRmMTkzOS1qdWNhMS52ZXJjZWwuYXBwIiwibmV4dENvbW1pdFN0YXR1cyI6IlBFTkRJTkciLCJyb290RGlyZWN0b3J5IjpudWxsfV19
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 | !Building Building | Preview | <relative-time datetime="2026-09-28T14:10:15.221Z">Sep 28, 2026 2:10pm UTC</relative-time> |
<!-- ecc-tools:pr-audit:ECC Tools / Reference Set Readiness:e6b0fd417cc335160f673d9162a33cb799849e5e -->
ECC Tools / Reference Set Readiness
Commit: e6b0fd417cc335160f673d9162a33cb799849e5e
Reference set readiness gaps detected (neutral)
Reference evidence present for 0/7 areas (0%) across 1 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: 9afcb32e-8c1e-4473-ab05-de47164e4b49> </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:e6b0fd417cc335160f673d9162a33cb799849e5e -->
ECC Tools / Hosted Promotion Readiness
Commit: e6b0fd417cc335160f673d9162a33cb799849e5e
Hosted promotion readiness passed (success)
No hosted promotion evidence gaps detected across 1 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.
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-28T14:13:12.776261Z">2026-09-28T14:13:12.776261Z</relative-time> | 8f9333d | New commits |
<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: e6b0fd417c
<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>!P1 Badge</sub></sub> Revoke the previous access token after replacement
When rotation is triggered because the token was compromised or its owner left, this procedure only creates a second PAT and updates the repository secret; it never revokes the previous PAT, even though the checklist at line 90 notes that these tokens are non-expiring and require manual revocation. The old Management API credential therefore remains usable after the purported rotation, so add revocation of the prior token after validating the replacement.
Useful? React with 👍 / 👎.
<sub><sub>!P1 Badge</sub></sub> Use a non-production check to validate the new token
When an operator follows this validation step, there is no staging option in .github/workflows/deploy-functions.yml: the job is bound to producao-edge-functions at line 48, verifies the official production project at lines 123–125, and an empty function_name deploys every function at lines 263–265. A routine credential rotation can therefore cause a full production redeploy; validate the token with a non-mutating check or provide a genuinely staging-specific workflow instead.
Useful? React with 👍 / 👎.
<!-- ecc-tools:pr-audit:ECC Tools / Security Evidence:bbf547db7195daba7fda682901789aa866e41bf6 -->
ECC Tools / Security Evidence
Commit: bbf547db7195daba7fda682901789aa866e41bf6
Security evidence gate passed (success)
No security-sensitive scanner-evidence gap detected.
Mode: enforce
Scanned 1 changed file(s). No missing scanner-evidence signal was detected.
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:bbf547db7195daba7fda682901789aa866e41bf6 -->
ECC Tools / PR Risk Taxonomy
Commit: bbf547db7195daba7fda682901789aa866e41bf6
PR taxonomy clear (success)
Scanned 1 changed file(s). No taxonomy bucket signals were detected.
Scanned 1 changed file(s).
No PR taxonomy bucket signals were detected.
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.
Corrigido em bbf547d: adicionado passo 4 explícito — "Revogar o token antigo no Supabase" (Dashboard → Account → Access Tokens → Revoke) com nota destacada de que tokens Supabase não expiram automaticamente e a revogação é obrigatória em caso de comprometimento ou saída de membro.
---
_Generated by Claude Code_
<!-- ecc-tools:pr-audit:ECC Tools / Reference Set Readiness:bbf547db7195daba7fda682901789aa866e41bf6 -->
ECC Tools / Reference Set Readiness
Commit: bbf547db7195daba7fda682901789aa866e41bf6
Reference set readiness gaps detected (neutral)
Reference evidence present for 0/7 areas (0%) across 1 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.
Corrigido em bbf547d: o passo de verificação foi substituído por chamada não-mutante à Management API (curl GET /v1/projects | grep tnnnlkbymytvtqngbbqh), com nota explícita de que deploy-functions.yml não deve ser usado para validar — o job está vinculado a producao-edge-functions e function_name vazio deploya todas as funções em produção.
---
_Generated by Claude Code_
<!-- ecc-tools:pr-audit:ECC Tools / Hosted Promotion Readiness:bbf547db7195daba7fda682901789aa866e41bf6 -->
ECC Tools / Hosted Promotion Readiness
Commit: bbf547db7195daba7fda682901789aa866e41bf6
Hosted promotion readiness passed (success)
No hosted promotion evidence gaps detected across 1 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.
<sub><sub>!P2 Badge</sub></sub> Encode the password before constructing the database URI
When the newly generated password contains URI-reserved characters such as /, ?, #, or %, inserting it verbatim into this template changes how the connection string is parsed or makes it invalid, so every workflow using DESTINO_URL will fail immediately after the password reset. Have the operator copy the complete connection string from the dashboard or percent-encode the password before assembling the URI.
Useful? React with 👍 / 👎.
<sub><sub>!P2 Badge</sub></sub> Keep the new access token out of shell history
When an operator replaces this placeholder in a normal interactive shell, the new Management API PAT is persisted verbatim in shell history and is briefly exposed in the curl process arguments; revoking the old PAT therefore still leaves the replacement credential recoverable from the workstation. Validate through a mechanism that reads the token without embedding it in the command line, such as a protected temporary curl config or equivalent secret-aware tooling.
Useful? React with 👍 / 👎.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bbf547db71
<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>
<!-- ecc-tools:pr-audit:ECC Tools / Security Evidence:43f8f8f2bb04d88c276737b08b63809c9048ad42 -->
ECC Tools / Security Evidence
Commit: 43f8f8f2bb04d88c276737b08b63809c9048ad42
Security evidence gate passed (success)
No security-sensitive scanner-evidence gap detected.
Mode: enforce
Scanned 1 changed file(s). No missing scanner-evidence signal was detected.
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:43f8f8f2bb04d88c276737b08b63809c9048ad42 -->
ECC Tools / PR Risk Taxonomy
Commit: 43f8f8f2bb04d88c276737b08b63809c9048ad42
PR taxonomy clear (success)
Scanned 1 changed file(s). No taxonomy bucket signals were detected.
Scanned 1 changed file(s).
No PR taxonomy bucket signals were detected.
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 / Reference Set Readiness:43f8f8f2bb04d88c276737b08b63809c9048ad42 -->
ECC Tools / Reference Set Readiness
Commit: 43f8f8f2bb04d88c276737b08b63809c9048ad42
Reference set readiness gaps detected (neutral)
Reference evidence present for 0/7 areas (0%) across 1 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.
Corrigido em 43f8f8f: adicionado aviso explícito de que a URL deve ser copiada do dashboard (já vem URL-encodada) e, se montada manualmente, chars especiais URI devem ser percent-encodados (ex.: @ → %40, % → %25).
---
_Generated by Claude Code_
<!-- ecc-tools:pr-audit:ECC Tools / Hosted Promotion Readiness:43f8f8f2bb04d88c276737b08b63809c9048ad42 -->
ECC Tools / Hosted Promotion Readiness
Commit: 43f8f8f2bb04d88c276737b08b63809c9048ad42
Hosted promotion readiness passed (success)
No hosted promotion evidence gaps detected across 1 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.
Corrigido em 43f8f8f: o exemplo de verificação agora usa read -s TOKEN seguido de unset TOKEN, evitando que o token apareça no histórico do shell ou nos argumentos do processo.
---
_Generated by Claude Code_
Your trial has ended. Reactivate Greptile to resume code reviews.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43f8f8f2bb
<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> Account for every DESTINO_URL workflow before resetting
This inventory omits the production consumers in .github/workflows/db-migrate.yml, types-sync.yml, supabase-sync.yml, and targeted-ledger-evidence.yml. In particular, db-migrate.yml and the legacy import open multiple database connections and can perform writes, so an operator relying on this list may reset the password while one is running; because the runbook states that the old password is invalidated immediately, later connections in that run can fail after work has begun. Include these workflows and require checking that write-capable runs are idle before rotation.
Useful? React with 👍 / 👎.
<sub><sub>!P2 Badge</sub></sub> Validate the replacement token before the cutover
When a newly generated token is malformed or lacks access to the official project, this ordering overwrites the working Actions secret before discovering the problem in step 3, immediately breaking production edge deployments until another token is generated and installed. The non-mutating Management API check can be performed first, while the old repository secret remains intact, followed by the secret update and old-token revocation.
Useful? React with 👍 / 👎.
<sub><sub>!P2 Badge</sub></sub> Diagnose guard failures before resetting the password again
A failed db-live-guard does not establish that the new password is bad: the reviewed workflow also checks migration drift, ACLs, catalog and manifest freshness, generated types, triple parity, and runtime configuration. If any unrelated contract check is red, this rollback instruction causes another unnecessary password reset and invalidates the just-installed credential without addressing the failure; first distinguish an authentication failure from the individual guard verdicts, and only regenerate the password for a credential failure.
Useful? React with 👍 / 👎.
<sub><sub>!P1 Badge</sub></sub> Select the affected function when propagating rotated secrets
When an operator follows this instruction without supplying function_name, deploy-functions.yml uses its empty default and deploys every edge function to production, potentially releasing unrelated changes from main during a routine secret rotation. Specify the mappings (promogifts-catalog, crm-integration, and fetch-link-preview) and require the appropriate input, or direct operators to update the edge secret through the approved supabase secrets set/Dashboard path without triggering a code deployment.
AGENTS.md reference: AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
Correto — inventário incompleto. Próximo commit adiciona db-migrate.yml (escrita), types-sync.yml, supabase-sync.yml (import destrutivo) e targeted-ledger-evidence.yml, com aviso para confirmar que nenhum run de escrita está em andamento antes de rotar.
---
_Generated by Claude Code_
Válido — o rollback atual não distingue falha de credencial de outros checks. Próximo commit adiciona diagnóstico: verificar se a falha é password authentication failed antes de gerar nova senha; qualquer outro step (drift, catálogo, tipos) não exige reset.
---
_Generated by Claude Code_
Correto. Próximo commit move o passo de verificação (read -s TOKEN; curl ...) para antes do update do secret no Actions, enquanto o token antigo ainda está intacto. Se o grep falhar, o operador não sobrescreve o secret funcional.
---
_Generated by Claude Code_
Correto e bloqueante. Próximo commit substitui a instrução de disparar deploy-functions.yml por: propagar via Supabase Dashboard → Edge Functions → Manage secrets (ou supabase secrets set) — atualiza apenas variáveis de ambiente sem acionar deploy de código. O dispatch com function_name (promogifts-catalog, crm-integration, fetch-link-preview) só é necessário se houver mudança de código junto.
---
_Generated by Claude Code_
<!-- ecc-tools:pr-audit:ECC Tools / Security Evidence:28b2f45c0c0946710988c8ce6abe29dea1c55336 -->
ECC Tools / Security Evidence
Commit: 28b2f45c0c0946710988c8ce6abe29dea1c55336
Security evidence gate passed (success)
No security-sensitive scanner-evidence gap detected.
Mode: enforce
Scanned 1 changed file(s). No missing scanner-evidence signal was detected.
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:28b2f45c0c0946710988c8ce6abe29dea1c55336 -->
ECC Tools / PR Risk Taxonomy
Commit: 28b2f45c0c0946710988c8ce6abe29dea1c55336
PR taxonomy clear (success)
Scanned 1 changed file(s). No taxonomy bucket signals were detected.
Scanned 1 changed file(s).
No PR taxonomy bucket signals were detected.
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 / Reference Set Readiness:28b2f45c0c0946710988c8ce6abe29dea1c55336 -->
ECC Tools / Reference Set Readiness
Commit: 28b2f45c0c0946710988c8ce6abe29dea1c55336
Reference set readiness gaps detected (neutral)
Reference evidence present for 0/7 areas (0%) across 1 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.
<!-- ecc-tools:pr-audit:ECC Tools / Hosted Promotion Readiness:28b2f45c0c0946710988c8ce6abe29dea1c55336 -->
ECC Tools / Hosted Promotion Readiness
Commit: 28b2f45c0c0946710988c8ce6abe29dea1c55336
Hosted promotion readiness passed (success)
No hosted promotion evidence gaps detected across 1 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 Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28b2f45c0c
<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>!P1 Badge</sub></sub> Update the GitHub copies of rotated edge secrets
When any of these credentials is rotated, updating only the Edge environment leaves its GitHub Actions copy stale. The Configurar secrets nas edges step in .github/workflows/deploy-functions.yml lines 138–233 writes those Actions secrets back to Supabase during the next relevant or full deployment, so it can restore a revoked credential and take crm-integration, promogifts-catalog, or fetch-link-preview offline. Require updating the corresponding Actions secret as part of the rotation before changing the Edge value.
Useful? React with 👍 / 👎.
<sub><sub>!P1 Badge</sub></sub> Rotate the preview HMAC secret on the proxy too
When the rotated value is PREVIEW_EGRESS_SHARED_SECRET, propagating it only to the Edge immediately makes every preview request fail HMAC authentication because the VPS proxy still verifies with the old value. docs/runbooks/preview-egress-proxy.md lines 28–30 explicitly define this secret as living in both the VPS and Edge secret managers, so this procedure needs a coordinated VPS update and post-rotation validation rather than the Edge-only instruction.
Useful? React with 👍 / 👎.
<sub><sub>!P2 Badge</sub></sub> Keep the replacement PAT out of curl's arguments
On a shared or monitored operator workstation, read -s keeps the token out of shell history but the shell still expands $TOKEN into curl's -H argument, exposing the replacement PAT through the process command line while the request is running. Fresh evidence in the revised snippet is the interpolation in -H "Authorization: Bearer $TOKEN", so the previous mitigation does not address the process-argument portion of the original issue; pass the header through a protected file or another mechanism that does not place the value in argv.
Useful? React with 👍 / 👎.
<sub><sub>!P2 Badge</sub></sub> Avoid putting rotated edge secrets directly on the command line
When an operator substitutes an actual credential for valor, this command persists it in ordinary shell history and supplies it in the supabase process arguments, leaving the newly rotated service-role or HMAC secret recoverable from the workstation. Use the Dashboard path exclusively here or document a protected temporary --env-file workflow instead of inline KEY=valor.
Useful? React with 👍 / 👎.
<!-- ecc-tools:pr-audit:ECC Tools / Security Evidence:30ef8af4641fd05b44cee2bb3e975395c81b7a51 -->
ECC Tools / Security Evidence
Commit: 30ef8af4641fd05b44cee2bb3e975395c81b7a51
Security evidence gate passed (success)
No security-sensitive scanner-evidence gap detected.
Mode: enforce
Scanned 1 changed file(s). No missing scanner-evidence signal was detected.
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:30ef8af4641fd05b44cee2bb3e975395c81b7a51 -->
ECC Tools / PR Risk Taxonomy
Commit: 30ef8af4641fd05b44cee2bb3e975395c81b7a51
PR taxonomy clear (success)
Scanned 1 changed file(s). No taxonomy bucket signals were detected.
Scanned 1 changed file(s).
No PR taxonomy bucket signals were detected.
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.
Fixed in 30ef8af4. Adicionado "Procedimento geral" na seção de terceiros: passo 1 exige atualizar o Actions secret antes da Edge, com explicação explícita do risco (deploy-functions.yml linhas 138–233 reescreve a Edge a partir do Actions).
---
_Generated by Claude Code_
<!-- ecc-tools:pr-audit:ECC Tools / Reference Set Readiness:30ef8af4641fd05b44cee2bb3e975395c81b7a51 -->
ECC Tools / Reference Set Readiness
Commit: 30ef8af4641fd05b44cee2bb3e975395c81b7a51
Reference set readiness gaps detected (neutral)
Reference evidence present for 0/7 areas (0%) across 1 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.
Fixed in 30ef8af4. Adicionada subseção ⚠️ PREVIEW_EGRESS_SHARED_SECRET — procedimento coordenado (VPS + Edge) com passos: gerar novo valor → Actions → VPS proxy → Edge → validar HMAC → registrar.
---
_Generated by Claude Code_
<!-- ecc-tools:pr-audit:ECC Tools / Hosted Promotion Readiness:30ef8af4641fd05b44cee2bb3e975395c81b7a51 -->
ECC Tools / Hosted Promotion Readiness
Commit: 30ef8af4641fd05b44cee2bb3e975395c81b7a51
Hosted promotion readiness passed (success)
No hosted promotion evidence gaps detected across 1 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.
Fixed in 30ef8af4. supabase secrets set KEY=valor substituído por Dashboard exclusivo (com nota sobre --env-file + chmod 600 como alternativa CLI segura).
---
_Generated by Claude Code_
Fixed in 30ef8af4. curl -H "Authorization: Bearer $TOKEN" substituído por SUPABASE_ACCESS_TOKEN="$TOKEN" supabase projects list — variável de ambiente não aparece em argv.
---
_Generated by Claude Code_
Your trial has ended. Reactivate Greptile to resume code reviews.
<sub><sub>!P1 Badge</sub></sub> Update the dedicated preview proxy instead of Evolution GO
When an operator follows the explicitly offered evolution-go-rxj2 option, the HMAC secret is changed on the unrelated WhatsApp service rather than on the proxy that verifies preview signatures; step 4 then switches the Edge to the new value while the real proxy retains the old one, disabling all uncached previews. Fresh repository evidence is that infrastructure/preview-egress-proxy/docker-compose.yml defines a separate preview-egress-proxy service, while docs/runbooks/preview-egress-proxy.md:24-27 explicitly says not to replace or restart Evolution containers, so this step should name only the dedicated proxy service and its secret store.
Useful? React with 👍 / 👎.
<sub><sub>!P2 Badge</sub></sub> Provide an overlap period for the preview HMAC rotation
Even when step 3 targets the correct proxy, updating the proxy before the Edge creates a guaranteed mismatch window in which every Edge request is signed with the old key and rejected by the proxy using the new key. Both implementations accept exactly one value (infrastructure/preview-egress-proxy/main.go:61-68 and supabase/functions/_shared/secure-egress.ts:95-100), so calling the procedure coordinated does not prevent the outage; document a dual-key rollout or an explicit maintenance/atomic cutover strategy before removing the old key.
Useful? React with 👍 / 👎.
<sub><sub>!P1 Badge</sub></sub> Validate a populated preview instead of only HTTP 200
A mismatched HMAC still passes this validation: the proxy's non-2xx response is converted to null by fetchPreviewViaSecureEgress, and supabase/functions/fetch-link-preview/index.ts:252-257 returns HTTP 200 with {"preview":null}; a cached URL can likewise return 200 without contacting the proxy. Fresh evidence in the current handler therefore shows that HTTP status does not establish “HMAC ok”; use a fresh uncached URL and require a non-null preview, ideally corroborated by the proxy log.
Useful? React with 👍 / 👎.
<sub><sub>!P2 Badge</sub></sub> Audit the active production service-role secret
The high-risk checklist omits SUPABASE_SERVICE_ROLE_KEY, even though .github/workflows/e2e-logado.yml:90 consumes it and docs/audits/REVISAO_PLANO_100_ETAPAS_2026-09-28.md:49-51 records that it remains an active repository-level secret with privileged production access. Because it is referenced, the generic orphan check will not flag it, so the documented semiannual audit can complete without reviewing or rotating one of the repository's most powerful credentials.
Useful? React with 👍 / 👎.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30ef8af464
<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>
Corrigido no próximo commit: passo 3 agora referencia o serviço preview-egress-proxy (stack infrastructure/preview-egress-proxy/) e o gerenciador de secrets da VPS Hostinger — não o container evolution-go-rxj2 da Evolution GO. O runbook de deploy explícito (docs/runbooks/preview-egress-proxy.md passo 2) proíbe substituir ou reiniciar containers da Evolution para isso.
---
_Generated by Claude Code_
Corrigido no próximo commit: passo 5 substituído por "chamar fetch-link-preview com URL pública fresca (sem cache) e confirmar que a resposta contém preview não nulo". HTTP 200 com {"preview":null} é exatamente o retorno de uma falha HMAC (fetchPreviewViaSecureEgress converte não-2xx em null; index.ts devolve 200 de qualquer forma).
---
_Generated by Claude Code_
<!-- ecc-tools:pr-audit:ECC Tools / Security Evidence:0f2da941e8404c6c4495716efdb08c832bd5ceac -->
ECC Tools / Security Evidence
Commit: 0f2da941e8404c6c4495716efdb08c832bd5ceac
Security evidence gate passed (success)
No security-sensitive scanner-evidence gap detected.
Mode: enforce
Scanned 1 changed file(s). No missing scanner-evidence signal was detected.
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:0f2da941e8404c6c4495716efdb08c832bd5ceac -->
ECC Tools / PR Risk Taxonomy
Commit: 0f2da941e8404c6c4495716efdb08c832bd5ceac
PR taxonomy clear (success)
Scanned 1 changed file(s). No taxonomy bucket signals were detected.
Scanned 1 changed file(s).
No PR taxonomy bucket signals were detected.
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 / Reference Set Readiness:0f2da941e8404c6c4495716efdb08c832bd5ceac -->
ECC Tools / Reference Set Readiness
Commit: 0f2da941e8404c6c4495716efdb08c832bd5ceac
Reference set readiness gaps detected (neutral)
Reference evidence present for 0/7 areas (0%) across 1 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.
Your trial has ended. Reactivate Greptile to resume code reviews.
<!-- ecc-tools:pr-audit:ECC Tools / Hosted Promotion Readiness:0f2da941e8404c6c4495716efdb08c832bd5ceac -->
ECC Tools / Hosted Promotion Readiness
Commit: 0f2da941e8404c6c4495716efdb08c832bd5ceac
Hosted promotion readiness passed (success)
No hosted promotion evidence gaps detected across 1 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.
<!-- ecc-tools:pr-audit:ECC Tools / Security Evidence:8f9333d32134063ebf4d027f85c611cd74f53333 -->
ECC Tools / Security Evidence
Commit: 8f9333d32134063ebf4d027f85c611cd74f53333
Security evidence gate passed (success)
No security-sensitive scanner-evidence gap detected.
Mode: enforce
Scanned 1 changed file(s). No missing scanner-evidence signal was detected.
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:8f9333d32134063ebf4d027f85c611cd74f53333 -->
ECC Tools / PR Risk Taxonomy
Commit: 8f9333d32134063ebf4d027f85c611cd74f53333
PR taxonomy clear (success)
Scanned 1 changed file(s). No taxonomy bucket signals were detected.
Scanned 1 changed file(s).
No PR taxonomy bucket signals were detected.
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 / Reference Set Readiness:8f9333d32134063ebf4d027f85c611cd74f53333 -->
ECC Tools / Reference Set Readiness
Commit: 8f9333d32134063ebf4d027f85c611cd74f53333
Reference set readiness gaps detected (neutral)
Reference evidence present for 0/7 areas (0%) across 1 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.
Your trial has ended. Reactivate Greptile to resume code reviews.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f9333d321
<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>
adm01-debug
Resumo
Cria
docs/runbooks/secret-rotation.mdcom os procedimentos de rotação dos secrets de maior risco do repositório.O que muda
docs/runbooks/secret-rotation.md(arquivo novo):-
DESTINO_URL— connection string PostgreSQL do CI; procedimento zero-downtime em 5 passos (reset senha Supabase → atualizar secret → verificar viadb-live-guard→ invalidação automática da senha antiga → registrar em issue). Inclui janela crítica de ~5 min entre passo 1 e 2, rollback e frequência recomendada (90 dias).-
SUPABASE_ACCESS_TOKEN— token de acesso para deploy de edge functions; quando rotar (expirado/revogado/saída de membro) e como verificar.- Secrets de terceiros (
PROMOGIFTS,EXTERNAL_SUPABASE,PREVIEW_EGRESS) — nota de dependência de processo externo.- Checklist de auditoria semestral (5 itens).
Por que
DESTINO_URLinclui senha dopostgresde produção — o secret de maior risco do repo. Não havia procedimento documentado de "quando rotar" nem de "como rotar sem derrubar o CI". Este runbook fecha essa lacuna.O que foi verificado
Conteúdo baseado no formato real da connection string (
aws-0-sa-east-1.pooler.supabase.com:6543) e no comportamento do Supabase (reset de senha invalida a anterior imediatamente). Nenhum código foi alterado.---
🤖 Generated with Claude Code
https://claude.ai/code/session_01P3JwbGdTS7xbTTyUt8PUZC
<!-- This is an auto-generated description by cubic. -->
---
Summary by cubic
Adiciona
docs/runbooks/secret-rotation.mdcom os procedimentos de rotação dos secrets de maior risco do repositório, fechando a lacuna sobre quando e como rotar sem derrubar o CI.DESTINO_URL(connection string PostgreSQL do CI): procedimento zero-downtime em 5 passos, janela crítica de ~5 min entre reset de senha e atualização do secret, alerta de percent-encoding, rollback com diagnóstico (não resetar senha em falhas de drift/catálogo/tipos) e frequência de 90 dias.SUPABASE_ACCESS_TOKEN: exige revogação do token antigo (tokens não expiram), validação não-mutante viasupabase projects listcom env var (evita histórico do shell e argv) e evitadeploy-functions.yml, que não tem staging e deploya todas as funções.PREVIEW_EGRESS_SHARED_SECRET: procedimento coordenado entre VPS (preview-egress-proxy) e Edge, com janela de indisponibilidade nas previews entre os passos e validação via resposta compreviewnão nulo.SUPABASE_SERVICE_ROLE_KEY. Nenhum código foi alterado.<sup>Written for commit 8f9333d32134063ebf4d027f85c611cd74f53333. Summary will update on new commits.</sup>
<a href="https://cubic.dev/pr/adm01-debug/Zapp_Web_V2/pull/1104?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. -->