Skip to main content

Vine/Server/Notification/
SecurityIncident.rs

1//! Cocoon `security.incident` notification - Cocoon-side security
2//! policy flagged a breach (extension violated permission set, blocked
3//! filesystem access, etc.). Land has no central security dashboard
4//! yet; the atom surfaces the incident via `dev_log!` and re-emits on
5//! `sky://security/incident` for future listeners.
6
7use serde_json::Value;
8
9use crate::{Host::VineHost, dev_log};
10
11pub async fn SecurityIncident(Host:&dyn VineHost, Parameter:&Value) {
12	Host.EmitToRenderer("sky://security/incident", Parameter.clone());
13
14	dev_log!(
15		"grpc",
16		"warn: [Security] incident type={} severity={} ext={}",
17		Parameter.get("type").and_then(Value::as_str).unwrap_or("?"),
18		Parameter.get("severity").and_then(Value::as_str).unwrap_or("?"),
19		Parameter.get("extensionId").and_then(Value::as_str).unwrap_or("?")
20	);
21}