report

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model added in v0.2.0

type Model struct {
	Grade                            string
	Chart                            string                                       `yaml:"-" json:"-"`
	CriticalCount                    int                                          `json:"criticalCount" yaml:"criticalCount"`
	HighCount                        int                                          `json:"highCount" yaml:"highCount"`
	MediumCount                      int                                          `json:"mediumCount" yaml:"mediumCount"`
	LowCount                         int                                          `json:"lowCount" yaml:"lowCount"`
	InformationalCount               int                                          `json:"informationalCount" yaml:"informationalCount"`
	ProductionConfidentialFilesCount int                                          `json:"productionConfidentialFilesCount" yaml:"productionConfidentialFilesCount"`
	FileCount                        int                                          `json:"fileCount" yaml:"fileCount"`
	SkippedCount                     int                                          `json:"skippedCount" yaml:"skippedCount"`
	IssuesPerType                    int                                          `json:"issuesPerType" yaml:"issuesPerType"`
	AveragePerFile                   float32                                      `json:"averagePerFile" yaml:"averagePerFile"`
	Issues                           []*diagnostics.SecurityDiagnostic            `yaml:"-" json:"-"`
	TimeStamp                        string                                       `json:"timeStamp" yaml:"timeStamp"`
	ShowSource                       bool                                         `json:"showSource" yaml:"showSource"`
	ReusedSecretsCount               int                                          `json:"reusedSecretsCount" yaml:"reusedSecretsCount"`
	NumberOfSecretsReuse             int                                          `json:"numberOfSecretsReuse" yaml:"numberOfSecretsReuse"`
	ReusedSecrets                    map[string][]*diagnostics.SecurityDiagnostic `yaml:"-" json:"-"`
	ProdAndNonProdSecretReuse        []ReusedSecret                               `json:"prodAndNonProdSecretReuse" yaml:"prodAndNonProdSecretReuse"`
	CriticalProdUsedInNonProdCount   int                                          `yaml:"criticalProdUsedInNonProdCount" json:"criticalProdUsedInNonProdCount"`
	HighProdUsedInNonProdCount       int                                          `yaml:"highProdUsedInNonProdCount" json:"highProdUsedInNonProdCount"`
	MediumProdUsedInNonProdCount     int                                          `yaml:"mediumProdUsedInNonProdCount" json:"mediumProdUsedInNonProdCount"`
	LowProdUsedInNonProdCount        int                                          `yaml:"lowProdUsedInNonProdCount" json:"lowProdUsedInNonProdCount"`
	InfoProdUsedInNonProdCount       int                                          `yaml:"infoProdUsedInNonProdCount" json:"infoProdUsedInNonProdCount"`
	CriticalSensitiveFileCount       int                                          `yaml:"criticalSensitiveFileCount" json:"criticalSensitiveFileCount"`
	HighSensitiveFileCount           int                                          `yaml:"highSensitiveFileCount" json:"highSensitiveFileCount"`
	MediumSensitiveFileCount         int                                          `yaml:"mediumSensitiveFileCount" json:"mediumSensitiveFileCount"`
	LowSensitiveFileCount            int                                          `yaml:"lowSensitiveFileCount" json:"lowSensitiveFileCount"`
	InfoSensitiveFileCount           int                                          `yaml:"infoSensitiveFileCount" json:"infoSensitiveFileCount"`
	NonProdSensitiveFileCount        int                                          `yaml:"nonProdSensitiveFileCount" json:"nonProdSensitiveFileCount"`
	SecretReuseCountBuckets          []int                                        `yaml:"secretReuseCountBuckets" json:"secretReuseCountBuckets"`
}

Model models the generated report

func GenerateModel added in v0.4.0

func GenerateModel(fileCount int, showSource bool, issues []*diagnostics.SecurityDiagnostic) *Model

func (*Model) Summarise added in v0.3.2

func (m *Model) Summarise() *projects.ScanSummary

Summarise converts model to a ScanSummary, attaching the model to AdditionalInfo

type ModelCounts added in v0.4.0

type ModelCounts struct {
	CriticalCount                    int     `json:"criticalCount" yaml:"criticalCount"`
	HighCount                        int     `json:"highCount" yaml:"highCount"`
	MediumCount                      int     `json:"mediumCount" yaml:"mediumCount"`
	LowCount                         int     `json:"lowCount" yaml:"lowCount"`
	InformationalCount               int     `json:"informationalCount" yaml:"informationalCount"`
	ProductionConfidentialFilesCount int     `json:"productionConfidentialFilesCount" yaml:"productionConfidentialFilesCount"`
	FileCount                        int     `json:"fileCount" yaml:"fileCount"`
	SkippedCount                     int     `json:"skippedCount" yaml:"skippedCount"`
	IssuesPerType                    int     `json:"issuesPerType" yaml:"issuesPerType"`
	AveragePerFile                   float32 `json:"averagePerFile" yaml:"averagePerFile"`
	ReusedSecretsCount               int     `json:"reusedSecretsCount" yaml:"reusedSecretsCount"`
	NumberOfSecretsReuse             int     `json:"numberOfSecretsReuse" yaml:"numberOfSecretsReuse"`
	CriticalProdUsedInNonProdCount   int     `yaml:"criticalProdUsedInNonProdCount" json:"criticalProdUsedInNonProdCount"`
	HighProdUsedInNonProdCount       int     `yaml:"highProdUsedInNonProdCount" json:"highProdUsedInNonProdCount"`
	MediumProdUsedInNonProdCount     int     `yaml:"mediumProdUsedInNonProdCount" json:"mediumProdUsedInNonProdCount"`
	LowProdUsedInNonProdCount        int     `yaml:"lowProdUsedInNonProdCount" json:"lowProdUsedInNonProdCount"`
	InfoProdUsedInNonProdCount       int     `yaml:"infoProdUsedInNonProdCount" json:"infoProdUsedInNonProdCount"`
	CriticalSensitiveFileCount       int     `yaml:"criticalSensitiveFileCount" json:"criticalSensitiveFileCount"`
	HighSensitiveFileCount           int     `yaml:"highSensitiveFileCount" json:"highSensitiveFileCount"`
	MediumSensitiveFileCount         int     `yaml:"mediumSensitiveFileCount" json:"mediumSensitiveFileCount"`
	LowSensitiveFileCount            int     `yaml:"lowSensitiveFileCount" json:"lowSensitiveFileCount"`
	InfoSensitiveFileCount           int     `yaml:"infoSensitiveFileCount" json:"infoSensitiveFileCount"`
	NonProdSensitiveFileCount        int     `yaml:"nonProdSensitiveFileCount" json:"nonProdSensitiveFileCount"`
	SecretReuseCountBuckets          []int   `yaml:"secretReuseCountBuckets" json:"secretReuseCountBuckets"`
}

type ReusedSecret added in v0.4.0

type ReusedSecret struct {
	Secret                 string
	ProductionLocations    []SecretLocation `json:"productionLocations"`
	NonProductionLocations []SecretLocation `json:"nonProductionLocations"`
}

type SecretLocation added in v0.4.0

type SecretLocation struct {
	Location       string
	HighlightRange code.Range `json:"highLightRange"`
}

Jump to

Keyboard shortcuts

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