beam_security
beam_security checks content and actions against a rule base and returns a decision.
beam_security = { path = "../riverbeam/crates/beam_security" }
It depends on river_reed with the grl-rule-engine feature.
| Item | Role |
|---|---|
SecurityManagement | Trait: check(&SecurityRequest) -> SecurityDecision, enforce() |
SecurityManager | new(policy), with_enforce(bool), is_ready() |
DisabledSecurityManager | Allows everything; the pipeline default |
SecurityRequest | new(stage), with_payload(map), with_context(SecurityContext) |
SecurityContext | agent_id, tenant_id, user_id, interaction_id |
SecurityDecision | action, severity, score, matched_rules, narration, user_message, violation_type; denies(), requires_hitl() |
SecurityStage | BeforeInput, BeforeContextInjection, BeforeLlm, AfterLlm, BeforeTool, AfterTool, BeforeMemoryWrite, BeforeOutput, BeforeHitlResume, Runtime |
SecurityAction | Allow, Deny, Warn, Sanitize, RequireApproval, Quarantine, Mask, Terminate |
SecurityPolicy, ToolPolicy, HitlConfig | Tool lists, approval settings, runtime limits |
PatternLoader | The regex scorers |
SecurityEngine, verdict_from_narrations, RuleNarration | Lower-level engine access |
BeforeLlm, AfterTool and BeforeHitlResume are always allowed (PASSTHROUGH_STAGES).
There are no feature flags.
The shipped rules and their current limitations are in Security.