egress_guard
Module: egress_guard
Section titled “Module: egress_guard”Contents
Section titled “Contents”Structs
AuditChannel- Where and how blocked attempts are reported for signed auditing — theEgressGuardHandle- Live handle to a running guard supervisor. Dropping it stops the supervisorSupervisorConfig- Inputs to [start].
Functions
install_and_exec- Installs the guard filter, hands the listener fd to the host supervisor overstart- Binds the control socket and spawns the supervisor thread.
firma_run::egress_guard::AuditChannel
Section titled “firma_run::egress_guard::AuditChannel”Struct
Where and how blocked attempts are reported for signed auditing — the
firma run audit channel to the Sidecar.
Fields:
socket_path: std::path::PathBuf- Sidecar run-audit control socket (FIRMA_RUN_AUDIT_SOCK).session_id: String- Session and agent identity stamped onto each message.agent_id: String
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> AuditChannel
firma_run::egress_guard::EgressGuardHandle
Section titled “firma_run::egress_guard::EgressGuardHandle”Struct
Live handle to a running guard supervisor. Dropping it stops the supervisor thread and removes the control socket.
Methods:
fn socket_path(self: &Self) -> &Path
Trait Implementations:
- Drop
fn drop(self: & mut Self)
firma_run::egress_guard::SupervisorConfig
Section titled “firma_run::egress_guard::SupervisorConfig”Struct
Inputs to [start].
Fields:
socket_path: std::path::PathBuf- Unix socket the in-sandbox installer connects to, to hand over theallow_ports: Vec<u16>- Loopback ports the agent may still reach (proxy bridge, DNS stub).report: Option<AuditChannel>- Optional sink for signed audit reports. WhenNone(e.g. an external
Trait Implementations:
- Clone
fn clone(self: &Self) -> SupervisorConfig
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::egress_guard::install_and_exec
Section titled “firma_run::egress_guard::install_and_exec”Function
Installs the guard filter, hands the listener fd to the host supervisor over
socket_path, then execves the agent. Never returns on success.
Errors
Section titled “Errors”Returns a [RunError] when the supervisor socket cannot be reached, the
filter cannot be installed, the fd cannot be sent, or exec fails. The
caller (the __egress-guarded-run subcommand) maps the error to a
fail-closed non-zero exit.
fn install_and_exec(socket_path: &std::path::Path, argv: &[String]) -> Result<std::convert::Infallible, crate::error::RunError>firma_run::egress_guard::start
Section titled “firma_run::egress_guard::start”Function
Binds the control socket and spawns the supervisor thread.
The thread waits for the in-sandbox installer to connect and pass the
notification listener fd, then services connect notifications until the
returned handle is dropped.
Errors
Section titled “Errors”Returns a [RunError] when the control socket directory cannot be created
or the socket cannot be bound.
fn start(config: SupervisorConfig) -> Result<EgressGuardHandle, crate::error::RunError>