dradis-pdf_export 4.15.0 → 4.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 783aecfc3f15a260b5f447902c05e00b36ab8aa3cc331c0b96e260d760098640
4
- data.tar.gz: 8617199ce0a0493d98dd1bfcb0656f7f8a72147a157f1ac66e8bf6233ac0ac56
3
+ metadata.gz: 3ca19f89174ea194b67773dc622ca9943659bcc3f78bdbba239f328032d137b9
4
+ data.tar.gz: ab2d4a437e1969469640f1d72284aa2718addb40b2afaf6bc001ad440b70e9e3
5
5
  SHA512:
6
- metadata.gz: 9ec9c25a8b9dfac9277e5dea8531dbbf69eaeb4a41a387ed9418b9bff16a2e60dea8a387606a68161bd1a516d98a6dcb8465bab939fc8f155320a777d725a5f1
7
- data.tar.gz: 4202ecdd88361bd3476ce693f26ee696241d1319e26b2dff3d2e8b016410996028a8a73720c1c94e517cc2619afe2605b4c06d155cdd49182f18c9afdde9889c
6
+ metadata.gz: 052a76a0f796f5ae6dd2d8f9e5bd2f272965c2cc7a53e14582b3b0e9a4afca891c8b76a9d5fea03e8dbe153715c507d3fcfd4d92c0b5d7ff3dcc5b7a146272af
7
+ data.tar.gz: c51ac7e17f1792ffbbdc7cb1541688d27748551bcc066ba785fa567b4a685e08f2a04aff25e5648225694fa95d14b47a198b213f42e7721f664cb5652a1a930a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ v4.16.0 (May 2025)
2
+ - Add table of contents
3
+ - Update logo
4
+ - Upgraded gems: prawn, prawn-table
5
+
1
6
  v4.15.0 (December 2024)
2
7
  - No changes
3
8
 
@@ -21,7 +21,8 @@ Gem::Specification.new do |spec|
21
21
  spec.require_paths = ['lib']
22
22
 
23
23
  spec.add_dependency 'dradis-plugins', '>= 4.8.0'
24
- spec.add_dependency 'prawn', '~> 0.15.0'
24
+ spec.add_dependency 'prawn', '~> 2.5'
25
+ spec.add_dependency 'prawn-table', '~> 0.2.2'
25
26
 
26
27
  spec.add_development_dependency 'capybara', '~> 1.1.3'
27
28
  spec.add_development_dependency 'database_cleaner'
@@ -1,12 +1,12 @@
1
1
  module Dradis
2
2
  module Plugins
3
3
  module PdfExport
4
+ class Processor
5
+ include Prawn::View
4
6
 
5
- class Processor < Prawn::Document
6
- def initialize(args={})
7
- super(top_margin: 70)
8
-
7
+ def initialize(args = {})
9
8
  content_service = args[:content_service]
9
+ @document = Prawn::Document.new(top_margin: 70)
10
10
 
11
11
  @author = 'Security Tester'
12
12
  @email = 'tester@securitytesting.com'
@@ -19,12 +19,12 @@ module Dradis
19
19
 
20
20
  def generate
21
21
  cover_page
22
- project_notes
22
+ # project_notes
23
+
24
+ table_of_contents
23
25
  summary_of_findings
24
26
  detailed_findings
25
27
  tool_list
26
-
27
- # outline
28
28
  end
29
29
 
30
30
  private
@@ -48,12 +48,12 @@ module Dradis
48
48
 
49
49
  def cover_page
50
50
  move_down 50
51
- image "#{Engine.config.paths['app/assets'].expanded.first}/logo_pdf.jpg", position: :center
51
+ image "#{Engine.config.paths['app/assets'].expanded.first}/dradis_ce_full_sm.png", position: :center
52
52
  move_down 20
53
53
 
54
54
  text '<b><font size="24">Security Assessment Report</font></b>', inline_format: true, align: :center
55
55
  move_down 20
56
- text "BlackHat Arsenal 2018", align: :center
56
+ text "BlackHat Arsenal 2025", align: :center
57
57
 
58
58
 
59
59
  bounding_box([300, 150], width: 200, height: 150) do
@@ -84,6 +84,10 @@ module Dradis
84
84
  def summary_of_findings
85
85
  draw_header
86
86
 
87
+ outline.add_subsection_to('Report Content') do
88
+ outline.page destination: page_number, title: 'Summary of Findings'
89
+ end
90
+
87
91
  text 'SUMMARY OF FINDINGS'
88
92
  move_down 20
89
93
 
@@ -98,6 +102,10 @@ module Dradis
98
102
  def detailed_findings
99
103
  draw_header
100
104
 
105
+ outline.add_subsection_to('Report Content') do
106
+ outline.page destination: page_number, title: 'Detailed Findings'
107
+ end
108
+
101
109
  text 'DETAILED FINDINGS'
102
110
  move_down 20
103
111
 
@@ -116,6 +124,10 @@ module Dradis
116
124
  def tool_list
117
125
  draw_header
118
126
 
127
+ outline.update do
128
+ page destination: page_number, title: 'Tools Used'
129
+ end
130
+
119
131
  text 'TOOLS USED'
120
132
  move_down 20
121
133
 
@@ -123,24 +135,21 @@ module Dradis
123
135
  ['Name', 'Description']
124
136
  ]
125
137
 
126
- data << ['Dradis Framework', "Collaboration and reporting framework\nhttp://dradisframework.org" ]
138
+ data << ['Dradis Framework', "Collaboration and reporting framework\nhttps://dradis.com" ]
127
139
 
128
140
  table data, header: true, position: :center
129
141
  end
130
142
 
131
- def outline
143
+ def table_of_contents
132
144
  outline.define do
133
- section('Report Content', destination: 2) do
134
- page title: 'Summary of Findings', destination: 2
135
- page title: 'Tool List', destination: 3
136
- end
145
+ section('Report Content')
137
146
  end
138
147
  end
139
148
 
140
149
  def draw_header
141
150
  fill_color 'efefef'
142
151
  fill_rectangle [bounds.left-50, bounds.top + 100], bounds.width + 100, 87
143
- fill_color '00000'
152
+ fill_color '000000'
144
153
 
145
154
  box = bounding_box [bounds.left-50, bounds.top+50], :width => (bounds.width + 100) do
146
155
 
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 15
11
+ MINOR = 16
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -3,6 +3,7 @@ require 'dradis-plugins'
3
3
 
4
4
  # Load supporting classes
5
5
  require 'prawn'
6
+ require 'prawn/table'
6
7
 
7
8
  # Load this add-on's engine
8
9
  require "dradis/plugins/pdf_export"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-pdf_export
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.15.0
4
+ version: 4.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-20 00:00:00.000000000 Z
11
+ date: 2025-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -30,14 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.15.0
33
+ version: '2.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.15.0
40
+ version: '2.5'
41
+ - !ruby/object:Gem::Dependency
42
+ name: prawn-table
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.2.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.2.2
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: capybara
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -137,7 +151,7 @@ files:
137
151
  - LICENSE
138
152
  - README.md
139
153
  - Rakefile
140
- - app/assets/images/logo_pdf.jpg
154
+ - app/assets/images/dradis_ce_full_sm.png
141
155
  - app/controllers/dradis/plugins/pdf_export/reports_controller.rb
142
156
  - app/views/dradis/plugins/pdf_export/export/_index-content.html.erb
143
157
  - app/views/dradis/plugins/pdf_export/export/_index-tabs.html.erb
Binary file