ratonvirus 0.3.2 → 0.4.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 +4 -4
- data/CHANGELOG.md +4 -8
- data/lib/ratonvirus/scanner/eicar.rb +2 -8
- data/lib/ratonvirus/storage/support/io_handling.rb +1 -6
- data/lib/ratonvirus/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 21d118c57bf1aa46d9b6bc78a3889a850d7c6a6103e3f8c01590972206807c23
|
|
4
|
+
data.tar.gz: 5745da5e8cebf691c69ef3bd9d0ad4fd3d21b222e25aa41087c55e44a372997b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa82196a8d08c1a733d967b84290eb08b41f8cbbb6b42e0f220da8c99462cc73a19dde9bef8c496a1e6e0036649921399224442624e30f574e030848551cac4f
|
|
7
|
+
data.tar.gz: 0e5e3fe8ff3216262199cccd4599dbd9a3bf97fb7ec2c6e73475615a311a27396a7f69e9bf9e39749b5bc9b242ad0c2716a41753abfb0f59962f135ae05f49f7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
# v0.
|
|
1
|
+
# v0.4.0
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- Backport: Issue with ActiveStorage file integrity check due to IO position change after the virus check
|
|
6
|
-
|
|
7
|
-
# v0.3.1
|
|
3
|
+
Support for Rails 7
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
Changed:
|
|
10
6
|
|
|
11
|
-
-
|
|
7
|
+
- The minimum Ruby version is now set to 2.7 as it is a requirement of Rails 7
|
|
12
8
|
|
|
13
9
|
# v0.3.0
|
|
14
10
|
|
|
@@ -8,13 +8,7 @@ module Ratonvirus
|
|
|
8
8
|
class Eicar < Base
|
|
9
9
|
# SHA256 digest of the EICAR test file for virus testing
|
|
10
10
|
# See: https://en.wikipedia.org/wiki/EICAR_test_file
|
|
11
|
-
|
|
12
|
-
# This includes both, the default hash and a hash with for the file saved
|
|
13
|
-
# with a newline at the end of it.
|
|
14
|
-
EICAR_SHA256 = %w(
|
|
15
|
-
275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f
|
|
16
|
-
131f95c51cc819465fa1797f6ccacf9d494aaaff46fa3eac73ae63ffbdfd8267
|
|
17
|
-
).freeze
|
|
11
|
+
EICAR_SHA256 = "131f95c51cc819465fa1797f6ccacf9d494aaaff46fa3eac73ae63ffbdfd8267"
|
|
18
12
|
|
|
19
13
|
class << self
|
|
20
14
|
def executable?
|
|
@@ -27,7 +21,7 @@ module Ratonvirus
|
|
|
27
21
|
def run_scan(path)
|
|
28
22
|
if File.file?(path)
|
|
29
23
|
sha256 = Digest::SHA256.file path
|
|
30
|
-
errors << :antivirus_virus_detected if EICAR_SHA256
|
|
24
|
+
errors << :antivirus_virus_detected if sha256 == EICAR_SHA256
|
|
31
25
|
else
|
|
32
26
|
errors << :antivirus_file_not_found
|
|
33
27
|
end
|
|
@@ -22,12 +22,7 @@ module Ratonvirus
|
|
|
22
22
|
|
|
23
23
|
begin
|
|
24
24
|
tempfile.binmode
|
|
25
|
-
|
|
26
|
-
# cannot specify src_offset for non-IO
|
|
27
|
-
IO.copy_stream(io, tempfile)
|
|
28
|
-
else
|
|
29
|
-
IO.copy_stream(io, tempfile, nil, 0)
|
|
30
|
-
end
|
|
25
|
+
IO.copy_stream(io, tempfile)
|
|
31
26
|
tempfile.flush
|
|
32
27
|
tempfile.rewind
|
|
33
28
|
|
data/lib/ratonvirus/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ratonvirus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Antti Hukkanen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-03-
|
|
11
|
+
date: 2022-03-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '7.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '7.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -86,28 +86,28 @@ dependencies:
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
89
|
+
version: '7.0'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
96
|
+
version: '7.0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: activestorage
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
103
|
+
version: '7.0'
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
110
|
+
version: '7.0'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: carrierwave
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -193,14 +193,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
193
193
|
requirements:
|
|
194
194
|
- - ">="
|
|
195
195
|
- !ruby/object:Gem::Version
|
|
196
|
-
version: '2.
|
|
196
|
+
version: '2.7'
|
|
197
197
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
198
|
requirements:
|
|
199
199
|
- - ">="
|
|
200
200
|
- !ruby/object:Gem::Version
|
|
201
201
|
version: '0'
|
|
202
202
|
requirements: []
|
|
203
|
-
rubygems_version: 3.
|
|
203
|
+
rubygems_version: 3.1.6
|
|
204
204
|
signing_key:
|
|
205
205
|
specification_version: 4
|
|
206
206
|
summary: Provides antivirus checks for Rails.
|