boundary
boundary
¶
BoundaryGuard — scans content at device exit points.
Wraps SecretScanner and PIIScanner to redact, warn, or block secrets and PII before data leaves the device via cloud engines or external tool calls.
Classes¶
SecurityBlockError
¶
Bases: Exception
Raised when mode='block' and secrets/PII are detected.
BoundaryGuard
¶
BoundaryGuard(mode: str = 'redact', *, enabled: bool = True, bus: Optional['EventBus'] = None, scanners: Optional[List['BaseScanner']] = None)
Scans outbound content for secrets and PII at device boundaries.
| PARAMETER | DESCRIPTION |
|---|---|
mode
|
Action on findings:
TYPE:
|
enabled
|
Master switch. When
TYPE:
|
bus
|
Optional event bus for publishing SECURITY_ALERT events.
TYPE:
|
scanners
|
Custom scanners. Defaults to SecretScanner + PIIScanner.
TYPE:
|
Source code in src/openjarvis/security/boundary.py
Functions¶
scan_outbound
¶
Scan text before it leaves the device.
Returns redacted text in "redact" mode, original text in
"warn" mode, or raises SecurityBlockError in "block"
mode when findings are detected.
Source code in src/openjarvis/security/boundary.py
check_outbound
¶
Scan tool call arguments before execution.
Returns a new ToolCall with redacted arguments if needed.