nessus_transformer

Fetch Vulnerability data from Nessus and ingest into PE

24 downloads

3 latest version

Version information

  • 1.0.2 (latest)
  • 1.0.1
  • 1.0.0 (deleted)
  • 0.1.0 (deleted)
released Apr 9th 2025
This version is compatible with:
  • Puppet Enterprise 2025.2.x, 2025.1.x, 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2021.7.x
  • Puppet >= 7.24 < 9.0.0
  • , , , ,
Tasks:
  • run_nessus_transformer

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation

Add this module to your Puppetfile:

mod 'puppetlabs-nessus_transformer', '1.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetlabs-nessus_transformer
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-nessus_transformer --version 1.0.2

Documentation

puppetlabs/nessus_transformer — version 1.0.2 Apr 9th 2025

nessus_transformer

Table of Contents

  1. Description
  2. Setup
  3. Overview of Modes
  4. Usage
  5. Scheduling
  6. Tested Operating Systems

Description

This module retrieves scan data from Tenable Nessus™, transforms the data, and uploads it to Puppet Enterprise for integration with the Vulnerability Remediation feature.


Setup

Setup Requirements

  • Vulnerability Remediation is part of Puppet Enterprise Advanced. Access to this module requires a Puppet Forge Key.
  • The module should be included in your Puppetfile and deployed using Code Manager.
  • Tokens required for API interactions with Nessus and Puppet Enterprise must be securely stored. Use encryption tools such as hiera-eyaml or another key management system.
  • Install and configure node_encrypt to prevent sensitive information from appearing in logs or reports.
  • The transformer node requires network access to:
    • The Puppet Enterprise primary server on port TCP/8146
    • The Nessus instance.

Hiera Configuration

The module expects the following sensitive keys in Hiera:

  • nessus_transformer::pe_token
  • nessus_transformer::scan_reports_source_access_key
  • nessus_transformer::scan_reports_source_secret_key

To ensure secret data is always treated as sensitive, use the following lookup_options in your Hiera data (e.g., common.yaml, or nodes/transformer.mydomain.com.yaml):

lookup_options:
  nessus_transformer::scan_reports_source_access_key:
    convert_to: 'Sensitive'
  nessus_transformer::scan_reports_source_secret_key:
    convert_to: 'Sensitive'
  nessus_transformer::pe_token:
    convert_to: 'Sensitive'

Puppet Enterprise Access Token

Generate a Puppet Enterprise token via the Puppet Enterprise console.


Nessus CA Certificate

It is likely your Nessus instance is running SSL, this may be a self-signed certificate or a real SSL certificate. If your instance is using a self-signed certificate, you can download the CA file onto transformer.mydomain.com and put the path into the hiera key

nessus_transformer::scan_reports_source_ca_certificate:

You may be able to download the Nessus CA from this API endpoint : https://nessus.mydomain.com:8834/getcert

This step is only required if you are running a self-signed certificate.


Nessus Access Keys

Depending on the operation mode, Nessus API access keys might be necessary. Generate them following Nessus documentation.


Overview of Modes

The transformer module supports two modes (mutually exclusive):

1. Requesting Data via Nessus API:

Downloads data directly from Nessus. Requires:

  • scan_reports_source_access_key
  • scan_reports_source_secret_key

2. Reading Data from File Path:

Uses Nessus scan data manually uploaded to the transformer node. Requires:

  • scan_reports_source_filepath

Usage

Step 1: Classify the Transformer Node

Classify your node using node classification in Puppet Enterprise. Example placeholders:

Placeholder Description
puppet.mydomain.com Puppet Enterprise primary server
nessus.mydomain.com Nessus scanner instance
transformer.mydomain.com Transformer node (can be dedicated or shared)
puppet-token Generated Puppet Enterprise token file
nessus-key Nessus API key
nessus-secret Nessus secret key

Example Puppet class:

class { 'nessus_transformer':
  scan_name                    => 'My Scan',
  scan_reports_source_address  => 'nessus.mydomain.com',
}

Step 2: Encrypt and Store Tokens

Encrypt sensitive data using node_encrypt and hiera-eyaml.

When you use hiera-eyaml to encrypt data, you will see a long string of data starting with ENC[PKCS7,. This is the encrypted string that needs to be added to the right location in your hiera files to be picked up by transformer.mydomain.com.

The next step will have you generate eyaml strings for the puppet-token, nessus-key, and nessus-secret. Each of those strings needs to be added to hiera and the code needs to be promoted to the relevant environment(s).

Encrypt Puppet Enterprise Token:

puppet node encrypt -t transformer.mydomain.com puppet-token > token
eyaml encrypt --file token --output=string --pkcs7-public-key=/etc/puppetlabs/puppet/eyaml/public_key.pkcs7.pem

Store the encrypted token in Hiera:

nessus_transformer::pe_token: ENC[PKCS7,...]

Encrypt Nessus key:

puppet node encrypt -t transformer.mydomain.com nessus-key > key
eyaml encrypt --file key --output=string --pkcs7-public-key=/etc/puppetlabs/puppet/eyaml/public_key.pkcs7.pem

Store the encrypted token in Hiera:

nessus_transformer::scan_reports_source_access_key: ENC[PKCS7,...]

Encrypt Nessus secret:

puppet node encrypt -t transformer.mydomain.com nessus-secret > secret
eyaml encrypt --file secret --output=string --pkcs7-public-key=/etc/puppetlabs/puppet/eyaml/public_key.pkcs7.pem

Store the encrypted token in Hiera:

nessus_transformer::scan_reports_source_secret_key: ENC[PKCS7,...]

Step 3: Run Puppet on the Transformer Node

Ensure the code has been deployed to the relevant environment(s), then run:

puppet agent -t

Step 4: Run Initial Nessus Sync Task

puppet task run nessus_transformer::run_nessus_transformer --targets transformer.mydomain.com

The task should include the output:

Registration successful. Transformer is pending activation.

Step 5: Accept the Registration

Navigate to the vulnerabilities page https://puppet.mydomain.com/#/vulnerabilities and click Accept to activate the transformer.


Step 6: Re-run the Transformer Task

To download scan results:

puppet task run nessus_transformer::run_nessus_transformer --targets transformer.mydomain.com

After completion, any vulnerabilities discovered will appear in the Puppet Enterprise console.


Scheduling

The default schedule for the transformer to run is daily. You can adjust how often transformer data synchronization runs by configuring the module parameter sync_schedule (systemd OnCalendar format):

Description Systemd Timer Schedule
Every hour *-*-* *:00:00
Every 12 hours *-*-* */12:00:00
Working hours (9–5) *-*-* 9-17:00:00
Daily *-*-* 00:00:00
Weekly * *-*-* 00:00:00
Monthly * *-*-01 00:00:00
Quarterly * *-01,04,07,10-01 00:00:00

Explanation of the OnCalendar format


Tested operating systems

We have confirmed the ingestion of vulnerability and package data on the following operating systems:

  • Red Hat Enterprise Linux 7
  • Ubuntu 18
  • Debian 10
  • Suse 12
  • Rocky 8
  • Windows 2019
  • Windows 2022

This list will be updated within future releases as we continue to test.