modsecurity_audit_log_parser 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f70306e049985f31668a7574297f0433ef0ecad
4
- data.tar.gz: cc699989f70a1fae7bf9fa138638b10ddb32903a
3
+ metadata.gz: 4464c6964ad18450999547196eb0111826061c3e
4
+ data.tar.gz: 5401a16730fce209312cf6d59b708adeaf29788f
5
5
  SHA512:
6
- metadata.gz: 790674063871dc06eb8f7fa23dd90b8089792fd6c07800c9dac68e3f86105846cd99dcec7967a7ead4a8527879a4ad436d43b545e76ad7fdf4cf6408033eca1e
7
- data.tar.gz: f3110b9a6d9260f8a8768057c67e1785300a7596df4f2d47f6a1525d5f84ff25f562b5b189578c8381fcea6dc06ac68adda96d7ae94af31a6b697a49769e7a4d
6
+ metadata.gz: f7229341848ccac9f7e16285c0288cc6c53d134f57b1ee6184fbb74dc063976ce3303a4ad6291897bc029dec0ce26fc37cb98d2b80942999a3f6789ecf9ce2b2
7
+ data.tar.gz: 892d6f7da9bc1ba8c62b2c0afc70aa4d4bab803d8853f0c764dbc3ead5b41a2ef44e0da6958c4c88bcc80fa627ad6ddfe05428ab8a429f0d5a0d0d77840aeb85
@@ -298,6 +298,8 @@ class ModsecurityAuditLogParser
298
298
  def initialize(json)
299
299
  @tran = json[:transaction] || {}
300
300
  @producer = @tran[:producer] || {}
301
+ @request = @tran[:request] || {}
302
+ @response = @tran[:response] || {}
301
303
  @msg = (@tran[:messages] || []).first || {}
302
304
  @detail = @msg[:details] || {}
303
305
  end
@@ -320,8 +322,11 @@ class ModsecurityAuditLogParser
320
322
  client_port: @tran[:client_port],
321
323
  host_ip: @tran[:host_ip],
322
324
  host_port: @tran[:host_port],
323
- request: @tran[:request], # Hash
324
- response: @tran[:response], # Hash
325
+ request_method: @request[:method],
326
+ request_uri: @request[:uri],
327
+ request: @request, # Hash
328
+ response_http_code: @response[:http_code],
329
+ response: @response, # Hash
325
330
  producer: "#{@producer[:modsecurity]}; #{(@producer[:components] || []).join(', ')}",
326
331
  connector: @producer[:connector],
327
332
  secrules_engine: @producer[:secrules_engine],
@@ -333,6 +338,8 @@ class ModsecurityAuditLogParser
333
338
  rule_tags: (@detail[:tags] || []).join(', '),
334
339
  rule_file: @detail[:file],
335
340
  rule_line_number: @detail[:lineNumber],
341
+ rule_match: @detail[:match],
342
+ rule_reference: @detail[:reference],
336
343
  rule_data: @detail[:data],
337
344
  rule_severity: @detail[:severity],
338
345
  rule_maturity: @detail[:maturity],
@@ -1,3 +1,3 @@
1
1
  class ModsecurityAuditLogParser
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modsecurity_audit_log_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-15 00:00:00.000000000 Z
11
+ date: 2017-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler