Documentation
¶
Overview ¶
Package stackpolicy evaluates captured stack declarations against a versioned offline policy file selected by gridctl validate --policy.
It does not authorize deployment, inspect runtime state, or change ordinary validate, apply, REST, or reload behavior.
Index ¶
Constants ¶
View Source
const ( PolicyVersion = "1" CheckerVersion = "1" SchemaVersion = 1 )
View Source
const ( RuleExplicitImageDigests = "explicit-image-digests" RuleDenyLocalCommandServers = "deny-local-command-servers" RuleDenySSHServers = "deny-ssh-servers" RuleSchemaPinningEnabled = "schema-pinning-enabled" RuleSchemaPinningBlock = "schema-pinning-block" RuleNonemptyServerToolLists = "nonempty-server-tool-lists" )
View Source
const WarningLiteralToolNameNotPattern = "literal-tool-name-not-pattern"
Variables ¶
This section is empty.
Functions ¶
func ExitCode ¶
ExitCode returns the validate-family exit: 0 accepted, 1 not accepted, 2 accepted with warnings only.
func FormatJSON ¶
FormatJSON writes one versioned JSON document. It buffers first so a failed encode does not emit a partial report.
Types ¶
type Diagnostic ¶
type PolicyInfo ¶
type Report ¶
type Report struct {
SchemaVersion int `json:"schema_version"`
CheckerVersion string `json:"checker_version"`
Policy PolicyInfo `json:"policy"`
Accepted bool `json:"accepted"`
EvaluationComplete bool `json:"evaluation_complete"`
Status Status `json:"status"`
Coverage Coverage `json:"coverage"`
Results []Result `json:"results"`
Warnings []Warning `json:"warnings"`
Diagnostics []Diagnostic `json:"diagnostics"`
}
Click to show internal directories.
Click to hide internal directories.