Documentation
¶
Overview ¶
Package feed loads the runtime sensor's rules from an organisation's published detection rule feed (vdb-site detection_rule_feeds_sensor.go).
A feed is a manifest.json listing each file with its SHA-256, the files, and manifest.json.sig, an Ed25519 signature over the manifest bytes. The sensor reads rules.json, which names each rule, its start mode and its body.
Verification decides what the sensor may do with a rule, not whether it loads: a feed whose signature checks out against the pinned key yields verified rules, which may block; anything else yields unverified rules, which the verdict engine only ever reports. A file whose hash does not match the manifest is refused outright, signed or not, because it is not the file the manifest describes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotModified = errors.New("feed not modified")
ErrNotModified is returned when the manifest has not changed since the last successful fetch.
Functions ¶
Types ¶
type Loaded ¶
type Loaded struct {
FeedUUID string
FeedType string
Rules []Rule
Verified bool
// Why the feed is not verified, in one phrase, when it is not.
Unverified string
ETag string
}
Loaded is one fetch's result.
type Rule ¶
type Rule struct {
RuleTable string `json:"ruleTable"`
RuleUUID string `json:"ruleUuid"`
RuleType string `json:"ruleType"`
Name string `json:"name"`
CVE string `json:"cve,omitempty"`
DeployMode string `json:"deployMode"`
Disabled bool `json:"disabled"`
Body string `json:"body"`
}
Rule is one entry of rules.json.