Skip to content

Add connect nodes to the activity tree - #523

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
momar/add-connect-to-activity-tree
Sep 23, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
momar/add-connect-to-activity-tree

Conversation

@mftoure

@mftoure mftoure commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a ConnectNode protobuf message to the CWS activity dump schema (activity_dump.proto), with fields for port, IP, protocol, matched rules, and node base. The new message is added as a repeated ConnectNode connect field on SocketNode, enabling serialization of outbound connection events in security profile activity trees.

Comment on lines +314 to +321
message ConnectNode {
repeated MatchedRule matched_rules = 3;
NodeBase node_base = 4;

uint32 port = 1;
string ip = 2;
uint32 protocol = 5;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this one is the same as the BindNode, what about like deprecating the bind node and use the same object for both?

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit ad90437 into master Sep 23, 2026
9 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the momar/add-connect-to-activity-tree branch September 23, 2026 15:16
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/datadog-agent that referenced this pull request Sep 28, 2026
## What does this PR do?

Adds support for inserting `connect` events into the V2 security profile activity trees, which was previously missing. This enables tracking outbound connection activity alongside existing bind, DNS, and other event types.

### Changes

- Added `ConnectNode` struct (analogous to `BindNode`) to `SocketNode` with full lifecycle support: insertion, eviction, tagging, sizing, and graph rendering
- Added `InsertConnectEvent` to `ProcessNode` with IPv4/IPv6 address family validation
- Added protobuf encoding/decoding for `ConnectNode` using the new proto message from agent-payload
- Added `"connect"` to the default V2 security profile event types
- Added `connect_only` test case in `size_test.go`

### TODO

- [x] Merge and release the corresponding [agent-payload PR](DataDog/agent-payload#523) first, then update `go.mod` to point to the released version before merging this PR

Co-authored-by: momar.toure <momar.toure@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants