google / cloud-forensics-utils

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

Auto-create network security group when VM is created in Azure #236

Closed giovannt0 closed 4 years ago

giovannt0 commented 4 years ago

Since the official Azure CLI tool creates a default network security group when creating a VM (e.g. through az vm create --name=vm_name --resource-group=resource_group_name --image=UbuntuLTS --admin-username=azureuser --generate-ssh-keys), add the same functionality to libcloudforensics, so that only SSH connection is allowed on the VM. Other outbound / inbound connexions are denied by default (see https://docs.microsoft.com/en-us/azure/virtual-network/security-overview#default-security-rules)

codecov-commenter commented 4 years ago

Codecov Report

Merging #236 into master will increase coverage by 2.22%. The diff coverage is 70.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
+ Coverage   65.39%   67.62%   +2.22%     
==========================================
  Files          14       28      +14     
  Lines         968     1992    +1024     
==========================================
+ Hits          633     1347     +714     
- Misses        335      645     +310     
Flag Coverage Δ
#nosetests 67.62% <70.93%> (+2.22%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...cloudforensics/providers/azure/internal/network.py 23.52% <23.52%> (ø)
libcloudforensics/providers/aws/internal/kms.py 38.23% <38.23%> (ø)
libcloudforensics/providers/aws/forensics.py 56.75% <51.06%> (-13.02%) :arrow_down:
libcloudforensics/providers/gcp/forensics.py 54.92% <51.11%> (-10.08%) :arrow_down:
...ibcloudforensics/providers/gcp/internal/compute.py 56.56% <51.93%> (-5.80%) :arrow_down:
...cs/providers/gcp/internal/compute_base_resource.py 37.33% <52.94%> (+0.82%) :arrow_up:
libcloudforensics/providers/aws/internal/log.py 73.07% <55.55%> (-4.20%) :arrow_down:
...loudforensics/providers/azure/internal/resource.py 65.38% <65.38%> (ø)
...ibcloudforensics/providers/gcp/internal/project.py 61.90% <66.66%> (-3.81%) :arrow_down:
...cloudforensics/providers/azure/internal/compute.py 69.83% <69.83%> (ø)
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 09b0c43...9c85943. Read the comment docs.