MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / build

Method build

crates/openshell-ocsf/src/builders/ssh.rs:64–91  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

62
63 #[must_use]
64 pub fn build(self) -> OcsfEvent {
65 let activity_name = self.activity.network_label().to_string();
66 let mut base = BaseEventData::new(
67 4007,
68 "SSH Activity",
69 4,
70 "Network Activity",
71 self.activity.as_u8(),
72 &activity_name,
73 self.severity,
74 self.ctx
75 .metadata(&["security_control", "container", "host"]),
76 );
77 self.ctx
78 .apply_common_fields(&mut base, self.status, self.message);
79
80 OcsfEvent::SshActivity(SshActivityEvent {
81 base,
82 src_endpoint: self.src_endpoint,
83 dst_endpoint: self.dst_endpoint,
84 actor: self.actor,
85 auth_type: self.auth_type_id,
86 auth_type_custom_label: self.auth_type_label,
87 protocol_ver: self.protocol_ver,
88 action: self.action,
89 disposition: self.disposition,
90 })
91 }
92}
93
94impl_activity_setter!(SshActivityBuilder);

Callers 15

build_imageFunction · 0.45
request_tokenFunction · 0.45
verify_provider_endpointFunction · 0.45
reloadMethod · 0.45
build_server_configFunction · 0.45
newMethod · 0.45
https_client_mtlsFunction · 0.45

Calls 4

network_labelMethod · 0.80
metadataMethod · 0.80
apply_common_fieldsMethod · 0.80
as_u8Method · 0.45