security-gem 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f2eecdfc5fb7ffdb08c8233fbc0c31528364e5e787241bc89351b3ceb54c844
4
- data.tar.gz: e5d719157b9158bca6784763a1f8e0d6fcbcb08f11bc11246d6e14b979352753
3
+ metadata.gz: 91195d81663461672214a7b6dd7e6b255f1a9560447d97931dcbafdb5b3d7703
4
+ data.tar.gz: 3c56de327c041550882758d7874b9ded3ed693c897cde0740629cd93baca1291
5
5
  SHA512:
6
- metadata.gz: 19bf4b7bf2291c2a4c5f704829f7f78b03e0726d977fdf3c72171f01c51993c3e5ee21b854407f6ff72ab089fac36822a3be9ed113603e934884c166dc039d63
7
- data.tar.gz: c5914aa0c01e1978d1a2774ad2d13866e8d6bf3c3b3f20b3a40e3debb8c9588d0a748f48201754a34ca528350662eb5a8271109d2fbd917536e02ae7ae324233
6
+ metadata.gz: dae9cc4b1068fc4379719a45ff3c499a4fd89c8013ed9855947bf416b6ad87f12f983b040377373d8848bd25678a8455ebfb522180f1f9147ae77a5b9dcd160a
7
+ data.tar.gz: 7a625a3b0f0513eb6c2a226c52625326c2d8596ac90737be8101b83fad6120f36b9457ed2a0c4ed2df915c07323670b2a3f9828037bbf2c40cb4931516fac017
data/Gemfile CHANGED
@@ -8,3 +8,5 @@ gemspec
8
8
  gem "rake", "~> 13.0"
9
9
 
10
10
  gem "rubocop", "~> 0.80"
11
+
12
+ gem 'colored', '~> 1.2'
data/Gemfile.lock CHANGED
@@ -1,12 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- security-gem (0.1.5)
4
+ security-gem (0.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.2)
10
+ colored (1.2)
10
11
  parallel (1.22.1)
11
12
  parser (3.1.2.0)
12
13
  ast (~> 2.4.1)
@@ -32,6 +33,7 @@ PLATFORMS
32
33
  x86_64-darwin-20
33
34
 
34
35
  DEPENDENCIES
36
+ colored (~> 1.2)
35
37
  rake (~> 13.0)
36
38
  rubocop (~> 0.80)
37
39
  security-gem!
@@ -19,6 +19,7 @@ require 'logger'
19
19
  require 'logger/formatter'
20
20
  require 'net/http'
21
21
  require 'dotenv'
22
+ require 'colored'
22
23
  Dotenv.load
23
24
 
24
25
  module SecurityLogger
@@ -55,7 +56,9 @@ module SecurityLogger
55
56
  end
56
57
 
57
58
  message = {:threat => "sql_injection_attack", :input => input, :ip_origin => @ip_origin}
59
+ puts
58
60
  logger.warn(JSON.parse(message.to_json))
61
+ puts
59
62
  return
60
63
  end
61
64
 
@@ -116,7 +119,9 @@ module SecurityLogger
116
119
  end
117
120
 
118
121
  message = {:threat => "xss_attack", :input => input, :ip_origin => @ip_origin}
122
+ puts
119
123
  logger.warn(JSON.parse(message.to_json))
124
+ puts
120
125
  end
121
126
 
122
127
  def check_input(input)
@@ -176,7 +181,9 @@ module SecurityLogger
176
181
  end
177
182
 
178
183
  message = {:threat => "uncommon_user_agent", :input => input, :ip_origin => @ip_origin}
184
+ puts
179
185
  logger.warn(JSON.parse(message.to_json))
186
+ puts
180
187
  end
181
188
 
182
189
  def check_input(input)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Security
4
4
  module Gem
5
- VERSION = "0.1.5"
5
+ VERSION = "0.1.6"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: security-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - tuckerweibell