internal/

directory
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0

Directories

Path Synopsis
Package cli wires the codefit command tree with cobra: the root command and its global flags, plus its subcommands.
Package cli wires the codefit command tree with cobra: the root command and its global flags, plus its subcommands.
Package config models and loads .codefit.yaml, the per-project configuration committed to the repository.
Package config models and loads .codefit.yaml, the per-project configuration committed to the repository.
core
baseline
Package baseline tracks codefit's view of a project's audited surface across scans.
Package baseline tracks codefit's view of a project's audited surface across scans.
cache
Package cache is the content-hash finding cache (PRD §19, optimization 2).
Package cache is the content-hash finding cache (PRD §19, optimization 2).
context
Package context defines AuditContext, the immutable struct that carries everything a sensor needs about the project under audit: where it lives, its language and framework, the parsed config, and the run modifiers (incremental ref, no-LLM mode).
Package context defines AuditContext, the immutable struct that carries everything a sensor needs about the project under audit: where it lives, its language and framework, the parsed config, and the run modifiers (incremental ref, no-LLM mode).
coverage
Package coverage models codefit's coverage manifest (PRD section 10, RF-07): the explicit, per-language declaration of what codefit detects and what it does not.
Package coverage models codefit's coverage manifest (PRD section 10, RF-07): the explicit, per-language declaration of what codefit detects and what it does not.
crossrules
Package crossrules is codefit's family of deterministic checks that reason over BOTH neutral inputs at once — the schema (db.Schema) AND the code's query filters (query.QueryFilter) — the code↔schema cross that index-vs-query needs (ADR 0029).
Package crossrules is codefit's family of deterministic checks that reason over BOTH neutral inputs at once — the schema (db.Schema) AND the code's query filters (query.QueryFilter) — the code↔schema cross that index-vs-query needs (ADR 0029).
cve
Package cve checks project dependencies against known vulnerabilities via OSV.dev (PRD section 18, RF-09).
Package cve checks project dependencies against known vulnerabilities via OSV.dev (PRD section 18, RF-09).
db
Package db is codefit's neutral, format-agnostic model of a database's structure — the schema a DB-dimension rule reasons over, blind to where it came from (Prisma or SQL-DDL — both parsers ship today).
Package db is codefit's neutral, format-agnostic model of a database's structure — the schema a DB-dimension rule reasons over, blind to where it came from (Prisma or SQL-DDL — both parsers ship today).
dbcoverage
Package dbcoverage holds the DB dimension's coverage prose — what the rules in core/dbrules actually detect, in the same plain-prose form the coverage manifest uses (PRD §10, RF-07).
Package dbcoverage holds the DB dimension's coverage prose — what the rules in core/dbrules actually detect, in the same plain-prose form the coverage manifest uses (PRD §10, RF-07).
dbrules
Package dbrules holds codefit's deterministic database-structure rules.
Package dbrules holds codefit's deterministic database-structure rules.
dwrules
Package dwrules is the paradigm-aware DW (data-warehouse) rule family: a SEPARATE two-argument Rule family from dbrules.Rule (schema-only), mirroring how internal/core/crossrules solved "a rule needs a fact beyond the bare schema" (ADR 0029) without mutating dbrules.Rule.
Package dwrules is the paradigm-aware DW (data-warehouse) rule family: a SEPARATE two-argument Rule family from dbrules.Rule (schema-only), mirroring how internal/core/crossrules solved "a rule needs a fact beyond the bare schema" (ADR 0029) without mutating dbrules.Rule.
findings
Package findings defines the universal, language-agnostic vocabulary of an audit: the Finding hallazgo, its Severity and Dimension, the ConsentRecord that authorizes suppressing a critical security finding, and the SensorResult every sensor returns.
Package findings defines the universal, language-agnostic vocabulary of an audit: the Finding hallazgo, its Severity and Dimension, the ConsentRecord that authorizes suppressing a critical security finding, and the SensorResult every sensor returns.
namematch
Package namematch decides one question, in one place: does this IDENTIFIER NAME denote a secret?
Package namematch decides one question, in one place: does this IDENTIFIER NAME denote a secret?
paradigm
Package paradigm computes a database schema's analytic-vs-transactional paradigm and each table's warehouse role, as a pure function over the neutral internal/core/db model.
Package paradigm computes a database schema's analytic-vs-transactional paradigm and each table's warehouse role, as a pure function over the neutral internal/core/db model.
query
Package query is codefit's neutral, format-agnostic model of a database query filter issued from application code — the CODE side of the code↔schema cross (index-vs-query), mirroring how internal/core/db models the SCHEMA side.
Package query is codefit's neutral, format-agnostic model of a database query filter issued from application code — the CODE side of the code↔schema cross (index-vs-query), mirroring how internal/core/db models the SCHEMA side.
report
Package report defines the canonical audit report and the renderers that present it.
Package report defines the canonical audit report and the renderers that present it.
ruleengine
Package ruleengine is codefit's own matcher for a subset of the Semgrep rule format (PRD section 17).
Package ruleengine is codefit's own matcher for a subset of the Semgrep rule format (PRD section 17).
scope
Package scope is layer 0 of the filtering pyramid (PRD section 19), as a value: WHICH project-relative files an audit pass is allowed to look at.
Package scope is layer 0 of the filtering pyramid (PRD section 19), as a value: WHICH project-relative files an audit pass is allowed to look at.
scoring
Package scoring computes the per-dimension scores (0-100) and the weighted global score from a set of findings, using the configurable weights from .codefit.yaml (PRD RF-07).
Package scoring computes the per-dimension scores (0-100) and the weighted global score from a set of findings, using the configurable weights from .codefit.yaml (PRD RF-07).
sourcetext
Package sourcetext decodes the RAW BYTES of a file codefit was asked to read into the UTF-8 text every layer above it assumes it already has.
Package sourcetext decodes the RAW BYTES of a file codefit was asked to read into the UTF-8 text every layer above it assumes it already has.
surface
Package surface is the core framework for surface mapping (PRD section 10): the language-agnostic home for surface categories and, in Fase 1, the SurfaceQuery format (codefit's own declarative format for enumerating auditable structural surface, distinct from the Semgrep-format rules used for deterministic findings — PRD section 17).
Package surface is the core framework for surface mapping (PRD section 10): the language-agnostic home for surface categories and, in Fase 1, the SurfaceQuery format (codefit's own declarative format for enumerating auditable structural surface, distinct from the Semgrep-format rules used for deterministic findings — PRD section 17).
surfaceindex
Package surfaceindex projects a findings.SurfaceItem list into the light shape both codefit-scan-all's DBSection and the standalone codefit-scan-db serve by default (design D1).
Package surfaceindex projects a findings.SurfaceItem list into the light shape both codefit-scan-all's DBSection and the standalone codefit-scan-db serve by default (design D1).
syntax
Package syntax is codefit's parser-agnostic AST boundary.
Package syntax is codefit's parser-agnostic AST boundary.
Package mcp implements the MCP server mode: a thin, stateless adapter that exposes the same core sensors as MCP tools (PRD section 10).
Package mcp implements the MCP server mode: a thin, stateless adapter that exposes the same core sensors as MCP tools (PRD section 10).
Package providers defines the LanguageProvider contract — the extensibility seam (PRD section 14).
Package providers defines the LanguageProvider contract — the extensibility seam (PRD section 14).
golang
Package golang is the Go LanguageProvider.
Package golang is the Go LanguageProvider.
registry
Package registry is the ONE table that maps language -> provider, answering FOUR independent queries (by name, by extension, by marker file, and the complete set) so internal/mcp and internal/scaffold never build a concrete provider on their own and never hand-diverge into a fifth answer to "what can codefit do for this language" (CLAUDE.md's layering rule).
Package registry is the ONE table that maps language -> provider, answering FOUR independent queries (by name, by extension, by marker file, and the complete set) so internal/mcp and internal/scaffold never build a concrete provider on their own and never hand-diverge into a fifth answer to "what can codefit do for this language" (CLAUDE.md's layering rule).
sqlddl
Package sqlddl is codefit's hand-written SQL-DDL parser.
Package sqlddl is codefit's hand-written SQL-DDL parser.
typescript
Package typescript is the TypeScript/TSX LanguageProvider.
Package typescript is the TypeScript/TSX LanguageProvider.
Package scaffold powers `codefit init`: it inspects a project on disk and produces the artifacts that make codefit usable from an AI agent.
Package scaffold powers `codefit init`: it inspects a project on disk and produces the artifacts that make codefit usable from an AI agent.
Package schemasource maps a schema INPUT to the concrete parser that can read it.
Package schemasource maps a schema INPUT to the concrete parser that can read it.
Package sensors defines the Sensor contract: a module that audits one findings.Dimension and returns a findings.SensorResult.
Package sensors defines the Sensor contract: a module that audits one findings.Dimension and returns a findings.SensorResult.
db
Package db is the database-structure sensor (dimension "db").
Package db is the database-structure sensor (dimension "db").
security
Package security is the universal security sensor.
Package security is the universal security sensor.
Package version holds the build-time identity of the codefit binary.
Package version holds the build-time identity of the codefit binary.

Jump to

Keyboard shortcuts

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