Skip to content

Runtime Blocks: Enforcement Reference

Telovix enforcement moves a sensor policy through three discrete states (observe, enforce-ready, enforced), each requiring an explicit operator action before the sensor begins killing or denying operations at the kernel level.

Prerequisites

  • operator role
  • Sensor already enrolled with assigned policy pack
  • Sensor trust state: healthy
  • Pack must have enforcement_capable: true

Enforcement states for policy packs

Policy pack enforcement uses a three-state ladder. Each state change requires passing the verification checks and is recorded in the audit log.

StateWhat it means
observePack is loaded. Events are collected and scored. No blocking or killing. Default for all new assignments.
enforce_readyPack is loaded with enforcement intent. The sensor is in a verified state ready for enforcement. Does not yet block. Use as a final review gate.
enforcedFull enforcement is active. The pack's enforcement rules are blocking or killing matching operations.

Allowed transitions

FromToAllowed
observeenforce_readyYes, when all blocking conditions are clear
enforce_readyenforcedYes, when all blocking conditions are clear
AnyobserveAlways allowed (revert to observe from any state)
observeenforcedNo (must pass through enforce_ready)
enforcedenforce_readyNo (must go back to observe first)

Returning to observe bypasses all prerequisites. There is no enforced ladder going downward: you go back to observe directly.

Prerequisites for advancing past observe

The following conditions must all be true before the Console permits a transition to enforce_ready or enforced:

PrerequisiteReason
Pack is enforcement_capable: trueOnly guard packs support enforcement (see Policy Packs)
Sensor runtime_mode is liveEnforcement requires the full eBPF engine (tetragon_live_adapter)
Sensor trust is not revoked or degradedDegraded trust means the control path cannot be relied on
Sensor health is not criticalA critical sensor cannot safely execute enforcement changes
Sensor is not disabled or revokedA disabled or revoked sensor cannot be advanced

Enforcement verification

Before advancing enforcement state, review the verification panel in the Console. Go to Sensors > [sensor] > Enforcement and check the readiness summary before using the state controls.

The verification panel shows:

FieldDescription
current_enforcement_stateCurrent state on this sensor
enforcement_capableWhether the assigned pack supports enforcement
runtime_modeEngine adapter mode (live, compatibility, or simulated)
sensor_health_stateCurrent health state
trust_healthCurrent trust health
recent_event_countNumber of relevant events in the last 24 hours
observed_relevant_activityWhether any events were seen in the observation window
observation_window_hours24 (fixed observation window)
evidence_entriesUp to 20 sample events from the last 24 hours
distinct_event_kindsWhich event kinds fired in the observation window
highest_severity_seenThe highest event severity observed
readiness_classNotReady, ReviewRequired, or CandidateForEnforceReady
blocking_conditionsList of conditions preventing advancement
caution_conditionsList of conditions requiring review before advancing
recommended_next_stepText guidance based on the readiness class

Readiness classes

ClassMeaning
NotReadyOne or more blocking conditions exist. Resolve before attempting to advance.
ReviewRequiredNo hard blockers, but caution conditions require operator review before advancing.
CandidateForEnforceReadyAll conditions are clear. Safe to advance to enforce_ready.

Blocking conditions (any one blocks advancement):

  • Pack is not enforcement-capable
  • Sensor is not in live runtime mode
  • Sensor trust is revoked or degraded
  • Sensor health is critical
  • Pack is already at maximum enforcement state
  • Sensor is disabled or revoked

Caution conditions (require review, do not block):

  • Trust health is not fully healthy
  • Sensor health is degraded or watch
  • No recent activity observed for this pack (may indicate the pack has not been running long enough)
  • Pack is already at enforce_ready (review event history before advancing to enforced)

Setting enforcement state

Requires operator role. In the Console, go to Sensors > [sensor] > Enforcement and use the state controls to advance or revert the enforcement state.

  • Advance from observe to enforce_ready: use the Advance button after confirming the readiness class is CandidateForEnforceReady.
  • Advance to enforced: use the Advance button again after reviewing event history in enforce_ready state.
  • Revert to observe from any state: use the Revert button - no prerequisites apply.

Each state change is recorded in the audit log with action type sensor_enforcement_state_changed, including the from-state, to-state, and the operator who made the change.


Action types in TracingPolicy

Three action types are available in TracingPolicy YAML:

Post (observe)

yaml
matchActions:
  - action: Post

Records the event and continues. The operation is not blocked or interrupted. The process continues running. Use this for all initial rule deployment.

Signal with argSig: 9 (kill)

yaml
matchActions:
  - action: Signal
    argSig: 9

Sends SIGKILL to the matching process after the hook fires. The process has already begun executing at the hook point. Signal terminates it after the fact. Use when pre-execution denial is not available (kprobe hooks).

Override with argError: -1 (block)

yaml
matchActions:
  - action: Override
    argError: -1

Returns an error to the kernel before the operation completes. The process cannot proceed with the operation. Use on BPF LSM hooks (lsmhooks) where pre-execution denial is possible. argError: -1 returns EPERM.

Override is not valid on kprobe hooks. It only works on BPF LSM-backed hooks. Using Override on a kprobe will not compile or will silently have no effect.


Built-in enforcement templates

These templates are available from Policies > Enforcement > New Rule in the Console:

Template IDHook mechanismDefault action
block-kmod-loadBPF LSM kernel_read_fileOverride (blocks module load before it enters the kernel)
block-user-namespaceBPF LSM userns_createOverride (blocks CLONE_NEWUSER)
block-raw-socketsBPF LSMOverride
block-capset-sysadminBPF LSMOverride
kill-ptrace-attachBPF LSM ptrace_access_checkSignal (kills attaching process)
block-execve-tmpBPF LSM bprm_check_securityOverride (blocks execution from /tmp, /dev, /run/user, /proc/self/fd)
block-memfd-createBPF LSMOverride
block-pivot-rootBPF LSMOverride
block-mount-syscallBPF LSMOverride
block-unshareBPF LSMOverride
block-bpf-loadBPF LSMOverride
block-socket-rawBPF LSMOverride
block-chmod-suidBPF LSMOverride
customOperator-supplied YAMLDefined by the YAML

Templates that use Override require BPF LSM to be enabled on the sensor host kernel. Verify with cat /sys/kernel/security/lsm | grep bpf. See Requirements.

Impact preview

Before creating any enforcement rule, use the impact preview panel in the Console to see how many events in the last 7 days would have matched. In the Console, go to Policies > Enforcement > New Rule, select a template, and the impact preview loads automatically. It returns total_events, has_data, top_binaries, and event_kinds. A count of 0 may mean the pattern never fires on this sensor, or it may mean the coverage event kinds are not in the recent history.


Rollback and recovery

Reverting enforcement state: always allowed by going to Sensors > [sensor] > Enforcement and using the Revert button to return to observe.

Disabling an enforcement rule: go to Policies > Enforcement, select the rule, and use the Disable toggle. The rule is removed from the sensor's next heartbeat response and the sensor stops applying it within one heartbeat cycle (up to 15 seconds).

Sensor restart after override failure: if Override rules block a critical system call unexpectedly, the sensor service can be stopped, the compiled policy removed from disk, and the service restarted to clear enforcement policies before they are reapplied from the next heartbeat.


Further reading

Released under the Telovix Commercial License.