ratonvirus 0.4.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 +12 -0
- data/lib/ratonvirus/scanner/eicar.rb +8 -2
- data/lib/ratonvirus/version.rb +1 -1
- metadata +1 -1
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,9 @@
|
|
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
|
+
|
1
7
|
# v0.4.0
|
2
8
|
|
3
9
|
Support for Rails 7
|
@@ -6,6 +12,12 @@ Changed:
|
|
6
12
|
|
7
13
|
- The minimum Ruby version is now set to 2.7 as it is a requirement of Rails 7
|
8
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
|
+
|
9
21
|
# v0.3.0
|
10
22
|
|
11
23
|
Changed:
|
@@ -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
|
data/lib/ratonvirus/version.rb
CHANGED