ratonvirus 0.3.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/lib/ratonvirus/scanner/eicar.rb +8 -2
- data/lib/ratonvirus/storage/carrierwave.rb +3 -0
- 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: 027fd97e056390ebc3f0eff82c492afc83a4e92f1020d05f556c87d29d358e4d
|
4
|
+
data.tar.gz: c144da909ec456c23a17be3f04fb34fe4c314584eed310f17b39fcfe99da0ca6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e7ea0fc1e99cf8ed987a17f83262e38ff648f9a26b34de96e9de91705fc8ffab99dd94b6dff70451a661b605a4f711e56de183aba21e48b6fbce15415d2ede5
|
7
|
+
data.tar.gz: ce610990fcb99df22fdb3f87fb423a6ccfaca5494f886da9042f7af645ce8600e1d5873e65b6d613b31cd30a012dfcac92695313980e35114ee587719c3d541c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
# v0.4.1
|
2
|
+
|
3
|
+
Fixed:
|
4
|
+
|
5
|
+
- Issue related to the EICAR test scanner. Related to [#16](https://github.com/mainio/ratonvirus/pull/16)
|
6
|
+
|
7
|
+
# v0.4.0
|
8
|
+
|
9
|
+
Support for Rails 7
|
10
|
+
|
11
|
+
Changed:
|
12
|
+
|
13
|
+
- The minimum Ruby version is now set to 2.7 as it is a requirement of Rails 7
|
14
|
+
|
15
|
+
# v0.3.1
|
16
|
+
|
17
|
+
Fixed:
|
18
|
+
|
19
|
+
- Issue related to the EICAR test scanner. Related to [#16](https://github.com/mainio/ratonvirus/pull/16)
|
20
|
+
|
1
21
|
# v0.3.0
|
2
22
|
|
3
23
|
Changed:
|
@@ -18,6 +38,12 @@ a changes concept in the library which this update takes in to account. In the n
|
|
18
38
|
to the storage service before the validations have been successful, which led to rethinking how this storage engine
|
19
39
|
works in Ratonvirus.
|
20
40
|
|
41
|
+
# v0.1.2
|
42
|
+
|
43
|
+
Fixed:
|
44
|
+
|
45
|
+
- Backport: Issue related with scanning files with CarrierWave storage engine using remote storage engines such as Fog.
|
46
|
+
Related to #9
|
21
47
|
|
22
48
|
# v0.1.1
|
23
49
|
|
@@ -8,7 +8,13 @@ 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
|
-
|
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
|
12
18
|
|
13
19
|
class << self
|
14
20
|
def executable?
|
@@ -21,7 +27,7 @@ module Ratonvirus
|
|
21
27
|
def run_scan(path)
|
22
28
|
if File.file?(path)
|
23
29
|
sha256 = Digest::SHA256.file path
|
24
|
-
errors << :antivirus_virus_detected if sha256
|
30
|
+
errors << :antivirus_virus_detected if EICAR_SHA256.include?(sha256.to_s)
|
25
31
|
else
|
26
32
|
errors << :antivirus_file_not_found
|
27
33
|
end
|
@@ -37,8 +37,11 @@ module Ratonvirus
|
|
37
37
|
|
38
38
|
def asset_remove(asset)
|
39
39
|
path = asset.file.path
|
40
|
+
delete_dir = asset.file.is_a?(::CarrierWave::SanitizedFile)
|
40
41
|
asset.remove!
|
41
42
|
|
43
|
+
return unless delete_dir
|
44
|
+
|
42
45
|
# Remove the temp cache dir if it exists
|
43
46
|
dir = File.dirname(path)
|
44
47
|
FileUtils.remove_dir(dir) if File.directory?(dir)
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antti Hukkanen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
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.
|