dradis-calculator_cvss 4.12.0 → 4.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea68a10e94cb20e0854d84fa245cfbd8cbf26f6dd3ae9c9c30602667a216856f
4
- data.tar.gz: 2883a651f2bd078b4c707a78fd5081dd7dde1294c91bd9ac90e1ff3e0af3495e
3
+ metadata.gz: f82faa99521fce223adbac8573d81816a7220b6e458963ae8ff1584661e6e4c0
4
+ data.tar.gz: bd1c63c74eb94f08b3435f806226873ec60920b3e3014b5f97fb0944a6acfb73
5
5
  SHA512:
6
- metadata.gz: 97bdfdfc740b2d81b59e5082a2c89e71d261ce40613ad1692484d643c92326bf28797c3dad3aa68cb6110f25493f1403482ade15fa44c081e00699f3dd13f15a
7
- data.tar.gz: 3725740d1aa3c93d36d10931e14cd67b755e2c75c0bb974efc9d3684d591b65dd024e01c8666f2e6e60dd66c423c68779110db876dd8e7f55e39bdc9663aedad
6
+ metadata.gz: 1c36e17b6b184197c7eccb1261ece3f361d493cc05d937211641a6f6b5081f61d590a3640e9a6a9cbf844f9b712e3050271c52d8af4c0dacb7f851e57423d86e
7
+ data.tar.gz: d7aa100798815e471e68eefeb33864b8112f0809e95377ae564b76a4ac0ce68dfd1e512ca0bb01b1d17c063fd938b75c835a1b50aeb257ed825ce2b8249d919c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ v4.13.0 (July 2024)
2
+ - Add ability to enable/disable calculator in the Tools Manager
3
+
1
4
  v4.12.0 (May 2024)
2
5
  - Add CVSS v4 support
3
6
 
data/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  This simple add-on adds a new page under `/calculators/cvss` for you to perform CVSS score calculations:
4
4
 
5
- ![cvss_calculator](https://cloud.githubusercontent.com/assets/53006/12947493/f01cb53a-cffb-11e5-8f48-19072a3bd8c8.png)
5
+ ![cvss4_calculator](https://github.com/dradis/dradis-calculator_cvss/assets/111541062/fd957a70-c068-4453-908e-be50beff9325)
6
6
 
7
- The Common Vulnerability Scoring System (CVSS) Version 3.0 & 3.1 Calculator is heavily inspired in the one provided by [FIRST](https://www.first.org/cvss/calculator/3.0).
7
+ The Common Vulnerability Scoring System (CVSS) Version 4.0, 3.1, 3.0 Calculator is heavily inspired in the one provided by [FIRST](https://www.first.org/cvss/calculator/3.0).
8
8
 
9
9
 
10
10
  ## Install
@@ -1,4 +1,3 @@
1
- <% if Dradis::Plugins::Calculators::CVSS::Engine.settings.show.to_i == 1 %>
2
1
  <div class="tab-pane" id="cvss-tab">
3
2
  <div class="inner">
4
3
  <h4 class="header-underline">CVSS Risk Scoring -
@@ -33,4 +32,3 @@
33
32
  </div>
34
33
  </div>
35
34
  </div>
36
- <% end %>
@@ -1,5 +1,3 @@
1
- <% if Dradis::Plugins::Calculators::CVSS::Engine.settings.show.to_i == 1 %>
2
- <li class="nav-item">
3
- <a href="#cvss-tab" data-bs-toggle="tab" class="nav-link"><i class="fa-solid fa-calculator"></i> CVSS</a>
4
- </li>
5
- <% end %>
1
+ <li class="nav-item">
2
+ <a href="#cvss-tab" data-bs-toggle="tab" class="nav-link"><i class="fa-solid fa-calculator"></i> CVSS</a>
3
+ </li>
@@ -21,6 +21,6 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_dependency 'dradis-plugins', '~> 4.0'
23
23
 
24
- spec.add_development_dependency 'bundler', '~> 1.6'
24
+ spec.add_development_dependency 'bundler', '~> 2.0'
25
25
  spec.add_development_dependency 'rake', '~> 10.0'
26
26
  end
@@ -6,10 +6,6 @@ module Dradis::Plugins::Calculators::CVSS
6
6
  provides :addon
7
7
  description 'Risk Calculator: CVSS'
8
8
 
9
- addon_settings :calculator_cvss do
10
- settings.default_show = 1
11
- end
12
-
13
9
  initializer 'calculator_cvss.asset_precompile_paths' do |app|
14
10
  app.config.assets.precompile += [
15
11
  'dradis/plugins/calculators/cvss/manifests/application.css',
@@ -26,10 +22,20 @@ module Dradis::Plugins::Calculators::CVSS
26
22
  end
27
23
 
28
24
  initializer 'calculator_cvss.mount_engine' do
29
- Rails.application.routes.append do
30
- mount Dradis::Plugins::Calculators::CVSS::Engine => '/', as: :cvss_calculator
25
+ # By default, this engine is loaded into the main app. So, upon app
26
+ # initialization, we first check if the DB is loaded and the Configuration
27
+ # table has been created, before checking if the engine is enabled
28
+ Rails.application.reloader.to_prepare do
29
+ if (ActiveRecord::Base.connection rescue false) && ::Configuration.table_exists?
30
+ Rails.application.routes.append do
31
+ # Enabling/disabling integrations calls Rails.application.reload_routes! we need the enable
32
+ # check inside the block to ensure the routes can be re-enabled without a server restart
33
+ if Engine.enabled?
34
+ mount Engine => '/', as: :cvss_calculator
35
+ end
36
+ end
37
+ end
31
38
  end
32
39
  end
33
-
34
40
  end
35
41
  end
@@ -9,7 +9,7 @@ module Dradis
9
9
 
10
10
  module VERSION
11
11
  MAJOR = 4
12
- MINOR = 12
12
+ MINOR = 13
13
13
  TINY = 0
14
14
  PRE = nil
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-calculator_cvss
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.12.0
4
+ version: 4.13.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-05-07 00:00:00.000000000 Z
11
+ date: 2024-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
33
+ version: '2.0'
34
34
  type: :development
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: '1.6'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement