Insider.Policy.ProtectedTargets (Insider v0.1.0)

Copy Markdown View Source

Immutable host-owned classification for targets that Insider must not inspect.

The policy is additive: host declarations can protect more same-node processes, but callers cannot remove BEAM/OTP or Insider-control-plane protections.

Summary

Functions

Derives the read-only protected-target audit matrix from the fixed inventory.

Types

t()

@type t() :: %Insider.Policy.ProtectedTargets{
  control_targets: [pid()],
  fingerprint: String.t(),
  host_targets: [pid()],
  inventory_version: String.t(),
  otp_major: String.t(),
  registration_names: [String.t()]
}

Functions

audit_matrix(options \\ [])

@spec audit_matrix(keyword()) :: {:ok, map()} | {:error, :invalid_options}

Derives the read-only protected-target audit matrix from the fixed inventory.

The matrix enumerates, per supported OTP major, every fixed registration name and control-target class with the denial decision and reason classify/2 produces for it. It is pure data: no name is resolved, no PID or timestamp is included, and the same options yield identical bytes on every toolchain. Application targets and an exception-review owner remain undeclared.

classify(policy, target)

@spec classify(t(), pid()) :: {:allowed, map()} | {:protected, map()}

new(options \\ [])

@spec new(keyword()) :: {:ok, t()} | {:error, :invalid_policy}

valid?(policy)

@spec valid?(term()) :: boolean()