infrastructure capa

infrastructure-dlp

DLP core: the host-agnostic wire envelope for masked findings (idempotency keyed on tenant/device/event, never content), capture-mode policy, raw-capture leak-prevention types, and the pure land-path assembly (masked audit payload + notification body). Depends on infrastructure-dlp-detect; carries the pieces every DLP sensor host shares regardless of which OS adapters it wires.

DLP core: the host-agnostic wire envelope for masked findings (idempotency keyed on tenant/device/event, never content), capture-mode policy, raw-capture leak-prevention types, and the pure land-path assembly (masked audit payload + notification body). Depends on infrastructure-dlp-detect; carries the pieces every DLP sensor host shares regardless of which OS adapters it wires.

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/dlp
Edition2021
Targetsinfrastructure_dlp
Public items16 across 3 modules
Tests11

What it is for

infrastructure-dlp — host-agnostic DLP core shared by every sensor host.

Sits above infrastructure_dlp_detect (the pure detector) and below whichever crate wires the OS-specific keyboard/clipboard/PTY adapters. It owns the parts that are identical regardless of that choice:

type (R5/R6): raw bytes that cannot be serialized, cloned, or Debug-printed, and are zeroized on drop.

idempotency key is (tenant, device, event) — never content-derived (R4).

from an envelope (the decidable half of the audit/notify land-path; the actual record_scoped/notification calls are wired by the consuming module).

Capabilities

CaptureMode

Capture-mode policy and the raw-capture leak-prevention type (T8, R5/R6).

Item
pub enum CaptureMode

RawCapture

Capture-mode policy and the raw-capture leak-prevention type (T8, R5/R6).

Item
pub struct RawCapture
RawCapture :: fn new(bytes : Vec <u8>) -> Self
RawCapture :: fn expose(& self) -> & u8
RawCapture :: fn len(& self) -> usize
RawCapture :: fn is_empty(& self) -> bool
RawCapture :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
RawCapture :: fn drop(& mut self)

DlpFindingEnvelope

The masked-finding wire envelope (T6, R4).

Item
pub struct DlpFindingEnvelope
DlpFindingEnvelope :: fn idempotency_key(& self) -> String

EnvFinding

The masked-finding wire envelope (T6, R4).

Item
pub struct EnvFinding

Source

The masked-finding wire envelope (T6, R4).

Item
pub enum Source
Source :: fn as_str(& self) -> & 'static str

land (other)

Pure land-path assembly (T3): envelope → masked audit payload + notification

Item
pub const ACTION_DLP_DETECTED: & str
fn audit_payload(env : & DlpFindingEnvelope) -> Value
fn notification_body(env : & DlpFindingEnvelope) -> String

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

infrastructure_dlp

flowchart TD
  n_infrastructure_dlp["infrastructure_dlp"]
  n_infrastructure_dlp --> n_capture["capture"]
  n_infrastructure_dlp --> n_envelope["envelope"]
  n_infrastructure_dlp --> n_land["land"]

Public surface

`capture`

ItemWhat it is
pub enum CaptureModeHow much a sensor retains
pub struct RawCaptureOwner of raw captured bytes for CaptureMode::Raw
RawCapture :: fn new(bytes : Vec <u8>) -> SelfWrap raw bytes
RawCapture :: fn expose(& self) -> & u8Explicit, deliberately named access to the raw bytes
RawCapture :: fn len(& self) -> usizeNumber of raw bytes held.
RawCapture :: fn is_empty(& self) -> boolWhether the buffer is empty.
RawCapture :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
RawCapture :: fn drop(& mut self)

`envelope`

ItemWhat it is
pub enum SourceWhich sensor produced a finding.
Source :: fn as_str(& self) -> & 'static strStable machine label.
pub struct EnvFindingThe masked finding as it travels on the wire — masked-only, never raw.
pub struct DlpFindingEnvelopeA host-side masked finding plus routing/idempotency metadata
DlpFindingEnvelope :: fn idempotency_key(& self) -> StringIdempotency key: tenant:device:event

`land`

ItemWhat it is
pub const ACTION_DLP_DETECTED: & strThe stable audit action for a DLP detection
fn audit_payload(env : & DlpFindingEnvelope) -> ValueBuild the masked metadata payload for the immutable audit record
fn notification_body(env : & DlpFindingEnvelope) -> StringBuild the operator-facing notification body

Re-exports. Exported here, defined elsewhere.

ExportDefined in
infrastructure_dlp_detectasdetectinfrastructure_dlp_detectasdetect
{CaptureMode,RawCapture}capture::{CaptureMode,RawCapture}
{DlpFindingEnvelope,EnvFinding,Source}envelope::{DlpFindingEnvelope,EnvFinding,Source}
{audit_payload,notification_body}land::{audit_payload,notification_body}

Boundary

Depends on no other workspace tier.

Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)infrastructure
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/infrastructure/dlp
Vocabulary in force (lexicon)current

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`infrastructure-dlp-detect`infrastructurenoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
serde^1derivenoalways
serde_json^1noalways
zeroize^1noalways

Development. None.

Build. None.

Depended on by. 4 workspace crates.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_dlp["application-dlp"] -->|uses| SELF
  n_operations_dlp_agent["operations-dlp-agent"] -->|uses| SELF
  n_operations_dlp_sensor["operations-dlp-sensor"] -->|uses| SELF
  n_platform_privacy_scan_api["platform-privacy-scan-api"] -->|uses| SELF
  SELF["infrastructure-dlp"]
  SELF -->|runtime| n_infrastructure_dlp_detect["infrastructure-dlp-detect"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libinfrastructure_dlp`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

4 workspace crates depend on this one: application-dlp, operations-dlp-agent, operations-dlp-sensor, platform-privacy-scan-api.

Verification

KindCount
Unit tests11
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
capture206
envelope3011
land301

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc1416
Public modules with a //! block33
pie showData
    title Public items with rustdoc
    "Documented" : 14
    "No rustdoc detected" : 2

Metrics

MetricValue
Rust source files4
Source lines384
Code lines255
Public API items16
Public modules3
Tests11
Examples0
Cargo features0
Direct runtime dependencies4
Workspace reverse dependencies4
pie showData
    title Public API by kind
    "constant" : 1
    "enum" : 2
    "function" : 2
    "method" : 8
    "struct" : 3
pie showData
    title Rust source composition
    "Code" : 255
    "Blank or comment" : 129

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las infrastructure · Manual