Documentation ¶
Index ¶
Constants ¶
View Source
const ( Name = "environment" Type = "https://witness.dev/attestations/environment/v0.1" RunType = attestation.PreMaterialRunType )
Variables ¶
This section is empty.
Functions ¶
func DefaultBlockList ¶
func DefaultBlockList() map[string]struct{}
sourced from https://github.com/Puliczek/awesome-list-of-secrets-in-environment-variables/blob/main/raw_list.txt
func FilterEnvironmentArray ¶
func FilterEnvironmentArray(variables []string, blockList map[string]struct{}, onAllowed func(key, val, orig string))
FilterEnvironmentArray expects an array of strings representing environment variables. Each element of the array is expected to be in the format of "KEY=VALUE". blockList is the list of elements to filter from variables, and for each element of variables that does not appear in the blockList onAllowed will be called.
Types ¶
type Attestor ¶
type Attestor struct { OS string `json:"os"` Hostname string `json:"hostname"` Username string `json:"username"` Variables map[string]string `json:"variables,omitempty"` // contains filtered or unexported fields }
func (*Attestor) Attest ¶
func (a *Attestor) Attest(ctx *attestation.AttestationContext) error
func (*Attestor) RunType ¶
func (a *Attestor) RunType() attestation.RunType
func (*Attestor) Schema ¶ added in v0.4.0
func (a *Attestor) Schema() *jsonschema.Schema
type EnvironmentAttestor ¶ added in v0.4.0
type EnvironmentAttestor interface { // Attestor Name() string Type() string RunType() attestation.RunType Attest(ctx *attestation.AttestationContext) error Data() *Attestor }
Click to show internal directories.
Click to hide internal directories.