Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CVSS ¶
CVSS is type of CVSS
Example ¶
m := New() if err := m.ImportBaseVector("CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"); err != nil { fmt.Fprintln(os.Stderr, err) return } severity := m.Base.GetSeverity() fmt.Printf("%s: %v (%.1f)\n\n", severity.Title(language.English), severity, m.Base.Score()) if r, err := m.Base.Report(nil, language.English); err != nil { //output with CSV format fmt.Fprintln(os.Stderr, err) } else { _, _ = io.Copy(os.Stdout, r) }
Output: Severity: Critical (9.9) Base Metrics,Metric Value Attack Vector,Network Attack Complexity,Low Privileges Required,Low User Interaction,None Scope,Changed Confidentiality Impact,High Integrity Impact,High Availability Impact,High
func (*CVSS) ImportBaseVector ¶
ImportBaseVector imports CVSSv3.0 base metrics vector
Click to show internal directories.
Click to hide internal directories.