behavioral

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package behavioral compares what an MCP capability says it does against what its handler actually reaches, using only the graph the source pass already built: no LLM, just a fixed vocabulary matched against the description and a fixed catalogue of filesystem/network/process/credential calls matched against everything the handler statically reaches. Reachability is co-occurrence evidence, not a traced dataflow proof.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Declared added in v1.2.0

func Declared(description string) (filesystem, network, process bool)

Declared reports which capability categories a description affirmatively claims, with the same vocabulary and negation handling the mismatch checks use. Other analyzers use it to tell a tool's stated purpose from an injection into it.

Types

type Analyzer

type Analyzer struct{}

func (*Analyzer) Analyze

func (*Analyzer) AppliesTo

func (*Analyzer) AppliesTo(kind model.TargetKind) bool

func (*Analyzer) Describe

func (*Analyzer) Describe() analyzer.Description

func (*Analyzer) Name

func (*Analyzer) Name() string

type HandlerBehavior added in v1.2.0

type HandlerBehavior struct {
	Network           bool     `json:"network"`
	Filesystem        bool     `json:"filesystem"`
	Process           bool     `json:"process"`
	Credentials       bool     `json:"credentials"`
	SensitivePaths    []string `json:"sensitive_paths,omitempty"`
	EnvVars           []string `json:"env_vars,omitempty"`
	URLs              []string `json:"urls,omitempty"`
	ReachedFunctions  int      `json:"reached_functions"`
	ReachesUnresolved bool     `json:"reaches_unresolved_calls"`
}

HandlerBehavior is what a capability's handler can reach through the call graph: the categories the behavioral checks compare against the description, and the concrete evidence behind them

func Behavior added in v1.2.0

func Behavior(g *graph.Graph, handler graph.SymbolID) HandlerBehavior

Behavior summarizes what handler can reach, with the same reachability and catalogue the mismatch checks use

Jump to

Keyboard shortcuts

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