Documentation
¶
Index ¶
- Constants
- Variables
- type AzureIncludeExclude
- type AzureJob
- type AzurePipeline
- type AzurePipelineVariable
- type AzurePipelineVariables
- type AzurePr
- type AzureStage
- type AzureStep
- type BranchInfo
- type Config
- type ConfigInclude
- type ConfigSkip
- type GithubActionsEnv
- type GithubActionsEnvs
- type GithubActionsEvent
- type GithubActionsEvents
- type GithubActionsInput
- type GithubActionsInputs
- type GithubActionsJob
- type GithubActionsJobContainer
- type GithubActionsJobEnvironment
- type GithubActionsJobEnvironments
- type GithubActionsJobRunsOn
- type GithubActionsJobSecret
- type GithubActionsJobSecrets
- type GithubActionsJobs
- type GithubActionsMetadata
- type GithubActionsOutput
- type GithubActionsOutputs
- type GithubActionsPermission
- type GithubActionsPermissions
- type GithubActionsSecrets
- type GithubActionsStep
- type GithubActionsSteps
- type GithubActionsStrategy
- type GithubActionsWith
- type GithubActionsWorkflow
- type GitlabciConfig
- type GitlabciConfigInput
- type GitlabciConfigInputs
- type GitlabciConfigSpec
- type GitlabciGlobalVariable
- type GitlabciGlobalVariables
- type GitlabciImage
- type GitlabciIncludeInput
- type GitlabciIncludeInputs
- type GitlabciIncludeItem
- type GitlabciIncludeItems
- type GitlabciJob
- type GitlabciJobHooks
- type GitlabciJobVariable
- type GitlabciJobVariables
- type GitlabciScript
- type GitlabciService
- type GitlabciStringRef
- type PackageInsights
- type PipelineAsCodeTekton
- type PipelineRunSpec
- type PipelineSpec
- type PipelineTask
- type Purl
- type RepoInfo
- type Step
- type StringList
- type TaskSpec
Constants ¶
View Source
const ( ScopeMetadata = "metadata" ScopeActions = "actions" ScopeAttestations = "attestations" ScopeChecks = "checks" ScopeContents = "contents" ScopeDeployments = "deployments" ScopeIDToken = "id-token" ScopeIssues = "issues" ScopeDiscussions = "discussions" ScopePackages = "packages" ScopePages = "pages" ScopePullRequests = "pull-requests" ScopeRepositoryProjects = "repository-projects" ScopeSecurityEvents = "security-events" ScopeStatuses = "statuses" PermissionRead = "read" PermissionWrite = "write" PermissionNone = "none" )
View Source
const AllSecrets = "*ALL"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AzureIncludeExclude ¶ added in v0.14.0
type AzureIncludeExclude struct { Include StringList `json:"include"` Exclude StringList `json:"exclude"` }
type AzureJob ¶ added in v0.14.0
https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/jobs-job?view=azure-pipelines
type AzurePipeline ¶ added in v0.14.0
type AzurePipeline struct { Path string `json:"path" yaml:"-"` Stages []AzureStage `json:"stages"` Pr AzurePr `json:"pr"` Variables AzurePipelineVariables `json:"variables"` }
https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pipeline?view=azure-pipelines
func (AzurePipeline) IsValid ¶ added in v0.14.0
func (o AzurePipeline) IsValid() bool
func (*AzurePipeline) UnmarshalYAML ¶ added in v0.14.0
func (o *AzurePipeline) UnmarshalYAML(node *yaml.Node) error
type AzurePipelineVariable ¶ added in v0.14.0
type AzurePipelineVariables ¶ added in v0.14.0
func (*AzurePipelineVariables) UnmarshalYAML ¶ added in v0.14.0
func (v *AzurePipelineVariables) UnmarshalYAML(value *yaml.Node) error
type AzurePr ¶ added in v0.14.0
type AzurePr struct { Disabled bool `json:"disabled" yaml:"-"` Branches *AzureIncludeExclude `json:"branches"` Paths *AzureIncludeExclude `json:"paths"` Tags *AzureIncludeExclude `json:"tags"` Drafts bool `json:"drafts"` }
https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pr?view=azure-pipelines
func (*AzurePr) UnmarshalYAML ¶ added in v0.14.0
type AzureStage ¶ added in v0.14.0
type AzureStep ¶ added in v0.14.0
type AzureStep struct { Task string `json:"task,omitempty"` Script string `json:"script,omitempty"` Powershell string `json:"powershell,omitempty"` Pwsh string `json:"pwsh,omitempty"` Bash string `json:"bash,omitempty"` Checkout string `json:"checkout,omitempty"` Lines map[string]int `json:"lines" yaml:"-"` }
https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps?view=azure-pipelines
func (*AzureStep) UnmarshalYAML ¶ added in v0.14.0
type BranchInfo ¶ added in v0.17.0
type Config ¶ added in v0.10.0
type Config struct { Skip []ConfigSkip `json:"skip"` AllowedRules []string `json:"allowed_rules"` Include []ConfigInclude `json:"include"` IgnoreForks bool `json:"ignore_forks"` Quiet bool `json:"quiet,omitempty"` RulesConfig map[string]map[string]interface{} `json:"rules_config"` }
func DefaultConfig ¶ added in v0.10.0
func DefaultConfig() *Config
type ConfigInclude ¶ added in v0.10.0
type ConfigInclude struct {
Path StringList `json:"path,omitempty"`
}
type ConfigSkip ¶ added in v0.10.0
type ConfigSkip struct { Purl StringList `json:"purl,omitempty"` Path StringList `json:"path,omitempty"` Rule StringList `json:"rule,omitempty"` OsvId StringList `json:"osv_id,omitempty"` Job StringList `json:"job,omitempty"` Level StringList `json:"level,omitempty"` }
func (*ConfigSkip) HasOnlyRule ¶ added in v0.17.0
func (c *ConfigSkip) HasOnlyRule() bool
type GithubActionsEnv ¶
type GithubActionsEnvs ¶
type GithubActionsEnvs []GithubActionsEnv
func (*GithubActionsEnvs) UnmarshalYAML ¶
func (o *GithubActionsEnvs) UnmarshalYAML(node *yaml.Node) error
type GithubActionsEvent ¶
type GithubActionsEvent struct { Name string `json:"name"` Types StringList `json:"types,omitempty"` Branches StringList `json:"branches,omitempty"` BranchesIgnore StringList `json:"branches_ignore,omitempty"` Paths StringList `json:"paths,omitempty"` PathsIgnore StringList `json:"paths_ignore,omitempty"` Tags StringList `json:"tags,omitempty"` TagsIgnore StringList `json:"tags_ignore,omitempty"` Cron StringList `json:"cron,omitempty"` Inputs GithubActionsInputs `json:"inputs,omitempty"` Outputs GithubActionsOutputs `json:"outputs,omitempty"` Secrets GithubActionsSecrets `json:"secrets,omitempty"` Workflows StringList `json:"workflows,omitempty"` }
type GithubActionsEvents ¶
type GithubActionsEvents []GithubActionsEvent
func (*GithubActionsEvents) UnmarshalYAML ¶
func (o *GithubActionsEvents) UnmarshalYAML(node *yaml.Node) error
type GithubActionsInput ¶
type GithubActionsInputs ¶
type GithubActionsInputs []GithubActionsInput
func (*GithubActionsInputs) UnmarshalYAML ¶
func (o *GithubActionsInputs) UnmarshalYAML(node *yaml.Node) error
type GithubActionsJob ¶
type GithubActionsJob struct { ID string `json:"id"` Name string `json:"name,omitempty"` Uses string `json:"uses,omitempty"` Secrets GithubActionsJobSecrets `json:"secrets,omitempty"` With GithubActionsWith `json:"with,omitempty"` Permissions GithubActionsPermissions `json:"permissions"` Needs StringList `json:"needs,omitempty"` If string `json:"if,omitempty"` RunsOn GithubActionsJobRunsOn `json:"runs_on" yaml:"runs-on"` Container GithubActionsJobContainer `json:"container"` Environment GithubActionsJobEnvironments `json:"environment,omitempty"` Outputs GithubActionsEnvs `json:"outputs,omitempty"` Env GithubActionsEnvs `json:"env,omitempty"` Steps GithubActionsSteps `json:"steps"` ReferencesSecrets []string `json:"references_secrets" yaml:"-"` Strategy GithubActionsStrategy `json:"strategy,omitempty" yaml:"strategy"` Line int `json:"line" yaml:"-"` Lines map[string]int `json:"lines" yaml:"-"` }
type GithubActionsJobContainer ¶
type GithubActionsJobContainer struct {
Image string `json:"image"`
}
func (*GithubActionsJobContainer) UnmarshalYAML ¶
func (o *GithubActionsJobContainer) UnmarshalYAML(node *yaml.Node) error
type GithubActionsJobEnvironments ¶
type GithubActionsJobEnvironments []GithubActionsJobEnvironment
func (*GithubActionsJobEnvironments) UnmarshalYAML ¶ added in v0.10.0
func (o *GithubActionsJobEnvironments) UnmarshalYAML(node *yaml.Node) error
type GithubActionsJobRunsOn ¶
type GithubActionsJobRunsOn StringList
func (*GithubActionsJobRunsOn) UnmarshalYAML ¶
func (o *GithubActionsJobRunsOn) UnmarshalYAML(node *yaml.Node) error
type GithubActionsJobSecret ¶
type GithubActionsJobSecrets ¶
type GithubActionsJobSecrets []GithubActionsJobSecret
func (*GithubActionsJobSecrets) UnmarshalYAML ¶
func (o *GithubActionsJobSecrets) UnmarshalYAML(node *yaml.Node) error
type GithubActionsJobs ¶
type GithubActionsJobs []GithubActionsJob
func (*GithubActionsJobs) UnmarshalYAML ¶
func (o *GithubActionsJobs) UnmarshalYAML(node *yaml.Node) error
type GithubActionsMetadata ¶
type GithubActionsMetadata struct { Path string `json:"path"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Author string `json:"author" yaml:"author"` Inputs GithubActionsInputs `json:"inputs"` Outputs GithubActionsOutputs `json:"outputs"` Runs struct { Using string `json:"using"` Main string `json:"main"` Pre string `json:"pre"` PreIf string `json:"pre-if"` Post string `json:"post"` PostIf string `json:"post-if"` Steps GithubActionsSteps `json:"steps"` Image string `json:"image"` Entrypoint string `json:"entrypoint"` PreEntrypoint string `json:"pre-entrypoint"` PostEntrypoint string `json:"post-entrypoint"` Args []string `json:"args"` } `json:"runs"` }
func (GithubActionsMetadata) IsValid ¶
func (o GithubActionsMetadata) IsValid() bool
type GithubActionsOutput ¶
type GithubActionsOutputs ¶
type GithubActionsOutputs []GithubActionsOutput
func (*GithubActionsOutputs) UnmarshalYAML ¶
func (o *GithubActionsOutputs) UnmarshalYAML(node *yaml.Node) error
type GithubActionsPermission ¶
type GithubActionsPermissions ¶
type GithubActionsPermissions []GithubActionsPermission
func (*GithubActionsPermissions) UnmarshalYAML ¶
func (o *GithubActionsPermissions) UnmarshalYAML(node *yaml.Node) error
type GithubActionsSecrets ¶
type GithubActionsSecrets = GithubActionsInputs
type GithubActionsStep ¶
type GithubActionsStep struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` If string `json:"if,omitempty"` Env GithubActionsEnvs `json:"env,omitempty"` Uses string `json:"uses,omitempty"` Shell string `json:"shell,omitempty"` Run string `json:"run,omitempty" yaml:"run"` WorkingDirectory string `json:"working_directory,omitempty" yaml:"working-directory"` With GithubActionsWith `json:"with,omitempty"` WithRef string `json:"with_ref,omitempty" yaml:"-"` WithScript string `json:"with_script,omitempty" yaml:"-"` Line int `json:"line" yaml:"-"` Action string `json:"action,omitempty" yaml:"-"` Lines map[string]int `json:"lines" yaml:"-"` }
func (*GithubActionsStep) UnmarshalYAML ¶
func (o *GithubActionsStep) UnmarshalYAML(node *yaml.Node) error
type GithubActionsSteps ¶
type GithubActionsSteps []GithubActionsStep
type GithubActionsStrategy ¶ added in v0.18.0
type GithubActionsStrategy struct {
Matrix map[string]StringList `json:"matrix,omitempty" yaml:"matrix"`
}
func (*GithubActionsStrategy) UnmarshalYAML ¶ added in v0.18.0
func (o *GithubActionsStrategy) UnmarshalYAML(node *yaml.Node) error
UnmarshalYAML parses the `strategy` block and extracts `matrix`
type GithubActionsWith ¶
type GithubActionsWith = GithubActionsEnvs
type GithubActionsWorkflow ¶
type GithubActionsWorkflow struct { Path string `json:"path" yaml:"-"` Name string `json:"name"` Events GithubActionsEvents `json:"events" yaml:"on"` Permissions GithubActionsPermissions `json:"permissions"` Env GithubActionsEnvs `json:"env,omitempty"` Jobs GithubActionsJobs `json:"jobs"` }
func (GithubActionsWorkflow) IsValid ¶
func (o GithubActionsWorkflow) IsValid() bool
type GitlabciConfig ¶
type GitlabciConfig struct { Path string `json:"path"` Default GitlabciJob `json:"default"` Stages []string `json:"stages"` Variables GitlabciGlobalVariables `json:"variables"` Include GitlabciIncludeItems `json:"include"` Jobs []GitlabciJob `json:"jobs" yaml:"-"` Spec GitlabciConfigSpec `json:"spec" yaml:"-"` }
func ParseGitlabciConfig ¶
func ParseGitlabciConfig(doc []byte) (*GitlabciConfig, error)
func (*GitlabciConfig) UnmarshalYAML ¶
func (o *GitlabciConfig) UnmarshalYAML(node *yaml.Node) error
type GitlabciConfigInput ¶
type GitlabciConfigInput struct { Name string `json:"name" yaml:"-"` Default string `json:"default"` Description string `json:"description"` Options StringList `json:"options"` Regex string `json:"regex"` }
type GitlabciConfigInputs ¶
type GitlabciConfigInputs []GitlabciConfigInput
func (*GitlabciConfigInputs) UnmarshalYAML ¶
func (o *GitlabciConfigInputs) UnmarshalYAML(node *yaml.Node) error
type GitlabciConfigSpec ¶
type GitlabciConfigSpec struct {
Inputs GitlabciConfigInputs `json:"inputs"`
}
type GitlabciGlobalVariable ¶
type GitlabciGlobalVariables ¶
type GitlabciGlobalVariables []GitlabciGlobalVariable
func (*GitlabciGlobalVariables) UnmarshalYAML ¶
func (o *GitlabciGlobalVariables) UnmarshalYAML(node *yaml.Node) error
type GitlabciImage ¶
type GitlabciImage struct { Name string `json:"name"` Entrypoint []string `json:"entrypoint"` Docker struct { Platform string `json:"platform"` User string `json:"user"` } `json:"docker"` }
func (*GitlabciImage) UnmarshalYAML ¶
func (o *GitlabciImage) UnmarshalYAML(node *yaml.Node) error
type GitlabciIncludeInput ¶
type GitlabciIncludeInputs ¶
type GitlabciIncludeInputs []GitlabciIncludeInput
func (*GitlabciIncludeInputs) UnmarshalYAML ¶
func (o *GitlabciIncludeInputs) UnmarshalYAML(node *yaml.Node) error
type GitlabciIncludeItem ¶
type GitlabciIncludeItem struct { Local string `json:"local,omitempty"` Remote string `json:"remote,omitempty"` Template string `json:"template,omitempty"` Project string `json:"project,omitempty"` File StringList `json:"file,omitempty"` Ref string `json:"ref,omitempty"` Component string `json:"component,omitempty"` Inputs GitlabciIncludeInputs `json:"inputs,omitempty"` }
func (*GitlabciIncludeItem) UnmarshalYAML ¶
func (o *GitlabciIncludeItem) UnmarshalYAML(node *yaml.Node) error
type GitlabciIncludeItems ¶
type GitlabciIncludeItems []GitlabciIncludeItem
func (*GitlabciIncludeItems) UnmarshalYAML ¶
func (o *GitlabciIncludeItems) UnmarshalYAML(node *yaml.Node) error
type GitlabciJob ¶
type GitlabciJob struct { Name string `json:"name" yaml:"-"` Hidden bool `json:"hidden" yaml:"-"` Stage StringList `json:"stage"` Image GitlabciImage `json:"image"` Services []GitlabciService `json:"services"` BeforeScript []GitlabciScript `json:"before_script" yaml:"before_script"` AfterScript []GitlabciScript `json:"after_script" yaml:"after_script"` Script []GitlabciScript `json:"script"` Variables GitlabciJobVariables `json:"variables"` Hooks GitlabciJobHooks `json:"hooks"` Inherit StringList `json:"inherit"` Line int `json:"line" yaml:"-"` }
type GitlabciJobHooks ¶
type GitlabciJobHooks struct {
PreGetSourcesScript StringList `json:"pre_get_sources_script"`
}
type GitlabciJobVariable ¶
type GitlabciJobVariables ¶
type GitlabciJobVariables []GitlabciJobVariable
func (*GitlabciJobVariables) UnmarshalYAML ¶
func (o *GitlabciJobVariables) UnmarshalYAML(node *yaml.Node) error
type GitlabciScript ¶
type GitlabciScript struct { Run GitlabciStringRef `json:"run" yaml:"-"` Line int `json:"line" yaml:"-"` }
func (*GitlabciScript) UnmarshalYAML ¶
func (o *GitlabciScript) UnmarshalYAML(node *yaml.Node) error
type GitlabciService ¶
type GitlabciService struct { Name string `json:"name"` Entrypoint []string `json:"entrypoint"` Docker struct { Platform string `json:"platform"` User string `json:"user"` } `json:"docker"` Command []string `json:"command"` Alias string `json:"alias"` Variables GitlabciJobVariables `json:"variables"` }
type GitlabciStringRef ¶
type GitlabciStringRef string
func (*GitlabciStringRef) UnmarshalYAML ¶
func (o *GitlabciStringRef) UnmarshalYAML(node *yaml.Node) error
type PackageInsights ¶
type PackageInsights struct { Version string `json:"version"` FirstSeenAt string `json:"first_seen_at"` UpdatedAt string `json:"updated_at"` LastCommitedAt string `json:"last_commited_at"` Purl string `json:"purl"` PackageEcosystem string `json:"package_ecosystem"` PackageName string `json:"package_name"` PackageNamespace string `json:"package_namespace"` PackageVersion string `json:"package_version"` SourceScmType string `json:"source_scm_type"` SourceGitRepo string `json:"source_git_repo"` SourceGitRepoPath string `json:"source_git_repo_path"` SourceGitRef string `json:"source_git_ref"` SourceGitCommitSha string `json:"source_git_commit_sha"` OrgID int `json:"org_id"` RepoID int `json:"repo_id"` RepoSize int `json:"repo_size"` DefaultBranch string `json:"default_branch"` IsFork bool `json:"is_fork"` IsEmpty bool `json:"is_empty"` ForksCount int `json:"forks_count"` StarsCount int `json:"stars_count"` IsTemplate bool `json:"is_template"` HasIssues bool `json:"has_issues"` OpenIssuesCount int `json:"open_issues_count"` HasWiki bool `json:"has_wiki"` HasDiscussions bool `json:"has_discussions"` PrimaryLanguage string `json:"primary_language"` License string `json:"license"` PackageDependencies []string `json:"package_dependencies"` BuildDependencies []string `json:"build_dependencies"` GithubActionsWorkflows []GithubActionsWorkflow `json:"github_actions_workflows"` GithubActionsMetadata []GithubActionsMetadata `json:"github_actions_metadata"` GitlabciConfigs []GitlabciConfig `json:"gitlabci_configs"` AzurePipelines []AzurePipeline `json:"azure_pipelines"` PipelineAsCodeTekton []PipelineAsCodeTekton `json:"pipeline_as_code_tekton"` FindingsResults results.FindingsResult `json:"-"` }
func (*PackageInsights) GetSourceGitRepoURI ¶
func (p *PackageInsights) GetSourceGitRepoURI() string
func (*PackageInsights) NormalizePurl ¶
func (p *PackageInsights) NormalizePurl() error
type PipelineAsCodeTekton ¶ added in v0.15.0
type PipelineAsCodeTekton struct { ApiVersion string `json:"api_version" yaml:"apiVersion"` Kind string `json:"kind"` Metadata struct { Name string `json:"name"` Annotations map[string]string `json:"annotations"` } `json:"metadata"` Spec PipelineRunSpec `json:"spec,omitempty" yaml:"spec"` Path string `json:"path" yaml:"-"` }
type PipelineRunSpec ¶ added in v0.15.0
type PipelineRunSpec struct {
PipelineSpec *PipelineSpec `json:"pipeline_spec,omitempty" yaml:"pipelineSpec"`
}
type PipelineSpec ¶ added in v0.15.0
type PipelineSpec struct {
Tasks []PipelineTask `json:"tasks,omitempty" yaml:"tasks"`
}
type PipelineTask ¶ added in v0.15.0
type Purl ¶
type Purl struct {
packageurl.PackageURL
}
func PurlFromDockerImage ¶
func PurlFromGithubActions ¶
type RepoInfo ¶ added in v0.18.0
type RepoInfo struct { Purl string `json:"purl"` RepoName string `json:"repo_name"` BranchInfos []BranchInfo `json:"branch_infos"` }
type Step ¶ added in v0.15.0
type Step struct { Name string `json:"name"` Script string `json:"script,omitempty"` Lines map[string]int `json:"lines" yaml:"-"` }
func (*Step) UnmarshalYAML ¶ added in v0.15.0
type StringList ¶
type StringList []string
func (*StringList) UnmarshalYAML ¶
func (o *StringList) UnmarshalYAML(node *yaml.Node) error
Click to show internal directories.
Click to hide internal directories.