sensors

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 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).

Skeleton: only the interface is declared; concrete sensors (security, review, db, ...) 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.

Skeleton: no implementation yet.

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