Documentation
¶
Overview ¶
Package gitlab provides a verifier for GitLab personal access tokens. It uses the GitLab API GET /api/v4/user endpoint to check token validity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier checks whether a GitLab personal access token is active by calling the GitLab API. It NEVER logs or persists raw token values.
func (*Verifier) Verify ¶
func (v *Verifier) Verify(ctx context.Context, raw detector.RawFinding) finding.VerificationResult
Verify checks if the detected GitLab personal access token is valid/active. Raw contains the token value. The API host is derived from a co-located self-hosted instance host (ExtraData["host"]) when present, defaulting to gitlab.com — so an active self-hosted token is verified against its true issuer instead of being misreported as invalid by gitlab.com.