feat(collector): add explicit session export boundary - #85
Conversation
calvintvu
left a comment
There was a problem hiding this comment.
up to author, rename sessionexport to just export for readability
|
[P1] – Incomplete credentials leak secrets. The regexes require closing quotes/PEM markers. Truncated password="first-secret second-secret leaks second-secret; an incomplete private-key block leaks its body. Redact through end-of-string when delimiters are missing. |
|
Addressed the P1 incomplete-credential leak in 3bc080b. Unterminated JSON and shell-style quoted credentials, bearer values, and private-key blocks now redact through end-of-text, including dangling escape cases. Added end-to-end export regression coverage and verified with I kept the |
3bc080b to
71a9a57
Compare
Summary
Add the explicit private-to-wire allow-list for session snapshots, including path proof, credential redaction, text/item budgets, and frozen usage/cost mapping.
Why this is separate
This is the privacy boundary. Keeping it apart from the public schema and aggregate fitting lets reviewers focus on exactly which local fields may leave the machine and how each one is sanitized.
Changes
Review guide
Review
Buildfield by field, then the credential/path helpers, followed byallowlist_test.go.Marshalstill delegates directly to the public contract in this slice; aggregate degradation arrives next.Verification
go test ./...go vet ./...Stack
This is PR 3 of 5 for ENG-1340. Its base is PR 2.
Rollout
The mapper is internal and has no preview/upload caller in this stack, so it remains inert until integration is added.