osvutils

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: 9 Imported by: 0

Documentation

Overview

Package osvutils provides utilities for working with Go OSV entries. It is separated from package osv because that package promises to only import from the standard library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AffectsSemver

func AffectsSemver(ranges []osv.Range, v string) (bool, error)

AffectsSemver returns whether the version v is within the given ranges. v must be unprefixed, valid semver, and ranges must be sorted, non-overlapping, and contain only valid semver. The function errors if either of the inputs is invalid.

func Validate

func Validate(e *osv.Entry) (err error)

Validate errors if there are any problems with the OSV Entry. It is used to validate OSV entries before publishing them to the Go vulnerability database, and has stricter requirements than the general OSV format.

func ValidateExceptTimestamps

func ValidateExceptTimestamps(e *osv.Entry) (err error)

ValidateExceptTimestamps errors if there are any problems with the OSV Entry, with the exception of the timestamps (published, modified and withdrawn) which are not checked. This is used to validate entries at CL submit time, before their timestamps are corrected.

func ValidateRanges

func ValidateRanges(ranges []osv.Range) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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