config

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DefaultValues       DefaultValues              `json:"defaultValues"`
	Mappings            []Mappings                 `json:"mappings"`
	DescriptionExtras   []string                   `json:"addToDescription"`
	DescriptionTemplate string                     `json:"descriptionTemplate"`
	SyncMappings        []JiraToDraconVulnMappings `json:"syncMappings"`
}

Config contains all the data parsed from the conf.yaml file.

func New

func New(r io.Reader) (Config, error)

New reads the configuration from the file/Reader and parses it into a Config object.

type CustomField

type CustomField struct {
	ID        string   `json:"id"`
	FieldType string   `json:"fieldType"`
	Values    []string `json:"values"`
}

CustomField represents a Jira Custom Field.

type DefaultValues

type DefaultValues struct {
	Project         string        `json:"project"`
	Environment     string        `json:"environment"`
	IssueType       string        `json:"issueType"`
	Components      []string      `json:"components"`
	AffectsVersions []string      `json:"affectsVersions"`
	Labels          []string      `json:"labels,omitempty"`
	CustomFields    []CustomField `json:"customFields,omitempty"`
}

DefaultValues represents the Values that exist by default in all jira tickets we had access to.

type JiraToDraconVulnMappings

type JiraToDraconVulnMappings struct {
	JiraStatus     string `json:"jiraStatus"`
	JiraResolution string `json:"jiraResolution"`
	DraconStatus   string `json:"draconStatus"`
}

JiraToDraconVulnMappings used by the sync utiity, this Mapping matches DraconStatus-es to combinations of JiraStatus and JiraResolution, look in the sample config file for examples supported DraconStatus values: * FalsePositive <-- will set the issue's FalsePositive flag to True * Duplicate <-- if the issue already exists in the database, will do nothing, otherwise will insert a new one * Resolved <-- will _REMOVE_ the finding from the database JiraStatus will be matched as a string JiraResolution will be matched as a string.

type Mappings

type Mappings struct {
	DraconField string `json:"draconField"`
	JiraField   string `json:"jiraField"`
	FieldType   string `json:"fieldType"`
}

Mappings holds a mapping between a dracon api field and it's corresponding jira field.

Jump to

Keyboard shortcuts

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