uc3-dmp-id 0.0.18 → 0.0.20

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: d066d2f35fda60e96486334123aedbbd7978eea786d379551dd4fef411be8981
4
- data.tar.gz: e72d2a53d14636420066f18b41c8d72729e58b50e81b4d27fe1801522f24b028
3
+ metadata.gz: e84b042a11d5d1893e86e830075d4ef603bc3d8698bf136b94f5b32da2aae630
4
+ data.tar.gz: 5a54094d523dc898b8c27da23e264fe9d4dcf817225481f40d6f0edd5aa07a78
5
5
  SHA512:
6
- metadata.gz: 66a91931568d189eb44d1eee182ac044039f1836b5ed9e63ce3a137208a1bae200f4cdf075a3aa3bfb61570087d48e733db511cfb19e260cd2e3542c19ac7df0
7
- data.tar.gz: 0d50822613d923836b21abd0665bfeee501d122ec920632dd1f7c7f4f5863e24a7a555ff393e2f57c28c646d24be7d2d5bfcaf06cdc1965cd1163c0b61729eba
6
+ metadata.gz: eaf77b71c05cf49fe36cec8902db8a6bb25a28ffce5298111ef4c7a95c70e6a0fae762c1b663c19167c1a2c846e801943ad41442eae8db4cd97e5a0ffa8d34d3
7
+ data.tar.gz: d10d3cbcb0e419983802df48a6d2a38586edada3ff29ed6cfd50b11e435dae9d063c402816a991d1e21a53c910c10a3e775fa1758e1c2d0ca012a074ebca3ca4
@@ -6,6 +6,8 @@ module Uc3DmpId
6
6
  class Creator
7
7
  class << self
8
8
 
9
+ # TODO: include new 'dmphub_owner_org' top level entry with the ROR of the 'contact'
10
+
9
11
  end
10
12
  end
11
13
  end
@@ -34,10 +34,6 @@ module Uc3DmpId
34
34
  scan_index_forward: false
35
35
  }
36
36
  client = client.nil? ? Uc3DmpDynamo::Client.new(debug: debug) : client
37
-
38
- puts "VERSION SEARCH:"
39
- puts args
40
-
41
37
  client.query(args: args, debug: debug)
42
38
  end
43
39
 
@@ -65,9 +61,6 @@ puts args
65
61
  raise Uc3DmpIdFinderError, MSG_MISSING_PK if p_key.nil?
66
62
 
67
63
  s_key = Helper::DMP_LATEST_VERSION if s_key.nil? || s_key.to_s.strip.empty?
68
-
69
- puts "PK: #{p_key}, SK: #{s_key}"
70
-
71
64
  client = client.nil? ? Uc3DmpDynamo::Client.new(debug: debug) : client
72
65
  resp = client.get_item(
73
66
  key: {
@@ -77,13 +70,11 @@ puts "PK: #{p_key}, SK: #{s_key}"
77
70
  )
78
71
  return resp unless resp.is_a?(Hash)
79
72
 
80
- puts "FETCHED:"
81
- puts resp
82
-
83
73
  dmp = resp['dmp'].nil? ? JSON.parse({ dmp: resp }.to_json) : resp
84
74
  return nil if dmp['dmp']['PK'].nil?
85
75
 
86
- _append_versions(p_key: dmp['dmp']['PK'], dmp: dmp, client: client, debug: debug)
76
+ dmp = _append_versions(p_key: dmp['dmp']['PK'], dmp: dmp, client: client, debug: debug)
77
+ Helper.cleanse_dmp_json(json: dmp)
87
78
  end
88
79
 
89
80
  # Attempt to find the DMP item by the provenance system's identifier
@@ -121,15 +112,10 @@ puts resp
121
112
  def _append_versions(p_key:, dmp:, client: nil, debug: false)
122
113
  return dmp if p_key.nil? || !dmp.is_a?(Hash) || dmp['dmp'].nil?
123
114
 
124
- puts "FETCHING VERSIONS"
125
-
126
115
  results = versions(p_key: p_key, client: client, debug: debug)
127
116
  return dmp unless results.length > 1
128
117
 
129
118
  versions = results.map do |ver|
130
-
131
- puts ver
132
-
133
119
  next if ver['modified'].nil?
134
120
  {
135
121
  timestamp: ver['modified'],
@@ -137,10 +123,6 @@ puts ver
137
123
  }
138
124
  end
139
125
  dmp['dmp']['dmphub_versions'] = JSON.parse(versions.to_json)
140
-
141
- puts "AFTER APPENDING VERSIONS:"
142
- puts dmp
143
-
144
126
  dmp
145
127
  end
146
128
  # rubocop:enable Metrics/AbcSize
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.18'
4
+ VERSION = '0.0.20'
5
5
  end
@@ -2,6 +2,8 @@
2
2
  WAF analysis
3
3
  ===========================================================
4
4
 
5
+ Is there a rule to block incessent requests for the same bad URL? For example `/nuclei.svg?fc9dz=x` was requested over a 100 times!
6
+
5
7
  AWS#AWSManagedRulesCommonRuleSet#NoUserAgent_HEADER
6
8
  Action: REMOVE THIS RULE? I feel like this one will cause more harm then good
7
9
  Blocking: /
@@ -66,7 +68,7 @@ AWS#AWSManagedRulesAmazonIpReputationList#AWSManagedReconnaissanceList
66
68
  /header.php
67
69
 
68
70
  AWS#AWSManagedRulesCommonRuleSet#CrossSiteScripting_BODY
69
- Actions: Add exception for /answers/create_or_update (or better yet address it)
71
+ Actions: Add exception for /answers/create_or_update (or better yet address it) BLOCK all others
70
72
  Blocking: /answers/create_or_update?question_id=17592
71
73
  /content/crx/de/setPreferences.jsp;%0A.html?keymap=<svg/onload=confirm(document.domain)>//a&language=en
72
74
  /7/0/33/1d/www.citysearch.com/search?what=x&where=place%22%3E%3Csvg+onload=confirm(document.domain)%3E
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley