github

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGitHubAPIURLFromEnv

func GetGitHubAPIURLFromEnv() string

GetGitHubAPIURLFromEnv retrieves the GitHub API URL from environment Returns empty string if not set (will use default api.github.com)

func GetPRInfoFromEnv

func GetPRInfoFromEnv() (owner, repo string, prNumber int)

GetPRInfoFromEnv retrieves PR info from GitHub Actions environment variables Returns owner, repo, and PR number

func GetTokenFromEnv

func GetTokenFromEnv() string

GetTokenFromEnv retrieves the GitHub token from environment variables

func PostComment

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

PostComment posts scan results as a comment to a GitHub pull 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 {
	Owner      string
	Repo       string
	PRNumber   int
	GitHubURL  string
	Token      string
	ConsoleURL string // Link to full results in Kusari console
	Verbose    bool
}

CommentOptions holds the configuration for posting a comment to GitHub

Jump to

Keyboard shortcuts

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