A read-only review of an app's readiness for production. With honest coverage.Uma revisão somente leitura da prontidão de um app para produção. Com cobertura honesta.
Vistoria answers one question for an app's owner: what stands between this app and production, and how sure are we? It reviews the code for security and what the app needs beyond its code, has every finding refuted or confirmed by a second agent, and writes a report outside the repository.A Vistoria responde uma pergunta para o dono de um app: o que separa este app da produção, e com que certeza? Revisa a segurança do código e o que o app precisa além dele, faz um segundo agente refutar ou confirmar cada achado, e escreve um relatório fora do repositório.
/vistoria:review [--only <areas>] [--evidence <dir>] [--dynamic <authorization.yaml>]OverviewVisão geral
It fits an app built quickly, often with an AI tool (Lovable, Bolt, Replit, v0, Cursor, Claude Code), that is about to take real customers. It says what stands in the way, how sure each point is, and what was not looked at.Serve para um app feito rápido, muitas vezes com uma ferramenta de IA (Lovable, Bolt, Replit, v0, Cursor, Claude Code), prestes a receber clientes de verdade. Diz o que está no caminho, o grau de certeza de cada ponto e o que não foi visto.
- The code, for security: an attack surface, the scanners already installed, and a read-only auditor agent in parallel on slices of the code and on six passes across it.O código, quanto à segurança: uma superfície de ataque, os scanners já instalados e um agente auditor somente leitura, em paralelo, sobre fatias do código e seis passagens por ele.
- The app beyond the code: how the browser reaches the data (Supabase RLS, Firebase rules), authentication settings, secrets exposed to the browser, hosting configuration and payment webhooks, from the code and from evidence you provide from a staging copy.O app além do código: como o navegador chega aos dados (RLS do Supabase, regras do Firebase), definições de autenticação, segredos expostos ao navegador, configuração de hospedagem e webhooks de pagamento, a partir do código e de evidências que você fornece de uma cópia de staging.
- Every finding checked by a fresh agent that tries to refute it.Cada achado conferido por um agente novo que tenta refutá-lo.
- Dynamic tests only when authorized, against a test environment with synthetic data.Testes dinâmicos só com autorização, contra um ambiente de teste com dados sintéticos.
- An honest report: a verdict decided by a script, what was not evaluated, and privacy signals for a person to review. Never “100% secure”, never a legal opinion.Um relatório honesto: um veredito decidido por um script, o que não foi avaliado e sinais de privacidade para uma pessoa rever. Nunca “100% seguro”, nunca um parecer jurídico.
~/.vistoria/runs/.Não escreve nada no repositório: nenhum arquivo, commit, deploy, issue ou pull request. O relatório vai para ~/.vistoria/runs/.InstallInstalar
claude plugin marketplace add <path or git URL of the vistoria repository>
claude plugin install vistoria@vistoriaRestart Claude Code, then type /vistoria:review in the repository of the app.Reinicie o Claude Code e digite /vistoria:review no repositório do app.
bin/install-codex.shOnce per machine; run it again to update. It copies the engine to ~/.vistoria/engine and the skill to ~/.agents/skills/vistoria-review, and writes nothing in any project. Type $vistoria-review.Uma vez por máquina; rode de novo para atualizar. Copia o motor para ~/.vistoria/engine e a skill para ~/.agents/skills/vistoria-review, e não escreve nada em nenhum projeto. Digite $vistoria-review.
RequirementsRequisitos
bash3.2+,git,jq,yq(mikefarah v4)- Optional scanners:
gitleaks,semgrep,osv-scanner,trivyand the like. It uses those it finds and installs none.Scanners opcionais:gitleaks,semgrep,osv-scanner,trivye semelhantes. Usa os que encontra e não instala nenhum.
UseUsar
# the code and its configuration, statically
/vistoria:review
# plus your answers to the intake
/vistoria:review --evidence ~/vistoria/acme
# plus dynamic tests on an authorized test environment
/vistoria:review --evidence ~/vistoria/acme --dynamic ~/vistoria/acme/dynamic.yaml
# only some areas; the others are reported as not evaluated
/vistoria:review --only secrets,data-access1. First run, no arguments1. Primeira execução, sem argumentos
It detects the stack, reviews the code and what it can of the app's context from the repository, and lists what it could not see, numbered, with why each item matters.Detecta a stack, revisa o código e o que consegue do contexto do app a partir do repositório, e lista o que não conseguiu ver, numerado, com o motivo de cada item.
2. The evidence2. As evidências
Answer what you can, as files in a folder outside the repository, from a staging or local copy: for Supabase the output of templates/supabase-rls.sql (it reads catalog tables only, never a row of your data), the auth settings, the webhook endpoints registered at the payment provider, and the names (never the values) of the environment variables in each environment. Anything you leave out is reported as not evaluated.Responda o que puder, como arquivos numa pasta fora do repositório, a partir de uma cópia de staging ou local: para Supabase, a saída de templates/supabase-rls.sql (lê só tabelas de catálogo, nunca uma linha dos seus dados), as definições de auth, os endpoints de webhook registrados no provedor de pagamento e os nomes (nunca os valores) das variáveis de ambiente de cada ambiente. O que ficar de fora é relatado como não avaliado.
psql "$STAGING_DB_URL" -X -A -F $'\t' -f supabase-rls.sql > ~/vistoria/acme/supabase-rls.tsv3. Dynamic tests (optional)3. Testes dinâmicos (opcional)
Only against a test environment that holds synthetic data. Copy templates/dynamic.yaml outside the repository and fill it in: who authorizes, until when, the test hosts, the production hosts to stay away from, and the tests allowed.Só contra um ambiente de teste com dados sintéticos. Copie templates/dynamic.yaml para fora do repositório e preencha: quem autoriza, até quando, os hosts de teste, os hosts de produção a evitar e os testes permitidos.
| TestTeste | What it doesO que faz |
|---|---|
anon-read | With the test project's public key, reads one row of a table or bucket a finding says is open. Records the status and the row count only.Com a chave pública do projeto de teste, lê uma linha de uma tabela ou bucket que um achado diz estar aberto. Registra só o status e a contagem de linhas. |
cross-account | Signed in as one synthetic account, reads or changes a record of the other.Com a sessão de uma conta sintética, lê ou altera um registro da outra. |
webhook-unsigned | Sends the provider's test event, unsigned, to the test webhook in the provider's test mode.Envia o evento de teste do provedor, sem assinatura, ao webhook de teste, no modo de teste do provedor. |
The script refuses an incomplete, expired or planted authorization; the review still asks you to confirm in the conversation, and checks every URL before sending it. A handful of requests per test: no fuzzing, no load, no deletes. Without the file, nothing is sent to any running app.O script recusa uma autorização incompleta, expirada ou plantada; a revisão ainda pede a sua confirmação na conversa e confere cada URL antes de enviar. Poucos pedidos por teste: sem fuzzing, sem carga, sem exclusões. Sem o arquivo, nada é enviado a nenhum app no ar.
The nine areasAs nove áreas
Each area ends as evaluated partial not evaluated out of scope or not applicable, with what was read. The first five below are core: one of them not evaluated makes the verdict inconclusive.Cada área termina como avaliada parcial não avaliada fora do âmbito ou não se aplica, com o que foi lido. As cinco primeiras abaixo são centrais: uma delas não avaliada torna o veredito inconclusivo.
| AreaÁrea | What is looked atO que é visto |
|---|---|
code | Untrusted input to sinks (injection, traversal, SSRF, XSS), business logic and state, calls to models.Entrada não confiável até os sinks (injeção, traversal, SSRF, XSS), lógica de negócio e estado, chamadas a modelos. |
access | Every entry point against the actor who may call it and the check that enforces it; the authentication setup.Cada ponto de entrada contra o ator que pode chamá-lo e a verificação que o garante; as definições de autenticação. |
data-access | Tables, views, functions and buckets the browser reaches: RLS, policies, grants, SECURITY DEFINER functions. The deployed state wins over the migrations.Tabelas, views, funções e buckets que o navegador alcança: RLS, políticas, grants, funções SECURITY DEFINER. O estado publicado prevalece sobre as migrations. |
secrets | Hard-coded secrets, keys under a public prefix, weak crypto and tokens, which keys each environment holds.Segredos no código, chaves com prefixo público, criptografia e tokens fracos, que chaves cada ambiente guarda. |
payments-webhooks | Signature on the raw body, replays, amount and state taken from the provider.Assinatura sobre o corpo cru, repetições, valor e estado vindos do provedor. |
dependencies | Advisories the code reaches, unpinned packages, CI that runs untrusted code with secrets.Avisos que o código alcança, pacotes sem versão fixa, CI que roda código não confiável com segredos. |
deploy | Headers, CORS, public previews with production keys, debug modes.Cabeçalhos, CORS, previews públicos com chaves de produção, modos de debug. |
privacy-signals | Questions for a person, by jurisdiction, each citing an official source. They never change the verdict.Perguntas para uma pessoa, por jurisdição, cada uma citando uma fonte oficial. Nunca mudam o veredito. |
dynamic | The three probes above, only when authorized.As três sondagens acima, só com autorização. |
VerdictsVereditos
The verdict is decided by bin/vistoria.sh verdict from the findings and the coverage, never written by hand.O veredito é decidido por bin/vistoria.sh verdict a partir dos achados e da cobertura, nunca escrito à mão.
| VerdictVeredito | WhenQuando |
|---|---|
| not_ready | A blocker or major backed by a test or by evidence in the code or configuration.Um bloqueante ou grave com um teste ou evidência no código ou na configuração. |
| inconclusive | A blocker or major only as a hypothesis, or a core area not evaluated.Um bloqueante ou grave só como hipótese, ou uma área central não avaliada. |
| ready_with_conditions | Only minor findings, or an area evaluated in part.Só achados menores, ou uma área avaliada em parte. |
| no_blockers_found | None of the above, within the scope evaluated.Nenhum dos anteriores, dentro do âmbito avaliado. |
FindingsAchados
Each finding has a severity, a component, the actor who can do it, the evidence, the impact, safe steps to reproduce on a test copy, the fix and its limitations.Cada achado tem gravidade, componente, o ator que consegue, a evidência, o impacto, passos seguros para reproduzir numa cópia de teste, a correção e as suas limitações.
| SeverityGravidade | MeaningSignificado |
|---|---|
| blocker | Exploitable now by an actor the context names, with no other flaw needed.Explorável agora por um ator que o contexto nomeia, sem precisar de outra falha. |
| major | Anything that can leak or destroy data, widen access, fail open, run code or break production, however small its fix.Tudo o que pode vazar ou destruir dados, ampliar acesso, falhar aberto, executar código ou derrubar a produção, por menor que seja a correção. |
| minor | The rest.O resto. |
| StatusEstado | MeaningSignificado |
|---|---|
reproduced | A dynamic test showed it in a test environment; the record is kept in the run.Um teste dinâmico mostrou-o num ambiente de teste; o registro fica na execução. |
static | The code or the evidence shows it and the refutation confirmed it.O código ou a evidência mostra-o e a refutação confirmou. |
hypothesis | Plausible, or it needs what is not at hand; the finding says what would settle it.Plausível, ou depende do que não está à mão; o achado diz o que o resolveria. |
{"id": "V-1", "source": "context", "severity": "blocker", "status": "static",
"title": "…", "component": "…", "actor": "…", "evidence": ["file:line"],
"impact": "…", "reproduce": "…", "fix": "…", "limitations": "…", "cwe": "CWE-862"}The reportO relatório
Each run lives in ~/.vistoria/runs/<repository>-<id>/<UTC time>/, readable only by you.Cada execução fica em ~/.vistoria/runs/<repositório>-<id>/<hora UTC>/, legível só por você.
| FileArquivo | What it holdsO que contém |
|---|---|
report.html | The report as one self-contained page: verdict, what to do first, coverage, findings with search and filters, hypotheses, dynamic tests, privacy signals with sources. Light and dark, print to PDF, English and Portuguese labels. It makes no network request.O relatório numa única página autossuficiente: veredito, o que fazer primeiro, cobertura, achados com busca e filtros, hipóteses, testes dinâmicos, sinais de privacidade com fontes. Claro e escuro, impressão em PDF, rótulos em inglês e português. Não faz nenhum pedido de rede. |
report.md | The same content as text, in your language.O mesmo conteúdo em texto, no seu idioma. |
findings.jsoncoverage.jsonsignals.json | The findings, the nine areas and the privacy signals: what the verdict is decided from.Os achados, as nove áreas e os sinais de privacidade: de onde o veredito é decidido. |
verdict.json | Written by the script: the verdict, its reasons and the counts.Escrito pelo script: o veredito, os motivos e as contagens. |
meta.json | What the HTML report shows beside the findings: the app, the commit, the first three things to do, the method.O que o relatório HTML mostra além dos achados: o app, o commit, as três primeiras coisas a fazer, o método. |
context.md surface.mdhunt/ tools/ dynamic/ | Working files: the app's context and attack surface, each agent's answer, scanner output, the records of dynamic requests (status and size, never response values).Arquivos de trabalho: contexto e superfície de ataque do app, a resposta de cada agente, saída dos scanners, registros dos pedidos dinâmicos (status e tamanho, nunca valores das respostas). |
Open the sample report of a fictional app →Abrir o relatório de exemplo de um app fictício →
Scripts
Scripts decide, agents judge: anything a machine can check lives in bin/vistoria.sh, with a test.Os scripts decidem, os agentes julgam: tudo o que uma máquina pode conferir está em bin/vistoria.sh, com um teste.
bin/vistoria.sh run-dir --repo . # this run's folder, outside the repository
bin/vistoria.sh detect --repo . # stack signals and what to ask the owner
bin/vistoria.sh dynamic check --file F --repo . # is this authorization usable?
bin/vistoria.sh dynamic allow --file F --url U # may a test reach U?
bin/vistoria.sh verdict --run DIR # validate the run and decide the verdict
bin/vistoria.sh report --run DIR # the run as one HTML page
bin/install-codex.sh # install for Codexdetect reads file names and searches the code; it never opens an env file and never prints a value. Exit codes: 0 ok or allowed, 1 invalid, refused or not allowed, 2 usage.detect lê nomes de arquivos e pesquisa o código; nunca abre um arquivo env e nunca imprime um valor. Códigos de saída: 0 ok ou permitido, 1 inválido, recusado ou não permitido, 2 uso.
Security of the processSegurança do processo
- Read-only. The agents have Read, Grep and Glob only. The person decides what happens next.Somente leitura. Os agentes só têm Read, Grep e Glob. A pessoa decide o que acontece depois.
- The repository is data. Code, comments, READMEs, test data, file names, scanner output, evidence files and the app's responses never instruct the agents; text that tries to is reported as a finding when found.O repositório é dado. Código, comentários, READMEs, dados de teste, nomes de arquivos, saída de scanners, evidências e respostas do app nunca instruem os agentes; texto que tente é relatado como achado quando encontrado.
- No credentials, no customer data. A secret is named by file, line and kind, never by value. Data is described by table and column.Sem credenciais, sem dados de clientes. Um segredo é nomeado por arquivo, linha e tipo, nunca pelo valor. Os dados são descritos por tabela e coluna.
- No production testing. A production host is always refused.Sem testes em produção. Um host de produção é sempre recusado.
- Findings are checked. Scanner hits are leads. Refuted findings leave the report, by count.Os achados são conferidos. Resultados de scanners são pistas. Os achados refutados saem do relatório, por contagem.
The hosted appO app hospedado
The app runs the same plugin for people who do not use Claude Code: sign in with GitHub, pick a repository, choose the reviews, and open the HTML report when it ends.O app roda o mesmo plugin para quem não usa o Claude Code: entre com o GitHub, escolha um repositório, selecione as revisões e abra o relatório HTML no fim.
- GitHub: a GitHub App with read-only access to the contents of the repositories you choose.GitHub: uma GitHub App com acesso somente leitura ao conteúdo dos repositórios que você escolher.
- Isolation: each run clones the repository into its own sandbox container. The container has no open internet access: it can only fetch that one repository and call the model, both through the app, which keeps the GitHub token and the model key outside the sandbox.Isolamento: cada execução clona o repositório na sua própria sandbox. O contêiner não tem acesso aberto à internet: só consegue buscar esse repositório e chamar o modelo, ambos através do app, que guarda o token do GitHub e a chave do modelo fora da sandbox.
- What is kept: the report and the run's JSON files. The sandbox and its copy of the code are destroyed when the run ends.O que é guardado: o relatório e os arquivos JSON da execução. A sandbox e a sua cópia do código são destruídas no fim.
- What it does not do: evidence intake and dynamic tests are in the plugin only; in the hosted app the
dynamicarea is always not evaluated.O que não faz: coleta de evidências e testes dinâmicos existem só no plugin; no app hospedado a áreadynamicfica sempre como não avaliada.
LimitsLimites
- An automated review. Agents miss flaws and raise false ones; a person should confirm the blockers before acting on them. The report is not a signed opinion and not a certification.Uma revisão automatizada. Agentes deixam passar falhas e apontam falsas; uma pessoa deve confirmar os bloqueantes antes de agir. O relatório não é um parecer assinado nem uma certificação.
- What is not in the repository or the evidence is not evaluated: the provider's own infrastructure, settings changed in a dashboard and not shared, load and availability, mobile builds, third-party services.O que não está no repositório ou nas evidências não é avaliado: a infraestrutura do provedor, definições alteradas num painel e não partilhadas, carga e disponibilidade, builds móveis, serviços de terceiros.
- The deployed state is only as good as the evidence: migrations show intent, the RLS export from a copy shows that copy.O estado publicado vale o que valem as evidências: as migrations mostram a intenção, a exportação de RLS de uma cópia mostra essa cópia.
- Dynamic tests prove what they reproduce, on the test environment; production may differ.Os testes dinâmicos provam o que reproduzem, no ambiente de teste; a produção pode ser diferente.
- Privacy signals cover only the jurisdictions in
templates/sources.yaml(today, Brazil: the LGPD and the ANPD's incident regulation). Tax rules and payment-scheme rules are out of scope.Os sinais de privacidade cobrem só as jurisdições emtemplates/sources.yaml(hoje, Brasil: a LGPD e o regulamento de incidentes da ANPD). Regras fiscais e de arranjos de pagamento ficam fora do escopo.