[RCA] Sanitize native logs and component inventory

Aperta
#14,230 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
cli, security

Direzione di ricerca

Read the dependency issues #14224 and #14229 first; this is explicitly blocked until they merge and the format and policy contracts are fixed. Then inspect the existing bydbctl rca sanitize command and its sanitizer package, and identify the exact Go regression test selector before queueing work. Done means the actual CLI produces the candidate tree and exclusion reports, passes independent golden fixtures and alias-key checks, and leaves private evidence unchanged on success and failure.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

database enhancement logging

Umbrella: #14222

Blocked by: #14224, #14229 (implementation contracts only; see dependency contract below).

Summary

The base public release requires a typed log policy and identity aliases.

Boundary

Activation: bydbctl rca sanitize --selection … --policy …. Extend the same CLI and policy contract, not a new service.
Commands are proposed, not implemented. No database storage/wire-format changes.

Requirements

R1. Produce a separate candidate release tree from an approved selection. Support native logs and component inventory only; exclude other artifact types with explicit ledger reasons.
R2. Use an explicit field allowlist. Drop arbitrary free-text messages, unknown nested data.fields and endpoints by default unless a reviewed typed rule permits a safe derivative. Keep original evidence private.
R3. Preserve approved measurements and component versions. Alias approved identities consistently with an incident-scoped key; exclude that key and the raw mapping from the release.
R4. Emit transformation and unresolved-review reports; fail closed on malformed inputs. The sanitizer never approves publication.

Acceptance criteria

  • Golden input contains secrets in message, nested fields and endpoint: exact approved fields remain, all canaries are absent and excluded fields have reasons.
  • A fixed-key fixture checks stable aliases within one incident; a different key changes them. Neither key nor raw mapping appears in output. Unknown artifact types remain excluded.
  • Invoke the actual sanitizer CLI; maintain independent golden fixtures, not expected values produced by the implementation under test.
  • Bound input/output sizes and leave raw evidence unchanged on success and failure. Unknown artifact types never bypass policy.
  • Add a test-only patch using a merged CLI seam that fails by assertion on the base, then passes with the implementation.

Scope and readiness audit

  • Classification: planned blocked leaf; not ready for GraphLoom until prerequisites merge and exact format/policy contracts are fixed.
  • Dependencies: #14224, #14229. See the dependency contract below for the exact shared interfaces and runtime independence.
  • Boundary and production activation: one typed transformation via the existing sanitizer command.
  • Scope: bydbctl RCA sanitization package and command; one independent format fixture family.
  • RED evidence: not executed in this drafting task. Plan a named TestRCA test through an existing command seam, not an import of new production APIs.
  • Focused tests: run the selected Go regression and changed-package tests after generation; exact selector must be fixed before queueing.
  • End-to-end proof: selected private artifact to expected candidate derivative plus exclusion report.
  • Compatibility/lifecycle: existing supported artifacts remain valid; preserve cancellation, size bounds, output isolation and alias consistency.
  • Decision: one proposed PR after the merged seam is revalidated; no model needed for safety decisions.

Required-only scope audit

The base public release requires a typed log policy and identity aliases. Format support is deliberately limited to the corresponding collector. No generalized arbitrary-content sanitization.

Out of scope

Raw pprof/core/database file release, automatic publication, AI-only sanitization, generic secret-detection guarantees and new telemetry capture.

Concrete verification and closure gate

These are required acceptance tests, not examples that may be skipped. Artifact filenames and unsupported format handling must follow the merged prerequisite contracts. Before queueing, fix the tested schema version, configured limits, observable statuses and independent expected values; record any necessary interface decision in this issue rather than leaving it to an agent mid-run.

Fixed acceptance scenario

Use a log with duration=500 ms, node identity A, and unique canaries in the message, endpoint and nested unknown data.fields. Under the fixture allowlist, retain the approved duration/version fields, alias A consistently and omit every canary. Compare to an independent golden object. A fixed test key gives consistent aliases within an incident; a different incident key gives different aliases. Neither key nor raw mapping may be in the candidate tree. Unsupported artifacts must be listed as excluded.

Executable regression

Proposed named regression: TestRCASanitizeLogsInventory in bydbctl/internal/cmd exercising the registered command through an existing CLI test seam.
After normal repository generation, use:

go test ./bydbctl/internal/cmd -run '^TestRCASanitizeLogsInventory$' -count=1 -v
make test-ci PKG=./bydbctl/internal/cmd

The exact selector must execute at least one test, not return “no tests to run.” If repository conventions require a different test harness or location, update this section with the real command before queueing; do not claim this proposed test already exists. Also run the actual changed internal package suites.

For GraphLoom, apply only the regression tests/fixtures to the chosen base: they must compile and fail by a relevant assertion. Apply the implementation: the same test must pass. Tests that import a new production package missing from the base are not valid assertion-based RED proof; use an existing command seam. Exercise the real CLI with fixture endpoints/files. If the issue requires deployment E2E, record its separate command and result; fixture-server tests alone do not satisfy it.

Evidence required to close this issue
  • Source/base revision, exact commands, fixture provenance and independently specified expected outcomes.
  • Actual positive and negative/partial-case results; explain failures and rerun after fixes.
  • Produced artifact/manifest/report samples with no real sensitive data, and the relevant size/coverage/privacy assertions.
  • Applicable repository checks and integration/evaluation results; explicitly list checks not run. A required check not run leaves acceptance incomplete, not passed.
  • For failures/cancellation, confirm no false completion marker and no unrelated user-file overwrite.

No verification execution is claimed by adding this section. Do not close the issue merely because code or documentation was submitted.

Dependency contract: implementation order versus runtime inputs

Implementation prerequisites mean merged interfaces needed to implement/test this issue. They do not mean that those evidence collectors must run or succeed for every incident.

  • #14224: component inventory and explicit identity-mapping format.
  • #14229: selection/omission contract; delivers the initial shared sanitizer and alias policy.

Runtime behavior and verification

Shared aliasing/sanitizer behavior is delivered alongside the first usable log/inventory transform. A selected log file is not mandatory: supported inventory-only input is valid; unsupported evidence stays excluded. Subsequent adapters reuse the shared contract without requiring log content.

Wait for prerequisite contracts to merge before queueing automated implementation, then revalidate the real interfaces. Do not add direct blockers for dependencies already covered transitively. No new issue or automation job is introduced by this clarification.

Lingua principale
Java
Stelle
25k
Fork
6.6k
Merge medio
10h 45m
PR unite (30g)
49

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/skywalking

Tutte le issue di apache/skywalking

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.