dockercompose

package
v0.0.0-...-7b35edf Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerComposeAnalyzer

type DockerComposeAnalyzer struct {
	DockerComposeFilePath string
	// contains filtered or unexported fields
}

DockerComposeAnalyzer analyzes Docker Compose files

func NewDockerComposeAnalyzer

func NewDockerComposeAnalyzer(dockerComposeFilePath string, logger *slog.Logger) *DockerComposeAnalyzer

NewDockerComposeAnalyzer creates a new instance of DockerComposeAnalyzer for the given compose file and logger

func (*DockerComposeAnalyzer) Analyze

func (a *DockerComposeAnalyzer) Analyze(proj *types.Project, imageMap DockerImageMap) (*common.ThreatModel, error)

Analyze analyzes the given Docker Compose project and returns a list of assets

type DockerComposeParser

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

DockerComposeAnalyzer analyzes Docker Compose files

func NewDockerComposeParser

func NewDockerComposeParser(filePath string, logger *slog.Logger) *DockerComposeParser

NewDockerComposeParser creates a new instance of DockerComposeParser

func (*DockerComposeParser) ParseDockerComposeYML

func (p *DockerComposeParser) ParseDockerComposeYML() (*types.Project, error)

Brief: Parses a docker Compose YAML * Returns: Pointer to Project on success, nil on failure

type DockerComposeThreatInvestigator

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

DockerComposeThreatInvestigator investigates threats in Docker Compose services

func NewDockerComposeThreatInvestigator

func NewDockerComposeThreatInvestigator(logger *slog.Logger) *DockerComposeThreatInvestigator

NewDockerComposeThreatInvestigator creates a new instance of DockerComposeThreatInvestigator

func (*DockerComposeThreatInvestigator) InvestigateForThreats

func (ti *DockerComposeThreatInvestigator) InvestigateForThreats(service types.ServiceConfig) []common.Threat

InvestigateForThreats investigates the given service for potential threats and returns a list of threats the returned list of threats is empty if no threats were found

type DockerImageConfig

type DockerImageConfig struct {
	Applications   []string `yaml:"applications"`
	Databases      []string `yaml:"databases"`
	Webservers     []string `yaml:"webservers"`
	Infrastructure []string `yaml:"infrastructure"`
}

DockerImageConfig represents the structure of the Docker image configuration file It contains lists of images categorized by their asset types

type DockerImageMap

type DockerImageMap map[string]common.AssetType

func NewDockerImageMap

func NewDockerImageMap(configPath string) (DockerImageMap, error)

NewDockerImageMap creates a new DockerImageMap instance. It initializes the DockerImageMap with a predefined set of images. If a configPath is provided, it reads the Docker image map configuration from the specified YAML file and merges it with the internal image map.

Jump to

Keyboard shortcuts

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