defectdojo

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestError = errors.New("defect dojo request error")

Functions

This section is empty.

Types

type EngagementQuery

type EngagementQuery struct {
	ProductTypeName string
	ProductName     string
	Name            string
	Duration        time.Duration
	BranchTag       string
	SourceURL       string
	CommitHash      string
	Tags            []string
}

type ScanType

type ScanType string
const (
	Grype     ScanType = "Anchore Grype"
	CycloneDX ScanType = "CycloneDX Scan"
	Semgrep   ScanType = "Semgrep JSON Report"
	Gitleaks  ScanType = "Gitleaks Scan"
)
{
	"id": 54,
	"name": "CycloneDX Scan",
	"static_tool": false,
	"dynamic_tool": false,
	"active": true
  },

type Service

type Service struct {
	Retry               int       // How many times to retry on a failed export
	DescriptionTime     time.Time // The time zone used when auto generating the description
	DescriptionTimezone string
	BackoffDuration     time.Duration // The interval for the exponential back off retry
	// contains filtered or unexported fields
}

Service can be used to export scans to Defect Dojo

func NewService

func NewService(client *http.Client, key string, url string) Service

func (Service) Export

func (s Service) Export(ctx context.Context, r io.Reader, e EngagementQuery, scanType ScanType) error

Jump to

Keyboard shortcuts

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