metasploit_data_models 5.0.6 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -1
- data/.github/workflows/verify.yml +4 -6
- data/Gemfile +1 -1
- data/app/models/mdm/host_tag.rb +3 -1
- data/app/models/mdm/tag.rb +2 -1
- data/app/models/mdm/workspace.rb +1 -1
- data/lib/metasploit_data_models/engine.rb +0 -1
- data/lib/metasploit_data_models/version.rb +1 -1
- data/metasploit_data_models.gemspec +4 -4
- data/spec/dummy/config/application.rb +2 -6
- data/spec/dummy/config/environments/development.rb +0 -10
- data/spec/dummy/config/environments/production.rb +0 -12
- data.tar.gz.sig +0 -0
- metadata +9 -10
- metadata.gz.sig +0 -0
- data/spec/dummy/config/initializers/assets.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34ebbe62c0392161c1ac0cc6fb78264eb1e9dcdfee1512e1951c8ac2ad7625cc
|
4
|
+
data.tar.gz: 7d10985f37643d1f87a2482072aa8b25920713f5ad4994789b7266c4d1aaac9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38e6e0252f557548c3803de5b17418795a8072842c707c2c1d2bea51769dd7b099ef1d57e6e260fde3a6ac9ddabfb7700765d99b8858b6da0a6110f52b542d5a
|
7
|
+
data.tar.gz: 7fc77506c277ea62abc873cd68d9945249617d92c74382f26ad4527e3b2788a227c94d1fcc1fa02a56de4a670b5157f45bb37547c4af34911c686008db226c33
|
checksums.yaml.gz.sig
CHANGED
@@ -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-
|
55
|
-
- ubuntu-
|
53
|
+
- ubuntu-20.04
|
54
|
+
- ubuntu-latest
|
56
55
|
exclude:
|
57
|
-
- { os: ubuntu-
|
58
|
-
- { os: ubuntu-
|
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
data/app/models/mdm/host_tag.rb
CHANGED
@@ -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
|
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
|
data/app/models/mdm/tag.rb
CHANGED
@@ -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
|
-
|
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
|
data/app/models/mdm/workspace.rb
CHANGED
@@ -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
|
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
|
@@ -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.
|
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', '~>
|
37
|
-
s.add_runtime_dependency 'activesupport', '~>
|
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', '~>
|
40
|
+
s.add_runtime_dependency 'railties', '~>7.0'
|
41
41
|
s.add_runtime_dependency 'webrick'
|
42
42
|
|
43
43
|
# os fingerprinting
|
@@ -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:
|
4
|
+
version: 6.0.0
|
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-
|
96
|
+
date: 2022-11-29 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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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,7 +778,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
779
778
|
requirements:
|
780
779
|
- - ">="
|
781
780
|
- !ruby/object:Gem::Version
|
782
|
-
version: '2.
|
781
|
+
version: '2.7'
|
783
782
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
784
783
|
requirements:
|
785
784
|
- - ">="
|
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 )
|