uc3-dmp-id 0.0.19 → 0.0.21
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 +4 -4
 - data/lib/uc3-dmp-id/creator.rb +2 -0
 - data/lib/uc3-dmp-id/finder.rb +1 -7
 - data/lib/uc3-dmp-id/helper.rb +3 -0
 - data/lib/uc3-dmp-id/version.rb +1 -1
 - data/lib/uc3-dmp-id/waf_analysis_2023-06-05.txt +3 -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: fa1a63e00e317587dc9bba2ce165b400a4f2ea4cb72f9af62db6703ba83ebe88
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 778c12434dc38726d18260912b4d46f488f865afad4ab000fc76d97b689a7cfd
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 65e1c3f23cd91b366f59c67f85d210736dcdf54c63d5c5e3a727300ecaf7479c88af91c5ed91e08662f972050e83fa44bf3d411a43f3463fd97539b73cd1415a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d996426a6899f7ce753256818af9b68ad8552756711b4da755d465f42f3d0312c4e6b302802d833bb1262890c8537fd9bf482156b2bf582123dae2dee7de79be
         
     | 
    
        data/lib/uc3-dmp-id/creator.rb
    CHANGED
    
    
    
        data/lib/uc3-dmp-id/finder.rb
    CHANGED
    
    | 
         @@ -61,9 +61,6 @@ module Uc3DmpId 
     | 
|
| 
       61 
61 
     | 
    
         
             
                    raise Uc3DmpIdFinderError, MSG_MISSING_PK if p_key.nil?
         
     | 
| 
       62 
62 
     | 
    
         | 
| 
       63 
63 
     | 
    
         
             
                    s_key = Helper::DMP_LATEST_VERSION if s_key.nil? || s_key.to_s.strip.empty?
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
            puts "PK: #{p_key}, SK: #{s_key}"
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
64 
     | 
    
         
             
                    client = client.nil? ? Uc3DmpDynamo::Client.new(debug: debug) : client
         
     | 
| 
       68 
65 
     | 
    
         
             
                    resp = client.get_item(
         
     | 
| 
       69 
66 
     | 
    
         
             
                      key: {
         
     | 
| 
         @@ -73,14 +70,11 @@ puts "PK: #{p_key}, SK: #{s_key}" 
     | 
|
| 
       73 
70 
     | 
    
         
             
                    )
         
     | 
| 
       74 
71 
     | 
    
         
             
                    return resp unless resp.is_a?(Hash)
         
     | 
| 
       75 
72 
     | 
    
         | 
| 
       76 
     | 
    
         
            -
            puts "FETCHED:"
         
     | 
| 
       77 
     | 
    
         
            -
            puts resp
         
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
73 
     | 
    
         
             
                    dmp = resp['dmp'].nil? ? JSON.parse({ dmp: resp }.to_json) : resp
         
     | 
| 
       80 
74 
     | 
    
         
             
                    return nil if dmp['dmp']['PK'].nil?
         
     | 
| 
       81 
75 
     | 
    
         | 
| 
       82 
76 
     | 
    
         
             
                    dmp = _append_versions(p_key: dmp['dmp']['PK'], dmp: dmp, client: client, debug: debug)
         
     | 
| 
       83 
     | 
    
         
            -
                    cleanse_dmp_json(json: dmp)
         
     | 
| 
      
 77 
     | 
    
         
            +
                    Helper.cleanse_dmp_json(json: dmp)
         
     | 
| 
       84 
78 
     | 
    
         
             
                  end
         
     | 
| 
       85 
79 
     | 
    
         | 
| 
       86 
80 
     | 
    
         
             
                  # Attempt to find the DMP item by the provenance system's identifier
         
     | 
    
        data/lib/uc3-dmp-id/helper.rb
    CHANGED
    
    | 
         @@ -116,6 +116,9 @@ module Uc3DmpId 
     | 
|
| 
       116 
116 
     | 
    
         
             
                  def cleanse_dmp_json(json:)
         
     | 
| 
       117 
117 
     | 
    
         
             
                    return json unless json.is_a?(Hash) || json.is_a?(Array)
         
     | 
| 
       118 
118 
     | 
    
         | 
| 
      
 119 
     | 
    
         
            +
            puts "CLEANSING"
         
     | 
| 
      
 120 
     | 
    
         
            +
            puts json
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
       119 
122 
     | 
    
         
             
                    # If it's an array clean each of the objects individually
         
     | 
| 
       120 
123 
     | 
    
         
             
                    return json.map { |obj| cleanse_dmp_json(json: obj) }.compact if json.is_a?(Array)
         
     | 
| 
       121 
124 
     | 
    
         | 
    
        data/lib/uc3-dmp-id/version.rb
    CHANGED
    
    
| 
         @@ -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
         
     |