Help us shape the future of Go! Take the 2026 Go Developer Survey

curation

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockingReasonPolicy       = "Policy violations"
	BlockingReasonNotFound     = "Package pending update"
	BlockingReasonOnDemand     = "Package pending — Curation on-demand scan in progress"
	BlockingReasonUnknown      = "Blocked by curation (response could not be parsed)"
	BlockingReasonNotEvaluated = "Not evaluated — non-registry dependency"

	BlockMessageKey  = "jfrog packages curation"
	NotBeingFoundKey = "not being found"
	IsOnDemand       = "on-demand"

	WaiverRequestForbidden = "One or more policies blocking this package do not allow waiver requests."
	WaiverRequestApproved  = "" /* 171-byte string literal not displayed */
	WaiverRequestPending   = "" /* 134-byte string literal not displayed */
	WaiverRequestError     = "An error occurred while processing the waiver request. Please try again later."

	TotalConcurrentRequests = 10

	MinArtiPassThroughSupport = "7.82.0"
	MinArtiGolangSupport      = "7.87.0"
	MinArtiNuGetSupport       = "7.93.0"
	MinXrayPassThroughSupport = "3.92.0"
	MinArtiGradleGemSupport   = "7.63.5"
)

Variables

View Source
var CurationOutputFormats = []string{string(outFormat.Table), string(outFormat.Json)}

Functions

func GetCurationOutputFormat

func GetCurationOutputFormat(formatFlagVal string) (format outFormat.OutputFormat, err error)

func IsEntitledForCuration added in v1.7.0

func IsEntitledForCuration(xrayManager *xrayClient.XrayServicesManager) (entitled bool, err error)

Types

type CurationActionsCommand added in v1.39.0

type CurationActionsCommand struct {
	// contains filtered or unexported fields
}

CurationActionsCommand curates the GitHub Actions that actually resolved on this job's runner, taking the runner's action cache as the source of truth.

func NewCurationActionsCommand added in v1.39.0

func NewCurationActionsCommand() *CurationActionsCommand

func (*CurationActionsCommand) CommandName added in v1.39.0

func (c *CurationActionsCommand) CommandName() string

func (*CurationActionsCommand) Run added in v1.39.0

func (c *CurationActionsCommand) Run() (err error)

Run discovers the actions resolved on this job's runner, decides a curation outcome per action, prints and records the report, and returns an error unless every action was Approved. Only that exact status clears the gate - a rejection withholds the job, and so would a status this code does not recognize, which is what keeps a future decider's unhandled outcome from reading as a pass.

If any action cannot be decided at all Run returns that error and produces no report and no job summary.

With a workflow file cross-referencing entries for Parent and Subpath metadata and rendering a Parent column; without one, STRUCTURE-ONLY.

func (*CurationActionsCommand) SetActionsCacheDir added in v1.39.0

func (c *CurationActionsCommand) SetActionsCacheDir(dir string) *CurationActionsCommand

SetActionsCacheDir overrides the runner's action cache directory; defaults to githubactions.DefaultActionsCacheDir() (derived from RUNNER_WORKSPACE).

func (*CurationActionsCommand) SetDecider added in v1.39.0

SetDecider overrides the curation decider

func (*CurationActionsCommand) SetGithubRepo added in v1.39.0

func (c *CurationActionsCommand) SetGithubRepo(githubRepo string) *CurationActionsCommand

SetGithubRepo overrides the GitHub repository to resolve the Artifactory VCS repository from; defaults to GITHUB_REPOSITORY.

func (*CurationActionsCommand) SetJobID added in v1.39.0

SetJobID overrides the workflow job to scope curation to; defaults to the running job's job_id from GITHUB_JOB.

func (*CurationActionsCommand) SetVcsRepoResolver added in v1.39.0

SetVcsRepoResolver overrides the Artifactory VCS repository resolver

func (*CurationActionsCommand) SetWorkflowFile added in v1.39.0

func (c *CurationActionsCommand) SetWorkflowFile(path string) *CurationActionsCommand

SetWorkflowFile overrides the workflow file to cross-reference against; defaults to the running workflow derived from GITHUB_WORKFLOW_REF.

func (*CurationActionsCommand) SetWorkingDir added in v1.39.0

func (c *CurationActionsCommand) SetWorkingDir(dir string) *CurationActionsCommand

SetWorkingDir overrides the repo root; defaults to the process's working directory. No flag sets this - it exists so a test can anchor the path GITHUB_WORKFLOW_REF derives.

type CurationAuditCommand

type CurationAuditCommand struct {
	PackageManagerConfig *project.RepositoryConfig

	OriginPath string

	audit.AuditParamsInterface
	// contains filtered or unexported fields
}

func NewCurationAuditCommand

func NewCurationAuditCommand() *CurationAuditCommand

func (*CurationAuditCommand) CommandName

func (ca *CurationAuditCommand) CommandName() string

func (*CurationAuditCommand) DockerImageName added in v1.25.0

func (ca *CurationAuditCommand) DockerImageName() string

func (*CurationAuditCommand) GetAuth added in v1.7.0

func (ca *CurationAuditCommand) GetAuth(tech techutils.Technology) (serverDetails *config.ServerDetails, err error)

func (*CurationAuditCommand) HuggingFaceModel added in v1.32.0

func (ca *CurationAuditCommand) HuggingFaceModel() string

func (*CurationAuditCommand) Run

func (ca *CurationAuditCommand) Run() (err error)

func (*CurationAuditCommand) SetDockerImageName added in v1.25.0

func (ca *CurationAuditCommand) SetDockerImageName(dockerImageName string) *CurationAuditCommand

func (*CurationAuditCommand) SetHuggingFaceModel added in v1.32.0

func (ca *CurationAuditCommand) SetHuggingFaceModel(huggingFaceModel string) *CurationAuditCommand

func (*CurationAuditCommand) SetIncludeCachedPackages added in v1.26.0

func (ca *CurationAuditCommand) SetIncludeCachedPackages(includeCachedPackages bool) *CurationAuditCommand

func (*CurationAuditCommand) SetMvnIncludePluginDeps added in v1.30.0

func (ca *CurationAuditCommand) SetMvnIncludePluginDeps(mvnIncludePluginDeps bool) *CurationAuditCommand

func (*CurationAuditCommand) SetParallelRequests

func (ca *CurationAuditCommand) SetParallelRequests(threads int) *CurationAuditCommand

func (*CurationAuditCommand) SetRepo

func (ca *CurationAuditCommand) SetRepo(tech techutils.Technology) error

func (*CurationAuditCommand) SetScriptPath added in v1.33.0

func (ca *CurationAuditCommand) SetScriptPath(scriptPath string) *CurationAuditCommand

func (*CurationAuditCommand) SetWorkingDirs

func (ca *CurationAuditCommand) SetWorkingDirs(dirs []string) *CurationAuditCommand

type CurationReport added in v1.6.3

type CurationReport struct {
	// contains filtered or unexported fields
}

type ErrorResp

type ErrorResp struct {
	Status int `json:"status"`
	// Message is the field name most package managers' curation-block body uses.
	Message string `json:"message"`
	// Detail is the field name Artifactory uses instead, for cargo's curation-block body.
	// RawMessage, not string: other techs (e.g. Docker) send "detail" as a JSON object.
	Detail json.RawMessage `json:"detail"`
}

type ErrorsResp

type ErrorsResp struct {
	Errors []ErrorResp `json:"errors"`
}

type PackageStatus

type PackageStatus struct {
	Action            string   `json:"action"`
	ParentName        string   `json:"direct_dependency_package_name"`
	ParentVersion     string   `json:"direct_dependency_package_version"`
	BlockedPackageUrl string   `json:"blocked_package_url,omitempty"`
	PackageName       string   `json:"blocked_package_name"`
	PackageVersion    string   `json:"blocked_package_version"`
	BlockingReason    string   `json:"blocking_reason"`
	DepRelation       string   `json:"dependency_relation"`
	PkgType           string   `json:"type"`
	WaiverAllowed     bool     `json:"waiver_allowed"`
	Policy            []Policy `json:"policies,omitempty"`
}

type PackageStatusTable

type PackageStatusTable struct {
	ID             string `col-name:"ID" auto-merge:"true"`
	ParentName     string `col-name:"Direct\nDependency\nPackage\nName" auto-merge:"true"`
	ParentVersion  string `col-name:"Direct\nDependency\nPackage\nVersion" auto-merge:"true"`
	PackageName    string `col-name:"Blocked\nPackage\nName" auto-merge:"true"`
	PackageVersion string `col-name:"Blocked\nPackage\nVersion" auto-merge:"true"`
	PkgType        string `col-name:"Package\nType" auto-merge:"true"`
	Policy         string `col-name:"Violated\nPolicy\nName"`
	Condition      string `col-name:"Violated Condition\nName"`
	Explanation    string `col-name:"Explanation"`
	Recommendation string `col-name:"Recommendation"`
}

type Policy

type Policy struct {
	Policy         string `json:"policy"`
	Condition      string `json:"condition"`
	Explanation    string `json:"explanation"`
	Recommendation string `json:"recommendation"`
}

type WaiverResponse added in v1.16.0

type WaiverResponse struct {
	PkgName     string `col-name:"Package Name"`
	Status      string `col-name:"Status"`
	Explanation string `col-name:"Explanation"`
	WaiverID    string `col-name:"Waiver ID"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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