sensors

package
v0.3.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package sensors defines the Sensor contract: a module that audits one findings.Dimension and returns a findings.SensorResult. Sensors live in the core and are language-agnostic — they orchestrate the filtering pyramid and ask the active LanguageProvider for the concrete, language-specific data (queries, rules, schema parsing).

This package declares only the interface. The concrete sensors live in subpackages: security and db are built (sensors/security, sensors/db); review, complexity and tests arrive in later phases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sensor

type Sensor interface {
	// Name is the sensor's stable identifier (e.g. "security").
	Name() string
	// Dimension is the audit axis this sensor produces findings for.
	Dimension() findings.Dimension
	// Run executes the sensor against the audit context and returns its result.
	Run(ctx auditctx.AuditContext) (findings.SensorResult, error)
	// OwnedCategories returns the baseline Item categories this sensor produces —
	// its finding dimension plus its surface categories. It is the sensor's scope
	// for the unified multi-sensor baseline: a run marks an item "gone" only within
	// the categories of the sensors that ran (ADR 0019). Categories MUST be disjoint
	// across sensors (each category owned by exactly one sensor).
	OwnedCategories() []string
}

Sensor audits a single dimension of a project. Every sensor maps to exactly one findings.Dimension and is driven by the orchestrator with a shared auditctx.AuditContext.

Implemented today by the security and db sensors.

Directories

Path Synopsis
Package db is the database-structure sensor (dimension "db").
Package db is the database-structure sensor (dimension "db").
Package security is the universal security sensor.
Package security is the universal security sensor.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL