analyzerdotnet

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 14 Imported by: 0

Documentation

Overview

Package analyzerdotnet is an isolated, static-only .NET fact candidate.

It reads one canonical request envelope from bytes, validates it against the frozen experimental analyzer-candidate profile, and emits closed facts drawn only from the request's own declared inputs. It never opens a path, consults an installed SDK or NuGet feed, evaluates MSBuild, expands a glob, or executes anything.

Index

Constants

View Source
const (
	Profile = "corvint-analyzer-candidate/experimental"
	Family  = "dotnet"

	MaxRequestBytes         = 1_500_000
	MaxInputBytes           = 1 << 20
	MaxOutputBytes          = 1 << 20
	MaxContentBase64Bytes   = 1_398_104
	MaxAggregateBase64Bytes = 1_398_104
	MaxInputs               = 128
	MaxFeatures             = 64
	MaxIdentifierBytes      = 128
	MaxPathBytes            = 4096
	MaxPathSegmentBytes     = 128
	MaxJSONDepth            = 8
	MaxJSONTokens           = 4096
	MaxFactFieldBytes       = 4096

	// ACP: each input carries a prospective fact ceiling and the request
	// carries an independent one. Both are enforced before a fact is retained.
	MaxFactsPerInput = 4096
	MaxFactsPerLoad  = 4096

	// Qualification budget, mirrored by the per-family row in
	// docs/specs/analyzer-candidate-profiles.md.
	MaxBytesPerOp  = 130_000
	MaxAllocsPerOp = 900
	MaxBinaryBytes = 6_291_456
)

Variables

This section is empty.

Functions

func AnalyzeCanonical

func AnalyzeCanonical(raw []byte) []byte

AnalyzeCanonical is the whole candidate. raw is the sole input; no path is ever opened and no subprocess is ever started.

func Sentinel

func Sentinel(reason string) []byte

Sentinel is the fixed pre-envelope failure response, used before any part of the request has passed its grammar.

Types

type Echo

type Echo struct {
	Handle string `json:"handle"`
	SHA256 string `json:"sha256"`
}

type Fact

type Fact struct {
	Kind           string `json:"kind"`
	InputHandle    string `json:"input_handle"`
	RelatedHandle  string `json:"related_handle"`
	Subject        string `json:"subject"`
	Predicate      string `json:"predicate"`
	Value          string `json:"value"`
	InstanceID     string `json:"instance_id"`
	EvidenceSHA256 string `json:"evidence_sha256"`
}

type Input

type Input struct {
	Handle        string `json:"handle"`
	Family        string `json:"family"`
	Path          string `json:"path"`
	SHA256        string `json:"sha256"`
	ContentBase64 string `json:"content_base64"`
}

type Request

type Request struct {
	Profile           string  `json:"profile"`
	Family            string  `json:"family"`
	RequestID         string  `json:"request_id"`
	ScopeID           string  `json:"scope_id"`
	CompilationUnitID string  `json:"compilation_unit_id"`
	Target            Target  `json:"target"`
	Inputs            []Input `json:"inputs"`
}

type Target

type Target struct {
	OS           string   `json:"os"`
	Architecture string   `json:"architecture"`
	ABI          string   `json:"abi"`
	Features     []string `json:"features"`
}

Jump to

Keyboard shortcuts

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