Documentation
¶
Overview ¶
Package nessus converts Tenable Nessus / Tenable.sc ".nessus" XML exports into a CTIS report so vulnerability results can flow through the standard ingest pipeline (dedup, correlation, idempotency, scoped auto-resolve).
Both Nessus Professional and Tenable.sc emit the same NessusClientData_v2 format, so this one converter serves both engines. The existing asset-import path (internal/app/asset/import.go) parses the same file but only creates host assets and discards the vulnerabilities; this converter is the findings counterpart and is also reused by the Tenable connector.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
Convert reads a .nessus XML stream and returns a CTIS report containing the scanned hosts as assets and their vulnerabilities as findings.
The report is shaped for safe partial-coverage ingestion:
- tool.name + metadata.id scope auto-resolve to this batch + this tool;
- coverage_type=full and a synthetic default branch make the batch eligible for auto-resolve (the ingest gate is git-centric — network scans have no branch, so we mark a synthetic default branch; auto-resolve still only touches the assets present in THIS report, i.e. the scanned batch);
- only the hosts in this export are included, so stale-resolution can never reach assets that were not part of this scan.
Types ¶
type ConvertOptions ¶
type ConvertOptions struct {
// ScanSessionID becomes the CTIS report metadata.id. For rolling batch
// coverage this MUST be unique per batch — auto-resolve is scoped by
// (tool, scan id, asset set), so a stable-but-unique session id per batch
// is what keeps one batch from resolving another batch's findings.
ScanSessionID string
// ToolName is the CTIS tool.name. Defaults to "tenable". Auto-resolve is
// also scoped by tool name, so this keeps Tenable scans from resolving
// agent-scanner (nuclei/trivy/...) findings and vice versa.
ToolName string
// Now overrides the report timestamp (tests pass a fixed value). Zero →
// time.Now().UTC().
Now time.Time
// MinSeverity drops report items below this Nessus severity (0=info ..
// 4=critical). Zero keeps everything. Callers typically pass 1 to skip the
// purely informational scan-metadata plugins.
MinSeverity int
// DefaultCriticality is applied to assets that carry no criticality signal.
// Empty → ctis.CriticalityMedium.
DefaultCriticality ctis.Criticality
}
ConvertOptions controls how a .nessus export is turned into a CTIS report.