context

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: 1 Imported by: 0

Documentation

Overview

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).

It lives in its own package — not in findings — so the leaf findings package stays dependency-free: AuditContext references config, and a finding type must never depend on the config parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditContext

type AuditContext struct {
	// ProjectRoot is the absolute path to the project being audited.
	ProjectRoot string
	// Language is the project language (e.g. "go", "typescript"); selects the
	// LanguageProvider.
	Language string
	// Framework is the detected framework (e.g. "react"), optional.
	Framework string
	// Config is the parsed .codefit.yaml for the project.
	Config *config.Config
	// Since is a git ref for incremental (--since) mode; empty means full scan.
	Since string
	// NoLLM disables every sensor layer that would require an LLM call.
	NoLLM bool
	// FailOn is the severity at or above which the run should fail (and the
	// pipeline may early-exit before the LLM layer). One of critical|high|medium.
	FailOn string
	// Interactive records whether stdout is an interactive terminal (resolved
	// once via TTY detection), so renderers and prompts can adapt.
	Interactive bool
}

AuditContext encapsulates all the information about the project being audited and is passed to every sensor. It is assembled once by the orchestrator and treated as read-only by sensors.

Jump to

Keyboard shortcuts

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