feat(audit): add correlation ids to command and network events - #1704
Draft
Frankie-Xu wants to merge 1 commit into
Draft
feat(audit): add correlation ids to command and network events#1704Frankie-Xu wants to merge 1 commit into
Frankie-Xu wants to merge 1 commit into
Conversation
Signed-off-by: Frankie-Xu <92643488+Frankie-Xu@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
Hi maintainers 👋 This PR is from a fork, so the full CI workflows (CI, Release PR Checks, SPIRE) are waiting for manual approval ( Could someone please approve the workflow run when convenient? Local Thanks! |
Contributor
PR Review SummarySize
Affected crates
Blast radius — ContainedThis PR touches: source code Updated automatically on each push to this PR. |
Frankie-Xu
marked this pull request as draft
August 21, 2026 10:56
Contributor
Author
|
Putting this in draft to honor the 1–2 open PR limit. I'll bring it back only after earlier PRs land. No action needed from reviewers now. |
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.
Linked Issue
Closes #1693
Summary
Adds optional correlation IDs so audit consumers can group related lifecycle events without relying on timestamps, PIDs, hashes, or targets:
CommandPolicyAuditEvent.invocation_id— UUID v7 minted once per tool-sandbox shim request; shared across admission/completion (and deny) events for that invocationNetworkAuditEvent.interaction_id— UUID v7 minted once per proxy network interaction; threaded through CONNECT / endpoint-policy / auth / response events viaEventContextNetworkAuditEvent.invocation_id— reserved for parent command linkage; leftNonewhen attribution is not reliable (no PID/process-tree guessing)All fields are additive (
Option, serdedefault+skip_serializing_if). Merkle hash algorithms, domain separators, chain construction, and attestation predicates are unchanged. New fields participate in leaf hashes only when present; historical records without them still verify.Agent Disclosure
This PR was generated by an AI agent (Cursor) on behalf of Frankie-Xu.
Consulted:
AGENTS.md,CLAUDE.md,GOVERNANCE.md(audit log requires maintainer agreement)CONTRIBUTING.md,.github/pull_request_template.mdorigin/main)crates/nono/src/{audit.rs,undo/types.rs},crates/nono-proxy/src/audit.rs+ request handlers,crates/nono-clitool-sandbox linux/macos audit emittersCompliance: no
unwrap/expectin production paths; no Merkle algorithm changes; additive-only schema; network→commandinvocation_idnever guessed.Test Plan
interaction_idacross multiple proxy log calls;verify_audit_logaccepts mixed with/without IDscargo test -p nono --libcargo test -p nono-proxy --libcargo check -p nono-cli --testsmake ci(clippy, fmt, tests, audit, lint-aliases, lint-docs)Checklist
Agent Compliance Check (Required for AI/Automated PRs)
Made with Cursor