secmodel

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package secmodel checks the security model in SECURITY.md against the tests: every guarantee it publishes must be guarded by a test, a model or a probe, or be marked as checked by hand.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(published []Guarantee, markers map[string][]string) []string

Check returns the problems of a security model: published guarantees that nothing guards and that are not checked by hand, and markers naming a guarantee that does not exist.

func Markers

func Markers(root string) (map[string][]string, error)

Markers returns, for each guarantee ID, where tests, models and probes under root name it, as "path:line". It skips directories whose names start with a dot, and testdata.

Types

type Guarantee

type Guarantee struct {
	ID     string // G1, G2, ...
	Manual bool   // its section has a "Manual:" line: checked by hand before releases
}

Guarantee is a guarantee SECURITY.md publishes.

func ParseGuarantees

func ParseGuarantees(md []byte) []Guarantee

ParseGuarantees returns the guarantees in a SECURITY.md: its "### G<n>:" headings, and whether each one's section has a "Manual:" line. A section ends at the next heading.

Jump to

Keyboard shortcuts

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