Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigFileAutoDetection(basePath string) (*models.Configuration, error)
- func ScanImageFile(imagePath, imageID, tempDir, extraFlags string) (*trivymodels.TrivyResults, error)
- type CIScan
- func (ci *CIScan) Close()
- func (ci *CIScan) CopyYaml() error
- func (ci *CIScan) GetPlutoReport() (*models.ReportInfo, error)
- func (ci *CIScan) GetPolarisReport() (*models.ReportInfo, error)
- func (ci *CIScan) GetTrivyReport(dockerImages []trivymodels.DockerImage, manifestImages []trivymodels.Image) (report *models.ReportInfo, errs error)
- func (ci *CIScan) GetWorkloadReport(resources []models.Resource) (*models.ReportInfo, error)
- func (ci *CIScan) JUnitEnabled() bool
- func (ci *CIScan) OPAEnabled() bool
- func (ci *CIScan) PlutoEnabled() bool
- func (ci *CIScan) PolarisEnabled() bool
- func (ci *CIScan) ProcessHelmTemplates() error
- func (ci CIScan) ProcessOPA(ctx context.Context) (*models.ReportInfo, error)
- func (ci *CIScan) ProcessRepository() ([]*models.ReportInfo, error)
- func (ci *CIScan) ProcessTerraformPath(terraformPath string) ([]models.TFSecResult, error)
- func (ci *CIScan) ProcessTerraformPaths() (report *models.ReportInfo, errs error)
- func (ci *CIScan) SaveJUnitFile(results models.ScanResults) error
- func (ci *CIScan) SendAndPrintResults(reports []*models.ReportInfo) error
- func (ci *CIScan) SkipTrivyManifests() bool
- func (ci *CIScan) TerraformEnabled() bool
- func (ci *CIScan) TrivyEnabled() bool
- type ImageDownloaderFunc
- type KubernetesManifest
Constants ¶
View Source
const DefaultCustomCheckRuleID = "tfsec_custom_check"
Variables ¶
View Source
var ErrExitCode = errors.New("ExitCode is set")
Functions ¶
func ConfigFileAutoDetection ¶
func ConfigFileAutoDetection(basePath string) (*models.Configuration, error)
ConfigFileAutoDetection reads recursively a path looking for kubernetes manifests and helm charts, returns a fairwinds-insights configuration struct or error
func ScanImageFile ¶
func ScanImageFile(imagePath, imageID, tempDir, extraFlags string) (*trivymodels.TrivyResults, error)
ScanImageFile will scan a single file with Trivy and return the results.
Types ¶
type CIScan ¶
type CIScan struct {
// contains filtered or unexported fields
}
func (*CIScan) GetPlutoReport ¶
func (ci *CIScan) GetPlutoReport() (*models.ReportInfo, error)
func (*CIScan) GetPolarisReport ¶
func (ci *CIScan) GetPolarisReport() (*models.ReportInfo, error)
func (*CIScan) GetTrivyReport ¶
func (ci *CIScan) GetTrivyReport(dockerImages []trivymodels.DockerImage, manifestImages []trivymodels.Image) (report *models.ReportInfo, errs error)
func (*CIScan) GetWorkloadReport ¶
func (*CIScan) JUnitEnabled ¶
func (*CIScan) OPAEnabled ¶
func (*CIScan) PlutoEnabled ¶
func (*CIScan) PolarisEnabled ¶
func (*CIScan) ProcessHelmTemplates ¶
ProcessHelmTemplates turns helm into yaml to be processed by Polaris or the other tools.
func (CIScan) ProcessOPA ¶
ProcessOPA runs all checks against the provided Custom Check
func (*CIScan) ProcessRepository ¶
func (ci *CIScan) ProcessRepository() ([]*models.ReportInfo, error)
func (*CIScan) ProcessTerraformPath ¶
func (ci *CIScan) ProcessTerraformPath(terraformPath string) ([]models.TFSecResult, error)
func (*CIScan) ProcessTerraformPaths ¶
func (ci *CIScan) ProcessTerraformPaths() (report *models.ReportInfo, errs error)
func (*CIScan) SaveJUnitFile ¶
func (ci *CIScan) SaveJUnitFile(results models.ScanResults) error
SaveJUnitFile will save the
func (*CIScan) SendAndPrintResults ¶
func (ci *CIScan) SendAndPrintResults(reports []*models.ReportInfo) error
func (*CIScan) SkipTrivyManifests ¶
func (*CIScan) TerraformEnabled ¶
func (*CIScan) TrivyEnabled ¶
type ImageDownloaderFunc ¶
type ImageDownloaderFunc = func(cmdExecutor cmdExecutor, folderPath, imageName string, rc *models.RegistryCredential) (string, error)
ImageDownloaderFunc - downloads an image and returns the output and error
type KubernetesManifest ¶
Click to show internal directories.
Click to hide internal directories.