ronin-db-activerecord 0.1.1 → 0.1.3
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/.document +0 -1
- data/.github/workflows/ruby.yml +2 -2
- data/ChangeLog.md +14 -0
- data/README.md +3 -2
- data/gemspec.yml +2 -2
- data/lib/ronin/db/address.rb +4 -2
- data/lib/ronin/db/asn.rb +2 -2
- data/lib/ronin/db/email_address.rb +1 -1
- data/lib/ronin/db/host_name.rb +1 -1
- data/lib/ronin/db/host_name_ip_address.rb +1 -1
- data/lib/ronin/db/http_query_param_name.rb +1 -1
- data/lib/ronin/db/http_request.rb +1 -1
- data/lib/ronin/db/http_response.rb +1 -1
- data/lib/ronin/db/ip_address_mac_address.rb +1 -1
- data/lib/ronin/db/mac_address.rb +2 -2
- data/lib/ronin/db/model/last_scanned_at.rb +1 -1
- data/lib/ronin/db/open_port.rb +1 -1
- data/lib/ronin/db/organization.rb +1 -1
- data/lib/ronin/db/os.rb +2 -2
- data/lib/ronin/db/os_guess.rb +1 -1
- data/lib/ronin/db/software.rb +2 -2
- data/lib/ronin/db/url.rb +1 -1
- data/lib/ronin/db/url_query_param_name.rb +1 -1
- data/lib/ronin/db/user_name.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1955e0bb44de72a102427476e4a30818b24e9bd752fba63df6f848335886e335
|
|
4
|
+
data.tar.gz: dd85e3447194d1f9f12be6e239867e3ab1cae5823ee8a26d82f084a54ed69ee3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8d910cee63ce24acfa4856b342627c3c9899dc66da57b477bc1fa7736e79a2dcc9f11d14736c5e2006f80e6ed871e73d9c7af6036db1e6d6e211b7319eb190a9
|
|
7
|
+
data.tar.gz: 01f5b3d036f3757d39778c3a345fc9bea9804d18189a550e13010dcd52ee7fcb7c0873fcf1aaa93e71b3fd1376cfb51653e17bfaa4eb35f17d5a950497522362
|
data/.document
CHANGED
data/.github/workflows/ruby.yml
CHANGED
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
- truffleruby
|
|
17
17
|
name: Ruby ${{ matrix.ruby }}
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
20
|
- name: Set up Ruby
|
|
21
21
|
uses: ruby/setup-ruby@v1
|
|
22
22
|
with:
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
rubocop:
|
|
36
36
|
runs-on: ubuntu-latest
|
|
37
37
|
steps:
|
|
38
|
-
- uses: actions/checkout@
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
39
|
- name: Set up Ruby
|
|
40
40
|
uses: ruby/setup-ruby@v1
|
|
41
41
|
with:
|
data/ChangeLog.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
### 0.1.3 / 2023-10-14
|
|
2
|
+
|
|
3
|
+
* Require [activerecord] `~> 7.0, < 7.1.0`.
|
|
4
|
+
* **Note:** [activerecord] 7.1.0 changed it's internal migration APIs which
|
|
5
|
+
`ronin-db-activerecord` was using to run migrations.
|
|
6
|
+
|
|
7
|
+
### 0.1.2 / 2023-09-19
|
|
8
|
+
|
|
9
|
+
* Fix {Ronin::DB::MACAddress#address} validation regex to match the whole
|
|
10
|
+
string.
|
|
11
|
+
* Use `:datetime` instead of `:time` for `created_at` attributes.
|
|
12
|
+
* Documentation improvements.
|
|
13
|
+
|
|
1
14
|
### 0.1.1 / 2023-04-04
|
|
2
15
|
|
|
3
16
|
* Reordered database migrations so they can be ran in correct order on
|
|
@@ -47,3 +60,4 @@
|
|
|
47
60
|
* {Ronin::DB::Vulnerability}
|
|
48
61
|
* {Ronin::DB::WebCredential}
|
|
49
62
|
|
|
63
|
+
[activerecord]: https://github.com/rails/rails/tree/main/activerecord#readme
|
data/README.md
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* [Issues](https://github.com/ronin-rb/ronin-db-activerecord/issues)
|
|
10
10
|
* [Documentation](https://ronin-rb.dev/docs/ronin-db-activerecord/frames)
|
|
11
11
|
* [Discord](https://discord.gg/6WAb3PsVX9) |
|
|
12
|
-
[Twitter](https://twitter.com/ronin_rb) |
|
|
13
12
|
[Mastodon](https://infosec.exchange/@ronin_rb)
|
|
14
13
|
|
|
15
14
|
## Description
|
|
@@ -121,7 +120,9 @@ Ronin::DB::Models.connect
|
|
|
121
120
|
## Requirements
|
|
122
121
|
|
|
123
122
|
* [Ruby] >= 3.0.0
|
|
124
|
-
* [activerecord] ~> 7.0
|
|
123
|
+
* [activerecord] ~> 7.0, < 7.1.0
|
|
124
|
+
* **Note:** [activerecord] 7.1.0 changed it's internal migration APIs which
|
|
125
|
+
`ronin-db-activerecord` was using to run migrations.
|
|
125
126
|
|
|
126
127
|
## Install
|
|
127
128
|
|
data/gemspec.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: ronin-db-activerecord
|
|
2
|
-
version: 0.1.
|
|
2
|
+
version: 0.1.3
|
|
3
3
|
summary: ActiveRecord backend for the Ronin Database
|
|
4
4
|
description:
|
|
5
5
|
ronin-db-activerecord contains ActiveRecord models and migrations for the
|
|
@@ -22,7 +22,7 @@ required_ruby_version: ">= 3.0.0"
|
|
|
22
22
|
|
|
23
23
|
dependencies:
|
|
24
24
|
uri-query_params: ~> 0.6
|
|
25
|
-
activerecord: ~> 7.0
|
|
25
|
+
activerecord: ~> 7.0, < 7.1.0
|
|
26
26
|
|
|
27
27
|
development_dependencies:
|
|
28
28
|
bundler: ~> 2.0
|
data/lib/ronin/db/address.rb
CHANGED
|
@@ -58,7 +58,7 @@ module Ronin
|
|
|
58
58
|
# Tracks when the IP Address was first created
|
|
59
59
|
#
|
|
60
60
|
# @return [Time]
|
|
61
|
-
attribute :created_at, :
|
|
61
|
+
attribute :created_at, :datetime
|
|
62
62
|
|
|
63
63
|
#
|
|
64
64
|
# Looks up the address.
|
|
@@ -69,6 +69,8 @@ module Ronin
|
|
|
69
69
|
# @return [Address, nil]
|
|
70
70
|
# The found address.
|
|
71
71
|
#
|
|
72
|
+
# @api public
|
|
73
|
+
#
|
|
72
74
|
def self.lookup(address)
|
|
73
75
|
find_by(address: address)
|
|
74
76
|
end
|
|
@@ -80,7 +82,7 @@ module Ronin
|
|
|
80
82
|
# The address to parse.
|
|
81
83
|
#
|
|
82
84
|
# @return [Address]
|
|
83
|
-
# The
|
|
85
|
+
# The imported address.
|
|
84
86
|
#
|
|
85
87
|
# @api public
|
|
86
88
|
#
|
data/lib/ronin/db/asn.rb
CHANGED
|
@@ -82,13 +82,13 @@ module Ronin
|
|
|
82
82
|
# @!attribute [rw] country_code
|
|
83
83
|
# The country code of the ASN.
|
|
84
84
|
#
|
|
85
|
-
# @return [String]
|
|
85
|
+
# @return [String, nil]
|
|
86
86
|
attribute :country_code, :string
|
|
87
87
|
|
|
88
88
|
# @!attribute [rw] name
|
|
89
89
|
# The organization the ASN is currently assigned to.
|
|
90
90
|
#
|
|
91
|
-
# @return [String]
|
|
91
|
+
# @return [String, nil]
|
|
92
92
|
attribute :name, :string
|
|
93
93
|
|
|
94
94
|
#
|
data/lib/ronin/db/host_name.rb
CHANGED
data/lib/ronin/db/mac_address.rb
CHANGED
|
@@ -34,12 +34,12 @@ module Ronin
|
|
|
34
34
|
# The MAC address.
|
|
35
35
|
#
|
|
36
36
|
# @return [String]
|
|
37
|
-
attribute :address, :string
|
|
37
|
+
attribute :address, :string
|
|
38
38
|
validates :address, presence: true,
|
|
39
39
|
uniqueness: true,
|
|
40
40
|
length: {maximum: 17},
|
|
41
41
|
format: {
|
|
42
|
-
with:
|
|
42
|
+
with: /\A[0-9a-fA-F]{2}(?::[0-9a-fA-F]{2}){5}\z/,
|
|
43
43
|
message: 'Must be a valid MAC address'
|
|
44
44
|
}
|
|
45
45
|
|
data/lib/ronin/db/open_port.rb
CHANGED
data/lib/ronin/db/os.rb
CHANGED
|
@@ -51,14 +51,14 @@ module Ronin
|
|
|
51
51
|
#
|
|
52
52
|
# @return [String]
|
|
53
53
|
attribute :version, :string
|
|
54
|
-
validates :version, presence:
|
|
54
|
+
validates :version, presence: true,
|
|
55
55
|
uniqueness: {scope: :name}
|
|
56
56
|
|
|
57
57
|
# @!attribute [rw] os_guesses
|
|
58
58
|
# Any OS guesses for the Operating System.
|
|
59
59
|
#
|
|
60
60
|
# @return [Array<OSGuess>]
|
|
61
|
-
has_many :os_guesses, dependent:
|
|
61
|
+
has_many :os_guesses, dependent: :destroy,
|
|
62
62
|
class_name: 'OSGuess'
|
|
63
63
|
|
|
64
64
|
# @!attribute [rw] ip_addresses
|
data/lib/ronin/db/os_guess.rb
CHANGED
data/lib/ronin/db/software.rb
CHANGED
|
@@ -49,14 +49,14 @@ module Ronin
|
|
|
49
49
|
#
|
|
50
50
|
# @return [String]
|
|
51
51
|
attribute :version, :string
|
|
52
|
-
validates :version, presence:
|
|
52
|
+
validates :version, presence: true,
|
|
53
53
|
uniqueness: {scope: :name}
|
|
54
54
|
|
|
55
55
|
# @!attribute [rw] vendor
|
|
56
56
|
# The vendor of the software
|
|
57
57
|
#
|
|
58
58
|
# @return [SoftwareVendor, nil]
|
|
59
|
-
belongs_to :vendor, optional:
|
|
59
|
+
belongs_to :vendor, optional: true,
|
|
60
60
|
class_name: 'SoftwareVendor'
|
|
61
61
|
|
|
62
62
|
# @!attribute [rw] open_ports
|
data/lib/ronin/db/url.rb
CHANGED
data/lib/ronin/db/user_name.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ronin-db-activerecord
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Postmodern
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: uri-query_params
|
|
@@ -31,6 +31,9 @@ dependencies:
|
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '7.0'
|
|
34
|
+
- - "<"
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: 7.1.0
|
|
34
37
|
type: :runtime
|
|
35
38
|
prerelease: false
|
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -38,6 +41,9 @@ dependencies:
|
|
|
38
41
|
- - "~>"
|
|
39
42
|
- !ruby/object:Gem::Version
|
|
40
43
|
version: '7.0'
|
|
44
|
+
- - "<"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 7.1.0
|
|
41
47
|
- !ruby/object:Gem::Dependency
|
|
42
48
|
name: bundler
|
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|