Skip to content

General updates#12

Merged
GeekMasher merged 13 commits intomainfrom
general-updates
Jun 12, 2025
Merged

General updates#12
GeekMasher merged 13 commits intomainfrom
general-updates

Conversation

@GeekMasher
Copy link
Copy Markdown
Contributor

This pull request introduces significant enhancements and refactoring to the Bicep framework's CodeQL library. The changes primarily focus on standardizing resource property handling, improving type specificity, and adding new abstractions for better resource modeling. Below is a summary of the most important changes grouped by theme:

Standardization of Resource Properties

  • Introduced an abstract ResourceProperties class in ql/lib/codeql/bicep/frameworks/Microsoft/General.qll to serve as a base for all resource-specific property classes, replacing the generic Object type across multiple modules.
  • Updated Properties classes across modules (Cache.qll, Compute.qll, Containers.qll, Databases.qll, ManagedContainers.qll, Network.qll, Storage.qll) to inherit from ResourceProperties instead of Object. [1] [2] [3] [4] [5] [6]

Enhanced Resource Modeling

  • Added new classes to model specific resource properties, such as OsProfile, SshConfig, and SshPublicKey in Compute.qll, providing more granular access to properties like osType, ssh, and keyData. [1] [2]
  • Introduced additional abstractions for managed AKS clusters in ManagedContainers.qll, including detailed classes for AgentPoolProfiles, ApiServerAccessProfile, and various addon profiles.

Improved Type Specificity

  • Updated method return types to use more specific types where applicable, such as replacing Expr with Idents in Expr.qll and OsProfile in Compute.qll. [1] [2]
  • Replaced generic types with specific classes for properties like StorageAccountProperties and DisksProperties in Storage.qll.

New Resource Support

  • Added support for new resource types, such as DiskPools, BlobServiceContainers, and their associated properties in Storage.qll. These additions improve the framework's ability to analyze storage-related resources.

Test Updates

  • Updated the expected output in ql/test/library-tests/frameworks/cache/Cache.expected to reflect changes in the CacheProperties structure.

@GeekMasher GeekMasher merged commit b3fbec2 into main Jun 12, 2025
5 checks passed
@GeekMasher GeekMasher deleted the general-updates branch June 12, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant