scan

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: BSD-3-Clause Imports: 34 Imported by: 0

Documentation

Overview

Copyright 2022 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsRelShorter

func AbsRelShorter(path string) string

AbsRelShorter takes path and returns its path relative to the current directory, if shorter. Returns path when path is an empty string or upon any error.

func Flush

func Flush(h govulncheck.Handler) error

func RunGovulncheck added in v0.2.0

func RunGovulncheck(ctx context.Context, env []string, r io.Reader, stdout io.Writer, stderr io.Writer, args []string) error

RunGovulncheck performs main govulncheck functionality and exits the program upon success with an appropriate exit status. Otherwise, returns an error.

Types

type FormatFlag added in v1.1.1

type FormatFlag string

FormatFlag is used for parsing and validation of govulncheck -format flag.

func (*FormatFlag) Get added in v1.1.1

func (f *FormatFlag) Get() interface{}

func (*FormatFlag) Set added in v1.1.1

func (f *FormatFlag) Set(s string) error

func (*FormatFlag) String added in v1.1.1

func (f *FormatFlag) String() string

type ModeFlag added in v1.1.1

type ModeFlag string

ModeFlag is used for parsing and validation of govulncheck -mode flag.

func (*ModeFlag) Get added in v1.1.1

func (f *ModeFlag) Get() interface{}

func (*ModeFlag) Set added in v1.1.1

func (f *ModeFlag) Set(s string) error

func (*ModeFlag) String added in v1.1.1

func (f *ModeFlag) String() string

type ScanFlag added in v1.1.1

type ScanFlag string

ScanFlag is used for parsing and validation of govulncheck -scan flag.

func (*ScanFlag) Get added in v1.1.1

func (f *ScanFlag) Get() interface{}

func (*ScanFlag) Set added in v1.1.1

func (f *ScanFlag) Set(s string) error

func (*ScanFlag) String added in v1.1.1

func (f *ScanFlag) String() string

type ShowFlag added in v1.1.1

type ShowFlag []string

ShowFlag is used for parsing and validation of govulncheck -show flag.

func (*ShowFlag) Get added in v1.1.1

func (v *ShowFlag) Get() interface{}

func (*ShowFlag) Set added in v1.1.1

func (v *ShowFlag) Set(s string) error

func (*ShowFlag) String added in v1.1.1

func (v *ShowFlag) String() string

func (ShowFlag) Update added in v1.1.1

func (v ShowFlag) Update(h *TextHandler)

Update the text handler h with values of the flag.

type TextHandler added in v0.2.0

type TextHandler struct {
	// contains filtered or unexported fields
}

func NewTextHandler

func NewTextHandler(w io.Writer) *TextHandler

NewtextHandler returns a handler that writes govulncheck output as text.

func (*TextHandler) Config added in v0.2.0

func (h *TextHandler) Config(config *govulncheck.Config) error

Config writes version information only if --version was set.

func (*TextHandler) Finding added in v0.2.0

func (h *TextHandler) Finding(finding *govulncheck.Finding) error

Finding gathers vulnerability findings to be written.

func (*TextHandler) Flush added in v0.2.0

func (h *TextHandler) Flush() error

func (*TextHandler) OSV added in v0.2.0

func (h *TextHandler) OSV(entry *osv.Entry) error

OSV gathers osv entries to be written.

func (*TextHandler) Progress added in v0.2.0

func (h *TextHandler) Progress(progress *govulncheck.Progress) error

Progress writes progress updates during govulncheck execution.

Jump to

Keyboard shortcuts

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