Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/install_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install_test_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install_test_setup_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pylint_and_mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.12
- name: Set up Python 3.14
uses: actions/setup-python@v1
with:
python-version: 3.12
python-version: 3.14
- name: Install poetry
run: |
python -m pip install poetry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.12 🐍🐍🐍
- name: Set up Python 3.14 🐍🐍🐍
uses: actions/setup-python@v1
with:
python-version: 3.12
python-version: 3.14
- name: Install poetry
run: |
python -m pip install poetry
Expand Down
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ disable=
too-many-lines,
too-many-locals,
too-many-nested-blocks,
too-many-positional-arguments,
too-many-public-methods,
too-many-return-statements,
too-many-statements,
Expand Down
1,863 changes: 1,071 additions & 792 deletions poetry.lock

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "libcloudforensics"
version = "20250721"
version = "20260109"
description = "libcloudforensics is a set of tools to help acquire forensic evidence from Cloud platforms."
authors = ["cloud-forensics-utils development team <cloud-forensics-utils-dev@googlegroups.com>"]
license = "Apache-2.0"
Expand All @@ -10,7 +10,7 @@ readme = "README.md"
cloudforensics = "tools.cli:Main"

[tool.poetry.dependencies]
python = "^3.9"
python = ">=3.11"
google-api-core = "*"
azure-common = "^1.1.28"
azure-core = "^1.29.4"
Expand All @@ -35,10 +35,7 @@ sshpubkeys = "^3.3.1"
requests = "^2.31.0"
kubernetes = "^27.2.0"
pyopenssl = "^23.2.0"
urllib3 = [
{version = ">=1.25.4,<1.27", python = "<3.10"},
{version = ">=1.25.4,<2.1", python = ">=3.10"}
]
urllib3 = ">=2.6.0"
google-auth = "^2.22.0"
setuptools = "^75.8.0"

Expand Down
22 changes: 11 additions & 11 deletions tests/providers/azure/internal/test_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AZComputeTest(unittest.TestCase):
"""Test Azure compute class."""
# pylint: disable=line-too-long

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('libcloudforensics.providers.azure.internal.common.ExecuteRequest')
@typing.no_type_check
def testListInstances(self, mock_request, mock_provider):
Expand Down Expand Up @@ -59,7 +59,7 @@ def testListInstances(self, mock_request, mock_provider):
mock_request.assert_called_with(
mock.ANY, 'list', {'resource_group_name': instance.resource_group_name})

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('libcloudforensics.providers.azure.internal.common.ExecuteRequest')
@typing.no_type_check
def testListDisks(self, mock_request, mock_provider):
Expand Down Expand Up @@ -91,7 +91,7 @@ def testListDisks(self, mock_request, mock_provider):
'list_by_resource_group',
{'resource_group_name': disk.resource_group_name})

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.ListInstances')
@typing.no_type_check
def testGetInstance(self, mock_list_instances, mock_provider):
Expand All @@ -107,7 +107,7 @@ def testGetInstance(self, mock_list_instances, mock_provider):
self.assertEqual('fake-region', instance.region)
self.assertEqual(['fake-zone'], instance.zones)

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.ListDisks')
@typing.no_type_check
def testGetDisk(self, mock_list_disks, mock_provider):
Expand All @@ -123,7 +123,7 @@ def testGetDisk(self, mock_list_disks, mock_provider):
self.assertEqual('fake-region', disk.region)
self.assertEqual(['fake-zone'], disk.zones)

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.compute.v2023_10_02.operations.DisksOperations.begin_create_or_update')
@typing.no_type_check
def testCreateDiskFromSnapshot(self, mock_create_disk, mock_provider):
Expand Down Expand Up @@ -185,7 +185,7 @@ def testCreateDiskFromSnapshot(self, mock_create_disk, mock_provider):
'fake_snapshot_name_c4a46ad7_copy',
expected_args)

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('azure.storage.blob._container_client.ContainerClient.create_container')
@mock.patch('azure.storage.blob._generated._azure_blob_storage.AzureBlobStorage.__init__')
@mock.patch('azure.storage.blob._blob_service_client.BlobServiceClient.get_blob_client')
Expand Down Expand Up @@ -233,7 +233,7 @@ def testCreateDiskFromSnapshotUri(self,
'fake_snapshot_name_c4a46ad7_copy',
mock.ANY)

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('sshpubkeys.SSHKey.parse')
@mock.patch('libcloudforensics.scripts.utils.ReadStartupScript')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.GetInstance')
Expand Down Expand Up @@ -278,7 +278,7 @@ def testGetOrCreateAnalysisVm(self,
self.assertEqual('fake-analysis-vm-name', vm.name)
self.assertTrue(created)

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.ListInstanceTypes')
@typing.no_type_check
def testListVMSizes(self, mock_list, mock_provider):
Expand All @@ -292,7 +292,7 @@ def testListVMSizes(self, mock_list, mock_provider):
self.assertEqual(8192, available_vms[0]['Memory'])

@mock.patch('azure.mgmt.reservations.operations.QuotaOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.compute.v2021_07_01.operations.ResourceSkusOperations.list')
@typing.no_type_check
def testGetInstanceType(self, mock_list_instance_types, mock_provider, mock_quota):
Expand All @@ -313,7 +313,7 @@ class AZVirtualMachineTest(unittest.TestCase):
"""Test Azure virtual machine class."""
# pylint: disable=line-too-long

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.ListDisks')
@mock.patch('azure.mgmt.compute.v2023_09_01.operations.VirtualMachinesOperations.get')
@typing.no_type_check
Expand Down Expand Up @@ -344,7 +344,7 @@ def testGetDisk(self, mock_list_disk):
'/subscriptions/sub/resourceGroups/fake-resource-group/providers/'
'Microsoft.Compute/type/fake-vm-name', str(error.exception))

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.ListDisks')
@mock.patch('azure.mgmt.compute.v2023_09_01.operations.VirtualMachinesOperations.get')
@typing.no_type_check
Expand Down
6 changes: 3 additions & 3 deletions tests/providers/azure/test_forensics.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AZForensicsTest(unittest.TestCase):
"""Test Azure forensics file."""
# pylint: disable=line-too-long, too-many-arguments

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZComputeDisk.GetDiskType')
@mock.patch('libcloudforensics.providers.azure.internal.resource.AZResource.GetOrCreateResourceGroup')
@mock.patch('libcloudforensics.providers.azure.internal.common.GetCredentials')
Expand Down Expand Up @@ -82,7 +82,7 @@ def testCreateDiskCopy1(self,
self.assertIsInstance(disk_copy, compute.AZComputeDisk)
self.assertEqual('fake_snapshot_name_f4c186ac_copy', disk_copy.name)

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZComputeDisk.GetDiskType')
@mock.patch('libcloudforensics.providers.azure.internal.resource.AZResource.GetOrCreateResourceGroup')
@mock.patch('libcloudforensics.providers.azure.internal.common.GetCredentials')
Expand Down Expand Up @@ -133,7 +133,7 @@ def testCreateDiskCopy2(self,
self.assertIsInstance(disk_copy, compute.AZComputeDisk)
self.assertEqual('fake_snapshot_name_f4c186ac_copy', disk_copy.name)

@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZComputeDisk.GetDiskType')
@mock.patch('libcloudforensics.providers.azure.internal.resource.AZResource.GetOrCreateResourceGroup')
@mock.patch('libcloudforensics.providers.azure.internal.common.GetCredentials')
Expand Down
Loading