Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConfigFileNameBase = "code-security.datadog" LegacyConfigFileName = "dd-iac-scan.config" )
Variables ¶
This section is empty.
Functions ¶
func UnparseConfig ¶ added in v1.1.1
UnparseConfig turns a parsed configuration into a YAML file. It ignores the LegacyExcludeResults field, since it's not representable in YAML. You will need to handle it externally if you need to.
Types ¶
type IacConfig ¶
type IacConfig struct {
IgnoreRules []string
OnlyRules []string
IgnorePaths []string
OnlyPaths []string
IgnoreSeverities []string
OnlySeverities []string
IgnoreCategories []string
OnlyCategories []string
LegacyExcludeResults []string
}
func ParseConfig ¶
ParseConfig turns a YAML configuration file into a parsed configuration
func ReadConfiguration ¶
func ReadConfiguration(ctx context.Context, rootPath string, options ...ReadConfigurationOption) (*IacConfig, []byte, error)
ReadConfiguration reads and parses the configuration file in the local repository. It returns the parsed configuration and the YAML file (or a YAML conversion, in the case of legacy configurations).
type ReadConfigurationOption ¶ added in v1.1.1
func WithDatadog ¶ added in v1.1.1
func WithDatadog(client datadog.Client, repoUrl string) ReadConfigurationOption
WithDatadog calls the Datadog backend to append server-side customizations to the local repo config
Click to show internal directories.
Click to hide internal directories.