google / cloud-forensics-utils

Python library to carry out DFIR analysis on the Cloud
Apache License 2.0
452 stars 89 forks source link

Disk copy with reserved name prefix fails #469

Open jonathan-greig opened 1 year ago

jonathan-greig commented 1 year ago

Disks for some instances have a reserved name prefix e.g. aef- and attempting to create a disk snapshot with same prefix fails.

libcloudforensics should either avoid creating cloud resources with a reserved name prefix or at least provide an optional prefix argument for when this does occur.

jonathan-greig commented 1 year ago

A temp fix was to change https://github.com/google/cloud-forensics-utils/blob/a71b13c3a7108e4d37879007617203c5e34170ff/libcloudforensics/providers/gcp/forensics.py#L89 to


    snapshot, created = disk_to_copy.Snapshot(
        snapshot_name='fix-' + disk_to_copy.name)```