cvelistrepo

package
v0.0.0-...-210767f Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package cvelistrepo supports working with the repo containing the list of CVEs.

Index

Constants

View Source
const URL = "https://github.com/CVEProject/cvelist"

URL is the URL of the cvelist repo.

Variables

This section is empty.

Functions

func FetchCVE

func FetchCVE(ctx context.Context, repo *git.Repository, cveID string) (_ *cveschema.CVE, err error)

FetchCVE fetches the CVE file for cveID from the CVElist repo and returns the parsed info.

func ParseCVE

func ParseCVE(repo *git.Repository, f File) (*cveschema.CVE, error)

ParseCVE parses the CVE file f into a CVE.

Types

type File

type File struct {
	DirPath  string
	Filename string
	TreeHash plumbing.Hash
	BlobHash plumbing.Hash
	Year     int
	Number   int
}

A File is a file in the cvelist repo that contains a CVE.

func Files

func Files(repo *git.Repository, commit *object.Commit) (_ []File, err error)

Files returns all the CVE files in the given repo commit, sorted by name.

Jump to

Keyboard shortcuts

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