Skip to content

spec: add @sensitive annotation + report redaction (RFC-001 §6.7) - #107

Merged
trendvidia merged 2 commits into
mainfrom
spec/sensitive-annotation
Jul 16, 2026
Merged

spec: add @sensitive annotation + report redaction (RFC-001 §6.7)#107
trendvidia merged 2 commits into
mainfrom
spec/sensitive-annotation

Conversation

@trendvidia

Copy link
Copy Markdown
Owner

Settles the secrets-annotation story before annotations.proto freezes (#58). Decision issue: #90.

What

  • proto/schema/v1/annotations.proto: canonical marker annotation sensitive; (between deprecated and http).
  • New normative RFC-001 §6.7 "Sensitivity classification (@sensitive)": attaches to fields, type aliases (macro-expands to consuming fields), and messages (transitive through message-typed fields). Classification, not protection — wire encoding, storage, programmatic access, validation semantics unaffected.
  • Consumer minima: rendering surfaces MUST redact to [REDACTED]; engines MUST withhold offending values from reports; doc generators MUST NOT emit values/examples (@example on a sensitive declaration = compile-time warning).
  • proto/schema/v1/report.proto: EnrichedViolation.value_redacted = 7 — keeps redaction distinguishable from three-state absence; §7 excerpt synced.
  • §13 deferrals: sensitivity-class taxonomy (class: param, provably additive later) and schema-level key-reference annotation (@encrypted(key_ref)) / chameleon interplay.
  • Resolution record in docs/RFC-001-issues.md (new deps(vscode): bump the vscode-minor-and-patch group in /editors/vscode with 2 updates #21 entry, second commit).

Key decisions

  • Name @sensitive (not @secret): doesn't overpromise key-material handling; generalizes to future classes.
  • Marker-only now: adding optional defaulted params to a canonical annotation is additive, so the freeze only locks the name + shipped semantics.
  • Chameleon stays orthogonal: schema says what is sensitive, never how it's protected; PXF/chameleon MAY consume the classification.
  • Rides the standard 50400 AnnotationList carrier; no new extension numbers.

Pre-existing buf build errors (report.proto import path, annotations.proto v1.2 grammar) are unchanged — verified identical on main.

Closes #90

Settles the secrets-annotation story (#90) before annotations.proto
freezes (#58):

- annotations.proto: canonical marker `annotation sensitive;` —
  classification, not protection; class taxonomy deferred additively
- new RFC-001 §6.7: placement/propagation, normative consumer minima
  (render-surface redaction to [REDACTED], report redaction, no doc
  examples), standard 50400 carrier, chameleon orthogonality
- report.proto: EnrichedViolation.value_redacted = 7 so redaction is
  distinguishable from three-state absence; §7 excerpt synced
- §13: two new deferrals (class taxonomy; @Encrypted(key_ref) /
  chameleon interplay)

Closes #90
@trendvidia
trendvidia merged commit 3ef6684 into main Jul 16, 2026
4 checks passed
@trendvidia
trendvidia deleted the spec/sensitive-annotation branch July 16, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC-001: secrets annotation story (@secret/@sensitive) — decide before annotations.proto freezes

1 participant