registry

package
v0.0.0-...-48c0a4e Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes struct {
	Criticality *[]string `json:"criticality,omitempty"`
	Environment *[]string `json:"environment,omitempty"`
	Lifecycle   *[]string `json:"lifecycle,omitempty"`
}

type Client

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

func NewClient

func NewClient(config ClientConfig) *Client

func (*Client) ReadIACOrgSettings

func (c *Client) ReadIACOrgSettings(ctx context.Context, request ReadIACOrgSettingsRequest) (_ *ReadIACOrgSettingsResponse, e error)

func (*Client) ShareResults

func (c *Client) ShareResults(req ShareResultsRequest) (ShareResultsResponse, error)

type ClientConfig

type ClientConfig struct {
	HTTPClient HTTPClient
	URL        string
}

type CustomPolicy

type CustomPolicy struct {
	Severity string `json:"severity"`
}

type Data

type Data struct {
	Metadata      RuleMetadata  `json:"metadata"`
	IssueMetadata IssueMetadata `json:"issueMetadata"`
}

type Entitlements

type Entitlements struct {
	IacCustomRulesEntitlement bool `json:"iacCustomRulesEntitlement"`
	IacDrift                  bool `json:"iacDrift"`
	InfrastructureAsCode      bool `json:"infrastructureAsCode"`
}

type Error

type Error struct {
	Code       int    `json:"code,omitempty"`
	Failure    string `json:"error,omitempty"`
	Message    string `json:"message,omitempty"`
	StatusCode int
}

func (*Error) Error

func (err *Error) Error() string

type Finding

type Finding struct {
	Data Data   `json:"data"`
	Type string `json:"type"`
}

type HTTPClient

type HTTPClient interface {
	Do(r *http.Request) (*http.Response, error)
}

type Identity

type Identity struct {
	Type       string `json:"type"`
	TargetFile string `json:"targetFile"`
}

type IgnoreSettings

type IgnoreSettings struct {
	AdminOnly                  bool `json:"adminOnly"`
	DisregardFilesystemIgnores bool `json:"disregardFilesystemIgnores"`
	ReasonRequired             bool `json:"reasonRequired"`
}

type IssueMetadata

type IssueMetadata struct {
	Type         string       `json:"type,omitempty"`
	File         string       `json:"file"`
	ResourcePath string       `json:"resourcePath"`
	ResourceInfo ResourceInfo `json:"resourceInfo,omitempty"`
	LineNumber   int          `json:"lineNumber"`
}

type Meta

type Meta struct {
	IgnoreSettings    IgnoreSettings `json:"ignoreSettings"`
	IsLicensesEnabled bool           `json:"isLicensesEnabled"`
	IsPrivate         bool           `json:"isPrivate"`
	Org               string         `json:"org"`
	OrgPublicId       string         `json:"orgPublicId"`
}

type ProjectId

type ProjectId string

type ReadIACOrgSettingsRequest

type ReadIACOrgSettingsRequest struct {
	Org string
}

type ReadIACOrgSettingsResponse

type ReadIACOrgSettingsResponse struct {
	CustomPolicies map[string]CustomPolicy `json:"customPolicies"`
	Entitlements   map[string]bool         `json:"entitlements"`
	Meta           Meta                    `json:"meta"`
}

type Remediation

type Remediation struct {
	Cloudformation string `json:"cloudformation,omitempty"`
	Terraform      string `json:"terraform,omitempty"`
	Arm            string `json:"arm,omitempty"`
	Kubernetes     string `json:"kubernetes,omitempty"`
}

type ResourceInfo

type ResourceInfo struct {
	Type string            `json:"type,omitempty"`
	Tags map[string]string `json:"tags,omitempty"`
}

type RuleMetadata

type RuleMetadata struct {
	PublicID                string       `json:"publicId"`
	Title                   string       `json:"title"`
	Documentation           string       `json:"documentation,omitempty"`
	IsGeneratedByCustomRule bool         `json:"isGeneratedByCustomRule,omitempty"`
	Description             string       `json:"description,omitempty"`
	Severity                Severity     `json:"severity"`
	Issue                   string       `json:"issue"`
	Impact                  string       `json:"impact"`
	Resolve                 string       `json:"resolve"`
	References              []string     `json:"references"`
	Remediation             *Remediation `json:"remediation,omitempty"`
	Compliance              [][]string   `json:"compliance,omitempty"`
}

type ScanResult

type ScanResult struct {
	Identity        Identity   `json:"identity"`
	Facts           []struct{} `json:"facts"`
	Name            string     `json:"name"`
	Policy          string     `json:"policy"`
	Findings        []Finding  `json:"findings"`
	Target          Target     `json:"target"`
	TargetReference string     `json:"targetReference,omitempty"`
}

type Severity

type Severity string

type ShareResultsRequest

type ShareResultsRequest struct {
	ScanResults  []ScanResult      `json:"scanResults"`
	Contributors []git.Contributor `json:"contributors,omitempty"`
	Tags         *[]Tag            `json:"tags,omitempty"`
	Attributes   *Attributes       `json:"attributes,omitempty"`
	Policy       string            `json:"policy,omitempty"`
	Org          string            `json:"-"`
}

type ShareResultsResponse

type ShareResultsResponse map[string]string

type Tag

type Tag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Target

type Target struct {
	RemoteUrl string `json:"remoteUrl,omitempty"`
	Branch    string `json:"branch,omitempty"`
	Name      string `json:"name,omitempty"`
}

type TargetFile

type TargetFile string

Jump to

Keyboard shortcuts

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