mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
New queries to detect unsafe client side encryption in Azure Storage
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
blob_client = blob_service_client.get_blob_client(container=container_name, blob=blob_name)
|
||||
blob_client.require_encryption = True
|
||||
blob_client.key_encryption_key = kek
|
||||
# GOOD: Must use `encryption_version` set to `2.0`
|
||||
blob_client.encryption_version = '2.0' # Use Version 2.0!
|
||||
with open(“decryptedcontentfile.txt”, “rb”) as stream:
|
||||
blob_client.upload_blob(stream, overwrite=OVERWRITE_EXISTING)
|
||||
Reference in New Issue
Block a user