nessus

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: GPL-3.0 Imports: 8 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 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

func Convert(r io.Reader, opts ConvertOptions) (*ctis.Report, error)

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.

Jump to

Keyboard shortcuts

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