commonint

package
v1.0.0-rc.15 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPipelineTemplate

func AddPipelineTemplate(content []byte, template string) string

func CreateNewVulnEventBasedOnComment

func CreateNewVulnEventBasedOnComment(vulnID string, vulnType dtos.VulnType, userID, comment string, artifactName string) models.VulnEvent

func GenerateFourDigitNumber

func GenerateFourDigitNumber() int

func GetLabels

func GetLabels(vuln models.Vuln) []string

func IsConnectedToThirdPartyIntegration

func IsConnectedToThirdPartyIntegration(asset models.Asset) bool

func RenderMarkdownForFirstPartyVuln

func RenderMarkdownForFirstPartyVuln(firstPartyVuln models.FirstPartyVuln, baseURL, orgSlug, projectSlug, assetSlug, assetVersionSlug string) string

func RenderMarkdownForLicenseRisk

func RenderMarkdownForLicenseRisk(licenseRisk models.LicenseRisk, baseURL, orgSlug, projectSlug, assetSlug, assetVersionSlug string) string

func RenderPathToComponent

func RenderPathToComponent(componentRepository shared.ComponentRepository, assetID uuid.UUID, assetVersionName string, artifacts []models.Artifact, pURL string) (string, error)

this function returns a string containing a mermaids js flow chart to the given pURL

func SetupAndPushPipeline

func SetupAndPushPipeline(accessToken string, gitlabURL string, projectName string, templateID string, branchName string) error

func ShouldCreateIssues

func ShouldCreateIssues(assetVersion models.AssetVersion) bool

func ShouldCreateThisIssue

func ShouldCreateThisIssue(asset models.Asset, dependencyVuln *models.DependencyVuln) bool

Types

type ExpectedIssueState

type ExpectedIssueState string
const (
	ExpectedIssueStateOpen   ExpectedIssueState = "open"
	ExpectedIssueStateClosed ExpectedIssueState = "closed"
)

func GetExpectedIssueState

func GetExpectedIssueState(asset models.Asset, dependencyVuln *models.DependencyVuln) ExpectedIssueState

func GetExpectedIssueStateForFirstPartyVuln

func GetExpectedIssueStateForFirstPartyVuln(asset models.Asset, firstPartyVuln *models.FirstPartyVuln) ExpectedIssueState

func (ExpectedIssueState) ToGithub

func (e ExpectedIssueState) ToGithub() string

func (ExpectedIssueState) ToGitlab

func (e ExpectedIssueState) ToGitlab() string

type Label

type Label struct {
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Color       string `json:"color"`
	Description string `json:"description"`
}

func GetAllRiskLabelsWithColors

func GetAllRiskLabelsWithColors() []Label

Jump to

Keyboard shortcuts

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