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 ¶
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.