excel

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VulnReport = "漏洞扫描结果"
)

Variables

View Source
var (
	ResultClass = map[types.ResultClass]string{
		types.ClassOSPkg:   "系统层",
		types.ClassLangPkg: "应用层",
	}
	ResultType = map[ftypes.TargetType]string{
		ftypes.GoBinary: "Go Binary",
	}

	SeverityColor = map[string]string{
		"超危": "FF7675",
		"高危": "FAB1A0",
		"中危": "FFEAA7",
		"低危": "74B9FF",
		"未知": "DFE6E9",
	}

	VulnStatuses = map[string]string{
		"not_affected":        "该软件包在此平台上不受该漏洞的影响",
		"affected":            "该软件包在此平台上受该漏洞的影响,但是暂未发布补丁",
		"fixed":               "该软件包已发布修复补丁",
		"under_investigation": "目前暂未知晓该软件包在此平台上是否受该漏洞的影响,并且正在调查中",
		"will_not_fix":        "该软件包在此平台上受该漏洞的影响,但是目前没有修复它的打算(这主要是针对影响较低或中等、对客户不构成重大风险的漏洞)。",
		"fix_deferred":        "该软件包在此平台上受该漏洞的影响, 并且在未来可能会修复",
		"end_of_life":         "该软件包已被识别包含受影响的组件,但未进行确定其是否受此漏洞影响的分析。",
	}
	VulnHeaderValues = []string{
		"扫描对象", "扫描类型", "软件包类别", "漏洞编号", "漏洞名称",
		"威胁等级来源", "威胁等级", "软件包名称", "软件包版本", "软件包路径",
		"修复版本", "漏洞状态", "公布时间", "上次修改时间",
	}
	VulnHeaderWidths = map[string]float64{
		"A": 10, "B": 10, "C": 25, "D": 21, "E": 50,
		"F": 12, "G": 10, "H": 12, "I": 20, "J": 50,
		"K": 20, "L": 42, "M": 25, "N": 25,
	}
	DefaultStyle = excelize.Style{
		Alignment: &excelize.Alignment{WrapText: true, Vertical: "top"},
		Border: []excelize.Border{
			{Type: "left", Style: 1, Color: "000000"},
			{Type: "top", Style: 1, Color: "000000"},
			{Type: "right", Style: 1, Color: "000000"},
			{Type: "bottom", Style: 1, Color: "000000"},
		},
	}
)

Functions

func Export

func Export(report *types.Report, fileName string, beautify bool) (err error)

Export export excel file

Types

This section is empty.

Jump to

Keyboard shortcuts

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