dradis-calculator_cvss 4.12.0 → 4.14.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: ea68a10e94cb20e0854d84fa245cfbd8cbf26f6dd3ae9c9c30602667a216856f
4
- data.tar.gz: 2883a651f2bd078b4c707a78fd5081dd7dde1294c91bd9ac90e1ff3e0af3495e
3
+ metadata.gz: b87ecfb200a64c7bde0629c308d8403d90d47f20cbb282b621b21bfb0af36168
4
+ data.tar.gz: 86857a074dbb1aca4941e774fdb882330f16d946a66cca6cce77fcefa95911df
5
5
  SHA512:
6
- metadata.gz: 97bdfdfc740b2d81b59e5082a2c89e71d261ce40613ad1692484d643c92326bf28797c3dad3aa68cb6110f25493f1403482ade15fa44c081e00699f3dd13f15a
7
- data.tar.gz: 3725740d1aa3c93d36d10931e14cd67b755e2c75c0bb974efc9d3684d591b65dd024e01c8666f2e6e60dd66c423c68779110db876dd8e7f55e39bdc9663aedad
6
+ metadata.gz: 55840e477dafcaadb51349c4cf1ac82b5dc25a92dd7d47de71cbcb05ce4de9b81527b0a6fd96e43423ac5c5c3ca9c1f042cfccd67a58528b861facbd420ee186
7
+ data.tar.gz: 0ae5422f0ad9de8a7f439c35935f54481e324ca52c3088a116d9c8d9f48882a388064b80136873abbdabfedfcc9afc869a3d9f95ec16ac19c161d14163cdc36d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ v4.14.0 (October 2024)
2
+ - No changes
3
+
4
+ v4.13.0 (July 2024)
5
+ - Add ability to enable/disable calculator in the Tools Manager
6
+
1
7
  v4.12.0 (May 2024)
2
8
  - Add CVSS v4 support
3
9
 
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 = 14
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.14.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-10-21 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