{"modulePath":"github.com/codefit-cli/codefit","version":"v0.2.10","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package security\n\nPackage security is the universal security sensor. It orchestrates the filtering pyramid — a language-agnostic regex layer for obvious secrets and the active provider's AST analysis (deterministic findings plus mapped surface) — and adjusts each finding's severity by the file's path criticality (RF-10). codefit runs no LLM layer: the surface is returned to the agent, which reasons over it with its own model.\n\n## Types\n\n```go\ntype Sensor struct {\n\t// contains filtered or unexported fields\n}\n```\nSensor runs the security dimension against a project, driven by a language provider for the AST layer.\n\n```go\nfunc New(p providers.LanguageProvider) *Sensor\n```\nNew builds a security sensor backed by a language provider.\n\n```go\nfunc (*Sensor) Dimension() findings.Dimension\n```\n\n```go\nfunc (*Sensor) Name() string\n```\n\n```go\nfunc (*Sensor) OwnedCategories() []string\n```\nOwnedCategories are the baseline Item categories the security sensor produces: its finding dimension (\"security\") plus its surface categories (idor/authz/ overfetch/nplus1). They scope the unified baseline (ADR 0019). CategoryNPlus1 is included even though its agent-confirmed finding is stamped DimensionDB (dimensionFor) — this sensor is what ENUMERATES the surface item, so it must own the category for baseline tracking/pruning, regardless of which dimension a later confirmation lands in.\n\n```go\nfunc (s *Sensor) Run(ctx auditctx.AuditContext) (findings.SensorResult, error)\n```\nRun walks the project's source files and returns the security findings.\n\nLayer 0 of the pyramid (ctx.Scope) decides which of those files are ANALYSED. The walk itself is not narrowed: every auditable file is still counted, so the result can state \"3 of 412\" rather than the self-flattering \"3 of 3\". The gate is Narrows, not Includes — an AuditContext assembled without a scope audits everything (see the field doc); an unset scope must never blank an audit.\n\n","path":"github.com/codefit-cli/codefit/internal/sensors/security","name":"security","synopsis":"Package security is the universal security sensor.","isRedistributable":true}
