cloudcheck 6.0.0.651__tar.gz → 6.0.0.655__tar.gz
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.
Potentially problematic release.
This version of cloudcheck might be problematic. Click here for more details.
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/PKG-INFO +1 -1
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloud_providers.json +13 -12
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/base.py +2 -1
- cloudcheck-6.0.0.655/cloudcheck/providers/cloudfront.py +21 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/test/test_cloudcheck.py +8 -7
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/pyproject.toml +1 -1
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/README.md +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/__init__.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/cloudcheck.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/helpers.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/__init__.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/akamai.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/amazon.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/azure.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/cloudflare.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/digitalocean.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/fastly.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/github.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/google.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/hetzner.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/imperva.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/oracle.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/providers/zoho.py +0 -0
- {cloudcheck-6.0.0.651 → cloudcheck-6.0.0.655}/cloudcheck/test/__init__.py +0 -0
|
@@ -823,6 +823,7 @@
|
|
|
823
823
|
"104.99.57.0/24",
|
|
824
824
|
"104.99.59.0/24",
|
|
825
825
|
"104.99.60.0/22",
|
|
826
|
+
"109.230.127.0/24",
|
|
826
827
|
"109.237.24.0/22",
|
|
827
828
|
"109.69.136.0/21",
|
|
828
829
|
"109.74.192.0/20",
|
|
@@ -11737,7 +11738,7 @@
|
|
|
11737
11738
|
"srtcdn.net"
|
|
11738
11739
|
],
|
|
11739
11740
|
"ips_url": "https://techdocs.akamai.com/property-manager/pdfs/akamai_ipv4_ipv6_CIDRs-txt.zip",
|
|
11740
|
-
"last_updated": "2024-11-
|
|
11741
|
+
"last_updated": "2024-11-16T18:48:42.004046",
|
|
11741
11742
|
"name": "Akamai",
|
|
11742
11743
|
"provider_type": "cdn",
|
|
11743
11744
|
"regexes": {}
|
|
@@ -17946,7 +17947,7 @@
|
|
|
17946
17947
|
"thinkboxsoftware.com"
|
|
17947
17948
|
],
|
|
17948
17949
|
"ips_url": "https://ip-ranges.amazonaws.com/ip-ranges.json",
|
|
17949
|
-
"last_updated": "2024-11-
|
|
17950
|
+
"last_updated": "2024-11-16T18:48:41.536097",
|
|
17950
17951
|
"name": "Amazon",
|
|
17951
17952
|
"provider_type": "cloud",
|
|
17952
17953
|
"regexes": {
|
|
@@ -21643,7 +21644,7 @@
|
|
|
21643
21644
|
"windowsazurestatus.cn"
|
|
21644
21645
|
],
|
|
21645
21646
|
"ips_url": "https://download.microsoft.com/download/0/1/8/018E208D-54F8-44CD-AA26-CD7BC9524A8C/PublicIPs_20200824.xml",
|
|
21646
|
-
"last_updated": "2024-11-
|
|
21647
|
+
"last_updated": "2024-11-16T18:48:37.194433",
|
|
21647
21648
|
"name": "Azure",
|
|
21648
21649
|
"provider_type": "cloud",
|
|
21649
21650
|
"regexes": {
|
|
@@ -21714,7 +21715,7 @@
|
|
|
21714
21715
|
"workers.dev"
|
|
21715
21716
|
],
|
|
21716
21717
|
"ips_url": "https://api.cloudflare.com/client/v4/ips",
|
|
21717
|
-
"last_updated": "2024-11-
|
|
21718
|
+
"last_updated": "2024-11-16T18:48:41.060765",
|
|
21718
21719
|
"name": "Cloudflare",
|
|
21719
21720
|
"provider_type": "cdn",
|
|
21720
21721
|
"regexes": {
|
|
@@ -22881,7 +22882,7 @@
|
|
|
22881
22882
|
"nginxconfig.io"
|
|
22882
22883
|
],
|
|
22883
22884
|
"ips_url": "https://digitalocean.com/geo/google.csv",
|
|
22884
|
-
"last_updated": "2024-11-
|
|
22885
|
+
"last_updated": "2024-11-16T18:48:47.275013",
|
|
22885
22886
|
"name": "DigitalOcean",
|
|
22886
22887
|
"provider_type": "cloud",
|
|
22887
22888
|
"regexes": {
|
|
@@ -22923,7 +22924,7 @@
|
|
|
22923
22924
|
"zencdn.net"
|
|
22924
22925
|
],
|
|
22925
22926
|
"ips_url": "https://api.fastly.com/public-ip-list",
|
|
22926
|
-
"last_updated": "2024-11-
|
|
22927
|
+
"last_updated": "2024-11-16T18:48:40.596272",
|
|
22927
22928
|
"name": "Fastly",
|
|
22928
22929
|
"provider_type": "cloud",
|
|
22929
22930
|
"regexes": {}
|
|
@@ -27959,7 +27960,7 @@
|
|
|
27959
27960
|
"github.com"
|
|
27960
27961
|
],
|
|
27961
27962
|
"ips_url": "https://api.github.com/meta",
|
|
27962
|
-
"last_updated": "2024-11-
|
|
27963
|
+
"last_updated": "2024-11-16T18:48:37.659989",
|
|
27963
27964
|
"name": "GitHub",
|
|
27964
27965
|
"provider_type": "cdn",
|
|
27965
27966
|
"regexes": {}
|
|
@@ -28694,7 +28695,7 @@
|
|
|
28694
28695
|
"googleapis.com"
|
|
28695
28696
|
],
|
|
28696
28697
|
"ips_url": "https://www.gstatic.com/ipranges/cloud.json",
|
|
28697
|
-
"last_updated": "2024-11-
|
|
28698
|
+
"last_updated": "2024-11-16T18:48:47.741847",
|
|
28698
28699
|
"name": "Google",
|
|
28699
28700
|
"provider_type": "cloud",
|
|
28700
28701
|
"regexes": {
|
|
@@ -29176,7 +29177,7 @@
|
|
|
29176
29177
|
"your-server.de"
|
|
29177
29178
|
],
|
|
29178
29179
|
"ips_url": "",
|
|
29179
|
-
"last_updated": "2024-11-
|
|
29180
|
+
"last_updated": "2024-11-16T18:48:44.667553",
|
|
29180
29181
|
"name": "Hetzner",
|
|
29181
29182
|
"provider_type": "cloud",
|
|
29182
29183
|
"regexes": {
|
|
@@ -29221,7 +29222,7 @@
|
|
|
29221
29222
|
"imperva.com"
|
|
29222
29223
|
],
|
|
29223
29224
|
"ips_url": "https://my.imperva.com/api/integration/v1/ips",
|
|
29224
|
-
"last_updated": "2024-11-
|
|
29225
|
+
"last_updated": "2024-11-16T18:48:38.134915",
|
|
29225
29226
|
"name": "Imperva",
|
|
29226
29227
|
"provider_type": "cdn",
|
|
29227
29228
|
"regexes": {}
|
|
@@ -30007,7 +30008,7 @@
|
|
|
30007
30008
|
"sun.com"
|
|
30008
30009
|
],
|
|
30009
30010
|
"ips_url": "https://docs.oracle.com/en-us/iaas/tools/public_ip_ranges.json",
|
|
30010
|
-
"last_updated": "2024-11-
|
|
30011
|
+
"last_updated": "2024-11-16T18:48:34.078200",
|
|
30011
30012
|
"name": "Oracle",
|
|
30012
30013
|
"provider_type": "cloud",
|
|
30013
30014
|
"regexes": {}
|
|
@@ -30086,7 +30087,7 @@
|
|
|
30086
30087
|
"zohowebstatic.com"
|
|
30087
30088
|
],
|
|
30088
30089
|
"ips_url": "",
|
|
30089
|
-
"last_updated": "2024-11-
|
|
30090
|
+
"last_updated": "2024-11-16T18:48:34.574834",
|
|
30090
30091
|
"name": "Zoho",
|
|
30091
30092
|
"provider_type": "cloud",
|
|
30092
30093
|
"regexes": {}
|
|
@@ -93,7 +93,6 @@ class BaseCloudProvider:
|
|
|
93
93
|
global asndb
|
|
94
94
|
asndb = pyasn.pyasn("asn.db")
|
|
95
95
|
try:
|
|
96
|
-
self.last_updated = datetime.now()
|
|
97
96
|
self.ranges = self.get_subnets()
|
|
98
97
|
if self.ips_url:
|
|
99
98
|
async with httpx.AsyncClient(
|
|
@@ -107,6 +106,7 @@ class BaseCloudProvider:
|
|
|
107
106
|
ranges = self.parse_response(response)
|
|
108
107
|
if ranges:
|
|
109
108
|
self.update_ranges(ranges)
|
|
109
|
+
self.last_updated = datetime.now()
|
|
110
110
|
except Exception as e:
|
|
111
111
|
log.warning(f"Error retrieving {self.ips_url}: {e}")
|
|
112
112
|
log.warning(traceback.format_exc())
|
|
@@ -117,6 +117,7 @@ class BaseCloudProvider:
|
|
|
117
117
|
for asn in self.asns:
|
|
118
118
|
prefixes = asndb.get_as_prefixes(asn)
|
|
119
119
|
if prefixes:
|
|
120
|
+
self.last_updated = datetime.now()
|
|
120
121
|
for subnet in prefixes:
|
|
121
122
|
subnets.add(ipaddress.ip_network(subnet, strict=False))
|
|
122
123
|
return subnets
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from .base import BaseCloudProvider
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Cloudfront(BaseCloudProvider):
|
|
5
|
+
ips_url = "https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips"
|
|
6
|
+
# https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/LocationsOfEdgeServers.html
|
|
7
|
+
domains = [
|
|
8
|
+
"cloudfront.com",
|
|
9
|
+
"cloudfront.net",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
provider_type = "cdn"
|
|
13
|
+
|
|
14
|
+
def parse_response(self, response):
|
|
15
|
+
ranges = set()
|
|
16
|
+
response_json = response.json()
|
|
17
|
+
if not isinstance(response_json, dict):
|
|
18
|
+
raise ValueError(f"Invalid response format: {type(response_json)}")
|
|
19
|
+
for ranges in response_json.values():
|
|
20
|
+
ranges.update(ranges)
|
|
21
|
+
return ranges
|
|
@@ -9,18 +9,19 @@ from cloudcheck import cloud_providers
|
|
|
9
9
|
@pytest.mark.asyncio
|
|
10
10
|
async def test_cloudcheck():
|
|
11
11
|
provider_names = (
|
|
12
|
+
"akamai",
|
|
12
13
|
"amazon",
|
|
13
|
-
"google",
|
|
14
|
-
"hetzner",
|
|
15
14
|
"azure",
|
|
16
|
-
"digitalocean",
|
|
17
|
-
"oracle",
|
|
18
|
-
"akamai",
|
|
19
15
|
"cloudflare",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
16
|
+
"cloudfront",
|
|
17
|
+
"digitalocean",
|
|
22
18
|
"fastly",
|
|
19
|
+
"github",
|
|
20
|
+
"google",
|
|
21
|
+
"hetzner",
|
|
23
22
|
"imperva",
|
|
23
|
+
"oracle",
|
|
24
|
+
"zoho",
|
|
24
25
|
)
|
|
25
26
|
for provider_name in provider_names:
|
|
26
27
|
assert provider_name in cloud_providers.providers
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|