{"modulePath":"github.com/codefit-cli/codefit","version":"v0.2.10","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sensors\n\nPackage sensors defines the [Sensor](#Sensor) contract: a module that audits one [findings.Dimension](/github.com/codefit-cli/codefit/internal/core/findings#Dimension) and returns a [findings.SensorResult](/github.com/codefit-cli/codefit/internal/core/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).\n\nThis 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.\n\n## Types\n\n```go\ntype Sensor interface {\n\t// Name is the sensor's stable identifier (e.g. \"security\").\n\tName() string\n\t// Dimension is the audit axis this sensor produces findings for.\n\tDimension() findings.Dimension\n\t// Run executes the sensor against the audit context and returns its result.\n\tRun(ctx auditctx.AuditContext) (findings.SensorResult, error)\n\t// OwnedCategories returns the baseline Item categories this sensor produces —\n\t// its finding dimension plus its surface categories. It is the sensor's scope\n\t// for the unified multi-sensor baseline: a run marks an item \"gone\" only within\n\t// the categories of the sensors that ran (ADR 0019). Categories MUST be disjoint\n\t// across sensors (each category owned by exactly one sensor).\n\tOwnedCategories() []string\n}\n```\nSensor audits a single dimension of a project. Every sensor maps to exactly one [findings.Dimension](/github.com/codefit-cli/codefit/internal/core/findings#Dimension) and is driven by the orchestrator with a shared [auditctx.AuditContext](/github.com/codefit-cli/codefit/internal/core/context#AuditContext).\n\nImplemented today by the security and db sensors.\n\n","path":"github.com/codefit-cli/codefit/internal/sensors","name":"sensors","synopsis":"Package sensors defines the Sensor contract: a module that audits one findings.Dimension and returns a findings.SensorResult.","isRedistributable":true}
