Creating PDF reports

This guide contains:

Installing the PDF exporter

The PDF exporter plugin requires internet connectivity for installation and upgrade. Your Dradis instance can be taken offline afterwards.

For Dradis Professional Edition:

  1. Run the following in the console as dradispro:

    $ cd /home/dradispro
    $ git clone https://github.com/dradis/dradis-pdf_export.git
  2. Edit file /opt/dradispro/dradispro/shared/addons/Gemfile.plugins (create it if it does not already exist) and append the following to the end of the file:

    gem 'dradis-pdf_export', path: '/home/dradispro/dradis-pdf_export'
  3. Run the following in the console as dradispro:

    $ cd /opt/dradispro/dradispro/current/
    $ ln -s /opt/dradispro/dradispro/shared/addons/Gemfile.plugins
    $ RAILS_ENV=production bundle install
  4. Restart the app:

    $ god restart dradispro-unicorn

Now, navigate to Export results in the header of one of your projects to see the new Generate PDF Reports option!

For Dradis Community Edition:

  1. First, you're going to clone the PDF exporter locally. Navigate to the folder where you want to install the PDF exporter, then run the following in the console:

    $ git clone https://github.com/dradis/dradis-pdf_export.git
  2. Back in the dradis-ce folder, edit file Gemfile.plugins and add this line in the Export section:

    gem 'dradis-pdf_export', path: '../path/to/dradis-pdf_export'

    Make sure to update the path example above with your actual path to the correct folder!

  3. Install the new PDF exporter by running this command from your local dradis-ce folder:

    $ bundle install

Restart the server ($ bundle exec rails server), then navigate to Export results in the header to see the new Generate PDF Reports option!


Customizing your PDF report

We're using the powerful Prawn library to do the heavy lifting.

Essentially, you're just editing an .rb file to customize it as needed. For more details on specific syntax options, check out the Prawn library linked above!

For Dradis Professional Edition:

  1. Create an exporter.rb file! For a quick starting point, copy this sample PDF report template: exporter.rb and customize as needed.

  2. Replace the existing file at /home/dradispro/dradis-pdf_export/lib/dradis/plugins/pdf_export/exporter.rb with your new exporter.rb file.

  3. Run the following in the command line as dradispro:

    $ cd /opt/dradispro/dradispro/current/
    $ RAILS_ENV=production bundle install
    $ god restart

For Dradis Community Edition:

  1. Create an exporter.rb file! For a quick starting point, copy this sample PDF report template: exporter.rb and customize as needed.

  2. Replace the existing file at dradis-pdf_export/lib/dradis/plugins/pdf_export/exporter.rb with your new exporter.rb file.

Exporting your PDF report

For Dradis Professional Edition:

Export from the Webapp

  1. In the header of your project, navigate to Export

  2. Navigate to the PDF tab and click Export

Export from the Command Line

  1. Locate the ID of the project you want to export. If the browser shows https://192.168.56.102/pro/projects/50, your project ID is 50.

  2. SSH into the box as dradispro and navigate to the current folder:

    $ cd /opt/dradispro/dradispro/current
  3. Run the dradis:plugins:pdf:export command.

    For our example, with a project ID of 50, the command we need to run is this:

    $ PROJECT_ID=50 RAILS_ENV=production bundle exec thor dradis:plugins:pdf:export --output=/tmp
  4. Download your report from the output location (example: /tmp/) displayed after the export finishes.

For Dradis Community Edition:

Export from the Webapp

  1. In the header of your project, navigate to Export

  2. Navigate to the PDF tab and click Export

Export from the Command Line

  1. First, make sure that you are inside of the dradis-ce folder

  2. Run the dradis:plugins:pdf:export command:

    $ bundle exec thor dradis:plugins:pdf:export --output=/tmp
  3. Download your report from the output location (example: /tmp/) displayed after the export finishes.

Streamline InfoSec Project Delivery

Learn practical tips to reduce the overhead that drags down security assessment delivery with this 5-day course. These proven, innovative, and straightforward techniques will optimize all areas of your next engagement including:

  • Scoping
  • Scheduling
  • Project Planning
  • Delivery
  • Intra-team Collaboration
  • Reporting and much more...

Your email is kept private. We don't do the spam thing.