MCPcopy Create free account
hub / github.com/erans/pgsqlite / protocol_violation

Function protocol_violation

src/security/audit_logger.rs:656–669  ·  view source on GitHub ↗
(client_ip: Option<IpAddr>, violation: &str)

Source from the content-addressed store, hash-verified

654 }
655
656 pub fn protocol_violation(client_ip: Option<IpAddr>, violation: &str) {
657 let mut event = SecurityEvent::new(
658 SecurityEventType::ProtocolViolation,
659 SecuritySeverity::High,
660 format!("Protocol violation: {}", violation),
661 )
662 .with_metadata("violation_type".to_string(), violation.to_string());
663
664 if let Some(ip) = client_ip {
665 event = event.with_client_ip(ip);
666 }
667
668 log_security_event(event);
669 }
670
671 pub fn query_executed(
672 client_ip: Option<IpAddr>,

Callers 6

parse_messageMethod · 0.85
parse_startup_messageMethod · 0.85

Calls 3

log_security_eventFunction · 0.85
with_metadataMethod · 0.80
with_client_ipMethod · 0.80

Tested by 2