Repository navigation
feat: on-node symbol allow-list filter for eBPF profiles (ADR 0011, slice 4) - #29
Merged
Merged
Conversation
…lice 4) The security boundary of the profiler: a stack trace maps the customer's code structure, and this filter is what makes shipping one defensible (ADR 0011 §4, security.md §8). Its posture is deny-by-default — the opposite of the scanner's infra deny-list — so a new or misclassified frame errs toward not leaving. Classification, on the node, before anything leaves it: - client frames (Go module path on the allow-list): keep - stdlib / runtime / the workload's own main package (no domain in the package path): keep - kernel frames: keep (not the customer's code; they keep a profile readable) - third-party module frames (a domain, not allow-listed): redact by default, keep only under ThirdPartyKeep - unsymbolized / other native frames: redact Redaction replaces a frame with a single neutral "[filtered]" placeholder and collapses consecutive redacted frames into one, so the flame-graph shape is preserved but no identity — not the dependency, not its depth — leaves the node. Only kept frames and aggregate per-bucket drop counts survive; the identity of a redacted frame is never recorded (CLAUDE.md invariant 6). Tested for classification, collapse, counters, and that no redacted identity reaches the output. The allow-list and third-party policy arrive from the node ConfigMap in the targeting slice. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice 4 (plan, ADR 0011) — the security boundary of the profiler. A stack trace maps the customer's code structure; this filter is what makes shipping one defensible. Deny-by-default (opposite of the scanner's infra deny-list): a new or misclassified frame errs toward not leaving.
Classification (on the node, before egress)
main(no domain in package path)ThirdPartyKeepClassification keys on the Go package path extracted from the function name; stdlib vs external is the canonical "first segment contains a dot = a domain" heuristic (no-dot).
Redaction (R2)
A redacted frame becomes a single neutral
[filtered]placeholder, and consecutive redacted frames collapse into one — the flame-graph shape survives, but no identity leaves: not the dependency, not even its depth. Only kept frames + aggregate per-bucket drop counts (ThirdPartyDropped,UnsymbolizedDropped,SamplesFiltered) survive; a redacted frame's identity is never recorded (invariant 6).Tests
packagePath/hasDomaintables; full-stack classification with the R2 collapse and counters;ThirdPartyKeep; unsymbolized redaction; empty-allow-list still keeps stdlib/main/kernel; and an explicit no-redacted-identity-in-output assertion.go test -race ./..., build darwin +GOOS=linux,golangci-linton both GOOS — clean.Note
The filter is a standalone, tested component here. It is wired into the capture → validate → spool pipeline in slice 5; the allow-list / third-party policy come from the node ConfigMap in slice 6.
🤖 Generated with Claude Code