internal

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllSbom []MsecSbom
View Source
var App *cli.App
View Source
var BenchmarkCommand *cli.Command
View Source
var DetectCommand *cli.Command
View Source
var SbomCommand *cli.Command

Functions

func RegisterCommand

func RegisterCommand(c *cli.Command)

RegisterCommand 注册插件

func RegisterDetectSubcommands

func RegisterDetectSubcommands(d DetectPlugin)

RegisterDetectSubcommands 注册detect子命令

func RegisterSbomLanguage

func RegisterSbomLanguage(m MsecSbom)

RegisterSbomLanguage 注册msec文件检查插件

func RegisterSbomSub

func RegisterSbomSub(s SbomSub)

RegisterSbomSub 注册命令检查插件

func ResultFunc

func ResultFunc(resCheck []sbom.ResultComponent)

Types

type BaseOption

type BaseOption struct {
	// 插件名称
	Name string
	// 作者名称
	Author string
	// 检测插件描述
	Description string
}

type DetectPlugin

type DetectPlugin interface {
	InitCommand() []*cli.Command
	Action(c *cli.Context) error
}

type MsecSbom

type MsecSbom interface {
	AddFile(use sbom.FileInfoUse)
	Language() string
	FileCheck(FileName string) bool
	MsecSbom(ctx context.Context) []sbom.ResultComponent
}

type SbomOptions

type SbomOptions struct {
	// 项目目录
	ProjectPath string
	// 具体文件所在位置
	FileFullPath string
	// 用户输入的语言类型
	LanguageType string
	// 转换后的语言类型
	//ConvertLanguageType common.LanguageType
	// 输出目录
	OutPath string
	// 输出文件类型
	OutType string
	// cdx  转换后的 输出文件类型
	OutC cdx.BOMFileFormat
}
var SbomOption SbomOptions

func NewSbomOptions

func NewSbomOptions() SbomOptions

func (SbomOptions) ParseSbomOption

func (sbom SbomOptions) ParseSbomOption(flag bool)

type SbomSub

type SbomSub interface {
	InitCommand() *cli.Command
	Action(c *cli.Context) error
	Parse(string string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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