Help us shape the future of Go! Take the 2026 Go Developer Survey

github

package
v1.233.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package github implements the github/sts auth integration: a just-in-time, least-privilege GitHub token broker for CI. It is the Git-credentials analog of the aws/ecr integration (Execute persists secret material to a deterministic on-disk location; Environment returns a pointer to it; Cleanup removes and revokes it).

Index

Constants

View Source
const (
	// GitConfigModeEnv injects per-owner insteadOf rewrites inline via GIT_CONFIG_KEY_n/VALUE_n.
	GitConfigModeEnv = "env"
	// GitConfigModeFile writes a 0600 gitconfig and emits include.path to it (tokens stay off the env).
	GitConfigModeFile = "file"
)

Variables

This section is empty.

Functions

func NewGitHubSTSIntegration

func NewGitHubSTSIntegration(config *integrations.IntegrationConfig) (integrations.Integration, error)

NewGitHubSTSIntegration creates a github/sts integration from config.

Types

type GitHubSTSIntegration

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

GitHubSTSIntegration implements the github/sts integration type.

func (*GitHubSTSIntegration) Cleanup

func (g *GitHubSTSIntegration) Cleanup(ctx context.Context) error

Cleanup revokes each minted token directly against GitHub and removes state files.

func (*GitHubSTSIntegration) Environment

func (g *GitHubSTSIntegration) Environment() (map[string]string, error)

Environment returns the GIT_CONFIG_* variables that route git over the minted tokens.

func (*GitHubSTSIntegration) Execute

Execute mints GitHub STS tokens and persists them for consumption and revocation.

func (*GitHubSTSIntegration) GetIdentity

func (g *GitHubSTSIntegration) GetIdentity() string

Environment helper: GetIdentity returns the identity name (empty for provider-bound).

func (*GitHubSTSIntegration) GetProvider

func (g *GitHubSTSIntegration) GetProvider() string

GetProvider returns the provider name (empty for identity-bound).

func (*GitHubSTSIntegration) Kind

func (g *GitHubSTSIntegration) Kind() string

Kind returns "github/sts".

Jump to

Keyboard shortcuts

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