mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-16 17:09:09 +00:00
Pre-flight sweep (Phase 0). Test suites ran on the dedicated 32-core box so the self-inflicted load of `node --test` could not fabricate timing flakes. Base-reds fixed (all real, all from merged cycle PRs that did not update their characterization tests): - providers-constants-split / quota-plan-registry / provider-translate-path GOLDEN: #8861 added the Xiaomi MiMo Token Plan provider, so APIKEY_PROVIDERS is 195 (was 194), knownProviders() is 12 (was 11) and the translate-path snapshot gains one purely additive entry. Counts aligned to the shipped catalog, never relaxed. - agent-skills-content: skills/config-codex-cli/ was added by #8709 with a custom block, so the custom-block set is 13, not 12. - chatcore-compression-integration: #8595/#8560 deliberately decoupled REACTIVE context compaction from the `enabled` master switch, so a body above 70% of the window is pruned even with compression off. The test was sized above that threshold, which made it assert against intended behavior; it now stays below it and keeps testing the invariant it was written for (resolveBasePlan short-circuits to "off" before reading comboOverrides). Static gates: - 3 shellcheck directives were malformed (`# shellcheck disable=SC2086 — text`; the em-dash makes shellcheck reject the whole directive as SC1125) in ci.yml and nightly-release-green.yml — the comment now sits on its own line. - gitleaks: 2 new generic-api-key false positives allowlisted with justification — a localStorage key for the sponsor banner (#8723) and the PUBLIC Adobe Firefly web x-api-key, whose only literals are in JSDoc (the runtime reads it through resolvePublicCred, per Hard Rule #11). secretFindings back to 0. - zizmor 176 -> 189 and bundleSize 6762 -> 7666 rebaselined with the measurement and the reason; both are ordinary cycle drift absorbed at release. Environment-dependent failures classified out, not silenced: the two tproxy tests assert the native addon is unavailable/unprivileged and therefore fail when the suite runs as root on the build box (they pass as a normal user), and the consoleInterceptor rate-limit test is a 4s-timing flake under load (6/6 isolated).
96 lines
4.1 KiB
TOML
96 lines
4.1 KiB
TOML
# .gitleaks.toml — Configuração do gitleaks para OmniRoute
|
|
# Task 7.18 — PLANO-QUALITY-GATES-FASE7.md
|
|
#
|
|
# Estende as regras padrão do gitleaks com allowlists específicas do projeto.
|
|
#
|
|
# INSTRUÇÕES para allowlists:
|
|
# Findings legítimos (fixtures de teste, creds OAuth públicas já cobertas pelo
|
|
# check-public-creds.mjs, valores de exemplo em docs) devem ser registrados abaixo
|
|
# em [[allowlist]] com um comentário explicativo obrigatório.
|
|
#
|
|
# NÃO adicione uma entrada de allowlist sem justificativa. Cada entrada é revisada
|
|
# a cada release (stale-enforcement). Regra: se o finding é um valor real que o
|
|
# sistema usa em produção, é um verdadeiro positivo — não allowliste, corrija.
|
|
#
|
|
# Referência: docs/security/PUBLIC_CREDS.md (credenciais OAuth públicas conhecidas)
|
|
# CLAUDE.md Hard Rule #11 (resolvePublicCred obrigatório)
|
|
|
|
# Herdar TODAS as regras padrão do gitleaks. ATENÇÃO: um config customizado
|
|
# SEM [extend].useDefault = true (e sem [[rules]] próprias) resulta em ZERO
|
|
# regras — o gitleaks SUBSTITUI o ruleset padrão pelo arquivo, não o estende
|
|
# automaticamente. Sem esta seção, `gitleaks --config .gitleaks.toml` nunca
|
|
# detecta nada (todo finding vira 0), tornando o gate inerte. Com useDefault,
|
|
# a allowlist abaixo é aplicada POR CIMA das ~170 regras padrão.
|
|
[extend]
|
|
useDefault = true
|
|
|
|
# Para desabilitar uma regra específica, usar:
|
|
# [[rules]]
|
|
# id = "rule-id"
|
|
# [rules.allowlist]
|
|
# description = "..."
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Allowlist global do projeto
|
|
# Entradas aqui são ignoradas em TODAS as varreduras.
|
|
# ---------------------------------------------------------------------------
|
|
[allowlist]
|
|
description = "OmniRoute project-level allowlist — fixtures, test vectors, public OAuth creds"
|
|
|
|
# Paths a ignorar completamente (node_modules, builds, etc.)
|
|
paths = [
|
|
'''node_modules''',
|
|
'''\.next''',
|
|
'''dist''',
|
|
'''\.git''',
|
|
'''coverage''',
|
|
'''\.nyc_output''',
|
|
]
|
|
|
|
# Commits específicos a ignorar (ex: commit que introduziu fixtures de teste)
|
|
# commits = []
|
|
|
|
# Regexes de stopwords — linhas que contêm estes padrões são ignoradas.
|
|
# Usar apenas para falsos positivos comprovados com justificativa abaixo.
|
|
# stopwords = []
|
|
|
|
# Regexes de targets (paths de arquivos) que podem ser allowlistados por regra.
|
|
# Ver [[allowlist]] por-regra abaixo para granularidade.
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Allowlist por-regra (adicionar conforme necessário durante o stale review)
|
|
# ---------------------------------------------------------------------------
|
|
#
|
|
# Exemplo (REMOVER / SUBSTITUIR por entradas reais quando necessário):
|
|
#
|
|
# [[rules]]
|
|
# # Allowlistar fixtures de teste que contêm tokens OAuth de exemplo/inválidos
|
|
# # Adicionado: 2026-06-13 | Revisar em: v3.9.0 | Justificativa: valores não-reais de teste
|
|
# id = "github-fine-grained-pat"
|
|
# [rules.allowlist]
|
|
# description = "Test fixture PATs — valores sintéticos, não funcionais"
|
|
# paths = [
|
|
# '''tests/fixtures/''',
|
|
# '''tests/unit/''',
|
|
# ]
|
|
#
|
|
|
|
[[rules]]
|
|
# Falsos-positivos comprovados do generic-api-key — zerados em 2026-07-13 (WS6/D3,
|
|
# plano v3.8.49). Revisar em v3.9.0. Nenhum é credencial: dois são NOMES DE CAMPO
|
|
# de métricas de latência; o terceiro é o valor PÚBLICO de um beta header da API
|
|
# da Anthropic (documentado publicamente, não é segredo).
|
|
id = "generic-api-key"
|
|
[rules.allowlist]
|
|
description = "Field names + public Anthropic beta-header value (não são segredos)"
|
|
regexes = [
|
|
'''latencyP\d{2}Ms''',
|
|
'''interleaved-thinking-2025-05-14''',
|
|
# v3.8.49 pre-flight (2026-07-28). Nenhum dos dois e credencial:
|
|
# - chave de localStorage do banner de patrocinio (#8723), so um identificador de UI;
|
|
# - x-api-key PUBLICO do Firefly web (documentado em open-sse/utils/publicCreds.ts:207);
|
|
# as duas ocorrencias sinalizadas estao em COMENTARIOS JSDoc, o runtime le de resolvePublicCred().
|
|
'''omniroute-kimi-sponsor-banner-dismissed-v1''',
|
|
'''SunbreakWebUI1''',
|
|
]
|