Repository navigation
feat(ingest): accept network_egress events from the agentmetry-guard sidecar - #508
Merged
Merged
Conversation
…sidecar The guard sidecar (separate agentmetry-guard repo) reports intercepted child-process egress as event_type=network_egress. Unmapped, the external fallback stored it as tool_called, so the guard's own observations would have been counted by every tool-sequence rule. Map it to its own action type; the outcome (success tunneled / denied by denylist) passes through. Events keep correlation_id, so they join the agent session in the trail, the session view and the SIEM forwarders. Four tests pin the mapping, the correlation and the rule isolation. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <[email protected]>
Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <[email protected]>
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.
The
agentmetry-guardsidecar (separate repo, phase-1 spike done today) reports intercepted child-process egress asevent_type=network_egress. Unmapped, the external ingest fallback stored those astool_called, so the guard's own observations would have been counted by every tool-sequence rule.Changes:
_ACTION_MAPgainsnetwork_egress -> ("network_egress", "success"); the guard'soutcome(successtunneled /deniedby denylist) passes through unchanged.ExternalIngestBody.event_typedescription lists the new type.test_doctor_json_and_remediation.py: action mapping, correlation_id/session join, denied verdict, and 50 egress events firing zero sequence rules.Verified against real guard output: events captured from a smoke-tested
agentmetry-guard wraprun (plain HTTP, CONNECT tunnel, denied CONNECT) validate throughExternalIngestBodyand canonicalize toaction.type=network_egress,source.adapter=guard, correlation preserved.Tests:
pytest tests/test_doctor_json_and_remediation.py18 passed. The 5 failures intest_external_ingest.pyin this sandbox are identical on clean master (local 401/env issue, CI is green).