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
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 (dcp *DockerComposeParser) ParseDockerComposeYML() (*types.Project, error)
Brief: Parses a docker Compose YAML * Returns: Pointer to Project on success, nil on failure
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 ¶
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.