Documentation
¶
Overview ¶
Package corpus is a public, labelled set of poisoned and ordinary MCP tool definitions and tool results, and the measurement of how well agentgate's scanners tell them apart. The numbers are not a claim; they are what `go test ./corpus` measures on every commit, misses and false alarms included, so a change to a scanner shows what it gains and costs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Definition ¶
type Definition struct {
ID string `yaml:"id"`
Attack bool `yaml:"attack"`
Technique string `yaml:"technique"`
Others []pinning.OtherTool `yaml:"others"`
Def map[string]any `yaml:"def"`
}
Definition is one labelled definition.
func Definitions ¶
func Definitions() ([]Definition, error)
Definitions loads the definition corpus.
func (Definition) Definition ¶
func (d Definition) Definition() (pinning.Definition, error)
Definition turns the YAML definition into what the scanner reads.
type Result ¶
type Result struct {
ID string `yaml:"id"`
Attack bool `yaml:"attack"`
Technique string `yaml:"technique"`
Text string `yaml:"text"`
}
Result is one labelled tool result.
type Score ¶
type Score struct {
Name string
Attacks, Benign int
Caught, FalseAlarms int
Missed, FalseAlarmed []Outcome
}
Score is how one scanner did on one corpus.
func ScoreDefinitions ¶
ScoreDefinitions runs the definition scanner over the corpus.
func ScoreResults ¶
ScoreResults runs the result scanner over the corpus.
func (Score) FalseAlarmRate ¶
FalseAlarmRate is the share of benign entries flagged.