sourcecheck

package
v0.1.0-c02.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowanceReport

type AllowanceReport struct {
	Path          string `json:"path"`
	PathSHA256    string `json:"pathSHA256"`
	PathBase64URL string `json:"pathBase64url"`
	SHA256        string `json:"sha256"`
	Consumed      bool   `json:"consumed"`
}

type Finding

type Finding struct {
	Rule          string `json:"rule"`
	Class         string `json:"class"`
	Path          string `json:"path"`
	PathSHA256    string `json:"pathSHA256"`
	PathBase64URL string `json:"pathBase64url"`
	Line          int    `json:"line,omitempty"`
	Column        int    `json:"column,omitempty"`
	SourceVariant string `json:"sourceVariant"`
	ContentSHA256 string `json:"contentSHA256"`
	Message       string `json:"message"`
}

type NonTextAllowance

type NonTextAllowance struct {
	Path   string
	SHA256 string
}

type Options

type Options struct {
	Root              string
	Scope             Scope
	Files             []string
	Base              string
	Head              string
	RemoteName        string
	RemoteURLSHA256   string
	RemoteRefs        []string
	PushUpdates       []PushUpdate
	NonTextAllowances []NonTextAllowance
	RecurseGitlinks   bool
	OutputFormat      string
	ReportPath        string
	// contains filtered or unexported fields
}

type PathIdentity

type PathIdentity struct {
	Display   string `json:"display"`
	SHA256    string `json:"sha256"`
	Base64URL string `json:"base64url"`
}

type PushUpdate

type PushUpdate struct {
	LocalRef  string
	LocalOID  string
	RemoteRef string
	RemoteOID string
}

type Report

type Report struct {
	SchemaVersion     string            `json:"schemaVersion"`
	Command           string            `json:"command"`
	GeneratedAt       string            `json:"generatedAt"`
	Status            string            `json:"status"`
	Passed            bool              `json:"passed"`
	Scope             Scope             `json:"scope"`
	ScannedFiles      []PathIdentity    `json:"scannedFiles"`
	ScannedInputs     []ScannedInput    `json:"scannedInputs"`
	NonTextAllowances []AllowanceReport `json:"nonTextAllowances"`
	Findings          []Finding         `json:"findings"`
}

func Scan

func Scan(options Options) (Report, error)

type ScannedInput

type ScannedInput struct {
	Path          string `json:"path"`
	PathSHA256    string `json:"pathSHA256"`
	PathBase64URL string `json:"pathBase64url"`
	SourceVariant string `json:"sourceVariant"`
	Kind          string `json:"kind"`
	GitlinkState  string `json:"gitlinkState,omitempty"`
	SHA256        string `json:"sha256"`
}

type Scope

type Scope string
const (
	ScopeFull    Scope = "full"
	ScopeTracked Scope = "tracked"
	ScopeChanged Scope = "changed"
	ScopePrePush Scope = "pre-push"
	ScopeFiles   Scope = "files"

	StatusApprove = "APPROVE"
	StatusBlocked = "BLOCKED"
)

Jump to

Keyboard shortcuts

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