gitlab

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: Apache-2.0 Imports: 6 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

Overview

Package gitlab implements a client to read OIDC tokens from GitLab CI using the SIGSTORE_ID_TOKEN environment variable.

Index

Constants

View Source
const (
	// VariableGitLabIDToken is the environment variable that GitLab CI
	// sets when id_tokens are configured in the pipeline.
	VariableGitLabIDToken = "SIGSTORE_ID_TOKEN" //nolint:gosec // These are not hardcoded credentials
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CI

type CI struct{}

func (*CI) Provide

func (ci *CI) Provide(ctx context.Context, audience string) (*oauthflow.OIDCIDToken, error)

Provide reads the OIDC token from the SIGSTORE_ID_TOKEN environment variable. This token should be configured in GitLab CI with:

id_tokens:
  SIGSTORE_ID_TOKEN:
    aud: sigstore

See: https://docs.gitlab.com/ci/yaml/signing_examples/#sign-or-verify-container-images-and-build-artifacts-by-using-cosign

Jump to

Keyboard shortcuts

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