-
Notifications
You must be signed in to change notification settings - Fork 12
feat(tf): Add initial StorageAccount support #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
- Doesn't break compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds initial support for Azure Storage Account resources to the codeql-hcl library, expanding beyond the existing managed disk and storage container coverage. The changes enable security analysis of Azure Storage Accounts by detecting public access configurations across different provider versions.
Key changes:
- Added Azure Storage Account support with comprehensive property parsing for v2 and v3 provider versions
- Refactored existing Azure resource definitions into modular, domain-specific files
- Enhanced the PublicStorage security query to detect insecure storage account configurations
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ql/lib/codeql/hcl/providers/azure/Storage.qll | New dedicated module containing all Azure storage-related resources including StorageAccount, StorageContainer, and ManagedDisk |
| ql/lib/codeql/hcl/security/PublicStorage.qll | New security library defining AzurePublicStorage class to detect public storage configurations |
| ql/src/security/Terraform/Azure/ManagedDisk/PublicAccess.ql | Updated query to use the new PublicStorage library for broader Azure storage security coverage |
| ql/lib/codeql/hcl/providers/Azure.qll | Refactored to import modular Azure service definitions instead of containing all classes directly |
| ql/lib/codeql/hcl/Terraform.qll | Added semantic version support for provider version comparison |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| account_kind = "BlobStorage" | ||
| account_tier = "Standard" | ||
| account_replication_type = "GRS" | ||
| resource_group_name = azurerm_resource_group.example |
Copilot
AI
Sep 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resource_group_name attribute should reference azurerm_resource_group.example.name instead of the resource object itself.
| account_kind = "BlobStorage" | ||
| account_tier = "Standard" | ||
| account_replication_type = "GRS" | ||
| resource_group_name = azurerm_resource_group.example |
Copilot
AI
Sep 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resource_group_name attribute should reference azurerm_resource_group.example.name instead of the resource object itself.
| account_kind = "BlobStorage" | ||
| account_tier = "Standard" | ||
| account_replication_type = "GRS" | ||
| resource_group_name = azurerm_resource_group.example |
Copilot
AI
Sep 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resource_group_name attribute should reference azurerm_resource_group.example.name instead of the resource object itself.
allow_nested_items_to_be_publicshould be disabled #156