opensca

package
v1.0.14-0...-56f5250 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskArg

type TaskArg struct {

	// 检测数据源 文件路径或url 兼容http(s)|ftp|file
	DataOrigin string
	// 检测对象名称 用于结果展示 缺省时取DataOrigin尾单词
	Name string
	// 超时时间 单位s
	Timeout int
	// 使用的sca(为空时使用默认配置)
	Sca []sca.Sca

	// 额外的文件过滤函数 默认为压缩文件名过滤函数
	ExtractFileFilter walk.ExtractFileFilter
	// 额外的结果回调函数
	ResCallFunc model.ResCallback
}

任务检测参数

type TaskResult

type TaskResult struct {
	// 任务参数
	Arg *TaskArg
	// 检出组件
	Deps []*model.DepGraph
	// 错误信息
	Error error
	// 任务开始时间
	Start time.Time
	// 任务结束时间
	End time.Time
	// 检测文件大小
	Size int64
}

func RunTask

func RunTask(ctx context.Context, arg *TaskArg) (result TaskResult)

RunTask 运行检测任务 arg: 任务参数

Directories

Path Synopsis
sca
java/xml
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
php

Jump to

Keyboard shortcuts

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