gitlab

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGitLabAPIURLFromEnv

func GetGitLabAPIURLFromEnv() string

GetGitLabAPIURLFromEnv retrieves the GitLab API URL from environment Returns empty string if not set (will use default gitlab.com)

func GetMRInfoFromEnv

func GetMRInfoFromEnv() (projectID, mrIID string)

GetMRInfoFromEnv retrieves MR info from GitLab CI environment variables

func GetTokenFromEnv

func GetTokenFromEnv() string

GetTokenFromEnv retrieves the GitLab token from environment variables It checks GITLAB_TOKEN first, then falls back to CI_JOB_TOKEN

func PostComment

func PostComment(analysis *api.SecurityAnalysis, opts CommentOptions) (*comment.CommentResult, error)

PostComment posts scan results as a comment to a GitLab merge request Returns without posting if no issues are found (ShouldProceed is true and no mitigations) If an existing Kusari comment exists, it will be updated instead of creating a new one

Types

type CommentOptions

type CommentOptions struct {
	ProjectID   string
	MergeReqIID string
	GitLabURL   string
	Token       string
	ConsoleURL  string // Link to full results in Kusari console
	Verbose     bool
}

CommentOptions holds the configuration for posting a comment to GitLab

Jump to

Keyboard shortcuts

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