Skip to content

fix(security): P1 audit fixes - Oracle identifier quoting, env credential gates, /health and OTel hardening - #2107

Merged
FabioLeitao merged 12 commits into
mainfrom
epic/security-zero-2026-10-19
Oct 19, 2026
Merged

FabioLeitao merged 12 commits into
mainfrom
epic/security-zero-2026-10-19

Conversation

@FabioLeitao

@FabioLeitao FabioLeitao commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Security epic, PR A of 2. Fixes the three P1 findings from the security-audit run 1 and the Slack triage (#2094, #2086, #2087) plus three confirmed P2 findings (#2088, #2089, #2077). One commit per subject, each written test-first (red before the fix) and SSH-signed.

Residual risk, stated plainly: allowed_hosts is read from the same YAML the config author writes (same limit as #1977). Against that author only the env-name prefix is an independent control. An operator-controlled allowlist is tracked in #2103 and is out of scope here.

Not in this PR: #2078 and the needs-validation findings (#2090 to #2100) go in PR B. #2098 (workflow gate), #2080 and #2101 are operator-owned and untouched.

Type of change

  • Bug fix
  • Documentation
  • New feature
  • Refactor / maintenance
  • Other (describe):

Breaking changes and migration (also in CHANGELOG)

  • An env credential key (pass_from_env, password_from_env, user_from_env, auth.token_from_env, auth.client_secret_from_env, client_secret_from_env) on a non-REST target or findings_sink now needs a prefixed name and allowed_hosts; otherwise config load fails. Shipped samples and docs were migrated.
  • notifications.public_base_url: ${VAR} now raises at load instead of expanding.
  • /health no longer carries license, trust, transport or integrity; read them from GET /status.
  • Minimum FastAPI is now 0.143.0.

Issue linking (required)

The closing keywords are deliberately outside a code block: GitHub ignores them inside fences.

Closes #2094
Closes #2086
Closes #2087
Closes #2088
Closes #2089
Closes #2077

  • This PR links the issue with Closes #NNNN or documents No issue closed: above

🧱 Checklist de Integridade

  • Python: uv run pytest e uv run ruff check . sem erros (via ./scripts/check-all.sh, exit 0: 3319 passed, 83 skipped, 2 xfailed; pre-commit, Bandit, Zizmor e Gitleaks verdes).
  • Rust Core: não se aplica, nenhum código Rust foi alterado.
  • Performance: benchmark não executado; a única mudança em caminho quente é o quoting de identificadores Oracle.
  • Drift Doc: README.pt_BR.md sem alteração necessária; USAGE, SECURITY, CHANGELOG e docs de operação atualizados em en e pt-BR.
  • Léxico: textos pt-BR revisados pelos guards de markdown e pt-BR do repositório.

)

Unquoted emission stays only for simple [A-Z][A-Z0-9_$#]* names, including reflected lowercase objects. Any other catalog name is quoted with embedded quotes doubled.
)

Share the #1977 env-name prefixes and an explicit destination allowlist in the loader. Non-REST targets and findings_sink copy an env credential only after both checks pass.
Notification ${VAR} names must use the #1977 prefixes. public_base_url is display text and no longer expands an environment variable.
)

HTTPS checks stay on the configured URL. The opener refuses redirects so a 302 cannot move the POST onto plain HTTP or an internal address.
…ector (Refs #2086)

Derive the credential destination from an explicit per-type key so SharePoint
(site_url), Snowflake (account or <account>.snowflakecomputing.com), WebDAV,
NFS, and the host-based engines can satisfy allowed_hosts. HubSpot and the
default Power BI token host stay on their existing vendor allowlists.

allowed_hosts is read from the same YAML the config author writes, same limit
as #1977. Against that author only the env-name prefix is an independent
control; the host list is a brake, not a second authority.
…Refs #2086, #2087)

Rename distributed pass_from_env examples to DATA_BOAR_* and list each
destination in allowed_hosts so they load. Document both requirements and the
residual risk that allowed_hosts is same-YAML as the config author. Note the
#2087 public_base_url break in the changelog.
FastAPI 0.142.x exports OTLP from the environment unless auto_configure is
off. Keep product export behind DATA_BOAR_OTEL_ENABLED. The version bump to
0.143.0 stays on the dependency PR.
…2077)

Probes still skip the API key and now receive only {"status":"ok"}. License,
trust, transport, and integrity stay on GET /status. No separate not-ready
503 existed on this handler, so that path was left unchanged.
Probes still use the status code. License and transport readers now use
GET /status, including the nogil image check and the operator docs.
@FabioLeitao
FabioLeitao merged commit 9fdd243 into main Oct 19, 2026
33 checks passed
@FabioLeitao
FabioLeitao deleted the epic/security-zero-2026-10-19 branch October 19, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment