dradis-json 4.16.0 → 4.18.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 +9 -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 +4 -8
- 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: eb2ce04e6b339afae212d9b7edea99cf49f1b37e67593c497ab7ce023f2e6e6b
|
4
|
+
data.tar.gz: 0fffeb040250d094bba5418a0d85f6e3e512648a82a05ee625406012882b9b79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3ec45bca3b0cf57cb36637ef00424492964a1deec00d64c61ffa242820cd9b081800e6ef333ebf924f1c0e28914bf00fe2463ee0ac38c01309f56cf1a999226
|
7
|
+
data.tar.gz: 1685cfc7061261b2ee7048219543b7f2d1dc2dfac983ba51b954050b4a23d10e059c9df003681c88713673c965595d6156958dd4ec1eaa5f1921aee596295b13
|
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 = 18
|
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,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dradis-json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rachael Korinek
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: dradis-plugins
|
@@ -67,7 +66,6 @@ dependencies:
|
|
67
66
|
- !ruby/object:Gem::Version
|
68
67
|
version: '0'
|
69
68
|
description: This plugin allows you to export your Dradis results in JSON format.
|
70
|
-
email:
|
71
69
|
executables: []
|
72
70
|
extensions: []
|
73
71
|
extra_rdoc_files: []
|
@@ -82,7 +80,7 @@ files:
|
|
82
80
|
- LICENSE
|
83
81
|
- README.md
|
84
82
|
- Rakefile
|
85
|
-
- app/controllers/dradis/plugins/json/
|
83
|
+
- app/controllers/dradis/plugins/json/reports_controller.rb
|
86
84
|
- app/views/dradis/plugins/json/export/_index-content.html.erb
|
87
85
|
- app/views/dradis/plugins/json/export/_index-tabs.html.erb
|
88
86
|
- config/routes.rb
|
@@ -100,7 +98,6 @@ homepage: http://dradis.com
|
|
100
98
|
licenses:
|
101
99
|
- GPL-2
|
102
100
|
metadata: {}
|
103
|
-
post_install_message:
|
104
101
|
rdoc_options: []
|
105
102
|
require_paths:
|
106
103
|
- lib
|
@@ -115,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
112
|
- !ruby/object:Gem::Version
|
116
113
|
version: '0'
|
117
114
|
requirements: []
|
118
|
-
rubygems_version: 3.
|
119
|
-
signing_key:
|
115
|
+
rubygems_version: 3.6.9
|
120
116
|
specification_version: 4
|
121
117
|
summary: JSON export plugin for the Dradis Framework.
|
122
118
|
test_files:
|
@@ -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
|