cwe

package
v0.0.0-...-e1af42c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(opts ...Option) error

Types

type AlternateTerm

type AlternateTerm struct {
	Term        string `json:"term,omitempty"`
	Description string `json:"description,omitempty"`
}

type ApplicablePlatform

type ApplicablePlatform struct {
	Class      string `xml:"Class,attr" json:"class,omitempty"`
	Prevalence string `xml:"Prevalence,attr" json:"prevalence,omitempty"`
	Name       string `xml:"Name,attr" json:"name,omitempty"`
}

type ApplicablePlatforms

type ApplicablePlatforms struct {
	Language        []ApplicablePlatform `xml:"Language" json:"language,omitempty"`
	Technology      []ApplicablePlatform `xml:"Technology" json:"technology,omitempty"`
	OperatingSystem []ApplicablePlatform `xml:"Operating_System" json:"operating_system,omitempty"`
	Architecture    []ApplicablePlatform `xml:"Architecture" json:"architecture,omitempty"`
}

type Audience

type Audience struct {
	Type        string `xml:"Type" json:"type,omitempty"`
	Description string `xml:"Description" json:"description,omitempty"`
}

type Category

type Category struct {
	ID               string            `json:"id,omitempty"`
	Name             string            `json:"name,omitempty"`
	Status           string            `json:"status,omitempty"`
	Summary          string            `json:"summary,omitempty"`
	ContentHistory   ContentHistory    `json:"content_history,omitempty"`
	Relationships    []HasMember       `json:"relationships,omitempty"`
	References       []Reference       `json:"references,omitempty"`
	Notes            []Note            `json:"notes,omitempty"`
	TaxonomyMappings []TaxonomyMapping `json:"taxonomy_mappings,omitempty"`
}

type CommonConsequence

type CommonConsequence struct {
	Scope      []string `xml:"Scope" json:"scope,omitempty"`
	Impact     []string `xml:"Impact" json:"impact,omitempty"`
	Note       string   `xml:"Note" json:"note,omitempty"`
	Likelihood string   `xml:"Likelihood" json:"likelihood,omitempty"`
}

type ContentHistory

type ContentHistory struct {
	Submission        Submission          `json:"submission,omitempty"`
	Modification      []Modification      ` json:"modification,omitempty"`
	PreviousEntryName []PreviousEntryName ` json:"previous_entry_name,omitempty"`
	Contribution      []Contribution      `json:"contribution,omitempty"`
}

type Contribution

type Contribution struct {
	Type                     string `json:"type,omitempty"`
	ContributionName         string `json:"contribution_name,omitempty"`
	ContributionOrganization string `json:"contribution_organization,omitempty"`
	ContributionDate         string `json:"contribution_date,omitempty"`
	ContributionComment      string `json:"contribution_comment,omitempty"`
}

type DemonstrativeExample

type DemonstrativeExample struct {
	DemonstrativeExampleID string `xml:"Demonstrative_Example_ID,attr" json:"demonstrative_example_id,omitempty"`
	Text                   string `xml:",innerxml" json:"text,omitempty"`
}

type DetectionMethods

type DetectionMethods struct {
	DetectionMethodID  string `json:"detection_method_id,omitempty"`
	Method             string `json:"method,omitempty"`
	Description        string `json:"description,omitempty"`
	Effectiveness      string `json:"effectiveness,omitempty"`
	EffectivenessNotes string `json:"effectiveness_notes,omitempty"`
}

type ExternalReference

type ExternalReference struct {
	ReferenceID      string   `xml:"Reference_ID,attr" json:"reference_id,omitempty"`
	Author           []string `xml:"Author" json:"author,omitempty"`
	Title            string   `xml:"Title" json:"title,omitempty"`
	URL              string   `xml:"URL" json:"url,omitempty"`
	PublicationYear  string   `xml:"Publication_Year" json:"publication_year,omitempty"`
	PublicationMonth string   `xml:"Publication_Month" json:"publication_month,omitempty"`
	PublicationDay   string   `xml:"Publication_Day" json:"publication_day,omitempty"`
	Publication      string   `xml:"Publication" json:"publication,omitempty"`
	Publisher        string   `xml:"Publisher" json:"publisher,omitempty"`
	Edition          string   `xml:"Edition" json:"edition,omitempty"`
	URLDate          string   `xml:"URL_Date" json:"url_date,omitempty"`
}

type HasMember

type HasMember struct {
	CWEID  string `xml:"CWE_ID,attr" json:"cweid,omitempty"`
	ViewID string `xml:"View_ID,attr" json:"view_id,omitempty"`
}

type ModesOfIntroduction

type ModesOfIntroduction struct {
	Phase string   `json:"phase,omitempty"`
	Note  []string `json:"note,omitempty"`
}

type Modification

type Modification struct {
	ModificationName         string `json:"modification_name,omitempty"`
	ModificationOrganization string `json:"modification_organization,omitempty"`
	ModificationDate         string `json:"modification_date,omitempty"`
	ModificationComment      string `json:"modification_comment,omitempty"`
	ModificationImportance   string `json:"modification_importance,omitempty"`
}

type Note

type Note struct {
	Type string `xml:"Type,attr" json:"type,omitempty"`
	Text string `xml:",innerxml" json:"text,omitempty"`
}

type ObservedExample

type ObservedExample struct {
	Reference   string `xml:"Reference" json:"reference,omitempty"`
	Description string `xml:"Description" json:"description,omitempty"`
	Link        string `xml:"Link" json:"link,omitempty"`
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithDataURL

func WithDataURL(url string) Option

func WithDir

func WithDir(dir string) Option

func WithRetry

func WithRetry(retry int) Option

type PotentialMitigation

type PotentialMitigation struct {
	MitigationID       string   `json:"mitigation_id,omitempty"`
	Phase              []string `json:"phase,omitempty"`
	Description        []string `json:"description,omitempty"`
	Effectiveness      string   `json:"effectiveness,omitempty"`
	EffectivenessNotes string   `json:"effectiveness_notes,omitempty"`
	Strategy           string   `json:"strategy,omitempty"`
}

type PreviousEntryName

type PreviousEntryName struct {
	Text string `json:"text,omitempty"`
	Date string `json:"date,omitempty"`
}

type Reference

type Reference struct {
	Section string `xml:"Section,attr" json:"section,omitempty"`
	ExternalReference
}

type RelatedWeakness

type RelatedWeakness struct {
	Nature  string `xml:"Nature,attr" json:"nature,omitempty"`
	CWEID   string `xml:"CWE_ID,attr" json:"cweid,omitempty"`
	ViewID  string `xml:"View_ID,attr" json:"view_id,omitempty"`
	Ordinal string `xml:"Ordinal,attr" json:"ordinal,omitempty"`
	ChainID string `xml:"Chain_ID,attr" json:"chain_id,omitempty"`
}

type Submission

type Submission struct {
	SubmissionName         string `json:"submission_name,omitempty"`
	SubmissionOrganization string `json:"submission_organization,omitempty"`
	SubmissionDate         string `json:"submission_date,omitempty"`
	SubmissionComment      string `json:"submission_comment,omitempty"`
}

type TaxonomyMapping

type TaxonomyMapping struct {
	TaxonomyName string `xml:"Taxonomy_Name,attr" json:"taxonomy_name,omitempty"`
	EntryID      string `xml:"Entry_ID" json:"entry_id,omitempty"`
	EntryName    string `xml:"Entry_Name" json:"entry_name,omitempty"`
	MappingFit   string `xml:"Mapping_Fit" json:"mapping_fit,omitempty"`
}

type TaxonomyMappings

type TaxonomyMappings struct {
	TaxonomyName string `xml:"Taxonomy_Name,attr" json:"taxonomy_name,omitempty"`
	EntryName    string `xml:"Entry_Name" json:"entry_name,omitempty"`
	EntryID      string `xml:"Entry_ID" json:"entry_id,omitempty"`
	MappingFit   string `xml:"Mapping_Fit" json:"mapping_fit,omitempty"`
}

type View

type View struct {
	ID             string         `json:"id,omitempty"`
	Name           string         `json:"name,omitempty"`
	Type           string         `json:"type,omitempty"`
	Status         string         `json:"status,omitempty"`
	Objective      string         `json:"objective,omitempty"`
	Audience       []Audience     `json:"audience,omitempty"`
	Members        []HasMember    `json:"members,omitempty"`
	Notes          []Note         `json:"notes,omitempty"`
	ContentHistory ContentHistory `json:"content_history,omitempty"`
	References     []Reference    `json:"references,omitempty"`
	Filter         string         `json:"filter,omitempty"`
}

type Weakness

type Weakness struct {
	ID                    string                 `json:"id,omitempty"`
	Name                  string                 `json:"name,omitempty"`
	Abstraction           string                 `json:"abstraction,omitempty"`
	Structure             string                 `json:"structure,omitempty"`
	Status                string                 `json:"status,omitempty"`
	Description           string                 `json:"description,omitempty"`
	ExtendedDescription   string                 `json:"extended_description,omitempty"`
	RelatedWeaknesses     []RelatedWeakness      `json:"related_weaknesses,omitempty"`
	ApplicablePlatforms   ApplicablePlatforms    `json:"applicable_platforms,omitempty"`
	BackgroundDetails     []string               `json:"background_details,omitempty"`
	ModesOfIntroduction   []ModesOfIntroduction  `json:"modes_of_introduction,omitempty"`
	LikelihoodOfExploit   string                 `json:"likelihood_of_exploit,omitempty"`
	CommonConsequences    []CommonConsequence    `json:"common_consequences,omitempty"`
	PotentialMitigations  []PotentialMitigation  `json:"potential_mitigations,omitempty"`
	DemonstrativeExamples []DemonstrativeExample `json:"demonstrative_examples,omitempty"`
	ObservedExamples      []ObservedExample      `json:"observed_examples,omitempty"`
	References            []Reference            `json:"references,omitempty"`
	ContentHistory        ContentHistory         `json:"content_history,omitempty"`
	WeaknessOrdinalities  []WeaknessOrdinality   `json:"weakness_ordinalities,omitempty"`
	AlternateTerms        []AlternateTerm        `json:"alternate_terms,omitempty"`
	DetectionMethods      []DetectionMethods     `json:"detection_methods,omitempty"`
	TaxonomyMappings      []TaxonomyMappings     `json:"taxonomy_mappings,omitempty"`
	RelatedAttackPatterns []string               `json:"related_attack_patterns,omitempty"`
	Notes                 []Note                 `json:"notes,omitempty"`
	AffectedResources     []string               `json:"affected_resources,omitempty"`
	FunctionalAreas       []string               `json:"functional_areas,omitempty"`
}

type WeaknessOrdinality

type WeaknessOrdinality struct {
	Ordinality  string `xml:"Ordinality" json:"ordinality,omitempty"`
	Description string `xml:"Description" json:"description,omitempty"`
}

Jump to

Keyboard shortcuts

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