config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

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

func UnparseConfig(cfg *IacConfig) ([]byte, error)

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

func ParseConfig(cfgBytes []byte) (*IacConfig, error)

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

type ReadConfigurationOption func(context.Context, []byte) ([]byte, error)

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

Jump to

Keyboard shortcuts

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