dradis-json 4.16.0 → 4.17.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/app/controllers/dradis/plugins/json/reports_controller.rb +16 -0
- data/app/views/dradis/plugins/json/export/_index-content.html.erb +4 -5
- data/app/views/dradis/plugins/json/export/_index-tabs.html.erb +1 -1
- data/config/routes.rb +4 -2
- data/dradis-json.gemspec +1 -1
- data/lib/dradis/plugins/json/engine.rb +3 -4
- data/lib/dradis/plugins/json/exporter.rb +2 -3
- data/lib/dradis/plugins/json/gem_version.rb +2 -2
- data/lib/dradis/plugins/json/version.rb +1 -1
- data/lib/tasks/thorfile.rb +2 -2
- metadata +3 -3
- data/app/controllers/dradis/plugins/json/base_controller.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc7819dd69e05ff6cd96411448c1e3deb846ca44121c3c9d2156c0803bca60de
|
4
|
+
data.tar.gz: b452d9f8ad688bfc89c1faa004756259bd9c3b41a823696be37f62caabe9e83b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8be1fbe587608cf75c40a95b0af362e7322ad9da6fd866cd863e194d28cb7e76e82deb70b6acd36d4b4fede66b1e0491dc5cc75e17f4cda67a222fb1ce530be1
|
7
|
+
data.tar.gz: 350e42325ff127f330940bf9caf7e61c9a8f320cac4520b4e7f0a19180d34976680d964e442bf66e5ee35ba400b48303c37dbd1830be86289a0116a7e3238c4c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,7 @@ Export Dradis findings into JavaScript Object Notation (JSON) format.
|
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
8
|
-
The plugin requires [Dradis CE](http://dradis.com/ce/)
|
8
|
+
The plugin requires [Dradis CE](http://dradis.com/ce/) or [Dradis Pro](http://dradis.com/) 4.16 or higher.
|
9
9
|
|
10
10
|
Add the JSON plugin to your `Gemfile.plugins`:
|
11
11
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Dradis
|
2
|
+
module Plugins
|
3
|
+
module JSON
|
4
|
+
class ReportsController < Dradis::Plugins::Export::BaseController
|
5
|
+
skip_before_action :validate_template
|
6
|
+
|
7
|
+
def create
|
8
|
+
exporter = Dradis::Plugins::JSON::Exporter.new(export_params)
|
9
|
+
json = exporter.export
|
10
|
+
|
11
|
+
render json: json
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,10 +1,9 @@
|
|
1
1
|
<%= content_tag :div, id: 'plugin-json', class: 'tab-pane fade' do %>
|
2
|
-
<%= form_tag
|
3
|
-
<%= hidden_field_tag :plugin, :json %>
|
4
|
-
<%= hidden_field_tag :route, :root %>
|
5
|
-
|
2
|
+
<%= form_tag json_export.project_report_path(current_project), target: '_blank' do %>
|
6
3
|
<h4 class="header-underline">Ready when you are!</h4>
|
7
4
|
|
8
|
-
<
|
5
|
+
<div class="mt-4">
|
6
|
+
<%= render partial: 'export/submit_button', locals: { plugin_name: Dradis::Plugins::JSON::Engine.plugin_name } %>
|
7
|
+
</div>
|
9
8
|
<% end %>
|
10
9
|
<% end%>
|
data/config/routes.rb
CHANGED
data/dradis-json.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
$:.push File.expand_path('../lib', __FILE__)
|
2
2
|
require 'dradis/plugins/json/version'
|
3
|
-
version = Dradis::Plugins::
|
3
|
+
version = Dradis::Plugins::JSON::VERSION::STRING
|
4
4
|
|
5
5
|
# Describe your gem and declare its dependencies:
|
6
6
|
Gem::Specification.new do |spec|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
module Dradis::Plugins::
|
1
|
+
module Dradis::Plugins::JSON
|
2
2
|
class Engine < ::Rails::Engine
|
3
|
-
isolate_namespace Dradis::Plugins::
|
3
|
+
isolate_namespace Dradis::Plugins::JSON
|
4
4
|
|
5
5
|
include Dradis::Plugins::Base
|
6
6
|
provides :export
|
@@ -8,9 +8,8 @@ module Dradis::Plugins::Json
|
|
8
8
|
|
9
9
|
initializer 'dradis-json.mount_engine' do
|
10
10
|
Rails.application.routes.append do
|
11
|
-
mount Dradis::Plugins::
|
11
|
+
mount Dradis::Plugins::JSON::Engine => '/', as: :json_export
|
12
12
|
end
|
13
13
|
end
|
14
|
-
|
15
14
|
end
|
16
15
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Dradis
|
2
2
|
module Plugins
|
3
|
-
module
|
3
|
+
module JSON
|
4
4
|
# Returns the version of the currently loaded JSON as a <tt>Gem::Version</tt>
|
5
5
|
def self.gem_version
|
6
6
|
Gem::Version.new VERSION::STRING
|
@@ -8,7 +8,7 @@ module Dradis
|
|
8
8
|
|
9
9
|
module VERSION
|
10
10
|
MAJOR = 4
|
11
|
-
MINOR =
|
11
|
+
MINOR = 17
|
12
12
|
TINY = 0
|
13
13
|
PRE = nil
|
14
14
|
|
data/lib/tasks/thorfile.rb
CHANGED
@@ -21,8 +21,8 @@ class JsonExportTasks < Thor
|
|
21
21
|
|
22
22
|
detect_and_set_project_scope
|
23
23
|
|
24
|
-
json = Dradis::Plugins::
|
25
|
-
content_service: content_service_for(Dradis::Plugins::
|
24
|
+
json = Dradis::Plugins::JSON::Exporter.new.export({
|
25
|
+
content_service: content_service_for(Dradis::Plugins::JSON),
|
26
26
|
})
|
27
27
|
|
28
28
|
File.open(report_path, 'w') do |f|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dradis-json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rachael Korinek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dradis-plugins
|
@@ -82,7 +82,7 @@ files:
|
|
82
82
|
- LICENSE
|
83
83
|
- README.md
|
84
84
|
- Rakefile
|
85
|
-
- app/controllers/dradis/plugins/json/
|
85
|
+
- app/controllers/dradis/plugins/json/reports_controller.rb
|
86
86
|
- app/views/dradis/plugins/json/export/_index-content.html.erb
|
87
87
|
- app/views/dradis/plugins/json/export/_index-tabs.html.erb
|
88
88
|
- config/routes.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Dradis
|
2
|
-
module Plugins
|
3
|
-
module Json
|
4
|
-
class BaseController < Dradis::Plugins::Export::BaseController
|
5
|
-
|
6
|
-
def index
|
7
|
-
exporter = Dradis::Plugins::Json::Exporter.new(export_options)
|
8
|
-
json = exporter.export
|
9
|
-
|
10
|
-
render json: json
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|