xray

package
v0.0.0-...-ce22054 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package xray is used to access Xray to find vulnerabilities for images

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Username string   `koanf:"username"`
	Password string   `koanf:"password"`
	URL      string   `koanf:"url"`
	Prefixes []Prefix `koanf:"prefixes"`
}

Config contains all the information to talk to Xray

type Prefix

type Prefix struct {
	Prefix string   `koanf:"prefix"`
	Images []string `koanf:"images"`
}

Prefix information about the index used by Xray

type Scanner

type Scanner interface {
	GetVulnerabilities(name, version string, prefixes []Prefix) ([]vulnerabilities.Vulnerability, error)
	GetXrayResults(request xray.SummaryArtifactRequest) (xray.SummaryArtifact, error)
}

Scanner is an interface that wraps calls to Xray

func NewXray

func NewXray(config Config) (Scanner, error)

NewXray constructs access to Xray It returns an implementation of the Xray client represented as the Scanner interface

Jump to

Keyboard shortcuts

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