context

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepositoryAnalyzer

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

RepositoryAnalyzer analyzes repository context for security rules

func NewRepositoryAnalyzer

func NewRepositoryAnalyzer(repoPath string) *RepositoryAnalyzer

NewRepositoryAnalyzer creates a new repository analyzer

func (*RepositoryAnalyzer) AnalyzeRepository

func (ra *RepositoryAnalyzer) AnalyzeRepository() (*RepositoryContext, error)

AnalyzeRepository analyzes repository context

type RepositoryContext

type RepositoryContext struct {
	IsPublic          bool
	IsPrivate         bool
	IsFork            bool
	HasSecurityPolicy bool
	HasDependabot     bool
	HasCodeScanning   bool
	DefaultBranch     string
	RepositoryPath    string
	Owner             string
	Name              string
}

RepositoryContext provides context about the repository being analyzed

type WorkflowContext

type WorkflowContext struct {
	Repository           *RepositoryContext
	WorkflowFile         parser.WorkflowFile
	HasSecrets           bool
	HasPrivileges        bool
	IsTriggeredByPR      bool
	IsTriggeredByIssue   bool
	UsesSelHostedRunners bool
	RunnerLabels         []string
}

WorkflowContext provides context about a specific workflow

func AnalyzeWorkflowContext

func AnalyzeWorkflowContext(workflow parser.WorkflowFile, repoCtx *RepositoryContext) *WorkflowContext

AnalyzeWorkflowContext analyzes workflow-specific context

Jump to

Keyboard shortcuts

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