Documentation ¶
Index ¶
- Constants
- type Attestor
- func (a *Attestor) Attest(ctx *attestation.AttestationContext) error
- func (a *Attestor) BackRefs() map[string]cryptoutil.DigestSet
- func (a *Attestor) Data() *Attestor
- func (a *Attestor) Name() string
- func (a *Attestor) RunType() attestation.RunType
- func (a *Attestor) Schema() *jsonschema.Schema
- func (a *Attestor) Subjects() map[string]cryptoutil.DigestSet
- func (a *Attestor) Type() string
- type ErrNotGitHub
- type GitHubAttestor
- type GithubTokenResponse
Constants ¶
View Source
const ( Name = "github" Type = "https://witness.dev/attestations/github/v0.1" RunType = attestation.PreMaterialRunType )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attestor ¶
type Attestor struct { JWT *jwt.Attestor `json:"jwt,omitempty"` CIConfigPath string `json:"ciconfigpath"` PipelineID string `json:"pipelineid"` PipelineName string `json:"pipelinename"` PipelineUrl string `json:"pipelineurl"` ProjectUrl string `json:"projecturl"` RunnerID string `json:"runnerid"` CIHost string `json:"cihost"` CIServerUrl string `json:"ciserverurl"` RunnerArch string `json:"runnerarch"` RunnerOS string `json:"runneros"` // contains filtered or unexported fields }
Attestor is a struct that holds the necessary information for github attestation.
func (*Attestor) Attest ¶
func (a *Attestor) Attest(ctx *attestation.AttestationContext) error
Attest performs the attestation for the github environment.
func (*Attestor) BackRefs ¶
func (a *Attestor) BackRefs() map[string]cryptoutil.DigestSet
BackRefs returns a map of back references and their corresponding digest sets.
func (*Attestor) RunType ¶
func (a *Attestor) RunType() attestation.RunType
RunType returns the run type of the attestor.
func (*Attestor) Schema ¶ added in v0.4.0
func (a *Attestor) Schema() *jsonschema.Schema
type ErrNotGitHub ¶ added in v0.4.0
type ErrNotGitHub struct{}
ErrNotGitHub is an error type that indicates the environment is not a github ci job.
func (ErrNotGitHub) Error ¶ added in v0.4.0
func (e ErrNotGitHub) Error() string
Error returns the error message for ErrNotGitHub.
type GitHubAttestor ¶ added in v0.4.0
type GitHubAttestor interface { // Attestor Name() string Type() string RunType() attestation.RunType Attest(ctx *attestation.AttestationContext) error Data() *Attestor // Subjecter Subjects() map[string]cryptoutil.DigestSet // Backreffer BackRefs() map[string]cryptoutil.DigestSet }
type GithubTokenResponse ¶
GithubTokenResponse is a struct that holds the response from the github token request.
Click to show internal directories.
Click to hide internal directories.