metasploit_data_models 5.0.6 → 6.0.1

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: 507d624327960ae9ad2055e39b92350caa4f5c1e045f4c72885b9ed4666206d8
4
- data.tar.gz: 4d4910b9e92ae2c2b245b592c145104c957212c0782f7f64dc4db51d2a099264
3
+ metadata.gz: f333c3459571e05e20f07d721beebdc344cb447b4c2cd6b2bcb2396e7651ce83
4
+ data.tar.gz: a3dfefb5d451cc212a0b0daebc67ae602177a42680e17eb234cfb7df4803f0d5
5
5
  SHA512:
6
- metadata.gz: 7559d185736e6efd66db60a061eeae9f231654cf43a794fe90f14078deffcf14f353b05e40449627e2a6b207c1db5e482c59491e2876c3a90b9800f64455a38e
7
- data.tar.gz: 4edb158f27af03fcdbd76b62d25497966214fdcd4a1c3a7b4a4ec25a958f2ecbe78e0265dd46f4cb138dc5695910257c37a51685015b1cbc657aa30b2876661a
6
+ metadata.gz: 1acd8ba4b655bba25146fcc63cd937908bafa3467b9c9d28b41d9206230690452db52e648da63bef56c8c0cab2aa809d153b6e20eb0e405bbe4d53de049c5064
7
+ data.tar.gz: 8f6c91d80d9e39ca666a64f0805a9a73e3a734364d82fc0b3293c0647f37d8a8cebd49d4cd3cc792448ecdbfddf78545b7ea6e13b7db79ee0e9bb852cc8781fe
checksums.yaml.gz.sig CHANGED
Binary file
@@ -46,17 +46,15 @@ jobs:
46
46
  fail-fast: true
47
47
  matrix:
48
48
  ruby:
49
- - 2.6
50
49
  - 2.7
51
50
  - 3.0
52
51
  - 3.1
53
52
  os:
54
- - ubuntu-18.04
55
- - ubuntu-22.04
53
+ - ubuntu-20.04
54
+ - ubuntu-latest
56
55
  exclude:
57
- - { os: ubuntu-22.04, ruby: 2.6 }
58
- - { os: ubuntu-22.04, ruby: 2.7 }
59
- - { os: ubuntu-22.04, ruby: 3.0 }
56
+ - { os: ubuntu-latest, ruby: 2.7 }
57
+ - { os: ubuntu-latest, ruby: 3.0 }
60
58
 
61
59
  env:
62
60
  RAILS_ENV: test
data/Gemfile CHANGED
@@ -19,7 +19,7 @@ group :development, :test do
19
19
  # auto-load factories from spec/factories
20
20
  gem 'factory_bot_rails'
21
21
 
22
- gem 'rails', '~> 6.0'
22
+ gem 'rails'
23
23
  gem 'net-smtp', require: false
24
24
 
25
25
  # Used to create fake data
@@ -38,7 +38,9 @@ class Mdm::HostTag < ApplicationRecord
38
38
  # @see http://stackoverflow.com/a/11694704
39
39
  # @return [void]
40
40
  def destroy_orphan_tag
41
- tag.destroy_if_orphaned
41
+ # ensure fresh load of tag record
42
+ # in theory this will always return one result safe navigation is just "extra"
43
+ Mdm::Tag.where(id: tag.id).first&.destroy_if_orphaned
42
44
  end
43
45
 
44
46
  # switch back to public for load hooks
@@ -31,6 +31,7 @@ class Mdm::Loot < ApplicationRecord
31
31
  # @return [Mdm::Host]
32
32
  belongs_to :host,
33
33
  class_name: 'Mdm::Host',
34
+ optional: true, # allow for manually stored loot
34
35
  inverse_of: :loots
35
36
 
36
37
  # @!attribute [rw] module_run
@@ -100,7 +100,8 @@ class Mdm::Tag < ApplicationRecord
100
100
  # @return [void]
101
101
  def destroy_if_orphaned
102
102
  self.class.transaction do
103
- if hosts_tags.empty?
103
+ # call `.count` to avoid serialization of any Mdm::HostTag that may exist
104
+ if hosts_tags.count == 0
104
105
  destroy
105
106
  end
106
107
  end
@@ -18,7 +18,7 @@ class Mdm::Workspace < ApplicationRecord
18
18
 
19
19
  # Automatic exploitation match sets generated against {#hosts} and {#services} in this workspace.
20
20
  has_many :automatic_exploitation_match_sets,
21
- class_name: 'MetasploitDataModels::AutomaticExploitation:MatchSet',
21
+ class_name: 'MetasploitDataModels::AutomaticExploitation::MatchSet',
22
22
  inverse_of: :workspace
23
23
 
24
24
 
@@ -5,7 +5,6 @@ require 'rails'
5
5
  class MetasploitDataModels::Engine < Rails::Engine
6
6
  # @see http://viget.com/extend/rails-engine-testing-with-rspec-capybara-and-factorygirl
7
7
  config.generators do |g|
8
- g.assets false
9
8
  g.fixture_replacement :factory_bot, :dir => 'spec/factories'
10
9
  g.helper false
11
10
  g.test_framework :rspec, :fixture => false
@@ -1,6 +1,6 @@
1
1
  module MetasploitDataModels
2
2
  # VERSION is managed by GemRelease
3
- VERSION = '5.0.6'
3
+ VERSION = '6.0.1'
4
4
 
5
5
  # @return [String]
6
6
  #
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.require_paths = %w{app/models app/validators lib}
19
19
 
20
- s.required_ruby_version = '>= 2.4'
20
+ s.required_ruby_version = '>= 2.7'
21
21
 
22
22
  # ---- Dependencies ----
23
23
  # documentation
@@ -33,11 +33,11 @@ Gem::Specification.new do |s|
33
33
  s.add_development_dependency 'pry'
34
34
 
35
35
 
36
- s.add_runtime_dependency 'activerecord', '~>6.0'
37
- s.add_runtime_dependency 'activesupport', '~>6.0'
36
+ s.add_runtime_dependency 'activerecord', '~>7.0'
37
+ s.add_runtime_dependency 'activesupport', '~>7.0'
38
38
  s.add_runtime_dependency 'metasploit-concern'
39
39
  s.add_runtime_dependency 'metasploit-model', '>=3.1'
40
- s.add_runtime_dependency 'railties', '~>6.0'
40
+ s.add_runtime_dependency 'railties', '~>7.0'
41
41
  s.add_runtime_dependency 'webrick'
42
42
 
43
43
  # os fingerprinting
@@ -4,7 +4,7 @@ RSpec.describe Mdm::Loot, type: :model do
4
4
  context 'associations' do
5
5
  it { is_expected.to belong_to(:workspace).class_name('Mdm::Workspace') }
6
6
  it { is_expected.to belong_to(:service).optional.class_name('Mdm::Service') }
7
- it { is_expected.to belong_to(:host).class_name('Mdm::Host') }
7
+ it { is_expected.to belong_to(:host).optional.class_name('Mdm::Host') }
8
8
  it { is_expected.to belong_to(:module_run).optional.class_name('MetasploitDataModels::ModuleRun') }
9
9
  end
10
10
 
@@ -56,13 +56,9 @@ module Dummy
56
56
  # 5.x change to belongs_to
57
57
  config.active_record.belongs_to_required_by_default = true
58
58
 
59
- # Enable the asset pipeline
60
- config.assets.enabled = false
61
-
62
- # Version of your assets, change this if you want to expire all your assets
63
- config.assets.version = '1.0'
64
-
65
59
  config.autoloader = :zeitwerk
60
+
61
+ ActiveRecord.legacy_connection_handling = false
66
62
  end
67
63
  end
68
64
 
@@ -22,16 +22,6 @@ Rails.application.configure do
22
22
  # Raise an error on page load if there are pending migrations.
23
23
  config.active_record.migration_error = :page_load
24
24
 
25
- # Debug mode disables concatenation and preprocessing of assets.
26
- # This option may cause significant delays in view rendering with a large
27
- # number of complex assets.
28
- config.assets.debug = true
29
-
30
- # Adds additional error checking when serving assets at runtime.
31
- # Checks for improperly declared sprockets dependencies.
32
- # Raises helpful error messages.
33
- config.assets.raise_runtime_errors = true
34
-
35
25
  # Raises error for missing translations
36
26
  # config.action_view.raise_on_missing_translations = true
37
27
  end
@@ -22,18 +22,6 @@ Rails.application.configure do
22
22
  # Disable Rails's static asset server (Apache or nginx will already do this).
23
23
  config.serve_static_assets = false
24
24
 
25
- # Compress JavaScripts and CSS.
26
- config.assets.js_compressor = :uglifier
27
- # config.assets.css_compressor = :sass
28
-
29
- # Do not fallback to assets pipeline if a precompiled asset is missed.
30
- config.assets.compile = false
31
-
32
- # Generate digests for assets URLs.
33
- config.assets.digest = true
34
-
35
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
36
-
37
25
  # Specifies the header that your server uses for sending files.
38
26
  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
39
27
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit_data_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.6
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -93,7 +93,7 @@ cert_chain:
93
93
  EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
94
94
  9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
95
95
  -----END CERTIFICATE-----
96
- date: 2022-11-01 00:00:00.000000000 Z
96
+ date: 2022-12-21 00:00:00.000000000 Z
97
97
  dependencies:
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: metasploit-yard
@@ -185,28 +185,28 @@ dependencies:
185
185
  requirements:
186
186
  - - "~>"
187
187
  - !ruby/object:Gem::Version
188
- version: '6.0'
188
+ version: '7.0'
189
189
  type: :runtime
190
190
  prerelease: false
191
191
  version_requirements: !ruby/object:Gem::Requirement
192
192
  requirements:
193
193
  - - "~>"
194
194
  - !ruby/object:Gem::Version
195
- version: '6.0'
195
+ version: '7.0'
196
196
  - !ruby/object:Gem::Dependency
197
197
  name: activesupport
198
198
  requirement: !ruby/object:Gem::Requirement
199
199
  requirements:
200
200
  - - "~>"
201
201
  - !ruby/object:Gem::Version
202
- version: '6.0'
202
+ version: '7.0'
203
203
  type: :runtime
204
204
  prerelease: false
205
205
  version_requirements: !ruby/object:Gem::Requirement
206
206
  requirements:
207
207
  - - "~>"
208
208
  - !ruby/object:Gem::Version
209
- version: '6.0'
209
+ version: '7.0'
210
210
  - !ruby/object:Gem::Dependency
211
211
  name: metasploit-concern
212
212
  requirement: !ruby/object:Gem::Requirement
@@ -241,14 +241,14 @@ dependencies:
241
241
  requirements:
242
242
  - - "~>"
243
243
  - !ruby/object:Gem::Version
244
- version: '6.0'
244
+ version: '7.0'
245
245
  type: :runtime
246
246
  prerelease: false
247
247
  version_requirements: !ruby/object:Gem::Requirement
248
248
  requirements:
249
249
  - - "~>"
250
250
  - !ruby/object:Gem::Version
251
- version: '6.0'
251
+ version: '7.0'
252
252
  - !ruby/object:Gem::Dependency
253
253
  name: webrick
254
254
  requirement: !ruby/object:Gem::Requirement
@@ -675,7 +675,6 @@ files:
675
675
  - spec/dummy/config/environments/production.rb
676
676
  - spec/dummy/config/environments/test.rb
677
677
  - spec/dummy/config/initializers/active_record_migrations.rb
678
- - spec/dummy/config/initializers/assets.rb
679
678
  - spec/dummy/config/initializers/backtrace_silencers.rb
680
679
  - spec/dummy/config/initializers/cookies_serializer.rb
681
680
  - spec/dummy/config/initializers/filter_parameter_logging.rb
@@ -779,15 +778,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
779
778
  requirements:
780
779
  - - ">="
781
780
  - !ruby/object:Gem::Version
782
- version: '2.4'
781
+ version: '2.7'
783
782
  required_rubygems_version: !ruby/object:Gem::Requirement
784
783
  requirements:
785
784
  - - ">="
786
785
  - !ruby/object:Gem::Version
787
786
  version: '0'
788
787
  requirements: []
789
- rubyforge_project:
790
- rubygems_version: 2.7.10
788
+ rubygems_version: 3.1.4
791
789
  signing_key:
792
790
  specification_version: 4
793
791
  summary: Database code for MSF and Metasploit Pro
metadata.gz.sig CHANGED
Binary file
@@ -1,8 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Version of your assets, change this if you want to expire all your assets.
4
- Rails.application.config.assets.version = '1.0'
5
-
6
- # Precompile additional assets.
7
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
- # Rails.application.config.assets.precompile += %w( search.js )