docker

package
v0.0.0-...-bfeba61 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: GPL-3.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUrls

func GetUrls(content string) []string

func RemoveDuplicates

func RemoveDuplicates(issues *[]SecretIssue)

RemoveDuplicates modifies the slice directly by removing duplicates.

Types

type Assets

type Assets struct {
	Domains []SubAndDom `json:"assets"`
	Urls    []string    `json:"urls"`
}

func (*Assets) AddDomainsAndUrls

func (a *Assets) AddDomainsAndUrls(content string)

AddDomainsAndUrls appends new domains and URLs to assets

func (*Assets) MakeUniqueDomains

func (a *Assets) MakeUniqueDomains()

MakeUniqueDomains removes duplicate domains and subdomains

func (*Assets) MakeUniqueUrls

func (a *Assets) MakeUniqueUrls()

MakeUniqueUrls removes duplicate URLs

type DBData

type DBData struct {
	Issue      string `json:"issue"`    // Issue description
	Severity   string `json:"severity"` // Severity of the issue
	Validators struct {
		Status []int    `json:"status"` // Status codes for validation
		Regex  []string `json:"regex"`  // List of regex patterns for validation
	} `json:"validators"`
	Extractors []struct {
		Regex   string `json:"regex"`   // Regex for extraction
		Cgroups string `json:"cgroups"` // Cgroups associated with the extractor
	} `json:"extractors"`
}

DBData represents data structure for database information

type FetchTagNameResponse

type FetchTagNameResponse struct {
	ImageName string `json:"tag"` // Image name tag
}

FetchTagNameResponse represents the response from fetching a tag name

type FinalOutput

type FinalOutput struct {
	Target        string           `json:"target"`          // Target scanned
	Secrets       []SecretIssue    `json:"secrets"`         // Found secrets
	Vulnerability []deps.VulnIssue `json:"vulnerabilities"` // Found vulnerabilities
	Assets        Assets           `json:"assets"`
}

FinalOutput represents the final results of the scan

func ProcessImage

func ProcessImage(imageName string, scanMap map[string]bool, regexDB []config.RegexDB, excludedPatterns config.ExcludedPatterns, whitelistedPatterns config.WhitelistedPatterns, allTagsScan bool) ([]FinalOutput, error)

ProcessImage scans a Docker image for vulnerabilities.

type SecretIssue

type SecretIssue struct {
	Issue  string `json:"issue"`  // Description of the issue
	Path   string `json:"asset"`  // Path where the issue was found
	Type   string `json:"type"`   // Type of the secret
	Secret string `json:"secret"` // The secret itself
}

SecretIssue represents an identified secret issue

type SecretScanTask

type SecretScanTask struct {
	Path      string
	Content   *[]byte
	ID        interface{}
	ImageName string
}

SecretScanTask represents a task for scanning secrets

type SubAndDom

type SubAndDom struct {
	Subdomains []string `json:"subdomains"`
	Domain     string   `json:"domain"`
}

func GetSubdomainsAndDomains

func GetSubdomainsAndDomains(content string) []SubAndDom

Jump to

Keyboard shortcuts

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