scopes_extractor 0.4.0 → 0.6.0

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
  SHA256:
3
- metadata.gz: 95cac573681be20212d7983aa2dbc9d6f7764c5454d3289eaa0b1dc8029183ed
4
- data.tar.gz: e05c83b53ae0980ab98f2a2d67b2f92b2ca57ae80acd851ce3de04c07e85bd6e
3
+ metadata.gz: 53708b2ee96a050695c28add808c5b8bf8cdfb7e6497aa5d35f0aff99fe7cca3
4
+ data.tar.gz: 1c598a6d8de2708c3b8431e84ac8456dde7f9e4f468d69e2c29e9e36ea26b4f0
5
5
  SHA512:
6
- metadata.gz: a087cc7e23fc0412556587194f25ffbfd1d2c94032a45aa99bf332868cef27e12eda2c9615cd43a8f14c26b0a2e59238ae33d610a2b754fcf5d46681c23b63d5
7
- data.tar.gz: 7d3af7abf76821b52340ddd6eb0129c04d370f26aa4f07be8752f7b40868757c3c907191556e6a42c98afd57b70b71d2db952aa262986c86119954d32aa61c22
6
+ metadata.gz: 74947fc21e47e8373e92598b38f856241f837051f86d9de70cd5a857ee12daf6c1ecc111d69ff3652ca1a459bd66c69deb3989ff7d23f35ff65580075a861c16
7
+ data.tar.gz: e34117a9518c303601948111c24beafb2c3f4b594891c11eef01240a19bcc76ee94e4ce0670da6323db796553d8c85a0dfdce3bbf6fcd6ae42d17664b88308a6
@@ -33,8 +33,9 @@ class Bugcrowd
33
33
  scopes.each do |scope|
34
34
  next unless scope['category'] == 'website' || scope['category'] == 'api'
35
35
 
36
- endpoint = scope['name']
36
+ endpoint = scope['name'].split.first
37
37
  next if exclusions.any? { |exclusion| endpoint.include?(exclusion) } || !endpoint.include?('.')
38
+ next if endpoint.include?('*') && !endpoint.start_with?('*.')
38
39
 
39
40
  scopes_normalized << endpoint
40
41
  end
@@ -26,6 +26,9 @@ class Hackerone
26
26
  normalized = normalized(endpoint)
27
27
 
28
28
  normalized.each do |asset|
29
+ next unless asset.include?('.')
30
+ next if asset.include?('*') && !asset.start_with?('*.')
31
+
29
32
  scopes_normalized << asset
30
33
  end
31
34
  end
@@ -52,10 +52,10 @@ class Intigriti
52
52
  def self.extract_description(description)
53
53
  return [] unless description
54
54
 
55
- match = description.match(/In Scope(.*)Out of Scope/)
55
+ match = description.match(/In Scope(.*)Out of Scope/im)
56
56
  return unless match && match[1]
57
57
 
58
- match[1].scan(/\*\.[\w.-]+/)
58
+ match[1].scan(/\*\.[\w.-]+\.\w+/)
59
59
  end
60
60
  end
61
61
  end
@@ -26,6 +26,7 @@ class YesWeHack
26
26
  normalized = normalize(infos['scope'])
27
27
  normalized.each do |asset|
28
28
  next unless asset.include?('.')
29
+ next if asset.include?('*') && !asset.start_with?('*.')
29
30
 
30
31
  scopes_normalized << asset
31
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scopes_extractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua MARTINELLE