model

package
v3.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 3 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Classification

type Classification struct {
	// description: |
	//   CVE ID for the template
	// examples:
	//   - value: "\"CVE-2020-14420\""
	CVEID stringslice.StringSlice `` /* 151-byte string literal not displayed */
	// description: |
	//   CWE ID for the template.
	// examples:
	//   - value: "\"CWE-22\""
	CWEID stringslice.StringSlice `` /* 143-byte string literal not displayed */
	// description: |
	//   CVSS Metrics for the template.
	// examples:
	//   - value: "\"3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\""
	CVSSMetrics string `` /* 198-byte string literal not displayed */
	// description: |
	//   CVSS Score for the template.
	// examples:
	//   - value: "\"9.8\""
	CVSSScore float64 `` /* 154-byte string literal not displayed */
	// description: |
	//   EPSS Score for the template.
	// examples:
	//   - value: "\"0.42509\""
	EPSSScore float64 `` /* 158-byte string literal not displayed */
	// description: |
	//   EPSS Percentile for the template.
	// examples:
	//   - value: "\"0.42509\""
	EPSSPercentile float64 `` /* 178-byte string literal not displayed */
	// description: |
	//   CPE for the template.
	// examples:
	//   - value: "\"cpe:/a:vendor:product:version\""
	CPE string `` /* 152-byte string literal not displayed */
}

Classification contains the vulnerability classification data for a template.

type Info

type Info struct {
	// description: |
	//   Name should be good short summary that identifies what the template does.
	//
	// examples:
	//   - value: "\"bower.json file disclosure\""
	//   - value: "\"Nagios Default Credentials Check\""
	Name string `` /* 207-byte string literal not displayed */
	// description: |
	//   Author of the template.
	//
	//   Multiple values can also be specified separated by commas.
	// examples:
	//   - value: "\"<username>\""
	Authors stringslice.StringSlice `` /* 164-byte string literal not displayed */
	// description: |
	//   Any tags for the template.
	//
	//   Multiple values can also be specified separated by commas.
	//
	// examples:
	//   - name: Example tags
	//     value: "\"cve,cve2019,grafana,auth-bypass,dos\""
	Tags stringslice.StringSlice `json:"tags,omitempty" yaml:"tags,omitempty" jsonschema:"title=tags of the template,description=Any tags for the template"`
	// description: |
	//   Description of the template.
	//
	//   You can go in-depth here on what the template actually does.
	//
	// examples:
	//   - value: "\"Bower is a package manager which stores package information in the bower.json file\""
	//   - value: "\"Subversion ALM for the enterprise before 8.8.2 allows reflected XSS at multiple locations\""
	Description string `` /* 266-byte string literal not displayed */
	// description: |
	//   Impact of the template.
	//
	//   You can go in-depth here on impact of the template.
	//
	// examples:
	//   - value: "\"Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized access, data leakage, or data manipulation.\""
	//   - value: "\"Successful exploitation of this vulnerability could allow an attacker to execute arbitrary script code in the context of the victim's browser, potentially leading to session hijacking, defacement, or theft of sensitive information.\""
	Impact string `` /* 375-byte string literal not displayed */
	// description: |
	//   References for the template.
	//
	//   This should contain links relevant to the template.
	//
	// examples:
	//   - value: >
	//       []string{"https://github.com/strapi/strapi", "https://github.com/getgrav/grav"}
	Reference *stringslice.RawStringSlice `` /* 143-byte string literal not displayed */
	// description: |
	//   Severity of the template.
	SeverityHolder severity.Holder `json:"severity,omitempty" yaml:"severity,omitempty"`
	// description: |
	//   Metadata of the template.
	//
	// examples:
	//   - value: >
	//       map[string]string{"customField1":"customValue1"}
	Metadata map[string]interface{} `` /* 175-byte string literal not displayed */

	// description: |
	//   Classification contains classification information about the template.
	Classification *Classification `` /* 187-byte string literal not displayed */

	// description: |
	//   Remediation steps for the template.
	//
	//   You can go in-depth here on how to mitigate the problem found by this template.
	//
	// examples:
	//   - value: "\"Change the default administrative username and password of Apache ActiveMQ by editing the file jetty-realm.properties\""
	Remediation string `` /* 329-byte string literal not displayed */
}

Info contains metadata information about a template

func (Info) JSONSchemaExtend added in v3.2.3

func (i Info) JSONSchemaExtend(base *jsonschema.Schema)

JSONSchemaProperty returns the JSON schema property for the Info object.

type WorkflowLoader

type WorkflowLoader interface {
	// GetTemplatePathsByTags returns a list of template paths based on the provided tags from the templates directory
	GetTemplatePathsByTags(tags []string) []string

	// GetTemplatePaths takes a list of templates and returns paths for them
	GetTemplatePaths(templatesList []string, noValidate bool) []string
}

WorkflowLoader is a loader interface required for workflow initialization.

Directories

Path Synopsis
types

Jump to

Keyboard shortcuts

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