Documentation
¶
Overview ¶
Package skillscan reads a skill's files for what its user would want to know before an agent follows them (狮子座 on Discord): instructions to advertise links or products, or to send data home; install steps that download a program and run it; scripts that reach the network or read credentials; and text a reader of the rendered page doesn't see (zero-width, bidi and tag characters, HTML comments that speak to the model). It reads only the bytes it is given: nothing goes to a network or a model, and the same files always give the same findings.
A finding is something to look at, not a verdict: the page shows each with its file, line and words, and the user decides to install, keep or remove the skill. Nothing here changes a file.
Index ¶
Constants ¶
const ( Promo = "promo" // tells the agent to show links or products to the user Telemetry = "telemetry" // sends data home, or turns telemetry on Download = "download" // downloads a program and runs it Credentials = "credentials" // reads credential files, or the whole environment Hidden = "hidden" // text the rendered page doesn't show Network = "network" // a script reaches the network Program = "program" // a compiled program, which can't be read Secret = "secret" // a script reads a secret from the environment )
The kinds of finding.
const ( Warn = "warn" Note = "note" )
The levels: a warning is what the check is for; a note is worth knowing but ordinary in a skill that calls an API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finding ¶
type Finding struct {
Kind string `json:"kind"`
Level string `json:"level"`
File string `json:"file"` // its place in the skill's folder, with /
Line int `json:"line,omitempty"` // from 1; 0 for the file as a whole
Text string `json:"text"` // the line, shortened, what can't be seen shown
}
Finding is one thing found: where, and the words that say it.
type Report ¶
type Report struct {
Findings []Finding `json:"findings"`
More int `json:"more,omitempty"` // findings past the ones listed
}
Report is what was found in one skill.