scopes_extractor 0.5.0 → 0.6.0

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: f4d182543a95c5350e15e48ac31e9294144bbfac8b8ab7b46c2fe473e0e29853
4
- data.tar.gz: a7b9dd659a243d2c9714a807824d11631040ee4e199756b79d99f5dbf5f5c7e5
3
+ metadata.gz: 53708b2ee96a050695c28add808c5b8bf8cdfb7e6497aa5d35f0aff99fe7cca3
4
+ data.tar.gz: 1c598a6d8de2708c3b8431e84ac8456dde7f9e4f468d69e2c29e9e36ea26b4f0
5
5
  SHA512:
6
- metadata.gz: 3b7dce096f56b17a31ad146b8f2b6b0c0f11643fa703f77410b4b0f1de2cf2ef9dc0557849144e9abef3628216032a909d5d65bb5d385a2a382d9eb6c718c5b6
7
- data.tar.gz: 44c364cd7de7a23903e380dc1d6d367a55ac81143054bae1688b0eaf2de80efb0d59bcf5464fdbdf223c298ab24821f65ceedb11cb26fbfbd8a0f2e69e5b4e84
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
@@ -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.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua MARTINELLE