sourceprivacy

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RetentionEphemeral       = "ephemeral"
	RetentionRetainForResume = "retain_for_resume"
	RetentionRetain          = "retain"

	SerializedLocationsLogical    = "logical"
	SerializedLocationsFilesystem = "filesystem"

	CleanupNotApplicable = "not_applicable"
	CleanupPending       = "pending"
	CleanupRemoved       = "removed"
	CleanupRetained      = "retained"
	CleanupFailed        = "failed"
)

Variables

This section is empty.

Functions

func ContainsMaterializedSourcePath

func ContainsMaterializedSourcePath(value string) bool

func ParseRetentionMode

func ParseRetentionMode(raw string) (string, error)

func ShouldRetainMaterializedSource

func ShouldRetainMaterializedSource(mode string, success bool) bool

Types

type Contract

type Contract struct {
	RetentionMode              string   `json:"retention_mode" yaml:"retention_mode"`
	MaterializedSourceRetained bool     `json:"materialized_source_retained" yaml:"materialized_source_retained"`
	RawSourceInArtifacts       bool     `json:"raw_source_in_artifacts" yaml:"raw_source_in_artifacts"`
	SerializedLocations        string   `json:"serialized_locations" yaml:"serialized_locations"`
	CleanupStatus              string   `json:"cleanup_status" yaml:"cleanup_status"`
	Warnings                   []string `json:"warnings,omitempty" yaml:"warnings,omitempty"`
}

Contract is the machine-readable privacy contract emitted with scan-derived artifacts.

func InitialContract

func InitialContract(mode string, hosted bool, allowSourceMaterialization bool) Contract

func MarkFailed

func MarkFailed(in Contract, reason string) Contract

func MarkRemoved

func MarkRemoved(in Contract) Contract

func MarkRetained

func MarkRetained(in Contract) Contract

func Normalize

func Normalize(in Contract) Contract

type Sanitizer

type Sanitizer struct {
	// contains filtered or unexported fields
}

func NewSanitizer

func NewSanitizer(roots ...string) Sanitizer

func (Sanitizer) String

func (s Sanitizer) String(value string) string

func (Sanitizer) Strings

func (s Sanitizer) Strings(values []string) []string

Jump to

Keyboard shortcuts

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