defectdojo

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: GPL-3.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package defectdojo wires the DefectDojo co-existence connector (RFC-013): pull findings from a tenant's DefectDojo integration, convert to CTIS, and ingest them — with OpenCTEM remaining the system of record. One-way (DD → OpenCTEM).

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDefectDojoIntegration = fmt.Errorf("%w: no connected DefectDojo integration", shared.ErrNotFound)

ErrNoDefectDojoIntegration is returned when the tenant has no connected DefectDojo integration to sync from.

Functions

This section is empty.

Types

type Ingester

type Ingester interface {
	Ingest(ctx context.Context, agt *agent.Agent, input ingest.Input) (*ingest.Output, error)
}

Ingester is the narrow slice of the ingest service the sync needs.

type SyncResult

type SyncResult struct {
	FindingsPulled  int    `json:"findings_pulled"`
	FindingsCreated int    `json:"findings_created"`
	FindingsUpdated int    `json:"findings_updated"`
	ReportID        string `json:"report_id,omitempty"`
}

SyncResult summarizes a completed sync.

type SyncService

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

SyncService pulls a tenant's DefectDojo findings and ingests them as CTIS.

func NewSyncService

func NewSyncService(repo integration.Repository, ingester Ingester, encryptor crypto.Encryptor, log *logger.Logger) *SyncService

NewSyncService wires the sync service. A nil encryptor treats stored credentials as plaintext (dev only), matching the other resolvers.

func (*SyncService) SyncTenant

func (s *SyncService) SyncTenant(ctx context.Context, tenantID shared.ID) (*SyncResult, error)

SyncTenant pulls the given tenant's DefectDojo findings and ingests them.

Tenant isolation (standing rule): the tenant is the AUTHENTICATED tenantID — credentials are loaded via ListByProvider(tenantID) and the ingest runs under a synthetic agent scoped to that same tenant. Nothing in the DefectDojo payload can redirect the tenant.

Jump to

Keyboard shortcuts

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